@theronap/cortex-mcp 0.9.8 → 0.9.9

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.
@@ -88,12 +88,11 @@ function deriveTitle(frontmatter, body, filePath) {
88
88
  return basename(filePath, extname(filePath))
89
89
  }
90
90
 
91
- // summary: frontmatter line(s) joined + first ~800 chars of the body. Bounded so the raw full
92
- // file never leaves the machineonly an excerpt.
93
- function deriveSummary(frontLines, body) {
94
- const front = frontLines.join('\n').trim()
95
- const excerpt = body.trim().slice(0, 800)
96
- return [front, excerpt].filter(Boolean).join('\n\n')
91
+ // summary: first ~800 chars of the BODY (prose). Bounded so the raw full file never leaves the
92
+ // machine. Frontmatter is NOT prependedit rides structured in payload, and the title is derived
93
+ // separately, so the summary reads as content (what the digest summarizes), not "key: value" noise.
94
+ function deriveSummary(body) {
95
+ return body.trim().slice(0, 800)
97
96
  }
98
97
 
99
98
  export async function runIngestFolder(argv) {
@@ -129,12 +128,12 @@ export async function runIngestFolder(argv) {
129
128
  for (const file of files) {
130
129
  try {
131
130
  const content = readFileSync(file, 'utf8')
132
- const { frontmatter, frontLines, bodyStart } = parseFrontmatter(content)
131
+ const { frontmatter, bodyStart } = parseFrontmatter(content)
133
132
  const body = content.slice(bodyStart)
134
133
 
135
134
  const relpath = relative(path, file)
136
135
  const title = deriveTitle(frontmatter, body, file)
137
- const summary = deriveSummary(frontLines, body)
136
+ const summary = deriveSummary(body)
138
137
  const occurredAt = statSync(file).mtime.toISOString()
139
138
 
140
139
  const res = await fetchCortex(`${base}/api/ingest`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theronap/cortex-mcp",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
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": {