@goondocks/myco 0.3.7 → 0.4.1

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 (121) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +9 -4
  4. package/commands/init.md +63 -39
  5. package/commands/setup-llm.md +69 -44
  6. package/commands/status.md +28 -10
  7. package/dist/{chunk-YFG2O5HR.js → chunk-2GJFTIWX.js} +2 -2
  8. package/dist/{chunk-ISCT2SI6.js → chunk-6UJWI4IW.js} +7359 -60
  9. package/dist/chunk-6UJWI4IW.js.map +1 -0
  10. package/dist/{chunk-PA3VMINE.js → chunk-AK6GNLPV.js} +6 -1
  11. package/dist/chunk-AK6GNLPV.js.map +1 -0
  12. package/dist/{chunk-JKOALBZC.js → chunk-BNIYWCST.js} +2 -2
  13. package/dist/{chunk-AWF3M57N.js → chunk-FPEDTLQ6.js} +9 -9
  14. package/dist/{chunk-AWF3M57N.js.map → chunk-FPEDTLQ6.js.map} +1 -1
  15. package/dist/{chunk-QWU7QLZI.js → chunk-I7PNZEBO.js} +10 -10
  16. package/dist/chunk-I7PNZEBO.js.map +1 -0
  17. package/dist/{chunk-7WNE22W7.js → chunk-IVS5MYBL.js} +3 -3
  18. package/dist/{chunk-7WNE22W7.js.map → chunk-IVS5MYBL.js.map} +1 -1
  19. package/dist/{chunk-7VPJK56U.js → chunk-JBD5KP5G.js} +31 -16
  20. package/dist/chunk-JBD5KP5G.js.map +1 -0
  21. package/dist/chunk-MIU3DKLN.js +37 -0
  22. package/dist/chunk-MIU3DKLN.js.map +1 -0
  23. package/dist/{chunk-NYAWCMRZ.js → chunk-OUFSLZTX.js} +4 -4
  24. package/dist/chunk-P7RNAYU7.js +242 -0
  25. package/dist/chunk-P7RNAYU7.js.map +1 -0
  26. package/dist/chunk-T7OC6GH5.js +99 -0
  27. package/dist/chunk-T7OC6GH5.js.map +1 -0
  28. package/dist/chunk-TBRZAJ7W.js +135 -0
  29. package/dist/chunk-TBRZAJ7W.js.map +1 -0
  30. package/dist/chunk-UKWO26VI.js +147 -0
  31. package/dist/chunk-UKWO26VI.js.map +1 -0
  32. package/dist/{chunk-FFQNE6CT.js → chunk-V2OWD2VV.js} +45 -31
  33. package/dist/chunk-V2OWD2VV.js.map +1 -0
  34. package/dist/chunk-WBT5DWGC.js +49 -0
  35. package/dist/chunk-WBT5DWGC.js.map +1 -0
  36. package/dist/{chunk-LR7RQCOB.js → chunk-XCPQHC4X.js} +2 -2
  37. package/dist/{chunk-CCIV47S4.js → chunk-XHWIIU5D.js} +8 -9
  38. package/dist/chunk-XHWIIU5D.js.map +1 -0
  39. package/dist/{chunk-ZBNT6E22.js → chunk-ZCBL5HER.js} +2 -2
  40. package/dist/{cli-3WQSDSW6.js → cli-IGZA3TZC.js} +23 -17
  41. package/dist/cli-IGZA3TZC.js.map +1 -0
  42. package/dist/{client-5T4M42UQ.js → client-5SUO2UYH.js} +5 -5
  43. package/dist/{config-MD4XMLUS.js → config-5FGLQGCW.js} +4 -4
  44. package/dist/{detect-providers-LNOLBICR.js → detect-providers-5FU3BN5Q.js} +3 -3
  45. package/dist/{init-RALMQKOQ.js → init-M3GDZRKI.js} +51 -60
  46. package/dist/init-M3GDZRKI.js.map +1 -0
  47. package/dist/{main-S3WSUF5T.js → main-3JSO25IZ.js} +657 -228
  48. package/dist/main-3JSO25IZ.js.map +1 -0
  49. package/dist/{rebuild-JW6BCHHZ.js → rebuild-MW4GCY6Z.js} +10 -10
  50. package/dist/rebuild-MW4GCY6Z.js.map +1 -0
  51. package/dist/{reprocess-SNXFNKBN.js → reprocess-SWRFIIDZ.js} +18 -18
  52. package/dist/reprocess-SWRFIIDZ.js.map +1 -0
  53. package/dist/{restart-YE2IGOYT.js → restart-5UY2KV54.js} +6 -6
  54. package/dist/{search-2HMG3ON7.js → search-IYVMRZU2.js} +9 -9
  55. package/dist/{server-JM3TM7D2.js → server-FSUSHJ3Y.js} +77 -54
  56. package/dist/{server-JM3TM7D2.js.map → server-FSUSHJ3Y.js.map} +1 -1
  57. package/dist/{session-5GI2YU6R.js → session-QF6MILAC.js} +2 -2
  58. package/dist/{session-start-2UEEEO52.js → session-start-YB4A4PZB.js} +29 -28
  59. package/dist/session-start-YB4A4PZB.js.map +1 -0
  60. package/dist/setup-digest-6TK5SPS6.js +15 -0
  61. package/dist/setup-llm-UGZBURZJ.js +15 -0
  62. package/dist/setup-llm-UGZBURZJ.js.map +1 -0
  63. package/dist/src/cli.js +4 -4
  64. package/dist/src/daemon/main.js +4 -4
  65. package/dist/src/hooks/post-tool-use.js +5 -5
  66. package/dist/src/hooks/session-end.js +5 -5
  67. package/dist/src/hooks/session-start.js +4 -4
  68. package/dist/src/hooks/stop.js +7 -7
  69. package/dist/src/hooks/user-prompt-submit.js +5 -5
  70. package/dist/src/hooks/user-prompt-submit.js.map +1 -1
  71. package/dist/src/mcp/server.js +4 -4
  72. package/dist/src/prompts/classification.md +1 -0
  73. package/dist/src/prompts/digest-10000.md +74 -0
  74. package/dist/src/prompts/digest-1500.md +25 -0
  75. package/dist/src/prompts/digest-3000.md +32 -0
  76. package/dist/src/prompts/digest-5000.md +43 -0
  77. package/dist/src/prompts/digest-system.md +32 -0
  78. package/dist/src/prompts/extraction.md +11 -10
  79. package/dist/src/prompts/summary.md +11 -1
  80. package/dist/src/prompts/title.md +1 -1
  81. package/dist/{stats-IOWXG576.js → stats-IVIXIKTS.js} +12 -12
  82. package/dist/stats-IVIXIKTS.js.map +1 -0
  83. package/dist/{verify-7MWOV72E.js → verify-WEGRM4W2.js} +6 -6
  84. package/dist/{version-S7MHLD5P.js → version-5B2TWXQJ.js} +4 -4
  85. package/dist/version-5B2TWXQJ.js.map +1 -0
  86. package/package.json +1 -1
  87. package/skills/myco/SKILL.md +20 -20
  88. package/skills/myco/references/wisdom.md +14 -14
  89. package/skills/rules/SKILL.md +4 -4
  90. package/dist/chunk-7VPJK56U.js.map +0 -1
  91. package/dist/chunk-BA23DROX.js +0 -160
  92. package/dist/chunk-BA23DROX.js.map +0 -1
  93. package/dist/chunk-CCIV47S4.js.map +0 -1
  94. package/dist/chunk-EF4JVH24.js +0 -7299
  95. package/dist/chunk-EF4JVH24.js.map +0 -1
  96. package/dist/chunk-FFQNE6CT.js.map +0 -1
  97. package/dist/chunk-ISCT2SI6.js.map +0 -1
  98. package/dist/chunk-PA3VMINE.js.map +0 -1
  99. package/dist/chunk-QWU7QLZI.js.map +0 -1
  100. package/dist/chunk-YMYJ7FNH.js +0 -19
  101. package/dist/chunk-YMYJ7FNH.js.map +0 -1
  102. package/dist/cli-3WQSDSW6.js.map +0 -1
  103. package/dist/init-RALMQKOQ.js.map +0 -1
  104. package/dist/main-S3WSUF5T.js.map +0 -1
  105. package/dist/rebuild-JW6BCHHZ.js.map +0 -1
  106. package/dist/reprocess-SNXFNKBN.js.map +0 -1
  107. package/dist/session-start-2UEEEO52.js.map +0 -1
  108. package/dist/stats-IOWXG576.js.map +0 -1
  109. /package/dist/{chunk-YFG2O5HR.js.map → chunk-2GJFTIWX.js.map} +0 -0
  110. /package/dist/{chunk-JKOALBZC.js.map → chunk-BNIYWCST.js.map} +0 -0
  111. /package/dist/{chunk-NYAWCMRZ.js.map → chunk-OUFSLZTX.js.map} +0 -0
  112. /package/dist/{chunk-LR7RQCOB.js.map → chunk-XCPQHC4X.js.map} +0 -0
  113. /package/dist/{chunk-ZBNT6E22.js.map → chunk-ZCBL5HER.js.map} +0 -0
  114. /package/dist/{client-5T4M42UQ.js.map → client-5SUO2UYH.js.map} +0 -0
  115. /package/dist/{config-MD4XMLUS.js.map → config-5FGLQGCW.js.map} +0 -0
  116. /package/dist/{detect-providers-LNOLBICR.js.map → detect-providers-5FU3BN5Q.js.map} +0 -0
  117. /package/dist/{restart-YE2IGOYT.js.map → restart-5UY2KV54.js.map} +0 -0
  118. /package/dist/{search-2HMG3ON7.js.map → search-IYVMRZU2.js.map} +0 -0
  119. /package/dist/{session-5GI2YU6R.js.map → session-QF6MILAC.js.map} +0 -0
  120. /package/dist/{version-S7MHLD5P.js.map → setup-digest-6TK5SPS6.js.map} +0 -0
  121. /package/dist/{verify-7MWOV72E.js.map → verify-WEGRM4W2.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
2
2
  import {
3
3
  require_dist
4
- } from "./chunk-EF4JVH24.js";
4
+ } from "./chunk-6UJWI4IW.js";
5
5
  import {
6
6
  __toESM
7
7
  } from "./chunk-PZUWP5VK.js";
@@ -89,7 +89,7 @@ function formatSessionBody(input) {
89
89
  sections.push(fields.join("\n"));
90
90
  if (input.relatedMemories?.length) {
91
91
  const links = input.relatedMemories.map((m) => `- ${wikilink(m.id, m.title)}`);
92
- sections.push(`## Related Memories
92
+ sections.push(`## Related Spores
93
93
  ${links.join("\n")}`);
94
94
  }
95
95
  if (input.turns.length > 0) {
@@ -124,7 +124,7 @@ ${turnLines.join("\n\n")}`);
124
124
  sections.push(footerTags(allTags));
125
125
  return sections.join("\n\n");
126
126
  }
127
- function formatMemoryBody(input) {
127
+ function formatSporeBody(input) {
128
128
  const sections = [];
129
129
  const calloutType = observationCalloutType(input.observationType);
130
130
  const calloutTitle = capitalize(tagNormalize(input.observationType));
@@ -148,7 +148,7 @@ ${input.alternatives_rejected}`);
148
148
  ${input.gained}`);
149
149
  if (input.sacrificed) sections.push(`## Sacrificed
150
150
  ${input.sacrificed}`);
151
- const allTags = buildTags("memory", input.observationType, input.tags ?? []);
151
+ const allTags = buildTags("spore", input.observationType, input.tags ?? []);
152
152
  sections.push(footerTags(allTags));
153
153
  return sections.join("\n\n");
154
154
  }
@@ -281,9 +281,9 @@ var VaultWriter = class {
281
281
  this.writeMarkdown(relativePath, frontmatter, body);
282
282
  return relativePath;
283
283
  }
284
- writeMemory(input) {
284
+ writeSpore(input) {
285
285
  const normalizedType = input.observation_type.replace(/_/g, "-");
286
- const relativePath = `memories/${normalizedType}/${input.id}.md`;
286
+ const relativePath = `spores/${normalizedType}/${input.id}.md`;
287
287
  const fullPath = path.join(this.vaultDir, relativePath);
288
288
  const now = (/* @__PURE__ */ new Date()).toISOString();
289
289
  let created = now;
@@ -297,14 +297,14 @@ var VaultWriter = class {
297
297
  } catch {
298
298
  }
299
299
  const frontmatter = {
300
- type: "memory",
300
+ type: "spore",
301
301
  id: input.id,
302
302
  observation_type: input.observation_type,
303
303
  created
304
304
  };
305
305
  if (input.session) frontmatter.session = input.session;
306
306
  if (input.plan) frontmatter.plan = input.plan;
307
- frontmatter.tags = buildTags("memory", input.observation_type, input.tags ?? []);
307
+ frontmatter.tags = buildTags("spore", input.observation_type, input.tags ?? []);
308
308
  this.writeMarkdown(relativePath, frontmatter, input.content);
309
309
  return relativePath;
310
310
  }
@@ -419,7 +419,7 @@ export {
419
419
  sessionWikilink,
420
420
  sessionRelativePath,
421
421
  formatSessionBody,
422
- formatMemoryBody,
422
+ formatSporeBody,
423
423
  VaultWriter
424
424
  };
425
- //# sourceMappingURL=chunk-QWU7QLZI.js.map
425
+ //# sourceMappingURL=chunk-I7PNZEBO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/vault/session-id.ts","../src/obsidian/formatter.ts","../src/vault/writer.ts"],"sourcesContent":["/**\n * Session ID convention utilities.\n *\n * The runtime session ID is a bare UUID (e.g., \"abc123\").\n * The vault stores it with a \"session-\" prefix (e.g., \"session-abc123\").\n * These helpers convert between the two forms.\n */\nconst SESSION_PREFIX = 'session-';\n\n/** Convert a bare session ID to a vault note ID: \"abc123\" → \"session-abc123\" */\nexport function sessionNoteId(bareId: string): string {\n if (bareId.startsWith(SESSION_PREFIX)) return bareId;\n return `${SESSION_PREFIX}${bareId}`;\n}\n\n/** Convert a vault note ID to a bare session ID: \"session-abc123\" → \"abc123\" */\nexport function bareSessionId(noteId: string): string {\n if (noteId.startsWith(SESSION_PREFIX)) return noteId.slice(SESSION_PREFIX.length);\n return noteId;\n}\n\n/** Convert a bare session ID to an Obsidian wikilink: \"abc123\" → \"[[session-abc123]]\" */\nexport function sessionWikilink(bareId: string): string {\n return `[[${sessionNoteId(bareId)}]]`;\n}\n\n/** Build the relative vault path for a session note */\nexport function sessionRelativePath(bareId: string, date: string): string {\n return `sessions/${date}/${sessionNoteId(bareId)}.md`;\n}\n\n","/**\n * Pure formatting functions for Obsidian-native vault notes.\n * No I/O, no external dependencies — just string transforms.\n */\nimport type { ArtifactType } from '../vault/types.js';\nimport { sessionNoteId } from '../vault/session-id.js';\n\n// Callout type mapping for observation types\nconst CALLOUT_MAP: Record<string, string> = {\n gotcha: 'warning',\n bug_fix: 'bug',\n decision: 'info',\n discovery: 'tip',\n trade_off: 'question',\n};\n\nexport function observationCalloutType(observationType: string): string {\n return CALLOUT_MAP[observationType] ?? 'note';\n}\n\n/**\n * Escape angle brackets that Obsidian would interpret as HTML tags.\n * Matches `<` followed by a letter, `/`, or `!` (opening/closing tags, comments).\n */\nexport function escapeHtmlTags(text: string): string {\n return text.replace(/<(?=[a-zA-Z/!])/g, '\\\\<');\n}\n\nexport function callout(type: string, title: string, content: string): string {\n const safe = escapeHtmlTags(content);\n const indented = safe.split('\\n').map((line) => `> ${line}`).join('\\n');\n return `> [!${type}] ${title}\\n${indented}`;\n}\n\nexport function inlineField(key: string, value: string): string {\n return `${key}:: ${value}`;\n}\n\nexport function wikilink(target: string, display?: string): string {\n return display ? `[[${target}|${display}]]` : `[[${target}]]`;\n}\n\n/**\n * Normalize an observation_type to a tag-safe form.\n * Frontmatter keeps underscores; tags use hyphens per Obsidian convention.\n */\nfunction tagNormalize(s: string): string {\n return s.replace(/_/g, '-');\n}\n\n/**\n * Sanitize a user/LLM-provided tag for Obsidian compatibility.\n * Obsidian tags cannot contain spaces — replace with slash (nested tag).\n * Strips leading # if present.\n */\nfunction sanitizeTag(raw: string): string {\n const stripped = raw.startsWith('#') ? raw.slice(1) : raw;\n return stripped.replace(/\\s+/g, '/');\n}\n\nexport function buildTags(type: string, subtype: string, extraTags: string[] = []): string[] {\n const tags: string[] = [`type/${type}`];\n\n if (subtype) {\n tags.push(`${type}/${tagNormalize(subtype)}`);\n }\n\n for (const tag of extraTags) {\n const normalized = sanitizeTag(tag);\n if (normalized && !tags.includes(normalized)) {\n tags.push(normalized);\n }\n }\n\n return tags;\n}\n\nexport function footerTags(tags: string[]): string {\n return tags.map((t) => (t.startsWith('#') ? t : `#${t}`)).join(' ');\n}\n\n// --- Session formatting ---\n\nexport interface SessionBodyInput {\n title: string;\n narrative: string;\n sessionId: string;\n user?: string;\n started?: string;\n ended?: string;\n branch?: string;\n relatedMemories?: Array<{ id: string; title: string }>;\n turns: Array<{\n prompt: string;\n toolCount: number;\n aiResponse?: string;\n /** Filenames of images in the vault attachments folder */\n images?: string[];\n }>;\n tags?: string[];\n}\n\nexport function formatSessionBody(input: SessionBodyInput): string {\n const sections: string[] = [];\n\n sections.push(`# ${input.title}`);\n\n if (input.narrative) {\n sections.push(callout('abstract', 'Summary', input.narrative));\n }\n\n // Inline fields\n const fields: string[] = [];\n fields.push(inlineField('Session', wikilink(sessionNoteId(input.sessionId))));\n if (input.user) fields.push(inlineField('User', input.user));\n if (input.started && input.ended) {\n const duration = formatDuration(input.started, input.ended);\n if (duration) fields.push(inlineField('Duration', duration));\n }\n if (input.branch) fields.push(inlineField('Branch', `\\`${input.branch}\\``));\n sections.push(fields.join('\\n'));\n\n // Related spores\n if (input.relatedMemories?.length) {\n const links = input.relatedMemories.map((m) => `- ${wikilink(m.id, m.title)}`);\n sections.push(`## Related Spores\\n${links.join('\\n')}`);\n }\n\n // Conversation turns — always rebuilt from the full transcript.\n // The transcript is the source of truth for the complete conversation.\n if (input.turns.length > 0) {\n const turnLines: string[] = [];\n for (let i = 0; i < input.turns.length; i++) {\n const turn = input.turns[i];\n const turnNum = i + 1;\n turnLines.push(`### Turn ${turnNum}`);\n if (turn.prompt || turn.images?.length) {\n // Build prompt content: text + images + tool count\n const parts: string[] = [];\n if (turn.prompt) parts.push(turn.prompt);\n if (turn.images?.length) {\n parts.push(turn.images.map((f) => `![[${f}]]`).join('\\n'));\n }\n if (turn.toolCount > 0) parts.push(`*${turn.toolCount} tool calls*`);\n turnLines.push(callout('user', 'Prompt', parts.join('\\n\\n')));\n } else if (turn.toolCount > 0) {\n turnLines.push(callout('user', 'Prompt', `*${turn.toolCount} tool calls*`));\n }\n if (turn.aiResponse) {\n turnLines.push(callout('assistant', 'Response', turn.aiResponse));\n }\n }\n sections.push(`## Conversation\\n\\n${turnLines.join('\\n\\n')}`);\n }\n\n // Footer tags\n const allTags = buildTags('session', 'ended', [\n ...(input.user ? [`user/${input.user}`] : []),\n ...(input.tags ?? []),\n ]);\n sections.push(footerTags(allTags));\n\n return sections.join('\\n\\n');\n}\n\n// --- Spore formatting ---\n\nexport interface SporeBodyInput {\n title: string;\n observationType: string;\n content: string;\n sessionId?: string;\n root_cause?: string;\n fix?: string;\n rationale?: string;\n alternatives_rejected?: string;\n gained?: string;\n sacrificed?: string;\n tags?: string[];\n}\n\nexport function formatSporeBody(input: SporeBodyInput): string {\n const sections: string[] = [];\n const calloutType = observationCalloutType(input.observationType);\n const calloutTitle = capitalize(tagNormalize(input.observationType));\n\n sections.push(`# ${input.title}`);\n sections.push(callout(calloutType, calloutTitle, input.content));\n\n // Inline fields\n const fields: string[] = [];\n if (input.sessionId) {\n fields.push(inlineField('Session', wikilink(sessionNoteId(input.sessionId))));\n }\n fields.push(inlineField('Observation', input.observationType));\n if (fields.length > 0) sections.push(fields.join('\\n'));\n\n // Type-specific sub-sections\n if (input.root_cause) sections.push(`## Root Cause\\n${input.root_cause}`);\n if (input.fix) sections.push(`## Fix\\n${input.fix}`);\n if (input.rationale) sections.push(`## Rationale\\n${input.rationale}`);\n if (input.alternatives_rejected) sections.push(`## Alternatives Rejected\\n${input.alternatives_rejected}`);\n if (input.gained) sections.push(`## Gained\\n${input.gained}`);\n if (input.sacrificed) sections.push(`## Sacrificed\\n${input.sacrificed}`);\n\n // Footer tags\n const allTags = buildTags('spore', input.observationType, input.tags ?? []);\n sections.push(footerTags(allTags));\n\n return sections.join('\\n\\n');\n}\n\n// --- Plan formatting ---\n\nexport interface PlanBodyInput {\n id: string;\n status: string;\n author?: string;\n created?: string;\n sessions?: Array<{ id: string; title: string }>;\n content: string;\n tags?: string[];\n}\n\nexport function formatPlanBody(input: PlanBodyInput): string {\n const sections: string[] = [];\n\n // Inline fields block\n const fields: string[] = [];\n fields.push(inlineField('Plan', wikilink(input.id)));\n fields.push(inlineField('Status', input.status));\n if (input.author) fields.push(inlineField('Author', input.author));\n if (input.created) fields.push(inlineField('Created', input.created));\n sections.push(fields.join('\\n'));\n\n // User-provided content body (don't restructure)\n sections.push(input.content);\n\n // Sessions section\n if (input.sessions?.length) {\n const links = input.sessions.map((s) => `- ${wikilink(sessionNoteId(s.id), s.title)}`);\n sections.push(`## Sessions\\n${links.join('\\n')}`);\n }\n\n // Footer tags\n const statusTag = tagNormalize(input.status);\n const allTags = buildTags('plan', statusTag, input.tags ?? []);\n sections.push(footerTags(allTags));\n\n return sections.join('\\n\\n');\n}\n\n// --- Artifact formatting ---\n\nexport interface ArtifactBodyInput {\n id: string;\n title: string;\n artifact_type: ArtifactType;\n source_path: string;\n sessionId: string;\n content: string;\n tags?: string[];\n}\n\nexport function formatArtifactBody(input: ArtifactBodyInput): string {\n const sections: string[] = [];\n\n // Inline fields\n const fields: string[] = [];\n fields.push(inlineField('Artifact', wikilink(input.id)));\n fields.push(inlineField('Source', `\\`${input.source_path}\\``));\n fields.push(inlineField('Type', input.artifact_type));\n fields.push(inlineField('Session', wikilink(sessionNoteId(input.sessionId))));\n sections.push(fields.join('\\n'));\n\n // Body: full content from disk\n sections.push(input.content);\n\n // Footer tags\n const allTags = buildTags('artifact', input.artifact_type, input.tags ?? []);\n sections.push(footerTags(allTags));\n\n return sections.join('\\n\\n');\n}\n\n// --- Team formatting ---\n\nexport interface TeamBodyInput {\n user: string;\n role?: string;\n recentSessions?: Array<{ id: string; title: string }>;\n}\n\nexport function formatTeamBody(input: TeamBodyInput): string {\n const sections: string[] = [];\n\n sections.push(`# ${input.user}`);\n sections.push(callout('info', 'Team Member', input.role ?? 'Contributor'));\n\n // Inline fields\n const fields: string[] = [];\n fields.push(inlineField('User', input.user));\n if (input.role) fields.push(inlineField('Role', input.role));\n sections.push(fields.join('\\n'));\n\n // Recent sessions\n if (input.recentSessions?.length) {\n const links = input.recentSessions.map((s) => `- ${wikilink(sessionNoteId(s.id), s.title)}`);\n sections.push(`## Recent Sessions\\n${links.join('\\n')}`);\n }\n\n // Footer tags\n const allTags = buildTags('team', '', [`user/${input.user}`]);\n sections.push(footerTags(allTags));\n\n return sections.join('\\n\\n');\n}\n\n// --- Helpers ---\n\nfunction capitalize(s: string): string {\n return s.charAt(0).toUpperCase() + s.slice(1);\n}\n\nfunction formatDuration(started: string, ended: string): string {\n const ms = new Date(ended).getTime() - new Date(started).getTime();\n if (isNaN(ms) || ms < 0) return '';\n const totalMinutes = Math.floor(ms / 60000);\n if (totalMinutes < 1) return '<1m';\n const hours = Math.floor(totalMinutes / 60);\n const minutes = totalMinutes % 60;\n if (hours === 0) return `${minutes}m`;\n if (minutes === 0) return `${hours}h`;\n return `${hours}h ${minutes}m`;\n}\n","import fs from 'node:fs';\nimport path from 'node:path';\nimport YAML from 'yaml';\nimport { buildTags, formatTeamBody, formatPlanBody, formatArtifactBody } from '../obsidian/formatter.js';\nimport type { ArtifactType } from './types.js';\nimport { sessionNoteId, sessionRelativePath } from './session-id.js';\n\ninterface WriteSessionInput {\n id: string;\n agent?: string;\n user?: string;\n started: string;\n ended?: string;\n parent?: string;\n parent_reason?: string;\n plans?: string[];\n branch?: string;\n tags?: string[];\n tools_used?: number;\n files_changed?: number;\n summary: string;\n}\n\ninterface WritePlanInput {\n id: string;\n status?: string;\n author?: string;\n tags?: string[];\n content: string;\n}\n\ninterface WriteSporeInput {\n id: string;\n observation_type: string;\n session?: string;\n plan?: string;\n tags?: string[];\n content: string;\n}\n\ninterface WriteArtifactInput {\n id: string;\n artifact_type: ArtifactType;\n source_path: string;\n title: string;\n session: string;\n tags?: string[];\n content: string;\n}\n\ninterface WriteTeamMemberInput {\n user: string;\n role?: string;\n}\n\nexport class VaultWriter {\n constructor(private vaultDir: string) {}\n\n writeSession(input: WriteSessionInput): string {\n const date = input.started.slice(0, 10);\n const relativePath = sessionRelativePath(input.id, date);\n\n const frontmatter: Record<string, unknown> = {\n type: 'session',\n id: input.id,\n agent: input.agent ?? 'claude-code',\n user: input.user ?? '',\n started: input.started,\n };\n if (input.ended) frontmatter.ended = input.ended;\n if (input.parent) frontmatter.parent = input.parent;\n if (input.parent_reason) frontmatter.parent_reason = input.parent_reason;\n if (input.plans?.length) frontmatter.plans = input.plans;\n if (input.branch) frontmatter.branch = input.branch;\n frontmatter.tags = buildTags('session', 'ended', [\n ...(input.user ? [`user/${input.user}`] : []),\n ...(input.tags ?? []),\n ]);\n if (input.tools_used != null) frontmatter.tools_used = input.tools_used;\n if (input.files_changed != null) frontmatter.files_changed = input.files_changed;\n\n this.writeMarkdown(relativePath, frontmatter, input.summary);\n return relativePath;\n }\n\n writePlan(input: WritePlanInput): string {\n const relativePath = `plans/${input.id}.md`;\n const fullPath = path.join(this.vaultDir, relativePath);\n\n const status = input.status ?? 'active';\n let created = new Date().toISOString();\n\n // Preserve created from existing file (idempotent)\n try {\n const existing = fs.readFileSync(fullPath, 'utf-8');\n const fmMatch = existing.match(/^---\\n([\\s\\S]*?)\\n---/);\n if (fmMatch) {\n const parsed = YAML.parse(fmMatch[1]) as Record<string, unknown>;\n if (typeof parsed.created === 'string') created = parsed.created;\n }\n } catch {\n // File doesn't exist yet\n }\n const frontmatter: Record<string, unknown> = {\n type: 'plan',\n id: input.id,\n status,\n created,\n };\n if (input.author) frontmatter.author = input.author;\n frontmatter.tags = buildTags('plan', status, input.tags ?? []);\n\n const body = formatPlanBody({\n id: input.id,\n status,\n author: input.author,\n created,\n content: input.content,\n tags: input.tags,\n });\n\n this.writeMarkdown(relativePath, frontmatter, body);\n return relativePath;\n }\n\n writeSpore(input: WriteSporeInput): string {\n const normalizedType = input.observation_type.replace(/_/g, '-');\n const relativePath = `spores/${normalizedType}/${input.id}.md`;\n const fullPath = path.join(this.vaultDir, relativePath);\n const now = new Date().toISOString();\n\n // Preserve created from existing file (idempotent)\n let created = now;\n try {\n const existing = fs.readFileSync(fullPath, 'utf-8');\n const fmMatch = existing.match(/^---\\n([\\s\\S]*?)\\n---/);\n if (fmMatch) {\n const parsed = YAML.parse(fmMatch[1]) as Record<string, unknown>;\n if (typeof parsed.created === 'string') created = parsed.created;\n }\n } catch {\n // File doesn't exist yet — created = now\n }\n\n const frontmatter: Record<string, unknown> = {\n type: 'spore',\n id: input.id,\n observation_type: input.observation_type,\n created,\n };\n if (input.session) frontmatter.session = input.session;\n if (input.plan) frontmatter.plan = input.plan;\n frontmatter.tags = buildTags('spore', input.observation_type, input.tags ?? []);\n\n this.writeMarkdown(relativePath, frontmatter, input.content);\n return relativePath;\n }\n\n writeArtifact(input: WriteArtifactInput): string {\n const relativePath = `artifacts/${input.id}.md`;\n const fullPath = path.join(this.vaultDir, relativePath);\n const now = new Date().toISOString();\n\n let created = now;\n\n // Preserve created from existing file (latest-wins update)\n try {\n const existing = fs.readFileSync(fullPath, 'utf-8');\n const fmMatch = existing.match(/^---\\n([\\s\\S]*?)\\n---/);\n if (fmMatch) {\n const parsed = YAML.parse(fmMatch[1]) as Record<string, unknown>;\n if (typeof parsed.created === 'string') created = parsed.created;\n }\n } catch {\n // File doesn't exist yet — created = now\n }\n\n const frontmatter: Record<string, unknown> = {\n type: 'artifact',\n id: input.id,\n artifact_type: input.artifact_type,\n source_path: input.source_path,\n title: input.title,\n last_captured_by: sessionNoteId(input.session),\n created,\n updated: now,\n tags: buildTags('artifact', input.artifact_type, input.tags ?? []),\n };\n\n const body = formatArtifactBody({\n id: input.id,\n title: input.title,\n artifact_type: input.artifact_type,\n source_path: input.source_path,\n sessionId: input.session,\n content: input.content,\n tags: input.tags,\n });\n\n this.writeMarkdown(relativePath, frontmatter, body);\n return relativePath;\n }\n\n writeTeamMember(input: WriteTeamMemberInput): string {\n const relativePath = `team/${input.user}.md`;\n\n const frontmatter: Record<string, unknown> = {\n type: 'team-member',\n user: input.user,\n joined: new Date().toISOString(),\n tags: buildTags('team', '', [`user/${input.user}`]),\n };\n if (input.role) frontmatter.role = input.role;\n\n const body = formatTeamBody({\n user: input.user,\n role: input.role,\n });\n\n this.writeMarkdown(relativePath, frontmatter, body);\n return relativePath;\n }\n\n /**\n * Update frontmatter fields on an existing note without touching the body.\n * By default only adds fields that don't exist. Set overwrite=true to replace existing values.\n * Returns true if the update was applied, false if the file doesn't exist.\n */\n updateNoteFrontmatter(relativePath: string, fields: Record<string, unknown>, overwrite = false): boolean {\n const fullPath = path.join(this.vaultDir, relativePath);\n let fileContent: string;\n try {\n fileContent = fs.readFileSync(fullPath, 'utf-8');\n } catch {\n return false;\n }\n\n const fmMatch = fileContent.match(/^---\\n([\\s\\S]*?)\\n---/);\n if (!fmMatch) return false;\n\n const parsed = YAML.parse(fmMatch[1]) as Record<string, unknown>;\n for (const [key, value] of Object.entries(fields)) {\n if (overwrite || parsed[key] === undefined) {\n parsed[key] = value;\n }\n }\n\n const body = fileContent.slice(fmMatch[0].length);\n const fmYaml = YAML.stringify(parsed, { defaultStringType: 'QUOTE_DOUBLE', defaultKeyType: 'PLAIN' }).trim();\n this.atomicWrite(fullPath, `---\\n${fmYaml}\\n---${body}`);\n return true;\n }\n\n /** @deprecated Use updateNoteFrontmatter instead */\n updateSessionFrontmatter(relativePath: string, fields: Record<string, unknown>): boolean {\n return this.updateNoteFrontmatter(relativePath, fields);\n }\n\n private writeMarkdown(relativePath: string, frontmatter: Record<string, unknown>, content: string): void {\n const fullPath = path.join(this.vaultDir, relativePath);\n fs.mkdirSync(path.dirname(fullPath), { recursive: true });\n\n const fmYaml = YAML.stringify(frontmatter, { defaultStringType: 'QUOTE_DOUBLE', defaultKeyType: 'PLAIN' }).trim();\n const file = `---\\n${fmYaml}\\n---\\n\\n${content}\\n`;\n this.atomicWrite(fullPath, file);\n }\n\n /** Write to a temp file then rename — prevents Obsidian from seeing a truncated file mid-write. */\n private atomicWrite(fullPath: string, content: string): void {\n const tmp = `${fullPath}.tmp`;\n fs.writeFileSync(tmp, content, 'utf-8');\n fs.renameSync(tmp, fullPath);\n }\n}\n"],"mappings":";;;;;;;;;AAOA,IAAM,iBAAiB;AAGhB,SAAS,cAAc,QAAwB;AACpD,MAAI,OAAO,WAAW,cAAc,EAAG,QAAO;AAC9C,SAAO,GAAG,cAAc,GAAG,MAAM;AACnC;AAGO,SAAS,cAAc,QAAwB;AACpD,MAAI,OAAO,WAAW,cAAc,EAAG,QAAO,OAAO,MAAM,eAAe,MAAM;AAChF,SAAO;AACT;AAGO,SAAS,gBAAgB,QAAwB;AACtD,SAAO,KAAK,cAAc,MAAM,CAAC;AACnC;AAGO,SAAS,oBAAoB,QAAgB,MAAsB;AACxE,SAAO,YAAY,IAAI,IAAI,cAAc,MAAM,CAAC;AAClD;;;ACrBA,IAAM,cAAsC;AAAA,EAC1C,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,WAAW;AAAA,EACX,WAAW;AACb;AAEO,SAAS,uBAAuB,iBAAiC;AACtE,SAAO,YAAY,eAAe,KAAK;AACzC;AAMO,SAAS,eAAe,MAAsB;AACnD,SAAO,KAAK,QAAQ,oBAAoB,KAAK;AAC/C;AAEO,SAAS,QAAQ,MAAc,OAAe,SAAyB;AAC5E,QAAM,OAAO,eAAe,OAAO;AACnC,QAAM,WAAW,KAAK,MAAM,IAAI,EAAE,IAAI,CAAC,SAAS,KAAK,IAAI,EAAE,EAAE,KAAK,IAAI;AACtE,SAAO,OAAO,IAAI,KAAK,KAAK;AAAA,EAAK,QAAQ;AAC3C;AAEO,SAAS,YAAY,KAAa,OAAuB;AAC9D,SAAO,GAAG,GAAG,MAAM,KAAK;AAC1B;AAEO,SAAS,SAAS,QAAgB,SAA0B;AACjE,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,mBAAmB,gBAAgB,gBAAgB,QAAQ,CAAC,EAAE,KAAK;AAC3G,SAAK,YAAY,UAAU;AAAA,EAAQ,MAAM;AAAA,KAAQ,IAAI,EAAE;AACvD,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,yBAAyB,cAAsB,QAA0C;AACvF,WAAO,KAAK,sBAAsB,cAAc,MAAM;AAAA,EACxD;AAAA,EAEQ,cAAc,cAAsB,aAAsC,SAAuB;AACvG,UAAM,WAAW,KAAK,KAAK,KAAK,UAAU,YAAY;AACtD,OAAG,UAAU,KAAK,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;AAExD,UAAM,SAAS,YAAAA,QAAK,UAAU,aAAa,EAAE,mBAAmB,gBAAgB,gBAAgB,QAAQ,CAAC,EAAE,KAAK;AAChH,UAAM,OAAO;AAAA,EAAQ,MAAM;AAAA;AAAA;AAAA,EAAY,OAAO;AAAA;AAC9C,SAAK,YAAY,UAAU,IAAI;AAAA,EACjC;AAAA;AAAA,EAGQ,YAAY,UAAkB,SAAuB;AAC3D,UAAM,MAAM,GAAG,QAAQ;AACvB,OAAG,cAAc,KAAK,SAAS,OAAO;AACtC,OAAG,WAAW,KAAK,QAAQ;AAAA,EAC7B;AACF;","names":["YAML"]}
@@ -2,10 +2,10 @@ import { createRequire as __cr } from 'node:module'; const require = __cr(import
2
2
  import {
3
3
  LmStudioBackend,
4
4
  OllamaBackend
5
- } from "./chunk-BA23DROX.js";
5
+ } from "./chunk-P7RNAYU7.js";
6
6
  import {
7
7
  LLM_REQUEST_TIMEOUT_MS
8
- } from "./chunk-7VPJK56U.js";
8
+ } from "./chunk-JBD5KP5G.js";
9
9
 
10
10
  // node_modules/@anthropic-ai/sdk/internal/tslib.mjs
11
11
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
@@ -4911,4 +4911,4 @@ export {
4911
4911
  createLlmProvider,
4912
4912
  createEmbeddingProvider
4913
4913
  };
4914
- //# sourceMappingURL=chunk-7WNE22W7.js.map
4914
+ //# sourceMappingURL=chunk-IVS5MYBL.js.map