dotmem 0.0.9 → 0.1.0
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/AGENTS.md +1 -1
- package/DOTMEM.md +538 -539
- package/MEMORY.md +4 -4
- package/PACKAGE.md +1 -1
- package/README.md +250 -199
- package/agent.cjs +13 -0
- package/agent.js +13 -0
- package/bin/cli.cjs +5 -0
- package/bin/cli.js +5 -0
- package/bin/mcp.cjs +5 -0
- package/bin/mcp.js +5 -0
- package/cli.cjs +27 -6
- package/cli.js +27 -6
- package/global.cjs +30 -5
- package/global.js +30 -5
- package/index.cjs +30 -5
- package/index.js +30 -5
- package/llms.txt +2 -2
- package/mcp.cjs +31 -6
- package/mcp.js +31 -6
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -39,6 +39,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
39
39
|
};
|
|
40
40
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
41
|
|
|
42
|
+
// suppress-idb-warning.ts
|
|
43
|
+
var orig;
|
|
44
|
+
var init_suppress_idb_warning = __esm({
|
|
45
|
+
"suppress-idb-warning.ts"() {
|
|
46
|
+
orig = console.warn.bind(console);
|
|
47
|
+
console.warn = (...args) => {
|
|
48
|
+
if (typeof args[0] === "string" && args[0].includes("IndexedDB is not available")) return;
|
|
49
|
+
orig(...args);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
42
54
|
// core/env.ts
|
|
43
55
|
var DEV;
|
|
44
56
|
var init_env = __esm({
|
|
@@ -73,6 +85,7 @@ function configure(opts) {
|
|
|
73
85
|
var g, STORE_PREFIX, INDEX_KEY, journal, journal_default;
|
|
74
86
|
var init_journal = __esm({
|
|
75
87
|
"core/memory/journal.ts"() {
|
|
88
|
+
init_suppress_idb_warning();
|
|
76
89
|
init_env();
|
|
77
90
|
g = globalThis;
|
|
78
91
|
__name(namespace, "namespace");
|
|
@@ -5272,7 +5285,7 @@ function encodeMemFile(stateValue, preserved) {
|
|
|
5272
5285
|
function decodeMemDocument(value) {
|
|
5273
5286
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid .mem file format");
|
|
5274
5287
|
const file = value;
|
|
5275
|
-
if (file.format !== MEM_FORMAT) throw new Error("Invalid .mem file format");
|
|
5288
|
+
if (file.format !== MEM_FORMAT && file.format !== MEM_FORMAT_LEGACY) throw new Error("Invalid .mem file format");
|
|
5276
5289
|
if (file.version === MEM_FORMAT_VERSION_V1) {
|
|
5277
5290
|
if (!file.knowledge) throw new Error("Invalid .mem file format");
|
|
5278
5291
|
return { state: validateSourceState(file.knowledge) };
|
|
@@ -5354,11 +5367,12 @@ function decodeMemDocument(value) {
|
|
|
5354
5367
|
preserved: { map: structuredClone(map), data: structuredClone(stateRecord) }
|
|
5355
5368
|
};
|
|
5356
5369
|
}
|
|
5357
|
-
var MEM_FORMAT, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
5370
|
+
var MEM_FORMAT, MEM_FORMAT_LEGACY, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
5358
5371
|
var init_mem_codec = __esm({
|
|
5359
5372
|
"core/knowledge/mem-codec.ts"() {
|
|
5360
5373
|
init_state();
|
|
5361
5374
|
MEM_FORMAT = "dotmem.knowledge";
|
|
5375
|
+
MEM_FORMAT_LEGACY = "memorio.knowledge";
|
|
5362
5376
|
MEM_FORMAT_VERSION = 2;
|
|
5363
5377
|
MEM_FORMAT_VERSION_V1 = 1;
|
|
5364
5378
|
expectedFields = {
|
|
@@ -5507,12 +5521,13 @@ async function inspectMem(input) {
|
|
|
5507
5521
|
return { status: artifactError.code, representation: "unknown", message: artifactError.message, parts: [] };
|
|
5508
5522
|
}
|
|
5509
5523
|
}
|
|
5510
|
-
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, signaturePayload, base64UrlDecode, keyIdentity, signaturePath, encodePackage, isZip, decodePackage, verifySignature;
|
|
5524
|
+
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_FORMAT_LEGACY, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, signaturePayload, base64UrlDecode, keyIdentity, signaturePath, encodePackage, isZip, decodePackage, verifySignature;
|
|
5511
5525
|
var init_mem_package = __esm({
|
|
5512
5526
|
"core/knowledge/mem-package.ts"() {
|
|
5513
5527
|
init_browser();
|
|
5514
5528
|
init_mem_codec();
|
|
5515
5529
|
MEM_PACKAGE_FORMAT = "dotmem.package";
|
|
5530
|
+
MEM_PACKAGE_FORMAT_LEGACY = "memorio.package";
|
|
5516
5531
|
MEM_PACKAGE_VERSION = 1;
|
|
5517
5532
|
MEM_PACKAGE_LIMITS = Object.freeze({
|
|
5518
5533
|
maximumPackageBytes: 10 * 1024 * 1024,
|
|
@@ -5697,10 +5712,10 @@ ${contentId}
|
|
|
5697
5712
|
if (!parts[path3]) throw new MemArtifactError("invalid", `Missing MEM package part: ${path3}`);
|
|
5698
5713
|
}
|
|
5699
5714
|
const manifest = parseJson(parts[MANIFEST_PATH], MANIFEST_PATH);
|
|
5700
|
-
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
5715
|
+
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format !== MEM_PACKAGE_FORMAT_LEGACY || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
5701
5716
|
throw new MemArtifactError("unsupported", "Unsupported MEM package format or version");
|
|
5702
5717
|
}
|
|
5703
|
-
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
5718
|
+
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format !== MEM_FORMAT_LEGACY || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
5704
5719
|
throw new MemArtifactError("invalid", "Invalid MEM package manifest");
|
|
5705
5720
|
}
|
|
5706
5721
|
const integrity = parseJson(parts[INTEGRITY_PATH], INTEGRITY_PATH);
|
|
@@ -9073,6 +9088,7 @@ function _inferConfidence(claim) {
|
|
|
9073
9088
|
var LOGIC_MEM_FILE, nodeCwd2, cachedRuntime, LogicEngine, logic, logic_default;
|
|
9074
9089
|
var init_logic = __esm({
|
|
9075
9090
|
"core/logic/index.ts"() {
|
|
9091
|
+
init_suppress_idb_warning();
|
|
9076
9092
|
init_knowledge();
|
|
9077
9093
|
init_mem_repository();
|
|
9078
9094
|
init_acquisition_boundary();
|
|
@@ -9466,6 +9482,7 @@ async function resetKnowledgeRuntimeCaches() {
|
|
|
9466
9482
|
var EmptyLogicRepository, KNOWLEDGE_STATE_KEY, knowledgeSaveQueue, StoreKnowledgeRepository, RuntimeSlot, projectSlot, userSlot, installDotMemReadme;
|
|
9467
9483
|
var init_knowledge_runtime = __esm({
|
|
9468
9484
|
"core/memory/knowledge-runtime.ts"() {
|
|
9485
|
+
init_suppress_idb_warning();
|
|
9469
9486
|
init_knowledge();
|
|
9470
9487
|
init_project_identity();
|
|
9471
9488
|
init_user_paths();
|
|
@@ -9998,6 +10015,7 @@ async function getEntry(key) {
|
|
|
9998
10015
|
var MEMORY_INDEX_KEY, SUPERSEDED_PREFIX, entries;
|
|
9999
10016
|
var init_entries = __esm({
|
|
10000
10017
|
"core/memory/entries.ts"() {
|
|
10018
|
+
init_suppress_idb_warning();
|
|
10001
10019
|
init_env();
|
|
10002
10020
|
init_journal();
|
|
10003
10021
|
MEMORY_INDEX_KEY = "__dotmem_memory_index__";
|
|
@@ -10350,6 +10368,7 @@ async function findClaimAcrossAllSources(claimId, scope, sourceProject) {
|
|
|
10350
10368
|
var acquire;
|
|
10351
10369
|
var init_acquire = __esm({
|
|
10352
10370
|
"core/memory/acquire.ts"() {
|
|
10371
|
+
init_suppress_idb_warning();
|
|
10353
10372
|
init_env();
|
|
10354
10373
|
init_project_identity();
|
|
10355
10374
|
init_project_anchor();
|
|
@@ -11948,6 +11967,7 @@ async function bootstrapProject() {
|
|
|
11948
11967
|
var pendingDetectionEvents, detectionFlushScheduled, flushDetectionEvents; exports.memory = void 0;
|
|
11949
11968
|
var init_memory = __esm({
|
|
11950
11969
|
"core/memory/index.ts"() {
|
|
11970
|
+
init_suppress_idb_warning();
|
|
11951
11971
|
init_journal();
|
|
11952
11972
|
init_brain();
|
|
11953
11973
|
init_knowledge_runtime();
|
|
@@ -12854,6 +12874,7 @@ var init_policy3 = __esm({
|
|
|
12854
12874
|
});
|
|
12855
12875
|
|
|
12856
12876
|
// core/cli/index.ts
|
|
12877
|
+
init_suppress_idb_warning();
|
|
12857
12878
|
init_memory();
|
|
12858
12879
|
|
|
12859
12880
|
// core/continuity/freshness.ts
|
|
@@ -14234,7 +14255,7 @@ Run \`npx dotmem <command> --help\` for command-specific options.
|
|
|
14234
14255
|
Memory:
|
|
14235
14256
|
context "<situation>" [--explain] [--json] [--full] [--claims-only] [--limit <N>] [--format brief]
|
|
14236
14257
|
project acquired experience for a situation
|
|
14237
|
-
init initialize dotmem for the current project (.
|
|
14258
|
+
init initialize dotmem for the current project (.dotmem/)
|
|
14238
14259
|
acquire acquire durable experience from a JSON claim on stdin
|
|
14239
14260
|
learn "<text>" [--scope <user|project>] [--situation "<text>"] [--id "<id>"]
|
|
14240
14261
|
acquire a claim from plain text (shorthand for acquire)
|
package/cli.js
CHANGED
|
@@ -30,6 +30,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
30
30
|
};
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
+
// suppress-idb-warning.ts
|
|
34
|
+
var orig;
|
|
35
|
+
var init_suppress_idb_warning = __esm({
|
|
36
|
+
"suppress-idb-warning.ts"() {
|
|
37
|
+
orig = console.warn.bind(console);
|
|
38
|
+
console.warn = (...args) => {
|
|
39
|
+
if (typeof args[0] === "string" && args[0].includes("IndexedDB is not available")) return;
|
|
40
|
+
orig(...args);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
33
45
|
// core/env.ts
|
|
34
46
|
var DEV;
|
|
35
47
|
var init_env = __esm({
|
|
@@ -64,6 +76,7 @@ function configure(opts) {
|
|
|
64
76
|
var g, STORE_PREFIX, INDEX_KEY, journal, journal_default;
|
|
65
77
|
var init_journal = __esm({
|
|
66
78
|
"core/memory/journal.ts"() {
|
|
79
|
+
init_suppress_idb_warning();
|
|
67
80
|
init_env();
|
|
68
81
|
g = globalThis;
|
|
69
82
|
__name(namespace, "namespace");
|
|
@@ -5263,7 +5276,7 @@ function encodeMemFile(stateValue, preserved) {
|
|
|
5263
5276
|
function decodeMemDocument(value) {
|
|
5264
5277
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid .mem file format");
|
|
5265
5278
|
const file = value;
|
|
5266
|
-
if (file.format !== MEM_FORMAT) throw new Error("Invalid .mem file format");
|
|
5279
|
+
if (file.format !== MEM_FORMAT && file.format !== MEM_FORMAT_LEGACY) throw new Error("Invalid .mem file format");
|
|
5267
5280
|
if (file.version === MEM_FORMAT_VERSION_V1) {
|
|
5268
5281
|
if (!file.knowledge) throw new Error("Invalid .mem file format");
|
|
5269
5282
|
return { state: validateSourceState(file.knowledge) };
|
|
@@ -5345,11 +5358,12 @@ function decodeMemDocument(value) {
|
|
|
5345
5358
|
preserved: { map: structuredClone(map), data: structuredClone(stateRecord) }
|
|
5346
5359
|
};
|
|
5347
5360
|
}
|
|
5348
|
-
var MEM_FORMAT, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
5361
|
+
var MEM_FORMAT, MEM_FORMAT_LEGACY, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
5349
5362
|
var init_mem_codec = __esm({
|
|
5350
5363
|
"core/knowledge/mem-codec.ts"() {
|
|
5351
5364
|
init_state();
|
|
5352
5365
|
MEM_FORMAT = "dotmem.knowledge";
|
|
5366
|
+
MEM_FORMAT_LEGACY = "memorio.knowledge";
|
|
5353
5367
|
MEM_FORMAT_VERSION = 2;
|
|
5354
5368
|
MEM_FORMAT_VERSION_V1 = 1;
|
|
5355
5369
|
expectedFields = {
|
|
@@ -5498,12 +5512,13 @@ async function inspectMem(input) {
|
|
|
5498
5512
|
return { status: artifactError.code, representation: "unknown", message: artifactError.message, parts: [] };
|
|
5499
5513
|
}
|
|
5500
5514
|
}
|
|
5501
|
-
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, signaturePayload, base64UrlDecode, keyIdentity, signaturePath, encodePackage, isZip, decodePackage, verifySignature;
|
|
5515
|
+
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_FORMAT_LEGACY, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, signaturePayload, base64UrlDecode, keyIdentity, signaturePath, encodePackage, isZip, decodePackage, verifySignature;
|
|
5502
5516
|
var init_mem_package = __esm({
|
|
5503
5517
|
"core/knowledge/mem-package.ts"() {
|
|
5504
5518
|
init_browser();
|
|
5505
5519
|
init_mem_codec();
|
|
5506
5520
|
MEM_PACKAGE_FORMAT = "dotmem.package";
|
|
5521
|
+
MEM_PACKAGE_FORMAT_LEGACY = "memorio.package";
|
|
5507
5522
|
MEM_PACKAGE_VERSION = 1;
|
|
5508
5523
|
MEM_PACKAGE_LIMITS = Object.freeze({
|
|
5509
5524
|
maximumPackageBytes: 10 * 1024 * 1024,
|
|
@@ -5688,10 +5703,10 @@ ${contentId}
|
|
|
5688
5703
|
if (!parts[path3]) throw new MemArtifactError("invalid", `Missing MEM package part: ${path3}`);
|
|
5689
5704
|
}
|
|
5690
5705
|
const manifest = parseJson(parts[MANIFEST_PATH], MANIFEST_PATH);
|
|
5691
|
-
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
5706
|
+
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format !== MEM_PACKAGE_FORMAT_LEGACY || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
5692
5707
|
throw new MemArtifactError("unsupported", "Unsupported MEM package format or version");
|
|
5693
5708
|
}
|
|
5694
|
-
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
5709
|
+
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format !== MEM_FORMAT_LEGACY || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
5695
5710
|
throw new MemArtifactError("invalid", "Invalid MEM package manifest");
|
|
5696
5711
|
}
|
|
5697
5712
|
const integrity = parseJson(parts[INTEGRITY_PATH], INTEGRITY_PATH);
|
|
@@ -9064,6 +9079,7 @@ function _inferConfidence(claim) {
|
|
|
9064
9079
|
var LOGIC_MEM_FILE, nodeCwd2, cachedRuntime, LogicEngine, logic, logic_default;
|
|
9065
9080
|
var init_logic = __esm({
|
|
9066
9081
|
"core/logic/index.ts"() {
|
|
9082
|
+
init_suppress_idb_warning();
|
|
9067
9083
|
init_knowledge();
|
|
9068
9084
|
init_mem_repository();
|
|
9069
9085
|
init_acquisition_boundary();
|
|
@@ -9457,6 +9473,7 @@ async function resetKnowledgeRuntimeCaches() {
|
|
|
9457
9473
|
var EmptyLogicRepository, KNOWLEDGE_STATE_KEY, knowledgeSaveQueue, StoreKnowledgeRepository, RuntimeSlot, projectSlot, userSlot, installDotMemReadme;
|
|
9458
9474
|
var init_knowledge_runtime = __esm({
|
|
9459
9475
|
"core/memory/knowledge-runtime.ts"() {
|
|
9476
|
+
init_suppress_idb_warning();
|
|
9460
9477
|
init_knowledge();
|
|
9461
9478
|
init_project_identity();
|
|
9462
9479
|
init_user_paths();
|
|
@@ -9989,6 +10006,7 @@ async function getEntry(key) {
|
|
|
9989
10006
|
var MEMORY_INDEX_KEY, SUPERSEDED_PREFIX, entries;
|
|
9990
10007
|
var init_entries = __esm({
|
|
9991
10008
|
"core/memory/entries.ts"() {
|
|
10009
|
+
init_suppress_idb_warning();
|
|
9992
10010
|
init_env();
|
|
9993
10011
|
init_journal();
|
|
9994
10012
|
MEMORY_INDEX_KEY = "__dotmem_memory_index__";
|
|
@@ -10341,6 +10359,7 @@ async function findClaimAcrossAllSources(claimId, scope, sourceProject) {
|
|
|
10341
10359
|
var acquire;
|
|
10342
10360
|
var init_acquire = __esm({
|
|
10343
10361
|
"core/memory/acquire.ts"() {
|
|
10362
|
+
init_suppress_idb_warning();
|
|
10344
10363
|
init_env();
|
|
10345
10364
|
init_project_identity();
|
|
10346
10365
|
init_project_anchor();
|
|
@@ -11939,6 +11958,7 @@ async function bootstrapProject() {
|
|
|
11939
11958
|
var pendingDetectionEvents, detectionFlushScheduled, flushDetectionEvents, memory;
|
|
11940
11959
|
var init_memory = __esm({
|
|
11941
11960
|
"core/memory/index.ts"() {
|
|
11961
|
+
init_suppress_idb_warning();
|
|
11942
11962
|
init_journal();
|
|
11943
11963
|
init_brain();
|
|
11944
11964
|
init_knowledge_runtime();
|
|
@@ -12845,6 +12865,7 @@ var init_policy3 = __esm({
|
|
|
12845
12865
|
});
|
|
12846
12866
|
|
|
12847
12867
|
// core/cli/index.ts
|
|
12868
|
+
init_suppress_idb_warning();
|
|
12848
12869
|
init_memory();
|
|
12849
12870
|
|
|
12850
12871
|
// core/continuity/freshness.ts
|
|
@@ -14225,7 +14246,7 @@ Run \`npx dotmem <command> --help\` for command-specific options.
|
|
|
14225
14246
|
Memory:
|
|
14226
14247
|
context "<situation>" [--explain] [--json] [--full] [--claims-only] [--limit <N>] [--format brief]
|
|
14227
14248
|
project acquired experience for a situation
|
|
14228
|
-
init initialize dotmem for the current project (.
|
|
14249
|
+
init initialize dotmem for the current project (.dotmem/)
|
|
14229
14250
|
acquire acquire durable experience from a JSON claim on stdin
|
|
14230
14251
|
learn "<text>" [--scope <user|project>] [--situation "<text>"] [--id "<id>"]
|
|
14231
14252
|
acquire a claim from plain text (shorthand for acquire)
|
package/global.cjs
CHANGED
|
@@ -21,6 +21,18 @@ var __export = (target, all) => {
|
|
|
21
21
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
// suppress-idb-warning.ts
|
|
25
|
+
var orig;
|
|
26
|
+
var init_suppress_idb_warning = __esm({
|
|
27
|
+
"suppress-idb-warning.ts"() {
|
|
28
|
+
orig = console.warn.bind(console);
|
|
29
|
+
console.warn = (...args) => {
|
|
30
|
+
if (typeof args[0] === "string" && args[0].includes("IndexedDB is not available")) return;
|
|
31
|
+
orig(...args);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
24
36
|
// core/env.ts
|
|
25
37
|
var DEV;
|
|
26
38
|
var init_env = __esm({
|
|
@@ -4464,7 +4476,7 @@ function encodeMemFile(stateValue, preserved) {
|
|
|
4464
4476
|
function decodeMemDocument(value) {
|
|
4465
4477
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid .mem file format");
|
|
4466
4478
|
const file = value;
|
|
4467
|
-
if (file.format !== MEM_FORMAT) throw new Error("Invalid .mem file format");
|
|
4479
|
+
if (file.format !== MEM_FORMAT && file.format !== MEM_FORMAT_LEGACY) throw new Error("Invalid .mem file format");
|
|
4468
4480
|
if (file.version === MEM_FORMAT_VERSION_V1) {
|
|
4469
4481
|
if (!file.knowledge) throw new Error("Invalid .mem file format");
|
|
4470
4482
|
return { state: validateSourceState(file.knowledge) };
|
|
@@ -4546,11 +4558,12 @@ function decodeMemDocument(value) {
|
|
|
4546
4558
|
preserved: { map: structuredClone(map), data: structuredClone(stateRecord) }
|
|
4547
4559
|
};
|
|
4548
4560
|
}
|
|
4549
|
-
var MEM_FORMAT, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
4561
|
+
var MEM_FORMAT, MEM_FORMAT_LEGACY, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
4550
4562
|
var init_mem_codec = __esm({
|
|
4551
4563
|
"core/knowledge/mem-codec.ts"() {
|
|
4552
4564
|
init_state();
|
|
4553
4565
|
MEM_FORMAT = "dotmem.knowledge";
|
|
4566
|
+
MEM_FORMAT_LEGACY = "memorio.knowledge";
|
|
4554
4567
|
MEM_FORMAT_VERSION = 2;
|
|
4555
4568
|
MEM_FORMAT_VERSION_V1 = 1;
|
|
4556
4569
|
expectedFields = {
|
|
@@ -4656,12 +4669,13 @@ async function decodeMemArtifact(input) {
|
|
|
4656
4669
|
throw new MemArtifactError(message.startsWith("Unsupported") ? "unsupported" : "invalid", message);
|
|
4657
4670
|
}
|
|
4658
4671
|
}
|
|
4659
|
-
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, encodePackage, isZip, decodePackage;
|
|
4672
|
+
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_FORMAT_LEGACY, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, encodePackage, isZip, decodePackage;
|
|
4660
4673
|
var init_mem_package = __esm({
|
|
4661
4674
|
"core/knowledge/mem-package.ts"() {
|
|
4662
4675
|
init_browser();
|
|
4663
4676
|
init_mem_codec();
|
|
4664
4677
|
MEM_PACKAGE_FORMAT = "dotmem.package";
|
|
4678
|
+
MEM_PACKAGE_FORMAT_LEGACY = "memorio.package";
|
|
4665
4679
|
MEM_PACKAGE_VERSION = 1;
|
|
4666
4680
|
MEM_PACKAGE_LIMITS = Object.freeze({
|
|
4667
4681
|
maximumPackageBytes: 10 * 1024 * 1024,
|
|
@@ -4835,10 +4849,10 @@ var init_mem_package = __esm({
|
|
|
4835
4849
|
if (!parts[path]) throw new MemArtifactError("invalid", `Missing MEM package part: ${path}`);
|
|
4836
4850
|
}
|
|
4837
4851
|
const manifest = parseJson(parts[MANIFEST_PATH], MANIFEST_PATH);
|
|
4838
|
-
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
4852
|
+
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format !== MEM_PACKAGE_FORMAT_LEGACY || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
4839
4853
|
throw new MemArtifactError("unsupported", "Unsupported MEM package format or version");
|
|
4840
4854
|
}
|
|
4841
|
-
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
4855
|
+
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format !== MEM_FORMAT_LEGACY || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
4842
4856
|
throw new MemArtifactError("invalid", "Invalid MEM package manifest");
|
|
4843
4857
|
}
|
|
4844
4858
|
const integrity = parseJson(parts[INTEGRITY_PATH], INTEGRITY_PATH);
|
|
@@ -6706,6 +6720,7 @@ function _inferConfidence(claim) {
|
|
|
6706
6720
|
var LOGIC_MEM_FILE, nodeCwd2, cachedRuntime, LogicEngine, logic, logic_default;
|
|
6707
6721
|
var init_logic = __esm({
|
|
6708
6722
|
"core/logic/index.ts"() {
|
|
6723
|
+
init_suppress_idb_warning();
|
|
6709
6724
|
init_knowledge();
|
|
6710
6725
|
init_mem_repository();
|
|
6711
6726
|
init_acquisition_boundary();
|
|
@@ -6973,6 +6988,9 @@ Do not store secrets unless dotmem explicitly supports secure secret storage.
|
|
|
6973
6988
|
}
|
|
6974
6989
|
});
|
|
6975
6990
|
|
|
6991
|
+
// global.ts
|
|
6992
|
+
init_suppress_idb_warning();
|
|
6993
|
+
|
|
6976
6994
|
// core/idb.ts
|
|
6977
6995
|
var idb = {
|
|
6978
6996
|
db: {},
|
|
@@ -7242,7 +7260,11 @@ var security = {
|
|
|
7242
7260
|
createSanitizer
|
|
7243
7261
|
};
|
|
7244
7262
|
|
|
7263
|
+
// core/memory/index.ts
|
|
7264
|
+
init_suppress_idb_warning();
|
|
7265
|
+
|
|
7245
7266
|
// core/memory/journal.ts
|
|
7267
|
+
init_suppress_idb_warning();
|
|
7246
7268
|
init_env();
|
|
7247
7269
|
var g = globalThis;
|
|
7248
7270
|
function namespace() {
|
|
@@ -7449,6 +7471,7 @@ var journal_default = journal;
|
|
|
7449
7471
|
init_brain();
|
|
7450
7472
|
|
|
7451
7473
|
// core/memory/knowledge-runtime.ts
|
|
7474
|
+
init_suppress_idb_warning();
|
|
7452
7475
|
init_knowledge();
|
|
7453
7476
|
init_project_identity();
|
|
7454
7477
|
init_user_paths();
|
|
@@ -7797,6 +7820,7 @@ var policy = {
|
|
|
7797
7820
|
};
|
|
7798
7821
|
|
|
7799
7822
|
// core/memory/entries.ts
|
|
7823
|
+
init_suppress_idb_warning();
|
|
7800
7824
|
init_env();
|
|
7801
7825
|
var MEMORY_INDEX_KEY = "__dotmem_memory_index__";
|
|
7802
7826
|
var SUPERSEDED_PREFIX = "__dotmem_superseded__";
|
|
@@ -8341,6 +8365,7 @@ var context = {
|
|
|
8341
8365
|
};
|
|
8342
8366
|
|
|
8343
8367
|
// core/memory/acquire.ts
|
|
8368
|
+
init_suppress_idb_warning();
|
|
8344
8369
|
init_env();
|
|
8345
8370
|
init_project_identity();
|
|
8346
8371
|
init_project_anchor();
|
package/global.js
CHANGED
|
@@ -17,6 +17,18 @@ var __export = (target, all) => {
|
|
|
17
17
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
// suppress-idb-warning.ts
|
|
21
|
+
var orig;
|
|
22
|
+
var init_suppress_idb_warning = __esm({
|
|
23
|
+
"suppress-idb-warning.ts"() {
|
|
24
|
+
orig = console.warn.bind(console);
|
|
25
|
+
console.warn = (...args) => {
|
|
26
|
+
if (typeof args[0] === "string" && args[0].includes("IndexedDB is not available")) return;
|
|
27
|
+
orig(...args);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
20
32
|
// core/env.ts
|
|
21
33
|
var DEV;
|
|
22
34
|
var init_env = __esm({
|
|
@@ -4460,7 +4472,7 @@ function encodeMemFile(stateValue, preserved) {
|
|
|
4460
4472
|
function decodeMemDocument(value) {
|
|
4461
4473
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid .mem file format");
|
|
4462
4474
|
const file = value;
|
|
4463
|
-
if (file.format !== MEM_FORMAT) throw new Error("Invalid .mem file format");
|
|
4475
|
+
if (file.format !== MEM_FORMAT && file.format !== MEM_FORMAT_LEGACY) throw new Error("Invalid .mem file format");
|
|
4464
4476
|
if (file.version === MEM_FORMAT_VERSION_V1) {
|
|
4465
4477
|
if (!file.knowledge) throw new Error("Invalid .mem file format");
|
|
4466
4478
|
return { state: validateSourceState(file.knowledge) };
|
|
@@ -4542,11 +4554,12 @@ function decodeMemDocument(value) {
|
|
|
4542
4554
|
preserved: { map: structuredClone(map), data: structuredClone(stateRecord) }
|
|
4543
4555
|
};
|
|
4544
4556
|
}
|
|
4545
|
-
var MEM_FORMAT, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
4557
|
+
var MEM_FORMAT, MEM_FORMAT_LEGACY, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
4546
4558
|
var init_mem_codec = __esm({
|
|
4547
4559
|
"core/knowledge/mem-codec.ts"() {
|
|
4548
4560
|
init_state();
|
|
4549
4561
|
MEM_FORMAT = "dotmem.knowledge";
|
|
4562
|
+
MEM_FORMAT_LEGACY = "memorio.knowledge";
|
|
4550
4563
|
MEM_FORMAT_VERSION = 2;
|
|
4551
4564
|
MEM_FORMAT_VERSION_V1 = 1;
|
|
4552
4565
|
expectedFields = {
|
|
@@ -4652,12 +4665,13 @@ async function decodeMemArtifact(input) {
|
|
|
4652
4665
|
throw new MemArtifactError(message.startsWith("Unsupported") ? "unsupported" : "invalid", message);
|
|
4653
4666
|
}
|
|
4654
4667
|
}
|
|
4655
|
-
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, encodePackage, isZip, decodePackage;
|
|
4668
|
+
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_FORMAT_LEGACY, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, encodePackage, isZip, decodePackage;
|
|
4656
4669
|
var init_mem_package = __esm({
|
|
4657
4670
|
"core/knowledge/mem-package.ts"() {
|
|
4658
4671
|
init_browser();
|
|
4659
4672
|
init_mem_codec();
|
|
4660
4673
|
MEM_PACKAGE_FORMAT = "dotmem.package";
|
|
4674
|
+
MEM_PACKAGE_FORMAT_LEGACY = "memorio.package";
|
|
4661
4675
|
MEM_PACKAGE_VERSION = 1;
|
|
4662
4676
|
MEM_PACKAGE_LIMITS = Object.freeze({
|
|
4663
4677
|
maximumPackageBytes: 10 * 1024 * 1024,
|
|
@@ -4831,10 +4845,10 @@ var init_mem_package = __esm({
|
|
|
4831
4845
|
if (!parts[path]) throw new MemArtifactError("invalid", `Missing MEM package part: ${path}`);
|
|
4832
4846
|
}
|
|
4833
4847
|
const manifest = parseJson(parts[MANIFEST_PATH], MANIFEST_PATH);
|
|
4834
|
-
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
4848
|
+
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format !== MEM_PACKAGE_FORMAT_LEGACY || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
4835
4849
|
throw new MemArtifactError("unsupported", "Unsupported MEM package format or version");
|
|
4836
4850
|
}
|
|
4837
|
-
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
4851
|
+
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format !== MEM_FORMAT_LEGACY || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
4838
4852
|
throw new MemArtifactError("invalid", "Invalid MEM package manifest");
|
|
4839
4853
|
}
|
|
4840
4854
|
const integrity = parseJson(parts[INTEGRITY_PATH], INTEGRITY_PATH);
|
|
@@ -6702,6 +6716,7 @@ function _inferConfidence(claim) {
|
|
|
6702
6716
|
var LOGIC_MEM_FILE, nodeCwd2, cachedRuntime, LogicEngine, logic, logic_default;
|
|
6703
6717
|
var init_logic = __esm({
|
|
6704
6718
|
"core/logic/index.ts"() {
|
|
6719
|
+
init_suppress_idb_warning();
|
|
6705
6720
|
init_knowledge();
|
|
6706
6721
|
init_mem_repository();
|
|
6707
6722
|
init_acquisition_boundary();
|
|
@@ -6969,6 +6984,9 @@ Do not store secrets unless dotmem explicitly supports secure secret storage.
|
|
|
6969
6984
|
}
|
|
6970
6985
|
});
|
|
6971
6986
|
|
|
6987
|
+
// global.ts
|
|
6988
|
+
init_suppress_idb_warning();
|
|
6989
|
+
|
|
6972
6990
|
// core/idb.ts
|
|
6973
6991
|
var idb = {
|
|
6974
6992
|
db: {},
|
|
@@ -7238,7 +7256,11 @@ var security = {
|
|
|
7238
7256
|
createSanitizer
|
|
7239
7257
|
};
|
|
7240
7258
|
|
|
7259
|
+
// core/memory/index.ts
|
|
7260
|
+
init_suppress_idb_warning();
|
|
7261
|
+
|
|
7241
7262
|
// core/memory/journal.ts
|
|
7263
|
+
init_suppress_idb_warning();
|
|
7242
7264
|
init_env();
|
|
7243
7265
|
var g = globalThis;
|
|
7244
7266
|
function namespace() {
|
|
@@ -7445,6 +7467,7 @@ var journal_default = journal;
|
|
|
7445
7467
|
init_brain();
|
|
7446
7468
|
|
|
7447
7469
|
// core/memory/knowledge-runtime.ts
|
|
7470
|
+
init_suppress_idb_warning();
|
|
7448
7471
|
init_knowledge();
|
|
7449
7472
|
init_project_identity();
|
|
7450
7473
|
init_user_paths();
|
|
@@ -7793,6 +7816,7 @@ var policy = {
|
|
|
7793
7816
|
};
|
|
7794
7817
|
|
|
7795
7818
|
// core/memory/entries.ts
|
|
7819
|
+
init_suppress_idb_warning();
|
|
7796
7820
|
init_env();
|
|
7797
7821
|
var MEMORY_INDEX_KEY = "__dotmem_memory_index__";
|
|
7798
7822
|
var SUPERSEDED_PREFIX = "__dotmem_superseded__";
|
|
@@ -8337,6 +8361,7 @@ var context = {
|
|
|
8337
8361
|
};
|
|
8338
8362
|
|
|
8339
8363
|
// core/memory/acquire.ts
|
|
8364
|
+
init_suppress_idb_warning();
|
|
8340
8365
|
init_env();
|
|
8341
8366
|
init_project_identity();
|
|
8342
8367
|
init_project_anchor();
|
package/index.cjs
CHANGED
|
@@ -22,6 +22,18 @@ var __export = (target, all) => {
|
|
|
22
22
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
// suppress-idb-warning.ts
|
|
26
|
+
var orig;
|
|
27
|
+
var init_suppress_idb_warning = __esm({
|
|
28
|
+
"suppress-idb-warning.ts"() {
|
|
29
|
+
orig = console.warn.bind(console);
|
|
30
|
+
console.warn = (...args) => {
|
|
31
|
+
if (typeof args[0] === "string" && args[0].includes("IndexedDB is not available")) return;
|
|
32
|
+
orig(...args);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
25
37
|
// core/env.ts
|
|
26
38
|
var DEV;
|
|
27
39
|
var init_env = __esm({
|
|
@@ -4473,7 +4485,7 @@ function encodeMemFile(stateValue, preserved) {
|
|
|
4473
4485
|
function decodeMemDocument(value) {
|
|
4474
4486
|
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid .mem file format");
|
|
4475
4487
|
const file = value;
|
|
4476
|
-
if (file.format !== MEM_FORMAT) throw new Error("Invalid .mem file format");
|
|
4488
|
+
if (file.format !== MEM_FORMAT && file.format !== MEM_FORMAT_LEGACY) throw new Error("Invalid .mem file format");
|
|
4477
4489
|
if (file.version === MEM_FORMAT_VERSION_V1) {
|
|
4478
4490
|
if (!file.knowledge) throw new Error("Invalid .mem file format");
|
|
4479
4491
|
return { state: validateSourceState(file.knowledge) };
|
|
@@ -4555,11 +4567,12 @@ function decodeMemDocument(value) {
|
|
|
4555
4567
|
preserved: { map: structuredClone(map), data: structuredClone(stateRecord) }
|
|
4556
4568
|
};
|
|
4557
4569
|
}
|
|
4558
|
-
var MEM_FORMAT, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
4570
|
+
var MEM_FORMAT, MEM_FORMAT_LEGACY, MEM_FORMAT_VERSION, MEM_FORMAT_VERSION_V1, expectedFields, epistemicTypes, revisionKinds, claimKinds, isJsonValue2, createMemInterpretationMap, validateSourceState, trimRecord, fieldIndexes, validateVocabulary, put, get, optionalGet, requireRecord, putOptional;
|
|
4559
4571
|
var init_mem_codec = __esm({
|
|
4560
4572
|
"core/knowledge/mem-codec.ts"() {
|
|
4561
4573
|
init_state();
|
|
4562
4574
|
MEM_FORMAT = "dotmem.knowledge";
|
|
4575
|
+
MEM_FORMAT_LEGACY = "memorio.knowledge";
|
|
4563
4576
|
MEM_FORMAT_VERSION = 2;
|
|
4564
4577
|
MEM_FORMAT_VERSION_V1 = 1;
|
|
4565
4578
|
expectedFields = {
|
|
@@ -4738,12 +4751,13 @@ async function inspectMem(input) {
|
|
|
4738
4751
|
return { status: artifactError.code, representation: "unknown", message: artifactError.message, parts: [] };
|
|
4739
4752
|
}
|
|
4740
4753
|
}
|
|
4741
|
-
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, signaturePayload, base64UrlEncode, base64UrlDecode, keyIdentity, signaturePath, encodePackage, isZip, decodePackage, verifySignature;
|
|
4754
|
+
var MEM_PACKAGE_FORMAT, MEM_PACKAGE_FORMAT_LEGACY, MEM_PACKAGE_VERSION, MEM_PACKAGE_LIMITS, MEM_PACKAGE_WRITE_MARGIN_BYTES, MEM_PACKAGE_WRITE_LIMITS, MANIFEST_PATH, MAP_PATH, DATA_PATH, INTEGRITY_PATH, requiredParts, encoder2, decoder, MemArtifactError, stableValue, jsonBytes, sha256, parseJson, validEntryPath, concatenate, readZipParts, createManifest, digestTableIdentity, signaturePayload, base64UrlEncode, base64UrlDecode, keyIdentity, signaturePath, encodePackage, isZip, decodePackage, verifySignature;
|
|
4742
4755
|
var init_mem_package = __esm({
|
|
4743
4756
|
"core/knowledge/mem-package.ts"() {
|
|
4744
4757
|
init_browser();
|
|
4745
4758
|
init_mem_codec();
|
|
4746
4759
|
MEM_PACKAGE_FORMAT = "dotmem.package";
|
|
4760
|
+
MEM_PACKAGE_FORMAT_LEGACY = "memorio.package";
|
|
4747
4761
|
MEM_PACKAGE_VERSION = 1;
|
|
4748
4762
|
MEM_PACKAGE_LIMITS = Object.freeze({
|
|
4749
4763
|
maximumPackageBytes: 10 * 1024 * 1024,
|
|
@@ -4934,10 +4948,10 @@ ${contentId}
|
|
|
4934
4948
|
if (!parts[path]) throw new MemArtifactError("invalid", `Missing MEM package part: ${path}`);
|
|
4935
4949
|
}
|
|
4936
4950
|
const manifest = parseJson(parts[MANIFEST_PATH], MANIFEST_PATH);
|
|
4937
|
-
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
4951
|
+
if (manifest.format !== MEM_PACKAGE_FORMAT && manifest.format !== MEM_PACKAGE_FORMAT_LEGACY || manifest.version !== MEM_PACKAGE_VERSION) {
|
|
4938
4952
|
throw new MemArtifactError("unsupported", "Unsupported MEM package format or version");
|
|
4939
4953
|
}
|
|
4940
|
-
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
4954
|
+
if (manifest.memory?.format !== MEM_FORMAT && manifest.memory?.format !== MEM_FORMAT_LEGACY || manifest.memory.version !== MEM_FORMAT_VERSION || manifest.parts?.map !== MAP_PATH || manifest.parts?.data !== DATA_PATH || manifest.parts?.integrity !== INTEGRITY_PATH) {
|
|
4941
4955
|
throw new MemArtifactError("invalid", "Invalid MEM package manifest");
|
|
4942
4956
|
}
|
|
4943
4957
|
const integrity = parseJson(parts[INTEGRITY_PATH], INTEGRITY_PATH);
|
|
@@ -6961,6 +6975,7 @@ function _inferConfidence(claim) {
|
|
|
6961
6975
|
var LOGIC_MEM_FILE, nodeCwd2, cachedRuntime, LogicEngine, logic, logic_default;
|
|
6962
6976
|
var init_logic = __esm({
|
|
6963
6977
|
"core/logic/index.ts"() {
|
|
6978
|
+
init_suppress_idb_warning();
|
|
6964
6979
|
init_knowledge();
|
|
6965
6980
|
init_mem_repository();
|
|
6966
6981
|
init_acquisition_boundary();
|
|
@@ -7228,6 +7243,9 @@ Do not store secrets unless dotmem explicitly supports secure secret storage.
|
|
|
7228
7243
|
}
|
|
7229
7244
|
});
|
|
7230
7245
|
|
|
7246
|
+
// index.ts
|
|
7247
|
+
init_suppress_idb_warning();
|
|
7248
|
+
|
|
7231
7249
|
// core/idb.ts
|
|
7232
7250
|
var idb = {
|
|
7233
7251
|
db: {},
|
|
@@ -7567,7 +7585,11 @@ var security = {
|
|
|
7567
7585
|
createSanitizer
|
|
7568
7586
|
};
|
|
7569
7587
|
|
|
7588
|
+
// core/memory/index.ts
|
|
7589
|
+
init_suppress_idb_warning();
|
|
7590
|
+
|
|
7570
7591
|
// core/memory/journal.ts
|
|
7592
|
+
init_suppress_idb_warning();
|
|
7571
7593
|
init_env();
|
|
7572
7594
|
var g = globalThis;
|
|
7573
7595
|
function namespace() {
|
|
@@ -7774,6 +7796,7 @@ var journal_default = journal;
|
|
|
7774
7796
|
init_brain();
|
|
7775
7797
|
|
|
7776
7798
|
// core/memory/knowledge-runtime.ts
|
|
7799
|
+
init_suppress_idb_warning();
|
|
7777
7800
|
init_knowledge();
|
|
7778
7801
|
init_project_identity();
|
|
7779
7802
|
init_user_paths();
|
|
@@ -8122,6 +8145,7 @@ var policy = {
|
|
|
8122
8145
|
};
|
|
8123
8146
|
|
|
8124
8147
|
// core/memory/entries.ts
|
|
8148
|
+
init_suppress_idb_warning();
|
|
8125
8149
|
init_env();
|
|
8126
8150
|
var MEMORY_INDEX_KEY = "__dotmem_memory_index__";
|
|
8127
8151
|
var SUPERSEDED_PREFIX = "__dotmem_superseded__";
|
|
@@ -8666,6 +8690,7 @@ var context = {
|
|
|
8666
8690
|
};
|
|
8667
8691
|
|
|
8668
8692
|
// core/memory/acquire.ts
|
|
8693
|
+
init_suppress_idb_warning();
|
|
8669
8694
|
init_env();
|
|
8670
8695
|
init_project_identity();
|
|
8671
8696
|
init_project_anchor();
|