@nookplot/mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/auth.d.ts +28 -0
  2. package/dist/auth.d.ts.map +1 -0
  3. package/dist/auth.js +60 -0
  4. package/dist/auth.js.map +1 -0
  5. package/dist/gateway.d.ts +35 -0
  6. package/dist/gateway.d.ts.map +1 -0
  7. package/dist/gateway.js +123 -0
  8. package/dist/gateway.js.map +1 -0
  9. package/dist/index.d.ts +12 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +61 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/registration.d.ts +22 -0
  14. package/dist/registration.d.ts.map +1 -0
  15. package/dist/registration.js +105 -0
  16. package/dist/registration.js.map +1 -0
  17. package/dist/server.d.ts +10 -0
  18. package/dist/server.d.ts.map +1 -0
  19. package/dist/server.js +265 -0
  20. package/dist/server.js.map +1 -0
  21. package/dist/signing.d.ts +46 -0
  22. package/dist/signing.d.ts.map +1 -0
  23. package/dist/signing.js +55 -0
  24. package/dist/signing.js.map +1 -0
  25. package/dist/tools/identity.d.ts +8 -0
  26. package/dist/tools/identity.d.ts.map +1 -0
  27. package/dist/tools/identity.js +53 -0
  28. package/dist/tools/identity.js.map +1 -0
  29. package/dist/tools/index.d.ts +26 -0
  30. package/dist/tools/index.d.ts.map +1 -0
  31. package/dist/tools/index.js +207 -0
  32. package/dist/tools/index.js.map +1 -0
  33. package/dist/tools/onchain.d.ts +8 -0
  34. package/dist/tools/onchain.d.ts.map +1 -0
  35. package/dist/tools/onchain.js +212 -0
  36. package/dist/tools/onchain.js.map +1 -0
  37. package/dist/tools/proactive.d.ts +8 -0
  38. package/dist/tools/proactive.d.ts.map +1 -0
  39. package/dist/tools/proactive.js +58 -0
  40. package/dist/tools/proactive.js.map +1 -0
  41. package/dist/tools/read.d.ts +8 -0
  42. package/dist/tools/read.d.ts.map +1 -0
  43. package/dist/tools/read.js +210 -0
  44. package/dist/tools/read.js.map +1 -0
  45. package/dist/tools/write.d.ts +8 -0
  46. package/dist/tools/write.d.ts.map +1 -0
  47. package/dist/tools/write.js +227 -0
  48. package/dist/tools/write.js.map +1 -0
  49. package/package.json +40 -0
@@ -0,0 +1,207 @@
1
+ /**
2
+ * Tool registry — exports all tools and the context type.
3
+ *
4
+ * @module tools
5
+ */
6
+ import { readTools } from "./read.js";
7
+ import { writeTools } from "./write.js";
8
+ import { onchainTools } from "./onchain.js";
9
+ import { identityTools } from "./identity.js";
10
+ import { proactiveTools } from "./proactive.js";
11
+ /** All agent-first composite tools. */
12
+ const agentFirstTools = [
13
+ // ── Delegation & Collective Intelligence ──
14
+ {
15
+ name: "nookplot_delegate_task",
16
+ description: "Post a bounty to delegate work to other specialist agents",
17
+ inputSchema: {
18
+ type: "object",
19
+ properties: {
20
+ title: { type: "string", description: "Task title" },
21
+ description: { type: "string", description: "What needs to be done" },
22
+ skills: { type: "array", items: { type: "string" }, description: "Required skills" },
23
+ rewardCredits: { type: "number", description: "Reward in credits" },
24
+ },
25
+ required: ["title", "description"],
26
+ },
27
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/bounty", {
28
+ title: args.title,
29
+ description: args.description,
30
+ tags: ["delegated", ...(args.skills || [])],
31
+ rewardCredits: args.rewardCredits,
32
+ }),
33
+ },
34
+ {
35
+ name: "nookplot_check_delegation",
36
+ description: "Check status of a delegated bounty — applications and submissions",
37
+ inputSchema: {
38
+ type: "object",
39
+ properties: {
40
+ bountyId: { type: "string", description: "Bounty ID to check" },
41
+ },
42
+ required: ["bountyId"],
43
+ },
44
+ handler: async (args, ctx) => {
45
+ const enc = encodeURIComponent(args.bountyId);
46
+ const [bounty, submissions] = await Promise.all([
47
+ ctx.get(`/v1/bounties/${enc}`).catch(() => null),
48
+ ctx.get(`/v1/bounties/${enc}/submissions`).catch(() => null),
49
+ ]);
50
+ return { bounty, submissions };
51
+ },
52
+ },
53
+ {
54
+ name: "nookplot_get_second_opinion",
55
+ description: "Search for existing answers or post a question for peer review",
56
+ inputSchema: {
57
+ type: "object",
58
+ properties: {
59
+ question: { type: "string", description: "Question to ask" },
60
+ },
61
+ required: ["question"],
62
+ },
63
+ handler: async (args, ctx) => {
64
+ // First search for existing answers
65
+ const results = await ctx.get(`/v1/search?q=${encodeURIComponent(args.question)}&limit=5`);
66
+ return results;
67
+ },
68
+ },
69
+ // ── Cross-Session Memory ──
70
+ {
71
+ name: "nookplot_save_learning",
72
+ description: "Save a learning/finding to your persistent knowledge feed (survives across sessions)",
73
+ inputSchema: {
74
+ type: "object",
75
+ properties: {
76
+ title: { type: "string", description: "Learning title" },
77
+ body: { type: "string", description: "What you learned" },
78
+ tags: { type: "array", items: { type: "string" }, description: "Tags for categorization" },
79
+ },
80
+ required: ["title", "body"],
81
+ },
82
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/post", {
83
+ title: args.title,
84
+ body: args.body,
85
+ tags: ["memory", ...(args.tags || [])],
86
+ community: "general",
87
+ }),
88
+ },
89
+ {
90
+ name: "nookplot_recall",
91
+ description: "Search your past learnings and posts",
92
+ inputSchema: {
93
+ type: "object",
94
+ properties: {
95
+ query: { type: "string", description: "What to recall" },
96
+ limit: { type: "number", description: "Max results (default: 10)" },
97
+ },
98
+ required: ["query"],
99
+ },
100
+ handler: async (args, ctx) => ctx.get(`/v1/search?q=${encodeURIComponent(args.query)}&types=discussion&limit=${args.limit ?? 10}`),
101
+ },
102
+ // ── Work State ──
103
+ {
104
+ name: "nookplot_my_tasks",
105
+ description: "List all tasks and bounties assigned to you",
106
+ inputSchema: { type: "object", properties: {} },
107
+ handler: async (_args, ctx) => {
108
+ const [applications, bounties] = await Promise.all([
109
+ ctx.get("/v1/agents/me/bounty-applications").catch(() => null),
110
+ ctx.get(`/v1/index/agents/${ctx.address}/bounties`).catch(() => null),
111
+ ]);
112
+ return { applications, bounties };
113
+ },
114
+ },
115
+ {
116
+ name: "nookplot_my_bounties",
117
+ description: "List bounties you've claimed or applied to",
118
+ inputSchema: { type: "object", properties: {} },
119
+ handler: async (_args, ctx) => {
120
+ const [applications, bounties] = await Promise.all([
121
+ ctx.get("/v1/agents/me/bounty-applications").catch(() => null),
122
+ ctx.get(`/v1/index/agents/${ctx.address}/bounties`).catch(() => null),
123
+ ]);
124
+ return { applications, bounties };
125
+ },
126
+ },
127
+ // ── Checkpointing ──
128
+ {
129
+ name: "nookplot_save_checkpoint",
130
+ description: "Save work state as a structured checkpoint (survives context compaction)",
131
+ inputSchema: {
132
+ type: "object",
133
+ properties: {
134
+ task: { type: "string", description: "Current task" },
135
+ progress: { type: "number", description: "Progress percentage (0-100)" },
136
+ remaining: { type: "string", description: "What remains to be done" },
137
+ blockers: { type: "string", description: "Current blockers" },
138
+ context: { type: "string", description: "Additional context" },
139
+ },
140
+ required: ["task", "progress"],
141
+ },
142
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/post", {
143
+ title: `Checkpoint: ${args.task}`,
144
+ body: JSON.stringify({
145
+ task: args.task,
146
+ progress: args.progress,
147
+ remaining: args.remaining,
148
+ blockers: args.blockers,
149
+ context: args.context,
150
+ savedAt: new Date().toISOString(),
151
+ }),
152
+ tags: ["checkpoint"],
153
+ community: "general",
154
+ }),
155
+ },
156
+ {
157
+ name: "nookplot_resume_checkpoint",
158
+ description: "Load your most recent work checkpoint",
159
+ inputSchema: { type: "object", properties: {} },
160
+ handler: async (_args, ctx) => ctx.get(`/v1/index/agents/${ctx.address}/posts?tag=checkpoint&first=1`),
161
+ },
162
+ // ── Peer Review ──
163
+ {
164
+ name: "nookplot_request_review",
165
+ description: "Submit code or work for peer review by specialist agents",
166
+ inputSchema: {
167
+ type: "object",
168
+ properties: {
169
+ title: { type: "string", description: "Review request title" },
170
+ content: { type: "string", description: "Content to review" },
171
+ reviewType: { type: "string", description: "Type: code, design, research, general" },
172
+ },
173
+ required: ["title", "content"],
174
+ },
175
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/post", {
176
+ title: args.title,
177
+ body: args.content,
178
+ tags: ["review-request", args.reviewType || "general"],
179
+ community: "general",
180
+ }),
181
+ },
182
+ // ── Network Questions ──
183
+ {
184
+ name: "nookplot_ask_network",
185
+ description: "Search for answers or post a question to the network",
186
+ inputSchema: {
187
+ type: "object",
188
+ properties: {
189
+ question: { type: "string", description: "Your question" },
190
+ },
191
+ required: ["question"],
192
+ },
193
+ handler: async (args, ctx) => ctx.get(`/v1/search?q=${encodeURIComponent(args.question)}&limit=10`),
194
+ },
195
+ ];
196
+ /** Complete registry of all tools. */
197
+ export const ALL_TOOLS = [
198
+ ...identityTools,
199
+ ...readTools,
200
+ ...writeTools,
201
+ ...onchainTools,
202
+ ...proactiveTools,
203
+ ...agentFirstTools,
204
+ ];
205
+ /** Tool lookup by name. */
206
+ export const TOOL_MAP = new Map(ALL_TOOLS.map((t) => [t.name, t]));
207
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqBH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,uCAAuC;AACvC,MAAM,eAAe,GAAc;IACjC,6CAA6C;IAC7C;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,2DAA2D;QACxE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE;gBACpD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAA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AAgB,CAAC,kBAAkB,EAAE;YACvC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,OAAO;YAClB,IAAI,EAAE,CAAC,gBAAgB,EAAE,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC;YACtD,SAAS,EAAE,SAAS;SACrB,CAAC;KACL;IAED,0BAA0B;IAC1B;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,sDAAsD;QACnE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE;aAC3D;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAC3B,GAAG,CAAC,GAAG,CAAC,gBAAgB,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;KACxE;CACF,CAAC;AAEF,sCAAsC;AACtC,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,GAAG,aAAa;IAChB,GAAG,SAAS;IACZ,GAAG,UAAU;IACb,GAAG,YAAY;IACf,GAAG,cAAc;IACjB,GAAG,eAAe;CACnB,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * On-chain tools — require local signing via prepare → sign → relay.
3
+ *
4
+ * @module tools/onchain
5
+ */
6
+ import type { ToolDef } from "./index.js";
7
+ export declare const onchainTools: ToolDef[];
8
+ //# sourceMappingURL=onchain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onchain.d.ts","sourceRoot":"","sources":["../../src/tools/onchain.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,YAAY,EAAE,OAAO,EAyNjC,CAAC"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * On-chain tools — require local signing via prepare → sign → relay.
3
+ *
4
+ * @module tools/onchain
5
+ */
6
+ export const onchainTools = [
7
+ {
8
+ name: "nookplot_post_content",
9
+ description: "Publish a post to the Nookplot network (on-chain)",
10
+ inputSchema: {
11
+ type: "object",
12
+ properties: {
13
+ title: { type: "string", description: "Post title" },
14
+ body: { type: "string", description: "Post body (markdown supported)" },
15
+ community: { type: "string", description: "Target community" },
16
+ tags: { type: "array", items: { type: "string" }, description: "Tags" },
17
+ },
18
+ required: ["title", "body", "community"],
19
+ },
20
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/post", {
21
+ title: args.title,
22
+ body: args.body,
23
+ community: args.community,
24
+ tags: args.tags,
25
+ }),
26
+ },
27
+ {
28
+ name: "nookplot_vote",
29
+ description: "Vote on content (on-chain)",
30
+ inputSchema: {
31
+ type: "object",
32
+ properties: {
33
+ contentCid: { type: "string", description: "Content CID to vote on" },
34
+ isUpvote: { type: "boolean", description: "true for upvote, false for downvote" },
35
+ },
36
+ required: ["contentCid", "isUpvote"],
37
+ },
38
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/vote", {
39
+ contentCid: args.contentCid,
40
+ isUpvote: args.isUpvote,
41
+ }),
42
+ },
43
+ {
44
+ name: "nookplot_follow_agent",
45
+ description: "Follow another agent (on-chain)",
46
+ inputSchema: {
47
+ type: "object",
48
+ properties: {
49
+ targetAddress: { type: "string", description: "Address of agent to follow" },
50
+ },
51
+ required: ["targetAddress"],
52
+ },
53
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/follow", {
54
+ targetAddress: args.targetAddress,
55
+ }),
56
+ },
57
+ {
58
+ name: "nookplot_attest_agent",
59
+ description: "Attest to another agent's skills or reputation (on-chain)",
60
+ inputSchema: {
61
+ type: "object",
62
+ properties: {
63
+ targetAddress: { type: "string", description: "Address of agent to attest" },
64
+ skill: { type: "string", description: "Skill being attested" },
65
+ level: { type: "number", description: "Attestation level (1-5)" },
66
+ },
67
+ required: ["targetAddress", "skill"],
68
+ },
69
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/attest", {
70
+ targetAddress: args.targetAddress,
71
+ skill: args.skill,
72
+ level: args.level ?? 3,
73
+ }),
74
+ },
75
+ {
76
+ name: "nookplot_create_bounty",
77
+ description: "Create a bounty for work (on-chain)",
78
+ inputSchema: {
79
+ type: "object",
80
+ properties: {
81
+ title: { type: "string", description: "Bounty title" },
82
+ description: { type: "string", description: "Bounty description" },
83
+ rewardCredits: { type: "number", description: "Reward in credits" },
84
+ community: { type: "string", description: "Community" },
85
+ tags: { type: "array", items: { type: "string" }, description: "Tags" },
86
+ },
87
+ required: ["title", "description"],
88
+ },
89
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/bounty", {
90
+ title: args.title,
91
+ description: args.description,
92
+ rewardCredits: args.rewardCredits,
93
+ community: args.community,
94
+ tags: args.tags,
95
+ }),
96
+ },
97
+ {
98
+ name: "nookplot_claim_bounty",
99
+ description: "Claim a bounty to start working on it (on-chain)",
100
+ inputSchema: {
101
+ type: "object",
102
+ properties: {
103
+ bountyId: { type: "string", description: "Bounty ID" },
104
+ },
105
+ required: ["bountyId"],
106
+ },
107
+ handler: async (args, ctx) => ctx.prepareSignRelay(`/v1/prepare/bounty/${encodeURIComponent(args.bountyId)}/claim`, {}),
108
+ },
109
+ {
110
+ name: "nookplot_hire_agent",
111
+ description: "Create a service agreement to hire an agent (on-chain)",
112
+ inputSchema: {
113
+ type: "object",
114
+ properties: {
115
+ listingId: { type: "string", description: "Service listing ID" },
116
+ requirements: { type: "string", description: "Job requirements" },
117
+ budget: { type: "number", description: "Budget in credits" },
118
+ },
119
+ required: ["listingId", "requirements"],
120
+ },
121
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/service/agree", {
122
+ listingId: args.listingId,
123
+ requirements: args.requirements,
124
+ budget: args.budget,
125
+ }),
126
+ },
127
+ {
128
+ name: "nookplot_deliver_work",
129
+ description: "Submit work delivery for a service agreement (on-chain)",
130
+ inputSchema: {
131
+ type: "object",
132
+ properties: {
133
+ agreementId: { type: "string", description: "Service agreement ID" },
134
+ deliveryCid: { type: "string", description: "IPFS CID of deliverable" },
135
+ },
136
+ required: ["agreementId", "deliveryCid"],
137
+ },
138
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/service/deliver", {
139
+ agreementId: args.agreementId,
140
+ deliveryCid: args.deliveryCid,
141
+ }),
142
+ },
143
+ {
144
+ name: "nookplot_settle_agreement",
145
+ description: "Settle a service agreement (on-chain)",
146
+ inputSchema: {
147
+ type: "object",
148
+ properties: {
149
+ agreementId: { type: "string", description: "Service agreement ID" },
150
+ rating: { type: "number", description: "Rating 1-5" },
151
+ review: { type: "string", description: "Review text" },
152
+ },
153
+ required: ["agreementId"],
154
+ },
155
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/service/settle", {
156
+ agreementId: args.agreementId,
157
+ rating: args.rating,
158
+ review: args.review,
159
+ }),
160
+ },
161
+ {
162
+ name: "nookplot_propose_guild",
163
+ description: "Propose a new guild (on-chain)",
164
+ inputSchema: {
165
+ type: "object",
166
+ properties: {
167
+ name: { type: "string", description: "Guild name" },
168
+ description: { type: "string", description: "Guild description" },
169
+ focus: { type: "string", description: "Guild focus area" },
170
+ },
171
+ required: ["name", "description"],
172
+ },
173
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/guild", {
174
+ name: args.name,
175
+ description: args.description,
176
+ focus: args.focus,
177
+ }),
178
+ },
179
+ {
180
+ name: "nookplot_join_guild",
181
+ description: "Join an existing guild (on-chain)",
182
+ inputSchema: {
183
+ type: "object",
184
+ properties: {
185
+ guildId: { type: "string", description: "Guild ID" },
186
+ },
187
+ required: ["guildId"],
188
+ },
189
+ handler: async (args, ctx) => ctx.prepareSignRelay(`/v1/prepare/guild/${encodeURIComponent(args.guildId)}/join`, {}),
190
+ },
191
+ {
192
+ name: "nookplot_create_bundle",
193
+ description: "Create a knowledge bundle (on-chain)",
194
+ inputSchema: {
195
+ type: "object",
196
+ properties: {
197
+ name: { type: "string", description: "Bundle name" },
198
+ description: { type: "string", description: "Bundle description" },
199
+ contentCids: { type: "array", items: { type: "string" }, description: "Content CIDs to bundle" },
200
+ tags: { type: "array", items: { type: "string" }, description: "Tags" },
201
+ },
202
+ required: ["name", "contentCids"],
203
+ },
204
+ handler: async (args, ctx) => ctx.prepareSignRelay("/v1/prepare/bundle", {
205
+ name: args.name,
206
+ description: args.description,
207
+ contentCids: args.contentCids,
208
+ tags: args.tags,
209
+ }),
210
+ },
211
+ ];
212
+ //# sourceMappingURL=onchain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onchain.js","sourceRoot":"","sources":["../../src/tools/onchain.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAc;IACrC;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,mDAAmD;QAChE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE;gBACpD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;gBACvE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;gBAC9D,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE;aACxE;YACD,QAAQ,EAAE,CAAC,OAAO,EAAE,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ACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE;gBACpD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE;gBAClE,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE;gBAChG,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE;aACxE;YACD,QAAQ,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SAClC;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAC3B,GAAG,CAAC,gBAAgB,CAAC,oBAAoB,EAAE;YACzC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;KACL;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Proactive tools — signals, approvals, config.
3
+ *
4
+ * @module tools/proactive
5
+ */
6
+ import type { ToolDef } from "./index.js";
7
+ export declare const proactiveTools: ToolDef[];
8
+ //# sourceMappingURL=proactive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proactive.d.ts","sourceRoot":"","sources":["../../src/tools/proactive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,cAAc,EAAE,OAAO,EAsDnC,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Proactive tools — signals, approvals, config.
3
+ *
4
+ * @module tools/proactive
5
+ */
6
+ export const proactiveTools = [
7
+ {
8
+ name: "nookplot_get_pending_signals",
9
+ description: "Get pending proactive actions awaiting your approval",
10
+ inputSchema: { type: "object", properties: {} },
11
+ handler: async (_args, ctx) => ctx.get("/v1/proactive/approvals"),
12
+ },
13
+ {
14
+ name: "nookplot_approve_action",
15
+ description: "Approve a pending proactive action",
16
+ inputSchema: {
17
+ type: "object",
18
+ properties: {
19
+ actionId: { type: "string", description: "Action ID to approve" },
20
+ },
21
+ required: ["actionId"],
22
+ },
23
+ handler: async (args, ctx) => ctx.post(`/v1/proactive/approvals/${encodeURIComponent(args.actionId)}/approve`, {}),
24
+ },
25
+ {
26
+ name: "nookplot_reject_action",
27
+ description: "Reject a pending proactive action",
28
+ inputSchema: {
29
+ type: "object",
30
+ properties: {
31
+ actionId: { type: "string", description: "Action ID to reject" },
32
+ reason: { type: "string", description: "Rejection reason" },
33
+ },
34
+ required: ["actionId"],
35
+ },
36
+ handler: async (args, ctx) => ctx.post(`/v1/proactive/approvals/${encodeURIComponent(args.actionId)}/reject`, {
37
+ reason: args.reason,
38
+ }),
39
+ },
40
+ {
41
+ name: "nookplot_configure_proactive",
42
+ description: "Configure proactive scanning settings",
43
+ inputSchema: {
44
+ type: "object",
45
+ properties: {
46
+ enabled: { type: "boolean", description: "Enable/disable proactive scanning" },
47
+ scanIntervalMinutes: { type: "number", description: "Scan interval in minutes" },
48
+ maxActionsPerDay: { type: "number", description: "Max actions per day" },
49
+ },
50
+ },
51
+ handler: async (args, ctx) => ctx.put("/v1/proactive/settings", {
52
+ enabled: args.enabled,
53
+ scanIntervalMinutes: args.scanIntervalMinutes,
54
+ maxActionsPerDay: args.maxActionsPerDay,
55
+ }),
56
+ },
57
+ ];
58
+ //# sourceMappingURL=proactive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proactive.js","sourceRoot":"","sources":["../../src/tools/proactive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC;QACE,IAAI,EAAE,8BAA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AI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,mCAAmC,EAAE;gBAC9E,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE;gBAChF,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE;aACzE;SACF;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAC3B,GAAG,CAAC,GAAG,CAAC,wBAAwB,EAAE;YAChC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CAAC;KACL;CACF,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Read-only tools — GET endpoints that don't modify state.
3
+ *
4
+ * @module tools/read
5
+ */
6
+ import type { ToolDef } from "./index.js";
7
+ export declare const readTools: ToolDef[];
8
+ //# sourceMappingURL=read.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,eAAO,MAAM,SAAS,EAAE,OAAO,EAmM9B,CAAC"}