@sentry/junior-plugin-api 0.305.0 → 0.307.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { $ as eventSourceSchema, A as Source, B as createWebSource, C as PluginReranker, D as SlackInvocationContext, E as SlackDestination, F as WebInvocationContext, G as PluginCache, H as isPrivateSource, I as WebSource, J as agentInvocationSourceSchema, K as actorSchema, L as createEventSource, M as SystemActor, N as User, O as SlackLocation, P as WebActor, Q as eventAutomationSourceSchema, R as createLocalSource, S as PluginModel, St as webSourceSchema, T as SlackActor, U as isSlackDestination, V as getSourceKey, W as CacheEntry, X as destinationVisibilitySchema, Y as destinationSchema, Z as dispatchOptionsSchema, _ as PluginDispatchSource, _t as sourceVisibilitySchema, a as EventInvocationContext, at as locationSchema, b as PluginLogger, bt as userSchema, c as InvocationContext, ct as pluginCredentialSubjectSchema, d as LocalInvocationContext, dt as scheduledAutomationSourceSchema, et as identityDispatchOptionsSchema, f as LocalSource, ft as slackActorSchema, g as PluginDecider, gt as sourceSchema, h as PluginContext, ht as slackSourceSchema, i as EventAutomationSource, it as localSourceSchema, j as SourceVisibility, k as SlackSource, l as LocalActor, lt as pluginDispatchSourceSchema, m as Platform, mt as slackLocationSchema, n as AgentInvocationSource, nt as localActorSchema, o as EventSource, ot as nonBlankStringSchema, p as Location, pt as slackDestinationSchema, q as actorUserIdSchema, r as Destination, rt as localDestinationSchema, s as Identity, st as platformSchema, t as Actor, tt as identitySchema, u as LocalDestination, ut as replyAttributionSchema, v as PluginEmbedder, vt as systemActorSchema, w as ScheduledAutomationSource, x as PluginMetadata, xt as webActorSchema, y as PluginEmbeddingInputType, yt as taskOutcomeSchema, z as createSlackSource } from "./context-Buwf8ZyW.js";
1
2
  import * as z from "zod";
2
3
  import { ZodTypeAny } from "zod";
3
4
  import { Command } from "commander";
@@ -135,6 +136,14 @@ export declare const objectFactsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
135
136
  label: z.ZodString;
136
137
  points: z.ZodArray<z.ZodNumber>;
137
138
  }, z.core.$strict>>;
139
+ }, z.core.$strict>, z.ZodObject<{
140
+ type: z.ZodLiteral<"alert">;
141
+ summary: z.ZodOptional<z.ZodString>;
142
+ enabled: z.ZodBoolean;
143
+ projects: z.ZodArray<z.ZodString>;
144
+ trigger: z.ZodOptional<z.ZodString>;
145
+ notifies: z.ZodArray<z.ZodString>;
146
+ lastTriggeredAt: z.ZodOptional<z.ZodISODateTime>;
138
147
  }, z.core.$strict>, z.ZodObject<{
139
148
  type: z.ZodLiteral<"trace">;
140
149
  summary: z.ZodOptional<z.ZodString>;
@@ -201,6 +210,7 @@ type ObjectField = {
201
210
  export declare function objectFactFields(facts: ObjectFacts | undefined): ObjectField[];
202
211
  /** Native object types. `task` is the stored name for a Ticket. */
203
212
  export declare const objectTypeSchema: z.ZodEnum<{
213
+ alert: "alert";
204
214
  automation: "automation";
205
215
  calendar_event: "calendar_event";
206
216
  chart: "chart";
@@ -230,6 +240,7 @@ export declare function objectPresentation(object: {
230
240
  facts?: {
231
241
  type: string;
232
242
  state?: string;
243
+ enabled?: boolean;
233
244
  } | undefined;
234
245
  }): {
235
246
  icon: ObjectIconName;
@@ -261,6 +272,7 @@ export declare const objectAnnotationSchema: z.ZodObject<{
261
272
  key: z.ZodString;
262
273
  label: z.ZodString;
263
274
  objectType: z.ZodEnum<{
275
+ alert: "alert";
264
276
  automation: "automation";
265
277
  calendar_event: "calendar_event";
266
278
  chart: "chart";
@@ -418,6 +430,14 @@ export declare const objectAnnotationSchema: z.ZodObject<{
418
430
  label: z.ZodString;
419
431
  points: z.ZodArray<z.ZodNumber>;
420
432
  }, z.core.$strict>>;
433
+ }, z.core.$strict>, z.ZodObject<{
434
+ type: z.ZodLiteral<"alert">;
435
+ summary: z.ZodOptional<z.ZodString>;
436
+ enabled: z.ZodBoolean;
437
+ projects: z.ZodArray<z.ZodString>;
438
+ trigger: z.ZodOptional<z.ZodString>;
439
+ notifies: z.ZodArray<z.ZodString>;
440
+ lastTriggeredAt: z.ZodOptional<z.ZodISODateTime>;
421
441
  }, z.core.$strict>, z.ZodObject<{
422
442
  type: z.ZodLiteral<"trace">;
423
443
  summary: z.ZodOptional<z.ZodString>;
@@ -474,6 +494,7 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
474
494
  key: z.ZodString;
475
495
  label: z.ZodString;
476
496
  objectType: z.ZodEnum<{
497
+ alert: "alert";
477
498
  automation: "automation";
478
499
  calendar_event: "calendar_event";
479
500
  chart: "chart";
@@ -631,6 +652,14 @@ export declare const ownedObjectAnnotationSchema: z.ZodObject<{
631
652
  label: z.ZodString;
632
653
  points: z.ZodArray<z.ZodNumber>;
633
654
  }, z.core.$strict>>;
655
+ }, z.core.$strict>, z.ZodObject<{
656
+ type: z.ZodLiteral<"alert">;
657
+ summary: z.ZodOptional<z.ZodString>;
658
+ enabled: z.ZodBoolean;
659
+ projects: z.ZodArray<z.ZodString>;
660
+ trigger: z.ZodOptional<z.ZodString>;
661
+ notifies: z.ZodArray<z.ZodString>;
662
+ lastTriggeredAt: z.ZodOptional<z.ZodISODateTime>;
634
663
  }, z.core.$strict>, z.ZodObject<{
635
664
  type: z.ZodLiteral<"trace">;
636
665
  summary: z.ZodOptional<z.ZodString>;
@@ -706,505 +735,6 @@ export declare const objectIconPaths: {
706
735
  package: string[];
707
736
  apps: string[];
708
737
  };
709
- /** Exact non-blank actor user id that rejects the sentinel "unknown". */
710
- export declare const actorUserIdSchema: z.ZodString;
711
- export declare const nonBlankStringSchema: z.ZodString;
712
- /** Complete Slack Location associated with a Conversation. */
713
- export declare const slackLocationSchema: z.ZodObject<{
714
- id: z.ZodString;
715
- provider: z.ZodLiteral<"slack">;
716
- teamId: z.ZodString;
717
- channelId: z.ZodString;
718
- threadTs: z.ZodOptional<z.ZodString>;
719
- }, z.core.$strict>;
720
- /** Complete Location types supported by Junior. */
721
- export declare const locationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
722
- id: z.ZodString;
723
- provider: z.ZodLiteral<"slack">;
724
- teamId: z.ZodString;
725
- channelId: z.ZodString;
726
- threadTs: z.ZodOptional<z.ZodString>;
727
- }, z.core.$strict>], "provider">;
728
- /** Runtime platform names supported by plugin public contracts. */
729
- export declare const platformSchema: z.ZodEnum<{
730
- local: "local";
731
- slack: "slack";
732
- }>;
733
- /** Runtime source visibility visible to plugins. */
734
- export declare const sourceVisibilitySchema: z.ZodEnum<{
735
- private: "private";
736
- public: "public";
737
- }>;
738
- /** Provider-neutral visibility of a routed destination. */
739
- export declare const destinationVisibilitySchema: z.ZodEnum<{
740
- private: "private";
741
- public: "public";
742
- }>;
743
- /** Runtime-owned Slack address for routing future work or side effects. */
744
- export declare const slackDestinationSchema: z.ZodObject<{
745
- platform: z.ZodLiteral<"slack">;
746
- teamId: z.ZodString;
747
- channelId: z.ZodString;
748
- threadTs: z.ZodOptional<z.ZodString>;
749
- }, z.core.$strict>;
750
- /** Runtime-owned local CLI conversation address. */
751
- export declare const localDestinationSchema: z.ZodObject<{
752
- platform: z.ZodLiteral<"local">;
753
- conversationId: z.ZodString;
754
- }, z.core.$strict>;
755
- /** Runtime-owned provider-neutral address for routing future work or side effects. */
756
- export declare const destinationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
757
- platform: z.ZodLiteral<"slack">;
758
- teamId: z.ZodString;
759
- channelId: z.ZodString;
760
- threadTs: z.ZodOptional<z.ZodString>;
761
- }, z.core.$strict>, z.ZodObject<{
762
- platform: z.ZodLiteral<"local">;
763
- conversationId: z.ZodString;
764
- }, z.core.$strict>], "platform">;
765
- /** One visible effect after successful automated work. */
766
- export declare const taskOutcomeSchema: z.ZodObject<{
767
- action: z.ZodLiteral<"send_message">;
768
- destination: z.ZodObject<{
769
- platform: z.ZodLiteral<"slack">;
770
- teamId: z.ZodString;
771
- channelId: z.ZodString;
772
- threadTs: z.ZodOptional<z.ZodString>;
773
- }, z.core.$strict>;
774
- }, z.core.$strict>;
775
- /** Runtime-owned Slack input Source. */
776
- export declare const slackSourceSchema: z.ZodObject<{
777
- kind: z.ZodLiteral<"slack">;
778
- teamId: z.ZodString;
779
- channelId: z.ZodString;
780
- visibility: z.ZodEnum<{
781
- private: "private";
782
- public: "public";
783
- }>;
784
- messageTs: z.ZodOptional<z.ZodString>;
785
- threadTs: z.ZodOptional<z.ZodString>;
786
- }, z.core.$strict>;
787
- /** Runtime-owned local CLI input Source. */
788
- export declare const localSourceSchema: z.ZodObject<{
789
- kind: z.ZodLiteral<"local">;
790
- visibility: z.ZodLiteral<"private">;
791
- conversationId: z.ZodString;
792
- }, z.core.$strict>;
793
- /** Runtime-owned dashboard input Source. */
794
- export declare const webSourceSchema: z.ZodObject<{
795
- kind: z.ZodLiteral<"web">;
796
- visibility: z.ZodEnum<{
797
- private: "private";
798
- public: "public";
799
- }>;
800
- conversationId: z.ZodString;
801
- }, z.core.$strict>;
802
- /** Runtime-owned Event input Source. */
803
- export declare const eventSourceSchema: z.ZodObject<{
804
- kind: z.ZodLiteral<"event">;
805
- eventKey: z.ZodString;
806
- eventType: z.ZodString;
807
- identifier: z.ZodString;
808
- namespace: z.ZodString;
809
- }, z.core.$strict>;
810
- /** Runtime-owned Scheduled automation input Source. */
811
- export declare const scheduledAutomationSourceSchema: z.ZodObject<{
812
- automationId: z.ZodOptional<z.ZodString>;
813
- automationRunId: z.ZodOptional<z.ZodString>;
814
- kind: z.ZodLiteral<"scheduled_automation">;
815
- }, z.core.$strict>;
816
- /** Runtime-owned Event automation input Source. */
817
- export declare const eventAutomationSourceSchema: z.ZodObject<{
818
- automationId: z.ZodOptional<z.ZodString>;
819
- automationRunId: z.ZodOptional<z.ZodString>;
820
- kind: z.ZodLiteral<"event_automation">;
821
- }, z.core.$strict>;
822
- /** Runtime-owned Plugin dispatch input Source. */
823
- export declare const pluginDispatchSourceSchema: z.ZodObject<{
824
- kind: z.ZodLiteral<"plugin_dispatch">;
825
- }, z.core.$strict>;
826
- /** Runtime-owned Agent invocation input Source. */
827
- export declare const agentInvocationSourceSchema: z.ZodObject<{
828
- kind: z.ZodLiteral<"agent_invocation">;
829
- }, z.core.$strict>;
830
- /** Runtime-owned input Source. Stored `platform` and Location fields normalize on read. */
831
- export declare const sourceSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
832
- kind: z.ZodLiteral<"slack">;
833
- teamId: z.ZodString;
834
- channelId: z.ZodString;
835
- visibility: z.ZodEnum<{
836
- private: "private";
837
- public: "public";
838
- }>;
839
- messageTs: z.ZodOptional<z.ZodString>;
840
- threadTs: z.ZodOptional<z.ZodString>;
841
- }, z.core.$strict>, z.ZodObject<{
842
- kind: z.ZodLiteral<"local">;
843
- visibility: z.ZodLiteral<"private">;
844
- conversationId: z.ZodString;
845
- }, z.core.$strict>, z.ZodObject<{
846
- kind: z.ZodLiteral<"web">;
847
- visibility: z.ZodEnum<{
848
- private: "private";
849
- public: "public";
850
- }>;
851
- conversationId: z.ZodString;
852
- }, z.core.$strict>, z.ZodObject<{
853
- kind: z.ZodLiteral<"event">;
854
- eventKey: z.ZodString;
855
- eventType: z.ZodString;
856
- identifier: z.ZodString;
857
- namespace: z.ZodString;
858
- }, z.core.$strict>, z.ZodObject<{
859
- automationId: z.ZodOptional<z.ZodString>;
860
- automationRunId: z.ZodOptional<z.ZodString>;
861
- kind: z.ZodLiteral<"scheduled_automation">;
862
- }, z.core.$strict>, z.ZodObject<{
863
- automationId: z.ZodOptional<z.ZodString>;
864
- automationRunId: z.ZodOptional<z.ZodString>;
865
- kind: z.ZodLiteral<"event_automation">;
866
- }, z.core.$strict>, z.ZodObject<{
867
- kind: z.ZodLiteral<"plugin_dispatch">;
868
- }, z.core.$strict>, z.ZodObject<{
869
- kind: z.ZodLiteral<"agent_invocation">;
870
- }, z.core.$strict>], "kind">, unknown>;
871
- /** Stable user credential subject shape accepted from plugins. */
872
- export declare const pluginCredentialSubjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
873
- type: z.ZodLiteral<"user">;
874
- userId: z.ZodString;
875
- allowedWhen: z.ZodLiteral<"private-direct-conversation">;
876
- }, z.core.$strict>, z.ZodObject<{
877
- type: z.ZodLiteral<"user">;
878
- userId: z.ZodString;
879
- allowedWhen: z.ZodLiteral<"scheduled-automation">;
880
- taskId: z.ZodString;
881
- }, z.core.$strict>], "allowedWhen">;
882
- export declare const slackActorSchema: z.ZodObject<{
883
- email: z.ZodOptional<z.ZodString>;
884
- fullName: z.ZodOptional<z.ZodString>;
885
- userId: z.ZodString;
886
- userName: z.ZodOptional<z.ZodString>;
887
- platform: z.ZodLiteral<"slack">;
888
- teamId: z.ZodString;
889
- }, z.core.$strict>;
890
- export declare const localActorSchema: z.ZodObject<{
891
- email: z.ZodOptional<z.ZodString>;
892
- fullName: z.ZodOptional<z.ZodString>;
893
- userId: z.ZodString;
894
- userName: z.ZodOptional<z.ZodString>;
895
- platform: z.ZodLiteral<"local">;
896
- }, z.core.$strict>;
897
- export declare const webActorSchema: z.ZodObject<{
898
- email: z.ZodOptional<z.ZodString>;
899
- fullName: z.ZodOptional<z.ZodString>;
900
- userId: z.ZodString;
901
- userName: z.ZodOptional<z.ZodString>;
902
- platform: z.ZodLiteral<"web">;
903
- }, z.core.$strict>;
904
- export declare const systemActorSchema: z.ZodObject<{
905
- platform: z.ZodLiteral<"system">;
906
- name: z.ZodString;
907
- }, z.core.$strict>;
908
- /** Runtime-provided actor identity visible to plugin hooks. */
909
- export declare const actorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
910
- email: z.ZodOptional<z.ZodString>;
911
- fullName: z.ZodOptional<z.ZodString>;
912
- userId: z.ZodString;
913
- userName: z.ZodOptional<z.ZodString>;
914
- platform: z.ZodLiteral<"slack">;
915
- teamId: z.ZodString;
916
- }, z.core.$strict>, z.ZodObject<{
917
- email: z.ZodOptional<z.ZodString>;
918
- fullName: z.ZodOptional<z.ZodString>;
919
- userId: z.ZodString;
920
- userName: z.ZodOptional<z.ZodString>;
921
- platform: z.ZodLiteral<"local">;
922
- }, z.core.$strict>, z.ZodObject<{
923
- email: z.ZodOptional<z.ZodString>;
924
- fullName: z.ZodOptional<z.ZodString>;
925
- userId: z.ZodString;
926
- userName: z.ZodOptional<z.ZodString>;
927
- platform: z.ZodLiteral<"web">;
928
- }, z.core.$strict>, z.ZodObject<{
929
- platform: z.ZodLiteral<"system">;
930
- name: z.ZodString;
931
- }, z.core.$strict>], "platform">;
932
- /** Core-owned provider account linked to a user when verified. */
933
- export declare const identitySchema: z.ZodObject<{
934
- displayName: z.ZodOptional<z.ZodString>;
935
- handle: z.ZodOptional<z.ZodString>;
936
- id: z.ZodString;
937
- provider: z.ZodString;
938
- providerSubjectId: z.ZodString;
939
- providerTenantId: z.ZodOptional<z.ZodString>;
940
- }, z.core.$strict>;
941
- /** Core-owned person with every linked provider identity. */
942
- export declare const userSchema: z.ZodObject<{
943
- displayName: z.ZodOptional<z.ZodString>;
944
- email: z.ZodString;
945
- id: z.ZodString;
946
- identities: z.ZodArray<z.ZodObject<{
947
- displayName: z.ZodOptional<z.ZodString>;
948
- handle: z.ZodOptional<z.ZodString>;
949
- id: z.ZodString;
950
- provider: z.ZodString;
951
- providerSubjectId: z.ZodString;
952
- providerTenantId: z.ZodOptional<z.ZodString>;
953
- }, z.core.$strict>>;
954
- isAdmin: z.ZodOptional<z.ZodLiteral<true>>;
955
- }, z.core.$strict>;
956
- /** Compact destination-visible context explaining what produced a reply. */
957
- export declare const replyAttributionSchema: z.ZodObject<{
958
- label: z.ZodPipe<z.ZodString, z.ZodString>;
959
- detail: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
960
- }, z.core.$strict>;
961
- /** Plugin dispatch request accepted by Junior core. */
962
- export declare const dispatchOptionsSchema: z.ZodObject<{
963
- idempotencyKey: z.ZodPipe<z.ZodString, z.ZodString>;
964
- credentialSubject: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
965
- type: z.ZodLiteral<"user">;
966
- userId: z.ZodString;
967
- allowedWhen: z.ZodLiteral<"private-direct-conversation">;
968
- }, z.core.$strict>, z.ZodObject<{
969
- type: z.ZodLiteral<"user">;
970
- userId: z.ZodString;
971
- allowedWhen: z.ZodLiteral<"scheduled-automation">;
972
- taskId: z.ZodString;
973
- }, z.core.$strict>], "allowedWhen">>;
974
- destination: z.ZodObject<{
975
- platform: z.ZodLiteral<"slack">;
976
- teamId: z.ZodString;
977
- channelId: z.ZodString;
978
- threadTs: z.ZodOptional<z.ZodString>;
979
- }, z.core.$strict>;
980
- destinationVisibility: z.ZodEnum<{
981
- private: "private";
982
- public: "public";
983
- }>;
984
- input: z.ZodPipe<z.ZodString, z.ZodString>;
985
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
986
- replyAttribution: z.ZodOptional<z.ZodObject<{
987
- label: z.ZodPipe<z.ZodString, z.ZodString>;
988
- detail: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
989
- }, z.core.$strict>>;
990
- title: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
991
- }, z.core.$strict>;
992
- /** A loaded value and how long to cache it. */
993
- export interface CacheEntry<T> {
994
- /** Omit to return the value without caching it, such as for an incomplete response. */
995
- ttlMs?: number;
996
- /** Must survive JSON serialization. */
997
- value: T;
998
- }
999
- /**
1000
- * Short-lived copies of values that are slow or costly to load, such as
1001
- * provider API reads. Junior can drop an entry at any time. A lost entry only
1002
- * costs a reload, so never keep data here that Junior must not lose. Use
1003
- * `PluginState` for that.
1004
- */
1005
- export interface PluginCache {
1006
- /**
1007
- * Return the cached value for `key`, or call `load` and cache its result.
1008
- * Concurrent callers share one load. A load that throws is not cached.
1009
- * `refresh` ignores the cached value and replaces it.
1010
- */
1011
- getOrLoad<T>(key: string, load: () => Promise<CacheEntry<T>>, options?: {
1012
- refresh?: boolean;
1013
- }): Promise<T>;
1014
- }
1015
- /** Runtime platform name without source or destination coordinates. */
1016
- export type Platform = z.output<typeof platformSchema>;
1017
- export type Actor = z.output<typeof actorSchema>;
1018
- export type SlackActor = z.output<typeof slackActorSchema>;
1019
- export type LocalActor = z.output<typeof localActorSchema>;
1020
- export type WebActor = z.output<typeof webActorSchema>;
1021
- export type SystemActor = z.output<typeof systemActorSchema>;
1022
- export type Identity = z.output<typeof identitySchema>;
1023
- export type User = z.output<typeof userSchema>;
1024
- export type Source = z.output<typeof sourceSchema>;
1025
- /** Validated Location associated with a Conversation. */
1026
- export type Location = z.output<typeof locationSchema>;
1027
- /** Complete Slack Location associated with a Conversation. */
1028
- export type SlackLocation = z.output<typeof slackLocationSchema>;
1029
- export type SlackSource = Extract<Source, {
1030
- kind: "slack";
1031
- }>;
1032
- export type LocalSource = Extract<Source, {
1033
- kind: "local";
1034
- }>;
1035
- export type WebSource = Extract<Source, {
1036
- kind: "web";
1037
- }>;
1038
- export type EventSource = Extract<Source, {
1039
- kind: "event";
1040
- }>;
1041
- export type ScheduledAutomationSource = Extract<Source, {
1042
- kind: "scheduled_automation";
1043
- }>;
1044
- export type EventAutomationSource = Extract<Source, {
1045
- kind: "event_automation";
1046
- }>;
1047
- export type PluginDispatchSource = Extract<Source, {
1048
- kind: "plugin_dispatch";
1049
- }>;
1050
- export type AgentInvocationSource = Extract<Source, {
1051
- kind: "agent_invocation";
1052
- }>;
1053
- export type SourceVisibility = z.output<typeof sourceVisibilitySchema>;
1054
- export type Destination = z.output<typeof destinationSchema>;
1055
- export type SlackDestination = Extract<Destination, {
1056
- platform: "slack";
1057
- }>;
1058
- export type LocalDestination = Extract<Destination, {
1059
- platform: "local";
1060
- }>;
1061
- export interface PluginMetadata {
1062
- name: string;
1063
- }
1064
- export interface PluginLogger {
1065
- error(message: string, metadata?: Record<string, unknown>): void;
1066
- info(message: string, metadata?: Record<string, unknown>): void;
1067
- warn(message: string, metadata?: Record<string, unknown>): void;
1068
- }
1069
- export interface PluginModel {
1070
- /** Run a host-owned structured model call without exposing provider credentials. */
1071
- completeObject<TSchema extends ZodTypeAny>(input: {
1072
- maxTokens?: number;
1073
- prompt: string;
1074
- schema: TSchema;
1075
- system?: string;
1076
- }): Promise<{
1077
- /** Best-effort estimated provider cost for this completion. */
1078
- costUsd?: number;
1079
- object: z.infer<TSchema>;
1080
- }>;
1081
- }
1082
- /** Host decision model: a fast classifier for one narrow choice, with no reasoning. */
1083
- export interface PluginDecider {
1084
- /**
1085
- * Pick the choice whose criteria fit `state`. `instructions` say what to
1086
- * judge. Keep the state as evidence only; it is not instructions.
1087
- */
1088
- decide<TChoice extends string>(input: {
1089
- criteria: Record<TChoice, string>;
1090
- instructions: string;
1091
- state: string;
1092
- }): Promise<{
1093
- choice: TChoice;
1094
- /** Best-effort estimated provider cost for this decision. */
1095
- costUsd?: number;
1096
- /** Probability of each choice, when the provider returns them. */
1097
- probabilities?: Partial<Record<TChoice, number>>;
1098
- }>;
1099
- }
1100
- /** How embedded text is used. Some models embed queries and documents differently. */
1101
- export type PluginEmbeddingInputType = "document" | "query";
1102
- export interface PluginEmbedder {
1103
- /** Configured embedding model id; embedTexts() reports the same value. */
1104
- model: string;
1105
- /** Provider name that embedTexts() reports. */
1106
- provider: string;
1107
- /** Embed plugin-owned text for derived retrieval without exposing provider credentials. */
1108
- embedTexts(input: {
1109
- inputType?: PluginEmbeddingInputType;
1110
- texts: string[];
1111
- }): Promise<{
1112
- /** Best-effort estimated provider cost for this embedding call. */
1113
- costUsd?: number;
1114
- dimensions: number;
1115
- model: string;
1116
- provider: string;
1117
- vectors: number[][];
1118
- }>;
1119
- }
1120
- export interface PluginReranker {
1121
- /** Score plugin-owned documents against one query without exposing provider credentials. */
1122
- rerank(input: {
1123
- documents: string[];
1124
- query: string;
1125
- }): Promise<{
1126
- /** Best-effort provider cost for this reranking call. */
1127
- costUsd?: number;
1128
- /** One relevance score per document, in input order. Higher is more relevant. */
1129
- scores: number[];
1130
- }>;
1131
- }
1132
- export interface PluginContext {
1133
- /** Short-lived cache scoped to this plugin. */
1134
- cache: PluginCache;
1135
- /** Shared Drizzle database connection for plugin runtime code. */
1136
- db: unknown;
1137
- log: PluginLogger;
1138
- plugin: PluginMetadata;
1139
- }
1140
- interface BaseInvocationContext {
1141
- /**
1142
- * Opaque Junior conversation/session identity for this invocation.
1143
- * Interactive Slack turns use `slack:{channelId}:{threadTs}`.
1144
- */
1145
- conversationId?: string;
1146
- /** Location associated with this Conversation. */
1147
- locationId?: string | undefined;
1148
- }
1149
- export interface SlackInvocationContext extends BaseInvocationContext {
1150
- /** Runtime-owned default outbound destination for this invocation. */
1151
- destination: SlackDestination;
1152
- actor?: SlackActor | undefined;
1153
- /** Runtime-owned source where the invocation came from. */
1154
- source: SlackSource;
1155
- }
1156
- export interface LocalInvocationContext extends BaseInvocationContext {
1157
- /** Runtime-owned default outbound destination for this invocation. */
1158
- destination: LocalDestination;
1159
- actor?: LocalActor | undefined;
1160
- /** Runtime-owned source where the invocation came from. */
1161
- source: LocalSource;
1162
- }
1163
- export interface WebInvocationContext extends BaseInvocationContext {
1164
- /** Existing conversation destination used for location and tool context. */
1165
- destination: Destination;
1166
- actor?: WebActor | undefined;
1167
- /** Runtime-owned dashboard/web source for this invocation. */
1168
- source: WebSource;
1169
- }
1170
- export interface EventInvocationContext extends BaseInvocationContext {
1171
- /** Existing conversation destination used for tool context. */
1172
- destination: Destination;
1173
- actor?: Actor;
1174
- /** Runtime-owned Event Source for this invocation. */
1175
- source: EventSource;
1176
- }
1177
- export type InvocationContext = LocalInvocationContext | SlackInvocationContext | WebInvocationContext | (BaseInvocationContext & {
1178
- destination: Destination;
1179
- actor?: Actor | undefined;
1180
- source: AgentInvocationSource | EventAutomationSource | PluginDispatchSource | EventSource | ScheduledAutomationSource;
1181
- });
1182
- /** Build a normalized Slack source from runtime-owned Slack coordinates. */
1183
- export declare function createSlackSource(input: {
1184
- channelId: string;
1185
- messageTs?: string | undefined;
1186
- teamId: string;
1187
- threadTs?: string | undefined;
1188
- /** Runtime-normalized source visibility. */
1189
- visibility: SourceVisibility;
1190
- }): SlackSource;
1191
- /** Build a normalized local source from a local conversation id. */
1192
- export declare function createLocalSource(conversationId: string): LocalSource;
1193
- /** Build a normalized web/dashboard source from a conversation id. */
1194
- export declare function createWebSource(conversationId: string, visibility?: SourceVisibility): WebSource;
1195
- /** Build a normalized Event Source from one matched event. */
1196
- export declare function createEventSource(input: {
1197
- eventKey: string;
1198
- eventType: string;
1199
- identifier: string;
1200
- namespace: string;
1201
- }): EventSource;
1202
- /** Return whether a source is private to a person or restricted group. */
1203
- export declare function isPrivateSource(source: Source): boolean;
1204
- /** Return the stable source identity used for idempotency and attribution. */
1205
- export declare function getSourceKey(source: Source): string | undefined;
1206
- /** Narrow a runtime destination to the Slack-specific address shape. */
1207
- export declare function isSlackDestination(destination: Destination | undefined): destination is SlackDestination;
1208
738
  declare const pluginGrantAccessSchema: z.ZodUnion<readonly [z.ZodLiteral<"read">, z.ZodLiteral<"write">]>;
1209
739
  /** Runtime schema for provider authorization a plugin may request. */
1210
740
  export declare const pluginAuthorizationSchema: z.ZodObject<{
@@ -1426,6 +956,12 @@ export interface PluginEgressRequest {
1426
956
  /** Plugin-declared operation this request performs, used for grant classification and diagnostics. */
1427
957
  operation?: string;
1428
958
  url: string;
959
+ /**
960
+ * Set when Junior adds no credential, because the Sandbox request carries
961
+ * its own or asks for none. The returned grant is not used. Throw
962
+ * `EgressPolicyDenied` here only for rules that hold for any credential.
963
+ */
964
+ withoutCredential?: true;
1429
965
  }
1430
966
  export interface EgressHookContext extends PluginContext {
1431
967
  request: PluginEgressRequest;
@@ -1493,6 +1029,7 @@ export interface IssueCredentialHookContext extends PluginContext {
1493
1029
  export declare const resourceLinkAnnotationSchema: z.ZodObject<{
1494
1030
  kind: z.ZodLiteral<"resource_link">;
1495
1031
  objectType: z.ZodOptional<z.ZodEnum<{
1032
+ alert: "alert";
1496
1033
  automation: "automation";
1497
1034
  calendar_event: "calendar_event";
1498
1035
  chart: "chart";
@@ -1527,6 +1064,7 @@ export declare const resourceLinkAnnotationSchema: z.ZodObject<{
1527
1064
  export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1528
1065
  kind: z.ZodLiteral<"resource_link">;
1529
1066
  objectType: z.ZodOptional<z.ZodEnum<{
1067
+ alert: "alert";
1530
1068
  automation: "automation";
1531
1069
  calendar_event: "calendar_event";
1532
1070
  chart: "chart";
@@ -1561,6 +1099,7 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1561
1099
  key: z.ZodString;
1562
1100
  label: z.ZodString;
1563
1101
  objectType: z.ZodEnum<{
1102
+ alert: "alert";
1564
1103
  automation: "automation";
1565
1104
  calendar_event: "calendar_event";
1566
1105
  chart: "chart";
@@ -1718,6 +1257,14 @@ export declare const conversationAnnotationInputSchema: z.ZodDiscriminatedUnion<
1718
1257
  label: z.ZodString;
1719
1258
  points: z.ZodArray<z.ZodNumber>;
1720
1259
  }, z.core.$strict>>;
1260
+ }, z.core.$strict>, z.ZodObject<{
1261
+ type: z.ZodLiteral<"alert">;
1262
+ summary: z.ZodOptional<z.ZodString>;
1263
+ enabled: z.ZodBoolean;
1264
+ projects: z.ZodArray<z.ZodString>;
1265
+ trigger: z.ZodOptional<z.ZodString>;
1266
+ notifies: z.ZodArray<z.ZodString>;
1267
+ lastTriggeredAt: z.ZodOptional<z.ZodISODateTime>;
1721
1268
  }, z.core.$strict>, z.ZodObject<{
1722
1269
  type: z.ZodLiteral<"trace">;
1723
1270
  summary: z.ZodOptional<z.ZodString>;
@@ -1806,6 +1353,7 @@ export declare const conversationSidebarAnnotationSchema: z.ZodObject<{
1806
1353
  "triangle-alert": "triangle-alert";
1807
1354
  }>>;
1808
1355
  objectType: z.ZodOptional<z.ZodEnum<{
1356
+ alert: "alert";
1809
1357
  automation: "automation";
1810
1358
  calendar_event: "calendar_event";
1811
1359
  chart: "chart";
@@ -2053,8 +1601,23 @@ export declare const eventPersonSchema: z.ZodUnion<readonly [z.ZodObject<{
2053
1601
  email: z.ZodString;
2054
1602
  }, z.core.$strict>]>;
2055
1603
  export type EventPerson = z.output<typeof eventPersonSchema>;
1604
+ /**
1605
+ * The account that wrote the content of an Event, such as a commenter or a
1606
+ * reviewer. It is always an account of the publishing plugin's provider.
1607
+ * Core decides from it whether the author is a Trusted author. An Event with
1608
+ * no author is a system Event.
1609
+ */
1610
+ export declare const eventAuthorSchema: z.ZodObject<{
1611
+ handle: z.ZodString;
1612
+ subjectId: z.ZodOptional<z.ZodString>;
1613
+ bot: z.ZodOptional<z.ZodBoolean>;
1614
+ trusted: z.ZodOptional<z.ZodBoolean>;
1615
+ text: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1616
+ }, z.core.$strict>;
1617
+ export type EventAuthor = z.output<typeof eventAuthorSchema>;
2056
1618
  export declare const eventInputSchema: z.ZodObject<{
2057
1619
  objectType: z.ZodOptional<z.ZodEnum<{
1620
+ alert: "alert";
2058
1621
  automation: "automation";
2059
1622
  calendar_event: "calendar_event";
2060
1623
  chart: "chart";
@@ -2087,17 +1650,19 @@ export declare const eventInputSchema: z.ZodObject<{
2087
1650
  }, z.core.$strict>, z.ZodObject<{
2088
1651
  email: z.ZodString;
2089
1652
  }, z.core.$strict>]>>>;
2090
- doneBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2091
- provider: z.ZodString;
1653
+ author: z.ZodOptional<z.ZodObject<{
2092
1654
  handle: z.ZodString;
2093
- }, z.core.$strict>, z.ZodObject<{
2094
- email: z.ZodString;
2095
- }, z.core.$strict>]>>;
1655
+ subjectId: z.ZodOptional<z.ZodString>;
1656
+ bot: z.ZodOptional<z.ZodBoolean>;
1657
+ trusted: z.ZodOptional<z.ZodBoolean>;
1658
+ text: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1659
+ }, z.core.$strict>>;
2096
1660
  }, z.core.$strict>;
2097
1661
  export type EventData = z.output<typeof eventDataSchema>;
2098
1662
  export type EventInput = z.output<typeof eventInputSchema>;
2099
1663
  export declare const eventSchema: z.ZodObject<{
2100
1664
  objectType: z.ZodOptional<z.ZodEnum<{
1665
+ alert: "alert";
2101
1666
  automation: "automation";
2102
1667
  calendar_event: "calendar_event";
2103
1668
  chart: "chart";
@@ -2130,12 +1695,13 @@ export declare const eventSchema: z.ZodObject<{
2130
1695
  }, z.core.$strict>, z.ZodObject<{
2131
1696
  email: z.ZodString;
2132
1697
  }, z.core.$strict>]>>>;
2133
- doneBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2134
- provider: z.ZodString;
1698
+ author: z.ZodOptional<z.ZodObject<{
2135
1699
  handle: z.ZodString;
2136
- }, z.core.$strict>, z.ZodObject<{
2137
- email: z.ZodString;
2138
- }, z.core.$strict>]>>;
1700
+ subjectId: z.ZodOptional<z.ZodString>;
1701
+ bot: z.ZodOptional<z.ZodBoolean>;
1702
+ trusted: z.ZodOptional<z.ZodBoolean>;
1703
+ text: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1704
+ }, z.core.$strict>>;
2139
1705
  namespace: z.ZodString;
2140
1706
  }, z.core.$strict>;
2141
1707
  export type Event = z.output<typeof eventSchema>;
@@ -2170,8 +1736,22 @@ export interface PluginState {
2170
1736
  get<T = unknown>(key: string): Promise<T | undefined>;
2171
1737
  set(key: string, value: unknown, ttlMs?: number): Promise<void>;
2172
1738
  setIfNotExists(key: string, value: unknown, ttlMs?: number): Promise<boolean>;
2173
- withLock<T>(key: string, ttlMs: number, callback: () => Promise<T>): Promise<T>;
1739
+ /**
1740
+ * Run `callback` only when no other caller holds `key`, waiting up to
1741
+ * `waitMs` (default 0) for the holder. A held lock is a normal outcome, so
1742
+ * it returns `{ acquired: false }` instead of throwing.
1743
+ */
1744
+ withLock<T>(key: string, ttlMs: number, callback: () => Promise<T>, options?: {
1745
+ waitMs?: number;
1746
+ }): Promise<PluginLockResult<T>>;
2174
1747
  }
1748
+ /** Outcome of `PluginState.withLock`. */
1749
+ export type PluginLockResult<T> = {
1750
+ acquired: false;
1751
+ } | {
1752
+ acquired: true;
1753
+ value: T;
1754
+ };
2175
1755
  export interface PluginReadState {
2176
1756
  get<T = unknown>(key: string): Promise<T | undefined>;
2177
1757
  }
@@ -2459,6 +2039,7 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2459
2039
  key: z.ZodString;
2460
2040
  label: z.ZodString;
2461
2041
  objectType: z.ZodEnum<{
2042
+ alert: "alert";
2462
2043
  automation: "automation";
2463
2044
  calendar_event: "calendar_event";
2464
2045
  chart: "chart";
@@ -2616,6 +2197,14 @@ export declare const pluginToolOutputSchema: z.ZodObject<{
2616
2197
  label: z.ZodString;
2617
2198
  points: z.ZodArray<z.ZodNumber>;
2618
2199
  }, z.core.$strict>>;
2200
+ }, z.core.$strict>, z.ZodObject<{
2201
+ type: z.ZodLiteral<"alert">;
2202
+ summary: z.ZodOptional<z.ZodString>;
2203
+ enabled: z.ZodBoolean;
2204
+ projects: z.ZodArray<z.ZodString>;
2205
+ trigger: z.ZodOptional<z.ZodString>;
2206
+ notifies: z.ZodArray<z.ZodString>;
2207
+ lastTriggeredAt: z.ZodOptional<z.ZodISODateTime>;
2619
2208
  }, z.core.$strict>, z.ZodObject<{
2620
2209
  type: z.ZodLiteral<"trace">;
2621
2210
  summary: z.ZodOptional<z.ZodString>;
@@ -2819,6 +2408,12 @@ export interface PluginEventToolContext {
2819
2408
  * resource type guidance when a matching Event arrives.
2820
2409
  */
2821
2410
  guidance?: Partial<Record<string, string>>;
2411
+ /**
2412
+ * Event types, from `events`, that this Watch delivers quietly: core
2413
+ * saves each one as a Conversation note and starts no Turn. Use it for
2414
+ * outcomes that a later Turn must know but that need no action.
2415
+ */
2416
+ quietEvents?: string[];
2822
2417
  }): Promise<WatchResult>;
2823
2418
  }
2824
2419
  export interface PluginWorkspaceToolContext {
@@ -2865,6 +2460,28 @@ export interface PluginConversationToolContext {
2865
2460
  limit?: number;
2866
2461
  }): Promise<PluginConversationMatch[]>;
2867
2462
  }
2463
+ /**
2464
+ * Whose work a Turn does. A person, with their stored Identity and User when
2465
+ * Junior has them, or the system record that started the work, such as an
2466
+ * Automation run.
2467
+ */
2468
+ export type PluginWorkOwner = {
2469
+ kind: "person";
2470
+ /** The Turn Actor, when the person runs the Turn themselves. */
2471
+ actor?: Exclude<Actor, {
2472
+ platform: "system";
2473
+ }>;
2474
+ identity?: Identity;
2475
+ user?: User;
2476
+ } | {
2477
+ kind: "system";
2478
+ /** What started the work, such as `automation`. */
2479
+ name: string;
2480
+ id: string;
2481
+ runId?: string;
2482
+ /** Host-owned dashboard link to the record. */
2483
+ url?: string;
2484
+ };
2868
2485
  interface BaseToolRegistrationHookContext extends PluginContext {
2869
2486
  /**
2870
2487
  * Opaque Junior conversation/session identity for this turn.
@@ -2876,10 +2493,12 @@ interface BaseToolRegistrationHookContext extends PluginContext {
2876
2493
  annotations?: PluginAnnotations;
2877
2494
  /** Other Conversations. Set only when the turn has a `conversationId`. */
2878
2495
  conversations?: PluginConversationToolContext;
2879
- /** Host-owned dashboard link to the Automation that started this run. */
2880
- automationLink?: {
2881
- url: string;
2882
- };
2496
+ /**
2497
+ * Resolve whose work this Turn does: the person who runs it, else the
2498
+ * person who started its root Conversation, else the system record that
2499
+ * started the root. Returns nothing when nobody did.
2500
+ */
2501
+ resolveWorkOwner(): Promise<PluginWorkOwner | undefined>;
2883
2502
  /** Host-owned dashboard link to this conversation, when the dashboard is enabled. */
2884
2503
  conversationLink?: {
2885
2504
  url: string;
@@ -3305,6 +2924,7 @@ type UserPromptContext = Pick<PluginContext, "db" | "log" | "plugin"> & {
3305
2924
  };
3306
2925
  export type DestinationVisibility = z.output<typeof destinationVisibilitySchema>;
3307
2926
  export type DispatchOptions = z.output<typeof dispatchOptionsSchema>;
2927
+ export type IdentityDispatchOptions = z.output<typeof identityDispatchOptionsSchema>;
3308
2928
  /** Compact destination-visible context explaining what produced a reply. */
3309
2929
  export type ReplyAttribution = z.output<typeof replyAttributionSchema>;
3310
2930
  export type TaskOutcome = z.output<typeof taskOutcomeSchema>;
@@ -3312,6 +2932,16 @@ export interface DispatchResult {
3312
2932
  id: string;
3313
2933
  status: "created" | "already_exists";
3314
2934
  }
2935
+ /**
2936
+ * Result of an Identity dispatch. `not_linked` means core found no current
2937
+ * Slack member for that person, so it started no work.
2938
+ */
2939
+ export type IdentityDispatchResult = {
2940
+ conversationId: string;
2941
+ status: "created" | "already_exists";
2942
+ } | {
2943
+ status: "not_linked";
2944
+ };
3315
2945
  export interface Dispatch {
3316
2946
  errorMessage?: string;
3317
2947
  id: string;
@@ -3724,6 +3354,11 @@ export interface HeartbeatHookContext extends PluginContext {
3724
3354
  agent: {
3725
3355
  dispatch(options: DispatchOptions): Promise<DispatchResult>;
3726
3356
  get(id: string): Promise<Dispatch | undefined>;
3357
+ /**
3358
+ * Start a public Conversation for one person. Each call counts toward the
3359
+ * dispatch limit of this heartbeat. See the route context version.
3360
+ */
3361
+ dispatchForIdentity(options: IdentityDispatchOptions): Promise<IdentityDispatchResult>;
3727
3362
  };
3728
3363
  /** Conversation annotations, as from a plugin route. */
3729
3364
  annotations: PluginConversationAnnotations;
@@ -3848,6 +3483,18 @@ export type PluginRouteApp = {
3848
3483
  fetch(request: Request, context?: PluginApiRouteRequestContext): Promise<Response> | Response;
3849
3484
  };
3850
3485
  export interface RouteRegistrationHookContext extends PluginContext {
3486
+ agent: {
3487
+ /**
3488
+ * Start a public Conversation for one person, as if they sent `input` from
3489
+ * the dashboard. It has no Slack Destination. Core starts work only when
3490
+ * the person maps to exactly one current Slack member on the allowed
3491
+ * domains: through an Identity of this plugin's provider that the OAuth
3492
+ * account-linking flow linked, or through a verified email that is the
3493
+ * User's primary email and the member's Slack email. Otherwise it returns
3494
+ * `not_linked` and calls no model.
3495
+ */
3496
+ dispatchForIdentity(options: IdentityDispatchOptions): Promise<IdentityDispatchResult>;
3497
+ };
3851
3498
  annotations: PluginConversationAnnotations;
3852
3499
  /** Provider-neutral write boundary for Junior's native code index. */
3853
3500
  codeChanges: CodeChangePublisher;
@@ -4195,6 +3842,13 @@ export interface PluginManifest {
4195
3842
  mcp?: PluginMcpConfig;
4196
3843
  name: string;
4197
3844
  oauth?: PluginOAuthConfig;
3845
+ /**
3846
+ * Facts for action review about where this plugin's writes go, such as
3847
+ * which of them people outside the organization can read. Guardian reads
3848
+ * it in its system prompt. The agent never sees it, and it never grants
3849
+ * authority.
3850
+ */
3851
+ reviewContext?: string;
4198
3852
  runtimeDependencies?: PluginRuntimeDependency[];
4199
3853
  runtimePostinstall?: PluginRuntimePostinstallCommand[];
4200
3854
  target?: {
@@ -4202,6 +3856,12 @@ export interface PluginManifest {
4202
3856
  configKey: string;
4203
3857
  type: string;
4204
3858
  };
3859
+ /**
3860
+ * Set when the plugin's own Sandbox tools, such as git, send no credential.
3861
+ * A Sandbox request to its domains with no credential then gets one.
3862
+ * Otherwise only a request that sends the plugin's placeholder gets one.
3863
+ */
3864
+ toolsSendNoCredential?: boolean;
4205
3865
  }
4206
3866
  /** Bounded list content returned by a plugin-owned user page. */
4207
3867
  export declare const pluginUserPageContentSchema: z.ZodObject<{
@@ -4324,4 +3984,4 @@ export type PluginRegistrationInput = {
4324
3984
  export interface PluginRegistration extends PluginRegistrationInput {}
4325
3985
  /** Define one Junior plugin registration for app and build-time wiring. */
4326
3986
  export declare function defineJuniorPlugin(plugin: PluginRegistrationInput): PluginRegistration;
4327
- export type { PromptContext, PromptContextContribution, PromptMessage, SystemPromptContext, UserPromptContext, UserPromptContribution };
3987
+ export { Actor, AgentInvocationSource, CacheEntry, Destination, EventAutomationSource, EventInvocationContext, EventSource, Identity, InvocationContext, LocalActor, LocalDestination, LocalInvocationContext, LocalSource, Location, Platform, PluginCache, PluginContext, PluginDecider, PluginDispatchSource, PluginEmbedder, PluginEmbeddingInputType, PluginLogger, PluginMetadata, PluginModel, PluginReranker, type PromptContext, type PromptContextContribution, type PromptMessage, ScheduledAutomationSource, SlackActor, SlackDestination, SlackInvocationContext, SlackLocation, SlackSource, Source, SourceVisibility, SystemActor, type SystemPromptContext, User, type UserPromptContext, type UserPromptContribution, WebActor, WebInvocationContext, WebSource, actorSchema, actorUserIdSchema, agentInvocationSourceSchema, createEventSource, createLocalSource, createSlackSource, createWebSource, destinationSchema, destinationVisibilitySchema, dispatchOptionsSchema, eventAutomationSourceSchema, eventSourceSchema, getSourceKey, identityDispatchOptionsSchema, identitySchema, isPrivateSource, isSlackDestination, localActorSchema, localDestinationSchema, localSourceSchema, locationSchema, nonBlankStringSchema, platformSchema, pluginCredentialSubjectSchema, pluginDispatchSourceSchema, replyAttributionSchema, scheduledAutomationSourceSchema, slackActorSchema, slackDestinationSchema, slackLocationSchema, slackSourceSchema, sourceSchema, sourceVisibilitySchema, systemActorSchema, taskOutcomeSchema, userSchema, webActorSchema, webSourceSchema };