@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.
- package/dist/{agent-hooks-HS6VGUPM.js → agent-hooks-VAUYT6PD.js} +10 -10
- package/dist/api/conversations/access.d.ts +2 -1
- package/dist/api/conversations/archive.d.ts +3 -5
- package/dist/api/conversations/create.d.ts +6 -0
- package/dist/api/conversations/detail.d.ts +2 -296
- package/dist/api/conversations/event-list.d.ts +2 -193
- package/dist/api/conversations/list.d.ts +4 -66
- package/dist/api/conversations/routes.d.ts +1 -1
- package/dist/api/conversations/stats.d.ts +0 -54
- package/dist/api/http.d.ts +2 -6
- package/dist/api/locations/detail.d.ts +3 -111
- package/dist/api/locations/list.d.ts +0 -45
- package/dist/api/locations/query.d.ts +2 -1
- package/dist/api/locations/routes.d.ts +1 -1
- package/dist/api/people/list.d.ts +0 -29
- package/dist/api/people/profile.d.ts +2 -106
- package/dist/api/people/profile.query.d.ts +2 -1
- package/dist/api/people/routes.d.ts +1 -1
- package/dist/api/people/shared.d.ts +1 -1
- package/dist/api/people/spend.d.ts +3 -4
- package/dist/api/personal-tokens/routes.d.ts +2 -2
- package/dist/api/route.d.ts +8 -14
- package/dist/api/schema/conversation.d.ts +60 -29
- package/dist/api/schema/location.d.ts +4 -0
- package/dist/api/schema/person.d.ts +7 -3
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -1
- package/dist/api/stats.d.ts +0 -13
- package/dist/api/validation.d.ts +7 -0
- package/dist/api/viewer.d.ts +3 -0
- package/dist/api.d.ts +2 -1
- package/dist/api.js +624 -562
- package/dist/app.js +183 -105
- package/dist/{catalog-runtime-M6ZTPYRV.js → catalog-runtime-WADOZVTB.js} +5 -5
- package/dist/chat/actor.d.ts +4 -1
- package/dist/chat/agent/request.d.ts +2 -0
- package/dist/chat/agent/resume.d.ts +1 -0
- package/dist/chat/agent-dispatch/context.d.ts +2 -2
- package/dist/chat/agent-invocations/types.d.ts +52 -0
- package/dist/chat/api-turns/work.d.ts +103 -0
- package/dist/chat/conversations/history.d.ts +60 -0
- package/dist/chat/conversations/provenance.d.ts +6 -0
- package/dist/chat/conversations/sql/actor-identity.d.ts +19 -0
- package/dist/chat/conversations/store.d.ts +1 -1
- package/dist/chat/resource-events/store.d.ts +1 -1
- package/dist/chat/runtime/reply-executor.d.ts +1 -1
- package/dist/chat/runtime/slack-runtime.d.ts +2 -1
- package/dist/chat/runtime/turn-preparation.d.ts +9 -0
- package/dist/chat/scheduled-tasks/tool-support.d.ts +5 -5
- package/dist/chat/scheduled-tasks/tools/create.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/list.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +2 -2
- package/dist/chat/scheduled-tasks/tools/update.d.ts +2 -2
- package/dist/chat/slack/channel.d.ts +26 -0
- package/dist/chat/slack/dispatch-turn.d.ts +1 -0
- package/dist/chat/slack/timestamp-param.d.ts +0 -2
- package/dist/chat/slack/{tools → tool-support}/canvas/api.d.ts +1 -1
- package/dist/chat/slack/{tools → tool-support}/canvas/context.d.ts +3 -0
- package/dist/chat/slack/tool-support/channel-access.d.ts +42 -0
- package/dist/chat/slack/tool-support/channel-target.d.ts +27 -0
- package/dist/chat/slack/tool-support/list/params.d.ts +5 -0
- package/dist/chat/slack/tools/canvas/create.d.ts +1 -1
- package/dist/chat/slack/tools/channel-join.d.ts +28 -0
- package/dist/chat/slack/tools/channel-list-messages.d.ts +3 -2
- package/dist/chat/slack/tools/conversation-message-search.d.ts +2 -8
- package/dist/chat/slack/tools/message-add-reaction.d.ts +1 -1
- package/dist/chat/slack/tools/public-search.d.ts +63 -2
- package/dist/chat/slack/tools/send-files.d.ts +1 -1
- package/dist/chat/slack/tools/thread-read.d.ts +2 -5
- package/dist/chat/source.d.ts +2 -0
- package/dist/chat/task-execution/checkpoint.d.ts +1 -0
- package/dist/chat/task-execution/state.d.ts +9 -4
- package/dist/chat/task-execution/store.d.ts +3 -2
- package/dist/chat/task-execution/turn-cursor.d.ts +2 -0
- package/dist/chat/task-execution/worker.d.ts +2 -0
- package/dist/chat/tasks/read.d.ts +1 -1
- package/dist/chat/tools/search-conversation-events.d.ts +1 -1
- package/dist/chat/tools/types.d.ts +11 -4
- package/dist/chat/tools/watch-resource-events.d.ts +2 -2
- package/dist/{chunk-ORO3PWKQ.js → chunk-2B3PT3V2.js} +1 -1
- package/dist/{chunk-SVHUEHUL.js → chunk-45LOR4PU.js} +21 -4
- package/dist/{chunk-YBVXBNSV.js → chunk-4AQZYNHM.js} +2 -2
- package/dist/{chunk-Z4YU7Z4L.js → chunk-4EA2SFK2.js} +65 -4
- package/dist/{chunk-7NVJVJID.js → chunk-4GXJUYJV.js} +2 -2
- package/dist/{chunk-IIOOO4FQ.js → chunk-55F4QU2V.js} +2 -1
- package/dist/{chunk-745QJ3ZA.js → chunk-7OEIXFC3.js} +2 -2
- package/dist/{chunk-DU74WPIC.js → chunk-D3WPMGEX.js} +1 -1
- package/dist/{chunk-PVNG6UMU.js → chunk-D6YX4NNN.js} +22 -10
- package/dist/chunk-DUY5CDAM.js +36 -0
- package/dist/{chunk-4LJO56OJ.js → chunk-EAI67NTM.js} +1 -1
- package/dist/{chunk-X5UY34KT.js → chunk-EINWQFXI.js} +8 -8
- package/dist/chunk-GDFF3BQG.js +136 -0
- package/dist/{chunk-EFLJ2WJH.js → chunk-GXYDVZKM.js} +5 -5
- package/dist/{chunk-CWP5RHVX.js → chunk-HLPLT3NY.js} +8 -5
- package/dist/{chunk-JUUKWRBE.js → chunk-HWQGBIH7.js} +1 -1
- package/dist/{chunk-AZ7EAOBE.js → chunk-IL4EDBMV.js} +5 -5
- package/dist/{chunk-DLDRQHG5.js → chunk-LAZGHEYU.js} +1 -1
- package/dist/{chunk-RXBVB2JM.js → chunk-LE5H7LMT.js} +1 -1
- package/dist/chunk-LNVEIJ2L.js +48 -0
- package/dist/{chunk-YEO3VX72.js → chunk-OJCP3C3J.js} +8 -6
- package/dist/{chunk-GGB4WL5A.js → chunk-POSZWRGL.js} +1 -1
- package/dist/{chunk-YNTTROJT.js → chunk-QOWHHM3F.js} +1 -1
- package/dist/{chunk-6H5SZR24.js → chunk-RRJV5UR5.js} +302 -59
- package/dist/{chunk-AYU72WO7.js → chunk-ULAU5ZGU.js} +41 -64
- package/dist/{chunk-SGZO7UWH.js → chunk-V2FXMOEA.js} +2 -2
- package/dist/{chunk-AIOK6LAG.js → chunk-VCYSOXON.js} +272 -41
- package/dist/{chunk-7A4M7PCV.js → chunk-VMNRXKAH.js} +1166 -540
- package/dist/{chunk-YSB2N563.js → chunk-VRHTNBA6.js} +121 -87
- package/dist/{chunk-AVZDSUFB.js → chunk-VY6W3T43.js} +4 -4
- package/dist/{chunk-7UQIVT6G.js → chunk-WCN4YSH7.js} +6 -6
- package/dist/{chunk-CSZINQJ2.js → chunk-WOONT5ZP.js} +1 -1
- package/dist/{chunk-Q4R73I43.js → chunk-XJ42NBP5.js} +58 -28
- package/dist/{chunk-YHDERDRO.js → chunk-ZCHIC2GM.js} +91 -75
- package/dist/chunk-ZPL2RR7F.js +798 -0
- package/dist/cli/chat.js +33 -35
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/db/schema/agent-invocations.d.ts +20 -0
- package/dist/db/schema/conversation-annotations.d.ts +2 -2
- package/dist/db/schema.d.ts +22 -2
- package/dist/{db-CSEW4RII.js → db-XUKZRFFK.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-FUEV5HNG.js → oauth-callback-server-LPZMMGFI.js} +25 -26
- package/dist/{runner-U3XHSKSH.js → runner-DGKUTMPX.js} +17 -18
- package/dist/{skills-AKE6W3WI.js → skills-P7YUFSXM.js} +6 -6
- package/dist/spawn-DSK3ZEVD.js +38 -0
- package/dist/{validation-WDTAULUF.js → validation-S7U5M5NR.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-C3HAO2BG.js → work-GAA7TVAD.js} +18 -19
- package/dist/{worker-LNP4YKBM.js → worker-JXPJH3QB.js} +11 -10
- package/package.json +5 -4
- package/dist/api/health.d.ts +0 -7
- package/dist/api/personal-tokens/create.d.ts +0 -11
- package/dist/api/personal-tokens/list.d.ts +0 -12
- package/dist/api/personal-tokens/revoke.d.ts +0 -5
- package/dist/api/plugin-reports.d.ts +0 -63
- package/dist/api/plugins.d.ts +0 -8
- package/dist/api/runtime.d.ts +0 -24
- package/dist/api/skills.d.ts +0 -6
- package/dist/chat/slack/tools/channel-access.d.ts +0 -30
- package/dist/chunk-34GS7B6L.js +0 -115
- package/dist/chunk-AVOCH2Z5.js +0 -285
- package/dist/chunk-HLXXQI5Q.js +0 -238
- package/dist/chunk-K4SZAP3K.js +0 -67
- package/dist/chunk-R776HKPK.js +0 -81
- package/dist/spawn-B6GDTWJ4.js +0 -39
- /package/dist/chat/slack/{tools → tool-support}/canvas/markdown.d.ts +0 -0
- /package/dist/chat/slack/{tools → tool-support}/channel-capabilities.d.ts +0 -0
- /package/dist/chat/slack/{tools → tool-support}/context.d.ts +0 -0
- /package/dist/chat/slack/{tools → tool-support}/list/api.d.ts +0 -0
- /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/
|
|
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>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SlackToolContext } from "@/chat/slack/
|
|
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/
|
|
2
|
-
/** Create the
|
|
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
|
|
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
|
|
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/
|
|
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
|
|
3
|
-
export declare function createSlackPublicSearchTool(actionToken
|
|
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/
|
|
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 {
|
|
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,
|
|
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): {
|
package/dist/chat/source.d.ts
CHANGED
|
@@ -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<"
|
|
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
|
-
|
|
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
|
-
|
|
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" | "
|
|
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/
|
|
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
|
-
|
|
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: "
|
|
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: "
|
|
40
|
+
subscription_status: "completed" | "active" | "cancelled";
|
|
41
41
|
identifier: string;
|
|
42
42
|
events: string[];
|
|
43
43
|
expiresAtMs: number;
|
|
@@ -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,
|