@remnic/core 1.1.28 → 1.1.30
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/dist/access-cli.js +17 -17
- package/dist/access-http.d.ts +1 -1
- package/dist/access-http.js +8 -8
- package/dist/access-mcp.d.ts +1 -1
- package/dist/access-mcp.js +7 -7
- package/dist/access-schema.d.ts +55 -5
- package/dist/access-schema.js +4 -2
- package/dist/{access-service-CEyV8XJ5.d.ts → access-service-B5hgZPCN.d.ts} +4 -1
- package/dist/access-service.d.ts +1 -1
- package/dist/access-service.js +5 -5
- package/dist/active-recall.js +1 -1
- package/dist/briefing.js +2 -2
- package/dist/causal-consolidation.js +3 -3
- package/dist/{chunk-25YQM6XW.js → chunk-2IWUMAES.js} +3 -3
- package/dist/{chunk-JUYT2J3K.js → chunk-3OWUCDKH.js} +39 -7
- package/dist/chunk-3OWUCDKH.js.map +1 -0
- package/dist/{chunk-BJ3KMYTB.js → chunk-3TNBOMQT.js} +21 -10
- package/dist/chunk-3TNBOMQT.js.map +1 -0
- package/dist/{chunk-QYHQ2JHL.js → chunk-43PJZYGL.js} +2 -2
- package/dist/{chunk-YITUHONZ.js → chunk-4KGVTPGD.js} +2 -2
- package/dist/{chunk-W7DK3CYM.js → chunk-575RMLWN.js} +2 -2
- package/dist/{chunk-TR4DK5OH.js → chunk-76FLAAUC.js} +2 -2
- package/dist/{chunk-S27EXIHY.js → chunk-77H5NU3M.js} +3 -3
- package/dist/{chunk-IANK6Y5W.js → chunk-A6KTB5R6.js} +2 -2
- package/dist/{chunk-7D6O46PF.js → chunk-BVF3AGJP.js} +2 -2
- package/dist/{chunk-NTUNYIF7.js → chunk-I5GLV3VE.js} +2 -2
- package/dist/{chunk-4H6DURG6.js → chunk-JA3AK3PT.js} +2 -2
- package/dist/{chunk-2DM72JF3.js → chunk-KRBK4BQH.js} +14 -14
- package/dist/{chunk-AMVN77EU.js → chunk-MG7NA5H3.js} +365 -90
- package/dist/chunk-MG7NA5H3.js.map +1 -0
- package/dist/{chunk-RCZRL5BE.js → chunk-MRILGULB.js} +2 -2
- package/dist/{chunk-2QR3XXIC.js → chunk-MZH6EHNR.js} +3 -3
- package/dist/{chunk-2QR3XXIC.js.map → chunk-MZH6EHNR.js.map} +1 -1
- package/dist/{chunk-NW7JW5GA.js → chunk-OC7KHOOX.js} +41 -6
- package/dist/chunk-OC7KHOOX.js.map +1 -0
- package/dist/{chunk-LCTP7YRU.js → chunk-QKZGQIPJ.js} +16 -7
- package/dist/chunk-QKZGQIPJ.js.map +1 -0
- package/dist/{chunk-MVAOT247.js → chunk-QLLBRHAT.js} +11 -11
- package/dist/{chunk-2WIPXV3Y.js → chunk-RR2PKP3I.js} +2 -2
- package/dist/{chunk-3F24QTRI.js → chunk-SAZS2QZB.js} +2 -2
- package/dist/{chunk-VYU7PXUS.js → chunk-SIC6U3GZ.js} +2 -2
- package/dist/{chunk-6CB4E7ZV.js → chunk-UL2NNBUL.js} +4 -4
- package/dist/{chunk-F33CJ5CH.js → chunk-VBJ7V5SK.js} +40 -8
- package/dist/chunk-VBJ7V5SK.js.map +1 -0
- package/dist/{chunk-TFORLO3O.js → chunk-W6AQJ2PY.js} +5 -5
- package/dist/{chunk-PUXCIHRL.js → chunk-XSZEP4SF.js} +2 -2
- package/dist/{chunk-4CRG46BG.js → chunk-ZK7I7JYV.js} +2 -2
- package/dist/{cli-BguVmIwO.d.ts → cli-CJKI2JIe.d.ts} +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +22 -22
- package/dist/compounding/engine.js +2 -2
- package/dist/config.js +1 -1
- package/dist/connectors/codex-materialize-runner.js +2 -2
- package/dist/connectors/index.js +2 -2
- package/dist/entity-retrieval.js +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +37 -27
- package/dist/index.js.map +1 -1
- package/dist/maintenance/memory-governance.js +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +1 -1
- package/dist/namespaces/migrate.js +6 -6
- package/dist/namespaces/search.js +3 -3
- package/dist/namespaces/storage.js +2 -2
- package/dist/offline-sync.d.ts +49 -1
- package/dist/offline-sync.js +13 -1
- package/dist/operator-toolkit.js +9 -9
- package/dist/orchestrator.js +12 -12
- package/dist/qmd.d.ts +3 -1
- package/dist/qmd.js +1 -1
- package/dist/resume-bundles.js +2 -2
- package/dist/schemas.d.ts +22 -22
- package/dist/search/factory.js +2 -2
- package/dist/search/index.js +2 -2
- package/dist/semantic-consolidation.js +3 -3
- package/dist/semantic-rule-promotion.js +2 -2
- package/dist/semantic-rule-verifier.js +2 -2
- package/dist/storage.d.ts +5 -0
- package/dist/storage.js +1 -1
- package/dist/transfer/types.d.ts +12 -12
- package/dist/verified-recall.js +2 -2
- package/package.json +1 -1
- package/src/access-http.test.ts +184 -0
- package/src/access-http.ts +37 -0
- package/src/access-schema.ts +58 -3
- package/src/access-service-namespace.test.ts +56 -1
- package/src/access-service-offline-file-content.test.ts +17 -0
- package/src/access-service.ts +16 -1
- package/src/config.ts +2 -2
- package/src/index.ts +6 -0
- package/src/offline-sync.test.ts +1055 -1
- package/src/offline-sync.ts +453 -96
- package/src/qmd.test.ts +65 -10
- package/src/qmd.ts +22 -9
- package/src/storage.ts +36 -2
- package/dist/chunk-AMVN77EU.js.map +0 -1
- package/dist/chunk-BJ3KMYTB.js.map +0 -1
- package/dist/chunk-F33CJ5CH.js.map +0 -1
- package/dist/chunk-JUYT2J3K.js.map +0 -1
- package/dist/chunk-LCTP7YRU.js.map +0 -1
- package/dist/chunk-NW7JW5GA.js.map +0 -1
- /package/dist/{chunk-25YQM6XW.js.map → chunk-2IWUMAES.js.map} +0 -0
- /package/dist/{chunk-QYHQ2JHL.js.map → chunk-43PJZYGL.js.map} +0 -0
- /package/dist/{chunk-YITUHONZ.js.map → chunk-4KGVTPGD.js.map} +0 -0
- /package/dist/{chunk-W7DK3CYM.js.map → chunk-575RMLWN.js.map} +0 -0
- /package/dist/{chunk-TR4DK5OH.js.map → chunk-76FLAAUC.js.map} +0 -0
- /package/dist/{chunk-S27EXIHY.js.map → chunk-77H5NU3M.js.map} +0 -0
- /package/dist/{chunk-IANK6Y5W.js.map → chunk-A6KTB5R6.js.map} +0 -0
- /package/dist/{chunk-7D6O46PF.js.map → chunk-BVF3AGJP.js.map} +0 -0
- /package/dist/{chunk-NTUNYIF7.js.map → chunk-I5GLV3VE.js.map} +0 -0
- /package/dist/{chunk-4H6DURG6.js.map → chunk-JA3AK3PT.js.map} +0 -0
- /package/dist/{chunk-2DM72JF3.js.map → chunk-KRBK4BQH.js.map} +0 -0
- /package/dist/{chunk-RCZRL5BE.js.map → chunk-MRILGULB.js.map} +0 -0
- /package/dist/{chunk-MVAOT247.js.map → chunk-QLLBRHAT.js.map} +0 -0
- /package/dist/{chunk-2WIPXV3Y.js.map → chunk-RR2PKP3I.js.map} +0 -0
- /package/dist/{chunk-3F24QTRI.js.map → chunk-SAZS2QZB.js.map} +0 -0
- /package/dist/{chunk-VYU7PXUS.js.map → chunk-SIC6U3GZ.js.map} +0 -0
- /package/dist/{chunk-6CB4E7ZV.js.map → chunk-UL2NNBUL.js.map} +0 -0
- /package/dist/{chunk-TFORLO3O.js.map → chunk-W6AQJ2PY.js.map} +0 -0
- /package/dist/{chunk-PUXCIHRL.js.map → chunk-XSZEP4SF.js.map} +0 -0
- /package/dist/{chunk-4CRG46BG.js.map → chunk-ZK7I7JYV.js.map} +0 -0
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
CompoundingEngine,
|
|
24
24
|
defaultTierMigrationCycleBudget
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-A6KTB5R6.js";
|
|
26
26
|
import {
|
|
27
27
|
SharedContextManager
|
|
28
28
|
} from "./chunk-U4SCL7B7.js";
|
|
@@ -168,7 +168,7 @@ import {
|
|
|
168
168
|
buildEntityRecallSection,
|
|
169
169
|
entityRecentTranscriptLookbackHours,
|
|
170
170
|
readRecentEntityTranscriptEntries
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-43PJZYGL.js";
|
|
172
172
|
import {
|
|
173
173
|
buildEventOrderRecallSection,
|
|
174
174
|
shouldRecallEventOrderEvidence
|
|
@@ -203,7 +203,7 @@ import {
|
|
|
203
203
|
materializeAfterSemanticConsolidation,
|
|
204
204
|
parseConsolidationResponse,
|
|
205
205
|
parseOperatorAwareConsolidationResponse
|
|
206
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-XSZEP4SF.js";
|
|
207
207
|
import {
|
|
208
208
|
normalizeReplaySessionKey
|
|
209
209
|
} from "./chunk-2PRQG7PV.js";
|
|
@@ -212,13 +212,13 @@ import {
|
|
|
212
212
|
} from "./chunk-LUDTDZLK.js";
|
|
213
213
|
import {
|
|
214
214
|
searchVerifiedEpisodes
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-JA3AK3PT.js";
|
|
216
216
|
import {
|
|
217
217
|
ThreadingManager
|
|
218
218
|
} from "./chunk-W4RVMTHR.js";
|
|
219
219
|
import {
|
|
220
220
|
searchVerifiedSemanticRules
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-SAZS2QZB.js";
|
|
222
222
|
import {
|
|
223
223
|
searchWorkProductLedgerEntries
|
|
224
224
|
} from "./chunk-CULXMQJH.js";
|
|
@@ -230,14 +230,14 @@ import {
|
|
|
230
230
|
} from "./chunk-EABGC2TL.js";
|
|
231
231
|
import {
|
|
232
232
|
NamespaceStorageRouter
|
|
233
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-RR2PKP3I.js";
|
|
234
234
|
import {
|
|
235
235
|
NamespaceSearchRouter
|
|
236
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-575RMLWN.js";
|
|
237
237
|
import {
|
|
238
238
|
createConversationIndexRuntime,
|
|
239
239
|
createSearchBackend
|
|
240
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-I5GLV3VE.js";
|
|
241
241
|
import {
|
|
242
242
|
NoopSearchBackend
|
|
243
243
|
} from "./chunk-NJ3MJQZX.js";
|
|
@@ -246,7 +246,7 @@ import {
|
|
|
246
246
|
} from "./chunk-LLQ2LLWF.js";
|
|
247
247
|
import {
|
|
248
248
|
parseQmdExplain
|
|
249
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-3TNBOMQT.js";
|
|
250
250
|
import {
|
|
251
251
|
isAboveImportanceThreshold,
|
|
252
252
|
scoreImportance
|
|
@@ -340,7 +340,7 @@ import {
|
|
|
340
340
|
normalizeAttributePairs,
|
|
341
341
|
normalizeEntityName,
|
|
342
342
|
parseEntityFile
|
|
343
|
-
} from "./chunk-
|
|
343
|
+
} from "./chunk-VBJ7V5SK.js";
|
|
344
344
|
import {
|
|
345
345
|
attachCitation,
|
|
346
346
|
hasCitationForTemplate,
|
|
@@ -12433,4 +12433,4 @@ export {
|
|
|
12433
12433
|
resolvePersistedMemoryRelativePath,
|
|
12434
12434
|
Orchestrator
|
|
12435
12435
|
};
|
|
12436
|
-
//# sourceMappingURL=chunk-
|
|
12436
|
+
//# sourceMappingURL=chunk-QLLBRHAT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-U3PN77QT.js";
|
|
4
4
|
import {
|
|
5
5
|
StorageManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VBJ7V5SK.js";
|
|
7
7
|
|
|
8
8
|
// src/namespaces/storage.ts
|
|
9
9
|
import path from "path";
|
|
@@ -60,4 +60,4 @@ var NamespaceStorageRouter = class {
|
|
|
60
60
|
export {
|
|
61
61
|
NamespaceStorageRouter
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-RR2PKP3I.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorageManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VBJ7V5SK.js";
|
|
4
4
|
import {
|
|
5
5
|
getCachedRuleMemories,
|
|
6
6
|
setCachedRuleMemories
|
|
@@ -115,4 +115,4 @@ async function searchVerifiedSemanticRules(options) {
|
|
|
115
115
|
export {
|
|
116
116
|
searchVerifiedSemanticRules
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
118
|
+
//# sourceMappingURL=chunk-SAZS2QZB.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorageManager,
|
|
3
3
|
normalizeEntityName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VBJ7V5SK.js";
|
|
5
5
|
import {
|
|
6
6
|
readEnvVar,
|
|
7
7
|
resolveHomeDir
|
|
@@ -824,4 +824,4 @@ export {
|
|
|
824
824
|
resolveBriefingSaveDir,
|
|
825
825
|
briefingFilename
|
|
826
826
|
};
|
|
827
|
-
//# sourceMappingURL=chunk-
|
|
827
|
+
//# sourceMappingURL=chunk-SIC6U3GZ.js.map
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
} from "./chunk-IQT3XTKW.js";
|
|
12
12
|
import {
|
|
13
13
|
EngramAccessInputError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QKZGQIPJ.js";
|
|
15
15
|
import {
|
|
16
16
|
validateBriefingFormat
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SIC6U3GZ.js";
|
|
18
18
|
import {
|
|
19
19
|
expandTildePath
|
|
20
20
|
} from "./chunk-QRNI5JBH.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-XIG5PDM7.js";
|
|
24
24
|
import {
|
|
25
25
|
validateRequest
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OC7KHOOX.js";
|
|
27
27
|
|
|
28
28
|
// src/access-mcp.ts
|
|
29
29
|
import { readFile } from "fs/promises";
|
|
@@ -2797,4 +2797,4 @@ ${body}`;
|
|
|
2797
2797
|
export {
|
|
2798
2798
|
EngramMcpServer
|
|
2799
2799
|
};
|
|
2800
|
-
//# sourceMappingURL=chunk-
|
|
2800
|
+
//# sourceMappingURL=chunk-UL2NNBUL.js.map
|
|
@@ -62,6 +62,7 @@ import {
|
|
|
62
62
|
log
|
|
63
63
|
} from "./chunk-2ODBA7MQ.js";
|
|
64
64
|
import {
|
|
65
|
+
MAGIC_HEADER_SIZE,
|
|
65
66
|
SecureStoreLockedError,
|
|
66
67
|
isEncryptedFile,
|
|
67
68
|
readMaybeEncryptedFile,
|
|
@@ -74,8 +75,8 @@ import {
|
|
|
74
75
|
} from "./chunk-P7FMDTKL.js";
|
|
75
76
|
|
|
76
77
|
// src/storage.ts
|
|
77
|
-
import { access, readdir, readFile, stat, writeFile, mkdir, unlink, appendFile } from "fs/promises";
|
|
78
|
-
import { appendFileSync, mkdirSync, statSync } from "fs";
|
|
78
|
+
import { access, readdir, readFile, stat, writeFile, mkdir, unlink, appendFile, open } from "fs/promises";
|
|
79
|
+
import { appendFileSync, createReadStream, mkdirSync, statSync } from "fs";
|
|
79
80
|
import { createHash } from "crypto";
|
|
80
81
|
import path from "path";
|
|
81
82
|
var ARTIFACT_SEARCH_STOPWORDS = /* @__PURE__ */ new Set([
|
|
@@ -154,15 +155,15 @@ function citationTemplateLiteralParts(template) {
|
|
|
154
155
|
const parts = [];
|
|
155
156
|
let cursor = 0;
|
|
156
157
|
while (cursor < template.length) {
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
158
|
+
const open2 = template.indexOf("{", cursor);
|
|
159
|
+
if (open2 === -1) {
|
|
159
160
|
parts.push(template.slice(cursor));
|
|
160
161
|
break;
|
|
161
162
|
}
|
|
162
|
-
parts.push(template.slice(cursor,
|
|
163
|
-
const close = template.indexOf("}",
|
|
163
|
+
parts.push(template.slice(cursor, open2));
|
|
164
|
+
const close = template.indexOf("}", open2 + 1);
|
|
164
165
|
if (close === -1) {
|
|
165
|
-
cursor =
|
|
166
|
+
cursor = open2 + 1;
|
|
166
167
|
} else {
|
|
167
168
|
cursor = close + 1;
|
|
168
169
|
}
|
|
@@ -1930,6 +1931,37 @@ var StorageManager = class _StorageManager {
|
|
|
1930
1931
|
const target = this.assertManagedStoragePath(filePath, "storage.readOfflineSyncFile");
|
|
1931
1932
|
return readMaybeEncryptedFileBuffer(target, this._secureStoreKey, this.baseDir);
|
|
1932
1933
|
}
|
|
1934
|
+
async digestOfflineSyncFile(filePath) {
|
|
1935
|
+
const target = this.assertManagedStoragePath(filePath, "storage.digestOfflineSyncFile");
|
|
1936
|
+
if (await this.offlineSyncFileIsEncrypted(target)) {
|
|
1937
|
+
const content = await readMaybeEncryptedFileBuffer(target, this._secureStoreKey, this.baseDir);
|
|
1938
|
+
return {
|
|
1939
|
+
sha256: createHash("sha256").update(content).digest("hex"),
|
|
1940
|
+
bytes: content.byteLength
|
|
1941
|
+
};
|
|
1942
|
+
}
|
|
1943
|
+
const hash = createHash("sha256");
|
|
1944
|
+
let bytes = 0;
|
|
1945
|
+
for await (const rawChunk of createReadStream(target)) {
|
|
1946
|
+
const chunk = Buffer.isBuffer(rawChunk) ? rawChunk : Buffer.from(rawChunk);
|
|
1947
|
+
hash.update(chunk);
|
|
1948
|
+
bytes += chunk.length;
|
|
1949
|
+
}
|
|
1950
|
+
return {
|
|
1951
|
+
sha256: hash.digest("hex"),
|
|
1952
|
+
bytes
|
|
1953
|
+
};
|
|
1954
|
+
}
|
|
1955
|
+
async offlineSyncFileIsEncrypted(filePath) {
|
|
1956
|
+
const handle = await open(filePath, "r");
|
|
1957
|
+
try {
|
|
1958
|
+
const header = Buffer.alloc(MAGIC_HEADER_SIZE);
|
|
1959
|
+
const { bytesRead } = await handle.read(header, 0, header.length, 0);
|
|
1960
|
+
return bytesRead >= MAGIC_HEADER_SIZE && isEncryptedFile(header);
|
|
1961
|
+
} finally {
|
|
1962
|
+
await handle.close();
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1933
1965
|
async writeOfflineSyncFile(filePath, content) {
|
|
1934
1966
|
const target = this.assertManagedStoragePath(filePath, "storage.writeOfflineSyncFile");
|
|
1935
1967
|
await writeMaybeEncryptedFile(target, content, this.resolveWriteKey(), {}, this.baseDir);
|
|
@@ -5176,4 +5208,4 @@ export {
|
|
|
5176
5208
|
serializeEntityFile,
|
|
5177
5209
|
StorageManager
|
|
5178
5210
|
};
|
|
5179
|
-
//# sourceMappingURL=chunk-
|
|
5211
|
+
//# sourceMappingURL=chunk-VBJ7V5SK.js.map
|