@goondocks/myco 0.3.4 → 0.3.6
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/commands/status.md +1 -1
- package/dist/{chunk-UHMMKLK3.js → chunk-2YQGS5CK.js} +2 -2
- package/dist/{chunk-4RJ3IEPW.js → chunk-5EGHGTN2.js} +28 -6
- package/dist/chunk-5EGHGTN2.js.map +1 -0
- package/dist/{chunk-DBSG4V6Y.js → chunk-5O52JLGT.js} +14 -5
- package/dist/chunk-5O52JLGT.js.map +1 -0
- package/dist/{chunk-C72VNYA4.js → chunk-F6AG6YXJ.js} +2 -2
- package/dist/{chunk-I7PMGO6S.js → chunk-HIN3UVOG.js} +20 -2
- package/dist/chunk-HIN3UVOG.js.map +1 -0
- package/dist/{chunk-R2R243GC.js → chunk-LAL7WK6I.js} +2 -2
- package/dist/{chunk-Y3OYD4CX.js → chunk-ZCGGWNAA.js} +2 -2
- package/dist/chunk-ZCGGWNAA.js.map +1 -0
- package/dist/{cli-YTICB2DH.js → cli-DNYLL2JD.js} +8 -8
- package/dist/{client-YI6RXFJD.js → client-XBD4NCDO.js} +4 -4
- package/dist/{init-TQ7Q4WEI.js → init-57K46O7U.js} +3 -3
- package/dist/{main-3BL45UM3.js → main-FOZYS5B7.js} +5 -5
- package/dist/{reprocess-5XX3EOAV.js → reprocess-5YK7ZOFW.js} +4 -4
- package/dist/{restart-UGE2Y327.js → restart-GZE73CZ7.js} +4 -4
- package/dist/{server-YYCYIH5Z.js → server-KKVTFBSN.js} +32 -27
- package/dist/{server-YYCYIH5Z.js.map → server-KKVTFBSN.js.map} +1 -1
- package/dist/{session-start-4MNXDOYK.js → session-start-5KXWKS3B.js} +4 -4
- package/dist/src/cli.js +3 -3
- package/dist/src/daemon/main.js +3 -3
- package/dist/src/hooks/post-tool-use.js +4 -4
- package/dist/src/hooks/session-end.js +3 -3
- package/dist/src/hooks/session-start.js +3 -3
- package/dist/src/hooks/stop.js +3 -3
- package/dist/src/hooks/user-prompt-submit.js +4 -4
- package/dist/src/mcp/server.js +3 -3
- package/dist/{stats-7T44NZQN.js → stats-R5KAGBQE.js} +3 -3
- package/dist/{version-3MSC7E3V.js → version-DLKARUP4.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-4RJ3IEPW.js.map +0 -1
- package/dist/chunk-DBSG4V6Y.js.map +0 -1
- package/dist/chunk-I7PMGO6S.js.map +0 -1
- package/dist/chunk-Y3OYD4CX.js.map +0 -1
- /package/dist/{chunk-UHMMKLK3.js.map → chunk-2YQGS5CK.js.map} +0 -0
- /package/dist/{chunk-C72VNYA4.js.map → chunk-F6AG6YXJ.js.map} +0 -0
- /package/dist/{chunk-R2R243GC.js.map → chunk-LAL7WK6I.js.map} +0 -0
- /package/dist/{cli-YTICB2DH.js.map → cli-DNYLL2JD.js.map} +0 -0
- /package/dist/{client-YI6RXFJD.js.map → client-XBD4NCDO.js.map} +0 -0
- /package/dist/{init-TQ7Q4WEI.js.map → init-57K46O7U.js.map} +0 -0
- /package/dist/{main-3BL45UM3.js.map → main-FOZYS5B7.js.map} +0 -0
- /package/dist/{reprocess-5XX3EOAV.js.map → reprocess-5YK7ZOFW.js.map} +0 -0
- /package/dist/{restart-UGE2Y327.js.map → restart-GZE73CZ7.js.map} +0 -0
- /package/dist/{session-start-4MNXDOYK.js.map → session-start-5KXWKS3B.js.map} +0 -0
- /package/dist/{stats-7T44NZQN.js.map → stats-R5KAGBQE.js.map} +0 -0
- /package/dist/{version-3MSC7E3V.js.map → version-DLKARUP4.js.map} +0 -0
|
@@ -56,13 +56,16 @@ import {
|
|
|
56
56
|
unknown
|
|
57
57
|
} from "./chunk-ISCT2SI6.js";
|
|
58
58
|
import "./chunk-EF4JVH24.js";
|
|
59
|
+
import {
|
|
60
|
+
resolveSessionFromBuffer
|
|
61
|
+
} from "./chunk-HIN3UVOG.js";
|
|
59
62
|
import {
|
|
60
63
|
getPluginVersion
|
|
61
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-LAL7WK6I.js";
|
|
62
65
|
import {
|
|
63
66
|
resolveVaultDir
|
|
64
67
|
} from "./chunk-N33KUCFP.js";
|
|
65
|
-
import "./chunk-
|
|
68
|
+
import "./chunk-ZCGGWNAA.js";
|
|
66
69
|
import {
|
|
67
70
|
CONTENT_SNIPPET_CHARS,
|
|
68
71
|
EMBEDDING_INPUT_LIMIT,
|
|
@@ -3270,8 +3273,8 @@ var require_utils = __commonJS({
|
|
|
3270
3273
|
}
|
|
3271
3274
|
return ind;
|
|
3272
3275
|
}
|
|
3273
|
-
function removeDotSegments(
|
|
3274
|
-
let input =
|
|
3276
|
+
function removeDotSegments(path6) {
|
|
3277
|
+
let input = path6;
|
|
3275
3278
|
const output = [];
|
|
3276
3279
|
let nextSlash = -1;
|
|
3277
3280
|
let len = 0;
|
|
@@ -3470,8 +3473,8 @@ var require_schemes = __commonJS({
|
|
|
3470
3473
|
wsComponent.secure = void 0;
|
|
3471
3474
|
}
|
|
3472
3475
|
if (wsComponent.resourceName) {
|
|
3473
|
-
const [
|
|
3474
|
-
wsComponent.path =
|
|
3476
|
+
const [path6, query] = wsComponent.resourceName.split("?");
|
|
3477
|
+
wsComponent.path = path6 && path6 !== "/" ? path6 : void 0;
|
|
3475
3478
|
wsComponent.query = query;
|
|
3476
3479
|
wsComponent.resourceName = void 0;
|
|
3477
3480
|
}
|
|
@@ -7205,8 +7208,8 @@ function getErrorMap() {
|
|
|
7205
7208
|
|
|
7206
7209
|
// node_modules/zod/v3/helpers/parseUtil.js
|
|
7207
7210
|
var makeIssue = (params) => {
|
|
7208
|
-
const { data, path:
|
|
7209
|
-
const fullPath = [...
|
|
7211
|
+
const { data, path: path6, errorMaps, issueData } = params;
|
|
7212
|
+
const fullPath = [...path6, ...issueData.path || []];
|
|
7210
7213
|
const fullIssue = {
|
|
7211
7214
|
...issueData,
|
|
7212
7215
|
path: fullPath
|
|
@@ -7321,11 +7324,11 @@ var errorUtil;
|
|
|
7321
7324
|
|
|
7322
7325
|
// node_modules/zod/v3/types.js
|
|
7323
7326
|
var ParseInputLazyPath = class {
|
|
7324
|
-
constructor(parent, value,
|
|
7327
|
+
constructor(parent, value, path6, key) {
|
|
7325
7328
|
this._cachedPath = [];
|
|
7326
7329
|
this.parent = parent;
|
|
7327
7330
|
this.data = value;
|
|
7328
|
-
this._path =
|
|
7331
|
+
this._path = path6;
|
|
7329
7332
|
this._key = key;
|
|
7330
7333
|
}
|
|
7331
7334
|
get path() {
|
|
@@ -14058,7 +14061,7 @@ var StdioServerTransport = class {
|
|
|
14058
14061
|
|
|
14059
14062
|
// src/mcp/server.ts
|
|
14060
14063
|
import fs3 from "fs";
|
|
14061
|
-
import
|
|
14064
|
+
import path5 from "path";
|
|
14062
14065
|
|
|
14063
14066
|
// src/mcp/tools/search.ts
|
|
14064
14067
|
async function handleMycoSearch(index, input, vectorIndex, backend) {
|
|
@@ -14144,19 +14147,21 @@ async function handleMycoRecall(index, input) {
|
|
|
14144
14147
|
|
|
14145
14148
|
// src/mcp/tools/remember.ts
|
|
14146
14149
|
import { randomBytes } from "crypto";
|
|
14150
|
+
import path from "path";
|
|
14147
14151
|
async function handleMycoRemember(vaultDir, index, input) {
|
|
14148
14152
|
const writer = new VaultWriter(vaultDir);
|
|
14149
14153
|
const id = `${input.type}-${randomBytes(4).toString("hex")}`;
|
|
14154
|
+
const session = input.session ?? resolveSessionFromBuffer(path.join(vaultDir, "buffer"));
|
|
14150
14155
|
const notePath = writer.writeMemory({
|
|
14151
14156
|
id,
|
|
14152
14157
|
observation_type: input.type,
|
|
14153
|
-
session
|
|
14158
|
+
session,
|
|
14154
14159
|
plan: input.related_plan ?? void 0,
|
|
14155
14160
|
tags: input.tags,
|
|
14156
14161
|
content: input.content
|
|
14157
14162
|
});
|
|
14158
14163
|
indexNote(index, vaultDir, notePath);
|
|
14159
|
-
return { note_path: notePath, id };
|
|
14164
|
+
return { note_path: notePath, id, session };
|
|
14160
14165
|
}
|
|
14161
14166
|
|
|
14162
14167
|
// src/mcp/tools/plans.ts
|
|
@@ -14378,15 +14383,15 @@ async function handleMycoOrphans(index) {
|
|
|
14378
14383
|
}
|
|
14379
14384
|
|
|
14380
14385
|
// src/mcp/tools/logs.ts
|
|
14381
|
-
import
|
|
14386
|
+
import path2 from "path";
|
|
14382
14387
|
async function handleMycoLogs(vaultDir, input) {
|
|
14383
|
-
const logDir =
|
|
14388
|
+
const logDir = path2.join(vaultDir, "logs");
|
|
14384
14389
|
return queryLogs(logDir, input);
|
|
14385
14390
|
}
|
|
14386
14391
|
|
|
14387
14392
|
// src/mcp/tools/supersede.ts
|
|
14388
14393
|
import fs from "fs";
|
|
14389
|
-
import
|
|
14394
|
+
import path3 from "path";
|
|
14390
14395
|
async function handleMycoSupersede(vaultDir, index, input) {
|
|
14391
14396
|
const writer = new VaultWriter(vaultDir);
|
|
14392
14397
|
const oldNotes = index.queryByIds([input.old_memory_id]);
|
|
@@ -14398,7 +14403,7 @@ async function handleMycoSupersede(vaultDir, index, input) {
|
|
|
14398
14403
|
status: "superseded",
|
|
14399
14404
|
superseded_by: input.new_memory_id
|
|
14400
14405
|
}, true);
|
|
14401
|
-
const fullPath =
|
|
14406
|
+
const fullPath = path3.join(vaultDir, oldNote.path);
|
|
14402
14407
|
const content = fs.readFileSync(fullPath, "utf-8");
|
|
14403
14408
|
if (!content.includes("Superseded by::")) {
|
|
14404
14409
|
const notice = `
|
|
@@ -14418,7 +14423,7 @@ Reason:: ${input.reason}` : "";
|
|
|
14418
14423
|
// src/mcp/tools/consolidate.ts
|
|
14419
14424
|
import { randomBytes as randomBytes2 } from "crypto";
|
|
14420
14425
|
import fs2 from "fs";
|
|
14421
|
-
import
|
|
14426
|
+
import path4 from "path";
|
|
14422
14427
|
async function handleMycoConsolidate(vaultDir, index, input) {
|
|
14423
14428
|
const writer = new VaultWriter(vaultDir);
|
|
14424
14429
|
const wisdomId = `${input.observation_type}-wisdom-${randomBytes2(4).toString("hex")}`;
|
|
@@ -14447,7 +14452,7 @@ ${sourceLinks}`;
|
|
|
14447
14452
|
status: "superseded",
|
|
14448
14453
|
superseded_by: wisdomId
|
|
14449
14454
|
}, true);
|
|
14450
|
-
const fullPath =
|
|
14455
|
+
const fullPath = path4.join(vaultDir, notePath);
|
|
14451
14456
|
const content = fs2.readFileSync(fullPath, "utf-8");
|
|
14452
14457
|
if (!content.includes("Superseded by::")) {
|
|
14453
14458
|
const notice = `
|
|
@@ -14509,14 +14514,14 @@ var TOOL_DEFINITIONS = [
|
|
|
14509
14514
|
},
|
|
14510
14515
|
{
|
|
14511
14516
|
name: TOOL_REMEMBER,
|
|
14512
|
-
description: "Save a decision, gotcha, bug fix, discovery, or trade-off as a permanent memory. Use after making a key decision, fixing a tricky bug, discovering something non-obvious, or encountering a gotcha.
|
|
14517
|
+
description: "Save a decision, gotcha, bug fix, discovery, or trade-off as a permanent memory. Use after making a key decision, fixing a tricky bug, discovering something non-obvious, or encountering a gotcha.",
|
|
14513
14518
|
inputSchema: {
|
|
14514
14519
|
type: "object",
|
|
14515
14520
|
properties: {
|
|
14516
14521
|
content: { type: "string", description: "The observation \u2014 include context, reasoning, and what someone encountering this in the future needs to know" },
|
|
14517
14522
|
type: { type: "string", enum: OBSERVATION_TYPES, description: `Observation type: ${OBSERVATION_TYPES.join(", ")}` },
|
|
14518
14523
|
tags: { type: "array", items: { type: "string" }, description: PROP_TAGS },
|
|
14519
|
-
session: { type: "string", description:
|
|
14524
|
+
session: { type: "string", description: "Your current session ID \u2014 auto-detected if omitted" },
|
|
14520
14525
|
related_plan: { type: "string", description: "Plan ID if this observation relates to an active plan" }
|
|
14521
14526
|
},
|
|
14522
14527
|
required: ["content", "type"]
|
|
@@ -14629,7 +14634,7 @@ function createMycoServer(config2) {
|
|
|
14629
14634
|
{ name: "myco", version: getPluginVersion() },
|
|
14630
14635
|
{ capabilities: { tools: {} } }
|
|
14631
14636
|
);
|
|
14632
|
-
const dbPath =
|
|
14637
|
+
const dbPath = path5.join(config2.vaultDir, "index.db");
|
|
14633
14638
|
let index = null;
|
|
14634
14639
|
function getIndex() {
|
|
14635
14640
|
if (!index) {
|
|
@@ -14647,11 +14652,11 @@ function createMycoServer(config2) {
|
|
|
14647
14652
|
tools: TOOL_DEFINITIONS
|
|
14648
14653
|
}));
|
|
14649
14654
|
function logActivity(tool, detail) {
|
|
14650
|
-
const logDir =
|
|
14655
|
+
const logDir = path5.join(config2.vaultDir, "logs");
|
|
14651
14656
|
try {
|
|
14652
14657
|
fs3.mkdirSync(logDir, { recursive: true });
|
|
14653
14658
|
const entry = JSON.stringify({ timestamp: (/* @__PURE__ */ new Date()).toISOString(), component: "mcp", level: "info", tool, ...detail }) + "\n";
|
|
14654
|
-
fs3.appendFileSync(
|
|
14659
|
+
fs3.appendFileSync(path5.join(logDir, "mcp.jsonl"), entry);
|
|
14655
14660
|
} catch {
|
|
14656
14661
|
}
|
|
14657
14662
|
}
|
|
@@ -14718,14 +14723,14 @@ function createMycoServer(config2) {
|
|
|
14718
14723
|
}
|
|
14719
14724
|
async function main() {
|
|
14720
14725
|
const vaultDir = resolveVaultDir();
|
|
14721
|
-
const config2 = fs3.existsSync(
|
|
14726
|
+
const config2 = fs3.existsSync(path5.join(vaultDir, "myco.yaml")) ? loadConfig(vaultDir) : void 0;
|
|
14722
14727
|
let embeddingProvider;
|
|
14723
14728
|
let vectorIndex;
|
|
14724
14729
|
if (config2) {
|
|
14725
14730
|
try {
|
|
14726
14731
|
embeddingProvider = createEmbeddingProvider(config2.intelligence.embedding);
|
|
14727
14732
|
const testEmbed = await embeddingProvider.embed("test");
|
|
14728
|
-
vectorIndex = new VectorIndex(
|
|
14733
|
+
vectorIndex = new VectorIndex(path5.join(vaultDir, "vectors.db"), testEmbed.dimensions);
|
|
14729
14734
|
} catch {
|
|
14730
14735
|
}
|
|
14731
14736
|
}
|
|
@@ -14741,4 +14746,4 @@ export {
|
|
|
14741
14746
|
createMycoServer,
|
|
14742
14747
|
main
|
|
14743
14748
|
};
|
|
14744
|
-
//# sourceMappingURL=server-
|
|
14749
|
+
//# sourceMappingURL=server-KKVTFBSN.js.map
|