mindcache 3.7.0 → 3.8.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.
- package/README.md +1 -1
- package/dist/{CloudAdapter-PLGvGjoA.d.mts → CloudAdapter-D6hoG13x.d.mts} +6 -2
- package/dist/{CloudAdapter-PLGvGjoA.d.ts → CloudAdapter-D6hoG13x.d.ts} +6 -2
- package/dist/cloud/index.d.mts +2 -2
- package/dist/cloud/index.d.ts +2 -2
- package/dist/cloud/index.js +25 -11
- package/dist/cloud/index.js.map +1 -1
- package/dist/cloud/index.mjs +25 -11
- package/dist/cloud/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +35 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -21
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +25 -11
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +25 -11
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ A TypeScript library for managing short-term memory in AI agents through an LLM-
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
7
7
|
* **[API Reference](./docs/mindcache-api.md)**: Detailed method signatures and type definitions. Optimized for AI agents (like Cursor, Claude, etc.) to understand the library's capabilities.
|
|
8
|
-
* **[Full Documentation](https://mindcache.dev/llms-full.
|
|
8
|
+
* **[Full Documentation](https://mindcache.dev/llms-full.txt)**: Comprehensive guide with examples and deep dives.
|
|
9
9
|
|
|
10
10
|
## Quick Start
|
|
11
11
|
|
|
@@ -193,7 +193,7 @@ declare class MindCache {
|
|
|
193
193
|
rootMap: Y.Map<Y.Map<any>>;
|
|
194
194
|
private listeners;
|
|
195
195
|
private globalListeners;
|
|
196
|
-
readonly version = "3.
|
|
196
|
+
readonly version = "3.8.0";
|
|
197
197
|
normalizeSystemTags(tags: SystemTag[]): SystemTag[];
|
|
198
198
|
private _cloudAdapter;
|
|
199
199
|
private _connectionState;
|
|
@@ -503,8 +503,12 @@ declare class MindCache {
|
|
|
503
503
|
fromJSON(jsonString: string): void;
|
|
504
504
|
/**
|
|
505
505
|
* Export to Markdown format.
|
|
506
|
+
* @param options Optional name and description for the export
|
|
506
507
|
*/
|
|
507
|
-
toMarkdown(
|
|
508
|
+
toMarkdown(options?: {
|
|
509
|
+
name?: string;
|
|
510
|
+
description?: string;
|
|
511
|
+
}): string;
|
|
508
512
|
/**
|
|
509
513
|
* Import from Markdown format.
|
|
510
514
|
* @param markdown The markdown string to import
|
|
@@ -193,7 +193,7 @@ declare class MindCache {
|
|
|
193
193
|
rootMap: Y.Map<Y.Map<any>>;
|
|
194
194
|
private listeners;
|
|
195
195
|
private globalListeners;
|
|
196
|
-
readonly version = "3.
|
|
196
|
+
readonly version = "3.8.0";
|
|
197
197
|
normalizeSystemTags(tags: SystemTag[]): SystemTag[];
|
|
198
198
|
private _cloudAdapter;
|
|
199
199
|
private _connectionState;
|
|
@@ -503,8 +503,12 @@ declare class MindCache {
|
|
|
503
503
|
fromJSON(jsonString: string): void;
|
|
504
504
|
/**
|
|
505
505
|
* Export to Markdown format.
|
|
506
|
+
* @param options Optional name and description for the export
|
|
506
507
|
*/
|
|
507
|
-
toMarkdown(
|
|
508
|
+
toMarkdown(options?: {
|
|
509
|
+
name?: string;
|
|
510
|
+
description?: string;
|
|
511
|
+
}): string;
|
|
508
512
|
/**
|
|
509
513
|
* Import from Markdown format.
|
|
510
514
|
* @param markdown The markdown string to import
|
package/dist/cloud/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MindCache, C as CloudConfig, a as CloudAdapter } from '../CloudAdapter-
|
|
2
|
-
export { d as ClearOperation, c as CloudAdapterEvents, b as ConnectionState, D as DeleteOperation, O as Operation, S as SetOperation } from '../CloudAdapter-
|
|
1
|
+
import { M as MindCache, C as CloudConfig, a as CloudAdapter } from '../CloudAdapter-D6hoG13x.mjs';
|
|
2
|
+
export { d as ClearOperation, c as CloudAdapterEvents, b as ConnectionState, D as DeleteOperation, O as Operation, S as SetOperation } from '../CloudAdapter-D6hoG13x.mjs';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/cloud/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MindCache, C as CloudConfig, a as CloudAdapter } from '../CloudAdapter-
|
|
2
|
-
export { d as ClearOperation, c as CloudAdapterEvents, b as ConnectionState, D as DeleteOperation, O as Operation, S as SetOperation } from '../CloudAdapter-
|
|
1
|
+
import { M as MindCache, C as CloudConfig, a as CloudAdapter } from '../CloudAdapter-D6hoG13x.js';
|
|
2
|
+
export { d as ClearOperation, c as CloudAdapterEvents, b as ConnectionState, D as DeleteOperation, O as Operation, S as SetOperation } from '../CloudAdapter-D6hoG13x.js';
|
|
3
3
|
import 'yjs';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/cloud/index.js
CHANGED
|
@@ -545,18 +545,23 @@ var MarkdownSerializer = class {
|
|
|
545
545
|
/**
|
|
546
546
|
* Export MindCache data to Markdown format.
|
|
547
547
|
*/
|
|
548
|
-
static toMarkdown(mc) {
|
|
548
|
+
static toMarkdown(mc, options) {
|
|
549
549
|
const now = /* @__PURE__ */ new Date();
|
|
550
550
|
const lines = [];
|
|
551
551
|
const appendixEntries = [];
|
|
552
552
|
let appendixCounter = 0;
|
|
553
|
-
|
|
553
|
+
const name = options?.name || "MindCache Export";
|
|
554
|
+
lines.push(`# ${name}`);
|
|
554
555
|
lines.push("");
|
|
556
|
+
if (options?.description) {
|
|
557
|
+
lines.push(options.description);
|
|
558
|
+
lines.push("");
|
|
559
|
+
}
|
|
555
560
|
lines.push(`Export Date: ${now.toISOString().split("T")[0]}`);
|
|
556
561
|
lines.push("");
|
|
557
562
|
lines.push("---");
|
|
558
563
|
lines.push("");
|
|
559
|
-
lines.push("##
|
|
564
|
+
lines.push("## Keys & Values");
|
|
560
565
|
lines.push("");
|
|
561
566
|
const sortedKeys = mc.getSortedKeys();
|
|
562
567
|
sortedKeys.forEach((key) => {
|
|
@@ -564,9 +569,17 @@ var MarkdownSerializer = class {
|
|
|
564
569
|
const value = mc.get_value(key);
|
|
565
570
|
lines.push(`### ${key}`);
|
|
566
571
|
const entryType = attributes?.type || "text";
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
572
|
+
if (entryType !== "text") {
|
|
573
|
+
lines.push(`- **Type**: \`${entryType}\``);
|
|
574
|
+
}
|
|
575
|
+
const systemTags = attributes?.systemTags;
|
|
576
|
+
if (systemTags && systemTags.length > 0) {
|
|
577
|
+
lines.push(`- **System Tags**: \`${systemTags.join(", ")}\``);
|
|
578
|
+
}
|
|
579
|
+
const zIndex = attributes?.zIndex ?? 0;
|
|
580
|
+
if (zIndex !== 0) {
|
|
581
|
+
lines.push(`- **Z-Index**: \`${zIndex}\``);
|
|
582
|
+
}
|
|
570
583
|
if (attributes?.contentTags && attributes.contentTags.length > 0) {
|
|
571
584
|
lines.push(`- **Tags**: \`${attributes.contentTags.join("`, `")}\``);
|
|
572
585
|
}
|
|
@@ -745,7 +758,7 @@ var MarkdownSerializer = class {
|
|
|
745
758
|
mc.set_value(currentKey, currentValue.trim(), currentAttributes);
|
|
746
759
|
}
|
|
747
760
|
const hasParsedKeys = lines.some((line) => line.startsWith("### ") && !line.startsWith("### Appendix"));
|
|
748
|
-
const isSTMExport = markdown.includes("# MindCache STM Export") || markdown.includes("## STM Entries");
|
|
761
|
+
const isSTMExport = markdown.includes("# MindCache STM Export") || markdown.includes("## STM Entries") || markdown.includes("## Keys & Values") || markdown.includes("# MindCache Export");
|
|
749
762
|
if (!hasParsedKeys && !isSTMExport && markdown.trim().length > 0) {
|
|
750
763
|
mc.set_value("imported_content", markdown.trim(), {
|
|
751
764
|
type: "text",
|
|
@@ -873,7 +886,7 @@ var MarkdownSerializer = class {
|
|
|
873
886
|
}
|
|
874
887
|
saveEntry();
|
|
875
888
|
const hasParsedKeys = lines.some((line) => line.startsWith("### ") && !line.startsWith("### Appendix"));
|
|
876
|
-
const isSTMExport = markdown.includes("# MindCache STM Export") || markdown.includes("## STM Entries");
|
|
889
|
+
const isSTMExport = markdown.includes("# MindCache STM Export") || markdown.includes("## STM Entries") || markdown.includes("## Keys & Values") || markdown.includes("# MindCache Export");
|
|
877
890
|
if (!hasParsedKeys && !isSTMExport && markdown.trim().length > 0) {
|
|
878
891
|
result["imported_content"] = {
|
|
879
892
|
value: markdown.trim(),
|
|
@@ -1604,7 +1617,7 @@ var MindCache = class {
|
|
|
1604
1617
|
listeners = {};
|
|
1605
1618
|
globalListeners = [];
|
|
1606
1619
|
// Metadata
|
|
1607
|
-
version = "3.
|
|
1620
|
+
version = "3.8.0";
|
|
1608
1621
|
// Internal flag to prevent sync loops when receiving remote updates
|
|
1609
1622
|
// (Less critical with Yjs but kept for API compat)
|
|
1610
1623
|
normalizeSystemTags(tags) {
|
|
@@ -2699,9 +2712,10 @@ var MindCache = class {
|
|
|
2699
2712
|
}
|
|
2700
2713
|
/**
|
|
2701
2714
|
* Export to Markdown format.
|
|
2715
|
+
* @param options Optional name and description for the export
|
|
2702
2716
|
*/
|
|
2703
|
-
toMarkdown() {
|
|
2704
|
-
return MarkdownSerializer.toMarkdown(this);
|
|
2717
|
+
toMarkdown(options) {
|
|
2718
|
+
return MarkdownSerializer.toMarkdown(this, options);
|
|
2705
2719
|
}
|
|
2706
2720
|
/**
|
|
2707
2721
|
* Import from Markdown format.
|