@lucern/sdk 1.0.11 → 1.0.12

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 (330) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/.generated +2 -0
  3. package/dist/accessControl.d.ts +19 -26
  4. package/dist/accessControl.js +195 -1423
  5. package/dist/adminClient.d.ts +52 -59
  6. package/dist/adminClient.js +364 -1142
  7. package/dist/answersClient.d.ts +5 -14
  8. package/dist/answersClient.js +19 -737
  9. package/dist/audience/index.d.ts +18 -18
  10. package/dist/audience/index.js +87 -90
  11. package/dist/audiencesClient.d.ts +19 -27
  12. package/dist/audiencesClient.js +107 -868
  13. package/dist/auditClient.d.ts +8 -15
  14. package/dist/auditClient.js +18 -791
  15. package/dist/authContext.d.ts +11 -16
  16. package/dist/authContext.js +122 -154
  17. package/dist/authDeviceClient.d.ts +8 -17
  18. package/dist/authDeviceClient.js +113 -102
  19. package/dist/beliefs/index.d.ts +15 -67
  20. package/dist/beliefs/index.js +17 -10181
  21. package/dist/beliefs/lifecycle.d.ts +10 -11
  22. package/dist/beliefs/lifecycle.js +78 -80
  23. package/dist/beliefsClient.d.ts +26 -32
  24. package/dist/beliefsClient.js +250 -990
  25. package/dist/boundaryClientSurface.d.ts +11 -16
  26. package/dist/boundaryClientSurface.js +49 -68
  27. package/dist/client.d.ts +64 -112
  28. package/dist/client.js +232 -10155
  29. package/dist/clientAssemblyTypes.d.ts +3 -3
  30. package/dist/clientAssemblyTypes.js +1 -2
  31. package/dist/clientConfig.d.ts +45 -59
  32. package/dist/clientConfig.js +1 -2
  33. package/dist/clientEvidenceCompat.d.ts +7 -14
  34. package/dist/clientEvidenceCompat.js +50 -64
  35. package/dist/clientGraphNamespaces.d.ts +3 -5
  36. package/dist/clientGraphNamespaces.js +170 -245
  37. package/dist/clientHelpers.d.ts +20 -25
  38. package/dist/clientHelpers.js +104 -127
  39. package/dist/clientKnowledgeNamespaces.d.ts +6 -53
  40. package/dist/clientKnowledgeNamespaces.js +502 -506
  41. package/dist/clientLocalHelpers.d.ts +11 -56
  42. package/dist/clientLocalHelpers.js +503 -732
  43. package/dist/clientPlatformNamespaces.d.ts +5 -53
  44. package/dist/clientPlatformNamespaces.js +229 -323
  45. package/dist/clientRuntime.d.ts +5 -53
  46. package/dist/clientRuntime.js +26 -30
  47. package/dist/clientWorkflowNamespaces.d.ts +6 -15
  48. package/dist/clientWorkflowNamespaces.js +529 -596
  49. package/dist/contextClient.d.ts +9 -17
  50. package/dist/contextClient.js +92 -805
  51. package/dist/contextFacade.d.ts +11 -2
  52. package/dist/contextFacade.js +10 -81
  53. package/dist/contextPackCompiler.d.ts +10 -11
  54. package/dist/contextPackCompiler.js +494 -1040
  55. package/dist/contextPackPolicy.d.ts +14 -15
  56. package/dist/contextPackPolicy.js +227 -305
  57. package/dist/contextPackSchema.d.ts +3 -3
  58. package/dist/contextPackSchema.js +169 -176
  59. package/dist/contextTypes.d.ts +14 -15
  60. package/dist/contextTypes.js +1 -2
  61. package/dist/contracts/api-enums.contract.d.ts +29 -30
  62. package/dist/contracts/api-enums.contract.js +162 -88
  63. package/dist/contracts/auth-session.contract.d.ts +13 -14
  64. package/dist/contracts/auth-session.contract.js +55 -52
  65. package/dist/contracts/context-pack.contract.d.ts +54 -55
  66. package/dist/contracts/context-pack.contract.js +160 -88
  67. package/dist/contracts/contextPack.d.ts +2 -1
  68. package/dist/contracts/contextPack.js +1 -97
  69. package/dist/contracts/index.d.ts +11 -12
  70. package/dist/contracts/index.js +10 -854
  71. package/dist/contracts/lens-filter.contract.d.ts +9 -10
  72. package/dist/contracts/lens-filter.contract.js +82 -58
  73. package/dist/contracts/lens-workflow.contract.d.ts +21 -23
  74. package/dist/contracts/lens-workflow.contract.js +48 -117
  75. package/dist/contracts/lensFilter.d.ts +2 -1
  76. package/dist/contracts/lensFilter.js +1 -71
  77. package/dist/contracts/lensWorkflow.d.ts +2 -2
  78. package/dist/contracts/lensWorkflow.js +1 -123
  79. package/dist/contracts/mcpTools.d.ts +16 -18
  80. package/dist/contracts/mcpTools.js +89 -123
  81. package/dist/contracts/prompt.contract.d.ts +4 -5
  82. package/dist/contracts/prompt.contract.js +23 -10
  83. package/dist/contracts/prompt.d.ts +2 -1
  84. package/dist/contracts/prompt.js +1 -11
  85. package/dist/contracts/sdk-tools.contract.d.ts +2 -1
  86. package/dist/contracts/sdk-tools.contract.js +1 -2
  87. package/dist/contracts/sdkTools.d.ts +2 -1
  88. package/dist/contracts/sdkTools.js +1 -26
  89. package/dist/contracts/tool-contracts.d.ts +2 -1
  90. package/dist/contracts/tool-contracts.js +1 -2
  91. package/dist/contracts/workflow-runtime.contract.d.ts +45 -46
  92. package/dist/contracts/workflow-runtime.contract.js +241 -228
  93. package/dist/contracts/workflowRuntime.d.ts +2 -1
  94. package/dist/contracts/workflowRuntime.js +1 -244
  95. package/dist/contradictions/index.d.ts +8 -60
  96. package/dist/contradictions/index.js +11 -10175
  97. package/dist/control-plane.d.ts +17 -24
  98. package/dist/control-plane.js +124 -840
  99. package/dist/controlObjectOwnership.d.ts +19 -20
  100. package/dist/controlObjectOwnership.js +207 -201
  101. package/dist/coreClient.d.ts +23 -28
  102. package/dist/coreClient.js +567 -692
  103. package/dist/customTools.d.ts +17 -21
  104. package/dist/customTools.js +221 -221
  105. package/dist/decisions/index.d.ts +7 -58
  106. package/dist/decisions/index.js +14 -10177
  107. package/dist/decisionsClient.d.ts +25 -32
  108. package/dist/decisionsClient.js +113 -913
  109. package/dist/domainContext.d.ts +2 -1
  110. package/dist/domainContext.js +1 -2
  111. package/dist/edges/index.d.ts +21 -73
  112. package/dist/edges/index.js +12 -10176
  113. package/dist/embeddingsClient.d.ts +22 -30
  114. package/dist/embeddingsClient.js +73 -922
  115. package/dist/eventingClient.d.ts +23 -31
  116. package/dist/eventingClient.js +89 -918
  117. package/dist/events.d.ts +48 -49
  118. package/dist/events.js +257 -241
  119. package/dist/eventsCore.d.ts +20 -29
  120. package/dist/eventsCore.js +86 -830
  121. package/dist/evidence/index.d.ts +9 -60
  122. package/dist/evidence/index.js +13 -10176
  123. package/dist/evidenceClient.d.ts +13 -22
  124. package/dist/evidenceClient.js +34 -751
  125. package/dist/facade/context.d.ts +7 -8
  126. package/dist/facade/context.js +73 -72
  127. package/dist/functionSurface.d.ts +2 -156
  128. package/dist/functionSurface.js +1 -1460
  129. package/dist/functionSurfaceClient.d.ts +2 -9
  130. package/dist/functionSurfaceClient.js +1 -1460
  131. package/dist/gatewayFacades.d.ts +79 -296
  132. package/dist/gatewayFacades.factories.d.ts +209 -14
  133. package/dist/gatewayFacades.factories.js +561 -2227
  134. package/dist/gatewayFacades.js +284 -2627
  135. package/dist/generated/functionSurface.d.ts +149 -0
  136. package/dist/generated/functionSurface.js +749 -0
  137. package/dist/graphAnalysisClient.d.ts +41 -49
  138. package/dist/graphAnalysisClient.js +185 -974
  139. package/dist/graphClient.d.ts +53 -60
  140. package/dist/graphClient.js +219 -1090
  141. package/dist/graphIntel.d.ts +2 -4
  142. package/dist/graphIntel.js +1 -2
  143. package/dist/graphIntelligence.d.ts +4 -2
  144. package/dist/graphIntelligence.js +2 -46
  145. package/dist/graphRecommendationsClient.d.ts +15 -23
  146. package/dist/graphRecommendationsClient.js +70 -849
  147. package/dist/graphStateClassifierClient.d.ts +17 -25
  148. package/dist/graphStateClassifierClient.js +67 -908
  149. package/dist/harnessClient.d.ts +40 -47
  150. package/dist/harnessClient.js +198 -993
  151. package/dist/identityClient.d.ts +25 -33
  152. package/dist/identityClient.js +245 -1186
  153. package/dist/index.d.ts +73 -69
  154. package/dist/index.js +72 -13313
  155. package/dist/infisicalRuntime.d.ts +12 -14
  156. package/dist/infisicalRuntime.js +290 -297
  157. package/dist/jobsClient.d.ts +24 -32
  158. package/dist/jobsClient.js +101 -916
  159. package/dist/learningClient.d.ts +8 -16
  160. package/dist/learningClient.js +45 -809
  161. package/dist/lenses/index.d.ts +13 -65
  162. package/dist/lenses/index.js +11 -10175
  163. package/dist/mcpClient.d.ts +14 -23
  164. package/dist/mcpClient.js +115 -856
  165. package/dist/modelRuntimeClient.d.ts +18 -26
  166. package/dist/modelRuntimeClient.js +74 -894
  167. package/dist/nodes/index.d.ts +7 -58
  168. package/dist/nodes/index.js +14 -10177
  169. package/dist/ontologies/index.d.ts +21 -73
  170. package/dist/ontologies/index.js +14 -10178
  171. package/dist/ontologyClient.d.ts +23 -31
  172. package/dist/ontologyClient.js +138 -924
  173. package/dist/ontologyLinksClient.d.ts +16 -24
  174. package/dist/ontologyLinksClient.js +76 -886
  175. package/dist/opinion.d.ts +5 -6
  176. package/dist/opinion.js +21 -25
  177. package/dist/orgGraphSearchClient.d.ts +19 -27
  178. package/dist/orgGraphSearchClient.js +89 -857
  179. package/dist/packRuntime.d.ts +2 -2
  180. package/dist/packRuntime.js +1 -2
  181. package/dist/packsClient.d.ts +30 -37
  182. package/dist/packsClient.js +131 -906
  183. package/dist/policyClient.d.ts +21 -29
  184. package/dist/policyClient.js +267 -1026
  185. package/dist/proof-attestation.json +1 -1
  186. package/dist/questions/index.d.ts +9 -60
  187. package/dist/questions/index.js +15 -10178
  188. package/dist/realtime/index.d.ts +20 -16
  189. package/dist/realtime/index.js +30 -19
  190. package/dist/realtime/refs.d.ts +4 -6
  191. package/dist/realtime/refs.js +12 -7
  192. package/dist/realtime-refs.d.ts +1 -0
  193. package/dist/realtime-refs.js +1 -0
  194. package/dist/realtime.d.ts +1 -0
  195. package/dist/realtime.js +1 -0
  196. package/dist/reportsClient.d.ts +10 -19
  197. package/dist/reportsClient.js +48 -836
  198. package/dist/schemaClient.d.ts +16 -23
  199. package/dist/schemaClient.js +62 -832
  200. package/dist/sdkSurface.d.ts +18 -25
  201. package/dist/sdkSurface.js +135 -106
  202. package/dist/secrets.d.ts +2 -1
  203. package/dist/secrets.js +1 -2
  204. package/dist/sourcesClient.d.ts +11 -18
  205. package/dist/sourcesClient.js +18 -741
  206. package/dist/telemetryClient.d.ts +22 -30
  207. package/dist/telemetryClient.js +107 -931
  208. package/dist/toolRegistryClient.d.ts +27 -35
  209. package/dist/toolRegistryClient.js +116 -954
  210. package/dist/topics/index.d.ts +13 -64
  211. package/dist/topics/index.js +15 -10178
  212. package/dist/topicsClient.d.ts +19 -27
  213. package/dist/topicsClient.js +106 -894
  214. package/dist/types.d.ts +84 -87
  215. package/dist/types.js +1 -2
  216. package/dist/version.d.ts +2 -3
  217. package/dist/version.js +2 -5
  218. package/dist/workflowClient.d.ts +60 -65
  219. package/dist/workflowClient.js +343 -1219
  220. package/dist/worktrees/index.d.ts +16 -68
  221. package/dist/worktrees/index.js +14 -10178
  222. package/package.json +6 -6
  223. package/dist/accessControl.js.map +0 -1
  224. package/dist/adminClient.js.map +0 -1
  225. package/dist/answersClient.js.map +0 -1
  226. package/dist/audience/index.js.map +0 -1
  227. package/dist/audiencesClient.js.map +0 -1
  228. package/dist/auditClient.js.map +0 -1
  229. package/dist/authContext.js.map +0 -1
  230. package/dist/authDeviceClient.js.map +0 -1
  231. package/dist/beliefs/index.js.map +0 -1
  232. package/dist/beliefs/lifecycle.js.map +0 -1
  233. package/dist/beliefsClient.js.map +0 -1
  234. package/dist/boundaryClientSurface.js.map +0 -1
  235. package/dist/client.js.map +0 -1
  236. package/dist/clientAssemblyTypes.js.map +0 -1
  237. package/dist/clientConfig.js.map +0 -1
  238. package/dist/clientEvidenceCompat.js.map +0 -1
  239. package/dist/clientGraphNamespaces.js.map +0 -1
  240. package/dist/clientHelpers.js.map +0 -1
  241. package/dist/clientKnowledgeNamespaces.js.map +0 -1
  242. package/dist/clientLocalHelpers.js.map +0 -1
  243. package/dist/clientPlatformNamespaces.js.map +0 -1
  244. package/dist/clientRuntime.js.map +0 -1
  245. package/dist/clientWorkflowNamespaces.js.map +0 -1
  246. package/dist/contextClient.js.map +0 -1
  247. package/dist/contextFacade.js.map +0 -1
  248. package/dist/contextPackCompiler.js.map +0 -1
  249. package/dist/contextPackPolicy.js.map +0 -1
  250. package/dist/contextPackSchema.js.map +0 -1
  251. package/dist/contextTypes.js.map +0 -1
  252. package/dist/contracts/api-enums.contract.js.map +0 -1
  253. package/dist/contracts/auth-session.contract.js.map +0 -1
  254. package/dist/contracts/context-pack.contract.js.map +0 -1
  255. package/dist/contracts/contextPack.js.map +0 -1
  256. package/dist/contracts/index.js.map +0 -1
  257. package/dist/contracts/lens-filter.contract.js.map +0 -1
  258. package/dist/contracts/lens-workflow.contract.js.map +0 -1
  259. package/dist/contracts/lensFilter.js.map +0 -1
  260. package/dist/contracts/lensWorkflow.js.map +0 -1
  261. package/dist/contracts/mcpTools.js.map +0 -1
  262. package/dist/contracts/prompt.contract.js.map +0 -1
  263. package/dist/contracts/prompt.js.map +0 -1
  264. package/dist/contracts/sdk-tools.contract.js.map +0 -1
  265. package/dist/contracts/sdkTools.js.map +0 -1
  266. package/dist/contracts/tool-contracts.js.map +0 -1
  267. package/dist/contracts/workflow-runtime.contract.js.map +0 -1
  268. package/dist/contracts/workflowRuntime.js.map +0 -1
  269. package/dist/contradictions/index.js.map +0 -1
  270. package/dist/control-plane.js.map +0 -1
  271. package/dist/controlObjectOwnership.js.map +0 -1
  272. package/dist/coreClient.js.map +0 -1
  273. package/dist/customTools.js.map +0 -1
  274. package/dist/decisions/index.js.map +0 -1
  275. package/dist/decisionsClient.js.map +0 -1
  276. package/dist/domainContext.js.map +0 -1
  277. package/dist/edges/index.js.map +0 -1
  278. package/dist/embeddingsClient.js.map +0 -1
  279. package/dist/eventingClient.js.map +0 -1
  280. package/dist/events.js.map +0 -1
  281. package/dist/eventsCore.js.map +0 -1
  282. package/dist/evidence/index.js.map +0 -1
  283. package/dist/evidenceClient.js.map +0 -1
  284. package/dist/facade/context.js.map +0 -1
  285. package/dist/functionSurface.js.map +0 -1
  286. package/dist/functionSurfaceClient.js.map +0 -1
  287. package/dist/gatewayFacades.factories.js.map +0 -1
  288. package/dist/gatewayFacades.js.map +0 -1
  289. package/dist/graphAnalysisClient.js.map +0 -1
  290. package/dist/graphClient.js.map +0 -1
  291. package/dist/graphIntel.js.map +0 -1
  292. package/dist/graphIntelligence.js.map +0 -1
  293. package/dist/graphRecommendationsClient.js.map +0 -1
  294. package/dist/graphStateClassifierClient.js.map +0 -1
  295. package/dist/harnessClient.js.map +0 -1
  296. package/dist/identityClient.js.map +0 -1
  297. package/dist/index.js.map +0 -1
  298. package/dist/infisicalRuntime.js.map +0 -1
  299. package/dist/jobsClient.js.map +0 -1
  300. package/dist/learningClient.js.map +0 -1
  301. package/dist/lenses/index.js.map +0 -1
  302. package/dist/mcpClient.js.map +0 -1
  303. package/dist/modelRuntimeClient.js.map +0 -1
  304. package/dist/nodes/index.js.map +0 -1
  305. package/dist/ontologies/index.js.map +0 -1
  306. package/dist/ontologyClient.js.map +0 -1
  307. package/dist/ontologyLinksClient.js.map +0 -1
  308. package/dist/opinion.js.map +0 -1
  309. package/dist/orgGraphSearchClient.js.map +0 -1
  310. package/dist/packRuntime.js.map +0 -1
  311. package/dist/packsClient.js.map +0 -1
  312. package/dist/policyClient.js.map +0 -1
  313. package/dist/questions/index.js.map +0 -1
  314. package/dist/realtime/index.js.map +0 -1
  315. package/dist/realtime/refs.js.map +0 -1
  316. package/dist/reportsClient.js.map +0 -1
  317. package/dist/schemaClient.js.map +0 -1
  318. package/dist/sdk-tools.contract-B4c1Zr1o.d.ts +0 -22
  319. package/dist/sdkSurface.js.map +0 -1
  320. package/dist/secrets.js.map +0 -1
  321. package/dist/sourcesClient.js.map +0 -1
  322. package/dist/telemetryClient.js.map +0 -1
  323. package/dist/tool-contracts-BUiL9P6z.d.ts +0 -22
  324. package/dist/toolRegistryClient.js.map +0 -1
  325. package/dist/topics/index.js.map +0 -1
  326. package/dist/topicsClient.js.map +0 -1
  327. package/dist/types.js.map +0 -1
  328. package/dist/version.js.map +0 -1
  329. package/dist/workflowClient.js.map +0 -1
  330. package/dist/worktrees/index.js.map +0 -1
@@ -14,7 +14,7 @@
14
14
  * - Changing the version string is BREAKING (consumers check it)
15
15
  */
16
16
  /** Canonical version string. Consumers MUST check this field for compatibility. */
17
- declare const CONTEXT_PACK_SCHEMA_VERSION: "1.0.0";
17
+ export declare const CONTEXT_PACK_SCHEMA_VERSION: "1.0.0";
18
18
  /**
19
19
  * Available ranking profiles for context-pack assembly.
20
20
  *
@@ -22,9 +22,9 @@ declare const CONTEXT_PACK_SCHEMA_VERSION: "1.0.0";
22
22
  * - `weighted_v1`: Multi-signal scoring combining query relevance, recency, confidence,
23
23
  * belief type, priority, and severity with section-specific weight vectors.
24
24
  */
25
- type ContextRankingProfile = "baseline_v1" | "weighted_v1";
26
- declare const CONTEXT_RANKING_PROFILES: readonly ContextRankingProfile[];
27
- declare const DEFAULT_RANKING_PROFILE: ContextRankingProfile;
25
+ export type ContextRankingProfile = "baseline_v1" | "weighted_v1";
26
+ export declare const CONTEXT_RANKING_PROFILES: readonly ContextRankingProfile[];
27
+ export declare const DEFAULT_RANKING_PROFILE: ContextRankingProfile;
28
28
  /**
29
29
  * Context compilation mode.
30
30
  *
@@ -32,14 +32,14 @@ declare const DEFAULT_RANKING_PROFILE: ContextRankingProfile;
32
32
  * - `delta`: Diff-aware — adds failure context, verification obligations,
33
33
  * and worktree ledger analysis to the standard context pack.
34
34
  */
35
- type ContextCompilationMode = "standard" | "delta";
36
- declare const DEFAULT_COMPILATION_MODE: ContextCompilationMode;
35
+ export type ContextCompilationMode = "standard" | "delta";
36
+ export declare const DEFAULT_COMPILATION_MODE: ContextCompilationMode;
37
37
  /**
38
38
  * The five canonical sections of a context pack.
39
39
  * Order matters: invariants are injected first, contradictions last.
40
40
  */
41
- type ContextPackSectionKey = "invariants" | "activeBeliefs" | "openQuestions" | "recentEvidence" | "contradictions";
42
- declare const CONTEXT_PACK_SECTION_KEYS: readonly ContextPackSectionKey[];
41
+ export type ContextPackSectionKey = "invariants" | "activeBeliefs" | "openQuestions" | "recentEvidence" | "contradictions";
42
+ export declare const CONTEXT_PACK_SECTION_KEYS: readonly ContextPackSectionKey[];
43
43
  /**
44
44
  * Token budget allocation ratios per section.
45
45
  * These sum to 1.0 and determine how the total tokenBudget is divided.
@@ -51,19 +51,19 @@ declare const CONTEXT_PACK_SECTION_KEYS: readonly ContextPackSectionKey[];
51
51
  * - recentEvidence (0.17): Implementation context for grounding
52
52
  * - contradictions (0.08): Tension signals, smallest section
53
53
  */
54
- declare const SECTION_BUDGET_RATIOS: Readonly<Record<ContextPackSectionKey, number>>;
54
+ export declare const SECTION_BUDGET_RATIOS: Readonly<Record<ContextPackSectionKey, number>>;
55
55
  /** Minimum allowed token budget. Below this, context packs lose utility. */
56
- declare const MIN_TOKEN_BUDGET = 400;
56
+ export declare const MIN_TOKEN_BUDGET = 400;
57
57
  /** Maximum allowed token budget. Above this, context packs bloat prompts. */
58
- declare const MAX_TOKEN_BUDGET = 8000;
58
+ export declare const MAX_TOKEN_BUDGET = 8000;
59
59
  /** Default token budget when caller does not specify. */
60
- declare const DEFAULT_TOKEN_BUDGET = 1800;
60
+ export declare const DEFAULT_TOKEN_BUDGET = 1800;
61
61
  /** Default max items per section. */
62
- declare const DEFAULT_SECTION_LIMIT = 8;
62
+ export declare const DEFAULT_SECTION_LIMIT = 8;
63
63
  /** Hard ceiling on items per section. */
64
- declare const MAX_SECTION_LIMIT = 25;
64
+ export declare const MAX_SECTION_LIMIT = 25;
65
65
  /** Minimum contradiction section budget floor (tokens). */
66
- declare const MIN_CONTRADICTION_BUDGET = 40;
66
+ export declare const MIN_CONTRADICTION_BUDGET = 40;
67
67
  /**
68
68
  * Weight vectors for the weighted_v1 ranking profile.
69
69
  * Each section has a different signal mix:
@@ -75,7 +75,7 @@ declare const MIN_CONTRADICTION_BUDGET = 40;
75
75
  * - priority: Question priority (critical > high > medium > low)
76
76
  * - severity: Contradiction severity (critical > high > medium > low)
77
77
  */
78
- type RankingWeightVector = {
78
+ export type RankingWeightVector = {
79
79
  query: number;
80
80
  recency: number;
81
81
  confidence?: number;
@@ -83,35 +83,35 @@ type RankingWeightVector = {
83
83
  priority?: number;
84
84
  severity?: number;
85
85
  };
86
- declare const RANKING_WEIGHTS: Readonly<Record<ContextPackSectionKey, RankingWeightVector>>;
86
+ export declare const RANKING_WEIGHTS: Readonly<Record<ContextPackSectionKey, RankingWeightVector>>;
87
87
  /** Recency decay half-life in days. After 30 days, recency score = 0.5. */
88
- declare const RECENCY_HALF_LIFE_DAYS = 30;
88
+ export declare const RECENCY_HALF_LIFE_DAYS = 30;
89
89
  /**
90
90
  * Ranking weight vector for the relatedEntities section.
91
91
  * Entities are ranked by query relevance and connectivity (bridge edge count).
92
92
  * Separate from RANKING_WEIGHTS because entities are not part of the
93
93
  * token-budgeted injection plan.
94
94
  */
95
- declare const ENTITY_RANKING_WEIGHTS: {
95
+ export declare const ENTITY_RANKING_WEIGHTS: {
96
96
  readonly query: 0.4;
97
97
  readonly connectivity: 0.6;
98
98
  };
99
99
  /** Default max entities to include in the context pack. */
100
- declare const DEFAULT_ENTITY_LIMIT = 10;
100
+ export declare const DEFAULT_ENTITY_LIMIT = 10;
101
101
  /** Hard ceiling on entities per context pack. */
102
- declare const MAX_ENTITY_LIMIT = 50;
102
+ export declare const MAX_ENTITY_LIMIT = 50;
103
103
  /**
104
104
  * Bonus multiplier for belief types in ranking.
105
105
  * Invariants get 1.0, unknown types get 0.4.
106
106
  */
107
- declare const BELIEF_TYPE_BONUS: Readonly<Record<string, number>>;
108
- declare const DEFAULT_BELIEF_TYPE_BONUS = 0.4;
109
- declare const PRIORITY_SCORES: Readonly<Record<string, number>>;
110
- declare const DEFAULT_PRIORITY_SCORE = 0.5;
111
- declare const SEVERITY_SCORES: Readonly<Record<string, number>>;
112
- declare const DEFAULT_SEVERITY_SCORE = 0.5;
107
+ export declare const BELIEF_TYPE_BONUS: Readonly<Record<string, number>>;
108
+ export declare const DEFAULT_BELIEF_TYPE_BONUS = 0.4;
109
+ export declare const PRIORITY_SCORES: Readonly<Record<string, number>>;
110
+ export declare const DEFAULT_PRIORITY_SCORE = 0.5;
111
+ export declare const SEVERITY_SCORES: Readonly<Record<string, number>>;
112
+ export declare const DEFAULT_SEVERITY_SCORE = 0.5;
113
113
  /** A ranked belief in the invariants or activeBeliefs section. */
114
- type ContextPackBelief = {
114
+ export type ContextPackBelief = {
115
115
  nodeId: string;
116
116
  canonicalText: string;
117
117
  confidence: number | null;
@@ -124,7 +124,7 @@ type ContextPackBelief = {
124
124
  justification?: string;
125
125
  };
126
126
  /** A ranked question in the openQuestions section. */
127
- type ContextPackQuestion = {
127
+ export type ContextPackQuestion = {
128
128
  questionId: string;
129
129
  text: string;
130
130
  status: string;
@@ -135,7 +135,7 @@ type ContextPackQuestion = {
135
135
  justification?: string;
136
136
  };
137
137
  /** A ranked evidence item in the recentEvidence section. */
138
- type ContextPackEvidence = {
138
+ export type ContextPackEvidence = {
139
139
  nodeId: string;
140
140
  canonicalText: string;
141
141
  sourceUrl: string | null;
@@ -146,7 +146,7 @@ type ContextPackEvidence = {
146
146
  justification?: string;
147
147
  };
148
148
  /** A ranked contradiction in the contradictions section. */
149
- type ContextPackContradiction = {
149
+ export type ContextPackContradiction = {
150
150
  contradictionId: string;
151
151
  severity: string;
152
152
  status: string;
@@ -161,7 +161,7 @@ type ContextPackContradiction = {
161
161
  * to beliefs via bridge edges. They provide the "reality anchor" that makes
162
162
  * the reasoning graph domain-aware.
163
163
  */
164
- type ContextPackEntity = {
164
+ export type ContextPackEntity = {
165
165
  /** Convex document ID of the entity node. */
166
166
  nodeId: string;
167
167
  /** Entity type (e.g., "company", "person", "function"). */
@@ -181,7 +181,7 @@ type ContextPackEntity = {
181
181
  * A lattice seed entry representing a belief that was auto-generated
182
182
  * to cover an ontology entity type within a topic scope.
183
183
  */
184
- type BeliefLatticeSeed = {
184
+ export type BeliefLatticeSeed = {
185
185
  /** The belief node ID that was created or already existed. */
186
186
  beliefNodeId: string;
187
187
  /** The entity type this seed belief covers. */
@@ -192,7 +192,7 @@ type BeliefLatticeSeed = {
192
192
  canonicalText: string;
193
193
  };
194
194
  /** Counts and scoped health signals for the context pack. */
195
- type ContextPackSummary = {
195
+ export type ContextPackSummary = {
196
196
  totalBeliefs: number;
197
197
  invariants: number;
198
198
  openQuestions: number;
@@ -205,7 +205,7 @@ type ContextPackSummary = {
205
205
  query: string | null;
206
206
  };
207
207
  /** A failed approach surfaced from the failure log for anti-repetition. */
208
- type ContextPackFailure = {
208
+ export type ContextPackFailure = {
209
209
  /** Lucern attempt/evidence node ID. */
210
210
  attemptId: string;
211
211
  /** What was tried. */
@@ -218,14 +218,14 @@ type ContextPackFailure = {
218
218
  score: number;
219
219
  };
220
220
  /** Failure context section appended to context packs in delta mode. */
221
- type ContextPackFailureContext = {
221
+ export type ContextPackFailureContext = {
222
222
  /** Ranked failed approaches relevant to the current query. */
223
223
  failures: ContextPackFailure[];
224
224
  /** IDs of items suppressed from other sections due to anti-repetition. */
225
225
  suppressedIds: string[];
226
226
  };
227
227
  /** A verification obligation surfaced by delta compilation. */
228
- type VerificationObligation = {
228
+ export type VerificationObligation = {
229
229
  /** What must be verified. */
230
230
  description: string;
231
231
  /** Source of the obligation (e.g., "belief:xyz confidence drop"). */
@@ -234,7 +234,7 @@ type VerificationObligation = {
234
234
  severity: "critical" | "high" | "medium" | "low";
235
235
  };
236
236
  /** Delta report appended to context packs when mode = "delta". */
237
- type ContextPackDeltaReport = {
237
+ export type ContextPackDeltaReport = {
238
238
  /** Items that changed since the reference point (new, updated, removed). */
239
239
  changedItems: Array<{
240
240
  id: string;
@@ -251,14 +251,14 @@ type ContextPackDeltaReport = {
251
251
  * Per-section weight overrides that domain packs can apply.
252
252
  * Overrides merge with RANKING_WEIGHTS — only specified fields replace defaults.
253
253
  */
254
- type PackWeightOverride = {
254
+ export type PackWeightOverride = {
255
255
  /** Which section to override weights for. */
256
256
  section: ContextPackSectionKey;
257
257
  /** Partial weight vector — only specified fields replace defaults. */
258
258
  weights: Partial<RankingWeightVector>;
259
259
  };
260
260
  /** Token-budgeted section selections for prompt injection. */
261
- type ContextPackInjectionPolicy = {
261
+ export type ContextPackInjectionPolicy = {
262
262
  /** Total token budget for the entire context pack. */
263
263
  tokenBudget: number;
264
264
  /** Estimated tokens consumed across all sections. */
@@ -278,7 +278,7 @@ type ContextPackInjectionPolicy = {
278
278
  }>;
279
279
  };
280
280
  /** Telemetry for context pack assembly. */
281
- type ContextPackDiagnostics = {
281
+ export type ContextPackDiagnostics = {
282
282
  /** Total candidates scored across all sections. */
283
283
  itemsScored: number;
284
284
  /** Ratio of estimatedTokens / tokenBudget. Range [0, 1+]. */
@@ -290,7 +290,7 @@ type ContextPackDiagnostics = {
290
290
  * This preserves the existing external shape while the canonical compiler
291
291
  * contract evolves in parallel as ContextPackV1.
292
292
  */
293
- type PublicContextBelief = {
293
+ export type PublicContextBelief = {
294
294
  beliefId: string;
295
295
  text: string;
296
296
  confidence: number | null;
@@ -300,7 +300,7 @@ type PublicContextBelief = {
300
300
  score: number;
301
301
  justification?: string;
302
302
  };
303
- type PublicContextQuestion = {
303
+ export type PublicContextQuestion = {
304
304
  questionId: string;
305
305
  text: string;
306
306
  status: string;
@@ -309,7 +309,7 @@ type PublicContextQuestion = {
309
309
  score: number;
310
310
  justification?: string;
311
311
  };
312
- type PublicContextEvidence = {
312
+ export type PublicContextEvidence = {
313
313
  evidenceId: string;
314
314
  text: string;
315
315
  sourceUrl?: string | null;
@@ -318,7 +318,7 @@ type PublicContextEvidence = {
318
318
  score: number;
319
319
  justification?: string;
320
320
  };
321
- type PublicContextContradiction = {
321
+ export type PublicContextContradiction = {
322
322
  contradictionId: string;
323
323
  severity: string;
324
324
  status: string;
@@ -326,7 +326,7 @@ type PublicContextContradiction = {
326
326
  score: number;
327
327
  justification?: string;
328
328
  };
329
- type PublicContextEntity = {
329
+ export type PublicContextEntity = {
330
330
  entityId: string;
331
331
  entityType: string;
332
332
  title: string;
@@ -336,7 +336,7 @@ type PublicContextEntity = {
336
336
  score: number;
337
337
  metadata?: Record<string, unknown>;
338
338
  };
339
- type PublicContextInjectionPolicy = {
339
+ export type PublicContextInjectionPolicy = {
340
340
  tokenBudget: number;
341
341
  estimatedTokens: number;
342
342
  sectionBudgets: Record<string, number>;
@@ -349,7 +349,7 @@ type PublicContextInjectionPolicy = {
349
349
  score: number;
350
350
  }>;
351
351
  };
352
- type PublicCompiledContext = {
352
+ export type PublicCompiledContext = {
353
353
  schemaVersion: string;
354
354
  topicId: string;
355
355
  topicName: string;
@@ -400,7 +400,7 @@ type PublicCompiledContext = {
400
400
  * in the output. Adding optional fields is non-breaking; removing or
401
401
  * changing types is breaking (requires version bump).
402
402
  */
403
- type ContextPackV1 = {
403
+ export type ContextPackV1 = {
404
404
  /** Schema version for compatibility checking. */
405
405
  schemaVersion: typeof CONTEXT_PACK_SCHEMA_VERSION;
406
406
  /** Resolved topic ID after scope resolution. */
@@ -450,7 +450,7 @@ type ContextPackV1 = {
450
450
  * The canonical input schema for `compile_context`.
451
451
  * `topicId` is the only scope identifier.
452
452
  */
453
- type ContextPackRequestV1 = {
453
+ export type ContextPackRequestV1 = {
454
454
  /** Topic scope ID (required). */
455
455
  topicId: string;
456
456
  /** Focus query for relevance ranking. */
@@ -480,13 +480,12 @@ type ContextPackRequestV1 = {
480
480
  * Question statuses that are considered "resolved" (not open).
481
481
  * Used to filter which questions appear in the openQuestions section.
482
482
  */
483
- declare const RESOLVED_QUESTION_STATUSES: readonly string[];
483
+ export declare const RESOLVED_QUESTION_STATUSES: readonly string[];
484
484
  /**
485
485
  * Tokens-per-word multiplier for rough token estimation.
486
486
  * Conservative estimate: ~1.35 tokens per whitespace-delimited word.
487
487
  */
488
- declare const TOKENS_PER_WORD = 1.35;
488
+ export declare const TOKENS_PER_WORD = 1.35;
489
489
  /** Minimum token estimate for any non-empty string. */
490
- declare const MIN_TOKEN_ESTIMATE = 8;
491
-
492
- export { BELIEF_TYPE_BONUS, type BeliefLatticeSeed, CONTEXT_PACK_SCHEMA_VERSION, CONTEXT_PACK_SECTION_KEYS, CONTEXT_RANKING_PROFILES, type ContextCompilationMode, type ContextPackBelief, type ContextPackContradiction, type ContextPackDeltaReport, type ContextPackDiagnostics, type ContextPackEntity, type ContextPackEvidence, type ContextPackFailure, type ContextPackFailureContext, type ContextPackInjectionPolicy, type ContextPackQuestion, type ContextPackRequestV1, type ContextPackSectionKey, type ContextPackSummary, type ContextPackV1, type ContextRankingProfile, DEFAULT_BELIEF_TYPE_BONUS, DEFAULT_COMPILATION_MODE, DEFAULT_ENTITY_LIMIT, DEFAULT_PRIORITY_SCORE, DEFAULT_RANKING_PROFILE, DEFAULT_SECTION_LIMIT, DEFAULT_SEVERITY_SCORE, DEFAULT_TOKEN_BUDGET, ENTITY_RANKING_WEIGHTS, MAX_ENTITY_LIMIT, MAX_SECTION_LIMIT, MAX_TOKEN_BUDGET, MIN_CONTRADICTION_BUDGET, MIN_TOKEN_BUDGET, MIN_TOKEN_ESTIMATE, PRIORITY_SCORES, type PackWeightOverride, type PublicCompiledContext, type PublicContextBelief, type PublicContextContradiction, type PublicContextEntity, type PublicContextEvidence, type PublicContextInjectionPolicy, type PublicContextQuestion, RANKING_WEIGHTS, RECENCY_HALF_LIFE_DAYS, RESOLVED_QUESTION_STATUSES, type RankingWeightVector, SECTION_BUDGET_RATIOS, SEVERITY_SCORES, TOKENS_PER_WORD, type VerificationObligation };
490
+ export declare const MIN_TOKEN_ESTIMATE = 8;
491
+ //# sourceMappingURL=context-pack.contract.d.ts.map
@@ -1,98 +1,170 @@
1
- // src/contracts/context-pack.contract.ts
2
- var CONTEXT_PACK_SCHEMA_VERSION = "1.0.0";
3
- var CONTEXT_RANKING_PROFILES = [
4
- "baseline_v1",
5
- "weighted_v1"
1
+ /**
2
+ * Context-Pack Contract v1
3
+ *
4
+ * Canonical TypeScript types and constants for the context-pack output schema.
5
+ * This is the external contract consumed by:
6
+ * - MCP tool `compile_context` (canonical compiler read)
7
+ * - SDK/HTTP consumers that read compiled context packs programmatically
8
+ * - Benchmark harnesses (context-pack-ab)
9
+ *
10
+ * BREAKING CHANGE RULES:
11
+ * - Adding optional fields to ContextPackV1 is NON-breaking
12
+ * - Removing fields or changing types is BREAKING (bump CONTEXT_PACK_SCHEMA_VERSION)
13
+ * - Changing section budget ratios or ranking weights is NON-breaking (tuning)
14
+ * - Changing the version string is BREAKING (consumers check it)
15
+ */
16
+ // =============================================================================
17
+ // SCHEMA VERSION
18
+ // =============================================================================
19
+ /** Canonical version string. Consumers MUST check this field for compatibility. */
20
+ export const CONTEXT_PACK_SCHEMA_VERSION = "1.0.0";
21
+ export const CONTEXT_RANKING_PROFILES = [
22
+ "baseline_v1",
23
+ "weighted_v1",
6
24
  ];
7
- var DEFAULT_RANKING_PROFILE = "weighted_v1";
8
- var DEFAULT_COMPILATION_MODE = "standard";
9
- var CONTEXT_PACK_SECTION_KEYS = [
10
- "invariants",
11
- "activeBeliefs",
12
- "openQuestions",
13
- "recentEvidence",
14
- "contradictions"
25
+ export const DEFAULT_RANKING_PROFILE = "weighted_v1";
26
+ export const DEFAULT_COMPILATION_MODE = "standard";
27
+ export const CONTEXT_PACK_SECTION_KEYS = [
28
+ "invariants",
29
+ "activeBeliefs",
30
+ "openQuestions",
31
+ "recentEvidence",
32
+ "contradictions",
15
33
  ];
16
- var SECTION_BUDGET_RATIOS = {
17
- invariants: 0.28,
18
- activeBeliefs: 0.3,
19
- openQuestions: 0.17,
20
- recentEvidence: 0.17,
21
- contradictions: 0.08
34
+ // =============================================================================
35
+ // SECTION BUDGET RATIOS
36
+ // =============================================================================
37
+ /**
38
+ * Token budget allocation ratios per section.
39
+ * These sum to 1.0 and determine how the total tokenBudget is divided.
40
+ *
41
+ * Rationale:
42
+ * - invariants (0.28): Highest-priority constraints, injected first
43
+ * - activeBeliefs (0.30): Largest section, carries domain knowledge
44
+ * - openQuestions (0.17): Unresolved work items guide agent behavior
45
+ * - recentEvidence (0.17): Implementation context for grounding
46
+ * - contradictions (0.08): Tension signals, smallest section
47
+ */
48
+ export const SECTION_BUDGET_RATIOS = {
49
+ invariants: 0.28,
50
+ activeBeliefs: 0.3,
51
+ openQuestions: 0.17,
52
+ recentEvidence: 0.17,
53
+ contradictions: 0.08,
22
54
  };
23
- var MIN_TOKEN_BUDGET = 400;
24
- var MAX_TOKEN_BUDGET = 8e3;
25
- var DEFAULT_TOKEN_BUDGET = 1800;
26
- var DEFAULT_SECTION_LIMIT = 8;
27
- var MAX_SECTION_LIMIT = 25;
28
- var MIN_CONTRADICTION_BUDGET = 40;
29
- var RANKING_WEIGHTS = {
30
- invariants: {
31
- query: 0.35,
32
- recency: 0.1,
33
- confidence: 0.4,
34
- beliefType: 0.15
35
- },
36
- activeBeliefs: {
37
- query: 0.5,
38
- recency: 0.2,
39
- confidence: 0.2,
40
- beliefType: 0.1
41
- },
42
- openQuestions: {
43
- query: 0.55,
44
- recency: 0.2,
45
- priority: 0.25
46
- },
47
- recentEvidence: {
48
- query: 0.6,
49
- recency: 0.4
50
- },
51
- contradictions: {
52
- query: 0.4,
53
- recency: 0.2,
54
- severity: 0.4
55
- }
55
+ // =============================================================================
56
+ // TOKEN BUDGET CONSTRAINTS
57
+ // =============================================================================
58
+ /** Minimum allowed token budget. Below this, context packs lose utility. */
59
+ export const MIN_TOKEN_BUDGET = 400;
60
+ /** Maximum allowed token budget. Above this, context packs bloat prompts. */
61
+ export const MAX_TOKEN_BUDGET = 8000;
62
+ /** Default token budget when caller does not specify. */
63
+ export const DEFAULT_TOKEN_BUDGET = 1800;
64
+ /** Default max items per section. */
65
+ export const DEFAULT_SECTION_LIMIT = 8;
66
+ /** Hard ceiling on items per section. */
67
+ export const MAX_SECTION_LIMIT = 25;
68
+ /** Minimum contradiction section budget floor (tokens). */
69
+ export const MIN_CONTRADICTION_BUDGET = 40;
70
+ export const RANKING_WEIGHTS = {
71
+ invariants: {
72
+ query: 0.35,
73
+ recency: 0.1,
74
+ confidence: 0.4,
75
+ beliefType: 0.15,
76
+ },
77
+ activeBeliefs: {
78
+ query: 0.5,
79
+ recency: 0.2,
80
+ confidence: 0.2,
81
+ beliefType: 0.1,
82
+ },
83
+ openQuestions: {
84
+ query: 0.55,
85
+ recency: 0.2,
86
+ priority: 0.25,
87
+ },
88
+ recentEvidence: {
89
+ query: 0.6,
90
+ recency: 0.4,
91
+ },
92
+ contradictions: {
93
+ query: 0.4,
94
+ recency: 0.2,
95
+ severity: 0.4,
96
+ },
56
97
  };
57
- var RECENCY_HALF_LIFE_DAYS = 30;
58
- var ENTITY_RANKING_WEIGHTS = {
59
- query: 0.4,
60
- connectivity: 0.6
98
+ /** Recency decay half-life in days. After 30 days, recency score = 0.5. */
99
+ export const RECENCY_HALF_LIFE_DAYS = 30;
100
+ /**
101
+ * Ranking weight vector for the relatedEntities section.
102
+ * Entities are ranked by query relevance and connectivity (bridge edge count).
103
+ * Separate from RANKING_WEIGHTS because entities are not part of the
104
+ * token-budgeted injection plan.
105
+ */
106
+ export const ENTITY_RANKING_WEIGHTS = {
107
+ query: 0.4,
108
+ connectivity: 0.6,
61
109
  };
62
- var DEFAULT_ENTITY_LIMIT = 10;
63
- var MAX_ENTITY_LIMIT = 50;
64
- var BELIEF_TYPE_BONUS = {
65
- invariant: 1,
66
- tenet: 0.8,
67
- principle: 0.6
110
+ /** Default max entities to include in the context pack. */
111
+ export const DEFAULT_ENTITY_LIMIT = 10;
112
+ /** Hard ceiling on entities per context pack. */
113
+ export const MAX_ENTITY_LIMIT = 50;
114
+ // =============================================================================
115
+ // BELIEF TYPE BONUS MAP
116
+ // =============================================================================
117
+ /**
118
+ * Bonus multiplier for belief types in ranking.
119
+ * Invariants get 1.0, unknown types get 0.4.
120
+ */
121
+ export const BELIEF_TYPE_BONUS = {
122
+ invariant: 1.0,
123
+ tenet: 0.8,
124
+ principle: 0.6,
68
125
  };
69
- var DEFAULT_BELIEF_TYPE_BONUS = 0.4;
70
- var PRIORITY_SCORES = {
71
- critical: 1,
72
- high: 0.85,
73
- medium: 0.55,
74
- low: 0.35
126
+ export const DEFAULT_BELIEF_TYPE_BONUS = 0.4;
127
+ // =============================================================================
128
+ // PRIORITY / SEVERITY SCORE MAPS
129
+ // =============================================================================
130
+ export const PRIORITY_SCORES = {
131
+ critical: 1.0,
132
+ high: 0.85,
133
+ medium: 0.55,
134
+ low: 0.35,
75
135
  };
76
- var DEFAULT_PRIORITY_SCORE = 0.5;
77
- var SEVERITY_SCORES = {
78
- critical: 1,
79
- high: 0.85,
80
- medium: 0.6,
81
- low: 0.35
136
+ export const DEFAULT_PRIORITY_SCORE = 0.5;
137
+ export const SEVERITY_SCORES = {
138
+ critical: 1.0,
139
+ high: 0.85,
140
+ medium: 0.6,
141
+ low: 0.35,
82
142
  };
83
- var DEFAULT_SEVERITY_SCORE = 0.5;
84
- var RESOLVED_QUESTION_STATUSES = [
85
- "answered",
86
- "archived",
87
- "closed",
88
- "resolved",
89
- "resolved_support",
90
- "resolved_contra",
91
- "belief_forked"
143
+ export const DEFAULT_SEVERITY_SCORE = 0.5;
144
+ // =============================================================================
145
+ // RESOLVED QUESTION STATUSES
146
+ // =============================================================================
147
+ /**
148
+ * Question statuses that are considered "resolved" (not open).
149
+ * Used to filter which questions appear in the openQuestions section.
150
+ */
151
+ export const RESOLVED_QUESTION_STATUSES = [
152
+ "answered",
153
+ "archived",
154
+ "closed",
155
+ "resolved",
156
+ "resolved_support",
157
+ "resolved_contra",
158
+ "belief_forked",
92
159
  ];
93
- var TOKENS_PER_WORD = 1.35;
94
- var MIN_TOKEN_ESTIMATE = 8;
95
-
96
- export { BELIEF_TYPE_BONUS, CONTEXT_PACK_SCHEMA_VERSION, CONTEXT_PACK_SECTION_KEYS, CONTEXT_RANKING_PROFILES, DEFAULT_BELIEF_TYPE_BONUS, DEFAULT_COMPILATION_MODE, DEFAULT_ENTITY_LIMIT, DEFAULT_PRIORITY_SCORE, DEFAULT_RANKING_PROFILE, DEFAULT_SECTION_LIMIT, DEFAULT_SEVERITY_SCORE, DEFAULT_TOKEN_BUDGET, ENTITY_RANKING_WEIGHTS, MAX_ENTITY_LIMIT, MAX_SECTION_LIMIT, MAX_TOKEN_BUDGET, MIN_CONTRADICTION_BUDGET, MIN_TOKEN_BUDGET, MIN_TOKEN_ESTIMATE, PRIORITY_SCORES, RANKING_WEIGHTS, RECENCY_HALF_LIFE_DAYS, RESOLVED_QUESTION_STATUSES, SECTION_BUDGET_RATIOS, SEVERITY_SCORES, TOKENS_PER_WORD };
97
- //# sourceMappingURL=context-pack.contract.js.map
160
+ // =============================================================================
161
+ // TOKEN ESTIMATION
162
+ // =============================================================================
163
+ /**
164
+ * Tokens-per-word multiplier for rough token estimation.
165
+ * Conservative estimate: ~1.35 tokens per whitespace-delimited word.
166
+ */
167
+ export const TOKENS_PER_WORD = 1.35;
168
+ /** Minimum token estimate for any non-empty string. */
169
+ export const MIN_TOKEN_ESTIMATE = 8;
98
170
  //# sourceMappingURL=context-pack.contract.js.map
@@ -1 +1,2 @@
1
- export { BELIEF_TYPE_BONUS, BeliefLatticeSeed, CONTEXT_PACK_SCHEMA_VERSION, CONTEXT_PACK_SECTION_KEYS, CONTEXT_RANKING_PROFILES, ContextCompilationMode, ContextPackBelief, ContextPackContradiction, ContextPackDeltaReport, ContextPackDiagnostics, ContextPackEntity, ContextPackEvidence, ContextPackFailure, ContextPackFailureContext, ContextPackInjectionPolicy, ContextPackQuestion, ContextPackRequestV1, ContextPackSectionKey, ContextPackSummary, ContextPackV1, ContextRankingProfile, DEFAULT_BELIEF_TYPE_BONUS, DEFAULT_COMPILATION_MODE, DEFAULT_ENTITY_LIMIT, DEFAULT_PRIORITY_SCORE, DEFAULT_RANKING_PROFILE, DEFAULT_SECTION_LIMIT, DEFAULT_SEVERITY_SCORE, DEFAULT_TOKEN_BUDGET, ENTITY_RANKING_WEIGHTS, MAX_ENTITY_LIMIT, MAX_SECTION_LIMIT, MAX_TOKEN_BUDGET, MIN_CONTRADICTION_BUDGET, MIN_TOKEN_BUDGET, MIN_TOKEN_ESTIMATE, PRIORITY_SCORES, PackWeightOverride, PublicCompiledContext, PublicContextBelief, PublicContextContradiction, PublicContextEntity, PublicContextEvidence, PublicContextInjectionPolicy, PublicContextQuestion, RANKING_WEIGHTS, RECENCY_HALF_LIFE_DAYS, RESOLVED_QUESTION_STATUSES, RankingWeightVector, SECTION_BUDGET_RATIOS, SEVERITY_SCORES, TOKENS_PER_WORD, VerificationObligation } from './context-pack.contract.js';
1
+ export * from "./context-pack.contract";
2
+ //# sourceMappingURL=contextPack.d.ts.map