@botiverse/raft-sdk 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -348,7 +348,9 @@ interface RaftNextStep {
348
348
  /** One sentence explaining why this is the next step. */
349
349
  why: string;
350
350
  }
351
- type RaftOpErrorCode = "INVALID_REQUEST" | "TRANSPORT_ERROR" | "HTTP_ERROR" | "INVALID_RESPONSE" | "CAPABILITY_NOT_AUTHORIZED" | "SCOPE_DENIED" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_KEY_REUSED" | "UNSUPPORTED_FOR_EXTERNAL_AGENTS" | "UNAVAILABLE";
351
+ type RaftOpErrorCode = "INVALID_REQUEST" | "TRANSPORT_ERROR" | "HTTP_ERROR" | "INVALID_RESPONSE" | "CAPABILITY_NOT_AUTHORIZED" | "SCOPE_DENIED" | "NOT_FOUND" | "CONFLICT" | "IDEMPOTENCY_KEY_REUSED" | "UNSUPPORTED_FOR_EXTERNAL_AGENTS" | "UNAVAILABLE" |
352
+ /** A model-only operation was invoked from code (`invoke(…, { origin: "code" })`); nothing was sent. */
353
+ "MODEL_ONLY";
352
354
  interface RaftOpError {
353
355
  code: RaftOpErrorCode;
354
356
  /** Safe SDK text; never a raw Server body or transport cause. */
@@ -500,22 +502,48 @@ interface SeenFrontierSnapshot {
500
502
  targets: Record<string, {
501
503
  upTo?: number;
502
504
  exact?: number[];
505
+ /** The model context `upTo` was booked in; absent when there was none. */
506
+ upToContextId?: string;
507
+ /** The model context `exact` was booked in; absent when there was none. */
508
+ exactContextId?: string;
503
509
  }>;
504
510
  /** Alternate spellings the Server resolved to a canonical target. */
505
511
  aliases: Record<string, string>;
512
+ /** The frontier's current model context (`setContext`), when one is set. */
513
+ contextId?: string;
506
514
  }
507
515
  export declare class SeenFrontier {
508
- private readonly targets;
509
- private readonly aliases;
516
+ private core;
517
+ /** Set on a view from `inContext`: the context this view books and attests under. */
518
+ private bound;
510
519
  static fromSnapshot(snapshot: SeenFrontierSnapshot | null | undefined): SeenFrontier;
511
- /** Merge a snapshot into this frontier by the same monotonic rules (never lowers a mark). */
520
+ /** The model context this frontier books and attests under; null means no context scoping. */
521
+ get contextId(): string | null;
522
+ /**
523
+ * Set the current model context (shared by every view of this frontier that
524
+ * is not bound to its own context). Call it when the model's context
525
+ * changes (a new session, a compaction): reads booked under the previous
526
+ * context then no longer attest a send. `null` turns scoping off.
527
+ */
528
+ setContext(contextId: string | null): void;
529
+ /**
530
+ * A view over the same records that books and attests under `contextId`
531
+ * (for one call made on behalf of that model context), without changing the
532
+ * frontier's current context. `undefined` returns this frontier.
533
+ */
534
+ inContext(contextId: string | null | undefined): SeenFrontier;
535
+ /**
536
+ * Merge a snapshot into this frontier: each record is booked under the
537
+ * context it was booked in (same context: monotonic, never lowers a mark).
538
+ * Adopts the snapshot's current context when this frontier has none.
539
+ */
512
540
  absorb(snapshot: SeenFrontierSnapshot | null | undefined): void;
513
541
  /** Remember that the Server resolved `requested` to `canonical` (a thread spelling, a `~agent` suffix, …). */
514
542
  recordAlias(requested: string, canonical: string): void;
515
543
  canonical(target: string): string;
516
- /** Advance the contiguous boundary for a target; never lowers it. */
544
+ /** Advance the contiguous boundary for a target in the current context; never lowers it within one context. */
517
545
  recordUpTo(target: string, seq: number): void;
518
- /** Record bodies that were rendered without proving contiguity. */
546
+ /** Record bodies that were rendered without proving contiguity, in the current context. */
519
547
  recordExact(target: string, seqs: readonly number[]): void;
520
548
  /**
521
549
  * Attest that the model saw the context of an interrupt (`outcome.interrupt`
@@ -531,9 +559,17 @@ export declare class SeenFrontier {
531
559
  withheld: boolean;
532
560
  contextComplete?: boolean;
533
561
  }): boolean;
534
- /** What to attest on a send or claim to `target`; omits `seenUpToSeq` when nothing contiguous is known. */
562
+ /**
563
+ * What to attest on a send or claim to `target`; omits `seenUpToSeq` when
564
+ * nothing contiguous is known. With a current context, only bookings made
565
+ * in that context count.
566
+ */
535
567
  attestation(target: string): SeenAttestation;
536
568
  snapshot(): SeenFrontierSnapshot;
569
+ /** A high-water booking (seenPolicy `bookStreamEntries`): another context's record is replaced, not merged. */
570
+ private bookUpTo;
571
+ /** A sparse booking (seenPolicy `bookExactSeqs`): merges within a context, replaces across; never moves `upTo`. */
572
+ private bookExact;
537
573
  private state;
538
574
  }
539
575
  //#endregion
@@ -550,6 +586,14 @@ interface CheckInboxRequest {
550
586
  limit?: number;
551
587
  ack?: RaftAckMode;
552
588
  }
589
+ export declare const checkInboxRequestSchema: z.ZodObject<{
590
+ since: z.ZodOptional<z.ZodNumber>;
591
+ limit: z.ZodOptional<z.ZodNumber>;
592
+ ack: z.ZodOptional<z.ZodEnum<{
593
+ cursor: "cursor";
594
+ immediate: "immediate";
595
+ }>>;
596
+ }, z.core.$strip>;
553
597
  interface RaftInboxBatch {
554
598
  messages: RaftMessage[];
555
599
  /** Pass as `since` on the next check to acknowledge this batch (cursor mode). `null` when the Server sent none. */
@@ -569,6 +613,14 @@ interface DrainInboxRequest {
569
613
  limit?: number;
570
614
  ack?: RaftAckMode;
571
615
  }
616
+ export declare const drainInboxRequestSchema: z.ZodObject<{
617
+ since: z.ZodOptional<z.ZodNumber>;
618
+ limit: z.ZodOptional<z.ZodNumber>;
619
+ ack: z.ZodOptional<z.ZodEnum<{
620
+ cursor: "cursor";
621
+ immediate: "immediate";
622
+ }>>;
623
+ }, z.core.$strip>;
572
624
  interface RaftInboxDrainSummary {
573
625
  /** Cursor of the last batch handed out; pass it as `since` on the next pull to acknowledge that batch. */
574
626
  cursor: number | null;
@@ -583,6 +635,13 @@ interface RaftInboxDrainSummary {
583
635
  ok: false;
584
636
  }> | null;
585
637
  }
638
+ /** A whole drain as one result (the SDK's `invoke("inbox.drain")`): every batch's messages, in order, and the summary. */
639
+ interface RaftInboxDrained {
640
+ messages: RaftMessage[];
641
+ /** Batches handed out. */
642
+ batches: number;
643
+ summary: RaftInboxDrainSummary;
644
+ }
586
645
  interface ListInboxRequest {
587
646
  view?: "unread" | "mentions";
588
647
  /** Next page: the `nextBeforeSeq` of the previous page. */
@@ -590,6 +649,14 @@ interface ListInboxRequest {
590
649
  /** 1..50; Server default 20. */
591
650
  limit?: number;
592
651
  }
652
+ export declare const listInboxRequestSchema: z.ZodObject<{
653
+ view: z.ZodOptional<z.ZodEnum<{
654
+ mentions: "mentions";
655
+ unread: "unread";
656
+ }>>;
657
+ before: z.ZodOptional<z.ZodNumber>;
658
+ limit: z.ZodOptional<z.ZodNumber>;
659
+ }, z.core.$strip>;
593
660
  interface RaftInboxConversation {
594
661
  target: string;
595
662
  kind: "dm" | "channel" | "thread";
@@ -627,6 +694,14 @@ interface ReadHistoryRequest {
627
694
  */
628
695
  consume?: boolean;
629
696
  }
697
+ export declare const readHistoryRequestSchema: z.ZodObject<{
698
+ target: z.ZodString;
699
+ after: z.ZodOptional<z.ZodNumber>;
700
+ before: z.ZodOptional<z.ZodNumber>;
701
+ around: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
702
+ limit: z.ZodOptional<z.ZodNumber>;
703
+ consume: z.ZodOptional<z.ZodBoolean>;
704
+ }, z.core.$strip>;
630
705
  interface RaftHistoryPage {
631
706
  /** Canonical target the Server resolved (falls back to the requested spelling on older Servers). */
632
707
  target: string;
@@ -659,6 +734,48 @@ interface SendMessageRequest {
659
734
  exactSeqs?: number[];
660
735
  };
661
736
  }
737
+ export declare const sendMessageRequestSchema: z.ZodObject<{
738
+ content: z.ZodString;
739
+ attachmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
740
+ idempotencyKey: z.ZodOptional<z.ZodString>;
741
+ mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
742
+ type: z.ZodEnum<{
743
+ user: "user";
744
+ agent: "agent";
745
+ }>;
746
+ id: z.ZodString;
747
+ name: z.ZodString;
748
+ }, z.core.$strip>>>;
749
+ seen: z.ZodOptional<z.ZodObject<{
750
+ upToSeq: z.ZodOptional<z.ZodNumber>;
751
+ exactSeqs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
752
+ }, z.core.$strip>>;
753
+ target: z.ZodString;
754
+ }, z.core.$strip>;
755
+ /** `reply(message, request)` as one argument object: the received message (its `target`) and the send fields. */
756
+ interface ReplyToRequest extends Omit<SendMessageRequest, "target"> {
757
+ message: Pick<RaftMessage, "target">;
758
+ }
759
+ export declare const replyToRequestSchema: z.ZodObject<{
760
+ content: z.ZodString;
761
+ attachmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
762
+ idempotencyKey: z.ZodOptional<z.ZodString>;
763
+ mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
764
+ type: z.ZodEnum<{
765
+ user: "user";
766
+ agent: "agent";
767
+ }>;
768
+ id: z.ZodString;
769
+ name: z.ZodString;
770
+ }, z.core.$strip>>>;
771
+ seen: z.ZodOptional<z.ZodObject<{
772
+ upToSeq: z.ZodOptional<z.ZodNumber>;
773
+ exactSeqs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
774
+ }, z.core.$strip>>;
775
+ message: z.ZodObject<{
776
+ target: z.ZodString;
777
+ }, z.core.$strip>;
778
+ }, z.core.$strip>;
662
779
  interface RaftSent {
663
780
  messageId: string;
664
781
  messageSeq: number | null;
@@ -699,6 +816,11 @@ interface ClaimTasksRequest {
699
816
  /** Full or short message ids of top-level messages to claim as tasks. */
700
817
  messageIds?: string[];
701
818
  }
819
+ export declare const claimTasksRequestSchema: z.ZodObject<{
820
+ target: z.ZodString;
821
+ taskNumbers: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
822
+ messageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
823
+ }, z.core.$strip>;
702
824
  type RaftClaimRowState = "claimed" | "already_yours" | "conflict" | "refused";
703
825
  interface RaftClaimRow {
704
826
  ref: string;
@@ -730,6 +852,18 @@ interface ListTasksRequest {
730
852
  mine?: boolean;
731
853
  status?: RaftTaskStatus | "all";
732
854
  }
855
+ export declare const listTasksRequestSchema: z.ZodObject<{
856
+ target: z.ZodOptional<z.ZodString>;
857
+ mine: z.ZodOptional<z.ZodBoolean>;
858
+ status: z.ZodOptional<z.ZodEnum<{
859
+ todo: "todo";
860
+ in_progress: "in_progress";
861
+ in_review: "in_review";
862
+ done: "done";
863
+ closed: "closed";
864
+ all: "all";
865
+ }>>;
866
+ }, z.core.$strip>;
733
867
  interface RaftTaskBoard {
734
868
  scope: "channel" | "mine";
735
869
  target: string | null;
@@ -745,6 +879,14 @@ interface CreateTasksRequest {
745
879
  /** `@handle`; yourself to start in_progress, or (owner/admin) someone else to reserve a todo. */
746
880
  assignee?: string;
747
881
  }
882
+ export declare const createTasksRequestSchema: z.ZodObject<{
883
+ target: z.ZodString;
884
+ tasks: z.ZodArray<z.ZodObject<{
885
+ title: z.ZodString;
886
+ createsResource: z.ZodOptional<z.ZodBoolean>;
887
+ }, z.core.$strip>>;
888
+ assignee: z.ZodOptional<z.ZodString>;
889
+ }, z.core.$strip>;
748
890
  type RaftTasksCreated = AgentApiTaskCreateResponse & {
749
891
  target: string;
750
892
  };
@@ -752,24 +894,63 @@ interface TaskRef {
752
894
  target: string;
753
895
  taskNumber: number;
754
896
  }
897
+ export declare const taskRefSchema: z.ZodObject<{
898
+ target: z.ZodString;
899
+ taskNumber: z.ZodNumber;
900
+ }, z.core.$strip>;
755
901
  interface AssignTaskRequest extends TaskRef {
756
- /** `@handle`, or null to clear the assignment. */
757
- assignee: string | null;
902
+ /** `@handle` to assign. Required: clearing is the explicit `tasks.unassign`, never an omitted argument. */
903
+ assignee: string;
904
+ /** Optimistic-concurrency token from a task you just read; lose rather than clobber. */
905
+ expectedRevision?: number;
906
+ }
907
+ export declare const assignTaskRequestSchema: z.ZodObject<{
908
+ assignee: z.ZodString;
909
+ expectedRevision: z.ZodOptional<z.ZodNumber>;
910
+ target: z.ZodString;
911
+ taskNumber: z.ZodNumber;
912
+ }, z.core.$strip>;
913
+ interface UnassignTaskRequest extends TaskRef {
758
914
  /** Optimistic-concurrency token from a task you just read; lose rather than clobber. */
759
915
  expectedRevision?: number;
760
916
  }
761
917
  interface UpdateTaskStatusRequest extends TaskRef {
762
918
  status: RaftTaskStatus;
763
919
  }
920
+ export declare const updateTaskStatusRequestSchema: z.ZodObject<{
921
+ status: z.ZodEnum<{
922
+ todo: "todo";
923
+ in_progress: "in_progress";
924
+ in_review: "in_review";
925
+ done: "done";
926
+ closed: "closed";
927
+ }>;
928
+ target: z.ZodString;
929
+ taskNumber: z.ZodNumber;
930
+ }, z.core.$strip>;
764
931
  type UpdateTaskStatusOutcome = RaftOutcome<UpdateTaskStatusRequest, "updated"> | RaftInterrupted;
765
932
  interface AmendTaskRequest extends TaskRef {
766
933
  title?: string;
767
934
  /** New description; `null` clears it. */
768
935
  description?: string | null;
769
936
  }
937
+ export declare const amendTaskRequestSchema: z.ZodObject<{
938
+ title: z.ZodOptional<z.ZodString>;
939
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
940
+ target: z.ZodString;
941
+ taskNumber: z.ZodNumber;
942
+ }, z.core.$strip>;
770
943
  type AmendTaskOutcome = RaftOutcome<AgentApiTaskAmendSuccessResponse & {
771
944
  target: string;
772
945
  }, "amended"> | RaftInterrupted;
946
+ interface ConvertMessageToTaskRequest {
947
+ target: string;
948
+ messageId: string;
949
+ }
950
+ export declare const convertMessageToTaskRequestSchema: z.ZodObject<{
951
+ target: z.ZodString;
952
+ messageId: z.ZodString;
953
+ }, z.core.$strip>;
773
954
  //#endregion
774
955
  //#region ../shared/src/agentOps/wake.d.ts
775
956
  export declare const RAFT_INBOX_NOTICE_SCHEMA: "raft-agent-inbox-notice.v1";
@@ -827,6 +1008,19 @@ export declare function verifyInboxNotice(input: VerifyNoticeInput): Promise<Ver
827
1008
  type RaftWebhookStatus = AgentApiPushWebhookStatusResponse;
828
1009
  //#endregion
829
1010
  //#region ../shared/src/agentOps/channels.d.ts
1011
+ /** `{ target }` of a regular channel (join, leave, mute, unmute). */
1012
+ export declare const channelTargetRequestSchema: z.ZodObject<{
1013
+ target: z.ZodString;
1014
+ }, z.core.$strip>;
1015
+ export declare const channelMembersRequestSchema: z.ZodObject<{
1016
+ target: z.ZodString;
1017
+ }, z.core.$strip>;
1018
+ /** `threads.list` takes no arguments. */
1019
+ export declare const listThreadsRequestSchema: z.ZodObject<{}, z.core.$strip>;
1020
+ export declare const unfollowThreadRequestSchema: z.ZodObject<{
1021
+ target: z.ZodString;
1022
+ reason: z.ZodOptional<z.ZodString>;
1023
+ }, z.core.$strip>;
830
1024
  interface RaftChannelRef {
831
1025
  target: string;
832
1026
  channelId: string;
@@ -856,6 +1050,27 @@ interface ServerInfoRequest {
856
1050
  /** Channels only: restrict to joined channels. */
857
1051
  joined?: boolean;
858
1052
  }
1053
+ export declare const serverInfoRequestSchema: z.ZodObject<{
1054
+ view: z.ZodOptional<z.ZodEnum<{
1055
+ channels: "channels";
1056
+ agents: "agents";
1057
+ humans: "humans";
1058
+ summary: "summary";
1059
+ full: "full";
1060
+ }>>;
1061
+ offset: z.ZodOptional<z.ZodNumber>;
1062
+ limit: z.ZodOptional<z.ZodNumber>;
1063
+ joined: z.ZodOptional<z.ZodBoolean>;
1064
+ }, z.core.$strip>;
1065
+ export declare const showProfileRequestSchema: z.ZodObject<{
1066
+ target: z.ZodOptional<z.ZodString>;
1067
+ }, z.core.$strip>;
1068
+ /** The Agent API's profile body schema; at least one field is required (checked by the operation). */
1069
+ export declare const updateProfileRequestSchema: z.ZodObject<{
1070
+ avatarUrl: z.ZodOptional<z.ZodString>;
1071
+ displayName: z.ZodOptional<z.ZodString>;
1072
+ description: z.ZodOptional<z.ZodString>;
1073
+ }, z.core.$loose>;
859
1074
  interface RaftServerInfo {
860
1075
  view: NonNullable<ServerInfoRequest["view"]>;
861
1076
  server: AgentApiServerInfoResponse;
@@ -866,6 +1081,10 @@ interface RaftServerInfo {
866
1081
  }
867
1082
  //#endregion
868
1083
  //#region ../shared/src/agentOps/attachments.d.ts
1084
+ export declare const attachmentCommentsRequestSchema: z.ZodObject<{
1085
+ attachmentId: z.ZodString;
1086
+ limit: z.ZodOptional<z.ZodNumber>;
1087
+ }, z.core.$strip>;
869
1088
  /** Explicit type wins; otherwise sniff the bytes, then the filename extension, then octet-stream. */
870
1089
  export declare function inferAttachmentMimeType(filename: string, bytes: Uint8Array, explicit?: string | null): string;
871
1090
  interface UploadAttachmentRequest {
@@ -901,6 +1120,26 @@ interface SearchMessagesRequest {
901
1120
  limit?: number;
902
1121
  offset?: number;
903
1122
  }
1123
+ export declare const searchMessagesRequestSchema: z.ZodObject<{
1124
+ query: z.ZodOptional<z.ZodString>;
1125
+ target: z.ZodOptional<z.ZodString>;
1126
+ sender: z.ZodOptional<z.ZodString>;
1127
+ sort: z.ZodOptional<z.ZodEnum<{
1128
+ relevance: "relevance";
1129
+ recent: "recent";
1130
+ }>>;
1131
+ before: z.ZodOptional<z.ZodString>;
1132
+ after: z.ZodOptional<z.ZodString>;
1133
+ limit: z.ZodOptional<z.ZodNumber>;
1134
+ offset: z.ZodOptional<z.ZodNumber>;
1135
+ }, z.core.$strip>;
1136
+ export declare const resolveMessageRequestSchema: z.ZodObject<{
1137
+ messageId: z.ZodString;
1138
+ }, z.core.$strip>;
1139
+ export declare const reactRequestSchema: z.ZodObject<{
1140
+ messageId: z.ZodString;
1141
+ emoji: z.ZodString;
1142
+ }, z.core.$strip>;
904
1143
  interface RaftSearchPage {
905
1144
  query: string;
906
1145
  results: AgentApiMessageSearchResponse["results"];
@@ -939,6 +1178,19 @@ interface AgentMentionActionResult {
939
1178
  }
940
1179
  //#endregion
941
1180
  //#region ../shared/src/agentOps/mentions.d.ts
1181
+ export declare const pendingMentionActionsRequestSchema: z.ZodObject<{
1182
+ limit: z.ZodOptional<z.ZodNumber>;
1183
+ }, z.core.$strip>;
1184
+ export declare const executeMentionActionRequestSchema: z.ZodObject<{
1185
+ action: z.ZodEnum<{
1186
+ notify: "notify";
1187
+ add: "add";
1188
+ }>;
1189
+ resolutionIds: z.ZodArray<z.ZodString>;
1190
+ }, z.core.$strip>;
1191
+ export declare const senderMentionDeliveriesRequestSchema: z.ZodObject<{
1192
+ messageId: z.ZodString;
1193
+ }, z.core.$strip>;
942
1194
  interface RaftPendingMentions {
943
1195
  actions: AgentPendingMentionAction[];
944
1196
  /** Server-reported; `null` when it did not say (completeness not asserted). */
@@ -955,6 +1207,17 @@ interface ManualContext {
955
1207
  intent: string;
956
1208
  reason: string;
957
1209
  }
1210
+ export declare const getManualTopicRequestSchema: z.ZodObject<{
1211
+ intent: z.ZodString;
1212
+ reason: z.ZodString;
1213
+ topic: z.ZodString;
1214
+ }, z.core.$strip>;
1215
+ export declare const searchManualRequestSchema: z.ZodObject<{
1216
+ intent: z.ZodString;
1217
+ reason: z.ZodString;
1218
+ query: z.ZodString;
1219
+ scope: z.ZodOptional<z.ZodString>;
1220
+ }, z.core.$strip>;
958
1221
  //#endregion
959
1222
  //#region ../shared/src/agentOps/state.d.ts
960
1223
  export declare const RAFT_STATE_SCHEMA: "raft-sdk-state.v1";
@@ -1001,6 +1264,88 @@ export declare function hashRaftSendContent(target: string, content: string, att
1001
1264
  //#endregion
1002
1265
  //#region ../shared/src/agentOps/actions.d.ts
1003
1266
  type PrepareActionCardRequest = AgentApiActionPrepareBody;
1267
+ /**
1268
+ * The Agent API's own body schema (a discriminated union over the card
1269
+ * types), so the SDK checks exactly what the Server checks. The operation
1270
+ * manifest projects it flattened (see the SDK's operations.ts).
1271
+ */
1272
+ export declare const prepareActionCardRequestSchema: import("zod").ZodObject<{
1273
+ target: import("zod").ZodString;
1274
+ action: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1275
+ type: import("zod").ZodLiteral<"channel:create">;
1276
+ name: import("zod").ZodString;
1277
+ visibility: import("zod").ZodDefault<import("zod").ZodEnum<{
1278
+ private: "private";
1279
+ public: "public";
1280
+ }>>;
1281
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1282
+ initialHumans: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1283
+ initialAgents: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1284
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1285
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1286
+ type: import("zod").ZodLiteral<"agent:create">;
1287
+ name: import("zod").ZodString;
1288
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1289
+ suggestedComputer: import("zod").ZodOptional<import("zod").ZodString>;
1290
+ requiredComputer: import("zod").ZodOptional<import("zod").ZodString>;
1291
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1292
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1293
+ type: import("zod").ZodLiteral<"channel:add_member">;
1294
+ channel: import("zod").ZodString;
1295
+ humans: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1296
+ agents: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1297
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1298
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1299
+ type: import("zod").ZodLiteral<"integration:approve_agent_login">;
1300
+ requestId: import("zod").ZodUUID;
1301
+ agentId: import("zod").ZodUUID;
1302
+ agentName: import("zod").ZodString;
1303
+ clientId: import("zod").ZodUUID;
1304
+ clientKey: import("zod").ZodString;
1305
+ clientName: import("zod").ZodString;
1306
+ scopes: import("zod").ZodArray<import("zod").ZodString>;
1307
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1308
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1309
+ type: import("zod").ZodLiteral<"integration:install_marketplace_app">;
1310
+ clientId: import("zod").ZodUUID;
1311
+ clientKey: import("zod").ZodString;
1312
+ clientName: import("zod").ZodString;
1313
+ clientNameSha256: import("zod").ZodString;
1314
+ agentId: import("zod").ZodUUID;
1315
+ agentName: import("zod").ZodString;
1316
+ scopes: import("zod").ZodArray<import("zod").ZodString>;
1317
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1318
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1319
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1320
+ category: import("zod").ZodOptional<import("zod").ZodString>;
1321
+ homepageUrl: import("zod").ZodOptional<import("zod").ZodString>;
1322
+ agentManifestUrl: import("zod").ZodOptional<import("zod").ZodString>;
1323
+ type: import("zod").ZodLiteral<"integration:register_app">;
1324
+ name: import("zod").ZodString;
1325
+ clientKey: import("zod").ZodOptional<import("zod").ZodString>;
1326
+ returnUrl: import("zod").ZodString;
1327
+ scopes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
1328
+ unsafeDemoUrlOverride: import("zod").ZodOptional<import("zod").ZodBoolean>;
1329
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1330
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1331
+ name: import("zod").ZodOptional<import("zod").ZodString>;
1332
+ description: import("zod").ZodOptional<import("zod").ZodString>;
1333
+ category: import("zod").ZodOptional<import("zod").ZodString>;
1334
+ homepageUrl: import("zod").ZodOptional<import("zod").ZodString>;
1335
+ returnUrl: import("zod").ZodOptional<import("zod").ZodString>;
1336
+ agentManifestUrl: import("zod").ZodOptional<import("zod").ZodString>;
1337
+ type: import("zod").ZodLiteral<"integration:update_app_registration">;
1338
+ clientKey: import("zod").ZodString;
1339
+ scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
1340
+ unsafeDemoUrlOverride: import("zod").ZodOptional<import("zod").ZodBoolean>;
1341
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1342
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1343
+ type: import("zod").ZodLiteral<"integration:recover_app_owner">;
1344
+ clientKey: import("zod").ZodString;
1345
+ targetAgent: import("zod").ZodString;
1346
+ draftHint: import("zod").ZodOptional<import("zod").ZodString>;
1347
+ }, import("zod/v4/core").$strip>], "type">;
1348
+ }, import("zod/v4/core").$loose>;
1004
1349
  interface RaftPreparedCard {
1005
1350
  target: string;
1006
1351
  /** The card message; a human commits it by clicking its action verb. */
@@ -1292,8 +1637,8 @@ interface TaskResourceReceipt {
1292
1637
  declare const attachmentUploadSessionSchema: z.ZodObject<{
1293
1638
  uploadId: z.ZodUUID;
1294
1639
  state: z.ZodEnum<{
1295
- expired: "expired";
1296
1640
  pending: "pending";
1641
+ expired: "expired";
1297
1642
  canceled: "canceled";
1298
1643
  completed: "completed";
1299
1644
  verifying: "verifying";
@@ -1309,8 +1654,8 @@ declare const attachmentUploadSessionSchema: z.ZodObject<{
1309
1654
  }, z.core.$strict>>;
1310
1655
  terminalReason: z.ZodNullable<z.ZodString>;
1311
1656
  reservationState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
1312
- expired: "expired";
1313
1657
  pending: "pending";
1658
+ expired: "expired";
1314
1659
  canceled: "canceled";
1315
1660
  consumed: "consumed";
1316
1661
  }>>>;
@@ -1655,8 +2000,8 @@ declare const agentApiInboxListResponseSchema: z.ZodObject<{
1655
2000
  target: z.ZodString;
1656
2001
  kind: z.ZodEnum<{
1657
2002
  channel: "channel";
1658
- thread: "thread";
1659
2003
  dm: "dm";
2004
+ thread: "thread";
1660
2005
  }>;
1661
2006
  unread: z.ZodNumber;
1662
2007
  mentions: z.ZodNumber;
@@ -1891,13 +2236,13 @@ declare const agentApiIntegrationAppUpdateBodySchema: z.ZodObject<{
1891
2236
  declare const agentApiIntegrationAppManageBodySchema: z.ZodObject<{
1892
2237
  clientKey: z.ZodString;
1893
2238
  action: z.ZodEnum<{
2239
+ delete: "delete";
1894
2240
  share_link_get: "share_link_get";
1895
2241
  share_link_create: "share_link_create";
1896
2242
  share_link_revoke: "share_link_revoke";
1897
2243
  request_publish: "request_publish";
1898
2244
  request_unpublish: "request_unpublish";
1899
2245
  clear_logo: "clear_logo";
1900
- delete: "delete";
1901
2246
  }>;
1902
2247
  expiresInDays: z.ZodOptional<z.ZodNumber>;
1903
2248
  }, z.core.$loose>;
@@ -1911,8 +2256,8 @@ declare const agentApiActionPrepareBodySchema: z.ZodObject<{
1911
2256
  type: z.ZodLiteral<"channel:create">;
1912
2257
  name: z.ZodString;
1913
2258
  visibility: z.ZodDefault<z.ZodEnum<{
1914
- public: "public";
1915
2259
  private: "private";
2260
+ public: "public";
1916
2261
  }>>;
1917
2262
  description: z.ZodOptional<z.ZodString>;
1918
2263
  initialHumans: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -2057,10 +2402,10 @@ declare const agentApiServerInfoResponseSchema: z.ZodObject<{
2057
2402
  humans: z.ZodArray<z.ZodObject<{
2058
2403
  name: z.ZodString;
2059
2404
  role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
2405
+ guest: "guest";
2060
2406
  owner: "owner";
2061
2407
  admin: "admin";
2062
2408
  member: "member";
2063
- guest: "guest";
2064
2409
  }>>>;
2065
2410
  }, z.core.$loose>>;
2066
2411
  }, z.core.$loose>;
@@ -2109,13 +2454,13 @@ declare const agentApiMentionActionsExecuteResponseSchema: z.ZodObject<{
2109
2454
  results: z.ZodArray<z.ZodObject<{
2110
2455
  resolutionId: z.ZodString;
2111
2456
  status: z.ZodEnum<{
2112
- queued: "queued";
2457
+ not_found: "not_found";
2113
2458
  delivered: "delivered";
2459
+ queued: "queued";
2114
2460
  dropped: "dropped";
2115
2461
  stale: "stale";
2116
2462
  expired: "expired";
2117
2463
  no_permission: "no_permission";
2118
- not_found: "not_found";
2119
2464
  ambiguous: "ambiguous";
2120
2465
  }>;
2121
2466
  action: z.ZodOptional<z.ZodEnum<{
@@ -2262,8 +2607,8 @@ declare const agentApiIntegrationLoginResponseSchema: z.ZodObject<{
2262
2607
  declare const agentApiIntegrationAppPrepareResponseSchema: z.ZodObject<{
2263
2608
  status: z.ZodLiteral<"prepared">;
2264
2609
  mode: z.ZodEnum<{
2265
- register: "register";
2266
2610
  update: "update";
2611
+ register: "register";
2267
2612
  }>;
2268
2613
  target: z.ZodString;
2269
2614
  actionCardMessageId: z.ZodString;
@@ -2319,13 +2664,13 @@ declare const agentApiIntegrationAppUpdateResponseSchema: z.ZodObject<{
2319
2664
  }, z.core.$loose>;
2320
2665
  declare const agentApiIntegrationAppManageResponseSchema: z.ZodObject<{
2321
2666
  action: z.ZodEnum<{
2667
+ delete: "delete";
2322
2668
  share_link_get: "share_link_get";
2323
2669
  share_link_create: "share_link_create";
2324
2670
  share_link_revoke: "share_link_revoke";
2325
2671
  request_publish: "request_publish";
2326
2672
  request_unpublish: "request_unpublish";
2327
2673
  clear_logo: "clear_logo";
2328
- delete: "delete";
2329
2674
  }>;
2330
2675
  clientId: z.ZodString;
2331
2676
  clientKey: z.ZodString;
@@ -2351,8 +2696,8 @@ declare const agentApiIntegrationAppLogoResponseSchema: z.ZodObject<{
2351
2696
  declare const agentApiIntegrationAppListResponseSchema: z.ZodObject<{
2352
2697
  apps: z.ZodArray<z.ZodObject<{
2353
2698
  state: z.ZodEnum<{
2354
- card_pending: "card_pending";
2355
2699
  committed: "committed";
2700
+ card_pending: "card_pending";
2356
2701
  }>;
2357
2702
  card: z.ZodNullable<z.ZodString>;
2358
2703
  installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -2381,8 +2726,8 @@ declare const agentApiIntegrationAppListResponseSchema: z.ZodObject<{
2381
2726
  declare const agentApiIntegrationAppStatusResponseSchema: z.ZodObject<{
2382
2727
  app: z.ZodObject<{
2383
2728
  state: z.ZodEnum<{
2384
- card_pending: "card_pending";
2385
2729
  committed: "committed";
2730
+ card_pending: "card_pending";
2386
2731
  }>;
2387
2732
  card: z.ZodNullable<z.ZodString>;
2388
2733
  installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -2419,8 +2764,8 @@ declare const agentApiHistoryConsumptionScopeSchema: z.ZodObject<{
2419
2764
  agent_id: z.ZodString;
2420
2765
  channel_id: z.ZodString;
2421
2766
  channel_type: z.ZodEnum<{
2422
- thread: "thread";
2423
2767
  dm: "dm";
2768
+ thread: "thread";
2424
2769
  }>;
2425
2770
  target: z.ZodString;
2426
2771
  }, z.core.$strip>;
@@ -2447,8 +2792,8 @@ declare const agentApiMessageResolveResponseSchema: z.ZodObject<{
2447
2792
  actor_id: z.ZodString;
2448
2793
  actor_kind: z.ZodEnum<{
2449
2794
  unknown: "unknown";
2450
- guest: "guest";
2451
2795
  human: "human";
2796
+ guest: "guest";
2452
2797
  remote: "remote";
2453
2798
  bot: "bot";
2454
2799
  }>;
@@ -2818,8 +3163,8 @@ declare const agentApiReminderLogResponseSchema: z.ZodObject<{
2818
3163
  updated: "updated";
2819
3164
  }>;
2820
3165
  actorType: z.ZodEnum<{
2821
- agent: "agent";
2822
3166
  human: "human";
3167
+ agent: "agent";
2823
3168
  system: "system";
2824
3169
  }>;
2825
3170
  actorId: z.ZodNullable<z.ZodString>;
@@ -3044,8 +3389,8 @@ declare const agentApiContract: {
3044
3389
  actor_id: z.ZodString;
3045
3390
  actor_kind: z.ZodEnum<{
3046
3391
  unknown: "unknown";
3047
- guest: "guest";
3048
3392
  human: "human";
3393
+ guest: "guest";
3049
3394
  remote: "remote";
3050
3395
  bot: "bot";
3051
3396
  }>;
@@ -3164,8 +3509,8 @@ declare const agentApiContract: {
3164
3509
  agent_id: z.ZodString;
3165
3510
  channel_id: z.ZodString;
3166
3511
  channel_type: z.ZodEnum<{
3167
- thread: "thread";
3168
3512
  dm: "dm";
3513
+ thread: "thread";
3169
3514
  }>;
3170
3515
  target: z.ZodString;
3171
3516
  }, z.core.$strip>>;
@@ -3190,8 +3535,8 @@ declare const agentApiContract: {
3190
3535
  actor_id: z.ZodString;
3191
3536
  actor_kind: z.ZodEnum<{
3192
3537
  unknown: "unknown";
3193
- guest: "guest";
3194
3538
  human: "human";
3539
+ guest: "guest";
3195
3540
  remote: "remote";
3196
3541
  bot: "bot";
3197
3542
  }>;
@@ -3472,8 +3817,8 @@ declare const agentApiContract: {
3472
3817
  actor_id: z.ZodString;
3473
3818
  actor_kind: z.ZodEnum<{
3474
3819
  unknown: "unknown";
3475
- guest: "guest";
3476
3820
  human: "human";
3821
+ guest: "guest";
3477
3822
  remote: "remote";
3478
3823
  bot: "bot";
3479
3824
  }>;
@@ -3564,8 +3909,8 @@ declare const agentApiContract: {
3564
3909
  actor_id: z.ZodString;
3565
3910
  actor_kind: z.ZodEnum<{
3566
3911
  unknown: "unknown";
3567
- guest: "guest";
3568
3912
  human: "human";
3913
+ guest: "guest";
3569
3914
  remote: "remote";
3570
3915
  bot: "bot";
3571
3916
  }>;
@@ -3676,8 +4021,8 @@ declare const agentApiContract: {
3676
4021
  actor_id: z.ZodString;
3677
4022
  actor_kind: z.ZodEnum<{
3678
4023
  unknown: "unknown";
3679
- guest: "guest";
3680
4024
  human: "human";
4025
+ guest: "guest";
3681
4026
  remote: "remote";
3682
4027
  bot: "bot";
3683
4028
  }>;
@@ -3768,8 +4113,8 @@ declare const agentApiContract: {
3768
4113
  actor_id: z.ZodString;
3769
4114
  actor_kind: z.ZodEnum<{
3770
4115
  unknown: "unknown";
3771
- guest: "guest";
3772
4116
  human: "human";
4117
+ guest: "guest";
3773
4118
  remote: "remote";
3774
4119
  bot: "bot";
3775
4120
  }>;
@@ -3934,8 +4279,8 @@ declare const agentApiContract: {
3934
4279
  actor_id: z.ZodString;
3935
4280
  actor_kind: z.ZodEnum<{
3936
4281
  unknown: "unknown";
3937
- guest: "guest";
3938
4282
  human: "human";
4283
+ guest: "guest";
3939
4284
  remote: "remote";
3940
4285
  bot: "bot";
3941
4286
  }>;
@@ -4026,8 +4371,8 @@ declare const agentApiContract: {
4026
4371
  actor_id: z.ZodString;
4027
4372
  actor_kind: z.ZodEnum<{
4028
4373
  unknown: "unknown";
4029
- guest: "guest";
4030
4374
  human: "human";
4375
+ guest: "guest";
4031
4376
  remote: "remote";
4032
4377
  bot: "bot";
4033
4378
  }>;
@@ -4138,8 +4483,8 @@ declare const agentApiContract: {
4138
4483
  actor_id: z.ZodString;
4139
4484
  actor_kind: z.ZodEnum<{
4140
4485
  unknown: "unknown";
4141
- guest: "guest";
4142
4486
  human: "human";
4487
+ guest: "guest";
4143
4488
  remote: "remote";
4144
4489
  bot: "bot";
4145
4490
  }>;
@@ -4230,8 +4575,8 @@ declare const agentApiContract: {
4230
4575
  actor_id: z.ZodString;
4231
4576
  actor_kind: z.ZodEnum<{
4232
4577
  unknown: "unknown";
4233
- guest: "guest";
4234
4578
  human: "human";
4579
+ guest: "guest";
4235
4580
  remote: "remote";
4236
4581
  bot: "bot";
4237
4582
  }>;
@@ -4369,8 +4714,8 @@ declare const agentApiContract: {
4369
4714
  actor_id: z.ZodString;
4370
4715
  actor_kind: z.ZodEnum<{
4371
4716
  unknown: "unknown";
4372
- guest: "guest";
4373
4717
  human: "human";
4718
+ guest: "guest";
4374
4719
  remote: "remote";
4375
4720
  bot: "bot";
4376
4721
  }>;
@@ -4563,8 +4908,8 @@ declare const agentApiContract: {
4563
4908
  actor_id: z.ZodString;
4564
4909
  actor_kind: z.ZodEnum<{
4565
4910
  unknown: "unknown";
4566
- guest: "guest";
4567
4911
  human: "human";
4912
+ guest: "guest";
4568
4913
  remote: "remote";
4569
4914
  bot: "bot";
4570
4915
  }>;
@@ -4678,8 +5023,8 @@ declare const agentApiContract: {
4678
5023
  actor_id: z.ZodString;
4679
5024
  actor_kind: z.ZodEnum<{
4680
5025
  unknown: "unknown";
4681
- guest: "guest";
4682
5026
  human: "human";
5027
+ guest: "guest";
4683
5028
  remote: "remote";
4684
5029
  bot: "bot";
4685
5030
  }>;
@@ -5108,8 +5453,8 @@ declare const agentApiContract: {
5108
5453
  target: z.ZodString;
5109
5454
  kind: z.ZodEnum<{
5110
5455
  channel: "channel";
5111
- thread: "thread";
5112
5456
  dm: "dm";
5457
+ thread: "thread";
5113
5458
  }>;
5114
5459
  unread: z.ZodNumber;
5115
5460
  mentions: z.ZodNumber;
@@ -5223,10 +5568,10 @@ declare const agentApiContract: {
5223
5568
  humans: z.ZodArray<z.ZodObject<{
5224
5569
  name: z.ZodString;
5225
5570
  role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
5571
+ guest: "guest";
5226
5572
  owner: "owner";
5227
5573
  admin: "admin";
5228
5574
  member: "member";
5229
- guest: "guest";
5230
5575
  }>>>;
5231
5576
  }, z.core.$loose>>;
5232
5577
  }, z.core.$loose>;
@@ -5353,13 +5698,13 @@ declare const agentApiContract: {
5353
5698
  results: z.ZodArray<z.ZodObject<{
5354
5699
  resolutionId: z.ZodString;
5355
5700
  status: z.ZodEnum<{
5356
- queued: "queued";
5701
+ not_found: "not_found";
5357
5702
  delivered: "delivered";
5703
+ queued: "queued";
5358
5704
  dropped: "dropped";
5359
5705
  stale: "stale";
5360
5706
  expired: "expired";
5361
5707
  no_permission: "no_permission";
5362
- not_found: "not_found";
5363
5708
  ambiguous: "ambiguous";
5364
5709
  }>;
5365
5710
  action: z.ZodOptional<z.ZodEnum<{
@@ -5459,8 +5804,8 @@ declare const agentApiContract: {
5459
5804
  actor_id: z.ZodString;
5460
5805
  actor_kind: z.ZodEnum<{
5461
5806
  unknown: "unknown";
5462
- guest: "guest";
5463
5807
  human: "human";
5808
+ guest: "guest";
5464
5809
  remote: "remote";
5465
5810
  bot: "bot";
5466
5811
  }>;
@@ -5551,8 +5896,8 @@ declare const agentApiContract: {
5551
5896
  actor_id: z.ZodString;
5552
5897
  actor_kind: z.ZodEnum<{
5553
5898
  unknown: "unknown";
5554
- guest: "guest";
5555
5899
  human: "human";
5900
+ guest: "guest";
5556
5901
  remote: "remote";
5557
5902
  bot: "bot";
5558
5903
  }>;
@@ -5892,8 +6237,8 @@ declare const agentApiContract: {
5892
6237
  actor_id: z.ZodString;
5893
6238
  actor_kind: z.ZodEnum<{
5894
6239
  unknown: "unknown";
5895
- guest: "guest";
5896
6240
  human: "human";
6241
+ guest: "guest";
5897
6242
  remote: "remote";
5898
6243
  bot: "bot";
5899
6244
  }>;
@@ -5984,8 +6329,8 @@ declare const agentApiContract: {
5984
6329
  actor_id: z.ZodString;
5985
6330
  actor_kind: z.ZodEnum<{
5986
6331
  unknown: "unknown";
5987
- guest: "guest";
5988
6332
  human: "human";
6333
+ guest: "guest";
5989
6334
  remote: "remote";
5990
6335
  bot: "bot";
5991
6336
  }>;
@@ -6269,8 +6614,8 @@ declare const agentApiContract: {
6269
6614
  actor_id: z.ZodString;
6270
6615
  actor_kind: z.ZodEnum<{
6271
6616
  unknown: "unknown";
6272
- guest: "guest";
6273
6617
  human: "human";
6618
+ guest: "guest";
6274
6619
  remote: "remote";
6275
6620
  bot: "bot";
6276
6621
  }>;
@@ -6361,8 +6706,8 @@ declare const agentApiContract: {
6361
6706
  actor_id: z.ZodString;
6362
6707
  actor_kind: z.ZodEnum<{
6363
6708
  unknown: "unknown";
6364
- guest: "guest";
6365
6709
  human: "human";
6710
+ guest: "guest";
6366
6711
  remote: "remote";
6367
6712
  bot: "bot";
6368
6713
  }>;
@@ -6815,8 +7160,8 @@ declare const agentApiContract: {
6815
7160
  updated: "updated";
6816
7161
  }>;
6817
7162
  actorType: z.ZodEnum<{
6818
- agent: "agent";
6819
7163
  human: "human";
7164
+ agent: "agent";
6820
7165
  system: "system";
6821
7166
  }>;
6822
7167
  actorId: z.ZodNullable<z.ZodString>;
@@ -7191,8 +7536,8 @@ declare const agentApiContract: {
7191
7536
  readonly body: z.ZodObject<{
7192
7537
  status: z.ZodLiteral<"prepared">;
7193
7538
  mode: z.ZodEnum<{
7194
- register: "register";
7195
7539
  update: "update";
7540
+ register: "register";
7196
7541
  }>;
7197
7542
  target: z.ZodString;
7198
7543
  actionCardMessageId: z.ZodString;
@@ -7334,13 +7679,13 @@ declare const agentApiContract: {
7334
7679
  readonly body: z.ZodObject<{
7335
7680
  clientKey: z.ZodString;
7336
7681
  action: z.ZodEnum<{
7682
+ delete: "delete";
7337
7683
  share_link_get: "share_link_get";
7338
7684
  share_link_create: "share_link_create";
7339
7685
  share_link_revoke: "share_link_revoke";
7340
7686
  request_publish: "request_publish";
7341
7687
  request_unpublish: "request_unpublish";
7342
7688
  clear_logo: "clear_logo";
7343
- delete: "delete";
7344
7689
  }>;
7345
7690
  expiresInDays: z.ZodOptional<z.ZodNumber>;
7346
7691
  }, z.core.$loose>;
@@ -7348,13 +7693,13 @@ declare const agentApiContract: {
7348
7693
  readonly response: {
7349
7694
  readonly body: z.ZodObject<{
7350
7695
  action: z.ZodEnum<{
7696
+ delete: "delete";
7351
7697
  share_link_get: "share_link_get";
7352
7698
  share_link_create: "share_link_create";
7353
7699
  share_link_revoke: "share_link_revoke";
7354
7700
  request_publish: "request_publish";
7355
7701
  request_unpublish: "request_unpublish";
7356
7702
  clear_logo: "clear_logo";
7357
- delete: "delete";
7358
7703
  }>;
7359
7704
  clientId: z.ZodString;
7360
7705
  clientKey: z.ZodString;
@@ -7412,8 +7757,8 @@ declare const agentApiContract: {
7412
7757
  readonly body: z.ZodObject<{
7413
7758
  apps: z.ZodArray<z.ZodObject<{
7414
7759
  state: z.ZodEnum<{
7415
- card_pending: "card_pending";
7416
7760
  committed: "committed";
7761
+ card_pending: "card_pending";
7417
7762
  }>;
7418
7763
  card: z.ZodNullable<z.ZodString>;
7419
7764
  installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7463,8 +7808,8 @@ declare const agentApiContract: {
7463
7808
  readonly body: z.ZodObject<{
7464
7809
  app: z.ZodObject<{
7465
7810
  state: z.ZodEnum<{
7466
- card_pending: "card_pending";
7467
7811
  committed: "committed";
7812
+ card_pending: "card_pending";
7468
7813
  }>;
7469
7814
  card: z.ZodNullable<z.ZodString>;
7470
7815
  installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -7511,8 +7856,8 @@ declare const agentApiContract: {
7511
7856
  type: z.ZodLiteral<"channel:create">;
7512
7857
  name: z.ZodString;
7513
7858
  visibility: z.ZodDefault<z.ZodEnum<{
7514
- public: "public";
7515
7859
  private: "private";
7860
+ public: "public";
7516
7861
  }>>;
7517
7862
  description: z.ZodOptional<z.ZodString>;
7518
7863
  initialHumans: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -7727,8 +8072,8 @@ declare const agentApiContract: {
7727
8072
  readonly body: z.ZodObject<{
7728
8073
  uploadId: z.ZodUUID;
7729
8074
  state: z.ZodEnum<{
7730
- expired: "expired";
7731
8075
  pending: "pending";
8076
+ expired: "expired";
7732
8077
  canceled: "canceled";
7733
8078
  completed: "completed";
7734
8079
  verifying: "verifying";
@@ -7744,8 +8089,8 @@ declare const agentApiContract: {
7744
8089
  }, z.core.$strict>>;
7745
8090
  terminalReason: z.ZodNullable<z.ZodString>;
7746
8091
  reservationState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
7747
- expired: "expired";
7748
8092
  pending: "pending";
8093
+ expired: "expired";
7749
8094
  canceled: "canceled";
7750
8095
  consumed: "consumed";
7751
8096
  }>>>;
@@ -7773,8 +8118,8 @@ declare const agentApiContract: {
7773
8118
  readonly body: z.ZodObject<{
7774
8119
  uploadId: z.ZodUUID;
7775
8120
  state: z.ZodEnum<{
7776
- expired: "expired";
7777
8121
  pending: "pending";
8122
+ expired: "expired";
7778
8123
  canceled: "canceled";
7779
8124
  completed: "completed";
7780
8125
  verifying: "verifying";
@@ -7790,8 +8135,8 @@ declare const agentApiContract: {
7790
8135
  }, z.core.$strict>>;
7791
8136
  terminalReason: z.ZodNullable<z.ZodString>;
7792
8137
  reservationState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
7793
- expired: "expired";
7794
8138
  pending: "pending";
8139
+ expired: "expired";
7795
8140
  canceled: "canceled";
7796
8141
  consumed: "consumed";
7797
8142
  }>>>;
@@ -9022,6 +9367,915 @@ type RaftLatestReadThread = {
9022
9367
  */
9023
9368
  export declare function readLatestReadThread(options?: ReadLatestReadThreadOptions): Promise<RaftLatestReadThread>;
9024
9369
  //#endregion
9370
+ //#region src/toolSchema.d.ts
9371
+ type RaftJsonSchemaType = "object" | "array" | "string" | "number" | "integer" | "boolean" | "null";
9372
+ interface RaftJsonSchema {
9373
+ type?: RaftJsonSchemaType;
9374
+ description?: string;
9375
+ properties?: Record<string, RaftJsonSchema>;
9376
+ required?: string[];
9377
+ items?: RaftJsonSchema;
9378
+ enum?: Array<string | number | boolean | null>;
9379
+ minimum?: number;
9380
+ maximum?: number;
9381
+ minLength?: number;
9382
+ maxLength?: number;
9383
+ }
9384
+ /** Every keyword the subset allows. */
9385
+ export declare const RAFT_JSON_SCHEMA_KEYWORDS: readonly (keyof RaftJsonSchema)[];
9386
+ //#endregion
9387
+ //#region src/operations.d.ts
9388
+ /** What running an operation consumes or records. */
9389
+ type RaftConsumption =
9390
+ /** Acknowledges inbox rows (now or on the next pull). */
9391
+ "inbox" |
9392
+ /** Advances the Server's read position for a conversation. */
9393
+ "read_cursor" |
9394
+ /** Records messages as seen by the model (the frontier a send attests). */
9395
+ "seen";
9396
+ type RaftOperationIdempotency =
9397
+ /** Repeating the same call converges on the same state. */
9398
+ {
9399
+ kind: "natural";
9400
+ } |
9401
+ /** Retry-safe when `args[arg]` is reused. */
9402
+ {
9403
+ kind: "key";
9404
+ arg: string;
9405
+ } |
9406
+ /** Do not auto-retry after a transport failure. */
9407
+ {
9408
+ kind: "none";
9409
+ };
9410
+ interface RaftOperationSpec {
9411
+ /** Stable dotted name, the `createRaft` path and the `invoke` key: `"messages.send"`. */
9412
+ name: string;
9413
+ /** Stable tool name for gateways (`[a-z0-9_]`, no prefix; hosts add their own): `"messages_send"`. */
9414
+ toolName: string;
9415
+ /** Model-facing, 1–3 sentences. */
9416
+ description: string;
9417
+ /** The input, in the conservative JSON Schema subset (toolSchema.ts). Never stricter than the runtime check. */
9418
+ inputSchema: RaftJsonSchema;
9419
+ /** `write` when any route it calls changes state (a consuming read counts as a write). Gateways treat unknown as `write`. */
9420
+ sideEffect: "read" | "write";
9421
+ idempotency: RaftOperationIdempotency;
9422
+ /**
9423
+ * Every credential capability the operation needs (all of them; sorted).
9424
+ * Empty when it calls no route. Filter at mount with
9425
+ * `identity.whoami` → `capabilities`: `op.capability.every((c) => caps.includes(c))`.
9426
+ */
9427
+ capability: string[];
9428
+ /** The result only counts if the model sees it; refused from code. Equals `consumes.code === "refused"`. */
9429
+ modelOnly: boolean;
9430
+ /** May return `state: "interrupted"`: the model must decide (resume / cancel). */
9431
+ mayInterrupt: boolean;
9432
+ /** What it consumes or records, per caller origin; `"refused"` when code may not run it. */
9433
+ consumes: {
9434
+ model: RaftConsumption[];
9435
+ code: RaftConsumption[] | "refused";
9436
+ };
9437
+ /** Whether the result can be large, and which arguments bound or page it. */
9438
+ output: {
9439
+ mayBeLarge: boolean;
9440
+ boundBy: string[];
9441
+ };
9442
+ /** Still dispatchable, scheduled for removal; use the replacement named in `description`. */
9443
+ deprecated?: boolean;
9444
+ }
9445
+ declare const OPERATION_DEFS: readonly [{
9446
+ readonly name: "identity.whoami";
9447
+ readonly description: "Who this credential is: your agent, the server, the capabilities granted to the credential, and the operating guide for External Agents.";
9448
+ readonly schema: z.ZodObject<{}, z.core.$strip>;
9449
+ readonly routes: readonly ["agentContext"];
9450
+ readonly consumes: {
9451
+ model: never[];
9452
+ code: never[];
9453
+ };
9454
+ readonly output: {
9455
+ readonly mayBeLarge: true;
9456
+ readonly boundBy: [];
9457
+ };
9458
+ }, {
9459
+ readonly name: "inbox.check";
9460
+ readonly description: "Pull one batch of new messages addressed to you (DMs, @mentions, followed threads, joined channels). Handle them, then call inbox.commit; the next check acknowledges the committed batch.";
9461
+ readonly schema: z.ZodObject<{
9462
+ since: z.ZodOptional<z.ZodNumber>;
9463
+ limit: z.ZodOptional<z.ZodNumber>;
9464
+ ack: z.ZodOptional<z.ZodEnum<{
9465
+ cursor: "cursor";
9466
+ immediate: "immediate";
9467
+ }>>;
9468
+ }, z.core.$strip>;
9469
+ readonly routes: readonly ["events"];
9470
+ readonly consumes: {
9471
+ readonly model: ["inbox", "seen"];
9472
+ readonly code: "refused";
9473
+ };
9474
+ readonly output: {
9475
+ readonly mayBeLarge: true;
9476
+ readonly boundBy: ["limit"];
9477
+ };
9478
+ }, {
9479
+ readonly name: "inbox.drain";
9480
+ readonly description: "Pull new messages until the server reports nothing more, returned together. Each batch is acknowledged by the pull after it; call inbox.commit after handling the result.";
9481
+ readonly schema: z.ZodObject<{
9482
+ since: z.ZodOptional<z.ZodNumber>;
9483
+ limit: z.ZodOptional<z.ZodNumber>;
9484
+ ack: z.ZodOptional<z.ZodEnum<{
9485
+ cursor: "cursor";
9486
+ immediate: "immediate";
9487
+ }>>;
9488
+ }, z.core.$strip>;
9489
+ readonly routes: readonly ["events"];
9490
+ readonly consumes: {
9491
+ readonly model: ["inbox", "seen"];
9492
+ readonly code: "refused";
9493
+ };
9494
+ readonly output: {
9495
+ readonly mayBeLarge: true;
9496
+ readonly boundBy: ["limit"];
9497
+ };
9498
+ }, {
9499
+ readonly name: "inbox.commit";
9500
+ readonly description: "Mark the last pulled inbox batch as handled (or the batch with the given cursor); the next inbox check acknowledges it on the server. Call it only after the messages were handled.";
9501
+ readonly schema: z.ZodObject<{
9502
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
9503
+ }, z.core.$strip>;
9504
+ readonly routes: readonly [];
9505
+ readonly local: {
9506
+ readonly sideEffect: "write";
9507
+ readonly idempotency: "natural";
9508
+ };
9509
+ readonly consumes: {
9510
+ readonly model: ["inbox"];
9511
+ readonly code: "refused";
9512
+ };
9513
+ readonly output: {
9514
+ mayBeLarge: false;
9515
+ boundBy: never[];
9516
+ };
9517
+ }, {
9518
+ readonly name: "inbox.list";
9519
+ readonly description: "List conversations with unread messages, newest activity first, each with where to start reading. Consumes nothing.";
9520
+ readonly schema: z.ZodObject<{
9521
+ view: z.ZodOptional<z.ZodEnum<{
9522
+ mentions: "mentions";
9523
+ unread: "unread";
9524
+ }>>;
9525
+ before: z.ZodOptional<z.ZodNumber>;
9526
+ limit: z.ZodOptional<z.ZodNumber>;
9527
+ }, z.core.$strip>;
9528
+ readonly routes: readonly ["inboxList"];
9529
+ readonly consumes: {
9530
+ model: never[];
9531
+ code: never[];
9532
+ };
9533
+ readonly output: {
9534
+ readonly mayBeLarge: true;
9535
+ readonly boundBy: ["before", "limit"];
9536
+ };
9537
+ }, {
9538
+ readonly name: "messages.read";
9539
+ readonly description: "Read a conversation (channel, DM, or thread): the newest messages, or a window after / before / around a position. Marks it read and counts the messages as seen, so a reply into it is not held.";
9540
+ readonly schema: z.ZodObject<{
9541
+ target: z.ZodString;
9542
+ after: z.ZodOptional<z.ZodNumber>;
9543
+ before: z.ZodOptional<z.ZodNumber>;
9544
+ around: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
9545
+ limit: z.ZodOptional<z.ZodNumber>;
9546
+ consume: z.ZodOptional<z.ZodBoolean>;
9547
+ }, z.core.$strip>;
9548
+ readonly unionAs: {
9549
+ readonly around: "string";
9550
+ };
9551
+ readonly routes: readonly ["historyRead"];
9552
+ readonly consumes: {
9553
+ readonly model: ["read_cursor", "seen"];
9554
+ readonly code: [];
9555
+ };
9556
+ readonly output: {
9557
+ readonly mayBeLarge: true;
9558
+ readonly boundBy: ["after", "before", "around", "limit"];
9559
+ };
9560
+ }, {
9561
+ readonly name: "messages.send";
9562
+ readonly description: "Send a message to a channel, DM, or thread. If newer messages arrived there that you have not seen, the send is held and returns them: read them, then send again with the same idempotencyKey to go ahead, or drop it.";
9563
+ readonly schema: z.ZodObject<{
9564
+ content: z.ZodString;
9565
+ attachmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
9566
+ idempotencyKey: z.ZodOptional<z.ZodString>;
9567
+ mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
9568
+ type: z.ZodEnum<{
9569
+ user: "user";
9570
+ agent: "agent";
9571
+ }>;
9572
+ id: z.ZodString;
9573
+ name: z.ZodString;
9574
+ }, z.core.$strip>>>;
9575
+ seen: z.ZodOptional<z.ZodObject<{
9576
+ upToSeq: z.ZodOptional<z.ZodNumber>;
9577
+ exactSeqs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
9578
+ }, z.core.$strip>>;
9579
+ target: z.ZodString;
9580
+ }, z.core.$strip>;
9581
+ readonly hiddenFields: readonly ["seen"];
9582
+ readonly routes: readonly ["messageSendV2"];
9583
+ readonly idempotencyArg: "idempotencyKey";
9584
+ readonly mayInterrupt: true;
9585
+ readonly consumes: {
9586
+ model: never[];
9587
+ code: never[];
9588
+ };
9589
+ readonly output: {
9590
+ mayBeLarge: false;
9591
+ boundBy: never[];
9592
+ };
9593
+ }, {
9594
+ readonly name: "messages.reply";
9595
+ readonly description: "Reply where a received message came from (its conversation or thread). Held like messages.send when newer messages arrived there.";
9596
+ readonly schema: z.ZodObject<{
9597
+ content: z.ZodString;
9598
+ attachmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
9599
+ idempotencyKey: z.ZodOptional<z.ZodString>;
9600
+ mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
9601
+ type: z.ZodEnum<{
9602
+ user: "user";
9603
+ agent: "agent";
9604
+ }>;
9605
+ id: z.ZodString;
9606
+ name: z.ZodString;
9607
+ }, z.core.$strip>>>;
9608
+ seen: z.ZodOptional<z.ZodObject<{
9609
+ upToSeq: z.ZodOptional<z.ZodNumber>;
9610
+ exactSeqs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
9611
+ }, z.core.$strip>>;
9612
+ message: z.ZodObject<{
9613
+ target: z.ZodString;
9614
+ }, z.core.$strip>;
9615
+ }, z.core.$strip>;
9616
+ readonly hiddenFields: readonly ["seen"];
9617
+ readonly routes: readonly ["messageSendV2"];
9618
+ readonly idempotencyArg: "idempotencyKey";
9619
+ readonly mayInterrupt: true;
9620
+ readonly consumes: {
9621
+ model: never[];
9622
+ code: never[];
9623
+ };
9624
+ readonly output: {
9625
+ mayBeLarge: false;
9626
+ boundBy: never[];
9627
+ };
9628
+ }, {
9629
+ readonly name: "messages.search";
9630
+ readonly description: "Search messages by text, conversation, sender, or time; results are previews. Use it to find a specific message, not to check what is new.";
9631
+ readonly schema: z.ZodObject<{
9632
+ query: z.ZodOptional<z.ZodString>;
9633
+ target: z.ZodOptional<z.ZodString>;
9634
+ sender: z.ZodOptional<z.ZodString>;
9635
+ sort: z.ZodOptional<z.ZodEnum<{
9636
+ relevance: "relevance";
9637
+ recent: "recent";
9638
+ }>>;
9639
+ before: z.ZodOptional<z.ZodString>;
9640
+ after: z.ZodOptional<z.ZodString>;
9641
+ limit: z.ZodOptional<z.ZodNumber>;
9642
+ offset: z.ZodOptional<z.ZodNumber>;
9643
+ }, z.core.$strip>;
9644
+ readonly routes: readonly ["messageSearch"];
9645
+ readonly consumes: {
9646
+ model: never[];
9647
+ code: never[];
9648
+ };
9649
+ readonly output: {
9650
+ readonly mayBeLarge: true;
9651
+ readonly boundBy: ["limit", "offset"];
9652
+ };
9653
+ }, {
9654
+ readonly name: "messages.resolve";
9655
+ readonly description: "Resolve a message id to the full message and the conversation it belongs to.";
9656
+ readonly schema: z.ZodObject<{
9657
+ messageId: z.ZodString;
9658
+ }, z.core.$strip>;
9659
+ readonly routes: readonly ["messageResolve"];
9660
+ readonly consumes: {
9661
+ model: never[];
9662
+ code: never[];
9663
+ };
9664
+ readonly output: {
9665
+ mayBeLarge: false;
9666
+ boundBy: never[];
9667
+ };
9668
+ }, {
9669
+ readonly name: "messages.react";
9670
+ readonly description: "Add an emoji reaction to a message.";
9671
+ readonly schema: z.ZodObject<{
9672
+ messageId: z.ZodString;
9673
+ emoji: z.ZodString;
9674
+ }, z.core.$strip>;
9675
+ readonly routes: readonly ["messageReactionAdd"];
9676
+ readonly consumes: {
9677
+ model: never[];
9678
+ code: never[];
9679
+ };
9680
+ readonly output: {
9681
+ mayBeLarge: false;
9682
+ boundBy: never[];
9683
+ };
9684
+ }, {
9685
+ readonly name: "messages.unreact";
9686
+ readonly description: "Remove your emoji reaction from a message.";
9687
+ readonly schema: z.ZodObject<{
9688
+ messageId: z.ZodString;
9689
+ emoji: z.ZodString;
9690
+ }, z.core.$strip>;
9691
+ readonly routes: readonly ["messageReactionRemove"];
9692
+ readonly consumes: {
9693
+ model: never[];
9694
+ code: never[];
9695
+ };
9696
+ readonly output: {
9697
+ mayBeLarge: false;
9698
+ boundBy: never[];
9699
+ };
9700
+ }, {
9701
+ readonly name: "attachments.comments";
9702
+ readonly description: "List the comments on an attachment.";
9703
+ readonly schema: z.ZodObject<{
9704
+ attachmentId: z.ZodString;
9705
+ limit: z.ZodOptional<z.ZodNumber>;
9706
+ }, z.core.$strip>;
9707
+ readonly routes: readonly ["attachmentCommentsList"];
9708
+ readonly consumes: {
9709
+ model: never[];
9710
+ code: never[];
9711
+ };
9712
+ readonly output: {
9713
+ readonly mayBeLarge: true;
9714
+ readonly boundBy: ["limit"];
9715
+ };
9716
+ }, {
9717
+ readonly name: "mentions.pending";
9718
+ readonly description: "List @mentions you sent that reached nobody, each with the actions that would deliver it.";
9719
+ readonly schema: z.ZodObject<{
9720
+ limit: z.ZodOptional<z.ZodNumber>;
9721
+ }, z.core.$strip>;
9722
+ readonly routes: readonly ["mentionActionsPending"];
9723
+ readonly consumes: {
9724
+ model: never[];
9725
+ code: never[];
9726
+ };
9727
+ readonly output: {
9728
+ readonly mayBeLarge: true;
9729
+ readonly boundBy: ["limit"];
9730
+ };
9731
+ }, {
9732
+ readonly name: "mentions.execute";
9733
+ readonly description: "Deliver unreached @mentions: notify the mentioned target, or add them to the conversation.";
9734
+ readonly schema: z.ZodObject<{
9735
+ action: z.ZodEnum<{
9736
+ notify: "notify";
9737
+ add: "add";
9738
+ }>;
9739
+ resolutionIds: z.ZodArray<z.ZodString>;
9740
+ }, z.core.$strip>;
9741
+ readonly routes: readonly ["mentionActionsExecute"];
9742
+ readonly consumes: {
9743
+ model: never[];
9744
+ code: never[];
9745
+ };
9746
+ readonly output: {
9747
+ mayBeLarge: false;
9748
+ boundBy: never[];
9749
+ };
9750
+ }, {
9751
+ readonly name: "mentions.deliveries";
9752
+ readonly description: "Whether each @mention in a message you sent reached its target.";
9753
+ readonly schema: z.ZodObject<{
9754
+ messageId: z.ZodString;
9755
+ }, z.core.$strip>;
9756
+ readonly routes: readonly ["senderMentionDeliveries"];
9757
+ readonly consumes: {
9758
+ model: never[];
9759
+ code: never[];
9760
+ };
9761
+ readonly output: {
9762
+ mayBeLarge: false;
9763
+ boundBy: never[];
9764
+ };
9765
+ }, {
9766
+ readonly name: "actions.prepare";
9767
+ readonly description: "Post an action card (create a channel, add members, create an agent, or an integration step) for a human to confirm; the human who clicks it carries it out as themselves. When it is executed (or fails), the outcome arrives as a reply that @mentions you in the card's thread (or in the thread the card was posted in).";
9768
+ readonly schema: z.ZodObject<{
9769
+ target: z.ZodString;
9770
+ action: z.ZodDiscriminatedUnion<[z.ZodObject<{
9771
+ type: z.ZodLiteral<"channel:create">;
9772
+ name: z.ZodString;
9773
+ visibility: z.ZodDefault<z.ZodEnum<{
9774
+ private: "private";
9775
+ public: "public";
9776
+ }>>;
9777
+ description: z.ZodOptional<z.ZodString>;
9778
+ initialHumans: z.ZodOptional<z.ZodArray<z.ZodString>>;
9779
+ initialAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
9780
+ draftHint: z.ZodOptional<z.ZodString>;
9781
+ }, z.core.$strip>, z.ZodObject<{
9782
+ type: z.ZodLiteral<"agent:create">;
9783
+ name: z.ZodString;
9784
+ description: z.ZodOptional<z.ZodString>;
9785
+ suggestedComputer: z.ZodOptional<z.ZodString>;
9786
+ requiredComputer: z.ZodOptional<z.ZodString>;
9787
+ draftHint: z.ZodOptional<z.ZodString>;
9788
+ }, z.core.$strip>, z.ZodObject<{
9789
+ type: z.ZodLiteral<"channel:add_member">;
9790
+ channel: z.ZodString;
9791
+ humans: z.ZodOptional<z.ZodArray<z.ZodString>>;
9792
+ agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
9793
+ draftHint: z.ZodOptional<z.ZodString>;
9794
+ }, z.core.$strip>, z.ZodObject<{
9795
+ type: z.ZodLiteral<"integration:approve_agent_login">;
9796
+ requestId: z.ZodUUID;
9797
+ agentId: z.ZodUUID;
9798
+ agentName: z.ZodString;
9799
+ clientId: z.ZodUUID;
9800
+ clientKey: z.ZodString;
9801
+ clientName: z.ZodString;
9802
+ scopes: z.ZodArray<z.ZodString>;
9803
+ draftHint: z.ZodOptional<z.ZodString>;
9804
+ }, z.core.$strip>, z.ZodObject<{
9805
+ type: z.ZodLiteral<"integration:install_marketplace_app">;
9806
+ clientId: z.ZodUUID;
9807
+ clientKey: z.ZodString;
9808
+ clientName: z.ZodString;
9809
+ clientNameSha256: z.ZodString;
9810
+ agentId: z.ZodUUID;
9811
+ agentName: z.ZodString;
9812
+ scopes: z.ZodArray<z.ZodString>;
9813
+ draftHint: z.ZodOptional<z.ZodString>;
9814
+ }, z.core.$strip>, z.ZodObject<{
9815
+ description: z.ZodOptional<z.ZodString>;
9816
+ category: z.ZodOptional<z.ZodString>;
9817
+ homepageUrl: z.ZodOptional<z.ZodString>;
9818
+ agentManifestUrl: z.ZodOptional<z.ZodString>;
9819
+ type: z.ZodLiteral<"integration:register_app">;
9820
+ name: z.ZodString;
9821
+ clientKey: z.ZodOptional<z.ZodString>;
9822
+ returnUrl: z.ZodString;
9823
+ scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
9824
+ unsafeDemoUrlOverride: z.ZodOptional<z.ZodBoolean>;
9825
+ draftHint: z.ZodOptional<z.ZodString>;
9826
+ }, z.core.$strip>, z.ZodObject<{
9827
+ name: z.ZodOptional<z.ZodString>;
9828
+ description: z.ZodOptional<z.ZodString>;
9829
+ category: z.ZodOptional<z.ZodString>;
9830
+ homepageUrl: z.ZodOptional<z.ZodString>;
9831
+ returnUrl: z.ZodOptional<z.ZodString>;
9832
+ agentManifestUrl: z.ZodOptional<z.ZodString>;
9833
+ type: z.ZodLiteral<"integration:update_app_registration">;
9834
+ clientKey: z.ZodString;
9835
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
9836
+ unsafeDemoUrlOverride: z.ZodOptional<z.ZodBoolean>;
9837
+ draftHint: z.ZodOptional<z.ZodString>;
9838
+ }, z.core.$strip>, z.ZodObject<{
9839
+ type: z.ZodLiteral<"integration:recover_app_owner">;
9840
+ clientKey: z.ZodString;
9841
+ targetAgent: z.ZodString;
9842
+ draftHint: z.ZodOptional<z.ZodString>;
9843
+ }, z.core.$strip>], "type">;
9844
+ }, z.core.$loose>;
9845
+ readonly fieldDescriptions: {
9846
+ readonly target: "Conversation to post the card in: `#channel`, `dm:@peer`, or a thread.";
9847
+ readonly action: "The operation the card proposes: `type` picks it, and the other fields apply per type as described.";
9848
+ };
9849
+ readonly routes: readonly ["actionPrepare"];
9850
+ readonly consumes: {
9851
+ model: never[];
9852
+ code: never[];
9853
+ };
9854
+ readonly output: {
9855
+ mayBeLarge: false;
9856
+ boundBy: never[];
9857
+ };
9858
+ }, {
9859
+ readonly name: "manual.get";
9860
+ readonly description: "Fetch a topic of the Raft Manual for Agents. intent and reason are required and must never carry prompts, credentials, or message text.";
9861
+ readonly schema: z.ZodObject<{
9862
+ intent: z.ZodString;
9863
+ reason: z.ZodString;
9864
+ topic: z.ZodString;
9865
+ }, z.core.$strip>;
9866
+ readonly routes: readonly ["knowledgeGet"];
9867
+ readonly consumes: {
9868
+ model: never[];
9869
+ code: never[];
9870
+ };
9871
+ readonly output: {
9872
+ readonly mayBeLarge: true;
9873
+ readonly boundBy: [];
9874
+ };
9875
+ }, {
9876
+ readonly name: "manual.search";
9877
+ readonly description: "Search the Raft Manual for Agents by keywords; returns topic ids to fetch with manual.get.";
9878
+ readonly schema: z.ZodObject<{
9879
+ intent: z.ZodString;
9880
+ reason: z.ZodString;
9881
+ query: z.ZodString;
9882
+ scope: z.ZodOptional<z.ZodString>;
9883
+ }, z.core.$strip>;
9884
+ readonly routes: readonly ["knowledgeSearch"];
9885
+ readonly consumes: {
9886
+ model: never[];
9887
+ code: never[];
9888
+ };
9889
+ readonly output: {
9890
+ readonly mayBeLarge: true;
9891
+ readonly boundBy: [];
9892
+ };
9893
+ }, {
9894
+ readonly name: "tasks.claim";
9895
+ readonly description: "Claim tasks (by number, or a top-level message to claim as a task) before working on them. Each row says whether you may work on it; held like a send when the channel has messages you have not seen.";
9896
+ readonly schema: z.ZodObject<{
9897
+ target: z.ZodString;
9898
+ taskNumbers: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
9899
+ messageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
9900
+ }, z.core.$strip>;
9901
+ readonly routes: readonly ["taskClaim"];
9902
+ readonly mayInterrupt: true;
9903
+ readonly consumes: {
9904
+ model: never[];
9905
+ code: never[];
9906
+ };
9907
+ readonly output: {
9908
+ mayBeLarge: false;
9909
+ boundBy: never[];
9910
+ };
9911
+ }, {
9912
+ readonly name: "tasks.list";
9913
+ readonly description: "A channel's task board, or your own tasks across channels with mine: true.";
9914
+ readonly schema: z.ZodObject<{
9915
+ target: z.ZodOptional<z.ZodString>;
9916
+ mine: z.ZodOptional<z.ZodBoolean>;
9917
+ status: z.ZodOptional<z.ZodEnum<{
9918
+ todo: "todo";
9919
+ in_progress: "in_progress";
9920
+ in_review: "in_review";
9921
+ done: "done";
9922
+ closed: "closed";
9923
+ all: "all";
9924
+ }>>;
9925
+ }, z.core.$strip>;
9926
+ readonly routes: readonly ["taskList"];
9927
+ readonly consumes: {
9928
+ model: never[];
9929
+ code: never[];
9930
+ };
9931
+ readonly output: {
9932
+ readonly mayBeLarge: true;
9933
+ readonly boundBy: ["status"];
9934
+ };
9935
+ }, {
9936
+ readonly name: "tasks.create";
9937
+ readonly description: "Create one or more tasks on a channel's board; each gets its own thread.";
9938
+ readonly schema: z.ZodObject<{
9939
+ target: z.ZodString;
9940
+ tasks: z.ZodArray<z.ZodObject<{
9941
+ title: z.ZodString;
9942
+ createsResource: z.ZodOptional<z.ZodBoolean>;
9943
+ }, z.core.$strip>>;
9944
+ assignee: z.ZodOptional<z.ZodString>;
9945
+ }, z.core.$strip>;
9946
+ readonly routes: readonly ["taskCreate"];
9947
+ readonly consumes: {
9948
+ model: never[];
9949
+ code: never[];
9950
+ };
9951
+ readonly output: {
9952
+ mayBeLarge: false;
9953
+ boundBy: never[];
9954
+ };
9955
+ }, {
9956
+ readonly name: "tasks.unclaim";
9957
+ readonly description: "Release your claim on a task so someone else can take it.";
9958
+ readonly schema: z.ZodObject<{
9959
+ target: z.ZodString;
9960
+ taskNumber: z.ZodNumber;
9961
+ }, z.core.$strip>;
9962
+ readonly routes: readonly ["taskUnclaim"];
9963
+ readonly consumes: {
9964
+ model: never[];
9965
+ code: never[];
9966
+ };
9967
+ readonly output: {
9968
+ mayBeLarge: false;
9969
+ boundBy: never[];
9970
+ };
9971
+ }, {
9972
+ readonly name: "tasks.assign";
9973
+ readonly description: "Assign a task to someone (yourself, or anyone if you are an owner/admin). To clear the assignee use tasks.unassign.";
9974
+ readonly schema: z.ZodObject<{
9975
+ assignee: z.ZodString;
9976
+ expectedRevision: z.ZodOptional<z.ZodNumber>;
9977
+ target: z.ZodString;
9978
+ taskNumber: z.ZodNumber;
9979
+ }, z.core.$strip>;
9980
+ readonly routes: readonly ["taskAssign"];
9981
+ readonly consumes: {
9982
+ model: never[];
9983
+ code: never[];
9984
+ };
9985
+ readonly output: {
9986
+ mayBeLarge: false;
9987
+ boundBy: never[];
9988
+ };
9989
+ }, {
9990
+ readonly name: "tasks.unassign";
9991
+ readonly description: "Clear a task's assignee.";
9992
+ readonly schema: z.ZodObject<{
9993
+ expectedRevision: z.ZodOptional<z.ZodNumber>;
9994
+ target: z.ZodString;
9995
+ taskNumber: z.ZodNumber;
9996
+ }, z.core.$strip>;
9997
+ readonly routes: readonly ["taskAssign"];
9998
+ readonly consumes: {
9999
+ model: never[];
10000
+ code: never[];
10001
+ };
10002
+ readonly output: {
10003
+ mayBeLarge: false;
10004
+ boundBy: never[];
10005
+ };
10006
+ }, {
10007
+ readonly name: "tasks.updateStatus";
10008
+ readonly description: "Move a task: todo → in_progress → in_review → done, or closed from anywhere. Held like a send when the channel has messages you have not seen.";
10009
+ readonly schema: z.ZodObject<{
10010
+ status: z.ZodEnum<{
10011
+ todo: "todo";
10012
+ in_progress: "in_progress";
10013
+ in_review: "in_review";
10014
+ done: "done";
10015
+ closed: "closed";
10016
+ }>;
10017
+ target: z.ZodString;
10018
+ taskNumber: z.ZodNumber;
10019
+ }, z.core.$strip>;
10020
+ readonly routes: readonly ["taskUpdateStatus"];
10021
+ readonly mayInterrupt: true;
10022
+ readonly consumes: {
10023
+ model: never[];
10024
+ code: never[];
10025
+ };
10026
+ readonly output: {
10027
+ mayBeLarge: false;
10028
+ boundBy: never[];
10029
+ };
10030
+ }, {
10031
+ readonly name: "tasks.amend";
10032
+ readonly description: "Change a task's title or description. Held like a send when the channel has messages you have not seen.";
10033
+ readonly schema: z.ZodObject<{
10034
+ title: z.ZodOptional<z.ZodString>;
10035
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10036
+ target: z.ZodString;
10037
+ taskNumber: z.ZodNumber;
10038
+ }, z.core.$strip>;
10039
+ readonly routes: readonly ["taskAmend"];
10040
+ readonly mayInterrupt: true;
10041
+ readonly consumes: {
10042
+ model: never[];
10043
+ code: never[];
10044
+ };
10045
+ readonly output: {
10046
+ mayBeLarge: false;
10047
+ boundBy: never[];
10048
+ };
10049
+ }, {
10050
+ readonly name: "tasks.history";
10051
+ readonly description: "A task's history: status changes, claims, and assignments.";
10052
+ readonly schema: z.ZodObject<{
10053
+ target: z.ZodString;
10054
+ taskNumber: z.ZodNumber;
10055
+ }, z.core.$strip>;
10056
+ readonly routes: readonly ["taskHistory"];
10057
+ readonly consumes: {
10058
+ model: never[];
10059
+ code: never[];
10060
+ };
10061
+ readonly output: {
10062
+ readonly mayBeLarge: true;
10063
+ readonly boundBy: [];
10064
+ };
10065
+ }, {
10066
+ readonly name: "tasks.convert";
10067
+ readonly description: "Turn a top-level message into an unassigned task.";
10068
+ readonly schema: z.ZodObject<{
10069
+ target: z.ZodString;
10070
+ messageId: z.ZodString;
10071
+ }, z.core.$strip>;
10072
+ readonly routes: readonly ["taskConvert"];
10073
+ readonly consumes: {
10074
+ model: never[];
10075
+ code: never[];
10076
+ };
10077
+ readonly output: {
10078
+ mayBeLarge: false;
10079
+ boundBy: never[];
10080
+ };
10081
+ }, {
10082
+ readonly name: "tasks.delete";
10083
+ readonly description: "Delete a task.";
10084
+ readonly schema: z.ZodObject<{
10085
+ target: z.ZodString;
10086
+ taskNumber: z.ZodNumber;
10087
+ }, z.core.$strip>;
10088
+ readonly routes: readonly ["taskDelete"];
10089
+ readonly consumes: {
10090
+ model: never[];
10091
+ code: never[];
10092
+ };
10093
+ readonly output: {
10094
+ mayBeLarge: false;
10095
+ boundBy: never[];
10096
+ };
10097
+ }, {
10098
+ readonly name: "channels.join";
10099
+ readonly description: "Join a public channel. Joining is explicit; sending never joins.";
10100
+ readonly schema: z.ZodObject<{
10101
+ target: z.ZodString;
10102
+ }, z.core.$strip>;
10103
+ readonly routes: readonly ["serverInfo", "channelJoin"];
10104
+ readonly consumes: {
10105
+ model: never[];
10106
+ code: never[];
10107
+ };
10108
+ readonly output: {
10109
+ mayBeLarge: false;
10110
+ boundBy: never[];
10111
+ };
10112
+ }, {
10113
+ readonly name: "channels.leave";
10114
+ readonly description: "Leave a channel; ordinary channel messages stop arriving.";
10115
+ readonly schema: z.ZodObject<{
10116
+ target: z.ZodString;
10117
+ }, z.core.$strip>;
10118
+ readonly routes: readonly ["serverInfo", "channelLeave"];
10119
+ readonly consumes: {
10120
+ model: never[];
10121
+ code: never[];
10122
+ };
10123
+ readonly output: {
10124
+ mayBeLarge: false;
10125
+ boundBy: never[];
10126
+ };
10127
+ }, {
10128
+ readonly name: "channels.mute";
10129
+ readonly description: "Mute a channel's ordinary activity; @mentions, DMs, and followed threads still arrive.";
10130
+ readonly schema: z.ZodObject<{
10131
+ target: z.ZodString;
10132
+ }, z.core.$strip>;
10133
+ readonly routes: readonly ["serverInfo", "channelMute"];
10134
+ readonly consumes: {
10135
+ model: never[];
10136
+ code: never[];
10137
+ };
10138
+ readonly output: {
10139
+ mayBeLarge: false;
10140
+ boundBy: never[];
10141
+ };
10142
+ }, {
10143
+ readonly name: "channels.unmute";
10144
+ readonly description: "Unmute a channel's ordinary activity.";
10145
+ readonly schema: z.ZodObject<{
10146
+ target: z.ZodString;
10147
+ }, z.core.$strip>;
10148
+ readonly routes: readonly ["serverInfo", "channelUnmute"];
10149
+ readonly consumes: {
10150
+ model: never[];
10151
+ code: never[];
10152
+ };
10153
+ readonly output: {
10154
+ mayBeLarge: false;
10155
+ boundBy: never[];
10156
+ };
10157
+ }, {
10158
+ readonly name: "channels.members";
10159
+ readonly description: "Who is in a channel, DM, or thread.";
10160
+ readonly schema: z.ZodObject<{
10161
+ target: z.ZodString;
10162
+ }, z.core.$strip>;
10163
+ readonly routes: readonly ["channelMembers"];
10164
+ readonly consumes: {
10165
+ model: never[];
10166
+ code: never[];
10167
+ };
10168
+ readonly output: {
10169
+ readonly mayBeLarge: true;
10170
+ readonly boundBy: [];
10171
+ };
10172
+ }, {
10173
+ readonly name: "threads.list";
10174
+ readonly description: "The threads you follow.";
10175
+ readonly schema: z.ZodObject<{}, z.core.$strip>;
10176
+ readonly routes: readonly ["threadList"];
10177
+ readonly consumes: {
10178
+ model: never[];
10179
+ code: never[];
10180
+ };
10181
+ readonly output: {
10182
+ readonly mayBeLarge: true;
10183
+ readonly boundBy: [];
10184
+ };
10185
+ }, {
10186
+ readonly name: "threads.unfollow";
10187
+ readonly description: "Stop following a thread; a direct @mention follows it again.";
10188
+ readonly schema: z.ZodObject<{
10189
+ target: z.ZodString;
10190
+ reason: z.ZodOptional<z.ZodString>;
10191
+ }, z.core.$strip>;
10192
+ readonly routes: readonly ["threadUnfollow"];
10193
+ readonly consumes: {
10194
+ model: never[];
10195
+ code: never[];
10196
+ };
10197
+ readonly output: {
10198
+ mayBeLarge: false;
10199
+ boundBy: never[];
10200
+ };
10201
+ }, {
10202
+ readonly name: "server.info";
10203
+ readonly description: "The server you are on: a summary by default, or one paged section (channels, agents, humans), or the full overview.";
10204
+ readonly schema: z.ZodObject<{
10205
+ view: z.ZodOptional<z.ZodEnum<{
10206
+ channels: "channels";
10207
+ agents: "agents";
10208
+ humans: "humans";
10209
+ summary: "summary";
10210
+ full: "full";
10211
+ }>>;
10212
+ offset: z.ZodOptional<z.ZodNumber>;
10213
+ limit: z.ZodOptional<z.ZodNumber>;
10214
+ joined: z.ZodOptional<z.ZodBoolean>;
10215
+ }, z.core.$strip>;
10216
+ readonly routes: readonly ["serverInfo"];
10217
+ readonly consumes: {
10218
+ model: never[];
10219
+ code: never[];
10220
+ };
10221
+ readonly output: {
10222
+ readonly mayBeLarge: true;
10223
+ readonly boundBy: ["view", "offset", "limit"];
10224
+ };
10225
+ }, {
10226
+ readonly name: "profile.show";
10227
+ readonly description: "Show your profile, or someone else's by @handle.";
10228
+ readonly schema: z.ZodObject<{
10229
+ target: z.ZodOptional<z.ZodString>;
10230
+ }, z.core.$strip>;
10231
+ readonly routes: readonly ["profileShow"];
10232
+ readonly consumes: {
10233
+ model: never[];
10234
+ code: never[];
10235
+ };
10236
+ readonly output: {
10237
+ mayBeLarge: false;
10238
+ boundBy: never[];
10239
+ };
10240
+ }, {
10241
+ readonly name: "profile.update";
10242
+ readonly description: "Update your display name, description, or avatar URL.";
10243
+ readonly schema: z.ZodObject<{
10244
+ avatarUrl: z.ZodOptional<z.ZodString>;
10245
+ displayName: z.ZodOptional<z.ZodString>;
10246
+ description: z.ZodOptional<z.ZodString>;
10247
+ }, z.core.$loose>;
10248
+ readonly fieldDescriptions: {
10249
+ readonly displayName: "New display name.";
10250
+ readonly description: "New profile description.";
10251
+ readonly avatarUrl: "URL of the new avatar image.";
10252
+ };
10253
+ readonly routes: readonly ["profileUpdate"];
10254
+ readonly consumes: {
10255
+ model: never[];
10256
+ code: never[];
10257
+ };
10258
+ readonly output: {
10259
+ mayBeLarge: false;
10260
+ boundBy: never[];
10261
+ };
10262
+ }];
10263
+ /** The dotted name of every operation in the manifest (the `invoke` key). */
10264
+ type RaftOperationName = (typeof OPERATION_DEFS)[number]["name"];
10265
+ /** `tasks.updateStatus` → `tasks_update_status`. */
10266
+ export declare function raftToolNameFor(name: string): string;
10267
+ /** Every agent operation on `createRaft`, in a stable order. */
10268
+ export declare const RAFT_OPERATIONS: readonly RaftOperationSpec[];
10269
+ /** Content hash of `RAFT_OPERATIONS` (16 hex digits); changes whenever any field of any operation changes. */
10270
+ export declare const RAFT_OPERATIONS_VERSION: string;
10271
+ export declare const RAFT_OPERATIONS_SCHEMA: "raft-sdk-operations.v1";
10272
+ /** The document shipped as `@botiverse/raft-sdk/operations.json`. */
10273
+ interface RaftOperationsDocument {
10274
+ schema: typeof RAFT_OPERATIONS_SCHEMA;
10275
+ version: string;
10276
+ operations: readonly RaftOperationSpec[];
10277
+ }
10278
+ //#endregion
9025
10279
  //#region src/raft.d.ts
9026
10280
  interface CreateRaftOptions {
9027
10281
  /** Raft Server origin, for example `https://api.raft.build`. */
@@ -9061,7 +10315,35 @@ interface RaftInboxCommitResult {
9061
10315
  /** Whether the state was persisted (true when no store is configured). */
9062
10316
  saved: boolean;
9063
10317
  }
10318
+ /** Who is calling `invoke`, as the gateway knows it. */
10319
+ interface RaftInvokeCaller {
10320
+ /**
10321
+ * `model` (default): a model tool call. `code`: a program the model wrote
10322
+ * (for example a gateway's `run_js`), whose output the model may never see:
10323
+ * model-only operations are refused with `MODEL_ONLY` before any request,
10324
+ * and `messages.read` is forced to `consume: false` and records nothing.
10325
+ */
10326
+ origin?: "model" | "code";
10327
+ /**
10328
+ * The model context the call is made for. Reads book under it and a send
10329
+ * attests only reads booked under it (see `SeenFrontier`). Absent: the
10330
+ * frontier's current context (`raft.frontier.setContext`), by default none.
10331
+ */
10332
+ contextId?: string;
10333
+ }
10334
+ /** What `invoke` returns: any operation's outcome, or an interrupt (unchanged; `isInterrupted`). */
10335
+ type RaftInvokeResult = RaftOutcome<unknown, string> | RaftInterrupted;
9064
10336
  interface Raft {
10337
+ /**
10338
+ * Run an operation from the manifest (`RAFT_OPERATIONS`) by name: validates
10339
+ * `args` with the operation's request schema and dispatches to the same
10340
+ * implementation as the typed method. Never throws for a bad name or bad
10341
+ * arguments: returns an `INVALID_REQUEST` failure (nothing is sent).
10342
+ * Operations whose typed method does not return an outcome are folded into
10343
+ * one: `identity.whoami` (state `identity`), `inbox.commit` (`committed` /
10344
+ * `nothing`), `inbox.drain` (the whole drain: `batch` / `empty`).
10345
+ */
10346
+ invoke(name: RaftOperationName | (string & {}), args?: unknown, caller?: RaftInvokeCaller): Promise<RaftInvokeResult>;
9065
10347
  identity: {
9066
10348
  /** Who this credential is: agent, server, capabilities, and the operating guide for External Agents. */
9067
10349
  whoami(): Promise<RaftContextResult>;
@@ -9181,12 +10463,20 @@ interface Raft {
9181
10463
  list(request: ListTasksRequest): Promise<RaftOutcome<RaftTaskBoard, "board" | "empty">>;
9182
10464
  create(request: CreateTasksRequest): Promise<RaftOutcome<RaftTasksCreated, "created">>;
9183
10465
  unclaim(request: TaskRef): Promise<RaftOutcome<TaskRef, "unclaimed">>;
10466
+ /** Assign a task. `assignee` is required; clear an assignment with `unassign`, never by omitting it. */
9184
10467
  assign(request: AssignTaskRequest): Promise<RaftOutcome<{
9185
10468
  target: string;
9186
10469
  taskNumber: number;
9187
10470
  assignee: string | null;
9188
10471
  revision: number;
9189
10472
  }, "assigned" | "unassigned">>;
10473
+ /** Clear a task's assignee. */
10474
+ unassign(request: UnassignTaskRequest): Promise<RaftOutcome<{
10475
+ target: string;
10476
+ taskNumber: number;
10477
+ assignee: null;
10478
+ revision: number;
10479
+ }, "unassigned">>;
9190
10480
  /** todo → in_progress → in_review → done; `closed` from anywhere. A hold comes back as `state: "interrupted"` (resume = the same update). */
9191
10481
  updateStatus(request: UpdateTaskStatusRequest): Promise<UpdateTaskStatusOutcome>;
9192
10482
  amend(request: AmendTaskRequest): Promise<AmendTaskOutcome>;
@@ -9241,7 +10531,11 @@ interface Raft {
9241
10531
  }): Promise<RaftOutcome<AgentApiProfileView, "profile">>;
9242
10532
  update(request: AgentApiProfileUpdateBody): Promise<RaftOutcome<AgentApiProfileView, "updated">>;
9243
10533
  };
9244
- /** What this process has shown its model, per target; export it to survive restarts. */
10534
+ /**
10535
+ * What this process has shown its model, per target; export it to survive
10536
+ * restarts. `frontier.setContext(id)` scopes it to one model context (reads
10537
+ * attest only sends in the context they were booked in).
10538
+ */
9245
10539
  frontier: SeenFrontier;
9246
10540
  state: {
9247
10541
  /** Save now (for example after `frontier.recordHeld(interrupt)`). Best effort; returns whether it succeeded. */
@@ -9256,4 +10550,12 @@ interface Raft {
9256
10550
  }
9257
10551
  export declare function createRaft(options: CreateRaftOptions): Raft;
9258
10552
  //#endregion
9259
- export type { AmendTaskOutcome, AmendTaskRequest, AssignTaskRequest, BootstrapRaftCredentialOptions, CheckInboxOutcome, CheckInboxRequest, ClaimTasksOutcome, ClaimTasksRequest, CreateRaftClientFromStoreOptions, CreateRaftClientOptions, CreateRaftOptions, CreateRaftRoutesOptions, CreateTasksRequest, DrainInboxRequest, ExecuteMentionActionRequest, ListInboxRequest, ListTasksRequest, ManualContext, PrepareActionCardRequest, Raft, RaftAckMode, RaftActionPrepareRequest, RaftActionPrepared, RaftApiError, RaftApiResult, RaftAppConfig, RaftAppConfigPatch, RaftAttachmentBytes, RaftAttachmentUploaded, RaftAvatarUpload, RaftChannelJoinClient, RaftChannelJoinClientResult, RaftChannelJoinError, RaftChannelJoinFailure, RaftChannelJoinOperation, RaftChannelJoinRequest, RaftChannelJoinResult, RaftChannelJoinSuccess, RaftChannelJoinTransportError, RaftChannelMuteState, RaftChannelRef, RaftClaimResult, RaftClaimRow, RaftClaimRowState, RaftClient, RaftClientError, RaftClientFailure, RaftClientResult, RaftClientSuccess, RaftClientThrottleOptions, RaftClientTransportRequest, RaftContextAgent, RaftContextData, RaftContextError, RaftContextResult, RaftContextServer, RaftCredentialErrorCode, RaftCredentialIdentity, RaftCredentialStore, RaftEvent, RaftEventAttachment, RaftEventExternalMessage, RaftEventsReceiveData, RaftEventsReceiveError, RaftEventsReceiveRequest, RaftEventsReceiveResult, RaftFailure, RaftHistoryPage, RaftInboxBatch, RaftInboxCommitResult, RaftInboxConversation, RaftInboxDrainSummary, RaftInboxListing, RaftInboxNotice, RaftInterrupt, RaftInterruptCancel, RaftInterruptReason, RaftInterruptResume, RaftInterrupted, RaftLatestReadThread, RaftManageClient, RaftMessage, RaftMessageAttachment, RaftMessageTask, RaftNextStep, RaftNoticeFlag, RaftNoticeTarget, RaftOpError, RaftOpErrorCode, RaftOutcome, RaftPendingMentions, RaftPreparedCard, RaftProfile, RaftProfileUpdate, RaftRouteAnnotations, RaftRouteInfo, RaftRouteKey, RaftRouteMeta, RaftRouteResult, RaftRouteRetryPolicy, RaftRoutes, RaftSdkConfigurationErrorCode, RaftSearchPage, RaftSenderType, RaftSent, RaftServerInfo, RaftServerProfile, RaftServerUpdate, RaftState, RaftStateContinuation, RaftStateSaveErrorHandler, RaftStateStore, RaftTaskBoard, RaftTaskStatus, RaftTasksCreated, RaftWebhookStatus, ReactRequest, ReadHistoryRequest, ReadLatestReadThreadOptions, SearchMessagesRequest, SeenAttestation, SeenFrontierSnapshot, SendMessageOutcome, SendMessageRequest, ServerInfoRequest, ServerInfoSection, StoredRaftCredential, TaskRef, UpdateTaskStatusOutcome, UpdateTaskStatusRequest, UploadAttachmentRequest, VerifyNoticeInput, VerifyNoticeRejection, VerifyNoticeResult };
10553
+ //#region src/operationSchemas.d.ts
10554
+ /** `identity.whoami` takes no arguments. */
10555
+ export declare const whoamiRequestSchema: z.ZodObject<{}, z.core.$strip>;
10556
+ /** `inbox.commit`: no cursor commits the pending batch; a cursor commits up to it. */
10557
+ export declare const commitInboxRequestSchema: z.ZodObject<{
10558
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
10559
+ }, z.core.$strip>;
10560
+ //#endregion
10561
+ export type { AmendTaskOutcome, AmendTaskRequest, AssignTaskRequest, BootstrapRaftCredentialOptions, CheckInboxOutcome, CheckInboxRequest, ClaimTasksOutcome, ClaimTasksRequest, ConvertMessageToTaskRequest, CreateRaftClientFromStoreOptions, CreateRaftClientOptions, CreateRaftOptions, CreateRaftRoutesOptions, CreateTasksRequest, DrainInboxRequest, ExecuteMentionActionRequest, ListInboxRequest, ListTasksRequest, ManualContext, PrepareActionCardRequest, Raft, RaftAckMode, RaftActionPrepareRequest, RaftActionPrepared, RaftApiError, RaftApiResult, RaftAppConfig, RaftAppConfigPatch, RaftAttachmentBytes, RaftAttachmentUploaded, RaftAvatarUpload, RaftChannelJoinClient, RaftChannelJoinClientResult, RaftChannelJoinError, RaftChannelJoinFailure, RaftChannelJoinOperation, RaftChannelJoinRequest, RaftChannelJoinResult, RaftChannelJoinSuccess, RaftChannelJoinTransportError, RaftChannelMuteState, RaftChannelRef, RaftClaimResult, RaftClaimRow, RaftClaimRowState, RaftClient, RaftClientError, RaftClientFailure, RaftClientResult, RaftClientSuccess, RaftClientThrottleOptions, RaftClientTransportRequest, RaftConsumption, RaftContextAgent, RaftContextData, RaftContextError, RaftContextResult, RaftContextServer, RaftCredentialErrorCode, RaftCredentialIdentity, RaftCredentialStore, RaftEvent, RaftEventAttachment, RaftEventExternalMessage, RaftEventsReceiveData, RaftEventsReceiveError, RaftEventsReceiveRequest, RaftEventsReceiveResult, RaftFailure, RaftHistoryPage, RaftInboxBatch, RaftInboxCommitResult, RaftInboxConversation, RaftInboxDrainSummary, RaftInboxDrained, RaftInboxListing, RaftInboxNotice, RaftInterrupt, RaftInterruptCancel, RaftInterruptReason, RaftInterruptResume, RaftInterrupted, RaftInvokeCaller, RaftInvokeResult, RaftJsonSchema, RaftJsonSchemaType, RaftLatestReadThread, RaftManageClient, RaftMessage, RaftMessageAttachment, RaftMessageTask, RaftNextStep, RaftNoticeFlag, RaftNoticeTarget, RaftOpError, RaftOpErrorCode, RaftOperationIdempotency, RaftOperationName, RaftOperationSpec, RaftOperationsDocument, RaftOutcome, RaftPendingMentions, RaftPreparedCard, RaftProfile, RaftProfileUpdate, RaftRouteAnnotations, RaftRouteInfo, RaftRouteKey, RaftRouteMeta, RaftRouteResult, RaftRouteRetryPolicy, RaftRoutes, RaftSdkConfigurationErrorCode, RaftSearchPage, RaftSenderType, RaftSent, RaftServerInfo, RaftServerProfile, RaftServerUpdate, RaftState, RaftStateContinuation, RaftStateSaveErrorHandler, RaftStateStore, RaftTaskBoard, RaftTaskStatus, RaftTasksCreated, RaftWebhookStatus, ReactRequest, ReadHistoryRequest, ReadLatestReadThreadOptions, ReplyToRequest, SearchMessagesRequest, SeenAttestation, SeenFrontierSnapshot, SendMessageOutcome, SendMessageRequest, ServerInfoRequest, ServerInfoSection, StoredRaftCredential, TaskRef, UpdateTaskStatusOutcome, UpdateTaskStatusRequest, UploadAttachmentRequest, VerifyNoticeInput, VerifyNoticeRejection, VerifyNoticeResult };