@theronap/agnoclast-mcp 0.9.165 → 0.9.166

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 +22 -2
  2. package/package.json +1 -1
package/lib/server.mjs CHANGED
@@ -317,7 +317,12 @@ function renderSettling(payload) {
317
317
  return `\n\n⚡ ARRIVALS SETTLING — yours alone, and no one else can see these yet:\n${lines.join('\n')}\n` +
318
318
  `— These are unjudged ARRIVALS, not records. Since automatic materialization was deleted, nothing files them for you.\n` +
319
319
  `— \`intake_look <id>\` reads the full body without claiming it — looking is free, non-exclusive and logged, so look rather than guess from the headline.\n` +
320
- `— Then \`intake_claim\` and \`intake_materialize\` into the brain and pages it belongs to, or \`intake_discard\`, or \`intake_defer\` with a question when only the owner can decide.` +
320
+ // ⚠ NAME THE EXACT CALL, INCLUDING THE ARRAY. This line used to read "Then `intake_claim` and
321
+ // `intake_materialize`" straight after a list of ids, which reads as `intake_claim <id>`. It is not:
322
+ // the parameter is `intakeItemIds`, an ARRAY, and on 2026-09-22 following this very sentence took a
323
+ // lease on ten unrelated units. The singular is accepted now, but an offer must still state the call
324
+ // that acts on the thing being offered — a reader should not have to consult a schema to use a nudge.
325
+ `— Then \`intake_claim {intakeItemIds: ["<id>"]}\` to take a lease on THAT unit (the array is required; without an id you claim the head of the queue instead), then \`intake_materialize\` into the brain and pages it belongs to — or \`intake_discard\`, or \`intake_defer\` with a question when only the owner can decide.` +
321
326
  more + who +
322
327
  `\n— If none are yours, leave them: they stay settling for your other sessions, and become everyone's business once the window closes.`
323
328
  }
@@ -982,6 +987,17 @@ function renderNudge(payload) {
982
987
  claimKind: z.enum(['relevance', 'cleanup']).optional().describe('default relevance'),
983
988
  limit: z.number().optional().describe('max items (default 10). Ignored when intakeItemIds is given.'),
984
989
  leaseMinutes: z.number().optional().describe('lease length in minutes, 5-60 (default 30). Prefer intake_look for read-only inspection — a short lease is only for briefly exclusive work.'),
990
+ // 🔴 SINGULAR ACCEPTED, AND NOT AS A CONVENIENCE. Every sibling verb takes `intakeItemId`:
991
+ // intake_look, intake_materialize, intake_release, intake_defer, intake_discard. This one
992
+ // alone was plural, so the natural singular was NOT IN THE SCHEMA and was silently dropped
993
+ // — and the fallback is not an error, it is claiming the head of the queue. On 2026-09-22 a
994
+ // session offered one unit by the settling block called `intake_claim {intakeItemId}` and
995
+ // took a 30-minute lease on TEN unrelated units belonging to other sessions' work. A typo
996
+ // that becomes a side effect is worse than a typo that fails.
997
+ intakeItemId: z.string().optional().describe(
998
+ 'a single unit to claim — the same thing as intakeItemIds with one element. Accepted because ' +
999
+ 'every other intake verb spells it this way.',
1000
+ ),
985
1001
  intakeItemIds: z.array(z.string()).optional().describe(
986
1002
  'claim these specific units instead of the head of the queue (max 50). Without it you get FIFO, ' +
987
1003
  'so reaching one known unit means claiming everything ahead of it. Ids come from intake_changes ' +
@@ -993,7 +1009,11 @@ function renderNudge(payload) {
993
1009
  ),
994
1010
  },
995
1011
  },
996
- async ({ claimKind, limit, intakeItemIds, leaseMinutes }) => {
1012
+ async ({ claimKind, limit, intakeItemId, intakeItemIds, leaseMinutes }) => {
1013
+ // Merge the two spellings before anything else looks at them. Passing both is not an error —
1014
+ // the union is what the caller plainly meant.
1015
+ const ids = [...new Set([...(intakeItemIds ?? []), ...(intakeItemId ? [intakeItemId] : [])])]
1016
+ intakeItemIds = ids.length ? ids : undefined
997
1017
  const res = await fetchCortex(`${BASE}/api/intake/claim`, {
998
1018
  method: 'POST',
999
1019
  headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/agnoclast-mcp",
3
- "version": "0.9.165",
3
+ "version": "0.9.166",
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": {