@remnic/core 9.69.27 → 9.69.28
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 +21 -21
- package/dist/access-authorization-probe.d.ts +1 -1
- package/dist/access-authorization-probe.js +22 -22
- package/dist/access-boundary.d.ts +1 -1
- package/dist/access-boundary.js +21 -21
- package/dist/access-cli.js +73 -73
- package/dist/access-extraction-force-flush.d.ts +1 -1
- package/dist/access-extraction-force-flush.js +21 -21
- package/dist/access-http-briefing.d.ts +1 -1
- package/dist/access-http-briefing.js +22 -22
- 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 +23 -23
- package/dist/access-http.d.ts +2 -2
- package/dist/access-http.js +38 -38
- package/dist/access-identity-continuity-surface.js +21 -21
- package/dist/access-lcm-surface.d.ts +1 -1
- package/dist/access-lcm-surface.js +21 -21
- package/dist/access-mcp.d.ts +1 -1
- package/dist/access-mcp.js +29 -29
- package/dist/access-namespace-preflight.js +21 -21
- package/dist/access-observe-write-surface.d.ts +1 -1
- package/dist/access-observe-write-surface.js +21 -21
- package/dist/access-operations-batch.js +23 -23
- package/dist/access-operations.d.ts +6 -6
- package/dist/access-operations.js +28 -28
- package/dist/access-recall-concurrency.d.ts +1 -1
- package/dist/access-recall-concurrency.js +21 -21
- package/dist/access-recall-response.d.ts +1 -1
- package/dist/access-recall-response.js +21 -21
- package/dist/access-recall-surface.d.ts +1 -1
- package/dist/access-recall-surface.js +21 -21
- package/dist/access-schema.d.ts +91 -91
- package/dist/access-schema.js +3 -3
- package/dist/access-service-helpers.d.ts +1 -1
- package/dist/access-service.d.ts +1 -1
- package/dist/access-service.js +21 -21
- package/dist/access-surface-catalog.d.ts +1 -1
- package/dist/access-surface-catalog.js +23 -23
- package/dist/briefing.js +8 -8
- package/dist/buffer.js +4 -4
- package/dist/{capsule-crypto-YO5QJ6L3.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/causal-consolidation.js +9 -9
- package/dist/{chunk-N3ZOP7KC.js → chunk-2AMEUKCG.js} +2 -2
- package/dist/{chunk-BXLOS5AJ.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/{chunk-MWN6QEI2.js → chunk-2YDWI2LO.js} +2 -2
- package/dist/{chunk-6XL73HQ4.js → chunk-3FEH4C4V.js} +1 -1
- package/dist/{chunk-ZUNNRGJX.js → chunk-4KMGFWQY.js} +7 -7
- package/dist/{chunk-R7RTXEYG.js → chunk-4P43SE4H.js} +2 -2
- package/dist/{chunk-U6N5IBVY.js → chunk-5ISVONB7.js} +2 -2
- package/dist/{chunk-OEYZXDQI.js → chunk-5KND6CSX.js} +2 -2
- package/dist/{chunk-AQ7SYDVO.js → chunk-5PTRLTK2.js} +2 -2
- package/dist/{chunk-FHYVNJBN.js → chunk-6TZWGQTT.js} +2 -2
- package/dist/{chunk-VDX2J7OX.js → chunk-7LCGFUMB.js} +4 -4
- package/dist/{chunk-227UFSEQ.js → chunk-7RZJWZ46.js} +5 -5
- package/dist/{chunk-GHTSNGBZ.js → chunk-ALBYEXFX.js} +2 -2
- package/dist/{chunk-Y2MZGBOY.js → chunk-BHHONFSK.js} +2 -2
- package/dist/{chunk-ZO2AZIRT.js → chunk-BIVJCVT2.js} +2 -2
- package/dist/{chunk-CEH2AFXG.js → chunk-C24UZSFW.js} +6 -6
- package/dist/{chunk-MZLV2OJE.js → chunk-C6XEXTSJ.js} +34 -34
- package/dist/{chunk-QBH7M7Q4.js → chunk-COUYFFID.js} +2 -2
- package/dist/{chunk-V4ZBR7CW.js → chunk-EIJR4PZL.js} +3 -3
- package/dist/{chunk-TVEONGBU.js → chunk-EZKSOM5K.js} +2 -2
- package/dist/{chunk-SJDQ5RSN.js → chunk-GC65K6DI.js} +3 -3
- package/dist/{chunk-6NXSYYGP.js → chunk-HLTAZTN7.js} +2 -2
- package/dist/{chunk-E2P7TZTF.js → chunk-HTPQJ32S.js} +2 -2
- package/dist/{chunk-MY5EDR46.js → chunk-I3OQBP23.js} +2 -2
- package/dist/{chunk-QOOBICJF.js → chunk-IE57QQSZ.js} +2 -2
- package/dist/{chunk-ZY4DSWZ5.js → chunk-IES4QHLM.js} +4 -4
- package/dist/{chunk-2EKJDQZB.js → chunk-INBOGQ3E.js} +2 -2
- package/dist/{chunk-3GGUMRS4.js → chunk-MSSJSC2V.js} +2 -2
- package/dist/{chunk-KH6PK4EQ.js → chunk-MYB6DWE5.js} +6 -6
- package/dist/{chunk-WJHGDE7X.js → chunk-NC7RM2XS.js} +2 -2
- package/dist/{chunk-W24T5YMW.js → chunk-NOPN47AL.js} +2 -2
- package/dist/{chunk-RX3SC4C5.js → chunk-NVOFMARR.js} +2 -2
- package/dist/{chunk-JJ4XK25O.js → chunk-OMLGLMWL.js} +7 -7
- package/dist/{chunk-46ZPIGWI.js → chunk-OVAJKCN3.js} +2 -2
- package/dist/{chunk-EOQ6FSQP.js → chunk-OYHGTHVX.js} +2 -2
- package/dist/{chunk-5ATKSPEQ.js → chunk-PKS56ZRR.js} +2 -2
- package/dist/{chunk-6LLLREDJ.js → chunk-QW3FMKT2.js} +2 -2
- package/dist/{chunk-OU4K7IFP.js → chunk-R55WAWS3.js} +12 -12
- package/dist/{chunk-SO4IYSGT.js → chunk-R5T5FB2R.js} +40 -40
- package/dist/{chunk-6CVNSDCZ.js → chunk-RFWEDCRC.js} +3 -3
- package/dist/{chunk-FQ7HAWWC.js → chunk-RZN4LQ5Y.js} +17 -2
- package/dist/{chunk-FQ7HAWWC.js.map → chunk-RZN4LQ5Y.js.map} +1 -1
- package/dist/{chunk-GNMELJGM.js → chunk-S2DU3UBN.js} +4 -4
- package/dist/{chunk-VVX5PZFS.js → chunk-TDYAIXHK.js} +5 -5
- package/dist/{chunk-KAXCYM66.js → chunk-U6S754L6.js} +2 -2
- package/dist/{chunk-XM24CDZX.js → chunk-UEEN7GXR.js} +2 -2
- package/dist/{chunk-XSGUMQQQ.js → chunk-UY2RORVF.js} +2 -2
- package/dist/{chunk-THQTFTQS.js → chunk-UY7VPC6Q.js} +15 -15
- package/dist/{chunk-3NYTZE5G.js → chunk-W7OU4I3Y.js} +2 -2
- package/dist/{chunk-6VF3R3XQ.js → chunk-WFZBRS6N.js} +2 -2
- package/dist/{chunk-RBCQVOVJ.js → chunk-WOOTZ6DH.js} +3 -3
- package/dist/{chunk-DDB3S53L.js → chunk-WW3MR6T3.js} +2 -2
- package/dist/{chunk-2L5FSNPC.js → chunk-X2NFFBTO.js} +7 -7
- package/dist/{chunk-DQEMWVMT.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-XTJC7CVX.js → chunk-XR67IAXP.js} +2 -2
- package/dist/{chunk-5IEV3YBY.js → chunk-YFDJVB2K.js} +2 -2
- package/dist/{chunk-4TKJGOCJ.js → chunk-YGTSOVCR.js} +2 -2
- package/dist/{chunk-UCKYTA2T.js → chunk-YIHKAUS4.js} +3 -3
- package/dist/{chunk-WMLEPWMO.js → chunk-YJETZFLJ.js} +2 -2
- package/dist/{chunk-CGJV2YIY.js → chunk-Z5XE7AMC.js} +2 -2
- package/dist/{chunk-2Z4GS5E6.js → chunk-ZMNT26KV.js} +2 -2
- package/dist/{chunk-JEC4DVM3.js → chunk-ZNR5SVUI.js} +3 -3
- package/dist/{cli-DD0P-lu8.d.ts → cli-BqMNkQn5.d.ts} +1 -1
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +52 -52
- package/dist/coding/export-okf-codegraph.js +8 -8
- package/dist/compounding/engine.js +8 -8
- package/dist/connectors/codex-materialize-runner.js +8 -8
- package/dist/connectors/index.js +8 -8
- package/dist/convergence-refresh.js +10 -10
- package/dist/conversation-index/backend.js +2 -2
- package/dist/corpus-watermark.js +10 -10
- package/dist/deep-recall-http-glue.d.ts +1 -1
- package/dist/deep-recall-http-glue.js +4 -4
- package/dist/deep-recall-mcp-tools.d.ts +1 -1
- package/dist/entity-retrieval.js +8 -8
- package/dist/external-wiki-access.d.ts +1 -1
- package/dist/external-wiki-access.js +22 -22
- package/dist/external-wiki-mcp-tools.d.ts +1 -1
- package/dist/extraction.js +11 -11
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/http-retry.d.ts +83 -0
- package/dist/http-retry.js +101 -0
- package/dist/http-retry.js.map +1 -0
- package/dist/importers/index.d.ts +21 -1
- package/dist/importers/index.js +3 -1
- package/dist/importers/test-utils.d.ts +24 -0
- package/dist/importers/test-utils.js +31 -0
- package/dist/importers/test-utils.js.map +1 -0
- package/dist/index.d.ts +679 -679
- package/dist/index.js +93 -91
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.js +6 -6
- package/dist/location/index.js +10 -10
- package/dist/maintenance/memory-governance.js +8 -8
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +8 -8
- package/dist/maintenance/rebuild-memory-projection.js +9 -9
- 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/namespaces/migrate.js +9 -9
- package/dist/namespaces/search.js +6 -6
- package/dist/namespaces/storage.js +8 -8
- package/dist/operator-doctor-corpus.js +11 -11
- package/dist/operator-toolkit.js +16 -16
- package/dist/orchestration/maintenance.js +16 -16
- package/dist/orchestrator.js +74 -74
- package/dist/{public-http-C4i8Opxc.d.ts → public-http-ByX2eTla.d.ts} +1 -1
- package/dist/qmd.js +4 -4
- package/dist/schemas.d.ts +152 -152
- package/dist/search/factory.js +5 -5
- package/dist/search/index.js +5 -5
- package/dist/semantic-consolidation.js +9 -9
- package/dist/semantic-rule-promotion.js +8 -8
- package/dist/semantic-rule-verifier.js +8 -8
- package/dist/shared-context/manager.d.ts +6 -6
- package/dist/source-agent-qualifier.js +10 -10
- package/dist/standup/build.js +8 -8
- package/dist/storage.js +7 -7
- package/dist/support-passport/index.d.ts +4 -4
- package/dist/support-passport/index.js +24 -24
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/export-okf.js +9 -9
- package/dist/transfer/types.d.ts +78 -78
- package/dist/verified-recall.js +8 -8
- package/dist/who-knows-cli.d.ts +1 -1
- package/dist/who-knows-cli.js +9 -9
- package/dist/who-knows.d.ts +1 -1
- package/dist/who-knows.js +8 -8
- package/package.json +22 -2
- package/src/http-retry.test.ts +281 -0
- package/src/http-retry.ts +183 -0
- package/src/importers/base.ts +45 -0
- package/src/importers/index.test.ts +42 -0
- package/src/importers/index.ts +5 -0
- package/src/importers/test-utils.ts +44 -0
- package/src/index.ts +3 -0
- package/dist/{access-service-DWdY9Mlk.d.ts → access-service-GrdVg_-Z.d.ts} +58 -58
- /package/dist/{capsule-crypto-YO5QJ6L3.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{chunk-N3ZOP7KC.js.map → chunk-2AMEUKCG.js.map} +0 -0
- /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-MWN6QEI2.js.map → chunk-2YDWI2LO.js.map} +0 -0
- /package/dist/{chunk-6XL73HQ4.js.map → chunk-3FEH4C4V.js.map} +0 -0
- /package/dist/{chunk-ZUNNRGJX.js.map → chunk-4KMGFWQY.js.map} +0 -0
- /package/dist/{chunk-R7RTXEYG.js.map → chunk-4P43SE4H.js.map} +0 -0
- /package/dist/{chunk-U6N5IBVY.js.map → chunk-5ISVONB7.js.map} +0 -0
- /package/dist/{chunk-OEYZXDQI.js.map → chunk-5KND6CSX.js.map} +0 -0
- /package/dist/{chunk-AQ7SYDVO.js.map → chunk-5PTRLTK2.js.map} +0 -0
- /package/dist/{chunk-FHYVNJBN.js.map → chunk-6TZWGQTT.js.map} +0 -0
- /package/dist/{chunk-VDX2J7OX.js.map → chunk-7LCGFUMB.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-7RZJWZ46.js.map} +0 -0
- /package/dist/{chunk-GHTSNGBZ.js.map → chunk-ALBYEXFX.js.map} +0 -0
- /package/dist/{chunk-Y2MZGBOY.js.map → chunk-BHHONFSK.js.map} +0 -0
- /package/dist/{chunk-ZO2AZIRT.js.map → chunk-BIVJCVT2.js.map} +0 -0
- /package/dist/{chunk-CEH2AFXG.js.map → chunk-C24UZSFW.js.map} +0 -0
- /package/dist/{chunk-MZLV2OJE.js.map → chunk-C6XEXTSJ.js.map} +0 -0
- /package/dist/{chunk-QBH7M7Q4.js.map → chunk-COUYFFID.js.map} +0 -0
- /package/dist/{chunk-V4ZBR7CW.js.map → chunk-EIJR4PZL.js.map} +0 -0
- /package/dist/{chunk-TVEONGBU.js.map → chunk-EZKSOM5K.js.map} +0 -0
- /package/dist/{chunk-SJDQ5RSN.js.map → chunk-GC65K6DI.js.map} +0 -0
- /package/dist/{chunk-6NXSYYGP.js.map → chunk-HLTAZTN7.js.map} +0 -0
- /package/dist/{chunk-E2P7TZTF.js.map → chunk-HTPQJ32S.js.map} +0 -0
- /package/dist/{chunk-MY5EDR46.js.map → chunk-I3OQBP23.js.map} +0 -0
- /package/dist/{chunk-QOOBICJF.js.map → chunk-IE57QQSZ.js.map} +0 -0
- /package/dist/{chunk-ZY4DSWZ5.js.map → chunk-IES4QHLM.js.map} +0 -0
- /package/dist/{chunk-2EKJDQZB.js.map → chunk-INBOGQ3E.js.map} +0 -0
- /package/dist/{chunk-3GGUMRS4.js.map → chunk-MSSJSC2V.js.map} +0 -0
- /package/dist/{chunk-KH6PK4EQ.js.map → chunk-MYB6DWE5.js.map} +0 -0
- /package/dist/{chunk-WJHGDE7X.js.map → chunk-NC7RM2XS.js.map} +0 -0
- /package/dist/{chunk-W24T5YMW.js.map → chunk-NOPN47AL.js.map} +0 -0
- /package/dist/{chunk-RX3SC4C5.js.map → chunk-NVOFMARR.js.map} +0 -0
- /package/dist/{chunk-JJ4XK25O.js.map → chunk-OMLGLMWL.js.map} +0 -0
- /package/dist/{chunk-46ZPIGWI.js.map → chunk-OVAJKCN3.js.map} +0 -0
- /package/dist/{chunk-EOQ6FSQP.js.map → chunk-OYHGTHVX.js.map} +0 -0
- /package/dist/{chunk-5ATKSPEQ.js.map → chunk-PKS56ZRR.js.map} +0 -0
- /package/dist/{chunk-6LLLREDJ.js.map → chunk-QW3FMKT2.js.map} +0 -0
- /package/dist/{chunk-OU4K7IFP.js.map → chunk-R55WAWS3.js.map} +0 -0
- /package/dist/{chunk-SO4IYSGT.js.map → chunk-R5T5FB2R.js.map} +0 -0
- /package/dist/{chunk-6CVNSDCZ.js.map → chunk-RFWEDCRC.js.map} +0 -0
- /package/dist/{chunk-GNMELJGM.js.map → chunk-S2DU3UBN.js.map} +0 -0
- /package/dist/{chunk-VVX5PZFS.js.map → chunk-TDYAIXHK.js.map} +0 -0
- /package/dist/{chunk-KAXCYM66.js.map → chunk-U6S754L6.js.map} +0 -0
- /package/dist/{chunk-XM24CDZX.js.map → chunk-UEEN7GXR.js.map} +0 -0
- /package/dist/{chunk-XSGUMQQQ.js.map → chunk-UY2RORVF.js.map} +0 -0
- /package/dist/{chunk-THQTFTQS.js.map → chunk-UY7VPC6Q.js.map} +0 -0
- /package/dist/{chunk-3NYTZE5G.js.map → chunk-W7OU4I3Y.js.map} +0 -0
- /package/dist/{chunk-6VF3R3XQ.js.map → chunk-WFZBRS6N.js.map} +0 -0
- /package/dist/{chunk-RBCQVOVJ.js.map → chunk-WOOTZ6DH.js.map} +0 -0
- /package/dist/{chunk-DDB3S53L.js.map → chunk-WW3MR6T3.js.map} +0 -0
- /package/dist/{chunk-2L5FSNPC.js.map → chunk-X2NFFBTO.js.map} +0 -0
- /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-XTJC7CVX.js.map → chunk-XR67IAXP.js.map} +0 -0
- /package/dist/{chunk-5IEV3YBY.js.map → chunk-YFDJVB2K.js.map} +0 -0
- /package/dist/{chunk-4TKJGOCJ.js.map → chunk-YGTSOVCR.js.map} +0 -0
- /package/dist/{chunk-UCKYTA2T.js.map → chunk-YIHKAUS4.js.map} +0 -0
- /package/dist/{chunk-WMLEPWMO.js.map → chunk-YJETZFLJ.js.map} +0 -0
- /package/dist/{chunk-CGJV2YIY.js.map → chunk-Z5XE7AMC.js.map} +0 -0
- /package/dist/{chunk-2Z4GS5E6.js.map → chunk-ZMNT26KV.js.map} +0 -0
- /package/dist/{chunk-JEC4DVM3.js.map → chunk-ZNR5SVUI.js.map} +0 -0
|
@@ -7,22 +7,22 @@ import {
|
|
|
7
7
|
syncWearableSource,
|
|
8
8
|
wearableSourceLabel
|
|
9
9
|
} from "./chunk-PAZY2ZKP.js";
|
|
10
|
-
import {
|
|
11
|
-
runPeerProfileReasoner
|
|
12
|
-
} from "./chunk-I74SUMNI.js";
|
|
13
10
|
import {
|
|
14
11
|
CompressionGuidelineCoordinator
|
|
15
12
|
} from "./chunk-UXREWVW4.js";
|
|
16
13
|
import {
|
|
17
14
|
ActivityStore,
|
|
18
15
|
MaintenanceScheduler
|
|
19
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4KMGFWQY.js";
|
|
17
|
+
import {
|
|
18
|
+
runPeerProfileReasoner
|
|
19
|
+
} from "./chunk-I74SUMNI.js";
|
|
20
20
|
import {
|
|
21
21
|
migrateFromEngram
|
|
22
22
|
} from "./chunk-7HYPN2GC.js";
|
|
23
23
|
import {
|
|
24
24
|
LcmEngine
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-X2NFFBTO.js";
|
|
26
26
|
import {
|
|
27
27
|
chunkTranscriptEntries
|
|
28
28
|
} from "./chunk-TECVW3JP.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
CompoundingEngine,
|
|
34
34
|
defaultTierMigrationCycleBudget
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UEEN7GXR.js";
|
|
36
36
|
import {
|
|
37
37
|
SharedContextManager
|
|
38
38
|
} from "./chunk-IN673LEP.js";
|
|
@@ -41,9 +41,15 @@ import {
|
|
|
41
41
|
applyUtilityRankingRuntimeDelta,
|
|
42
42
|
loadUtilityRuntimeValues
|
|
43
43
|
} from "./chunk-SWIKABKI.js";
|
|
44
|
+
import {
|
|
45
|
+
extractTopics
|
|
46
|
+
} from "./chunk-KVDUKH5E.js";
|
|
44
47
|
import {
|
|
45
48
|
cleanArchivedUserMessage
|
|
46
49
|
} from "./chunk-47DU4SGJ.js";
|
|
50
|
+
import {
|
|
51
|
+
CODEX_THREAD_KEY_PREFIX
|
|
52
|
+
} from "./chunk-4EX5WZ4M.js";
|
|
47
53
|
import {
|
|
48
54
|
TierMigrationExecutor
|
|
49
55
|
} from "./chunk-YRFAYOFQ.js";
|
|
@@ -53,19 +59,13 @@ import {
|
|
|
53
59
|
import {
|
|
54
60
|
TmtBuilder
|
|
55
61
|
} from "./chunk-ECZU5BJH.js";
|
|
56
|
-
import {
|
|
57
|
-
extractTopics
|
|
58
|
-
} from "./chunk-KVDUKH5E.js";
|
|
59
|
-
import {
|
|
60
|
-
buildTemporalTimelineRecallSection
|
|
61
|
-
} from "./chunk-2NKY7OC6.js";
|
|
62
|
-
import {
|
|
63
|
-
CODEX_THREAD_KEY_PREFIX
|
|
64
|
-
} from "./chunk-4EX5WZ4M.js";
|
|
65
62
|
import {
|
|
66
63
|
buildTargetedFactRecallSection,
|
|
67
64
|
shouldRecallTargetedFactEvidence
|
|
68
65
|
} from "./chunk-T67LUYCR.js";
|
|
66
|
+
import {
|
|
67
|
+
buildTemporalTimelineRecallSection
|
|
68
|
+
} from "./chunk-2NKY7OC6.js";
|
|
69
69
|
import {
|
|
70
70
|
SessionObserverState
|
|
71
71
|
} from "./chunk-ODZKV2F7.js";
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
} from "./chunk-XXSOVESA.js";
|
|
154
154
|
import {
|
|
155
155
|
ExtractionEngine
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-WW3MR6T3.js";
|
|
157
157
|
import {
|
|
158
158
|
parseMemoryActionEligibilityContext
|
|
159
159
|
} from "./chunk-AJTG3CP7.js";
|
|
@@ -191,7 +191,7 @@ import {
|
|
|
191
191
|
buildEntityRecallSection,
|
|
192
192
|
entityRecentTranscriptLookbackHours,
|
|
193
193
|
readRecentEntityTranscriptEntries
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-YGTSOVCR.js";
|
|
195
195
|
import {
|
|
196
196
|
tryDirectAnswer
|
|
197
197
|
} from "./chunk-VY47VI2T.js";
|
|
@@ -203,7 +203,7 @@ import {
|
|
|
203
203
|
} from "./chunk-LVXBC6YB.js";
|
|
204
204
|
import {
|
|
205
205
|
refreshConvergedNamespaces
|
|
206
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-HLTAZTN7.js";
|
|
207
207
|
import {
|
|
208
208
|
builtInConnectorPackageSpecifier,
|
|
209
209
|
ensureBuiltInWearableConnectors,
|
|
@@ -212,24 +212,24 @@ import {
|
|
|
212
212
|
runTimelinePublishCli,
|
|
213
213
|
screenCandidateFact,
|
|
214
214
|
summarizeVaultPublish
|
|
215
|
-
} from "./chunk-
|
|
216
|
-
import {
|
|
217
|
-
normalizeReplaySessionKey
|
|
218
|
-
} from "./chunk-AJVLDJU6.js";
|
|
215
|
+
} from "./chunk-C6XEXTSJ.js";
|
|
219
216
|
import {
|
|
220
217
|
RoutingRulesStore
|
|
221
218
|
} from "./chunk-TBUEE7XF.js";
|
|
219
|
+
import {
|
|
220
|
+
normalizeReplaySessionKey
|
|
221
|
+
} from "./chunk-AJVLDJU6.js";
|
|
222
222
|
import {
|
|
223
223
|
compareVerifiedEpisodeResults,
|
|
224
224
|
searchVerifiedEpisodes
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-4P43SE4H.js";
|
|
226
226
|
import {
|
|
227
227
|
ThreadingManager
|
|
228
228
|
} from "./chunk-OJP3N7UK.js";
|
|
229
229
|
import {
|
|
230
230
|
compareVerifiedSemanticRuleResults,
|
|
231
231
|
searchVerifiedSemanticRules
|
|
232
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-PKS56ZRR.js";
|
|
233
233
|
import {
|
|
234
234
|
searchWorkProductLedgerEntries
|
|
235
235
|
} from "./chunk-G7NYVKD6.js";
|
|
@@ -242,10 +242,10 @@ import {
|
|
|
242
242
|
import {
|
|
243
243
|
runNamespaceMaintenanceFanout,
|
|
244
244
|
summarizeNamespaceMaintenanceHealth
|
|
245
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-OMLGLMWL.js";
|
|
246
246
|
import {
|
|
247
247
|
planNamespaceMaintenance
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-GC65K6DI.js";
|
|
249
249
|
import {
|
|
250
250
|
isAboveImportanceThreshold,
|
|
251
251
|
scoreImportance
|
|
@@ -274,7 +274,7 @@ import {
|
|
|
274
274
|
materializeAfterSemanticConsolidation,
|
|
275
275
|
parseConsolidationResponse,
|
|
276
276
|
parseOperatorAwareConsolidationResponse
|
|
277
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-NOPN47AL.js";
|
|
278
278
|
import {
|
|
279
279
|
BoxBuilder
|
|
280
280
|
} from "./chunk-B7RWBZXW.js";
|
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
} from "./chunk-6TBIWIAG.js";
|
|
287
287
|
import {
|
|
288
288
|
SmartBuffer
|
|
289
|
-
} from "./chunk-
|
|
289
|
+
} from "./chunk-BHHONFSK.js";
|
|
290
290
|
import {
|
|
291
291
|
REFUSED_MERGE_CATEGORIES,
|
|
292
292
|
applyNoveltyGate,
|
|
@@ -327,7 +327,7 @@ import {
|
|
|
327
327
|
} from "./chunk-MI2OTWV5.js";
|
|
328
328
|
import {
|
|
329
329
|
MeetingsInputError
|
|
330
|
-
} from "./chunk-
|
|
330
|
+
} from "./chunk-UY7VPC6Q.js";
|
|
331
331
|
import {
|
|
332
332
|
WearablesInputError,
|
|
333
333
|
describeErrorForOperator
|
|
@@ -345,7 +345,7 @@ import {
|
|
|
345
345
|
} from "./chunk-DGS34QSY.js";
|
|
346
346
|
import {
|
|
347
347
|
NamespaceCatalog
|
|
348
|
-
} from "./chunk-
|
|
348
|
+
} from "./chunk-IE57QQSZ.js";
|
|
349
349
|
import {
|
|
350
350
|
RecallResultFormatter,
|
|
351
351
|
SessionContextCoordinator,
|
|
@@ -357,10 +357,10 @@ import {
|
|
|
357
357
|
isTopLevelArchivePath,
|
|
358
358
|
journalPath,
|
|
359
359
|
writeJournalFile
|
|
360
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-R55WAWS3.js";
|
|
361
361
|
import {
|
|
362
362
|
importCapsule
|
|
363
|
-
} from "./chunk-
|
|
363
|
+
} from "./chunk-TDYAIXHK.js";
|
|
364
364
|
import {
|
|
365
365
|
isCodingGraphInstalled
|
|
366
366
|
} from "./chunk-VQ7B2Q6M.js";
|
|
@@ -393,7 +393,7 @@ import {
|
|
|
393
393
|
} from "./chunk-HM7RHKS4.js";
|
|
394
394
|
import {
|
|
395
395
|
searchHarmonicRetrieval
|
|
396
|
-
} from "./chunk-
|
|
396
|
+
} from "./chunk-3FEH4C4V.js";
|
|
397
397
|
import {
|
|
398
398
|
ProfilingCollector
|
|
399
399
|
} from "./chunk-NLE6TSLG.js";
|
|
@@ -423,7 +423,7 @@ import {
|
|
|
423
423
|
} from "./chunk-BMWN7B3Y.js";
|
|
424
424
|
import {
|
|
425
425
|
NamespaceStorageRouter
|
|
426
|
-
} from "./chunk-
|
|
426
|
+
} from "./chunk-HTPQJ32S.js";
|
|
427
427
|
import {
|
|
428
428
|
GraphIndex
|
|
429
429
|
} from "./chunk-5FAGCOZD.js";
|
|
@@ -432,7 +432,7 @@ import {
|
|
|
432
432
|
} from "./chunk-GKCXTSFF.js";
|
|
433
433
|
import {
|
|
434
434
|
buildChainFollowupGenerator
|
|
435
|
-
} from "./chunk-
|
|
435
|
+
} from "./chunk-NC7RM2XS.js";
|
|
436
436
|
import {
|
|
437
437
|
QmdResultResolver,
|
|
438
438
|
StorageManager,
|
|
@@ -451,7 +451,7 @@ import {
|
|
|
451
451
|
reconstructFusionInputs,
|
|
452
452
|
selfDeps,
|
|
453
453
|
serializeFusionDay
|
|
454
|
-
} from "./chunk-
|
|
454
|
+
} from "./chunk-UY2RORVF.js";
|
|
455
455
|
import {
|
|
456
456
|
bodyIsEscaped,
|
|
457
457
|
decodeTranscriptBody,
|
|
@@ -468,12 +468,12 @@ import {
|
|
|
468
468
|
import {
|
|
469
469
|
NamespaceSearchRouter,
|
|
470
470
|
namespaceCollectionName
|
|
471
|
-
} from "./chunk-
|
|
471
|
+
} from "./chunk-ZMNT26KV.js";
|
|
472
472
|
import {
|
|
473
473
|
createConversationIndexRuntime,
|
|
474
474
|
createSearchBackend,
|
|
475
475
|
isSearchBackendEnabled
|
|
476
|
-
} from "./chunk-
|
|
476
|
+
} from "./chunk-RFWEDCRC.js";
|
|
477
477
|
import {
|
|
478
478
|
NoopSearchBackend
|
|
479
479
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -577,7 +577,7 @@ import {
|
|
|
577
577
|
throwIfRecallAborted,
|
|
578
578
|
tokenizeRecallQuery,
|
|
579
579
|
utcDateKeysForLocalDay
|
|
580
|
-
} from "./chunk-
|
|
580
|
+
} from "./chunk-6TZWGQTT.js";
|
|
581
581
|
import {
|
|
582
582
|
inferIntentFromText,
|
|
583
583
|
intentCompatibilityScore,
|
|
@@ -30734,4 +30734,4 @@ export {
|
|
|
30734
30734
|
blendGraphExpandedRecallScore,
|
|
30735
30735
|
Orchestrator
|
|
30736
30736
|
};
|
|
30737
|
-
//# sourceMappingURL=chunk-
|
|
30737
|
+
//# sourceMappingURL=chunk-R5T5FB2R.js.map
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
} from "./chunk-6KTXE6A3.js";
|
|
19
19
|
import {
|
|
20
20
|
createConversationIndexBackend
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7RZJWZ46.js";
|
|
22
22
|
import {
|
|
23
23
|
FaissConversationIndexAdapter
|
|
24
24
|
} from "./chunk-ET356KSB.js";
|
|
25
25
|
import {
|
|
26
26
|
QmdClient
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-C24UZSFW.js";
|
|
28
28
|
import {
|
|
29
29
|
resolveIndexingCapabilities,
|
|
30
30
|
resolvePipelineProcessingCapabilities,
|
|
@@ -179,4 +179,4 @@ export {
|
|
|
179
179
|
createConversationSearchBackend,
|
|
180
180
|
createConversationIndexRuntime
|
|
181
181
|
};
|
|
182
|
-
//# sourceMappingURL=chunk-
|
|
182
|
+
//# sourceMappingURL=chunk-RFWEDCRC.js.map
|
|
@@ -158,6 +158,20 @@ async function defaultWriteMemoriesToOrchestrator(target, memories) {
|
|
|
158
158
|
await target.ingestBulkImportBatch(turns);
|
|
159
159
|
return { memoriesIngested: memories.length };
|
|
160
160
|
}
|
|
161
|
+
function defineFileImporterAdapter(definition) {
|
|
162
|
+
return {
|
|
163
|
+
name: definition.name,
|
|
164
|
+
sourceLabel: definition.sourceLabel,
|
|
165
|
+
parse(input, options) {
|
|
166
|
+
return definition.parse(input, {
|
|
167
|
+
...options?.strict !== void 0 ? { strict: options.strict } : {},
|
|
168
|
+
...options?.filePath !== void 0 ? { filePath: options.filePath } : {}
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
transform: (parsed, options) => definition.transform(parsed, options),
|
|
172
|
+
writeTo: defaultWriteMemoriesToOrchestrator
|
|
173
|
+
};
|
|
174
|
+
}
|
|
161
175
|
|
|
162
176
|
export {
|
|
163
177
|
DEFAULT_IMPORT_BATCH_SIZE,
|
|
@@ -165,6 +179,7 @@ export {
|
|
|
165
179
|
validateImportRateLimit,
|
|
166
180
|
importedMemoryToTurn,
|
|
167
181
|
runImporter,
|
|
168
|
-
defaultWriteMemoriesToOrchestrator
|
|
182
|
+
defaultWriteMemoriesToOrchestrator,
|
|
183
|
+
defineFileImporterAdapter
|
|
169
184
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
185
|
+
//# sourceMappingURL=chunk-RZN4LQ5Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/importers/base.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Shared importer base (issue #568)\n// ---------------------------------------------------------------------------\n//\n// The importer adapters defined by issue #568 (`@remnic/import-chatgpt`,\n// `@remnic/import-claude`, `@remnic/import-gemini`, `@remnic/import-mem0`) all\n// follow the same three-step shape:\n//\n// 1. parse(input) — turn a raw file / API payload into a\n// source-specific intermediate structure.\n// 2. transform(parsed) — flatten that structure into a uniform list of\n// `ImportedMemory` records with provenance\n// attached (sourceLabel, importedFromPath,\n// importedAt).\n// 3. writeTo(orchestrator) — hand each memory to the orchestrator via\n// `ingestBulkImportBatch`. Dry-run mode stops\n// after transform() and never calls writeTo().\n//\n// This file defines the shared `ImporterAdapter` interface plus a thin\n// `runImporter` helper that handles batching, dry-run plan reporting, and\n// progress callbacks so every adapter does not reimplement the same loop.\n//\n// The existing lower-level `BulkImportSourceAdapter` (weclone-shaped: produces\n// turn-structured transcripts) remains untouched and continues to drive\n// `runBulkImportCliCommand`. Importer adapters are the higher-level surface\n// intended for the four memory sources in #568 — they emit *memories*\n// (intent-level content) rather than raw conversation turns.\n\nimport { validateImportTurn, type ImportTurn } from \"../bulk-import/types.js\";\n\n/**\n * A single imported memory record with provenance.\n *\n * Every importer MUST attach a truthful `sourceLabel` (e.g. `\"chatgpt\"`,\n * `\"claude\"`, `\"gemini\"`, `\"mem0\"`) and MAY attach the export's origin path or\n * URL in `importedFromPath`. `importedAt` is always set by `runImporter` so\n * adapters do not need to timestamp records themselves.\n */\nexport interface ImportedMemory {\n /**\n * The user-facing memory content. This is the string that will eventually\n * land in the memory store (after extraction / orchestrator processing).\n */\n content: string;\n /**\n * Source-specific identifier for idempotent re-imports. Optional — when\n * present, adapters SHOULD use the source's stable id (e.g. ChatGPT memory\n * uuid); when absent, the orchestrator's own content hashing provides dedup.\n */\n sourceId?: string;\n /**\n * Source-specific timestamp at which the memory was originally created or\n * last updated. ISO 8601. Optional — adapters fall back to `importedAt`\n * when the source does not expose a creation timestamp.\n */\n sourceTimestamp?: string;\n /**\n * Human-readable short label identifying the origin platform\n * (`\"chatgpt\"`, `\"claude\"`, `\"gemini\"`, `\"mem0\"`). Required so the\n * orchestrator can attribute recalled memories correctly.\n */\n sourceLabel: string;\n /**\n * Path to the export file the memory was parsed from, OR the endpoint URL\n * for API-based imports. Optional but strongly recommended so users can\n * trace a memory back to the file they imported.\n */\n importedFromPath?: string;\n /**\n * ISO 8601 timestamp set by `runImporter` immediately before writeTo().\n * Adapters MAY populate this themselves; `runImporter` will fill in the\n * current wall-clock time when absent.\n */\n importedAt?: string;\n /**\n * Adapter-specific raw metadata preserved for debugging / future rehydration\n * (e.g. conversation id, thread id, tags). Must be JSON-serializable;\n * adapters MUST NOT stash functions or circular references here.\n */\n metadata?: Record<string, unknown>;\n}\n\n/**\n * Options threaded through every importer run. Adapters receive this object\n * from `runImporter`; the top-level CLI populates it from `--dry-run`,\n * `--batch-size`, and `--rate-limit` flags.\n */\nexport interface RunImportOptions {\n /**\n * When true, parse + transform but skip writeTo(). `runImporter` prints a\n * summary of what WOULD have been imported and returns early.\n */\n dryRun?: boolean;\n /**\n * Target batch size for writeTo(). Adapters that chunk memories into\n * smaller orchestrator calls should honor this. Defaults to\n * `DEFAULT_IMPORT_BATCH_SIZE` when undefined. Values outside the valid\n * range throw from `validateImportBatchSize`.\n */\n batchSize?: number;\n /**\n * Optional rate limit for API-backed importers (mem0). Expressed as\n * requests-per-second. Adapters that do not hit an external API may ignore\n * this. When provided, `validateImportRateLimit` enforces the positive-\n * finite contract.\n */\n rateLimit?: number;\n /**\n * Invoked after every chunk of memories is processed. `total` is the full\n * count of memories produced by `transform`; `processed` counts memories\n * already ingested (or skipped in dry-run mode). Adapters SHOULD call this\n * incrementally — `runImporter` itself calls it once per batch.\n */\n onProgress?: (progress: ImportProgress) => void;\n}\n\nexport interface ImportProgress {\n processed: number;\n total: number;\n /** Current phase for human-readable logging. */\n phase: \"parse\" | \"transform\" | \"write\" | \"dry-run\";\n}\n\n/**\n * Interface every importer package implements.\n *\n * The three-method surface intentionally mirrors the issue #568 spec:\n *\n * - `parse(input)`: raw payload → intermediate representation.\n * - `transform(parsed)`: intermediate representation → `ImportedMemory[]`.\n * - `writeTo(target, memories, options)`: actually commit to the\n * orchestrator (or whatever target the host provides).\n *\n * Adapters MAY keep `parse` and `transform` separate (e.g. ChatGPT conversions\n * that need to split saved-memories from conversation summaries) or collapse\n * them into a single operation — what matters is that the combined pipeline\n * produces an array of `ImportedMemory` records with correct provenance.\n *\n * `Parsed` is generic so strongly-typed intermediate shapes survive through\n * the adapter's own code without leaking to callers of `runImporter`.\n */\nexport interface ImporterAdapter<Parsed = unknown> {\n /** Short stable name used by `remnic import --adapter <name>`. */\n name: string;\n /** Human-readable label surfaced in CLI output and source attribution. */\n sourceLabel: string;\n\n /**\n * Parse a raw payload (file contents, API response, etc.) into the adapter\n * intermediate representation. Pure — MUST NOT call the orchestrator.\n */\n parse(input: unknown, options?: ImporterParseOptions): Parsed | Promise<Parsed>;\n\n /**\n * Flatten parsed input into an array of importable memories. Pure — MUST\n * NOT call the orchestrator. Provenance fields (`sourceLabel`,\n * `importedFromPath`) should be populated here.\n */\n transform(parsed: Parsed, options?: ImporterTransformOptions): ImportedMemory[] | Promise<ImportedMemory[]>;\n\n /**\n * Commit the transformed memories to the orchestrator (or equivalent\n * target). `runImporter` only invokes this when dryRun is false.\n *\n * Adapters typically call `orchestrator.ingestBulkImportBatch` once per\n * batch after converting `ImportedMemory` records into `ImportTurn` shapes.\n */\n writeTo(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n options: RunImportOptions,\n ): Promise<ImporterWriteResult>;\n}\n\n/**\n * Shape of the \"target\" passed to `writeTo`.\n *\n * This is intentionally narrower than the full `Orchestrator` class: importer\n * adapters only need to push `ImportTurn[]` batches and read the active\n * bulk-import namespace. Narrowing keeps test doubles simple (the slice-1\n * integration test uses a pure in-memory mock) and prevents adapters from\n * reaching into orchestrator internals that would make them harder to move\n * between host environments.\n */\nexport interface ImporterWriteTarget {\n ingestBulkImportBatch(\n turns: ImportTurn[],\n options?: { deadlineMs?: number },\n ): Promise<unknown>;\n bulkImportWriteNamespace?(): string;\n}\n\nexport interface ImporterWriteResult {\n memoriesIngested: number;\n /** Optional: adapter-surfaced duplicates or skipped entries. */\n skipped?: number;\n}\n\n/** Options forwarded to `parse`. Adapter-specific; additive by design. */\nexport interface ImporterParseOptions {\n strict?: boolean;\n /** Source path passed through for provenance. */\n filePath?: string;\n /**\n * Requests-per-second throttle, forwarded from the top-level\n * `RunImportOptions.rateLimit`. Only meaningful for API-backed importers\n * (mem0) — file-based adapters ignore it. `runImporter` copies this\n * through automatically so CLI users never have to stash it on\n * `parseOptions` themselves. Cursor review on PR #602.\n */\n rateLimit?: number;\n}\n\n/** Options forwarded to `transform`. */\nexport interface ImporterTransformOptions {\n /** When true, adapters that normally skip bulk conversations should include them. */\n includeConversations?: boolean;\n /** Maximum number of memories to emit. Primarily for tests. */\n maxMemories?: number;\n /** Adapter-specific minimum source text length for importers that filter tiny prompts. */\n minPromptLength?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Validation helpers\n// ---------------------------------------------------------------------------\n\nexport const DEFAULT_IMPORT_BATCH_SIZE = 25;\nconst MIN_IMPORT_BATCH_SIZE = 1;\nconst MAX_IMPORT_BATCH_SIZE = 500;\n\n/**\n * Coerce and validate the caller-supplied batch size. CLAUDE.md rule 14/51:\n * reject invalid CLI input rather than silently defaulting.\n */\nexport function validateImportBatchSize(value: number | undefined): number {\n if (value === undefined) return DEFAULT_IMPORT_BATCH_SIZE;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `batchSize must be a finite number, received ${String(value)}`,\n );\n }\n if (!Number.isInteger(value)) {\n throw new Error(`batchSize must be an integer, received ${value}`);\n }\n if (value < MIN_IMPORT_BATCH_SIZE || value > MAX_IMPORT_BATCH_SIZE) {\n throw new Error(\n `batchSize must be between ${MIN_IMPORT_BATCH_SIZE} and ${MAX_IMPORT_BATCH_SIZE}, ` +\n `received ${value}`,\n );\n }\n return value;\n}\n\n/**\n * Validate the `--rate-limit` (requests per second) value used by API\n * importers. Zero / negative / non-finite values throw — the CLI must reject\n * them rather than silently import at unlimited speed.\n */\nexport function validateImportRateLimit(value: number | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `rateLimit must be a finite number (requests per second), received ${String(value)}`,\n );\n }\n if (value <= 0) {\n throw new Error(\n `rateLimit must be greater than 0 (requests per second), received ${value}`,\n );\n }\n return value;\n}\n\n// ---------------------------------------------------------------------------\n// Orchestration helpers\n// ---------------------------------------------------------------------------\n\n/**\n * Convert an `ImportedMemory` into an `ImportTurn` suitable for\n * `orchestrator.ingestBulkImportBatch`. The resulting turn is always\n * `role=\"user\"` because every downstream source (saved memories, personal\n * context, mem0 entries) represents a first-person statement rather than an\n * assistant response.\n *\n * Keeps provenance on the turn via `participantName` so the extraction\n * pipeline's transcript renderer labels the speaker with the source platform.\n */\nexport function importedMemoryToTurn(memory: ImportedMemory): ImportTurn {\n const timestamp =\n typeof memory.sourceTimestamp === \"string\" && memory.sourceTimestamp.length > 0\n ? memory.sourceTimestamp\n : (memory.importedAt ?? new Date().toISOString());\n return {\n role: \"user\",\n content: memory.content,\n timestamp,\n participantName: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { participantId: memory.sourceId } : {}),\n importProvenance: {\n sourceLabel: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { sourceId: memory.sourceId } : {}),\n ...(memory.sourceTimestamp !== undefined ? { sourceTimestamp: memory.sourceTimestamp } : {}),\n ...(memory.importedFromPath !== undefined ? { importedFromPath: memory.importedFromPath } : {}),\n ...(memory.importedAt !== undefined ? { importedAt: memory.importedAt } : {}),\n ...(memory.metadata !== undefined ? { metadata: memory.metadata } : {}),\n },\n };\n}\n\nfunction invalidImportedMemoryError(\n adapterName: string,\n index: number,\n issues: string[],\n): Error {\n return new Error(\n `Importer '${adapterName}' produced invalid memory at index ${index}: ${issues.join(\"; \")}`,\n );\n}\n\nfunction validateImportedMemory(\n memory: ImportedMemory,\n adapterName: string,\n index: number,\n): void {\n const issues: string[] = [];\n if (typeof memory.sourceLabel !== \"string\" || memory.sourceLabel.trim().length === 0) {\n issues.push(\"sourceLabel must be a non-empty string\");\n }\n issues.push(\n ...validateImportTurn(importedMemoryToTurn(memory), index).map(\n (issue) => issue.message,\n ),\n );\n if (issues.length > 0) {\n throw invalidImportedMemoryError(adapterName, index, issues);\n }\n}\n\nexport interface RunImporterResult {\n adapter: string;\n sourceLabel: string;\n /**\n * Total memories produced by `transform`. In dry-run mode this is the same\n * as the number of memories that WOULD have been written.\n */\n memoriesPlanned: number;\n /**\n * Number of memories actually handed to writeTo(). Always zero in dry-run\n * mode.\n */\n memoriesWritten: number;\n batchesProcessed: number;\n dryRun: boolean;\n /** Mirrors the importedAt stamped on every memory. */\n importedAt: string;\n}\n\n/**\n * Orchestrate `parse → transform → writeTo` for an adapter. This is the\n * default pipeline used by the CLI; adapters are free to implement their own\n * orchestration when they need per-record rate-limiting or streaming parses\n * that would not fit in the \"produce full array before writing\" shape.\n *\n * Mutates the supplied memory records by filling in `importedAt` when the\n * adapter did not set it (CLAUDE.md rule 38: records are written in insertion\n * order to keep the provenance log stable).\n */\nexport async function runImporter<Parsed>(\n adapter: ImporterAdapter<Parsed>,\n input: unknown,\n target: ImporterWriteTarget,\n options: RunImportOptions & {\n parseOptions?: ImporterParseOptions;\n transformOptions?: ImporterTransformOptions;\n } = {},\n): Promise<RunImporterResult> {\n const batchSize = validateImportBatchSize(options.batchSize);\n validateImportRateLimit(options.rateLimit);\n\n const importedAt = new Date().toISOString();\n const dryRun = options.dryRun === true;\n const onProgress = options.onProgress;\n\n // Phase 1 — parse. Forward the validated rateLimit so API-backed adapters\n // (mem0) can throttle their own fetches. Caller-supplied parseOptions\n // takes precedence so tests can still override.\n onProgress?.({ processed: 0, total: 0, phase: \"parse\" });\n const parseOptions: ImporterParseOptions = {\n ...(options.rateLimit !== undefined ? { rateLimit: options.rateLimit } : {}),\n ...(options.parseOptions ?? {}),\n };\n const parsed = await adapter.parse(input, parseOptions);\n\n // Phase 2 — transform\n onProgress?.({ processed: 0, total: 0, phase: \"transform\" });\n const memoriesRaw = await adapter.transform(parsed, options.transformOptions);\n if (!Array.isArray(memoriesRaw)) {\n throw new Error(\n `Importer '${adapter.name}' transform() returned a non-array. ` +\n \"Adapters must produce ImportedMemory[].\",\n );\n }\n const memories = memoriesRaw.map((memory, index) => {\n if (memory === null || typeof memory !== \"object\") {\n throw invalidImportedMemoryError(adapter.name, index, [\n \"memory must be an object\",\n ]);\n }\n const record = memory as ImportedMemory;\n const sourceLabel =\n typeof record.sourceLabel === \"string\" && record.sourceLabel.trim().length > 0\n ? record.sourceLabel.trim()\n : adapter.sourceLabel.trim();\n return {\n ...record,\n sourceLabel,\n importedAt: record.importedAt ?? importedAt,\n };\n });\n memories.forEach((memory, index) => validateImportedMemory(memory, adapter.name, index));\n\n // Phase 3 — write (or dry-run plan)\n if (dryRun) {\n onProgress?.({\n processed: memories.length,\n total: memories.length,\n phase: \"dry-run\",\n });\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten: 0,\n batchesProcessed: 0,\n dryRun: true,\n importedAt,\n };\n }\n\n let batchesProcessed = 0;\n let memoriesWritten = 0;\n for (let i = 0; i < memories.length; i += batchSize) {\n const batch = memories.slice(i, i + batchSize);\n const result = await adapter.writeTo(target, batch, options);\n memoriesWritten += result.memoriesIngested;\n batchesProcessed += 1;\n onProgress?.({\n processed: Math.min(i + batch.length, memories.length),\n total: memories.length,\n phase: \"write\",\n });\n }\n\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten,\n batchesProcessed,\n dryRun: false,\n importedAt,\n };\n}\n\n/**\n * Default `writeTo` implementation for importers that want to hand every\n * memory to `orchestrator.ingestBulkImportBatch` without custom routing.\n * Adapters that need per-record rate-limiting or conversation-thread linking\n * are free to implement their own `writeTo`.\n */\nexport async function defaultWriteMemoriesToOrchestrator(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n): Promise<ImporterWriteResult> {\n if (memories.length === 0) {\n return { memoriesIngested: 0 };\n }\n memories.forEach((memory, index) =>\n validateImportedMemory(memory, \"defaultWriteMemoriesToOrchestrator\", index),\n );\n const turns = memories.map(importedMemoryToTurn);\n await target.ingestBulkImportBatch(turns);\n return { memoriesIngested: memories.length };\n}\n"],"mappings":";;;;;AAmOO,IAAM,4BAA4B;AACzC,IAAM,wBAAwB;AAC9B,IAAM,wBAAwB;AAMvB,SAAS,wBAAwB,OAAmC;AACzE,MAAI,UAAU,OAAW,QAAO;AAChC,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG;AACxD,UAAM,IAAI;AAAA,MACR,+CAA+C,OAAO,KAAK,CAAC;AAAA,IAC9D;AAAA,EACF;AACA,MAAI,CAAC,OAAO,UAAU,KAAK,GAAG;AAC5B,UAAM,IAAI,MAAM,0CAA0C,KAAK,EAAE;AAAA,EACnE;AACA,MAAI,QAAQ,yBAAyB,QAAQ,uBAAuB;AAClE,UAAM,IAAI;AAAA,MACR,6BAA6B,qBAAqB,QAAQ,qBAAqB,cACjE,KAAK;AAAA,IACrB;AAAA,EACF;AACA,SAAO;AACT;AAOO,SAAS,wBAAwB,OAA+C;AACrF,MAAI,UAAU,OAAW,QAAO;AAChC,MAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,GAAG;AACxD,UAAM,IAAI;AAAA,MACR,qEAAqE,OAAO,KAAK,CAAC;AAAA,I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O,sBAAsB,KAAK;AACxC,SAAO,EAAE,kBAAkB,SAAS,OAAO;AAC7C;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/importers/base.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// Shared importer base (issue #568)\n// ---------------------------------------------------------------------------\n//\n// The importer adapters defined by issue #568 (`@remnic/import-chatgpt`,\n// `@remnic/import-claude`, `@remnic/import-gemini`, `@remnic/import-mem0`) all\n// follow the same three-step shape:\n//\n// 1. parse(input) — turn a raw file / API payload into a\n// source-specific intermediate structure.\n// 2. transform(parsed) — flatten that structure into a uniform list of\n// `ImportedMemory` records with provenance\n// attached (sourceLabel, importedFromPath,\n// importedAt).\n// 3. writeTo(orchestrator) — hand each memory to the orchestrator via\n// `ingestBulkImportBatch`. Dry-run mode stops\n// after transform() and never calls writeTo().\n//\n// This file defines the shared `ImporterAdapter` interface plus a thin\n// `runImporter` helper that handles batching, dry-run plan reporting, and\n// progress callbacks so every adapter does not reimplement the same loop.\n//\n// The existing lower-level `BulkImportSourceAdapter` (weclone-shaped: produces\n// turn-structured transcripts) remains untouched and continues to drive\n// `runBulkImportCliCommand`. Importer adapters are the higher-level surface\n// intended for the four memory sources in #568 — they emit *memories*\n// (intent-level content) rather than raw conversation turns.\n\nimport { validateImportTurn, type ImportTurn } from \"../bulk-import/types.js\";\n\n/**\n * A single imported memory record with provenance.\n *\n * Every importer MUST attach a truthful `sourceLabel` (e.g. `\"chatgpt\"`,\n * `\"claude\"`, `\"gemini\"`, `\"mem0\"`) and MAY attach the export's origin path or\n * URL in `importedFromPath`. `importedAt` is always set by `runImporter` so\n * adapters do not need to timestamp records themselves.\n */\nexport interface ImportedMemory {\n /**\n * The user-facing memory content. This is the string that will eventually\n * land in the memory store (after extraction / orchestrator processing).\n */\n content: string;\n /**\n * Source-specific identifier for idempotent re-imports. Optional — when\n * present, adapters SHOULD use the source's stable id (e.g. ChatGPT memory\n * uuid); when absent, the orchestrator's own content hashing provides dedup.\n */\n sourceId?: string;\n /**\n * Source-specific timestamp at which the memory was originally created or\n * last updated. ISO 8601. Optional — adapters fall back to `importedAt`\n * when the source does not expose a creation timestamp.\n */\n sourceTimestamp?: string;\n /**\n * Human-readable short label identifying the origin platform\n * (`\"chatgpt\"`, `\"claude\"`, `\"gemini\"`, `\"mem0\"`). Required so the\n * orchestrator can attribute recalled memories correctly.\n */\n sourceLabel: string;\n /**\n * Path to the export file the memory was parsed from, OR the endpoint URL\n * for API-based imports. Optional but strongly recommended so users can\n * trace a memory back to the file they imported.\n */\n importedFromPath?: string;\n /**\n * ISO 8601 timestamp set by `runImporter` immediately before writeTo().\n * Adapters MAY populate this themselves; `runImporter` will fill in the\n * current wall-clock time when absent.\n */\n importedAt?: string;\n /**\n * Adapter-specific raw metadata preserved for debugging / future rehydration\n * (e.g. conversation id, thread id, tags). Must be JSON-serializable;\n * adapters MUST NOT stash functions or circular references here.\n */\n metadata?: Record<string, unknown>;\n}\n\n/**\n * Options threaded through every importer run. Adapters receive this object\n * from `runImporter`; the top-level CLI populates it from `--dry-run`,\n * `--batch-size`, and `--rate-limit` flags.\n */\nexport interface RunImportOptions {\n /**\n * When true, parse + transform but skip writeTo(). `runImporter` prints a\n * summary of what WOULD have been imported and returns early.\n */\n dryRun?: boolean;\n /**\n * Target batch size for writeTo(). Adapters that chunk memories into\n * smaller orchestrator calls should honor this. Defaults to\n * `DEFAULT_IMPORT_BATCH_SIZE` when undefined. Values outside the valid\n * range throw from `validateImportBatchSize`.\n */\n batchSize?: number;\n /**\n * Optional rate limit for API-backed importers (mem0). Expressed as\n * requests-per-second. Adapters that do not hit an external API may ignore\n * this. When provided, `validateImportRateLimit` enforces the positive-\n * finite contract.\n */\n rateLimit?: number;\n /**\n * Invoked after every chunk of memories is processed. `total` is the full\n * count of memories produced by `transform`; `processed` counts memories\n * already ingested (or skipped in dry-run mode). Adapters SHOULD call this\n * incrementally — `runImporter` itself calls it once per batch.\n */\n onProgress?: (progress: ImportProgress) => void;\n}\n\nexport interface ImportProgress {\n processed: number;\n total: number;\n /** Current phase for human-readable logging. */\n phase: \"parse\" | \"transform\" | \"write\" | \"dry-run\";\n}\n\n/**\n * Interface every importer package implements.\n *\n * The three-method surface intentionally mirrors the issue #568 spec:\n *\n * - `parse(input)`: raw payload → intermediate representation.\n * - `transform(parsed)`: intermediate representation → `ImportedMemory[]`.\n * - `writeTo(target, memories, options)`: actually commit to the\n * orchestrator (or whatever target the host provides).\n *\n * Adapters MAY keep `parse` and `transform` separate (e.g. ChatGPT conversions\n * that need to split saved-memories from conversation summaries) or collapse\n * them into a single operation — what matters is that the combined pipeline\n * produces an array of `ImportedMemory` records with correct provenance.\n *\n * `Parsed` is generic so strongly-typed intermediate shapes survive through\n * the adapter's own code without leaking to callers of `runImporter`.\n */\nexport interface ImporterAdapter<Parsed = unknown> {\n /** Short stable name used by `remnic import --adapter <name>`. */\n name: string;\n /** Human-readable label surfaced in CLI output and source attribution. */\n sourceLabel: string;\n\n /**\n * Parse a raw payload (file contents, API response, etc.) into the adapter\n * intermediate representation. Pure — MUST NOT call the orchestrator.\n */\n parse(input: unknown, options?: ImporterParseOptions): Parsed | Promise<Parsed>;\n\n /**\n * Flatten parsed input into an array of importable memories. Pure — MUST\n * NOT call the orchestrator. Provenance fields (`sourceLabel`,\n * `importedFromPath`) should be populated here.\n */\n transform(parsed: Parsed, options?: ImporterTransformOptions): ImportedMemory[] | Promise<ImportedMemory[]>;\n\n /**\n * Commit the transformed memories to the orchestrator (or equivalent\n * target). `runImporter` only invokes this when dryRun is false.\n *\n * Adapters typically call `orchestrator.ingestBulkImportBatch` once per\n * batch after converting `ImportedMemory` records into `ImportTurn` shapes.\n */\n writeTo(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n options: RunImportOptions,\n ): Promise<ImporterWriteResult>;\n}\n\n/**\n * Shape of the \"target\" passed to `writeTo`.\n *\n * This is intentionally narrower than the full `Orchestrator` class: importer\n * adapters only need to push `ImportTurn[]` batches and read the active\n * bulk-import namespace. Narrowing keeps test doubles simple (the slice-1\n * integration test uses a pure in-memory mock) and prevents adapters from\n * reaching into orchestrator internals that would make them harder to move\n * between host environments.\n */\nexport interface ImporterWriteTarget {\n ingestBulkImportBatch(\n turns: ImportTurn[],\n options?: { deadlineMs?: number },\n ): Promise<unknown>;\n bulkImportWriteNamespace?(): string;\n}\n\nexport interface ImporterWriteResult {\n memoriesIngested: number;\n /** Optional: adapter-surfaced duplicates or skipped entries. */\n skipped?: number;\n}\n\n/** Options forwarded to `parse`. Adapter-specific; additive by design. */\nexport interface ImporterParseOptions {\n strict?: boolean;\n /** Source path passed through for provenance. */\n filePath?: string;\n /**\n * Requests-per-second throttle, forwarded from the top-level\n * `RunImportOptions.rateLimit`. Only meaningful for API-backed importers\n * (mem0) — file-based adapters ignore it. `runImporter` copies this\n * through automatically so CLI users never have to stash it on\n * `parseOptions` themselves. Cursor review on PR #602.\n */\n rateLimit?: number;\n}\n\n/** Options forwarded to `transform`. */\nexport interface ImporterTransformOptions {\n /** When true, adapters that normally skip bulk conversations should include them. */\n includeConversations?: boolean;\n /** Maximum number of memories to emit. Primarily for tests. */\n maxMemories?: number;\n /** Adapter-specific minimum source text length for importers that filter tiny prompts. */\n minPromptLength?: number;\n}\n\n// ---------------------------------------------------------------------------\n// Validation helpers\n// ---------------------------------------------------------------------------\n\nexport const DEFAULT_IMPORT_BATCH_SIZE = 25;\nconst MIN_IMPORT_BATCH_SIZE = 1;\nconst MAX_IMPORT_BATCH_SIZE = 500;\n\n/**\n * Coerce and validate the caller-supplied batch size. CLAUDE.md rule 14/51:\n * reject invalid CLI input rather than silently defaulting.\n */\nexport function validateImportBatchSize(value: number | undefined): number {\n if (value === undefined) return DEFAULT_IMPORT_BATCH_SIZE;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `batchSize must be a finite number, received ${String(value)}`,\n );\n }\n if (!Number.isInteger(value)) {\n throw new Error(`batchSize must be an integer, received ${value}`);\n }\n if (value < MIN_IMPORT_BATCH_SIZE || value > MAX_IMPORT_BATCH_SIZE) {\n throw new Error(\n `batchSize must be between ${MIN_IMPORT_BATCH_SIZE} and ${MAX_IMPORT_BATCH_SIZE}, ` +\n `received ${value}`,\n );\n }\n return value;\n}\n\n/**\n * Validate the `--rate-limit` (requests per second) value used by API\n * importers. Zero / negative / non-finite values throw — the CLI must reject\n * them rather than silently import at unlimited speed.\n */\nexport function validateImportRateLimit(value: number | undefined): number | undefined {\n if (value === undefined) return undefined;\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new Error(\n `rateLimit must be a finite number (requests per second), received ${String(value)}`,\n );\n }\n if (value <= 0) {\n throw new Error(\n `rateLimit must be greater than 0 (requests per second), received ${value}`,\n );\n }\n return value;\n}\n\n// ---------------------------------------------------------------------------\n// Orchestration helpers\n// ---------------------------------------------------------------------------\n\n/**\n * Convert an `ImportedMemory` into an `ImportTurn` suitable for\n * `orchestrator.ingestBulkImportBatch`. The resulting turn is always\n * `role=\"user\"` because every downstream source (saved memories, personal\n * context, mem0 entries) represents a first-person statement rather than an\n * assistant response.\n *\n * Keeps provenance on the turn via `participantName` so the extraction\n * pipeline's transcript renderer labels the speaker with the source platform.\n */\nexport function importedMemoryToTurn(memory: ImportedMemory): ImportTurn {\n const timestamp =\n typeof memory.sourceTimestamp === \"string\" && memory.sourceTimestamp.length > 0\n ? memory.sourceTimestamp\n : (memory.importedAt ?? new Date().toISOString());\n return {\n role: \"user\",\n content: memory.content,\n timestamp,\n participantName: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { participantId: memory.sourceId } : {}),\n importProvenance: {\n sourceLabel: memory.sourceLabel,\n ...(memory.sourceId !== undefined ? { sourceId: memory.sourceId } : {}),\n ...(memory.sourceTimestamp !== undefined ? { sourceTimestamp: memory.sourceTimestamp } : {}),\n ...(memory.importedFromPath !== undefined ? { importedFromPath: memory.importedFromPath } : {}),\n ...(memory.importedAt !== undefined ? { importedAt: memory.importedAt } : {}),\n ...(memory.metadata !== undefined ? { metadata: memory.metadata } : {}),\n },\n };\n}\n\nfunction invalidImportedMemoryError(\n adapterName: string,\n index: number,\n issues: string[],\n): Error {\n return new Error(\n `Importer '${adapterName}' produced invalid memory at index ${index}: ${issues.join(\"; \")}`,\n );\n}\n\nfunction validateImportedMemory(\n memory: ImportedMemory,\n adapterName: string,\n index: number,\n): void {\n const issues: string[] = [];\n if (typeof memory.sourceLabel !== \"string\" || memory.sourceLabel.trim().length === 0) {\n issues.push(\"sourceLabel must be a non-empty string\");\n }\n issues.push(\n ...validateImportTurn(importedMemoryToTurn(memory), index).map(\n (issue) => issue.message,\n ),\n );\n if (issues.length > 0) {\n throw invalidImportedMemoryError(adapterName, index, issues);\n }\n}\n\nexport interface RunImporterResult {\n adapter: string;\n sourceLabel: string;\n /**\n * Total memories produced by `transform`. In dry-run mode this is the same\n * as the number of memories that WOULD have been written.\n */\n memoriesPlanned: number;\n /**\n * Number of memories actually handed to writeTo(). Always zero in dry-run\n * mode.\n */\n memoriesWritten: number;\n batchesProcessed: number;\n dryRun: boolean;\n /** Mirrors the importedAt stamped on every memory. */\n importedAt: string;\n}\n\n/**\n * Orchestrate `parse → transform → writeTo` for an adapter. This is the\n * default pipeline used by the CLI; adapters are free to implement their own\n * orchestration when they need per-record rate-limiting or streaming parses\n * that would not fit in the \"produce full array before writing\" shape.\n *\n * Mutates the supplied memory records by filling in `importedAt` when the\n * adapter did not set it (CLAUDE.md rule 38: records are written in insertion\n * order to keep the provenance log stable).\n */\nexport async function runImporter<Parsed>(\n adapter: ImporterAdapter<Parsed>,\n input: unknown,\n target: ImporterWriteTarget,\n options: RunImportOptions & {\n parseOptions?: ImporterParseOptions;\n transformOptions?: ImporterTransformOptions;\n } = {},\n): Promise<RunImporterResult> {\n const batchSize = validateImportBatchSize(options.batchSize);\n validateImportRateLimit(options.rateLimit);\n\n const importedAt = new Date().toISOString();\n const dryRun = options.dryRun === true;\n const onProgress = options.onProgress;\n\n // Phase 1 — parse. Forward the validated rateLimit so API-backed adapters\n // (mem0) can throttle their own fetches. Caller-supplied parseOptions\n // takes precedence so tests can still override.\n onProgress?.({ processed: 0, total: 0, phase: \"parse\" });\n const parseOptions: ImporterParseOptions = {\n ...(options.rateLimit !== undefined ? { rateLimit: options.rateLimit } : {}),\n ...(options.parseOptions ?? {}),\n };\n const parsed = await adapter.parse(input, parseOptions);\n\n // Phase 2 — transform\n onProgress?.({ processed: 0, total: 0, phase: \"transform\" });\n const memoriesRaw = await adapter.transform(parsed, options.transformOptions);\n if (!Array.isArray(memoriesRaw)) {\n throw new Error(\n `Importer '${adapter.name}' transform() returned a non-array. ` +\n \"Adapters must produce ImportedMemory[].\",\n );\n }\n const memories = memoriesRaw.map((memory, index) => {\n if (memory === null || typeof memory !== \"object\") {\n throw invalidImportedMemoryError(adapter.name, index, [\n \"memory must be an object\",\n ]);\n }\n const record = memory as ImportedMemory;\n const sourceLabel =\n typeof record.sourceLabel === \"string\" && record.sourceLabel.trim().length > 0\n ? record.sourceLabel.trim()\n : adapter.sourceLabel.trim();\n return {\n ...record,\n sourceLabel,\n importedAt: record.importedAt ?? importedAt,\n };\n });\n memories.forEach((memory, index) => validateImportedMemory(memory, adapter.name, index));\n\n // Phase 3 — write (or dry-run plan)\n if (dryRun) {\n onProgress?.({\n processed: memories.length,\n total: memories.length,\n phase: \"dry-run\",\n });\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten: 0,\n batchesProcessed: 0,\n dryRun: true,\n importedAt,\n };\n }\n\n let batchesProcessed = 0;\n let memoriesWritten = 0;\n for (let i = 0; i < memories.length; i += batchSize) {\n const batch = memories.slice(i, i + batchSize);\n const result = await adapter.writeTo(target, batch, options);\n memoriesWritten += result.memoriesIngested;\n batchesProcessed += 1;\n onProgress?.({\n processed: Math.min(i + batch.length, memories.length),\n total: memories.length,\n phase: \"write\",\n });\n }\n\n return {\n adapter: adapter.name,\n sourceLabel: adapter.sourceLabel,\n memoriesPlanned: memories.length,\n memoriesWritten,\n batchesProcessed,\n dryRun: false,\n importedAt,\n };\n}\n\n/**\n * Default `writeTo` implementation for importers that want to hand every\n * memory to `orchestrator.ingestBulkImportBatch` without custom routing.\n * Adapters that need per-record rate-limiting or conversation-thread linking\n * are free to implement their own `writeTo`.\n */\nexport async function defaultWriteMemoriesToOrchestrator(\n target: ImporterWriteTarget,\n memories: ImportedMemory[],\n): Promise<ImporterWriteResult> {\n if (memories.length === 0) {\n return { memoriesIngested: 0 };\n }\n memories.forEach((memory, index) =>\n validateImportedMemory(memory, \"defaultWriteMemoriesToOrchestrator\", index),\n );\n const turns = memories.map(importedMemoryToTurn);\n await target.ingestBulkImportBatch(turns);\n return { memoriesIngested: memories.length };\n}\n\n// ---------------------------------------------------------------------------\n// File-importer factory (issue #2794)\n// ---------------------------------------------------------------------------\n\n/** Parse args `defineFileImporterAdapter` forwards — the keys file adapters use. */\nexport interface FileImporterParseArgs {\n strict?: boolean;\n filePath?: string;\n}\n\n/** Per-package config consumed by `defineFileImporterAdapter`. */\nexport interface FileImporterDefinition<Parsed> {\n name: string;\n sourceLabel: string;\n /** Decode the raw export file. Receives only `strict` / `filePath`. */\n parse(input: unknown, options: FileImporterParseArgs): Parsed | Promise<Parsed>;\n /** Flatten the parsed export into `ImportedMemory[]` with provenance. */\n transform(\n parsed: Parsed,\n options: ImporterTransformOptions | undefined,\n ): ImportedMemory[] | Promise<ImportedMemory[]>;\n}\n\n/**\n * Build the standard file-importer `ImporterAdapter`: parse with the\n * `strict`/`filePath` spread, a package-specific `transform`, and `writeTo`\n * delegating to `defaultWriteMemoriesToOrchestrator` (issue #2794).\n */\nexport function defineFileImporterAdapter<Parsed>(\n definition: FileImporterDefinition<Parsed>,\n): ImporterAdapter<Parsed> {\n return {\n name: definition.name,\n sourceLabel: definition.sourceLabel,\n parse(input, options) {\n return definition.parse(input, {\n ...(options?.strict !== undefined ? { strict: options.strict } : {}),\n ...(options?.filePath !== undefined ? { filePath: options.filePath } : {}),\n });\n },\n transform: (parsed, options)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AAAA,EACX;AACF;","names":[]}
|
|
@@ -28,15 +28,15 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
observeRequestSchema,
|
|
30
30
|
recallRequestSchema
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2AMEUKCG.js";
|
|
32
32
|
import {
|
|
33
33
|
defineOperation,
|
|
34
34
|
parseNamespacePreflightWriteOp,
|
|
35
35
|
resolveAuthorizedNamespaceWritablePreflight
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-R55WAWS3.js";
|
|
37
37
|
import {
|
|
38
38
|
validateBriefingFormat
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-NC7RM2XS.js";
|
|
40
40
|
import {
|
|
41
41
|
enforceNamespaceAllowList,
|
|
42
42
|
tokenCapabilityStore
|
|
@@ -543,4 +543,4 @@ defineOperation({ name: "graph_events", description: "SSE graph events.", schema
|
|
|
543
543
|
defineOperation({ name: "chat_message", description: "Chat message.", schema: strictSchema({ message: S.str, chatSessionId: S.str }), handler: async (_i, _ctx) => ({ result: { ok: true } }) });
|
|
544
544
|
defineOperation({ name: "chat_events", description: "SSE chat events.", schema: strictSchema({}), handler: async (_i, _ctx) => ({ result: { stream: "sse" } }) });
|
|
545
545
|
defineOperation({ name: "adapters_status", description: "Adapter registry metadata (issue #1850 round 5). Marker op: the HTTP transport builds the response from its own adapterRegistry, but the op still must be registered so it appears in listRegisteredOperations and enforceTokenOp can gate it for scoped tokens.", schema: strictSchema({}), handler: async (_i, _ctx) => ({ result: { ok: true } }) });
|
|
546
|
-
//# sourceMappingURL=chunk-
|
|
546
|
+
//# sourceMappingURL=chunk-S2DU3UBN.js.map
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
requestEntityCanonicalIdReconcile,
|
|
14
14
|
withRawEntityPageMutation
|
|
15
15
|
} from "./chunk-R7QY5ZVB.js";
|
|
16
|
-
import {
|
|
17
|
-
parseExportBundle
|
|
18
|
-
} from "./chunk-WEHSQBFR.js";
|
|
19
16
|
import {
|
|
20
17
|
decryptCapsuleFileInMemory,
|
|
21
18
|
isEncryptedCapsuleFile
|
|
22
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-X7Y7WX73.js";
|
|
20
|
+
import {
|
|
21
|
+
parseExportBundle
|
|
22
|
+
} from "./chunk-WEHSQBFR.js";
|
|
23
23
|
import {
|
|
24
24
|
assertIsDirectoryNotSymlink,
|
|
25
25
|
assertRealpathInsideRoot,
|
|
@@ -294,4 +294,4 @@ function mintForkId(capsuleId, originalId, now) {
|
|
|
294
294
|
export {
|
|
295
295
|
importCapsule
|
|
296
296
|
};
|
|
297
|
-
//# sourceMappingURL=chunk-
|
|
297
|
+
//# sourceMappingURL=chunk-TDYAIXHK.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-KEF46KL2.js";
|
|
8
8
|
import {
|
|
9
9
|
StorageManager
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UY2RORVF.js";
|
|
11
11
|
import {
|
|
12
12
|
projectProceduresToSkills
|
|
13
13
|
} from "./chunk-236PXYG7.js";
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
runCodexMaterialize,
|
|
135
135
|
runPostConsolidationMaterialize
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-U6S754L6.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-RC5DXXWC.js";
|
|
8
8
|
import {
|
|
9
9
|
StorageManager
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UY2RORVF.js";
|
|
11
11
|
import {
|
|
12
12
|
parseContinuityImprovementLoops
|
|
13
13
|
} from "./chunk-LDXUBPMO.js";
|
|
@@ -1283,4 +1283,4 @@ export {
|
|
|
1283
1283
|
defaultTierMigrationCycleBudget,
|
|
1284
1284
|
CompoundingEngine
|
|
1285
1285
|
};
|
|
1286
|
-
//# sourceMappingURL=chunk-
|
|
1286
|
+
//# sourceMappingURL=chunk-UEEN7GXR.js.map
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-46WM6JX2.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeQmdResultPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZMNT26KV.js";
|
|
21
21
|
import {
|
|
22
22
|
withholdToolScopedFromSharedNamespace
|
|
23
23
|
} from "./chunk-S2V7RUCL.js";
|
|
@@ -11386,4 +11386,4 @@ export {
|
|
|
11386
11386
|
isValidBufferSurpriseEvent,
|
|
11387
11387
|
StorageManager3 as StorageManager
|
|
11388
11388
|
};
|
|
11389
|
-
//# sourceMappingURL=chunk-
|
|
11389
|
+
//# sourceMappingURL=chunk-UY2RORVF.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WearablesInputError
|
|
3
3
|
} from "./chunk-V7IZKJI3.js";
|
|
4
|
-
import {
|
|
5
|
-
WriteRateLimiter
|
|
6
|
-
} from "./chunk-TB6CBZ5V.js";
|
|
7
4
|
import {
|
|
8
5
|
AdapterRegistry
|
|
9
6
|
} from "./chunk-JBPKEARU.js";
|
|
7
|
+
import {
|
|
8
|
+
WriteRateLimiter
|
|
9
|
+
} from "./chunk-TB6CBZ5V.js";
|
|
10
10
|
import {
|
|
11
11
|
serializeInlineScriptValue
|
|
12
12
|
} from "./chunk-3HSRWJTC.js";
|
|
13
13
|
import {
|
|
14
14
|
respondDeepRecall
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ALBYEXFX.js";
|
|
16
16
|
import {
|
|
17
17
|
handleSupportPassportOwnerHttp
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MSSJSC2V.js";
|
|
19
19
|
import {
|
|
20
20
|
buildSupportPassportPublicRequestHandler
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YFDJVB2K.js";
|
|
22
22
|
import {
|
|
23
23
|
handleMcpGetSse
|
|
24
24
|
} from "./chunk-SRT6SHVZ.js";
|
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
processChatMessage,
|
|
32
32
|
sessionBelongsToPrincipal,
|
|
33
33
|
subscribeChatTranscript
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-IES4QHLM.js";
|
|
35
35
|
import {
|
|
36
36
|
RelayMissionStoreError
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MYB6DWE5.js";
|
|
38
38
|
import {
|
|
39
39
|
executeResolution,
|
|
40
40
|
isValidResolutionVerb
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
} from "./chunk-CTVWELNK.js";
|
|
47
47
|
import {
|
|
48
48
|
validateRequest
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-2AMEUKCG.js";
|
|
50
50
|
import {
|
|
51
51
|
toDottedRemnicName
|
|
52
52
|
} from "./chunk-ZQUVBZI4.js";
|
|
@@ -59,10 +59,10 @@ import {
|
|
|
59
59
|
optionalNamespaceKindQueryParam,
|
|
60
60
|
optionalQueryString,
|
|
61
61
|
positiveIntQueryParam
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-EZKSOM5K.js";
|
|
63
63
|
import {
|
|
64
64
|
respondBriefingHttp
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-Z5XE7AMC.js";
|
|
66
66
|
import {
|
|
67
67
|
maybeHandleLifecycleFlush
|
|
68
68
|
} from "./chunk-TIDEL77O.js";
|
|
@@ -73,14 +73,14 @@ import {
|
|
|
73
73
|
authorizationProbeNamespaces,
|
|
74
74
|
authorizationProbeRequiresPrincipalNamespace,
|
|
75
75
|
probeOperationAuthorization
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-W7OU4I3Y.js";
|
|
77
77
|
import {
|
|
78
78
|
getOperation,
|
|
79
79
|
resolveQueryNamespaceWritablePreflight
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-R55WAWS3.js";
|
|
81
81
|
import {
|
|
82
82
|
handleWhoKnowsHttpQuery
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-INBOGQ3E.js";
|
|
84
84
|
import {
|
|
85
85
|
isTrustZoneName
|
|
86
86
|
} from "./chunk-ROBHL3GL.js";
|
|
@@ -3585,4 +3585,4 @@ export {
|
|
|
3585
3585
|
resolveDefaultAdminConsolePublicDir,
|
|
3586
3586
|
EngramAccessHttpServer
|
|
3587
3587
|
};
|
|
3588
|
-
//# sourceMappingURL=chunk-
|
|
3588
|
+
//# sourceMappingURL=chunk-UY7VPC6Q.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getOperation,
|
|
4
4
|
operationRequiresAuthorizedNamespace,
|
|
5
5
|
operationUsesPrincipalNamespace
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-R55WAWS3.js";
|
|
7
7
|
import {
|
|
8
8
|
assertOperationAuthorizationAllowed
|
|
9
9
|
} from "./chunk-MZWSOLMT.js";
|
|
@@ -60,4 +60,4 @@ export {
|
|
|
60
60
|
authorizationProbeNamespaces,
|
|
61
61
|
authorizationProbeRequiresPrincipalNamespace
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=chunk-
|
|
63
|
+
//# sourceMappingURL=chunk-W7OU4I3Y.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SupportPassportCreateGrantRequestSchema,
|
|
3
3
|
defineOperation
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R55WAWS3.js";
|
|
5
5
|
import {
|
|
6
6
|
SupportPassportCardCategorySchema,
|
|
7
7
|
SupportPassportMemoryIdSchema,
|
|
@@ -220,4 +220,4 @@ var supportPassportGrantAskOperation = defineOperation({
|
|
|
220
220
|
result: await ctx.service.supportPassportAskGrant(grantId, secret, question, ctx.abortSignal)
|
|
221
221
|
})
|
|
222
222
|
});
|
|
223
|
-
//# sourceMappingURL=chunk-
|
|
223
|
+
//# sourceMappingURL=chunk-WFZBRS6N.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NamespaceStorageRouter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HTPQJ32S.js";
|
|
4
4
|
import {
|
|
5
5
|
namespaceCollectionName
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZMNT26KV.js";
|
|
7
7
|
import {
|
|
8
8
|
isSafeRouteNamespace
|
|
9
9
|
} from "./chunk-PCXDUHQH.js";
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
verifyNamespaces,
|
|
214
214
|
runNamespaceMigration
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-WOOTZ6DH.js.map
|