@sentry/junior 0.188.0 → 0.189.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.
Files changed (109) hide show
  1. package/dist/{agent-hooks-5RQEVLQD.js → agent-hooks-6QRYH6PX.js} +11 -11
  2. package/dist/api/acp/conversations.d.ts +2 -2
  3. package/dist/api/conversations/list.d.ts +7 -0
  4. package/dist/api/people/shared.d.ts +54 -0
  5. package/dist/api.js +41 -52
  6. package/dist/app.d.ts +1 -1
  7. package/dist/app.js +1003 -346
  8. package/dist/{catalog-runtime-L4A6BJ3U.js → catalog-runtime-IETJLJFG.js} +4 -4
  9. package/dist/chat/agent/resume.d.ts +0 -2
  10. package/dist/chat/agent/types.d.ts +8 -9
  11. package/dist/chat/agent-dispatch/work.d.ts +1 -10
  12. package/dist/chat/agent-invocations/spawn.d.ts +1 -1
  13. package/dist/chat/agent-invocations/types.d.ts +296 -96
  14. package/dist/chat/app/conversation-work.d.ts +16 -8
  15. package/dist/chat/conversation-privacy.d.ts +7 -7
  16. package/dist/chat/conversations/destination.d.ts +12 -0
  17. package/dist/chat/conversations/projection.d.ts +2 -2
  18. package/dist/chat/conversations/sql/location.d.ts +13 -4
  19. package/dist/chat/{api-turns → conversations}/stop.d.ts +2 -2
  20. package/dist/chat/conversations/store.d.ts +4 -4
  21. package/dist/chat/conversations/structured-events.d.ts +1 -1
  22. package/dist/chat/{api-turns/authorization.d.ts → conversations/web-authorization.d.ts} +1 -0
  23. package/dist/chat/conversations/web-input.d.ts +98 -0
  24. package/dist/chat/conversations/web-mailbox.d.ts +12 -0
  25. package/dist/chat/event-tasks/tool-support.d.ts +0 -6
  26. package/dist/chat/providers/slack/runtime.d.ts +1 -0
  27. package/dist/chat/providers/slack/system-turn.d.ts +8 -0
  28. package/dist/chat/resource-events/actor.d.ts +13 -12
  29. package/dist/chat/resource-events/notification.d.ts +1 -1
  30. package/dist/chat/services/guardian-action-policy.d.ts +1 -1
  31. package/dist/chat/services/turn-session-routing.d.ts +2 -2
  32. package/dist/chat/task-execution/assistant-message.d.ts +32 -0
  33. package/dist/chat/task-execution/conversation-turn.d.ts +8 -0
  34. package/dist/chat/{api-turns → task-execution}/mailbox-input.d.ts +1 -2
  35. package/dist/chat/task-execution/mailbox-turn.d.ts +42 -0
  36. package/dist/chat/task-execution/paused-turn.d.ts +1 -1
  37. package/dist/chat/task-execution/slack-work.d.ts +0 -2
  38. package/dist/{chunk-AW77HH54.js → chunk-4RHJ3CXR.js} +14 -295
  39. package/dist/{chunk-ZX7RSBQ6.js → chunk-5CXCGDIL.js} +1 -1
  40. package/dist/{chunk-QVH6FW3T.js → chunk-5VWAY27R.js} +7 -3
  41. package/dist/{chunk-XJIPMHKI.js → chunk-6AUR6PWR.js} +3 -3
  42. package/dist/{chunk-QDHJTKPE.js → chunk-7R5JRPCY.js} +8 -6
  43. package/dist/{chunk-6JZGXLL2.js → chunk-AC7MDOJW.js} +5 -7
  44. package/dist/{chunk-Q7O74WOO.js → chunk-BYBSI5TI.js} +2 -2
  45. package/dist/{chunk-VFZAUQ5V.js → chunk-CMWIMFM6.js} +4 -182
  46. package/dist/{chunk-IUUQWIG2.js → chunk-CUYFCI4G.js} +59 -11
  47. package/dist/chunk-DA2KGZZI.js +13 -0
  48. package/dist/{chunk-FIUCHYT6.js → chunk-DYXVAO2E.js} +1 -1
  49. package/dist/{chunk-NZLZ4KYZ.js → chunk-E3PDZPGV.js} +1 -1
  50. package/dist/{chunk-Z5SKZE5B.js → chunk-GP32KD2J.js} +4 -12
  51. package/dist/{chunk-XI4PVY2T.js → chunk-KN32OWL2.js} +5 -5
  52. package/dist/chunk-LHKZKAZ4.js +285 -0
  53. package/dist/{chunk-6YGFBU3A.js → chunk-MFSET7Q7.js} +44 -334
  54. package/dist/{chunk-QCGNHSMA.js → chunk-MI6ZBDTS.js} +6 -6
  55. package/dist/{chunk-CIG6WI7Q.js → chunk-MRXMFB4L.js} +5 -5
  56. package/dist/{chunk-CVBDVIF4.js → chunk-MVPLEPSI.js} +1 -1
  57. package/dist/{chunk-32XSSFZV.js → chunk-NY2F7BZA.js} +1 -1
  58. package/dist/chunk-O35GZCKL.js +311 -0
  59. package/dist/{chunk-HCIVBCP5.js → chunk-OEIITG5F.js} +1 -1
  60. package/dist/{chunk-UVUXFRYN.js → chunk-PCPSX4ES.js} +209 -7
  61. package/dist/{chunk-QIMN3FXL.js → chunk-PY3EIEAF.js} +1 -1
  62. package/dist/{chunk-RMB7CERI.js → chunk-QNIOBNOY.js} +282 -121
  63. package/dist/{chunk-WGZJ5SU4.js → chunk-S3SGZUOI.js} +1 -1
  64. package/dist/chunk-SR6OMO5C.js +703 -0
  65. package/dist/{chunk-CDSLOYOR.js → chunk-UCWO5MKP.js} +6 -6
  66. package/dist/{chunk-PSHMPRIU.js → chunk-VKQWU4PO.js} +2 -2
  67. package/dist/{chunk-X55FOVZO.js → chunk-WDHPN2GH.js} +3 -3
  68. package/dist/{chunk-WW2Y7JIA.js → chunk-WMUAKAIF.js} +43 -44
  69. package/dist/{chunk-MQDIIFZM.js → chunk-WN6VLHOU.js} +12 -5
  70. package/dist/{chunk-W42ENMJW.js → chunk-WWYUYKKV.js} +1 -1
  71. package/dist/{chunk-ERZMACYA.js → chunk-WYDF6PGK.js} +3 -3
  72. package/dist/{chunk-SC67CH3C.js → chunk-YNZPOFF3.js} +14 -17
  73. package/dist/{chunk-3HEZWDS5.js → chunk-YYSEH2WC.js} +2 -2
  74. package/dist/{chunk-W2DDJCPS.js → chunk-YYZNESC3.js} +8 -8
  75. package/dist/{chunk-CZRWU4ZM.js → chunk-ZUPDSJUE.js} +2 -5
  76. package/dist/{chunk-QIOUTXTZ.js → chunk-ZV6PFUA4.js} +1 -1
  77. package/dist/cli/chat.js +34 -33
  78. package/dist/cli/check.js +5 -5
  79. package/dist/cli/plugins.js +12 -12
  80. package/dist/cli/snapshot-create.js +9 -9
  81. package/dist/cli/upgrade.js +6 -6
  82. package/dist/db/schema/agent-invocations.d.ts +0 -36
  83. package/dist/db/schema/conversations.d.ts +62 -0
  84. package/dist/db/schema.d.ts +31 -36
  85. package/dist/{db-YPRZAA2T.js → db-LPJKR2EO.js} +6 -6
  86. package/dist/instrumentation.js +3 -3
  87. package/dist/nitro.js +6 -6
  88. package/dist/{oauth-callback-server-DBBIR3XG.js → oauth-callback-server-DMXF4TTQ.js} +30 -28
  89. package/dist/{runner-FKVFFPLO.js → runner-L5DPVYCN.js} +25 -21
  90. package/dist/{skills-4RBAZEMV.js → skills-NXG3LBCK.js} +5 -5
  91. package/dist/spawn-VRUIGKWW.js +42 -0
  92. package/dist/task-runner-7YTBSPXW.js +36 -0
  93. package/dist/{validation-E6Z5LHZM.js → validation-CH36LTOS.js} +5 -5
  94. package/dist/version.js +1 -1
  95. package/dist/{work-OFTXWOK4.js → work-HBC5Y5VZ.js} +22 -21
  96. package/dist/{worker-OMWNOKTJ.js → worker-5RDZHLXH.js} +10 -10
  97. package/migrations/0037_conversation_location.sql +23 -0
  98. package/migrations/meta/0037_snapshot.json +3192 -0
  99. package/migrations/meta/_journal.json +7 -0
  100. package/package.json +5 -5
  101. package/dist/chat/api-turns/assistant-message.d.ts +0 -12
  102. package/dist/chat/api-turns/cancellation.d.ts +0 -24
  103. package/dist/chat/api-turns/routing.d.ts +0 -51
  104. package/dist/chat/api-turns/work.d.ts +0 -99
  105. package/dist/chat/task-execution/slack-resource-event.d.ts +0 -55
  106. package/dist/chunk-6FGN7ZEG.js +0 -221
  107. package/dist/chunk-LODJKINF.js +0 -1502
  108. package/dist/spawn-CO7QFCNJ.js +0 -41
  109. package/dist/task-runner-DUGZGI7V.js +0 -34
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-NZLZ4KYZ.js";
4
- import "./chunk-QIOUTXTZ.js";
3
+ } from "./chunk-E3PDZPGV.js";
4
+ import "./chunk-ZV6PFUA4.js";
5
5
  import "./chunk-CEMMLV5L.js";
6
6
  import "./chunk-N7TMSOZH.js";
7
7
  import "./chunk-DWPN6SCH.js";
8
8
  import "./chunk-TXKUKMVO.js";
9
- import "./chunk-QIMN3FXL.js";
9
+ import "./chunk-PY3EIEAF.js";
10
10
  import "./chunk-PEQXYSSE.js";
11
- import "./chunk-32XSSFZV.js";
11
+ import "./chunk-NY2F7BZA.js";
12
12
  export {
13
13
  pluginCatalogRuntime
14
14
  };
@@ -14,11 +14,9 @@ import { type AuthorizationPauseError } from "@/chat/services/auth-pause";
14
14
  import { type AgentTurnUsage } from "@/chat/usage";
15
15
  import { type AgentDurability } from "@/chat/agent/types";
16
16
  import type { PluginTurnContext } from "@/chat/plugins/prompt";
17
- import type { ConversationPrivacy } from "@/chat/conversation-privacy";
18
17
  interface ResumeStateArgs {
19
18
  channelName?: string;
20
19
  destination: Destination;
21
- destinationVisibility?: ConversationPrivacy;
22
20
  dispatchId?: string;
23
21
  durability: AgentDurability;
24
22
  recordActiveMcpProviders: () => Promise<void>;
@@ -2,7 +2,6 @@
2
2
  import type { Destination, ReplyAttribution, Source, SystemActor } from "@sentry/junior-plugin-api";
3
3
  import type { Location } from "@/chat/conversations/location";
4
4
  import type { LocationConfigurationService } from "@/chat/configuration/types";
5
- import type { ConversationPrivacy } from "@/chat/conversation-privacy";
6
5
  import type { CredentialContext } from "@/chat/credentials/context";
7
6
  import type { PiMessage } from "@/chat/pi/messages";
8
7
  import type { Actor } from "@/chat/actor";
@@ -101,13 +100,12 @@ export type AgentRunState = {
101
100
  *
102
101
  * The runner must commit the preceding agent boundary before invoking this
103
102
  * port; the accepted reply transaction appends only this message.
103
+ *
104
+ * TODO(dcramer): Remove Conversation Message persistence from Delivery
105
+ * implementations after the core Turn lifecycle stores each completed
106
+ * assistant Message.
104
107
  */
105
- export type Delivery = {
106
- /** Location where this capability can send output, when outside Junior. */
107
- location?: Location;
108
- /** Send one accepted assistant message. */
109
- send(message: AssistantMessage): void | Promise<void>;
110
- };
108
+ export type Delivery = (message: AssistantMessage) => void | Promise<void>;
111
109
  /** Resume the agent turn after a transient or ambiguous delivery failure. */
112
110
  export declare class RetryableDeliveryError extends Error {
113
111
  constructor(cause: unknown);
@@ -178,9 +176,10 @@ export type AgentRun = {
178
176
  /** Credential authority projected from actor (plus optional subject). */
179
177
  credentialContext?: CredentialContext;
180
178
  source: Source;
179
+ /** Conversation Location available to this Run. */
180
+ location?: Location;
181
181
  destination: Destination;
182
182
  publishExternally?: boolean;
183
- destinationVisibility?: ConversationPrivacy;
184
183
  surface?: AgentTurnSurface;
185
184
  dispatch?: AgentDispatch;
186
185
  /**
@@ -219,7 +218,7 @@ export declare function isAgentRunFeatureDisabled(disabledFeatures: readonly Age
219
218
  /** Resolve the explicit actor, dispatch actor, or credential actor for this run. */
220
219
  export declare function actorFromRun(run: Pick<AgentRun, "actor" | "dispatch" | "credentialContext">): Actor | undefined;
221
220
  /** Reject contradictory provider coordinates before the run touches state. */
222
- export declare function assertRunConsistency(run: Pick<AgentRun, "conversationId" | "source" | "destination" | "surface" | "publishExternally" | "actor" | "dispatch">): void;
221
+ export declare function assertRunConsistency(run: Pick<AgentRun, "conversationId" | "source" | "location" | "destination" | "surface" | "actor" | "dispatch">): void;
223
222
  /** Route tool side effects to the tool channel when one overrides the destination. */
224
223
  export declare function toolInvocationDestination(run: Pick<AgentRun, "destination" | "toolChannelId">): Destination;
225
224
  /** Infer the run surface when the caller did not state one. */
@@ -12,7 +12,7 @@ import type { ConversationWorkQueue } from "@/chat/task-execution/queue";
12
12
  import type { ConversationWorkerContext, ConversationWorkerResult } from "@/chat/task-execution/worker";
13
13
  import type { DispatchRecord, DispatchTurnContext, DispatchTurnResult } from "./types";
14
14
  export declare const AGENT_DISPATCH_MAX_AGE_MS: number;
15
- type DispatchRoutingContext = Pick<DispatchTurnContext, "credentialContext" | "destinationVisibility" | "dispatch" | "surface"> & {
15
+ type DispatchRoutingContext = Pick<DispatchTurnContext, "credentialContext" | "dispatch" | "surface"> & {
16
16
  actor: DispatchRecord["actor"];
17
17
  };
18
18
  /** Restore the exact actor, credential, and dispatch routing for every slice. */
@@ -44,15 +44,6 @@ export declare function enqueueAgentDispatch(dispatch: DispatchRecord, options:
44
44
  * execution routing authority.
45
45
  */
46
46
  export declare function resolveAgentDispatchId(context: ConversationWorkerContext): Promise<string | undefined>;
47
- /**
48
- * Route leased work through dispatch execution when durable metadata owns it.
49
- *
50
- * The fallback retains ownership of every other conversation source.
51
- */
52
- export declare function createAgentDispatchWorkRouter(options: {
53
- dispatchWorker: (context: ConversationWorkerContext, dispatchId: string) => Promise<ConversationWorkerResult>;
54
- fallbackWorker: (context: ConversationWorkerContext) => Promise<ConversationWorkerResult>;
55
- }): (context: ConversationWorkerContext) => Promise<ConversationWorkerResult>;
56
47
  /** Run one dispatch start or resume under the owning conversation lease. */
57
48
  export declare function createAgentDispatchConversationWorker(options: AgentDispatchConversationWorkerOptions): (context: ConversationWorkerContext, dispatchId: string) => Promise<ConversationWorkerResult>;
58
49
  export {};
@@ -7,6 +7,6 @@ type SpawnOptions = {
7
7
  queue: ConversationWorkQueue | (() => ConversationWorkQueue);
8
8
  state?: StateAdapter;
9
9
  };
10
- /** Bind one run's runtime-owned authority to the model-safe spawn capability. */
10
+ /** Bind a Run's Actor and credentials to new Agent invocations. */
11
11
  export declare function bindSpawnAgent(run: AgentRun, options: SpawnOptions): SpawnAgent | undefined;
12
12
  export {};
@@ -85,10 +85,6 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
85
85
  platform: z.ZodLiteral<"local">;
86
86
  conversationId: z.ZodString;
87
87
  }, z.core.$strict>], "platform">;
88
- destinationVisibility: z.ZodOptional<z.ZodEnum<{
89
- private: "private";
90
- public: "public";
91
- }>>;
92
88
  input: z.ZodString;
93
89
  invocationId: z.ZodString;
94
90
  mailboxStatus: z.ZodEnum<{
@@ -103,46 +99,100 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
103
99
  xhigh: "xhigh";
104
100
  none: "none";
105
101
  }>>;
106
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
102
+ source: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
107
103
  platform: z.ZodLiteral<"slack">;
108
104
  teamId: z.ZodString;
109
105
  channelId: z.ZodString;
110
- location: z.ZodOptional<z.ZodObject<{
111
- id: z.ZodString;
112
- provider: z.ZodString;
113
- tenantId: z.ZodOptional<z.ZodString>;
114
- providerId: z.ZodString;
115
- }, z.core.$strict>>;
116
106
  visibility: z.ZodEnum<{
117
107
  private: "private";
118
108
  public: "public";
119
109
  }>;
120
110
  messageTs: z.ZodOptional<z.ZodString>;
121
111
  threadTs: z.ZodOptional<z.ZodString>;
122
- }, z.core.$strict>, z.ZodObject<{
123
- location: z.ZodOptional<z.ZodObject<{
112
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
124
113
  id: z.ZodString;
125
- provider: z.ZodString;
126
- tenantId: z.ZodOptional<z.ZodString>;
127
- providerId: z.ZodString;
128
- }, z.core.$strict>>;
114
+ provider: z.ZodLiteral<"slack">;
115
+ teamId: z.ZodString;
116
+ channelId: z.ZodString;
117
+ threadTs: z.ZodOptional<z.ZodString>;
118
+ }, z.core.$strict>], "provider">>;
119
+ }, z.core.$strict>, z.ZodObject<{
129
120
  platform: z.ZodLiteral<"local">;
130
121
  visibility: z.ZodLiteral<"private">;
131
122
  conversationId: z.ZodString;
132
- }, z.core.$strict>, z.ZodObject<{
133
- location: z.ZodOptional<z.ZodObject<{
123
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
134
124
  id: z.ZodString;
135
- provider: z.ZodString;
136
- tenantId: z.ZodOptional<z.ZodString>;
137
- providerId: z.ZodString;
138
- }, z.core.$strict>>;
125
+ provider: z.ZodLiteral<"slack">;
126
+ teamId: z.ZodString;
127
+ channelId: z.ZodString;
128
+ threadTs: z.ZodOptional<z.ZodString>;
129
+ }, z.core.$strict>], "provider">>;
130
+ }, z.core.$strict>, z.ZodObject<{
139
131
  platform: z.ZodLiteral<"web">;
140
132
  visibility: z.ZodEnum<{
141
133
  private: "private";
142
134
  public: "public";
143
135
  }>;
144
136
  conversationId: z.ZodString;
145
- }, z.core.$strict>], "platform">;
137
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
138
+ id: z.ZodString;
139
+ provider: z.ZodLiteral<"slack">;
140
+ teamId: z.ZodString;
141
+ channelId: z.ZodString;
142
+ threadTs: z.ZodOptional<z.ZodString>;
143
+ }, z.core.$strict>], "provider">>;
144
+ }, z.core.$strict>], "platform">, z.ZodTransform<{
145
+ platform: "slack";
146
+ teamId: string;
147
+ channelId: string;
148
+ visibility: "private" | "public";
149
+ messageTs?: string | undefined;
150
+ threadTs?: string | undefined;
151
+ } | {
152
+ platform: "local";
153
+ visibility: "private";
154
+ conversationId: string;
155
+ } | {
156
+ platform: "web";
157
+ visibility: "private" | "public";
158
+ conversationId: string;
159
+ }, {
160
+ platform: "slack";
161
+ teamId: string;
162
+ channelId: string;
163
+ visibility: "private" | "public";
164
+ messageTs?: string | undefined;
165
+ threadTs?: string | undefined;
166
+ location?: {
167
+ id: string;
168
+ provider: "slack";
169
+ teamId: string;
170
+ channelId: string;
171
+ threadTs?: string | undefined;
172
+ } | undefined;
173
+ } | {
174
+ platform: "local";
175
+ visibility: "private";
176
+ conversationId: string;
177
+ location?: {
178
+ id: string;
179
+ provider: "slack";
180
+ teamId: string;
181
+ channelId: string;
182
+ threadTs?: string | undefined;
183
+ } | undefined;
184
+ } | {
185
+ platform: "web";
186
+ visibility: "private" | "public";
187
+ conversationId: string;
188
+ location?: {
189
+ id: string;
190
+ provider: "slack";
191
+ teamId: string;
192
+ channelId: string;
193
+ threadTs?: string | undefined;
194
+ } | undefined;
195
+ }>>;
146
196
  updatedAtMs: z.ZodNumber;
147
197
  status: z.ZodEnum<{
148
198
  pending: "pending";
@@ -228,10 +278,6 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
228
278
  platform: z.ZodLiteral<"local">;
229
279
  conversationId: z.ZodString;
230
280
  }, z.core.$strict>], "platform">;
231
- destinationVisibility: z.ZodOptional<z.ZodEnum<{
232
- private: "private";
233
- public: "public";
234
- }>>;
235
281
  input: z.ZodString;
236
282
  invocationId: z.ZodString;
237
283
  mailboxStatus: z.ZodEnum<{
@@ -246,46 +292,100 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
246
292
  xhigh: "xhigh";
247
293
  none: "none";
248
294
  }>>;
249
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
295
+ source: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
250
296
  platform: z.ZodLiteral<"slack">;
251
297
  teamId: z.ZodString;
252
298
  channelId: z.ZodString;
253
- location: z.ZodOptional<z.ZodObject<{
254
- id: z.ZodString;
255
- provider: z.ZodString;
256
- tenantId: z.ZodOptional<z.ZodString>;
257
- providerId: z.ZodString;
258
- }, z.core.$strict>>;
259
299
  visibility: z.ZodEnum<{
260
300
  private: "private";
261
301
  public: "public";
262
302
  }>;
263
303
  messageTs: z.ZodOptional<z.ZodString>;
264
304
  threadTs: z.ZodOptional<z.ZodString>;
265
- }, z.core.$strict>, z.ZodObject<{
266
- location: z.ZodOptional<z.ZodObject<{
305
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
267
306
  id: z.ZodString;
268
- provider: z.ZodString;
269
- tenantId: z.ZodOptional<z.ZodString>;
270
- providerId: z.ZodString;
271
- }, z.core.$strict>>;
307
+ provider: z.ZodLiteral<"slack">;
308
+ teamId: z.ZodString;
309
+ channelId: z.ZodString;
310
+ threadTs: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strict>], "provider">>;
312
+ }, z.core.$strict>, z.ZodObject<{
272
313
  platform: z.ZodLiteral<"local">;
273
314
  visibility: z.ZodLiteral<"private">;
274
315
  conversationId: z.ZodString;
275
- }, z.core.$strict>, z.ZodObject<{
276
- location: z.ZodOptional<z.ZodObject<{
316
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
277
317
  id: z.ZodString;
278
- provider: z.ZodString;
279
- tenantId: z.ZodOptional<z.ZodString>;
280
- providerId: z.ZodString;
281
- }, z.core.$strict>>;
318
+ provider: z.ZodLiteral<"slack">;
319
+ teamId: z.ZodString;
320
+ channelId: z.ZodString;
321
+ threadTs: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strict>], "provider">>;
323
+ }, z.core.$strict>, z.ZodObject<{
282
324
  platform: z.ZodLiteral<"web">;
283
325
  visibility: z.ZodEnum<{
284
326
  private: "private";
285
327
  public: "public";
286
328
  }>;
287
329
  conversationId: z.ZodString;
288
- }, z.core.$strict>], "platform">;
330
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
331
+ id: z.ZodString;
332
+ provider: z.ZodLiteral<"slack">;
333
+ teamId: z.ZodString;
334
+ channelId: z.ZodString;
335
+ threadTs: z.ZodOptional<z.ZodString>;
336
+ }, z.core.$strict>], "provider">>;
337
+ }, z.core.$strict>], "platform">, z.ZodTransform<{
338
+ platform: "slack";
339
+ teamId: string;
340
+ channelId: string;
341
+ visibility: "private" | "public";
342
+ messageTs?: string | undefined;
343
+ threadTs?: string | undefined;
344
+ } | {
345
+ platform: "local";
346
+ visibility: "private";
347
+ conversationId: string;
348
+ } | {
349
+ platform: "web";
350
+ visibility: "private" | "public";
351
+ conversationId: string;
352
+ }, {
353
+ platform: "slack";
354
+ teamId: string;
355
+ channelId: string;
356
+ visibility: "private" | "public";
357
+ messageTs?: string | undefined;
358
+ threadTs?: string | undefined;
359
+ location?: {
360
+ id: string;
361
+ provider: "slack";
362
+ teamId: string;
363
+ channelId: string;
364
+ threadTs?: string | undefined;
365
+ } | undefined;
366
+ } | {
367
+ platform: "local";
368
+ visibility: "private";
369
+ conversationId: string;
370
+ location?: {
371
+ id: string;
372
+ provider: "slack";
373
+ teamId: string;
374
+ channelId: string;
375
+ threadTs?: string | undefined;
376
+ } | undefined;
377
+ } | {
378
+ platform: "web";
379
+ visibility: "private" | "public";
380
+ conversationId: string;
381
+ location?: {
382
+ id: string;
383
+ provider: "slack";
384
+ teamId: string;
385
+ channelId: string;
386
+ threadTs?: string | undefined;
387
+ } | undefined;
388
+ }>>;
289
389
  updatedAtMs: z.ZodNumber;
290
390
  result: z.ZodString;
291
391
  status: z.ZodLiteral<"completed">;
@@ -369,10 +469,6 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
369
469
  platform: z.ZodLiteral<"local">;
370
470
  conversationId: z.ZodString;
371
471
  }, z.core.$strict>], "platform">;
372
- destinationVisibility: z.ZodOptional<z.ZodEnum<{
373
- private: "private";
374
- public: "public";
375
- }>>;
376
472
  input: z.ZodString;
377
473
  invocationId: z.ZodString;
378
474
  mailboxStatus: z.ZodEnum<{
@@ -387,46 +483,100 @@ export declare const agentInvocationSchema: z.ZodDiscriminatedUnion<[z.ZodObject
387
483
  xhigh: "xhigh";
388
484
  none: "none";
389
485
  }>>;
390
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
486
+ source: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
391
487
  platform: z.ZodLiteral<"slack">;
392
488
  teamId: z.ZodString;
393
489
  channelId: z.ZodString;
394
- location: z.ZodOptional<z.ZodObject<{
395
- id: z.ZodString;
396
- provider: z.ZodString;
397
- tenantId: z.ZodOptional<z.ZodString>;
398
- providerId: z.ZodString;
399
- }, z.core.$strict>>;
400
490
  visibility: z.ZodEnum<{
401
491
  private: "private";
402
492
  public: "public";
403
493
  }>;
404
494
  messageTs: z.ZodOptional<z.ZodString>;
405
495
  threadTs: z.ZodOptional<z.ZodString>;
406
- }, z.core.$strict>, z.ZodObject<{
407
- location: z.ZodOptional<z.ZodObject<{
496
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
408
497
  id: z.ZodString;
409
- provider: z.ZodString;
410
- tenantId: z.ZodOptional<z.ZodString>;
411
- providerId: z.ZodString;
412
- }, z.core.$strict>>;
498
+ provider: z.ZodLiteral<"slack">;
499
+ teamId: z.ZodString;
500
+ channelId: z.ZodString;
501
+ threadTs: z.ZodOptional<z.ZodString>;
502
+ }, z.core.$strict>], "provider">>;
503
+ }, z.core.$strict>, z.ZodObject<{
413
504
  platform: z.ZodLiteral<"local">;
414
505
  visibility: z.ZodLiteral<"private">;
415
506
  conversationId: z.ZodString;
416
- }, z.core.$strict>, z.ZodObject<{
417
- location: z.ZodOptional<z.ZodObject<{
507
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
418
508
  id: z.ZodString;
419
- provider: z.ZodString;
420
- tenantId: z.ZodOptional<z.ZodString>;
421
- providerId: z.ZodString;
422
- }, z.core.$strict>>;
509
+ provider: z.ZodLiteral<"slack">;
510
+ teamId: z.ZodString;
511
+ channelId: z.ZodString;
512
+ threadTs: z.ZodOptional<z.ZodString>;
513
+ }, z.core.$strict>], "provider">>;
514
+ }, z.core.$strict>, z.ZodObject<{
423
515
  platform: z.ZodLiteral<"web">;
424
516
  visibility: z.ZodEnum<{
425
517
  private: "private";
426
518
  public: "public";
427
519
  }>;
428
520
  conversationId: z.ZodString;
429
- }, z.core.$strict>], "platform">;
521
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
522
+ id: z.ZodString;
523
+ provider: z.ZodLiteral<"slack">;
524
+ teamId: z.ZodString;
525
+ channelId: z.ZodString;
526
+ threadTs: z.ZodOptional<z.ZodString>;
527
+ }, z.core.$strict>], "provider">>;
528
+ }, z.core.$strict>], "platform">, z.ZodTransform<{
529
+ platform: "slack";
530
+ teamId: string;
531
+ channelId: string;
532
+ visibility: "private" | "public";
533
+ messageTs?: string | undefined;
534
+ threadTs?: string | undefined;
535
+ } | {
536
+ platform: "local";
537
+ visibility: "private";
538
+ conversationId: string;
539
+ } | {
540
+ platform: "web";
541
+ visibility: "private" | "public";
542
+ conversationId: string;
543
+ }, {
544
+ platform: "slack";
545
+ teamId: string;
546
+ channelId: string;
547
+ visibility: "private" | "public";
548
+ messageTs?: string | undefined;
549
+ threadTs?: string | undefined;
550
+ location?: {
551
+ id: string;
552
+ provider: "slack";
553
+ teamId: string;
554
+ channelId: string;
555
+ threadTs?: string | undefined;
556
+ } | undefined;
557
+ } | {
558
+ platform: "local";
559
+ visibility: "private";
560
+ conversationId: string;
561
+ location?: {
562
+ id: string;
563
+ provider: "slack";
564
+ teamId: string;
565
+ channelId: string;
566
+ threadTs?: string | undefined;
567
+ } | undefined;
568
+ } | {
569
+ platform: "web";
570
+ visibility: "private" | "public";
571
+ conversationId: string;
572
+ location?: {
573
+ id: string;
574
+ provider: "slack";
575
+ teamId: string;
576
+ channelId: string;
577
+ threadTs?: string | undefined;
578
+ } | undefined;
579
+ }>>;
430
580
  updatedAtMs: z.ZodNumber;
431
581
  errorMessage: z.ZodString;
432
582
  status: z.ZodEnum<{
@@ -512,10 +662,6 @@ export declare const createAgentInvocationSchema: z.ZodObject<{
512
662
  platform: z.ZodLiteral<"local">;
513
663
  conversationId: z.ZodString;
514
664
  }, z.core.$strict>], "platform">;
515
- destinationVisibility: z.ZodOptional<z.ZodEnum<{
516
- private: "private";
517
- public: "public";
518
- }>>;
519
665
  idempotencyKey: z.ZodString;
520
666
  input: z.ZodString;
521
667
  parentConversationId: z.ZodString;
@@ -526,46 +672,100 @@ export declare const createAgentInvocationSchema: z.ZodObject<{
526
672
  xhigh: "xhigh";
527
673
  none: "none";
528
674
  }>>;
529
- source: z.ZodDiscriminatedUnion<[z.ZodObject<{
675
+ source: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
530
676
  platform: z.ZodLiteral<"slack">;
531
677
  teamId: z.ZodString;
532
678
  channelId: z.ZodString;
533
- location: z.ZodOptional<z.ZodObject<{
534
- id: z.ZodString;
535
- provider: z.ZodString;
536
- tenantId: z.ZodOptional<z.ZodString>;
537
- providerId: z.ZodString;
538
- }, z.core.$strict>>;
539
679
  visibility: z.ZodEnum<{
540
680
  private: "private";
541
681
  public: "public";
542
682
  }>;
543
683
  messageTs: z.ZodOptional<z.ZodString>;
544
684
  threadTs: z.ZodOptional<z.ZodString>;
545
- }, z.core.$strict>, z.ZodObject<{
546
- location: z.ZodOptional<z.ZodObject<{
685
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
547
686
  id: z.ZodString;
548
- provider: z.ZodString;
549
- tenantId: z.ZodOptional<z.ZodString>;
550
- providerId: z.ZodString;
551
- }, z.core.$strict>>;
687
+ provider: z.ZodLiteral<"slack">;
688
+ teamId: z.ZodString;
689
+ channelId: z.ZodString;
690
+ threadTs: z.ZodOptional<z.ZodString>;
691
+ }, z.core.$strict>], "provider">>;
692
+ }, z.core.$strict>, z.ZodObject<{
552
693
  platform: z.ZodLiteral<"local">;
553
694
  visibility: z.ZodLiteral<"private">;
554
695
  conversationId: z.ZodString;
555
- }, z.core.$strict>, z.ZodObject<{
556
- location: z.ZodOptional<z.ZodObject<{
696
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
557
697
  id: z.ZodString;
558
- provider: z.ZodString;
559
- tenantId: z.ZodOptional<z.ZodString>;
560
- providerId: z.ZodString;
561
- }, z.core.$strict>>;
698
+ provider: z.ZodLiteral<"slack">;
699
+ teamId: z.ZodString;
700
+ channelId: z.ZodString;
701
+ threadTs: z.ZodOptional<z.ZodString>;
702
+ }, z.core.$strict>], "provider">>;
703
+ }, z.core.$strict>, z.ZodObject<{
562
704
  platform: z.ZodLiteral<"web">;
563
705
  visibility: z.ZodEnum<{
564
706
  private: "private";
565
707
  public: "public";
566
708
  }>;
567
709
  conversationId: z.ZodString;
568
- }, z.core.$strict>], "platform">;
710
+ location: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
711
+ id: z.ZodString;
712
+ provider: z.ZodLiteral<"slack">;
713
+ teamId: z.ZodString;
714
+ channelId: z.ZodString;
715
+ threadTs: z.ZodOptional<z.ZodString>;
716
+ }, z.core.$strict>], "provider">>;
717
+ }, z.core.$strict>], "platform">, z.ZodTransform<{
718
+ platform: "slack";
719
+ teamId: string;
720
+ channelId: string;
721
+ visibility: "private" | "public";
722
+ messageTs?: string | undefined;
723
+ threadTs?: string | undefined;
724
+ } | {
725
+ platform: "local";
726
+ visibility: "private";
727
+ conversationId: string;
728
+ } | {
729
+ platform: "web";
730
+ visibility: "private" | "public";
731
+ conversationId: string;
732
+ }, {
733
+ platform: "slack";
734
+ teamId: string;
735
+ channelId: string;
736
+ visibility: "private" | "public";
737
+ messageTs?: string | undefined;
738
+ threadTs?: string | undefined;
739
+ location?: {
740
+ id: string;
741
+ provider: "slack";
742
+ teamId: string;
743
+ channelId: string;
744
+ threadTs?: string | undefined;
745
+ } | undefined;
746
+ } | {
747
+ platform: "local";
748
+ visibility: "private";
749
+ conversationId: string;
750
+ location?: {
751
+ id: string;
752
+ provider: "slack";
753
+ teamId: string;
754
+ channelId: string;
755
+ threadTs?: string | undefined;
756
+ } | undefined;
757
+ } | {
758
+ platform: "web";
759
+ visibility: "private" | "public";
760
+ conversationId: string;
761
+ location?: {
762
+ id: string;
763
+ provider: "slack";
764
+ teamId: string;
765
+ channelId: string;
766
+ threadTs?: string | undefined;
767
+ } | undefined;
768
+ }>>;
569
769
  }, z.core.$strict>;
570
770
  export type AgentBinding = z.output<typeof agentBindingSchema>;
571
771
  export type AgentInvocation = z.output<typeof agentInvocationSchema>;