@remnic/core 10.0.189 → 10.0.191
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.js +45 -44
- package/dist/access-cli.js +45 -44
- package/dist/access-cli.js.map +1 -1
- package/dist/access-extraction-force-flush-preempt.js +45 -44
- package/dist/access-extraction-force-flush.js +45 -44
- package/dist/access-http-briefing.js +45 -44
- package/dist/access-http-query.js +45 -44
- package/dist/access-http.js +45 -44
- package/dist/access-identity-continuity-surface.js +45 -44
- package/dist/access-lcm-surface.js +45 -44
- package/dist/access-mcp.js +45 -44
- package/dist/access-observe-write-surface.js +45 -44
- package/dist/access-operations-batch.js +45 -44
- package/dist/access-operations.js +45 -44
- package/dist/access-recall-concurrency.js +45 -44
- package/dist/access-recall-response.js +45 -44
- package/dist/access-recall-surface.js +45 -44
- package/dist/access-service.js +45 -44
- package/dist/active-recall.js +8 -8
- package/dist/admin/admin-surfaces.d.ts +11 -0
- package/dist/admin/admin-surfaces.d.ts.map +1 -1
- package/dist/admin/admin-surfaces.js +43 -0
- package/dist/admin/admin-surfaces.js.map +1 -0
- package/dist/briefing.js +9 -9
- package/dist/causal-consolidation.js +10 -10
- package/dist/{chunk-OA7YDB6A.js → chunk-2CWCJYT3.js} +2 -2
- package/dist/{chunk-C6Y2YHJL.js → chunk-2DFXIJPZ.js} +2 -2
- package/dist/{chunk-YVXR7CPS.js → chunk-2S6PPGIR.js} +2 -2
- package/dist/{chunk-RVODERA5.js → chunk-3XJITLZQ.js} +2 -2
- package/dist/{chunk-56BNHKZM.js → chunk-4SUNBSPD.js} +7 -7
- package/dist/{chunk-VQQZJ6KJ.js → chunk-6YAQ3AJ5.js} +3 -3
- package/dist/{chunk-K3JGILZC.js → chunk-7BIGO6ZL.js} +3 -3
- package/dist/{chunk-RPOG6HLI.js → chunk-7GMOB4FF.js} +2 -2
- package/dist/{chunk-CIAQK2OU.js → chunk-7MAMRCZ7.js} +2 -2
- package/dist/{chunk-ABPOW3SX.js → chunk-AIS7RLTG.js} +61 -464
- package/dist/chunk-AIS7RLTG.js.map +1 -0
- package/dist/{chunk-B7GZL7PR.js → chunk-ARD2TEY2.js} +4 -4
- package/dist/{chunk-X3ERYOLO.js → chunk-BZ5VO7KO.js} +2 -2
- package/dist/{chunk-ATPY63F5.js → chunk-C2UN2CY7.js} +2 -2
- package/dist/{chunk-QXHWOUS6.js → chunk-C6YKKH73.js} +3 -3
- package/dist/{chunk-2VNMSEZR.js → chunk-CJYVVVOG.js} +3 -3
- package/dist/{chunk-K6BS5RB4.js → chunk-CP6MUXNI.js} +2 -2
- package/dist/{chunk-2I3ETW3G.js → chunk-FFTGLWHI.js} +2 -2
- package/dist/{chunk-D3FP4JQI.js → chunk-FZPZML67.js} +2 -2
- package/dist/{chunk-XWPYK5T4.js → chunk-ICA5SCIT.js} +2 -2
- package/dist/{chunk-7X6EZ2QB.js → chunk-JGVW6F3Q.js} +3 -3
- package/dist/{chunk-6OHCNTKU.js → chunk-JIB3UUYV.js} +2 -2
- package/dist/{chunk-QGT5KNQT.js → chunk-JOR4Y326.js} +2 -2
- package/dist/{chunk-65DWWJKI.js → chunk-JQCEG54G.js} +2 -2
- package/dist/{chunk-TAPF7T26.js → chunk-NL5KFA5N.js} +2 -2
- package/dist/{chunk-PCGBESAN.js → chunk-NSFHMGOF.js} +2 -2
- package/dist/{chunk-ZG4GNPRE.js → chunk-PBE7NFB5.js} +5 -5
- package/dist/{chunk-H442UKDV.js → chunk-QTHFGP5F.js} +7 -7
- package/dist/{chunk-KVTUUU7H.js → chunk-RC2TVYY2.js} +2 -2
- package/dist/{chunk-AXSQGJSG.js → chunk-RQOUKIFS.js} +10 -10
- package/dist/{chunk-DLPS5YP3.js → chunk-TJV5HGSC.js} +4 -4
- package/dist/{chunk-6MDHK6NO.js → chunk-U6JZGQXC.js} +2 -2
- package/dist/{chunk-TQODBIMW.js → chunk-U6OQ7GWU.js} +2 -2
- package/dist/{chunk-A32EBVCZ.js → chunk-W7FZ7ZZE.js} +2 -2
- package/dist/{chunk-XQF2KLV5.js → chunk-X5XK6WWV.js} +2 -2
- package/dist/chunk-XC4PRJWM.js +593 -0
- package/dist/chunk-XC4PRJWM.js.map +1 -0
- package/dist/{chunk-GGQ3CJVH.js → chunk-YTT6XJNX.js} +4 -4
- package/dist/cli.js +45 -44
- package/dist/coding/export-okf-codegraph.js +8 -8
- package/dist/compounding/engine.js +10 -10
- package/dist/config.js +8 -8
- package/dist/connectors/codex-materialize-runner.js +9 -9
- package/dist/connectors/index.js +9 -9
- package/dist/convergence-refresh.js +11 -11
- package/dist/corpus-watermark.js +11 -11
- package/dist/entity-retrieval.js +9 -9
- package/dist/explicit-capture.js +45 -44
- package/dist/extraction.js +9 -9
- package/dist/harmonic-retrieval.js +9 -9
- package/dist/index.js +66 -65
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.js +5 -5
- package/dist/location/index.js +10 -10
- package/dist/maintenance/memory-governance.js +9 -9
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +9 -9
- package/dist/maintenance/rebuild-memory-projection-runner.js +11 -11
- package/dist/maintenance/rebuild-memory-projection.js +10 -10
- package/dist/namespaces/migrate.js +10 -10
- package/dist/namespaces/search.js +7 -7
- package/dist/namespaces/storage.js +9 -9
- package/dist/operator-doctor-corpus.js +12 -12
- package/dist/operator-toolkit.js +15 -15
- package/dist/orchestration/backlog-scheduler.js +46 -45
- package/dist/orchestration/backlog-scheduler.js.map +1 -1
- package/dist/orchestration/buffer-drain-runner.js +46 -45
- package/dist/orchestration/maintenance.js +17 -17
- package/dist/orchestrator.js +45 -44
- package/dist/recall-navigation.js +45 -44
- package/dist/resume-bundles.js +8 -8
- package/dist/search/factory.js +6 -6
- package/dist/search/index.js +11 -11
- package/dist/search/lancedb-backend.js +2 -2
- package/dist/search/meilisearch-backend.js +2 -2
- package/dist/search/orama-backend.js +2 -2
- package/dist/semantic-consolidation.js +10 -10
- package/dist/semantic-rule-promotion.js +9 -9
- package/dist/semantic-rule-verifier.js +9 -9
- package/dist/source-agent-qualifier.js +9 -9
- package/dist/standup/build.js +9 -9
- package/dist/storage.js +8 -8
- package/dist/transfer/export-okf.js +9 -9
- package/dist/verified-recall.js +9 -9
- package/dist/who-knows-cli.js +10 -10
- package/dist/who-knows.js +9 -9
- package/package.json +12 -2
- package/src/admin/admin-surfaces.test.ts +171 -0
- package/src/admin/admin-surfaces.ts +215 -2
- package/dist/chunk-ABPOW3SX.js.map +0 -1
- /package/dist/{chunk-OA7YDB6A.js.map → chunk-2CWCJYT3.js.map} +0 -0
- /package/dist/{chunk-C6Y2YHJL.js.map → chunk-2DFXIJPZ.js.map} +0 -0
- /package/dist/{chunk-YVXR7CPS.js.map → chunk-2S6PPGIR.js.map} +0 -0
- /package/dist/{chunk-RVODERA5.js.map → chunk-3XJITLZQ.js.map} +0 -0
- /package/dist/{chunk-56BNHKZM.js.map → chunk-4SUNBSPD.js.map} +0 -0
- /package/dist/{chunk-VQQZJ6KJ.js.map → chunk-6YAQ3AJ5.js.map} +0 -0
- /package/dist/{chunk-K3JGILZC.js.map → chunk-7BIGO6ZL.js.map} +0 -0
- /package/dist/{chunk-RPOG6HLI.js.map → chunk-7GMOB4FF.js.map} +0 -0
- /package/dist/{chunk-CIAQK2OU.js.map → chunk-7MAMRCZ7.js.map} +0 -0
- /package/dist/{chunk-B7GZL7PR.js.map → chunk-ARD2TEY2.js.map} +0 -0
- /package/dist/{chunk-X3ERYOLO.js.map → chunk-BZ5VO7KO.js.map} +0 -0
- /package/dist/{chunk-ATPY63F5.js.map → chunk-C2UN2CY7.js.map} +0 -0
- /package/dist/{chunk-QXHWOUS6.js.map → chunk-C6YKKH73.js.map} +0 -0
- /package/dist/{chunk-2VNMSEZR.js.map → chunk-CJYVVVOG.js.map} +0 -0
- /package/dist/{chunk-K6BS5RB4.js.map → chunk-CP6MUXNI.js.map} +0 -0
- /package/dist/{chunk-2I3ETW3G.js.map → chunk-FFTGLWHI.js.map} +0 -0
- /package/dist/{chunk-D3FP4JQI.js.map → chunk-FZPZML67.js.map} +0 -0
- /package/dist/{chunk-XWPYK5T4.js.map → chunk-ICA5SCIT.js.map} +0 -0
- /package/dist/{chunk-7X6EZ2QB.js.map → chunk-JGVW6F3Q.js.map} +0 -0
- /package/dist/{chunk-6OHCNTKU.js.map → chunk-JIB3UUYV.js.map} +0 -0
- /package/dist/{chunk-QGT5KNQT.js.map → chunk-JOR4Y326.js.map} +0 -0
- /package/dist/{chunk-65DWWJKI.js.map → chunk-JQCEG54G.js.map} +0 -0
- /package/dist/{chunk-TAPF7T26.js.map → chunk-NL5KFA5N.js.map} +0 -0
- /package/dist/{chunk-PCGBESAN.js.map → chunk-NSFHMGOF.js.map} +0 -0
- /package/dist/{chunk-ZG4GNPRE.js.map → chunk-PBE7NFB5.js.map} +0 -0
- /package/dist/{chunk-H442UKDV.js.map → chunk-QTHFGP5F.js.map} +0 -0
- /package/dist/{chunk-KVTUUU7H.js.map → chunk-RC2TVYY2.js.map} +0 -0
- /package/dist/{chunk-AXSQGJSG.js.map → chunk-RQOUKIFS.js.map} +0 -0
- /package/dist/{chunk-DLPS5YP3.js.map → chunk-TJV5HGSC.js.map} +0 -0
- /package/dist/{chunk-6MDHK6NO.js.map → chunk-U6JZGQXC.js.map} +0 -0
- /package/dist/{chunk-TQODBIMW.js.map → chunk-U6OQ7GWU.js.map} +0 -0
- /package/dist/{chunk-A32EBVCZ.js.map → chunk-W7FZ7ZZE.js.map} +0 -0
- /package/dist/{chunk-XQF2KLV5.js.map → chunk-X5XK6WWV.js.map} +0 -0
- /package/dist/{chunk-GGQ3CJVH.js.map → chunk-YTT6XJNX.js.map} +0 -0
|
@@ -16,6 +16,9 @@ import {
|
|
|
16
16
|
syncWearableSource,
|
|
17
17
|
wearableSourceLabel
|
|
18
18
|
} from "./chunk-7KTORRIK.js";
|
|
19
|
+
import {
|
|
20
|
+
chatgptReplayNormalizer
|
|
21
|
+
} from "./chunk-MMACM5G2.js";
|
|
19
22
|
import {
|
|
20
23
|
claudeReplayNormalizer
|
|
21
24
|
} from "./chunk-54BGIBCR.js";
|
|
@@ -31,12 +34,12 @@ import {
|
|
|
31
34
|
WorkStorage
|
|
32
35
|
} from "./chunk-MPC7TYTZ.js";
|
|
33
36
|
import {
|
|
34
|
-
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
exportJsonBundle
|
|
38
|
+
} from "./chunk-UP6MOYCB.js";
|
|
36
39
|
import {
|
|
37
40
|
exportOkfBundle,
|
|
38
41
|
parseIncludeStatus
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-NL5KFA5N.js";
|
|
40
43
|
import {
|
|
41
44
|
exportSqlite
|
|
42
45
|
} from "./chunk-BV2TIZ4F.js";
|
|
@@ -61,9 +64,6 @@ import {
|
|
|
61
64
|
import {
|
|
62
65
|
importCapsule
|
|
63
66
|
} from "./chunk-V5W67PQV.js";
|
|
64
|
-
import {
|
|
65
|
-
exportJsonBundle
|
|
66
|
-
} from "./chunk-UP6MOYCB.js";
|
|
67
67
|
import {
|
|
68
68
|
isSharedContextWriteInputError,
|
|
69
69
|
parseSharedWriteOutputControls
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
import {
|
|
72
72
|
buildStandup,
|
|
73
73
|
parseStandupDate
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-U6OQ7GWU.js";
|
|
75
75
|
import {
|
|
76
76
|
SupportPassportAccessSurface,
|
|
77
77
|
createSupportPassportModelAdapter,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
import {
|
|
87
87
|
ActivityStore,
|
|
88
88
|
MaintenanceScheduler
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-QTHFGP5F.js";
|
|
90
90
|
import {
|
|
91
91
|
runPeerProfileReasoner
|
|
92
92
|
} from "./chunk-WTXUUZYI.js";
|
|
@@ -99,6 +99,9 @@ import {
|
|
|
99
99
|
isReplaySource,
|
|
100
100
|
normalizeReplaySessionKey
|
|
101
101
|
} from "./chunk-AJVLDJU6.js";
|
|
102
|
+
import {
|
|
103
|
+
migrateFromEngram
|
|
104
|
+
} from "./chunk-VZAKYDMJ.js";
|
|
102
105
|
import {
|
|
103
106
|
TailscaleHelper
|
|
104
107
|
} from "./chunk-SZDLX763.js";
|
|
@@ -110,13 +113,10 @@ import {
|
|
|
110
113
|
} from "./chunk-6PEEZSGL.js";
|
|
111
114
|
import {
|
|
112
115
|
rebuildMemoryLifecycleLedger
|
|
113
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-NSFHMGOF.js";
|
|
114
117
|
import {
|
|
115
118
|
rebuildObservations
|
|
116
119
|
} from "./chunk-2X4WP4GD.js";
|
|
117
|
-
import {
|
|
118
|
-
migrateFromEngram
|
|
119
|
-
} from "./chunk-VZAKYDMJ.js";
|
|
120
120
|
import {
|
|
121
121
|
backfillMemoryStorage,
|
|
122
122
|
runLocationBackfill,
|
|
@@ -124,13 +124,18 @@ import {
|
|
|
124
124
|
runLocationDay,
|
|
125
125
|
runLocationStatus,
|
|
126
126
|
runLocationSync
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-C6YKKH73.js";
|
|
128
128
|
import {
|
|
129
129
|
archiveObservations
|
|
130
130
|
} from "./chunk-SBQOBY3S.js";
|
|
131
131
|
import {
|
|
132
132
|
LcmEngine
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-PBE7NFB5.js";
|
|
134
|
+
import {
|
|
135
|
+
executeResolution,
|
|
136
|
+
isValidResolutionVerb,
|
|
137
|
+
runPreferenceDriftScan
|
|
138
|
+
} from "./chunk-KNYUEYB6.js";
|
|
134
139
|
import {
|
|
135
140
|
chunkTranscriptEntries
|
|
136
141
|
} from "./chunk-TECVW3JP.js";
|
|
@@ -140,7 +145,7 @@ import {
|
|
|
140
145
|
import {
|
|
141
146
|
CompoundingEngine,
|
|
142
147
|
defaultTierMigrationCycleBudget
|
|
143
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-7BIGO6ZL.js";
|
|
144
149
|
import {
|
|
145
150
|
SharedContextManager,
|
|
146
151
|
UNATTRIBUTED_ACCESS_WRITE_ORIGIN
|
|
@@ -151,10 +156,14 @@ import {
|
|
|
151
156
|
consolidatePreferences
|
|
152
157
|
} from "./chunk-VOVSZYCP.js";
|
|
153
158
|
import {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
AdminPromotionError,
|
|
160
|
+
auditTranscripts,
|
|
161
|
+
gatherMaintenanceHealth,
|
|
162
|
+
inspectScope,
|
|
163
|
+
listAdminNamespaces,
|
|
164
|
+
promoteMemory,
|
|
165
|
+
redactSensitive
|
|
166
|
+
} from "./chunk-XC4PRJWM.js";
|
|
158
167
|
import {
|
|
159
168
|
getBulkImportSource,
|
|
160
169
|
listBulkImportSources,
|
|
@@ -199,7 +208,7 @@ import {
|
|
|
199
208
|
handleWhoKnowsHttpQuery,
|
|
200
209
|
loadWhoKnowsEntities,
|
|
201
210
|
validateWhoKnowsInput
|
|
202
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-2S6PPGIR.js";
|
|
203
212
|
import {
|
|
204
213
|
WriteQuarantineStore
|
|
205
214
|
} from "./chunk-BANSBRNX.js";
|
|
@@ -225,7 +234,7 @@ import {
|
|
|
225
234
|
import {
|
|
226
235
|
compareVerifiedEpisodeResults,
|
|
227
236
|
searchVerifiedEpisodes
|
|
228
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-JIB3UUYV.js";
|
|
229
238
|
import {
|
|
230
239
|
applyTrustScoreStage,
|
|
231
240
|
buildTrustSignalsForRerank,
|
|
@@ -289,11 +298,11 @@ import {
|
|
|
289
298
|
} from "./chunk-WWDO7ZWM.js";
|
|
290
299
|
import {
|
|
291
300
|
promoteSemanticRuleFromMemory
|
|
292
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-2DFXIJPZ.js";
|
|
293
302
|
import {
|
|
294
303
|
compareVerifiedSemanticRuleResults,
|
|
295
304
|
searchVerifiedSemanticRules
|
|
296
|
-
} from "./chunk-
|
|
305
|
+
} from "./chunk-ICA5SCIT.js";
|
|
297
306
|
import {
|
|
298
307
|
buildResponseGuidanceRecallSection,
|
|
299
308
|
shouldRecallResponseGuidance
|
|
@@ -461,12 +470,12 @@ import {
|
|
|
461
470
|
runOperatorRepair,
|
|
462
471
|
runOperatorSetup,
|
|
463
472
|
summarizeNamespaceMaintenanceHealth
|
|
464
|
-
} from "./chunk-
|
|
473
|
+
} from "./chunk-4SUNBSPD.js";
|
|
465
474
|
import {
|
|
466
475
|
NamespaceCatalog,
|
|
467
476
|
isNamespaceKind,
|
|
468
477
|
planNamespaceMaintenance
|
|
469
|
-
} from "./chunk-
|
|
478
|
+
} from "./chunk-BZ5VO7KO.js";
|
|
470
479
|
import {
|
|
471
480
|
analyzeSessionIntegrity,
|
|
472
481
|
applySessionRepair,
|
|
@@ -577,7 +586,7 @@ import {
|
|
|
577
586
|
import {
|
|
578
587
|
readProjectedHarmonicGraph,
|
|
579
588
|
searchHarmonicRetrieval
|
|
580
|
-
} from "./chunk-
|
|
589
|
+
} from "./chunk-JQCEG54G.js";
|
|
581
590
|
import {
|
|
582
591
|
removeNodeEdgesForRewrite,
|
|
583
592
|
rollbackNodeEdgeRewrite
|
|
@@ -673,7 +682,7 @@ import {
|
|
|
673
682
|
buildEntityRecallSection,
|
|
674
683
|
entityRecentTranscriptLookbackHours,
|
|
675
684
|
readRecentEntityTranscriptEntries
|
|
676
|
-
} from "./chunk-
|
|
685
|
+
} from "./chunk-CP6MUXNI.js";
|
|
677
686
|
import {
|
|
678
687
|
boundRecallContextComposition,
|
|
679
688
|
composeMissingMemoryContext,
|
|
@@ -716,15 +725,15 @@ import {
|
|
|
716
725
|
import {
|
|
717
726
|
CorpusWatermarkCache,
|
|
718
727
|
computeServiceCorpusCensus
|
|
719
|
-
} from "./chunk-
|
|
728
|
+
} from "./chunk-7GMOB4FF.js";
|
|
720
729
|
import {
|
|
721
730
|
listNamespaces,
|
|
722
731
|
runNamespaceMigration,
|
|
723
732
|
verifyNamespaces
|
|
724
|
-
} from "./chunk-
|
|
733
|
+
} from "./chunk-CJYVVVOG.js";
|
|
725
734
|
import {
|
|
726
735
|
NamespaceStorageRouter
|
|
727
|
-
} from "./chunk-
|
|
736
|
+
} from "./chunk-C2UN2CY7.js";
|
|
728
737
|
import {
|
|
729
738
|
CrossNamespaceBudget,
|
|
730
739
|
toBudgetWarning
|
|
@@ -738,12 +747,12 @@ import {
|
|
|
738
747
|
} from "./chunk-EZ25VE3G.js";
|
|
739
748
|
import {
|
|
740
749
|
refreshConvergedNamespaces
|
|
741
|
-
} from "./chunk-
|
|
750
|
+
} from "./chunk-RC2TVYY2.js";
|
|
742
751
|
import {
|
|
743
752
|
rebuildMemoryProjection,
|
|
744
753
|
repairMemoryProjection,
|
|
745
754
|
verifyMemoryProjection
|
|
746
|
-
} from "./chunk-
|
|
755
|
+
} from "./chunk-6YAQ3AJ5.js";
|
|
747
756
|
import {
|
|
748
757
|
buildProposedActions,
|
|
749
758
|
buildQualityScore,
|
|
@@ -752,7 +761,7 @@ import {
|
|
|
752
761
|
readMemoryGovernanceRunArtifact,
|
|
753
762
|
restoreMemoryGovernanceRun,
|
|
754
763
|
runMemoryGovernance
|
|
755
|
-
} from "./chunk-
|
|
764
|
+
} from "./chunk-FZPZML67.js";
|
|
756
765
|
import {
|
|
757
766
|
collectNativeKnowledgeChunks,
|
|
758
767
|
formatNativeKnowledgeSection,
|
|
@@ -785,7 +794,7 @@ import {
|
|
|
785
794
|
materializeAfterSemanticConsolidation,
|
|
786
795
|
parseConsolidationResponse,
|
|
787
796
|
parseOperatorAwareConsolidationResponse
|
|
788
|
-
} from "./chunk-
|
|
797
|
+
} from "./chunk-FFTGLWHI.js";
|
|
789
798
|
import {
|
|
790
799
|
resolveNamespaceChildRoot
|
|
791
800
|
} from "./chunk-3UXOZBHV.js";
|
|
@@ -885,7 +894,7 @@ import {
|
|
|
885
894
|
parseBriefingFocus,
|
|
886
895
|
parseBriefingWindow,
|
|
887
896
|
validateBriefingFormat
|
|
888
|
-
} from "./chunk-
|
|
897
|
+
} from "./chunk-JOR4Y326.js";
|
|
889
898
|
import {
|
|
890
899
|
BriefingTimeoutError,
|
|
891
900
|
withBriefingDeadline
|
|
@@ -1070,7 +1079,7 @@ import {
|
|
|
1070
1079
|
reconstructFusionInputs,
|
|
1071
1080
|
selfDeps,
|
|
1072
1081
|
serializeFusionDay
|
|
1073
|
-
} from "./chunk-
|
|
1082
|
+
} from "./chunk-7MAMRCZ7.js";
|
|
1074
1083
|
import {
|
|
1075
1084
|
buildRetiredFactTombstoneInputs
|
|
1076
1085
|
} from "./chunk-QGVCFVX6.js";
|
|
@@ -1089,12 +1098,12 @@ import {
|
|
|
1089
1098
|
embeddingBacklogExceeds,
|
|
1090
1099
|
isSearchHealthDegraded,
|
|
1091
1100
|
namespaceCollectionName
|
|
1092
|
-
} from "./chunk-
|
|
1101
|
+
} from "./chunk-2CWCJYT3.js";
|
|
1093
1102
|
import {
|
|
1094
1103
|
createConversationIndexRuntime,
|
|
1095
1104
|
createSearchBackend,
|
|
1096
1105
|
isSearchBackendEnabled
|
|
1097
|
-
} from "./chunk-
|
|
1106
|
+
} from "./chunk-RQOUKIFS.js";
|
|
1098
1107
|
import {
|
|
1099
1108
|
NoopSearchBackend
|
|
1100
1109
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -6909,7 +6918,7 @@ var RecallRerankCoordinator = class _RecallRerankCoordinator {
|
|
|
6909
6918
|
namespaces,
|
|
6910
6919
|
{
|
|
6911
6920
|
readNamespaceMemories: async (ns) => (await this.getStorage(ns)).readAllMemories(),
|
|
6912
|
-
readMemoryFrontmatter: async (
|
|
6921
|
+
readMemoryFrontmatter: async (path62, preferredNamespace) => {
|
|
6913
6922
|
if (!fallbackReader) {
|
|
6914
6923
|
for (const ns of namespaces) {
|
|
6915
6924
|
try {
|
|
@@ -6921,7 +6930,7 @@ var RecallRerankCoordinator = class _RecallRerankCoordinator {
|
|
|
6921
6930
|
}
|
|
6922
6931
|
if (!fallbackReader) return null;
|
|
6923
6932
|
const memory = await this.readQmdResultMemory(
|
|
6924
|
-
|
|
6933
|
+
path62,
|
|
6925
6934
|
fallbackReader,
|
|
6926
6935
|
namespaces,
|
|
6927
6936
|
preferredNamespace
|
|
@@ -42144,9 +42153,9 @@ function readStructuralSymbol(entry) {
|
|
|
42144
42153
|
const rec = entry;
|
|
42145
42154
|
const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
|
|
42146
42155
|
if (!symbol) return null;
|
|
42147
|
-
const
|
|
42156
|
+
const path62 = typeof rec.path === "string" && rec.path.length > 0 ? rec.path : void 0;
|
|
42148
42157
|
const kind = typeof rec.kind === "string" && rec.kind.length > 0 ? rec.kind : void 0;
|
|
42149
|
-
const item =
|
|
42158
|
+
const item = path62 !== void 0 && kind !== void 0 ? { symbol, path: path62, kind } : path62 !== void 0 ? { symbol, path: path62 } : kind !== void 0 ? { symbol, kind } : { symbol };
|
|
42150
42159
|
return item;
|
|
42151
42160
|
}
|
|
42152
42161
|
function classifySpawnError(err) {
|
|
@@ -59741,418 +59750,6 @@ async function applySupportPassportOfflineSyncChangeset(storage, options) {
|
|
|
59741
59750
|
// src/access-service.ts
|
|
59742
59751
|
import * as nodePath3 from "path";
|
|
59743
59752
|
|
|
59744
|
-
// src/admin/admin-surfaces.ts
|
|
59745
|
-
import path61 from "path";
|
|
59746
|
-
var REDACTED = "<redacted>";
|
|
59747
|
-
var SENSITIVE_KEY_RE = /(token|secret|password|api[_-]?key|bearer|authorization|credential|private[_-]?key)/i;
|
|
59748
|
-
var BEARER_VALUE_RE = /^(bearer|sk-|pk-|xox[bp]-|AKIA)/i;
|
|
59749
|
-
var LONG_OPAQUE_RE = /^[A-Za-z0-9_\-]{32,}$/;
|
|
59750
|
-
var SAFE_DIAGNOSTIC_KEYS = /* @__PURE__ */ new Set(["identityToken"]);
|
|
59751
|
-
function redactSensitive(value) {
|
|
59752
|
-
return walkRedact(value, void 0);
|
|
59753
|
-
}
|
|
59754
|
-
function walkRedact(value, key) {
|
|
59755
|
-
if (typeof value === "string") {
|
|
59756
|
-
if (key && SENSITIVE_KEY_RE.test(key) && !SAFE_DIAGNOSTIC_KEYS.has(key)) {
|
|
59757
|
-
return REDACTED;
|
|
59758
|
-
}
|
|
59759
|
-
if (BEARER_VALUE_RE.test(value)) return REDACTED;
|
|
59760
|
-
if (!(key && SAFE_DIAGNOSTIC_KEYS.has(key)) && LONG_OPAQUE_RE.test(value) && value.length >= 40 && !/^[0-9a-f]{16}$/.test(value)) {
|
|
59761
|
-
return REDACTED;
|
|
59762
|
-
}
|
|
59763
|
-
return value;
|
|
59764
|
-
}
|
|
59765
|
-
if (Array.isArray(value)) {
|
|
59766
|
-
return value.map((entry) => walkRedact(entry, void 0));
|
|
59767
|
-
}
|
|
59768
|
-
if (value && typeof value === "object") {
|
|
59769
|
-
const record = value;
|
|
59770
|
-
const out = {};
|
|
59771
|
-
for (const [k, v] of Object.entries(record)) {
|
|
59772
|
-
out[k] = walkRedact(v, k);
|
|
59773
|
-
}
|
|
59774
|
-
return out;
|
|
59775
|
-
}
|
|
59776
|
-
return value;
|
|
59777
|
-
}
|
|
59778
|
-
function inspectScope(options) {
|
|
59779
|
-
const { config } = options;
|
|
59780
|
-
const namespacesEnabled = options.namespacesEnabled ?? resolveNamespaceCapabilities(config).namespaces === true;
|
|
59781
|
-
const plan = resolveScopePlan({
|
|
59782
|
-
config,
|
|
59783
|
-
sessionKey: options.sessionKey,
|
|
59784
|
-
namespace: options.namespace,
|
|
59785
|
-
principalOverride: options.principalOverride,
|
|
59786
|
-
codingContext: options.codingContext ?? null,
|
|
59787
|
-
namespacesEnabled
|
|
59788
|
-
});
|
|
59789
|
-
const warnings = [];
|
|
59790
|
-
if (namespacesEnabled && !plan.principal) {
|
|
59791
|
-
warnings.push("namespace routing is enabled but no principal resolved for this session key");
|
|
59792
|
-
}
|
|
59793
|
-
if (config.codingMode?.projectScope && namespacesEnabled && options.codingContext && !plan.codingOverlay) {
|
|
59794
|
-
warnings.push("coding project scope is enabled but the overlay was suppressed by an explicit namespace override");
|
|
59795
|
-
}
|
|
59796
|
-
if (options.namespace && options.namespace.trim().length > 0 && !plan.namespaceOverride) {
|
|
59797
|
-
warnings.push(
|
|
59798
|
-
`requested namespace override '${options.namespace}' is not readable by this principal and was ignored`
|
|
59799
|
-
);
|
|
59800
|
-
}
|
|
59801
|
-
if (plan.namespaceOverride && !canWriteNamespace(plan.principal, plan.namespaceOverride, config)) {
|
|
59802
|
-
warnings.push(
|
|
59803
|
-
`explicit namespace override '${plan.namespaceOverride}' is readable but not writable by this principal; it is the effective write namespace but writes will be rejected`
|
|
59804
|
-
);
|
|
59805
|
-
}
|
|
59806
|
-
const layers = [];
|
|
59807
|
-
const scopeProfilePlan = plan.scopeProfilePlan;
|
|
59808
|
-
if (scopeProfilePlan) {
|
|
59809
|
-
for (const layer of scopeProfilePlan.layers) {
|
|
59810
|
-
layers.push({
|
|
59811
|
-
id: layer.id,
|
|
59812
|
-
namespace: layer.namespace,
|
|
59813
|
-
readable: layer.readable,
|
|
59814
|
-
writable: layer.writable,
|
|
59815
|
-
promotable: layer.promotable,
|
|
59816
|
-
reason: layer.reason
|
|
59817
|
-
});
|
|
59818
|
-
}
|
|
59819
|
-
for (const target of scopeProfilePlan.promotionTargets) {
|
|
59820
|
-
if (!layers.some((layer) => layer.id === target.target)) {
|
|
59821
|
-
layers.push({
|
|
59822
|
-
id: target.target,
|
|
59823
|
-
namespace: target.namespace,
|
|
59824
|
-
readable: false,
|
|
59825
|
-
writable: false,
|
|
59826
|
-
promotable: target.authorized,
|
|
59827
|
-
reason: target.reason
|
|
59828
|
-
});
|
|
59829
|
-
}
|
|
59830
|
-
}
|
|
59831
|
-
} else {
|
|
59832
|
-
layers.push({
|
|
59833
|
-
id: "self",
|
|
59834
|
-
namespace: plan.baseNamespace,
|
|
59835
|
-
readable: canReadNamespace(plan.principal, plan.baseNamespace, config),
|
|
59836
|
-
writable: canWriteNamespace(plan.principal, plan.baseNamespace, config),
|
|
59837
|
-
promotable: false,
|
|
59838
|
-
reason: "principal self namespace (no scope profile active)"
|
|
59839
|
-
});
|
|
59840
|
-
}
|
|
59841
|
-
if (plan.codingOverlay) {
|
|
59842
|
-
layers.push({
|
|
59843
|
-
id: "coding",
|
|
59844
|
-
namespace: plan.codingOverlay.namespace,
|
|
59845
|
-
readable: true,
|
|
59846
|
-
writable: true,
|
|
59847
|
-
promotable: false,
|
|
59848
|
-
reason: "coding overlay namespace combined with the principal base (rule 42)"
|
|
59849
|
-
});
|
|
59850
|
-
}
|
|
59851
|
-
if (plan.namespaceOverride) {
|
|
59852
|
-
layers.push({
|
|
59853
|
-
id: "explicit",
|
|
59854
|
-
namespace: plan.namespaceOverride,
|
|
59855
|
-
readable: true,
|
|
59856
|
-
writable: canWriteNamespace(plan.principal, plan.namespaceOverride, config),
|
|
59857
|
-
promotable: false,
|
|
59858
|
-
reason: "explicit namespace override authorized for this principal"
|
|
59859
|
-
});
|
|
59860
|
-
}
|
|
59861
|
-
const promotionTargets = scopeProfilePlan ? scopeProfilePlan.promotionTargets.map((target) => ({
|
|
59862
|
-
target: target.target,
|
|
59863
|
-
namespace: target.namespace,
|
|
59864
|
-
authorized: target.authorized,
|
|
59865
|
-
reason: target.reason
|
|
59866
|
-
})) : [];
|
|
59867
|
-
for (const warning of scopeProfilePlan?.warnings ?? []) {
|
|
59868
|
-
warnings.push(warning);
|
|
59869
|
-
}
|
|
59870
|
-
return {
|
|
59871
|
-
principal: plan.principal,
|
|
59872
|
-
namespaceOverride: plan.namespaceOverride,
|
|
59873
|
-
writeNamespace: plan.baseNamespace,
|
|
59874
|
-
readNamespaces: [...plan.readNamespaces],
|
|
59875
|
-
codingOverlay: plan.codingOverlay ? {
|
|
59876
|
-
namespace: plan.codingOverlay.namespace,
|
|
59877
|
-
readFallbacks: plan.codingOverlay.readFallbacks
|
|
59878
|
-
} : null,
|
|
59879
|
-
scopeProfileId: scopeProfilePlan?.profileId ?? null,
|
|
59880
|
-
layers,
|
|
59881
|
-
promotionTargets,
|
|
59882
|
-
warnings,
|
|
59883
|
-
plan
|
|
59884
|
-
};
|
|
59885
|
-
}
|
|
59886
|
-
async function listAdminNamespaces(options) {
|
|
59887
|
-
const { catalog, filter } = options;
|
|
59888
|
-
if (!catalog.enabled) {
|
|
59889
|
-
return { enabled: false, entries: [] };
|
|
59890
|
-
}
|
|
59891
|
-
const staleMs = (options.staleThresholdDays ?? 30) * 24 * 60 * 60 * 1e3;
|
|
59892
|
-
const staleBefore = new Date(Date.now() - staleMs);
|
|
59893
|
-
const records = await catalog.listNamespaces({
|
|
59894
|
-
kind: filter?.kind,
|
|
59895
|
-
discoveredBy: filter?.discoveredBy,
|
|
59896
|
-
writtenSince: filter?.writtenSince
|
|
59897
|
-
});
|
|
59898
|
-
let entries = records.map((record) => toAdminEntry(record, staleBefore));
|
|
59899
|
-
if (filter?.staleBefore) {
|
|
59900
|
-
const cutoff = filter.staleBefore.getTime();
|
|
59901
|
-
entries = entries.filter((entry) => {
|
|
59902
|
-
if (!entry.lastWriteAt) return true;
|
|
59903
|
-
const ms = Date.parse(entry.lastWriteAt);
|
|
59904
|
-
return Number.isFinite(ms) && ms <= cutoff;
|
|
59905
|
-
});
|
|
59906
|
-
}
|
|
59907
|
-
return { enabled: true, entries };
|
|
59908
|
-
}
|
|
59909
|
-
function toAdminEntry(record, staleBefore) {
|
|
59910
|
-
const lastWriteMs = record.lastWriteAt ? Date.parse(record.lastWriteAt) : Number.NaN;
|
|
59911
|
-
const stale = !Number.isFinite(lastWriteMs) || lastWriteMs < staleBefore.getTime();
|
|
59912
|
-
return {
|
|
59913
|
-
namespace: record.namespace,
|
|
59914
|
-
identityToken: record.identityToken,
|
|
59915
|
-
kind: record.kind,
|
|
59916
|
-
createdAt: record.createdAt,
|
|
59917
|
-
lastReadAt: record.lastReadAt,
|
|
59918
|
-
lastWriteAt: record.lastWriteAt,
|
|
59919
|
-
lastMaintenanceAt: record.lastMaintenanceAt,
|
|
59920
|
-
storageDir: record.storageDir,
|
|
59921
|
-
discoveredBy: record.discoveredBy,
|
|
59922
|
-
stale
|
|
59923
|
-
};
|
|
59924
|
-
}
|
|
59925
|
-
function classifyQmdState(qmd) {
|
|
59926
|
-
if (!qmd.available) {
|
|
59927
|
-
return {
|
|
59928
|
-
state: "unavailable",
|
|
59929
|
-
reason: "QMD backend is unavailable for this namespace",
|
|
59930
|
-
degraded: true
|
|
59931
|
-
};
|
|
59932
|
-
}
|
|
59933
|
-
switch (qmd.collectionState) {
|
|
59934
|
-
case "present":
|
|
59935
|
-
return { state: "healthy", reason: "QMD collection is ready", degraded: false };
|
|
59936
|
-
case "skipped":
|
|
59937
|
-
return {
|
|
59938
|
-
state: "healthy",
|
|
59939
|
-
reason: "QMD is skipped for this namespace (intentionally disabled)",
|
|
59940
|
-
degraded: false
|
|
59941
|
-
};
|
|
59942
|
-
case "missing":
|
|
59943
|
-
return {
|
|
59944
|
-
state: "missing",
|
|
59945
|
-
reason: "QMD collection is not built for this namespace \u2014 add the collection to the QMD index",
|
|
59946
|
-
degraded: true
|
|
59947
|
-
};
|
|
59948
|
-
case "unknown":
|
|
59949
|
-
return {
|
|
59950
|
-
state: "unknown",
|
|
59951
|
-
reason: "QMD collection status could not be determined (transient during startup/reindex)",
|
|
59952
|
-
degraded: true
|
|
59953
|
-
};
|
|
59954
|
-
default:
|
|
59955
|
-
return {
|
|
59956
|
-
state: "unknown",
|
|
59957
|
-
reason: `QMD reported an unrecognized collection state '${qmd.collectionState}'`,
|
|
59958
|
-
degraded: false
|
|
59959
|
-
};
|
|
59960
|
-
}
|
|
59961
|
-
}
|
|
59962
|
-
async function gatherMaintenanceHealth(options) {
|
|
59963
|
-
const { catalog, qmdHealthProvider } = options;
|
|
59964
|
-
if (!catalog.enabled) {
|
|
59965
|
-
return { enabled: false, degradedMode: false, perNamespace: [] };
|
|
59966
|
-
}
|
|
59967
|
-
const records = await catalog.listNamespaces();
|
|
59968
|
-
let degradedMode = false;
|
|
59969
|
-
const perNamespace = await Promise.all(
|
|
59970
|
-
records.map(async (record) => {
|
|
59971
|
-
const entry = {
|
|
59972
|
-
namespace: record.namespace,
|
|
59973
|
-
kind: record.kind,
|
|
59974
|
-
lastMaintenanceAt: record.lastMaintenanceAt,
|
|
59975
|
-
maintenanceMissing: !record.lastMaintenanceAt || Object.keys(record.lastMaintenanceAt).length === 0,
|
|
59976
|
-
qmdDegraded: false,
|
|
59977
|
-
qmdState: "not_probed",
|
|
59978
|
-
qmdStateReason: "QMD health probe not run for this report"
|
|
59979
|
-
};
|
|
59980
|
-
if (qmdHealthProvider) {
|
|
59981
|
-
try {
|
|
59982
|
-
const qmd = await qmdHealthProvider(record.namespace);
|
|
59983
|
-
if (qmd) {
|
|
59984
|
-
entry.qmd = qmd;
|
|
59985
|
-
const classified = classifyQmdState(qmd);
|
|
59986
|
-
entry.qmdState = classified.state;
|
|
59987
|
-
entry.qmdStateReason = classified.reason;
|
|
59988
|
-
entry.qmdDegraded = classified.degraded;
|
|
59989
|
-
} else {
|
|
59990
|
-
entry.qmdState = "not_probed";
|
|
59991
|
-
entry.qmdStateReason = "QMD health not available for this namespace";
|
|
59992
|
-
}
|
|
59993
|
-
} catch (err) {
|
|
59994
|
-
entry.qmdDegraded = true;
|
|
59995
|
-
entry.qmdState = "unavailable";
|
|
59996
|
-
entry.qmdStateReason = "QMD health probe failed";
|
|
59997
|
-
entry.qmdError = "QMD health probe failed";
|
|
59998
|
-
}
|
|
59999
|
-
}
|
|
60000
|
-
if (entry.qmdDegraded) degradedMode = true;
|
|
60001
|
-
return entry;
|
|
60002
|
-
})
|
|
60003
|
-
);
|
|
60004
|
-
return { enabled: true, degradedMode, perNamespace };
|
|
60005
|
-
}
|
|
60006
|
-
async function auditTranscripts(memoryDir) {
|
|
60007
|
-
const plan = await planSessionTranscriptMigration({
|
|
60008
|
-
memoryDir,
|
|
60009
|
-
apply: false
|
|
60010
|
-
});
|
|
60011
|
-
const files = plan.files.map((file) => ({
|
|
60012
|
-
sourceRelPath: file.sourceRelPath,
|
|
60013
|
-
fileName: file.fileName,
|
|
60014
|
-
distinctSessions: file.groups.length,
|
|
60015
|
-
movedEntries: file.groups.reduce((sum, group) => sum + group.entryCount, 0),
|
|
60016
|
-
unmovableLines: file.unmovableLines
|
|
60017
|
-
}));
|
|
60018
|
-
const mixedOtherDefault = files.some((file) => file.sourceRelPath.split(path61.sep).includes("other"));
|
|
60019
|
-
const summary = plan.movedEntries === 0 ? "No mixed-session transcript data detected; nothing to migrate." : `Found ${plan.movedEntries} entries across ${plan.distinctSessions} distinct sessions stranded in shared/legacy directories. Run the CLI migration command to re-home them.`;
|
|
60020
|
-
return {
|
|
60021
|
-
generatedAt: plan.generatedAt,
|
|
60022
|
-
dryRun: true,
|
|
60023
|
-
transcriptsDir: plan.transcriptsDir,
|
|
60024
|
-
mixedOtherDefault,
|
|
60025
|
-
distinctSessions: plan.distinctSessions,
|
|
60026
|
-
movedEntries: plan.movedEntries,
|
|
60027
|
-
files,
|
|
60028
|
-
summary
|
|
60029
|
-
};
|
|
60030
|
-
}
|
|
60031
|
-
var AdminPromotionError = class extends Error {
|
|
60032
|
-
code;
|
|
60033
|
-
constructor(code, message) {
|
|
60034
|
-
super(message);
|
|
60035
|
-
this.name = "AdminPromotionError";
|
|
60036
|
-
this.code = code;
|
|
60037
|
-
}
|
|
60038
|
-
};
|
|
60039
|
-
async function promoteMemory(options) {
|
|
60040
|
-
const reason = options.reason.trim();
|
|
60041
|
-
if (reason.length === 0) {
|
|
60042
|
-
throw new AdminPromotionError("reason_required", "promotion requires a non-empty reason");
|
|
60043
|
-
}
|
|
60044
|
-
if (options.targets.length === 0) {
|
|
60045
|
-
throw new AdminPromotionError("targets_required", "promotion requires at least one target");
|
|
60046
|
-
}
|
|
60047
|
-
const { config, principal, scopeProfilePlan } = options;
|
|
60048
|
-
const resolvedTargets = options.targets.map((requested) => {
|
|
60049
|
-
if (requested.kind === "explicit") {
|
|
60050
|
-
const namespace = requested.namespace?.trim();
|
|
60051
|
-
if (!namespace) {
|
|
60052
|
-
return {
|
|
60053
|
-
target: requested.kind,
|
|
60054
|
-
namespace: "",
|
|
60055
|
-
authorized: false,
|
|
60056
|
-
promoted: false,
|
|
60057
|
-
reason: "explicit promotion requires a namespace"
|
|
60058
|
-
};
|
|
60059
|
-
}
|
|
60060
|
-
const authorized = canWriteNamespace(principal, namespace, config);
|
|
60061
|
-
return {
|
|
60062
|
-
target: requested.kind,
|
|
60063
|
-
namespace,
|
|
60064
|
-
authorized,
|
|
60065
|
-
promoted: false,
|
|
60066
|
-
reason: authorized ? "explicit namespace writable by this principal" : "explicit namespace is not writable by this principal"
|
|
60067
|
-
};
|
|
60068
|
-
}
|
|
60069
|
-
if (!scopeProfilePlan) {
|
|
60070
|
-
return {
|
|
60071
|
-
target: requested.kind,
|
|
60072
|
-
namespace: "",
|
|
60073
|
-
authorized: false,
|
|
60074
|
-
promoted: false,
|
|
60075
|
-
reason: requested.kind === "userProject" || requested.kind === "teamProject" ? `no active scope profile; '${requested.kind}' promotion requires an active scope profile with a coding context (pass a sessionKey)` : `no active scope profile; '${requested.kind}' promotion requires an active scope profile`
|
|
60076
|
-
};
|
|
60077
|
-
}
|
|
60078
|
-
const layer = scopeProfilePlan.promotionTargets.find((t) => t.target === requested.kind);
|
|
60079
|
-
if (!layer) {
|
|
60080
|
-
return {
|
|
60081
|
-
target: requested.kind,
|
|
60082
|
-
namespace: "",
|
|
60083
|
-
authorized: false,
|
|
60084
|
-
promoted: false,
|
|
60085
|
-
reason: `promotion target '${requested.kind}' is not configured on the active scope profile`
|
|
60086
|
-
};
|
|
60087
|
-
}
|
|
60088
|
-
return {
|
|
60089
|
-
target: requested.kind,
|
|
60090
|
-
namespace: layer.namespace ?? "",
|
|
60091
|
-
authorized: layer.authorized && Boolean(layer.namespace),
|
|
60092
|
-
promoted: false,
|
|
60093
|
-
reason: layer.reason
|
|
60094
|
-
};
|
|
60095
|
-
});
|
|
60096
|
-
const sourceMemory = await options.storage.readMemory(options.sourceNamespace, options.sourceMemoryId);
|
|
60097
|
-
if (!sourceMemory) {
|
|
60098
|
-
throw new AdminPromotionError(
|
|
60099
|
-
"source_not_found",
|
|
60100
|
-
`source memory ${options.sourceMemoryId} not found in namespace ${options.sourceNamespace}`
|
|
60101
|
-
);
|
|
60102
|
-
}
|
|
60103
|
-
const auditTargets = [];
|
|
60104
|
-
for (const target of resolvedTargets) {
|
|
60105
|
-
if (!target.authorized || !target.namespace) {
|
|
60106
|
-
auditTargets.push({ target: target.target, namespace: target.namespace, promoted: false });
|
|
60107
|
-
continue;
|
|
60108
|
-
}
|
|
60109
|
-
if (target.namespace === options.sourceNamespace) {
|
|
60110
|
-
target.reason = "target namespace equals source namespace; nothing to promote";
|
|
60111
|
-
auditTargets.push({ target: target.target, namespace: target.namespace, promoted: false });
|
|
60112
|
-
continue;
|
|
60113
|
-
}
|
|
60114
|
-
try {
|
|
60115
|
-
const promotedId = await options.storage.writePromotedMemory(target.namespace, {
|
|
60116
|
-
category: sourceMemory.category,
|
|
60117
|
-
content: sourceMemory.content,
|
|
60118
|
-
confidence: sourceMemory.frontmatter.confidence ?? 0.5,
|
|
60119
|
-
tags: [...sourceMemory.frontmatter.tags ?? [], `admin-promotion-${target.target}`],
|
|
60120
|
-
entityRef: sourceMemory.frontmatter.entityRef,
|
|
60121
|
-
sourceMemoryId: options.sourceMemoryId,
|
|
60122
|
-
sourceNamespace: options.sourceNamespace,
|
|
60123
|
-
reason,
|
|
60124
|
-
actor: options.actor,
|
|
60125
|
-
validAt: sourceMemory.frontmatter.valid_at,
|
|
60126
|
-
lineage: [options.sourceMemoryId],
|
|
60127
|
-
...sourceMemory.frontmatter.sourceConnector ? { sourceConnector: sourceMemory.frontmatter.sourceConnector } : {},
|
|
60128
|
-
...sourceMemory.frontmatter.toolScoped ? { toolScoped: true } : {}
|
|
60129
|
-
});
|
|
60130
|
-
target.promoted = true;
|
|
60131
|
-
target.promotedMemoryId = promotedId;
|
|
60132
|
-
auditTargets.push({ target: target.target, namespace: target.namespace, promoted: true });
|
|
60133
|
-
} catch (err) {
|
|
60134
|
-
target.reason = "promotion write failed";
|
|
60135
|
-
auditTargets.push({ target: target.target, namespace: target.namespace, promoted: false });
|
|
60136
|
-
}
|
|
60137
|
-
}
|
|
60138
|
-
const at2 = (/* @__PURE__ */ new Date()).toISOString();
|
|
60139
|
-
const audit = {
|
|
60140
|
-
at: at2,
|
|
60141
|
-
actor: options.actor,
|
|
60142
|
-
sourceMemoryId: options.sourceMemoryId,
|
|
60143
|
-
sourceNamespace: options.sourceNamespace,
|
|
60144
|
-
reason,
|
|
60145
|
-
targets: auditTargets
|
|
60146
|
-
};
|
|
60147
|
-
return {
|
|
60148
|
-
ok: resolvedTargets.some((t) => t.promoted),
|
|
60149
|
-
sourceMemoryId: options.sourceMemoryId,
|
|
60150
|
-
sourceNamespace: options.sourceNamespace,
|
|
60151
|
-
targets: resolvedTargets,
|
|
60152
|
-
audit
|
|
60153
|
-
};
|
|
60154
|
-
}
|
|
60155
|
-
|
|
60156
59753
|
// src/access-admin-ops-surface.ts
|
|
60157
59754
|
import * as nodeFs from "fs/promises";
|
|
60158
59755
|
import * as nodePath from "path";
|
|
@@ -63189,7 +62786,7 @@ import { createHash as createHash26 } from "crypto";
|
|
|
63189
62786
|
// src/review/review-deck-mutation.ts
|
|
63190
62787
|
import { createHash as createHash25, randomUUID as randomUUID8 } from "crypto";
|
|
63191
62788
|
import fs11 from "fs";
|
|
63192
|
-
import
|
|
62789
|
+
import path61 from "path";
|
|
63193
62790
|
var ACTOR = "admin-console.review-deck";
|
|
63194
62791
|
var RULE_VERSION = "admin-console.review-deck.v1";
|
|
63195
62792
|
var DECK_VERSIONING = {
|
|
@@ -63259,7 +62856,7 @@ function parseReviewLifecycleReceipt(value) {
|
|
|
63259
62856
|
if (!isReceiptAction(rec.action)) return null;
|
|
63260
62857
|
if (typeof rec.beforeRevision !== "string") return null;
|
|
63261
62858
|
if (typeof rec.afterRevision !== "string") return null;
|
|
63262
|
-
if (!isNonEmptyString(rec.sourcePath) ||
|
|
62859
|
+
if (!isNonEmptyString(rec.sourcePath) || path61.isAbsolute(rec.sourcePath)) return null;
|
|
63263
62860
|
if (rec.revisionArtifact !== void 0 && typeof rec.revisionArtifact !== "string") return null;
|
|
63264
62861
|
if (rec.undoOfReceiptId !== void 0 && typeof rec.undoOfReceiptId !== "string") return null;
|
|
63265
62862
|
const parsed = {
|
|
@@ -63291,11 +62888,11 @@ function findStoredReceipt(events, receiptId) {
|
|
|
63291
62888
|
return null;
|
|
63292
62889
|
}
|
|
63293
62890
|
function resolveInside(memoryDir, rel) {
|
|
63294
|
-
if (!rel ||
|
|
63295
|
-
const root =
|
|
63296
|
-
const abs =
|
|
63297
|
-
const next =
|
|
63298
|
-
if (next.startsWith("..") ||
|
|
62891
|
+
if (!rel || path61.isAbsolute(rel)) return null;
|
|
62892
|
+
const root = path61.resolve(memoryDir);
|
|
62893
|
+
const abs = path61.resolve(root, rel.split("/").join(path61.sep));
|
|
62894
|
+
const next = path61.relative(root, abs);
|
|
62895
|
+
if (next.startsWith("..") || path61.isAbsolute(next)) return null;
|
|
63299
62896
|
return abs;
|
|
63300
62897
|
}
|
|
63301
62898
|
function currentRevision(absPath) {
|
|
@@ -66916,7 +66513,7 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
66916
66513
|
const resolvedNamespace = this.resolveReadableNamespace(options.namespace, options.principal);
|
|
66917
66514
|
const storage = await offlineSyncStorageForSnapshot(this.orchestrator, resolvedNamespace);
|
|
66918
66515
|
const storageHash = createHash27("sha256").update(storage.dir).digest("hex").slice(0, 16);
|
|
66919
|
-
const deletions = [...await storage.readDeletionRevisions()].map(([
|
|
66516
|
+
const deletions = [...await storage.readDeletionRevisions()].map(([path62, mtimeMs]) => ({ path: path62, mtimeMs }));
|
|
66920
66517
|
const snapshotBuilder = options.includeContent === false && options.baseFiles && options.baseFiles.length > 0 ? buildOfflineSyncSnapshotFromBase : buildOfflineSyncSnapshot;
|
|
66921
66518
|
const snapshot = await snapshotBuilder({
|
|
66922
66519
|
root: storage.dir,
|
|
@@ -66949,7 +66546,7 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
|
|
|
66949
66546
|
excludeFile: createSupportPassportPrivateFileExclusion(storage),
|
|
66950
66547
|
readFile: async ({ filePath }) => storage.readOfflineSyncFile(filePath),
|
|
66951
66548
|
readFileDigest: async ({ filePath }) => storage.digestOfflineSyncFile(filePath),
|
|
66952
|
-
deletions: [...await storage.readDeletionRevisions()].map(([
|
|
66549
|
+
deletions: [...await storage.readDeletionRevisions()].map(([path62, mtimeMs]) => ({ path: path62, mtimeMs })),
|
|
66953
66550
|
signal: options.signal
|
|
66954
66551
|
}),
|
|
66955
66552
|
namespace: resolvedNamespace
|
|
@@ -68055,4 +67652,4 @@ export {
|
|
|
68055
67652
|
EngramAccessService,
|
|
68056
67653
|
AccessAdminOpsSurface
|
|
68057
67654
|
};
|
|
68058
|
-
//# sourceMappingURL=chunk-
|
|
67655
|
+
//# sourceMappingURL=chunk-AIS7RLTG.js.map
|