@theronap/agnoclast-mcp 0.9.314 → 0.9.316
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/agents/agnoclast-filer.md +3 -0
- package/lib/release_gate.mjs +1 -1
- package/lib/server.mjs +41 -7
- package/lib/settings_render.mjs +11 -0
- package/package.json +1 -1
|
@@ -25,6 +25,9 @@ If the tools are deferred, load them in one ToolSearch call first (`select:` the
|
|
|
25
25
|
proposal and its `intakeItemIds`. Decide the conversation once, then one `intake_materialize` with
|
|
26
26
|
`intakeItemIds` for it — one record each. Always send `obligations` (`[]` if none); each `evidence` is copied
|
|
27
27
|
word for word from the text, 16+ characters.
|
|
28
|
+
An obligation is an ask of THIS person that will still matter tomorrow. Logistics for a moment (a pickup time,
|
|
29
|
+
"on my way", "I'll drive at 9:45"), small talk, and what other people in a group chat ask EACH OTHER are not:
|
|
30
|
+
answer `[]` for those. In a group thread, propose only what is asked of the person by name or directly.
|
|
28
31
|
- GitHub units: call with `mode: "preview"` first, answer every folder question in `folderDecisions`, then
|
|
29
32
|
apply. Several GitHub units filed onto the same pages may share ONE batch call (`intakeItemIds`) with ONE
|
|
30
33
|
`folderDecisions` list covering all of their questions — each unit applies the answers for its own folders.
|
package/lib/release_gate.mjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// That is safe because hiding a tool is a courtesy, and every gated route checks its own flag on the server.
|
|
12
12
|
|
|
13
13
|
/** Tools any release flag gates — hidden when the server cannot be asked. Mirror of allGatedTools(). */
|
|
14
|
-
export const GATED_FALLBACK = ['arrivals', 'attach_document', 'document_diff', 'export_page', 'file_arrival', 'file_document', 'find_documents', 'finish_task', 'get_document', 'hand_task', 'handed_tasks', 'hold_task', 'import_document_as_page', 'intake_shadow', 'list_documents', 'my_messages', 'my_tasks', 'pin_document', 'place_split_records', 'read_conversation', 'read_document', 'send_message', 'set_manager', 'split_page', 'split_records', 'store_file', 'tasks_waiting', 'undo_split', 'upload_document_version']
|
|
14
|
+
export const GATED_FALLBACK = ['arrivals', 'attach_document', 'document_diff', 'export_page', 'file_arrival', 'file_document', 'find_documents', 'finish_task', 'get_document', 'hand_task', 'handed_tasks', 'hold_task', 'import_document_as_page', 'intake_shadow', 'list_documents', 'my_messages', 'my_tasks', 'pin_document', 'place_split_records', 'read_conversation', 'read_document', 'send_message', 'set_manager', 'set_working_hours', 'split_page', 'split_records', 'store_file', 'tasks_waiting', 'undo_split', 'upload_document_version']
|
|
15
15
|
|
|
16
16
|
export const RELEASE_FETCH_TIMEOUT_MS = 2500
|
|
17
17
|
/** A remembered answer older than this is not trusted: a week covers a quiet weekend without hiding tools for long. */
|
package/lib/server.mjs
CHANGED
|
@@ -3810,6 +3810,36 @@ function renderNudge(payload) {
|
|
|
3810
3810
|
},
|
|
3811
3811
|
)
|
|
3812
3812
|
|
|
3813
|
+
// Working hours (obligation fe54ef05): the person's own, and their agents' — all of them, a kind (Grok Bots) or one by
|
|
3814
|
+
// name — per weekday. Like set_setting, only when the person asks. A change takes effect tomorrow.
|
|
3815
|
+
server.registerTool(
|
|
3816
|
+
'set_working_hours',
|
|
3817
|
+
{
|
|
3818
|
+
title: 'Set working hours',
|
|
3819
|
+
description: "Set the person's own working hours, or their agents', per weekday — ONLY when they asked you to (\"make Grok Bots weekdays 8 to 7\", \"I work 9 to 5\"). `who`: \"me\" (when Agnoclast may interrupt them about their agents), \"all agents\", a kind such as \"Grok Bots\", or one agent by its connection name from my_settings. `hours`: every day stated, e.g. {\"weekdays\": \"8am-7pm\", \"fri\": \"8am-5pm\", \"weekends\": \"off\"}; \"all day\" and \"off\" work, and a span past midnight like \"8pm-2am\" belongs to the night it starts. The new hours take effect tomorrow; the agent sees them in setup_status and confirms there. Pass `clear: true` with `who` to remove a rule. Say what you set and that they can change it in Settings.",
|
|
3820
|
+
inputSchema: {
|
|
3821
|
+
who: z.string().describe('"me", "all agents", a kind such as "Grok Bots", or one agent\'s connection name'),
|
|
3822
|
+
hours: z.record(z.string()).optional().describe('day → hours, every day stated: mon … sun, weekdays, weekends or every day'),
|
|
3823
|
+
clear: z.boolean().optional().describe('true to remove this rule instead'),
|
|
3824
|
+
},
|
|
3825
|
+
},
|
|
3826
|
+
async ({ who, hours, clear }) => {
|
|
3827
|
+
let res
|
|
3828
|
+
try {
|
|
3829
|
+
res = await fetchCortex(`${BASE}/api/settings`, {
|
|
3830
|
+
method: 'POST',
|
|
3831
|
+
headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
|
|
3832
|
+
body: JSON.stringify(clear ? { clear_hours: who } : { hours: { who, week: hours } }),
|
|
3833
|
+
})
|
|
3834
|
+
} catch (e) { return toolError(`Could not reach settings: ${e.message}`) }
|
|
3835
|
+
const out = await res.json().catch(() => null)
|
|
3836
|
+
if (res.status === 404) return toolError('Working hours are not turned on for this account yet.')
|
|
3837
|
+
if (!res.ok) return toolError(`Not changed: ${out?.detail ?? out?.error ?? res.status}`)
|
|
3838
|
+
if (clear) return { content: [{ type: 'text', text: out.removed ? `Removed the hours for ${out.label}. They fall back to the next rule, or to their usual rhythm.` : `${out.label} had no hours set.` }] }
|
|
3839
|
+
return { content: [{ type: 'text', text: `Hours for ${out.label} set, starting ${out.effectiveFrom}. They can change them in Settings (or ask you).` }] }
|
|
3840
|
+
},
|
|
3841
|
+
)
|
|
3842
|
+
|
|
3813
3843
|
// 2026-10-02. Removal was built in August with this tool planned and never wired, so an assistant could
|
|
3814
3844
|
// add people to a brain but not remove them. Two calls, always: the first changes nothing.
|
|
3815
3845
|
server.registerTool(
|
|
@@ -4047,7 +4077,7 @@ function renderNudge(payload) {
|
|
|
4047
4077
|
description: 'Close, cancel or defer an obligation. `discharged` = it happened. `cancelled` = it stopped mattering. These are DIFFERENT FACTS and both require a `resolution` saying how it ended — an obligation closed with no reason is a row nobody can reconstruct later, and "stopped mattering" is the one that gets lost first. `snoozed` needs `snoozed_until`; a snooze with no deadline is a permanent silent drop wearing a deferral\'s clothes, and it is refused. An expired snooze returns to my_obligations on its own.',
|
|
4048
4078
|
inputSchema: {
|
|
4049
4079
|
obligation_id: z.string().describe('from my_obligations'),
|
|
4050
|
-
state: z.enum(['discharged', 'cancelled', 'snoozed']).describe('discharged = it happened; cancelled = it stopped mattering; snoozed = ask me later'),
|
|
4080
|
+
state: z.enum(['discharged', 'cancelled', 'snoozed', 'confirmed']).describe('discharged = it happened; cancelled = it stopped mattering (also dismisses a PROPOSAL); snoozed = ask me later; confirmed = the person accepts a PROPOSAL as theirs'),
|
|
4051
4081
|
resolution: z.string().optional().describe('REQUIRED for discharged/cancelled — how it ended'),
|
|
4052
4082
|
snoozed_until: z.string().optional().describe('REQUIRED for snoozed — ISO 8601'),
|
|
4053
4083
|
},
|
|
@@ -4063,6 +4093,7 @@ function renderNudge(payload) {
|
|
|
4063
4093
|
} catch (e) { return toolError(`Could not reach obligations: ${e.message}`) }
|
|
4064
4094
|
const out = await res.json().catch(() => null)
|
|
4065
4095
|
if (!res.ok) return toolError(`Could not resolve: ${out?.error ?? res.status}`)
|
|
4096
|
+
if (state === 'confirmed') return { content: [{ type: 'text', text: 'Confirmed: it is now something you owe, listed with the rest.' }] }
|
|
4066
4097
|
return { content: [{ type: 'text', text: state === 'snoozed' ? `Snoozed until ${snoozed_until}. It comes back on its own.` : `Marked ${state}: ${resolution}` }] }
|
|
4067
4098
|
},
|
|
4068
4099
|
)
|
|
@@ -6329,17 +6360,19 @@ function renderNudge(payload) {
|
|
|
6329
6360
|
ai_reach: z.string().optional().describe('optional: how much they let it do'),
|
|
6330
6361
|
together: z.string().optional().describe('optional: solo or team'),
|
|
6331
6362
|
runs_unattended: z.boolean().optional().describe('true if you run on your own, on a schedule or without the person in the chat'),
|
|
6363
|
+
schedule: z.string().optional().describe('only after setup_status showed you working hours and your own schedule now matches them: the code it gave, to confirm'),
|
|
6332
6364
|
},
|
|
6333
6365
|
},
|
|
6334
|
-
async ({ use_case, goals, ai_app, ai_where, ai_reach, together, runs_unattended }) => {
|
|
6366
|
+
async ({ use_case, goals, ai_app, ai_where, ai_reach, together, runs_unattended, schedule }) => {
|
|
6335
6367
|
const saving = use_case !== undefined || goals !== undefined
|
|
6368
|
+
const q = new URLSearchParams({ ...(runs_unattended ? { unattended: '1' } : {}), ...(schedule ? { schedule } : {}) }).toString()
|
|
6336
6369
|
let res
|
|
6337
6370
|
try {
|
|
6338
|
-
res = await fetchCortex(`${BASE}/api/setup-status${!saving &&
|
|
6371
|
+
res = await fetchCortex(`${BASE}/api/setup-status${!saving && q ? `?${q}` : ''}`, saving
|
|
6339
6372
|
? {
|
|
6340
6373
|
method: 'POST',
|
|
6341
6374
|
headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
|
|
6342
|
-
body: JSON.stringify({ unattended: runs_unattended === true, useCase: use_case, goals, together, ai: { app: ai_app, where: ai_where, reach: ai_reach } }),
|
|
6375
|
+
body: JSON.stringify({ unattended: runs_unattended === true, schedule, useCase: use_case, goals, together, ai: { app: ai_app, where: ai_where, reach: ai_reach } }),
|
|
6343
6376
|
}
|
|
6344
6377
|
: { headers: { Authorization: `Bearer ${TOKEN}` } })
|
|
6345
6378
|
} catch (e) {
|
|
@@ -6418,7 +6451,7 @@ function renderNudge(payload) {
|
|
|
6418
6451
|
try {
|
|
6419
6452
|
const out = await tasksCall('', { method: 'POST', body: JSON.stringify({ action: 'hand', to, task }) })
|
|
6420
6453
|
tasksWatch = true
|
|
6421
|
-
return { content: [{ type: 'text', text: `Queued for ${out.task.to} (task ${out.task.id}). It is picked up on that agent's next call. Check with handed_tasks
|
|
6454
|
+
return { content: [{ type: 'text', text: `Queued for ${out.task.to} (task ${out.task.id}). It is picked up on that agent's next call. Check with handed_tasks.${out.note ? `\n${out.note}` : ''}` }] }
|
|
6422
6455
|
} catch (e) { return toolError(`Not queued: ${e.message}`) }
|
|
6423
6456
|
},
|
|
6424
6457
|
)
|
|
@@ -6451,8 +6484,9 @@ function renderNudge(payload) {
|
|
|
6451
6484
|
},
|
|
6452
6485
|
async () => {
|
|
6453
6486
|
try {
|
|
6454
|
-
const { waiting, newest } = await tasksCall('?box=count')
|
|
6455
|
-
|
|
6487
|
+
const { waiting, newest, hours_changed } = await tasksCall('?box=count')
|
|
6488
|
+
const hours = hours_changed ? '\nhours: your person changed your working hours. Call setup_status with runs_unattended true to see them.' : ''
|
|
6489
|
+
return { content: [{ type: 'text', text: `waiting: ${waiting}\nnewest: ${newest ?? 'none'}${hours}` }] }
|
|
6456
6490
|
} catch (e) { return toolError(`Could not count your tasks: ${e.message}`) }
|
|
6457
6491
|
},
|
|
6458
6492
|
)
|
package/lib/settings_render.mjs
CHANGED
|
@@ -16,6 +16,17 @@ export function renderSettings(view) {
|
|
|
16
16
|
lines.push('')
|
|
17
17
|
lines.push(`TIMEZONE: ${view?.timezone ? one(view.timezone) : 'not set'}`)
|
|
18
18
|
lines.push('')
|
|
19
|
+
if (view?.hours) {
|
|
20
|
+
lines.push('WORKING HOURS — when the person may be interrupted (You), and when each agent checks for tasks:')
|
|
21
|
+
const rules = Array.isArray(view.hours.rules) ? view.hours.rules : []
|
|
22
|
+
for (const r of rules) lines.push(` ${one(r.who)}: ${one(r.hours)}${r.startsOn ? ` (starts ${one(r.startsOn)})` : ''}`)
|
|
23
|
+
if (!rules.length) lines.push(' none set: 8 AM–9 PM for the person; agents judged by their usual rhythm')
|
|
24
|
+
for (const a of Array.isArray(view.hours.agents) ? view.hours.agents : []) {
|
|
25
|
+
if (a.label) lines.push(` agent ${one(a.label)}: ${a.hours ? `${one(a.hours)} (from ${one(a.from)})` : one(a.from)}`)
|
|
26
|
+
}
|
|
27
|
+
lines.push('Change these only when the person asks: set_working_hours.')
|
|
28
|
+
lines.push('')
|
|
29
|
+
}
|
|
19
30
|
lines.push('Change one only when the person asks: set_setting. They can also change these in Settings (console avatar menu, or ⌘, in the desktop app).')
|
|
20
31
|
return lines.join('\n')
|
|
21
32
|
}
|
package/package.json
CHANGED