@goondocks/myco 0.3.2 → 0.3.4
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/dist/{chunk-5BGQJOJN.js → chunk-4RJ3IEPW.js} +4 -4
- package/dist/{chunk-Q7BEFSOV.js → chunk-7VPJK56U.js} +10 -4
- package/dist/chunk-7VPJK56U.js.map +1 -0
- package/dist/{chunk-N6IAW33G.js → chunk-7WNE22W7.js} +3 -3
- package/dist/{chunk-72OAG4SF.js → chunk-AWF3M57N.js} +11 -6
- package/dist/{chunk-72OAG4SF.js.map → chunk-AWF3M57N.js.map} +1 -1
- package/dist/{chunk-XW3OL55U.js → chunk-BA23DROX.js} +2 -2
- package/dist/{chunk-TJJRIVZ7.js → chunk-C72VNYA4.js} +2 -2
- package/dist/{chunk-PAUPHPOC.js → chunk-DBSG4V6Y.js} +3 -3
- package/dist/{chunk-P2Q77C5F.js → chunk-QWU7QLZI.js} +6 -2
- package/dist/chunk-QWU7QLZI.js.map +1 -0
- package/dist/{chunk-2UEJVXXE.js → chunk-R2R243GC.js} +2 -2
- package/dist/{chunk-JIQISBPI.js → chunk-UHMMKLK3.js} +5 -5
- package/dist/{chunk-2QEJKG7R.js → chunk-Y3OYD4CX.js} +2 -2
- package/dist/{chunk-2TKJPRZL.js → chunk-ZBNT6E22.js} +2 -2
- package/dist/{cli-4RR3QBYK.js → cli-YTICB2DH.js} +15 -15
- package/dist/{client-43ML4EHJ.js → client-YI6RXFJD.js} +5 -5
- package/dist/{detect-providers-6RQCQZOI.js → detect-providers-LNOLBICR.js} +3 -3
- package/dist/{init-HTKEL3YT.js → init-TQ7Q4WEI.js} +5 -5
- package/dist/{main-DTWU4OAH.js → main-3BL45UM3.js} +10 -9
- package/dist/{main-DTWU4OAH.js.map → main-3BL45UM3.js.map} +1 -1
- package/dist/{rebuild-TXMFYBOU.js → rebuild-JW6BCHHZ.js} +5 -5
- package/dist/{reprocess-ARKHGDWF.js → reprocess-5XX3EOAV.js} +9 -9
- package/dist/{restart-C5BCVG3A.js → restart-UGE2Y327.js} +6 -6
- package/dist/{search-YCKNX2WS.js → search-2HMG3ON7.js} +4 -4
- package/dist/{server-EBKMQISL.js → server-YYCYIH5Z.js} +102 -81
- package/dist/server-YYCYIH5Z.js.map +1 -0
- package/dist/{session-start-ADZLL2YI.js → session-start-4MNXDOYK.js} +6 -6
- package/dist/src/cli.js +4 -4
- package/dist/src/daemon/main.js +4 -4
- package/dist/src/hooks/post-tool-use.js +5 -5
- package/dist/src/hooks/session-end.js +5 -5
- package/dist/src/hooks/session-start.js +4 -4
- package/dist/src/hooks/stop.js +5 -5
- package/dist/src/hooks/user-prompt-submit.js +9 -8
- package/dist/src/hooks/user-prompt-submit.js.map +1 -1
- package/dist/src/mcp/server.js +4 -4
- package/dist/{stats-7VEZN2WF.js → stats-7T44NZQN.js} +5 -5
- package/dist/{verify-HN5DWV2H.js → verify-7MWOV72E.js} +4 -4
- package/dist/{version-N55WTRG5.js → version-3MSC7E3V.js} +4 -4
- package/package.json +1 -1
- package/skills/myco/SKILL.md +15 -14
- package/dist/chunk-P2Q77C5F.js.map +0 -1
- package/dist/chunk-Q7BEFSOV.js.map +0 -1
- package/dist/server-EBKMQISL.js.map +0 -1
- /package/dist/{chunk-5BGQJOJN.js.map → chunk-4RJ3IEPW.js.map} +0 -0
- /package/dist/{chunk-N6IAW33G.js.map → chunk-7WNE22W7.js.map} +0 -0
- /package/dist/{chunk-XW3OL55U.js.map → chunk-BA23DROX.js.map} +0 -0
- /package/dist/{chunk-TJJRIVZ7.js.map → chunk-C72VNYA4.js.map} +0 -0
- /package/dist/{chunk-PAUPHPOC.js.map → chunk-DBSG4V6Y.js.map} +0 -0
- /package/dist/{chunk-2UEJVXXE.js.map → chunk-R2R243GC.js.map} +0 -0
- /package/dist/{chunk-JIQISBPI.js.map → chunk-UHMMKLK3.js.map} +0 -0
- /package/dist/{chunk-2QEJKG7R.js.map → chunk-Y3OYD4CX.js.map} +0 -0
- /package/dist/{chunk-2TKJPRZL.js.map → chunk-ZBNT6E22.js.map} +0 -0
- /package/dist/{cli-4RR3QBYK.js.map → cli-YTICB2DH.js.map} +0 -0
- /package/dist/{client-43ML4EHJ.js.map → client-YI6RXFJD.js.map} +0 -0
- /package/dist/{detect-providers-6RQCQZOI.js.map → detect-providers-LNOLBICR.js.map} +0 -0
- /package/dist/{init-HTKEL3YT.js.map → init-TQ7Q4WEI.js.map} +0 -0
- /package/dist/{rebuild-TXMFYBOU.js.map → rebuild-JW6BCHHZ.js.map} +0 -0
- /package/dist/{reprocess-ARKHGDWF.js.map → reprocess-5XX3EOAV.js.map} +0 -0
- /package/dist/{restart-C5BCVG3A.js.map → restart-UGE2Y327.js.map} +0 -0
- /package/dist/{search-YCKNX2WS.js.map → search-2HMG3ON7.js.map} +0 -0
- /package/dist/{session-start-ADZLL2YI.js.map → session-start-4MNXDOYK.js.map} +0 -0
- /package/dist/{stats-7VEZN2WF.js.map → stats-7T44NZQN.js.map} +0 -0
- /package/dist/{verify-HN5DWV2H.js.map → verify-7MWOV72E.js.map} +0 -0
- /package/dist/{version-N55WTRG5.js.map → version-3MSC7E3V.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
DAEMON_CLIENT_TIMEOUT_MS,
|
|
5
5
|
EMBEDDING_REQUEST_TIMEOUT_MS,
|
|
6
6
|
LLM_REQUEST_TIMEOUT_MS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7VPJK56U.js";
|
|
8
8
|
|
|
9
9
|
// src/intelligence/ollama.ts
|
|
10
10
|
var OllamaBackend = class _OllamaBackend {
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
OllamaBackend,
|
|
158
158
|
LmStudioBackend
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
160
|
+
//# sourceMappingURL=chunk-BA23DROX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
AgentRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y3OYD4CX.js";
|
|
5
5
|
|
|
6
6
|
// src/native-deps.ts
|
|
7
7
|
import { execFileSync } from "child_process";
|
|
@@ -53,4 +53,4 @@ function ensureNativeDeps() {
|
|
|
53
53
|
export {
|
|
54
54
|
ensureNativeDeps
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-C72VNYA4.js.map
|
|
@@ -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-
|
|
5
|
+
} from "./chunk-BA23DROX.js";
|
|
6
6
|
import {
|
|
7
7
|
AgentRegistry
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Y3OYD4CX.js";
|
|
9
9
|
|
|
10
10
|
// src/cli/shared.ts
|
|
11
11
|
import fs from "fs";
|
|
@@ -108,4 +108,4 @@ export {
|
|
|
108
108
|
VAULT_GITIGNORE,
|
|
109
109
|
configureVaultEnv
|
|
110
110
|
};
|
|
111
|
-
//# sourceMappingURL=chunk-
|
|
111
|
+
//# sourceMappingURL=chunk-DBSG4V6Y.js.map
|
|
@@ -34,8 +34,12 @@ var CALLOUT_MAP = {
|
|
|
34
34
|
function observationCalloutType(observationType) {
|
|
35
35
|
return CALLOUT_MAP[observationType] ?? "note";
|
|
36
36
|
}
|
|
37
|
+
function escapeHtmlTags(text) {
|
|
38
|
+
return text.replace(/<(?=[a-zA-Z/!])/g, "\\<");
|
|
39
|
+
}
|
|
37
40
|
function callout(type, title, content) {
|
|
38
|
-
const
|
|
41
|
+
const safe = escapeHtmlTags(content);
|
|
42
|
+
const indented = safe.split("\n").map((line) => `> ${line}`).join("\n");
|
|
39
43
|
return `> [!${type}] ${title}
|
|
40
44
|
${indented}`;
|
|
41
45
|
}
|
|
@@ -418,4 +422,4 @@ export {
|
|
|
418
422
|
formatMemoryBody,
|
|
419
423
|
VaultWriter
|
|
420
424
|
};
|
|
421
|
-
//# sourceMappingURL=chunk-
|
|
425
|
+
//# sourceMappingURL=chunk-QWU7QLZI.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 memories\n if (input.relatedMemories?.length) {\n const links = input.relatedMemories.map((m) => `- ${wikilink(m.id, m.title)}`);\n sections.push(`## Related Memories\\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// --- Memory formatting ---\n\nexport interface MemoryBodyInput {\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 formatMemoryBody(input: MemoryBodyInput): 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('memory', 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 WriteMemoryInput {\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 writeMemory(input: WriteMemoryInput): string {\n const normalizedType = input.observation_type.replace(/_/g, '-');\n const relativePath = `memories/${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: 'memory',\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('memory', 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;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C;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"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
AgentRegistry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Y3OYD4CX.js";
|
|
5
5
|
|
|
6
6
|
// src/version.ts
|
|
7
7
|
import fs from "fs";
|
|
@@ -30,4 +30,4 @@ function readVersionFrom(dir) {
|
|
|
30
30
|
export {
|
|
31
31
|
getPluginVersion
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
33
|
+
//# sourceMappingURL=chunk-R2R243GC.js.map
|
|
@@ -2,17 +2,17 @@ import { createRequire as __cr } from 'node:module'; const require = __cr(import
|
|
|
2
2
|
import {
|
|
3
3
|
formatMemoryBody,
|
|
4
4
|
sessionNoteId
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QWU7QLZI.js";
|
|
6
6
|
import {
|
|
7
7
|
ARTIFACT_TYPES,
|
|
8
8
|
indexNote
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AWF3M57N.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
12
|
} from "./chunk-ISCT2SI6.js";
|
|
13
13
|
import {
|
|
14
14
|
AgentRegistry
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Y3OYD4CX.js";
|
|
16
16
|
import {
|
|
17
17
|
AI_RESPONSE_PREVIEW_CHARS,
|
|
18
18
|
CANDIDATE_CONTENT_PREVIEW,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
PROMPT_PREVIEW_CHARS,
|
|
24
24
|
SUMMARY_MAX_TOKENS,
|
|
25
25
|
TITLE_MAX_TOKENS
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7VPJK56U.js";
|
|
27
27
|
|
|
28
28
|
// src/prompts/index.ts
|
|
29
29
|
import fs from "fs";
|
|
@@ -359,4 +359,4 @@ export {
|
|
|
359
359
|
extractTurnsFromBuffer,
|
|
360
360
|
writeObservationNotes
|
|
361
361
|
};
|
|
362
|
-
//# sourceMappingURL=chunk-
|
|
362
|
+
//# sourceMappingURL=chunk-UHMMKLK3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
PROMPT_PREVIEW_CHARS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7VPJK56U.js";
|
|
5
5
|
|
|
6
6
|
// src/agents/adapter.ts
|
|
7
7
|
import fs from "fs";
|
|
@@ -351,4 +351,4 @@ export {
|
|
|
351
351
|
claudeCodeAdapter,
|
|
352
352
|
AgentRegistry
|
|
353
353
|
};
|
|
354
|
-
//# sourceMappingURL=chunk-
|
|
354
|
+
//# sourceMappingURL=chunk-Y3OYD4CX.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
STDIN_TIMEOUT_MS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7VPJK56U.js";
|
|
5
5
|
|
|
6
6
|
// src/hooks/read-stdin.ts
|
|
7
7
|
function readStdin() {
|
|
@@ -18,4 +18,4 @@ function readStdin() {
|
|
|
18
18
|
export {
|
|
19
19
|
readStdin
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=chunk-
|
|
21
|
+
//# sourceMappingURL=chunk-ZBNT6E22.js.map
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
loadEnv
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DBSG4V6Y.js";
|
|
6
6
|
import "./chunk-SAKJMNSR.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-BA23DROX.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveVaultDir
|
|
10
10
|
} from "./chunk-N33KUCFP.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-Y3OYD4CX.js";
|
|
12
|
+
import "./chunk-7VPJK56U.js";
|
|
13
13
|
import "./chunk-PZUWP5VK.js";
|
|
14
14
|
|
|
15
15
|
// src/cli.ts
|
|
@@ -39,10 +39,10 @@ async function main() {
|
|
|
39
39
|
process.stdout.write(USAGE);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
if (cmd === "init") return (await import("./init-
|
|
43
|
-
if (cmd === "detect-providers") return (await import("./detect-providers-
|
|
42
|
+
if (cmd === "init") return (await import("./init-TQ7Q4WEI.js")).run(args);
|
|
43
|
+
if (cmd === "detect-providers") return (await import("./detect-providers-LNOLBICR.js")).run(args);
|
|
44
44
|
if (cmd === "version" || cmd === "--version" || cmd === "-v") {
|
|
45
|
-
const { getPluginVersion } = await import("./version-
|
|
45
|
+
const { getPluginVersion } = await import("./version-3MSC7E3V.js");
|
|
46
46
|
console.log(getPluginVersion());
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
@@ -55,21 +55,21 @@ async function main() {
|
|
|
55
55
|
case "config":
|
|
56
56
|
return (await import("./config-MD4XMLUS.js")).run(args, vaultDir);
|
|
57
57
|
case "verify":
|
|
58
|
-
return (await import("./verify-
|
|
58
|
+
return (await import("./verify-7MWOV72E.js")).run(args, vaultDir);
|
|
59
59
|
case "stats":
|
|
60
|
-
return (await import("./stats-
|
|
60
|
+
return (await import("./stats-7T44NZQN.js")).run(args, vaultDir);
|
|
61
61
|
case "search":
|
|
62
|
-
return (await import("./search-
|
|
62
|
+
return (await import("./search-2HMG3ON7.js")).run(args, vaultDir);
|
|
63
63
|
case "vectors":
|
|
64
|
-
return (await import("./search-
|
|
64
|
+
return (await import("./search-2HMG3ON7.js")).runVectors(args, vaultDir);
|
|
65
65
|
case "session":
|
|
66
66
|
return (await import("./session-5GI2YU6R.js")).run(args, vaultDir);
|
|
67
67
|
case "restart":
|
|
68
|
-
return (await import("./restart-
|
|
68
|
+
return (await import("./restart-UGE2Y327.js")).run(args, vaultDir);
|
|
69
69
|
case "rebuild":
|
|
70
|
-
return (await import("./rebuild-
|
|
70
|
+
return (await import("./rebuild-JW6BCHHZ.js")).run(args, vaultDir);
|
|
71
71
|
case "reprocess":
|
|
72
|
-
return (await import("./reprocess-
|
|
72
|
+
return (await import("./reprocess-5XX3EOAV.js")).run(args, vaultDir);
|
|
73
73
|
case "logs":
|
|
74
74
|
return (await import("./logs-BSTBZHDR.js")).run(args, vaultDir);
|
|
75
75
|
default:
|
|
@@ -82,4 +82,4 @@ main().catch((err) => {
|
|
|
82
82
|
console.error(`myco: ${err.message}`);
|
|
83
83
|
process.exit(1);
|
|
84
84
|
});
|
|
85
|
-
//# sourceMappingURL=cli-
|
|
85
|
+
//# sourceMappingURL=cli-YTICB2DH.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
DaemonClient
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4RJ3IEPW.js";
|
|
5
|
+
import "./chunk-R2R243GC.js";
|
|
6
|
+
import "./chunk-Y3OYD4CX.js";
|
|
7
|
+
import "./chunk-7VPJK56U.js";
|
|
8
8
|
import "./chunk-PZUWP5VK.js";
|
|
9
9
|
export {
|
|
10
10
|
DaemonClient
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=client-
|
|
12
|
+
//# sourceMappingURL=client-YI6RXFJD.js.map
|
|
@@ -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-
|
|
5
|
+
} from "./chunk-BA23DROX.js";
|
|
6
6
|
import {
|
|
7
7
|
PROVIDER_DETECT_TIMEOUT_MS
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7VPJK56U.js";
|
|
9
9
|
import "./chunk-PZUWP5VK.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/detect-providers.ts
|
|
@@ -32,4 +32,4 @@ async function run(_args) {
|
|
|
32
32
|
export {
|
|
33
33
|
run
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=detect-providers-
|
|
35
|
+
//# sourceMappingURL=detect-providers-LNOLBICR.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
PROVIDER_DEFAULTS,
|
|
5
5
|
VAULT_GITIGNORE,
|
|
6
6
|
configureVaultEnv
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DBSG4V6Y.js";
|
|
8
8
|
import {
|
|
9
9
|
parseStringFlag
|
|
10
10
|
} from "./chunk-SAKJMNSR.js";
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
MycoIndex
|
|
16
16
|
} from "./chunk-PA3VMINE.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-BA23DROX.js";
|
|
18
18
|
import {
|
|
19
19
|
require_dist
|
|
20
20
|
} from "./chunk-EF4JVH24.js";
|
|
21
21
|
import {
|
|
22
22
|
resolveVaultDir
|
|
23
23
|
} from "./chunk-N33KUCFP.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-Y3OYD4CX.js";
|
|
25
|
+
import "./chunk-7VPJK56U.js";
|
|
26
26
|
import {
|
|
27
27
|
__toESM
|
|
28
28
|
} from "./chunk-PZUWP5VK.js";
|
|
@@ -117,4 +117,4 @@ async function run(args) {
|
|
|
117
117
|
export {
|
|
118
118
|
run
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=init-
|
|
120
|
+
//# sourceMappingURL=init-TQ7Q4WEI.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
extractNumber,
|
|
7
7
|
extractTurnsFromBuffer,
|
|
8
8
|
writeObservationNotes
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UHMMKLK3.js";
|
|
10
10
|
import {
|
|
11
11
|
VaultWriter,
|
|
12
12
|
bareSessionId,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
sessionNoteId,
|
|
15
15
|
sessionRelativePath,
|
|
16
16
|
sessionWikilink
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QWU7QLZI.js";
|
|
18
18
|
import {
|
|
19
19
|
indexNote,
|
|
20
20
|
rebuildIndex
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-AWF3M57N.js";
|
|
22
22
|
import {
|
|
23
23
|
generateEmbedding
|
|
24
24
|
} from "./chunk-RGVBGTD6.js";
|
|
@@ -37,8 +37,8 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
createEmbeddingProvider,
|
|
39
39
|
createLlmProvider
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-7WNE22W7.js";
|
|
41
|
+
import "./chunk-BA23DROX.js";
|
|
42
42
|
import {
|
|
43
43
|
external_exports,
|
|
44
44
|
loadConfig
|
|
@@ -51,12 +51,12 @@ import {
|
|
|
51
51
|
} from "./chunk-I7PMGO6S.js";
|
|
52
52
|
import {
|
|
53
53
|
getPluginVersion
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-R2R243GC.js";
|
|
55
55
|
import {
|
|
56
56
|
claudeCodeAdapter,
|
|
57
57
|
createPerProjectAdapter,
|
|
58
58
|
extensionForMimeType
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-Y3OYD4CX.js";
|
|
60
60
|
import {
|
|
61
61
|
CANDIDATE_CONTENT_PREVIEW,
|
|
62
62
|
CONTENT_SNIPPET_CHARS,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
RELATED_MEMORIES_LIMIT,
|
|
72
72
|
SESSION_CONTEXT_MAX_PLANS,
|
|
73
73
|
STALE_BUFFER_MAX_AGE_MS
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-7VPJK56U.js";
|
|
75
75
|
import {
|
|
76
76
|
__toESM
|
|
77
77
|
} from "./chunk-PZUWP5VK.js";
|
|
@@ -2866,6 +2866,7 @@ ${planLines.join("\n")}`);
|
|
|
2866
2866
|
if (branch) {
|
|
2867
2867
|
parts.push(`Branch:: \`${branch}\``);
|
|
2868
2868
|
}
|
|
2869
|
+
parts.push(`Session:: \`${session_id}\``);
|
|
2869
2870
|
if (parts.length > 0) {
|
|
2870
2871
|
return { text: parts.join("\n\n") };
|
|
2871
2872
|
}
|
|
@@ -2946,4 +2947,4 @@ export {
|
|
|
2946
2947
|
chokidar/index.js:
|
|
2947
2948
|
(*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
|
|
2948
2949
|
*/
|
|
2949
|
-
//# sourceMappingURL=main-
|
|
2950
|
+
//# sourceMappingURL=main-3BL45UM3.js.map
|