@botiverse/raft-sdk 0.6.0 → 0.8.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/README.md +158 -4
- package/dist/cjs/index.cjs +1780 -195
- package/dist/esm/index.js +1741 -196
- package/dist/index.d.ts +1498 -68
- package/operations.json +2087 -0
- package/package.json +6 -3
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
|
|
509
|
-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
|
757
|
-
assignee: string
|
|
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";
|
|
@@ -826,7 +1007,54 @@ interface VerifyNoticeInput {
|
|
|
826
1007
|
export declare function verifyInboxNotice(input: VerifyNoticeInput): Promise<VerifyNoticeResult>;
|
|
827
1008
|
type RaftWebhookStatus = AgentApiPushWebhookStatusResponse;
|
|
828
1009
|
//#endregion
|
|
1010
|
+
//#region ../shared/src/agentText/server.d.ts
|
|
1011
|
+
interface AgentChannelInfo {
|
|
1012
|
+
id?: string | null;
|
|
1013
|
+
name: string;
|
|
1014
|
+
joined: boolean;
|
|
1015
|
+
type?: string | null;
|
|
1016
|
+
description?: string | null;
|
|
1017
|
+
muted?: boolean | null;
|
|
1018
|
+
activityMuted?: boolean | null;
|
|
1019
|
+
archived?: boolean | null;
|
|
1020
|
+
channelRole?: "member" | "admin" | null;
|
|
1021
|
+
channelAdminBasis?: "server_role" | "channel_role" | "both" | null;
|
|
1022
|
+
channelCapabilities?: Record<string, boolean> | null;
|
|
1023
|
+
}
|
|
1024
|
+
interface AgentAgentInfo {
|
|
1025
|
+
name: string;
|
|
1026
|
+
status?: string | null;
|
|
1027
|
+
activity?: string | null;
|
|
1028
|
+
activityDetail?: string | null;
|
|
1029
|
+
role?: "owner" | "admin" | "member" | string | null;
|
|
1030
|
+
description?: string | null;
|
|
1031
|
+
}
|
|
1032
|
+
interface AgentHumanInfo {
|
|
1033
|
+
name: string;
|
|
1034
|
+
role?: "owner" | "admin" | "member" | string | null;
|
|
1035
|
+
description?: string | null;
|
|
1036
|
+
}
|
|
1037
|
+
interface AgentPageInfo {
|
|
1038
|
+
total: number;
|
|
1039
|
+
offset: number;
|
|
1040
|
+
limit: number;
|
|
1041
|
+
nextCommand?: string;
|
|
1042
|
+
}
|
|
1043
|
+
//#endregion
|
|
829
1044
|
//#region ../shared/src/agentOps/channels.d.ts
|
|
1045
|
+
/** `{ target }` of a regular channel (join, leave, mute, unmute). */
|
|
1046
|
+
export declare const channelTargetRequestSchema: z.ZodObject<{
|
|
1047
|
+
target: z.ZodString;
|
|
1048
|
+
}, z.core.$strip>;
|
|
1049
|
+
export declare const channelMembersRequestSchema: z.ZodObject<{
|
|
1050
|
+
target: z.ZodString;
|
|
1051
|
+
}, z.core.$strip>;
|
|
1052
|
+
/** `threads.list` takes no arguments. */
|
|
1053
|
+
export declare const listThreadsRequestSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1054
|
+
export declare const unfollowThreadRequestSchema: z.ZodObject<{
|
|
1055
|
+
target: z.ZodString;
|
|
1056
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1057
|
+
}, z.core.$strip>;
|
|
830
1058
|
interface RaftChannelRef {
|
|
831
1059
|
target: string;
|
|
832
1060
|
channelId: string;
|
|
@@ -836,13 +1064,17 @@ interface RaftChannelMuteState extends RaftChannelRef {
|
|
|
836
1064
|
muteFromSeq: number | null;
|
|
837
1065
|
stillArrives: string[];
|
|
838
1066
|
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
1067
|
+
export declare const channelInfoRequestSchema: z.ZodObject<{
|
|
1068
|
+
target: z.ZodString;
|
|
1069
|
+
}, z.core.$strip>;
|
|
1070
|
+
interface RaftChannelInfo {
|
|
1071
|
+
/** The channel as `server.info` lists it (`joined` and the attention flags are yours). */
|
|
1072
|
+
channel: AgentChannelInfo;
|
|
1073
|
+
/** Roster counts, or null when the Server refused the roster (the text then omits `Members:`). */
|
|
1074
|
+
memberCounts: {
|
|
1075
|
+
agents: number;
|
|
1076
|
+
humans: number;
|
|
1077
|
+
} | null;
|
|
846
1078
|
}
|
|
847
1079
|
//#endregion
|
|
848
1080
|
//#region ../shared/src/agentOps/server.d.ts
|
|
@@ -856,6 +1088,27 @@ interface ServerInfoRequest {
|
|
|
856
1088
|
/** Channels only: restrict to joined channels. */
|
|
857
1089
|
joined?: boolean;
|
|
858
1090
|
}
|
|
1091
|
+
export declare const serverInfoRequestSchema: z.ZodObject<{
|
|
1092
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
1093
|
+
channels: "channels";
|
|
1094
|
+
agents: "agents";
|
|
1095
|
+
humans: "humans";
|
|
1096
|
+
summary: "summary";
|
|
1097
|
+
full: "full";
|
|
1098
|
+
}>>;
|
|
1099
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1100
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1101
|
+
joined: z.ZodOptional<z.ZodBoolean>;
|
|
1102
|
+
}, z.core.$strip>;
|
|
1103
|
+
export declare const showProfileRequestSchema: z.ZodObject<{
|
|
1104
|
+
target: z.ZodOptional<z.ZodString>;
|
|
1105
|
+
}, z.core.$strip>;
|
|
1106
|
+
/** The Agent API's profile body schema; at least one field is required (checked by the operation). */
|
|
1107
|
+
export declare const updateProfileRequestSchema: z.ZodObject<{
|
|
1108
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
1109
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1110
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1111
|
+
}, z.core.$loose>;
|
|
859
1112
|
interface RaftServerInfo {
|
|
860
1113
|
view: NonNullable<ServerInfoRequest["view"]>;
|
|
861
1114
|
server: AgentApiServerInfoResponse;
|
|
@@ -864,8 +1117,41 @@ interface RaftServerInfo {
|
|
|
864
1117
|
section: ServerInfoSection;
|
|
865
1118
|
}) | null;
|
|
866
1119
|
}
|
|
1120
|
+
interface UserInfoRequest {
|
|
1121
|
+
/** The user's handle, `@name` or `name`. */
|
|
1122
|
+
name: string;
|
|
1123
|
+
/** Visible channels to skip before inspecting memberships (default 0). */
|
|
1124
|
+
offset?: number;
|
|
1125
|
+
/** Visible channels to inspect for memberships (default 50). */
|
|
1126
|
+
limit?: number;
|
|
1127
|
+
}
|
|
1128
|
+
export declare const userInfoRequestSchema: z.ZodObject<{
|
|
1129
|
+
name: z.ZodString;
|
|
1130
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1131
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1132
|
+
}, z.core.$strip>;
|
|
1133
|
+
type RaftUserRef = {
|
|
1134
|
+
kind: "agent";
|
|
1135
|
+
value: AgentAgentInfo;
|
|
1136
|
+
} | {
|
|
1137
|
+
kind: "human";
|
|
1138
|
+
value: AgentHumanInfo;
|
|
1139
|
+
};
|
|
1140
|
+
interface RaftUserInfo {
|
|
1141
|
+
user: RaftUserRef;
|
|
1142
|
+
/** The inspected visible channels whose roster lists the user (`joined` is the user's, not yours). */
|
|
1143
|
+
memberships: AgentChannelInfo[];
|
|
1144
|
+
/** Inspected channels whose roster the Server refused; they are not counted either way. */
|
|
1145
|
+
skippedChannels: number;
|
|
1146
|
+
/** Paging over the visible channels (`total` is all visible channels). */
|
|
1147
|
+
page: AgentPageInfo;
|
|
1148
|
+
}
|
|
867
1149
|
//#endregion
|
|
868
1150
|
//#region ../shared/src/agentOps/attachments.d.ts
|
|
1151
|
+
export declare const attachmentCommentsRequestSchema: z.ZodObject<{
|
|
1152
|
+
attachmentId: z.ZodString;
|
|
1153
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1154
|
+
}, z.core.$strip>;
|
|
869
1155
|
/** Explicit type wins; otherwise sniff the bytes, then the filename extension, then octet-stream. */
|
|
870
1156
|
export declare function inferAttachmentMimeType(filename: string, bytes: Uint8Array, explicit?: string | null): string;
|
|
871
1157
|
interface UploadAttachmentRequest {
|
|
@@ -901,6 +1187,26 @@ interface SearchMessagesRequest {
|
|
|
901
1187
|
limit?: number;
|
|
902
1188
|
offset?: number;
|
|
903
1189
|
}
|
|
1190
|
+
export declare const searchMessagesRequestSchema: z.ZodObject<{
|
|
1191
|
+
query: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
target: z.ZodOptional<z.ZodString>;
|
|
1193
|
+
sender: z.ZodOptional<z.ZodString>;
|
|
1194
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
1195
|
+
relevance: "relevance";
|
|
1196
|
+
recent: "recent";
|
|
1197
|
+
}>>;
|
|
1198
|
+
before: z.ZodOptional<z.ZodString>;
|
|
1199
|
+
after: z.ZodOptional<z.ZodString>;
|
|
1200
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1201
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1202
|
+
}, z.core.$strip>;
|
|
1203
|
+
export declare const resolveMessageRequestSchema: z.ZodObject<{
|
|
1204
|
+
messageId: z.ZodString;
|
|
1205
|
+
}, z.core.$strip>;
|
|
1206
|
+
export declare const reactRequestSchema: z.ZodObject<{
|
|
1207
|
+
messageId: z.ZodString;
|
|
1208
|
+
emoji: z.ZodString;
|
|
1209
|
+
}, z.core.$strip>;
|
|
904
1210
|
interface RaftSearchPage {
|
|
905
1211
|
query: string;
|
|
906
1212
|
results: AgentApiMessageSearchResponse["results"];
|
|
@@ -939,6 +1245,19 @@ interface AgentMentionActionResult {
|
|
|
939
1245
|
}
|
|
940
1246
|
//#endregion
|
|
941
1247
|
//#region ../shared/src/agentOps/mentions.d.ts
|
|
1248
|
+
export declare const pendingMentionActionsRequestSchema: z.ZodObject<{
|
|
1249
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1250
|
+
}, z.core.$strip>;
|
|
1251
|
+
export declare const executeMentionActionRequestSchema: z.ZodObject<{
|
|
1252
|
+
action: z.ZodEnum<{
|
|
1253
|
+
notify: "notify";
|
|
1254
|
+
add: "add";
|
|
1255
|
+
}>;
|
|
1256
|
+
resolutionIds: z.ZodArray<z.ZodString>;
|
|
1257
|
+
}, z.core.$strip>;
|
|
1258
|
+
export declare const senderMentionDeliveriesRequestSchema: z.ZodObject<{
|
|
1259
|
+
messageId: z.ZodString;
|
|
1260
|
+
}, z.core.$strip>;
|
|
942
1261
|
interface RaftPendingMentions {
|
|
943
1262
|
actions: AgentPendingMentionAction[];
|
|
944
1263
|
/** Server-reported; `null` when it did not say (completeness not asserted). */
|
|
@@ -955,6 +1274,17 @@ interface ManualContext {
|
|
|
955
1274
|
intent: string;
|
|
956
1275
|
reason: string;
|
|
957
1276
|
}
|
|
1277
|
+
export declare const getManualTopicRequestSchema: z.ZodObject<{
|
|
1278
|
+
intent: z.ZodString;
|
|
1279
|
+
reason: z.ZodString;
|
|
1280
|
+
topic: z.ZodString;
|
|
1281
|
+
}, z.core.$strip>;
|
|
1282
|
+
export declare const searchManualRequestSchema: z.ZodObject<{
|
|
1283
|
+
intent: z.ZodString;
|
|
1284
|
+
reason: z.ZodString;
|
|
1285
|
+
query: z.ZodString;
|
|
1286
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
1287
|
+
}, z.core.$strip>;
|
|
958
1288
|
//#endregion
|
|
959
1289
|
//#region ../shared/src/agentOps/state.d.ts
|
|
960
1290
|
export declare const RAFT_STATE_SCHEMA: "raft-sdk-state.v1";
|
|
@@ -1001,6 +1331,88 @@ export declare function hashRaftSendContent(target: string, content: string, att
|
|
|
1001
1331
|
//#endregion
|
|
1002
1332
|
//#region ../shared/src/agentOps/actions.d.ts
|
|
1003
1333
|
type PrepareActionCardRequest = AgentApiActionPrepareBody;
|
|
1334
|
+
/**
|
|
1335
|
+
* The Agent API's own body schema (a discriminated union over the card
|
|
1336
|
+
* types), so the SDK checks exactly what the Server checks. The operation
|
|
1337
|
+
* manifest projects it flattened (see the SDK's operations.ts).
|
|
1338
|
+
*/
|
|
1339
|
+
export declare const prepareActionCardRequestSchema: import("zod").ZodObject<{
|
|
1340
|
+
target: import("zod").ZodString;
|
|
1341
|
+
action: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
|
|
1342
|
+
type: import("zod").ZodLiteral<"channel:create">;
|
|
1343
|
+
name: import("zod").ZodString;
|
|
1344
|
+
visibility: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1345
|
+
private: "private";
|
|
1346
|
+
public: "public";
|
|
1347
|
+
}>>;
|
|
1348
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1349
|
+
initialHumans: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1350
|
+
initialAgents: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1351
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1352
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1353
|
+
type: import("zod").ZodLiteral<"agent:create">;
|
|
1354
|
+
name: import("zod").ZodString;
|
|
1355
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1356
|
+
suggestedComputer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1357
|
+
requiredComputer: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1358
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1359
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1360
|
+
type: import("zod").ZodLiteral<"channel:add_member">;
|
|
1361
|
+
channel: import("zod").ZodString;
|
|
1362
|
+
humans: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1363
|
+
agents: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1364
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1365
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1366
|
+
type: import("zod").ZodLiteral<"integration:approve_agent_login">;
|
|
1367
|
+
requestId: import("zod").ZodUUID;
|
|
1368
|
+
agentId: import("zod").ZodUUID;
|
|
1369
|
+
agentName: import("zod").ZodString;
|
|
1370
|
+
clientId: import("zod").ZodUUID;
|
|
1371
|
+
clientKey: import("zod").ZodString;
|
|
1372
|
+
clientName: import("zod").ZodString;
|
|
1373
|
+
scopes: import("zod").ZodArray<import("zod").ZodString>;
|
|
1374
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1375
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1376
|
+
type: import("zod").ZodLiteral<"integration:install_marketplace_app">;
|
|
1377
|
+
clientId: import("zod").ZodUUID;
|
|
1378
|
+
clientKey: import("zod").ZodString;
|
|
1379
|
+
clientName: import("zod").ZodString;
|
|
1380
|
+
clientNameSha256: import("zod").ZodString;
|
|
1381
|
+
agentId: import("zod").ZodUUID;
|
|
1382
|
+
agentName: import("zod").ZodString;
|
|
1383
|
+
scopes: import("zod").ZodArray<import("zod").ZodString>;
|
|
1384
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1385
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1386
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1387
|
+
category: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1388
|
+
homepageUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1389
|
+
agentManifestUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1390
|
+
type: import("zod").ZodLiteral<"integration:register_app">;
|
|
1391
|
+
name: import("zod").ZodString;
|
|
1392
|
+
clientKey: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1393
|
+
returnUrl: import("zod").ZodString;
|
|
1394
|
+
scopes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1395
|
+
unsafeDemoUrlOverride: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1396
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1397
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1398
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1399
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1400
|
+
category: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1401
|
+
homepageUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1402
|
+
returnUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1403
|
+
agentManifestUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1404
|
+
type: import("zod").ZodLiteral<"integration:update_app_registration">;
|
|
1405
|
+
clientKey: import("zod").ZodString;
|
|
1406
|
+
scopes: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1407
|
+
unsafeDemoUrlOverride: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1408
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1409
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1410
|
+
type: import("zod").ZodLiteral<"integration:recover_app_owner">;
|
|
1411
|
+
clientKey: import("zod").ZodString;
|
|
1412
|
+
targetAgent: import("zod").ZodString;
|
|
1413
|
+
draftHint: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1414
|
+
}, import("zod/v4/core").$strip>], "type">;
|
|
1415
|
+
}, import("zod/v4/core").$loose>;
|
|
1004
1416
|
interface RaftPreparedCard {
|
|
1005
1417
|
target: string;
|
|
1006
1418
|
/** The card message; a human commits it by clicking its action verb. */
|
|
@@ -1292,8 +1704,8 @@ interface TaskResourceReceipt {
|
|
|
1292
1704
|
declare const attachmentUploadSessionSchema: z.ZodObject<{
|
|
1293
1705
|
uploadId: z.ZodUUID;
|
|
1294
1706
|
state: z.ZodEnum<{
|
|
1295
|
-
expired: "expired";
|
|
1296
1707
|
pending: "pending";
|
|
1708
|
+
expired: "expired";
|
|
1297
1709
|
canceled: "canceled";
|
|
1298
1710
|
completed: "completed";
|
|
1299
1711
|
verifying: "verifying";
|
|
@@ -1309,8 +1721,8 @@ declare const attachmentUploadSessionSchema: z.ZodObject<{
|
|
|
1309
1721
|
}, z.core.$strict>>;
|
|
1310
1722
|
terminalReason: z.ZodNullable<z.ZodString>;
|
|
1311
1723
|
reservationState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
1312
|
-
expired: "expired";
|
|
1313
1724
|
pending: "pending";
|
|
1725
|
+
expired: "expired";
|
|
1314
1726
|
canceled: "canceled";
|
|
1315
1727
|
consumed: "consumed";
|
|
1316
1728
|
}>>>;
|
|
@@ -1655,8 +2067,8 @@ declare const agentApiInboxListResponseSchema: z.ZodObject<{
|
|
|
1655
2067
|
target: z.ZodString;
|
|
1656
2068
|
kind: z.ZodEnum<{
|
|
1657
2069
|
channel: "channel";
|
|
1658
|
-
thread: "thread";
|
|
1659
2070
|
dm: "dm";
|
|
2071
|
+
thread: "thread";
|
|
1660
2072
|
}>;
|
|
1661
2073
|
unread: z.ZodNumber;
|
|
1662
2074
|
mentions: z.ZodNumber;
|
|
@@ -1891,13 +2303,13 @@ declare const agentApiIntegrationAppUpdateBodySchema: z.ZodObject<{
|
|
|
1891
2303
|
declare const agentApiIntegrationAppManageBodySchema: z.ZodObject<{
|
|
1892
2304
|
clientKey: z.ZodString;
|
|
1893
2305
|
action: z.ZodEnum<{
|
|
2306
|
+
delete: "delete";
|
|
1894
2307
|
share_link_get: "share_link_get";
|
|
1895
2308
|
share_link_create: "share_link_create";
|
|
1896
2309
|
share_link_revoke: "share_link_revoke";
|
|
1897
2310
|
request_publish: "request_publish";
|
|
1898
2311
|
request_unpublish: "request_unpublish";
|
|
1899
2312
|
clear_logo: "clear_logo";
|
|
1900
|
-
delete: "delete";
|
|
1901
2313
|
}>;
|
|
1902
2314
|
expiresInDays: z.ZodOptional<z.ZodNumber>;
|
|
1903
2315
|
}, z.core.$loose>;
|
|
@@ -1911,8 +2323,8 @@ declare const agentApiActionPrepareBodySchema: z.ZodObject<{
|
|
|
1911
2323
|
type: z.ZodLiteral<"channel:create">;
|
|
1912
2324
|
name: z.ZodString;
|
|
1913
2325
|
visibility: z.ZodDefault<z.ZodEnum<{
|
|
1914
|
-
public: "public";
|
|
1915
2326
|
private: "private";
|
|
2327
|
+
public: "public";
|
|
1916
2328
|
}>>;
|
|
1917
2329
|
description: z.ZodOptional<z.ZodString>;
|
|
1918
2330
|
initialHumans: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -2057,10 +2469,10 @@ declare const agentApiServerInfoResponseSchema: z.ZodObject<{
|
|
|
2057
2469
|
humans: z.ZodArray<z.ZodObject<{
|
|
2058
2470
|
name: z.ZodString;
|
|
2059
2471
|
role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
2472
|
+
guest: "guest";
|
|
2060
2473
|
owner: "owner";
|
|
2061
2474
|
admin: "admin";
|
|
2062
2475
|
member: "member";
|
|
2063
|
-
guest: "guest";
|
|
2064
2476
|
}>>>;
|
|
2065
2477
|
}, z.core.$loose>>;
|
|
2066
2478
|
}, z.core.$loose>;
|
|
@@ -2109,13 +2521,13 @@ declare const agentApiMentionActionsExecuteResponseSchema: z.ZodObject<{
|
|
|
2109
2521
|
results: z.ZodArray<z.ZodObject<{
|
|
2110
2522
|
resolutionId: z.ZodString;
|
|
2111
2523
|
status: z.ZodEnum<{
|
|
2112
|
-
|
|
2524
|
+
not_found: "not_found";
|
|
2113
2525
|
delivered: "delivered";
|
|
2526
|
+
queued: "queued";
|
|
2114
2527
|
dropped: "dropped";
|
|
2115
2528
|
stale: "stale";
|
|
2116
2529
|
expired: "expired";
|
|
2117
2530
|
no_permission: "no_permission";
|
|
2118
|
-
not_found: "not_found";
|
|
2119
2531
|
ambiguous: "ambiguous";
|
|
2120
2532
|
}>;
|
|
2121
2533
|
action: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2262,8 +2674,8 @@ declare const agentApiIntegrationLoginResponseSchema: z.ZodObject<{
|
|
|
2262
2674
|
declare const agentApiIntegrationAppPrepareResponseSchema: z.ZodObject<{
|
|
2263
2675
|
status: z.ZodLiteral<"prepared">;
|
|
2264
2676
|
mode: z.ZodEnum<{
|
|
2265
|
-
register: "register";
|
|
2266
2677
|
update: "update";
|
|
2678
|
+
register: "register";
|
|
2267
2679
|
}>;
|
|
2268
2680
|
target: z.ZodString;
|
|
2269
2681
|
actionCardMessageId: z.ZodString;
|
|
@@ -2319,13 +2731,13 @@ declare const agentApiIntegrationAppUpdateResponseSchema: z.ZodObject<{
|
|
|
2319
2731
|
}, z.core.$loose>;
|
|
2320
2732
|
declare const agentApiIntegrationAppManageResponseSchema: z.ZodObject<{
|
|
2321
2733
|
action: z.ZodEnum<{
|
|
2734
|
+
delete: "delete";
|
|
2322
2735
|
share_link_get: "share_link_get";
|
|
2323
2736
|
share_link_create: "share_link_create";
|
|
2324
2737
|
share_link_revoke: "share_link_revoke";
|
|
2325
2738
|
request_publish: "request_publish";
|
|
2326
2739
|
request_unpublish: "request_unpublish";
|
|
2327
2740
|
clear_logo: "clear_logo";
|
|
2328
|
-
delete: "delete";
|
|
2329
2741
|
}>;
|
|
2330
2742
|
clientId: z.ZodString;
|
|
2331
2743
|
clientKey: z.ZodString;
|
|
@@ -2351,8 +2763,8 @@ declare const agentApiIntegrationAppLogoResponseSchema: z.ZodObject<{
|
|
|
2351
2763
|
declare const agentApiIntegrationAppListResponseSchema: z.ZodObject<{
|
|
2352
2764
|
apps: z.ZodArray<z.ZodObject<{
|
|
2353
2765
|
state: z.ZodEnum<{
|
|
2354
|
-
card_pending: "card_pending";
|
|
2355
2766
|
committed: "committed";
|
|
2767
|
+
card_pending: "card_pending";
|
|
2356
2768
|
}>;
|
|
2357
2769
|
card: z.ZodNullable<z.ZodString>;
|
|
2358
2770
|
installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2381,8 +2793,8 @@ declare const agentApiIntegrationAppListResponseSchema: z.ZodObject<{
|
|
|
2381
2793
|
declare const agentApiIntegrationAppStatusResponseSchema: z.ZodObject<{
|
|
2382
2794
|
app: z.ZodObject<{
|
|
2383
2795
|
state: z.ZodEnum<{
|
|
2384
|
-
card_pending: "card_pending";
|
|
2385
2796
|
committed: "committed";
|
|
2797
|
+
card_pending: "card_pending";
|
|
2386
2798
|
}>;
|
|
2387
2799
|
card: z.ZodNullable<z.ZodString>;
|
|
2388
2800
|
installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2419,8 +2831,8 @@ declare const agentApiHistoryConsumptionScopeSchema: z.ZodObject<{
|
|
|
2419
2831
|
agent_id: z.ZodString;
|
|
2420
2832
|
channel_id: z.ZodString;
|
|
2421
2833
|
channel_type: z.ZodEnum<{
|
|
2422
|
-
thread: "thread";
|
|
2423
2834
|
dm: "dm";
|
|
2835
|
+
thread: "thread";
|
|
2424
2836
|
}>;
|
|
2425
2837
|
target: z.ZodString;
|
|
2426
2838
|
}, z.core.$strip>;
|
|
@@ -2447,8 +2859,8 @@ declare const agentApiMessageResolveResponseSchema: z.ZodObject<{
|
|
|
2447
2859
|
actor_id: z.ZodString;
|
|
2448
2860
|
actor_kind: z.ZodEnum<{
|
|
2449
2861
|
unknown: "unknown";
|
|
2450
|
-
guest: "guest";
|
|
2451
2862
|
human: "human";
|
|
2863
|
+
guest: "guest";
|
|
2452
2864
|
remote: "remote";
|
|
2453
2865
|
bot: "bot";
|
|
2454
2866
|
}>;
|
|
@@ -2818,8 +3230,8 @@ declare const agentApiReminderLogResponseSchema: z.ZodObject<{
|
|
|
2818
3230
|
updated: "updated";
|
|
2819
3231
|
}>;
|
|
2820
3232
|
actorType: z.ZodEnum<{
|
|
2821
|
-
agent: "agent";
|
|
2822
3233
|
human: "human";
|
|
3234
|
+
agent: "agent";
|
|
2823
3235
|
system: "system";
|
|
2824
3236
|
}>;
|
|
2825
3237
|
actorId: z.ZodNullable<z.ZodString>;
|
|
@@ -3044,8 +3456,8 @@ declare const agentApiContract: {
|
|
|
3044
3456
|
actor_id: z.ZodString;
|
|
3045
3457
|
actor_kind: z.ZodEnum<{
|
|
3046
3458
|
unknown: "unknown";
|
|
3047
|
-
guest: "guest";
|
|
3048
3459
|
human: "human";
|
|
3460
|
+
guest: "guest";
|
|
3049
3461
|
remote: "remote";
|
|
3050
3462
|
bot: "bot";
|
|
3051
3463
|
}>;
|
|
@@ -3164,8 +3576,8 @@ declare const agentApiContract: {
|
|
|
3164
3576
|
agent_id: z.ZodString;
|
|
3165
3577
|
channel_id: z.ZodString;
|
|
3166
3578
|
channel_type: z.ZodEnum<{
|
|
3167
|
-
thread: "thread";
|
|
3168
3579
|
dm: "dm";
|
|
3580
|
+
thread: "thread";
|
|
3169
3581
|
}>;
|
|
3170
3582
|
target: z.ZodString;
|
|
3171
3583
|
}, z.core.$strip>>;
|
|
@@ -3190,8 +3602,8 @@ declare const agentApiContract: {
|
|
|
3190
3602
|
actor_id: z.ZodString;
|
|
3191
3603
|
actor_kind: z.ZodEnum<{
|
|
3192
3604
|
unknown: "unknown";
|
|
3193
|
-
guest: "guest";
|
|
3194
3605
|
human: "human";
|
|
3606
|
+
guest: "guest";
|
|
3195
3607
|
remote: "remote";
|
|
3196
3608
|
bot: "bot";
|
|
3197
3609
|
}>;
|
|
@@ -3472,8 +3884,8 @@ declare const agentApiContract: {
|
|
|
3472
3884
|
actor_id: z.ZodString;
|
|
3473
3885
|
actor_kind: z.ZodEnum<{
|
|
3474
3886
|
unknown: "unknown";
|
|
3475
|
-
guest: "guest";
|
|
3476
3887
|
human: "human";
|
|
3888
|
+
guest: "guest";
|
|
3477
3889
|
remote: "remote";
|
|
3478
3890
|
bot: "bot";
|
|
3479
3891
|
}>;
|
|
@@ -3564,8 +3976,8 @@ declare const agentApiContract: {
|
|
|
3564
3976
|
actor_id: z.ZodString;
|
|
3565
3977
|
actor_kind: z.ZodEnum<{
|
|
3566
3978
|
unknown: "unknown";
|
|
3567
|
-
guest: "guest";
|
|
3568
3979
|
human: "human";
|
|
3980
|
+
guest: "guest";
|
|
3569
3981
|
remote: "remote";
|
|
3570
3982
|
bot: "bot";
|
|
3571
3983
|
}>;
|
|
@@ -3676,8 +4088,8 @@ declare const agentApiContract: {
|
|
|
3676
4088
|
actor_id: z.ZodString;
|
|
3677
4089
|
actor_kind: z.ZodEnum<{
|
|
3678
4090
|
unknown: "unknown";
|
|
3679
|
-
guest: "guest";
|
|
3680
4091
|
human: "human";
|
|
4092
|
+
guest: "guest";
|
|
3681
4093
|
remote: "remote";
|
|
3682
4094
|
bot: "bot";
|
|
3683
4095
|
}>;
|
|
@@ -3768,8 +4180,8 @@ declare const agentApiContract: {
|
|
|
3768
4180
|
actor_id: z.ZodString;
|
|
3769
4181
|
actor_kind: z.ZodEnum<{
|
|
3770
4182
|
unknown: "unknown";
|
|
3771
|
-
guest: "guest";
|
|
3772
4183
|
human: "human";
|
|
4184
|
+
guest: "guest";
|
|
3773
4185
|
remote: "remote";
|
|
3774
4186
|
bot: "bot";
|
|
3775
4187
|
}>;
|
|
@@ -3934,8 +4346,8 @@ declare const agentApiContract: {
|
|
|
3934
4346
|
actor_id: z.ZodString;
|
|
3935
4347
|
actor_kind: z.ZodEnum<{
|
|
3936
4348
|
unknown: "unknown";
|
|
3937
|
-
guest: "guest";
|
|
3938
4349
|
human: "human";
|
|
4350
|
+
guest: "guest";
|
|
3939
4351
|
remote: "remote";
|
|
3940
4352
|
bot: "bot";
|
|
3941
4353
|
}>;
|
|
@@ -4026,8 +4438,8 @@ declare const agentApiContract: {
|
|
|
4026
4438
|
actor_id: z.ZodString;
|
|
4027
4439
|
actor_kind: z.ZodEnum<{
|
|
4028
4440
|
unknown: "unknown";
|
|
4029
|
-
guest: "guest";
|
|
4030
4441
|
human: "human";
|
|
4442
|
+
guest: "guest";
|
|
4031
4443
|
remote: "remote";
|
|
4032
4444
|
bot: "bot";
|
|
4033
4445
|
}>;
|
|
@@ -4138,8 +4550,8 @@ declare const agentApiContract: {
|
|
|
4138
4550
|
actor_id: z.ZodString;
|
|
4139
4551
|
actor_kind: z.ZodEnum<{
|
|
4140
4552
|
unknown: "unknown";
|
|
4141
|
-
guest: "guest";
|
|
4142
4553
|
human: "human";
|
|
4554
|
+
guest: "guest";
|
|
4143
4555
|
remote: "remote";
|
|
4144
4556
|
bot: "bot";
|
|
4145
4557
|
}>;
|
|
@@ -4230,8 +4642,8 @@ declare const agentApiContract: {
|
|
|
4230
4642
|
actor_id: z.ZodString;
|
|
4231
4643
|
actor_kind: z.ZodEnum<{
|
|
4232
4644
|
unknown: "unknown";
|
|
4233
|
-
guest: "guest";
|
|
4234
4645
|
human: "human";
|
|
4646
|
+
guest: "guest";
|
|
4235
4647
|
remote: "remote";
|
|
4236
4648
|
bot: "bot";
|
|
4237
4649
|
}>;
|
|
@@ -4369,8 +4781,8 @@ declare const agentApiContract: {
|
|
|
4369
4781
|
actor_id: z.ZodString;
|
|
4370
4782
|
actor_kind: z.ZodEnum<{
|
|
4371
4783
|
unknown: "unknown";
|
|
4372
|
-
guest: "guest";
|
|
4373
4784
|
human: "human";
|
|
4785
|
+
guest: "guest";
|
|
4374
4786
|
remote: "remote";
|
|
4375
4787
|
bot: "bot";
|
|
4376
4788
|
}>;
|
|
@@ -4563,8 +4975,8 @@ declare const agentApiContract: {
|
|
|
4563
4975
|
actor_id: z.ZodString;
|
|
4564
4976
|
actor_kind: z.ZodEnum<{
|
|
4565
4977
|
unknown: "unknown";
|
|
4566
|
-
guest: "guest";
|
|
4567
4978
|
human: "human";
|
|
4979
|
+
guest: "guest";
|
|
4568
4980
|
remote: "remote";
|
|
4569
4981
|
bot: "bot";
|
|
4570
4982
|
}>;
|
|
@@ -4678,8 +5090,8 @@ declare const agentApiContract: {
|
|
|
4678
5090
|
actor_id: z.ZodString;
|
|
4679
5091
|
actor_kind: z.ZodEnum<{
|
|
4680
5092
|
unknown: "unknown";
|
|
4681
|
-
guest: "guest";
|
|
4682
5093
|
human: "human";
|
|
5094
|
+
guest: "guest";
|
|
4683
5095
|
remote: "remote";
|
|
4684
5096
|
bot: "bot";
|
|
4685
5097
|
}>;
|
|
@@ -5108,8 +5520,8 @@ declare const agentApiContract: {
|
|
|
5108
5520
|
target: z.ZodString;
|
|
5109
5521
|
kind: z.ZodEnum<{
|
|
5110
5522
|
channel: "channel";
|
|
5111
|
-
thread: "thread";
|
|
5112
5523
|
dm: "dm";
|
|
5524
|
+
thread: "thread";
|
|
5113
5525
|
}>;
|
|
5114
5526
|
unread: z.ZodNumber;
|
|
5115
5527
|
mentions: z.ZodNumber;
|
|
@@ -5223,10 +5635,10 @@ declare const agentApiContract: {
|
|
|
5223
5635
|
humans: z.ZodArray<z.ZodObject<{
|
|
5224
5636
|
name: z.ZodString;
|
|
5225
5637
|
role: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
5638
|
+
guest: "guest";
|
|
5226
5639
|
owner: "owner";
|
|
5227
5640
|
admin: "admin";
|
|
5228
5641
|
member: "member";
|
|
5229
|
-
guest: "guest";
|
|
5230
5642
|
}>>>;
|
|
5231
5643
|
}, z.core.$loose>>;
|
|
5232
5644
|
}, z.core.$loose>;
|
|
@@ -5353,13 +5765,13 @@ declare const agentApiContract: {
|
|
|
5353
5765
|
results: z.ZodArray<z.ZodObject<{
|
|
5354
5766
|
resolutionId: z.ZodString;
|
|
5355
5767
|
status: z.ZodEnum<{
|
|
5356
|
-
|
|
5768
|
+
not_found: "not_found";
|
|
5357
5769
|
delivered: "delivered";
|
|
5770
|
+
queued: "queued";
|
|
5358
5771
|
dropped: "dropped";
|
|
5359
5772
|
stale: "stale";
|
|
5360
5773
|
expired: "expired";
|
|
5361
5774
|
no_permission: "no_permission";
|
|
5362
|
-
not_found: "not_found";
|
|
5363
5775
|
ambiguous: "ambiguous";
|
|
5364
5776
|
}>;
|
|
5365
5777
|
action: z.ZodOptional<z.ZodEnum<{
|
|
@@ -5459,8 +5871,8 @@ declare const agentApiContract: {
|
|
|
5459
5871
|
actor_id: z.ZodString;
|
|
5460
5872
|
actor_kind: z.ZodEnum<{
|
|
5461
5873
|
unknown: "unknown";
|
|
5462
|
-
guest: "guest";
|
|
5463
5874
|
human: "human";
|
|
5875
|
+
guest: "guest";
|
|
5464
5876
|
remote: "remote";
|
|
5465
5877
|
bot: "bot";
|
|
5466
5878
|
}>;
|
|
@@ -5551,8 +5963,8 @@ declare const agentApiContract: {
|
|
|
5551
5963
|
actor_id: z.ZodString;
|
|
5552
5964
|
actor_kind: z.ZodEnum<{
|
|
5553
5965
|
unknown: "unknown";
|
|
5554
|
-
guest: "guest";
|
|
5555
5966
|
human: "human";
|
|
5967
|
+
guest: "guest";
|
|
5556
5968
|
remote: "remote";
|
|
5557
5969
|
bot: "bot";
|
|
5558
5970
|
}>;
|
|
@@ -5892,8 +6304,8 @@ declare const agentApiContract: {
|
|
|
5892
6304
|
actor_id: z.ZodString;
|
|
5893
6305
|
actor_kind: z.ZodEnum<{
|
|
5894
6306
|
unknown: "unknown";
|
|
5895
|
-
guest: "guest";
|
|
5896
6307
|
human: "human";
|
|
6308
|
+
guest: "guest";
|
|
5897
6309
|
remote: "remote";
|
|
5898
6310
|
bot: "bot";
|
|
5899
6311
|
}>;
|
|
@@ -5984,8 +6396,8 @@ declare const agentApiContract: {
|
|
|
5984
6396
|
actor_id: z.ZodString;
|
|
5985
6397
|
actor_kind: z.ZodEnum<{
|
|
5986
6398
|
unknown: "unknown";
|
|
5987
|
-
guest: "guest";
|
|
5988
6399
|
human: "human";
|
|
6400
|
+
guest: "guest";
|
|
5989
6401
|
remote: "remote";
|
|
5990
6402
|
bot: "bot";
|
|
5991
6403
|
}>;
|
|
@@ -6269,8 +6681,8 @@ declare const agentApiContract: {
|
|
|
6269
6681
|
actor_id: z.ZodString;
|
|
6270
6682
|
actor_kind: z.ZodEnum<{
|
|
6271
6683
|
unknown: "unknown";
|
|
6272
|
-
guest: "guest";
|
|
6273
6684
|
human: "human";
|
|
6685
|
+
guest: "guest";
|
|
6274
6686
|
remote: "remote";
|
|
6275
6687
|
bot: "bot";
|
|
6276
6688
|
}>;
|
|
@@ -6361,8 +6773,8 @@ declare const agentApiContract: {
|
|
|
6361
6773
|
actor_id: z.ZodString;
|
|
6362
6774
|
actor_kind: z.ZodEnum<{
|
|
6363
6775
|
unknown: "unknown";
|
|
6364
|
-
guest: "guest";
|
|
6365
6776
|
human: "human";
|
|
6777
|
+
guest: "guest";
|
|
6366
6778
|
remote: "remote";
|
|
6367
6779
|
bot: "bot";
|
|
6368
6780
|
}>;
|
|
@@ -6815,8 +7227,8 @@ declare const agentApiContract: {
|
|
|
6815
7227
|
updated: "updated";
|
|
6816
7228
|
}>;
|
|
6817
7229
|
actorType: z.ZodEnum<{
|
|
6818
|
-
agent: "agent";
|
|
6819
7230
|
human: "human";
|
|
7231
|
+
agent: "agent";
|
|
6820
7232
|
system: "system";
|
|
6821
7233
|
}>;
|
|
6822
7234
|
actorId: z.ZodNullable<z.ZodString>;
|
|
@@ -7191,8 +7603,8 @@ declare const agentApiContract: {
|
|
|
7191
7603
|
readonly body: z.ZodObject<{
|
|
7192
7604
|
status: z.ZodLiteral<"prepared">;
|
|
7193
7605
|
mode: z.ZodEnum<{
|
|
7194
|
-
register: "register";
|
|
7195
7606
|
update: "update";
|
|
7607
|
+
register: "register";
|
|
7196
7608
|
}>;
|
|
7197
7609
|
target: z.ZodString;
|
|
7198
7610
|
actionCardMessageId: z.ZodString;
|
|
@@ -7334,13 +7746,13 @@ declare const agentApiContract: {
|
|
|
7334
7746
|
readonly body: z.ZodObject<{
|
|
7335
7747
|
clientKey: z.ZodString;
|
|
7336
7748
|
action: z.ZodEnum<{
|
|
7749
|
+
delete: "delete";
|
|
7337
7750
|
share_link_get: "share_link_get";
|
|
7338
7751
|
share_link_create: "share_link_create";
|
|
7339
7752
|
share_link_revoke: "share_link_revoke";
|
|
7340
7753
|
request_publish: "request_publish";
|
|
7341
7754
|
request_unpublish: "request_unpublish";
|
|
7342
7755
|
clear_logo: "clear_logo";
|
|
7343
|
-
delete: "delete";
|
|
7344
7756
|
}>;
|
|
7345
7757
|
expiresInDays: z.ZodOptional<z.ZodNumber>;
|
|
7346
7758
|
}, z.core.$loose>;
|
|
@@ -7348,13 +7760,13 @@ declare const agentApiContract: {
|
|
|
7348
7760
|
readonly response: {
|
|
7349
7761
|
readonly body: z.ZodObject<{
|
|
7350
7762
|
action: z.ZodEnum<{
|
|
7763
|
+
delete: "delete";
|
|
7351
7764
|
share_link_get: "share_link_get";
|
|
7352
7765
|
share_link_create: "share_link_create";
|
|
7353
7766
|
share_link_revoke: "share_link_revoke";
|
|
7354
7767
|
request_publish: "request_publish";
|
|
7355
7768
|
request_unpublish: "request_unpublish";
|
|
7356
7769
|
clear_logo: "clear_logo";
|
|
7357
|
-
delete: "delete";
|
|
7358
7770
|
}>;
|
|
7359
7771
|
clientId: z.ZodString;
|
|
7360
7772
|
clientKey: z.ZodString;
|
|
@@ -7412,8 +7824,8 @@ declare const agentApiContract: {
|
|
|
7412
7824
|
readonly body: z.ZodObject<{
|
|
7413
7825
|
apps: z.ZodArray<z.ZodObject<{
|
|
7414
7826
|
state: z.ZodEnum<{
|
|
7415
|
-
card_pending: "card_pending";
|
|
7416
7827
|
committed: "committed";
|
|
7828
|
+
card_pending: "card_pending";
|
|
7417
7829
|
}>;
|
|
7418
7830
|
card: z.ZodNullable<z.ZodString>;
|
|
7419
7831
|
installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -7463,8 +7875,8 @@ declare const agentApiContract: {
|
|
|
7463
7875
|
readonly body: z.ZodObject<{
|
|
7464
7876
|
app: z.ZodObject<{
|
|
7465
7877
|
state: z.ZodEnum<{
|
|
7466
|
-
card_pending: "card_pending";
|
|
7467
7878
|
committed: "committed";
|
|
7879
|
+
card_pending: "card_pending";
|
|
7468
7880
|
}>;
|
|
7469
7881
|
card: z.ZodNullable<z.ZodString>;
|
|
7470
7882
|
installationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -7511,8 +7923,8 @@ declare const agentApiContract: {
|
|
|
7511
7923
|
type: z.ZodLiteral<"channel:create">;
|
|
7512
7924
|
name: z.ZodString;
|
|
7513
7925
|
visibility: z.ZodDefault<z.ZodEnum<{
|
|
7514
|
-
public: "public";
|
|
7515
7926
|
private: "private";
|
|
7927
|
+
public: "public";
|
|
7516
7928
|
}>>;
|
|
7517
7929
|
description: z.ZodOptional<z.ZodString>;
|
|
7518
7930
|
initialHumans: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -7727,8 +8139,8 @@ declare const agentApiContract: {
|
|
|
7727
8139
|
readonly body: z.ZodObject<{
|
|
7728
8140
|
uploadId: z.ZodUUID;
|
|
7729
8141
|
state: z.ZodEnum<{
|
|
7730
|
-
expired: "expired";
|
|
7731
8142
|
pending: "pending";
|
|
8143
|
+
expired: "expired";
|
|
7732
8144
|
canceled: "canceled";
|
|
7733
8145
|
completed: "completed";
|
|
7734
8146
|
verifying: "verifying";
|
|
@@ -7744,8 +8156,8 @@ declare const agentApiContract: {
|
|
|
7744
8156
|
}, z.core.$strict>>;
|
|
7745
8157
|
terminalReason: z.ZodNullable<z.ZodString>;
|
|
7746
8158
|
reservationState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7747
|
-
expired: "expired";
|
|
7748
8159
|
pending: "pending";
|
|
8160
|
+
expired: "expired";
|
|
7749
8161
|
canceled: "canceled";
|
|
7750
8162
|
consumed: "consumed";
|
|
7751
8163
|
}>>>;
|
|
@@ -7773,8 +8185,8 @@ declare const agentApiContract: {
|
|
|
7773
8185
|
readonly body: z.ZodObject<{
|
|
7774
8186
|
uploadId: z.ZodUUID;
|
|
7775
8187
|
state: z.ZodEnum<{
|
|
7776
|
-
expired: "expired";
|
|
7777
8188
|
pending: "pending";
|
|
8189
|
+
expired: "expired";
|
|
7778
8190
|
canceled: "canceled";
|
|
7779
8191
|
completed: "completed";
|
|
7780
8192
|
verifying: "verifying";
|
|
@@ -7790,8 +8202,8 @@ declare const agentApiContract: {
|
|
|
7790
8202
|
}, z.core.$strict>>;
|
|
7791
8203
|
terminalReason: z.ZodNullable<z.ZodString>;
|
|
7792
8204
|
reservationState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
7793
|
-
expired: "expired";
|
|
7794
8205
|
pending: "pending";
|
|
8206
|
+
expired: "expired";
|
|
7795
8207
|
canceled: "canceled";
|
|
7796
8208
|
consumed: "consumed";
|
|
7797
8209
|
}>>>;
|
|
@@ -9022,6 +9434,963 @@ type RaftLatestReadThread = {
|
|
|
9022
9434
|
*/
|
|
9023
9435
|
export declare function readLatestReadThread(options?: ReadLatestReadThreadOptions): Promise<RaftLatestReadThread>;
|
|
9024
9436
|
//#endregion
|
|
9437
|
+
//#region src/toolSchema.d.ts
|
|
9438
|
+
type RaftJsonSchemaType = "object" | "array" | "string" | "number" | "integer" | "boolean" | "null";
|
|
9439
|
+
interface RaftJsonSchema {
|
|
9440
|
+
type?: RaftJsonSchemaType;
|
|
9441
|
+
description?: string;
|
|
9442
|
+
properties?: Record<string, RaftJsonSchema>;
|
|
9443
|
+
required?: string[];
|
|
9444
|
+
items?: RaftJsonSchema;
|
|
9445
|
+
enum?: Array<string | number | boolean | null>;
|
|
9446
|
+
minimum?: number;
|
|
9447
|
+
maximum?: number;
|
|
9448
|
+
minLength?: number;
|
|
9449
|
+
maxLength?: number;
|
|
9450
|
+
}
|
|
9451
|
+
/** Every keyword the subset allows. */
|
|
9452
|
+
export declare const RAFT_JSON_SCHEMA_KEYWORDS: readonly (keyof RaftJsonSchema)[];
|
|
9453
|
+
//#endregion
|
|
9454
|
+
//#region src/operations.d.ts
|
|
9455
|
+
/** What running an operation consumes or records. */
|
|
9456
|
+
type RaftConsumption =
|
|
9457
|
+
/** Acknowledges inbox rows (now or on the next pull). */
|
|
9458
|
+
"inbox" |
|
|
9459
|
+
/** Advances the Server's read position for a conversation. */
|
|
9460
|
+
"read_cursor" |
|
|
9461
|
+
/** Records messages as seen by the model (the frontier a send attests). */
|
|
9462
|
+
"seen";
|
|
9463
|
+
type RaftOperationIdempotency =
|
|
9464
|
+
/** Repeating the same call converges on the same state. */
|
|
9465
|
+
{
|
|
9466
|
+
kind: "natural";
|
|
9467
|
+
} |
|
|
9468
|
+
/** Retry-safe when `args[arg]` is reused. */
|
|
9469
|
+
{
|
|
9470
|
+
kind: "key";
|
|
9471
|
+
arg: string;
|
|
9472
|
+
} |
|
|
9473
|
+
/** Do not auto-retry after a transport failure. */
|
|
9474
|
+
{
|
|
9475
|
+
kind: "none";
|
|
9476
|
+
};
|
|
9477
|
+
interface RaftOperationSpec {
|
|
9478
|
+
/** Stable dotted name, the `createRaft` path and the `invoke` key: `"messages.send"`. */
|
|
9479
|
+
name: string;
|
|
9480
|
+
/** Stable tool name for gateways (`[a-z0-9_]`, no prefix; hosts add their own): `"messages_send"`. */
|
|
9481
|
+
toolName: string;
|
|
9482
|
+
/** Model-facing, 1–3 sentences. */
|
|
9483
|
+
description: string;
|
|
9484
|
+
/** The input, in the conservative JSON Schema subset (toolSchema.ts). Never stricter than the runtime check. */
|
|
9485
|
+
inputSchema: RaftJsonSchema;
|
|
9486
|
+
/** `write` when any route it calls changes state (a consuming read counts as a write). Gateways treat unknown as `write`. */
|
|
9487
|
+
sideEffect: "read" | "write";
|
|
9488
|
+
idempotency: RaftOperationIdempotency;
|
|
9489
|
+
/**
|
|
9490
|
+
* Every credential capability the operation needs (all of them; sorted).
|
|
9491
|
+
* Empty when it calls no route. Filter at mount with
|
|
9492
|
+
* `identity.whoami` → `capabilities`: `op.capability.every((c) => caps.includes(c))`.
|
|
9493
|
+
*/
|
|
9494
|
+
capability: string[];
|
|
9495
|
+
/** The result only counts if the model sees it; refused from code. Equals `consumes.code === "refused"`. */
|
|
9496
|
+
modelOnly: boolean;
|
|
9497
|
+
/** May return `state: "interrupted"`: the model must decide (resume / cancel). */
|
|
9498
|
+
mayInterrupt: boolean;
|
|
9499
|
+
/** What it consumes or records, per caller origin; `"refused"` when code may not run it. */
|
|
9500
|
+
consumes: {
|
|
9501
|
+
model: RaftConsumption[];
|
|
9502
|
+
code: RaftConsumption[] | "refused";
|
|
9503
|
+
};
|
|
9504
|
+
/** Whether the result can be large, and which arguments bound or page it. */
|
|
9505
|
+
output: {
|
|
9506
|
+
mayBeLarge: boolean;
|
|
9507
|
+
boundBy: string[];
|
|
9508
|
+
};
|
|
9509
|
+
/** Still dispatchable, scheduled for removal; use the replacement named in `description`. */
|
|
9510
|
+
deprecated?: boolean;
|
|
9511
|
+
}
|
|
9512
|
+
declare const OPERATION_DEFS: readonly [{
|
|
9513
|
+
readonly name: "identity.whoami";
|
|
9514
|
+
readonly description: "Who this credential is: your agent, the server, the capabilities granted to the credential, and the operating guide for External Agents.";
|
|
9515
|
+
readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
9516
|
+
readonly routes: readonly ["agentContext"];
|
|
9517
|
+
readonly consumes: {
|
|
9518
|
+
model: never[];
|
|
9519
|
+
code: never[];
|
|
9520
|
+
};
|
|
9521
|
+
readonly output: {
|
|
9522
|
+
readonly mayBeLarge: true;
|
|
9523
|
+
readonly boundBy: [];
|
|
9524
|
+
};
|
|
9525
|
+
}, {
|
|
9526
|
+
readonly name: "inbox.check";
|
|
9527
|
+
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.";
|
|
9528
|
+
readonly schema: z.ZodObject<{
|
|
9529
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
9530
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
9531
|
+
ack: z.ZodOptional<z.ZodEnum<{
|
|
9532
|
+
cursor: "cursor";
|
|
9533
|
+
immediate: "immediate";
|
|
9534
|
+
}>>;
|
|
9535
|
+
}, z.core.$strip>;
|
|
9536
|
+
readonly routes: readonly ["events"];
|
|
9537
|
+
readonly consumes: {
|
|
9538
|
+
readonly model: ["inbox", "seen"];
|
|
9539
|
+
readonly code: "refused";
|
|
9540
|
+
};
|
|
9541
|
+
readonly output: {
|
|
9542
|
+
readonly mayBeLarge: true;
|
|
9543
|
+
readonly boundBy: ["limit"];
|
|
9544
|
+
};
|
|
9545
|
+
}, {
|
|
9546
|
+
readonly name: "inbox.drain";
|
|
9547
|
+
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.";
|
|
9548
|
+
readonly schema: z.ZodObject<{
|
|
9549
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
9550
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
9551
|
+
ack: z.ZodOptional<z.ZodEnum<{
|
|
9552
|
+
cursor: "cursor";
|
|
9553
|
+
immediate: "immediate";
|
|
9554
|
+
}>>;
|
|
9555
|
+
}, z.core.$strip>;
|
|
9556
|
+
readonly routes: readonly ["events"];
|
|
9557
|
+
readonly consumes: {
|
|
9558
|
+
readonly model: ["inbox", "seen"];
|
|
9559
|
+
readonly code: "refused";
|
|
9560
|
+
};
|
|
9561
|
+
readonly output: {
|
|
9562
|
+
readonly mayBeLarge: true;
|
|
9563
|
+
readonly boundBy: ["limit"];
|
|
9564
|
+
};
|
|
9565
|
+
}, {
|
|
9566
|
+
readonly name: "inbox.commit";
|
|
9567
|
+
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.";
|
|
9568
|
+
readonly schema: z.ZodObject<{
|
|
9569
|
+
cursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
9570
|
+
}, z.core.$strip>;
|
|
9571
|
+
readonly routes: readonly [];
|
|
9572
|
+
readonly local: {
|
|
9573
|
+
readonly sideEffect: "write";
|
|
9574
|
+
readonly idempotency: "natural";
|
|
9575
|
+
};
|
|
9576
|
+
readonly consumes: {
|
|
9577
|
+
readonly model: ["inbox"];
|
|
9578
|
+
readonly code: "refused";
|
|
9579
|
+
};
|
|
9580
|
+
readonly output: {
|
|
9581
|
+
mayBeLarge: false;
|
|
9582
|
+
boundBy: never[];
|
|
9583
|
+
};
|
|
9584
|
+
}, {
|
|
9585
|
+
readonly name: "inbox.list";
|
|
9586
|
+
readonly description: "List conversations with unread messages, newest activity first, each with where to start reading. Consumes nothing.";
|
|
9587
|
+
readonly schema: z.ZodObject<{
|
|
9588
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
9589
|
+
mentions: "mentions";
|
|
9590
|
+
unread: "unread";
|
|
9591
|
+
}>>;
|
|
9592
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
9593
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
9594
|
+
}, z.core.$strip>;
|
|
9595
|
+
readonly routes: readonly ["inboxList"];
|
|
9596
|
+
readonly consumes: {
|
|
9597
|
+
model: never[];
|
|
9598
|
+
code: never[];
|
|
9599
|
+
};
|
|
9600
|
+
readonly output: {
|
|
9601
|
+
readonly mayBeLarge: true;
|
|
9602
|
+
readonly boundBy: ["before", "limit"];
|
|
9603
|
+
};
|
|
9604
|
+
}, {
|
|
9605
|
+
readonly name: "messages.read";
|
|
9606
|
+
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.";
|
|
9607
|
+
readonly schema: z.ZodObject<{
|
|
9608
|
+
target: z.ZodString;
|
|
9609
|
+
after: z.ZodOptional<z.ZodNumber>;
|
|
9610
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
9611
|
+
around: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
9612
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
9613
|
+
consume: z.ZodOptional<z.ZodBoolean>;
|
|
9614
|
+
}, z.core.$strip>;
|
|
9615
|
+
readonly unionAs: {
|
|
9616
|
+
readonly around: "string";
|
|
9617
|
+
};
|
|
9618
|
+
readonly routes: readonly ["historyRead"];
|
|
9619
|
+
readonly consumes: {
|
|
9620
|
+
readonly model: ["read_cursor", "seen"];
|
|
9621
|
+
readonly code: [];
|
|
9622
|
+
};
|
|
9623
|
+
readonly output: {
|
|
9624
|
+
readonly mayBeLarge: true;
|
|
9625
|
+
readonly boundBy: ["after", "before", "around", "limit"];
|
|
9626
|
+
};
|
|
9627
|
+
}, {
|
|
9628
|
+
readonly name: "messages.send";
|
|
9629
|
+
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.";
|
|
9630
|
+
readonly schema: z.ZodObject<{
|
|
9631
|
+
content: z.ZodString;
|
|
9632
|
+
attachmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9633
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
9634
|
+
mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9635
|
+
type: z.ZodEnum<{
|
|
9636
|
+
user: "user";
|
|
9637
|
+
agent: "agent";
|
|
9638
|
+
}>;
|
|
9639
|
+
id: z.ZodString;
|
|
9640
|
+
name: z.ZodString;
|
|
9641
|
+
}, z.core.$strip>>>;
|
|
9642
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
9643
|
+
upToSeq: z.ZodOptional<z.ZodNumber>;
|
|
9644
|
+
exactSeqs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
9645
|
+
}, z.core.$strip>>;
|
|
9646
|
+
target: z.ZodString;
|
|
9647
|
+
}, z.core.$strip>;
|
|
9648
|
+
readonly hiddenFields: readonly ["seen"];
|
|
9649
|
+
readonly routes: readonly ["messageSendV2"];
|
|
9650
|
+
readonly idempotencyArg: "idempotencyKey";
|
|
9651
|
+
readonly mayInterrupt: true;
|
|
9652
|
+
readonly consumes: {
|
|
9653
|
+
model: never[];
|
|
9654
|
+
code: never[];
|
|
9655
|
+
};
|
|
9656
|
+
readonly output: {
|
|
9657
|
+
mayBeLarge: false;
|
|
9658
|
+
boundBy: never[];
|
|
9659
|
+
};
|
|
9660
|
+
}, {
|
|
9661
|
+
readonly name: "messages.reply";
|
|
9662
|
+
readonly description: "Reply where a received message came from (its conversation or thread). Held like messages.send when newer messages arrived there.";
|
|
9663
|
+
readonly schema: z.ZodObject<{
|
|
9664
|
+
content: z.ZodString;
|
|
9665
|
+
attachmentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9666
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
9667
|
+
mentions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9668
|
+
type: z.ZodEnum<{
|
|
9669
|
+
user: "user";
|
|
9670
|
+
agent: "agent";
|
|
9671
|
+
}>;
|
|
9672
|
+
id: z.ZodString;
|
|
9673
|
+
name: z.ZodString;
|
|
9674
|
+
}, z.core.$strip>>>;
|
|
9675
|
+
seen: z.ZodOptional<z.ZodObject<{
|
|
9676
|
+
upToSeq: z.ZodOptional<z.ZodNumber>;
|
|
9677
|
+
exactSeqs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
9678
|
+
}, z.core.$strip>>;
|
|
9679
|
+
message: z.ZodObject<{
|
|
9680
|
+
target: z.ZodString;
|
|
9681
|
+
}, z.core.$strip>;
|
|
9682
|
+
}, z.core.$strip>;
|
|
9683
|
+
readonly hiddenFields: readonly ["seen"];
|
|
9684
|
+
readonly routes: readonly ["messageSendV2"];
|
|
9685
|
+
readonly idempotencyArg: "idempotencyKey";
|
|
9686
|
+
readonly mayInterrupt: true;
|
|
9687
|
+
readonly consumes: {
|
|
9688
|
+
model: never[];
|
|
9689
|
+
code: never[];
|
|
9690
|
+
};
|
|
9691
|
+
readonly output: {
|
|
9692
|
+
mayBeLarge: false;
|
|
9693
|
+
boundBy: never[];
|
|
9694
|
+
};
|
|
9695
|
+
}, {
|
|
9696
|
+
readonly name: "messages.search";
|
|
9697
|
+
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.";
|
|
9698
|
+
readonly schema: z.ZodObject<{
|
|
9699
|
+
query: z.ZodOptional<z.ZodString>;
|
|
9700
|
+
target: z.ZodOptional<z.ZodString>;
|
|
9701
|
+
sender: z.ZodOptional<z.ZodString>;
|
|
9702
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
9703
|
+
relevance: "relevance";
|
|
9704
|
+
recent: "recent";
|
|
9705
|
+
}>>;
|
|
9706
|
+
before: z.ZodOptional<z.ZodString>;
|
|
9707
|
+
after: z.ZodOptional<z.ZodString>;
|
|
9708
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
9709
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
9710
|
+
}, z.core.$strip>;
|
|
9711
|
+
readonly routes: readonly ["messageSearch"];
|
|
9712
|
+
readonly consumes: {
|
|
9713
|
+
model: never[];
|
|
9714
|
+
code: never[];
|
|
9715
|
+
};
|
|
9716
|
+
readonly output: {
|
|
9717
|
+
readonly mayBeLarge: true;
|
|
9718
|
+
readonly boundBy: ["limit", "offset"];
|
|
9719
|
+
};
|
|
9720
|
+
}, {
|
|
9721
|
+
readonly name: "messages.resolve";
|
|
9722
|
+
readonly description: "Resolve a message id to the full message and the conversation it belongs to.";
|
|
9723
|
+
readonly schema: z.ZodObject<{
|
|
9724
|
+
messageId: z.ZodString;
|
|
9725
|
+
}, z.core.$strip>;
|
|
9726
|
+
readonly routes: readonly ["messageResolve"];
|
|
9727
|
+
readonly consumes: {
|
|
9728
|
+
model: never[];
|
|
9729
|
+
code: never[];
|
|
9730
|
+
};
|
|
9731
|
+
readonly output: {
|
|
9732
|
+
mayBeLarge: false;
|
|
9733
|
+
boundBy: never[];
|
|
9734
|
+
};
|
|
9735
|
+
}, {
|
|
9736
|
+
readonly name: "messages.react";
|
|
9737
|
+
readonly description: "Add an emoji reaction to a message.";
|
|
9738
|
+
readonly schema: z.ZodObject<{
|
|
9739
|
+
messageId: z.ZodString;
|
|
9740
|
+
emoji: z.ZodString;
|
|
9741
|
+
}, z.core.$strip>;
|
|
9742
|
+
readonly routes: readonly ["messageReactionAdd"];
|
|
9743
|
+
readonly consumes: {
|
|
9744
|
+
model: never[];
|
|
9745
|
+
code: never[];
|
|
9746
|
+
};
|
|
9747
|
+
readonly output: {
|
|
9748
|
+
mayBeLarge: false;
|
|
9749
|
+
boundBy: never[];
|
|
9750
|
+
};
|
|
9751
|
+
}, {
|
|
9752
|
+
readonly name: "messages.unreact";
|
|
9753
|
+
readonly description: "Remove your emoji reaction from a message.";
|
|
9754
|
+
readonly schema: z.ZodObject<{
|
|
9755
|
+
messageId: z.ZodString;
|
|
9756
|
+
emoji: z.ZodString;
|
|
9757
|
+
}, z.core.$strip>;
|
|
9758
|
+
readonly routes: readonly ["messageReactionRemove"];
|
|
9759
|
+
readonly consumes: {
|
|
9760
|
+
model: never[];
|
|
9761
|
+
code: never[];
|
|
9762
|
+
};
|
|
9763
|
+
readonly output: {
|
|
9764
|
+
mayBeLarge: false;
|
|
9765
|
+
boundBy: never[];
|
|
9766
|
+
};
|
|
9767
|
+
}, {
|
|
9768
|
+
readonly name: "attachments.comments";
|
|
9769
|
+
readonly description: "List the comments on an attachment.";
|
|
9770
|
+
readonly schema: z.ZodObject<{
|
|
9771
|
+
attachmentId: z.ZodString;
|
|
9772
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
9773
|
+
}, z.core.$strip>;
|
|
9774
|
+
readonly routes: readonly ["attachmentCommentsList"];
|
|
9775
|
+
readonly consumes: {
|
|
9776
|
+
model: never[];
|
|
9777
|
+
code: never[];
|
|
9778
|
+
};
|
|
9779
|
+
readonly output: {
|
|
9780
|
+
readonly mayBeLarge: true;
|
|
9781
|
+
readonly boundBy: ["limit"];
|
|
9782
|
+
};
|
|
9783
|
+
}, {
|
|
9784
|
+
readonly name: "mentions.pending";
|
|
9785
|
+
readonly description: "List @mentions you sent that reached nobody, each with the actions that would deliver it.";
|
|
9786
|
+
readonly schema: z.ZodObject<{
|
|
9787
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
9788
|
+
}, z.core.$strip>;
|
|
9789
|
+
readonly routes: readonly ["mentionActionsPending"];
|
|
9790
|
+
readonly consumes: {
|
|
9791
|
+
model: never[];
|
|
9792
|
+
code: never[];
|
|
9793
|
+
};
|
|
9794
|
+
readonly output: {
|
|
9795
|
+
readonly mayBeLarge: true;
|
|
9796
|
+
readonly boundBy: ["limit"];
|
|
9797
|
+
};
|
|
9798
|
+
}, {
|
|
9799
|
+
readonly name: "mentions.execute";
|
|
9800
|
+
readonly description: "Deliver unreached @mentions: notify the mentioned target, or add them to the conversation.";
|
|
9801
|
+
readonly schema: z.ZodObject<{
|
|
9802
|
+
action: z.ZodEnum<{
|
|
9803
|
+
notify: "notify";
|
|
9804
|
+
add: "add";
|
|
9805
|
+
}>;
|
|
9806
|
+
resolutionIds: z.ZodArray<z.ZodString>;
|
|
9807
|
+
}, z.core.$strip>;
|
|
9808
|
+
readonly routes: readonly ["mentionActionsExecute"];
|
|
9809
|
+
readonly consumes: {
|
|
9810
|
+
model: never[];
|
|
9811
|
+
code: never[];
|
|
9812
|
+
};
|
|
9813
|
+
readonly output: {
|
|
9814
|
+
mayBeLarge: false;
|
|
9815
|
+
boundBy: never[];
|
|
9816
|
+
};
|
|
9817
|
+
}, {
|
|
9818
|
+
readonly name: "mentions.deliveries";
|
|
9819
|
+
readonly description: "Whether each @mention in a message you sent reached its target.";
|
|
9820
|
+
readonly schema: z.ZodObject<{
|
|
9821
|
+
messageId: z.ZodString;
|
|
9822
|
+
}, z.core.$strip>;
|
|
9823
|
+
readonly routes: readonly ["senderMentionDeliveries"];
|
|
9824
|
+
readonly consumes: {
|
|
9825
|
+
model: never[];
|
|
9826
|
+
code: never[];
|
|
9827
|
+
};
|
|
9828
|
+
readonly output: {
|
|
9829
|
+
mayBeLarge: false;
|
|
9830
|
+
boundBy: never[];
|
|
9831
|
+
};
|
|
9832
|
+
}, {
|
|
9833
|
+
readonly name: "actions.prepare";
|
|
9834
|
+
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).";
|
|
9835
|
+
readonly schema: z.ZodObject<{
|
|
9836
|
+
target: z.ZodString;
|
|
9837
|
+
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9838
|
+
type: z.ZodLiteral<"channel:create">;
|
|
9839
|
+
name: z.ZodString;
|
|
9840
|
+
visibility: z.ZodDefault<z.ZodEnum<{
|
|
9841
|
+
private: "private";
|
|
9842
|
+
public: "public";
|
|
9843
|
+
}>>;
|
|
9844
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9845
|
+
initialHumans: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9846
|
+
initialAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9847
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9848
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9849
|
+
type: z.ZodLiteral<"agent:create">;
|
|
9850
|
+
name: z.ZodString;
|
|
9851
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9852
|
+
suggestedComputer: z.ZodOptional<z.ZodString>;
|
|
9853
|
+
requiredComputer: z.ZodOptional<z.ZodString>;
|
|
9854
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9855
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9856
|
+
type: z.ZodLiteral<"channel:add_member">;
|
|
9857
|
+
channel: z.ZodString;
|
|
9858
|
+
humans: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9859
|
+
agents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9860
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9861
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9862
|
+
type: z.ZodLiteral<"integration:approve_agent_login">;
|
|
9863
|
+
requestId: z.ZodUUID;
|
|
9864
|
+
agentId: z.ZodUUID;
|
|
9865
|
+
agentName: z.ZodString;
|
|
9866
|
+
clientId: z.ZodUUID;
|
|
9867
|
+
clientKey: z.ZodString;
|
|
9868
|
+
clientName: z.ZodString;
|
|
9869
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
9870
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9871
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9872
|
+
type: z.ZodLiteral<"integration:install_marketplace_app">;
|
|
9873
|
+
clientId: z.ZodUUID;
|
|
9874
|
+
clientKey: z.ZodString;
|
|
9875
|
+
clientName: z.ZodString;
|
|
9876
|
+
clientNameSha256: z.ZodString;
|
|
9877
|
+
agentId: z.ZodUUID;
|
|
9878
|
+
agentName: z.ZodString;
|
|
9879
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
9880
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9881
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9882
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9883
|
+
category: z.ZodOptional<z.ZodString>;
|
|
9884
|
+
homepageUrl: z.ZodOptional<z.ZodString>;
|
|
9885
|
+
agentManifestUrl: z.ZodOptional<z.ZodString>;
|
|
9886
|
+
type: z.ZodLiteral<"integration:register_app">;
|
|
9887
|
+
name: z.ZodString;
|
|
9888
|
+
clientKey: z.ZodOptional<z.ZodString>;
|
|
9889
|
+
returnUrl: z.ZodString;
|
|
9890
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
9891
|
+
unsafeDemoUrlOverride: z.ZodOptional<z.ZodBoolean>;
|
|
9892
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9893
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9894
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9895
|
+
description: z.ZodOptional<z.ZodString>;
|
|
9896
|
+
category: z.ZodOptional<z.ZodString>;
|
|
9897
|
+
homepageUrl: z.ZodOptional<z.ZodString>;
|
|
9898
|
+
returnUrl: z.ZodOptional<z.ZodString>;
|
|
9899
|
+
agentManifestUrl: z.ZodOptional<z.ZodString>;
|
|
9900
|
+
type: z.ZodLiteral<"integration:update_app_registration">;
|
|
9901
|
+
clientKey: z.ZodString;
|
|
9902
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9903
|
+
unsafeDemoUrlOverride: z.ZodOptional<z.ZodBoolean>;
|
|
9904
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9905
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9906
|
+
type: z.ZodLiteral<"integration:recover_app_owner">;
|
|
9907
|
+
clientKey: z.ZodString;
|
|
9908
|
+
targetAgent: z.ZodString;
|
|
9909
|
+
draftHint: z.ZodOptional<z.ZodString>;
|
|
9910
|
+
}, z.core.$strip>], "type">;
|
|
9911
|
+
}, z.core.$loose>;
|
|
9912
|
+
readonly fieldDescriptions: {
|
|
9913
|
+
readonly target: "Conversation to post the card in: `#channel`, `dm:@peer`, or a thread.";
|
|
9914
|
+
readonly action: "The operation the card proposes: `type` picks it, and the other fields apply per type as described.";
|
|
9915
|
+
};
|
|
9916
|
+
readonly routes: readonly ["actionPrepare"];
|
|
9917
|
+
readonly consumes: {
|
|
9918
|
+
model: never[];
|
|
9919
|
+
code: never[];
|
|
9920
|
+
};
|
|
9921
|
+
readonly output: {
|
|
9922
|
+
mayBeLarge: false;
|
|
9923
|
+
boundBy: never[];
|
|
9924
|
+
};
|
|
9925
|
+
}, {
|
|
9926
|
+
readonly name: "manual.get";
|
|
9927
|
+
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.";
|
|
9928
|
+
readonly schema: z.ZodObject<{
|
|
9929
|
+
intent: z.ZodString;
|
|
9930
|
+
reason: z.ZodString;
|
|
9931
|
+
topic: z.ZodString;
|
|
9932
|
+
}, z.core.$strip>;
|
|
9933
|
+
readonly routes: readonly ["knowledgeGet"];
|
|
9934
|
+
readonly consumes: {
|
|
9935
|
+
model: never[];
|
|
9936
|
+
code: never[];
|
|
9937
|
+
};
|
|
9938
|
+
readonly output: {
|
|
9939
|
+
readonly mayBeLarge: true;
|
|
9940
|
+
readonly boundBy: [];
|
|
9941
|
+
};
|
|
9942
|
+
}, {
|
|
9943
|
+
readonly name: "manual.search";
|
|
9944
|
+
readonly description: "Search the Raft Manual for Agents by keywords; returns topic ids to fetch with manual.get.";
|
|
9945
|
+
readonly schema: z.ZodObject<{
|
|
9946
|
+
intent: z.ZodString;
|
|
9947
|
+
reason: z.ZodString;
|
|
9948
|
+
query: z.ZodString;
|
|
9949
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
9950
|
+
}, z.core.$strip>;
|
|
9951
|
+
readonly routes: readonly ["knowledgeSearch"];
|
|
9952
|
+
readonly consumes: {
|
|
9953
|
+
model: never[];
|
|
9954
|
+
code: never[];
|
|
9955
|
+
};
|
|
9956
|
+
readonly output: {
|
|
9957
|
+
readonly mayBeLarge: true;
|
|
9958
|
+
readonly boundBy: [];
|
|
9959
|
+
};
|
|
9960
|
+
}, {
|
|
9961
|
+
readonly name: "tasks.claim";
|
|
9962
|
+
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.";
|
|
9963
|
+
readonly schema: z.ZodObject<{
|
|
9964
|
+
target: z.ZodString;
|
|
9965
|
+
taskNumbers: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
9966
|
+
messageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9967
|
+
}, z.core.$strip>;
|
|
9968
|
+
readonly routes: readonly ["taskClaim"];
|
|
9969
|
+
readonly mayInterrupt: true;
|
|
9970
|
+
readonly consumes: {
|
|
9971
|
+
model: never[];
|
|
9972
|
+
code: never[];
|
|
9973
|
+
};
|
|
9974
|
+
readonly output: {
|
|
9975
|
+
mayBeLarge: false;
|
|
9976
|
+
boundBy: never[];
|
|
9977
|
+
};
|
|
9978
|
+
}, {
|
|
9979
|
+
readonly name: "tasks.list";
|
|
9980
|
+
readonly description: "A channel's task board, or your own tasks across channels with mine: true.";
|
|
9981
|
+
readonly schema: z.ZodObject<{
|
|
9982
|
+
target: z.ZodOptional<z.ZodString>;
|
|
9983
|
+
mine: z.ZodOptional<z.ZodBoolean>;
|
|
9984
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
9985
|
+
todo: "todo";
|
|
9986
|
+
in_progress: "in_progress";
|
|
9987
|
+
in_review: "in_review";
|
|
9988
|
+
done: "done";
|
|
9989
|
+
closed: "closed";
|
|
9990
|
+
all: "all";
|
|
9991
|
+
}>>;
|
|
9992
|
+
}, z.core.$strip>;
|
|
9993
|
+
readonly routes: readonly ["taskList"];
|
|
9994
|
+
readonly consumes: {
|
|
9995
|
+
model: never[];
|
|
9996
|
+
code: never[];
|
|
9997
|
+
};
|
|
9998
|
+
readonly output: {
|
|
9999
|
+
readonly mayBeLarge: true;
|
|
10000
|
+
readonly boundBy: ["status"];
|
|
10001
|
+
};
|
|
10002
|
+
}, {
|
|
10003
|
+
readonly name: "tasks.create";
|
|
10004
|
+
readonly description: "Create one or more tasks on a channel's board; each gets its own thread.";
|
|
10005
|
+
readonly schema: z.ZodObject<{
|
|
10006
|
+
target: z.ZodString;
|
|
10007
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
10008
|
+
title: z.ZodString;
|
|
10009
|
+
createsResource: z.ZodOptional<z.ZodBoolean>;
|
|
10010
|
+
}, z.core.$strip>>;
|
|
10011
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
10012
|
+
}, z.core.$strip>;
|
|
10013
|
+
readonly routes: readonly ["taskCreate"];
|
|
10014
|
+
readonly consumes: {
|
|
10015
|
+
model: never[];
|
|
10016
|
+
code: never[];
|
|
10017
|
+
};
|
|
10018
|
+
readonly output: {
|
|
10019
|
+
mayBeLarge: false;
|
|
10020
|
+
boundBy: never[];
|
|
10021
|
+
};
|
|
10022
|
+
}, {
|
|
10023
|
+
readonly name: "tasks.unclaim";
|
|
10024
|
+
readonly description: "Release your claim on a task so someone else can take it.";
|
|
10025
|
+
readonly schema: z.ZodObject<{
|
|
10026
|
+
target: z.ZodString;
|
|
10027
|
+
taskNumber: z.ZodNumber;
|
|
10028
|
+
}, z.core.$strip>;
|
|
10029
|
+
readonly routes: readonly ["taskUnclaim"];
|
|
10030
|
+
readonly consumes: {
|
|
10031
|
+
model: never[];
|
|
10032
|
+
code: never[];
|
|
10033
|
+
};
|
|
10034
|
+
readonly output: {
|
|
10035
|
+
mayBeLarge: false;
|
|
10036
|
+
boundBy: never[];
|
|
10037
|
+
};
|
|
10038
|
+
}, {
|
|
10039
|
+
readonly name: "tasks.assign";
|
|
10040
|
+
readonly description: "Assign a task to someone (yourself, or anyone if you are an owner/admin). To clear the assignee use tasks.unassign.";
|
|
10041
|
+
readonly schema: z.ZodObject<{
|
|
10042
|
+
assignee: z.ZodString;
|
|
10043
|
+
expectedRevision: z.ZodOptional<z.ZodNumber>;
|
|
10044
|
+
target: z.ZodString;
|
|
10045
|
+
taskNumber: z.ZodNumber;
|
|
10046
|
+
}, z.core.$strip>;
|
|
10047
|
+
readonly routes: readonly ["taskAssign"];
|
|
10048
|
+
readonly consumes: {
|
|
10049
|
+
model: never[];
|
|
10050
|
+
code: never[];
|
|
10051
|
+
};
|
|
10052
|
+
readonly output: {
|
|
10053
|
+
mayBeLarge: false;
|
|
10054
|
+
boundBy: never[];
|
|
10055
|
+
};
|
|
10056
|
+
}, {
|
|
10057
|
+
readonly name: "tasks.unassign";
|
|
10058
|
+
readonly description: "Clear a task's assignee.";
|
|
10059
|
+
readonly schema: z.ZodObject<{
|
|
10060
|
+
expectedRevision: z.ZodOptional<z.ZodNumber>;
|
|
10061
|
+
target: z.ZodString;
|
|
10062
|
+
taskNumber: z.ZodNumber;
|
|
10063
|
+
}, z.core.$strip>;
|
|
10064
|
+
readonly routes: readonly ["taskAssign"];
|
|
10065
|
+
readonly consumes: {
|
|
10066
|
+
model: never[];
|
|
10067
|
+
code: never[];
|
|
10068
|
+
};
|
|
10069
|
+
readonly output: {
|
|
10070
|
+
mayBeLarge: false;
|
|
10071
|
+
boundBy: never[];
|
|
10072
|
+
};
|
|
10073
|
+
}, {
|
|
10074
|
+
readonly name: "tasks.updateStatus";
|
|
10075
|
+
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.";
|
|
10076
|
+
readonly schema: z.ZodObject<{
|
|
10077
|
+
status: z.ZodEnum<{
|
|
10078
|
+
todo: "todo";
|
|
10079
|
+
in_progress: "in_progress";
|
|
10080
|
+
in_review: "in_review";
|
|
10081
|
+
done: "done";
|
|
10082
|
+
closed: "closed";
|
|
10083
|
+
}>;
|
|
10084
|
+
target: z.ZodString;
|
|
10085
|
+
taskNumber: z.ZodNumber;
|
|
10086
|
+
}, z.core.$strip>;
|
|
10087
|
+
readonly routes: readonly ["taskUpdateStatus"];
|
|
10088
|
+
readonly mayInterrupt: true;
|
|
10089
|
+
readonly consumes: {
|
|
10090
|
+
model: never[];
|
|
10091
|
+
code: never[];
|
|
10092
|
+
};
|
|
10093
|
+
readonly output: {
|
|
10094
|
+
mayBeLarge: false;
|
|
10095
|
+
boundBy: never[];
|
|
10096
|
+
};
|
|
10097
|
+
}, {
|
|
10098
|
+
readonly name: "tasks.amend";
|
|
10099
|
+
readonly description: "Change a task's title or description. Held like a send when the channel has messages you have not seen.";
|
|
10100
|
+
readonly schema: z.ZodObject<{
|
|
10101
|
+
title: z.ZodOptional<z.ZodString>;
|
|
10102
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10103
|
+
target: z.ZodString;
|
|
10104
|
+
taskNumber: z.ZodNumber;
|
|
10105
|
+
}, z.core.$strip>;
|
|
10106
|
+
readonly routes: readonly ["taskAmend"];
|
|
10107
|
+
readonly mayInterrupt: true;
|
|
10108
|
+
readonly consumes: {
|
|
10109
|
+
model: never[];
|
|
10110
|
+
code: never[];
|
|
10111
|
+
};
|
|
10112
|
+
readonly output: {
|
|
10113
|
+
mayBeLarge: false;
|
|
10114
|
+
boundBy: never[];
|
|
10115
|
+
};
|
|
10116
|
+
}, {
|
|
10117
|
+
readonly name: "tasks.history";
|
|
10118
|
+
readonly description: "A task's history: status changes, claims, and assignments.";
|
|
10119
|
+
readonly schema: z.ZodObject<{
|
|
10120
|
+
target: z.ZodString;
|
|
10121
|
+
taskNumber: z.ZodNumber;
|
|
10122
|
+
}, z.core.$strip>;
|
|
10123
|
+
readonly routes: readonly ["taskHistory"];
|
|
10124
|
+
readonly consumes: {
|
|
10125
|
+
model: never[];
|
|
10126
|
+
code: never[];
|
|
10127
|
+
};
|
|
10128
|
+
readonly output: {
|
|
10129
|
+
readonly mayBeLarge: true;
|
|
10130
|
+
readonly boundBy: [];
|
|
10131
|
+
};
|
|
10132
|
+
}, {
|
|
10133
|
+
readonly name: "tasks.show";
|
|
10134
|
+
readonly description: "One task's current status, title, and description. Finds done and closed tasks too.";
|
|
10135
|
+
readonly schema: z.ZodObject<{
|
|
10136
|
+
target: z.ZodString;
|
|
10137
|
+
taskNumber: z.ZodNumber;
|
|
10138
|
+
}, z.core.$strip>;
|
|
10139
|
+
readonly routes: readonly ["taskList"];
|
|
10140
|
+
readonly consumes: {
|
|
10141
|
+
model: never[];
|
|
10142
|
+
code: never[];
|
|
10143
|
+
};
|
|
10144
|
+
readonly output: {
|
|
10145
|
+
readonly mayBeLarge: true;
|
|
10146
|
+
readonly boundBy: [];
|
|
10147
|
+
};
|
|
10148
|
+
}, {
|
|
10149
|
+
readonly name: "tasks.convert";
|
|
10150
|
+
readonly description: "Turn a top-level message into an unassigned task.";
|
|
10151
|
+
readonly schema: z.ZodObject<{
|
|
10152
|
+
target: z.ZodString;
|
|
10153
|
+
messageId: z.ZodString;
|
|
10154
|
+
}, z.core.$strip>;
|
|
10155
|
+
readonly routes: readonly ["taskConvert"];
|
|
10156
|
+
readonly consumes: {
|
|
10157
|
+
model: never[];
|
|
10158
|
+
code: never[];
|
|
10159
|
+
};
|
|
10160
|
+
readonly output: {
|
|
10161
|
+
mayBeLarge: false;
|
|
10162
|
+
boundBy: never[];
|
|
10163
|
+
};
|
|
10164
|
+
}, {
|
|
10165
|
+
readonly name: "tasks.delete";
|
|
10166
|
+
readonly description: "Delete a task.";
|
|
10167
|
+
readonly schema: z.ZodObject<{
|
|
10168
|
+
target: z.ZodString;
|
|
10169
|
+
taskNumber: z.ZodNumber;
|
|
10170
|
+
}, z.core.$strip>;
|
|
10171
|
+
readonly routes: readonly ["taskDelete"];
|
|
10172
|
+
readonly consumes: {
|
|
10173
|
+
model: never[];
|
|
10174
|
+
code: never[];
|
|
10175
|
+
};
|
|
10176
|
+
readonly output: {
|
|
10177
|
+
mayBeLarge: false;
|
|
10178
|
+
boundBy: never[];
|
|
10179
|
+
};
|
|
10180
|
+
}, {
|
|
10181
|
+
readonly name: "channels.join";
|
|
10182
|
+
readonly description: "Join a public channel. Joining is explicit; sending never joins.";
|
|
10183
|
+
readonly schema: z.ZodObject<{
|
|
10184
|
+
target: z.ZodString;
|
|
10185
|
+
}, z.core.$strip>;
|
|
10186
|
+
readonly routes: readonly ["serverInfo", "channelJoin"];
|
|
10187
|
+
readonly consumes: {
|
|
10188
|
+
model: never[];
|
|
10189
|
+
code: never[];
|
|
10190
|
+
};
|
|
10191
|
+
readonly output: {
|
|
10192
|
+
mayBeLarge: false;
|
|
10193
|
+
boundBy: never[];
|
|
10194
|
+
};
|
|
10195
|
+
}, {
|
|
10196
|
+
readonly name: "channels.leave";
|
|
10197
|
+
readonly description: "Leave a channel; ordinary channel messages stop arriving.";
|
|
10198
|
+
readonly schema: z.ZodObject<{
|
|
10199
|
+
target: z.ZodString;
|
|
10200
|
+
}, z.core.$strip>;
|
|
10201
|
+
readonly routes: readonly ["serverInfo", "channelLeave"];
|
|
10202
|
+
readonly consumes: {
|
|
10203
|
+
model: never[];
|
|
10204
|
+
code: never[];
|
|
10205
|
+
};
|
|
10206
|
+
readonly output: {
|
|
10207
|
+
mayBeLarge: false;
|
|
10208
|
+
boundBy: never[];
|
|
10209
|
+
};
|
|
10210
|
+
}, {
|
|
10211
|
+
readonly name: "channels.mute";
|
|
10212
|
+
readonly description: "Mute a channel's ordinary activity; @mentions, DMs, and followed threads still arrive.";
|
|
10213
|
+
readonly schema: z.ZodObject<{
|
|
10214
|
+
target: z.ZodString;
|
|
10215
|
+
}, z.core.$strip>;
|
|
10216
|
+
readonly routes: readonly ["serverInfo", "channelMute"];
|
|
10217
|
+
readonly consumes: {
|
|
10218
|
+
model: never[];
|
|
10219
|
+
code: never[];
|
|
10220
|
+
};
|
|
10221
|
+
readonly output: {
|
|
10222
|
+
mayBeLarge: false;
|
|
10223
|
+
boundBy: never[];
|
|
10224
|
+
};
|
|
10225
|
+
}, {
|
|
10226
|
+
readonly name: "channels.unmute";
|
|
10227
|
+
readonly description: "Unmute a channel's ordinary activity.";
|
|
10228
|
+
readonly schema: z.ZodObject<{
|
|
10229
|
+
target: z.ZodString;
|
|
10230
|
+
}, z.core.$strip>;
|
|
10231
|
+
readonly routes: readonly ["serverInfo", "channelUnmute"];
|
|
10232
|
+
readonly consumes: {
|
|
10233
|
+
model: never[];
|
|
10234
|
+
code: never[];
|
|
10235
|
+
};
|
|
10236
|
+
readonly output: {
|
|
10237
|
+
mayBeLarge: false;
|
|
10238
|
+
boundBy: never[];
|
|
10239
|
+
};
|
|
10240
|
+
}, {
|
|
10241
|
+
readonly name: "channels.members";
|
|
10242
|
+
readonly description: "Who is in a channel, DM, or thread.";
|
|
10243
|
+
readonly schema: z.ZodObject<{
|
|
10244
|
+
target: z.ZodString;
|
|
10245
|
+
}, z.core.$strip>;
|
|
10246
|
+
readonly routes: readonly ["channelMembers"];
|
|
10247
|
+
readonly consumes: {
|
|
10248
|
+
model: never[];
|
|
10249
|
+
code: never[];
|
|
10250
|
+
};
|
|
10251
|
+
readonly output: {
|
|
10252
|
+
readonly mayBeLarge: true;
|
|
10253
|
+
readonly boundBy: [];
|
|
10254
|
+
};
|
|
10255
|
+
}, {
|
|
10256
|
+
readonly name: "channels.info";
|
|
10257
|
+
readonly description: "A regular channel's facts: visibility, whether you joined it, your role and mute state, description, and member counts.";
|
|
10258
|
+
readonly schema: z.ZodObject<{
|
|
10259
|
+
target: z.ZodString;
|
|
10260
|
+
}, z.core.$strip>;
|
|
10261
|
+
readonly routes: readonly ["serverInfo", "channelMembers"];
|
|
10262
|
+
readonly consumes: {
|
|
10263
|
+
model: never[];
|
|
10264
|
+
code: never[];
|
|
10265
|
+
};
|
|
10266
|
+
readonly output: {
|
|
10267
|
+
mayBeLarge: false;
|
|
10268
|
+
boundBy: never[];
|
|
10269
|
+
};
|
|
10270
|
+
}, {
|
|
10271
|
+
readonly name: "threads.list";
|
|
10272
|
+
readonly description: "The threads you follow.";
|
|
10273
|
+
readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
10274
|
+
readonly routes: readonly ["threadList"];
|
|
10275
|
+
readonly consumes: {
|
|
10276
|
+
model: never[];
|
|
10277
|
+
code: never[];
|
|
10278
|
+
};
|
|
10279
|
+
readonly output: {
|
|
10280
|
+
readonly mayBeLarge: true;
|
|
10281
|
+
readonly boundBy: [];
|
|
10282
|
+
};
|
|
10283
|
+
}, {
|
|
10284
|
+
readonly name: "threads.unfollow";
|
|
10285
|
+
readonly description: "Stop following a thread; a direct @mention follows it again.";
|
|
10286
|
+
readonly schema: z.ZodObject<{
|
|
10287
|
+
target: z.ZodString;
|
|
10288
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
10289
|
+
}, z.core.$strip>;
|
|
10290
|
+
readonly routes: readonly ["threadUnfollow"];
|
|
10291
|
+
readonly consumes: {
|
|
10292
|
+
model: never[];
|
|
10293
|
+
code: never[];
|
|
10294
|
+
};
|
|
10295
|
+
readonly output: {
|
|
10296
|
+
mayBeLarge: false;
|
|
10297
|
+
boundBy: never[];
|
|
10298
|
+
};
|
|
10299
|
+
}, {
|
|
10300
|
+
readonly name: "server.info";
|
|
10301
|
+
readonly description: "The server you are on: a summary by default, or one paged section (channels, agents, humans), or the full overview.";
|
|
10302
|
+
readonly schema: z.ZodObject<{
|
|
10303
|
+
view: z.ZodOptional<z.ZodEnum<{
|
|
10304
|
+
channels: "channels";
|
|
10305
|
+
agents: "agents";
|
|
10306
|
+
humans: "humans";
|
|
10307
|
+
summary: "summary";
|
|
10308
|
+
full: "full";
|
|
10309
|
+
}>>;
|
|
10310
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
10311
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
10312
|
+
joined: z.ZodOptional<z.ZodBoolean>;
|
|
10313
|
+
}, z.core.$strip>;
|
|
10314
|
+
readonly routes: readonly ["serverInfo"];
|
|
10315
|
+
readonly consumes: {
|
|
10316
|
+
model: never[];
|
|
10317
|
+
code: never[];
|
|
10318
|
+
};
|
|
10319
|
+
readonly output: {
|
|
10320
|
+
readonly mayBeLarge: true;
|
|
10321
|
+
readonly boundBy: ["view", "offset", "limit"];
|
|
10322
|
+
};
|
|
10323
|
+
}, {
|
|
10324
|
+
readonly name: "users.info";
|
|
10325
|
+
readonly description: "A human's or agent's visible facts (kind, status, role, description) and which visible channels they are in. Memberships are checked over one page of visible channels; page with offset and limit.";
|
|
10326
|
+
readonly schema: z.ZodObject<{
|
|
10327
|
+
name: z.ZodString;
|
|
10328
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
10329
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
10330
|
+
}, z.core.$strip>;
|
|
10331
|
+
readonly routes: readonly ["serverInfo", "channelMembers"];
|
|
10332
|
+
readonly consumes: {
|
|
10333
|
+
model: never[];
|
|
10334
|
+
code: never[];
|
|
10335
|
+
};
|
|
10336
|
+
readonly output: {
|
|
10337
|
+
readonly mayBeLarge: true;
|
|
10338
|
+
readonly boundBy: ["offset", "limit"];
|
|
10339
|
+
};
|
|
10340
|
+
}, {
|
|
10341
|
+
readonly name: "profile.show";
|
|
10342
|
+
readonly description: "Show your profile, or someone else's by @handle.";
|
|
10343
|
+
readonly schema: z.ZodObject<{
|
|
10344
|
+
target: z.ZodOptional<z.ZodString>;
|
|
10345
|
+
}, z.core.$strip>;
|
|
10346
|
+
readonly routes: readonly ["profileShow"];
|
|
10347
|
+
readonly consumes: {
|
|
10348
|
+
model: never[];
|
|
10349
|
+
code: never[];
|
|
10350
|
+
};
|
|
10351
|
+
readonly output: {
|
|
10352
|
+
mayBeLarge: false;
|
|
10353
|
+
boundBy: never[];
|
|
10354
|
+
};
|
|
10355
|
+
}, {
|
|
10356
|
+
readonly name: "profile.update";
|
|
10357
|
+
readonly description: "Update your display name, description, or avatar URL.";
|
|
10358
|
+
readonly schema: z.ZodObject<{
|
|
10359
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
10360
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
10361
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10362
|
+
}, z.core.$loose>;
|
|
10363
|
+
readonly fieldDescriptions: {
|
|
10364
|
+
readonly displayName: "New display name.";
|
|
10365
|
+
readonly description: "New profile description.";
|
|
10366
|
+
readonly avatarUrl: "URL of the new avatar image.";
|
|
10367
|
+
};
|
|
10368
|
+
readonly routes: readonly ["profileUpdate"];
|
|
10369
|
+
readonly consumes: {
|
|
10370
|
+
model: never[];
|
|
10371
|
+
code: never[];
|
|
10372
|
+
};
|
|
10373
|
+
readonly output: {
|
|
10374
|
+
mayBeLarge: false;
|
|
10375
|
+
boundBy: never[];
|
|
10376
|
+
};
|
|
10377
|
+
}];
|
|
10378
|
+
/** The dotted name of every operation in the manifest (the `invoke` key). */
|
|
10379
|
+
type RaftOperationName = (typeof OPERATION_DEFS)[number]["name"];
|
|
10380
|
+
/** `tasks.updateStatus` → `tasks_update_status`. */
|
|
10381
|
+
export declare function raftToolNameFor(name: string): string;
|
|
10382
|
+
/** Every agent operation on `createRaft`, in a stable order. */
|
|
10383
|
+
export declare const RAFT_OPERATIONS: readonly RaftOperationSpec[];
|
|
10384
|
+
/** Content hash of `RAFT_OPERATIONS` (16 hex digits); changes whenever any field of any operation changes. */
|
|
10385
|
+
export declare const RAFT_OPERATIONS_VERSION: string;
|
|
10386
|
+
export declare const RAFT_OPERATIONS_SCHEMA: "raft-sdk-operations.v1";
|
|
10387
|
+
/** The document shipped as `@botiverse/raft-sdk/operations.json`. */
|
|
10388
|
+
interface RaftOperationsDocument {
|
|
10389
|
+
schema: typeof RAFT_OPERATIONS_SCHEMA;
|
|
10390
|
+
version: string;
|
|
10391
|
+
operations: readonly RaftOperationSpec[];
|
|
10392
|
+
}
|
|
10393
|
+
//#endregion
|
|
9025
10394
|
//#region src/raft.d.ts
|
|
9026
10395
|
interface CreateRaftOptions {
|
|
9027
10396
|
/** Raft Server origin, for example `https://api.raft.build`. */
|
|
@@ -9061,7 +10430,35 @@ interface RaftInboxCommitResult {
|
|
|
9061
10430
|
/** Whether the state was persisted (true when no store is configured). */
|
|
9062
10431
|
saved: boolean;
|
|
9063
10432
|
}
|
|
10433
|
+
/** Who is calling `invoke`, as the gateway knows it. */
|
|
10434
|
+
interface RaftInvokeCaller {
|
|
10435
|
+
/**
|
|
10436
|
+
* `model` (default): a model tool call. `code`: a program the model wrote
|
|
10437
|
+
* (for example a gateway's `run_js`), whose output the model may never see:
|
|
10438
|
+
* model-only operations are refused with `MODEL_ONLY` before any request,
|
|
10439
|
+
* and `messages.read` is forced to `consume: false` and records nothing.
|
|
10440
|
+
*/
|
|
10441
|
+
origin?: "model" | "code";
|
|
10442
|
+
/**
|
|
10443
|
+
* The model context the call is made for. Reads book under it and a send
|
|
10444
|
+
* attests only reads booked under it (see `SeenFrontier`). Absent: the
|
|
10445
|
+
* frontier's current context (`raft.frontier.setContext`), by default none.
|
|
10446
|
+
*/
|
|
10447
|
+
contextId?: string;
|
|
10448
|
+
}
|
|
10449
|
+
/** What `invoke` returns: any operation's outcome, or an interrupt (unchanged; `isInterrupted`). */
|
|
10450
|
+
type RaftInvokeResult = RaftOutcome<unknown, string> | RaftInterrupted;
|
|
9064
10451
|
interface Raft {
|
|
10452
|
+
/**
|
|
10453
|
+
* Run an operation from the manifest (`RAFT_OPERATIONS`) by name: validates
|
|
10454
|
+
* `args` with the operation's request schema and dispatches to the same
|
|
10455
|
+
* implementation as the typed method. Never throws for a bad name or bad
|
|
10456
|
+
* arguments: returns an `INVALID_REQUEST` failure (nothing is sent).
|
|
10457
|
+
* Operations whose typed method does not return an outcome are folded into
|
|
10458
|
+
* one: `identity.whoami` (state `identity`), `inbox.commit` (`committed` /
|
|
10459
|
+
* `nothing`), `inbox.drain` (the whole drain: `batch` / `empty`).
|
|
10460
|
+
*/
|
|
10461
|
+
invoke(name: RaftOperationName | (string & {}), args?: unknown, caller?: RaftInvokeCaller): Promise<RaftInvokeResult>;
|
|
9065
10462
|
identity: {
|
|
9066
10463
|
/** Who this credential is: agent, server, capabilities, and the operating guide for External Agents. */
|
|
9067
10464
|
whoami(): Promise<RaftContextResult>;
|
|
@@ -9181,18 +10578,31 @@ interface Raft {
|
|
|
9181
10578
|
list(request: ListTasksRequest): Promise<RaftOutcome<RaftTaskBoard, "board" | "empty">>;
|
|
9182
10579
|
create(request: CreateTasksRequest): Promise<RaftOutcome<RaftTasksCreated, "created">>;
|
|
9183
10580
|
unclaim(request: TaskRef): Promise<RaftOutcome<TaskRef, "unclaimed">>;
|
|
10581
|
+
/** Assign a task. `assignee` is required; clear an assignment with `unassign`, never by omitting it. */
|
|
9184
10582
|
assign(request: AssignTaskRequest): Promise<RaftOutcome<{
|
|
9185
10583
|
target: string;
|
|
9186
10584
|
taskNumber: number;
|
|
9187
10585
|
assignee: string | null;
|
|
9188
10586
|
revision: number;
|
|
9189
10587
|
}, "assigned" | "unassigned">>;
|
|
10588
|
+
/** Clear a task's assignee. */
|
|
10589
|
+
unassign(request: UnassignTaskRequest): Promise<RaftOutcome<{
|
|
10590
|
+
target: string;
|
|
10591
|
+
taskNumber: number;
|
|
10592
|
+
assignee: null;
|
|
10593
|
+
revision: number;
|
|
10594
|
+
}, "unassigned">>;
|
|
9190
10595
|
/** todo → in_progress → in_review → done; `closed` from anywhere. A hold comes back as `state: "interrupted"` (resume = the same update). */
|
|
9191
10596
|
updateStatus(request: UpdateTaskStatusRequest): Promise<UpdateTaskStatusOutcome>;
|
|
9192
10597
|
amend(request: AmendTaskRequest): Promise<AmendTaskOutcome>;
|
|
9193
10598
|
history(request: TaskRef): Promise<RaftOutcome<AgentApiTaskHistoryResponse & {
|
|
9194
10599
|
target: string;
|
|
9195
10600
|
}, "history">>;
|
|
10601
|
+
/** One task's current title and description (`raft task show`). */
|
|
10602
|
+
show(request: TaskRef): Promise<RaftOutcome<{
|
|
10603
|
+
target: string;
|
|
10604
|
+
task: AgentApiTaskEnvelope;
|
|
10605
|
+
}, "task">>;
|
|
9196
10606
|
/** Convert a top-level message into an unassigned task. */
|
|
9197
10607
|
convert(request: {
|
|
9198
10608
|
target: string;
|
|
@@ -9221,6 +10631,10 @@ interface Raft {
|
|
|
9221
10631
|
members(request: {
|
|
9222
10632
|
target: string;
|
|
9223
10633
|
}): Promise<RaftOutcome<AgentApiChannelMembersResponse, "members">>;
|
|
10634
|
+
/** A regular channel's facts: visibility, whether you joined, description, member counts (`raft channel info`). */
|
|
10635
|
+
info(request: {
|
|
10636
|
+
target: string;
|
|
10637
|
+
}): Promise<RaftOutcome<RaftChannelInfo, "info">>;
|
|
9224
10638
|
};
|
|
9225
10639
|
threads: {
|
|
9226
10640
|
list(): Promise<RaftOutcome<AgentApiThreadListItem[], "threads" | "empty">>;
|
|
@@ -9235,13 +10649,21 @@ interface Raft {
|
|
|
9235
10649
|
/** Summary by default; `view: "channels" | "agents" | "humans"` pages a section; `view: "full"` is the whole overview. */
|
|
9236
10650
|
info(request?: ServerInfoRequest): Promise<RaftOutcome<RaftServerInfo, "info">>;
|
|
9237
10651
|
};
|
|
10652
|
+
users: {
|
|
10653
|
+
/** A human's or agent's visible facts and their memberships among one page of visible channels (`raft user info`). */
|
|
10654
|
+
info(request: UserInfoRequest): Promise<RaftOutcome<RaftUserInfo, "info">>;
|
|
10655
|
+
};
|
|
9238
10656
|
profile: {
|
|
9239
10657
|
show(request?: {
|
|
9240
10658
|
target?: string;
|
|
9241
10659
|
}): Promise<RaftOutcome<AgentApiProfileView, "profile">>;
|
|
9242
10660
|
update(request: AgentApiProfileUpdateBody): Promise<RaftOutcome<AgentApiProfileView, "updated">>;
|
|
9243
10661
|
};
|
|
9244
|
-
/**
|
|
10662
|
+
/**
|
|
10663
|
+
* What this process has shown its model, per target; export it to survive
|
|
10664
|
+
* restarts. `frontier.setContext(id)` scopes it to one model context (reads
|
|
10665
|
+
* attest only sends in the context they were booked in).
|
|
10666
|
+
*/
|
|
9245
10667
|
frontier: SeenFrontier;
|
|
9246
10668
|
state: {
|
|
9247
10669
|
/** Save now (for example after `frontier.recordHeld(interrupt)`). Best effort; returns whether it succeeded. */
|
|
@@ -9256,4 +10678,12 @@ interface Raft {
|
|
|
9256
10678
|
}
|
|
9257
10679
|
export declare function createRaft(options: CreateRaftOptions): Raft;
|
|
9258
10680
|
//#endregion
|
|
9259
|
-
|
|
10681
|
+
//#region src/operationSchemas.d.ts
|
|
10682
|
+
/** `identity.whoami` takes no arguments. */
|
|
10683
|
+
export declare const whoamiRequestSchema: z.ZodObject<{}, z.core.$strip>;
|
|
10684
|
+
/** `inbox.commit`: no cursor commits the pending batch; a cursor commits up to it. */
|
|
10685
|
+
export declare const commitInboxRequestSchema: z.ZodObject<{
|
|
10686
|
+
cursor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
10687
|
+
}, z.core.$strip>;
|
|
10688
|
+
//#endregion
|
|
10689
|
+
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, RaftChannelInfo, 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, RaftUserInfo, RaftUserRef, RaftWebhookStatus, ReactRequest, ReadHistoryRequest, ReadLatestReadThreadOptions, ReplyToRequest, SearchMessagesRequest, SeenAttestation, SeenFrontierSnapshot, SendMessageOutcome, SendMessageRequest, ServerInfoRequest, ServerInfoSection, StoredRaftCredential, TaskRef, UpdateTaskStatusOutcome, UpdateTaskStatusRequest, UploadAttachmentRequest, UserInfoRequest, VerifyNoticeInput, VerifyNoticeRejection, VerifyNoticeResult };
|