@sentry/junior 0.155.0 → 0.157.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-AWVTLAV2.js → agent-hooks-QI5EPOKQ.js} +10 -10
- package/dist/api/conversations/attachments.d.ts +32 -0
- package/dist/api/conversations/priority.d.ts +21 -0
- package/dist/api/conversations/routes.d.ts +4 -1
- package/dist/api/locations/detail.d.ts +4 -1
- package/dist/api/schema/conversation.d.ts +33 -8
- package/dist/api/schema/location.d.ts +4 -1
- package/dist/api/schema/person.d.ts +4 -1
- package/dist/api/schema/task.d.ts +8 -8
- package/dist/api/schema.js +1 -1
- package/dist/api.js +182 -48
- package/dist/app.js +128 -44
- package/dist/{catalog-runtime-V6YD6KH5.js → catalog-runtime-HUGHAFUN.js} +5 -5
- package/dist/chat/agent/types.d.ts +2 -0
- package/dist/chat/agent-invocations/types.d.ts +12 -12
- package/dist/chat/attachments/storage.d.ts +14 -0
- package/dist/chat/attachments/store.d.ts +68 -0
- package/dist/chat/attachments/vercel.d.ts +3 -0
- package/dist/chat/conversations/retention.d.ts +4 -0
- package/dist/chat/event-tasks/tool-support.d.ts +1 -1
- package/dist/chat/event-tasks/types.d.ts +1 -1
- package/dist/chat/ingress/bot-mention.d.ts +13 -0
- package/dist/chat/plugins/unfinished-work.d.ts +11 -0
- package/dist/chat/runtime/agent-runner.d.ts +2 -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/services/conversation-memory.d.ts +1 -1
- package/dist/chat/slack/tools/send-files.d.ts +17 -11
- package/dist/chat/state/conversation.d.ts +2 -1
- package/dist/chat/task-execution/slack-work.d.ts +2 -2
- package/dist/chat/tools/types.d.ts +2 -0
- package/dist/{chunk-773XC7P4.js → chunk-3GS7O66Z.js} +159 -128
- package/dist/{chunk-JFZBGFNX.js → chunk-46ADYIPE.js} +2 -1
- package/dist/{chunk-KTVHAHUV.js → chunk-4M25PSFB.js} +1 -1
- package/dist/{chunk-4K5N6HTX.js → chunk-5TIH5GOE.js} +5 -5
- package/dist/{chunk-TVXAN43I.js → chunk-6MI43QZO.js} +1 -1
- package/dist/{chunk-RN3AWYEP.js → chunk-77QB5FNI.js} +1 -1
- package/dist/{chunk-Y7ZUBP2K.js → chunk-7J65DOBL.js} +6 -6
- package/dist/{chunk-2AHVM3HK.js → chunk-AFQ47JQ7.js} +10 -8
- package/dist/{chunk-ELOTIL5F.js → chunk-BLCVTEE7.js} +4 -4
- package/dist/{chunk-ZLSFOSDK.js → chunk-CZCMFRUQ.js} +18 -1
- package/dist/{chunk-2WLJDM23.js → chunk-D7BNWRYL.js} +1 -1
- package/dist/{chunk-EORR34UB.js → chunk-F7VOY4VQ.js} +1 -1
- package/dist/{chunk-JJX77MB7.js → chunk-G2FN3I66.js} +3 -3
- package/dist/{chunk-J2SYI36O.js → chunk-GEY6IFXH.js} +4 -4
- package/dist/{chunk-37G5HJ2X.js → chunk-GO2W3VZY.js} +4 -4
- package/dist/{chunk-LQT3SWFA.js → chunk-HJ3EZHIX.js} +351 -5
- package/dist/{chunk-SDRJ2LE3.js → chunk-I3OQVVMV.js} +1 -1
- package/dist/{chunk-TKJ7277U.js → chunk-MDZQ62PB.js} +2 -2
- package/dist/{chunk-V57LZDHN.js → chunk-MGJW3SW4.js} +6 -6
- package/dist/{chunk-7NYEB2TM.js → chunk-MKA3T2R6.js} +1 -1
- package/dist/{chunk-RQ62VKM7.js → chunk-MXO6VFB3.js} +1 -1
- package/dist/{chunk-AENPRXCG.js → chunk-OWASYHHV.js} +68 -39
- package/dist/{chunk-UWTXAYBP.js → chunk-PP4UQTH3.js} +9 -9
- package/dist/{chunk-JIC33O5L.js → chunk-RQBRGPUF.js} +2 -2
- package/dist/{chunk-NWSKFYOH.js → chunk-S4PFOWRA.js} +1 -1
- package/dist/{chunk-NKFRRZIT.js → chunk-TA5R6BME.js} +19 -18
- package/dist/{chunk-XFZLQANQ.js → chunk-UJYA75N5.js} +2 -2
- package/dist/{chunk-Y6MVGU7L.js → chunk-VBKFO65J.js} +35 -10
- package/dist/{chunk-KBT2I5ER.js → chunk-VDAEXEBB.js} +6 -6
- package/dist/{chunk-J7MWZFFP.js → chunk-VIBHFGQC.js} +4 -4
- package/dist/{chunk-APHDJYN7.js → chunk-VYDM7HUF.js} +1 -1
- package/dist/{chunk-CPQBTTI6.js → chunk-WNNYOPXX.js} +5 -5
- package/dist/{chunk-MLBH7J7J.js → chunk-XRERMHPN.js} +1 -1
- package/dist/cli/chat.js +30 -30
- 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 +4 -4
- package/dist/db/schema/attachments.d.ts +178 -0
- package/dist/db/schema.d.ts +183 -5
- package/dist/{db-WT7P56AH.js → db-VQAV4PJ3.js} +7 -7
- package/dist/handlers/retention.d.ts +4 -1
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-R2PK2MCA.js → oauth-callback-server-K5KQAAAX.js} +23 -23
- package/dist/{runner-O7YYUIHT.js → runner-U7QI7P4S.js} +14 -15
- package/dist/{skills-S6HLQRH7.js → skills-ENKRBZ7K.js} +6 -6
- package/dist/spawn-4XGNONLS.js +37 -0
- package/dist/{validation-46WD2OAR.js → validation-VKCDVGA6.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-YT5QUBS3.js → work-IBD6PWP2.js} +17 -17
- package/dist/worker-TJFXOZRC.js +24 -0
- package/migrations/0027_attachment_storage.sql +16 -0
- package/migrations/meta/0027_snapshot.json +2554 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +5 -4
- package/dist/spawn-B4SBFFA2.js +0 -37
- package/dist/worker-4C5BEDWN.js +0 -24
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AttachmentStorage } from "@/chat/attachments/storage";
|
|
1
2
|
import type { JuniorSqlDatabase } from "@/db/db";
|
|
2
3
|
/** Content retention windows keyed by resolved conversation visibility. */
|
|
3
4
|
export declare const CONTENT_RETENTION_MS: {
|
|
@@ -6,6 +7,8 @@ export declare const CONTENT_RETENTION_MS: {
|
|
|
6
7
|
};
|
|
7
8
|
/** Aggregate outcome of one bounded retention purge batch. */
|
|
8
9
|
export interface RetentionPurgeResult {
|
|
10
|
+
/** Attachment blobs removed after conversation content was purged. */
|
|
11
|
+
attachments: number;
|
|
9
12
|
/** Root conversations examined and attempted this run. */
|
|
10
13
|
scanned: number;
|
|
11
14
|
/** Root trees successfully purged. */
|
|
@@ -22,6 +25,7 @@ export interface RetentionPurgeResult {
|
|
|
22
25
|
* remainder of an over-limit backlog is left for the next run.
|
|
23
26
|
*/
|
|
24
27
|
export declare function runRetentionPurge(executor: JuniorSqlDatabase, args: {
|
|
28
|
+
attachmentStorage?: AttachmentStorage;
|
|
25
29
|
nowMs: number;
|
|
26
30
|
limit?: number;
|
|
27
31
|
}): Promise<RetentionPurgeResult>;
|
|
@@ -92,7 +92,7 @@ export declare function requireEventTaskSlackContext(context: ToolRuntimeContext
|
|
|
92
92
|
platform: "slack";
|
|
93
93
|
teamId: string;
|
|
94
94
|
channelId: string;
|
|
95
|
-
visibility: "
|
|
95
|
+
visibility: "private" | "public";
|
|
96
96
|
messageTs?: string | undefined;
|
|
97
97
|
threadTs?: string | undefined;
|
|
98
98
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detect Slack bot @mentions that should activate Junior.
|
|
3
|
+
*
|
|
4
|
+
* Mentions inside inline code or fenced code blocks are display-only
|
|
5
|
+
* references. Slack can still deliver `app_mention` for those tokens, so
|
|
6
|
+
* both `message` and `app_mention` paths must use this check.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Return true when `text` contains a Slack bot mention token outside code.
|
|
10
|
+
*
|
|
11
|
+
* Slack encodes user mentions as `<@UXXXXXXXX>` or `<@UXXXXXXXX|label>`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function textMentionsBot(text: string, botUserId: string): boolean;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
+
export type ConversationWork = {
|
|
2
|
+
assignedIds: string[];
|
|
3
|
+
/** Latest finish time per conversation, used with activity for Priority. */
|
|
4
|
+
finishedAtById: Record<string, string>;
|
|
5
|
+
unfinishedIds: string[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Return assigned and unfinished plugin work for the candidate conversations.
|
|
9
|
+
* Feed Priority combines these signals with conversation activity on the host.
|
|
10
|
+
*/
|
|
11
|
+
export declare function listConversationWork(conversationIds: string[]): Promise<ConversationWork>;
|
|
1
12
|
/** Return candidate conversations that have unfinished plugin work. */
|
|
2
13
|
export declare function listUnfinishedWork(conversationIds: string[]): Promise<string[]>;
|
|
@@ -2,12 +2,14 @@ import type { StreamFn } from "@earendil-works/pi-agent-core";
|
|
|
2
2
|
import { type AgentRun, type SpawnAgent } from "@/chat/agent/types";
|
|
3
3
|
import type { AgentRunOutcome } from "@/chat/runtime/agent-run-outcome";
|
|
4
4
|
import type { SandboxEgressTracePropagationConfig } from "@/chat/sandbox/egress/tracing";
|
|
5
|
+
import type { AttachmentStorage } from "@/chat/attachments/storage";
|
|
5
6
|
/** Run one agent-run slice behind runtime-owned orchestration boundaries. */
|
|
6
7
|
export interface AgentRunner {
|
|
7
8
|
run(run: AgentRun): Promise<AgentRunOutcome>;
|
|
8
9
|
}
|
|
9
10
|
/** Compose the agent executor with stable host dependencies. */
|
|
10
11
|
export declare function createAgentRunner(execute: (run: AgentRun, streamFn?: StreamFn) => Promise<AgentRunOutcome>, options?: {
|
|
12
|
+
attachmentStorage?: AttachmentStorage;
|
|
11
13
|
bindSpawnAgent?: (run: AgentRun) => SpawnAgent | undefined;
|
|
12
14
|
streamFn?: StreamFn;
|
|
13
15
|
tracePropagation?: SandboxEgressTracePropagationConfig;
|
|
@@ -41,8 +41,8 @@ declare const compactTaskResultSchema: z.ZodObject<{
|
|
|
41
41
|
group: "group";
|
|
42
42
|
}>;
|
|
43
43
|
visibility: z.ZodEnum<{
|
|
44
|
-
public: "public";
|
|
45
44
|
private: "private";
|
|
45
|
+
public: "public";
|
|
46
46
|
}>;
|
|
47
47
|
}, z.core.$strict>;
|
|
48
48
|
credential_mode: z.ZodEnum<{
|
|
@@ -86,8 +86,8 @@ export declare const scheduleTaskToolResultSchema: z.ZodObject<{
|
|
|
86
86
|
group: "group";
|
|
87
87
|
}>;
|
|
88
88
|
visibility: z.ZodEnum<{
|
|
89
|
-
public: "public";
|
|
90
89
|
private: "private";
|
|
90
|
+
public: "public";
|
|
91
91
|
}>;
|
|
92
92
|
}, z.core.$strict>;
|
|
93
93
|
credential_mode: z.ZodEnum<{
|
|
@@ -131,8 +131,8 @@ export declare const scheduleListToolResultSchema: z.ZodObject<{
|
|
|
131
131
|
group: "group";
|
|
132
132
|
}>;
|
|
133
133
|
visibility: z.ZodEnum<{
|
|
134
|
-
public: "public";
|
|
135
134
|
private: "private";
|
|
135
|
+
public: "public";
|
|
136
136
|
}>;
|
|
137
137
|
}, z.core.$strict>;
|
|
138
138
|
credential_mode: z.ZodEnum<{
|
|
@@ -181,7 +181,7 @@ export declare function scheduleTaskToolResult(target: string, task: CompactTask
|
|
|
181
181
|
};
|
|
182
182
|
conversation_access: {
|
|
183
183
|
audience: "channel" | "direct" | "group";
|
|
184
|
-
visibility: "
|
|
184
|
+
visibility: "private" | "public";
|
|
185
185
|
};
|
|
186
186
|
credential_mode: "system" | "creator";
|
|
187
187
|
dashboard_url: string | null;
|
|
@@ -211,7 +211,7 @@ export declare function scheduleListToolResult(args: {
|
|
|
211
211
|
};
|
|
212
212
|
conversation_access: {
|
|
213
213
|
audience: "channel" | "direct" | "group";
|
|
214
|
-
visibility: "
|
|
214
|
+
visibility: "private" | "public";
|
|
215
215
|
};
|
|
216
216
|
credential_mode: "system" | "creator";
|
|
217
217
|
dashboard_url: string | null;
|
|
@@ -48,7 +48,7 @@ export declare function createSlackScheduleCreateTaskTool(context: SchedulerTool
|
|
|
48
48
|
};
|
|
49
49
|
conversation_access: {
|
|
50
50
|
audience: "channel" | "direct" | "group";
|
|
51
|
-
visibility: "
|
|
51
|
+
visibility: "private" | "public";
|
|
52
52
|
};
|
|
53
53
|
credential_mode: "system" | "creator";
|
|
54
54
|
dashboard_url: string | null;
|
|
@@ -78,7 +78,7 @@ export declare function createSlackScheduleCreateTaskTool(context: SchedulerTool
|
|
|
78
78
|
};
|
|
79
79
|
conversation_access: {
|
|
80
80
|
audience: "channel" | "direct" | "group";
|
|
81
|
-
visibility: "
|
|
81
|
+
visibility: "private" | "public";
|
|
82
82
|
};
|
|
83
83
|
credential_mode: "system" | "creator";
|
|
84
84
|
dashboard_url: string | null;
|
|
@@ -23,7 +23,7 @@ export declare function createSlackScheduleDeleteTaskTool(context: SchedulerTool
|
|
|
23
23
|
};
|
|
24
24
|
conversation_access: {
|
|
25
25
|
audience: "channel" | "direct" | "group";
|
|
26
|
-
visibility: "
|
|
26
|
+
visibility: "private" | "public";
|
|
27
27
|
};
|
|
28
28
|
credential_mode: "system" | "creator";
|
|
29
29
|
dashboard_url: string | null;
|
|
@@ -53,7 +53,7 @@ export declare function createSlackScheduleDeleteTaskTool(context: SchedulerTool
|
|
|
53
53
|
};
|
|
54
54
|
conversation_access: {
|
|
55
55
|
audience: "channel" | "direct" | "group";
|
|
56
|
-
visibility: "
|
|
56
|
+
visibility: "private" | "public";
|
|
57
57
|
};
|
|
58
58
|
credential_mode: "system" | "creator";
|
|
59
59
|
dashboard_url: string | null;
|
|
@@ -24,7 +24,7 @@ export declare function createSlackScheduleListTasksTool(context: SchedulerToolC
|
|
|
24
24
|
};
|
|
25
25
|
conversation_access: {
|
|
26
26
|
audience: "channel" | "direct" | "group";
|
|
27
|
-
visibility: "
|
|
27
|
+
visibility: "private" | "public";
|
|
28
28
|
};
|
|
29
29
|
credential_mode: "system" | "creator";
|
|
30
30
|
dashboard_url: string | null;
|
|
@@ -54,7 +54,7 @@ export declare function createSlackScheduleListTasksTool(context: SchedulerToolC
|
|
|
54
54
|
};
|
|
55
55
|
conversation_access: {
|
|
56
56
|
audience: "channel" | "direct" | "group";
|
|
57
|
-
visibility: "
|
|
57
|
+
visibility: "private" | "public";
|
|
58
58
|
};
|
|
59
59
|
credential_mode: "system" | "creator";
|
|
60
60
|
dashboard_url: string | null;
|
|
@@ -23,7 +23,7 @@ export declare function createSlackScheduleRunTaskNowTool(context: SchedulerTool
|
|
|
23
23
|
};
|
|
24
24
|
conversation_access: {
|
|
25
25
|
audience: "channel" | "direct" | "group";
|
|
26
|
-
visibility: "
|
|
26
|
+
visibility: "private" | "public";
|
|
27
27
|
};
|
|
28
28
|
credential_mode: "system" | "creator";
|
|
29
29
|
dashboard_url: string | null;
|
|
@@ -53,7 +53,7 @@ export declare function createSlackScheduleRunTaskNowTool(context: SchedulerTool
|
|
|
53
53
|
};
|
|
54
54
|
conversation_access: {
|
|
55
55
|
audience: "channel" | "direct" | "group";
|
|
56
|
-
visibility: "
|
|
56
|
+
visibility: "private" | "public";
|
|
57
57
|
};
|
|
58
58
|
credential_mode: "system" | "creator";
|
|
59
59
|
dashboard_url: string | null;
|
|
@@ -50,7 +50,7 @@ export declare function createSlackScheduleUpdateTaskTool(context: SchedulerTool
|
|
|
50
50
|
};
|
|
51
51
|
conversation_access: {
|
|
52
52
|
audience: "channel" | "direct" | "group";
|
|
53
|
-
visibility: "
|
|
53
|
+
visibility: "private" | "public";
|
|
54
54
|
};
|
|
55
55
|
credential_mode: "system" | "creator";
|
|
56
56
|
dashboard_url: string | null;
|
|
@@ -80,7 +80,7 @@ export declare function createSlackScheduleUpdateTaskTool(context: SchedulerTool
|
|
|
80
80
|
};
|
|
81
81
|
conversation_access: {
|
|
82
82
|
audience: "channel" | "direct" | "group";
|
|
83
|
-
visibility: "
|
|
83
|
+
visibility: "private" | "public";
|
|
84
84
|
};
|
|
85
85
|
credential_mode: "system" | "creator";
|
|
86
86
|
dashboard_url: string | null;
|
|
@@ -22,7 +22,7 @@ export declare function upsertConversationMessage(conversation: ThreadConversati
|
|
|
22
22
|
export declare function recordDeliveredAssistantMessage(args: {
|
|
23
23
|
conversation: ThreadConversationState;
|
|
24
24
|
sessionId: string;
|
|
25
|
-
source?: "web";
|
|
25
|
+
source?: "slack" | "web";
|
|
26
26
|
text: string;
|
|
27
27
|
userMessageId?: string;
|
|
28
28
|
}): string;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import type { AttachmentStorage } from "@/chat/attachments/storage";
|
|
2
|
+
import type { JuniorSqlDatabase } from "@/db/db";
|
|
1
3
|
import type { SlackToolContext } from "@/chat/slack/tool-support/context";
|
|
2
4
|
import { type SandboxFileMaterializationInput, type SandboxFileUpload } from "@/chat/tools/sandbox/file-uploads";
|
|
3
5
|
import type { ToolState } from "@/chat/tools/types";
|
|
4
6
|
/** Convert a model-supplied sandbox file path into bytes safe for Slack upload. */
|
|
5
7
|
export type MaterializeFile = (input: SandboxFileMaterializationInput) => Promise<SandboxFileUpload>;
|
|
6
8
|
/** Create the Slack side-effect tool for active-conversation file messages. */
|
|
7
|
-
export declare function createSendFilesTool(context: SlackToolContext, state: ToolState, materializeFile: MaterializeFile
|
|
9
|
+
export declare function createSendFilesTool(context: SlackToolContext, state: ToolState, materializeFile: MaterializeFile, attachments?: {
|
|
10
|
+
conversationId: string;
|
|
11
|
+
db: JuniorSqlDatabase;
|
|
12
|
+
storage: AttachmentStorage;
|
|
13
|
+
}): Omit<import("../../tools/definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
8
14
|
inputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
9
15
|
outputSchema: import("../../tools/definition").JsonSchemaObject;
|
|
10
16
|
prepareArguments(args: unknown): {
|
|
@@ -17,10 +23,11 @@ export declare function createSendFilesTool(context: SlackToolContext, state: To
|
|
|
17
23
|
};
|
|
18
24
|
execute?: ((input: unknown, options: import("../../tools/definition").ToolExecuteOptions) => {
|
|
19
25
|
[x: string]: unknown;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
attachment_refs: {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}[];
|
|
30
|
+
target?: string | undefined;
|
|
24
31
|
truncated?: boolean | undefined;
|
|
25
32
|
timed_out?: boolean | undefined;
|
|
26
33
|
continuation?: {
|
|
@@ -28,13 +35,13 @@ export declare function createSendFilesTool(context: SlackToolContext, state: To
|
|
|
28
35
|
reason?: string | undefined;
|
|
29
36
|
} | undefined;
|
|
30
37
|
deduplicated?: boolean | undefined;
|
|
31
|
-
file_ids?: string[] | undefined;
|
|
32
38
|
} | Promise<{
|
|
33
39
|
[x: string]: unknown;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
attachment_refs: {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
}[];
|
|
44
|
+
target?: string | undefined;
|
|
38
45
|
truncated?: boolean | undefined;
|
|
39
46
|
timed_out?: boolean | undefined;
|
|
40
47
|
continuation?: {
|
|
@@ -42,6 +49,5 @@ export declare function createSendFilesTool(context: SlackToolContext, state: To
|
|
|
42
49
|
reason?: string | undefined;
|
|
43
50
|
} | undefined;
|
|
44
51
|
deduplicated?: boolean | undefined;
|
|
45
|
-
file_ids?: string[] | undefined;
|
|
46
52
|
}>) | undefined;
|
|
47
53
|
};
|
|
@@ -8,7 +8,8 @@ export interface ConversationAuthor {
|
|
|
8
8
|
}
|
|
9
9
|
export interface ConversationMessageMeta {
|
|
10
10
|
attachmentCount?: number;
|
|
11
|
-
|
|
11
|
+
/** Known message provenance. Omit when unknown; never invent a default. */
|
|
12
|
+
source?: "slack" | "web";
|
|
12
13
|
eventType?: string;
|
|
13
14
|
explicitMention?: boolean;
|
|
14
15
|
imageAttachmentCount?: number;
|
|
@@ -72,9 +72,9 @@ declare const slackConversationMessageMetadataSchema: z.ZodUnion<readonly [z.Zod
|
|
|
72
72
|
adapterName: z.ZodLiteral<"slack">;
|
|
73
73
|
channelId: z.ZodString;
|
|
74
74
|
channelVisibility: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
private: "private";
|
|
75
76
|
unknown: "unknown";
|
|
76
77
|
external: "external";
|
|
77
|
-
private: "private";
|
|
78
78
|
workspace: "workspace";
|
|
79
79
|
}>>;
|
|
80
80
|
currentMessage: z.ZodOptional<z.ZodObject<{
|
|
@@ -182,9 +182,9 @@ declare const slackConversationMessageMetadataSchema: z.ZodUnion<readonly [z.Zod
|
|
|
182
182
|
adapterName: z.ZodLiteral<"slack">;
|
|
183
183
|
channelId: z.ZodString;
|
|
184
184
|
channelVisibility: z.ZodOptional<z.ZodEnum<{
|
|
185
|
+
private: "private";
|
|
185
186
|
unknown: "unknown";
|
|
186
187
|
external: "external";
|
|
187
|
-
private: "private";
|
|
188
188
|
workspace: "workspace";
|
|
189
189
|
}>>;
|
|
190
190
|
currentMessage: z.ZodOptional<z.ZodObject<{
|
|
@@ -10,6 +10,7 @@ import type { SlackActionToken } from "@/chat/slack/action-token";
|
|
|
10
10
|
import type { ModelProfile } from "@/chat/model-profile";
|
|
11
11
|
import type { GeneratedArtifactFileRef } from "@/chat/tools/sandbox/file-uploads";
|
|
12
12
|
import type { SpawnAgent } from "@/chat/agent/types";
|
|
13
|
+
import type { AttachmentStorage } from "@/chat/attachments/storage";
|
|
13
14
|
interface HandoffControl {
|
|
14
15
|
/** Non-empty catalog of configured targets. */
|
|
15
16
|
profiles: readonly [ModelProfile, ...ModelProfile[]];
|
|
@@ -52,6 +53,7 @@ export interface ToolHooks {
|
|
|
52
53
|
};
|
|
53
54
|
}
|
|
54
55
|
interface BaseToolRuntimeContext {
|
|
56
|
+
attachmentStorage?: AttachmentStorage;
|
|
55
57
|
handoff?: HandoffControl;
|
|
56
58
|
spawnAgent?: SpawnAgent;
|
|
57
59
|
/**
|