@dual-os/sdk 0.8.0-next.1 → 0.8.0-next.3
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 +18 -929
- package/dist/AgentChannel.d.ts.map +1 -1
- package/dist/AgentChannel.js +23 -157
- package/dist/AgentChannel.js.map +1 -1
- package/dist/AgentChannelConformance.d.ts +8 -500
- package/dist/AgentChannelConformance.d.ts.map +1 -1
- package/dist/AgentChannelConformance.js +3 -3
- package/dist/AgentChannelConformance.js.map +1 -1
- package/dist/AgentChannelRuntime.d.ts.map +1 -1
- package/dist/AgentChannelRuntime.js +6 -7
- package/dist/AgentChannelRuntime.js.map +1 -1
- package/dist/PluginRuntime.d.ts +305 -9
- package/dist/PluginRuntime.d.ts.map +1 -1
- package/dist/PluginRuntime.js +9 -3
- package/dist/PluginRuntime.js.map +1 -1
- package/dist/internal/dual/registry.d.ts +1 -3
- package/dist/internal/dual/registry.d.ts.map +1 -1
- package/dist/internal/dual/registry.js.map +1 -1
- package/dist/internal/plugin-handlers.js +4 -2
- package/dist/internal/plugin-handlers.js.map +1 -1
- package/dist/remote-runtime.d.ts +292 -10
- package/dist/remote-runtime.d.ts.map +1 -1
- package/dist/remote-runtime.js +9 -15
- package/dist/remote-runtime.js.map +1 -1
- package/package.json +1 -1
- package/src/AgentChannel.ts +23 -149
- package/src/AgentChannelConformance.ts +2 -6
- package/src/AgentChannelRuntime.ts +9 -13
- package/src/PluginRuntime.ts +9 -4
- package/src/internal/dual/registry.ts +0 -2
- package/src/internal/plugin-handlers.ts +5 -2
- package/src/remote-runtime.ts +12 -23
package/dist/AgentChannel.d.ts
CHANGED
|
@@ -2,20 +2,13 @@ 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,
|
|
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 };
|
|
6
6
|
}
|
|
7
7
|
export declare const TypeId: "@dual-os/sdk/AgentChannel";
|
|
8
8
|
export type TypeId = typeof TypeId;
|
|
9
9
|
/** Keys are opaque and installation-scoped. Never parse them into product identities. */
|
|
10
10
|
export declare const Key: Schema.NonEmptyString;
|
|
11
|
-
/**
|
|
12
|
-
* The command and result schemas a version uses. Absent means the original protocol, whose
|
|
13
|
-
* projection stays byte-identical for contracts already published with it. `v2` adds the stop
|
|
14
|
-
* event, conversation reads and output operations.
|
|
15
|
-
*/
|
|
16
|
-
export declare const Protocol: Schema.Literals<readonly ["v2"]>;
|
|
17
|
-
export type Protocol = typeof Protocol.Type;
|
|
18
|
-
/** What a `v2` destination can show. Every channel shows `present_outcome`. */
|
|
11
|
+
/** What a destination can show. Every channel shows `present_outcome`. */
|
|
19
12
|
export declare const OperationKind: Schema.Literals<readonly ["present_outcome", "create_message", "update_message", "delete_message", "set_reaction", "set_activity", "render_plan"]>;
|
|
20
13
|
export type OperationKind = typeof OperationKind.Type;
|
|
21
14
|
export declare const Features: Schema.Struct<{
|
|
@@ -28,9 +21,9 @@ export declare const Features: Schema.Struct<{
|
|
|
28
21
|
/** Maximum Unicode code points per physical text message, including server-added prefixes. */
|
|
29
22
|
readonly maxTextLength: Schema.optionalKey<Schema.Int>;
|
|
30
23
|
readonly mentions: Schema.Boolean;
|
|
31
|
-
/**
|
|
24
|
+
/** Every definition declares operations; retired catalog contracts still decode without them. */
|
|
32
25
|
readonly operations: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["present_outcome", "create_message", "update_message", "delete_message", "set_reaction", "set_activity", "render_plan"]>>>;
|
|
33
|
-
/**
|
|
26
|
+
/** Whether `read_context` returns the conversation's earlier messages. */
|
|
34
27
|
readonly readContext: Schema.optionalKey<Schema.Boolean>;
|
|
35
28
|
readonly replies: Schema.Boolean;
|
|
36
29
|
/** Maximum age of the original responding input before preparation and delivery. */
|
|
@@ -147,54 +140,7 @@ export declare const Echo: Schema.Struct<{
|
|
|
147
140
|
readonly messageKey: Schema.NonEmptyString;
|
|
148
141
|
readonly timestamp: Schema.String;
|
|
149
142
|
}>;
|
|
150
|
-
|
|
151
|
-
readonly content: Schema.Struct<{
|
|
152
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
153
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
154
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
155
|
-
readonly url: Schema.String;
|
|
156
|
-
}>>>;
|
|
157
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
158
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
159
|
-
readonly text: Schema.String;
|
|
160
|
-
}>;
|
|
161
|
-
readonly conversation: Schema.Struct<{
|
|
162
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
163
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
164
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
165
|
-
}>;
|
|
166
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
167
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
168
|
-
readonly kind: Schema.Literal<"message">;
|
|
169
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
170
|
-
readonly respond: Schema.Boolean;
|
|
171
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
172
|
-
readonly timestamp: Schema.String;
|
|
173
|
-
}>, Schema.Struct<{
|
|
174
|
-
readonly conversation: Schema.Struct<{
|
|
175
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
176
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
177
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
178
|
-
}>;
|
|
179
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
180
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
181
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
182
|
-
readonly kind: Schema.Literal<"echo">;
|
|
183
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
184
|
-
readonly timestamp: Schema.String;
|
|
185
|
-
}>, Schema.Struct<{
|
|
186
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
187
|
-
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
188
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
189
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
190
|
-
readonly kind: Schema.Literal<"delivery_update">;
|
|
191
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
192
|
-
readonly sequence: Schema.Natural;
|
|
193
|
-
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
194
|
-
readonly timestamp: Schema.String;
|
|
195
|
-
}>]>;
|
|
196
|
-
export type Event = typeof Event.Type;
|
|
197
|
-
/** `v2`: the sender asked the agent to stop working in this conversation. Access applies. */
|
|
143
|
+
/** The sender asked the agent to stop working in this conversation. Access applies. */
|
|
198
144
|
export declare const Stop: Schema.Struct<{
|
|
199
145
|
readonly conversation: Schema.Struct<{
|
|
200
146
|
readonly conversationKey: Schema.NonEmptyString;
|
|
@@ -207,7 +153,7 @@ export declare const Stop: Schema.Struct<{
|
|
|
207
153
|
readonly kind: Schema.Literal<"stop">;
|
|
208
154
|
readonly timestamp: Schema.String;
|
|
209
155
|
}>;
|
|
210
|
-
export declare const
|
|
156
|
+
export declare const Event: Schema.Union<readonly [Schema.Struct<{
|
|
211
157
|
readonly content: Schema.Struct<{
|
|
212
158
|
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
213
159
|
readonly assetKey: Schema.NonEmptyString;
|
|
@@ -264,8 +210,8 @@ export declare const EventV2: Schema.Union<readonly [Schema.Struct<{
|
|
|
264
210
|
readonly kind: Schema.Literal<"stop">;
|
|
265
211
|
readonly timestamp: Schema.String;
|
|
266
212
|
}>]>;
|
|
267
|
-
export type
|
|
268
|
-
/** The reactions every
|
|
213
|
+
export type Event = typeof Event.Type;
|
|
214
|
+
/** The reactions every provider can show. Each provider maps them to its own emoji. */
|
|
269
215
|
export declare const Reaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "laugh", "confused", "heart", "hooray", "rocket", "eyes"]>;
|
|
270
216
|
export type Reaction = typeof Reaction.Type;
|
|
271
217
|
export declare const PlanItem: Schema.Struct<{
|
|
@@ -286,7 +232,7 @@ export declare const Plan: Schema.Struct<{
|
|
|
286
232
|
}>;
|
|
287
233
|
export type Plan = typeof Plan.Type;
|
|
288
234
|
/**
|
|
289
|
-
* One piece of
|
|
235
|
+
* One piece of output. A `reference` is the `providerDeliveryKey` the provider returned for
|
|
290
236
|
* the message or plan it made; only that provider reads it.
|
|
291
237
|
*/
|
|
292
238
|
export declare const Operation: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -397,181 +343,6 @@ export declare const commandSchema: <State extends Schema.Top>(state: State) =>
|
|
|
397
343
|
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
|
|
398
344
|
readonly url: Schema.String;
|
|
399
345
|
}>;
|
|
400
|
-
}>, Schema.Struct<{
|
|
401
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
402
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
403
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
404
|
-
readonly state: State;
|
|
405
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
406
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
407
|
-
readonly destination: Schema.Struct<{
|
|
408
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
409
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
410
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
411
|
-
}>;
|
|
412
|
-
readonly content: Schema.Struct<{
|
|
413
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
414
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
415
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
416
|
-
readonly url: Schema.String;
|
|
417
|
-
}>>>;
|
|
418
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
419
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
420
|
-
readonly text: Schema.String;
|
|
421
|
-
}>;
|
|
422
|
-
/** Original responding input timestamp; retries must preserve this reference. */
|
|
423
|
-
readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
|
|
424
|
-
}>]>, Schema.Struct<{
|
|
425
|
-
readonly asset: Schema.Struct<{
|
|
426
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
427
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
428
|
-
readonly url: Schema.String;
|
|
429
|
-
}>;
|
|
430
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
431
|
-
readonly identity: Schema.Struct<{
|
|
432
|
-
readonly conversation: Schema.Struct<{
|
|
433
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
434
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
435
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
436
|
-
}>;
|
|
437
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
438
|
-
}>;
|
|
439
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
440
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
441
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
442
|
-
readonly state: State;
|
|
443
|
-
}>]>;
|
|
444
|
-
export declare const resultSchema: <State extends Schema.Top>(state: State) => Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
445
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
446
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
447
|
-
readonly kind: Schema.Literal<"activate">;
|
|
448
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
449
|
-
readonly state: State;
|
|
450
|
-
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
451
|
-
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
452
|
-
/** The host must observe a verified webhook handshake before cutover. */
|
|
453
|
-
readonly verification: Schema.optionalKey<Schema.Literal<"ingress">>;
|
|
454
|
-
}>, Schema.Struct<{
|
|
455
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
456
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
457
|
-
readonly kind: Schema.Literal<"deactivate">;
|
|
458
|
-
}>, Schema.Struct<{
|
|
459
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
460
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
461
|
-
readonly kind: Schema.Literal<"receive">;
|
|
462
|
-
readonly verified: Schema.Literal<true>;
|
|
463
|
-
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
464
|
-
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
465
|
-
readonly content: Schema.Struct<{
|
|
466
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
467
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
468
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
469
|
-
readonly url: Schema.String;
|
|
470
|
-
}>>>;
|
|
471
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
472
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
473
|
-
readonly text: Schema.String;
|
|
474
|
-
}>;
|
|
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 eventKey: Schema.NonEmptyString;
|
|
481
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
482
|
-
readonly kind: Schema.Literal<"message">;
|
|
483
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
484
|
-
readonly respond: Schema.Boolean;
|
|
485
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
486
|
-
readonly timestamp: Schema.String;
|
|
487
|
-
}>, Schema.Struct<{
|
|
488
|
-
readonly conversation: Schema.Struct<{
|
|
489
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
490
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
491
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
492
|
-
}>;
|
|
493
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
494
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
495
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
496
|
-
readonly kind: Schema.Literal<"echo">;
|
|
497
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
498
|
-
readonly timestamp: Schema.String;
|
|
499
|
-
}>, Schema.Struct<{
|
|
500
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
501
|
-
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
502
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
503
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
504
|
-
readonly kind: Schema.Literal<"delivery_update">;
|
|
505
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
506
|
-
readonly sequence: Schema.Natural;
|
|
507
|
-
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
508
|
-
readonly timestamp: Schema.String;
|
|
509
|
-
}>]>>;
|
|
510
|
-
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
511
|
-
readonly body: Schema.String;
|
|
512
|
-
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
513
|
-
readonly status: Schema.Int;
|
|
514
|
-
}>>;
|
|
515
|
-
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
516
|
-
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
517
|
-
}>, Schema.Struct<{
|
|
518
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
519
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
520
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
521
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
522
|
-
readonly status: Schema.Literal<"succeeded">;
|
|
523
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
524
|
-
}>, Schema.Struct<{
|
|
525
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
526
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
527
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
528
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
529
|
-
readonly status: Schema.Literal<"pending">;
|
|
530
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
531
|
-
}>, Schema.Struct<{
|
|
532
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
533
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
534
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
535
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
536
|
-
readonly status: Schema.Literal<"failed">;
|
|
537
|
-
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
538
|
-
}>]>, Schema.Struct<{
|
|
539
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
540
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
541
|
-
readonly file: Schema.Struct<{
|
|
542
|
-
readonly _tag: Schema.tag<"ToolFile">;
|
|
543
|
-
readonly contentBase64: Schema.String;
|
|
544
|
-
readonly contentType: Schema.NullOr<Schema.String>;
|
|
545
|
-
readonly filename: Schema.NullOr<Schema.String>;
|
|
546
|
-
readonly sizeBytes: Schema.Natural;
|
|
547
|
-
}>;
|
|
548
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
549
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
550
|
-
}>]>;
|
|
551
|
-
export declare const commandSchemaV2: <State extends Schema.Top>(state: State) => Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
552
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
553
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
554
|
-
readonly kind: Schema.Literal<"activate">;
|
|
555
|
-
readonly ingressUrl: Schema.String;
|
|
556
|
-
readonly state: Schema.optionalKey<State>;
|
|
557
|
-
}>, Schema.Struct<{
|
|
558
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
559
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
560
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
561
|
-
readonly state: State;
|
|
562
|
-
readonly kind: Schema.Literal<"deactivate">;
|
|
563
|
-
}>, Schema.Struct<{
|
|
564
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
565
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
566
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
567
|
-
readonly state: State;
|
|
568
|
-
readonly kind: Schema.Literal<"receive">;
|
|
569
|
-
readonly request: Schema.Struct<{
|
|
570
|
-
readonly body: Schema.String;
|
|
571
|
-
readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
|
|
572
|
-
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
|
|
573
|
-
readonly url: Schema.String;
|
|
574
|
-
}>;
|
|
575
346
|
}>, Schema.Struct<{
|
|
576
347
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
577
348
|
readonly operationKey: Schema.NonEmptyString;
|
|
@@ -670,7 +441,7 @@ export declare const commandSchemaV2: <State extends Schema.Top>(state: State) =
|
|
|
670
441
|
readonly operationKey: Schema.NonEmptyString;
|
|
671
442
|
readonly state: State;
|
|
672
443
|
}>]>;
|
|
673
|
-
export declare const
|
|
444
|
+
export declare const resultSchema: <State extends Schema.Top>(state: State) => Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
674
445
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
675
446
|
readonly operationKey: Schema.NonEmptyString;
|
|
676
447
|
readonly kind: Schema.Literal<"activate">;
|
|
@@ -803,688 +574,13 @@ export declare const resultSchemaV2: <State extends Schema.Top>(state: State) =>
|
|
|
803
574
|
}>]>;
|
|
804
575
|
export type Command<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof commandSchema<State>>["Type"];
|
|
805
576
|
export type Result<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof resultSchema<State>>["Type"];
|
|
806
|
-
export type CommandV2<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof commandSchemaV2<State>>["Type"];
|
|
807
|
-
export type ResultV2<State extends Schema.Top = Schema.Unknown> = ReturnType<typeof resultSchemaV2<State>>["Type"];
|
|
808
577
|
/** Maximum UTF-8 bytes in an ordinary Channel command or result, including its JSON envelope. */
|
|
809
578
|
export declare const resultByteLimit = 2097152;
|
|
810
579
|
/** Keep the newest context messages within the checked result budget, oldest first. */
|
|
811
|
-
export declare function contextResult(operationKey: string, context: readonly ContextMessage[]): Extract<
|
|
580
|
+
export declare function contextResult(operationKey: string, context: readonly ContextMessage[]): Extract<Result, {
|
|
812
581
|
readonly kind: "read_context";
|
|
813
582
|
}>;
|
|
814
|
-
/**
|
|
815
|
-
export declare const schemasFor: (definition: Pick<Definition, "protocol" | "state">) => {
|
|
816
|
-
command: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
817
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
818
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
819
|
-
readonly kind: Schema.Literal<"activate">;
|
|
820
|
-
readonly ingressUrl: Schema.String;
|
|
821
|
-
readonly state: Schema.optionalKey<Schema.Top>;
|
|
822
|
-
}>, Schema.Struct<{
|
|
823
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
824
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
825
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
826
|
-
readonly state: Schema.Top;
|
|
827
|
-
readonly kind: Schema.Literal<"deactivate">;
|
|
828
|
-
}>, Schema.Struct<{
|
|
829
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
830
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
831
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
832
|
-
readonly state: Schema.Top;
|
|
833
|
-
readonly kind: Schema.Literal<"receive">;
|
|
834
|
-
readonly request: Schema.Struct<{
|
|
835
|
-
readonly body: Schema.String;
|
|
836
|
-
readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
|
|
837
|
-
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
|
|
838
|
-
readonly url: Schema.String;
|
|
839
|
-
}>;
|
|
840
|
-
}>, Schema.Struct<{
|
|
841
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
842
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
843
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
844
|
-
readonly state: Schema.Top;
|
|
845
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
846
|
-
/** The provider message that started the turn, when the host knows it. */
|
|
847
|
-
readonly activationMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
848
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
849
|
-
readonly destination: Schema.Struct<{
|
|
850
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
851
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
852
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
853
|
-
}>;
|
|
854
|
-
readonly operation: Schema.Union<readonly [Schema.Struct<{
|
|
855
|
-
readonly kind: Schema.Literal<"present_outcome">;
|
|
856
|
-
readonly options: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
857
|
-
readonly outcome: Schema.Literals<readonly ["completed", "failed", "awaiting_input"]>;
|
|
858
|
-
readonly text: Schema.String;
|
|
859
|
-
}>, Schema.Struct<{
|
|
860
|
-
readonly kind: Schema.Literal<"create_message">;
|
|
861
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
862
|
-
readonly text: Schema.String;
|
|
863
|
-
}>, Schema.Struct<{
|
|
864
|
-
readonly kind: Schema.Literal<"update_message">;
|
|
865
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
866
|
-
readonly reference: Schema.NonEmptyString;
|
|
867
|
-
readonly text: Schema.String;
|
|
868
|
-
}>, Schema.Struct<{
|
|
869
|
-
readonly kind: Schema.Literal<"delete_message">;
|
|
870
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
871
|
-
readonly reference: Schema.NonEmptyString;
|
|
872
|
-
}>, Schema.Struct<{
|
|
873
|
-
readonly active: Schema.Boolean;
|
|
874
|
-
readonly kind: Schema.Literal<"set_reaction">;
|
|
875
|
-
readonly reaction: Schema.Literals<readonly ["thumbs_up", "thumbs_down", "laugh", "confused", "heart", "hooray", "rocket", "eyes"]>;
|
|
876
|
-
readonly target: Schema.Union<readonly [Schema.Struct<{
|
|
877
|
-
readonly kind: Schema.Literal<"activation">;
|
|
878
|
-
}>, Schema.Struct<{
|
|
879
|
-
readonly kind: Schema.Literal<"message">;
|
|
880
|
-
readonly reference: Schema.NonEmptyString;
|
|
881
|
-
}>]>;
|
|
882
|
-
}>, Schema.Struct<{
|
|
883
|
-
readonly activity: Schema.Union<readonly [Schema.Struct<{
|
|
884
|
-
readonly kind: Schema.Literal<"working">;
|
|
885
|
-
readonly text: Schema.optionalKey<Schema.NonEmptyString>;
|
|
886
|
-
}>, Schema.Struct<{
|
|
887
|
-
readonly kind: Schema.Literal<"idle">;
|
|
888
|
-
}>]>;
|
|
889
|
-
readonly kind: Schema.Literal<"set_activity">;
|
|
890
|
-
}>, Schema.Struct<{
|
|
891
|
-
readonly kind: Schema.Literal<"render_plan">;
|
|
892
|
-
readonly plan: Schema.Struct<{
|
|
893
|
-
readonly items: Schema.$Array<Schema.Struct<{
|
|
894
|
-
readonly itemKey: Schema.NonEmptyString;
|
|
895
|
-
readonly note: Schema.optionalKey<Schema.NonEmptyString>;
|
|
896
|
-
readonly state: Schema.Literals<readonly ["pending", "in_progress", "completed", "failed"]>;
|
|
897
|
-
readonly title: Schema.NonEmptyString;
|
|
898
|
-
}>>;
|
|
899
|
-
readonly title: Schema.optionalKey<Schema.NonEmptyString>;
|
|
900
|
-
}>;
|
|
901
|
-
readonly reference: Schema.optionalKey<Schema.NonEmptyString>;
|
|
902
|
-
readonly revision: Schema.Int;
|
|
903
|
-
}>]>;
|
|
904
|
-
/** Original responding input timestamp; retries must preserve this reference. */
|
|
905
|
-
readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
|
|
906
|
-
}>, Schema.Struct<{
|
|
907
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
908
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
909
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
910
|
-
readonly state: Schema.Top;
|
|
911
|
-
readonly kind: Schema.Literal<"read_context">;
|
|
912
|
-
readonly destination: Schema.Struct<{
|
|
913
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
914
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
915
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
916
|
-
}>;
|
|
917
|
-
readonly limit: Schema.Int;
|
|
918
|
-
}>]>, Schema.Struct<{
|
|
919
|
-
readonly asset: Schema.Struct<{
|
|
920
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
921
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
922
|
-
readonly url: Schema.String;
|
|
923
|
-
}>;
|
|
924
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
925
|
-
readonly identity: Schema.Struct<{
|
|
926
|
-
readonly conversation: Schema.Struct<{
|
|
927
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
928
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
929
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
930
|
-
}>;
|
|
931
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
932
|
-
}>;
|
|
933
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
934
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
935
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
936
|
-
readonly state: Schema.Top;
|
|
937
|
-
}>]>;
|
|
938
|
-
result: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
939
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
940
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
941
|
-
readonly kind: Schema.Literal<"activate">;
|
|
942
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
943
|
-
readonly state: Schema.Top;
|
|
944
|
-
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
945
|
-
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
946
|
-
/** The host must observe a verified webhook handshake before cutover. */
|
|
947
|
-
readonly verification: Schema.optionalKey<Schema.Literal<"ingress">>;
|
|
948
|
-
}>, Schema.Struct<{
|
|
949
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
950
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
951
|
-
readonly kind: Schema.Literal<"deactivate">;
|
|
952
|
-
}>, Schema.Struct<{
|
|
953
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
954
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
955
|
-
readonly kind: Schema.Literal<"receive">;
|
|
956
|
-
readonly verified: Schema.Literal<true>;
|
|
957
|
-
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
958
|
-
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
959
|
-
readonly content: Schema.Struct<{
|
|
960
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
961
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
962
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
963
|
-
readonly url: Schema.String;
|
|
964
|
-
}>>>;
|
|
965
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
966
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
967
|
-
readonly text: Schema.String;
|
|
968
|
-
}>;
|
|
969
|
-
readonly conversation: Schema.Struct<{
|
|
970
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
971
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
972
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
973
|
-
}>;
|
|
974
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
975
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
976
|
-
readonly kind: Schema.Literal<"message">;
|
|
977
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
978
|
-
readonly respond: Schema.Boolean;
|
|
979
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
980
|
-
readonly timestamp: Schema.String;
|
|
981
|
-
}>, Schema.Struct<{
|
|
982
|
-
readonly conversation: Schema.Struct<{
|
|
983
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
984
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
985
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
986
|
-
}>;
|
|
987
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
988
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
989
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
990
|
-
readonly kind: Schema.Literal<"echo">;
|
|
991
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
992
|
-
readonly timestamp: Schema.String;
|
|
993
|
-
}>, Schema.Struct<{
|
|
994
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
995
|
-
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
996
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
997
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
998
|
-
readonly kind: Schema.Literal<"delivery_update">;
|
|
999
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1000
|
-
readonly sequence: Schema.Natural;
|
|
1001
|
-
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1002
|
-
readonly timestamp: Schema.String;
|
|
1003
|
-
}>, Schema.Struct<{
|
|
1004
|
-
readonly conversation: Schema.Struct<{
|
|
1005
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1006
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1007
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1008
|
-
}>;
|
|
1009
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1010
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1011
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1012
|
-
readonly kind: Schema.Literal<"stop">;
|
|
1013
|
-
readonly timestamp: Schema.String;
|
|
1014
|
-
}>]>>;
|
|
1015
|
-
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
1016
|
-
readonly body: Schema.String;
|
|
1017
|
-
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1018
|
-
readonly status: Schema.Int;
|
|
1019
|
-
}>>;
|
|
1020
|
-
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
1021
|
-
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
1022
|
-
}>, Schema.Struct<{
|
|
1023
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1024
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1025
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1026
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1027
|
-
readonly status: Schema.Literal<"succeeded">;
|
|
1028
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1029
|
-
}>, Schema.Struct<{
|
|
1030
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1031
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1032
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1033
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1034
|
-
readonly status: Schema.Literal<"pending">;
|
|
1035
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1036
|
-
}>, Schema.Struct<{
|
|
1037
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1038
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1039
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1040
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1041
|
-
readonly status: Schema.Literal<"failed">;
|
|
1042
|
-
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
1043
|
-
}>, Schema.Struct<{
|
|
1044
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1045
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1046
|
-
readonly kind: Schema.Literal<"read_context">;
|
|
1047
|
-
readonly messages: Schema.$Array<Schema.Struct<{
|
|
1048
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1049
|
-
/** The agent's own message. */
|
|
1050
|
-
readonly own: Schema.Boolean;
|
|
1051
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1052
|
-
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1053
|
-
readonly text: Schema.String;
|
|
1054
|
-
readonly timestamp: Schema.String;
|
|
1055
|
-
}>>;
|
|
1056
|
-
}>]>, Schema.Struct<{
|
|
1057
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1058
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1059
|
-
readonly file: Schema.Struct<{
|
|
1060
|
-
readonly _tag: Schema.tag<"ToolFile">;
|
|
1061
|
-
readonly contentBase64: Schema.String;
|
|
1062
|
-
readonly contentType: Schema.NullOr<Schema.String>;
|
|
1063
|
-
readonly filename: Schema.NullOr<Schema.String>;
|
|
1064
|
-
readonly sizeBytes: Schema.Natural;
|
|
1065
|
-
}>;
|
|
1066
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
1067
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1068
|
-
}>]>;
|
|
1069
|
-
typeResult: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1070
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1071
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1072
|
-
readonly kind: Schema.Literal<"activate">;
|
|
1073
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
1074
|
-
readonly state: Schema.toType<Schema.Top>;
|
|
1075
|
-
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
1076
|
-
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
1077
|
-
/** The host must observe a verified webhook handshake before cutover. */
|
|
1078
|
-
readonly verification: Schema.optionalKey<Schema.Literal<"ingress">>;
|
|
1079
|
-
}>, Schema.Struct<{
|
|
1080
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1081
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1082
|
-
readonly kind: Schema.Literal<"deactivate">;
|
|
1083
|
-
}>, Schema.Struct<{
|
|
1084
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1085
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1086
|
-
readonly kind: Schema.Literal<"receive">;
|
|
1087
|
-
readonly verified: Schema.Literal<true>;
|
|
1088
|
-
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1089
|
-
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1090
|
-
readonly content: Schema.Struct<{
|
|
1091
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1092
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1093
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
1094
|
-
readonly url: Schema.String;
|
|
1095
|
-
}>>>;
|
|
1096
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1097
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1098
|
-
readonly text: Schema.String;
|
|
1099
|
-
}>;
|
|
1100
|
-
readonly conversation: Schema.Struct<{
|
|
1101
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1102
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1103
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1104
|
-
}>;
|
|
1105
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1106
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1107
|
-
readonly kind: Schema.Literal<"message">;
|
|
1108
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1109
|
-
readonly respond: Schema.Boolean;
|
|
1110
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1111
|
-
readonly timestamp: Schema.String;
|
|
1112
|
-
}>, Schema.Struct<{
|
|
1113
|
-
readonly conversation: Schema.Struct<{
|
|
1114
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1115
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1116
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1117
|
-
}>;
|
|
1118
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1119
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1120
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1121
|
-
readonly kind: Schema.Literal<"echo">;
|
|
1122
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1123
|
-
readonly timestamp: Schema.String;
|
|
1124
|
-
}>, Schema.Struct<{
|
|
1125
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1126
|
-
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
1127
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1128
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1129
|
-
readonly kind: Schema.Literal<"delivery_update">;
|
|
1130
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1131
|
-
readonly sequence: Schema.Natural;
|
|
1132
|
-
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1133
|
-
readonly timestamp: Schema.String;
|
|
1134
|
-
}>, Schema.Struct<{
|
|
1135
|
-
readonly conversation: Schema.Struct<{
|
|
1136
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1137
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1138
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1139
|
-
}>;
|
|
1140
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1141
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1142
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1143
|
-
readonly kind: Schema.Literal<"stop">;
|
|
1144
|
-
readonly timestamp: Schema.String;
|
|
1145
|
-
}>]>>;
|
|
1146
|
-
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
1147
|
-
readonly body: Schema.String;
|
|
1148
|
-
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1149
|
-
readonly status: Schema.Int;
|
|
1150
|
-
}>>;
|
|
1151
|
-
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
1152
|
-
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
1153
|
-
}>, Schema.Struct<{
|
|
1154
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1155
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1156
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1157
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1158
|
-
readonly status: Schema.Literal<"succeeded">;
|
|
1159
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1160
|
-
}>, Schema.Struct<{
|
|
1161
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1162
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1163
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1164
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1165
|
-
readonly status: Schema.Literal<"pending">;
|
|
1166
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1167
|
-
}>, Schema.Struct<{
|
|
1168
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1169
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1170
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1171
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1172
|
-
readonly status: Schema.Literal<"failed">;
|
|
1173
|
-
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
1174
|
-
}>, Schema.Struct<{
|
|
1175
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1176
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1177
|
-
readonly kind: Schema.Literal<"read_context">;
|
|
1178
|
-
readonly messages: Schema.$Array<Schema.Struct<{
|
|
1179
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1180
|
-
/** The agent's own message. */
|
|
1181
|
-
readonly own: Schema.Boolean;
|
|
1182
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1183
|
-
readonly senderName: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1184
|
-
readonly text: Schema.String;
|
|
1185
|
-
readonly timestamp: Schema.String;
|
|
1186
|
-
}>>;
|
|
1187
|
-
}>]>, Schema.Struct<{
|
|
1188
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1189
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1190
|
-
readonly file: Schema.Struct<{
|
|
1191
|
-
readonly _tag: Schema.tag<"ToolFile">;
|
|
1192
|
-
readonly contentBase64: Schema.String;
|
|
1193
|
-
readonly contentType: Schema.NullOr<Schema.String>;
|
|
1194
|
-
readonly filename: Schema.NullOr<Schema.String>;
|
|
1195
|
-
readonly sizeBytes: Schema.Natural;
|
|
1196
|
-
}>;
|
|
1197
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
1198
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1199
|
-
}>]>;
|
|
1200
|
-
} | {
|
|
1201
|
-
command: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1202
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1203
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1204
|
-
readonly kind: Schema.Literal<"activate">;
|
|
1205
|
-
readonly ingressUrl: Schema.String;
|
|
1206
|
-
readonly state: Schema.optionalKey<Schema.Top>;
|
|
1207
|
-
}>, Schema.Struct<{
|
|
1208
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1209
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1210
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
1211
|
-
readonly state: Schema.Top;
|
|
1212
|
-
readonly kind: Schema.Literal<"deactivate">;
|
|
1213
|
-
}>, Schema.Struct<{
|
|
1214
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1215
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1216
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
1217
|
-
readonly state: Schema.Top;
|
|
1218
|
-
readonly kind: Schema.Literal<"receive">;
|
|
1219
|
-
readonly request: Schema.Struct<{
|
|
1220
|
-
readonly body: Schema.String;
|
|
1221
|
-
readonly headers: Schema.$Record<Schema.NonEmptyString, Schema.String>;
|
|
1222
|
-
readonly method: Schema.Literals<readonly ["GET", "POST", "PUT", "PATCH", "DELETE"]>;
|
|
1223
|
-
readonly url: Schema.String;
|
|
1224
|
-
}>;
|
|
1225
|
-
}>, Schema.Struct<{
|
|
1226
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1227
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1228
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
1229
|
-
readonly state: Schema.Top;
|
|
1230
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1231
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1232
|
-
readonly destination: Schema.Struct<{
|
|
1233
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1234
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1235
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1236
|
-
}>;
|
|
1237
|
-
readonly content: Schema.Struct<{
|
|
1238
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1239
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1240
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
1241
|
-
readonly url: Schema.String;
|
|
1242
|
-
}>>>;
|
|
1243
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1244
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1245
|
-
readonly text: Schema.String;
|
|
1246
|
-
}>;
|
|
1247
|
-
/** Original responding input timestamp; retries must preserve this reference. */
|
|
1248
|
-
readonly responseToTimestamp: Schema.optionalKey<Schema.String>;
|
|
1249
|
-
}>]>, Schema.Struct<{
|
|
1250
|
-
readonly asset: Schema.Struct<{
|
|
1251
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1252
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
1253
|
-
readonly url: Schema.String;
|
|
1254
|
-
}>;
|
|
1255
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1256
|
-
readonly identity: Schema.Struct<{
|
|
1257
|
-
readonly conversation: Schema.Struct<{
|
|
1258
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1259
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1260
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1261
|
-
}>;
|
|
1262
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1263
|
-
}>;
|
|
1264
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
1265
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
1266
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1267
|
-
readonly state: Schema.Top;
|
|
1268
|
-
}>]>;
|
|
1269
|
-
result: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1270
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1271
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1272
|
-
readonly kind: Schema.Literal<"activate">;
|
|
1273
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
1274
|
-
readonly state: Schema.Top;
|
|
1275
|
-
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
1276
|
-
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
1277
|
-
/** The host must observe a verified webhook handshake before cutover. */
|
|
1278
|
-
readonly verification: Schema.optionalKey<Schema.Literal<"ingress">>;
|
|
1279
|
-
}>, 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<"deactivate">;
|
|
1283
|
-
}>, Schema.Struct<{
|
|
1284
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1285
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1286
|
-
readonly kind: Schema.Literal<"receive">;
|
|
1287
|
-
readonly verified: Schema.Literal<true>;
|
|
1288
|
-
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1289
|
-
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1290
|
-
readonly content: Schema.Struct<{
|
|
1291
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1292
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1293
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
1294
|
-
readonly url: Schema.String;
|
|
1295
|
-
}>>>;
|
|
1296
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1297
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1298
|
-
readonly text: Schema.String;
|
|
1299
|
-
}>;
|
|
1300
|
-
readonly conversation: Schema.Struct<{
|
|
1301
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1302
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1303
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1304
|
-
}>;
|
|
1305
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1306
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1307
|
-
readonly kind: Schema.Literal<"message">;
|
|
1308
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1309
|
-
readonly respond: Schema.Boolean;
|
|
1310
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1311
|
-
readonly timestamp: Schema.String;
|
|
1312
|
-
}>, Schema.Struct<{
|
|
1313
|
-
readonly conversation: Schema.Struct<{
|
|
1314
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1315
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1316
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1317
|
-
}>;
|
|
1318
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1319
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1320
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1321
|
-
readonly kind: Schema.Literal<"echo">;
|
|
1322
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1323
|
-
readonly timestamp: Schema.String;
|
|
1324
|
-
}>, Schema.Struct<{
|
|
1325
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1326
|
-
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
1327
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1328
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1329
|
-
readonly kind: Schema.Literal<"delivery_update">;
|
|
1330
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1331
|
-
readonly sequence: Schema.Natural;
|
|
1332
|
-
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1333
|
-
readonly timestamp: Schema.String;
|
|
1334
|
-
}>]>>;
|
|
1335
|
-
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
1336
|
-
readonly body: Schema.String;
|
|
1337
|
-
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1338
|
-
readonly status: Schema.Int;
|
|
1339
|
-
}>>;
|
|
1340
|
-
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
1341
|
-
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
1342
|
-
}>, Schema.Struct<{
|
|
1343
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1344
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1345
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1346
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1347
|
-
readonly status: Schema.Literal<"succeeded">;
|
|
1348
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1349
|
-
}>, Schema.Struct<{
|
|
1350
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1351
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1352
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1353
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1354
|
-
readonly status: Schema.Literal<"pending">;
|
|
1355
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1356
|
-
}>, Schema.Struct<{
|
|
1357
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1358
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1359
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1360
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1361
|
-
readonly status: Schema.Literal<"failed">;
|
|
1362
|
-
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
1363
|
-
}>]>, Schema.Struct<{
|
|
1364
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1365
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1366
|
-
readonly file: Schema.Struct<{
|
|
1367
|
-
readonly _tag: Schema.tag<"ToolFile">;
|
|
1368
|
-
readonly contentBase64: Schema.String;
|
|
1369
|
-
readonly contentType: Schema.NullOr<Schema.String>;
|
|
1370
|
-
readonly filename: Schema.NullOr<Schema.String>;
|
|
1371
|
-
readonly sizeBytes: Schema.Natural;
|
|
1372
|
-
}>;
|
|
1373
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
1374
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1375
|
-
}>]>;
|
|
1376
|
-
typeResult: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1377
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1378
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1379
|
-
readonly kind: Schema.Literal<"activate">;
|
|
1380
|
-
readonly installationKey: Schema.NonEmptyString;
|
|
1381
|
-
readonly state: Schema.toType<Schema.Top>;
|
|
1382
|
-
/** Durable read-only provider state that the host must persist before retrying activation. */
|
|
1383
|
-
readonly checkpoint: Schema.optionalKey<Schema.Literal<true>>;
|
|
1384
|
-
/** The host must observe a verified webhook handshake before cutover. */
|
|
1385
|
-
readonly verification: Schema.optionalKey<Schema.Literal<"ingress">>;
|
|
1386
|
-
}>, Schema.Struct<{
|
|
1387
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1388
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1389
|
-
readonly kind: Schema.Literal<"deactivate">;
|
|
1390
|
-
}>, Schema.Struct<{
|
|
1391
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1392
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1393
|
-
readonly kind: Schema.Literal<"receive">;
|
|
1394
|
-
readonly verified: Schema.Literal<true>;
|
|
1395
|
-
readonly deniedEventKeys: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1396
|
-
readonly events: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
1397
|
-
readonly content: Schema.Struct<{
|
|
1398
|
-
readonly assets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1399
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1400
|
-
readonly mediaType: Schema.NonEmptyString;
|
|
1401
|
-
readonly url: Schema.String;
|
|
1402
|
-
}>>>;
|
|
1403
|
-
readonly mentions: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
1404
|
-
readonly replyToMessageKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1405
|
-
readonly text: Schema.String;
|
|
1406
|
-
}>;
|
|
1407
|
-
readonly conversation: Schema.Struct<{
|
|
1408
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1409
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1410
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1411
|
-
}>;
|
|
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<"message">;
|
|
1415
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1416
|
-
readonly respond: Schema.Boolean;
|
|
1417
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1418
|
-
readonly timestamp: Schema.String;
|
|
1419
|
-
}>, Schema.Struct<{
|
|
1420
|
-
readonly conversation: Schema.Struct<{
|
|
1421
|
-
readonly conversationKey: Schema.NonEmptyString;
|
|
1422
|
-
readonly kind: Schema.Literals<readonly ["direct", "group"]>;
|
|
1423
|
-
readonly threadKey: Schema.optionalKey<Schema.NonEmptyString>;
|
|
1424
|
-
}>;
|
|
1425
|
-
readonly senderKey: Schema.NonEmptyString;
|
|
1426
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1427
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1428
|
-
readonly kind: Schema.Literal<"echo">;
|
|
1429
|
-
readonly messageKey: Schema.NonEmptyString;
|
|
1430
|
-
readonly timestamp: Schema.String;
|
|
1431
|
-
}>, Schema.Struct<{
|
|
1432
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1433
|
-
readonly deliveryUpdateKey: Schema.NonEmptyString;
|
|
1434
|
-
readonly eventKey: Schema.NonEmptyString;
|
|
1435
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1436
|
-
readonly kind: Schema.Literal<"delivery_update">;
|
|
1437
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1438
|
-
readonly sequence: Schema.Natural;
|
|
1439
|
-
readonly status: Schema.Literals<readonly ["succeeded", "failed"]>;
|
|
1440
|
-
readonly timestamp: Schema.String;
|
|
1441
|
-
}>]>>;
|
|
1442
|
-
readonly response: Schema.optionalKey<Schema.Struct<{
|
|
1443
|
-
readonly body: Schema.String;
|
|
1444
|
-
readonly headers: Schema.optionalKey<Schema.$Record<Schema.NonEmptyString, Schema.String>>;
|
|
1445
|
-
readonly status: Schema.Int;
|
|
1446
|
-
}>>;
|
|
1447
|
-
/** A provider-native setup challenge or ping proved the configured ingress. */
|
|
1448
|
-
readonly activationProof: Schema.optionalKey<Schema.Literal<"verified">>;
|
|
1449
|
-
}>, Schema.Struct<{
|
|
1450
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1451
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1452
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1453
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1454
|
-
readonly status: Schema.Literal<"succeeded">;
|
|
1455
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1456
|
-
}>, Schema.Struct<{
|
|
1457
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1458
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1459
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1460
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1461
|
-
readonly status: Schema.Literal<"pending">;
|
|
1462
|
-
readonly providerDeliveryKey: Schema.NonEmptyString;
|
|
1463
|
-
}>, Schema.Struct<{
|
|
1464
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1465
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1466
|
-
readonly kind: Schema.Literal<"deliver">;
|
|
1467
|
-
readonly deliveryKey: Schema.NonEmptyString;
|
|
1468
|
-
readonly status: Schema.Literal<"failed">;
|
|
1469
|
-
readonly code: Schema.Literals<readonly ["rejected", "unauthorized", "rate_limited", "unavailable", "window_closed"]>;
|
|
1470
|
-
}>]>, Schema.Struct<{
|
|
1471
|
-
readonly assetKey: Schema.NonEmptyString;
|
|
1472
|
-
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1473
|
-
readonly file: Schema.Struct<{
|
|
1474
|
-
readonly _tag: Schema.tag<"ToolFile">;
|
|
1475
|
-
readonly contentBase64: Schema.String;
|
|
1476
|
-
readonly contentType: Schema.NullOr<Schema.String>;
|
|
1477
|
-
readonly filename: Schema.NullOr<Schema.String>;
|
|
1478
|
-
readonly sizeBytes: Schema.Natural;
|
|
1479
|
-
}>;
|
|
1480
|
-
readonly kind: Schema.Literal<"read_asset">;
|
|
1481
|
-
readonly operationKey: Schema.NonEmptyString;
|
|
1482
|
-
}>]>;
|
|
1483
|
-
};
|
|
1484
|
-
/**
|
|
1485
|
-
* Encoded, JSON-safe runtime result suitable for host persistence. It accepts both protocols;
|
|
1486
|
-
* a `v1` result decodes unchanged.
|
|
1487
|
-
*/
|
|
583
|
+
/** Encoded, JSON-safe runtime result suitable for host persistence. */
|
|
1488
584
|
export declare const CheckedResult: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
1489
585
|
readonly extensions: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
|
|
1490
586
|
readonly operationKey: Schema.NonEmptyString;
|
|
@@ -1633,9 +729,9 @@ export declare const Contract: Schema.Struct<{
|
|
|
1633
729
|
/** Maximum Unicode code points per physical text message, including server-added prefixes. */
|
|
1634
730
|
readonly maxTextLength: Schema.optionalKey<Schema.Int>;
|
|
1635
731
|
readonly mentions: Schema.Boolean;
|
|
1636
|
-
/**
|
|
732
|
+
/** Every definition declares operations; retired catalog contracts still decode without them. */
|
|
1637
733
|
readonly operations: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["present_outcome", "create_message", "update_message", "delete_message", "set_reaction", "set_activity", "render_plan"]>>>;
|
|
1638
|
-
/**
|
|
734
|
+
/** Whether `read_context` returns the conversation's earlier messages. */
|
|
1639
735
|
readonly readContext: Schema.optionalKey<Schema.Boolean>;
|
|
1640
736
|
readonly replies: Schema.Boolean;
|
|
1641
737
|
/** Maximum age of the original responding input before preparation and delivery. */
|
|
@@ -1644,14 +740,11 @@ export declare const Contract: Schema.Struct<{
|
|
|
1644
740
|
}>;
|
|
1645
741
|
readonly operationInputSchemaJson: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1646
742
|
readonly operationOutputSchemaJson: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1647
|
-
readonly protocol: Schema.optionalKey<Schema.Literals<readonly ["v2"]>>;
|
|
1648
743
|
readonly requiredChecks: Schema.Tuple<readonly [Schema.Literal<"access">]>;
|
|
1649
744
|
readonly stateSchemaJson: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1650
745
|
}>;
|
|
1651
746
|
export type Contract = typeof Contract.Type;
|
|
1652
747
|
export interface Definition<Settings extends Schema.Top = Schema.Top, Mappings extends Schema.Top = Schema.Top, State extends Schema.Top = Schema.Top, Methods extends readonly Any$1[] = readonly Any$1[]> {
|
|
1653
|
-
/** Absent for the original protocol. Publish a new release to change it. */
|
|
1654
|
-
readonly protocol?: Protocol;
|
|
1655
748
|
readonly definitionSettings: Settings;
|
|
1656
749
|
readonly deploymentSettings: Mappings;
|
|
1657
750
|
readonly state: State;
|
|
@@ -1688,14 +781,10 @@ export type HandlerContext<D extends Definition> = {
|
|
|
1688
781
|
} : {
|
|
1689
782
|
readonly auth: ResolvedAuth<D["authMethods"]>;
|
|
1690
783
|
});
|
|
1691
|
-
/** The command a Channel's handler receives
|
|
1692
|
-
export type CommandFor<D extends Definition> = D
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
/** The result a Channel's handler returns, by its protocol. */
|
|
1696
|
-
export type ResultFor<D extends Definition> = D extends {
|
|
1697
|
-
readonly protocol: "v2";
|
|
1698
|
-
} ? ResultV2<D["state"]> : Result<D["state"]>;
|
|
784
|
+
/** The command a Channel's handler receives. */
|
|
785
|
+
export type CommandFor<D extends Definition> = Command<D["state"]>;
|
|
786
|
+
/** The result a Channel's handler returns. */
|
|
787
|
+
export type ResultFor<D extends Definition> = Result<D["state"]>;
|
|
1699
788
|
export interface RuntimeContract<D extends Definition, R = never> {
|
|
1700
789
|
readonly verify: (request: Request, context: HandlerContext<D>) => Effect.Effect<Verification, HandlerError, R>;
|
|
1701
790
|
readonly checkAccess: (identity: VerifiedIdentity, context: HandlerContext<D>) => Effect.Effect<AccessOutcome, HandlerError, R>;
|