@iskra-bun/core 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -15,16 +15,39 @@ interface Plugin {
15
15
  name: string;
16
16
  install(app: App): Promise<void> | void;
17
17
  }
18
- interface Context<T = any> {
18
+ /** What an `app.on()` handler receives; `payload` is the emitted value. */
19
+ interface Context<T = unknown> {
19
20
  app: App;
20
21
  logger: Logger$1;
21
22
  payload: T;
22
- reply(data: any): void;
23
+ /** Emits `<event>:reply` with `data`. */
24
+ reply(data: unknown): void;
25
+ }
26
+ /**
27
+ * What each kit shares through `app.context`, by key, so `app.context.get('db')`
28
+ * is typed. Kits add their keys with declaration merging, and so can an app:
29
+ *
30
+ * ```ts
31
+ * declare module '@iskra-bun/core' {
32
+ * interface AppContextRegistry {
33
+ * bridge: DesktopBridge;
34
+ * }
35
+ * }
36
+ * ```
37
+ */
38
+ interface AppContextRegistry {
39
+ }
40
+ /**
41
+ * The payload of each app event, by name, so `app.on('process:exit', ...)`
42
+ * and `app.emit(...)` are typed. Kits add their events with declaration
43
+ * merging, and so can an app (as with AppContextRegistry).
44
+ */
45
+ interface AppEvents {
23
46
  }
24
47
  interface OtelConfig {
25
48
  /** Defaults to true when otel config is present */
26
49
  enabled?: boolean;
27
- /** OTLP endpoint URL. Defaults to http://localhost:4318 */
50
+ /** OTLP endpoint URL. Defaults to http://localhost:4318; use https:// for a collector on another host. */
28
51
  endpoint?: string;
29
52
  /** Overrides app name for the service.name resource attribute */
30
53
  serviceName?: string;
@@ -36,9 +59,16 @@ interface OtelConfig {
36
59
  metricIntervalMs?: number;
37
60
  /** Additional resource attributes */
38
61
  resourceAttributes?: Record<string, string>;
39
- /** Auto-instrumentation overrides (passed to getNodeAutoInstrumentations) */
62
+ /**
63
+ * Options of each auto-instrumentation, by package name, passed to
64
+ * getNodeAutoInstrumentations(): `{ enabled: false }`, or its own options
65
+ * (`'@opentelemetry/instrumentation-http': { ignoreIncomingRequestHook,
66
+ * redactedQueryParams }`). The HTTP one redacts SECRET_QUERY_PARAMS in
67
+ * exported URLs unless `redactedQueryParams` says otherwise.
68
+ */
40
69
  instrumentations?: Record<string, {
41
70
  enabled?: boolean;
71
+ [option: string]: unknown;
42
72
  }>;
43
73
  }
44
74
  interface AppConfig {
@@ -48,6 +78,13 @@ interface AppConfig {
48
78
  level?: string;
49
79
  };
50
80
  otel?: OtelConfig;
81
+ /**
82
+ * Signals that trigger a graceful `stop()` and exit. Default
83
+ * `['SIGTERM', 'SIGINT']` (none under NODE_ENV=test); `false` disables.
84
+ */
85
+ shutdownSignals?: string[] | false;
86
+ /** Max time for a signal-triggered stop before forcing exit(1). Default 10000. */
87
+ shutdownTimeoutMs?: number;
51
88
  processes?: Record<string, ProcessConfig>;
52
89
  socket?: {
53
90
  enabled: boolean;
@@ -55,15 +92,17 @@ interface AppConfig {
55
92
  adapter?: 'bun' | 'socket.io';
56
93
  };
57
94
  kv?: {
58
- driver: 'memory' | 'redis' | 'libsql';
59
- connection?: any;
95
+ driver: 'memory' | 'redis';
96
+ /** Redis: a URL string, ioredis options, or ioredis options with `url`. */
97
+ connection?: string | Record<string, unknown>;
60
98
  };
61
99
  db?: {
62
100
  driver: 'postgres' | 'mysql' | 'sqlite' | 'libsql';
63
101
  url: string;
64
102
  authToken?: string;
65
103
  };
66
- [key: string]: any;
104
+ /** Sections of other kits or of the app; read them with their own type. */
105
+ [key: string]: unknown;
67
106
  }
68
107
  interface RestartBackoffConfig {
69
108
  /** Initial delay in ms before the first restart. Default: 1000 */
@@ -80,25 +119,95 @@ interface ProcessConfig {
80
119
  restartOnCrash?: boolean;
81
120
  maxRestarts?: number;
82
121
  restartCooldown?: number;
122
+ /** Variables set for the child, over the ones it inherits (see `inheritEnv`). */
83
123
  env?: Record<string, string>;
124
+ /**
125
+ * Which of the app's environment variables the child inherits. Default
126
+ * `false`: a minimal set without secrets (PATH, HOME, locale, TZ, temp
127
+ * dir, NODE_ENV…). A list adds those names to it; `true` passes them all
128
+ * (DATABASE_URL, AUTH_SECRET, cloud keys…).
129
+ */
130
+ inheritEnv?: boolean | string[];
131
+ /**
132
+ * `stdio` mode: bytes `send()` lets wait for a child that is not reading
133
+ * its stdin; past this it refuses messages (returns false). Default 8 MiB.
134
+ */
135
+ maxPendingStdinBytes?: number;
84
136
  /** Exponential backoff settings for restarts. Defaults to 1000 ms flat (no backoff). */
85
137
  restartBackoff?: RestartBackoffConfig;
86
138
  }
87
139
 
140
+ /**
141
+ * `app.context`: a Map whose keys in AppContextRegistry (`'db'`, `'kv'`, …)
142
+ * are typed; any other key holds `unknown`, or the type given as `T`.
143
+ */
144
+ declare class AppContext extends Map<string, unknown> {
145
+ get<K extends keyof AppContextRegistry>(key: K): AppContextRegistry[K] | undefined;
146
+ get<T = unknown>(key: string): T | undefined;
147
+ set<K extends keyof AppContextRegistry>(key: K, value: AppContextRegistry[K]): this;
148
+ set(key: string, value: unknown): this;
149
+ }
88
150
  declare class App {
89
151
  config: AppConfig;
90
152
  logger: Logger;
91
- events: Emitter<any>;
153
+ events: Emitter<Record<string, unknown>>;
92
154
  private drivers;
93
- context: Map<string, any>;
155
+ /** Drivers whose start() succeeded, in start order; null until start() runs. */
156
+ private startedDrivers;
157
+ private pendingInstalls;
158
+ /** The shutdown in progress, shared by concurrent stop() calls. */
159
+ private stopping;
160
+ private signalHandler?;
161
+ private signals;
162
+ context: AppContext;
94
163
  constructor(config?: AppConfig);
95
164
  init(): Promise<void>;
96
165
  register(driver: Driver): this;
97
166
  use(plugin: Plugin): this;
98
- on(event: string, handler: (ctx: Context) => Promise<void> | void): this;
99
- emit(event: string, payload: any): void;
167
+ /**
168
+ * Runs `handler` for every `event`. Events in AppEvents give the handler a
169
+ * typed payload; for others it is `unknown`, or the type given as `T`.
170
+ */
171
+ on<K extends keyof AppEvents>(event: K, handler: (ctx: Context<AppEvents[K]>) => Promise<void> | void): this;
172
+ on<T = unknown>(event: string, handler: (ctx: Context<T>) => Promise<void> | void): this;
173
+ /** Emits `event`; for events in AppEvents the payload must match their type. */
174
+ emit<K extends keyof AppEvents>(event: K, payload: AppEvents[K]): void;
175
+ emit(event: string, payload?: unknown): void;
176
+ /**
177
+ * Starts drivers one at a time, in registration order, so a driver can rely
178
+ * on the ones registered before it (e.g. the DB before the web server). If
179
+ * one fails, every driver is stopped in reverse order (all were initialized
180
+ * and may hold connections, including the failing one), OpenTelemetry is
181
+ * shut down and the error is rethrown, instead of leaving ports bound and
182
+ * children running.
183
+ */
100
184
  start(): Promise<void>;
185
+ /**
186
+ * Stops drivers in reverse start order (the web server before the DB it
187
+ * uses), continuing past failures, and always flushes OpenTelemetry.
188
+ *
189
+ * A call made while a stop is in progress (e.g. an app's own signal
190
+ * handler next to the App's) gets that same stop: it resolves only once
191
+ * every driver has stopped, instead of right away with nothing left to do.
192
+ */
101
193
  stop(): Promise<void>;
194
+ private stopOnce;
195
+ /**
196
+ * Stops `drivers` after a failed init() or start() and shuts down
197
+ * OpenTelemetry. Failures to stop are logged, not thrown: the caller
198
+ * rethrows the original error. A later stop() stops nothing more.
199
+ */
200
+ private rollback;
201
+ private stopDrivers;
202
+ /**
203
+ * Stops the app gracefully on SIGTERM/SIGINT (configurable with
204
+ * `shutdownSignals`, off by default under NODE_ENV=test). Once a listener
205
+ * exists the runtime no longer exits on its own, so the handler exits with
206
+ * 0 after a clean stop, or 1 on failure / after `shutdownTimeoutMs`. A
207
+ * second signal forces exit.
208
+ */
209
+ private installSignalHandlers;
210
+ private removeSignalHandlers;
102
211
  }
103
212
 
104
213
  declare const ErrorCodes: {
@@ -197,6 +306,47 @@ declare class LifecycleError extends IskraError {
197
306
  * actionable error instead of an unhandled module-resolution failure.
198
307
  */
199
308
 
309
+ /** `@opentelemetry/resources`: 2.x exports resourceFromAttributes(), 1.x the Resource class. */
310
+ interface OtelResourcesModule {
311
+ resourceFromAttributes?: (attributes: Record<string, string>) => unknown;
312
+ Resource?: new (attributes: Record<string, string>) => unknown;
313
+ }
314
+ /**
315
+ * Query parameters whose values are exported as REDACTED in span URLs (see
316
+ * redactUrl). Names are compared without case, `-` or `_`.
317
+ */
318
+ declare const SECRET_QUERY_PARAMS: readonly string[];
319
+ /**
320
+ * `url` (absolute, or a path) with the value of each query parameter named in
321
+ * `params` replaced by REDACTED, the rest kept as it was. Telemetry exported
322
+ * URLs as they were requested: `?api_key=`, `?access_token=`, a presigned
323
+ * URL's signature.
324
+ */
325
+ declare function redactUrl(url: string, params?: readonly string[]): string;
326
+ /**
327
+ * The options initOtel() passes to getNodeAutoInstrumentations(): the app's
328
+ * `instrumentations` over Iskra's defaults. The HTTP instrumentation redacts
329
+ * SECRET_QUERY_PARAMS unless `redactedQueryParams` / `redactedQueryParamsServer`
330
+ * are set (instrumentation-http 0.204 / 0.222 and later apply them itself;
331
+ * for older releases a requestHook rewrites the span's URL attributes, before
332
+ * the app's own requestHook runs).
333
+ */
334
+ declare function autoInstrumentationOptions(config: OtelConfig): Record<string, unknown>;
335
+ /**
336
+ * The OTLP endpoint as it is safe to log, its origin (the path, query or
337
+ * userinfo can carry an API key), and whether spans travel to it in clear
338
+ * text beyond this machine and its private network.
339
+ */
340
+ declare function describeOtelEndpoint(config: OtelConfig): {
341
+ origin: string;
342
+ plaintext: boolean;
343
+ };
344
+ /**
345
+ * Builds a Resource with whichever API the installed `@opentelemetry/resources`
346
+ * provides: 2.x only exports `resourceFromAttributes()` (`Resource` is a type
347
+ * there, so `new Resource()` throws), 1.x exports the `Resource` class.
348
+ */
349
+ declare function createResource(resources: OtelResourcesModule, attributes: Record<string, string>): unknown;
200
350
  /**
201
351
  * Initialize the OpenTelemetry NodeSDK with OTLP exporters.
202
352
  * Must be called before any drivers start so auto-instrumentation can patch libraries.
@@ -207,6 +357,22 @@ declare function initOtel(config: OtelConfig, appName: string): Promise<void>;
207
357
  */
208
358
  declare function shutdownOtel(): Promise<void>;
209
359
 
360
+ /** `NODE_ENV` as the process runs with it, or undefined when unset or empty. */
361
+ declare function nodeEnv(): string | undefined;
362
+ /**
363
+ * Whether development conveniences apply (pretty logs, http auth URLs, sample
364
+ * secrets, `disableCSRFCheck`): only with `NODE_ENV` set to `development` or
365
+ * `test`.
366
+ */
367
+ declare function isDevelopmentEnv(env?: string | undefined): boolean;
368
+ /**
369
+ * Whether production safeguards apply: in every environment but `development`
370
+ * and `test`, including an unset NODE_ENV and names like `staging`. They used
371
+ * to apply only to NODE_ENV=production exactly, so a deploy that forgot it
372
+ * sent non-Secure cookies and accepted placeholder secrets.
373
+ */
374
+ declare function isProductionEnv(env?: string | undefined): boolean;
375
+
210
376
  declare function loadAppConfig(cwd?: string): Promise<AppConfig>;
211
377
 
212
378
  declare const AppConfigSchema: z.ZodObject<{
@@ -214,11 +380,11 @@ declare const AppConfigSchema: z.ZodObject<{
214
380
  debug: z.ZodDefault<z.ZodBoolean>;
215
381
  logger: z.ZodDefault<z.ZodObject<{
216
382
  level: z.ZodDefault<z.ZodString>;
217
- }, "strip", z.ZodTypeAny, {
218
- level: string;
219
- }, {
220
- level?: string | undefined;
221
- }>>;
383
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
384
+ level: z.ZodDefault<z.ZodString>;
385
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
386
+ level: z.ZodDefault<z.ZodString>;
387
+ }, z.ZodTypeAny, "passthrough">>>;
222
388
  otel: z.ZodOptional<z.ZodObject<{
223
389
  enabled: z.ZodDefault<z.ZodBoolean>;
224
390
  endpoint: z.ZodDefault<z.ZodString>;
@@ -229,105 +395,480 @@ declare const AppConfigSchema: z.ZodObject<{
229
395
  resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
230
396
  instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
231
397
  enabled: z.ZodOptional<z.ZodBoolean>;
398
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
399
+ enabled: z.ZodOptional<z.ZodBoolean>;
400
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
401
+ enabled: z.ZodOptional<z.ZodBoolean>;
402
+ }, z.ZodTypeAny, "passthrough">>>>;
403
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
404
+ enabled: z.ZodDefault<z.ZodBoolean>;
405
+ endpoint: z.ZodDefault<z.ZodString>;
406
+ serviceName: z.ZodOptional<z.ZodString>;
407
+ serviceVersion: z.ZodDefault<z.ZodString>;
408
+ environment: z.ZodOptional<z.ZodString>;
409
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
410
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
411
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
412
+ enabled: z.ZodOptional<z.ZodBoolean>;
413
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
414
+ enabled: z.ZodOptional<z.ZodBoolean>;
415
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
416
+ enabled: z.ZodOptional<z.ZodBoolean>;
417
+ }, z.ZodTypeAny, "passthrough">>>>;
418
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
419
+ enabled: z.ZodDefault<z.ZodBoolean>;
420
+ endpoint: z.ZodDefault<z.ZodString>;
421
+ serviceName: z.ZodOptional<z.ZodString>;
422
+ serviceVersion: z.ZodDefault<z.ZodString>;
423
+ environment: z.ZodOptional<z.ZodString>;
424
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
425
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
426
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
427
+ enabled: z.ZodOptional<z.ZodBoolean>;
428
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
429
+ enabled: z.ZodOptional<z.ZodBoolean>;
430
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
431
+ enabled: z.ZodOptional<z.ZodBoolean>;
432
+ }, z.ZodTypeAny, "passthrough">>>>;
433
+ }, z.ZodTypeAny, "passthrough">>>;
434
+ shutdownSignals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<false>]>>;
435
+ shutdownTimeoutMs: z.ZodOptional<z.ZodNumber>;
436
+ processes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
437
+ command: z.ZodString;
438
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
439
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
440
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
441
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
442
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
443
+ restartBackoff: z.ZodOptional<z.ZodObject<{
444
+ initialMs: z.ZodOptional<z.ZodNumber>;
445
+ maxMs: z.ZodOptional<z.ZodNumber>;
446
+ factor: z.ZodOptional<z.ZodNumber>;
232
447
  }, "strip", z.ZodTypeAny, {
233
- enabled?: boolean | undefined;
448
+ initialMs?: number | undefined;
449
+ maxMs?: number | undefined;
450
+ factor?: number | undefined;
234
451
  }, {
235
- enabled?: boolean | undefined;
236
- }>>>;
237
- }, "strip", z.ZodTypeAny, {
238
- enabled: boolean;
239
- endpoint: string;
240
- serviceVersion: string;
241
- metricIntervalMs: number;
242
- serviceName?: string | undefined;
243
- environment?: string | undefined;
244
- resourceAttributes?: Record<string, string> | undefined;
245
- instrumentations?: Record<string, {
246
- enabled?: boolean | undefined;
247
- }> | undefined;
248
- }, {
249
- enabled?: boolean | undefined;
250
- endpoint?: string | undefined;
251
- serviceName?: string | undefined;
252
- serviceVersion?: string | undefined;
253
- environment?: string | undefined;
254
- metricIntervalMs?: number | undefined;
255
- resourceAttributes?: Record<string, string> | undefined;
256
- instrumentations?: Record<string, {
257
- enabled?: boolean | undefined;
258
- }> | undefined;
259
- }>>;
452
+ initialMs?: number | undefined;
453
+ maxMs?: number | undefined;
454
+ factor?: number | undefined;
455
+ }>>;
456
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
457
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
458
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
459
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
460
+ command: z.ZodString;
461
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
462
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
463
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
464
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
465
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
466
+ restartBackoff: z.ZodOptional<z.ZodObject<{
467
+ initialMs: z.ZodOptional<z.ZodNumber>;
468
+ maxMs: z.ZodOptional<z.ZodNumber>;
469
+ factor: z.ZodOptional<z.ZodNumber>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ initialMs?: number | undefined;
472
+ maxMs?: number | undefined;
473
+ factor?: number | undefined;
474
+ }, {
475
+ initialMs?: number | undefined;
476
+ maxMs?: number | undefined;
477
+ factor?: number | undefined;
478
+ }>>;
479
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
480
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
481
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
482
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
483
+ command: z.ZodString;
484
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
485
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
486
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
487
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
488
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
489
+ restartBackoff: z.ZodOptional<z.ZodObject<{
490
+ initialMs: z.ZodOptional<z.ZodNumber>;
491
+ maxMs: z.ZodOptional<z.ZodNumber>;
492
+ factor: z.ZodOptional<z.ZodNumber>;
493
+ }, "strip", z.ZodTypeAny, {
494
+ initialMs?: number | undefined;
495
+ maxMs?: number | undefined;
496
+ factor?: number | undefined;
497
+ }, {
498
+ initialMs?: number | undefined;
499
+ maxMs?: number | undefined;
500
+ factor?: number | undefined;
501
+ }>>;
502
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
503
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
504
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
505
+ }, z.ZodTypeAny, "passthrough">>>>;
506
+ socket: z.ZodOptional<z.ZodObject<{
507
+ enabled: z.ZodBoolean;
508
+ port: z.ZodOptional<z.ZodNumber>;
509
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
510
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
511
+ enabled: z.ZodBoolean;
512
+ port: z.ZodOptional<z.ZodNumber>;
513
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
514
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
515
+ enabled: z.ZodBoolean;
516
+ port: z.ZodOptional<z.ZodNumber>;
517
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
518
+ }, z.ZodTypeAny, "passthrough">>>;
519
+ kv: z.ZodOptional<z.ZodObject<{
520
+ driver: z.ZodEnum<["memory", "redis"]>;
521
+ connection: z.ZodOptional<z.ZodAny>;
522
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
523
+ driver: z.ZodEnum<["memory", "redis"]>;
524
+ connection: z.ZodOptional<z.ZodAny>;
525
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
526
+ driver: z.ZodEnum<["memory", "redis"]>;
527
+ connection: z.ZodOptional<z.ZodAny>;
528
+ }, z.ZodTypeAny, "passthrough">>>;
529
+ db: z.ZodOptional<z.ZodObject<{
530
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
531
+ url: z.ZodString;
532
+ authToken: z.ZodOptional<z.ZodString>;
533
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
534
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
535
+ url: z.ZodString;
536
+ authToken: z.ZodOptional<z.ZodString>;
537
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
538
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
539
+ url: z.ZodString;
540
+ authToken: z.ZodOptional<z.ZodString>;
541
+ }, z.ZodTypeAny, "passthrough">>>;
542
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
543
+ name: z.ZodDefault<z.ZodString>;
544
+ debug: z.ZodDefault<z.ZodBoolean>;
545
+ logger: z.ZodDefault<z.ZodObject<{
546
+ level: z.ZodDefault<z.ZodString>;
547
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
548
+ level: z.ZodDefault<z.ZodString>;
549
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
550
+ level: z.ZodDefault<z.ZodString>;
551
+ }, z.ZodTypeAny, "passthrough">>>;
552
+ otel: z.ZodOptional<z.ZodObject<{
553
+ enabled: z.ZodDefault<z.ZodBoolean>;
554
+ endpoint: z.ZodDefault<z.ZodString>;
555
+ serviceName: z.ZodOptional<z.ZodString>;
556
+ serviceVersion: z.ZodDefault<z.ZodString>;
557
+ environment: z.ZodOptional<z.ZodString>;
558
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
559
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
560
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
561
+ enabled: z.ZodOptional<z.ZodBoolean>;
562
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
563
+ enabled: z.ZodOptional<z.ZodBoolean>;
564
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
565
+ enabled: z.ZodOptional<z.ZodBoolean>;
566
+ }, z.ZodTypeAny, "passthrough">>>>;
567
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
568
+ enabled: z.ZodDefault<z.ZodBoolean>;
569
+ endpoint: z.ZodDefault<z.ZodString>;
570
+ serviceName: z.ZodOptional<z.ZodString>;
571
+ serviceVersion: z.ZodDefault<z.ZodString>;
572
+ environment: z.ZodOptional<z.ZodString>;
573
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
574
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
575
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
576
+ enabled: z.ZodOptional<z.ZodBoolean>;
577
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
578
+ enabled: z.ZodOptional<z.ZodBoolean>;
579
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
580
+ enabled: z.ZodOptional<z.ZodBoolean>;
581
+ }, z.ZodTypeAny, "passthrough">>>>;
582
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
583
+ enabled: z.ZodDefault<z.ZodBoolean>;
584
+ endpoint: z.ZodDefault<z.ZodString>;
585
+ serviceName: z.ZodOptional<z.ZodString>;
586
+ serviceVersion: z.ZodDefault<z.ZodString>;
587
+ environment: z.ZodOptional<z.ZodString>;
588
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
589
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
590
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
591
+ enabled: z.ZodOptional<z.ZodBoolean>;
592
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
593
+ enabled: z.ZodOptional<z.ZodBoolean>;
594
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
595
+ enabled: z.ZodOptional<z.ZodBoolean>;
596
+ }, z.ZodTypeAny, "passthrough">>>>;
597
+ }, z.ZodTypeAny, "passthrough">>>;
598
+ shutdownSignals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<false>]>>;
599
+ shutdownTimeoutMs: z.ZodOptional<z.ZodNumber>;
260
600
  processes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
261
601
  command: z.ZodString;
262
602
  args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
263
603
  mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
264
604
  restartOnCrash: z.ZodDefault<z.ZodBoolean>;
605
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
606
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
607
+ restartBackoff: z.ZodOptional<z.ZodObject<{
608
+ initialMs: z.ZodOptional<z.ZodNumber>;
609
+ maxMs: z.ZodOptional<z.ZodNumber>;
610
+ factor: z.ZodOptional<z.ZodNumber>;
611
+ }, "strip", z.ZodTypeAny, {
612
+ initialMs?: number | undefined;
613
+ maxMs?: number | undefined;
614
+ factor?: number | undefined;
615
+ }, {
616
+ initialMs?: number | undefined;
617
+ maxMs?: number | undefined;
618
+ factor?: number | undefined;
619
+ }>>;
265
620
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
266
- }, "strip", z.ZodTypeAny, {
267
- command: string;
268
- mode: "daemon" | "oneshot" | "stdio";
269
- restartOnCrash: boolean;
270
- args?: string[] | undefined;
271
- env?: Record<string, string> | undefined;
272
- }, {
273
- command: string;
274
- args?: string[] | undefined;
275
- mode?: "daemon" | "oneshot" | "stdio" | undefined;
276
- restartOnCrash?: boolean | undefined;
277
- env?: Record<string, string> | undefined;
278
- }>>>;
279
- }, "strip", z.ZodTypeAny, {
280
- debug: boolean;
281
- name: string;
282
- logger: {
283
- level: string;
284
- };
285
- otel?: {
286
- enabled: boolean;
287
- endpoint: string;
288
- serviceVersion: string;
289
- metricIntervalMs: number;
290
- serviceName?: string | undefined;
291
- environment?: string | undefined;
292
- resourceAttributes?: Record<string, string> | undefined;
293
- instrumentations?: Record<string, {
294
- enabled?: boolean | undefined;
295
- }> | undefined;
296
- } | undefined;
297
- processes?: Record<string, {
298
- command: string;
299
- mode: "daemon" | "oneshot" | "stdio";
300
- restartOnCrash: boolean;
301
- args?: string[] | undefined;
302
- env?: Record<string, string> | undefined;
303
- }> | undefined;
304
- }, {
305
- debug?: boolean | undefined;
306
- name?: string | undefined;
307
- logger?: {
308
- level?: string | undefined;
309
- } | undefined;
310
- otel?: {
311
- enabled?: boolean | undefined;
312
- endpoint?: string | undefined;
313
- serviceName?: string | undefined;
314
- serviceVersion?: string | undefined;
315
- environment?: string | undefined;
316
- metricIntervalMs?: number | undefined;
317
- resourceAttributes?: Record<string, string> | undefined;
318
- instrumentations?: Record<string, {
319
- enabled?: boolean | undefined;
320
- }> | undefined;
321
- } | undefined;
322
- processes?: Record<string, {
323
- command: string;
324
- args?: string[] | undefined;
325
- mode?: "daemon" | "oneshot" | "stdio" | undefined;
326
- restartOnCrash?: boolean | undefined;
327
- env?: Record<string, string> | undefined;
328
- }> | undefined;
329
- }>;
621
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
622
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
623
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
624
+ command: z.ZodString;
625
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
626
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
627
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
628
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
629
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
630
+ restartBackoff: z.ZodOptional<z.ZodObject<{
631
+ initialMs: z.ZodOptional<z.ZodNumber>;
632
+ maxMs: z.ZodOptional<z.ZodNumber>;
633
+ factor: z.ZodOptional<z.ZodNumber>;
634
+ }, "strip", z.ZodTypeAny, {
635
+ initialMs?: number | undefined;
636
+ maxMs?: number | undefined;
637
+ factor?: number | undefined;
638
+ }, {
639
+ initialMs?: number | undefined;
640
+ maxMs?: number | undefined;
641
+ factor?: number | undefined;
642
+ }>>;
643
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
644
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
645
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
646
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
647
+ command: z.ZodString;
648
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
649
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
650
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
651
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
652
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
653
+ restartBackoff: z.ZodOptional<z.ZodObject<{
654
+ initialMs: z.ZodOptional<z.ZodNumber>;
655
+ maxMs: z.ZodOptional<z.ZodNumber>;
656
+ factor: z.ZodOptional<z.ZodNumber>;
657
+ }, "strip", z.ZodTypeAny, {
658
+ initialMs?: number | undefined;
659
+ maxMs?: number | undefined;
660
+ factor?: number | undefined;
661
+ }, {
662
+ initialMs?: number | undefined;
663
+ maxMs?: number | undefined;
664
+ factor?: number | undefined;
665
+ }>>;
666
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
667
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
668
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
669
+ }, z.ZodTypeAny, "passthrough">>>>;
670
+ socket: z.ZodOptional<z.ZodObject<{
671
+ enabled: z.ZodBoolean;
672
+ port: z.ZodOptional<z.ZodNumber>;
673
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
674
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
675
+ enabled: z.ZodBoolean;
676
+ port: z.ZodOptional<z.ZodNumber>;
677
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
678
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
679
+ enabled: z.ZodBoolean;
680
+ port: z.ZodOptional<z.ZodNumber>;
681
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
682
+ }, z.ZodTypeAny, "passthrough">>>;
683
+ kv: z.ZodOptional<z.ZodObject<{
684
+ driver: z.ZodEnum<["memory", "redis"]>;
685
+ connection: z.ZodOptional<z.ZodAny>;
686
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
687
+ driver: z.ZodEnum<["memory", "redis"]>;
688
+ connection: z.ZodOptional<z.ZodAny>;
689
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
690
+ driver: z.ZodEnum<["memory", "redis"]>;
691
+ connection: z.ZodOptional<z.ZodAny>;
692
+ }, z.ZodTypeAny, "passthrough">>>;
693
+ db: z.ZodOptional<z.ZodObject<{
694
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
695
+ url: z.ZodString;
696
+ authToken: z.ZodOptional<z.ZodString>;
697
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
698
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
699
+ url: z.ZodString;
700
+ authToken: z.ZodOptional<z.ZodString>;
701
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
702
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
703
+ url: z.ZodString;
704
+ authToken: z.ZodOptional<z.ZodString>;
705
+ }, z.ZodTypeAny, "passthrough">>>;
706
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
707
+ name: z.ZodDefault<z.ZodString>;
708
+ debug: z.ZodDefault<z.ZodBoolean>;
709
+ logger: z.ZodDefault<z.ZodObject<{
710
+ level: z.ZodDefault<z.ZodString>;
711
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
712
+ level: z.ZodDefault<z.ZodString>;
713
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
714
+ level: z.ZodDefault<z.ZodString>;
715
+ }, z.ZodTypeAny, "passthrough">>>;
716
+ otel: z.ZodOptional<z.ZodObject<{
717
+ enabled: z.ZodDefault<z.ZodBoolean>;
718
+ endpoint: z.ZodDefault<z.ZodString>;
719
+ serviceName: z.ZodOptional<z.ZodString>;
720
+ serviceVersion: z.ZodDefault<z.ZodString>;
721
+ environment: z.ZodOptional<z.ZodString>;
722
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
723
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
724
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
725
+ enabled: z.ZodOptional<z.ZodBoolean>;
726
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
727
+ enabled: z.ZodOptional<z.ZodBoolean>;
728
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
729
+ enabled: z.ZodOptional<z.ZodBoolean>;
730
+ }, z.ZodTypeAny, "passthrough">>>>;
731
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
732
+ enabled: z.ZodDefault<z.ZodBoolean>;
733
+ endpoint: z.ZodDefault<z.ZodString>;
734
+ serviceName: z.ZodOptional<z.ZodString>;
735
+ serviceVersion: z.ZodDefault<z.ZodString>;
736
+ environment: z.ZodOptional<z.ZodString>;
737
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
738
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
739
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
740
+ enabled: z.ZodOptional<z.ZodBoolean>;
741
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
742
+ enabled: z.ZodOptional<z.ZodBoolean>;
743
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
744
+ enabled: z.ZodOptional<z.ZodBoolean>;
745
+ }, z.ZodTypeAny, "passthrough">>>>;
746
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
747
+ enabled: z.ZodDefault<z.ZodBoolean>;
748
+ endpoint: z.ZodDefault<z.ZodString>;
749
+ serviceName: z.ZodOptional<z.ZodString>;
750
+ serviceVersion: z.ZodDefault<z.ZodString>;
751
+ environment: z.ZodOptional<z.ZodString>;
752
+ metricIntervalMs: z.ZodDefault<z.ZodNumber>;
753
+ resourceAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
754
+ instrumentations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
755
+ enabled: z.ZodOptional<z.ZodBoolean>;
756
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
757
+ enabled: z.ZodOptional<z.ZodBoolean>;
758
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
759
+ enabled: z.ZodOptional<z.ZodBoolean>;
760
+ }, z.ZodTypeAny, "passthrough">>>>;
761
+ }, z.ZodTypeAny, "passthrough">>>;
762
+ shutdownSignals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodLiteral<false>]>>;
763
+ shutdownTimeoutMs: z.ZodOptional<z.ZodNumber>;
764
+ processes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
765
+ command: z.ZodString;
766
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
767
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
768
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
769
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
770
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
771
+ restartBackoff: z.ZodOptional<z.ZodObject<{
772
+ initialMs: z.ZodOptional<z.ZodNumber>;
773
+ maxMs: z.ZodOptional<z.ZodNumber>;
774
+ factor: z.ZodOptional<z.ZodNumber>;
775
+ }, "strip", z.ZodTypeAny, {
776
+ initialMs?: number | undefined;
777
+ maxMs?: number | undefined;
778
+ factor?: number | undefined;
779
+ }, {
780
+ initialMs?: number | undefined;
781
+ maxMs?: number | undefined;
782
+ factor?: number | undefined;
783
+ }>>;
784
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
785
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
786
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
787
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
788
+ command: z.ZodString;
789
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
790
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
791
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
792
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
793
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
794
+ restartBackoff: z.ZodOptional<z.ZodObject<{
795
+ initialMs: z.ZodOptional<z.ZodNumber>;
796
+ maxMs: z.ZodOptional<z.ZodNumber>;
797
+ factor: z.ZodOptional<z.ZodNumber>;
798
+ }, "strip", z.ZodTypeAny, {
799
+ initialMs?: number | undefined;
800
+ maxMs?: number | undefined;
801
+ factor?: number | undefined;
802
+ }, {
803
+ initialMs?: number | undefined;
804
+ maxMs?: number | undefined;
805
+ factor?: number | undefined;
806
+ }>>;
807
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
808
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
809
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
810
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
811
+ command: z.ZodString;
812
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
813
+ mode: z.ZodDefault<z.ZodEnum<["daemon", "oneshot", "stdio"]>>;
814
+ restartOnCrash: z.ZodDefault<z.ZodBoolean>;
815
+ maxRestarts: z.ZodOptional<z.ZodNumber>;
816
+ restartCooldown: z.ZodOptional<z.ZodNumber>;
817
+ restartBackoff: z.ZodOptional<z.ZodObject<{
818
+ initialMs: z.ZodOptional<z.ZodNumber>;
819
+ maxMs: z.ZodOptional<z.ZodNumber>;
820
+ factor: z.ZodOptional<z.ZodNumber>;
821
+ }, "strip", z.ZodTypeAny, {
822
+ initialMs?: number | undefined;
823
+ maxMs?: number | undefined;
824
+ factor?: number | undefined;
825
+ }, {
826
+ initialMs?: number | undefined;
827
+ maxMs?: number | undefined;
828
+ factor?: number | undefined;
829
+ }>>;
830
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
831
+ inheritEnv: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
832
+ maxPendingStdinBytes: z.ZodOptional<z.ZodNumber>;
833
+ }, z.ZodTypeAny, "passthrough">>>>;
834
+ socket: z.ZodOptional<z.ZodObject<{
835
+ enabled: z.ZodBoolean;
836
+ port: z.ZodOptional<z.ZodNumber>;
837
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
838
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
839
+ enabled: z.ZodBoolean;
840
+ port: z.ZodOptional<z.ZodNumber>;
841
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
842
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
843
+ enabled: z.ZodBoolean;
844
+ port: z.ZodOptional<z.ZodNumber>;
845
+ adapter: z.ZodOptional<z.ZodEnum<["bun", "socket.io"]>>;
846
+ }, z.ZodTypeAny, "passthrough">>>;
847
+ kv: z.ZodOptional<z.ZodObject<{
848
+ driver: z.ZodEnum<["memory", "redis"]>;
849
+ connection: z.ZodOptional<z.ZodAny>;
850
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
851
+ driver: z.ZodEnum<["memory", "redis"]>;
852
+ connection: z.ZodOptional<z.ZodAny>;
853
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
854
+ driver: z.ZodEnum<["memory", "redis"]>;
855
+ connection: z.ZodOptional<z.ZodAny>;
856
+ }, z.ZodTypeAny, "passthrough">>>;
857
+ db: z.ZodOptional<z.ZodObject<{
858
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
859
+ url: z.ZodString;
860
+ authToken: z.ZodOptional<z.ZodString>;
861
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
862
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
863
+ url: z.ZodString;
864
+ authToken: z.ZodOptional<z.ZodString>;
865
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
866
+ driver: z.ZodEnum<["postgres", "mysql", "sqlite", "libsql"]>;
867
+ url: z.ZodString;
868
+ authToken: z.ZodOptional<z.ZodString>;
869
+ }, z.ZodTypeAny, "passthrough">>>;
870
+ }, z.ZodTypeAny, "passthrough">>;
330
871
  type AppConfigInput = z.input<typeof AppConfigSchema>;
331
872
  type AppConfigOutput = z.output<typeof AppConfigSchema>;
332
873
 
333
- export { App, type AppConfig, type AppConfigInput, type AppConfigOutput, AppConfigSchema, ConfigError, type Context, type Driver, DriverError, type ErrorCode, ErrorCodes, IskraError, type IskraErrorOptions, LifecycleError, type Logger, type OtelConfig, type Plugin, PluginError, type ProcessConfig, type RestartBackoffConfig, createLogger, initOtel, loadAppConfig, shutdownOtel };
874
+ export { App, type AppConfig, type AppConfigInput, type AppConfigOutput, AppConfigSchema, AppContext, type AppContextRegistry, type AppEvents, ConfigError, type Context, type Driver, DriverError, type ErrorCode, ErrorCodes, IskraError, type IskraErrorOptions, LifecycleError, type Logger, type OtelConfig, type OtelResourcesModule, type Plugin, PluginError, type ProcessConfig, type RestartBackoffConfig, SECRET_QUERY_PARAMS, autoInstrumentationOptions, createLogger, createResource, describeOtelEndpoint, initOtel, isDevelopmentEnv, isProductionEnv, loadAppConfig, nodeEnv, redactUrl, shutdownOtel };