@remnic/core 9.23.1 → 9.23.3

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.
Files changed (83) hide show
  1. package/dist/access-admin-ops-surface.js +9 -9
  2. package/dist/access-audit.js +2 -2
  3. package/dist/access-boundary.js +9 -9
  4. package/dist/access-cli.js +32 -31
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-http.js +16 -16
  7. package/dist/access-identity-continuity-surface.js +9 -9
  8. package/dist/access-lcm-surface.js +9 -9
  9. package/dist/access-mcp.js +13 -13
  10. package/dist/access-namespace-preflight.js +9 -9
  11. package/dist/access-observe-write-surface.js +9 -9
  12. package/dist/access-operations-batch.js +10 -10
  13. package/dist/access-operations.d.ts +3 -3
  14. package/dist/access-operations.js +12 -12
  15. package/dist/access-recall-concurrency.js +9 -9
  16. package/dist/access-recall-response.js +9 -9
  17. package/dist/access-recall-surface.js +9 -9
  18. package/dist/access-schema.d.ts +76 -76
  19. package/dist/access-schema.js +3 -3
  20. package/dist/access-service.js +9 -9
  21. package/dist/adapters/index.js +4 -4
  22. package/dist/adapters/registry.js +2 -2
  23. package/dist/{chunk-G2NSSQES.js → chunk-3L5O7SMT.js} +3 -3
  24. package/dist/{chunk-JVGUY2AU.js → chunk-4PQ4KLLK.js} +2 -2
  25. package/dist/{chunk-JBPKEARU.js → chunk-AU7Q3LSC.js} +4 -4
  26. package/dist/{chunk-WS32QRLO.js → chunk-DLKRXYRL.js} +6 -6
  27. package/dist/{chunk-IU3XJAQM.js → chunk-FGBJBYWP.js} +2 -2
  28. package/dist/{chunk-A2RFKL3V.js → chunk-GBAJCDTW.js} +2 -2
  29. package/dist/{chunk-RT4TSR2C.js → chunk-HSSIWAZP.js} +25 -25
  30. package/dist/{chunk-KQAFEZQX.js → chunk-IPLYGWQF.js} +5 -5
  31. package/dist/chunk-JUXOTY6J.js +67 -0
  32. package/dist/chunk-JUXOTY6J.js.map +1 -0
  33. package/dist/{chunk-ROUL7RZU.js → chunk-KXGE7L62.js} +17 -17
  34. package/dist/{chunk-OUW4PAY4.js → chunk-M6LJXJ3J.js} +3 -3
  35. package/dist/{chunk-2PHX3I5C.js → chunk-MAXVH44E.js} +5 -5
  36. package/dist/{chunk-YWJBAHTY.js → chunk-P2OZKKYP.js} +10 -12
  37. package/dist/chunk-P2OZKKYP.js.map +1 -0
  38. package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
  39. package/dist/{chunk-HBYQAOED.js → chunk-V2XVMCP6.js} +2 -2
  40. package/dist/{chunk-IIXLB5E7.js → chunk-WZVIB5BK.js} +15 -15
  41. package/dist/{chunk-KNRG6ZGJ.js → chunk-XGEFGNL5.js} +1 -1
  42. package/dist/cli.js +21 -21
  43. package/dist/extraction.js +3 -2
  44. package/dist/{first-start-migration-BKNGOFED.js → first-start-migration-LEXL3XYL.js} +4 -4
  45. package/dist/index.d.ts +404 -404
  46. package/dist/index.js +61 -60
  47. package/dist/lcm/engine.js +2 -2
  48. package/dist/lcm/index.js +5 -5
  49. package/dist/local-llm-transport.d.ts +55 -0
  50. package/dist/local-llm-transport.js +9 -0
  51. package/dist/local-llm-transport.js.map +1 -0
  52. package/dist/local-llm.d.ts +1 -0
  53. package/dist/local-llm.js +2 -1
  54. package/dist/operator-toolkit.js +1 -1
  55. package/dist/orchestrator.js +32 -31
  56. package/dist/schemas.d.ts +76 -76
  57. package/dist/shared-context/manager.d.ts +8 -8
  58. package/dist/summarizer.js +3 -2
  59. package/dist/transfer/autodetect.js +1 -1
  60. package/dist/transfer/backup.js +1 -1
  61. package/dist/transfer/capsule-export.js +2 -2
  62. package/dist/transfer/types.d.ts +66 -66
  63. package/package.json +3 -2
  64. package/src/local-llm-headers-timeout.test.ts +271 -0
  65. package/src/local-llm-transport.ts +109 -0
  66. package/src/local-llm.ts +6 -13
  67. package/dist/chunk-YWJBAHTY.js.map +0 -1
  68. /package/dist/{chunk-G2NSSQES.js.map → chunk-3L5O7SMT.js.map} +0 -0
  69. /package/dist/{chunk-JVGUY2AU.js.map → chunk-4PQ4KLLK.js.map} +0 -0
  70. /package/dist/{chunk-JBPKEARU.js.map → chunk-AU7Q3LSC.js.map} +0 -0
  71. /package/dist/{chunk-WS32QRLO.js.map → chunk-DLKRXYRL.js.map} +0 -0
  72. /package/dist/{chunk-IU3XJAQM.js.map → chunk-FGBJBYWP.js.map} +0 -0
  73. /package/dist/{chunk-A2RFKL3V.js.map → chunk-GBAJCDTW.js.map} +0 -0
  74. /package/dist/{chunk-RT4TSR2C.js.map → chunk-HSSIWAZP.js.map} +0 -0
  75. /package/dist/{chunk-KQAFEZQX.js.map → chunk-IPLYGWQF.js.map} +0 -0
  76. /package/dist/{chunk-ROUL7RZU.js.map → chunk-KXGE7L62.js.map} +0 -0
  77. /package/dist/{chunk-OUW4PAY4.js.map → chunk-M6LJXJ3J.js.map} +0 -0
  78. /package/dist/{chunk-2PHX3I5C.js.map → chunk-MAXVH44E.js.map} +0 -0
  79. /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
  80. /package/dist/{chunk-HBYQAOED.js.map → chunk-V2XVMCP6.js.map} +0 -0
  81. /package/dist/{chunk-IIXLB5E7.js.map → chunk-WZVIB5BK.js.map} +0 -0
  82. /package/dist/{chunk-KNRG6ZGJ.js.map → chunk-XGEFGNL5.js.map} +0 -0
  83. /package/dist/{first-start-migration-BKNGOFED.js.map → first-start-migration-LEXL3XYL.js.map} +0 -0
@@ -25,11 +25,11 @@ import {
25
25
  trustZoneDemoSeedRequestSchema,
26
26
  trustZonePromoteRequestSchema,
27
27
  validateRequest
28
- } from "./chunk-HBYQAOED.js";
29
- import "./chunk-KQAFEZQX.js";
28
+ } from "./chunk-V2XVMCP6.js";
29
+ import "./chunk-IPLYGWQF.js";
30
+ import "./chunk-J4EB7DNW.js";
30
31
  import "./chunk-WEHSQBFR.js";
31
32
  import "./chunk-X7Y7WX73.js";
32
- import "./chunk-J4EB7DNW.js";
33
33
  import "./chunk-BJMBJZ2Y.js";
34
34
  import "./chunk-UKJAGEXH.js";
35
35
  import "./chunk-FP2373TW.js";
@@ -4,21 +4,24 @@ import {
4
4
  buildProjectedGovernanceProposedActions,
5
5
  hasGroupedGovernanceActions,
6
6
  shapeMemorySummary
7
- } from "./chunk-IIXLB5E7.js";
7
+ } from "./chunk-WZVIB5BK.js";
8
8
  import "./chunk-GDASG7NC.js";
9
9
  import "./chunk-GDB4J2H3.js";
10
10
  import "./chunk-7CPOZH6Y.js";
11
11
  import "./chunk-VQ7B2Q6M.js";
12
12
  import "./chunk-PJSK6OJM.js";
13
+ import "./chunk-JGSKJHF7.js";
13
14
  import "./chunk-GNVZQ5JN.js";
14
15
  import "./chunk-YN2UN7N3.js";
15
- import "./chunk-JGSKJHF7.js";
16
16
  import "./chunk-P5FPO2BR.js";
17
17
  import "./chunk-S4DDLTPX.js";
18
18
  import "./chunk-H7XKCNR6.js";
19
19
  import "./chunk-MMTG3SCJ.js";
20
20
  import "./chunk-SOBJ6NEY.js";
21
21
  import "./chunk-3NAHZQU3.js";
22
+ import "./chunk-ICP53SKG.js";
23
+ import "./chunk-AQEJKOKI.js";
24
+ import "./chunk-6HMYUWXR.js";
22
25
  import "./chunk-UGH6VPPO.js";
23
26
  import "./chunk-R6YJI3HE.js";
24
27
  import "./chunk-ZN4UZWMT.js";
@@ -42,9 +45,6 @@ import "./chunk-64UDOIMI.js";
42
45
  import "./chunk-IUM3VSHI.js";
43
46
  import "./chunk-MQVINOJQ.js";
44
47
  import "./chunk-EIR5VLIH.js";
45
- import "./chunk-ICP53SKG.js";
46
- import "./chunk-AQEJKOKI.js";
47
- import "./chunk-6HMYUWXR.js";
48
48
  import "./chunk-IISBCCWR.js";
49
49
  import "./chunk-JYIFGGEM.js";
50
50
  import "./chunk-EI6V5UXY.js";
@@ -100,10 +100,10 @@ import "./chunk-L2EXJQJP.js";
100
100
  import "./chunk-45GF7Y3V.js";
101
101
  import "./chunk-RGMVMVMF.js";
102
102
  import "./chunk-N7RWREIQ.js";
103
- import "./chunk-KQAFEZQX.js";
103
+ import "./chunk-IPLYGWQF.js";
104
+ import "./chunk-J4EB7DNW.js";
104
105
  import "./chunk-WEHSQBFR.js";
105
106
  import "./chunk-X7Y7WX73.js";
106
- import "./chunk-J4EB7DNW.js";
107
107
  import "./chunk-BJMBJZ2Y.js";
108
108
  import "./chunk-UKJAGEXH.js";
109
109
  import "./chunk-FP2373TW.js";
@@ -138,9 +138,9 @@ import "./chunk-VFUEZZBS.js";
138
138
  import "./chunk-PVGDJXVK.js";
139
139
  import "./chunk-A2IYSXDQ.js";
140
140
  import "./chunk-LPSF4OQH.js";
141
- import "./chunk-7K5Q6COX.js";
142
- import "./chunk-LBLXEFWK.js";
141
+ import "./chunk-TVVEYCNW.js";
143
142
  import "./chunk-RFYAYKTD.js";
143
+ import "./chunk-LBLXEFWK.js";
144
144
  import "./chunk-3PDOVUHC.js";
145
145
  import "./chunk-FF4KLI5W.js";
146
146
  import "./chunk-AIK5W3IW.js";
@@ -1,7 +1,10 @@
1
1
  import "../chunk-SEDEKFYQ.js";
2
2
  import {
3
3
  AdapterRegistry
4
- } from "../chunk-JBPKEARU.js";
4
+ } from "../chunk-AU7Q3LSC.js";
5
+ import {
6
+ HermesAdapter
7
+ } from "../chunk-42NQ7AVG.js";
5
8
  import {
6
9
  ReplitAdapter
7
10
  } from "../chunk-TMSXWOBZ.js";
@@ -11,9 +14,6 @@ import {
11
14
  import {
12
15
  CodexAdapter
13
16
  } from "../chunk-RSUYKGGZ.js";
14
- import {
15
- HermesAdapter
16
- } from "../chunk-42NQ7AVG.js";
17
17
  import "../chunk-7RXCMVFQ.js";
18
18
  import "../chunk-PZ5AY32C.js";
19
19
  export {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  AdapterRegistry
3
- } from "../chunk-JBPKEARU.js";
3
+ } from "../chunk-AU7Q3LSC.js";
4
+ import "../chunk-42NQ7AVG.js";
4
5
  import "../chunk-TMSXWOBZ.js";
5
6
  import "../chunk-J64TK33U.js";
6
7
  import "../chunk-RSUYKGGZ.js";
7
- import "../chunk-42NQ7AVG.js";
8
8
  import "../chunk-7RXCMVFQ.js";
9
9
  import "../chunk-PZ5AY32C.js";
10
10
  export {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  memoryStoreRequestSchema
3
- } from "./chunk-HBYQAOED.js";
3
+ } from "./chunk-V2XVMCP6.js";
4
4
  import {
5
5
  CorrectionContractError,
6
6
  DECISION_SUBCOMMANDS,
7
7
  DELTA_SUBCOMMANDS,
8
8
  defineOperation,
9
9
  isCodegraphToolName
10
- } from "./chunk-IIXLB5E7.js";
10
+ } from "./chunk-WZVIB5BK.js";
11
11
  import {
12
12
  serializeMutations,
13
13
  withHeldFileLock
@@ -1805,4 +1805,4 @@ export {
1805
1805
  codegraphIngestTracesOperation,
1806
1806
  REGISTERED_OPERATIONS
1807
1807
  };
1808
- //# sourceMappingURL=chunk-G2NSSQES.js.map
1808
+ //# sourceMappingURL=chunk-3L5O7SMT.js.map
@@ -28,7 +28,7 @@ import {
28
28
  defineOperation,
29
29
  parseNamespacePreflightWriteOp,
30
30
  resolveAuthorizedNamespaceWritablePreflight
31
- } from "./chunk-IIXLB5E7.js";
31
+ } from "./chunk-WZVIB5BK.js";
32
32
  import {
33
33
  projectTagProjectId
34
34
  } from "./chunk-MQVINOJQ.js";
@@ -484,4 +484,4 @@ defineOperation({ name: "graph_events", description: "SSE graph events.", schema
484
484
  defineOperation({ name: "chat_message", description: "Chat message.", schema: strictSchema({ message: S.str, chatSessionId: S.str }), handler: async (_i, _ctx) => ({ result: { ok: true } }) });
485
485
  defineOperation({ name: "chat_events", description: "SSE chat events.", schema: strictSchema({}), handler: async (_i, _ctx) => ({ result: { stream: "sse" } }) });
486
486
  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 } }) });
487
- //# sourceMappingURL=chunk-JVGUY2AU.js.map
487
+ //# sourceMappingURL=chunk-4PQ4KLLK.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ HermesAdapter
3
+ } from "./chunk-42NQ7AVG.js";
1
4
  import {
2
5
  ReplitAdapter
3
6
  } from "./chunk-TMSXWOBZ.js";
@@ -7,9 +10,6 @@ import {
7
10
  import {
8
11
  CodexAdapter
9
12
  } from "./chunk-RSUYKGGZ.js";
10
- import {
11
- HermesAdapter
12
- } from "./chunk-42NQ7AVG.js";
13
13
 
14
14
  // src/adapters/registry.ts
15
15
  var AdapterRegistry = class {
@@ -53,4 +53,4 @@ var AdapterRegistry = class {
53
53
  export {
54
54
  AdapterRegistry
55
55
  };
56
- //# sourceMappingURL=chunk-JBPKEARU.js.map
56
+ //# sourceMappingURL=chunk-AU7Q3LSC.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-V7IZKJI3.js";
4
4
  import {
5
5
  AdapterRegistry
6
- } from "./chunk-JBPKEARU.js";
6
+ } from "./chunk-AU7Q3LSC.js";
7
7
  import {
8
8
  WriteRateLimiter
9
9
  } from "./chunk-MKQBXQKU.js";
@@ -16,13 +16,13 @@ import {
16
16
  processChatMessage,
17
17
  sessionBelongsToPrincipal,
18
18
  subscribeChatTranscript
19
- } from "./chunk-OUW4PAY4.js";
19
+ } from "./chunk-M6LJXJ3J.js";
20
20
  import {
21
21
  RelayMissionStoreError
22
- } from "./chunk-G2NSSQES.js";
22
+ } from "./chunk-3L5O7SMT.js";
23
23
  import {
24
24
  validateRequest
25
- } from "./chunk-HBYQAOED.js";
25
+ } from "./chunk-V2XVMCP6.js";
26
26
  import {
27
27
  executeResolution,
28
28
  isValidResolutionVerb
@@ -36,7 +36,7 @@ import {
36
36
  CorrectionContractError,
37
37
  getOperation,
38
38
  resolveQueryNamespaceWritablePreflight
39
- } from "./chunk-IIXLB5E7.js";
39
+ } from "./chunk-WZVIB5BK.js";
40
40
  import {
41
41
  isTrustZoneName
42
42
  } from "./chunk-JGSKJHF7.js";
@@ -3197,4 +3197,4 @@ export {
3197
3197
  MeetingsInputError,
3198
3198
  EngramAccessHttpServer
3199
3199
  };
3200
- //# sourceMappingURL=chunk-WS32QRLO.js.map
3200
+ //# sourceMappingURL=chunk-DLKRXYRL.js.map
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-WLZYGLJ4.js";
9
9
  import {
10
10
  LocalLlmClient
11
- } from "./chunk-YWJBAHTY.js";
11
+ } from "./chunk-P2OZKKYP.js";
12
12
  import {
13
13
  sessionStoragePaths
14
14
  } from "./chunk-S4DDLTPX.js";
@@ -690,4 +690,4 @@ ${truncatedConversation}`;
690
690
  export {
691
691
  HourlySummarizer
692
692
  };
693
- //# sourceMappingURL=chunk-IU3XJAQM.js.map
693
+ //# sourceMappingURL=chunk-FGBJBYWP.js.map
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-WLZYGLJ4.js";
22
22
  import {
23
23
  LocalLlmClient
24
- } from "./chunk-YWJBAHTY.js";
24
+ } from "./chunk-P2OZKKYP.js";
25
25
  import {
26
26
  classifyExtractionThrownError,
27
27
  classifyFallbackParseFailure
@@ -2453,4 +2453,4 @@ export {
2453
2453
  shouldEnableLocalExtractionThinking,
2454
2454
  ExtractionEngine
2455
2455
  };
2456
- //# sourceMappingURL=chunk-A2RFKL3V.js.map
2456
+ //# sourceMappingURL=chunk-GBAJCDTW.js.map
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-7HYPN2GC.js";
23
23
  import {
24
24
  LcmEngine
25
- } from "./chunk-2PHX3I5C.js";
25
+ } from "./chunk-MAXVH44E.js";
26
26
  import {
27
27
  chunkTranscriptEntries
28
28
  } from "./chunk-TECVW3JP.js";
@@ -41,6 +41,9 @@ import {
41
41
  applyUtilityRankingRuntimeDelta,
42
42
  loadUtilityRuntimeValues
43
43
  } from "./chunk-LXOM6IQU.js";
44
+ import {
45
+ TierMigrationExecutor
46
+ } from "./chunk-VOUOLGIP.js";
44
47
  import {
45
48
  decideTierTransition
46
49
  } from "./chunk-S75M5ZRK.js";
@@ -56,12 +59,9 @@ import {
56
59
  import {
57
60
  CODEX_THREAD_KEY_PREFIX
58
61
  } from "./chunk-4EX5WZ4M.js";
59
- import {
60
- TierMigrationExecutor
61
- } from "./chunk-VOUOLGIP.js";
62
62
  import {
63
63
  HourlySummarizer
64
- } from "./chunk-IU3XJAQM.js";
64
+ } from "./chunk-FGBJBYWP.js";
65
65
  import {
66
66
  buildTargetedFactRecallSection,
67
67
  shouldRecallTargetedFactEvidence
@@ -134,16 +134,16 @@ import {
134
134
  import {
135
135
  installPrioritizedEmbedding
136
136
  } from "./chunk-ROI7BK7H.js";
137
+ import {
138
+ applyMemoryWorthFilter,
139
+ buildMemoryWorthCounterMap
140
+ } from "./chunk-3GPTTA4J.js";
137
141
  import {
138
142
  NegativeExampleStore
139
143
  } from "./chunk-23L3IXFD.js";
140
144
  import {
141
145
  evaluateMemoryActionPolicy
142
146
  } from "./chunk-H63EDPFJ.js";
143
- import {
144
- applyMemoryWorthFilter,
145
- buildMemoryWorthCounterMap
146
- } from "./chunk-3GPTTA4J.js";
147
147
  import {
148
148
  runLiveConnectorsOnce
149
149
  } from "./chunk-HTIIXNJQ.js";
@@ -180,7 +180,7 @@ import {
180
180
  } from "./chunk-LTHVM4XN.js";
181
181
  import {
182
182
  ExtractionEngine
183
- } from "./chunk-A2RFKL3V.js";
183
+ } from "./chunk-GBAJCDTW.js";
184
184
  import {
185
185
  parseMemoryActionEligibilityContext
186
186
  } from "./chunk-5GSUBCZM.js";
@@ -189,7 +189,7 @@ import {
189
189
  } from "./chunk-WLZYGLJ4.js";
190
190
  import {
191
191
  LocalLlmClient
192
- } from "./chunk-YWJBAHTY.js";
192
+ } from "./chunk-P2OZKKYP.js";
193
193
  import {
194
194
  buildEntityRecallSection,
195
195
  entityRecentTranscriptLookbackHours,
@@ -217,7 +217,7 @@ import {
217
217
  ensureBuiltInWearableConnectors,
218
218
  getWearableConnector,
219
219
  listWearableConnectors
220
- } from "./chunk-ROUL7RZU.js";
220
+ } from "./chunk-KXGE7L62.js";
221
221
  import {
222
222
  RoutingRulesStore
223
223
  } from "./chunk-XL24QQ63.js";
@@ -247,7 +247,7 @@ import {
247
247
  import {
248
248
  runNamespaceMaintenanceFanout,
249
249
  summarizeNamespaceMaintenanceHealth
250
- } from "./chunk-KNRG6ZGJ.js";
250
+ } from "./chunk-XGEFGNL5.js";
251
251
  import {
252
252
  NamespaceCatalog,
253
253
  planNamespaceMaintenance
@@ -331,7 +331,7 @@ import {
331
331
  } from "./chunk-7RAJ3GXO.js";
332
332
  import {
333
333
  MeetingsInputError
334
- } from "./chunk-WS32QRLO.js";
334
+ } from "./chunk-DLKRXYRL.js";
335
335
  import {
336
336
  WearablesInputError,
337
337
  describeErrorForOperator
@@ -349,13 +349,17 @@ import {
349
349
  clusterByKey,
350
350
  createCorrectionService,
351
351
  detectPassiveCorrections
352
- } from "./chunk-IIXLB5E7.js";
352
+ } from "./chunk-WZVIB5BK.js";
353
353
  import {
354
354
  importCapsule
355
355
  } from "./chunk-7CPOZH6Y.js";
356
356
  import {
357
357
  isCodingGraphInstalled
358
358
  } from "./chunk-VQ7B2Q6M.js";
359
+ import {
360
+ listTrustZoneRecords,
361
+ searchTrustZoneRecords
362
+ } from "./chunk-JGSKJHF7.js";
359
363
  import {
360
364
  applyTrustScoreStage,
361
365
  buildTrustSignalsForRerank,
@@ -363,13 +367,13 @@ import {
363
367
  trustResultFor,
364
368
  trustResultKey
365
369
  } from "./chunk-GNVZQ5JN.js";
366
- import {
367
- listTrustZoneRecords,
368
- searchTrustZoneRecords
369
- } from "./chunk-JGSKJHF7.js";
370
370
  import {
371
371
  buildXraySnapshot
372
372
  } from "./chunk-3NAHZQU3.js";
373
+ import {
374
+ objectiveStateStoreOverrideForNamespace,
375
+ searchObjectiveStateSnapshots
376
+ } from "./chunk-6HMYUWXR.js";
373
377
  import {
374
378
  NamespaceSearchRouter,
375
379
  namespaceCollectionName
@@ -395,10 +399,6 @@ import {
395
399
  resolveScopePlan,
396
400
  resolveScopeProfilePlan
397
401
  } from "./chunk-MQVINOJQ.js";
398
- import {
399
- objectiveStateStoreOverrideForNamespace,
400
- searchObjectiveStateSnapshots
401
- } from "./chunk-6HMYUWXR.js";
402
402
  import {
403
403
  ProfilingCollector
404
404
  } from "./chunk-NLE6TSLG.js";
@@ -13436,7 +13436,7 @@ var OrchestratorInitCoordinator = class {
13436
13436
  if (signal.aborted) return;
13437
13437
  if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
13438
13438
  try {
13439
- const { runFirstStartMigration } = await import("./first-start-migration-BKNGOFED.js");
13439
+ const { runFirstStartMigration } = await import("./first-start-migration-LEXL3XYL.js");
13440
13440
  const result = await runFirstStartMigration({
13441
13441
  storage: this.deps.storage,
13442
13442
  config: this.deps.config,
@@ -25491,4 +25491,4 @@ export {
25491
25491
  blendGraphExpandedRecallScore,
25492
25492
  Orchestrator
25493
25493
  };
25494
- //# sourceMappingURL=chunk-RT4TSR2C.js.map
25494
+ //# sourceMappingURL=chunk-HSSIWAZP.js.map
@@ -1,3 +1,7 @@
1
+ import {
2
+ CAPSULE_SCHEMA_VERSION,
3
+ EXPORT_FORMAT
4
+ } from "./chunk-J4EB7DNW.js";
1
5
  import {
2
6
  CAPSULE_ID_PATTERN,
3
7
  CapsuleBlockSchema,
@@ -7,10 +11,6 @@ import {
7
11
  import {
8
12
  encryptCapsuleFile
9
13
  } from "./chunk-X7Y7WX73.js";
10
- import {
11
- CAPSULE_SCHEMA_VERSION,
12
- EXPORT_FORMAT
13
- } from "./chunk-J4EB7DNW.js";
14
14
  import {
15
15
  DEFAULT_TRANSFER_EXCLUDE_DIRS,
16
16
  computeTransferOutputRel
@@ -261,4 +261,4 @@ export {
261
261
  exportCapsule,
262
262
  isValidCapsuleSince
263
263
  };
264
- //# sourceMappingURL=chunk-KQAFEZQX.js.map
264
+ //# sourceMappingURL=chunk-IPLYGWQF.js.map
@@ -0,0 +1,67 @@
1
+ import {
2
+ log
3
+ } from "./chunk-3WCASNQZ.js";
4
+
5
+ // src/local-llm-transport.ts
6
+ import { Agent, getGlobalDispatcher } from "undici";
7
+ function isPlainPoolingAgent(dispatcher) {
8
+ if (dispatcher instanceof Agent) return true;
9
+ if (!dispatcher || typeof dispatcher !== "object") return false;
10
+ const ctor = dispatcher.constructor;
11
+ if (!ctor || typeof ctor !== "function") return false;
12
+ return ctor.name === "Agent";
13
+ }
14
+ var ChatTransport = class {
15
+ agent = null;
16
+ agentBudgetMs = null;
17
+ warnedAboutCustomDispatcher = false;
18
+ /**
19
+ * The widened pool, or `undefined` when the process installed its own
20
+ * transport that we must not displace.
21
+ *
22
+ * A deployment can route the local endpoint through a process-wide
23
+ * dispatcher — a `ProxyAgent` for an HTTP proxy, or a custom
24
+ * connect/TLS/DNS dispatcher. Swapping in our own pool would bypass the
25
+ * proxy entirely and break the request, so those are left alone. A
26
+ * `MockAgent` is excluded by the same check, so test transports keep
27
+ * working. The trade-off is explicit: on those setups the 300s cap stands,
28
+ * because only the dispatcher's owner knows how to rebuild it.
29
+ */
30
+ dispatcherFor(budgetMs) {
31
+ if (!isPlainPoolingAgent(getGlobalDispatcher())) {
32
+ if (!this.warnedAboutCustomDispatcher) {
33
+ this.warnedAboutCustomDispatcher = true;
34
+ log.debug(
35
+ "local LLM: a custom global dispatcher is installed; leaving it in place. localLlmTimeoutMs above that dispatcher's headersTimeout will not take effect."
36
+ );
37
+ }
38
+ return void 0;
39
+ }
40
+ const normalized = Number.isFinite(budgetMs) ? Math.max(0, budgetMs) : 0;
41
+ if (this.agent && this.agentBudgetMs === normalized) return this.agent;
42
+ void this.agent?.close().catch(() => {
43
+ });
44
+ this.agent = new Agent({
45
+ headersTimeout: normalized,
46
+ bodyTimeout: normalized
47
+ });
48
+ this.agentBudgetMs = normalized;
49
+ return this.agent;
50
+ }
51
+ async post(request) {
52
+ const init = {
53
+ method: "POST",
54
+ headers: request.headers,
55
+ body: request.body,
56
+ signal: request.signal
57
+ };
58
+ const dispatcher = this.dispatcherFor(request.budgetMs);
59
+ if (dispatcher) init.dispatcher = dispatcher;
60
+ return await fetch(request.url, init);
61
+ }
62
+ };
63
+
64
+ export {
65
+ ChatTransport
66
+ };
67
+ //# sourceMappingURL=chunk-JUXOTY6J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/local-llm-transport.ts"],"sourcesContent":["import { Agent, getGlobalDispatcher } from \"undici\";\n\nimport { log } from \"./logger.js\";\n\n/**\n * Wire transport for local LLM chat completions.\n *\n * Split out of `local-llm.ts` so the client module keeps prompt and\n * response semantics while connection budgets live in one place.\n */\n\nexport interface ChatCompletionRequest {\n url: string;\n headers: Record<string, string>;\n body: string;\n signal: AbortSignal;\n /**\n * Ceiling for this endpoint, i.e. `localLlmTimeoutMs`. Sizes the\n * connection's inactivity budgets. Per-request budgets below the ceiling\n * stay enforced by `signal`.\n */\n budgetMs: number;\n}\n\n/**\n * Is this undici's stock pooling `Agent` — the transport we may widen?\n *\n * `instanceof` alone is not enough: Node's global fetch is backed by its\n * OWN bundled copy of undici, so the dispatcher parked on the well-known\n * global symbol is an `Agent` from a different copy than the one we import,\n * and cross-copy `instanceof` is false. Fall back to the constructor name,\n * which is stable across copies and still distinguishes `ProxyAgent` and\n * `MockAgent` from the stock pool.\n */\nfunction isPlainPoolingAgent(dispatcher: unknown): boolean {\n if (dispatcher instanceof Agent) return true;\n if (!dispatcher || typeof dispatcher !== \"object\") return false;\n const ctor = (dispatcher as { constructor?: unknown }).constructor;\n if (!ctor || typeof ctor !== \"function\") return false;\n return ctor.name === \"Agent\";\n}\n\n/**\n * Connection pool whose header/body inactivity budgets track the configured\n * request budget.\n *\n * Node's global fetch runs on undici, which applies a default\n * `headersTimeout` and `bodyTimeout` of 300s. A non-streaming completion\n * sends its response headers only once generation finishes, so any\n * completion slower than 300s died with a bare `fetch failed` no matter how\n * high `localLlmTimeoutMs` was set — the configured budget was dead letter\n * past five minutes (issue #2148).\n *\n * One pool per client is enough: it is keyed on the ceiling and rebuilt when\n * that changes.\n */\nexport class ChatTransport {\n private agent: Agent | null = null;\n private agentBudgetMs: number | null = null;\n private warnedAboutCustomDispatcher = false;\n\n /**\n * The widened pool, or `undefined` when the process installed its own\n * transport that we must not displace.\n *\n * A deployment can route the local endpoint through a process-wide\n * dispatcher — a `ProxyAgent` for an HTTP proxy, or a custom\n * connect/TLS/DNS dispatcher. Swapping in our own pool would bypass the\n * proxy entirely and break the request, so those are left alone. A\n * `MockAgent` is excluded by the same check, so test transports keep\n * working. The trade-off is explicit: on those setups the 300s cap stands,\n * because only the dispatcher's owner knows how to rebuild it.\n */\n dispatcherFor(budgetMs: number): Agent | undefined {\n if (!isPlainPoolingAgent(getGlobalDispatcher())) {\n if (!this.warnedAboutCustomDispatcher) {\n this.warnedAboutCustomDispatcher = true;\n log.debug(\n \"local LLM: a custom global dispatcher is installed; leaving it in place. \" +\n \"localLlmTimeoutMs above that dispatcher's headersTimeout will not take effect.\",\n );\n }\n return undefined;\n }\n const normalized = Number.isFinite(budgetMs) ? Math.max(0, budgetMs) : 0;\n if (this.agent && this.agentBudgetMs === normalized) return this.agent;\n void this.agent?.close().catch(() => {\n /* pool teardown is best-effort */\n });\n this.agent = new Agent({\n headersTimeout: normalized,\n bodyTimeout: normalized,\n });\n this.agentBudgetMs = normalized;\n return this.agent;\n }\n\n async post(request: ChatCompletionRequest): Promise<Response> {\n const init: RequestInit & { dispatcher?: Agent } = {\n method: \"POST\",\n headers: request.headers,\n body: request.body,\n signal: request.signal,\n };\n const dispatcher = this.dispatcherFor(request.budgetMs);\n if (dispatcher) init.dispatcher = dispatcher;\n return await fetch(request.url, init);\n }\n}\n"],"mappings":";;;;;AAAA,SAAS,OAAO,2BAA2B;AAkC3C,SAAS,oBAAoB,YAA8B;AACzD,MAAI,sBAAsB,MAAO,QAAO;AACxC,MAAI,CAAC,cAAc,OAAO,eAAe,SAAU,QAAO;AAC1D,QAAM,OAAQ,WAAyC;AACvD,MAAI,CAAC,QAAQ,OAAO,SAAS,WAAY,QAAO;AAChD,SAAO,KAAK,SAAS;AACvB;AAgBO,IAAM,gBAAN,MAAoB;AAAA,EACjB,QAAsB;AAAA,EACtB,gBAA+B;AAAA,EAC/B,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EActC,cAAc,UAAqC;AACjD,QAAI,CAAC,oBAAoB,oBAAoB,CAAC,GAAG;AAC/C,UAAI,CAAC,KAAK,6BAA6B;AACrC,aAAK,8BAA8B;AACnC,YAAI;AAAA,UACF;AAAA,QAEF;AAAA,MACF;AACA,aAAO;AAAA,IACT;AACA,UAAM,aAAa,OAAO,SAAS,QAAQ,IAAI,KAAK,IAAI,GAAG,QAAQ,IAAI;AACvE,QAAI,KAAK,SAAS,KAAK,kBAAkB,WAAY,QAAO,KAAK;AACjE,SAAK,KAAK,OAAO,MAAM,EAAE,MAAM,MAAM;AAAA,IAErC,CAAC;AACD,SAAK,QAAQ,IAAI,MAAM;AAAA,MACrB,gBAAgB;AAAA,MAChB,aAAa;AAAA,IACf,CAAC;AACD,SAAK,gBAAgB;AACrB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAM,KAAK,SAAmD;AAC5D,UAAM,OAA6C;AAAA,MACjD,QAAQ;AAAA,MACR,SAAS,QAAQ;AAAA,MACjB,MAAM,QAAQ;AAAA,MACd,QAAQ,QAAQ;AAAA,IAClB;AACA,UAAM,aAAa,KAAK,cAAc,QAAQ,QAAQ;AACtD,QAAI,WAAY,MAAK,aAAa;AAClC,WAAO,MAAM,MAAM,QAAQ,KAAK,IAAI;AAAA,EACtC;AACF;","names":[]}
@@ -1,12 +1,12 @@
1
+ import {
2
+ chatgptReplayNormalizer
3
+ } from "./chunk-MMACM5G2.js";
1
4
  import {
2
5
  claudeReplayNormalizer
3
6
  } from "./chunk-54BGIBCR.js";
4
7
  import {
5
8
  openclawReplayNormalizer
6
9
  } from "./chunk-H4CKS5B2.js";
7
- import {
8
- chatgptReplayNormalizer
9
- } from "./chunk-MMACM5G2.js";
10
10
  import {
11
11
  exportJsonBundle
12
12
  } from "./chunk-UP6MOYCB.js";
@@ -66,15 +66,15 @@ import {
66
66
  import {
67
67
  migrateObservations
68
68
  } from "./chunk-MNB5RMAY.js";
69
+ import {
70
+ runCompatChecks
71
+ } from "./chunk-GQL52GQ5.js";
69
72
  import {
70
73
  getBulkImportSource,
71
74
  listBulkImportSources,
72
75
  registerBulkImportSource,
73
76
  runBulkImportPipeline
74
77
  } from "./chunk-HSSERO3E.js";
75
- import {
76
- runCompatChecks
77
- } from "./chunk-GQL52GQ5.js";
78
78
  import {
79
79
  getUtilityLearningStatus,
80
80
  learnUtilityPromotionWeights
@@ -108,12 +108,12 @@ import {
108
108
  import {
109
109
  utcDayRange
110
110
  } from "./chunk-HYQJQGD3.js";
111
- import {
112
- resolveAgentAccessAuthToken
113
- } from "./chunk-TGQ2NTWH.js";
114
111
  import {
115
112
  parseXrayCliOptions
116
113
  } from "./chunk-5CPI2QWG.js";
114
+ import {
115
+ resolveAgentAccessAuthToken
116
+ } from "./chunk-TGQ2NTWH.js";
117
117
  import {
118
118
  collectPatternMemories,
119
119
  explainPatternMemory,
@@ -135,7 +135,7 @@ import {
135
135
  runOperatorInventory,
136
136
  runOperatorRepair,
137
137
  runOperatorSetup
138
- } from "./chunk-KNRG6ZGJ.js";
138
+ } from "./chunk-XGEFGNL5.js";
139
139
  import {
140
140
  listNamespaces,
141
141
  runNamespaceMigration,
@@ -211,7 +211,7 @@ import {
211
211
  import {
212
212
  EngramAccessHttpServer,
213
213
  MeetingsInputError
214
- } from "./chunk-WS32QRLO.js";
214
+ } from "./chunk-DLKRXYRL.js";
215
215
  import {
216
216
  WearablesInputError
217
217
  } from "./chunk-V7IZKJI3.js";
@@ -224,13 +224,13 @@ import {
224
224
  createProductionChatLlmAdapter,
225
225
  loadChatSession,
226
226
  sessionBelongsToPrincipal
227
- } from "./chunk-OUW4PAY4.js";
227
+ } from "./chunk-M6LJXJ3J.js";
228
228
  import {
229
229
  getAbstractionNodeStoreStatus
230
230
  } from "./chunk-OADWQ5CR.js";
231
231
  import {
232
232
  EngramAccessService
233
- } from "./chunk-IIXLB5E7.js";
233
+ } from "./chunk-WZVIB5BK.js";
234
234
  import {
235
235
  WorkStorage
236
236
  } from "./chunk-GDB4J2H3.js";
@@ -248,6 +248,9 @@ import {
248
248
  renderRecallExplain,
249
249
  renderXray
250
250
  } from "./chunk-MMTG3SCJ.js";
251
+ import {
252
+ getObjectiveStateStoreStatus
253
+ } from "./chunk-6HMYUWXR.js";
251
254
  import {
252
255
  listMemoryGovernanceRuns,
253
256
  readMemoryGovernanceRunArtifact,
@@ -257,9 +260,6 @@ import {
257
260
  import {
258
261
  renderQmdBacklogStatus
259
262
  } from "./chunk-IUM3VSHI.js";
260
- import {
261
- getObjectiveStateStoreStatus
262
- } from "./chunk-6HMYUWXR.js";
263
263
  import {
264
264
  analyzeGraphHealth
265
265
  } from "./chunk-L2DPF4DF.js";
@@ -7976,4 +7976,4 @@ export {
7976
7976
  listMemoryMarkdownFilePaths,
7977
7977
  registerCli
7978
7978
  };
7979
- //# sourceMappingURL=chunk-ROUL7RZU.js.map
7979
+ //# sourceMappingURL=chunk-KXGE7L62.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-D24OXEPB.js";
7
7
  import {
8
8
  validateRequest
9
- } from "./chunk-HBYQAOED.js";
9
+ } from "./chunk-V2XVMCP6.js";
10
10
  import {
11
11
  REMNIC_CHATGPT_MEMORY_INSPECTOR_MIME_TYPE,
12
12
  REMNIC_CHATGPT_MEMORY_INSPECTOR_TOOL,
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-TWCOYET2.js";
23
23
  import {
24
24
  getOperation
25
- } from "./chunk-IIXLB5E7.js";
25
+ } from "./chunk-WZVIB5BK.js";
26
26
  import {
27
27
  assertOperationAllowed,
28
28
  capabilityAllowsOp,
@@ -3732,4 +3732,4 @@ export {
3732
3732
  MCP_SUPPORTED_PROTOCOL_VERSIONS,
3733
3733
  EngramMcpServer
3734
3734
  };
3735
- //# sourceMappingURL=chunk-OUW4PAY4.js.map
3735
+ //# sourceMappingURL=chunk-M6LJXJ3J.js.map
@@ -1,3 +1,7 @@
1
+ import {
2
+ ensureLcmStateDir,
3
+ openLcmDatabase
4
+ } from "./chunk-DDA47TES.js";
1
5
  import {
2
6
  LcmSummarizer
3
7
  } from "./chunk-PBGWYM3H.js";
@@ -13,10 +17,6 @@ import {
13
17
  import {
14
18
  assembleCompressedHistoryWithTrace
15
19
  } from "./chunk-UXPUUL3G.js";
16
- import {
17
- ensureLcmStateDir,
18
- openLcmDatabase
19
- } from "./chunk-DDA47TES.js";
20
20
  import {
21
21
  log
22
22
  } from "./chunk-3WCASNQZ.js";
@@ -526,4 +526,4 @@ export {
526
526
  extractLcmConfig,
527
527
  LcmEngine
528
528
  };
529
- //# sourceMappingURL=chunk-2PHX3I5C.js.map
529
+ //# sourceMappingURL=chunk-MAXVH44E.js.map