@theronap/cortex-mcp 0.9.122 → 0.9.123
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/lib/server.mjs +27 -0
- package/package.json +1 -1
package/lib/server.mjs
CHANGED
|
@@ -1907,6 +1907,33 @@ function renderNudge(payload) {
|
|
|
1907
1907
|
},
|
|
1908
1908
|
)
|
|
1909
1909
|
|
|
1910
|
+
server.registerTool(
|
|
1911
|
+
'not_mine',
|
|
1912
|
+
{
|
|
1913
|
+
title: 'Decline a nudged record — it is not this session\'s business',
|
|
1914
|
+
description: 'Say a nudged record is NOT your business. Use it when the ⚡ ARRIVED block offered you a record and you have looked and it does not belong to what you are doing. ⚠ THIS IS NOT A CLAIM AND NOT A SUPPRESSION: the record stays unclaimed, stays on the general timeline, and stays offerable to any other session holding a matching identifier. You are saying "not MY business", never "nobody\'s business", and no other session is affected. Declining is a COMPLETE and expected answer — the cascade offers on the evidence of what you have open, which is a good guess and not a fact, and a wrong claim costs more than a decline. Without this the same nudge returns on your next tool call and the disagreement is recorded nowhere.',
|
|
1915
|
+
inputSchema: {
|
|
1916
|
+
record_id: z.string().describe('the record id from the ⚡ ARRIVED block'),
|
|
1917
|
+
reason: z.string().describe('WHY it is not yours — recorded, and the only thing that can later answer "why did nobody take this"'),
|
|
1918
|
+
},
|
|
1919
|
+
},
|
|
1920
|
+
async ({ record_id, reason }) => {
|
|
1921
|
+
let res
|
|
1922
|
+
try {
|
|
1923
|
+
res = await fetchCortex(`${BASE}/api/nudge/reject`, {
|
|
1924
|
+
method: 'POST',
|
|
1925
|
+
headers: { Authorization: `Bearer ${TOKEN}`, 'Content-Type': 'application/json' },
|
|
1926
|
+
body: JSON.stringify({ recordId: record_id, reason }),
|
|
1927
|
+
})
|
|
1928
|
+
} catch (e) {
|
|
1929
|
+
return toolError(`Could not record the decline: ${e.message}`)
|
|
1930
|
+
}
|
|
1931
|
+
const out = await res.json().catch(() => null)
|
|
1932
|
+
if (!res.ok) return toolError(`Could not decline ${record_id}: ${out?.error ?? res.status}${out?.detail ? `\n${out.detail}` : ''}`)
|
|
1933
|
+
return { content: [{ type: 'text', text: `Noted — ${record_id} will not be offered to this session again. It stays unclaimed and on the general timeline for anyone else.` }] }
|
|
1934
|
+
},
|
|
1935
|
+
)
|
|
1936
|
+
|
|
1910
1937
|
server.registerTool(
|
|
1911
1938
|
'set_summary',
|
|
1912
1939
|
{
|
package/package.json
CHANGED