@theronap/agnoclast-mcp 0.9.288 → 0.9.290
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/lib/server.mjs +39 -3
- package/package.json +1 -1
package/lib/server.mjs
CHANGED
|
@@ -6200,6 +6200,42 @@ function renderNudge(payload) {
|
|
|
6200
6200
|
},
|
|
6201
6201
|
)
|
|
6202
6202
|
|
|
6203
|
+
server.registerTool(
|
|
6204
|
+
'setup_status',
|
|
6205
|
+
{
|
|
6206
|
+
title: 'Set up Agnoclast',
|
|
6207
|
+
description: 'Use when the person asks you to set up Agnoclast, or asks what is left to set up. It says which step is next and whether you do it or they do, through a link. Call it again after each step. Pass use_case and goals only to record what they told you, which changes nothing but their own first steps.',
|
|
6208
|
+
inputSchema: {
|
|
6209
|
+
use_case: z.string().optional().describe('what they want it for; the checklist lists the choices'),
|
|
6210
|
+
goals: z.array(z.string()).optional().describe('where to start; the checklist lists the choices'),
|
|
6211
|
+
ai_app: z.string().optional().describe('optional: the AI they use'),
|
|
6212
|
+
ai_where: z.string().optional().describe('optional: where they use it'),
|
|
6213
|
+
ai_reach: z.string().optional().describe('optional: how much they let it do'),
|
|
6214
|
+
together: z.string().optional().describe('optional: solo or team'),
|
|
6215
|
+
},
|
|
6216
|
+
},
|
|
6217
|
+
async ({ use_case, goals, ai_app, ai_where, ai_reach, together }) => {
|
|
6218
|
+
const saving = use_case !== undefined || goals !== undefined
|
|
6219
|
+
let res
|
|
6220
|
+
try {
|
|
6221
|
+
res = await fetchCortex(`${BASE}/api/setup-status`, saving
|
|
6222
|
+
? {
|
|
6223
|
+
method: 'POST',
|
|
6224
|
+
headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
|
|
6225
|
+
body: JSON.stringify({ useCase: use_case, goals, together, ai: { app: ai_app, where: ai_where, reach: ai_reach } }),
|
|
6226
|
+
}
|
|
6227
|
+
: { headers: { Authorization: `Bearer ${TOKEN}` } })
|
|
6228
|
+
} catch (e) {
|
|
6229
|
+
return toolError(`Could not read setup: ${e.message}`)
|
|
6230
|
+
}
|
|
6231
|
+
if (!res.ok) {
|
|
6232
|
+
const d = classify(res.status, res.headers.get('content-type'), await res.text(), res.headers.get('x-vercel-id'))
|
|
6233
|
+
return toolError(`Could not read setup: ${d.message}`)
|
|
6234
|
+
}
|
|
6235
|
+
return { content: [{ type: 'text', text: (await res.json()).text }] }
|
|
6236
|
+
},
|
|
6237
|
+
)
|
|
6238
|
+
|
|
6203
6239
|
server.registerTool(
|
|
6204
6240
|
'token_activity',
|
|
6205
6241
|
{
|
|
@@ -6290,13 +6326,13 @@ function renderNudge(payload) {
|
|
|
6290
6326
|
'tasks_waiting',
|
|
6291
6327
|
{
|
|
6292
6328
|
title: 'How many tasks are waiting',
|
|
6293
|
-
description: '
|
|
6329
|
+
description: 'The open tasks handed to this token, as `waiting: N` and `newest: <time>` (when the newest arrived, or `none`). It marks nothing as picked up, so a cheap poller can call it as often as it likes. A poller should wake an agent when `newest` is later than the last one it saw, not when N rises: a task finishing as another arrives leaves N unchanged. To read the tasks, use my_tasks.',
|
|
6294
6330
|
inputSchema: {},
|
|
6295
6331
|
},
|
|
6296
6332
|
async () => {
|
|
6297
6333
|
try {
|
|
6298
|
-
const { waiting } = await tasksCall('?box=count')
|
|
6299
|
-
return { content: [{ type: 'text', text: `waiting: ${waiting}` }] }
|
|
6334
|
+
const { waiting, newest } = await tasksCall('?box=count')
|
|
6335
|
+
return { content: [{ type: 'text', text: `waiting: ${waiting}\nnewest: ${newest ?? 'none'}` }] }
|
|
6300
6336
|
} catch (e) { return toolError(`Could not count your tasks: ${e.message}`) }
|
|
6301
6337
|
},
|
|
6302
6338
|
)
|
package/package.json
CHANGED