@remnic/core 10.0.157 → 10.0.158
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 +9 -9
- package/dist/access-cli.js +9 -9
- package/dist/access-extraction-force-flush-preempt.js +9 -9
- package/dist/access-extraction-force-flush.js +9 -9
- package/dist/access-http-briefing.js +9 -9
- package/dist/access-http-query.js +9 -9
- package/dist/access-http.js +9 -9
- package/dist/access-identity-continuity-surface.js +9 -9
- package/dist/access-lcm-surface.js +9 -9
- package/dist/access-mcp.js +9 -9
- package/dist/access-observe-write-surface.js +9 -9
- package/dist/access-operations-batch.js +9 -9
- package/dist/access-operations.js +9 -9
- package/dist/access-recall-concurrency.js +9 -9
- package/dist/access-recall-response.js +9 -9
- package/dist/access-recall-surface.js +9 -9
- package/dist/access-service.js +9 -9
- package/dist/calibration.js +3 -3
- package/dist/{chunk-SKCMEZBU.js → chunk-52EM4UQU.js} +2 -2
- package/dist/{chunk-QAQL2OQH.js → chunk-5V3IBSVB.js} +2 -2
- package/dist/{chunk-K4TMUEYI.js → chunk-BT5TAOXG.js} +1 -1
- package/dist/{chunk-RGXNPAMA.js → chunk-DQ2N7IN6.js} +7 -7
- package/dist/{chunk-AGMMHT4P.js → chunk-GT2HWRST.js} +21 -3
- package/dist/chunk-GT2HWRST.js.map +1 -0
- package/dist/{chunk-BDKLKX43.js → chunk-KYZMCH4I.js} +79 -6
- package/dist/{chunk-BDKLKX43.js.map → chunk-KYZMCH4I.js.map} +1 -1
- package/dist/{chunk-Z6AP6O32.js → chunk-RV7IYUBK.js} +2 -2
- package/dist/{chunk-RXG3WF7C.js → chunk-TXVTNDQT.js} +2 -2
- package/dist/{chunk-2TUWMP7B.js → chunk-UADAXWUJ.js} +3 -3
- package/dist/{chunk-XWRSQWQO.js → chunk-YOR5QBEU.js} +60 -59
- package/dist/chunk-YOR5QBEU.js.map +1 -0
- package/dist/cli.js +9 -9
- package/dist/compounding/engine.js +1 -1
- package/dist/explicit-capture.js +9 -9
- package/dist/extraction.js +4 -4
- package/dist/index.js +9 -9
- package/dist/local-llm-helpers.d.ts +22 -8
- package/dist/local-llm-helpers.d.ts.map +1 -1
- package/dist/local-llm-helpers.js +11 -1
- package/dist/local-llm-rate-limit.d.ts +1 -5
- package/dist/local-llm-rate-limit.d.ts.map +1 -1
- package/dist/local-llm-rate-limit.js +3 -1
- package/dist/local-llm.d.ts +2 -4
- package/dist/local-llm.d.ts.map +1 -1
- package/dist/local-llm.js +3 -3
- package/dist/orchestration/backlog-scheduler.js +10 -10
- package/dist/orchestration/buffer-drain-runner.js +10 -10
- package/dist/orchestration/maintenance.js +5 -5
- package/dist/orchestrator.js +9 -9
- package/dist/recall-navigation.js +9 -9
- package/dist/summarizer.js +4 -4
- package/dist/support-passport/index.js +4 -4
- package/package.json +12 -2
- package/src/local-llm-helpers.ts +116 -14
- package/src/local-llm-rate-limit.test.ts +79 -1
- package/src/local-llm-rate-limit.ts +37 -1
- package/src/local-llm.ts +75 -74
- package/dist/chunk-AGMMHT4P.js.map +0 -1
- package/dist/chunk-XWRSQWQO.js.map +0 -1
- /package/dist/{chunk-SKCMEZBU.js.map → chunk-52EM4UQU.js.map} +0 -0
- /package/dist/{chunk-QAQL2OQH.js.map → chunk-5V3IBSVB.js.map} +0 -0
- /package/dist/{chunk-K4TMUEYI.js.map → chunk-BT5TAOXG.js.map} +0 -0
- /package/dist/{chunk-RGXNPAMA.js.map → chunk-DQ2N7IN6.js.map} +0 -0
- /package/dist/{chunk-Z6AP6O32.js.map → chunk-RV7IYUBK.js.map} +0 -0
- /package/dist/{chunk-RXG3WF7C.js.map → chunk-TXVTNDQT.js.map} +0 -0
- /package/dist/{chunk-2TUWMP7B.js.map → chunk-UADAXWUJ.js.map} +0 -0
package/dist/local-llm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-llm.d.ts","sourceRoot":"","sources":["../src/local-llm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"local-llm.d.ts","sourceRoot":"","sources":["../src/local-llm.ts"],"names":[],"mappings":"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"}
|
package/dist/local-llm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocalLlmClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YOR5QBEU.js";
|
|
4
4
|
import "./chunk-MJFL75J6.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-GT2HWRST.js";
|
|
6
6
|
import "./chunk-U4LUIE6Y.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-KYZMCH4I.js";
|
|
8
8
|
import "./chunk-5YQXWVCP.js";
|
|
9
9
|
import "./chunk-TOTT6S2V.js";
|
|
10
10
|
import "./chunk-QSF5SJAM.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BufferDrainRunner
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-RV7IYUBK.js";
|
|
4
|
+
import "../chunk-DQ2N7IN6.js";
|
|
5
5
|
import "../chunk-TH6OYP6I.js";
|
|
6
6
|
import "../chunk-PQM3B54K.js";
|
|
7
7
|
import "../chunk-2MWKUVHT.js";
|
|
@@ -17,7 +17,7 @@ import "../chunk-K3KSTSGM.js";
|
|
|
17
17
|
import "../chunk-BV2TIZ4F.js";
|
|
18
18
|
import "../chunk-Z734BLO3.js";
|
|
19
19
|
import "../chunk-HDDRVXX4.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-5V3IBSVB.js";
|
|
21
21
|
import "../chunk-OZKVVUJB.js";
|
|
22
22
|
import "../chunk-2DL3OFLD.js";
|
|
23
23
|
import "../chunk-G4IAEX6D.js";
|
|
@@ -31,7 +31,7 @@ import "../chunk-FGDKJJZS.js";
|
|
|
31
31
|
import "../chunk-AJVLDJU6.js";
|
|
32
32
|
import "../chunk-TBUEE7XF.js";
|
|
33
33
|
import "../chunk-5PHOU5QI.js";
|
|
34
|
-
import "../chunk-
|
|
34
|
+
import "../chunk-UADAXWUJ.js";
|
|
35
35
|
import "../chunk-I74SUMNI.js";
|
|
36
36
|
import "../chunk-ILNPU5W5.js";
|
|
37
37
|
import "../chunk-VZAKYDMJ.js";
|
|
@@ -61,7 +61,7 @@ import "../chunk-4AKPTHOO.js";
|
|
|
61
61
|
import "../chunk-TECVW3JP.js";
|
|
62
62
|
import "../chunk-C5JF6EZ7.js";
|
|
63
63
|
import "../chunk-2524MOWK.js";
|
|
64
|
-
import "../chunk-
|
|
64
|
+
import "../chunk-BT5TAOXG.js";
|
|
65
65
|
import "../chunk-JVBAPAWZ.js";
|
|
66
66
|
import "../chunk-HSSERO3E.js";
|
|
67
67
|
import "../chunk-NOUJNHWG.js";
|
|
@@ -98,7 +98,7 @@ import "../chunk-OBPOIZNR.js";
|
|
|
98
98
|
import "../chunk-ECZU5BJH.js";
|
|
99
99
|
import "../chunk-77NTFICT.js";
|
|
100
100
|
import "../chunk-LJLGH2DE.js";
|
|
101
|
-
import "../chunk-
|
|
101
|
+
import "../chunk-TXVTNDQT.js";
|
|
102
102
|
import "../chunk-HNOSWPKG.js";
|
|
103
103
|
import "../chunk-ODZKV2F7.js";
|
|
104
104
|
import "../chunk-WWDO7ZWM.js";
|
|
@@ -194,7 +194,7 @@ import "../chunk-64NJRYU2.js";
|
|
|
194
194
|
import "../chunk-U2PSE7MB.js";
|
|
195
195
|
import "../chunk-BPPUH5JM.js";
|
|
196
196
|
import "../chunk-LEO4MQ3S.js";
|
|
197
|
-
import "../chunk-
|
|
197
|
+
import "../chunk-52EM4UQU.js";
|
|
198
198
|
import "../chunk-EI6V5UXY.js";
|
|
199
199
|
import "../chunk-773QSFFN.js";
|
|
200
200
|
import "../chunk-YAVIBVCU.js";
|
|
@@ -302,11 +302,11 @@ import "../chunk-QASTQVGK.js";
|
|
|
302
302
|
import "../chunk-CSAKJVXW.js";
|
|
303
303
|
import "../chunk-K2XUWZBM.js";
|
|
304
304
|
import "../chunk-OD4FM2U7.js";
|
|
305
|
-
import "../chunk-
|
|
305
|
+
import "../chunk-YOR5QBEU.js";
|
|
306
306
|
import "../chunk-MJFL75J6.js";
|
|
307
|
-
import "../chunk-
|
|
307
|
+
import "../chunk-GT2HWRST.js";
|
|
308
308
|
import "../chunk-U4LUIE6Y.js";
|
|
309
|
-
import "../chunk-
|
|
309
|
+
import "../chunk-KYZMCH4I.js";
|
|
310
310
|
import "../chunk-5YQXWVCP.js";
|
|
311
311
|
import "../chunk-YN2DQ2D6.js";
|
|
312
312
|
import "../chunk-FKBGK3NC.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BufferDrainRunner,
|
|
3
3
|
ClaimBufferStorage
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-RV7IYUBK.js";
|
|
5
|
+
import "../chunk-DQ2N7IN6.js";
|
|
6
6
|
import "../chunk-TH6OYP6I.js";
|
|
7
7
|
import "../chunk-PQM3B54K.js";
|
|
8
8
|
import "../chunk-2MWKUVHT.js";
|
|
@@ -18,7 +18,7 @@ import "../chunk-K3KSTSGM.js";
|
|
|
18
18
|
import "../chunk-BV2TIZ4F.js";
|
|
19
19
|
import "../chunk-Z734BLO3.js";
|
|
20
20
|
import "../chunk-HDDRVXX4.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-5V3IBSVB.js";
|
|
22
22
|
import "../chunk-OZKVVUJB.js";
|
|
23
23
|
import "../chunk-2DL3OFLD.js";
|
|
24
24
|
import "../chunk-G4IAEX6D.js";
|
|
@@ -32,7 +32,7 @@ import "../chunk-FGDKJJZS.js";
|
|
|
32
32
|
import "../chunk-AJVLDJU6.js";
|
|
33
33
|
import "../chunk-TBUEE7XF.js";
|
|
34
34
|
import "../chunk-5PHOU5QI.js";
|
|
35
|
-
import "../chunk-
|
|
35
|
+
import "../chunk-UADAXWUJ.js";
|
|
36
36
|
import "../chunk-I74SUMNI.js";
|
|
37
37
|
import "../chunk-ILNPU5W5.js";
|
|
38
38
|
import "../chunk-VZAKYDMJ.js";
|
|
@@ -62,7 +62,7 @@ import "../chunk-4AKPTHOO.js";
|
|
|
62
62
|
import "../chunk-TECVW3JP.js";
|
|
63
63
|
import "../chunk-C5JF6EZ7.js";
|
|
64
64
|
import "../chunk-2524MOWK.js";
|
|
65
|
-
import "../chunk-
|
|
65
|
+
import "../chunk-BT5TAOXG.js";
|
|
66
66
|
import "../chunk-JVBAPAWZ.js";
|
|
67
67
|
import "../chunk-HSSERO3E.js";
|
|
68
68
|
import "../chunk-NOUJNHWG.js";
|
|
@@ -99,7 +99,7 @@ import "../chunk-OBPOIZNR.js";
|
|
|
99
99
|
import "../chunk-ECZU5BJH.js";
|
|
100
100
|
import "../chunk-77NTFICT.js";
|
|
101
101
|
import "../chunk-LJLGH2DE.js";
|
|
102
|
-
import "../chunk-
|
|
102
|
+
import "../chunk-TXVTNDQT.js";
|
|
103
103
|
import "../chunk-HNOSWPKG.js";
|
|
104
104
|
import "../chunk-ODZKV2F7.js";
|
|
105
105
|
import "../chunk-WWDO7ZWM.js";
|
|
@@ -195,7 +195,7 @@ import "../chunk-64NJRYU2.js";
|
|
|
195
195
|
import "../chunk-U2PSE7MB.js";
|
|
196
196
|
import "../chunk-BPPUH5JM.js";
|
|
197
197
|
import "../chunk-LEO4MQ3S.js";
|
|
198
|
-
import "../chunk-
|
|
198
|
+
import "../chunk-52EM4UQU.js";
|
|
199
199
|
import "../chunk-EI6V5UXY.js";
|
|
200
200
|
import "../chunk-773QSFFN.js";
|
|
201
201
|
import "../chunk-YAVIBVCU.js";
|
|
@@ -303,11 +303,11 @@ import "../chunk-QASTQVGK.js";
|
|
|
303
303
|
import "../chunk-CSAKJVXW.js";
|
|
304
304
|
import "../chunk-K2XUWZBM.js";
|
|
305
305
|
import "../chunk-OD4FM2U7.js";
|
|
306
|
-
import "../chunk-
|
|
306
|
+
import "../chunk-YOR5QBEU.js";
|
|
307
307
|
import "../chunk-MJFL75J6.js";
|
|
308
|
-
import "../chunk-
|
|
308
|
+
import "../chunk-GT2HWRST.js";
|
|
309
309
|
import "../chunk-U4LUIE6Y.js";
|
|
310
|
-
import "../chunk-
|
|
310
|
+
import "../chunk-KYZMCH4I.js";
|
|
311
311
|
import "../chunk-5YQXWVCP.js";
|
|
312
312
|
import "../chunk-YN2DQ2D6.js";
|
|
313
313
|
import "../chunk-FKBGK3NC.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MaintenanceScheduler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-UADAXWUJ.js";
|
|
4
4
|
import "../chunk-666A3MOW.js";
|
|
5
5
|
import "../chunk-2YJYBAR3.js";
|
|
6
6
|
import "../chunk-BDFOBNLX.js";
|
|
7
7
|
import "../chunk-TBOCVPXL.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-BT5TAOXG.js";
|
|
9
9
|
import "../chunk-JVBAPAWZ.js";
|
|
10
10
|
import "../chunk-5CO5G4MN.js";
|
|
11
11
|
import "../chunk-B7F2G57I.js";
|
|
@@ -14,11 +14,11 @@ import "../chunk-UR6COSJN.js";
|
|
|
14
14
|
import "../chunk-KJTKLXTH.js";
|
|
15
15
|
import "../chunk-7PCWJZXG.js";
|
|
16
16
|
import "../chunk-2DQ2XREU.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-YOR5QBEU.js";
|
|
18
18
|
import "../chunk-MJFL75J6.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-GT2HWRST.js";
|
|
20
20
|
import "../chunk-U4LUIE6Y.js";
|
|
21
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-KYZMCH4I.js";
|
|
22
22
|
import "../chunk-5YQXWVCP.js";
|
|
23
23
|
import "../chunk-TBBDFYXW.js";
|
|
24
24
|
import "../chunk-TOTT6S2V.js";
|
package/dist/orchestrator.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
mergeGraphExpandedResults,
|
|
7
7
|
qmdStartupCollectionChecksWithTimeout,
|
|
8
8
|
resolveEffectiveIdentityInjectionMode
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DQ2N7IN6.js";
|
|
10
10
|
import "./chunk-TH6OYP6I.js";
|
|
11
11
|
import "./chunk-PQM3B54K.js";
|
|
12
12
|
import "./chunk-2MWKUVHT.js";
|
|
@@ -22,7 +22,7 @@ import "./chunk-K3KSTSGM.js";
|
|
|
22
22
|
import "./chunk-BV2TIZ4F.js";
|
|
23
23
|
import "./chunk-Z734BLO3.js";
|
|
24
24
|
import "./chunk-HDDRVXX4.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-5V3IBSVB.js";
|
|
26
26
|
import "./chunk-OZKVVUJB.js";
|
|
27
27
|
import "./chunk-2DL3OFLD.js";
|
|
28
28
|
import "./chunk-G4IAEX6D.js";
|
|
@@ -38,7 +38,7 @@ import "./chunk-TBUEE7XF.js";
|
|
|
38
38
|
import {
|
|
39
39
|
formatCompressionGuidelinesForRecall
|
|
40
40
|
} from "./chunk-5PHOU5QI.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-UADAXWUJ.js";
|
|
42
42
|
import "./chunk-I74SUMNI.js";
|
|
43
43
|
import "./chunk-ILNPU5W5.js";
|
|
44
44
|
import "./chunk-VZAKYDMJ.js";
|
|
@@ -68,7 +68,7 @@ import "./chunk-4AKPTHOO.js";
|
|
|
68
68
|
import "./chunk-TECVW3JP.js";
|
|
69
69
|
import "./chunk-C5JF6EZ7.js";
|
|
70
70
|
import "./chunk-2524MOWK.js";
|
|
71
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-BT5TAOXG.js";
|
|
72
72
|
import "./chunk-JVBAPAWZ.js";
|
|
73
73
|
import "./chunk-HSSERO3E.js";
|
|
74
74
|
import "./chunk-NOUJNHWG.js";
|
|
@@ -105,7 +105,7 @@ import "./chunk-OBPOIZNR.js";
|
|
|
105
105
|
import "./chunk-ECZU5BJH.js";
|
|
106
106
|
import "./chunk-77NTFICT.js";
|
|
107
107
|
import "./chunk-LJLGH2DE.js";
|
|
108
|
-
import "./chunk-
|
|
108
|
+
import "./chunk-TXVTNDQT.js";
|
|
109
109
|
import "./chunk-HNOSWPKG.js";
|
|
110
110
|
import "./chunk-ODZKV2F7.js";
|
|
111
111
|
import "./chunk-WWDO7ZWM.js";
|
|
@@ -203,7 +203,7 @@ import "./chunk-64NJRYU2.js";
|
|
|
203
203
|
import "./chunk-U2PSE7MB.js";
|
|
204
204
|
import "./chunk-BPPUH5JM.js";
|
|
205
205
|
import "./chunk-LEO4MQ3S.js";
|
|
206
|
-
import "./chunk-
|
|
206
|
+
import "./chunk-52EM4UQU.js";
|
|
207
207
|
import "./chunk-EI6V5UXY.js";
|
|
208
208
|
import "./chunk-773QSFFN.js";
|
|
209
209
|
import "./chunk-YAVIBVCU.js";
|
|
@@ -350,11 +350,11 @@ import {
|
|
|
350
350
|
import "./chunk-CSAKJVXW.js";
|
|
351
351
|
import "./chunk-K2XUWZBM.js";
|
|
352
352
|
import "./chunk-OD4FM2U7.js";
|
|
353
|
-
import "./chunk-
|
|
353
|
+
import "./chunk-YOR5QBEU.js";
|
|
354
354
|
import "./chunk-MJFL75J6.js";
|
|
355
|
-
import "./chunk-
|
|
355
|
+
import "./chunk-GT2HWRST.js";
|
|
356
356
|
import "./chunk-U4LUIE6Y.js";
|
|
357
|
-
import "./chunk-
|
|
357
|
+
import "./chunk-KYZMCH4I.js";
|
|
358
358
|
import "./chunk-5YQXWVCP.js";
|
|
359
359
|
import "./chunk-YN2DQ2D6.js";
|
|
360
360
|
import "./chunk-FKBGK3NC.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runRecallNavigation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DQ2N7IN6.js";
|
|
4
4
|
import "./chunk-TH6OYP6I.js";
|
|
5
5
|
import "./chunk-PQM3B54K.js";
|
|
6
6
|
import "./chunk-2MWKUVHT.js";
|
|
@@ -16,7 +16,7 @@ import "./chunk-K3KSTSGM.js";
|
|
|
16
16
|
import "./chunk-BV2TIZ4F.js";
|
|
17
17
|
import "./chunk-Z734BLO3.js";
|
|
18
18
|
import "./chunk-HDDRVXX4.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-5V3IBSVB.js";
|
|
20
20
|
import "./chunk-OZKVVUJB.js";
|
|
21
21
|
import "./chunk-2DL3OFLD.js";
|
|
22
22
|
import "./chunk-G4IAEX6D.js";
|
|
@@ -30,7 +30,7 @@ import "./chunk-FGDKJJZS.js";
|
|
|
30
30
|
import "./chunk-AJVLDJU6.js";
|
|
31
31
|
import "./chunk-TBUEE7XF.js";
|
|
32
32
|
import "./chunk-5PHOU5QI.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-UADAXWUJ.js";
|
|
34
34
|
import "./chunk-I74SUMNI.js";
|
|
35
35
|
import "./chunk-ILNPU5W5.js";
|
|
36
36
|
import "./chunk-VZAKYDMJ.js";
|
|
@@ -60,7 +60,7 @@ import "./chunk-4AKPTHOO.js";
|
|
|
60
60
|
import "./chunk-TECVW3JP.js";
|
|
61
61
|
import "./chunk-C5JF6EZ7.js";
|
|
62
62
|
import "./chunk-2524MOWK.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-BT5TAOXG.js";
|
|
64
64
|
import "./chunk-JVBAPAWZ.js";
|
|
65
65
|
import "./chunk-HSSERO3E.js";
|
|
66
66
|
import "./chunk-NOUJNHWG.js";
|
|
@@ -97,7 +97,7 @@ import "./chunk-OBPOIZNR.js";
|
|
|
97
97
|
import "./chunk-ECZU5BJH.js";
|
|
98
98
|
import "./chunk-77NTFICT.js";
|
|
99
99
|
import "./chunk-LJLGH2DE.js";
|
|
100
|
-
import "./chunk-
|
|
100
|
+
import "./chunk-TXVTNDQT.js";
|
|
101
101
|
import "./chunk-HNOSWPKG.js";
|
|
102
102
|
import "./chunk-ODZKV2F7.js";
|
|
103
103
|
import "./chunk-WWDO7ZWM.js";
|
|
@@ -193,7 +193,7 @@ import "./chunk-64NJRYU2.js";
|
|
|
193
193
|
import "./chunk-U2PSE7MB.js";
|
|
194
194
|
import "./chunk-BPPUH5JM.js";
|
|
195
195
|
import "./chunk-LEO4MQ3S.js";
|
|
196
|
-
import "./chunk-
|
|
196
|
+
import "./chunk-52EM4UQU.js";
|
|
197
197
|
import "./chunk-EI6V5UXY.js";
|
|
198
198
|
import "./chunk-773QSFFN.js";
|
|
199
199
|
import "./chunk-YAVIBVCU.js";
|
|
@@ -301,11 +301,11 @@ import "./chunk-QASTQVGK.js";
|
|
|
301
301
|
import "./chunk-CSAKJVXW.js";
|
|
302
302
|
import "./chunk-K2XUWZBM.js";
|
|
303
303
|
import "./chunk-OD4FM2U7.js";
|
|
304
|
-
import "./chunk-
|
|
304
|
+
import "./chunk-YOR5QBEU.js";
|
|
305
305
|
import "./chunk-MJFL75J6.js";
|
|
306
|
-
import "./chunk-
|
|
306
|
+
import "./chunk-GT2HWRST.js";
|
|
307
307
|
import "./chunk-U4LUIE6Y.js";
|
|
308
|
-
import "./chunk-
|
|
308
|
+
import "./chunk-KYZMCH4I.js";
|
|
309
309
|
import "./chunk-5YQXWVCP.js";
|
|
310
310
|
import "./chunk-YN2DQ2D6.js";
|
|
311
311
|
import "./chunk-FKBGK3NC.js";
|
package/dist/summarizer.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HourlySummarizer,
|
|
3
3
|
summarizeHourlyStatus
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TXVTNDQT.js";
|
|
5
5
|
import "./chunk-HNOSWPKG.js";
|
|
6
6
|
import "./chunk-5Y43VGYB.js";
|
|
7
7
|
import "./chunk-QNUNAXBE.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-YOR5QBEU.js";
|
|
9
9
|
import "./chunk-MJFL75J6.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-GT2HWRST.js";
|
|
11
11
|
import "./chunk-U4LUIE6Y.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-KYZMCH4I.js";
|
|
13
13
|
import "./chunk-5YQXWVCP.js";
|
|
14
14
|
import "./chunk-KF7PQ7G2.js";
|
|
15
15
|
import "./chunk-TOTT6S2V.js";
|
|
@@ -31,12 +31,12 @@ import {
|
|
|
31
31
|
parseSupportPassportModelJob,
|
|
32
32
|
resolveSupportPassportModelRoutePlan,
|
|
33
33
|
syncDirectoryForDurability
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-5V3IBSVB.js";
|
|
35
|
+
import "../chunk-YOR5QBEU.js";
|
|
36
36
|
import "../chunk-MJFL75J6.js";
|
|
37
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-GT2HWRST.js";
|
|
38
38
|
import "../chunk-U4LUIE6Y.js";
|
|
39
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-KYZMCH4I.js";
|
|
40
40
|
import "../chunk-5YQXWVCP.js";
|
|
41
41
|
import "../chunk-TOTT6S2V.js";
|
|
42
42
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.158",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3339,6 +3339,16 @@
|
|
|
3339
3339
|
"types": "./dist/write-quarantine.d.ts",
|
|
3340
3340
|
"remnic-source": "./src/write-quarantine.ts",
|
|
3341
3341
|
"import": "./dist/write-quarantine.js"
|
|
3342
|
+
},
|
|
3343
|
+
"./local-llm-helpers": {
|
|
3344
|
+
"types": "./dist/local-llm-helpers.d.ts",
|
|
3345
|
+
"remnic-source": "./src/local-llm-helpers.ts",
|
|
3346
|
+
"import": "./dist/local-llm-helpers.js"
|
|
3347
|
+
},
|
|
3348
|
+
"./local-llm-helpers.js": {
|
|
3349
|
+
"types": "./dist/local-llm-helpers.d.ts",
|
|
3350
|
+
"remnic-source": "./src/local-llm-helpers.ts",
|
|
3351
|
+
"import": "./dist/local-llm-helpers.js"
|
|
3342
3352
|
}
|
|
3343
3353
|
},
|
|
3344
3354
|
"files": [
|
|
@@ -3396,7 +3406,7 @@
|
|
|
3396
3406
|
"core"
|
|
3397
3407
|
],
|
|
3398
3408
|
"peerDependencies": {
|
|
3399
|
-
"@remnic/coding-graph": "^10.0.
|
|
3409
|
+
"@remnic/coding-graph": "^10.0.158"
|
|
3400
3410
|
},
|
|
3401
3411
|
"peerDependenciesMeta": {
|
|
3402
3412
|
"@remnic/coding-graph": {
|
package/src/local-llm-helpers.ts
CHANGED
|
@@ -274,21 +274,123 @@ export class SingleFlightProbe {
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
/**
|
|
278
|
-
*
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
277
|
+
/** True when `value` is safe for `fetch` request headers. Node's `Headers`
|
|
278
|
+
* accepts a ByteString: controls and DEL are out, and so is anything above
|
|
279
|
+
* U+00FF — `é` is sendable, `Ā` is not (Kilo review on #3474). */
|
|
280
|
+
export function isHttpHeaderFieldValue(value: string): boolean {
|
|
281
|
+
if (!value) return false;
|
|
282
|
+
for (let i = 0; i < value.length; i += 1) {
|
|
283
|
+
const code = value.charCodeAt(i);
|
|
284
|
+
if (code < 0x20 || code === 0x7f || code > 0xff) return false;
|
|
285
|
+
}
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function trimTrailingSlashes(url: string): string {
|
|
290
|
+
let end = url.length;
|
|
291
|
+
while (end > 0 && url.charCodeAt(end - 1) === 47) end -= 1;
|
|
292
|
+
return end === url.length ? url : url.slice(0, end);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** Circuit-breaker and rate-limit scope when recall/extraction share one proxy URL. */
|
|
296
|
+
export function formatLocalLlmPoolKey(chatUrl: string, operation: string): string {
|
|
297
|
+
let normalized = chatUrl.replace("localhost", "127.0.0.1");
|
|
298
|
+
normalized = trimTrailingSlashes(normalized);
|
|
299
|
+
if (normalized.endsWith("/v1")) {
|
|
300
|
+
normalized = normalized.slice(0, -3);
|
|
301
|
+
}
|
|
302
|
+
const completions = normalized.endsWith("/chat/completions")
|
|
303
|
+
? normalized
|
|
304
|
+
: `${normalized}/v1/chat/completions`;
|
|
305
|
+
return `${completions}|op=${operation}`;
|
|
306
|
+
}
|
|
284
307
|
|
|
285
|
-
/**
|
|
308
|
+
/** HTTP headers the jarvis-ml recall proxy reads for pool routing. */
|
|
286
309
|
export function buildLocalLlmRoutingHeaders(
|
|
287
310
|
operation: string,
|
|
288
|
-
priority:
|
|
289
|
-
):
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
311
|
+
priority: "recall-critical" | "background" | undefined,
|
|
312
|
+
): Record<string, string> {
|
|
313
|
+
const routingEntries: Array<readonly [string, string]> = [
|
|
314
|
+
["Content-Type", "application/json"],
|
|
315
|
+
];
|
|
316
|
+
if (operation !== "unspecified" && isHttpHeaderFieldValue(operation)) {
|
|
317
|
+
routingEntries.push(["X-Remnic-Operation", operation]);
|
|
318
|
+
}
|
|
319
|
+
if (priority) {
|
|
320
|
+
routingEntries.push(["X-Remnic-Priority", priority]);
|
|
321
|
+
}
|
|
322
|
+
return Object.fromEntries(routingEntries) satisfies Record<string, string>;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const LOCAL_LLM_GLOBAL_BACKEND_STATE = "__openclawEngramLocalLlmBackendState";
|
|
326
|
+
|
|
327
|
+
export type LocalLlmBackendPoolState = {
|
|
328
|
+
untilMs: number;
|
|
329
|
+
reason: string;
|
|
330
|
+
/** Once the trip lapses this is set instead of deleting the entry: every
|
|
331
|
+
* client must observe the transition once, so a tombstone stays visible for
|
|
332
|
+
* BACKEND_POOL_TOMBSTONE_MS. */
|
|
333
|
+
expiredAtMs?: number;
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
/** How long a lapsed circuit stays readable so each client can invalidate its
|
|
337
|
+
* cached health verdict once (the health cache is 60s; this leaves margin). */
|
|
338
|
+
const BACKEND_POOL_TOMBSTONE_MS = 15 * 60_000;
|
|
339
|
+
|
|
340
|
+
function localLlmBackendPoolMap(): Map<string, LocalLlmBackendPoolState> {
|
|
341
|
+
// SAFETY: globalThis carries one optional Map slot keyed for backend pool state.
|
|
342
|
+
const globalAny = globalThis as typeof globalThis & {
|
|
343
|
+
[LOCAL_LLM_GLOBAL_BACKEND_STATE]?: Map<string, LocalLlmBackendPoolState>;
|
|
344
|
+
};
|
|
345
|
+
const existing = globalAny[LOCAL_LLM_GLOBAL_BACKEND_STATE];
|
|
346
|
+
if (existing) return existing;
|
|
347
|
+
const created = new Map<string, LocalLlmBackendPoolState>();
|
|
348
|
+
globalAny[LOCAL_LLM_GLOBAL_BACKEND_STATE] = created;
|
|
349
|
+
return created;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export function getLocalLlmTrippedBackendPoolState(
|
|
353
|
+
now: number,
|
|
354
|
+
chatUrl: string,
|
|
355
|
+
operation: string,
|
|
356
|
+
): LocalLlmBackendPoolState | null {
|
|
357
|
+
const key = formatLocalLlmPoolKey(chatUrl, operation);
|
|
358
|
+
const map = localLlmBackendPoolMap();
|
|
359
|
+
const state = map.get(key) ?? null;
|
|
360
|
+
if (!state) return null;
|
|
361
|
+
if (state.untilMs <= now) {
|
|
362
|
+
state.expiredAtMs ??= state.untilMs;
|
|
363
|
+
if (state.expiredAtMs + BACKEND_POOL_TOMBSTONE_MS <= now) map.delete(key);
|
|
364
|
+
return null;
|
|
365
|
+
}
|
|
366
|
+
return state;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/** The instant this pool's circuit lapsed, or null while it is active or
|
|
370
|
+
* absent. The tombstone stays in the map so every client holding a cached
|
|
371
|
+
* health verdict can observe the transition once — deleting on first read left
|
|
372
|
+
* later clients stale (wAN review on #3474). */
|
|
373
|
+
export function localLlmBackendPoolExpiredAtMs(now: number, chatUrl: string, operation: string): number | null {
|
|
374
|
+
const key = formatLocalLlmPoolKey(chatUrl, operation);
|
|
375
|
+
const state = localLlmBackendPoolMap().get(key) ?? null;
|
|
376
|
+
if (state && state.untilMs <= now) {
|
|
377
|
+
state.expiredAtMs ??= state.untilMs;
|
|
378
|
+
return state.expiredAtMs;
|
|
379
|
+
}
|
|
380
|
+
return null;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
export function markLocalLlmBackendPoolUnavailable(
|
|
384
|
+
reason: string,
|
|
385
|
+
durationMs: number,
|
|
386
|
+
chatUrl: string,
|
|
387
|
+
operation: string,
|
|
388
|
+
): void {
|
|
389
|
+
const normalizedReason = normalizeBackendTripReason(reason);
|
|
390
|
+
const key = formatLocalLlmPoolKey(chatUrl, operation);
|
|
391
|
+
if (durationMs > 0) {
|
|
392
|
+
localLlmBackendPoolMap().set(key, { untilMs: Date.now() + durationMs, reason: normalizedReason });
|
|
393
|
+
} else {
|
|
394
|
+
localLlmBackendPoolMap().delete(key);
|
|
395
|
+
}
|
|
294
396
|
}
|
|
@@ -2,6 +2,11 @@ import assert from "node:assert/strict";
|
|
|
2
2
|
import test from "node:test";
|
|
3
3
|
|
|
4
4
|
import { parseConfig } from "./config.js";
|
|
5
|
+
import {
|
|
6
|
+
formatLocalLlmPoolKey,
|
|
7
|
+
getLocalLlmTrippedBackendPoolState,
|
|
8
|
+
markLocalLlmBackendPoolUnavailable,
|
|
9
|
+
} from "./local-llm-helpers.js";
|
|
5
10
|
import type { LocalLlmChatCompletionOptions } from "./local-llm-helpers.js";
|
|
6
11
|
import {
|
|
7
12
|
LocalLlmConcurrencyLimiter,
|
|
@@ -11,6 +16,7 @@ import {
|
|
|
11
16
|
endpointBackoffRemainingMs,
|
|
12
17
|
extendEndpointBackoff,
|
|
13
18
|
isRateLimitedResponse,
|
|
19
|
+
isTerminalLocalLlmProxyPoolError,
|
|
14
20
|
parseRetryAfterMs,
|
|
15
21
|
parseTryAgainHintMs,
|
|
16
22
|
resetLocalLlmRateLimitStateForTests,
|
|
@@ -113,6 +119,58 @@ test("classifies 429/503/408 and LiteLLM cooldown bodies as rate limits, not 400
|
|
|
113
119
|
assert.equal(isRateLimitedResponse(500, "internal error"), false);
|
|
114
120
|
assert.equal(isRateLimitedResponse(400, "Context Window exceeded ... fallbacks cooldown_list"), false);
|
|
115
121
|
assert.equal(isRateLimitedResponse(502, ""), false);
|
|
122
|
+
assert.equal(
|
|
123
|
+
isRateLimitedResponse(
|
|
124
|
+
503,
|
|
125
|
+
JSON.stringify({ code: "remnic_recall_pool_unavailable", error: "recall pool missing" }),
|
|
126
|
+
),
|
|
127
|
+
false,
|
|
128
|
+
);
|
|
129
|
+
assert.equal(
|
|
130
|
+
isRateLimitedResponse(
|
|
131
|
+
503,
|
|
132
|
+
JSON.stringify({ code: "remnic_extraction_pool_unavailable", error: "trained pool missing" }),
|
|
133
|
+
),
|
|
134
|
+
false,
|
|
135
|
+
);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test("the terminal predicate matches the proxy's error-only pool-missing payload", () => {
|
|
139
|
+
// remnic-llm-proxy.py answers {"error": "..."} — no code field. The terminal
|
|
140
|
+
// check must catch the same bodies isRateLimitedResponse rejects, or the
|
|
141
|
+
// generic 5xx retry still fires (wAN review on #3474).
|
|
142
|
+
const proxyBody = JSON.stringify({
|
|
143
|
+
error: "recall pool missing or disabled; recall ops must not use the extraction pool",
|
|
144
|
+
});
|
|
145
|
+
assert.equal(isTerminalLocalLlmProxyPoolError(503, proxyBody), true);
|
|
146
|
+
assert.equal(isTerminalLocalLlmProxyPoolError(503, "embed pool missing or disabled (test)"), true);
|
|
147
|
+
assert.equal(isTerminalLocalLlmProxyPoolError(500, proxyBody), false);
|
|
148
|
+
assert.equal(isTerminalLocalLlmProxyPoolError(503, "upstream timeout"), false);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
test("the terminal predicate parses a structured pool code at any JSON spacing", () => {
|
|
152
|
+
// kilo on #3474: the needles matched only '"code":"x"' and '"code": "x"'; any
|
|
153
|
+
// other valid JSON spacing ('"code" : "x"', key reorder, pretty print with a
|
|
154
|
+
// deeper indent) fell through to the generic 5xx retry. Parse the body.
|
|
155
|
+
assert.equal(
|
|
156
|
+
isTerminalLocalLlmProxyPoolError(503, '{"code" : "remnic_recall_pool_unavailable"}'),
|
|
157
|
+
true,
|
|
158
|
+
);
|
|
159
|
+
assert.equal(
|
|
160
|
+
isTerminalLocalLlmProxyPoolError(
|
|
161
|
+
503,
|
|
162
|
+
JSON.stringify({ extra: 1, code: "remnic_extraction_pool_unavailable", detail: "x" }, null, 4),
|
|
163
|
+
),
|
|
164
|
+
true,
|
|
165
|
+
);
|
|
166
|
+
assert.equal(
|
|
167
|
+
isTerminalLocalLlmProxyPoolError(503, '{"code":"remnic_unrelated_error"}'),
|
|
168
|
+
false,
|
|
169
|
+
);
|
|
170
|
+
assert.equal(
|
|
171
|
+
isTerminalLocalLlmProxyPoolError(503, '{"code":"remnic_recall_pool_unavailable"}'),
|
|
172
|
+
true,
|
|
173
|
+
);
|
|
116
174
|
});
|
|
117
175
|
|
|
118
176
|
test("a pool-missing 503 is a config failure, not endpoint saturation (#3475)", () => {
|
|
@@ -290,7 +348,9 @@ test("a server hint beyond the max skips the retry and gates every client on tha
|
|
|
290
348
|
const b = new LocalLlmClient(createConfig({ localLlmUrl: url }));
|
|
291
349
|
assert.equal(await a.chatCompletion([{ role: "user", content: "x" }]), null);
|
|
292
350
|
assert.equal(calls, 1, "60s hint > 20ms max: no immediate retry");
|
|
293
|
-
assert.ok(
|
|
351
|
+
assert.ok(
|
|
352
|
+
endpointBackoffRemainingMs(formatLocalLlmPoolKey(`${url}/v1/chat/completions`, "unspecified")) > 50_000,
|
|
353
|
+
);
|
|
294
354
|
const options: LocalLlmChatCompletionOptions = { failureDiag: {} };
|
|
295
355
|
assert.equal(await b.chatCompletion([{ role: "user", content: "y" }], options), null);
|
|
296
356
|
assert.equal(calls, 1, "second client must not hit the proxy during the shared backoff");
|
|
@@ -497,3 +557,21 @@ test("one-permit and unlimited limits still admit background work", async () =>
|
|
|
497
557
|
assert.equal(limiter.inFlight, 0);
|
|
498
558
|
}
|
|
499
559
|
});
|
|
560
|
+
|
|
561
|
+
test("rate-limit backoff on one proxy operation does not block another", () => {
|
|
562
|
+
resetLocalLlmRateLimitStateForTests();
|
|
563
|
+
const chatUrl = "http://127.0.0.1:4399/v1/chat/completions";
|
|
564
|
+
const extractionKey = formatLocalLlmPoolKey(chatUrl, "extraction");
|
|
565
|
+
const recallKey = formatLocalLlmPoolKey(chatUrl, "rerank");
|
|
566
|
+
extendEndpointBackoff(extractionKey, 60_000);
|
|
567
|
+
assert.ok(endpointBackoffRemainingMs(extractionKey) > 0);
|
|
568
|
+
assert.equal(endpointBackoffRemainingMs(recallKey), 0);
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
test("backend circuit on one proxy operation does not trip another", () => {
|
|
572
|
+
const chatUrl = "http://127.0.0.1:4399/v1/chat/completions";
|
|
573
|
+
const now = Date.now();
|
|
574
|
+
markLocalLlmBackendPoolUnavailable("model load failure", 60_000, chatUrl, "extraction");
|
|
575
|
+
assert.ok(getLocalLlmTrippedBackendPoolState(now, chatUrl, "extraction"));
|
|
576
|
+
assert.equal(getLocalLlmTrippedBackendPoolState(now, chatUrl, "rerank"), null);
|
|
577
|
+
});
|