@promptev/context-engine 0.0.0 → 0.0.2

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 (60) hide show
  1. package/README.md +116 -5
  2. package/dist/cli.js +1896 -552
  3. package/dist/cli.js.map +1 -1
  4. package/dist/{config-Bl9U789m.d.cts → config-BODDdXJ7.d.ts} +75 -16
  5. package/dist/{config-Bt9bUQqU.d.ts → config-C5RZ00W6.d.cts} +75 -16
  6. package/dist/express.cjs +925 -151
  7. package/dist/express.cjs.map +1 -1
  8. package/dist/express.d.cts +11 -4
  9. package/dist/express.d.ts +11 -4
  10. package/dist/express.js +926 -152
  11. package/dist/express.js.map +1 -1
  12. package/dist/fastify.cjs +923 -151
  13. package/dist/fastify.cjs.map +1 -1
  14. package/dist/fastify.d.cts +8 -4
  15. package/dist/fastify.d.ts +8 -4
  16. package/dist/fastify.js +924 -152
  17. package/dist/fastify.js.map +1 -1
  18. package/dist/{governance-XIScatRO.d.ts → governance-BLPK7NMe.d.ts} +8 -2
  19. package/dist/{governance-BDkcv4qZ.d.cts → governance-P9pRb4Ol.d.cts} +8 -2
  20. package/dist/graph/index.cjs +171 -59
  21. package/dist/graph/index.cjs.map +1 -1
  22. package/dist/graph/index.d.cts +5 -3
  23. package/dist/graph/index.d.ts +5 -3
  24. package/dist/graph/index.js +171 -59
  25. package/dist/graph/index.js.map +1 -1
  26. package/dist/hono.cjs +923 -151
  27. package/dist/hono.cjs.map +1 -1
  28. package/dist/hono.d.cts +8 -4
  29. package/dist/hono.d.ts +8 -4
  30. package/dist/hono.js +924 -152
  31. package/dist/hono.js.map +1 -1
  32. package/dist/index.cjs +2413 -1052
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +125 -107
  35. package/dist/index.d.ts +125 -107
  36. package/dist/index.js +2412 -1050
  37. package/dist/index.js.map +1 -1
  38. package/dist/mcp.cjs +100 -14
  39. package/dist/mcp.cjs.map +1 -1
  40. package/dist/mcp.d.cts +5 -0
  41. package/dist/mcp.d.ts +5 -0
  42. package/dist/mcp.js +100 -14
  43. package/dist/mcp.js.map +1 -1
  44. package/dist/migrations/sql/0003_tools.sql +2 -0
  45. package/dist/migrations/sql/0004_acl_indexes.sql +23 -2
  46. package/dist/{redaction-BmDSWJ7h.d.cts → redaction-BqD_DEUQ.d.cts} +22 -1
  47. package/dist/{redaction-BmDSWJ7h.d.ts → redaction-BqD_DEUQ.d.ts} +22 -1
  48. package/dist/redaction-presidio.d.cts +1 -1
  49. package/dist/redaction-presidio.d.ts +1 -1
  50. package/dist/{router-CrxZ2y_Z.d.ts → router-CiFwC-EN.d.cts} +17 -2
  51. package/dist/{router-OPgSoYAB.d.cts → router-D8gBzwLd.d.ts} +17 -2
  52. package/dist/skills/context-engine/SKILL.md +5 -1
  53. package/dist/storage-CJrKgJeJ.d.ts +167 -0
  54. package/dist/storage-Dvpq2xAC.d.cts +167 -0
  55. package/package.json +61 -23
  56. package/src/migrations/sql/0003_tools.sql +2 -0
  57. package/src/migrations/sql/0004_acl_indexes.sql +23 -2
  58. package/src/skills/context-engine/SKILL.md +5 -1
  59. package/dist/embeddings-B-jZ42mk.d.cts +0 -67
  60. package/dist/embeddings-DaSdAZN3.d.ts +0 -67
@@ -1,40 +1,52 @@
1
1
  import { z } from 'zod';
2
- import { R as RedactionPolicy, b as RedactionRuleInit } from './redaction-BmDSWJ7h.cjs';
2
+ import { R as RedactionPolicy, b as RedactionRuleInit } from './redaction-BqD_DEUQ.js';
3
3
 
4
4
  declare const embeddingSchema: z.ZodObject<{
5
- provider: z.ZodEnum<["openai", "azure_openai", "gemini", "voyage", "cohere", "custom"]>;
5
+ provider: z.ZodEnum<["openai", "azure_openai", "gemini", "vertex_ai", "voyage", "cohere", "custom"]>;
6
6
  model: z.ZodString;
7
7
  dim: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
8
8
  apiKey: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
9
9
  baseUrl: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
10
+ project: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
12
  }, "strip", z.ZodTypeAny, {
11
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "voyage" | "cohere";
13
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "voyage" | "cohere";
12
14
  model: string;
13
15
  dim: number | null;
14
16
  apiKey: string | null;
15
17
  baseUrl: string | null;
18
+ project?: string | null | undefined;
19
+ location?: string | null | undefined;
16
20
  }, {
17
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "voyage" | "cohere";
21
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "voyage" | "cohere";
18
22
  model: string;
19
23
  dim?: number | null | undefined;
20
24
  apiKey?: string | null | undefined;
21
25
  baseUrl?: string | null | undefined;
26
+ project?: string | null | undefined;
27
+ location?: string | null | undefined;
22
28
  }>;
23
29
  declare const llmSchema: z.ZodObject<{
24
- provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "bedrock", "custom"]>;
30
+ provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "vertex_ai", "bedrock", "custom"]>;
25
31
  model: z.ZodString;
26
32
  apiKey: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
27
33
  baseUrl: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
34
+ project: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
36
  }, "strip", z.ZodTypeAny, {
29
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
37
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
30
38
  model: string;
31
39
  apiKey: string | null;
32
40
  baseUrl: string | null;
41
+ project?: string | null | undefined;
42
+ location?: string | null | undefined;
33
43
  }, {
34
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
44
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
35
45
  model: string;
36
46
  apiKey?: string | null | undefined;
37
47
  baseUrl?: string | null | undefined;
48
+ project?: string | null | undefined;
49
+ location?: string | null | undefined;
38
50
  }>;
39
51
  declare const graphSchema: z.ZodObject<{
40
52
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -43,20 +55,26 @@ declare const graphSchema: z.ZodObject<{
43
55
  neo4jPassword: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
44
56
  neo4jDatabase: z.ZodDefault<z.ZodString>;
45
57
  extractionLlm: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
46
- provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "bedrock", "custom"]>;
58
+ provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "vertex_ai", "bedrock", "custom"]>;
47
59
  model: z.ZodString;
48
60
  apiKey: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
49
61
  baseUrl: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
62
+ project: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
64
  }, "strip", z.ZodTypeAny, {
51
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
65
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
52
66
  model: string;
53
67
  apiKey: string | null;
54
68
  baseUrl: string | null;
69
+ project?: string | null | undefined;
70
+ location?: string | null | undefined;
55
71
  }, {
56
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
72
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
57
73
  model: string;
58
74
  apiKey?: string | null | undefined;
59
75
  baseUrl?: string | null | undefined;
76
+ project?: string | null | undefined;
77
+ location?: string | null | undefined;
60
78
  }>>>>;
61
79
  }, "strip", z.ZodTypeAny, {
62
80
  enabled: boolean;
@@ -65,10 +83,12 @@ declare const graphSchema: z.ZodObject<{
65
83
  neo4jPassword: string | null;
66
84
  neo4jDatabase: string;
67
85
  extractionLlm: {
68
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
86
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
69
87
  model: string;
70
88
  apiKey: string | null;
71
89
  baseUrl: string | null;
90
+ project?: string | null | undefined;
91
+ location?: string | null | undefined;
72
92
  } | null;
73
93
  }, {
74
94
  enabled?: boolean | undefined;
@@ -77,10 +97,12 @@ declare const graphSchema: z.ZodObject<{
77
97
  neo4jPassword?: string | null | undefined;
78
98
  neo4jDatabase?: string | undefined;
79
99
  extractionLlm?: {
80
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
100
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
81
101
  model: string;
82
102
  apiKey?: string | null | undefined;
83
103
  baseUrl?: string | null | undefined;
104
+ project?: string | null | undefined;
105
+ location?: string | null | undefined;
84
106
  } | null | undefined;
85
107
  }>;
86
108
  declare const rerankerSchema: z.ZodObject<{
@@ -121,12 +143,37 @@ declare const fusionSchema: z.ZodObject<{
121
143
  declare const storageSchema: z.ZodObject<{
122
144
  backend: z.ZodDefault<z.ZodLiteral<"postgres">>;
123
145
  annExactThreshold: z.ZodDefault<z.ZodNumber>;
146
+ poolMax: z.ZodDefault<z.ZodNumber>;
147
+ poolIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
148
+ poolConnectionTimeoutMs: z.ZodDefault<z.ZodNumber>;
124
149
  }, "strip", z.ZodTypeAny, {
125
150
  backend: "postgres";
126
151
  annExactThreshold: number;
152
+ poolMax: number;
153
+ poolIdleTimeoutMs: number;
154
+ poolConnectionTimeoutMs: number;
127
155
  }, {
128
156
  backend?: "postgres" | undefined;
129
157
  annExactThreshold?: number | undefined;
158
+ poolMax?: number | undefined;
159
+ poolIdleTimeoutMs?: number | undefined;
160
+ poolConnectionTimeoutMs?: number | undefined;
161
+ }>;
162
+ declare const extractionSchema: z.ZodObject<{
163
+ maxRenderPx: z.ZodDefault<z.ZodNumber>;
164
+ visionMaxOutputTokens: z.ZodDefault<z.ZodNumber>;
165
+ pagesPerVisionBatch: z.ZodDefault<z.ZodNumber>;
166
+ ocrLanguage: z.ZodDefault<z.ZodNullable<z.ZodString>>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ maxRenderPx: number;
169
+ visionMaxOutputTokens: number;
170
+ pagesPerVisionBatch: number;
171
+ ocrLanguage: string | null;
172
+ }, {
173
+ maxRenderPx?: number | undefined;
174
+ visionMaxOutputTokens?: number | undefined;
175
+ pagesPerVisionBatch?: number | undefined;
176
+ ocrLanguage?: string | null | undefined;
130
177
  }>;
131
178
  type EmbeddingConfig = z.infer<typeof embeddingSchema>;
132
179
  type LLMConfig = z.infer<typeof llmSchema>;
@@ -134,18 +181,23 @@ type GraphConfig = z.infer<typeof graphSchema>;
134
181
  type RerankerConfig = z.infer<typeof rerankerSchema>;
135
182
  type FusionConfig = z.infer<typeof fusionSchema>;
136
183
  type StorageConfig = z.infer<typeof storageSchema>;
184
+ type ExtractionConfig = z.infer<typeof extractionSchema>;
185
+ type EmbeddingConfigInit = z.input<typeof embeddingSchema>;
186
+ type LLMConfigInit = z.input<typeof llmSchema>;
137
187
  interface ContextEngineConfigInit {
138
188
  databaseUrl: string;
139
189
  storage?: Partial<StorageConfig>;
140
190
  defaultMode?: "hybrid" | "graph";
141
- embedding: EmbeddingConfig;
142
- llm?: LLMConfig | null;
143
- visionLlm?: LLMConfig | null;
191
+ embedding: EmbeddingConfigInit;
192
+ llm?: LLMConfigInit | null;
193
+ visionLlm?: LLMConfigInit | null;
144
194
  graph?: Partial<GraphConfig>;
145
195
  reranker?: Partial<RerankerConfig>;
146
196
  fusion?: Partial<FusionConfig>;
197
+ extraction?: Partial<ExtractionConfig>;
147
198
  enableCodeExecution?: boolean;
148
199
  secretKey?: string | null;
200
+ allowPrivateEgress?: boolean;
149
201
  redaction?: RedactionPolicy | {
150
202
  rules?: RedactionRuleInit[];
151
203
  customDetectors?: RedactionPolicy["customDetectors"];
@@ -161,8 +213,15 @@ declare class ContextEngineConfig {
161
213
  graph: GraphConfig;
162
214
  reranker: RerankerConfig;
163
215
  fusion: FusionConfig;
216
+ extraction: ExtractionConfig;
164
217
  enableCodeExecution: boolean;
165
218
  secretKey: string | null;
219
+ /**
220
+ * Lets http tools and probes reach loopback/private/link-local/metadata
221
+ * addresses. Off by default — an http tool is registered by a caller, and a
222
+ * private destination is server-side request forgery. See `tools/egress.ts`.
223
+ */
224
+ allowPrivateEgress: boolean;
166
225
  redaction: RedactionPolicy;
167
226
  constructor(init: ContextEngineConfigInit);
168
227
  private validate;
@@ -171,4 +230,4 @@ declare class ContextEngineConfig {
171
230
  }): ContextEngineConfig;
172
231
  }
173
232
 
174
- export { ContextEngineConfig as C, type EmbeddingConfig as E, type FusionConfig as F, type GraphConfig as G, type LLMConfig as L, type RerankerConfig as R, type StorageConfig as S, type ContextEngineConfigInit as a };
233
+ export { ContextEngineConfig as C, type ExtractionConfig as E, type FusionConfig as F, type GraphConfig as G, type LLMConfig as L, type RerankerConfig as R, type StorageConfig as S, type ContextEngineConfigInit as a, type EmbeddingConfig as b };
@@ -1,40 +1,52 @@
1
1
  import { z } from 'zod';
2
- import { R as RedactionPolicy, b as RedactionRuleInit } from './redaction-BmDSWJ7h.js';
2
+ import { R as RedactionPolicy, b as RedactionRuleInit } from './redaction-BqD_DEUQ.cjs';
3
3
 
4
4
  declare const embeddingSchema: z.ZodObject<{
5
- provider: z.ZodEnum<["openai", "azure_openai", "gemini", "voyage", "cohere", "custom"]>;
5
+ provider: z.ZodEnum<["openai", "azure_openai", "gemini", "vertex_ai", "voyage", "cohere", "custom"]>;
6
6
  model: z.ZodString;
7
7
  dim: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
8
8
  apiKey: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
9
9
  baseUrl: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
10
+ project: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
12
  }, "strip", z.ZodTypeAny, {
11
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "voyage" | "cohere";
13
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "voyage" | "cohere";
12
14
  model: string;
13
15
  dim: number | null;
14
16
  apiKey: string | null;
15
17
  baseUrl: string | null;
18
+ project?: string | null | undefined;
19
+ location?: string | null | undefined;
16
20
  }, {
17
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "voyage" | "cohere";
21
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "voyage" | "cohere";
18
22
  model: string;
19
23
  dim?: number | null | undefined;
20
24
  apiKey?: string | null | undefined;
21
25
  baseUrl?: string | null | undefined;
26
+ project?: string | null | undefined;
27
+ location?: string | null | undefined;
22
28
  }>;
23
29
  declare const llmSchema: z.ZodObject<{
24
- provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "bedrock", "custom"]>;
30
+ provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "vertex_ai", "bedrock", "custom"]>;
25
31
  model: z.ZodString;
26
32
  apiKey: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
27
33
  baseUrl: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
34
+ project: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
36
  }, "strip", z.ZodTypeAny, {
29
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
37
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
30
38
  model: string;
31
39
  apiKey: string | null;
32
40
  baseUrl: string | null;
41
+ project?: string | null | undefined;
42
+ location?: string | null | undefined;
33
43
  }, {
34
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
44
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
35
45
  model: string;
36
46
  apiKey?: string | null | undefined;
37
47
  baseUrl?: string | null | undefined;
48
+ project?: string | null | undefined;
49
+ location?: string | null | undefined;
38
50
  }>;
39
51
  declare const graphSchema: z.ZodObject<{
40
52
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -43,20 +55,26 @@ declare const graphSchema: z.ZodObject<{
43
55
  neo4jPassword: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
44
56
  neo4jDatabase: z.ZodDefault<z.ZodString>;
45
57
  extractionLlm: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
46
- provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "bedrock", "custom"]>;
58
+ provider: z.ZodEnum<["anthropic", "openai", "azure_openai", "gemini", "vertex_ai", "bedrock", "custom"]>;
47
59
  model: z.ZodString;
48
60
  apiKey: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
49
61
  baseUrl: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
62
+ project: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
64
  }, "strip", z.ZodTypeAny, {
51
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
65
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
52
66
  model: string;
53
67
  apiKey: string | null;
54
68
  baseUrl: string | null;
69
+ project?: string | null | undefined;
70
+ location?: string | null | undefined;
55
71
  }, {
56
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
72
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
57
73
  model: string;
58
74
  apiKey?: string | null | undefined;
59
75
  baseUrl?: string | null | undefined;
76
+ project?: string | null | undefined;
77
+ location?: string | null | undefined;
60
78
  }>>>>;
61
79
  }, "strip", z.ZodTypeAny, {
62
80
  enabled: boolean;
@@ -65,10 +83,12 @@ declare const graphSchema: z.ZodObject<{
65
83
  neo4jPassword: string | null;
66
84
  neo4jDatabase: string;
67
85
  extractionLlm: {
68
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
86
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
69
87
  model: string;
70
88
  apiKey: string | null;
71
89
  baseUrl: string | null;
90
+ project?: string | null | undefined;
91
+ location?: string | null | undefined;
72
92
  } | null;
73
93
  }, {
74
94
  enabled?: boolean | undefined;
@@ -77,10 +97,12 @@ declare const graphSchema: z.ZodObject<{
77
97
  neo4jPassword?: string | null | undefined;
78
98
  neo4jDatabase?: string | undefined;
79
99
  extractionLlm?: {
80
- provider: "custom" | "openai" | "azure_openai" | "gemini" | "anthropic" | "bedrock";
100
+ provider: "custom" | "openai" | "azure_openai" | "gemini" | "vertex_ai" | "anthropic" | "bedrock";
81
101
  model: string;
82
102
  apiKey?: string | null | undefined;
83
103
  baseUrl?: string | null | undefined;
104
+ project?: string | null | undefined;
105
+ location?: string | null | undefined;
84
106
  } | null | undefined;
85
107
  }>;
86
108
  declare const rerankerSchema: z.ZodObject<{
@@ -121,12 +143,37 @@ declare const fusionSchema: z.ZodObject<{
121
143
  declare const storageSchema: z.ZodObject<{
122
144
  backend: z.ZodDefault<z.ZodLiteral<"postgres">>;
123
145
  annExactThreshold: z.ZodDefault<z.ZodNumber>;
146
+ poolMax: z.ZodDefault<z.ZodNumber>;
147
+ poolIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
148
+ poolConnectionTimeoutMs: z.ZodDefault<z.ZodNumber>;
124
149
  }, "strip", z.ZodTypeAny, {
125
150
  backend: "postgres";
126
151
  annExactThreshold: number;
152
+ poolMax: number;
153
+ poolIdleTimeoutMs: number;
154
+ poolConnectionTimeoutMs: number;
127
155
  }, {
128
156
  backend?: "postgres" | undefined;
129
157
  annExactThreshold?: number | undefined;
158
+ poolMax?: number | undefined;
159
+ poolIdleTimeoutMs?: number | undefined;
160
+ poolConnectionTimeoutMs?: number | undefined;
161
+ }>;
162
+ declare const extractionSchema: z.ZodObject<{
163
+ maxRenderPx: z.ZodDefault<z.ZodNumber>;
164
+ visionMaxOutputTokens: z.ZodDefault<z.ZodNumber>;
165
+ pagesPerVisionBatch: z.ZodDefault<z.ZodNumber>;
166
+ ocrLanguage: z.ZodDefault<z.ZodNullable<z.ZodString>>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ maxRenderPx: number;
169
+ visionMaxOutputTokens: number;
170
+ pagesPerVisionBatch: number;
171
+ ocrLanguage: string | null;
172
+ }, {
173
+ maxRenderPx?: number | undefined;
174
+ visionMaxOutputTokens?: number | undefined;
175
+ pagesPerVisionBatch?: number | undefined;
176
+ ocrLanguage?: string | null | undefined;
130
177
  }>;
131
178
  type EmbeddingConfig = z.infer<typeof embeddingSchema>;
132
179
  type LLMConfig = z.infer<typeof llmSchema>;
@@ -134,18 +181,23 @@ type GraphConfig = z.infer<typeof graphSchema>;
134
181
  type RerankerConfig = z.infer<typeof rerankerSchema>;
135
182
  type FusionConfig = z.infer<typeof fusionSchema>;
136
183
  type StorageConfig = z.infer<typeof storageSchema>;
184
+ type ExtractionConfig = z.infer<typeof extractionSchema>;
185
+ type EmbeddingConfigInit = z.input<typeof embeddingSchema>;
186
+ type LLMConfigInit = z.input<typeof llmSchema>;
137
187
  interface ContextEngineConfigInit {
138
188
  databaseUrl: string;
139
189
  storage?: Partial<StorageConfig>;
140
190
  defaultMode?: "hybrid" | "graph";
141
- embedding: EmbeddingConfig;
142
- llm?: LLMConfig | null;
143
- visionLlm?: LLMConfig | null;
191
+ embedding: EmbeddingConfigInit;
192
+ llm?: LLMConfigInit | null;
193
+ visionLlm?: LLMConfigInit | null;
144
194
  graph?: Partial<GraphConfig>;
145
195
  reranker?: Partial<RerankerConfig>;
146
196
  fusion?: Partial<FusionConfig>;
197
+ extraction?: Partial<ExtractionConfig>;
147
198
  enableCodeExecution?: boolean;
148
199
  secretKey?: string | null;
200
+ allowPrivateEgress?: boolean;
149
201
  redaction?: RedactionPolicy | {
150
202
  rules?: RedactionRuleInit[];
151
203
  customDetectors?: RedactionPolicy["customDetectors"];
@@ -161,8 +213,15 @@ declare class ContextEngineConfig {
161
213
  graph: GraphConfig;
162
214
  reranker: RerankerConfig;
163
215
  fusion: FusionConfig;
216
+ extraction: ExtractionConfig;
164
217
  enableCodeExecution: boolean;
165
218
  secretKey: string | null;
219
+ /**
220
+ * Lets http tools and probes reach loopback/private/link-local/metadata
221
+ * addresses. Off by default — an http tool is registered by a caller, and a
222
+ * private destination is server-side request forgery. See `tools/egress.ts`.
223
+ */
224
+ allowPrivateEgress: boolean;
166
225
  redaction: RedactionPolicy;
167
226
  constructor(init: ContextEngineConfigInit);
168
227
  private validate;
@@ -171,4 +230,4 @@ declare class ContextEngineConfig {
171
230
  }): ContextEngineConfig;
172
231
  }
173
232
 
174
- export { ContextEngineConfig as C, type EmbeddingConfig as E, type FusionConfig as F, type GraphConfig as G, type LLMConfig as L, type RerankerConfig as R, type StorageConfig as S, type ContextEngineConfigInit as a };
233
+ export { ContextEngineConfig as C, type ExtractionConfig as E, type FusionConfig as F, type GraphConfig as G, type LLMConfig as L, type RerankerConfig as R, type StorageConfig as S, type ContextEngineConfigInit as a, type EmbeddingConfig as b };