@theronap/cortex-mcp 0.9.25 → 0.9.26

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 +8 -2
  2. package/package.json +1 -1
package/lib/server.mjs CHANGED
@@ -263,6 +263,11 @@ export async function runServer(version) {
263
263
  return { content: [{ type: 'text', text: `Could not read "${name}": ${e.message}` }] }
264
264
  }
265
265
  if (res.status === 404) {
266
+ // Identifier links ([[repo:owner/name]]) are JOIN KEYS, not pages — a 404 here is expected.
267
+ // The home/expand resolver arrives in a later slice; until then grep is the join.
268
+ if (/^[a-z][a-z0-9_-]*:.+/i.test(name)) {
269
+ return { content: [{ type: 'text', text: `"${name}" is an identifier link (a join key), not a page — there is nothing to read at it yet. \`grep "${name}"\` to find every page carrying this stamp; the timeline resolver for identifiers lands in a later slice.` }] }
270
+ }
266
271
  return { content: [{ type: 'text', text: `No ${k} page named "${name}". If it's a person or team, pass kind (person/org). Otherwise \`grep "${name}"\` to locate it — it may be a red-link (a wanted page that isn't authored yet).` }] }
267
272
  }
268
273
  if (!res.ok) {
@@ -583,7 +588,7 @@ export async function runServer(version) {
583
588
  {
584
589
  title: 'Authoring context (call before author)',
585
590
  description:
586
- 'Fetch the scaffolding to author a Cortex wiki node: the canonical NAMESPACE (existing node names — link to these with the EXACT name inside [[ ]]) and the node-type CONNECTION RULES (what kinds of links to look for). ALWAYS call this BEFORE `author` so the page links to real nodes by their established names instead of minting synonyms. Reference a node in the namespace as [[Name]]; if you reference something real that is NOT in the namespace, still write [[Name]] — that is a red-link marking a node worth creating.',
591
+ 'Fetch the scaffolding to author a Cortex wiki node: the canonical NAMESPACE (existing node names — link to these with the EXACT name inside [[ ]]) and the node-type CONNECTION RULES (what kinds of links to look for). ALWAYS call this BEFORE `author` so the page links to real nodes by their established names instead of minting synonyms. Reference a node in the namespace as [[Name]]; if you reference something real that is NOT in the namespace, still write [[Name]] — that is a red-link marking a node worth creating. If the page IS about a specific code repo, also stamp [[repo:owner/name]] (lowercase) once — an identifier join key, not a page link.',
587
592
  inputSchema: {
588
593
  kind: z.enum(['project', 'person', 'org', 'user']).optional().describe('the node type you are about to author (default project)'),
589
594
  },
@@ -650,8 +655,9 @@ export async function runServer(version) {
650
655
  const blue = out?.links?.blue ?? 0
651
656
  const red = out?.links?.red ?? 0
652
657
  const redList = Array.isArray(out?.redLinks) && out.redLinks.length ? `\nRed-links (wanted nodes): ${out.redLinks.map((r) => `[[${r}]]`).join(', ')}` : ''
658
+ const stamps = Array.isArray(out?.identifiers) && out.identifiers.length ? `\nIdentifier stamps (join keys): ${out.identifiers.map((i) => `[[${i}]]`).join(', ')}` : ''
653
659
  const verb = out?.created ? 'Created + authored' : 'Authored'
654
- const note = out?.built ? `${verb} "${name}" (${out.built} tier${out.built === 1 ? '' : 's'}). Links: ${blue} resolved, ${red} red.${redList}`
660
+ const note = out?.built ? `${verb} "${name}" (${out.built} tier${out.built === 1 ? '' : 's'}). Links: ${blue} resolved, ${red} red.${redList}${stamps}`
655
661
  : `No change to "${name}"${out?.skipped?.length ? ` (${out.skipped.join(', ')})` : ''}.`
656
662
  return { content: [{ type: 'text', text: note }] }
657
663
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/cortex-mcp",
3
- "version": "0.9.25",
3
+ "version": "0.9.26",
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": {