@theronap/agnoclast-mcp 0.9.333 → 0.9.334

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 (2) hide show
  1. package/lib/server.mjs +9 -5
  2. package/package.json +1 -1
package/lib/server.mjs CHANGED
@@ -3787,35 +3787,39 @@ function renderNudge(payload) {
3787
3787
  'track_obligation',
3788
3788
  {
3789
3789
  title: 'Record something you owe',
3790
- description: "Record something you owe: a subject, the page or pages it is about, optionally when it comes due, optionally whose reply would discharge it. ⚠ EVERY OBLIGATION LIVES ON A PAGE, CHOSEN NOW. `pages` is required: READ the page this is about first (read_page prints its `ref:`), then pass that ref — several when it genuinely belongs on several. Never guess a page to get past the check, and never default to the person's OWN page: if you cannot tell where it belongs, ask them. A page says where the obligation is FOUND, not who can see it: it is visible to its owner only unless the person later widens it (`set_obligation_tier`). ⚠ ONLY A DATE MAKES IT COME BACK. A DATED obligation is raised to the person's sessions by time, unasked, BEFORE it lapses: counted on the day it is due, and named when a stated clock time is within the hour. ⚠ A DEADLINE IS NOT WHEN TO START: pass `work_from` when the work needs lead time (a 10-day project opens 10 days ahead; an exam, days of study). From then it is named daily as \"work on now\", and once on the desktop when it opens. Once late it is never raised again, and an UNDATED one is never raised by anything — it surfaces only when someone asks with my_obligations. ⚠ NEVER INVENT A DUE DATE: an invented date will interrupt someone. Omit due_at when there is no real deadline (a standing obligation); a guessed date is indistinguishable from a real one once stored, and leads straight to nagging about something that was never late. ⚠ OWED TO SOMEONE? Pass `owed_to`: the ref of their page (\"I owe Tanner a text\" → Tanner's page). It is attached, so a later agent reads it instead of asking who, and records from their email or phone count as evidence this may be done. `owed_to` is who WAITS; `for` is who OWES. `anchor_identifier` (e.g. `repo:owner/name`) covers evidence that is not a person.",
3790
+ description: "Record something you owe: a subject, the page or pages it is about, optionally when it comes due, optionally whose reply would discharge it. ⚠ EVERY OBLIGATION LIVES ON A PAGE, CHOSEN NOW. `pages` is required: READ the page this is about first (read_page prints its `ref:`), then pass that ref — several when it genuinely belongs on several. Never guess a page to get past the check, and never default to the person's OWN page: if you cannot tell where it belongs, ask them. A page says where the obligation is FOUND, not who can see it: it is visible to its owner only unless the person later widens it (`set_obligation_tier`). ⚠ ONLY A DATE MAKES IT COME BACK. A DATED obligation is raised to the person's sessions by time, unasked, BEFORE it lapses: counted on the day it is due, and named when a stated clock time is within the hour. ⚠ A DEADLINE IS NOT WHEN TO START: pass `effort_minutes` (hands-on work: a text 5, an essay 240, a final 900). The start is planned from it and their calendar, with work blocks and a reminder; `work_from` only overrides it. Once late it is never raised again, and an UNDATED one is never raised by anything — it surfaces only when someone asks with my_obligations. ⚠ NEVER INVENT A DUE DATE: an invented date will interrupt someone. Omit due_at when there is no real deadline (a standing obligation); a guessed date is indistinguishable from a real one once stored, and leads straight to nagging about something that was never late. ⚠ OWED TO SOMEONE? Pass `owed_to`: the ref of their page (\"I owe Tanner a text\" → Tanner's page). It is attached, so a later agent reads it instead of asking who, and records from their email or phone count as evidence this may be done. `owed_to` is who WAITS; `for` is who OWES. `anchor_identifier` (e.g. `repo:owner/name`) covers evidence that is not a person.",
3791
3791
  inputSchema: {
3792
3792
  subject: z.string().describe('what is owed, in your own words'),
3793
3793
  pages: z.array(z.string()).min(1).describe('REQUIRED. The `ref:` of each page this obligation is about, exactly as read_page prints it. Read the page first; do not guess.'),
3794
3794
  for: z.string().optional().describe('ONLY when it is someone ELSE who should owe this: their email address, or their name as it appears in this brain. Omit for something the person owes themselves. You do not choose whether it is assigned or requested — the reporting line does.'),
3795
3795
  note: z.string().optional().describe('with `for`: a short note to the person it is given to'),
3796
3796
  due_at: z.string().optional().describe('ISO 8601. OMIT when there is no real deadline — never guess one.'),
3797
- work_from: z.string().optional().describe('ISO 8601: when work should START — the window opens (a bare date = the start of that day). Needs due_at, and must come before it. Estimate it from what the work involves; omit for things needing no lead time.'),
3797
+ effort_minutes: z.number().int().positive().optional().describe('your estimate of the hands-on work, in minutes. With due_at, the start date and calendar work blocks are planned from it (and from their calendar). Omit it and a small model estimates it from the subject.'),
3798
+ work_from: z.string().optional().describe('ISO 8601: when work should START — only to override the planned start (a bare date = the start of that day). Needs due_at, and must come before it.'),
3798
3799
  owed_to: z.string().optional().describe("the `ref:` of the page of the person (or org) this is owed TO — who is waiting on it. Read their page first. Omit when it is owed to nobody in particular."),
3799
3800
  anchor_identifier: z.string().optional().describe('e.g. "repo:owner/name" — records carrying it become evidence this may be done. For a person, prefer owed_to.'),
3800
3801
  source_record_id: z.string().optional().describe('the record this came from, if any'),
3801
3802
  brain: z.string().optional().describe('the brain\'s name or id — required only if you belong to more than one'),
3802
3803
  },
3803
3804
  },
3804
- async ({ subject, pages, due_at, work_from, anchor_identifier, source_record_id, brain, for: giveTo, note: giveNote, owed_to }) => {
3805
+ async ({ subject, pages, due_at, effort_minutes, work_from, anchor_identifier, source_record_id, brain, for: giveTo, note: giveNote, owed_to }) => {
3805
3806
  let res
3806
3807
  try {
3807
3808
  res = await fetchCortex(`${BASE}/api/obligations`, {
3808
3809
  method: 'POST',
3809
3810
  headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
3810
- body: JSON.stringify({ subject, pages, dueAt: due_at, workFrom: work_from, anchorIdentifier: anchor_identifier, sourceRecordId: source_record_id, brain, for: giveTo, note: giveNote, owedTo: owed_to }),
3811
+ body: JSON.stringify({ subject, pages, dueAt: due_at, workFrom: work_from, effortMinutes: effort_minutes, anchorIdentifier: anchor_identifier, sourceRecordId: source_record_id, brain, for: giveTo, note: giveNote, owedTo: owed_to }),
3811
3812
  })
3812
3813
  } catch (e) { return toolError(`Could not reach obligations: ${e.message}`) }
3813
3814
  const out = await res.json().catch(() => null)
3814
3815
  if (!res.ok) return toolError(`Could not record: ${out?.detail ?? out?.error ?? res.status}`)
3815
3816
  // What will actually happen, stated per case: a promise of a nudge that never comes is worse
3816
3817
  // than no promise, and so is "nothing will nudge you" over something that now will.
3818
+ const starts = work_from ?? out?.workFrom ?? null
3819
+ const effort = out?.effortMinutes ? `about ${out.effortMinutes >= 90 ? `${Math.round(out.effortMinutes / 30) / 2} h` : `${out.effortMinutes} min`} of work. ` : ''
3817
3820
  const nudge = due_at
3818
- ? (work_from ? `From ${work_from.slice(0, 10)} it is named daily as "work on now" (and once on the desktop). ` : '')
3821
+ ? (starts ? `Planned: ${effort}From ${String(starts).slice(0, 10)} it is named daily as "work on now" (and once on the desktop), with work blocks on their calendar. ` : '')
3822
+ + (out?.fits === false ? '⚠ Their calendar is too full to fit it comfortably before the deadline — tell them to start now. ' : '')
3819
3823
  + 'It will be raised to your sessions on the day it is due' + (/T\d{2}:\d{2}/.test(due_at) ? ', and again when it is within the hour.' : '.')
3820
3824
  : 'It has no date, so nothing will raise it \u2014 ask with my_obligations.'
3821
3825
  const note = (owed_to ? '\nOwed to that person: their page is attached, and records from them will be offered as evidence this is done.' : '')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/agnoclast-mcp",
3
- "version": "0.9.333",
3
+ "version": "0.9.334",
4
4
  "description": "Connect your AI assistant to Cortex — your org's projects, activity, gaps, and directives, scoped to you.",
5
5
  "type": "module",
6
6
  "bin": {