@goondocks/myco 0.6.4 → 0.6.5
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-YIQLYIHW.js → chunk-4B5RO2YV.js} +4 -4
- package/dist/{chunk-7WHF2OIZ.js → chunk-4DYD4HHG.js} +25 -7
- package/dist/chunk-4DYD4HHG.js.map +1 -0
- package/dist/{chunk-NLUE6CYG.js → chunk-54WVLTKD.js} +3 -3
- package/dist/{chunk-NL6WQO56.js → chunk-5LMRZDH3.js} +2 -2
- package/dist/{chunk-O6PERU7U.js → chunk-AHZN4Z34.js} +2 -2
- package/dist/{chunk-J4D4CROB.js → chunk-DYDBF5W6.js} +5 -1
- package/dist/chunk-DYDBF5W6.js.map +1 -0
- package/dist/{chunk-Z74SDEKE.js → chunk-F7GAYVWF.js} +2 -2
- package/dist/{chunk-H7PRCVGQ.js → chunk-F7PGDD2X.js} +2 -2
- package/dist/{chunk-2ZIBCEYO.js → chunk-LEK6DEAE.js} +3 -3
- package/dist/{chunk-QLUE3BUL.js → chunk-O6TBHGVO.js} +9 -2
- package/dist/chunk-O6TBHGVO.js.map +1 -0
- package/dist/{chunk-FPRXMJLT.js → chunk-OEGZ5YTJ.js} +2 -2
- package/dist/{chunk-4XVKZ3WA.js → chunk-TK7A4RX7.js} +10 -3
- package/dist/chunk-TK7A4RX7.js.map +1 -0
- package/dist/{chunk-UP4P4OAA.js → chunk-V6BJVYNH.js} +2 -2
- package/dist/{chunk-QN4W3JUA.js → chunk-XH34FX4C.js} +2 -2
- package/dist/{chunk-YTFXA4RX.js → chunk-YRIIBPJD.js} +3 -3
- package/dist/{cli-IHILSS6N.js → cli-OJYHLO4Y.js} +20 -20
- package/dist/{client-AGFNR2S4.js → client-SS3C5MF6.js} +5 -5
- package/dist/{curate-3D4GHKJH.js → curate-4CKEMOPV.js} +6 -6
- package/dist/{detect-providers-XEP4QA3R.js → detect-providers-LFIVJYQO.js} +3 -3
- package/dist/{digest-7HLJXL77.js → digest-ZLARHLLY.js} +8 -8
- package/dist/{init-ARQ53JOR.js → init-3LVKVQ4L.js} +5 -5
- package/dist/{logs-IENORIYR.js → logs-6CWVP574.js} +3 -3
- package/dist/{main-6AGPIMH2.js → main-RB727YRP.js} +149 -28
- package/dist/main-RB727YRP.js.map +1 -0
- package/dist/{rebuild-Q2ACEB6F.js → rebuild-QWVVCBCZ.js} +6 -6
- package/dist/{reprocess-CDEFGQOV.js → reprocess-YG3WLUI2.js} +8 -8
- package/dist/{restart-XCMILOL5.js → restart-UIP7US4U.js} +6 -6
- package/dist/{search-7W25SKCB.js → search-BQLBW5CS.js} +4 -4
- package/dist/{server-6UDN35QN.js → server-43KSJ65Q.js} +77 -29
- package/dist/{server-6UDN35QN.js.map → server-43KSJ65Q.js.map} +1 -1
- package/dist/{session-start-K6IGAC7H.js → session-start-6SHGT2AW.js} +6 -6
- package/dist/{setup-digest-X5PN27F4.js → setup-digest-X735EZSD.js} +5 -5
- package/dist/{setup-llm-S5OHQJXK.js → setup-llm-QBSTQO7N.js} +5 -5
- 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 +5 -5
- package/dist/src/mcp/server.js +4 -4
- package/dist/{stats-TTSDXGJV.js → stats-QBLIEFWL.js} +6 -6
- package/dist/ui/assets/index-CjWGVHhF.css +1 -0
- package/dist/ui/assets/{index-CMSMi4Jb.js → index-Cq-H7wgE.js} +20 -20
- package/dist/ui/index.html +2 -2
- package/dist/{verify-TOWQHPBX.js → verify-X272WGBD.js} +4 -4
- package/dist/{version-36RVCQA6.js → version-XE4GYTBV.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-4XVKZ3WA.js.map +0 -1
- package/dist/chunk-7WHF2OIZ.js.map +0 -1
- package/dist/chunk-J4D4CROB.js.map +0 -1
- package/dist/chunk-QLUE3BUL.js.map +0 -1
- package/dist/main-6AGPIMH2.js.map +0 -1
- package/dist/ui/assets/index-08wKT7wS.css +0 -1
- /package/dist/{chunk-YIQLYIHW.js.map → chunk-4B5RO2YV.js.map} +0 -0
- /package/dist/{chunk-NLUE6CYG.js.map → chunk-54WVLTKD.js.map} +0 -0
- /package/dist/{chunk-NL6WQO56.js.map → chunk-5LMRZDH3.js.map} +0 -0
- /package/dist/{chunk-O6PERU7U.js.map → chunk-AHZN4Z34.js.map} +0 -0
- /package/dist/{chunk-Z74SDEKE.js.map → chunk-F7GAYVWF.js.map} +0 -0
- /package/dist/{chunk-H7PRCVGQ.js.map → chunk-F7PGDD2X.js.map} +0 -0
- /package/dist/{chunk-2ZIBCEYO.js.map → chunk-LEK6DEAE.js.map} +0 -0
- /package/dist/{chunk-FPRXMJLT.js.map → chunk-OEGZ5YTJ.js.map} +0 -0
- /package/dist/{chunk-UP4P4OAA.js.map → chunk-V6BJVYNH.js.map} +0 -0
- /package/dist/{chunk-QN4W3JUA.js.map → chunk-XH34FX4C.js.map} +0 -0
- /package/dist/{chunk-YTFXA4RX.js.map → chunk-YRIIBPJD.js.map} +0 -0
- /package/dist/{cli-IHILSS6N.js.map → cli-OJYHLO4Y.js.map} +0 -0
- /package/dist/{client-AGFNR2S4.js.map → client-SS3C5MF6.js.map} +0 -0
- /package/dist/{curate-3D4GHKJH.js.map → curate-4CKEMOPV.js.map} +0 -0
- /package/dist/{detect-providers-XEP4QA3R.js.map → detect-providers-LFIVJYQO.js.map} +0 -0
- /package/dist/{digest-7HLJXL77.js.map → digest-ZLARHLLY.js.map} +0 -0
- /package/dist/{init-ARQ53JOR.js.map → init-3LVKVQ4L.js.map} +0 -0
- /package/dist/{logs-IENORIYR.js.map → logs-6CWVP574.js.map} +0 -0
- /package/dist/{rebuild-Q2ACEB6F.js.map → rebuild-QWVVCBCZ.js.map} +0 -0
- /package/dist/{reprocess-CDEFGQOV.js.map → reprocess-YG3WLUI2.js.map} +0 -0
- /package/dist/{restart-XCMILOL5.js.map → restart-UIP7US4U.js.map} +0 -0
- /package/dist/{search-7W25SKCB.js.map → search-BQLBW5CS.js.map} +0 -0
- /package/dist/{session-start-K6IGAC7H.js.map → session-start-6SHGT2AW.js.map} +0 -0
- /package/dist/{setup-digest-X5PN27F4.js.map → setup-digest-X735EZSD.js.map} +0 -0
- /package/dist/{setup-llm-S5OHQJXK.js.map → setup-llm-QBSTQO7N.js.map} +0 -0
- /package/dist/{stats-TTSDXGJV.js.map → stats-QBLIEFWL.js.map} +0 -0
- /package/dist/{verify-TOWQHPBX.js.map → verify-X272WGBD.js.map} +0 -0
- /package/dist/{version-36RVCQA6.js.map → version-XE4GYTBV.js.map} +0 -0
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
runRebuild
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TK7A4RX7.js";
|
|
5
5
|
import {
|
|
6
6
|
VectorIndex
|
|
7
7
|
} from "./chunk-4RMSHZE4.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-V6BJVYNH.js";
|
|
9
9
|
import "./chunk-RGVBGTD6.js";
|
|
10
10
|
import {
|
|
11
11
|
createEmbeddingProvider
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-54WVLTKD.js";
|
|
13
13
|
import "./chunk-GENQ5QGP.js";
|
|
14
14
|
import "./chunk-6FQISQNA.js";
|
|
15
15
|
import {
|
|
16
16
|
MycoIndex
|
|
17
17
|
} from "./chunk-TWSTAVLO.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-4DYD4HHG.js";
|
|
19
19
|
import {
|
|
20
20
|
loadConfig
|
|
21
21
|
} from "./chunk-HYVT345Y.js";
|
|
22
22
|
import "./chunk-ERG2IEWX.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-DYDBF5W6.js";
|
|
24
24
|
import "./chunk-PZUWP5VK.js";
|
|
25
25
|
|
|
26
26
|
// src/cli/rebuild.ts
|
|
@@ -61,4 +61,4 @@ Embedded ${result.embeddedCount} notes (vectors)`);
|
|
|
61
61
|
export {
|
|
62
62
|
run
|
|
63
63
|
};
|
|
64
|
-
//# sourceMappingURL=rebuild-
|
|
64
|
+
//# sourceMappingURL=rebuild-QWVVCBCZ.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
runReprocess
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TK7A4RX7.js";
|
|
5
5
|
import {
|
|
6
6
|
VectorIndex
|
|
7
7
|
} from "./chunk-4RMSHZE4.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-V6BJVYNH.js";
|
|
9
9
|
import "./chunk-RGVBGTD6.js";
|
|
10
10
|
import {
|
|
11
11
|
createEmbeddingProvider,
|
|
12
12
|
createLlmProvider
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-54WVLTKD.js";
|
|
14
14
|
import "./chunk-GENQ5QGP.js";
|
|
15
15
|
import {
|
|
16
16
|
initFts
|
|
@@ -18,17 +18,17 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
MycoIndex
|
|
20
20
|
} from "./chunk-TWSTAVLO.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-YRIIBPJD.js";
|
|
22
22
|
import {
|
|
23
23
|
parseStringFlag
|
|
24
24
|
} from "./chunk-SAKJMNSR.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-4DYD4HHG.js";
|
|
26
26
|
import {
|
|
27
27
|
loadConfig
|
|
28
28
|
} from "./chunk-HYVT345Y.js";
|
|
29
29
|
import "./chunk-ERG2IEWX.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-F7GAYVWF.js";
|
|
31
|
+
import "./chunk-DYDBF5W6.js";
|
|
32
32
|
import "./chunk-PZUWP5VK.js";
|
|
33
33
|
|
|
34
34
|
// src/cli/reprocess.ts
|
|
@@ -76,4 +76,4 @@ Done: ${result.sessionsProcessed} sessions reprocessed, ${result.observationsExt
|
|
|
76
76
|
export {
|
|
77
77
|
run
|
|
78
78
|
};
|
|
79
|
-
//# sourceMappingURL=reprocess-
|
|
79
|
+
//# sourceMappingURL=reprocess-YG3WLUI2.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
isProcessAlive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YRIIBPJD.js";
|
|
5
5
|
import "./chunk-SAKJMNSR.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-4DYD4HHG.js";
|
|
7
|
+
import "./chunk-F7GAYVWF.js";
|
|
8
|
+
import "./chunk-DYDBF5W6.js";
|
|
9
9
|
import "./chunk-PZUWP5VK.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/restart.ts
|
|
@@ -29,7 +29,7 @@ async function run(_args, vaultDir) {
|
|
|
29
29
|
} catch {
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
const { DaemonClient } = await import("./client-
|
|
32
|
+
const { DaemonClient } = await import("./client-SS3C5MF6.js");
|
|
33
33
|
const client = new DaemonClient(vaultDir);
|
|
34
34
|
console.log("Waiting for health check...");
|
|
35
35
|
const healthy = await client.ensureRunning();
|
|
@@ -48,4 +48,4 @@ async function run(_args, vaultDir) {
|
|
|
48
48
|
export {
|
|
49
49
|
run
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=restart-
|
|
51
|
+
//# sourceMappingURL=restart-UIP7US4U.js.map
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
} from "./chunk-RGVBGTD6.js";
|
|
8
8
|
import {
|
|
9
9
|
createEmbeddingProvider
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-54WVLTKD.js";
|
|
11
11
|
import {
|
|
12
12
|
searchFts
|
|
13
13
|
} from "./chunk-6FQISQNA.js";
|
|
14
14
|
import {
|
|
15
15
|
MycoIndex
|
|
16
16
|
} from "./chunk-TWSTAVLO.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-4DYD4HHG.js";
|
|
18
18
|
import {
|
|
19
19
|
loadConfig
|
|
20
20
|
} from "./chunk-HYVT345Y.js";
|
|
21
21
|
import "./chunk-ERG2IEWX.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-DYDBF5W6.js";
|
|
23
23
|
import "./chunk-PZUWP5VK.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/search.ts
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
run,
|
|
118
118
|
runVectors
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=search-
|
|
120
|
+
//# sourceMappingURL=search-BQLBW5CS.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
|
queryLogs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-F7PGDD2X.js";
|
|
5
5
|
import {
|
|
6
6
|
consolidateSpores,
|
|
7
7
|
handleMycoContext
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-LEK6DEAE.js";
|
|
9
|
+
import "./chunk-O6TBHGVO.js";
|
|
10
10
|
import {
|
|
11
11
|
VectorIndex
|
|
12
12
|
} from "./chunk-4RMSHZE4.js";
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
VaultWriter,
|
|
17
17
|
checkSupersession,
|
|
18
18
|
indexNote
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-V6BJVYNH.js";
|
|
20
20
|
import {
|
|
21
21
|
generateEmbedding
|
|
22
22
|
} from "./chunk-RGVBGTD6.js";
|
|
23
23
|
import {
|
|
24
24
|
createEmbeddingProvider,
|
|
25
25
|
createLlmProvider
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-54WVLTKD.js";
|
|
27
27
|
import {
|
|
28
28
|
planFm,
|
|
29
29
|
sessionFm,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
MycoIndex
|
|
38
38
|
} from "./chunk-TWSTAVLO.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-4DYD4HHG.js";
|
|
40
40
|
import {
|
|
41
41
|
loadConfig
|
|
42
42
|
} from "./chunk-HYVT345Y.js";
|
|
@@ -66,20 +66,21 @@ import {
|
|
|
66
66
|
} from "./chunk-HIN3UVOG.js";
|
|
67
67
|
import {
|
|
68
68
|
getPluginVersion
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-XH34FX4C.js";
|
|
70
70
|
import {
|
|
71
71
|
resolveVaultDir
|
|
72
72
|
} from "./chunk-N33KUCFP.js";
|
|
73
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-F7GAYVWF.js";
|
|
74
74
|
import {
|
|
75
75
|
CONTENT_SNIPPET_CHARS,
|
|
76
|
+
DAEMON_CLIENT_TIMEOUT_MS,
|
|
76
77
|
EMBEDDING_INPUT_LIMIT,
|
|
77
78
|
MCP_LOGS_DEFAULT_LIMIT,
|
|
78
79
|
MCP_SEARCH_DEFAULT_LIMIT,
|
|
79
80
|
MCP_SESSIONS_DEFAULT_LIMIT,
|
|
80
81
|
RECALL_SUMMARY_PREVIEW_CHARS,
|
|
81
82
|
SESSION_SUMMARY_PREVIEW_CHARS
|
|
82
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-DYDBF5W6.js";
|
|
83
84
|
import {
|
|
84
85
|
__commonJS,
|
|
85
86
|
__toESM
|
|
@@ -14641,16 +14642,44 @@ function createMycoServer(config2) {
|
|
|
14641
14642
|
fs2.appendFileSync(path4.join(logDir, "mcp.jsonl"), entry);
|
|
14642
14643
|
} catch {
|
|
14643
14644
|
}
|
|
14645
|
+
postToDaemon("info", "mcp", `Tool call: ${tool}`, { tool, ...detail });
|
|
14646
|
+
}
|
|
14647
|
+
let cachedDaemonPort = null;
|
|
14648
|
+
function postToDaemon(level, component, message, data) {
|
|
14649
|
+
try {
|
|
14650
|
+
if (cachedDaemonPort === null) {
|
|
14651
|
+
const daemonJsonPath = path4.join(config2.vaultDir, "daemon.json");
|
|
14652
|
+
const raw = fs2.readFileSync(daemonJsonPath, "utf-8");
|
|
14653
|
+
cachedDaemonPort = JSON.parse(raw).port;
|
|
14654
|
+
}
|
|
14655
|
+
fetch(`http://127.0.0.1:${cachedDaemonPort}/api/log`, {
|
|
14656
|
+
method: "POST",
|
|
14657
|
+
headers: { "Content-Type": "application/json" },
|
|
14658
|
+
body: JSON.stringify({ level, component, message, data }),
|
|
14659
|
+
signal: AbortSignal.timeout(DAEMON_CLIENT_TIMEOUT_MS)
|
|
14660
|
+
}).catch(() => {
|
|
14661
|
+
cachedDaemonPort = null;
|
|
14662
|
+
});
|
|
14663
|
+
} catch {
|
|
14664
|
+
cachedDaemonPort = null;
|
|
14665
|
+
}
|
|
14644
14666
|
}
|
|
14645
14667
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
14646
14668
|
const { name, arguments: args = {} } = request.params;
|
|
14647
14669
|
const idx = getIndex();
|
|
14648
14670
|
const input = args;
|
|
14671
|
+
const start = Date.now();
|
|
14649
14672
|
switch (name) {
|
|
14650
|
-
case TOOL_SEARCH:
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
return { content: [{ type: "text", text: JSON.stringify(
|
|
14673
|
+
case TOOL_SEARCH: {
|
|
14674
|
+
const result = await handleMycoSearch(idx, input, config2.vectorIndex, config2.embeddingProvider);
|
|
14675
|
+
logActivity(TOOL_SEARCH, { query: input.query, matches: result.length, duration_ms: Date.now() - start });
|
|
14676
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14677
|
+
}
|
|
14678
|
+
case TOOL_RECALL: {
|
|
14679
|
+
const result = await handleMycoRecall(idx, input);
|
|
14680
|
+
logActivity(TOOL_RECALL, { id: input.id, duration_ms: Date.now() - start });
|
|
14681
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14682
|
+
}
|
|
14654
14683
|
case TOOL_REMEMBER: {
|
|
14655
14684
|
const result = await handleMycoRemember(config2.vaultDir, idx, input);
|
|
14656
14685
|
embedNote(result.id, String(input.content), { type: "spore", observation_type: String(input.type ?? ""), importance: "high" });
|
|
@@ -14664,36 +14693,55 @@ function createMycoServer(config2) {
|
|
|
14664
14693
|
}).catch(() => {
|
|
14665
14694
|
});
|
|
14666
14695
|
}
|
|
14667
|
-
logActivity(TOOL_REMEMBER, { id: result.id, observation_type: input.type, path: result.note_path });
|
|
14696
|
+
logActivity(TOOL_REMEMBER, { id: result.id, observation_type: input.type, path: result.note_path, duration_ms: Date.now() - start });
|
|
14697
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14698
|
+
}
|
|
14699
|
+
case TOOL_PLANS: {
|
|
14700
|
+
const result = await handleMycoPlans(idx, input);
|
|
14701
|
+
logActivity(TOOL_PLANS, { count: Array.isArray(result) ? result.length : 1, duration_ms: Date.now() - start });
|
|
14702
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14703
|
+
}
|
|
14704
|
+
case TOOL_SESSIONS: {
|
|
14705
|
+
const result = await handleMycoSessions(idx, input);
|
|
14706
|
+
logActivity(TOOL_SESSIONS, { count: result.length, duration_ms: Date.now() - start });
|
|
14707
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14708
|
+
}
|
|
14709
|
+
case TOOL_TEAM: {
|
|
14710
|
+
const result = await handleMycoTeam(idx, input, config2.teamUser);
|
|
14711
|
+
logActivity(TOOL_TEAM, { count: result.length, duration_ms: Date.now() - start });
|
|
14712
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14713
|
+
}
|
|
14714
|
+
case TOOL_GRAPH: {
|
|
14715
|
+
const result = await handleMycoGraph(idx, input);
|
|
14716
|
+
logActivity(TOOL_GRAPH, { duration_ms: Date.now() - start });
|
|
14717
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14718
|
+
}
|
|
14719
|
+
case TOOL_ORPHANS: {
|
|
14720
|
+
const result = await handleMycoOrphans(idx);
|
|
14721
|
+
logActivity(TOOL_ORPHANS, { count: result.orphans?.length ?? 0, duration_ms: Date.now() - start });
|
|
14722
|
+
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14723
|
+
}
|
|
14724
|
+
case TOOL_LOGS: {
|
|
14725
|
+
const result = await handleMycoLogs(config2.vaultDir, input);
|
|
14726
|
+
logActivity(TOOL_LOGS, { query_level: input.level, query_component: input.component, duration_ms: Date.now() - start });
|
|
14668
14727
|
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14669
14728
|
}
|
|
14670
|
-
case TOOL_PLANS:
|
|
14671
|
-
return { content: [{ type: "text", text: JSON.stringify(await handleMycoPlans(idx, input)) }] };
|
|
14672
|
-
case TOOL_SESSIONS:
|
|
14673
|
-
return { content: [{ type: "text", text: JSON.stringify(await handleMycoSessions(idx, input)) }] };
|
|
14674
|
-
case TOOL_TEAM:
|
|
14675
|
-
return { content: [{ type: "text", text: JSON.stringify(await handleMycoTeam(idx, input, config2.teamUser)) }] };
|
|
14676
|
-
case TOOL_GRAPH:
|
|
14677
|
-
return { content: [{ type: "text", text: JSON.stringify(await handleMycoGraph(idx, input)) }] };
|
|
14678
|
-
case TOOL_ORPHANS:
|
|
14679
|
-
return { content: [{ type: "text", text: JSON.stringify(await handleMycoOrphans(idx)) }] };
|
|
14680
|
-
case TOOL_LOGS:
|
|
14681
|
-
return { content: [{ type: "text", text: JSON.stringify(await handleMycoLogs(config2.vaultDir, input)) }] };
|
|
14682
14729
|
case TOOL_SUPERSEDE: {
|
|
14683
14730
|
const result = await handleMycoSupersede(config2.vaultDir, idx, input);
|
|
14684
14731
|
if (result.status === "superseded" && config2.vectorIndex) {
|
|
14685
14732
|
config2.vectorIndex.delete(result.old_spore);
|
|
14686
14733
|
}
|
|
14687
|
-
logActivity(TOOL_SUPERSEDE, { old: result.old_spore, new: result.new_spore, status: result.status });
|
|
14734
|
+
logActivity(TOOL_SUPERSEDE, { old: result.old_spore, new: result.new_spore, status: result.status, duration_ms: Date.now() - start });
|
|
14688
14735
|
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14689
14736
|
}
|
|
14690
14737
|
case TOOL_CONSOLIDATE: {
|
|
14691
14738
|
const result = await handleMycoConsolidate(config2.vaultDir, idx, input, config2.vectorIndex ?? null, config2.embeddingProvider ?? null);
|
|
14692
|
-
logActivity(TOOL_CONSOLIDATE, { wisdom_id: result.wisdom_id, sources: input.source_spore_ids, archived: result.sources_archived });
|
|
14739
|
+
logActivity(TOOL_CONSOLIDATE, { wisdom_id: result.wisdom_id, sources: input.source_spore_ids, archived: result.sources_archived, duration_ms: Date.now() - start });
|
|
14693
14740
|
return { content: [{ type: "text", text: JSON.stringify(result) }] };
|
|
14694
14741
|
}
|
|
14695
14742
|
case TOOL_CONTEXT: {
|
|
14696
14743
|
const result = handleMycoContext(config2.vaultDir, args);
|
|
14744
|
+
logActivity(TOOL_CONTEXT, { tier: args.tier, duration_ms: Date.now() - start });
|
|
14697
14745
|
return { content: [{ type: "text", text: result.content }] };
|
|
14698
14746
|
}
|
|
14699
14747
|
default:
|
|
@@ -14742,4 +14790,4 @@ export {
|
|
|
14742
14790
|
createMycoServer,
|
|
14743
14791
|
main
|
|
14744
14792
|
};
|
|
14745
|
-
//# sourceMappingURL=server-
|
|
14793
|
+
//# sourceMappingURL=server-43KSJ65Q.js.map
|