@maiaos/protocol 0.1.0-canary.56 → 0.1.0-canary.57

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 (90) hide show
  1. package/dist/agent/definition.d.ts +2 -2
  2. package/dist/configuration/configuration.d.ts +2 -0
  3. package/dist/configuration/configuration.d.ts.map +1 -1
  4. package/dist/configuration/configuration.js +11 -3
  5. package/dist/configuration/configuration.js.map +1 -1
  6. package/dist/configuration/index.d.ts +1 -1
  7. package/dist/configuration/index.d.ts.map +1 -1
  8. package/dist/configuration/index.js +1 -1
  9. package/dist/configuration/index.js.map +1 -1
  10. package/dist/coordinator-tool/index.d.ts +1 -1
  11. package/dist/coordinator-tool/index.d.ts.map +1 -1
  12. package/dist/coordinator-tool/index.js +1 -1
  13. package/dist/coordinator-tool/index.js.map +1 -1
  14. package/dist/coordinator-tool/input-schema.d.ts +0 -7
  15. package/dist/coordinator-tool/input-schema.d.ts.map +1 -1
  16. package/dist/coordinator-tool/input-schema.js +0 -38
  17. package/dist/coordinator-tool/input-schema.js.map +1 -1
  18. package/dist/coordinator-tool/registry.d.ts +5 -0
  19. package/dist/coordinator-tool/registry.d.ts.map +1 -1
  20. package/dist/coordinator-tool/registry.js +9 -1
  21. package/dist/coordinator-tool/registry.js.map +1 -1
  22. package/dist/event/lifecycle/effect-schema.d.ts +20 -0
  23. package/dist/event/lifecycle/effect-schema.d.ts.map +1 -0
  24. package/dist/event/lifecycle/effect-schema.js +23 -0
  25. package/dist/event/lifecycle/effect-schema.js.map +1 -0
  26. package/dist/event/lifecycle/index.d.ts +2 -0
  27. package/dist/event/lifecycle/index.d.ts.map +1 -0
  28. package/dist/event/lifecycle/index.js +2 -0
  29. package/dist/event/lifecycle/index.js.map +1 -0
  30. package/dist/event/lifecycle/schema.d.ts +14 -0
  31. package/dist/event/lifecycle/schema.d.ts.map +1 -0
  32. package/dist/event/lifecycle/schema.js +6 -0
  33. package/dist/event/lifecycle/schema.js.map +1 -0
  34. package/dist/event/registry.d.ts.map +1 -1
  35. package/dist/event/registry.js +31 -1
  36. package/dist/event/registry.js.map +1 -1
  37. package/dist/feature/registry.d.ts +3 -1
  38. package/dist/feature/registry.d.ts.map +1 -1
  39. package/dist/feature/registry.js +2 -0
  40. package/dist/feature/registry.js.map +1 -1
  41. package/dist/index.d.ts +3 -2
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +3 -2
  44. package/dist/index.js.map +1 -1
  45. package/dist/local-node/contract.d.ts +4 -3
  46. package/dist/local-node/contract.d.ts.map +1 -1
  47. package/dist/local-node/contract.js.map +1 -1
  48. package/dist/local-node/effect-schema.d.ts +161 -7
  49. package/dist/local-node/effect-schema.d.ts.map +1 -1
  50. package/dist/local-node/effect-schema.js +3 -0
  51. package/dist/local-node/effect-schema.js.map +1 -1
  52. package/dist/local-node/node-api/methods.d.ts +7 -3
  53. package/dist/local-node/node-api/methods.d.ts.map +1 -1
  54. package/dist/local-node/node-api/methods.js +8 -0
  55. package/dist/local-node/node-api/methods.js.map +1 -1
  56. package/dist/local-node/receipt-list.d.ts +1 -1
  57. package/dist/local-node/receipt-list.d.ts.map +1 -1
  58. package/dist/local-node/receipt-list.js +1 -0
  59. package/dist/local-node/receipt-list.js.map +1 -1
  60. package/dist/runtime-schema/effect-json-schema.d.ts +9 -0
  61. package/dist/runtime-schema/effect-json-schema.d.ts.map +1 -0
  62. package/dist/runtime-schema/effect-json-schema.js +41 -0
  63. package/dist/runtime-schema/effect-json-schema.js.map +1 -0
  64. package/dist/runtime-schema/effect-schema.d.ts +1 -0
  65. package/dist/runtime-schema/effect-schema.d.ts.map +1 -1
  66. package/dist/runtime-schema/effect-schema.js +1 -0
  67. package/dist/runtime-schema/effect-schema.js.map +1 -1
  68. package/dist/session/agent-permission-contract.d.ts +5 -5
  69. package/dist/session/agent-permission-effect-schema.d.ts +9 -9
  70. package/dist/webhooks/contract.d.ts +342 -0
  71. package/dist/webhooks/contract.d.ts.map +1 -0
  72. package/dist/webhooks/contract.js +25 -0
  73. package/dist/webhooks/contract.js.map +1 -0
  74. package/dist/webhooks/effect-schema.d.ts +536 -0
  75. package/dist/webhooks/effect-schema.d.ts.map +1 -0
  76. package/dist/webhooks/effect-schema.js +177 -0
  77. package/dist/webhooks/effect-schema.js.map +1 -0
  78. package/dist/webhooks/feature.d.ts +105 -0
  79. package/dist/webhooks/feature.d.ts.map +1 -0
  80. package/dist/webhooks/feature.js +103 -0
  81. package/dist/webhooks/feature.js.map +1 -0
  82. package/dist/webhooks/hook-effect-schema.d.ts +38 -0
  83. package/dist/webhooks/hook-effect-schema.d.ts.map +1 -0
  84. package/dist/webhooks/hook-effect-schema.js +64 -0
  85. package/dist/webhooks/hook-effect-schema.js.map +1 -0
  86. package/dist/webhooks/index.d.ts +3 -0
  87. package/dist/webhooks/index.d.ts.map +1 -0
  88. package/dist/webhooks/index.js +3 -0
  89. package/dist/webhooks/index.js.map +1 -0
  90. package/package.json +1 -1
@@ -0,0 +1,536 @@
1
+ import * as Schema from "effect/Schema";
2
+ export declare const WEBHOOK_SCHEMA_VERSION = "maia.webhook/v1";
3
+ export declare const WEBHOOK_AGGREGATE_TYPE = "webhook";
4
+ export declare const MAX_WEBHOOK_PAGE_SIZE = 100;
5
+ export declare const MAX_WEBHOOKS = 32;
6
+ export declare const webhookSpecEffectSchema: Schema.Struct<{
7
+ readonly allowPrivate: Schema.Boolean;
8
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
9
+ readonly filters: Schema.$Array<Schema.Struct<{
10
+ readonly key: Schema.String;
11
+ readonly value: Schema.String;
12
+ }>>;
13
+ readonly secretEnv: Schema.String;
14
+ readonly url: Schema.String;
15
+ }>;
16
+ export declare const webhookRecordEffectSchema: Schema.Struct<{
17
+ readonly actorId: Schema.String;
18
+ readonly createdAt: Schema.String;
19
+ readonly droppedParked: Schema.Int;
20
+ /** The oldest journal sequence that remained when a reset skipped events; absent until one happens. */
21
+ readonly gapOldest: Schema.optional<Schema.String>;
22
+ /** How often the journal expired events this hook had not read yet. */
23
+ readonly gapResets: Schema.Int;
24
+ readonly id: Schema.String;
25
+ readonly lastErrorClass: Schema.optional<Schema.String>;
26
+ readonly revision: Schema.String;
27
+ readonly schemaVersion: Schema.Literal<"maia.webhook/v1">;
28
+ readonly spec: Schema.Struct<{
29
+ readonly allowPrivate: Schema.Boolean;
30
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
31
+ readonly filters: Schema.$Array<Schema.Struct<{
32
+ readonly key: Schema.String;
33
+ readonly value: Schema.String;
34
+ }>>;
35
+ readonly secretEnv: Schema.String;
36
+ readonly url: Schema.String;
37
+ }>;
38
+ readonly state: Schema.Literals<readonly ["active", "removed"]>;
39
+ readonly updatedAt: Schema.String;
40
+ }>;
41
+ export declare const deliveryStateEffectSchema: Schema.Literals<readonly ["dead", "delivered", "denied", "expired", "in_flight", "pending", "retry"]>;
42
+ export declare const webhookDeliveryEffectSchema: Schema.Struct<{
43
+ readonly attempts: Schema.Int;
44
+ readonly createdAt: Schema.String;
45
+ readonly errorClass: Schema.optional<Schema.String>;
46
+ readonly eventId: Schema.String;
47
+ readonly id: Schema.String;
48
+ readonly kind: Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>;
49
+ readonly nextAttemptAt: Schema.optional<Schema.String>;
50
+ readonly state: Schema.Literals<readonly ["dead", "delivered", "denied", "expired", "in_flight", "pending", "retry"]>;
51
+ readonly updatedAt: Schema.String;
52
+ readonly webhookId: Schema.String;
53
+ }>;
54
+ export declare const webhooksListParametersEffectSchema: Schema.Struct<{
55
+ afterCursor: Schema.optional<Schema.String>;
56
+ limit: Schema.Int;
57
+ }>;
58
+ export declare const webhooksListResultEffectSchema: Schema.Struct<{
59
+ readonly items: Schema.$Array<Schema.Struct<{
60
+ readonly actorId: Schema.String;
61
+ readonly createdAt: Schema.String;
62
+ readonly droppedParked: Schema.Int;
63
+ /** The oldest journal sequence that remained when a reset skipped events; absent until one happens. */
64
+ readonly gapOldest: Schema.optional<Schema.String>;
65
+ /** How often the journal expired events this hook had not read yet. */
66
+ readonly gapResets: Schema.Int;
67
+ readonly id: Schema.String;
68
+ readonly lastErrorClass: Schema.optional<Schema.String>;
69
+ readonly revision: Schema.String;
70
+ readonly schemaVersion: Schema.Literal<"maia.webhook/v1">;
71
+ readonly spec: Schema.Struct<{
72
+ readonly allowPrivate: Schema.Boolean;
73
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
74
+ readonly filters: Schema.$Array<Schema.Struct<{
75
+ readonly key: Schema.String;
76
+ readonly value: Schema.String;
77
+ }>>;
78
+ readonly secretEnv: Schema.String;
79
+ readonly url: Schema.String;
80
+ }>;
81
+ readonly state: Schema.Literals<readonly ["active", "removed"]>;
82
+ readonly updatedAt: Schema.String;
83
+ }>>;
84
+ readonly method: Schema.Literal<"webhooks.list">;
85
+ readonly nextCursor: Schema.optional<Schema.String>;
86
+ }>;
87
+ /** Parked and denied deliveries are what an operator needs, so `failedOnly` lists those. */
88
+ export declare const webhooksDeliveriesParametersEffectSchema: Schema.Struct<{
89
+ readonly afterCursor: Schema.optional<Schema.String>;
90
+ readonly limit: Schema.Int;
91
+ readonly failedOnly: Schema.optional<Schema.Boolean>;
92
+ readonly webhookId: Schema.optional<Schema.String>;
93
+ }>;
94
+ export declare const webhooksDeliveriesResultEffectSchema: Schema.Struct<{
95
+ readonly items: Schema.$Array<Schema.Struct<{
96
+ readonly attempts: Schema.Int;
97
+ readonly createdAt: Schema.String;
98
+ readonly errorClass: Schema.optional<Schema.String>;
99
+ readonly eventId: Schema.String;
100
+ readonly id: Schema.String;
101
+ readonly kind: Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>;
102
+ readonly nextAttemptAt: Schema.optional<Schema.String>;
103
+ readonly state: Schema.Literals<readonly ["dead", "delivered", "denied", "expired", "in_flight", "pending", "retry"]>;
104
+ readonly updatedAt: Schema.String;
105
+ readonly webhookId: Schema.String;
106
+ }>>;
107
+ readonly method: Schema.Literal<"webhooks.deliveries">;
108
+ readonly nextCursor: Schema.optional<Schema.String>;
109
+ }>;
110
+ /** A change names one exact webhook at its revision, or one delivery to send again (its webhook follows from the delivery). */
111
+ export declare const webhookChangeEffectSchema: Schema.Union<readonly [Schema.Struct<{
112
+ readonly kind: Schema.Literal<"add">;
113
+ readonly spec: Schema.Struct<{
114
+ readonly allowPrivate: Schema.Boolean;
115
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
116
+ readonly filters: Schema.$Array<Schema.Struct<{
117
+ readonly key: Schema.String;
118
+ readonly value: Schema.String;
119
+ }>>;
120
+ readonly secretEnv: Schema.String;
121
+ readonly url: Schema.String;
122
+ }>;
123
+ }>, Schema.Struct<{
124
+ readonly expectedRevision: Schema.String;
125
+ readonly webhookId: Schema.String;
126
+ readonly kind: Schema.Literal<"remove">;
127
+ }>, Schema.Struct<{
128
+ readonly expectedRevision: Schema.String;
129
+ readonly webhookId: Schema.String;
130
+ readonly kind: Schema.Literal<"test">;
131
+ }>, Schema.Struct<{
132
+ readonly deliveryId: Schema.String;
133
+ readonly expectedRevision: Schema.String;
134
+ readonly kind: Schema.Literal<"redeliver">;
135
+ }>]>;
136
+ export declare const webhooksChangePreviewParametersEffectSchema: Schema.Struct<{
137
+ change: Schema.Union<readonly [Schema.Struct<{
138
+ readonly kind: Schema.Literal<"add">;
139
+ readonly spec: Schema.Struct<{
140
+ readonly allowPrivate: Schema.Boolean;
141
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
142
+ readonly filters: Schema.$Array<Schema.Struct<{
143
+ readonly key: Schema.String;
144
+ readonly value: Schema.String;
145
+ }>>;
146
+ readonly secretEnv: Schema.String;
147
+ readonly url: Schema.String;
148
+ }>;
149
+ }>, Schema.Struct<{
150
+ readonly expectedRevision: Schema.String;
151
+ readonly webhookId: Schema.String;
152
+ readonly kind: Schema.Literal<"remove">;
153
+ }>, Schema.Struct<{
154
+ readonly expectedRevision: Schema.String;
155
+ readonly webhookId: Schema.String;
156
+ readonly kind: Schema.Literal<"test">;
157
+ }>, Schema.Struct<{
158
+ readonly deliveryId: Schema.String;
159
+ readonly expectedRevision: Schema.String;
160
+ readonly kind: Schema.Literal<"redeliver">;
161
+ }>]>;
162
+ commandId: Schema.String;
163
+ }>;
164
+ export declare const webhooksChangeConfirmParametersEffectSchema: Schema.Struct<{
165
+ readonly change: Schema.Union<readonly [Schema.Struct<{
166
+ readonly kind: Schema.Literal<"add">;
167
+ readonly spec: Schema.Struct<{
168
+ readonly allowPrivate: Schema.Boolean;
169
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
170
+ readonly filters: Schema.$Array<Schema.Struct<{
171
+ readonly key: Schema.String;
172
+ readonly value: Schema.String;
173
+ }>>;
174
+ readonly secretEnv: Schema.String;
175
+ readonly url: Schema.String;
176
+ }>;
177
+ }>, Schema.Struct<{
178
+ readonly expectedRevision: Schema.String;
179
+ readonly webhookId: Schema.String;
180
+ readonly kind: Schema.Literal<"remove">;
181
+ }>, Schema.Struct<{
182
+ readonly expectedRevision: Schema.String;
183
+ readonly webhookId: Schema.String;
184
+ readonly kind: Schema.Literal<"test">;
185
+ }>, Schema.Struct<{
186
+ readonly deliveryId: Schema.String;
187
+ readonly expectedRevision: Schema.String;
188
+ readonly kind: Schema.Literal<"redeliver">;
189
+ }>]>;
190
+ readonly commandId: Schema.String;
191
+ readonly inputDigest: Schema.String;
192
+ readonly proof: Schema.String;
193
+ }>;
194
+ /** The preview names the webhook and its destination, and counts the deliveries a removal deletes. */
195
+ export declare const webhooksChangePreviewResultEffectSchema: Schema.Struct<{
196
+ readonly change: Schema.Union<readonly [Schema.Struct<{
197
+ readonly kind: Schema.Literal<"add">;
198
+ readonly spec: Schema.Struct<{
199
+ readonly allowPrivate: Schema.Boolean;
200
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
201
+ readonly filters: Schema.$Array<Schema.Struct<{
202
+ readonly key: Schema.String;
203
+ readonly value: Schema.String;
204
+ }>>;
205
+ readonly secretEnv: Schema.String;
206
+ readonly url: Schema.String;
207
+ }>;
208
+ }>, Schema.Struct<{
209
+ readonly expectedRevision: Schema.String;
210
+ readonly webhookId: Schema.String;
211
+ readonly kind: Schema.Literal<"remove">;
212
+ }>, Schema.Struct<{
213
+ readonly expectedRevision: Schema.String;
214
+ readonly webhookId: Schema.String;
215
+ readonly kind: Schema.Literal<"test">;
216
+ }>, Schema.Struct<{
217
+ readonly deliveryId: Schema.String;
218
+ readonly expectedRevision: Schema.String;
219
+ readonly kind: Schema.Literal<"redeliver">;
220
+ }>]>;
221
+ readonly commandId: Schema.String;
222
+ readonly inputDigest: Schema.String;
223
+ readonly proof: Schema.String;
224
+ readonly actorId: Schema.String;
225
+ readonly current: Schema.optional<Schema.Struct<{
226
+ readonly actorId: Schema.String;
227
+ readonly createdAt: Schema.String;
228
+ readonly droppedParked: Schema.Int;
229
+ /** The oldest journal sequence that remained when a reset skipped events; absent until one happens. */
230
+ readonly gapOldest: Schema.optional<Schema.String>;
231
+ /** How often the journal expired events this hook had not read yet. */
232
+ readonly gapResets: Schema.Int;
233
+ readonly id: Schema.String;
234
+ readonly lastErrorClass: Schema.optional<Schema.String>;
235
+ readonly revision: Schema.String;
236
+ readonly schemaVersion: Schema.Literal<"maia.webhook/v1">;
237
+ readonly spec: Schema.Struct<{
238
+ readonly allowPrivate: Schema.Boolean;
239
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
240
+ readonly filters: Schema.$Array<Schema.Struct<{
241
+ readonly key: Schema.String;
242
+ readonly value: Schema.String;
243
+ }>>;
244
+ readonly secretEnv: Schema.String;
245
+ readonly url: Schema.String;
246
+ }>;
247
+ readonly state: Schema.Literals<readonly ["active", "removed"]>;
248
+ readonly updatedAt: Schema.String;
249
+ }>>;
250
+ readonly deletesDeliveries: Schema.optional<Schema.Int>;
251
+ readonly expiresAt: Schema.String;
252
+ readonly issuedAt: Schema.String;
253
+ readonly method: Schema.Literal<"webhooks.change.preview">;
254
+ readonly webhookId: Schema.String;
255
+ }>;
256
+ export declare const webhooksChangeConfirmResultEffectSchema: Schema.Struct<{
257
+ readonly actorId: Schema.String;
258
+ readonly commandId: Schema.String;
259
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
260
+ readonly deliveryId: Schema.optional<Schema.String>;
261
+ readonly inputDigest: Schema.String;
262
+ readonly kind: Schema.Literals<readonly ["add", "redeliver", "remove", "test"]>;
263
+ readonly method: Schema.Literal<"webhooks.change.confirm">;
264
+ readonly receipt: Schema.Struct<{
265
+ readonly actorId: Schema.String;
266
+ readonly aggregateRevision: Schema.String;
267
+ readonly commandId: Schema.String;
268
+ readonly createdAt: Schema.String;
269
+ readonly eventCursor: Schema.String;
270
+ readonly method: Schema.String;
271
+ readonly receiptId: Schema.String;
272
+ readonly schemaVersion: Schema.Literal<1>;
273
+ readonly state: Schema.Literal<"succeeded">;
274
+ readonly target: Schema.Struct<{
275
+ readonly id: Schema.String;
276
+ readonly type: Schema.String;
277
+ }>;
278
+ readonly updatedAt: Schema.String;
279
+ }>;
280
+ readonly webhook: Schema.Struct<{
281
+ readonly actorId: Schema.String;
282
+ readonly createdAt: Schema.String;
283
+ readonly droppedParked: Schema.Int;
284
+ /** The oldest journal sequence that remained when a reset skipped events; absent until one happens. */
285
+ readonly gapOldest: Schema.optional<Schema.String>;
286
+ /** How often the journal expired events this hook had not read yet. */
287
+ readonly gapResets: Schema.Int;
288
+ readonly id: Schema.String;
289
+ readonly lastErrorClass: Schema.optional<Schema.String>;
290
+ readonly revision: Schema.String;
291
+ readonly schemaVersion: Schema.Literal<"maia.webhook/v1">;
292
+ readonly spec: Schema.Struct<{
293
+ readonly allowPrivate: Schema.Boolean;
294
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
295
+ readonly filters: Schema.$Array<Schema.Struct<{
296
+ readonly key: Schema.String;
297
+ readonly value: Schema.String;
298
+ }>>;
299
+ readonly secretEnv: Schema.String;
300
+ readonly url: Schema.String;
301
+ }>;
302
+ readonly state: Schema.Literals<readonly ["active", "removed"]>;
303
+ readonly updatedAt: Schema.String;
304
+ }>;
305
+ }>;
306
+ export declare const webhooksRequestEffectSchema: Schema.Union<readonly [Schema.Struct<{
307
+ readonly method: Schema.Literal<"webhooks.list">;
308
+ readonly parameters: Schema.Struct<{
309
+ afterCursor: Schema.optional<Schema.String>;
310
+ limit: Schema.Int;
311
+ }>;
312
+ }>, Schema.Struct<{
313
+ readonly method: Schema.Literal<"webhooks.deliveries">;
314
+ readonly parameters: Schema.Struct<{
315
+ readonly afterCursor: Schema.optional<Schema.String>;
316
+ readonly limit: Schema.Int;
317
+ readonly failedOnly: Schema.optional<Schema.Boolean>;
318
+ readonly webhookId: Schema.optional<Schema.String>;
319
+ }>;
320
+ }>, Schema.Struct<{
321
+ readonly method: Schema.Literal<"webhooks.change.preview">;
322
+ readonly parameters: Schema.Struct<{
323
+ change: Schema.Union<readonly [Schema.Struct<{
324
+ readonly kind: Schema.Literal<"add">;
325
+ readonly spec: Schema.Struct<{
326
+ readonly allowPrivate: Schema.Boolean;
327
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
328
+ readonly filters: Schema.$Array<Schema.Struct<{
329
+ readonly key: Schema.String;
330
+ readonly value: Schema.String;
331
+ }>>;
332
+ readonly secretEnv: Schema.String;
333
+ readonly url: Schema.String;
334
+ }>;
335
+ }>, Schema.Struct<{
336
+ readonly expectedRevision: Schema.String;
337
+ readonly webhookId: Schema.String;
338
+ readonly kind: Schema.Literal<"remove">;
339
+ }>, Schema.Struct<{
340
+ readonly expectedRevision: Schema.String;
341
+ readonly webhookId: Schema.String;
342
+ readonly kind: Schema.Literal<"test">;
343
+ }>, Schema.Struct<{
344
+ readonly deliveryId: Schema.String;
345
+ readonly expectedRevision: Schema.String;
346
+ readonly kind: Schema.Literal<"redeliver">;
347
+ }>]>;
348
+ commandId: Schema.String;
349
+ }>;
350
+ }>, Schema.Struct<{
351
+ readonly method: Schema.Literal<"webhooks.change.confirm">;
352
+ readonly parameters: Schema.Struct<{
353
+ readonly change: Schema.Union<readonly [Schema.Struct<{
354
+ readonly kind: Schema.Literal<"add">;
355
+ readonly spec: Schema.Struct<{
356
+ readonly allowPrivate: Schema.Boolean;
357
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
358
+ readonly filters: Schema.$Array<Schema.Struct<{
359
+ readonly key: Schema.String;
360
+ readonly value: Schema.String;
361
+ }>>;
362
+ readonly secretEnv: Schema.String;
363
+ readonly url: Schema.String;
364
+ }>;
365
+ }>, Schema.Struct<{
366
+ readonly expectedRevision: Schema.String;
367
+ readonly webhookId: Schema.String;
368
+ readonly kind: Schema.Literal<"remove">;
369
+ }>, Schema.Struct<{
370
+ readonly expectedRevision: Schema.String;
371
+ readonly webhookId: Schema.String;
372
+ readonly kind: Schema.Literal<"test">;
373
+ }>, Schema.Struct<{
374
+ readonly deliveryId: Schema.String;
375
+ readonly expectedRevision: Schema.String;
376
+ readonly kind: Schema.Literal<"redeliver">;
377
+ }>]>;
378
+ readonly commandId: Schema.String;
379
+ readonly inputDigest: Schema.String;
380
+ readonly proof: Schema.String;
381
+ }>;
382
+ }>]>;
383
+ export declare const webhooksResultEffectSchema: Schema.Union<readonly [Schema.Struct<{
384
+ readonly items: Schema.$Array<Schema.Struct<{
385
+ readonly actorId: Schema.String;
386
+ readonly createdAt: Schema.String;
387
+ readonly droppedParked: Schema.Int;
388
+ /** The oldest journal sequence that remained when a reset skipped events; absent until one happens. */
389
+ readonly gapOldest: Schema.optional<Schema.String>;
390
+ /** How often the journal expired events this hook had not read yet. */
391
+ readonly gapResets: Schema.Int;
392
+ readonly id: Schema.String;
393
+ readonly lastErrorClass: Schema.optional<Schema.String>;
394
+ readonly revision: Schema.String;
395
+ readonly schemaVersion: Schema.Literal<"maia.webhook/v1">;
396
+ readonly spec: Schema.Struct<{
397
+ readonly allowPrivate: Schema.Boolean;
398
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
399
+ readonly filters: Schema.$Array<Schema.Struct<{
400
+ readonly key: Schema.String;
401
+ readonly value: Schema.String;
402
+ }>>;
403
+ readonly secretEnv: Schema.String;
404
+ readonly url: Schema.String;
405
+ }>;
406
+ readonly state: Schema.Literals<readonly ["active", "removed"]>;
407
+ readonly updatedAt: Schema.String;
408
+ }>>;
409
+ readonly method: Schema.Literal<"webhooks.list">;
410
+ readonly nextCursor: Schema.optional<Schema.String>;
411
+ }>, Schema.Struct<{
412
+ readonly items: Schema.$Array<Schema.Struct<{
413
+ readonly attempts: Schema.Int;
414
+ readonly createdAt: Schema.String;
415
+ readonly errorClass: Schema.optional<Schema.String>;
416
+ readonly eventId: Schema.String;
417
+ readonly id: Schema.String;
418
+ readonly kind: Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>;
419
+ readonly nextAttemptAt: Schema.optional<Schema.String>;
420
+ readonly state: Schema.Literals<readonly ["dead", "delivered", "denied", "expired", "in_flight", "pending", "retry"]>;
421
+ readonly updatedAt: Schema.String;
422
+ readonly webhookId: Schema.String;
423
+ }>>;
424
+ readonly method: Schema.Literal<"webhooks.deliveries">;
425
+ readonly nextCursor: Schema.optional<Schema.String>;
426
+ }>, Schema.Struct<{
427
+ readonly change: Schema.Union<readonly [Schema.Struct<{
428
+ readonly kind: Schema.Literal<"add">;
429
+ readonly spec: Schema.Struct<{
430
+ readonly allowPrivate: Schema.Boolean;
431
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
432
+ readonly filters: Schema.$Array<Schema.Struct<{
433
+ readonly key: Schema.String;
434
+ readonly value: Schema.String;
435
+ }>>;
436
+ readonly secretEnv: Schema.String;
437
+ readonly url: Schema.String;
438
+ }>;
439
+ }>, Schema.Struct<{
440
+ readonly expectedRevision: Schema.String;
441
+ readonly webhookId: Schema.String;
442
+ readonly kind: Schema.Literal<"remove">;
443
+ }>, Schema.Struct<{
444
+ readonly expectedRevision: Schema.String;
445
+ readonly webhookId: Schema.String;
446
+ readonly kind: Schema.Literal<"test">;
447
+ }>, Schema.Struct<{
448
+ readonly deliveryId: Schema.String;
449
+ readonly expectedRevision: Schema.String;
450
+ readonly kind: Schema.Literal<"redeliver">;
451
+ }>]>;
452
+ readonly commandId: Schema.String;
453
+ readonly inputDigest: Schema.String;
454
+ readonly proof: Schema.String;
455
+ readonly actorId: Schema.String;
456
+ readonly current: Schema.optional<Schema.Struct<{
457
+ readonly actorId: Schema.String;
458
+ readonly createdAt: Schema.String;
459
+ readonly droppedParked: Schema.Int;
460
+ /** The oldest journal sequence that remained when a reset skipped events; absent until one happens. */
461
+ readonly gapOldest: Schema.optional<Schema.String>;
462
+ /** How often the journal expired events this hook had not read yet. */
463
+ readonly gapResets: Schema.Int;
464
+ readonly id: Schema.String;
465
+ readonly lastErrorClass: Schema.optional<Schema.String>;
466
+ readonly revision: Schema.String;
467
+ readonly schemaVersion: Schema.Literal<"maia.webhook/v1">;
468
+ readonly spec: Schema.Struct<{
469
+ readonly allowPrivate: Schema.Boolean;
470
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
471
+ readonly filters: Schema.$Array<Schema.Struct<{
472
+ readonly key: Schema.String;
473
+ readonly value: Schema.String;
474
+ }>>;
475
+ readonly secretEnv: Schema.String;
476
+ readonly url: Schema.String;
477
+ }>;
478
+ readonly state: Schema.Literals<readonly ["active", "removed"]>;
479
+ readonly updatedAt: Schema.String;
480
+ }>>;
481
+ readonly deletesDeliveries: Schema.optional<Schema.Int>;
482
+ readonly expiresAt: Schema.String;
483
+ readonly issuedAt: Schema.String;
484
+ readonly method: Schema.Literal<"webhooks.change.preview">;
485
+ readonly webhookId: Schema.String;
486
+ }>, Schema.Struct<{
487
+ readonly actorId: Schema.String;
488
+ readonly commandId: Schema.String;
489
+ readonly delivery: Schema.Literals<readonly ["new", "duplicate"]>;
490
+ readonly deliveryId: Schema.optional<Schema.String>;
491
+ readonly inputDigest: Schema.String;
492
+ readonly kind: Schema.Literals<readonly ["add", "redeliver", "remove", "test"]>;
493
+ readonly method: Schema.Literal<"webhooks.change.confirm">;
494
+ readonly receipt: Schema.Struct<{
495
+ readonly actorId: Schema.String;
496
+ readonly aggregateRevision: Schema.String;
497
+ readonly commandId: Schema.String;
498
+ readonly createdAt: Schema.String;
499
+ readonly eventCursor: Schema.String;
500
+ readonly method: Schema.String;
501
+ readonly receiptId: Schema.String;
502
+ readonly schemaVersion: Schema.Literal<1>;
503
+ readonly state: Schema.Literal<"succeeded">;
504
+ readonly target: Schema.Struct<{
505
+ readonly id: Schema.String;
506
+ readonly type: Schema.String;
507
+ }>;
508
+ readonly updatedAt: Schema.String;
509
+ }>;
510
+ readonly webhook: Schema.Struct<{
511
+ readonly actorId: Schema.String;
512
+ readonly createdAt: Schema.String;
513
+ readonly droppedParked: Schema.Int;
514
+ /** The oldest journal sequence that remained when a reset skipped events; absent until one happens. */
515
+ readonly gapOldest: Schema.optional<Schema.String>;
516
+ /** How often the journal expired events this hook had not read yet. */
517
+ readonly gapResets: Schema.Int;
518
+ readonly id: Schema.String;
519
+ readonly lastErrorClass: Schema.optional<Schema.String>;
520
+ readonly revision: Schema.String;
521
+ readonly schemaVersion: Schema.Literal<"maia.webhook/v1">;
522
+ readonly spec: Schema.Struct<{
523
+ readonly allowPrivate: Schema.Boolean;
524
+ readonly events: Schema.$Array<Schema.Literals<readonly ["admission.refused", "node.started", "node.stopping", "session.adopted", "session.blocked", "session.ended", "session.idle", "session.runtime.failed", "session.started", "session.turn.completed", "session.turn.failed", "session.working", "update.done", "webhook.test"]>>;
525
+ readonly filters: Schema.$Array<Schema.Struct<{
526
+ readonly key: Schema.String;
527
+ readonly value: Schema.String;
528
+ }>>;
529
+ readonly secretEnv: Schema.String;
530
+ readonly url: Schema.String;
531
+ }>;
532
+ readonly state: Schema.Literals<readonly ["active", "removed"]>;
533
+ readonly updatedAt: Schema.String;
534
+ }>;
535
+ }>]>;
536
+ //# sourceMappingURL=effect-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect-schema.d.ts","sourceRoot":"","sources":["../../src/webhooks/effect-schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAWxC,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AACxD,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAgD/B,eAAO,MAAM,uBAAuB;;;;;;;;;EAelC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;IAIpC,uGAAuG;;IAEvG,uEAAuE;;;;;;;;;;;;;;;;;;EASvE,CAAC;AAEH,eAAO,MAAM,yBAAyB,uGAQpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;EAWtC,CAAC;AASH,eAAO,MAAM,kCAAkC;;;EAAsB,CAAC;AACtE,eAAO,MAAM,8BAA8B;;;;;QA5CzC,uGAAuG;;QAEvG,uEAAuE;;;;;;;;;;;;;;;;;;;;;EAgDvE,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,wCAAwC;;;;;EAInD,CAAC;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;EAM/C,CAAC;AAGH,+HAA+H;AAC/H,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;IASpC,CAAC;AAKH,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;EACjC,CAAC;AACxB,eAAO,MAAM,2CAA2C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtD,CAAC;AAEH,sGAAsG;AACtG,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA1FlD,uGAAuG;;QAEvG,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;EAgHxE,CAAC;AAEF,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;QApHlD,uGAAuG;;QAEvG,uEAAuE;;;;;;;;;;;;;;;;;;;EAwIxE,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBtC,CAAC;AACH,eAAO,MAAM,0BAA0B;;;;;QA9JrC,uGAAuG;;QAEvG,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAFvE,uGAAuG;;QAEvG,uEAAuE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAFvE,uGAAuG;;QAEvG,uEAAuE;;;;;;;;;;;;;;;;;;;IAiKvE,CAAC"}