@dual-os/sdk 0.9.2 → 0.11.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/AgentChannel.d.ts +830 -71
- package/dist/AgentChannel.d.ts.map +1 -1
- package/dist/AgentChannel.js +120 -15
- package/dist/AgentChannel.js.map +1 -1
- package/dist/AgentChannelConformance.d.ts +602 -6
- package/dist/AgentChannelConformance.d.ts.map +1 -1
- package/dist/AgentChannelRuntime.js +4 -3
- package/dist/AgentChannelRuntime.js.map +1 -1
- package/dist/Files.d.ts +1 -1
- package/dist/Files.js +2 -2
- package/dist/Files.js.map +1 -1
- package/dist/Http.d.ts +38 -36
- package/dist/Http.d.ts.map +1 -1
- package/dist/Http.js +28 -25
- package/dist/Http.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/remote-runtime.d.ts.map +1 -1
- package/dist/remote-runtime.js +15 -11
- package/dist/remote-runtime.js.map +1 -1
- package/package.json +1 -1
- package/src/AgentChannel.ts +125 -22
- package/src/AgentChannelRuntime.ts +11 -3
- package/src/Files.ts +2 -2
- package/src/Http.ts +33 -31
- package/src/remote-runtime.ts +10 -5
package/dist/AgentChannel.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Any as Any$1, Value } from "./AuthMethod.js";
|
|
|
2
2
|
import "./AgentChannel.js";
|
|
3
3
|
import { Context, Effect, Pipeable, Schema } from "effect";
|
|
4
4
|
declare namespace AgentChannel_d_exports {
|
|
5
|
-
export { AccessOutcome, AgentChannel, Any, Asset, AssetFile, ChannelError, ChannelOptions, CheckedResult, Command, CommandFor, Content, ContextMessage, Contract, Definition, DeliveryUpdate, Destination, Echo, ErrorCode, Event, Exposure, FailureCode, Features, Handler, HandlerContext, HandlerError, Key, Message, Operation, OperationKind, Plan, PlanItem, Reaction, Request, RequiredChecks, ResolvedAuth, Result, ResultFor, RuntimeContract, Stop, Timestamp, TypeId, Verification, VerifiedIdentity, WebhookResponse, commandSchema, contextResult, handlerKey, isAgentChannel, make, projectContract, resultByteLimit, resultSchema, validateDefinition };
|
|
5
|
+
export { AccessOutcome, AgentChannel, Any, Asset, AssetFile, ChannelError, ChannelOptions, CheckedResult, Command, CommandFor, Content, ContextMessage, Contract, Definition, DeliveryUpdate, Destination, Echo, ErrorCode, Event, Exposure, FailureCode, Features, Handler, HandlerContext, HandlerError, Key, Message, Operation, OperationKind, Plan, PlanItem, Reaction, Request, RequiredChecks, ResolvedAuth, Result, ResultFor, RuntimeContract, SenderDetails, Stop, Timestamp, TypeId, Verification, VerifiedIdentity, WebhookResponse, commandSchema, contextResult, handlerKey, isAgentChannel, make, projectContract, resultByteLimit, resultSchema, senderDetails, validateDefinition };
|
|
6
6
|
}
|
|
7
7
|
export declare const TypeId: "@dual-os/sdk/AgentChannel";
|
|
8
8
|
export type TypeId = typeof TypeId;
|
|
@@ -28,7 +28,11 @@ export declare const Features: Schema.Struct<{
|
|
|
28
28
|
readonly operations: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["present_outcome", "create_message", "update_message", "delete_message", "set_reaction", "set_activity", "render_plan"]>>>;
|
|
29
29
|
/** Whether `read_context` returns the conversation's earlier messages. */
|
|
30
30
|
readonly readContext: Schema.optionalKey<Schema.Boolean>;
|
|
31
|
+
/** Whether `read_sender` names a sender its messages do not; requires `senderDetails`. */
|
|
32
|
+
readonly readSender: Schema.optionalKey<Schema.Boolean>;
|
|
31
33
|
readonly replies: Schema.Boolean;
|
|
34
|
+
/** Whether messages and context messages may name their sender beyond `senderKey`. */
|
|
35
|
+
readonly senderDetails: Schema.optionalKey<Schema.Boolean>;
|
|
32
36
|
/** Maximum age of the original responding input before preparation and delivery. */
|
|
33
37
|
readonly responseWindowMs: Schema.optionalKey<Schema.Int>;
|
|
34
38
|
readonly threads: Schema.Boolean;
|
|
@@ -83,6 +87,24 @@ export declare const VerifiedIdentity: Schema.Struct<{
|
|
|
83
87
|
}>;
|
|
84
88
|
readonly senderKey: Schema.NonEmptyString;
|
|
85
89
|
}>;
|
|
90
|
+
/** What a provider says about a sender besides `senderKey`, the ID to act on; none grants. */
|
|
91
|
+
export declare const SenderDetails: Schema.Struct<{
|
|
92
|
+
/** An address the provider lists for the sender. */
|
|
93
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
94
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
95
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
96
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
97
|
+
}>;
|
|
98
|
+
export type SenderDetails = typeof SenderDetails.Type;
|
|
99
|
+
/**
|
|
100
|
+
* Sender details from a provider's raw values: names trimmed, without control characters and cut
|
|
101
|
+
* to 256 characters, a handle without its leading `@`; an empty value or an invalid email is left out.
|
|
102
|
+
*/
|
|
103
|
+
export declare const senderDetails: (values: {
|
|
104
|
+
readonly email?: string | null | undefined;
|
|
105
|
+
readonly handle?: string | null | undefined;
|
|
106
|
+
readonly name?: string | null | undefined;
|
|
107
|
+
}) => SenderDetails;
|
|
86
108
|
export type VerifiedIdentity = typeof VerifiedIdentity.Type;
|
|
87
109
|
export declare const AccessOutcome: Schema.Struct<{
|
|
88
110
|
readonly decision: Schema.Literals<readonly ["allow", "deny"]>;
|
|
@@ -94,7 +116,13 @@ export declare const Verification: Schema.Struct<{
|
|
|
94
116
|
export type Verification = typeof Verification.Type;
|
|
95
117
|
export declare const Exposure: Schema.Literals<readonly ["webhook", "host"]>;
|
|
96
118
|
export declare const RequiredChecks: Schema.Tuple<readonly [Schema.Literal<"access">]>;
|
|
119
|
+
/** A message; sender details only where a version declares `senderDetails`. */
|
|
97
120
|
export declare const Message: Schema.Struct<{
|
|
121
|
+
/** An address the provider lists for the sender. */
|
|
122
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
123
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
124
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
125
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
98
126
|
readonly content: Schema.Struct<{
|
|
99
127
|
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
100
128
|
readonly assetKey: Schema.NonEmptyString;
|
|
@@ -157,6 +185,11 @@ export declare const Stop: Schema.Struct<{
|
|
|
157
185
|
readonly timestamp: Schema.String;
|
|
158
186
|
}>;
|
|
159
187
|
export declare const Event: Schema.Union<readonly [Schema.Struct<{
|
|
188
|
+
/** An address the provider lists for the sender. */
|
|
189
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
190
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
191
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
192
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
160
193
|
readonly content: Schema.Struct<{
|
|
161
194
|
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
162
195
|
readonly assetKey: Schema.NonEmptyString;
|
|
@@ -289,7 +322,7 @@ export declare const Operation: Schema.Union<readonly [Schema.Struct<{
|
|
|
289
322
|
readonly revision: Schema.Int;
|
|
290
323
|
}>]>;
|
|
291
324
|
export type Operation = typeof Operation.Type;
|
|
292
|
-
/** A message read back from history;
|
|
325
|
+
/** A message read back from history; each optional group only where its features allow it. */
|
|
293
326
|
export declare const ContextMessage: Schema.Struct<{
|
|
294
327
|
readonly messageKey: Schema.NonEmptyString;
|
|
295
328
|
readonly own: Schema.Boolean;
|
|
@@ -302,14 +335,16 @@ export declare const ContextMessage: Schema.Struct<{
|
|
|
302
335
|
readonly mediaType: Schema.NonEmptyString;
|
|
303
336
|
readonly url: Schema.String;
|
|
304
337
|
}>>>;
|
|
338
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
339
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
305
340
|
}>;
|
|
306
341
|
export type ContextMessage = typeof ContextMessage.Type;
|
|
307
342
|
/** Decoded originals are limited separately by the host; ordinary command JSON stays bounded. */
|
|
308
343
|
export declare const AssetFile: Schema.Struct<{
|
|
309
|
-
readonly _tag: Schema.tag<"
|
|
310
|
-
readonly
|
|
311
|
-
readonly
|
|
312
|
-
readonly
|
|
344
|
+
readonly _tag: Schema.tag<"File">;
|
|
345
|
+
readonly contentType: Schema.String;
|
|
346
|
+
readonly id: Schema.NonEmptyString;
|
|
347
|
+
readonly name: Schema.String;
|
|
313
348
|
readonly sizeBytes: Schema.Natural;
|
|
314
349
|
}>;
|
|
315
350
|
/** Closed error vocabulary: provider messages, payloads, and causes never cross this seam. */
|
|
@@ -326,7 +361,129 @@ declare const ChannelError_base: Schema.Class<ChannelError, Schema.TaggedStruct<
|
|
|
326
361
|
export declare class ChannelError extends ChannelError_base {
|
|
327
362
|
get message(): string;
|
|
328
363
|
}
|
|
329
|
-
|
|
364
|
+
/** Pass a version's features to check its commands against its own contract. */
|
|
365
|
+
export declare const commandSchema: <State extends Schema.Top>(state: State, features?: Features) => Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
366
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
367
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
368
|
+
readonly kind: Schema.Literal<"activate">;
|
|
369
|
+
readonly ingressUrl: Schema.String;
|
|
370
|
+
readonly state: Schema.optionalKey<State>;
|
|
371
|
+
}>, Schema.Struct<{
|
|
372
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
373
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
374
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
375
|
+
readonly state: State;
|
|
376
|
+
readonly kind: Schema.Literal<"deactivate">;
|
|
377
|
+
}>, Schema.Struct<{
|
|
378
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
379
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
380
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
381
|
+
readonly state: State;
|
|
382
|
+
readonly kind: Schema.Literal<"receive">;
|
|
383
|
+
readonly request: Schema.Struct<{
|
|
384
|
+
readonly body: Schema.String;
|
|
385
|
+
readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
|
|
386
|
+
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
|
|
387
|
+
readonly url: Schema.String;
|
|
388
|
+
}>;
|
|
389
|
+
}>, Schema.Struct<{
|
|
390
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
391
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
392
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
393
|
+
readonly state: State;
|
|
394
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
395
|
+
/** The provider message that started the turn, when the host knows it. */
|
|
396
|
+
readonly activationMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
397
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
398
|
+
readonly destination: Schema.Struct<{
|
|
399
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
400
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
401
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
402
|
+
}>;
|
|
403
|
+
readonly operation: Schema.Union<readonly [Schema.Struct<{
|
|
404
|
+
readonly kind: Schema.Literal<"present_outcome">;
|
|
405
|
+
readonly options: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
406
|
+
readonly outcome: Schema.Literals<readonly ["completed", "failed", "awaiting_input"]>;
|
|
407
|
+
readonly text: Schema.String;
|
|
408
|
+
}>, Schema.Struct<{
|
|
409
|
+
readonly kind: Schema.Literal<"create_message">;
|
|
410
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
411
|
+
readonly text: Schema.String;
|
|
412
|
+
}>, Schema.Struct<{
|
|
413
|
+
readonly kind: Schema.Literal<"update_message">;
|
|
414
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
415
|
+
readonly reference: Schema.NonEmptyString;
|
|
416
|
+
readonly text: Schema.String;
|
|
417
|
+
}>, Schema.Struct<{
|
|
418
|
+
readonly kind: Schema.Literal<"delete_message">;
|
|
419
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
420
|
+
readonly reference: Schema.NonEmptyString;
|
|
421
|
+
}>, Schema.Struct<{
|
|
422
|
+
readonly active: Schema.Boolean;
|
|
423
|
+
readonly kind: Schema.Literal<"set_reaction">;
|
|
424
|
+
readonly reaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "laugh", "confused", "heart", "hooray", "rocket", "eyes"]>;
|
|
425
|
+
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
426
|
+
readonly kind: Schema.Literal<"activation">;
|
|
427
|
+
}>, Schema.Struct<{
|
|
428
|
+
readonly kind: Schema.Literal<"message">;
|
|
429
|
+
readonly reference: Schema.NonEmptyString;
|
|
430
|
+
}>]>;
|
|
431
|
+
}>, Schema.Struct<{
|
|
432
|
+
readonly activity: Schema.Union<readonly [Schema.Struct<{
|
|
433
|
+
readonly kind: Schema.Literal<"working">;
|
|
434
|
+
readonly text: Schema.optionalKey<Schema.NonEmptyString>;
|
|
435
|
+
}>, Schema.Struct<{
|
|
436
|
+
readonly kind: Schema.Literal<"idle">;
|
|
437
|
+
}>]>;
|
|
438
|
+
readonly kind: Schema.Literal<"set_activity">;
|
|
439
|
+
}>, Schema.Struct<{
|
|
440
|
+
readonly kind: Schema.Literal<"render_plan">;
|
|
441
|
+
readonly plan: Schema.Struct<{
|
|
442
|
+
readonly items: Schema.$Array<Schema.Struct<{
|
|
443
|
+
readonly itemKey: Schema.NonEmptyString;
|
|
444
|
+
readonly note: Schema.optionalKey<Schema.NonEmptyString>;
|
|
445
|
+
readonly state: Schema.Literals<readonly ["pending", "in_progress", "completed", "failed"]>;
|
|
446
|
+
readonly title: Schema.NonEmptyString;
|
|
447
|
+
}>>;
|
|
448
|
+
readonly title: Schema.optionalKey<Schema.NonEmptyString>;
|
|
449
|
+
}>;
|
|
450
|
+
readonly reference: Schema.optionalKey<Schema.NonEmptyString>;
|
|
451
|
+
readonly revision: Schema.Int;
|
|
452
|
+
}>]>;
|
|
453
|
+
/** Original responding input timestamp; retries must preserve this reference. */
|
|
454
|
+
readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
|
|
455
|
+
}>, Schema.Struct<{
|
|
456
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
457
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
458
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
459
|
+
readonly state: State;
|
|
460
|
+
readonly kind: Schema.Literal<"read_context">;
|
|
461
|
+
readonly destination: Schema.Struct<{
|
|
462
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
463
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
464
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
465
|
+
}>;
|
|
466
|
+
readonly limit: Schema.Int;
|
|
467
|
+
}>]>, Schema.Struct<{
|
|
468
|
+
readonly asset: Schema.Struct<{
|
|
469
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
470
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
471
|
+
readonly url: Schema.String;
|
|
472
|
+
}>;
|
|
473
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
474
|
+
readonly identity: Schema.Struct<{
|
|
475
|
+
readonly conversation: Schema.Struct<{
|
|
476
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
477
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
478
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
479
|
+
}>;
|
|
480
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
481
|
+
}>;
|
|
482
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
483
|
+
readonly kind: Schema.Literal<"read_asset">;
|
|
484
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
485
|
+
readonly state: State;
|
|
486
|
+
}>] | readonly [Schema.Union<readonly [Schema.Struct<{
|
|
330
487
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
331
488
|
readonly operationKey: Schema.NonEmptyString;
|
|
332
489
|
readonly kind: Schema.Literal<"activate">;
|
|
@@ -447,6 +604,20 @@ export declare const commandSchema: <State extends Schema.Top>(state: State) =>
|
|
|
447
604
|
readonly kind: Schema.Literal<"read_asset">;
|
|
448
605
|
readonly operationKey: Schema.NonEmptyString;
|
|
449
606
|
readonly state: State;
|
|
607
|
+
}>, Schema.Struct<{
|
|
608
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
609
|
+
readonly identity: Schema.Struct<{
|
|
610
|
+
readonly conversation: Schema.Struct<{
|
|
611
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
612
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
613
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
614
|
+
}>;
|
|
615
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
616
|
+
}>;
|
|
617
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
618
|
+
readonly kind: Schema.Literal<"read_sender">;
|
|
619
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
620
|
+
readonly state: State;
|
|
450
621
|
}>]>;
|
|
451
622
|
/** Pass a version's features to check its results against its own contract. */
|
|
452
623
|
export declare const resultSchema: <State extends Schema.Top>(state: State, features?: Features) => Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
@@ -470,6 +641,67 @@ export declare const resultSchema: <State extends Schema.Top>(state: State, feat
|
|
|
470
641
|
readonly verified: Schema.Literal<true>;
|
|
471
642
|
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
472
643
|
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
644
|
+
content: Schema.Struct<{
|
|
645
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
646
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
647
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
648
|
+
readonly url: Schema.String;
|
|
649
|
+
}>>>;
|
|
650
|
+
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
651
|
+
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
652
|
+
readonly text: Schema.String;
|
|
653
|
+
}>;
|
|
654
|
+
conversation: Schema.Struct<{
|
|
655
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
656
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
657
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
658
|
+
}>;
|
|
659
|
+
eventKey: Schema.NonEmptyString;
|
|
660
|
+
extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
661
|
+
kind: Schema.Literal<"message">;
|
|
662
|
+
messageKey: Schema.NonEmptyString;
|
|
663
|
+
respond: Schema.Boolean;
|
|
664
|
+
senderKey: Schema.NonEmptyString;
|
|
665
|
+
timestamp: Schema.String;
|
|
666
|
+
}>, Schema.Struct<{
|
|
667
|
+
readonly conversation: Schema.Struct<{
|
|
668
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
669
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
670
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
671
|
+
}>;
|
|
672
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
673
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
674
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
675
|
+
readonly kind: Schema.Literal<"echo">;
|
|
676
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
677
|
+
readonly timestamp: Schema.String;
|
|
678
|
+
}>, Schema.Struct<{
|
|
679
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
680
|
+
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
681
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
682
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
683
|
+
readonly kind: Schema.Literal<"delivery_update">;
|
|
684
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
685
|
+
readonly sequence: Schema.Natural;
|
|
686
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
687
|
+
readonly timestamp: Schema.String;
|
|
688
|
+
}>, Schema.Struct<{
|
|
689
|
+
readonly conversation: Schema.Struct<{
|
|
690
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
691
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
692
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
693
|
+
}>;
|
|
694
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
695
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
696
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
697
|
+
readonly kind: Schema.Literal<"stop">;
|
|
698
|
+
readonly timestamp: Schema.String;
|
|
699
|
+
}>]> | Schema.Union<readonly [Schema.Struct<{
|
|
700
|
+
/** An address the provider lists for the sender. */
|
|
701
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
702
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
703
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
704
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
473
705
|
readonly content: Schema.Struct<{
|
|
474
706
|
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
475
707
|
readonly assetKey: Schema.NonEmptyString;
|
|
@@ -578,35 +810,34 @@ export declare const resultSchema: <State extends Schema.Top>(state: State, feat
|
|
|
578
810
|
readonly mediaType: Schema.NonEmptyString;
|
|
579
811
|
readonly url: Schema.String;
|
|
580
812
|
}>>>;
|
|
813
|
+
}> | Schema.Struct<{
|
|
814
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
815
|
+
readonly own: Schema.Boolean;
|
|
816
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
817
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
818
|
+
readonly text: Schema.String;
|
|
819
|
+
readonly timestamp: Schema.String;
|
|
820
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
821
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
581
822
|
}>>;
|
|
582
823
|
}>]>, Schema.Struct<{
|
|
583
824
|
readonly assetKey: Schema.NonEmptyString;
|
|
584
825
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
585
826
|
readonly file: Schema.Struct<{
|
|
586
|
-
readonly _tag: Schema.tag<"
|
|
587
|
-
readonly
|
|
588
|
-
readonly
|
|
589
|
-
readonly
|
|
827
|
+
readonly _tag: Schema.tag<"File">;
|
|
828
|
+
readonly contentType: Schema.String;
|
|
829
|
+
readonly id: Schema.NonEmptyString;
|
|
830
|
+
readonly name: Schema.String;
|
|
590
831
|
readonly sizeBytes: Schema.Natural;
|
|
591
832
|
}>;
|
|
592
833
|
readonly kind: Schema.Literal<"read_asset">;
|
|
593
834
|
readonly operationKey: Schema.NonEmptyString;
|
|
594
|
-
}>]
|
|
595
|
-
export type Command<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof commandSchema<State>>["Type"];
|
|
596
|
-
export type Result<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof resultSchema<State>>["Type"];
|
|
597
|
-
/** Maximum UTF-8 bytes in an ordinary Channel command or result, including its JSON envelope. */
|
|
598
|
-
export declare const resultByteLimit = 2097152;
|
|
599
|
-
/** Keep the newest context messages within the checked result budget, oldest first. */
|
|
600
|
-
export declare function contextResult(operationKey: string, context: readonly ContextMessage[]): Extract<Result, {
|
|
601
|
-
readonly kind: "read_context";
|
|
602
|
-
}>;
|
|
603
|
-
/** Encoded, JSON-safe runtime result suitable for host persistence. */
|
|
604
|
-
export declare const CheckedResult: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
835
|
+
}>] | readonly [Schema.Union<readonly [Schema.Struct<{
|
|
605
836
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
606
837
|
readonly operationKey: Schema.NonEmptyString;
|
|
607
838
|
readonly kind: Schema.Literal<"activate">;
|
|
608
839
|
readonly installationKey: Schema.NonEmptyString;
|
|
609
|
-
readonly state:
|
|
840
|
+
readonly state: State;
|
|
610
841
|
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
611
842
|
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
612
843
|
/** The host must observe a verified webhook handshake before cutover. */
|
|
@@ -622,7 +853,7 @@ export declare const CheckedResult: Schema.Union<readonly [Schema.Union<readonly
|
|
|
622
853
|
readonly verified: Schema.Literal<true>;
|
|
623
854
|
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
624
855
|
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
625
|
-
|
|
856
|
+
content: Schema.Struct<{
|
|
626
857
|
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
627
858
|
readonly assetKey: Schema.NonEmptyString;
|
|
628
859
|
readonly mediaType: Schema.NonEmptyString;
|
|
@@ -632,18 +863,18 @@ export declare const CheckedResult: Schema.Union<readonly [Schema.Union<readonly
|
|
|
632
863
|
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
633
864
|
readonly text: Schema.String;
|
|
634
865
|
}>;
|
|
635
|
-
|
|
866
|
+
conversation: Schema.Struct<{
|
|
636
867
|
readonly conversationKey: Schema.NonEmptyString;
|
|
637
868
|
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
638
869
|
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
639
870
|
}>;
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
871
|
+
eventKey: Schema.NonEmptyString;
|
|
872
|
+
extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
873
|
+
kind: Schema.Literal<"message">;
|
|
874
|
+
messageKey: Schema.NonEmptyString;
|
|
875
|
+
respond: Schema.Boolean;
|
|
876
|
+
senderKey: Schema.NonEmptyString;
|
|
877
|
+
timestamp: Schema.String;
|
|
647
878
|
}>, Schema.Struct<{
|
|
648
879
|
readonly conversation: Schema.Struct<{
|
|
649
880
|
readonly conversationKey: Schema.NonEmptyString;
|
|
@@ -677,41 +908,102 @@ export declare const CheckedResult: Schema.Union<readonly [Schema.Union<readonly
|
|
|
677
908
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
678
909
|
readonly kind: Schema.Literal<"stop">;
|
|
679
910
|
readonly timestamp: Schema.String;
|
|
680
|
-
}>]
|
|
681
|
-
|
|
682
|
-
readonly
|
|
683
|
-
|
|
684
|
-
readonly
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
911
|
+
}>]> | Schema.Union<readonly [Schema.Struct<{
|
|
912
|
+
/** An address the provider lists for the sender. */
|
|
913
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
914
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
915
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
916
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
917
|
+
readonly content: Schema.Struct<{
|
|
918
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
919
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
920
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
921
|
+
readonly url: Schema.String;
|
|
922
|
+
}>>>;
|
|
923
|
+
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
924
|
+
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
925
|
+
readonly text: Schema.String;
|
|
926
|
+
}>;
|
|
927
|
+
readonly conversation: Schema.Struct<{
|
|
928
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
929
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
930
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
931
|
+
}>;
|
|
932
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
933
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
934
|
+
readonly kind: Schema.Literal<"message">;
|
|
935
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
936
|
+
readonly respond: Schema.Boolean;
|
|
937
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
938
|
+
readonly timestamp: Schema.String;
|
|
939
|
+
}>, Schema.Struct<{
|
|
940
|
+
readonly conversation: Schema.Struct<{
|
|
941
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
942
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
943
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
944
|
+
}>;
|
|
945
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
946
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
947
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
948
|
+
readonly kind: Schema.Literal<"echo">;
|
|
949
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
950
|
+
readonly timestamp: Schema.String;
|
|
951
|
+
}>, Schema.Struct<{
|
|
952
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
953
|
+
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
954
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
955
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
956
|
+
readonly kind: Schema.Literal<"delivery_update">;
|
|
957
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
958
|
+
readonly sequence: Schema.Natural;
|
|
959
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
960
|
+
readonly timestamp: Schema.String;
|
|
961
|
+
}>, Schema.Struct<{
|
|
962
|
+
readonly conversation: Schema.Struct<{
|
|
963
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
964
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
965
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
966
|
+
}>;
|
|
967
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
968
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
969
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
970
|
+
readonly kind: Schema.Literal<"stop">;
|
|
971
|
+
readonly timestamp: Schema.String;
|
|
972
|
+
}>]>>;
|
|
973
|
+
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
974
|
+
readonly body: Schema.String;
|
|
975
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
976
|
+
readonly status: Schema.Int;
|
|
977
|
+
}>>;
|
|
978
|
+
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
979
|
+
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
980
|
+
}>, Schema.Struct<{
|
|
981
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
982
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
983
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
984
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
985
|
+
readonly status: Schema.Literal<"succeeded">;
|
|
986
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
987
|
+
}>, Schema.Struct<{
|
|
988
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
989
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
990
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
991
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
992
|
+
readonly status: Schema.Literal<"pending">;
|
|
993
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
994
|
+
}>, Schema.Struct<{
|
|
995
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
996
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
997
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
998
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
999
|
+
readonly status: Schema.Literal<"failed">;
|
|
1000
|
+
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
1001
|
+
}>, Schema.Struct<{
|
|
1002
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1003
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1004
|
+
readonly kind: Schema.Literal<"read_context">;
|
|
1005
|
+
readonly messages: Schema.$Array<Schema.Struct<{
|
|
1006
|
+
messageKey: Schema.NonEmptyString;
|
|
715
1007
|
/** The agent's own message. */
|
|
716
1008
|
own: Schema.Boolean;
|
|
717
1009
|
senderKey: Schema.NonEmptyString;
|
|
@@ -730,19 +1022,482 @@ export declare const CheckedResult: Schema.Union<readonly [Schema.Union<readonly
|
|
|
730
1022
|
readonly mediaType: Schema.NonEmptyString;
|
|
731
1023
|
readonly url: Schema.String;
|
|
732
1024
|
}>>>;
|
|
1025
|
+
}> | Schema.Struct<{
|
|
1026
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1027
|
+
readonly own: Schema.Boolean;
|
|
1028
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1029
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1030
|
+
readonly text: Schema.String;
|
|
1031
|
+
readonly timestamp: Schema.String;
|
|
1032
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1033
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
733
1034
|
}>>;
|
|
734
1035
|
}>]>, Schema.Struct<{
|
|
735
1036
|
readonly assetKey: Schema.NonEmptyString;
|
|
736
1037
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
737
1038
|
readonly file: Schema.Struct<{
|
|
738
|
-
readonly _tag: Schema.tag<"
|
|
739
|
-
readonly
|
|
740
|
-
readonly
|
|
741
|
-
readonly
|
|
1039
|
+
readonly _tag: Schema.tag<"File">;
|
|
1040
|
+
readonly contentType: Schema.String;
|
|
1041
|
+
readonly id: Schema.NonEmptyString;
|
|
1042
|
+
readonly name: Schema.String;
|
|
742
1043
|
readonly sizeBytes: Schema.Natural;
|
|
743
1044
|
}>;
|
|
744
1045
|
readonly kind: Schema.Literal<"read_asset">;
|
|
745
1046
|
readonly operationKey: Schema.NonEmptyString;
|
|
1047
|
+
}>, Schema.Struct<{
|
|
1048
|
+
/** An address the provider lists for the sender. */
|
|
1049
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1050
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
1051
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1052
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1053
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1054
|
+
readonly kind: Schema.Literal<"read_sender">;
|
|
1055
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1056
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1057
|
+
}>]>;
|
|
1058
|
+
export type Command<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof commandSchema<State>>["Type"];
|
|
1059
|
+
export type Result<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof resultSchema<State>>["Type"];
|
|
1060
|
+
/** Maximum UTF-8 bytes in an ordinary Channel command or result, including its JSON envelope. */
|
|
1061
|
+
export declare const resultByteLimit = 2097152;
|
|
1062
|
+
/** Keep the newest context messages within the checked result budget, oldest first. */
|
|
1063
|
+
export declare function contextResult(operationKey: string, context: readonly ContextMessage[]): Extract<Result, {
|
|
1064
|
+
readonly kind: "read_context";
|
|
1065
|
+
}>;
|
|
1066
|
+
/** Encoded, JSON-safe runtime result suitable for host persistence. */
|
|
1067
|
+
export declare const CheckedResult: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1068
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1069
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1070
|
+
readonly kind: Schema.Literal<"activate">;
|
|
1071
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
1072
|
+
readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1073
|
+
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
1074
|
+
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
1075
|
+
/** The host must observe a verified webhook handshake before cutover. */
|
|
1076
|
+
readonly verification: Schema.optionalKey<Schema.Literal<"ingress">>;
|
|
1077
|
+
}>, Schema.Struct<{
|
|
1078
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1079
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1080
|
+
readonly kind: Schema.Literal<"deactivate">;
|
|
1081
|
+
}>, Schema.Struct<{
|
|
1082
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1083
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1084
|
+
readonly kind: Schema.Literal<"receive">;
|
|
1085
|
+
readonly verified: Schema.Literal<true>;
|
|
1086
|
+
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1087
|
+
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1088
|
+
content: Schema.Struct<{
|
|
1089
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1090
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1091
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
1092
|
+
readonly url: Schema.String;
|
|
1093
|
+
}>>>;
|
|
1094
|
+
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1095
|
+
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1096
|
+
readonly text: Schema.String;
|
|
1097
|
+
}>;
|
|
1098
|
+
conversation: Schema.Struct<{
|
|
1099
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1100
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1101
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1102
|
+
}>;
|
|
1103
|
+
eventKey: Schema.NonEmptyString;
|
|
1104
|
+
extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1105
|
+
kind: Schema.Literal<"message">;
|
|
1106
|
+
messageKey: Schema.NonEmptyString;
|
|
1107
|
+
respond: Schema.Boolean;
|
|
1108
|
+
senderKey: Schema.NonEmptyString;
|
|
1109
|
+
timestamp: Schema.String;
|
|
1110
|
+
}>, Schema.Struct<{
|
|
1111
|
+
readonly conversation: Schema.Struct<{
|
|
1112
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1113
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1114
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1115
|
+
}>;
|
|
1116
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1117
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1118
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1119
|
+
readonly kind: Schema.Literal<"echo">;
|
|
1120
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1121
|
+
readonly timestamp: Schema.String;
|
|
1122
|
+
}>, Schema.Struct<{
|
|
1123
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1124
|
+
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
1125
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1126
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1127
|
+
readonly kind: Schema.Literal<"delivery_update">;
|
|
1128
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1129
|
+
readonly sequence: Schema.Natural;
|
|
1130
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1131
|
+
readonly timestamp: Schema.String;
|
|
1132
|
+
}>, Schema.Struct<{
|
|
1133
|
+
readonly conversation: Schema.Struct<{
|
|
1134
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1135
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1136
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1137
|
+
}>;
|
|
1138
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1139
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1140
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1141
|
+
readonly kind: Schema.Literal<"stop">;
|
|
1142
|
+
readonly timestamp: Schema.String;
|
|
1143
|
+
}>]> | Schema.Union<readonly [Schema.Struct<{
|
|
1144
|
+
/** An address the provider lists for the sender. */
|
|
1145
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1146
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
1147
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1148
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1149
|
+
readonly content: Schema.Struct<{
|
|
1150
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1151
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1152
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
1153
|
+
readonly url: Schema.String;
|
|
1154
|
+
}>>>;
|
|
1155
|
+
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1156
|
+
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1157
|
+
readonly text: Schema.String;
|
|
1158
|
+
}>;
|
|
1159
|
+
readonly conversation: Schema.Struct<{
|
|
1160
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1161
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1162
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1163
|
+
}>;
|
|
1164
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1165
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1166
|
+
readonly kind: Schema.Literal<"message">;
|
|
1167
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1168
|
+
readonly respond: Schema.Boolean;
|
|
1169
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1170
|
+
readonly timestamp: Schema.String;
|
|
1171
|
+
}>, Schema.Struct<{
|
|
1172
|
+
readonly conversation: Schema.Struct<{
|
|
1173
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1174
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1175
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1176
|
+
}>;
|
|
1177
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1178
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1179
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1180
|
+
readonly kind: Schema.Literal<"echo">;
|
|
1181
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1182
|
+
readonly timestamp: Schema.String;
|
|
1183
|
+
}>, Schema.Struct<{
|
|
1184
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1185
|
+
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
1186
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1187
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1188
|
+
readonly kind: Schema.Literal<"delivery_update">;
|
|
1189
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1190
|
+
readonly sequence: Schema.Natural;
|
|
1191
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1192
|
+
readonly timestamp: Schema.String;
|
|
1193
|
+
}>, Schema.Struct<{
|
|
1194
|
+
readonly conversation: Schema.Struct<{
|
|
1195
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1196
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1197
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1198
|
+
}>;
|
|
1199
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1200
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1201
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1202
|
+
readonly kind: Schema.Literal<"stop">;
|
|
1203
|
+
readonly timestamp: Schema.String;
|
|
1204
|
+
}>]>>;
|
|
1205
|
+
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
1206
|
+
readonly body: Schema.String;
|
|
1207
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1208
|
+
readonly status: Schema.Int;
|
|
1209
|
+
}>>;
|
|
1210
|
+
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
1211
|
+
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
1212
|
+
}>, Schema.Struct<{
|
|
1213
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1214
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1215
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
1216
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1217
|
+
readonly status: Schema.Literal<"succeeded">;
|
|
1218
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1219
|
+
}>, Schema.Struct<{
|
|
1220
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1221
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1222
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
1223
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1224
|
+
readonly status: Schema.Literal<"pending">;
|
|
1225
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1226
|
+
}>, Schema.Struct<{
|
|
1227
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1228
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1229
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
1230
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1231
|
+
readonly status: Schema.Literal<"failed">;
|
|
1232
|
+
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
1233
|
+
}>, Schema.Struct<{
|
|
1234
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1235
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1236
|
+
readonly kind: Schema.Literal<"read_context">;
|
|
1237
|
+
readonly messages: Schema.$Array<Schema.Struct<{
|
|
1238
|
+
messageKey: Schema.NonEmptyString;
|
|
1239
|
+
/** The agent's own message. */
|
|
1240
|
+
own: Schema.Boolean;
|
|
1241
|
+
senderKey: Schema.NonEmptyString;
|
|
1242
|
+
senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1243
|
+
text: Schema.String;
|
|
1244
|
+
timestamp: Schema.String;
|
|
1245
|
+
}> | Schema.Struct<{
|
|
1246
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1247
|
+
readonly own: Schema.Boolean;
|
|
1248
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1249
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1250
|
+
readonly text: Schema.String;
|
|
1251
|
+
readonly timestamp: Schema.String;
|
|
1252
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1253
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1254
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
1255
|
+
readonly url: Schema.String;
|
|
1256
|
+
}>>>;
|
|
1257
|
+
}> | Schema.Struct<{
|
|
1258
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1259
|
+
readonly own: Schema.Boolean;
|
|
1260
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1261
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1262
|
+
readonly text: Schema.String;
|
|
1263
|
+
readonly timestamp: Schema.String;
|
|
1264
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1265
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1266
|
+
}>>;
|
|
1267
|
+
}>]>, Schema.Struct<{
|
|
1268
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1269
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1270
|
+
readonly file: Schema.Struct<{
|
|
1271
|
+
readonly _tag: Schema.tag<"File">;
|
|
1272
|
+
readonly contentType: Schema.String;
|
|
1273
|
+
readonly id: Schema.NonEmptyString;
|
|
1274
|
+
readonly name: Schema.String;
|
|
1275
|
+
readonly sizeBytes: Schema.Natural;
|
|
1276
|
+
}>;
|
|
1277
|
+
readonly kind: Schema.Literal<"read_asset">;
|
|
1278
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1279
|
+
}>] | readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1280
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1281
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1282
|
+
readonly kind: Schema.Literal<"activate">;
|
|
1283
|
+
readonly installationKey: Schema.NonEmptyString;
|
|
1284
|
+
readonly state: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1285
|
+
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
1286
|
+
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
1287
|
+
/** The host must observe a verified webhook handshake before cutover. */
|
|
1288
|
+
readonly verification: Schema.optionalKey<Schema.Literal<"ingress">>;
|
|
1289
|
+
}>, Schema.Struct<{
|
|
1290
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1291
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1292
|
+
readonly kind: Schema.Literal<"deactivate">;
|
|
1293
|
+
}>, Schema.Struct<{
|
|
1294
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1295
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1296
|
+
readonly kind: Schema.Literal<"receive">;
|
|
1297
|
+
readonly verified: Schema.Literal<true>;
|
|
1298
|
+
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1299
|
+
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1300
|
+
content: Schema.Struct<{
|
|
1301
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1302
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1303
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
1304
|
+
readonly url: Schema.String;
|
|
1305
|
+
}>>>;
|
|
1306
|
+
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1307
|
+
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1308
|
+
readonly text: Schema.String;
|
|
1309
|
+
}>;
|
|
1310
|
+
conversation: Schema.Struct<{
|
|
1311
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1312
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1313
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1314
|
+
}>;
|
|
1315
|
+
eventKey: Schema.NonEmptyString;
|
|
1316
|
+
extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1317
|
+
kind: Schema.Literal<"message">;
|
|
1318
|
+
messageKey: Schema.NonEmptyString;
|
|
1319
|
+
respond: Schema.Boolean;
|
|
1320
|
+
senderKey: Schema.NonEmptyString;
|
|
1321
|
+
timestamp: Schema.String;
|
|
1322
|
+
}>, Schema.Struct<{
|
|
1323
|
+
readonly conversation: Schema.Struct<{
|
|
1324
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1325
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1326
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1327
|
+
}>;
|
|
1328
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1329
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1330
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1331
|
+
readonly kind: Schema.Literal<"echo">;
|
|
1332
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1333
|
+
readonly timestamp: Schema.String;
|
|
1334
|
+
}>, Schema.Struct<{
|
|
1335
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1336
|
+
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
1337
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1338
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1339
|
+
readonly kind: Schema.Literal<"delivery_update">;
|
|
1340
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1341
|
+
readonly sequence: Schema.Natural;
|
|
1342
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1343
|
+
readonly timestamp: Schema.String;
|
|
1344
|
+
}>, Schema.Struct<{
|
|
1345
|
+
readonly conversation: Schema.Struct<{
|
|
1346
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1347
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1348
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1349
|
+
}>;
|
|
1350
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1351
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1352
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1353
|
+
readonly kind: Schema.Literal<"stop">;
|
|
1354
|
+
readonly timestamp: Schema.String;
|
|
1355
|
+
}>]> | Schema.Union<readonly [Schema.Struct<{
|
|
1356
|
+
/** An address the provider lists for the sender. */
|
|
1357
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1358
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
1359
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1360
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1361
|
+
readonly content: Schema.Struct<{
|
|
1362
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1363
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1364
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
1365
|
+
readonly url: Schema.String;
|
|
1366
|
+
}>>>;
|
|
1367
|
+
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1368
|
+
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1369
|
+
readonly text: Schema.String;
|
|
1370
|
+
}>;
|
|
1371
|
+
readonly conversation: Schema.Struct<{
|
|
1372
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1373
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1374
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1375
|
+
}>;
|
|
1376
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1377
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1378
|
+
readonly kind: Schema.Literal<"message">;
|
|
1379
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1380
|
+
readonly respond: Schema.Boolean;
|
|
1381
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1382
|
+
readonly timestamp: Schema.String;
|
|
1383
|
+
}>, Schema.Struct<{
|
|
1384
|
+
readonly conversation: Schema.Struct<{
|
|
1385
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1386
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1387
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1388
|
+
}>;
|
|
1389
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1390
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1391
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1392
|
+
readonly kind: Schema.Literal<"echo">;
|
|
1393
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1394
|
+
readonly timestamp: Schema.String;
|
|
1395
|
+
}>, Schema.Struct<{
|
|
1396
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1397
|
+
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
1398
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1399
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1400
|
+
readonly kind: Schema.Literal<"delivery_update">;
|
|
1401
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1402
|
+
readonly sequence: Schema.Natural;
|
|
1403
|
+
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1404
|
+
readonly timestamp: Schema.String;
|
|
1405
|
+
}>, Schema.Struct<{
|
|
1406
|
+
readonly conversation: Schema.Struct<{
|
|
1407
|
+
readonly conversationKey: Schema.NonEmptyString;
|
|
1408
|
+
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1409
|
+
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1410
|
+
}>;
|
|
1411
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1412
|
+
readonly eventKey: Schema.NonEmptyString;
|
|
1413
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1414
|
+
readonly kind: Schema.Literal<"stop">;
|
|
1415
|
+
readonly timestamp: Schema.String;
|
|
1416
|
+
}>]>>;
|
|
1417
|
+
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
1418
|
+
readonly body: Schema.String;
|
|
1419
|
+
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1420
|
+
readonly status: Schema.Int;
|
|
1421
|
+
}>>;
|
|
1422
|
+
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
1423
|
+
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
1424
|
+
}>, Schema.Struct<{
|
|
1425
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1426
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1427
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
1428
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1429
|
+
readonly status: Schema.Literal<"succeeded">;
|
|
1430
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1431
|
+
}>, Schema.Struct<{
|
|
1432
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1433
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1434
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
1435
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1436
|
+
readonly status: Schema.Literal<"pending">;
|
|
1437
|
+
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1438
|
+
}>, Schema.Struct<{
|
|
1439
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1440
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1441
|
+
readonly kind: Schema.Literal<"deliver">;
|
|
1442
|
+
readonly deliveryKey: Schema.NonEmptyString;
|
|
1443
|
+
readonly status: Schema.Literal<"failed">;
|
|
1444
|
+
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
1445
|
+
}>, Schema.Struct<{
|
|
1446
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1447
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1448
|
+
readonly kind: Schema.Literal<"read_context">;
|
|
1449
|
+
readonly messages: Schema.$Array<Schema.Struct<{
|
|
1450
|
+
messageKey: Schema.NonEmptyString;
|
|
1451
|
+
/** The agent's own message. */
|
|
1452
|
+
own: Schema.Boolean;
|
|
1453
|
+
senderKey: Schema.NonEmptyString;
|
|
1454
|
+
senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1455
|
+
text: Schema.String;
|
|
1456
|
+
timestamp: Schema.String;
|
|
1457
|
+
}> | Schema.Struct<{
|
|
1458
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1459
|
+
readonly own: Schema.Boolean;
|
|
1460
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1461
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1462
|
+
readonly text: Schema.String;
|
|
1463
|
+
readonly timestamp: Schema.String;
|
|
1464
|
+
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1465
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1466
|
+
readonly mediaType: Schema.NonEmptyString;
|
|
1467
|
+
readonly url: Schema.String;
|
|
1468
|
+
}>>>;
|
|
1469
|
+
}> | Schema.Struct<{
|
|
1470
|
+
readonly messageKey: Schema.NonEmptyString;
|
|
1471
|
+
readonly own: Schema.Boolean;
|
|
1472
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
1473
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1474
|
+
readonly text: Schema.String;
|
|
1475
|
+
readonly timestamp: Schema.String;
|
|
1476
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1477
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1478
|
+
}>>;
|
|
1479
|
+
}>]>, Schema.Struct<{
|
|
1480
|
+
readonly assetKey: Schema.NonEmptyString;
|
|
1481
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1482
|
+
readonly file: Schema.Struct<{
|
|
1483
|
+
readonly _tag: Schema.tag<"File">;
|
|
1484
|
+
readonly contentType: Schema.String;
|
|
1485
|
+
readonly id: Schema.NonEmptyString;
|
|
1486
|
+
readonly name: Schema.String;
|
|
1487
|
+
readonly sizeBytes: Schema.Natural;
|
|
1488
|
+
}>;
|
|
1489
|
+
readonly kind: Schema.Literal<"read_asset">;
|
|
1490
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1491
|
+
}>, Schema.Struct<{
|
|
1492
|
+
/** An address the provider lists for the sender. */
|
|
1493
|
+
readonly senderEmail: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1494
|
+
/** The name others mention the sender by, such as a username, without a leading `@`. */
|
|
1495
|
+
readonly senderHandle: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1496
|
+
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1497
|
+
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1498
|
+
readonly kind: Schema.Literal<"read_sender">;
|
|
1499
|
+
readonly operationKey: Schema.NonEmptyString;
|
|
1500
|
+
readonly senderKey: Schema.NonEmptyString;
|
|
746
1501
|
}>]>;
|
|
747
1502
|
export type CheckedResult = typeof CheckedResult.Type;
|
|
748
1503
|
/** Immutable catalog projection. Live schemas remain the execution validators. */
|
|
@@ -768,7 +1523,11 @@ export declare const Contract: Schema.Struct<{
|
|
|
768
1523
|
readonly operations: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["present_outcome", "create_message", "update_message", "delete_message", "set_reaction", "set_activity", "render_plan"]>>>;
|
|
769
1524
|
/** Whether `read_context` returns the conversation's earlier messages. */
|
|
770
1525
|
readonly readContext: Schema.optionalKey<Schema.Boolean>;
|
|
1526
|
+
/** Whether `read_sender` names a sender its messages do not; requires `senderDetails`. */
|
|
1527
|
+
readonly readSender: Schema.optionalKey<Schema.Boolean>;
|
|
771
1528
|
readonly replies: Schema.Boolean;
|
|
1529
|
+
/** Whether messages and context messages may name their sender beyond `senderKey`. */
|
|
1530
|
+
readonly senderDetails: Schema.optionalKey<Schema.Boolean>;
|
|
772
1531
|
/** Maximum age of the original responding input before preparation and delivery. */
|
|
773
1532
|
readonly responseWindowMs: Schema.optionalKey<Schema.Int>;
|
|
774
1533
|
readonly threads: Schema.Boolean;
|