@vibesdotdev/integrations-kafka 0.0.0-stage → 1.0.0-rc.1

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 (166) hide show
  1. package/AUDIT-CODE.md +40 -0
  2. package/AUDIT-SEAL.md +12 -0
  3. package/LICENSE +126 -0
  4. package/README.md +76 -2
  5. package/SEALED.md +13 -0
  6. package/dist/admin.d.ts +20 -0
  7. package/dist/admin.d.ts.map +1 -0
  8. package/dist/admin.js +51 -0
  9. package/dist/admin.js.map +1 -0
  10. package/dist/auth/sasl.node.impl.d.ts +18 -0
  11. package/dist/auth/sasl.node.impl.d.ts.map +1 -0
  12. package/dist/auth/sasl.node.impl.js +62 -0
  13. package/dist/auth/sasl.node.impl.js.map +1 -0
  14. package/dist/chat/realtime-transport/host.d.ts +14 -0
  15. package/dist/chat/realtime-transport/host.d.ts.map +1 -0
  16. package/dist/chat/realtime-transport/host.js +7 -0
  17. package/dist/chat/realtime-transport/host.js.map +1 -0
  18. package/dist/chat/realtime-transport/index.d.ts +15 -0
  19. package/dist/chat/realtime-transport/index.d.ts.map +1 -0
  20. package/dist/chat/realtime-transport/index.js +13 -0
  21. package/dist/chat/realtime-transport/index.js.map +1 -0
  22. package/dist/chat/realtime-transport/lifecycle.d.ts +30 -0
  23. package/dist/chat/realtime-transport/lifecycle.d.ts.map +1 -0
  24. package/dist/chat/realtime-transport/lifecycle.js +125 -0
  25. package/dist/chat/realtime-transport/lifecycle.js.map +1 -0
  26. package/dist/chat/realtime-transport/projection.d.ts +127 -0
  27. package/dist/chat/realtime-transport/projection.d.ts.map +1 -0
  28. package/dist/chat/realtime-transport/projection.js +156 -0
  29. package/dist/chat/realtime-transport/projection.js.map +1 -0
  30. package/dist/chat/realtime-transport/sse-kafka-bridge.d.ts +32 -0
  31. package/dist/chat/realtime-transport/sse-kafka-bridge.d.ts.map +1 -0
  32. package/dist/chat/realtime-transport/sse-kafka-bridge.js +58 -0
  33. package/dist/chat/realtime-transport/sse-kafka-bridge.js.map +1 -0
  34. package/dist/chat/realtime-transport/ws-kafka-bridge.d.ts +10 -0
  35. package/dist/chat/realtime-transport/ws-kafka-bridge.d.ts.map +1 -0
  36. package/dist/chat/realtime-transport/ws-kafka-bridge.js +13 -0
  37. package/dist/chat/realtime-transport/ws-kafka-bridge.js.map +1 -0
  38. package/dist/client.d.ts +16 -0
  39. package/dist/client.d.ts.map +1 -0
  40. package/dist/client.js +29 -0
  41. package/dist/client.js.map +1 -0
  42. package/dist/config/kafka.config.descriptor.d.ts +109 -0
  43. package/dist/config/kafka.config.descriptor.d.ts.map +1 -0
  44. package/dist/config/kafka.config.descriptor.js +60 -0
  45. package/dist/config/kafka.config.descriptor.js.map +1 -0
  46. package/dist/connections.d.ts +27 -0
  47. package/dist/connections.d.ts.map +1 -0
  48. package/dist/connections.js +20 -0
  49. package/dist/connections.js.map +1 -0
  50. package/dist/connections.node.impl.d.ts +34 -0
  51. package/dist/connections.node.impl.d.ts.map +1 -0
  52. package/dist/connections.node.impl.js +236 -0
  53. package/dist/connections.node.impl.js.map +1 -0
  54. package/dist/index.d.ts +22 -0
  55. package/dist/index.d.ts.map +1 -0
  56. package/dist/index.js +24 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/kafka-client.node.impl.d.ts +9 -0
  59. package/dist/kafka-client.node.impl.d.ts.map +1 -0
  60. package/dist/kafka-client.node.impl.js +10 -0
  61. package/dist/kafka-client.node.impl.js.map +1 -0
  62. package/dist/kafka-connector.impl.d.ts +53 -0
  63. package/dist/kafka-connector.impl.d.ts.map +1 -0
  64. package/dist/kafka-connector.impl.js +97 -0
  65. package/dist/kafka-connector.impl.js.map +1 -0
  66. package/dist/kafka-event-adapter.descriptor.d.ts +11 -0
  67. package/dist/kafka-event-adapter.descriptor.d.ts.map +1 -0
  68. package/dist/kafka-event-adapter.descriptor.js +20 -0
  69. package/dist/kafka-event-adapter.descriptor.js.map +1 -0
  70. package/dist/kafka-event-adapter.impl.d.ts +22 -0
  71. package/dist/kafka-event-adapter.impl.d.ts.map +1 -0
  72. package/dist/kafka-event-adapter.impl.js +140 -0
  73. package/dist/kafka-event-adapter.impl.js.map +1 -0
  74. package/dist/kafka-substrate.descriptor.d.ts +4 -0
  75. package/dist/kafka-substrate.descriptor.d.ts.map +1 -0
  76. package/dist/kafka-substrate.descriptor.js +12 -0
  77. package/dist/kafka-substrate.descriptor.js.map +1 -0
  78. package/dist/kafka.d.ts +18 -0
  79. package/dist/kafka.d.ts.map +1 -0
  80. package/dist/kafka.js +23 -0
  81. package/dist/kafka.js.map +1 -0
  82. package/dist/kafka.node.plugin.d.ts +3 -0
  83. package/dist/kafka.node.plugin.d.ts.map +1 -0
  84. package/dist/kafka.node.plugin.js +66 -0
  85. package/dist/kafka.node.plugin.js.map +1 -0
  86. package/dist/kafka.plugin.d.ts +10 -0
  87. package/dist/kafka.plugin.d.ts.map +1 -0
  88. package/dist/kafka.plugin.js +28 -0
  89. package/dist/kafka.plugin.js.map +1 -0
  90. package/dist/logging/kafka.logger.descriptor.d.ts +7 -0
  91. package/dist/logging/kafka.logger.descriptor.d.ts.map +1 -0
  92. package/dist/logging/kafka.logger.descriptor.js +13 -0
  93. package/dist/logging/kafka.logger.descriptor.js.map +1 -0
  94. package/dist/message-schemas.d.ts +94 -0
  95. package/dist/message-schemas.d.ts.map +1 -0
  96. package/dist/message-schemas.js +68 -0
  97. package/dist/message-schemas.js.map +1 -0
  98. package/dist/request-queue-timeout-guard.d.ts +29 -0
  99. package/dist/request-queue-timeout-guard.d.ts.map +1 -0
  100. package/dist/request-queue-timeout-guard.js +245 -0
  101. package/dist/request-queue-timeout-guard.js.map +1 -0
  102. package/dist/schemas/contracts.d.ts +190 -0
  103. package/dist/schemas/contracts.d.ts.map +1 -0
  104. package/dist/schemas/contracts.js +85 -0
  105. package/dist/schemas/contracts.js.map +1 -0
  106. package/dist/schemas/kafka.d.ts +116 -0
  107. package/dist/schemas/kafka.d.ts.map +1 -0
  108. package/dist/schemas/kafka.js +13 -0
  109. package/dist/schemas/kafka.js.map +1 -0
  110. package/dist/schemas/realtime.d.ts +135 -0
  111. package/dist/schemas/realtime.d.ts.map +1 -0
  112. package/dist/schemas/realtime.js +44 -0
  113. package/dist/schemas/realtime.js.map +1 -0
  114. package/dist/schemas/worker-context.d.ts +14 -0
  115. package/dist/schemas/worker-context.d.ts.map +1 -0
  116. package/dist/schemas/worker-context.js +26 -0
  117. package/dist/schemas/worker-context.js.map +1 -0
  118. package/dist/topics.d.ts +85 -0
  119. package/dist/topics.d.ts.map +1 -0
  120. package/dist/topics.js +90 -0
  121. package/dist/topics.js.map +1 -0
  122. package/dist/workers/adapter/db-ops.d.ts +28 -0
  123. package/dist/workers/adapter/db-ops.d.ts.map +1 -0
  124. package/dist/workers/adapter/db-ops.js +14 -0
  125. package/dist/workers/adapter/db-ops.js.map +1 -0
  126. package/dist/workers/adapter/index.d.ts +16 -0
  127. package/dist/workers/adapter/index.d.ts.map +1 -0
  128. package/dist/workers/adapter/index.js +15 -0
  129. package/dist/workers/adapter/index.js.map +1 -0
  130. package/dist/workers/adapter/provider.d.ts +151 -0
  131. package/dist/workers/adapter/provider.d.ts.map +1 -0
  132. package/dist/workers/adapter/provider.js +654 -0
  133. package/dist/workers/adapter/provider.js.map +1 -0
  134. package/dist/workers/adapter/worker-adapter.kafka.descriptor.d.ts +36 -0
  135. package/dist/workers/adapter/worker-adapter.kafka.descriptor.d.ts.map +1 -0
  136. package/dist/workers/adapter/worker-adapter.kafka.descriptor.js +22 -0
  137. package/dist/workers/adapter/worker-adapter.kafka.descriptor.js.map +1 -0
  138. package/dist/workers/adapter/worker-adapter.kafka.impl.d.ts +36 -0
  139. package/dist/workers/adapter/worker-adapter.kafka.impl.d.ts.map +1 -0
  140. package/dist/workers/adapter/worker-adapter.kafka.impl.js +84 -0
  141. package/dist/workers/adapter/worker-adapter.kafka.impl.js.map +1 -0
  142. package/dist/workers/adapter/workers-kafka.db.context.d.ts +6 -0
  143. package/dist/workers/adapter/workers-kafka.db.context.d.ts.map +1 -0
  144. package/dist/workers/adapter/workers-kafka.db.context.descriptor.d.ts +43 -0
  145. package/dist/workers/adapter/workers-kafka.db.context.descriptor.d.ts.map +1 -0
  146. package/dist/workers/adapter/workers-kafka.db.context.descriptor.js +20 -0
  147. package/dist/workers/adapter/workers-kafka.db.context.descriptor.js.map +1 -0
  148. package/dist/workers/adapter/workers-kafka.db.context.js +5 -0
  149. package/dist/workers/adapter/workers-kafka.db.context.js.map +1 -0
  150. package/dist/workers/index.d.ts +8 -0
  151. package/dist/workers/index.d.ts.map +1 -0
  152. package/dist/workers/index.js +9 -0
  153. package/dist/workers/index.js.map +1 -0
  154. package/dist/workers/provider-jobs.sqlite-schema.d.ts +438 -0
  155. package/dist/workers/provider-jobs.sqlite-schema.d.ts.map +1 -0
  156. package/dist/workers/provider-jobs.sqlite-schema.js +37 -0
  157. package/dist/workers/provider-jobs.sqlite-schema.js.map +1 -0
  158. package/dist/workers/workers-kafka.consumer.plugin.d.ts +4 -0
  159. package/dist/workers/workers-kafka.consumer.plugin.d.ts.map +1 -0
  160. package/dist/workers/workers-kafka.consumer.plugin.js +11 -0
  161. package/dist/workers/workers-kafka.consumer.plugin.js.map +1 -0
  162. package/dist/workers/workers-kafka.plugin.d.ts +9 -0
  163. package/dist/workers/workers-kafka.plugin.d.ts.map +1 -0
  164. package/dist/workers/workers-kafka.plugin.js +27 -0
  165. package/dist/workers/workers-kafka.plugin.js.map +1 -0
  166. package/package.json +176 -4
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Kafka wire-format primitives (message envelopes, producer/consumer configs,
3
+ * topic configs, producer records). These are generic Kafka concerns and
4
+ * belong with the integrations layer rather than with any individual feature
5
+ * module's streaming pipeline.
6
+ */
7
+ import * as z from 'zod/v4';
8
+ export declare const kafkaMessageSchema: z.ZodObject<{
9
+ topic: z.ZodString;
10
+ partition: z.ZodNumber;
11
+ offset: z.ZodString;
12
+ timestamp: z.ZodString;
13
+ key: z.ZodNullable<z.ZodString>;
14
+ value: z.ZodUnknown;
15
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
16
+ }, z.core.$strip>;
17
+ export declare const kafkaProducerConfigSchema: z.ZodObject<{
18
+ clientId: z.ZodString;
19
+ brokers: z.ZodArray<z.ZodString>;
20
+ ssl: z.ZodOptional<z.ZodBoolean>;
21
+ sasl: z.ZodOptional<z.ZodObject<{
22
+ mechanism: z.ZodEnum<{
23
+ plain: "plain";
24
+ "scram-sha-256": "scram-sha-256";
25
+ "scram-sha-512": "scram-sha-512";
26
+ }>;
27
+ username: z.ZodString;
28
+ password: z.ZodString;
29
+ }, z.core.$strip>>;
30
+ retry: z.ZodOptional<z.ZodObject<{
31
+ retries: z.ZodDefault<z.ZodNumber>;
32
+ initialRetryTime: z.ZodDefault<z.ZodNumber>;
33
+ maxRetryTime: z.ZodDefault<z.ZodNumber>;
34
+ }, z.core.$strip>>;
35
+ }, z.core.$strip>;
36
+ export declare const kafkaConsumerConfigSchema: z.ZodObject<{
37
+ clientId: z.ZodString;
38
+ brokers: z.ZodArray<z.ZodString>;
39
+ ssl: z.ZodOptional<z.ZodBoolean>;
40
+ sasl: z.ZodOptional<z.ZodObject<{
41
+ mechanism: z.ZodEnum<{
42
+ plain: "plain";
43
+ "scram-sha-256": "scram-sha-256";
44
+ "scram-sha-512": "scram-sha-512";
45
+ }>;
46
+ username: z.ZodString;
47
+ password: z.ZodString;
48
+ }, z.core.$strip>>;
49
+ retry: z.ZodOptional<z.ZodObject<{
50
+ retries: z.ZodDefault<z.ZodNumber>;
51
+ initialRetryTime: z.ZodDefault<z.ZodNumber>;
52
+ maxRetryTime: z.ZodDefault<z.ZodNumber>;
53
+ }, z.core.$strip>>;
54
+ groupId: z.ZodString;
55
+ sessionTimeout: z.ZodDefault<z.ZodNumber>;
56
+ heartbeatInterval: z.ZodDefault<z.ZodNumber>;
57
+ maxInFlightRequests: z.ZodDefault<z.ZodNumber>;
58
+ autoCommit: z.ZodDefault<z.ZodBoolean>;
59
+ autoCommitInterval: z.ZodDefault<z.ZodNumber>;
60
+ }, z.core.$strip>;
61
+ export declare const kafkaTopicConfigSchema: z.ZodObject<{
62
+ topic: z.ZodString;
63
+ numPartitions: z.ZodDefault<z.ZodNumber>;
64
+ replicationFactor: z.ZodDefault<z.ZodNumber>;
65
+ configEntries: z.ZodOptional<z.ZodArray<z.ZodObject<{
66
+ name: z.ZodString;
67
+ value: z.ZodString;
68
+ }, z.core.$strip>>>;
69
+ }, z.core.$strip>;
70
+ export declare const kafkaProducerRecordSchema: z.ZodObject<{
71
+ topic: z.ZodString;
72
+ messages: z.ZodArray<z.ZodObject<{
73
+ key: z.ZodOptional<z.ZodString>;
74
+ value: z.ZodString;
75
+ partition: z.ZodOptional<z.ZodNumber>;
76
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
77
+ timestamp: z.ZodOptional<z.ZodString>;
78
+ }, z.core.$strip>>;
79
+ acks: z.ZodOptional<z.ZodNumber>;
80
+ timeout: z.ZodOptional<z.ZodNumber>;
81
+ compression: z.ZodOptional<z.ZodEnum<{
82
+ none: "none";
83
+ gzip: "gzip";
84
+ snappy: "snappy";
85
+ lz4: "lz4";
86
+ zstd: "zstd";
87
+ }>>;
88
+ }, z.core.$strip>;
89
+ export type KafkaMessageEnvelope = z.infer<typeof kafkaMessageSchema>;
90
+ export type KafkaProducerConfig = z.infer<typeof kafkaProducerConfigSchema>;
91
+ export type KafkaConsumerConfig = z.infer<typeof kafkaConsumerConfigSchema>;
92
+ export type KafkaTopicConfig = z.infer<typeof kafkaTopicConfigSchema>;
93
+ export type KafkaProducerRecord = z.infer<typeof kafkaProducerRecordSchema>;
94
+ //# sourceMappingURL=message-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-schemas.d.ts","sourceRoot":"","sources":["../src/message-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,kBAAkB;;;;;;;;iBAQ7B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAkBpC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;iBAOpC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;iBAYjC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;iBAcpC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Kafka wire-format primitives (message envelopes, producer/consumer configs,
3
+ * topic configs, producer records). These are generic Kafka concerns and
4
+ * belong with the integrations layer rather than with any individual feature
5
+ * module's streaming pipeline.
6
+ */
7
+ import * as z from 'zod/v4';
8
+ export const kafkaMessageSchema = z.object({
9
+ topic: z.string(),
10
+ partition: z.number(),
11
+ offset: z.string(),
12
+ timestamp: z.string(),
13
+ key: z.string().nullable(),
14
+ value: z.unknown(),
15
+ headers: z.record(z.string(), z.string()).optional()
16
+ });
17
+ export const kafkaProducerConfigSchema = z.object({
18
+ clientId: z.string(),
19
+ brokers: z.array(z.string()),
20
+ ssl: z.boolean().optional(),
21
+ sasl: z
22
+ .object({
23
+ mechanism: z.enum(['plain', 'scram-sha-256', 'scram-sha-512']),
24
+ username: z.string(),
25
+ password: z.string()
26
+ })
27
+ .optional(),
28
+ retry: z
29
+ .object({
30
+ retries: z.number().default(5),
31
+ initialRetryTime: z.number().default(100),
32
+ maxRetryTime: z.number().default(30000)
33
+ })
34
+ .optional()
35
+ });
36
+ export const kafkaConsumerConfigSchema = kafkaProducerConfigSchema.extend({
37
+ groupId: z.string(),
38
+ sessionTimeout: z.number().default(30000),
39
+ heartbeatInterval: z.number().default(3000),
40
+ maxInFlightRequests: z.number().default(5),
41
+ autoCommit: z.boolean().default(true),
42
+ autoCommitInterval: z.number().default(5000)
43
+ });
44
+ export const kafkaTopicConfigSchema = z.object({
45
+ topic: z.string(),
46
+ numPartitions: z.number().default(1),
47
+ replicationFactor: z.number().default(1),
48
+ configEntries: z
49
+ .array(z.object({
50
+ name: z.string(),
51
+ value: z.string()
52
+ }))
53
+ .optional()
54
+ });
55
+ export const kafkaProducerRecordSchema = z.object({
56
+ topic: z.string(),
57
+ messages: z.array(z.object({
58
+ key: z.string().optional(),
59
+ value: z.string(),
60
+ partition: z.number().optional(),
61
+ headers: z.record(z.string(), z.string()).optional(),
62
+ timestamp: z.string().optional()
63
+ })),
64
+ acks: z.number().optional(),
65
+ timeout: z.number().optional(),
66
+ compression: z.enum(['none', 'gzip', 'snappy', 'lz4', 'zstd']).optional()
67
+ });
68
+ //# sourceMappingURL=message-schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-schemas.js","sourceRoot":"","sources":["../src/message-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,GAA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CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC,CACF;IACD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;CACzE,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { KafkaQueueTimerOwner as KafkaTimerOwner, KafkaRequestQueueModule, KafkaVendorClient } from './schemas/kafka.ts';
2
+ type KafkaRequestQueueGuardLogger = {
3
+ warn: (message: string, context?: {
4
+ reason: string;
5
+ }) => void;
6
+ };
7
+ type KafkaRequestQueueGuardRuntime = {
8
+ supported: boolean;
9
+ importModule: (moduleName: string) => Promise<KafkaRequestQueueModule>;
10
+ };
11
+ /** The runtime-lifecycle surface a queue timer needs in order to arm and cancel. */
12
+ export type KafkaQueueTimerOwner = KafkaTimerOwner;
13
+ /**
14
+ * Arm the request queues behind a kafkajs facade on `owner`.
15
+ *
16
+ * KafkaJS creates a `Cluster` per producer, consumer or admin through its
17
+ * module-local `createCluster` symbol, and each cluster builds its own pool
18
+ * builder. The Node boundary finds that actual callable member on each facade,
19
+ * wraps it in place, and stamps each returned pool's queues with this client's
20
+ * owner. An unsupported facade refuses before the client can open resources.
21
+ */
22
+ export declare function armKafkaClientQueues(owner: KafkaQueueTimerOwner, client: KafkaVendorClient): void;
23
+ export declare function createKafkaRequestQueueTimeoutGuard(options: {
24
+ /** Read at each call: the host's build flag is never captured at import. */
25
+ building: () => boolean;
26
+ logger: KafkaRequestQueueGuardLogger;
27
+ }, runtimeOverrides?: Partial<KafkaRequestQueueGuardRuntime>): () => Promise<void>;
28
+ export {};
29
+ //# sourceMappingURL=request-queue-timeout-guard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-queue-timeout-guard.d.ts","sourceRoot":"","sources":["../src/request-queue-timeout-guard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAKX,oBAAoB,IAAI,eAAe,EAEvC,uBAAuB,EAEvB,iBAAiB,EAKjB,MAAM,oBAAoB,CAAC;AA+B5B,KAAK,4BAA4B,GAAG;IACnC,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACvE,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAyHnD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAyBjG;AAqDD,wBAAgB,mCAAmC,CAClD,OAAO,EAAE;IACR,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,MAAM,EAAE,4BAA4B,CAAC;CACrC,EACD,gBAAgB,GAAE,OAAO,CAAC,6BAA6B,CAAM,GAC3D,MAAM,OAAO,CAAC,IAAI,CAAC,CAgCrB"}
@@ -0,0 +1,245 @@
1
+ import { CapabilityError, CaughtFailureSchema, valueFreeFailure } from '@vibesdotdev/kernel';
2
+ import { vibesKafkaQueueOwner, vibesKafkaQueueOwnerSlot } from "./schemas/kafka.js";
3
+ /** The deep kafkajs RequestQueue module, named by this package's subpath import. */
4
+ const KAFKAJS_REQUEST_QUEUE_MODULE = '#kafkajs/request-queue';
5
+ const KAFKA_CREATE_CLUSTER_SYMBOL = 'private:Kafka:createCluster';
6
+ function isKafkaClusterFactory(value) {
7
+ return typeof value === 'function';
8
+ }
9
+ function isKafkaConnectionPoolBuild(value) {
10
+ return typeof value === 'function';
11
+ }
12
+ function findKafkaClusterFactory(client) {
13
+ const key = Object.getOwnPropertySymbols(client).find(symbol => symbol.description === KAFKA_CREATE_CLUSTER_SYMBOL);
14
+ const descriptor = key ? Object.getOwnPropertyDescriptor(client, key) : undefined;
15
+ const factory = descriptor?.value;
16
+ if (!key || !isKafkaClusterFactory(factory)) {
17
+ throw new CapabilityError('KafkaJS cluster construction is unavailable.', 'UNAVAILABLE', {
18
+ reason: 'kafka-timeout-guard-unavailable',
19
+ retryable: false
20
+ });
21
+ }
22
+ return { key, factory };
23
+ }
24
+ const KAFKA_PENDING_CHECK_INTERVAL_MS = 10;
25
+ /**
26
+ * KafkaJS's RequestQueue prototype is process-global, so the patch is installed
27
+ * once per prototype and cannot itself know which runtime's client a queue
28
+ * belongs to. Ownership is therefore carried on the queue: `armKafkaClientQueues`
29
+ * arms each queue a vendor client builds with that client's own owner token, and
30
+ * the patched scheduler arms that queue's timer on that owner alone. When the
31
+ * owner disposes, the timer is cleared and is not re-armed onto another runtime;
32
+ * the queue's `destroy` clears it as well.
33
+ *
34
+ * `queueTimers` holds each queue's armed check so `destroy` can dispose it. The
35
+ * disposer is kept here, never in KafkaJS's `throttleCheckTimeoutId` (KafkaJS's
36
+ * `destroy()` calls `clearTimeout` on it, which is a no-op for a Disposer).
37
+ */
38
+ const queueTimers = new WeakMap();
39
+ const patchedPrototypes = new WeakSet();
40
+ const stampedBuilders = new WeakSet();
41
+ const armedFactories = new WeakSet();
42
+ /**
43
+ * The owner token a queue carries, when the client that built it armed one. The
44
+ * only writer of this key is `armKafkaConnectionPoolQueues`, which stores the
45
+ * owner of the runtime that created the client; a queue no runtime armed carries
46
+ * no key at all.
47
+ */
48
+ function queueOwner(queue) {
49
+ const stamped = queue[vibesKafkaQueueOwner];
50
+ return isTimerOwner(stamped) ? stamped : undefined;
51
+ }
52
+ /**
53
+ * Whether a value carries the two lifecycle members a queue timer needs — the
54
+ * shape `KafkaQueueTimerOwner` declares, checked where a vendor queue hands its
55
+ * stamp over.
56
+ */
57
+ function isTimerOwner(stamped) {
58
+ return stamped?.signal instanceof AbortSignal && typeof stamped?.timeout === 'function';
59
+ }
60
+ /**
61
+ * Arm the queue's pending-request check on `owner`. Returns the disposer, or
62
+ * `undefined` when the owner no longer accepts timers because its runtime began
63
+ * disposing.
64
+ */
65
+ function armQueueTimer(owner, queue, delayMs, onOwnerAbort) {
66
+ if (owner.signal.aborted)
67
+ return undefined;
68
+ try {
69
+ return owner.timeout(() => {
70
+ queueTimers.delete(queue);
71
+ owner.signal.removeEventListener('abort', onOwnerAbort);
72
+ queue.checkPendingRequests();
73
+ }, delayMs);
74
+ }
75
+ catch (error) {
76
+ if (owner.signal.aborted && error instanceof CapabilityError && error.reason === 'runtime-disposed')
77
+ throw error;
78
+ const failure = valueFreeFailure(CaughtFailureSchema.parse(error));
79
+ throw new CapabilityError('Kafka request queue timer could not be scheduled.', 'INTERNAL', {
80
+ reason: 'kafka-request-queue-timer-schedule-failed',
81
+ details: { failure }
82
+ });
83
+ }
84
+ }
85
+ function clearQueueTimer(queue) {
86
+ const armed = queueTimers.get(queue);
87
+ if (!armed)
88
+ return;
89
+ queueTimers.delete(queue);
90
+ armed.owner.signal.removeEventListener('abort', armed.onOwnerAbort);
91
+ armed.dispose();
92
+ }
93
+ /**
94
+ * Arm every request queue a connection pool builds on `owner`. KafkaJS builds a
95
+ * `ConnectionPool` per broker and each pool constructs two `Connection`s, each
96
+ * owning a request queue, so the pool is the level at which a client hands its
97
+ * queues over. The vendor build is awaited unchanged and its result returned
98
+ * unchanged; only the queues inside it are armed.
99
+ */
100
+ function armKafkaConnectionPoolQueues(ownerSlot, builder) {
101
+ if (stampedBuilders.has(builder))
102
+ return;
103
+ const vendorBuild = builder.build;
104
+ if (!isKafkaConnectionPoolBuild(vendorBuild)) {
105
+ throw new CapabilityError('KafkaJS connection-pool construction is unavailable.', 'UNAVAILABLE', {
106
+ reason: 'kafka-timeout-guard-unavailable',
107
+ retryable: false
108
+ });
109
+ }
110
+ const stampedBuild = async function stampedBuild(destination) {
111
+ const pool = await vendorBuild.call(builder, destination);
112
+ const owner = ownerSlot.current;
113
+ if (owner)
114
+ for (const connection of pool?.pool ?? []) {
115
+ if (connection?.requestQueue)
116
+ connection.requestQueue[vibesKafkaQueueOwner] = owner;
117
+ }
118
+ return pool;
119
+ };
120
+ if (!Reflect.set(builder, 'build', stampedBuild)) {
121
+ throw new CapabilityError('KafkaJS connection-pool construction cannot be wrapped.', 'UNAVAILABLE', {
122
+ reason: 'kafka-timeout-guard-unavailable',
123
+ retryable: false
124
+ });
125
+ }
126
+ stampedBuilders.add(builder);
127
+ }
128
+ /**
129
+ * Arm the request queues behind a kafkajs facade on `owner`.
130
+ *
131
+ * KafkaJS creates a `Cluster` per producer, consumer or admin through its
132
+ * module-local `createCluster` symbol, and each cluster builds its own pool
133
+ * builder. The Node boundary finds that actual callable member on each facade,
134
+ * wraps it in place, and stamps each returned pool's queues with this client's
135
+ * owner. An unsupported facade refuses before the client can open resources.
136
+ */
137
+ export function armKafkaClientQueues(owner, client) {
138
+ const { key, factory } = findKafkaClusterFactory(client);
139
+ const ownerSlot = { current: owner };
140
+ client[vibesKafkaQueueOwnerSlot] = ownerSlot;
141
+ if (armedFactories.has(factory))
142
+ return;
143
+ const armedCreateCluster = function armedCreateCluster(options) {
144
+ const cluster = factory.call(client, options);
145
+ const builder = cluster?.connectionPoolBuilder;
146
+ if (!builder) {
147
+ throw new CapabilityError('KafkaJS connection-pool construction is unavailable.', 'UNAVAILABLE', {
148
+ reason: 'kafka-timeout-guard-unavailable',
149
+ retryable: false
150
+ });
151
+ }
152
+ armKafkaConnectionPoolQueues(ownerSlot, builder);
153
+ return cluster;
154
+ };
155
+ if (!Reflect.set(client, key, armedCreateCluster)) {
156
+ throw new CapabilityError('KafkaJS cluster construction cannot be wrapped.', 'UNAVAILABLE', {
157
+ reason: 'kafka-timeout-guard-unavailable',
158
+ retryable: false
159
+ });
160
+ }
161
+ armedFactories.add(armedCreateCluster);
162
+ }
163
+ function patchRequestQueuePrototype(proto) {
164
+ const originalSchedule = proto.scheduleCheckPendingRequests;
165
+ const originalDestroy = proto.destroy;
166
+ proto.scheduleCheckPendingRequests = function scheduleCheckPendingRequests() {
167
+ const owner = queueOwner(this);
168
+ // An unstamped queue belongs to a client this runtime did not create; its own
169
+ // scheduler is left alone rather than borrowed to another runtime.
170
+ if (!owner) {
171
+ originalSchedule.call(this);
172
+ return;
173
+ }
174
+ // A queue whose owner has begun disposing is retired: its timer is cleared and
175
+ // it is not re-armed, on this or any other runtime.
176
+ if (owner.signal.aborted) {
177
+ clearQueueTimer(this);
178
+ return;
179
+ }
180
+ // A timer armed on a live owner already covers this queue; KafkaJS's own
181
+ // scheduler returns early in the same situation.
182
+ if (queueTimers.get(this))
183
+ return;
184
+ let scheduleAt = this.throttledUntil - Date.now();
185
+ if (this.pending.length > 0) {
186
+ scheduleAt = scheduleAt > 0 ? scheduleAt : KAFKA_PENDING_CHECK_INTERVAL_MS;
187
+ }
188
+ else if (scheduleAt <= 0) {
189
+ return;
190
+ }
191
+ const onOwnerAbort = () => {
192
+ // The owning runtime is gone: its timer is cleared and not moved elsewhere.
193
+ queueTimers.delete(this);
194
+ owner.signal.removeEventListener('abort', onOwnerAbort);
195
+ };
196
+ const armed = armQueueTimer(owner, this, scheduleAt, onOwnerAbort);
197
+ if (!armed)
198
+ return;
199
+ queueTimers.set(this, { dispose: armed, owner, onOwnerAbort });
200
+ owner.signal.addEventListener('abort', onOwnerAbort, { once: true });
201
+ };
202
+ if (originalDestroy) {
203
+ proto.destroy = function destroy() {
204
+ clearQueueTimer(this);
205
+ originalDestroy.call(this);
206
+ };
207
+ }
208
+ }
209
+ export function createKafkaRequestQueueTimeoutGuard(options, runtimeOverrides = {}) {
210
+ let promise = null;
211
+ return function ensureKafkaRequestQueueTimeoutGuard() {
212
+ if (options.building() || runtimeOverrides.supported === false)
213
+ return Promise.resolve();
214
+ if (promise)
215
+ return promise;
216
+ promise = (async () => {
217
+ try {
218
+ // kafkajs ships no types for this deep runtime path; the package's
219
+ // `#kafkajs/request-queue` subpath import declares it through the owning
220
+ // constructor contract. A mismatch throws inside this try and surfaces
221
+ // as a CapabilityError below.
222
+ const requestQueueModule = runtimeOverrides.importModule
223
+ ? await runtimeOverrides.importModule(KAFKAJS_REQUEST_QUEUE_MODULE)
224
+ : await import('#kafkajs/request-queue');
225
+ const ctor = 'default' in requestQueueModule ? requestQueueModule.default : requestQueueModule;
226
+ const proto = ctor.prototype;
227
+ if (patchedPrototypes.has(proto))
228
+ return;
229
+ patchRequestQueuePrototype(proto);
230
+ patchedPrototypes.add(proto);
231
+ }
232
+ catch (error) {
233
+ const failure = valueFreeFailure(CaughtFailureSchema.parse(error));
234
+ options.logger.warn('Failed to install KafkaJS timeout guard', { reason: 'kafka-timeout-guard-unavailable' });
235
+ throw new CapabilityError('Kafka timeout protection is unavailable.', 'UNAVAILABLE', {
236
+ reason: 'kafka-timeout-guard-unavailable',
237
+ retryable: false,
238
+ details: { failure }
239
+ });
240
+ }
241
+ })();
242
+ return promise;
243
+ };
244
+ }
245
+ //# sourceMappingURL=request-queue-timeout-guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-queue-timeout-guard.js","sourceRoot":"","sources":["../src/request-queue-timeout-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAgB7F,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEpF,oFAAoF;AACpF,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AAC9D,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAGlE,SAAS,qBAAqB,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACpC,CAAC;AAED,SAAS,0BAA0B,CAAC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AAyC,EAAE,EAAE,MAAM,EAAE,iCAAiC,EAAE,CAAC,CAAC;gBAC9G,MAAM,IAAI,eAAe,CAAC,0CAA0C,EAAE,aAAa,EAAE;oBACpF,MAAM,EAAE,iCAAiC;oBACzC,SAAS,EAAE,KAAK;oBAChB,OAAO,EAAE,EAAE,OAAO,EAAE;iBACpB,CAAC,CAAC;YACJ,CAAC;QACF,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,OAAO,CAAC;IAChB,CAAC,CAAC;AACH,CAAC"}
@@ -0,0 +1,190 @@
1
+ import * as z from 'zod/v4';
2
+ import { CapabilityError } from '@vibesdotdev/kernel';
3
+ export declare enum KafkaConnectionPurpose {
4
+ CHAT = "chat",
5
+ WORKERS = "workers",
6
+ BENCHMARKS = "benchmarks",
7
+ ANALYTICS = "analytics"
8
+ }
9
+ export declare const KafkaPurposeSchema: z.ZodEnum<typeof KafkaConnectionPurpose>;
10
+ export declare const KafkaAdapterOptionsSchema: z.ZodObject<{
11
+ purpose: z.ZodEnum<typeof KafkaConnectionPurpose>;
12
+ }, z.core.$strip>;
13
+ export type KafkaAdapterOptions = z.infer<typeof KafkaAdapterOptionsSchema>;
14
+ export declare const KafkaSaslSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
+ username: z.ZodString;
16
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
17
+ source: z.ZodLiteral<"secret">;
18
+ key: z.ZodString;
19
+ store: z.ZodOptional<z.ZodString>;
20
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
21
+ }, z.core.$strict>], "source">;
22
+ mechanism: z.ZodLiteral<"plain">;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ username: z.ZodString;
25
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
26
+ source: z.ZodLiteral<"secret">;
27
+ key: z.ZodString;
28
+ store: z.ZodOptional<z.ZodString>;
29
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
30
+ }, z.core.$strict>], "source">;
31
+ mechanism: z.ZodLiteral<"scram-sha-256">;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ username: z.ZodString;
34
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
35
+ source: z.ZodLiteral<"secret">;
36
+ key: z.ZodString;
37
+ store: z.ZodOptional<z.ZodString>;
38
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
39
+ }, z.core.$strict>], "source">;
40
+ mechanism: z.ZodLiteral<"scram-sha-512">;
41
+ }, z.core.$strip>], "mechanism">;
42
+ export type KafkaSasl = z.infer<typeof KafkaSaslSchema>;
43
+ export declare const KafkaPublicConfigSchema: z.ZodObject<{
44
+ brokers: z.ZodArray<z.ZodString>;
45
+ ssl: z.ZodBoolean;
46
+ }, z.core.$strip>;
47
+ export type KafkaPublicConfig = z.infer<typeof KafkaPublicConfigSchema>;
48
+ export declare const KafkaConnectorConfigSchema: z.ZodObject<{
49
+ brokers: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
50
+ ssl: z.ZodDefault<z.ZodBoolean>;
51
+ sasl: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
52
+ username: z.ZodString;
53
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
54
+ source: z.ZodLiteral<"secret">;
55
+ key: z.ZodString;
56
+ store: z.ZodOptional<z.ZodString>;
57
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
58
+ }, z.core.$strict>], "source">;
59
+ mechanism: z.ZodLiteral<"plain">;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ username: z.ZodString;
62
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
63
+ source: z.ZodLiteral<"secret">;
64
+ key: z.ZodString;
65
+ store: z.ZodOptional<z.ZodString>;
66
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
67
+ }, z.core.$strict>], "source">;
68
+ mechanism: z.ZodLiteral<"scram-sha-256">;
69
+ }, z.core.$strip>, z.ZodObject<{
70
+ username: z.ZodString;
71
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
72
+ source: z.ZodLiteral<"secret">;
73
+ key: z.ZodString;
74
+ store: z.ZodOptional<z.ZodString>;
75
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
76
+ }, z.core.$strict>], "source">;
77
+ mechanism: z.ZodLiteral<"scram-sha-512">;
78
+ }, z.core.$strip>], "mechanism">>;
79
+ clientId: z.ZodOptional<z.ZodString>;
80
+ }, z.core.$strip>;
81
+ export declare const ResolvedKafkaConnectorConfigSchema: z.ZodObject<{
82
+ ssl: z.ZodDefault<z.ZodBoolean>;
83
+ sasl: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
84
+ username: z.ZodString;
85
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
86
+ source: z.ZodLiteral<"secret">;
87
+ key: z.ZodString;
88
+ store: z.ZodOptional<z.ZodString>;
89
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
90
+ }, z.core.$strict>], "source">;
91
+ mechanism: z.ZodLiteral<"plain">;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ username: z.ZodString;
94
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
95
+ source: z.ZodLiteral<"secret">;
96
+ key: z.ZodString;
97
+ store: z.ZodOptional<z.ZodString>;
98
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
99
+ }, z.core.$strict>], "source">;
100
+ mechanism: z.ZodLiteral<"scram-sha-256">;
101
+ }, z.core.$strip>, z.ZodObject<{
102
+ username: z.ZodString;
103
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
104
+ source: z.ZodLiteral<"secret">;
105
+ key: z.ZodString;
106
+ store: z.ZodOptional<z.ZodString>;
107
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
108
+ }, z.core.$strict>], "source">;
109
+ mechanism: z.ZodLiteral<"scram-sha-512">;
110
+ }, z.core.$strip>], "mechanism">>;
111
+ clientId: z.ZodOptional<z.ZodString>;
112
+ brokers: z.ZodArray<z.ZodString>;
113
+ }, z.core.$strip>;
114
+ export type KafkaConnectorConfig = z.input<typeof KafkaConnectorConfigSchema>;
115
+ export type ResolvedKafkaConnectorConfig = z.infer<typeof ResolvedKafkaConnectorConfigSchema>;
116
+ /**
117
+ * Connector declarations are parsed before merging with runtime broker settings.
118
+ * Password values remain credential references through config resolution.
119
+ */
120
+ export declare const KafkaConnectorDeclaredConfigSchema: z.ZodObject<{
121
+ brokers: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
122
+ sasl: z.ZodOptional<z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
123
+ username: z.ZodString;
124
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
125
+ source: z.ZodLiteral<"secret">;
126
+ key: z.ZodString;
127
+ store: z.ZodOptional<z.ZodString>;
128
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
129
+ }, z.core.$strict>], "source">;
130
+ mechanism: z.ZodLiteral<"plain">;
131
+ }, z.core.$strip>, z.ZodObject<{
132
+ username: z.ZodString;
133
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
134
+ source: z.ZodLiteral<"secret">;
135
+ key: z.ZodString;
136
+ store: z.ZodOptional<z.ZodString>;
137
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
138
+ }, z.core.$strict>], "source">;
139
+ mechanism: z.ZodLiteral<"scram-sha-256">;
140
+ }, z.core.$strip>, z.ZodObject<{
141
+ username: z.ZodString;
142
+ password: z.ZodDiscriminatedUnion<[z.ZodObject<{
143
+ source: z.ZodLiteral<"secret">;
144
+ key: z.ZodString;
145
+ store: z.ZodOptional<z.ZodString>;
146
+ operation: z.ZodOptional<z.ZodCustom<object, object>>;
147
+ }, z.core.$strict>], "source">;
148
+ mechanism: z.ZodLiteral<"scram-sha-512">;
149
+ }, z.core.$strip>], "mechanism">>>;
150
+ clientId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
151
+ ssl: z.ZodOptional<z.ZodBoolean>;
152
+ }, z.core.$strip>;
153
+ export type KafkaConnectorDeclaredConfig = z.input<typeof KafkaConnectorDeclaredConfigSchema>;
154
+ export declare const KafkaBaseOverridesSchema: z.ZodObject<{
155
+ brokers: z.ZodOptional<z.ZodArray<z.ZodString>>;
156
+ }, z.core.$strip>;
157
+ export declare const KafkaCustomConsumerOptionsSchema: z.ZodObject<{
158
+ sessionTimeout: z.ZodDefault<z.ZodNumber>;
159
+ heartbeatInterval: z.ZodDefault<z.ZodNumber>;
160
+ autoCommit: z.ZodOptional<z.ZodBoolean>;
161
+ autoCommitInterval: z.ZodDefault<z.ZodNumber>;
162
+ }, z.core.$strip>;
163
+ export type KafkaCustomConsumerOptions = z.input<typeof KafkaCustomConsumerOptionsSchema>;
164
+ export declare const KafkaEventEnvelopeSchema: z.ZodObject<{
165
+ id: z.ZodString;
166
+ timestamp: z.ZodString;
167
+ bus: z.ZodString;
168
+ event: z.ZodString;
169
+ payload: z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>;
170
+ metadata: z.ZodOptional<z.ZodType<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/schemas/json").JsonObject, import("@vibesdotdev/kernel/schemas/json").JsonObject>>>;
171
+ }, z.core.$catchall<z.ZodType<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue, z.core.$ZodTypeInternals<import("@vibesdotdev/kernel/bootstrap").JsonValue, import("@vibesdotdev/kernel/bootstrap").JsonValue>>>>;
172
+ export type KafkaEventEnvelope = z.infer<typeof KafkaEventEnvelopeSchema>;
173
+ export declare function parseKafkaEventJson(raw: string): {
174
+ readonly ok: false;
175
+ readonly error: CapabilityError;
176
+ readonly value?: undefined;
177
+ } | {
178
+ readonly ok: true;
179
+ readonly value: {
180
+ [x: string]: import("@vibesdotdev/kernel/bootstrap").JsonValue;
181
+ id: string;
182
+ timestamp: string;
183
+ bus: string;
184
+ event: string;
185
+ payload: import("@vibesdotdev/kernel/bootstrap").JsonValue;
186
+ metadata?: import("@vibesdotdev/kernel/schemas/json").JsonObject | undefined;
187
+ };
188
+ readonly error?: undefined;
189
+ };
190
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/schemas/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAyC,MAAM,qBAAqB,CAAC;AAG7F,oBAAY,sBAAsB;IACjC,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,SAAS,cAAc;CACvB;AACD,eAAO,MAAM,kBAAkB,0CAAiC,CAAC;AACjE,eAAO,MAAM,yBAAyB;;iBAA4C,CAAC;AACnF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKrC,CAAC;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE7C,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,K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