@theronap/agnoclast-mcp 0.9.293 → 0.9.294

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 +13 -3
  2. package/package.json +1 -1
package/lib/server.mjs CHANGED
@@ -2028,14 +2028,24 @@ function renderNudge(payload) {
2028
2028
  const body = await res.text()
2029
2029
  throw new Error(classify(res.status, res.headers.get('content-type'), body, res.headers.get('x-vercel-id')).message)
2030
2030
  }
2031
- const { people = [], records = [], brains = [] } = await res.json()
2032
- if (!people.length && !records.length) return { content: [{ type: 'text', text: `No visible results for "${query}".` }] }
2031
+ const { pages = [], owed = [], people = [], records = [], brains = [] } = await res.json()
2032
+ if (!people.length && !records.length && !pages.length && !owed.length) return { content: [{ type: 'text', text: `No visible results for "${query}".` }] }
2033
2033
  // Multi-brain: tag each hit with its brain only when results span more than one (single-brain
2034
2034
  // callers see no noise). `brains` also carries any brain that errored (fail-soft).
2035
2035
  const multi = brains.filter((b) => b.ok).length > 1
2036
2036
  const tag = (brain) => (multi && brain ? ` · ${brain}` : '')
2037
2037
  const lines = []
2038
+ if (owed.length) {
2039
+ lines.push('What they owe:')
2040
+ for (const o of owed) lines.push(`- ${o.subject}${o.owedTo ? ` — to ${o.owedTo}` : ''}${o.dueAt ? ` — due ${o.dueAt.slice(0, 10)}` : ''}`)
2041
+ }
2042
+ if (pages.length) {
2043
+ if (lines.length) lines.push('')
2044
+ lines.push('Pages (open with read_page):')
2045
+ for (const p of pages) lines.push(`- ${p.title}${p.retired ? ' (retired)' : ''}${tag(p.brain)}`)
2046
+ }
2038
2047
  if (people.length) {
2048
+ if (lines.length) lines.push('')
2039
2049
  lines.push('People:')
2040
2050
  for (const p of people) {
2041
2051
  const meta = [p.title, p.company].filter(Boolean).join(', ')
@@ -6984,7 +6994,7 @@ function renderNudge(payload) {
6984
6994
  'Detach pages a record does not belong on — the inverse of route_record, and the only way a wrong placement can be undone. route_record is purely ADDITIVE, so attaching more pages can never fix a bad one. Use this when you can see a record sitting on a page it has no real relationship to — the classic case is a fuzzy title match, e.g. a commit attached to a page merely because both contain a common word. Two things it will refuse rather than surprise you: it will not remove every attachment (a record with no home is invisible, which is worse than a wrong home — route or park it instead), and detaching the page that GOVERNS the tier can tighten the record but never republish it, since a widening is pinned and proposed for a human to confirm.',
6985
6995
  inputSchema: {
6986
6996
  recordId: z.string().describe('record id from pending_records'),
6987
- documentIds: z.array(z.string()).describe('page document ids to REMOVE from this record'),
6997
+ documentIds: z.array(z.string()).describe('pages to REMOVE from this record: the ref read_page prints, or a document id'),
6988
6998
  reason: z.string().describe('why these placements are wrong — recorded with the removal'),
6989
6999
  },
6990
7000
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/agnoclast-mcp",
3
- "version": "0.9.293",
3
+ "version": "0.9.294",
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": {