@sentry/junior 0.147.0 → 0.148.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 (155) hide show
  1. package/dist/{agent-hooks-HS6VGUPM.js → agent-hooks-VAUYT6PD.js} +10 -10
  2. package/dist/api/conversations/access.d.ts +2 -1
  3. package/dist/api/conversations/archive.d.ts +3 -5
  4. package/dist/api/conversations/create.d.ts +6 -0
  5. package/dist/api/conversations/detail.d.ts +2 -296
  6. package/dist/api/conversations/event-list.d.ts +2 -193
  7. package/dist/api/conversations/list.d.ts +4 -66
  8. package/dist/api/conversations/routes.d.ts +1 -1
  9. package/dist/api/conversations/stats.d.ts +0 -54
  10. package/dist/api/http.d.ts +2 -6
  11. package/dist/api/locations/detail.d.ts +3 -111
  12. package/dist/api/locations/list.d.ts +0 -45
  13. package/dist/api/locations/query.d.ts +2 -1
  14. package/dist/api/locations/routes.d.ts +1 -1
  15. package/dist/api/people/list.d.ts +0 -29
  16. package/dist/api/people/profile.d.ts +2 -106
  17. package/dist/api/people/profile.query.d.ts +2 -1
  18. package/dist/api/people/routes.d.ts +1 -1
  19. package/dist/api/people/shared.d.ts +1 -1
  20. package/dist/api/people/spend.d.ts +3 -4
  21. package/dist/api/personal-tokens/routes.d.ts +2 -2
  22. package/dist/api/route.d.ts +8 -14
  23. package/dist/api/schema/conversation.d.ts +60 -29
  24. package/dist/api/schema/location.d.ts +4 -0
  25. package/dist/api/schema/person.d.ts +7 -3
  26. package/dist/api/schema.d.ts +2 -2
  27. package/dist/api/schema.js +7 -1
  28. package/dist/api/stats.d.ts +0 -13
  29. package/dist/api/validation.d.ts +7 -0
  30. package/dist/api/viewer.d.ts +3 -0
  31. package/dist/api.d.ts +2 -1
  32. package/dist/api.js +624 -562
  33. package/dist/app.js +183 -105
  34. package/dist/{catalog-runtime-M6ZTPYRV.js → catalog-runtime-WADOZVTB.js} +5 -5
  35. package/dist/chat/actor.d.ts +4 -1
  36. package/dist/chat/agent/request.d.ts +2 -0
  37. package/dist/chat/agent/resume.d.ts +1 -0
  38. package/dist/chat/agent-dispatch/context.d.ts +2 -2
  39. package/dist/chat/agent-invocations/types.d.ts +52 -0
  40. package/dist/chat/api-turns/work.d.ts +103 -0
  41. package/dist/chat/conversations/history.d.ts +60 -0
  42. package/dist/chat/conversations/provenance.d.ts +6 -0
  43. package/dist/chat/conversations/sql/actor-identity.d.ts +19 -0
  44. package/dist/chat/conversations/store.d.ts +1 -1
  45. package/dist/chat/resource-events/store.d.ts +1 -1
  46. package/dist/chat/runtime/reply-executor.d.ts +1 -1
  47. package/dist/chat/runtime/slack-runtime.d.ts +2 -1
  48. package/dist/chat/runtime/turn-preparation.d.ts +9 -0
  49. package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
  50. package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
  51. package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
  52. package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
  53. package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
  54. package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
  55. package/dist/chat/slack/channel.d.ts +26 -0
  56. package/dist/chat/slack/dispatch-turn.d.ts +1 -0
  57. package/dist/chat/slack/timestamp-param.d.ts +0 -2
  58. package/dist/chat/slack/{tools → tool-support}/canvas/api.d.ts +1 -1
  59. package/dist/chat/slack/{tools → tool-support}/canvas/context.d.ts +3 -0
  60. package/dist/chat/slack/tool-support/channel-access.d.ts +42 -0
  61. package/dist/chat/slack/tool-support/channel-target.d.ts +27 -0
  62. package/dist/chat/slack/tool-support/list/params.d.ts +5 -0
  63. package/dist/chat/slack/tools/canvas/create.d.ts +1 -1
  64. package/dist/chat/slack/tools/channel-join.d.ts +28 -0
  65. package/dist/chat/slack/tools/channel-list-messages.d.ts +3 -2
  66. package/dist/chat/slack/tools/conversation-message-search.d.ts +2 -8
  67. package/dist/chat/slack/tools/message-add-reaction.d.ts +1 -1
  68. package/dist/chat/slack/tools/public-search.d.ts +63 -2
  69. package/dist/chat/slack/tools/send-files.d.ts +1 -1
  70. package/dist/chat/slack/tools/thread-read.d.ts +2 -5
  71. package/dist/chat/source.d.ts +2 -0
  72. package/dist/chat/task-execution/checkpoint.d.ts +1 -0
  73. package/dist/chat/task-execution/state.d.ts +9 -4
  74. package/dist/chat/task-execution/store.d.ts +3 -2
  75. package/dist/chat/task-execution/turn-cursor.d.ts +2 -0
  76. package/dist/chat/task-execution/worker.d.ts +2 -0
  77. package/dist/chat/tasks/read.d.ts +1 -1
  78. package/dist/chat/tools/search-conversation-events.d.ts +1 -1
  79. package/dist/chat/tools/types.d.ts +11 -4
  80. package/dist/chat/tools/watch-resource-events.d.ts +2 -2
  81. package/dist/{chunk-ORO3PWKQ.js → chunk-2B3PT3V2.js} +1 -1
  82. package/dist/{chunk-SVHUEHUL.js → chunk-45LOR4PU.js} +21 -4
  83. package/dist/{chunk-YBVXBNSV.js → chunk-4AQZYNHM.js} +2 -2
  84. package/dist/{chunk-Z4YU7Z4L.js → chunk-4EA2SFK2.js} +65 -4
  85. package/dist/{chunk-7NVJVJID.js → chunk-4GXJUYJV.js} +2 -2
  86. package/dist/{chunk-IIOOO4FQ.js → chunk-55F4QU2V.js} +2 -1
  87. package/dist/{chunk-745QJ3ZA.js → chunk-7OEIXFC3.js} +2 -2
  88. package/dist/{chunk-DU74WPIC.js → chunk-D3WPMGEX.js} +1 -1
  89. package/dist/{chunk-PVNG6UMU.js → chunk-D6YX4NNN.js} +22 -10
  90. package/dist/chunk-DUY5CDAM.js +36 -0
  91. package/dist/{chunk-4LJO56OJ.js → chunk-EAI67NTM.js} +1 -1
  92. package/dist/{chunk-X5UY34KT.js → chunk-EINWQFXI.js} +8 -8
  93. package/dist/chunk-GDFF3BQG.js +136 -0
  94. package/dist/{chunk-EFLJ2WJH.js → chunk-GXYDVZKM.js} +5 -5
  95. package/dist/{chunk-CWP5RHVX.js → chunk-HLPLT3NY.js} +8 -5
  96. package/dist/{chunk-JUUKWRBE.js → chunk-HWQGBIH7.js} +1 -1
  97. package/dist/{chunk-AZ7EAOBE.js → chunk-IL4EDBMV.js} +5 -5
  98. package/dist/{chunk-DLDRQHG5.js → chunk-LAZGHEYU.js} +1 -1
  99. package/dist/{chunk-RXBVB2JM.js → chunk-LE5H7LMT.js} +1 -1
  100. package/dist/chunk-LNVEIJ2L.js +48 -0
  101. package/dist/{chunk-YEO3VX72.js → chunk-OJCP3C3J.js} +8 -6
  102. package/dist/{chunk-GGB4WL5A.js → chunk-POSZWRGL.js} +1 -1
  103. package/dist/{chunk-YNTTROJT.js → chunk-QOWHHM3F.js} +1 -1
  104. package/dist/{chunk-6H5SZR24.js → chunk-RRJV5UR5.js} +302 -59
  105. package/dist/{chunk-AYU72WO7.js → chunk-ULAU5ZGU.js} +41 -64
  106. package/dist/{chunk-SGZO7UWH.js → chunk-V2FXMOEA.js} +2 -2
  107. package/dist/{chunk-AIOK6LAG.js → chunk-VCYSOXON.js} +272 -41
  108. package/dist/{chunk-7A4M7PCV.js → chunk-VMNRXKAH.js} +1166 -540
  109. package/dist/{chunk-YSB2N563.js → chunk-VRHTNBA6.js} +121 -87
  110. package/dist/{chunk-AVZDSUFB.js → chunk-VY6W3T43.js} +4 -4
  111. package/dist/{chunk-7UQIVT6G.js → chunk-WCN4YSH7.js} +6 -6
  112. package/dist/{chunk-CSZINQJ2.js → chunk-WOONT5ZP.js} +1 -1
  113. package/dist/{chunk-Q4R73I43.js → chunk-XJ42NBP5.js} +58 -28
  114. package/dist/{chunk-YHDERDRO.js → chunk-ZCHIC2GM.js} +91 -75
  115. package/dist/chunk-ZPL2RR7F.js +798 -0
  116. package/dist/cli/chat.js +33 -35
  117. package/dist/cli/check.js +6 -6
  118. package/dist/cli/plugins.js +13 -13
  119. package/dist/cli/snapshot-create.js +9 -9
  120. package/dist/cli/upgrade.js +7 -7
  121. package/dist/db/schema/agent-invocations.d.ts +20 -0
  122. package/dist/db/schema/conversation-annotations.d.ts +2 -2
  123. package/dist/db/schema.d.ts +22 -2
  124. package/dist/{db-CSEW4RII.js → db-XUKZRFFK.js} +7 -7
  125. package/dist/instrumentation.js +4 -4
  126. package/dist/nitro.js +2 -2
  127. package/dist/{oauth-callback-server-FUEV5HNG.js → oauth-callback-server-LPZMMGFI.js} +25 -26
  128. package/dist/{runner-U3XHSKSH.js → runner-DGKUTMPX.js} +17 -18
  129. package/dist/{skills-AKE6W3WI.js → skills-P7YUFSXM.js} +6 -6
  130. package/dist/spawn-DSK3ZEVD.js +38 -0
  131. package/dist/{validation-WDTAULUF.js → validation-S7U5M5NR.js} +6 -6
  132. package/dist/version.js +1 -1
  133. package/dist/{work-C3HAO2BG.js → work-GAA7TVAD.js} +18 -19
  134. package/dist/{worker-LNP4YKBM.js → worker-JXPJH3QB.js} +11 -10
  135. package/package.json +5 -4
  136. package/dist/api/health.d.ts +0 -7
  137. package/dist/api/personal-tokens/create.d.ts +0 -11
  138. package/dist/api/personal-tokens/list.d.ts +0 -12
  139. package/dist/api/personal-tokens/revoke.d.ts +0 -5
  140. package/dist/api/plugin-reports.d.ts +0 -63
  141. package/dist/api/plugins.d.ts +0 -8
  142. package/dist/api/runtime.d.ts +0 -24
  143. package/dist/api/skills.d.ts +0 -6
  144. package/dist/chat/slack/tools/channel-access.d.ts +0 -30
  145. package/dist/chunk-34GS7B6L.js +0 -115
  146. package/dist/chunk-AVOCH2Z5.js +0 -285
  147. package/dist/chunk-HLXXQI5Q.js +0 -238
  148. package/dist/chunk-K4SZAP3K.js +0 -67
  149. package/dist/chunk-R776HKPK.js +0 -81
  150. package/dist/spawn-B6GDTWJ4.js +0 -39
  151. /package/dist/chat/slack/{tools → tool-support}/canvas/markdown.d.ts +0 -0
  152. /package/dist/chat/slack/{tools → tool-support}/channel-capabilities.d.ts +0 -0
  153. /package/dist/chat/slack/{tools → tool-support}/context.d.ts +0 -0
  154. /package/dist/chat/slack/{tools → tool-support}/list/api.d.ts +0 -0
  155. /package/dist/chat/slack/{tools → tool-support}/slack-message-url.d.ts +0 -0
@@ -8,6 +8,7 @@ interface DispatchReplyToThread {
8
8
  conversationId?: string;
9
9
  destination: DispatchRecord["destination"];
10
10
  execution: DispatchTurnContext;
11
+ publishExternally?: boolean;
11
12
  onTurnDeliveryAccepted?: (messageId?: string) => void;
12
13
  onTurnOutcome?: (result: DispatchTurnResult) => void;
13
14
  shouldYield?: () => boolean;
@@ -16,8 +16,6 @@ type RequiredSlackTimestampParamResult = {
16
16
  };
17
17
  /** Define a model-facing Slack timestamp, normalizing numeric model args to strings. */
18
18
  export declare function slackTimestampParam(description: string): z.ZodPreprocess<z.ZodString>;
19
- /** Define an optional model-facing Slack timestamp string parameter. */
20
- export declare function optionalSlackTimestampParam(description: string): z.ZodOptional<z.ZodPreprocess<z.ZodString>>;
21
19
  /** Parse tool input into a branded Slack timestamp before provider calls. */
22
20
  export declare function parseSlackTimestampParam(field: string, value: string | number | undefined): SlackTimestampParamResult;
23
21
  /** Parse a required tool input timestamp into a branded Slack timestamp. */
@@ -1,4 +1,4 @@
1
- import { type CanvasMarkdownNormalization } from "@/chat/slack/tools/canvas/markdown";
1
+ import { type CanvasMarkdownNormalization } from "@/chat/slack/tool-support/canvas/markdown";
2
2
  export { extractCanvasId } from "@/chat/slack/canvas-references";
3
3
  export interface CanvasCreateInput {
4
4
  title: string;
@@ -1,3 +1,6 @@
1
+ import { z } from "zod";
2
+ /** Model-facing Slack canvas ID or docs URL parameter. */
3
+ export declare const slackCanvasRefParam: z.ZodString;
1
4
  /** Resolve model-provided canvas references before Slack API calls. */
2
5
  export declare function resolveCanvasTarget(canvas: string): {
3
6
  ok: true;
@@ -0,0 +1,42 @@
1
+ import type { SlackChannelId, SlackTeamId } from "@/chat/slack/ids";
2
+ export type SlackChannelReadAccess = {
3
+ allowed: true;
4
+ channelName?: string;
5
+ isMember?: boolean;
6
+ isPublic?: boolean;
7
+ } | {
8
+ allowed: false;
9
+ error: string;
10
+ reason: SlackChannelReadDenialReason;
11
+ };
12
+ export type SlackChannelReadDenialReason = "private" | "not_found" | "not_in_channel" | "missing_scope" | "unknown";
13
+ /**
14
+ * Decide whether the model may read Slack content from a target channel.
15
+ *
16
+ * The current conversation is always readable. Any other channel first checks
17
+ * persisted visibility in the same workspace. Cross-channel reads require live
18
+ * `conversations.info` proof that the destination is public. Stale persisted
19
+ * public rows are not enough, so a channel that later becomes private fails
20
+ * closed. Channel-id prefixes alone cannot prove a channel public.
21
+ */
22
+ export declare function checkSlackChannelReadAccess(args: {
23
+ currentChannelIds: Array<SlackChannelId | undefined>;
24
+ targetChannelId: SlackChannelId;
25
+ teamId: SlackTeamId;
26
+ }): Promise<SlackChannelReadAccess>;
27
+ /**
28
+ * Join one public channel when a read failed because the bot is not a member.
29
+ *
30
+ * Callers should try the read first, then use this helper on `not_in_channel`.
31
+ */
32
+ export declare function joinPublicChannelForRead(args: {
33
+ channelName?: string;
34
+ targetChannelId: SlackChannelId;
35
+ }): Promise<{
36
+ ok: true;
37
+ channelName?: string;
38
+ } | {
39
+ ok: false;
40
+ error: string;
41
+ reason: SlackChannelReadDenialReason;
42
+ }>;
@@ -0,0 +1,27 @@
1
+ import { type SlackChannelId } from "@/chat/slack/ids";
2
+ import { z } from "zod";
3
+ export interface ResolvedSlackChannelTarget {
4
+ channelId: SlackChannelId;
5
+ channelName?: string;
6
+ resolvedFromName: boolean;
7
+ }
8
+ /** Model-facing Slack channel ID or public channel name parameter. */
9
+ export declare const slackChannelRefParam: z.ZodString;
10
+ /**
11
+ * Resolve a channel reference from a tool param value.
12
+ *
13
+ * Exact channel ids are parsed directly. Anything else is treated as a public
14
+ * channel name (with or without a leading `#`) and resolved via Slack.
15
+ */
16
+ export declare function resolveSlackChannelRef(input: {
17
+ field: string;
18
+ value: string;
19
+ }): Promise<ResolvedSlackChannelTarget>;
20
+ /**
21
+ * Resolve an optional channel reference, falling back to the active channel.
22
+ */
23
+ export declare function resolveOptionalSlackChannelRef(input: {
24
+ field?: string;
25
+ value?: string;
26
+ defaultChannelId?: SlackChannelId;
27
+ }): Promise<ResolvedSlackChannelTarget>;
@@ -0,0 +1,5 @@
1
+ import { z } from "zod";
2
+ /** Model-facing Slack list ID parameter. */
3
+ export declare const slackListIdParam: z.ZodString;
4
+ /** Model-facing Slack list item ID parameter. */
5
+ export declare const slackListItemIdParam: z.ZodString;
@@ -1,4 +1,4 @@
1
- import type { SlackToolContext } from "@/chat/slack/tools/context";
1
+ import type { SlackToolContext } from "@/chat/slack/tool-support/context";
2
2
  import type { ToolState } from "@/chat/tools/types";
3
3
  /** Create a tool that provisions a new Slack canvas in the active channel. */
4
4
  export declare function createSlackCanvasCreateTool(context: SlackToolContext, state: ToolState): Omit<import("../../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
@@ -0,0 +1,28 @@
1
+ import type { SlackToolContext } from "@/chat/slack/tool-support/context";
2
+ /** Create a tool that joins one public Slack channel. */
3
+ export declare function createSlackChannelJoinTool(context: SlackToolContext): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
4
+ inputSchema: import("../../tools/definition").JsonSchemaObject;
5
+ outputSchema: import("../../tools/definition").JsonSchemaObject;
6
+ prepareArguments(args: unknown): {
7
+ channel_id: string;
8
+ };
9
+ execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
10
+ [x: string]: unknown;
11
+ target?: string | undefined;
12
+ truncated?: boolean | undefined;
13
+ timed_out?: boolean | undefined;
14
+ continuation?: {
15
+ arguments: Record<string, unknown>;
16
+ reason?: string | undefined;
17
+ } | undefined;
18
+ } | Promise<{
19
+ [x: string]: unknown;
20
+ target?: string | undefined;
21
+ truncated?: boolean | undefined;
22
+ timed_out?: boolean | undefined;
23
+ continuation?: {
24
+ arguments: Record<string, unknown>;
25
+ reason?: string | undefined;
26
+ } | undefined;
27
+ }>) | undefined;
28
+ };
@@ -1,9 +1,10 @@
1
- import type { SlackToolContext } from "@/chat/slack/tools/context";
2
- /** Create the active-channel history tool with preflight timestamp normalization. */
1
+ import type { SlackToolContext } from "@/chat/slack/tool-support/context";
2
+ /** Create the channel history tool with optional cross-channel targets. */
3
3
  export declare function createSlackChannelListMessagesTool(context: SlackToolContext): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
4
4
  inputSchema: import("../../tools/definition").JsonSchemaObject;
5
5
  outputSchema: import("../../tools/definition").JsonSchemaObject;
6
6
  prepareArguments(args: unknown): {
7
+ channel_id?: string | undefined;
7
8
  limit?: number | undefined;
8
9
  cursor?: string | undefined;
9
10
  oldest?: string | undefined;
@@ -1,11 +1,6 @@
1
- import type { ConversationMessageSearchScope, ConversationMessageSearchStore } from "@/chat/conversations/message-search";
2
- import { getSlackMessagePermalink } from "@/chat/slack/outbound";
3
- interface ConversationMessageSearchToolDeps {
4
- getPermalink?: typeof getSlackMessagePermalink;
5
- store?: ConversationMessageSearchStore;
6
- }
1
+ import type { ConversationMessageSearchScope } from "@/chat/conversations/message-search";
7
2
  /** Create a tool that searches retained public messages in an authorized Slack workspace. */
8
- export declare function createSlackConversationMessageSearchTool(scope: ConversationMessageSearchScope, currentConversationId: string, deps?: ConversationMessageSearchToolDeps): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
3
+ export declare function createSlackConversationMessageSearchTool(scope: ConversationMessageSearchScope, currentConversationId: string): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
9
4
  inputSchema: import("../../tools/definition").JsonSchemaObject;
10
5
  outputSchema: import("../../tools/definition").JsonSchemaObject;
11
6
  prepareArguments(args: unknown): {
@@ -61,4 +56,3 @@ export declare function createSlackConversationMessageSearchTool(scope: Conversa
61
56
  query?: string | undefined;
62
57
  }>) | undefined;
63
58
  };
64
- export {};
@@ -1,4 +1,4 @@
1
- import type { SlackToolContext } from "@/chat/slack/tools/context";
1
+ import type { SlackToolContext } from "@/chat/slack/tool-support/context";
2
2
  import type { ToolState } from "@/chat/tools/types";
3
3
  /** Create the tool that reacts to the current inbound Slack message. */
4
4
  export declare function createSlackMessageAddReactionTool(context: SlackToolContext, state: ToolState): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
@@ -1,10 +1,11 @@
1
1
  import type { SlackActionToken } from "@/chat/slack/action-token";
2
- /** Create an interactive, public-channel-only Slack search tool. */
3
- export declare function createSlackPublicSearchTool(actionToken: SlackActionToken): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
2
+ /** Create the public-channel Slack search tool. */
3
+ export declare function createSlackPublicSearchTool(actionToken?: SlackActionToken): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
4
4
  inputSchema: import("../../tools/definition").JsonSchemaObject;
5
5
  outputSchema: import("../../tools/definition").JsonSchemaObject;
6
6
  prepareArguments(args: unknown): {
7
7
  query: string;
8
+ content_types?: ("messages" | "files" | "channels" | "users")[] | undefined;
8
9
  after?: number | undefined;
9
10
  before?: number | undefined;
10
11
  cursor?: string | undefined;
@@ -15,6 +16,7 @@ export declare function createSlackPublicSearchTool(actionToken: SlackActionToke
15
16
  execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
16
17
  [x: string]: unknown;
17
18
  query: string;
19
+ content_types: ("messages" | "files" | "channels" | "users")[];
18
20
  count: number;
19
21
  messages: {
20
22
  channel_id: string;
@@ -26,6 +28,35 @@ export declare function createSlackPublicSearchTool(actionToken: SlackActionToke
26
28
  channel_name?: string | undefined;
27
29
  is_author_bot?: boolean | undefined;
28
30
  }[];
31
+ files: {
32
+ file_id: string;
33
+ title?: string | undefined;
34
+ name?: string | undefined;
35
+ filetype?: string | undefined;
36
+ user_id?: string | undefined;
37
+ user_name?: string | undefined;
38
+ channel_id?: string | undefined;
39
+ channel_name?: string | undefined;
40
+ permalink?: string | undefined;
41
+ content?: string | undefined;
42
+ }[];
43
+ channels: {
44
+ channel_id: string;
45
+ channel_name?: string | undefined;
46
+ is_private?: boolean | undefined;
47
+ is_member?: boolean | undefined;
48
+ topic?: string | undefined;
49
+ purpose?: string | undefined;
50
+ permalink?: string | undefined;
51
+ }[];
52
+ users: {
53
+ user_id: string;
54
+ user_name?: string | undefined;
55
+ real_name?: string | undefined;
56
+ display_name?: string | undefined;
57
+ title?: string | undefined;
58
+ permalink?: string | undefined;
59
+ }[];
29
60
  target?: string | undefined;
30
61
  truncated?: boolean | undefined;
31
62
  timed_out?: boolean | undefined;
@@ -37,6 +68,7 @@ export declare function createSlackPublicSearchTool(actionToken: SlackActionToke
37
68
  } | Promise<{
38
69
  [x: string]: unknown;
39
70
  query: string;
71
+ content_types: ("messages" | "files" | "channels" | "users")[];
40
72
  count: number;
41
73
  messages: {
42
74
  channel_id: string;
@@ -48,6 +80,35 @@ export declare function createSlackPublicSearchTool(actionToken: SlackActionToke
48
80
  channel_name?: string | undefined;
49
81
  is_author_bot?: boolean | undefined;
50
82
  }[];
83
+ files: {
84
+ file_id: string;
85
+ title?: string | undefined;
86
+ name?: string | undefined;
87
+ filetype?: string | undefined;
88
+ user_id?: string | undefined;
89
+ user_name?: string | undefined;
90
+ channel_id?: string | undefined;
91
+ channel_name?: string | undefined;
92
+ permalink?: string | undefined;
93
+ content?: string | undefined;
94
+ }[];
95
+ channels: {
96
+ channel_id: string;
97
+ channel_name?: string | undefined;
98
+ is_private?: boolean | undefined;
99
+ is_member?: boolean | undefined;
100
+ topic?: string | undefined;
101
+ purpose?: string | undefined;
102
+ permalink?: string | undefined;
103
+ }[];
104
+ users: {
105
+ user_id: string;
106
+ user_name?: string | undefined;
107
+ real_name?: string | undefined;
108
+ display_name?: string | undefined;
109
+ title?: string | undefined;
110
+ permalink?: string | undefined;
111
+ }[];
51
112
  target?: string | undefined;
52
113
  truncated?: boolean | undefined;
53
114
  timed_out?: boolean | undefined;
@@ -1,4 +1,4 @@
1
- import type { SlackToolContext } from "@/chat/slack/tools/context";
1
+ import type { SlackToolContext } from "@/chat/slack/tool-support/context";
2
2
  import { type SandboxFileMaterializationInput, type SandboxFileUpload } from "@/chat/tools/sandbox/file-uploads";
3
3
  import type { ToolState } from "@/chat/tools/types";
4
4
  /** Convert a model-supplied sandbox file path into bytes safe for Slack upload. */
@@ -1,9 +1,6 @@
1
- import { type DestinationVisibilityReader } from "@/chat/slack/tools/channel-access";
2
- import type { SlackToolContext } from "@/chat/slack/tools/context";
1
+ import type { SlackToolContext } from "@/chat/slack/tool-support/context";
3
2
  /** Create a tool that reads a Slack thread from a shared message URL or explicit coordinates. */
4
- export declare function createSlackThreadReadTool(context: SlackToolContext, deps?: {
5
- visibilityStore?: DestinationVisibilityReader;
6
- }): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
3
+ export declare function createSlackThreadReadTool(context: SlackToolContext): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
7
4
  inputSchema: import("../../tools/definition").JsonSchemaObject;
8
5
  outputSchema: import("../../tools/definition").JsonSchemaObject;
9
6
  prepareArguments(args: unknown): {
@@ -1,6 +1,8 @@
1
1
  import { type Source } from "@sentry/junior-plugin-api";
2
2
  /** Source coordinates reduced to the stable locator for one conversation. */
3
3
  export type SessionSource = Extract<Source, {
4
+ platform: "web";
5
+ }> | Extract<Source, {
4
6
  platform: "local";
5
7
  }> | Omit<Extract<Source, {
6
8
  platform: "slack";
@@ -46,6 +46,7 @@ interface TurnCheckpointWrite {
46
46
  destinationVisibility?: ConversationPrivacy;
47
47
  dispatchId?: string;
48
48
  dispatchOutcome?: AgentDispatchOutcome;
49
+ publishExternally?: boolean;
49
50
  source?: Source;
50
51
  surface?: AgentTurnSurface;
51
52
  turnStartMessageIndex?: number;
@@ -16,12 +16,13 @@ export declare const CONVERSATION_WORK_MAX_DELIVERY_ATTEMPTS = 5;
16
16
  export declare const CONVERSATION_WORK_MAX_RETRIES = 5;
17
17
  declare const inboundMessageSourceSchema: z.ZodEnum<{
18
18
  slack: "slack";
19
- plugin: "plugin";
20
19
  local: "local";
20
+ web: "web";
21
+ plugin: "plugin";
21
22
  api: "api";
22
23
  internal: "internal";
23
- resource_event: "resource_event";
24
24
  scheduler: "scheduler";
25
+ resource_event: "resource_event";
25
26
  }>;
26
27
  export type Source = z.output<typeof inboundMessageSourceSchema>;
27
28
  export type ExecutionStatus = "paused" | "failed" | "idle" | "pending" | "running";
@@ -37,6 +38,8 @@ export declare const inboundMessageDeliverySchema: z.ZodEnum<{
37
38
  defer: "defer";
38
39
  interrupt: "interrupt";
39
40
  }>;
41
+ /** Whether this turn also publishes assistant output to the conversation destination. */
42
+ export declare const publishExternallySchema: z.ZodBoolean;
40
43
  export type InboundMessageDelivery = z.output<typeof inboundMessageDeliverySchema>;
41
44
  /** Canonical durable mailbox entry owned by task execution. */
42
45
  export declare const inboundMessageSchema: z.ZodObject<{
@@ -64,14 +67,16 @@ export declare const inboundMessageSchema: z.ZodObject<{
64
67
  text: z.ZodString;
65
68
  }, z.core.$strict>;
66
69
  receivedAtMs: z.ZodNumber;
70
+ publishExternally: z.ZodBoolean;
67
71
  source: z.ZodEnum<{
68
72
  slack: "slack";
69
- plugin: "plugin";
70
73
  local: "local";
74
+ web: "web";
75
+ plugin: "plugin";
71
76
  api: "api";
72
77
  internal: "internal";
73
- resource_event: "resource_event";
74
78
  scheduler: "scheduler";
79
+ resource_event: "resource_event";
75
80
  }>;
76
81
  }, z.core.$strict>;
77
82
  export type InboundMessage = z.output<typeof inboundMessageSchema>;
@@ -27,7 +27,7 @@ export declare function recordConversationRetry(args: {
27
27
  leaseToken: string;
28
28
  nowMs?: number;
29
29
  state?: StateAdapter;
30
- }): Promise<"stopped" | "lost_lease" | "recorded">;
30
+ }): Promise<"lost_lease" | "recorded" | "stopped">;
31
31
  /** Count mailbox messages that have not yet reached the conversation event log. */
32
32
  export declare function countPendingConversationMessages(conversation: Conversation): number;
33
33
  /** Return whether a conversation has pending or resumable execution work. */
@@ -114,7 +114,8 @@ export declare function drainConversationMailbox(args: Parameters<typeof workSta
114
114
  metadata?: Record<string, unknown> | undefined;
115
115
  };
116
116
  receivedAtMs: number;
117
- source: "slack" | "plugin" | "local" | "api" | "internal" | "resource_event" | "scheduler";
117
+ publishExternally: boolean;
118
+ source: "slack" | "local" | "web" | "plugin" | "api" | "internal" | "scheduler" | "resource_event";
118
119
  attemptCount?: number | undefined;
119
120
  destination?: {
120
121
  platform: "slack";
@@ -43,6 +43,7 @@ export interface TurnRecord {
43
43
  */
44
44
  actors: Actor[];
45
45
  resumeReason?: TurnPauseReason;
46
+ publishExternally?: boolean;
46
47
  resumedFromSliceId?: number;
47
48
  turnId: string;
48
49
  sliceId: number;
@@ -96,6 +97,7 @@ export declare function upsertTurnRecord(args: {
96
97
  trailingMessageProvenance?: ConversationMessageProvenance[];
97
98
  actor?: Actor;
98
99
  resumeReason?: TurnPauseReason;
100
+ publishExternally?: boolean;
99
101
  errorMessage?: string;
100
102
  resumedFromSliceId?: number;
101
103
  traceId?: string;
@@ -9,6 +9,8 @@ export interface ConversationWorkerContext {
9
9
  checkIn(): Promise<boolean>;
10
10
  conversationId: string;
11
11
  destination?: Destination;
12
+ publishExternally: boolean;
13
+ /** True when the current execution slice must stop at its next safe boundary. */
12
14
  shouldYield(): boolean;
13
15
  }
14
16
  export interface InboxAttempt {
@@ -13,7 +13,7 @@ export declare function readViewerTaskExecutions(user: User, kind: "scheduled" |
13
13
  /** Resolve the source task for one conversation when a terminal execution links it. */
14
14
  export declare function readConversationSourceTask(args: {
15
15
  conversationId: string;
16
- verifiedViewerEmail?: string;
16
+ viewer?: User;
17
17
  }): Promise<ConversationSourceTask | undefined>;
18
18
  /** Delete one viewer-owned scheduled or event task. */
19
19
  export declare function deleteViewerTask(user: User, kind: "scheduled" | "event", id: string): Promise<void>;
@@ -9,7 +9,7 @@ export declare function createSearchConversationEventsTool(context: ToolRuntimeC
9
9
  after_seq?: number | null | undefined;
10
10
  before_seq?: number | null | undefined;
11
11
  limit?: number | null | undefined;
12
- types?: ("message" | "handoff" | "user_message" | "assistant_message" | "tool_result" | "compaction" | "mcp_provider_connected" | "authorization_requested" | "authorization_completed" | "tool_execution_started" | "guardian_action_reviewed" | "message_updated" | "message_handled" | "messages_summarized" | "turn_started" | "turn_routed" | "turn_context" | "structured_event" | "turn_completed" | "turn_failed" | "subagent_started" | "subagent_ended")[] | null | undefined;
12
+ types?: ("message" | "message_handled" | "assistant_message" | "turn_routed" | "guardian_action_reviewed" | "turn_context" | "structured_event" | "compaction" | "handoff" | "user_message" | "tool_result" | "mcp_provider_connected" | "authorization_requested" | "authorization_completed" | "tool_execution_started" | "message_updated" | "messages_summarized" | "turn_started" | "turn_completed" | "turn_failed" | "subagent_started" | "subagent_ended")[] | null | undefined;
13
13
  };
14
14
  execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
15
15
  [x: string]: unknown;
@@ -1,12 +1,12 @@
1
1
  import type { FileUpload } from "chat";
2
- import type { Destination, Identity, LocalDestination, LocalSource, PluginEgress, SlackDestination, SlackSource, Source, User } from "@sentry/junior-plugin-api";
2
+ import type { WebSource, Destination, Identity, LocalDestination, LocalSource, PluginEgress, SlackDestination, SlackSource, Source, User } from "@sentry/junior-plugin-api";
3
3
  import type { McpToolManager } from "@/chat/mcp/tool-manager";
4
4
  import type { SandboxWorkspace } from "@/chat/sandbox/workspace";
5
5
  import type { AgentTurnSurface } from "@/chat/task-execution/checkpoint";
6
6
  import type { Skill } from "@/chat/skills";
7
7
  import type { LoadSkillMetadata } from "@/chat/tools/skill/load-skill";
8
8
  import type { JuniorToolOutput } from "@/chat/tool-support/structured-result";
9
- import type { LocalActor, Actor, SlackActor } from "@/chat/actor";
9
+ import type { WebActor, LocalActor, Actor, SlackActor } from "@/chat/actor";
10
10
  import type { SlackActionToken } from "@/chat/slack/action-token";
11
11
  import type { ModelProfile } from "@/chat/model-profile";
12
12
  import type { GeneratedArtifactFileRef } from "@/chat/tools/sandbox/file-uploads";
@@ -58,7 +58,7 @@ interface BaseToolRuntimeContext {
58
58
  /**
59
59
  * Opaque Junior conversation/session identity for this turn.
60
60
  * Interactive Slack turns use `slack:{channelId}:{threadTs}`.
61
- * Scheduled/API turns use an internal id such as `agent-dispatch:{id}`.
61
+ * Scheduled/web turns use an internal id such as `agent-dispatch:{id}`.
62
62
  * Do not parse as Slack unless the value starts with `slack:`.
63
63
  */
64
64
  conversationId?: string;
@@ -94,7 +94,14 @@ interface LocalToolRuntimeContext extends BaseToolRuntimeContext {
94
94
  slack?: never;
95
95
  slackActionToken?: never;
96
96
  }
97
- export type ToolRuntimeContext = LocalToolRuntimeContext | SlackToolRuntimeContext;
97
+ interface WebToolRuntimeContext extends BaseToolRuntimeContext {
98
+ destination: Destination;
99
+ actor?: WebActor;
100
+ source: WebSource;
101
+ slack?: never;
102
+ slackActionToken?: never;
103
+ }
104
+ export type ToolRuntimeContext = LocalToolRuntimeContext | SlackToolRuntimeContext | WebToolRuntimeContext;
98
105
  export interface ToolState {
99
106
  getOperationResult: <T>(operationKey: string) => T | undefined;
100
107
  setOperationResult: (operationKey: string, result: unknown) => void;
@@ -15,7 +15,7 @@ export declare function createWatchResourceEventsTool(context: ToolRuntimeContex
15
15
  };
16
16
  execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
17
17
  id: string;
18
- subscription_status: "cancelled" | "completed" | "active";
18
+ subscription_status: "completed" | "active" | "cancelled";
19
19
  identifier: string;
20
20
  events: string[];
21
21
  expiresAtMs: number;
@@ -37,7 +37,7 @@ export declare function createWatchResourceEventsTool(context: ToolRuntimeContex
37
37
  } | undefined;
38
38
  } | Promise<{
39
39
  id: string;
40
- subscription_status: "cancelled" | "completed" | "active";
40
+ subscription_status: "completed" | "active" | "cancelled";
41
41
  identifier: string;
42
42
  events: string[];
43
43
  expiresAtMs: number;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-7NVJVJID.js";
3
+ } from "./chunk-4GXJUYJV.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -68,6 +68,19 @@ var conversationFeedQuerySchema = z2.object({
68
68
  }).strict();
69
69
  var archiveConversationBodySchema = z2.object({ archived: z2.boolean(), lastSeenAt: z2.string().datetime() }).strict();
70
70
  var archiveConversationResponseSchema = z2.object({ archived: z2.boolean() }).strict();
71
+ var createConversationBodySchema = z2.object({
72
+ idempotencyKey: z2.string().trim().min(1).max(200),
73
+ message: z2.string().trim().min(1).max(32e3)
74
+ }).strict();
75
+ var createConversationMessageBodySchema = z2.object({
76
+ idempotencyKey: z2.string().trim().min(1).max(200),
77
+ message: z2.string().trim().min(1).max(32e3)
78
+ }).strict();
79
+ var acceptedConversationMessageSchema = z2.object({
80
+ conversationId: z2.string().min(1),
81
+ messageId: z2.string().min(1),
82
+ status: z2.enum(["accepted", "duplicate"])
83
+ }).strict();
71
84
  var actorIdentitySchema = z2.object({
72
85
  email: z2.string().optional(),
73
86
  fullName: z2.string().optional(),
@@ -105,6 +118,7 @@ var conversationSummaryReportSchema = z2.object({
105
118
  auxiliaryCosts: conversationAuxiliaryCostsSchema.optional(),
106
119
  conversationId: z2.string(),
107
120
  isParticipant: z2.boolean(),
121
+ visibility: z2.enum(["private", "public"]).optional(),
108
122
  status: conversationReportStatusSchema,
109
123
  startedAt: z2.string(),
110
124
  lastSeenAt: z2.string(),
@@ -717,6 +731,9 @@ export {
717
731
  conversationFeedQuerySchema,
718
732
  archiveConversationBodySchema,
719
733
  archiveConversationResponseSchema,
734
+ createConversationBodySchema,
735
+ createConversationMessageBodySchema,
736
+ acceptedConversationMessageSchema,
720
737
  conversationAuxiliaryCostsSchema,
721
738
  conversationSummaryReportSchema,
722
739
  conversationReportEventDataSchema,
@@ -728,14 +745,14 @@ export {
728
745
  conversationStatsReportSchema,
729
746
  dailyConversationActivitySchema,
730
747
  activityDays,
731
- personParamsSchema,
732
- actorDirectoryReportSchema,
733
- actorProfileReportSchema,
734
- personalSpendReportSchema,
735
748
  locationParamsSchema,
736
749
  locationActivityDayReportSchema,
737
750
  locationDirectoryReportSchema,
738
751
  locationDetailReportSchema,
752
+ personParamsSchema,
753
+ actorDirectoryReportSchema,
754
+ actorProfileReportSchema,
755
+ personalSpendReportSchema,
739
756
  personalTokenMetadataSchema,
740
757
  personalTokenListSchema,
741
758
  createPersonalTokenBodySchema,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-JUUKWRBE.js";
3
+ } from "./chunk-HWQGBIH7.js";
4
4
  import {
5
5
  logWarn
6
- } from "./chunk-4LJO56OJ.js";
6
+ } from "./chunk-EAI67NTM.js";
7
7
  import {
8
8
  skillRoots
9
9
  } from "./chunk-H4HBKISO.js";