@theronap/cortex-mcp 0.9.128 โ†’ 0.9.129

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 +34 -3
  2. package/package.json +1 -1
package/lib/server.mjs CHANGED
@@ -1331,11 +1331,30 @@ function renderNudge(payload) {
1331
1331
  return toolError(`Could not read the timeline for "${name}": ${d.message}`)
1332
1332
  }
1333
1333
  const t = await r.json()
1334
- if (!t.identifiers?.length) {
1335
- return { content: [{ type: 'text', text: `"${name}" carries no identifier stamps yet โ€” no history joins. Stamp its page with [[repo:owner/name]] (what it identifies) and events will accrue here.` }] }
1334
+ // ๐Ÿ”ด THE EARLY RETURN USED TO FIRE ON `!identifiers.length` ALONE, WHICH DISCARDED EVERY
1335
+ // ATTACHED EVENT THE SERVER HAD ALREADY RETURNED. nodeTimeline() ends with
1336
+ // `events: mergeEvents([...identifierEvents, attachedEvents])` โ€” Gate 4 page attachments
1337
+ // are unioned in explicitly, and its own doc says so: "a node with no stamps returns the
1338
+ // honest empty shape for identifiers โ€” BUT GATE 4 STILL UNIONS EXPLICIT PAGE ATTACHMENTS".
1339
+ //
1340
+ // Measured 2026-09-03: the GEOL 100 page had 43 class sessions deterministically attached
1341
+ // (records_attached_to_node returns 30, its limit) and this client reported "carries no
1342
+ // identifier stamps yet โ€” no history joins." The data was correct, complete, and INVISIBLE,
1343
+ // and the message actively misled โ€” it told the reader to go stamp a page that already had
1344
+ // everything attached to it.
1345
+ //
1346
+ // The honest condition is: nothing to show at all.
1347
+ if (!t.identifiers?.length && !t.events?.length) {
1348
+ return { content: [{ type: 'text', text: `"${name}" has no history yet โ€” no identifier stamps and nothing attached. Stamp its page with [[repo:owner/name]] (what it identifies), or attach records to it, and events will accrue here.` }] }
1336
1349
  }
1337
1350
  const lines = [`# ${name} โ€” node timeline (history; the page is the present)`]
1338
- lines.push(`Joins: ${t.identifiers.map((i) => `[[${i.id}]] ยท ${i.visibleCount} visible`).join(' | ')}${t.incomplete ? ' (partial โ€” one join failed to read)' : ''}`)
1351
+ if (t.identifiers?.length) {
1352
+ lines.push(`Joins: ${t.identifiers.map((i) => `[[${i.id}]] ยท ${i.visibleCount} visible`).join(' | ')}${t.incomplete ? ' (partial โ€” one join failed to read)' : ''}`)
1353
+ } else {
1354
+ // Say WHERE the events came from. A reader who sees a timeline on a page with no stamps
1355
+ // should not have to guess whether the stamps are missing or simply not how it got here.
1356
+ lines.push(`Joins: none โ€” these events are attached to the page directly, not matched through an identifier stamp.${t.incomplete ? ' (partial โ€” one read failed)' : ''}`)
1357
+ }
1339
1358
  for (const e of t.events) lines.push(`- ${String(e.occurredAt).slice(0, 10)} ยท ${e.source} ยท ${e.summary}`)
1340
1359
  if (!t.events.length) lines.push('(no events visible to you yet on these joins)')
1341
1360
  if (t.siblings?.length) lines.push(`Sibling homes (share a stamp โ€” bridges, not history): ${t.siblings.map((s) => `"${s.title}"`).join(', ')}`)
@@ -2201,6 +2220,18 @@ function renderNudge(payload) {
2201
2220
  return { content: [{ type: 'text', text: lines.join('\n') }] }
2202
2221
  }
2203
2222
 
2223
+ // โš  TWO OUTCOMES, AND ONLY ONE HAS A RECORD ID. On an account with Gate 4 private intake on,
2224
+ // the transcript lands as a SEALED UNIT and the response carries `intakeItemId` instead of
2225
+ // `recordId` โ€” rendering that as `Captured as record undefined` was what a real capture printed
2226
+ // on 2026-09-01. Held-for-review is an honest outcome and now says so, including the step the
2227
+ // reader has to take for the transcript to reach the meeting's obligation.
2228
+ if (out.via === 'private_intake') {
2229
+ lines.push(`Captured as a sealed intake unit ${out.intakeItemId} (scoped) โ€” held for review.`)
2230
+ lines.push(` ${out.occurredAt}${out.endsAt ? ` \u2192 ${out.endsAt}` : ''}`)
2231
+ lines.push(' It already carries the meeting\'s attendee identifiers. Materialize it to file it')
2232
+ lines.push(' under its pages and offer it as evidence against that meeting\'s obligation.')
2233
+ return { content: [{ type: 'text', text: lines.join('\n') }] }
2234
+ }
2204
2235
  lines.push(`Captured as record ${out.recordId} (scoped).`)
2205
2236
  lines.push(` ${out.occurredAt}${out.endsAt ? ` \u2192 ${out.endsAt}` : ' \u2014 no end recorded'}`)
2206
2237
  if (out.extentDropped) lines.push(` \u26a0 the end was REFUSED (${out.extentDropped}) and stored as unknown`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/cortex-mcp",
3
- "version": "0.9.128",
3
+ "version": "0.9.129",
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": {