@theronap/agnoclast-mcp 0.9.343 → 0.9.345
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.
- package/agents/agnoclast-filer.md +9 -2
- package/lib/intake_batch_render.mjs +15 -0
- package/lib/server.mjs +9 -5
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: agnoclast-filer
|
|
3
3
|
description: Files Agnoclast arrivals (intake units) in the background for the session that owns them — the ids it is given, then every further unheld arrival assigned to that session until none are left — and reports once. Dispatch it, with run_in_background, when the Agnoclast prompt notice says arrivals are assigned to this session but match nothing it is working on. Pass the ids in the prompt.
|
|
4
4
|
model: sonnet
|
|
5
|
-
tools: ToolSearch, mcp__agnoclast__intake_claim, mcp__agnoclast__intake_look, mcp__agnoclast__intake_materialize, mcp__agnoclast__intake_discard, mcp__agnoclast__intake_defer, mcp__agnoclast__intake_release, mcp__agnoclast__grep, mcp__agnoclast__read_page, mcp__agnoclast__author, mcp__cortex__intake_claim, mcp__cortex__intake_look, mcp__cortex__intake_materialize, mcp__cortex__intake_discard, mcp__cortex__intake_defer, mcp__cortex__intake_release, mcp__cortex__grep, mcp__cortex__read_page, mcp__cortex__author
|
|
5
|
+
tools: ToolSearch, mcp__agnoclast__intake_claim, mcp__agnoclast__intake_look, mcp__agnoclast__intake_materialize, mcp__agnoclast__intake_discard, mcp__agnoclast__intake_defer, mcp__agnoclast__intake_release, mcp__agnoclast__grep, mcp__agnoclast__read_page, mcp__agnoclast__author, mcp__agnoclast__edit_page, mcp__cortex__intake_claim, mcp__cortex__intake_look, mcp__cortex__intake_materialize, mcp__cortex__intake_discard, mcp__cortex__intake_defer, mcp__cortex__intake_release, mcp__cortex__grep, mcp__cortex__read_page, mcp__cortex__author, mcp__cortex__edit_page
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You file the Agnoclast arrivals whose ids you were given, and then the rest of what is waiting for the same
|
|
@@ -37,6 +37,13 @@ If the tools are deferred, load them in one ToolSearch call first (`select:` the
|
|
|
37
37
|
- Junk (spam, marketing, bounces): `intake_discard` with a reason. Real work (PR and commit events included) is never junk.
|
|
38
38
|
- `intake_defer` only a question only the owner can answer (a disclosure call, something to make more visible than its baseline). One concrete question.
|
|
39
39
|
- `author` a page only when a unit's subject clearly deserves one and none exists.
|
|
40
|
+
- **Keep people's pages current (ADR-0112).** A filing reply may end with "Keep the page current", showing the
|
|
41
|
+
user and person pages the record landed on. You just read the unit, so you are the one who knows: when it
|
|
42
|
+
tells you something LASTING about that person (their work or role, a plan or decision, a preference, someone
|
|
43
|
+
important to them, how they work), `edit_page` that page now, as the reply says: quote the old text, keep the
|
|
44
|
+
rest, date the fact. Never copy in phone numbers or email addresses, and never what the reply says not to copy.
|
|
45
|
+
Most texts and mail change nothing (logistics, small talk, one-off plans): leave the page. One careful line
|
|
46
|
+
beats a paragraph.
|
|
40
47
|
3. KEEP GOING until nothing is left. When the given ids are done, `intake_claim {assigned: "unheld", view: "compact"}`
|
|
41
48
|
claims the next arrivals assigned to the same session that it does not hold. File those the same way, and
|
|
42
49
|
repeat. Stop when a claim returns no items (`assignedUnheld: 0`), when it returns only units you already
|
|
@@ -49,5 +56,5 @@ If the tools are deferred, load them in one ToolSearch call first (`select:` the
|
|
|
49
56
|
Send nothing until the loop in step 3 has stopped: every report wakes the session that dispatched you, and in a
|
|
50
57
|
long session that wake costs more than the filing. Then: one line of totals (filed / discarded / deferred /
|
|
51
58
|
released / skipped, and why you stopped), one line per unit
|
|
52
|
-
`id · outcome · record id · brain · governing page`, then any question only the person can answer. Nothing else.
|
|
59
|
+
`id · outcome · record id · brain · governing page`, then one line per page you edited (`page · what you added`), then any question only the person can answer. Nothing else.
|
|
53
60
|
If there is no such question, end with exactly: `No question for the person. Do not mention this report to them.`
|
|
@@ -40,3 +40,18 @@ export function renderPreviewBatch(results) {
|
|
|
40
40
|
`${results.length - refuse.length} would file as sent, ${refuse.length} would not.\n` +
|
|
41
41
|
results.map((r) => `\n── ${r.id}\n${r.ok ? r.line : `✗ preview failed — ${r.detail}`}`).join('\n')
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* ADR-0112: the keep-current blocks a batch's records came back with, each distinct block once (a text
|
|
46
|
+
* conversation's units land on the same pages, so they repeat word for word), at most three.
|
|
47
|
+
*/
|
|
48
|
+
export function batchKeepCurrent(results, max = 3) {
|
|
49
|
+
const seen = []
|
|
50
|
+
for (const r of results) {
|
|
51
|
+
const k = typeof r?.body?.keepCurrent === 'string' ? r.body.keepCurrent.trim() : ''
|
|
52
|
+
if (k && !seen.includes(k)) seen.push(k)
|
|
53
|
+
}
|
|
54
|
+
if (!seen.length) return ''
|
|
55
|
+
const more = seen.length > max ? `\n\n(${seen.length - max} more record(s) in this batch landed on other pages worth checking.)` : ''
|
|
56
|
+
return `\n\n${seen.slice(0, max).join('\n\n')}${more}`
|
|
57
|
+
}
|
package/lib/server.mjs
CHANGED
|
@@ -28,7 +28,7 @@ import { spawnObligationWorker } from './obligations_worker.mjs'
|
|
|
28
28
|
import { renderObligations, renderPageObligations, tierReads, who, holdLine } from './obligations_render.mjs'
|
|
29
29
|
import { renderLeaveQuestion, renderLeft, renderRemovalQuestion, renderRemoved } from './member_remove_render.mjs'
|
|
30
30
|
import { renderSettings } from './settings_render.mjs'
|
|
31
|
-
import { renderConversationOffer, renderMaterializeBatch, renderPreviewBatch } from './intake_batch_render.mjs'
|
|
31
|
+
import { batchKeepCurrent, renderConversationOffer, renderMaterializeBatch, renderPreviewBatch } from './intake_batch_render.mjs'
|
|
32
32
|
import { batchUnitBody, batchUnitMap, unusedFolderDecisions } from './intake_batch.mjs'
|
|
33
33
|
import { intakeIdFrom, requireIntakeId, INTAKE_ID_ALIAS_NOTE } from './intake_id_alias.mjs'
|
|
34
34
|
import { obligationsForUnits, renderFilingObligations, renderObligationItems, filingObligationsBrief, OBLIGATIONS_UNANSWERED_TEXT } from './filing_obligations.mjs'
|
|
@@ -1644,7 +1644,7 @@ function renderNudge(payload) {
|
|
|
1644
1644
|
...(unused.length ? [`⚠ folderDecisions applied by NO unit in this batch (check the identifiers): ${unused.map((x) => `\`${x}\``).join(', ')}`] : []),
|
|
1645
1645
|
]
|
|
1646
1646
|
// The per-unit map, machine-readable: which record each unit became (2026-10-23 trial).
|
|
1647
|
-
return { content: [{ type: 'text', text: `${renderMaterializeBatch(results)}${notes.length ? `\n${notes.join('\n')}` : ''}\n\nunits: ${JSON.stringify(batchUnitMap(results))}` }] }
|
|
1647
|
+
return { content: [{ type: 'text', text: `${renderMaterializeBatch(results)}${notes.length ? `\n${notes.join('\n')}` : ''}${batchKeepCurrent(results)}\n\nunits: ${JSON.stringify(batchUnitMap(results))}` }] }
|
|
1648
1648
|
}
|
|
1649
1649
|
// A preview goes to its OWN route: a server too old to know it answers 404, where the materialize
|
|
1650
1650
|
// route would ignore a `mode` it does not know and publish.
|
|
@@ -1775,9 +1775,13 @@ function renderNudge(payload) {
|
|
|
1775
1775
|
} else if (body?.contained === false) {
|
|
1776
1776
|
lines.push('Already inside the container named at capture (no change).')
|
|
1777
1777
|
}
|
|
1778
|
+
// ADR-0112: the pages it landed on — people first — with what to fold in. Rendered as text, not left in the JSON.
|
|
1779
|
+
const keep = typeof body?.keepCurrent === 'string' ? body.keepCurrent.trim() : ''
|
|
1780
|
+
const shown = keep ? { ...body, keepCurrent: '(shown above)' } : body
|
|
1781
|
+
if (keep) lines.push(keep)
|
|
1778
1782
|
const text = lines.length
|
|
1779
|
-
? `${lines.join('\n')}\n\n${JSON.stringify(
|
|
1780
|
-
: JSON.stringify(
|
|
1783
|
+
? `${lines.join('\n')}\n\n${JSON.stringify(shown, null, 2)}`
|
|
1784
|
+
: JSON.stringify(shown, null, 2)
|
|
1781
1785
|
return { content: [{ type: 'text', text }] }
|
|
1782
1786
|
},
|
|
1783
1787
|
)
|
|
@@ -7433,7 +7437,7 @@ function renderNudge(payload) {
|
|
|
7433
7437
|
}
|
|
7434
7438
|
if (!res.ok) return toolError(`Could not route record: ${out?.error ?? res.status}${out?.detail ? ` — ${out.detail}` : ''}`)
|
|
7435
7439
|
if (park) return { content: [{ type: 'text', text: 'Parked. It stays visible and unrouted rather than badly attached.' }] }
|
|
7436
|
-
return { content: [{ type: 'text', text: `Routed — attached to ${out?.attached?.length ?? 0} page(s). Recorded as a session judgment, not a rule match
|
|
7440
|
+
return { content: [{ type: 'text', text: `Routed — attached to ${out?.attached?.length ?? 0} page(s). Recorded as a session judgment, not a rule match.${typeof out?.keepCurrent === 'string' ? out.keepCurrent : ''}` }] }
|
|
7437
7441
|
},
|
|
7438
7442
|
)
|
|
7439
7443
|
|
package/package.json
CHANGED