@theronap/agnoclast-mcp 0.9.238 → 0.9.239

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.
@@ -59,6 +59,8 @@ import { fetchCortex, resolveBase, resolveTokenSource } from './diagnose.mjs'
59
59
  // Enough to hold a session's own recent output in full; small enough that the notice is READ rather
60
60
  // than spilled to a file, which is what happened at 49 KB.
61
61
  const MAX_YOURS = 25
62
+ /** Assigned groups listed per prompt; the server hands out at most 5 new groups per prompt anyway. */
63
+ const MAX_ASSIGNED = 8
62
64
 
63
65
  // A title is somebody else's text — anyone can send a calendar invite — and this prints into a
64
66
  // session's context. One line, bounded, and quoted so it reads as the name of a thing.
@@ -176,6 +178,21 @@ export function formatNotice(signals) {
176
178
  const total = Number(signals?.settling?.total ?? offers.length)
177
179
  const delta = Number(signals?.arrival?.count ?? 0)
178
180
 
181
+ // ⭐ ADR-0083 §2.3 — arrivals ASSIGNED to this session. Not an offer: this session is their one owner, and
182
+ // it is told at a prompt boundary so it handles them before the user's request. A conversation stays with
183
+ // this session for its lifetime, so its later texts come here too.
184
+ const assigned = Array.isArray(signals?.assigned) ? signals.assigned : []
185
+ if (assigned.length) {
186
+ const n = assigned.reduce((t, g) => t + (Number(g?.count) || 1), 0)
187
+ lines.push(`📥 ${n} arrival${n === 1 ? ' is' : 's are'} ASSIGNED TO THIS SESSION — you are ${n === 1 ? 'its' : 'their'} only owner. Handle ${n === 1 ? 'it' : 'them'} before the user's request, then answer the user:`)
188
+ for (const g of assigned.slice(0, MAX_ASSIGNED)) {
189
+ const many = Number(g?.count) > 1 ? ` ×${g.count}` : ''
190
+ const ids = (g?.ids ?? []).slice(0, 3).join(', ') + ((g?.ids ?? []).length > 3 ? ', …' : '')
191
+ lines.push(` ${g?.source ?? '?'}${many} — ${g?.title ?? '(unreadable)'} · ${g?.hoursAgo ?? '?'}h · ids: ${ids}`)
192
+ }
193
+ if (assigned.length > MAX_ASSIGNED) lines.push(` … and ${assigned.length - MAX_ASSIGNED} more groups`)
194
+ lines.push(' `intake_claim {intakeItemIds}` → `intake_materialize` (or `intake_discard` for junk) · `not_mine` hands one to the next session · only what only the user can decide → `intake_defer`.')
195
+ }
179
196
  if (delta) {
180
197
  lines.push(`⚡ ${delta} new arrival${delta === 1 ? '' : 's'} in the pile since this session was last told.`)
181
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/agnoclast-mcp",
3
- "version": "0.9.238",
3
+ "version": "0.9.239",
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": {