@sentry/junior 0.90.0 → 0.92.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-MXAF7RQL.js → agent-hooks-BYSSWCNW.js} +7 -7
- package/dist/api/people/list.d.ts +3 -3
- package/dist/api/people/list.js +15 -15
- package/dist/api/people/list.query.d.ts +2 -2
- package/dist/api/people/profile.d.ts +3 -3
- package/dist/api/people/profile.js +12 -12
- package/dist/api/people/profile.query.d.ts +2 -2
- package/dist/api/people/shared.d.ts +13 -13
- package/dist/api/people/types.d.ts +12 -12
- package/dist/api-reference.d.ts +1 -1
- package/dist/app.js +406 -267
- package/dist/{catalog-runtime-DXE6NXHT.js → catalog-runtime-NZHMSMYC.js} +2 -2
- package/dist/chat/actor.d.ts +75 -0
- package/dist/chat/agent/prompt.d.ts +4 -4
- package/dist/chat/agent/request.d.ts +21 -13
- package/dist/chat/agent/resume.d.ts +5 -4
- package/dist/chat/agent/tools.d.ts +2 -2
- package/dist/chat/capabilities/jr-rpc-command.d.ts +1 -1
- package/dist/chat/conversation-privacy.d.ts +11 -0
- package/dist/chat/conversations/sql/migrations.d.ts +1 -1
- package/dist/chat/conversations/sql/schema/conversations.d.ts +2 -19
- package/dist/chat/conversations/sql/schema.d.ts +2 -19
- package/dist/chat/conversations/sql/store.d.ts +3 -3
- package/dist/chat/conversations/store.d.ts +4 -4
- package/dist/chat/credentials/context.d.ts +4 -4
- package/dist/chat/current-instruction.d.ts +5 -3
- package/dist/chat/logging.d.ts +2 -2
- package/dist/chat/no-reply.d.ts +1 -1
- package/dist/chat/oauth-authorization-message.d.ts +6 -0
- package/dist/chat/oauth-flow.d.ts +1 -1
- package/dist/chat/pi/messages.d.ts +2 -2
- package/dist/chat/pi/transcript.d.ts +15 -0
- package/dist/chat/plugins/agent-hooks.d.ts +3 -3
- package/dist/chat/plugins/credential-hooks.d.ts +2 -8
- package/dist/chat/prompt.d.ts +3 -6
- package/dist/chat/runtime/reply-executor.d.ts +1 -1
- package/dist/chat/runtime/turn-input.d.ts +1 -1
- package/dist/chat/sandbox/egress/schemas.d.ts +2 -2
- package/dist/chat/sandbox/egress/session.d.ts +1 -1
- package/dist/chat/services/context-compaction.d.ts +1 -1
- package/dist/chat/services/conversation-memory.d.ts +1 -1
- package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/message-actor-identity.d.ts +4 -4
- package/dist/chat/services/pending-auth.d.ts +2 -2
- package/dist/chat/services/plugin-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/provider-default-config.d.ts +1 -1
- package/dist/chat/services/subscribed-decision.d.ts +1 -1
- package/dist/chat/services/turn-result.d.ts +1 -1
- package/dist/chat/services/turn-session-record.d.ts +11 -8
- package/dist/chat/services/turn-thinking-level.d.ts +1 -1
- package/dist/chat/slack/assistant-thread/title.d.ts +1 -1
- package/dist/chat/slack/mrkdwn.d.ts +6 -0
- package/dist/chat/slack/tools/canvas/create.d.ts +41 -1
- package/dist/chat/slack/tools/canvas/edit.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/read.d.ts +60 -1
- package/dist/chat/slack/tools/canvas/write.d.ts +41 -1
- package/dist/chat/slack/tools/channel-list-messages.d.ts +45 -1
- package/dist/chat/slack/tools/context.d.ts +3 -3
- package/dist/chat/slack/tools/list/add-items.d.ts +42 -1
- package/dist/chat/slack/tools/list/create.d.ts +40 -1
- package/dist/chat/slack/tools/list/get-items.d.ts +40 -1
- package/dist/chat/slack/tools/list/update-item.d.ts +46 -1
- package/dist/chat/slack/tools/message-add-reaction.d.ts +40 -1
- package/dist/chat/slack/tools/send-message.d.ts +45 -1
- package/dist/chat/slack/tools/thread-read.d.ts +44 -1
- package/dist/chat/slack/tools/user-lookup.d.ts +45 -1
- package/dist/chat/slack/user.d.ts +3 -3
- package/dist/chat/slack/vision-context.d.ts +2 -2
- package/dist/chat/sql/schema.d.ts +2 -19
- package/dist/chat/state/conversation-details.d.ts +4 -4
- package/dist/chat/state/conversation.d.ts +1 -1
- package/dist/chat/state/session-log.d.ts +140 -26
- package/dist/chat/state/turn-session.d.ts +18 -5
- package/dist/chat/task-execution/slack-work.d.ts +2 -2
- package/dist/chat/task-execution/state.d.ts +4 -4
- package/dist/chat/tool-support/zod-tool.d.ts +16 -4
- package/dist/chat/tools/advisor/tool.d.ts +41 -1
- package/dist/chat/tools/definition.d.ts +10 -0
- package/dist/chat/tools/execute-tool.d.ts +41 -1
- package/dist/chat/tools/resource-events.d.ts +124 -3
- package/dist/chat/tools/runtime/report-progress.d.ts +40 -1
- package/dist/chat/tools/sandbox/bash.d.ts +41 -1
- package/dist/chat/tools/sandbox/edit-file.d.ts +44 -1
- package/dist/chat/tools/sandbox/find-files.d.ts +42 -1
- package/dist/chat/tools/sandbox/grep.d.ts +46 -1
- package/dist/chat/tools/sandbox/list-dir.d.ts +41 -1
- package/dist/chat/tools/sandbox/read-file.d.ts +42 -1
- package/dist/chat/tools/sandbox/write-file.d.ts +41 -1
- package/dist/chat/tools/search-tools.d.ts +102 -1
- package/dist/chat/tools/skill/call-mcp-tool.d.ts +10 -1
- package/dist/chat/tools/skill/load-skill.d.ts +40 -1
- package/dist/chat/tools/skill/search-mcp-tools.d.ts +100 -1
- package/dist/chat/tools/system-time.d.ts +38 -1
- package/dist/chat/tools/types.d.ts +4 -4
- package/dist/chat/tools/web/fetch-tool.d.ts +41 -1
- package/dist/chat/tools/web/image-generate.d.ts +62 -1
- package/dist/chat/tools/web/search.d.ts +41 -1
- package/dist/{chunk-HXL2ZV74.js → chunk-3F54A3YM.js} +82 -11
- package/dist/{chunk-BKSZL4QO.js → chunk-7DVIELX3.js} +670 -401
- package/dist/{chunk-GCWD2VHP.js → chunk-7FS3K243.js} +284 -124
- package/dist/{chunk-AOISHLSF.js → chunk-ACJENBVF.js} +143 -20
- package/dist/{chunk-IRRMABQD.js → chunk-APIVR44P.js} +10 -10
- package/dist/{chunk-PHZHJTCK.js → chunk-BMQ5DXHV.js} +30 -52
- package/dist/{chunk-XP7F4LYB.js → chunk-BTH37NCU.js} +4 -4
- package/dist/{chunk-5GBUZI6M.js → chunk-H7KUZAMZ.js} +4 -4
- package/dist/{chunk-TYUXD3FN.js → chunk-MC4ZZE4Q.js} +1 -1
- package/dist/{chunk-QCKGI74V.js → chunk-N25HRI6B.js} +10 -10
- package/dist/{chunk-2S7M37HY.js → chunk-NIFONS4W.js} +86 -47
- package/dist/{chunk-ONFOWI2D.js → chunk-OJP53WIU.js} +16 -15
- package/dist/{chunk-NW7AXDA5.js → chunk-OZJXGX4U.js} +2 -2
- package/dist/{chunk-KC42JAAQ.js → chunk-PFXC67GJ.js} +3 -3
- package/dist/{chunk-ZUK7BL63.js → chunk-S6QKIGRM.js} +66 -54
- package/dist/{chunk-IX76WFJV.js → chunk-TF5VLGA7.js} +10 -10
- package/dist/{chunk-DACFZ5CI.js → chunk-VY7TVOIK.js} +16 -12
- package/dist/{chunk-AN2437E3.js → chunk-YTNPU7I2.js} +2 -2
- package/dist/{chunk-3MPOMK3K.js → chunk-YYBX2BD5.js} +61 -3
- package/dist/{chunk-RS6ANWVT.js → chunk-ZATRYQLR.js} +1 -1
- package/dist/cli/chat.js +20 -20
- package/dist/cli/check.js +3 -3
- package/dist/cli/plugins.js +9 -9
- package/dist/cli/snapshot-warmup.js +6 -6
- package/dist/cli/upgrade.js +9 -9
- package/dist/{db-CXI7PR5U.js → db-GCK43OO3.js} +4 -4
- package/dist/instrumentation.js +1 -1
- package/dist/reporting/conversations.d.ts +3 -3
- package/dist/reporting.d.ts +1 -1
- package/dist/reporting.js +48 -50
- package/dist/{runner-FKL3RAHA.js → runner-XWTFA26U.js} +20 -18
- package/dist/{validation-I7GD2YWS.js → validation-KYAWETI4.js} +3 -3
- package/package.json +6 -6
- package/dist/chat/requester.d.ts +0 -68
|
@@ -27,7 +27,7 @@ interface ReplyExecutorDeps {
|
|
|
27
27
|
getSlackAdapter: () => SlackAdapter;
|
|
28
28
|
resolveUserAttachments: (attachments: Message["attachments"] | undefined, context: {
|
|
29
29
|
threadId?: string;
|
|
30
|
-
|
|
30
|
+
actorId?: string;
|
|
31
31
|
channelId?: string;
|
|
32
32
|
runId?: string;
|
|
33
33
|
conversation?: PreparedTurnState["conversation"];
|
|
@@ -13,8 +13,8 @@ export declare const sandboxEgressCredentialContextSchema: z.ZodObject<{
|
|
|
13
13
|
}, z.core.$strict>;
|
|
14
14
|
}, z.core.$strict>, z.ZodObject<{
|
|
15
15
|
actor: z.ZodObject<{
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
platform: z.ZodLiteral<"system">;
|
|
17
|
+
name: z.ZodString;
|
|
18
18
|
}, z.core.$strict>;
|
|
19
19
|
subject: z.ZodOptional<z.ZodObject<{
|
|
20
20
|
type: z.ZodLiteral<"user">;
|
|
@@ -5,7 +5,7 @@ export type { SandboxEgressAuthRequiredSignal, SandboxEgressCredentialContext, S
|
|
|
5
5
|
/**
|
|
6
6
|
* Create the signed Junior credential context embedded in the proxy URL.
|
|
7
7
|
*
|
|
8
|
-
* The token binds
|
|
8
|
+
* The token binds actor credentials to a specific sandbox egress id and a
|
|
9
9
|
* short expiry. Vercel OIDC proves which VM sent a request; this token proves
|
|
10
10
|
* which Junior actor and credential context that VM is allowed to use.
|
|
11
11
|
*/
|
|
@@ -8,7 +8,7 @@ export interface ConversationMemoryService {
|
|
|
8
8
|
compactConversationIfNeeded: (conversation: ThreadConversationState, context: {
|
|
9
9
|
threadId?: string;
|
|
10
10
|
channelId?: string;
|
|
11
|
-
|
|
11
|
+
actorId?: string;
|
|
12
12
|
runId?: string;
|
|
13
13
|
}) => Promise<void>;
|
|
14
14
|
generateThreadTitle: (sourceText: string) => Promise<string>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { Message } from "chat";
|
|
2
|
-
import { type
|
|
2
|
+
import { type SlackActor, type SlackActorProfile, type UserActor } from "@/chat/actor";
|
|
3
3
|
interface MessageAuthorIdentity {
|
|
4
4
|
email?: string;
|
|
5
5
|
fullName?: string;
|
|
6
6
|
userId: string;
|
|
7
7
|
userName?: string;
|
|
8
8
|
}
|
|
9
|
-
type MessageActorIdentity =
|
|
9
|
+
type MessageActorIdentity = UserActor | MessageAuthorIdentity;
|
|
10
10
|
/** Preserve runtime-owned identity on Chat SDK messages before persistence. */
|
|
11
|
-
export declare function bindMessageActorIdentity(message: Message,
|
|
11
|
+
export declare function bindMessageActorIdentity(message: Message, actor: UserActor): UserActor;
|
|
12
12
|
/** Read message identity without promoting adapter display fallbacks. */
|
|
13
13
|
export declare function getMessageActorIdentity(message: Message): MessageActorIdentity | undefined;
|
|
14
14
|
/** Attach Slack display fields only after the author id is exact. */
|
|
15
|
-
export declare function ensureSlackMessageActorIdentity(message: Message, teamId: string, lookupSlackUser: (teamId: string, userId: string) => Promise<
|
|
15
|
+
export declare function ensureSlackMessageActorIdentity(message: Message, teamId: string, lookupSlackUser: (teamId: string, userId: string) => Promise<SlackActorProfile | null | undefined>): Promise<SlackActor>;
|
|
16
16
|
export {};
|
|
@@ -6,7 +6,7 @@ export declare function canReusePendingAuthLink(args: {
|
|
|
6
6
|
nowMs?: number;
|
|
7
7
|
pendingAuth?: ConversationPendingAuthState;
|
|
8
8
|
provider: string;
|
|
9
|
-
|
|
9
|
+
actorId: string;
|
|
10
10
|
scope?: string;
|
|
11
11
|
sessionId: string;
|
|
12
12
|
}): boolean;
|
|
@@ -14,7 +14,7 @@ export declare function getConversationPendingAuth(args: {
|
|
|
14
14
|
conversation: ThreadConversationState;
|
|
15
15
|
kind: AuthorizationPauseKind;
|
|
16
16
|
provider: string;
|
|
17
|
-
|
|
17
|
+
actorId: string;
|
|
18
18
|
scope?: string;
|
|
19
19
|
}): ConversationPendingAuthState | undefined;
|
|
20
20
|
export declare function clearPendingAuth(conversation: ThreadConversationState, sessionId?: string): void;
|
|
@@ -2,7 +2,7 @@ import type { ChannelConfigurationService } from "@/chat/configuration/types";
|
|
|
2
2
|
/** Apply explicit provider-default config requests that do not need agent reasoning. */
|
|
3
3
|
export declare function maybeApplyProviderDefaultConfigRequest(args: {
|
|
4
4
|
channelConfiguration?: ChannelConfigurationService;
|
|
5
|
-
|
|
5
|
+
actorId?: string;
|
|
6
6
|
text: string;
|
|
7
7
|
}): Promise<{
|
|
8
8
|
text: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type AgentTurnSessionRecord, type AgentTurnSurface } from "@/chat/state/turn-session";
|
|
2
2
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
3
|
-
import type { Destination,
|
|
3
|
+
import type { Destination, Actor, Source } from "@sentry/junior-plugin-api";
|
|
4
4
|
import type { PiMessage } from "@/chat/pi/messages";
|
|
5
|
+
import type { PiMessageProvenance } from "@/chat/state/session-log";
|
|
5
6
|
import { type AgentTurnUsage } from "@/chat/usage";
|
|
6
7
|
export declare const AGENT_CONTINUE_MAX_SLICES = 48;
|
|
7
8
|
export interface TurnSessionContext {
|
|
@@ -16,7 +17,7 @@ export interface TurnSessionState {
|
|
|
16
17
|
}
|
|
17
18
|
interface SessionRecordLogContext {
|
|
18
19
|
threadId?: string;
|
|
19
|
-
|
|
20
|
+
actorId?: string;
|
|
20
21
|
channelId?: string;
|
|
21
22
|
runId?: string;
|
|
22
23
|
assistantUserName?: string;
|
|
@@ -33,9 +34,11 @@ export declare function persistRunningSessionRecord(args: {
|
|
|
33
34
|
sessionId: string;
|
|
34
35
|
sliceId: number;
|
|
35
36
|
messages: PiMessage[];
|
|
37
|
+
/** Provenance for trailing newly committed messages, such as steering. */
|
|
38
|
+
trailingMessageProvenance?: PiMessageProvenance[];
|
|
36
39
|
loadedSkillNames?: string[];
|
|
37
40
|
logContext: SessionRecordLogContext;
|
|
38
|
-
|
|
41
|
+
actor?: Actor;
|
|
39
42
|
surface?: AgentTurnSurface;
|
|
40
43
|
turnStartMessageIndex?: number;
|
|
41
44
|
}): Promise<boolean>;
|
|
@@ -62,7 +65,7 @@ export declare function persistCompletedSessionRecord(args: {
|
|
|
62
65
|
allMessages: PiMessage[];
|
|
63
66
|
loadedSkillNames?: string[];
|
|
64
67
|
logContext: SessionRecordLogContext;
|
|
65
|
-
|
|
68
|
+
actor?: Actor;
|
|
66
69
|
surface?: AgentTurnSurface;
|
|
67
70
|
turnStartMessageIndex?: number;
|
|
68
71
|
}): Promise<void>;
|
|
@@ -76,7 +79,7 @@ export declare function completeDeliveredTurn(args: {
|
|
|
76
79
|
loadedSkillNames?: string[];
|
|
77
80
|
logContext: SessionRecordLogContext;
|
|
78
81
|
messages: PiMessage[];
|
|
79
|
-
|
|
82
|
+
actor?: Actor;
|
|
80
83
|
sessionId: string;
|
|
81
84
|
sliceId: number;
|
|
82
85
|
source: Source;
|
|
@@ -101,7 +104,7 @@ export declare function persistAuthPauseSessionRecord(args: {
|
|
|
101
104
|
loadedSkillNames?: string[];
|
|
102
105
|
errorMessage: string;
|
|
103
106
|
logContext: SessionRecordLogContext;
|
|
104
|
-
|
|
107
|
+
actor?: Actor;
|
|
105
108
|
surface?: AgentTurnSurface;
|
|
106
109
|
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
107
110
|
/**
|
|
@@ -121,7 +124,7 @@ export declare function persistTimeoutSessionRecord(args: {
|
|
|
121
124
|
loadedSkillNames?: string[];
|
|
122
125
|
errorMessage: string;
|
|
123
126
|
logContext: SessionRecordLogContext;
|
|
124
|
-
|
|
127
|
+
actor?: Actor;
|
|
125
128
|
surface?: AgentTurnSurface;
|
|
126
129
|
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
127
130
|
/**
|
|
@@ -140,7 +143,7 @@ export declare function persistYieldSessionRecord(args: {
|
|
|
140
143
|
loadedSkillNames?: string[];
|
|
141
144
|
errorMessage: string;
|
|
142
145
|
logContext: SessionRecordLogContext;
|
|
143
|
-
|
|
146
|
+
actor?: Actor;
|
|
144
147
|
surface?: AgentTurnSurface;
|
|
145
148
|
}): Promise<AgentTurnSessionRecord | undefined>;
|
|
146
149
|
export {};
|
|
@@ -27,7 +27,7 @@ export declare function maybeUpdateAssistantTitle(args: {
|
|
|
27
27
|
generateThreadTitle: ConversationMemoryService["generateThreadTitle"];
|
|
28
28
|
getSlackAdapter: () => Pick<SlackAdapter, "setAssistantTitle">;
|
|
29
29
|
modelId: string;
|
|
30
|
-
|
|
30
|
+
actorId?: string;
|
|
31
31
|
runId?: string;
|
|
32
32
|
threadId?: string;
|
|
33
33
|
}): Promise<{
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/** Escape dynamic text for Slack mrkdwn without changing intended formatting. */
|
|
2
|
+
export declare function escapeSlackMrkdwnText(text: string): string;
|
|
3
|
+
/** Escape a URL for Slack explicit link syntax while preserving query semantics. */
|
|
4
|
+
export declare function escapeSlackLinkUrl(url: string): string;
|
|
5
|
+
/** Build a Slack explicit link from dynamic URL and label values. */
|
|
6
|
+
export declare function formatSlackLink(url: string, label: string): string;
|
|
1
7
|
/** Insert blank lines between content blocks so Slack renders them with visual separation. */
|
|
2
8
|
export declare function ensureBlockSpacing(text: string): string;
|
|
3
9
|
/**
|
|
@@ -1,4 +1,44 @@
|
|
|
1
1
|
import type { SlackToolContext } from "@/chat/slack/tools/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
|
-
export declare function createSlackCanvasCreateTool(context: SlackToolContext, state: ToolState): import("../../../tools/definition").AnyToolDefinition
|
|
4
|
+
export declare function createSlackCanvasCreateTool(context: SlackToolContext, state: ToolState): Omit<import("../../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
5
|
+
inputSchema: import("../../../tools/definition").JsonSchemaObject;
|
|
6
|
+
outputSchema: import("../../../tools/definition").JsonSchemaObject;
|
|
7
|
+
prepareArguments(args: unknown): {
|
|
8
|
+
title: string;
|
|
9
|
+
markdown: string;
|
|
10
|
+
};
|
|
11
|
+
execute?: ((input: unknown, options: import("../../../tools/definition").ToolExecuteOptions) => {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
ok: boolean;
|
|
14
|
+
status: "error" | "success";
|
|
15
|
+
target?: string | undefined;
|
|
16
|
+
data?: unknown;
|
|
17
|
+
truncated?: boolean | undefined;
|
|
18
|
+
continuation?: {
|
|
19
|
+
arguments: Record<string, unknown>;
|
|
20
|
+
reason?: string | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
error?: string | {
|
|
23
|
+
kind: string;
|
|
24
|
+
message: string;
|
|
25
|
+
retryable?: boolean | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
} | Promise<{
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
ok: boolean;
|
|
30
|
+
status: "error" | "success";
|
|
31
|
+
target?: string | undefined;
|
|
32
|
+
data?: unknown;
|
|
33
|
+
truncated?: boolean | undefined;
|
|
34
|
+
continuation?: {
|
|
35
|
+
arguments: Record<string, unknown>;
|
|
36
|
+
reason?: string | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
error?: string | {
|
|
39
|
+
kind: string;
|
|
40
|
+
message: string;
|
|
41
|
+
retryable?: boolean | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}>) | undefined;
|
|
44
|
+
};
|
|
@@ -1,3 +1,62 @@
|
|
|
1
1
|
import type { ToolState } from "@/chat/tools/types";
|
|
2
2
|
/** Create a tool that edits a Slack canvas like a markdown file. */
|
|
3
|
-
export declare function createSlackCanvasEditTool(state: ToolState): import("../../../tools/definition").AnyToolDefinition
|
|
3
|
+
export declare function createSlackCanvasEditTool(state: ToolState): 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
|
+
canvas: string;
|
|
8
|
+
edits: {
|
|
9
|
+
oldText: string;
|
|
10
|
+
newText: string;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
execute?: ((input: unknown, options: import("../../../tools/definition").ToolExecuteOptions) => {
|
|
14
|
+
ok: boolean;
|
|
15
|
+
status: "error" | "success";
|
|
16
|
+
target?: string | undefined;
|
|
17
|
+
data?: unknown;
|
|
18
|
+
truncated?: boolean | undefined;
|
|
19
|
+
continuation?: {
|
|
20
|
+
arguments: Record<string, unknown>;
|
|
21
|
+
reason?: string | undefined;
|
|
22
|
+
} | undefined;
|
|
23
|
+
error?: string | {
|
|
24
|
+
kind: string;
|
|
25
|
+
message: string;
|
|
26
|
+
retryable?: boolean | undefined;
|
|
27
|
+
} | undefined;
|
|
28
|
+
canvas_id?: string | undefined;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
permalink?: string | undefined;
|
|
31
|
+
diff?: string | undefined;
|
|
32
|
+
first_changed_line?: number | undefined;
|
|
33
|
+
replacements?: number | undefined;
|
|
34
|
+
normalized_heading_count?: number | undefined;
|
|
35
|
+
summary?: string | undefined;
|
|
36
|
+
deduplicated?: boolean | undefined;
|
|
37
|
+
} | Promise<{
|
|
38
|
+
ok: boolean;
|
|
39
|
+
status: "error" | "success";
|
|
40
|
+
target?: string | undefined;
|
|
41
|
+
data?: unknown;
|
|
42
|
+
truncated?: boolean | undefined;
|
|
43
|
+
continuation?: {
|
|
44
|
+
arguments: Record<string, unknown>;
|
|
45
|
+
reason?: string | undefined;
|
|
46
|
+
} | undefined;
|
|
47
|
+
error?: string | {
|
|
48
|
+
kind: string;
|
|
49
|
+
message: string;
|
|
50
|
+
retryable?: boolean | undefined;
|
|
51
|
+
} | undefined;
|
|
52
|
+
canvas_id?: string | undefined;
|
|
53
|
+
title?: string | undefined;
|
|
54
|
+
permalink?: string | undefined;
|
|
55
|
+
diff?: string | undefined;
|
|
56
|
+
first_changed_line?: number | undefined;
|
|
57
|
+
replacements?: number | undefined;
|
|
58
|
+
normalized_heading_count?: number | undefined;
|
|
59
|
+
summary?: string | undefined;
|
|
60
|
+
deduplicated?: boolean | undefined;
|
|
61
|
+
}>) | undefined;
|
|
62
|
+
};
|
|
@@ -3,4 +3,63 @@
|
|
|
3
3
|
* either a canvas/file ID (`F...`) or a Slack canvas/docs URL and returns the
|
|
4
4
|
* canvas body downloaded via the bot's file access.
|
|
5
5
|
*/
|
|
6
|
-
export declare function createSlackCanvasReadTool(): import("../../../tools/definition").AnyToolDefinition
|
|
6
|
+
export declare function createSlackCanvasReadTool(): Omit<import("../../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
7
|
+
inputSchema: import("../../../tools/definition").JsonSchemaObject;
|
|
8
|
+
outputSchema: import("../../../tools/definition").JsonSchemaObject;
|
|
9
|
+
prepareArguments(args: unknown): {
|
|
10
|
+
canvas: string;
|
|
11
|
+
offset?: number | undefined;
|
|
12
|
+
limit?: number | undefined;
|
|
13
|
+
};
|
|
14
|
+
execute?: ((input: unknown, options: import("../../../tools/definition").ToolExecuteOptions) => {
|
|
15
|
+
ok: boolean;
|
|
16
|
+
status: "error" | "success";
|
|
17
|
+
target?: string | undefined;
|
|
18
|
+
data?: unknown;
|
|
19
|
+
truncated?: boolean | undefined;
|
|
20
|
+
continuation?: {
|
|
21
|
+
arguments: Record<string, unknown>;
|
|
22
|
+
reason?: string | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
error?: string | {
|
|
25
|
+
kind: string;
|
|
26
|
+
message: string;
|
|
27
|
+
retryable?: boolean | undefined;
|
|
28
|
+
} | undefined;
|
|
29
|
+
canvas_id?: string | undefined;
|
|
30
|
+
title?: string | undefined;
|
|
31
|
+
permalink?: string | undefined;
|
|
32
|
+
mimetype?: string | undefined;
|
|
33
|
+
filetype?: string | undefined;
|
|
34
|
+
original_byte_length?: number | undefined;
|
|
35
|
+
content?: string | undefined;
|
|
36
|
+
start_line?: number | undefined;
|
|
37
|
+
end_line?: number | undefined;
|
|
38
|
+
total_lines?: number | undefined;
|
|
39
|
+
} | Promise<{
|
|
40
|
+
ok: boolean;
|
|
41
|
+
status: "error" | "success";
|
|
42
|
+
target?: string | undefined;
|
|
43
|
+
data?: unknown;
|
|
44
|
+
truncated?: boolean | undefined;
|
|
45
|
+
continuation?: {
|
|
46
|
+
arguments: Record<string, unknown>;
|
|
47
|
+
reason?: string | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
error?: string | {
|
|
50
|
+
kind: string;
|
|
51
|
+
message: string;
|
|
52
|
+
retryable?: boolean | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
canvas_id?: string | undefined;
|
|
55
|
+
title?: string | undefined;
|
|
56
|
+
permalink?: string | undefined;
|
|
57
|
+
mimetype?: string | undefined;
|
|
58
|
+
filetype?: string | undefined;
|
|
59
|
+
original_byte_length?: number | undefined;
|
|
60
|
+
content?: string | undefined;
|
|
61
|
+
start_line?: number | undefined;
|
|
62
|
+
end_line?: number | undefined;
|
|
63
|
+
total_lines?: number | undefined;
|
|
64
|
+
}>) | undefined;
|
|
65
|
+
};
|
|
@@ -1,3 +1,43 @@
|
|
|
1
1
|
import type { ToolState } from "@/chat/tools/types";
|
|
2
2
|
/** Create a tool that deliberately replaces a Slack canvas body. */
|
|
3
|
-
export declare function createSlackCanvasWriteTool(state: ToolState): import("../../../tools/definition").AnyToolDefinition
|
|
3
|
+
export declare function createSlackCanvasWriteTool(state: ToolState): 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
|
+
canvas: string;
|
|
8
|
+
content: string;
|
|
9
|
+
};
|
|
10
|
+
execute?: ((input: unknown, options: import("../../../tools/definition").ToolExecuteOptions) => {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
ok: boolean;
|
|
13
|
+
status: "error" | "success";
|
|
14
|
+
target?: string | undefined;
|
|
15
|
+
data?: unknown;
|
|
16
|
+
truncated?: boolean | undefined;
|
|
17
|
+
continuation?: {
|
|
18
|
+
arguments: Record<string, unknown>;
|
|
19
|
+
reason?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
error?: string | {
|
|
22
|
+
kind: string;
|
|
23
|
+
message: string;
|
|
24
|
+
retryable?: boolean | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
} | Promise<{
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
ok: boolean;
|
|
29
|
+
status: "error" | "success";
|
|
30
|
+
target?: string | undefined;
|
|
31
|
+
data?: unknown;
|
|
32
|
+
truncated?: boolean | undefined;
|
|
33
|
+
continuation?: {
|
|
34
|
+
arguments: Record<string, unknown>;
|
|
35
|
+
reason?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
error?: string | {
|
|
38
|
+
kind: string;
|
|
39
|
+
message: string;
|
|
40
|
+
retryable?: boolean | undefined;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}>) | undefined;
|
|
43
|
+
};
|
|
@@ -1,3 +1,47 @@
|
|
|
1
1
|
import type { SlackToolContext } from "@/chat/slack/tools/context";
|
|
2
2
|
/** Create the active-channel history tool with preflight timestamp normalization. */
|
|
3
|
-
export declare function createSlackChannelListMessagesTool(context: SlackToolContext): import("../../tools/definition").AnyToolDefinition
|
|
3
|
+
export declare function createSlackChannelListMessagesTool(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
|
+
limit?: number | undefined;
|
|
8
|
+
cursor?: string | undefined;
|
|
9
|
+
oldest?: string | undefined;
|
|
10
|
+
latest?: string | undefined;
|
|
11
|
+
inclusive?: boolean | undefined;
|
|
12
|
+
max_pages?: number | undefined;
|
|
13
|
+
};
|
|
14
|
+
execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
|
|
15
|
+
[x: string]: unknown;
|
|
16
|
+
ok: boolean;
|
|
17
|
+
status: "error" | "success";
|
|
18
|
+
target?: string | undefined;
|
|
19
|
+
data?: unknown;
|
|
20
|
+
truncated?: boolean | undefined;
|
|
21
|
+
continuation?: {
|
|
22
|
+
arguments: Record<string, unknown>;
|
|
23
|
+
reason?: string | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
error?: string | {
|
|
26
|
+
kind: string;
|
|
27
|
+
message: string;
|
|
28
|
+
retryable?: boolean | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
} | Promise<{
|
|
31
|
+
[x: string]: unknown;
|
|
32
|
+
ok: boolean;
|
|
33
|
+
status: "error" | "success";
|
|
34
|
+
target?: string | undefined;
|
|
35
|
+
data?: unknown;
|
|
36
|
+
truncated?: boolean | undefined;
|
|
37
|
+
continuation?: {
|
|
38
|
+
arguments: Record<string, unknown>;
|
|
39
|
+
reason?: string | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
error?: string | {
|
|
42
|
+
kind: string;
|
|
43
|
+
message: string;
|
|
44
|
+
retryable?: boolean | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
}>) | undefined;
|
|
47
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
2
2
|
import type { SlackDestination } from "@sentry/junior-plugin-api";
|
|
3
3
|
import type { SlackSource } from "@sentry/junior-plugin-api";
|
|
4
|
-
import type {
|
|
4
|
+
import type { SlackActor } from "@/chat/actor";
|
|
5
5
|
import { type SlackChannelId, type SlackTeamId } from "@/chat/slack/ids";
|
|
6
6
|
import { type SlackMessageTs } from "@/chat/slack/timestamp";
|
|
7
7
|
export interface SlackToolContext {
|
|
8
8
|
destination: SlackDestination;
|
|
9
9
|
source: SlackSource;
|
|
10
|
-
|
|
10
|
+
actor?: SlackActor;
|
|
11
11
|
destinationChannelId: SlackChannelId;
|
|
12
12
|
messageTs?: SlackMessageTs;
|
|
13
13
|
sourceChannelId: SlackChannelId;
|
|
14
14
|
teamId: SlackTeamId;
|
|
15
15
|
threadTs?: SlackMessageTs;
|
|
16
16
|
}
|
|
17
|
-
/** Resolve Slack-specific tool context from the active source/destination/
|
|
17
|
+
/** Resolve Slack-specific tool context from the active source/destination/actor. */
|
|
18
18
|
export declare function getSlackToolContext(context: ToolRuntimeContext): SlackToolContext | undefined;
|
|
@@ -1,3 +1,44 @@
|
|
|
1
1
|
import type { ToolState } from "@/chat/tools/types";
|
|
2
2
|
/** Create a tool that appends items to the active Slack list. */
|
|
3
|
-
export declare function createSlackListAddItemsTool(state: ToolState): import("../../../tools/definition").AnyToolDefinition
|
|
3
|
+
export declare function createSlackListAddItemsTool(state: ToolState): 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
|
+
items: string[];
|
|
8
|
+
assignee_user_id?: string | undefined;
|
|
9
|
+
due_date?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
execute?: ((input: unknown, options: import("../../../tools/definition").ToolExecuteOptions) => {
|
|
12
|
+
[x: string]: unknown;
|
|
13
|
+
ok: boolean;
|
|
14
|
+
status: "error" | "success";
|
|
15
|
+
target?: string | undefined;
|
|
16
|
+
data?: unknown;
|
|
17
|
+
truncated?: boolean | undefined;
|
|
18
|
+
continuation?: {
|
|
19
|
+
arguments: Record<string, unknown>;
|
|
20
|
+
reason?: string | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
error?: string | {
|
|
23
|
+
kind: string;
|
|
24
|
+
message: string;
|
|
25
|
+
retryable?: boolean | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
} | Promise<{
|
|
28
|
+
[x: string]: unknown;
|
|
29
|
+
ok: boolean;
|
|
30
|
+
status: "error" | "success";
|
|
31
|
+
target?: string | undefined;
|
|
32
|
+
data?: unknown;
|
|
33
|
+
truncated?: boolean | undefined;
|
|
34
|
+
continuation?: {
|
|
35
|
+
arguments: Record<string, unknown>;
|
|
36
|
+
reason?: string | undefined;
|
|
37
|
+
} | undefined;
|
|
38
|
+
error?: string | {
|
|
39
|
+
kind: string;
|
|
40
|
+
message: string;
|
|
41
|
+
retryable?: boolean | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}>) | undefined;
|
|
44
|
+
};
|
|
@@ -1,3 +1,42 @@
|
|
|
1
1
|
import type { ToolState } from "@/chat/tools/types";
|
|
2
2
|
/** Create a tool that provisions a new Slack todo list. */
|
|
3
|
-
export declare function createSlackListCreateTool(state: ToolState): import("../../../tools/definition").AnyToolDefinition
|
|
3
|
+
export declare function createSlackListCreateTool(state: ToolState): 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
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
execute?: ((input: unknown, options: import("../../../tools/definition").ToolExecuteOptions) => {
|
|
10
|
+
[x: string]: unknown;
|
|
11
|
+
ok: boolean;
|
|
12
|
+
status: "error" | "success";
|
|
13
|
+
target?: string | undefined;
|
|
14
|
+
data?: unknown;
|
|
15
|
+
truncated?: boolean | undefined;
|
|
16
|
+
continuation?: {
|
|
17
|
+
arguments: Record<string, unknown>;
|
|
18
|
+
reason?: string | undefined;
|
|
19
|
+
} | undefined;
|
|
20
|
+
error?: string | {
|
|
21
|
+
kind: string;
|
|
22
|
+
message: string;
|
|
23
|
+
retryable?: boolean | undefined;
|
|
24
|
+
} | undefined;
|
|
25
|
+
} | Promise<{
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
ok: boolean;
|
|
28
|
+
status: "error" | "success";
|
|
29
|
+
target?: string | undefined;
|
|
30
|
+
data?: unknown;
|
|
31
|
+
truncated?: boolean | undefined;
|
|
32
|
+
continuation?: {
|
|
33
|
+
arguments: Record<string, unknown>;
|
|
34
|
+
reason?: string | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
error?: string | {
|
|
37
|
+
kind: string;
|
|
38
|
+
message: string;
|
|
39
|
+
retryable?: boolean | undefined;
|
|
40
|
+
} | undefined;
|
|
41
|
+
}>) | undefined;
|
|
42
|
+
};
|