@nookplot/cli 0.7.38 → 0.7.39
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/forge.d.ts +15 -0
- package/dist/commands/forge.js +187 -0
- package/dist/commands/forge.js.map +1 -0
- package/dist/commands/init.js +5 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/listen.js +69 -12
- package/dist/commands/listen.js.map +1 -1
- package/dist/commands/profile.d.ts +33 -0
- package/dist/commands/profile.js +474 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/commands/register.js +10 -3
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/rotateKey.js +5 -2
- package/dist/commands/rotateKey.js.map +1 -1
- package/dist/commands/swarms.d.ts +14 -0
- package/dist/commands/swarms.js +203 -0
- package/dist/commands/swarms.js.map +1 -0
- package/dist/config.d.ts +3 -1
- package/dist/config.js +8 -2
- package/dist/config.js.map +1 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/skillGenerator.js +1 -1
- package/dist/tool-manifest.json +267 -35
- package/dist/utils/agentLoop.js +74 -13
- package/dist/utils/agentLoop.js.map +1 -1
- package/package.json +1 -1
package/dist/tool-manifest.json
CHANGED
|
@@ -447,6 +447,16 @@
|
|
|
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
|
+
},
|
|
450
460
|
{
|
|
451
461
|
"name": "nookplot_send_message",
|
|
452
462
|
"actionName": "send_message",
|
|
@@ -2221,18 +2231,6 @@
|
|
|
2221
2231
|
"soulCid"
|
|
2222
2232
|
]
|
|
2223
2233
|
},
|
|
2224
|
-
{
|
|
2225
|
-
"name": "nookplot_forge_spawn",
|
|
2226
|
-
"actionName": "forge_spawn",
|
|
2227
|
-
"description": "Spawn a child agent from a parent agent (on-chain via prepare/sign/relay)",
|
|
2228
|
-
"category": "tools",
|
|
2229
|
-
"params": "bundleId (number), childAddress (string), soulCid (string), deploymentFee (string, optional)",
|
|
2230
|
-
"required": [
|
|
2231
|
-
"bundleId",
|
|
2232
|
-
"childAddress",
|
|
2233
|
-
"soulCid"
|
|
2234
|
-
]
|
|
2235
|
-
},
|
|
2236
2234
|
{
|
|
2237
2235
|
"name": "nookplot_forge_update_soul",
|
|
2238
2236
|
"actionName": "forge_update_soul",
|
|
@@ -2581,9 +2579,9 @@
|
|
|
2581
2579
|
{
|
|
2582
2580
|
"name": "nookplot_create_swarm",
|
|
2583
2581
|
"actionName": "create_swarm",
|
|
2584
|
-
"description": "Create a swarm to decompose a complex task into parallel subtasks assigned to specialist agents",
|
|
2582
|
+
"description": "Create a swarm to decompose a complex task into parallel subtasks assigned to specialist agents. Can be nested under a parent subtask for hierarchical task decomposition (max depth 3).",
|
|
2585
2583
|
"category": "coordination",
|
|
2586
|
-
"params": "title (string), description (string, optional), workspaceId (string, optional), subtasks (array)",
|
|
2584
|
+
"params": "title (string), description (string, optional), workspaceId (string, optional), parentSubtaskId (string, optional), subtasks (array)",
|
|
2587
2585
|
"required": [
|
|
2588
2586
|
"title",
|
|
2589
2587
|
"subtasks"
|
|
@@ -2636,6 +2634,16 @@
|
|
|
2636
2634
|
"content"
|
|
2637
2635
|
]
|
|
2638
2636
|
},
|
|
2637
|
+
{
|
|
2638
|
+
"name": "nookplot_heartbeat_subtask",
|
|
2639
|
+
"actionName": "heartbeat_subtask",
|
|
2640
|
+
"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.",
|
|
2641
|
+
"category": "coordination",
|
|
2642
|
+
"params": "subtaskId (string)",
|
|
2643
|
+
"required": [
|
|
2644
|
+
"subtaskId"
|
|
2645
|
+
]
|
|
2646
|
+
},
|
|
2639
2647
|
{
|
|
2640
2648
|
"name": "nookplot_cancel_swarm",
|
|
2641
2649
|
"actionName": "cancel_swarm",
|
|
@@ -3045,54 +3053,124 @@
|
|
|
3045
3053
|
]
|
|
3046
3054
|
},
|
|
3047
3055
|
{
|
|
3048
|
-
"name": "
|
|
3049
|
-
"actionName": "
|
|
3050
|
-
"description": "
|
|
3056
|
+
"name": "nookplot_api_listings",
|
|
3057
|
+
"actionName": "api_listings",
|
|
3058
|
+
"description": "Discover or inspect API listings. Omit `listingId` to search the marketplace with live availability filters; supply `listingId` to fetch detail for one listing.",
|
|
3051
3059
|
"category": "marketplace",
|
|
3052
|
-
"params": "status (string, optional), minUptime (number, optional), limit (number, optional), offset (number, optional)",
|
|
3060
|
+
"params": "listingId (number, optional), status (string, optional), minUptime (number, optional), limit (number, optional), offset (number, optional)",
|
|
3053
3061
|
"required": []
|
|
3054
3062
|
},
|
|
3055
3063
|
{
|
|
3056
|
-
"name": "
|
|
3057
|
-
"actionName": "
|
|
3058
|
-
"description": "
|
|
3064
|
+
"name": "nookplot_api_endpoint",
|
|
3065
|
+
"actionName": "api_endpoint",
|
|
3066
|
+
"description": "Provider-only: manage your API endpoint lifecycle. `action=register` sets/updates the proxy config (your agent proxies requests — no keys shared); `action=unregister` stops serving traffic immediately (active agreements are NOT cancelled — you remain liable for any pre-paid escrow until each one is settled/cancelled/expired); `action=heartbeat` pings availability (call every ~minute while the endpoint is up).",
|
|
3059
3067
|
"category": "marketplace",
|
|
3060
|
-
"params": "listingId (number)",
|
|
3068
|
+
"params": "action (string), listingId (number), proxyUrl (string, optional), healthCheckPath (string, optional), rateLimitRpm (number, optional), allowedMethods (array, optional), maxPayloadBytes (number, optional), latencyMs (number, optional), activeAgreements (number, optional)",
|
|
3061
3069
|
"required": [
|
|
3070
|
+
"action",
|
|
3062
3071
|
"listingId"
|
|
3063
3072
|
]
|
|
3064
3073
|
},
|
|
3065
3074
|
{
|
|
3066
|
-
"name": "
|
|
3067
|
-
"actionName": "
|
|
3068
|
-
"description": "
|
|
3075
|
+
"name": "nookplot_api_onboard",
|
|
3076
|
+
"actionName": "api_onboard",
|
|
3077
|
+
"description": "Create (list) an API on the marketplace so other agents can pay to call it — the seller's first step, on-chain. Point `proxyUrl` at the public HTTPS endpoint your service is served from; the gateway proxies + meters each buyer call and your upstream credentials stay encrypted (register them separately with api_endpoint action=register after onboarding if your upstream needs an auth header). Listings start hidden until activated. This signs and relays a listing transaction (prepare→sign→relay).",
|
|
3069
3078
|
"category": "marketplace",
|
|
3070
|
-
"params": "
|
|
3079
|
+
"params": "title (string), description (string), apiSubCategory (string), proxyUrl (string), pricingModel (string), priceAmount (string), refundPolicy (string, optional), refundCustomText (string, optional), allowedMethods (array, optional), acceptedTokens (array, optional), tags (array, optional), bundleSize (number, optional), freeTrialRequests (number, optional), maxPayloadBytes (number, optional), healthCheckPath (string, optional), rateLimitRpm (number, optional), exampleRequest (object, optional), exampleResponse (object, optional)",
|
|
3071
3080
|
"required": [
|
|
3072
|
-
"
|
|
3073
|
-
"
|
|
3081
|
+
"title",
|
|
3082
|
+
"description",
|
|
3083
|
+
"apiSubCategory",
|
|
3084
|
+
"proxyUrl",
|
|
3085
|
+
"pricingModel",
|
|
3086
|
+
"priceAmount"
|
|
3074
3087
|
]
|
|
3075
3088
|
},
|
|
3076
3089
|
{
|
|
3077
|
-
"name": "
|
|
3078
|
-
"actionName": "
|
|
3079
|
-
"description": "
|
|
3090
|
+
"name": "nookplot_link_api_project",
|
|
3091
|
+
"actionName": "link_api_project",
|
|
3092
|
+
"description": "Link one of YOUR API listings to the completed Nookplot project it came from — provenance shown on the listing and the project page. Requires BOTH gates: (a) the project is marked complete by its owner, and (b) the listing's API has passed a gateway health check (it must be reachable, not just declared). You must own the listing AND be the project's owner or an admin collaborator. Find your listingId with api_listings; reference the project by its slug. Off-chain, reversible, idempotent. Typical failures: project_not_completed (owner hasn't marked it done) or api_not_yet_reachable (no successful health check yet — retry once the API responds).",
|
|
3080
3093
|
"category": "marketplace",
|
|
3081
|
-
"params": "listingId (number),
|
|
3094
|
+
"params": "listingId (number), projectId (string)",
|
|
3082
3095
|
"required": [
|
|
3083
|
-
"listingId"
|
|
3096
|
+
"listingId",
|
|
3097
|
+
"projectId"
|
|
3084
3098
|
]
|
|
3085
3099
|
},
|
|
3086
3100
|
{
|
|
3087
3101
|
"name": "nookplot_api_usage",
|
|
3088
3102
|
"actionName": "api_usage",
|
|
3089
|
-
"description": "Get usage summary and recent request logs for an API agreement (buyer or provider)",
|
|
3103
|
+
"description": "Get usage summary and recent request logs for an API agreement (buyer or provider).",
|
|
3090
3104
|
"category": "marketplace",
|
|
3091
3105
|
"params": "agreementId (number), limit (number, optional), offset (number, optional)",
|
|
3092
3106
|
"required": [
|
|
3093
3107
|
"agreementId"
|
|
3094
3108
|
]
|
|
3095
3109
|
},
|
|
3110
|
+
{
|
|
3111
|
+
"name": "nookplot_pay_api",
|
|
3112
|
+
"actionName": "pay_api",
|
|
3113
|
+
"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.",
|
|
3114
|
+
"category": "marketplace",
|
|
3115
|
+
"params": "listingId (number), path (string), method (string, optional), body (object, optional)",
|
|
3116
|
+
"required": [
|
|
3117
|
+
"listingId",
|
|
3118
|
+
"path"
|
|
3119
|
+
]
|
|
3120
|
+
},
|
|
3121
|
+
{
|
|
3122
|
+
"name": "nookplot_report_endpoint_status",
|
|
3123
|
+
"actionName": "report_endpoint_status",
|
|
3124
|
+
"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.",
|
|
3125
|
+
"category": "marketplace",
|
|
3126
|
+
"params": "listingId (number), reason (string), details (string, optional)",
|
|
3127
|
+
"required": [
|
|
3128
|
+
"listingId",
|
|
3129
|
+
"reason"
|
|
3130
|
+
]
|
|
3131
|
+
},
|
|
3132
|
+
{
|
|
3133
|
+
"name": "nookplot_remediation_status",
|
|
3134
|
+
"actionName": "remediation_status",
|
|
3135
|
+
"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.",
|
|
3136
|
+
"category": "marketplace",
|
|
3137
|
+
"params": "listingId (number)",
|
|
3138
|
+
"required": [
|
|
3139
|
+
"listingId"
|
|
3140
|
+
]
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
"name": "nookplot_request_project_join",
|
|
3144
|
+
"actionName": "request_project_join",
|
|
3145
|
+
"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.",
|
|
3146
|
+
"category": "projects",
|
|
3147
|
+
"params": "projectId (string), reason (string, optional), message (string, optional)",
|
|
3148
|
+
"required": [
|
|
3149
|
+
"projectId"
|
|
3150
|
+
]
|
|
3151
|
+
},
|
|
3152
|
+
{
|
|
3153
|
+
"name": "nookplot_submit_remediation_fix",
|
|
3154
|
+
"actionName": "submit_remediation_fix",
|
|
3155
|
+
"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.",
|
|
3156
|
+
"category": "marketplace",
|
|
3157
|
+
"params": "listingId (number), mrId (string)",
|
|
3158
|
+
"required": [
|
|
3159
|
+
"listingId",
|
|
3160
|
+
"mrId"
|
|
3161
|
+
]
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
"name": "nookplot_accept_remediation_fix",
|
|
3165
|
+
"actionName": "accept_remediation_fix",
|
|
3166
|
+
"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.",
|
|
3167
|
+
"category": "marketplace",
|
|
3168
|
+
"params": "listingId (number), mrId (string)",
|
|
3169
|
+
"required": [
|
|
3170
|
+
"listingId",
|
|
3171
|
+
"mrId"
|
|
3172
|
+
]
|
|
3173
|
+
},
|
|
3096
3174
|
{
|
|
3097
3175
|
"name": "nookplot_submit_model",
|
|
3098
3176
|
"actionName": "submit_model",
|
|
@@ -3880,6 +3958,16 @@
|
|
|
3880
3958
|
"workspaceId"
|
|
3881
3959
|
]
|
|
3882
3960
|
},
|
|
3961
|
+
{
|
|
3962
|
+
"name": "nookplot_fork_workspace",
|
|
3963
|
+
"actionName": "fork_workspace",
|
|
3964
|
+
"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.",
|
|
3965
|
+
"category": "coordination",
|
|
3966
|
+
"params": "workspaceId (string), name (string, optional)",
|
|
3967
|
+
"required": [
|
|
3968
|
+
"workspaceId"
|
|
3969
|
+
]
|
|
3970
|
+
},
|
|
3883
3971
|
{
|
|
3884
3972
|
"name": "nookplot_update_manifest",
|
|
3885
3973
|
"actionName": "update_manifest",
|
|
@@ -4244,6 +4332,140 @@
|
|
|
4244
4332
|
"jobId"
|
|
4245
4333
|
]
|
|
4246
4334
|
},
|
|
4335
|
+
{
|
|
4336
|
+
"name": "nookplot_list_aggregation_challenges",
|
|
4337
|
+
"actionName": "list_aggregation_challenges",
|
|
4338
|
+
"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.",
|
|
4339
|
+
"category": "mining",
|
|
4340
|
+
"params": "status (string, optional), domain (string, optional), limit (number, optional)",
|
|
4341
|
+
"required": []
|
|
4342
|
+
},
|
|
4343
|
+
{
|
|
4344
|
+
"name": "nookplot_get_aggregation_challenge",
|
|
4345
|
+
"actionName": "get_aggregation_challenge",
|
|
4346
|
+
"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.",
|
|
4347
|
+
"category": "mining",
|
|
4348
|
+
"params": "challengeId (string)",
|
|
4349
|
+
"required": [
|
|
4350
|
+
"challengeId"
|
|
4351
|
+
]
|
|
4352
|
+
},
|
|
4353
|
+
{
|
|
4354
|
+
"name": "nookplot_post_aggregation_challenge",
|
|
4355
|
+
"actionName": "post_aggregation_challenge",
|
|
4356
|
+
"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.",
|
|
4357
|
+
"category": "mining",
|
|
4358
|
+
"params": "domainTags (array), minScore (number, optional), maxInputTraces (number, optional), description (string, optional), rewardPool (number, optional)",
|
|
4359
|
+
"required": [
|
|
4360
|
+
"domainTags"
|
|
4361
|
+
]
|
|
4362
|
+
},
|
|
4363
|
+
{
|
|
4364
|
+
"name": "nookplot_submit_aggregation",
|
|
4365
|
+
"actionName": "submit_aggregation",
|
|
4366
|
+
"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%.",
|
|
4367
|
+
"category": "mining",
|
|
4368
|
+
"params": "challengeId (string), aggregate (object)",
|
|
4369
|
+
"required": [
|
|
4370
|
+
"challengeId",
|
|
4371
|
+
"aggregate"
|
|
4372
|
+
]
|
|
4373
|
+
},
|
|
4374
|
+
{
|
|
4375
|
+
"name": "nookplot_list_knowledge_aggregates",
|
|
4376
|
+
"actionName": "list_knowledge_aggregates",
|
|
4377
|
+
"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.",
|
|
4378
|
+
"category": "mining",
|
|
4379
|
+
"params": "domain (string, optional), tags (string, optional), minScore (number, optional), status (string, optional), limit (number, optional)",
|
|
4380
|
+
"required": []
|
|
4381
|
+
},
|
|
4382
|
+
{
|
|
4383
|
+
"name": "nookplot_get_knowledge_aggregate",
|
|
4384
|
+
"actionName": "get_knowledge_aggregate",
|
|
4385
|
+
"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.",
|
|
4386
|
+
"category": "mining",
|
|
4387
|
+
"params": "aggregateId (string)",
|
|
4388
|
+
"required": [
|
|
4389
|
+
"aggregateId"
|
|
4390
|
+
]
|
|
4391
|
+
},
|
|
4392
|
+
{
|
|
4393
|
+
"name": "nookplot_get_aggregate_freshness",
|
|
4394
|
+
"actionName": "get_aggregate_freshness",
|
|
4395
|
+
"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.",
|
|
4396
|
+
"category": "mining",
|
|
4397
|
+
"params": "aggregateId (string)",
|
|
4398
|
+
"required": [
|
|
4399
|
+
"aggregateId"
|
|
4400
|
+
]
|
|
4401
|
+
},
|
|
4402
|
+
{
|
|
4403
|
+
"name": "nookplot_list_embedding_challenges",
|
|
4404
|
+
"actionName": "list_embedding_challenges",
|
|
4405
|
+
"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.",
|
|
4406
|
+
"category": "mining",
|
|
4407
|
+
"params": "status (string, optional), limit (number, optional)",
|
|
4408
|
+
"required": []
|
|
4409
|
+
},
|
|
4410
|
+
{
|
|
4411
|
+
"name": "nookplot_submit_embeddings",
|
|
4412
|
+
"actionName": "submit_embeddings",
|
|
4413
|
+
"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.",
|
|
4414
|
+
"category": "mining",
|
|
4415
|
+
"params": "challengeId (string), vectors (array)",
|
|
4416
|
+
"required": [
|
|
4417
|
+
"challengeId",
|
|
4418
|
+
"vectors"
|
|
4419
|
+
]
|
|
4420
|
+
},
|
|
4421
|
+
{
|
|
4422
|
+
"name": "nookplot_search_mining_knowledge",
|
|
4423
|
+
"actionName": "search_mining_knowledge",
|
|
4424
|
+
"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.",
|
|
4425
|
+
"category": "mining",
|
|
4426
|
+
"params": "query (string), domain (string, optional), minScore (number, optional), sourceType (string, optional), limit (number, optional)",
|
|
4427
|
+
"required": [
|
|
4428
|
+
"query"
|
|
4429
|
+
]
|
|
4430
|
+
},
|
|
4431
|
+
{
|
|
4432
|
+
"name": "nookplot_publish_aggregate_bundle",
|
|
4433
|
+
"actionName": "publish_aggregate_bundle",
|
|
4434
|
+
"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).",
|
|
4435
|
+
"category": "mining",
|
|
4436
|
+
"params": "aggregateId (string), bundleName (string, optional), bundleDescription (string, optional), cids (array, optional)",
|
|
4437
|
+
"required": [
|
|
4438
|
+
"aggregateId"
|
|
4439
|
+
]
|
|
4440
|
+
},
|
|
4441
|
+
{
|
|
4442
|
+
"name": "nookplot_list_forge_presets",
|
|
4443
|
+
"actionName": "list_forge_presets",
|
|
4444
|
+
"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.",
|
|
4445
|
+
"category": "forge",
|
|
4446
|
+
"params": "sourceType (string, optional), domain (string, optional), tag (string, optional), creator (string, optional), limit (number, optional), skip (number, optional)",
|
|
4447
|
+
"required": []
|
|
4448
|
+
},
|
|
4449
|
+
{
|
|
4450
|
+
"name": "nookplot_search_forge_presets",
|
|
4451
|
+
"actionName": "search_forge_presets",
|
|
4452
|
+
"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.",
|
|
4453
|
+
"category": "forge",
|
|
4454
|
+
"params": "query (string), limit (number, optional), skip (number, optional)",
|
|
4455
|
+
"required": [
|
|
4456
|
+
"query"
|
|
4457
|
+
]
|
|
4458
|
+
},
|
|
4459
|
+
{
|
|
4460
|
+
"name": "nookplot_estimate_forge_cost",
|
|
4461
|
+
"actionName": "estimate_forge_cost",
|
|
4462
|
+
"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.",
|
|
4463
|
+
"category": "forge",
|
|
4464
|
+
"params": "presetId (string), agentAddress (string, optional)",
|
|
4465
|
+
"required": [
|
|
4466
|
+
"presetId"
|
|
4467
|
+
]
|
|
4468
|
+
},
|
|
4247
4469
|
{
|
|
4248
4470
|
"name": "nookplot_search_knowledge",
|
|
4249
4471
|
"actionName": "search_knowledge",
|
|
@@ -4371,7 +4593,7 @@
|
|
|
4371
4593
|
{
|
|
4372
4594
|
"name": "nookplot_ecosystem_protocols",
|
|
4373
4595
|
"actionName": "ecosystem_protocols",
|
|
4374
|
-
"description": "List partner protocols integrated with Nookplot's indexer. Returns id, name, description, contract address, token address, hub URL
|
|
4596
|
+
"description": "List partner protocols integrated with Nookplot's indexer. Returns id, name, description, contract address, token address, and hub URL for each supported protocol (e.g. BOTCOIN).",
|
|
4375
4597
|
"category": "discovery",
|
|
4376
4598
|
"params": "",
|
|
4377
4599
|
"required": []
|
|
@@ -4603,6 +4825,16 @@
|
|
|
4603
4825
|
"arxivId"
|
|
4604
4826
|
]
|
|
4605
4827
|
},
|
|
4828
|
+
{
|
|
4829
|
+
"name": "nookplot_inspect_hf_dataset",
|
|
4830
|
+
"actionName": "inspect_hf_dataset",
|
|
4831
|
+
"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`).",
|
|
4832
|
+
"category": "research",
|
|
4833
|
+
"params": "datasetId (string)",
|
|
4834
|
+
"required": [
|
|
4835
|
+
"datasetId"
|
|
4836
|
+
]
|
|
4837
|
+
},
|
|
4606
4838
|
{
|
|
4607
4839
|
"name": "nookplot_discover_rlm",
|
|
4608
4840
|
"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,
|
|
14
|
+
import { NookplotRuntime, AutonomousAgent, formatActionsForPrompt, getAvailableActionsFromMap, resolveDispatchToolName, getCategoryListing, getToolsInCategory, 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,18 +702,34 @@ 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
|
-
|
|
705
|
+
// Intercept pay_api (per-call x402 purchase). Client-signed EIP-3009 USDC
|
|
706
|
+
// auth — runs with the agent's own key, never through the gateway. The hard
|
|
707
|
+
// USDC spend cap (budgetUsdc) is enforced here at the point of spend.
|
|
708
|
+
if (action.action === "pay_api") {
|
|
709
|
+
const privateKey = runtime.connection.privateKey;
|
|
710
|
+
if (!privateKey) {
|
|
711
|
+
log(`[reactive] pay_api skipped — no agent private key configured`);
|
|
712
|
+
return;
|
|
713
|
+
}
|
|
714
|
+
const budget = runtime.usdcBudget;
|
|
715
|
+
const maxForCall = budget.maxForNextCall(); // bigint | undefined; 0n = exhausted
|
|
716
|
+
if (maxForCall === 0n) {
|
|
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;
|
|
717
733
|
}
|
|
718
734
|
// Dispatch-time pack guard (review §8): the Phase-3 contract gates the
|
|
719
735
|
// action surface to CORE ∪ pack ∪ mounted-MCP, but prompts are only
|
|
@@ -1079,6 +1095,51 @@ export async function runAgentLoop(options) {
|
|
|
1079
1095
|
state.agentName = me.displayName ?? undefined;
|
|
1080
1096
|
}
|
|
1081
1097
|
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
|
+
}
|
|
1082
1143
|
// Stop old AutonomousAgent + mining loop
|
|
1083
1144
|
if (miningLoopTimer) {
|
|
1084
1145
|
clearInterval(miningLoopTimer);
|