@remnic/core 9.69.7 → 9.69.8
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-admin-ops-surface.d.ts +1 -1
- package/dist/access-admin-ops-surface.js +3 -3
- package/dist/access-authorization-probe.d.ts +1 -1
- package/dist/access-authorization-probe.js +4 -4
- package/dist/access-boundary.d.ts +1 -1
- package/dist/access-boundary.js +3 -3
- package/dist/access-cli.js +22 -22
- package/dist/access-extraction-force-flush.d.ts +1 -1
- package/dist/access-extraction-force-flush.js +3 -3
- package/dist/access-http-lcm-compaction.d.ts +1 -1
- package/dist/access-http-lifecycle-flush.d.ts +1 -1
- package/dist/access-http-offline-stream.d.ts +1 -1
- package/dist/access-http-query.js +3 -3
- package/dist/access-http.d.ts +2 -2
- package/dist/access-http.js +13 -13
- package/dist/access-identity-continuity-surface.js +3 -3
- package/dist/access-lcm-surface.d.ts +1 -1
- package/dist/access-lcm-surface.js +3 -3
- package/dist/access-mcp.d.ts +1 -1
- package/dist/access-mcp.js +9 -9
- package/dist/access-namespace-preflight.js +3 -3
- package/dist/access-observe-write-surface.d.ts +1 -1
- package/dist/access-observe-write-surface.js +3 -3
- package/dist/access-operations-batch.js +4 -4
- package/dist/access-operations.d.ts +6 -6
- package/dist/access-operations.js +8 -8
- package/dist/access-recall-concurrency.d.ts +1 -1
- package/dist/access-recall-concurrency.js +3 -3
- package/dist/access-recall-response.d.ts +1 -1
- package/dist/access-recall-response.js +3 -3
- package/dist/access-recall-surface.d.ts +1 -1
- package/dist/access-recall-surface.js +3 -3
- package/dist/access-schema.d.ts +89 -89
- package/dist/access-service-helpers.d.ts +1 -1
- package/dist/access-service.d.ts +1 -1
- package/dist/access-service.js +3 -3
- package/dist/access-surface-catalog.d.ts +1 -1
- package/dist/access-surface-catalog.js +5 -5
- package/dist/buffer.js +3 -3
- package/dist/{chunk-J2TT3RV6.js → chunk-3FXXFLVK.js} +2 -2
- package/dist/{chunk-DZNNWPQ7.js → chunk-3QWF54M4.js} +2 -2
- package/dist/{chunk-GH7UF5BV.js → chunk-44HBCMOA.js} +8 -8
- package/dist/{chunk-IE7N2YK6.js → chunk-4PJYD2L3.js} +2 -2
- package/dist/{chunk-MWLBRFLY.js → chunk-5PTS43CH.js} +2 -2
- package/dist/{chunk-N27L5IY2.js → chunk-754GA2UE.js} +2 -2
- package/dist/{chunk-EG6NUYY3.js → chunk-DKZR56A3.js} +2 -2
- package/dist/{chunk-XHGDFN7A.js → chunk-EN75MUTO.js} +2 -2
- package/dist/{chunk-OMA2B7GY.js → chunk-G4MCAHMF.js} +2 -2
- package/dist/{chunk-KLLSFJBJ.js → chunk-IIO4C3YL.js} +2 -2
- package/dist/{chunk-TB2MJRI6.js → chunk-J3NGQ5SC.js} +2 -2
- package/dist/chunk-J3NGQ5SC.js.map +1 -0
- package/dist/{chunk-MWHSWK4W.js → chunk-J55NAXDH.js} +5 -5
- package/dist/{chunk-UJMOG5LL.js → chunk-JAU4MRKB.js} +2 -2
- package/dist/{chunk-S6DX26S3.js → chunk-KAVQ5GYY.js} +4 -3
- package/dist/{chunk-S6DX26S3.js.map → chunk-KAVQ5GYY.js.map} +1 -1
- package/dist/{chunk-GTZLPFAT.js → chunk-KLL5SPER.js} +2 -2
- package/dist/{chunk-6EE5LJSZ.js → chunk-KZMFU7YL.js} +2 -2
- package/dist/{chunk-E6Z4LWNJ.js → chunk-LVYO2HZJ.js} +2 -2
- package/dist/{chunk-APGIIJRE.js → chunk-M5GBTETG.js} +2 -2
- package/dist/{chunk-N5VXPTXC.js → chunk-PEOFTEUC.js} +7 -7
- package/dist/{chunk-UJICQ77Y.js → chunk-UCNQV43K.js} +2 -2
- package/dist/{chunk-ZNXPGZJQ.js → chunk-VGTXHTWU.js} +2 -2
- package/dist/{chunk-QAITDA5B.js → chunk-YJPFTF57.js} +4 -4
- package/dist/{cli-CFpMhqz5.d.ts → cli-Bvy4jdBu.d.ts} +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +15 -15
- package/dist/external-wiki-access.d.ts +1 -1
- package/dist/external-wiki-access.js +4 -4
- package/dist/external-wiki-mcp-tools.d.ts +1 -1
- package/dist/extraction.js +4 -4
- package/dist/index.d.ts +680 -680
- package/dist/index.js +22 -22
- package/dist/location/index.js +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +1 -1
- package/dist/memory-subject-cli.d.ts +1 -1
- package/dist/memory-subject.d.ts +1 -1
- package/dist/orchestration/maintenance.js +4 -4
- package/dist/orchestrator.js +22 -22
- package/dist/{public-http-C9-CHc40.d.ts → public-http-2MyshWxl.d.ts} +1 -1
- package/dist/reconcile/cursor.js +7 -2
- package/dist/reconcile/cursor.js.map +1 -1
- package/dist/schemas.d.ts +176 -176
- package/dist/shared-context/manager.d.ts +6 -6
- package/dist/source-agent-qualifier.js +3 -3
- package/dist/support-passport/index.d.ts +4 -4
- package/dist/support-passport/index.js +6 -6
- package/dist/transfer/export-okf.d.ts +2 -1
- package/dist/transfer/export-okf.js +3 -1
- package/dist/transfer/types.d.ts +78 -78
- package/dist/who-knows-cli.d.ts +1 -1
- package/dist/who-knows.d.ts +1 -1
- package/package.json +2 -2
- package/src/location/matching.test.ts +31 -1
- package/src/location/matching.ts +6 -1
- package/src/reconcile/cursor.test.ts +18 -0
- package/src/reconcile/cursor.ts +13 -2
- package/src/transfer/export-okf.test.ts +22 -0
- package/src/transfer/export-okf.ts +6 -2
- package/dist/chunk-TB2MJRI6.js.map +0 -1
- package/dist/{access-service-DcfM0Vf0.d.ts → access-service-LbwWl05g.d.ts} +64 -64
- /package/dist/{chunk-J2TT3RV6.js.map → chunk-3FXXFLVK.js.map} +0 -0
- /package/dist/{chunk-DZNNWPQ7.js.map → chunk-3QWF54M4.js.map} +0 -0
- /package/dist/{chunk-GH7UF5BV.js.map → chunk-44HBCMOA.js.map} +0 -0
- /package/dist/{chunk-IE7N2YK6.js.map → chunk-4PJYD2L3.js.map} +0 -0
- /package/dist/{chunk-MWLBRFLY.js.map → chunk-5PTS43CH.js.map} +0 -0
- /package/dist/{chunk-N27L5IY2.js.map → chunk-754GA2UE.js.map} +0 -0
- /package/dist/{chunk-EG6NUYY3.js.map → chunk-DKZR56A3.js.map} +0 -0
- /package/dist/{chunk-XHGDFN7A.js.map → chunk-EN75MUTO.js.map} +0 -0
- /package/dist/{chunk-OMA2B7GY.js.map → chunk-G4MCAHMF.js.map} +0 -0
- /package/dist/{chunk-KLLSFJBJ.js.map → chunk-IIO4C3YL.js.map} +0 -0
- /package/dist/{chunk-MWHSWK4W.js.map → chunk-J55NAXDH.js.map} +0 -0
- /package/dist/{chunk-UJMOG5LL.js.map → chunk-JAU4MRKB.js.map} +0 -0
- /package/dist/{chunk-GTZLPFAT.js.map → chunk-KLL5SPER.js.map} +0 -0
- /package/dist/{chunk-6EE5LJSZ.js.map → chunk-KZMFU7YL.js.map} +0 -0
- /package/dist/{chunk-E6Z4LWNJ.js.map → chunk-LVYO2HZJ.js.map} +0 -0
- /package/dist/{chunk-APGIIJRE.js.map → chunk-M5GBTETG.js.map} +0 -0
- /package/dist/{chunk-N5VXPTXC.js.map → chunk-PEOFTEUC.js.map} +0 -0
- /package/dist/{chunk-UJICQ77Y.js.map → chunk-UCNQV43K.js.map} +0 -0
- /package/dist/{chunk-ZNXPGZJQ.js.map → chunk-VGTXHTWU.js.map} +0 -0
- /package/dist/{chunk-QAITDA5B.js.map → chunk-YJPFTF57.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -195,7 +195,7 @@ import {
|
|
|
195
195
|
weeklySnapshotPath,
|
|
196
196
|
writeManifest,
|
|
197
197
|
writeMeetingEpisodeMemory
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-44HBCMOA.js";
|
|
199
199
|
import {
|
|
200
200
|
WEARABLE_SOURCE_PREFIX,
|
|
201
201
|
buildExtractionTurns,
|
|
@@ -225,7 +225,7 @@ import {
|
|
|
225
225
|
SUPPORT_PASSPORT_MODEL_RESULT_PATH,
|
|
226
226
|
SupportPassportModelBridge,
|
|
227
227
|
parseSupportPassportModelJob
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-KZMFU7YL.js";
|
|
229
229
|
import "./chunk-UXREWVW4.js";
|
|
230
230
|
import {
|
|
231
231
|
ACTIVITY_SYNC_DEFAULT_INTERVAL_MS,
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
resolveActivitySyncDates,
|
|
242
242
|
runActivitySyncOnce,
|
|
243
243
|
syncActivitySource
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-EN75MUTO.js";
|
|
245
245
|
import "./chunk-I74SUMNI.js";
|
|
246
246
|
import {
|
|
247
247
|
PEERS_DIR_NAME,
|
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
import "./chunk-666A3MOW.js";
|
|
264
264
|
import "./chunk-VDC6RZI4.js";
|
|
265
265
|
import "./chunk-UWK5OXUJ.js";
|
|
266
|
-
import "./chunk-
|
|
266
|
+
import "./chunk-JAU4MRKB.js";
|
|
267
267
|
import {
|
|
268
268
|
EnrichmentProviderRegistry,
|
|
269
269
|
WebSearchProvider,
|
|
@@ -397,8 +397,8 @@ import {
|
|
|
397
397
|
} from "./chunk-64NJRYU2.js";
|
|
398
398
|
import {
|
|
399
399
|
ExtractionEngine
|
|
400
|
-
} from "./chunk-
|
|
401
|
-
import "./chunk-
|
|
400
|
+
} from "./chunk-G4MCAHMF.js";
|
|
401
|
+
import "./chunk-4PJYD2L3.js";
|
|
402
402
|
import "./chunk-AJTG3CP7.js";
|
|
403
403
|
import "./chunk-54V4BZWP.js";
|
|
404
404
|
import "./chunk-2CGLBUW3.js";
|
|
@@ -521,7 +521,7 @@ import {
|
|
|
521
521
|
runOkfCliCommand,
|
|
522
522
|
runWearablesCliCommand,
|
|
523
523
|
screenCandidateFact
|
|
524
|
-
} from "./chunk-
|
|
524
|
+
} from "./chunk-J55NAXDH.js";
|
|
525
525
|
import "./chunk-MMACM5G2.js";
|
|
526
526
|
import "./chunk-54BGIBCR.js";
|
|
527
527
|
import "./chunk-H4CKS5B2.js";
|
|
@@ -530,7 +530,7 @@ import "./chunk-HDDRVXX4.js";
|
|
|
530
530
|
import "./chunk-PYHOAXTI.js";
|
|
531
531
|
import "./chunk-2NLLXCJG.js";
|
|
532
532
|
import "./chunk-UP6MOYCB.js";
|
|
533
|
-
import "./chunk-
|
|
533
|
+
import "./chunk-KAVQ5GYY.js";
|
|
534
534
|
import "./chunk-BV2TIZ4F.js";
|
|
535
535
|
import "./chunk-Z734BLO3.js";
|
|
536
536
|
import "./chunk-OZKVVUJB.js";
|
|
@@ -664,7 +664,7 @@ import "./chunk-2GBFKHBZ.js";
|
|
|
664
664
|
import "./chunk-6TBIWIAG.js";
|
|
665
665
|
import {
|
|
666
666
|
SmartBuffer
|
|
667
|
-
} from "./chunk-
|
|
667
|
+
} from "./chunk-5PTS43CH.js";
|
|
668
668
|
import "./chunk-2AD5SXO4.js";
|
|
669
669
|
import "./chunk-7CBKAQIG.js";
|
|
670
670
|
import "./chunk-C6WMSXCJ.js";
|
|
@@ -777,7 +777,7 @@ import "./chunk-QW27DOHG.js";
|
|
|
777
777
|
import {
|
|
778
778
|
EngramAccessHttpServer,
|
|
779
779
|
MeetingsInputError
|
|
780
|
-
} from "./chunk-
|
|
780
|
+
} from "./chunk-PEOFTEUC.js";
|
|
781
781
|
import {
|
|
782
782
|
WearablesInputError,
|
|
783
783
|
describeErrorForOperator
|
|
@@ -791,16 +791,16 @@ import "./chunk-TB6CBZ5V.js";
|
|
|
791
791
|
import "./chunk-J64TK33U.js";
|
|
792
792
|
import "./chunk-7RXCMVFQ.js";
|
|
793
793
|
import "./chunk-3HSRWJTC.js";
|
|
794
|
-
import "./chunk-
|
|
794
|
+
import "./chunk-DKZR56A3.js";
|
|
795
795
|
import {
|
|
796
796
|
SUPPORT_PASSPORT_PUBLIC_HTTP_ROUTES,
|
|
797
797
|
buildSupportPassportPublicRequestHandler,
|
|
798
798
|
composeSupportPassportExternalRequestHandlers,
|
|
799
799
|
normalizeSupportPassportNetworkAddress
|
|
800
|
-
} from "./chunk-
|
|
800
|
+
} from "./chunk-3FXXFLVK.js";
|
|
801
801
|
import {
|
|
802
802
|
EngramMcpServer
|
|
803
|
-
} from "./chunk-
|
|
803
|
+
} from "./chunk-LVYO2HZJ.js";
|
|
804
804
|
import "./chunk-4OFKZAJG.js";
|
|
805
805
|
import "./chunk-A5KNZSNA.js";
|
|
806
806
|
import {
|
|
@@ -830,11 +830,11 @@ import {
|
|
|
830
830
|
relayMissionAppendOperation,
|
|
831
831
|
relayMissionReadOperation,
|
|
832
832
|
relayMissionReceiptDigest
|
|
833
|
-
} from "./chunk-
|
|
833
|
+
} from "./chunk-YJPFTF57.js";
|
|
834
834
|
import "./chunk-HINMCD7V.js";
|
|
835
|
-
import "./chunk-
|
|
836
|
-
import "./chunk-
|
|
837
|
-
import "./chunk-
|
|
835
|
+
import "./chunk-VGTXHTWU.js";
|
|
836
|
+
import "./chunk-IIO4C3YL.js";
|
|
837
|
+
import "./chunk-M5GBTETG.js";
|
|
838
838
|
import "./chunk-7T4TOGMS.js";
|
|
839
839
|
import {
|
|
840
840
|
loadExternalWikiCatalog,
|
|
@@ -843,7 +843,7 @@ import {
|
|
|
843
843
|
validateExternalWikiLayout
|
|
844
844
|
} from "./chunk-7YQ6ESEA.js";
|
|
845
845
|
import "./chunk-ZQUVBZI4.js";
|
|
846
|
-
import "./chunk-
|
|
846
|
+
import "./chunk-754GA2UE.js";
|
|
847
847
|
import "./chunk-C2JCVZWX.js";
|
|
848
848
|
import "./chunk-EQWEIIKQ.js";
|
|
849
849
|
import {
|
|
@@ -897,7 +897,7 @@ import "./chunk-GZ3R6XOE.js";
|
|
|
897
897
|
import "./chunk-CK5KOVHW.js";
|
|
898
898
|
import "./chunk-DJUKBGAD.js";
|
|
899
899
|
import "./chunk-G73MCJKL.js";
|
|
900
|
-
import "./chunk-
|
|
900
|
+
import "./chunk-KLL5SPER.js";
|
|
901
901
|
import {
|
|
902
902
|
EngramAccessService,
|
|
903
903
|
JOURNAL_DIR_NAME,
|
|
@@ -960,7 +960,7 @@ import {
|
|
|
960
960
|
syncDirectoryForDurability,
|
|
961
961
|
todayJournalDate,
|
|
962
962
|
writeJournalFile
|
|
963
|
-
} from "./chunk-
|
|
963
|
+
} from "./chunk-3QWF54M4.js";
|
|
964
964
|
import "./chunk-GDASG7NC.js";
|
|
965
965
|
import "./chunk-GDB4J2H3.js";
|
|
966
966
|
import "./chunk-CTCGHNWN.js";
|
|
@@ -1231,8 +1231,8 @@ import "./chunk-6CIAGZ6X.js";
|
|
|
1231
1231
|
import {
|
|
1232
1232
|
defaultWorkspaceDir,
|
|
1233
1233
|
sanitizeSessionKeyForFilename
|
|
1234
|
-
} from "./chunk-
|
|
1235
|
-
import "./chunk-
|
|
1234
|
+
} from "./chunk-UCNQV43K.js";
|
|
1235
|
+
import "./chunk-J3NGQ5SC.js";
|
|
1236
1236
|
import {
|
|
1237
1237
|
hasBroadGraphIntent,
|
|
1238
1238
|
inferIntentFromText,
|
package/dist/location/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LOCATION_SYNC_DEFAULT_INTERVAL_MS,
|
|
3
3
|
startLocationAutoSync
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-JAU4MRKB.js";
|
|
5
5
|
import {
|
|
6
6
|
defaultLocationConfig,
|
|
7
7
|
parseLocationConfig
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
sanitizeProviderError,
|
|
27
27
|
syncLocation,
|
|
28
28
|
syncLocationDay
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-IIO4C3YL.js";
|
|
30
30
|
import "../chunk-GD7D7WP2.js";
|
|
31
31
|
import "../chunk-WF2WCZCR.js";
|
|
32
32
|
import "../chunk-UHVXE24Y.js";
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
tagPersistedMemories,
|
|
111
111
|
updateLocationSourceDay,
|
|
112
112
|
writeLocationDay
|
|
113
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-J3NGQ5SC.js";
|
|
114
114
|
import "../chunk-C24UZSFW.js";
|
|
115
115
|
import "../chunk-JXN77SGO.js";
|
|
116
116
|
import "../chunk-ZLQ37WJX.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as EngramAccessRecallResponse } from './access-service-
|
|
1
|
+
import { G as EngramAccessRecallResponse } from './access-service-LbwWl05g.js';
|
|
2
2
|
import { ActionConfidenceRequest } from './access-schema.js';
|
|
3
3
|
import { RecallXraySnapshot } from './recall-xray.js';
|
|
4
4
|
import { ActionConfidenceResult } from './action-confidence.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PromotionCandidatesResult, S as SubjectBackfillReport } from './access-service-
|
|
1
|
+
import { P as PromotionCandidatesResult, S as SubjectBackfillReport } from './access-service-LbwWl05g.js';
|
|
2
2
|
import './types-eM7QIcX2.js';
|
|
3
3
|
import './message-parts/index.js';
|
|
4
4
|
import './bounded-jsonl-state.js';
|
package/dist/memory-subject.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { T as PROMOTION_CANDIDATES_DEFAULT_MIN_ACCESS, U as PROMOTION_CANDIDATES_MCP_TOOLS, a4 as PromotionCandidate, P as PromotionCandidatesResult, a5 as PromotionReuseSignal, ag as SUBJECT_GUARD_MODES, ah as SUBJECT_GUARD_OVERRIDE_FLAG, ai as SUBJECT_VALUES, S as SubjectBackfillReport, ap as SubjectBackfillStorage, aq as SubjectGuardDecision, bL as backfillMemorySubjects, bQ as computePromotionCandidates, bX as evaluateSubjectGuard, b$ as isMemorySubject, c0 as isSharedPromotionTarget, c1 as isSubjectGuardMode, c4 as promotionCandidateKey, c6 as resolveWriteSubject, c8 as subjectDefaultForCategory } from './access-service-
|
|
1
|
+
export { T as PROMOTION_CANDIDATES_DEFAULT_MIN_ACCESS, U as PROMOTION_CANDIDATES_MCP_TOOLS, a4 as PromotionCandidate, P as PromotionCandidatesResult, a5 as PromotionReuseSignal, ag as SUBJECT_GUARD_MODES, ah as SUBJECT_GUARD_OVERRIDE_FLAG, ai as SUBJECT_VALUES, S as SubjectBackfillReport, ap as SubjectBackfillStorage, aq as SubjectGuardDecision, bL as backfillMemorySubjects, bQ as computePromotionCandidates, bX as evaluateSubjectGuard, b$ as isMemorySubject, c0 as isSharedPromotionTarget, c1 as isSubjectGuardMode, c4 as promotionCandidateKey, c6 as resolveWriteSubject, c8 as subjectDefaultForCategory } from './access-service-LbwWl05g.js';
|
|
2
2
|
import './types-eM7QIcX2.js';
|
|
3
3
|
import './orchestrator-Btq9lzAN.js';
|
|
4
4
|
import './recall-state.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MaintenanceScheduler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-EN75MUTO.js";
|
|
4
4
|
import "../chunk-666A3MOW.js";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-JAU4MRKB.js";
|
|
6
6
|
import "../chunk-2MW3UQNX.js";
|
|
7
7
|
import "../chunk-X5TGZAP2.js";
|
|
8
8
|
import "../chunk-E5WTGEWX.js";
|
|
9
9
|
import "../chunk-KJTKLXTH.js";
|
|
10
10
|
import "../chunk-2DQ2XREU.js";
|
|
11
11
|
import "../chunk-KJUWWN3T.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-IIO4C3YL.js";
|
|
13
13
|
import "../chunk-RXS4SQ5S.js";
|
|
14
14
|
import "../chunk-ANN5VMHT.js";
|
|
15
15
|
import "../chunk-GD7D7WP2.js";
|
|
@@ -52,7 +52,7 @@ import "../chunk-RBOJCG4T.js";
|
|
|
52
52
|
import "../chunk-NNZFPYYX.js";
|
|
53
53
|
import "../chunk-5WITETWU.js";
|
|
54
54
|
import "../chunk-6CIAGZ6X.js";
|
|
55
|
-
import "../chunk-
|
|
55
|
+
import "../chunk-J3NGQ5SC.js";
|
|
56
56
|
import "../chunk-C24UZSFW.js";
|
|
57
57
|
import "../chunk-JXN77SGO.js";
|
|
58
58
|
import "../chunk-ZLQ37WJX.js";
|
package/dist/orchestrator.js
CHANGED
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
blendGraphExpandedRecallScore,
|
|
4
4
|
graphPathRelativeToStorage,
|
|
5
5
|
mergeGraphExpandedResults
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-44HBCMOA.js";
|
|
7
7
|
import "./chunk-3TSU662L.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-KZMFU7YL.js";
|
|
9
9
|
import {
|
|
10
10
|
formatCompressionGuidelinesForRecall
|
|
11
11
|
} from "./chunk-UXREWVW4.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-EN75MUTO.js";
|
|
13
13
|
import "./chunk-I74SUMNI.js";
|
|
14
14
|
import "./chunk-ILNPU5W5.js";
|
|
15
15
|
import "./chunk-7HYPN2GC.js";
|
|
16
16
|
import "./chunk-666A3MOW.js";
|
|
17
17
|
import "./chunk-VDC6RZI4.js";
|
|
18
18
|
import "./chunk-UWK5OXUJ.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-JAU4MRKB.js";
|
|
20
20
|
import "./chunk-KBL3JJR6.js";
|
|
21
21
|
import "./chunk-FQ7HAWWC.js";
|
|
22
22
|
import "./chunk-X2NFFBTO.js";
|
|
@@ -71,8 +71,8 @@ import "./chunk-YAZNBMNF.js";
|
|
|
71
71
|
import "./chunk-XXSOVESA.js";
|
|
72
72
|
import "./chunk-PHRLJFWZ.js";
|
|
73
73
|
import "./chunk-64NJRYU2.js";
|
|
74
|
-
import "./chunk-
|
|
75
|
-
import "./chunk-
|
|
74
|
+
import "./chunk-G4MCAHMF.js";
|
|
75
|
+
import "./chunk-4PJYD2L3.js";
|
|
76
76
|
import "./chunk-AJTG3CP7.js";
|
|
77
77
|
import "./chunk-54V4BZWP.js";
|
|
78
78
|
import "./chunk-2CGLBUW3.js";
|
|
@@ -108,7 +108,7 @@ import "./chunk-VY47VI2T.js";
|
|
|
108
108
|
import "./chunk-PYIR4SSB.js";
|
|
109
109
|
import "./chunk-DFEODULB.js";
|
|
110
110
|
import "./chunk-Y3WMJAZ3.js";
|
|
111
|
-
import "./chunk-
|
|
111
|
+
import "./chunk-J55NAXDH.js";
|
|
112
112
|
import "./chunk-MMACM5G2.js";
|
|
113
113
|
import "./chunk-54BGIBCR.js";
|
|
114
114
|
import "./chunk-H4CKS5B2.js";
|
|
@@ -117,7 +117,7 @@ import "./chunk-HDDRVXX4.js";
|
|
|
117
117
|
import "./chunk-PYHOAXTI.js";
|
|
118
118
|
import "./chunk-2NLLXCJG.js";
|
|
119
119
|
import "./chunk-UP6MOYCB.js";
|
|
120
|
-
import "./chunk-
|
|
120
|
+
import "./chunk-KAVQ5GYY.js";
|
|
121
121
|
import "./chunk-BV2TIZ4F.js";
|
|
122
122
|
import "./chunk-Z734BLO3.js";
|
|
123
123
|
import "./chunk-OZKVVUJB.js";
|
|
@@ -183,7 +183,7 @@ import "./chunk-YBPYIAA5.js";
|
|
|
183
183
|
import "./chunk-HK6KYIF6.js";
|
|
184
184
|
import "./chunk-2GBFKHBZ.js";
|
|
185
185
|
import "./chunk-6TBIWIAG.js";
|
|
186
|
-
import "./chunk-
|
|
186
|
+
import "./chunk-5PTS43CH.js";
|
|
187
187
|
import "./chunk-2AD5SXO4.js";
|
|
188
188
|
import "./chunk-7CBKAQIG.js";
|
|
189
189
|
import "./chunk-C6WMSXCJ.js";
|
|
@@ -216,7 +216,7 @@ import "./chunk-JI7U6AS3.js";
|
|
|
216
216
|
import "./chunk-KFZY2OFH.js";
|
|
217
217
|
import "./chunk-B32WYRXX.js";
|
|
218
218
|
import "./chunk-QW27DOHG.js";
|
|
219
|
-
import "./chunk-
|
|
219
|
+
import "./chunk-PEOFTEUC.js";
|
|
220
220
|
import "./chunk-V7IZKJI3.js";
|
|
221
221
|
import "./chunk-SEDEKFYQ.js";
|
|
222
222
|
import "./chunk-2QSZNTDO.js";
|
|
@@ -227,21 +227,21 @@ import "./chunk-TB6CBZ5V.js";
|
|
|
227
227
|
import "./chunk-J64TK33U.js";
|
|
228
228
|
import "./chunk-7RXCMVFQ.js";
|
|
229
229
|
import "./chunk-3HSRWJTC.js";
|
|
230
|
-
import "./chunk-
|
|
231
|
-
import "./chunk-
|
|
232
|
-
import "./chunk-
|
|
230
|
+
import "./chunk-DKZR56A3.js";
|
|
231
|
+
import "./chunk-3FXXFLVK.js";
|
|
232
|
+
import "./chunk-LVYO2HZJ.js";
|
|
233
233
|
import "./chunk-4OFKZAJG.js";
|
|
234
234
|
import "./chunk-A5KNZSNA.js";
|
|
235
235
|
import "./chunk-D24OXEPB.js";
|
|
236
|
-
import "./chunk-
|
|
236
|
+
import "./chunk-YJPFTF57.js";
|
|
237
237
|
import "./chunk-HINMCD7V.js";
|
|
238
|
-
import "./chunk-
|
|
239
|
-
import "./chunk-
|
|
240
|
-
import "./chunk-
|
|
238
|
+
import "./chunk-VGTXHTWU.js";
|
|
239
|
+
import "./chunk-IIO4C3YL.js";
|
|
240
|
+
import "./chunk-M5GBTETG.js";
|
|
241
241
|
import "./chunk-7T4TOGMS.js";
|
|
242
242
|
import "./chunk-7YQ6ESEA.js";
|
|
243
243
|
import "./chunk-ZQUVBZI4.js";
|
|
244
|
-
import "./chunk-
|
|
244
|
+
import "./chunk-754GA2UE.js";
|
|
245
245
|
import "./chunk-C2JCVZWX.js";
|
|
246
246
|
import "./chunk-EQWEIIKQ.js";
|
|
247
247
|
import "./chunk-JTWZKNUH.js";
|
|
@@ -260,12 +260,12 @@ import "./chunk-GZ3R6XOE.js";
|
|
|
260
260
|
import "./chunk-CK5KOVHW.js";
|
|
261
261
|
import "./chunk-DJUKBGAD.js";
|
|
262
262
|
import "./chunk-G73MCJKL.js";
|
|
263
|
-
import "./chunk-
|
|
263
|
+
import "./chunk-KLL5SPER.js";
|
|
264
264
|
import {
|
|
265
265
|
filterRecallCandidates,
|
|
266
266
|
hasIdentityRecoveryIntent,
|
|
267
267
|
resolveEffectiveIdentityInjectionMode
|
|
268
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-3QWF54M4.js";
|
|
269
269
|
import "./chunk-GDASG7NC.js";
|
|
270
270
|
import "./chunk-GDB4J2H3.js";
|
|
271
271
|
import "./chunk-CTCGHNWN.js";
|
|
@@ -394,8 +394,8 @@ import {
|
|
|
394
394
|
throwIfRecallAborted,
|
|
395
395
|
tokenizeRecallQuery,
|
|
396
396
|
utcDateKeysForLocalDay
|
|
397
|
-
} from "./chunk-
|
|
398
|
-
import "./chunk-
|
|
397
|
+
} from "./chunk-UCNQV43K.js";
|
|
398
|
+
import "./chunk-J3NGQ5SC.js";
|
|
399
399
|
import "./chunk-CSAKJVXW.js";
|
|
400
400
|
import "./chunk-K2XUWZBM.js";
|
|
401
401
|
import "./chunk-OD4FM2U7.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
|
-
import { f as EngramAccessService } from './access-service-
|
|
2
|
+
import { f as EngramAccessService } from './access-service-LbwWl05g.js';
|
|
3
3
|
|
|
4
4
|
declare const SUPPORT_PASSPORT_PUBLIC_HTTP_ROUTES: readonly [{
|
|
5
5
|
readonly method: "GET";
|
package/dist/reconcile/cursor.js
CHANGED
|
@@ -11,6 +11,11 @@ import "../chunk-PZ5AY32C.js";
|
|
|
11
11
|
import { createHash, randomUUID } from "crypto";
|
|
12
12
|
import * as fs from "fs/promises";
|
|
13
13
|
import * as path from "path";
|
|
14
|
+
function stripTrailingSlashes(value) {
|
|
15
|
+
let end = value.length;
|
|
16
|
+
while (end > 0 && value[end - 1] === "/") end -= 1;
|
|
17
|
+
return end === value.length ? value : value.slice(0, end);
|
|
18
|
+
}
|
|
14
19
|
function normalizeConvergePeerUrl(peerUrl) {
|
|
15
20
|
const trimmed = peerUrl.trim();
|
|
16
21
|
try {
|
|
@@ -19,10 +24,10 @@ function normalizeConvergePeerUrl(peerUrl) {
|
|
|
19
24
|
url.password = "";
|
|
20
25
|
url.search = "";
|
|
21
26
|
url.hash = "";
|
|
22
|
-
url.pathname = url.pathname
|
|
27
|
+
url.pathname = stripTrailingSlashes(url.pathname);
|
|
23
28
|
return url.toString().replace(/\/$/, "");
|
|
24
29
|
} catch {
|
|
25
|
-
return trimmed
|
|
30
|
+
return stripTrailingSlashes(trimmed);
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
33
|
function hashPeerNamespace(peerUrl, namespace) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/reconcile/cursor.ts"],"sourcesContent":["import { createHash, randomUUID } from \"node:crypto\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport {\n type ReconcilePlanEntry,\n type ReconcileSemanticAgreement,\n semanticAgreementKey,\n} from \"./plan.js\";\n\nexport type ConvergeRefreshTarget = \"local\" | \"receiver\";\n\nexport interface ConvergeCursorFileState {\n path: string;\n sha256: string;\n mtimeMs?: number;\n bytes?: number;\n}\n\nexport interface ConvergeCursorState {\n version: 1;\n peerUrl: string;\n namespace: string;\n lastConvergedAt?: string;\n baseFiles: ConvergeCursorFileState[];\n semanticAgreements?: ReconcileSemanticAgreement[];\n completedPaths?: string[];\n pendingRefreshes?: ConvergeRefreshTarget[];\n}\n\nexport function normalizeConvergePeerUrl(peerUrl: string): string {\n const trimmed = peerUrl.trim();\n try {\n const url = new URL(trimmed);\n url.username = \"\";\n url.password = \"\";\n url.search = \"\";\n url.hash = \"\";\n url.pathname = url.pathname.replace(/\\/+$/, \"\");\n return url.toString().replace(/\\/$/, \"\");\n } catch {\n return trimmed.replace(/\\/+$/, \"\");\n }\n}\n\nexport function hashPeerNamespace(peerUrl: string, namespace: string): string {\n const normalizedUrl = normalizeConvergePeerUrl(peerUrl);\n const normalizedNs = namespace.trim().toLowerCase();\n return createHash(\"sha256\")\n .update(`${normalizedUrl}\\0${normalizedNs}`)\n .digest(\"hex\")\n .slice(0, 16);\n}\n\nexport function defaultConvergeCursorPath(\n memoryDir: string,\n peerUrl: string,\n namespace: string,\n): string {\n const key = hashPeerNamespace(peerUrl, namespace);\n return path.join(path.resolve(memoryDir), \".remnic\", \"state\", \"converge-cursors\", `${key}.json`);\n}\n\nfunction normalizeSemanticFileState(input: unknown): { path: string; sha256: string } | undefined {\n if (!input || typeof input !== \"object\" || Array.isArray(input)) return undefined;\n const file = input as Record<string, unknown>;\n if (typeof file.path !== \"string\" || typeof file.sha256 !== \"string\") return undefined;\n return { path: file.path, sha256: file.sha256 };\n}\n\nfunction digestAfterReconcile(entry: ReconcilePlanEntry): string | undefined {\n if (entry.action === \"push\") return entry.localSha256;\n if (entry.action === \"pull\") return entry.peerSha256;\n if (entry.action === \"conflict\") {\n if (entry.resolution === \"local-wins\") return entry.localSha256;\n if (entry.resolution === \"peer-wins\") return entry.peerSha256;\n return undefined;\n }\n if (entry.action !== \"identical\") return undefined;\n if (entry.localSha256 && entry.peerSha256 && entry.localSha256 !== entry.peerSha256) return undefined;\n return entry.localSha256 ?? entry.peerSha256;\n}\n\nexport function deriveConvergeCursorBase(\n entries: readonly ReconcilePlanEntry[],\n namespace: string,\n priorSemanticAgreements: readonly ReconcileSemanticAgreement[] = [],\n): Pick<ConvergeCursorState, \"baseFiles\" | \"semanticAgreements\"> {\n const baseFiles: ConvergeCursorFileState[] = [];\n const semanticAgreementsByPathPair = new Map(\n priorSemanticAgreements.map((agreement) => [semanticAgreementKey(agreement), agreement])\n );\n for (const entry of entries) {\n if (entry.namespace !== namespace) continue;\n if (entry.semanticAgreement) {\n semanticAgreementsByPathPair.set(semanticAgreementKey(entry.semanticAgreement), entry.semanticAgreement);\n continue;\n }\n const sha256 = digestAfterReconcile(entry);\n if (sha256) baseFiles.push({ path: entry.path, sha256 });\n }\n baseFiles.sort((left, right) => left.path.localeCompare(right.path));\n const semanticAgreements = [...semanticAgreementsByPathPair.values()];\n semanticAgreements.sort((left, right) =>\n left.local.path.localeCompare(right.local.path) || left.peer.path.localeCompare(right.peer.path)\n );\n return { baseFiles, semanticAgreements };\n}\n\nexport function normalizeConvergeCursor(input: unknown): ConvergeCursorState {\n if (!input || typeof input !== \"object\" || Array.isArray(input)) {\n throw new Error(\"converge cursor must be an object\");\n }\n const obj = input as Record<string, unknown>;\n if (obj.version !== 1) {\n throw new Error(\"converge cursor version must be 1\");\n }\n if (typeof obj.peerUrl !== \"string\" || !obj.peerUrl.trim()) {\n throw new Error(\"converge cursor missing peerUrl\");\n }\n if (typeof obj.namespace !== \"string\" || !obj.namespace.trim()) {\n throw new Error(\"converge cursor missing namespace\");\n }\n const baseFiles: ConvergeCursorFileState[] = [];\n if (Array.isArray(obj.baseFiles)) {\n for (const item of obj.baseFiles) {\n if (item && typeof item === \"object\") {\n const fileItem = item as Record<string, unknown>;\n if (typeof fileItem.path === \"string\" && typeof fileItem.sha256 === \"string\") {\n baseFiles.push({\n path: fileItem.path,\n sha256: fileItem.sha256,\n mtimeMs: typeof fileItem.mtimeMs === \"number\" ? fileItem.mtimeMs : undefined,\n bytes: typeof fileItem.bytes === \"number\" ? fileItem.bytes : undefined,\n });\n }\n }\n }\n }\n const semanticAgreements: ReconcileSemanticAgreement[] = [];\n if (Array.isArray(obj.semanticAgreements)) {\n for (const item of obj.semanticAgreements) {\n if (!item || typeof item !== \"object\" || Array.isArray(item)) continue;\n const agreement = item as Record<string, unknown>;\n const local = normalizeSemanticFileState(agreement.local);\n const peer = normalizeSemanticFileState(agreement.peer);\n if (local && peer) semanticAgreements.push({ local, peer });\n }\n }\n const completedPaths: string[] = [];\n if (Array.isArray(obj.completedPaths)) {\n for (const item of obj.completedPaths) {\n if (typeof item === \"string\") {\n completedPaths.push(item);\n }\n }\n }\n const pendingRefreshes: ConvergeRefreshTarget[] = [];\n if (Array.isArray(obj.pendingRefreshes)) {\n if (obj.pendingRefreshes.includes(\"local\")) pendingRefreshes.push(\"local\");\n if (obj.pendingRefreshes.includes(\"receiver\")) pendingRefreshes.push(\"receiver\");\n }\n return {\n version: 1,\n peerUrl: obj.peerUrl.trim(),\n namespace: obj.namespace.trim(),\n lastConvergedAt: typeof obj.lastConvergedAt === \"string\" ? obj.lastConvergedAt : undefined,\n baseFiles,\n semanticAgreements,\n completedPaths,\n pendingRefreshes,\n };\n}\n\nexport async function readConvergeCursor(\n cursorPath: string,\n): Promise<ConvergeCursorState | null> {\n try {\n const raw = await fs.readFile(path.resolve(cursorPath), \"utf-8\");\n const parsed = JSON.parse(raw);\n return normalizeConvergeCursor(parsed);\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return null;\n return null;\n }\n}\n\nexport async function writeConvergeCursor(\n cursorPath: string,\n cursor: ConvergeCursorState,\n): Promise<void> {\n const normalized = normalizeConvergeCursor(cursor);\n const target = path.resolve(cursorPath);\n await fs.mkdir(path.dirname(target), { recursive: true });\n const tmp = path.join(\n path.dirname(target),\n `.converge-cursor.${process.pid}.${randomUUID()}.tmp`,\n );\n await fs.writeFile(tmp, JSON.stringify(normalized, null, 2) + \"\\n\", \"utf-8\");\n try {\n await fs.rename(tmp, target);\n } catch (error) {\n await fs.unlink(tmp).catch(() => {});\n throw error;\n }\n}\n\nexport async function markConvergeRefreshPending(\n cursorPath: string,\n options: {\n peerUrl: string;\n namespace: string;\n target: ConvergeRefreshTarget;\n },\n): Promise<void> {\n const current = await readConvergeCursor(cursorPath);\n const pendingRefreshes = new Set(current?.pendingRefreshes ?? []);\n pendingRefreshes.add(options.target);\n await writeConvergeCursor(cursorPath, {\n version: 1,\n peerUrl: current?.peerUrl ?? options.peerUrl,\n namespace: current?.namespace ?? options.namespace,\n lastConvergedAt: current?.lastConvergedAt,\n baseFiles: current?.baseFiles ?? [],\n semanticAgreements: current?.semanticAgreements ?? [],\n completedPaths: current?.completedPaths ?? [],\n pendingRefreshes: [...pendingRefreshes].sort(),\n });\n}\n\nexport async function clearConvergeRefreshPending(\n cursorPath: string,\n target: ConvergeRefreshTarget,\n): Promise<void> {\n const current = await readConvergeCursor(cursorPath);\n if (!current?.pendingRefreshes?.includes(target)) return;\n await writeConvergeCursor(cursorPath, {\n ...current,\n pendingRefreshes: current.pendingRefreshes.filter((pending) => pending !== target),\n });\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,YAAY,kBAAkB;AACvC,YAAY,QAAQ;AACpB,YAAY,UAAU;AA2Bf,SAAS,yBAAyB,SAAyB;AAChE,QAAM,UAAU,QAAQ,KAAK;AAC7B,MAAI;AACF,UAAM,MAAM,IAAI,IAAI,OAAO;AAC3B,QAAI,WAAW;AACf,QAAI,WAAW;AACf,QAAI,SAAS;AACb,QAAI,OAAO;AACX,QAAI,WAAW,IAAI,SAAS,QAAQ,QAAQ,EAAE;AAC9C,WAAO,IAAI,SAAS,EAAE,QAAQ,OAAO,EAAE;AAAA,EACzC,QAAQ;AACN,WAAO,QAAQ,QAAQ,QAAQ,EAAE;AAAA,EACnC;AACF;AAEO,SAAS,kBAAkB,SAAiB,WAA2B;AAC5E,QAAM,gBAAgB,yBAAyB,OAAO;AACtD,QAAM,eAAe,UAAU,KAAK,EAAE,YAAY;AAClD,SAAO,WAAW,QAAQ,EACvB,OAAO,GAAG,aAAa,KAAK,YAAY,EAAE,EAC1C,OAAO,KAAK,EACZ,MAAM,GAAG,EAAE;AAChB;AAEO,SAAS,0BACd,WACA,SACA,WACQ;AACR,QAAM,MAAM,kBAAkB,SAAS,SAAS;AAChD,SAAY,UAAU,aAAQ,SAAS,GAAG,WAAW,SAAS,oBAAoB,GAAG,GAAG,OAAO;AACjG;AAEA,SAAS,2BAA2B,OAA8D;AAChG,MAAI,CAAC,SAAS,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,EAAG,QAAO;AACxE,QAAM,OAAO;AACb,MAAI,OAAO,KAAK,SAAS,YAAY,OAAO,KAAK,WAAW,SAAU,QAAO;AAC7E,SAAO,EAAE,MA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AAI;AACF,UAAS,UAAO,KAAK,MAAM;AAAA,EAC7B,SAAS,OAAO;AACd,UAAS,UAAO,GAAG,EAAE,MAAM,MAAM;AAAA,IAAC,CAAC;AACnC,UAAM;AAAA,EACR;AACF;AAEA,eAAsB,2BACpB,YACA,SAKe;AACf,QAAM,UAAU,MAAM,mBAAmB,UAAU;AACnD,QAAM,mBAAmB,IAAI,IAAI,SAAS,oBAAoB,CAAC,CAAC;AAChE,mBAAiB,IAAI,QAAQ,MAAM;AACnC,QAAM,oBAAoB,YAAY;AAAA,IACpC,SAAS;AAAA,IACT,SAAS,SAAS,WAAW,QAAQ;AAAA,IACrC,WAAW,SAAS,aAAa,QAAQ;AAAA,IACzC,iBAAiB,SAAS;AAAA,IAC1B,WAAW,SAAS,aAAa,CAAC;AAAA,IAClC,oBAAoB,SAAS,sBAAsB,CAAC;AAAA,IACpD,gBAAgB,SAAS,kBAAkB,CAAC;AAAA,IAC5C,kBAAkB,CAAC,GAAG,gBAAgB,EAAE,KAAK;AAAA,EAC/C,CAAC;AACH;AAEA,eAAsB,4BACpB,YACA,QACe;AACf,QAAM,UAAU,MAAM,mBAAmB,UAAU;AACnD,MAAI,CAAC,SAAS,kBAAkB,SAAS,MAAM,EAAG;AAClD,QAAM,oBAAoB,YAAY;AAAA,IACpC,GAAG;AAAA,IACH,kBAAkB,QAAQ,iBAAiB,OAAO,CAAC,YAAY,YAAY,MAAM;AAAA,EACnF,CAAC;AACH;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/reconcile/cursor.ts"],"sourcesContent":["import { createHash, randomUUID } from \"node:crypto\";\nimport * as fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\nimport {\n type ReconcilePlanEntry,\n type ReconcileSemanticAgreement,\n semanticAgreementKey,\n} from \"./plan.js\";\n\nexport type ConvergeRefreshTarget = \"local\" | \"receiver\";\n\nexport interface ConvergeCursorFileState {\n path: string;\n sha256: string;\n mtimeMs?: number;\n bytes?: number;\n}\n\nexport interface ConvergeCursorState {\n version: 1;\n peerUrl: string;\n namespace: string;\n lastConvergedAt?: string;\n baseFiles: ConvergeCursorFileState[];\n semanticAgreements?: ReconcileSemanticAgreement[];\n completedPaths?: string[];\n pendingRefreshes?: ConvergeRefreshTarget[];\n}\n\n/**\n * Linear trailing-slash trim. `/\\/+$/` backtracks quadratically on long\n * slash runs that do not end in a slash (CodeQL js/polynomial-redos); a\n * bounded character loop cannot.\n */\nfunction stripTrailingSlashes(value: string): string {\n let end = value.length;\n while (end > 0 && value[end - 1] === \"/\") end -= 1;\n return end === value.length ? value : value.slice(0, end);\n}\n\nexport function normalizeConvergePeerUrl(peerUrl: string): string {\n const trimmed = peerUrl.trim();\n try {\n const url = new URL(trimmed);\n url.username = \"\";\n url.password = \"\";\n url.search = \"\";\n url.hash = \"\";\n url.pathname = stripTrailingSlashes(url.pathname);\n return url.toString().replace(/\\/$/, \"\");\n } catch {\n return stripTrailingSlashes(trimmed);\n }\n}\n\nexport function hashPeerNamespace(peerUrl: string, namespace: string): string {\n const normalizedUrl = normalizeConvergePeerUrl(peerUrl);\n const normalizedNs = namespace.trim().toLowerCase();\n return createHash(\"sha256\")\n .update(`${normalizedUrl}\\0${normalizedNs}`)\n .digest(\"hex\")\n .slice(0, 16);\n}\n\nexport function defaultConvergeCursorPath(\n memoryDir: string,\n peerUrl: string,\n namespace: string,\n): string {\n const key = hashPeerNamespace(peerUrl, namespace);\n return path.join(path.resolve(memoryDir), \".remnic\", \"state\", \"converge-cursors\", `${key}.json`);\n}\n\nfunction normalizeSemanticFileState(input: unknown): { path: string; sha256: string } | undefined {\n if (!input || typeof input !== \"object\" || Array.isArray(input)) return undefined;\n const file = input as Record<string, unknown>;\n if (typeof file.path !== \"string\" || typeof file.sha256 !== \"string\") return undefined;\n return { path: file.path, sha256: file.sha256 };\n}\n\nfunction digestAfterReconcile(entry: ReconcilePlanEntry): string | undefined {\n if (entry.action === \"push\") return entry.localSha256;\n if (entry.action === \"pull\") return entry.peerSha256;\n if (entry.action === \"conflict\") {\n if (entry.resolution === \"local-wins\") return entry.localSha256;\n if (entry.resolution === \"peer-wins\") return entry.peerSha256;\n return undefined;\n }\n if (entry.action !== \"identical\") return undefined;\n if (entry.localSha256 && entry.peerSha256 && entry.localSha256 !== entry.peerSha256) return undefined;\n return entry.localSha256 ?? entry.peerSha256;\n}\n\nexport function deriveConvergeCursorBase(\n entries: readonly ReconcilePlanEntry[],\n namespace: string,\n priorSemanticAgreements: readonly ReconcileSemanticAgreement[] = [],\n): Pick<ConvergeCursorState, \"baseFiles\" | \"semanticAgreements\"> {\n const baseFiles: ConvergeCursorFileState[] = [];\n const semanticAgreementsByPathPair = new Map(\n priorSemanticAgreements.map((agreement) => [semanticAgreementKey(agreement), agreement])\n );\n for (const entry of entries) {\n if (entry.namespace !== namespace) continue;\n if (entry.semanticAgreement) {\n semanticAgreementsByPathPair.set(semanticAgreementKey(entry.semanticAgreement), entry.semanticAgreement);\n continue;\n }\n const sha256 = digestAfterReconcile(entry);\n if (sha256) baseFiles.push({ path: entry.path, sha256 });\n }\n baseFiles.sort((left, right) => left.path.localeCompare(right.path));\n const semanticAgreements = [...semanticAgreementsByPathPair.values()];\n semanticAgreements.sort((left, right) =>\n left.local.path.localeCompare(right.local.path) || left.peer.path.localeCompare(right.peer.path)\n );\n return { baseFiles, semanticAgreements };\n}\n\nexport function normalizeConvergeCursor(input: unknown): ConvergeCursorState {\n if (!input || typeof input !== \"object\" || Array.isArray(input)) {\n throw new Error(\"converge cursor must be an object\");\n }\n const obj = input as Record<string, unknown>;\n if (obj.version !== 1) {\n throw new Error(\"converge cursor version must be 1\");\n }\n if (typeof obj.peerUrl !== \"string\" || !obj.peerUrl.trim()) {\n throw new Error(\"converge cursor missing peerUrl\");\n }\n if (typeof obj.namespace !== \"string\" || !obj.namespace.trim()) {\n throw new Error(\"converge cursor missing namespace\");\n }\n const baseFiles: ConvergeCursorFileState[] = [];\n if (Array.isArray(obj.baseFiles)) {\n for (const item of obj.baseFiles) {\n if (item && typeof item === \"object\") {\n const fileItem = item as Record<string, unknown>;\n if (typeof fileItem.path === \"string\" && typeof fileItem.sha256 === \"string\") {\n baseFiles.push({\n path: fileItem.path,\n sha256: fileItem.sha256,\n mtimeMs: typeof fileItem.mtimeMs === \"number\" ? fileItem.mtimeMs : undefined,\n bytes: typeof fileItem.bytes === \"number\" ? fileItem.bytes : undefined,\n });\n }\n }\n }\n }\n const semanticAgreements: ReconcileSemanticAgreement[] = [];\n if (Array.isArray(obj.semanticAgreements)) {\n for (const item of obj.semanticAgreements) {\n if (!item || typeof item !== \"object\" || Array.isArray(item)) continue;\n const agreement = item as Record<string, unknown>;\n const local = normalizeSemanticFileState(agreement.local);\n const peer = normalizeSemanticFileState(agreement.peer);\n if (local && peer) semanticAgreements.push({ local, peer });\n }\n }\n const completedPaths: string[] = [];\n if (Array.isArray(obj.completedPaths)) {\n for (const item of obj.completedPaths) {\n if (typeof item === \"string\") {\n completedPaths.push(item);\n }\n }\n }\n const pendingRefreshes: ConvergeRefreshTarget[] = [];\n if (Array.isArray(obj.pendingRefreshes)) {\n if (obj.pendingRefreshes.includes(\"local\")) pendingRefreshes.push(\"local\");\n if (obj.pendingRefreshes.includes(\"receiver\")) pendingRefreshes.push(\"receiver\");\n }\n return {\n version: 1,\n peerUrl: obj.peerUrl.trim(),\n namespace: obj.namespace.trim(),\n lastConvergedAt: typeof obj.lastConvergedAt === \"string\" ? obj.lastConvergedAt : undefined,\n baseFiles,\n semanticAgreements,\n completedPaths,\n pendingRefreshes,\n };\n}\n\nexport async function readConvergeCursor(\n cursorPath: string,\n): Promise<ConvergeCursorState | null> {\n try {\n const raw = await fs.readFile(path.resolve(cursorPath), \"utf-8\");\n const parsed = JSON.parse(raw);\n return normalizeConvergeCursor(parsed);\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return null;\n return null;\n }\n}\n\nexport async function writeConvergeCursor(\n cursorPath: string,\n cursor: ConvergeCursorState,\n): Promise<void> {\n const normalized = normalizeConvergeCursor(cursor);\n const target = path.resolve(cursorPath);\n await fs.mkdir(path.dirname(target), { recursive: true });\n const tmp = path.join(\n path.dirname(target),\n `.converge-cursor.${process.pid}.${randomUUID()}.tmp`,\n );\n await fs.writeFile(tmp, JSON.stringify(normalized, null, 2) + \"\\n\", \"utf-8\");\n try {\n await fs.rename(tmp, target);\n } catch (error) {\n await fs.unlink(tmp).catch(() => {});\n throw error;\n }\n}\n\nexport async function markConvergeRefreshPending(\n cursorPath: string,\n options: {\n peerUrl: string;\n namespace: string;\n target: ConvergeRefreshTarget;\n },\n): Promise<void> {\n const current = await readConvergeCursor(cursorPath);\n const pendingRefreshes = new Set(current?.pendingRefreshes ?? []);\n pendingRefreshes.add(options.target);\n await writeConvergeCursor(cursorPath, {\n version: 1,\n peerUrl: current?.peerUrl ?? options.peerUrl,\n namespace: current?.namespace ?? options.namespace,\n lastConvergedAt: current?.lastConvergedAt,\n baseFiles: current?.baseFiles ?? [],\n semanticAgreements: current?.semanticAgreements ?? [],\n completedPaths: current?.completedPaths ?? [],\n pendingRefreshes: [...pendingRefreshes].sort(),\n });\n}\n\nexport async function clearConvergeRefreshPending(\n cursorPath: string,\n target: ConvergeRefreshTarget,\n): Promise<void> {\n const current = await readConvergeCursor(cursorPath);\n if (!current?.pendingRefreshes?.includes(target)) return;\n await writeConvergeCursor(cursorPath, {\n ...current,\n pendingRefreshes: current.pendingRefreshes.filter((pending) => pending !== target),\n });\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,YAAY,kBAAkB;AACvC,YAAY,QAAQ;AACpB,YAAY,UAAU;AAgCtB,SAAS,qBAAqB,OAAuB;AACnD,MAAI,MAAM,MAAM;AAChB,SAAO,MAAM,KAAK,MAAM,MAAM,CAAC,MAAM,IAAK,QAAO;AACjD,SAAO,QAAQ,MAAM,SAAS,QAAQ,MAAM,MAAM,GAAG,GAAG;AAC1D;AAEO,SAAS,yBAAyB,SAAyB;AAChE,QAAM,UAAU,QAAQ,KAAK;AAC7B,MAAI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