@sentry/junior 0.158.0 → 0.160.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-BOWFTDE5.js → agent-hooks-U6R3O2V4.js} +10 -10
- package/dist/api/conversations/cancel-pending-messages.d.ts +4 -0
- package/dist/api/conversations/events.d.ts +1 -1
- package/dist/api/schema/conversation.d.ts +45 -0
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +5 -1
- package/dist/api.js +96 -23
- package/dist/app.js +32 -32
- package/dist/{catalog-runtime-7GZ25WTR.js → catalog-runtime-HIDNHGOP.js} +5 -5
- package/dist/chat/conversations/history.d.ts +35 -2
- package/dist/chat/conversations/projection.d.ts +13 -0
- package/dist/chat/slack/mrkdwn.d.ts +2 -1
- package/dist/chat/slack/tools/send-files.d.ts +2 -2
- package/dist/chat/task-execution/state.d.ts +10 -0
- package/dist/chat/task-execution/store.d.ts +11 -0
- package/dist/chat/tool-support/action-review.d.ts +5 -4
- package/dist/chat/tools/search-conversation-events.d.ts +1 -1
- package/dist/{chunk-BNFGY66A.js → chunk-2MK6S2UA.js} +1 -1
- package/dist/{chunk-YEZS4TEY.js → chunk-2SFMRMDV.js} +1 -1
- package/dist/{chunk-4XJ2WSTI.js → chunk-3AHIB66R.js} +5 -5
- package/dist/{chunk-EQ6Y37MD.js → chunk-42E7432W.js} +1 -1
- package/dist/{chunk-SSU65ZTZ.js → chunk-472VVYYV.js} +1 -1
- package/dist/{chunk-VURJ2NSF.js → chunk-4UO3UAW7.js} +1 -1
- package/dist/{chunk-DTVTBZNP.js → chunk-56TFPTZU.js} +1 -1
- package/dist/{chunk-FA32YRZ3.js → chunk-756F567I.js} +5 -5
- package/dist/{chunk-UJ6N32ZM.js → chunk-BGVQGEKB.js} +4 -4
- package/dist/{chunk-UQJO35BP.js → chunk-FJR66CQT.js} +4 -4
- package/dist/{chunk-A7EDLNGU.js → chunk-FKMWPA4A.js} +55 -4
- package/dist/{chunk-6GJCOUTA.js → chunk-HDPH4CHJ.js} +1 -1
- package/dist/{chunk-FAJ6SMEE.js → chunk-J77DLAPE.js} +2 -2
- package/dist/{chunk-AF4PHIP6.js → chunk-JQZIUESN.js} +41 -10
- package/dist/{chunk-RCIKTZZF.js → chunk-LNUZXEEI.js} +1 -1
- package/dist/{chunk-EXITAVHO.js → chunk-M5HCOMDR.js} +90 -35
- package/dist/{chunk-KAFYW3O6.js → chunk-MBDWMEO6.js} +10 -10
- package/dist/{chunk-ROOTB7J7.js → chunk-OUAZDZTZ.js} +2 -2
- package/dist/{chunk-4JAOLUDB.js → chunk-P7W3ZL5J.js} +35 -6
- package/dist/{chunk-3A7VXSPJ.js → chunk-PVIM2RWO.js} +8 -8
- package/dist/{chunk-SAJPQLTY.js → chunk-PZUJPPON.js} +1 -1
- package/dist/{chunk-4Q6QVTKA.js → chunk-RJGRXDA7.js} +5 -5
- package/dist/{chunk-C3FYJZSA.js → chunk-RLOXMHLA.js} +40 -4
- package/dist/{chunk-UPPU3FQU.js → chunk-TBRJGMTO.js} +1 -1
- package/dist/{chunk-JEXQQLEC.js → chunk-TPFOVXRB.js} +18 -18
- package/dist/{chunk-NOEERHHR.js → chunk-U26KRMYX.js} +6 -6
- package/dist/{chunk-PHQDXC27.js → chunk-UNDTW2PY.js} +1 -1
- package/dist/{chunk-IEM3GFXL.js → chunk-URPLKXLG.js} +9 -9
- package/dist/{chunk-CZCMFRUQ.js → chunk-UYUS4L6F.js} +22 -0
- package/dist/{chunk-X4BLYIMV.js → chunk-WACYTIIK.js} +6 -6
- package/dist/{chunk-LUSAAJJA.js → chunk-XPX3DYG7.js} +2 -2
- package/dist/{chunk-IXYGGJRA.js → chunk-YPMDNE7R.js} +1 -1
- package/dist/{chunk-KSZXVR5G.js → chunk-ZNBGWMVQ.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-HFWTPYT7.js → db-2JKT3BB5.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-J3NW4QL5.js → oauth-callback-server-7MC2UMQC.js} +23 -23
- package/dist/{runner-CL6QHML5.js → runner-GUU4G7XO.js} +13 -13
- package/dist/{skills-WZWKZIFQ.js → skills-7NW5N3VM.js} +6 -6
- package/dist/spawn-WGK4W3XF.js +37 -0
- package/dist/{validation-4HVSSLJV.js → validation-AQLI6N2C.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-UF4KXPVG.js → work-FLFK5XNU.js} +17 -17
- package/dist/worker-KSJIRBQJ.js +24 -0
- package/package.json +5 -5
- package/dist/spawn-TQJWADG4.js +0 -37
- package/dist/worker-HI7I2W2U.js +0 -24
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-U26KRMYX.js";
|
|
15
|
+
import "./chunk-OUAZDZTZ.js";
|
|
16
|
+
import "./chunk-JQZIUESN.js";
|
|
17
|
+
import "./chunk-4UO3UAW7.js";
|
|
18
18
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-UNDTW2PY.js";
|
|
20
|
+
import "./chunk-J77DLAPE.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-TBRJGMTO.js";
|
|
23
23
|
import "./chunk-V7YE4WCP.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-ZNBGWMVQ.js";
|
|
25
25
|
import "./chunk-6GWA276C.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-HDPH4CHJ.js";
|
|
27
|
+
import "./chunk-YPMDNE7R.js";
|
|
28
28
|
import "./chunk-MLKGABMK.js";
|
|
29
29
|
export {
|
|
30
30
|
PluginHookDeniedError,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { User } from "@sentry/junior-plugin-api";
|
|
2
|
+
import type { CancelConversationPendingMessagesBody, CancelConversationPendingMessagesResponse } from "../schema/conversation";
|
|
3
|
+
/** Cancel accepted human-facing mailbox rows for one conversation participant. */
|
|
4
|
+
export declare function cancelConversationPendingMessagesForViewer(viewer: User, conversationId: string, body?: CancelConversationPendingMessagesBody): Promise<CancelConversationPendingMessagesResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ConversationEvent } from "@/chat/conversations/history";
|
|
2
2
|
import { type ConversationReportEvent } from "../schema/conversation";
|
|
3
3
|
/** Canonical event types that can contribute to the reporting projection. */
|
|
4
|
-
export declare const conversationReportSourceEventTypes: readonly ["message", "message_handled", "assistant_message", "tool_result", "tool_execution_started", "guardian_action_reviewed", "turn_started", "turn_context", "structured_event", "turn_routed", "turn_completed", "turn_failed", "compaction", "handoff", "subagent_started", "subagent_ended"];
|
|
4
|
+
export declare const conversationReportSourceEventTypes: readonly ["message", "message_handled", "assistant_message", "tool_result", "tool_execution_started", "guardian_action_reviewed", "turn_started", "turn_context", "structured_event", "attachments_delivered", "turn_routed", "turn_completed", "turn_failed", "compaction", "handoff", "subagent_started", "subagent_ended"];
|
|
5
5
|
/** Return tool result ids that may need start metadata from outside a page. */
|
|
6
6
|
export declare function conversationReportToolResultIds(events: ConversationEvent[]): string[];
|
|
7
7
|
/**
|
|
@@ -150,6 +150,17 @@ export declare const conversationPendingMessagesReportSchema: z.ZodObject<{
|
|
|
150
150
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
151
151
|
}, z.core.$strict>>;
|
|
152
152
|
}, z.core.$strict>;
|
|
153
|
+
/** Optional filters for cancelling accepted mailbox rows. */
|
|
154
|
+
export declare const cancelConversationPendingMessagesBodySchema: z.ZodObject<{
|
|
155
|
+
inboundMessageIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
156
|
+
receivedBefore: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
/** Result of cancelling accepted human-facing mailbox rows. */
|
|
159
|
+
export declare const cancelConversationPendingMessagesResponseSchema: z.ZodObject<{
|
|
160
|
+
cancelledCount: z.ZodNumber;
|
|
161
|
+
cancelledInboundMessageIds: z.ZodArray<z.ZodString>;
|
|
162
|
+
conversationId: z.ZodString;
|
|
163
|
+
}, z.core.$strict>;
|
|
153
164
|
export declare const conversationAuxiliaryCostsSchema: z.ZodObject<{
|
|
154
165
|
costUsd: z.ZodNumber;
|
|
155
166
|
operations: z.ZodArray<z.ZodObject<{
|
|
@@ -348,6 +359,14 @@ export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<
|
|
|
348
359
|
preview: z.ZodOptional<z.ZodString>;
|
|
349
360
|
title: z.ZodString;
|
|
350
361
|
}, z.core.$strict>;
|
|
362
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
363
|
+
type: z.ZodLiteral<"attachments_delivered">;
|
|
364
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
365
|
+
id: z.ZodString;
|
|
366
|
+
filename: z.ZodString;
|
|
367
|
+
contentType: z.ZodString;
|
|
368
|
+
bytes: z.ZodNumber;
|
|
369
|
+
}, z.core.$strict>>;
|
|
351
370
|
}, z.core.$strict>, z.ZodObject<{
|
|
352
371
|
type: z.ZodLiteral<"turn_routed">;
|
|
353
372
|
turnId: z.ZodString;
|
|
@@ -535,6 +554,14 @@ export declare const conversationReportEventSchema: z.ZodObject<{
|
|
|
535
554
|
preview: z.ZodOptional<z.ZodString>;
|
|
536
555
|
title: z.ZodString;
|
|
537
556
|
}, z.core.$strict>;
|
|
557
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
558
|
+
type: z.ZodLiteral<"attachments_delivered">;
|
|
559
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
560
|
+
id: z.ZodString;
|
|
561
|
+
filename: z.ZodString;
|
|
562
|
+
contentType: z.ZodString;
|
|
563
|
+
bytes: z.ZodNumber;
|
|
564
|
+
}, z.core.$strict>>;
|
|
538
565
|
}, z.core.$strict>, z.ZodObject<{
|
|
539
566
|
type: z.ZodLiteral<"turn_routed">;
|
|
540
567
|
turnId: z.ZodString;
|
|
@@ -851,6 +878,14 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
851
878
|
preview: z.ZodOptional<z.ZodString>;
|
|
852
879
|
title: z.ZodString;
|
|
853
880
|
}, z.core.$strict>;
|
|
881
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
882
|
+
type: z.ZodLiteral<"attachments_delivered">;
|
|
883
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
884
|
+
id: z.ZodString;
|
|
885
|
+
filename: z.ZodString;
|
|
886
|
+
contentType: z.ZodString;
|
|
887
|
+
bytes: z.ZodNumber;
|
|
888
|
+
}, z.core.$strict>>;
|
|
854
889
|
}, z.core.$strict>, z.ZodObject<{
|
|
855
890
|
type: z.ZodLiteral<"turn_routed">;
|
|
856
891
|
turnId: z.ZodString;
|
|
@@ -1061,6 +1096,14 @@ export declare const conversationEventPageSchema: z.ZodObject<{
|
|
|
1061
1096
|
preview: z.ZodOptional<z.ZodString>;
|
|
1062
1097
|
title: z.ZodString;
|
|
1063
1098
|
}, z.core.$strict>;
|
|
1099
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1100
|
+
type: z.ZodLiteral<"attachments_delivered">;
|
|
1101
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
1102
|
+
id: z.ZodString;
|
|
1103
|
+
filename: z.ZodString;
|
|
1104
|
+
contentType: z.ZodString;
|
|
1105
|
+
bytes: z.ZodNumber;
|
|
1106
|
+
}, z.core.$strict>>;
|
|
1064
1107
|
}, z.core.$strict>, z.ZodObject<{
|
|
1065
1108
|
type: z.ZodLiteral<"turn_routed">;
|
|
1066
1109
|
turnId: z.ZodString;
|
|
@@ -1341,3 +1384,5 @@ export type AcceptedConversationMessage = z.infer<typeof acceptedConversationMes
|
|
|
1341
1384
|
export type ConversationPendingMessageDelivery = z.infer<typeof conversationPendingMessageDeliverySchema>;
|
|
1342
1385
|
export type ConversationPendingMessage = z.infer<typeof conversationPendingMessageSchema>;
|
|
1343
1386
|
export type ConversationPendingMessagesReport = z.infer<typeof conversationPendingMessagesReportSchema>;
|
|
1387
|
+
export type CancelConversationPendingMessagesBody = z.infer<typeof cancelConversationPendingMessagesBodySchema>;
|
|
1388
|
+
export type CancelConversationPendingMessagesResponse = z.infer<typeof cancelConversationPendingMessagesResponseSchema>;
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { dailyConversationActivitySchema } from "./activity";
|
|
2
2
|
export type { DailyConversationActivity } from "./activity";
|
|
3
|
-
export { acceptedConversationMessageSchema, archiveConversationBodySchema, archiveConversationResponseSchema, conversationAuxiliaryCostsSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventPageSchema, conversationEventHistorySchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, createConversationBodySchema, createConversationMessageBodySchema, } from "./schema/conversation";
|
|
4
|
-
export type { AcceptedConversationMessage, ArchiveConversationBody, ArchiveConversationResponse, ActorIdentity, ConversationAuxiliaryCosts, ConversationCost, ConversationDetailReport, ConversationEventPage, ConversationEventHistory, ConversationFeed, ConversationPendingMessage, ConversationPendingMessageDelivery, ConversationPendingMessagesReport, ConversationReportEvent, ConversationReportEventData, ConversationReportStatus, ConversationMetricDay, ConversationModelUsage, ConversationParams, ConversationSourceTask, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationUsage, CreateConversationBody, CreateConversationMessageBody, GuardianMetricDay, GuardianStats, } from "./schema/conversation";
|
|
3
|
+
export { acceptedConversationMessageSchema, archiveConversationBodySchema, archiveConversationResponseSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, conversationAuxiliaryCostsSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventPageSchema, conversationEventHistorySchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, createConversationBodySchema, createConversationMessageBodySchema, } from "./schema/conversation";
|
|
4
|
+
export type { AcceptedConversationMessage, ArchiveConversationBody, ArchiveConversationResponse, CancelConversationPendingMessagesBody, CancelConversationPendingMessagesResponse, ActorIdentity, ConversationAuxiliaryCosts, ConversationCost, ConversationDetailReport, ConversationEventPage, ConversationEventHistory, ConversationFeed, ConversationPendingMessage, ConversationPendingMessageDelivery, ConversationPendingMessagesReport, ConversationReportEvent, ConversationReportEventData, ConversationReportStatus, ConversationMetricDay, ConversationModelUsage, ConversationParams, ConversationSourceTask, ConversationStatsItem, ConversationStatsReport, ConversationSummaryReport, ConversationSurface, ConversationUsage, CreateConversationBody, CreateConversationMessageBody, GuardianMetricDay, GuardianStats, } from "./schema/conversation";
|
|
5
5
|
export { actorDirectoryReportSchema, actorProfileReportSchema, personalSpendReportSchema, personParamsSchema, } from "./schema/person";
|
|
6
6
|
export { locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, } from "./schema/location";
|
|
7
7
|
export type { LocationActorSummaryReport, LocationActivityDayReport, LocationDetailReport, LocationDirectoryReport, LocationSummaryReport, LocationParams, } from "./schema/location";
|
package/dist/api/schema.js
CHANGED
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
apiErrorSchema,
|
|
6
6
|
archiveConversationBodySchema,
|
|
7
7
|
archiveConversationResponseSchema,
|
|
8
|
+
cancelConversationPendingMessagesBodySchema,
|
|
9
|
+
cancelConversationPendingMessagesResponseSchema,
|
|
8
10
|
conversationAuxiliaryCostsSchema,
|
|
9
11
|
conversationDetailQuerySchema,
|
|
10
12
|
conversationDetailReportSchema,
|
|
@@ -50,7 +52,7 @@ import {
|
|
|
50
52
|
taskRunListSchema,
|
|
51
53
|
taskRunSchema,
|
|
52
54
|
taskSummarySchema
|
|
53
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-UYUS4L6F.js";
|
|
54
56
|
import {
|
|
55
57
|
healthReportSchema,
|
|
56
58
|
pluginOperationalReportFeedSchema,
|
|
@@ -73,6 +75,8 @@ export {
|
|
|
73
75
|
apiErrorSchema,
|
|
74
76
|
archiveConversationBodySchema,
|
|
75
77
|
archiveConversationResponseSchema,
|
|
78
|
+
cancelConversationPendingMessagesBodySchema,
|
|
79
|
+
cancelConversationPendingMessagesResponseSchema,
|
|
76
80
|
conversationAuxiliaryCostsSchema,
|
|
77
81
|
conversationDetailQuerySchema,
|
|
78
82
|
conversationDetailReportSchema,
|
package/dist/api.js
CHANGED
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
apiErrorSchema,
|
|
7
7
|
archiveConversationBodySchema,
|
|
8
8
|
archiveConversationResponseSchema,
|
|
9
|
+
cancelConversationPendingMessagesBodySchema,
|
|
10
|
+
cancelConversationPendingMessagesResponseSchema,
|
|
9
11
|
conversationAttachmentParamsSchema,
|
|
10
12
|
conversationDetailQuerySchema,
|
|
11
13
|
conversationDetailReportSchema,
|
|
@@ -34,7 +36,7 @@ import {
|
|
|
34
36
|
taskListSchema,
|
|
35
37
|
taskParamsSchema,
|
|
36
38
|
taskRunListSchema
|
|
37
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UYUS4L6F.js";
|
|
38
40
|
import {
|
|
39
41
|
appendAndEnqueueApiConversationMessage,
|
|
40
42
|
createAndEnqueueApiConversation,
|
|
@@ -44,14 +46,15 @@ import {
|
|
|
44
46
|
readHealthReport,
|
|
45
47
|
resolveSlackConversationContextFromThreadId,
|
|
46
48
|
webActorFromEmail
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-MBDWMEO6.js";
|
|
48
50
|
import {
|
|
49
51
|
buildSentryConversationUrl,
|
|
50
52
|
getWebAuthorization
|
|
51
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-472VVYYV.js";
|
|
52
54
|
import {
|
|
55
|
+
cancelHumanFacingPendingMessages,
|
|
53
56
|
getConversation
|
|
54
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-FKMWPA4A.js";
|
|
55
58
|
import {
|
|
56
59
|
readTaskExecutionByConversationId,
|
|
57
60
|
readTaskExecutionDays,
|
|
@@ -59,8 +62,8 @@ import {
|
|
|
59
62
|
readTaskExecutionSummaries,
|
|
60
63
|
readTaskExecutions,
|
|
61
64
|
readTaskRuns
|
|
62
|
-
} from "./chunk-
|
|
63
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-URPLKXLG.js";
|
|
66
|
+
import "./chunk-3AHIB66R.js";
|
|
64
67
|
import {
|
|
65
68
|
healthReportSchema,
|
|
66
69
|
pluginOperationalReportFeedSchema,
|
|
@@ -85,16 +88,16 @@ import {
|
|
|
85
88
|
listPublicScheduledTasksForTeams,
|
|
86
89
|
readLiveAttachment,
|
|
87
90
|
readStats
|
|
88
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-RJGRXDA7.js";
|
|
89
92
|
import {
|
|
90
93
|
parseSlackThreadId
|
|
91
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-56TFPTZU.js";
|
|
92
95
|
import {
|
|
93
96
|
agentTurnUsageSchema,
|
|
94
97
|
fallbackShortTitle,
|
|
95
98
|
hasAgentTurnUsage,
|
|
96
99
|
renderJuniorNativeConversationEvent
|
|
97
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-RLOXMHLA.js";
|
|
98
101
|
import "./chunk-3Y47VMHV.js";
|
|
99
102
|
import "./chunk-PDO5BLNM.js";
|
|
100
103
|
import {
|
|
@@ -104,11 +107,11 @@ import {
|
|
|
104
107
|
renderPluginConversationEvent,
|
|
105
108
|
resolveViewerUser,
|
|
106
109
|
updateViewerDisplayName
|
|
107
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-U26KRMYX.js";
|
|
108
111
|
import {
|
|
109
112
|
getSlackClient,
|
|
110
113
|
withSlackRetries
|
|
111
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-OUAZDZTZ.js";
|
|
112
115
|
import {
|
|
113
116
|
decodeStoredConversationEvent,
|
|
114
117
|
getConversationStore,
|
|
@@ -116,7 +119,7 @@ import {
|
|
|
116
119
|
getSqlExecutor,
|
|
117
120
|
locationFromRow,
|
|
118
121
|
parseSessionSource
|
|
119
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-JQZIUESN.js";
|
|
120
123
|
import {
|
|
121
124
|
juniorApiTokens,
|
|
122
125
|
juniorConversationEvents,
|
|
@@ -124,16 +127,16 @@ import {
|
|
|
124
127
|
juniorConversations,
|
|
125
128
|
juniorIdentities,
|
|
126
129
|
juniorUsers
|
|
127
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-4UO3UAW7.js";
|
|
128
131
|
import "./chunk-EM225ITJ.js";
|
|
129
|
-
import "./chunk-
|
|
130
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-UNDTW2PY.js";
|
|
133
|
+
import "./chunk-J77DLAPE.js";
|
|
131
134
|
import {
|
|
132
135
|
juniorDestinations
|
|
133
136
|
} from "./chunk-VFUK3X5B.js";
|
|
134
137
|
import {
|
|
135
138
|
canExposeConversationPayload
|
|
136
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-TBRJGMTO.js";
|
|
137
140
|
import "./chunk-BDUENQD3.js";
|
|
138
141
|
import {
|
|
139
142
|
parseSlackChannelId,
|
|
@@ -143,10 +146,10 @@ import {
|
|
|
143
146
|
import {
|
|
144
147
|
logException,
|
|
145
148
|
logWarn
|
|
146
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-ZNBGWMVQ.js";
|
|
147
150
|
import "./chunk-6GWA276C.js";
|
|
148
|
-
import "./chunk-
|
|
149
|
-
import "./chunk-
|
|
151
|
+
import "./chunk-HDPH4CHJ.js";
|
|
152
|
+
import "./chunk-YPMDNE7R.js";
|
|
150
153
|
import "./chunk-MLKGABMK.js";
|
|
151
154
|
|
|
152
155
|
// src/api.ts
|
|
@@ -765,6 +768,7 @@ var conversationReportSourceEventTypes = [
|
|
|
765
768
|
"turn_started",
|
|
766
769
|
"turn_context",
|
|
767
770
|
"structured_event",
|
|
771
|
+
"attachments_delivered",
|
|
768
772
|
"turn_routed",
|
|
769
773
|
"turn_completed",
|
|
770
774
|
"turn_failed",
|
|
@@ -984,6 +988,14 @@ function reportEventData(args) {
|
|
|
984
988
|
version: data.version,
|
|
985
989
|
content: data.content
|
|
986
990
|
};
|
|
991
|
+
case "attachments_delivered":
|
|
992
|
+
if (!args.canExposePayload) {
|
|
993
|
+
return void 0;
|
|
994
|
+
}
|
|
995
|
+
return {
|
|
996
|
+
type: "attachments_delivered",
|
|
997
|
+
attachments: data.attachments
|
|
998
|
+
};
|
|
987
999
|
case "turn_routed":
|
|
988
1000
|
return {
|
|
989
1001
|
type: "turn_routed",
|
|
@@ -2629,6 +2641,40 @@ async function readConversationEvents(conversationId, beforeValue, options = {})
|
|
|
2629
2641
|
});
|
|
2630
2642
|
}
|
|
2631
2643
|
|
|
2644
|
+
// src/api/conversations/cancel-pending-messages.ts
|
|
2645
|
+
async function cancelConversationPendingMessagesForViewer(viewer, conversationId, body = {}) {
|
|
2646
|
+
const conversation = await getConversationStore().get({ conversationId });
|
|
2647
|
+
if (!conversation) {
|
|
2648
|
+
throwApiError(404, "Conversation not found.");
|
|
2649
|
+
}
|
|
2650
|
+
const access = await readConversationAccessFromSql(
|
|
2651
|
+
getDb(),
|
|
2652
|
+
[conversationId],
|
|
2653
|
+
viewer
|
|
2654
|
+
);
|
|
2655
|
+
if (!access.get(conversationId)?.isParticipant) {
|
|
2656
|
+
throwApiError(
|
|
2657
|
+
403,
|
|
2658
|
+
"Only conversation participants can cancel queued messages."
|
|
2659
|
+
);
|
|
2660
|
+
}
|
|
2661
|
+
try {
|
|
2662
|
+
const result = await cancelHumanFacingPendingMessages({
|
|
2663
|
+
conversationId,
|
|
2664
|
+
...body.inboundMessageIds ? { inboundMessageIds: body.inboundMessageIds } : {},
|
|
2665
|
+
...body.receivedBefore ? { receivedBeforeMs: Date.parse(body.receivedBefore) } : {},
|
|
2666
|
+
conversationStore: getConversationStore()
|
|
2667
|
+
});
|
|
2668
|
+
return {
|
|
2669
|
+
cancelledCount: result.cancelledInboundMessageIds.length,
|
|
2670
|
+
cancelledInboundMessageIds: result.cancelledInboundMessageIds,
|
|
2671
|
+
conversationId
|
|
2672
|
+
};
|
|
2673
|
+
} catch (error) {
|
|
2674
|
+
throwApiError(500, "Unable to cancel queued messages.", error);
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2632
2678
|
// src/api/conversations/pending-messages.ts
|
|
2633
2679
|
import { z as z4 } from "zod";
|
|
2634
2680
|
var apiTurnMailboxMetadataSchema = z4.object({
|
|
@@ -3277,6 +3323,33 @@ function createConversationRoutes(options) {
|
|
|
3277
3323
|
);
|
|
3278
3324
|
}
|
|
3279
3325
|
);
|
|
3326
|
+
app.delete(
|
|
3327
|
+
"/:conversationId/pending-messages",
|
|
3328
|
+
requireViewer,
|
|
3329
|
+
validateRequest(
|
|
3330
|
+
"param",
|
|
3331
|
+
conversationParamsSchema,
|
|
3332
|
+
"Invalid route parameters."
|
|
3333
|
+
),
|
|
3334
|
+
validateRequest(
|
|
3335
|
+
"json",
|
|
3336
|
+
cancelConversationPendingMessagesBodySchema,
|
|
3337
|
+
"Invalid request body."
|
|
3338
|
+
),
|
|
3339
|
+
async (context) => {
|
|
3340
|
+
const viewer = context.get("viewer");
|
|
3341
|
+
const { conversationId } = context.req.valid("param");
|
|
3342
|
+
const body = context.req.valid("json");
|
|
3343
|
+
return jsonResponse(
|
|
3344
|
+
cancelConversationPendingMessagesResponseSchema,
|
|
3345
|
+
await cancelConversationPendingMessagesForViewer(
|
|
3346
|
+
viewer,
|
|
3347
|
+
conversationId,
|
|
3348
|
+
body
|
|
3349
|
+
)
|
|
3350
|
+
);
|
|
3351
|
+
}
|
|
3352
|
+
);
|
|
3280
3353
|
app.get(
|
|
3281
3354
|
"/:conversationId/attachments/:attachmentId",
|
|
3282
3355
|
validateRequest(
|
|
@@ -4660,7 +4733,7 @@ function readDescriptionText(home) {
|
|
|
4660
4733
|
}
|
|
4661
4734
|
}
|
|
4662
4735
|
async function readSkillReports() {
|
|
4663
|
-
const { discoverSkills } = await import("./skills-
|
|
4736
|
+
const { discoverSkills } = await import("./skills-7NW5N3VM.js");
|
|
4664
4737
|
const skills = await discoverSkills();
|
|
4665
4738
|
return skillReportsSchema.parse(
|
|
4666
4739
|
skills.map((skill) => ({
|
|
@@ -4670,7 +4743,7 @@ async function readSkillReports() {
|
|
|
4670
4743
|
);
|
|
4671
4744
|
}
|
|
4672
4745
|
async function readPlugins() {
|
|
4673
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4746
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-HIDNHGOP.js");
|
|
4674
4747
|
return pluginsSchema.parse(
|
|
4675
4748
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4676
4749
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4683,7 +4756,7 @@ async function readPlugins() {
|
|
|
4683
4756
|
async function readRuntimeInfoReport() {
|
|
4684
4757
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4685
4758
|
import("./discovery-GUFTFBTL.js"),
|
|
4686
|
-
import("./catalog-runtime-
|
|
4759
|
+
import("./catalog-runtime-HIDNHGOP.js"),
|
|
4687
4760
|
readPlugins(),
|
|
4688
4761
|
readSkillReports()
|
|
4689
4762
|
]);
|
|
@@ -4699,7 +4772,7 @@ async function readRuntimeInfoReport() {
|
|
|
4699
4772
|
}
|
|
4700
4773
|
async function readPluginOperationalReportFeed() {
|
|
4701
4774
|
const nowMs = Date.now();
|
|
4702
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4775
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-U6R3O2V4.js");
|
|
4703
4776
|
return pluginOperationalReportFeedSchema.parse({
|
|
4704
4777
|
source: "plugins",
|
|
4705
4778
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processConversationWork
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FJR66CQT.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2MK6S2UA.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WACYTIIK.js";
|
|
13
13
|
import {
|
|
14
14
|
GET as GET2,
|
|
15
15
|
GET2 as GET3,
|
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
startSlackProcessingReaction,
|
|
37
37
|
stripLeadingBotMention,
|
|
38
38
|
wakePausedTurn
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TPFOVXRB.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-LNUZXEEI.js";
|
|
45
45
|
import {
|
|
46
46
|
GET,
|
|
47
47
|
conversationVisibilityFromSlackChannelType,
|
|
@@ -51,8 +51,8 @@ import {
|
|
|
51
51
|
resolveSlackChannelTypeFromMessage,
|
|
52
52
|
resolveSlackConversationContext,
|
|
53
53
|
routeApiTurnWork
|
|
54
|
-
} from "./chunk-
|
|
55
|
-
import "./chunk-
|
|
54
|
+
} from "./chunk-MBDWMEO6.js";
|
|
55
|
+
import "./chunk-472VVYYV.js";
|
|
56
56
|
import {
|
|
57
57
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
58
58
|
appendAndEnqueueInboundMessage,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
isInvalidConversationRecordError,
|
|
64
64
|
listActiveConversationIds,
|
|
65
65
|
removeActiveConversation
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-FKMWPA4A.js";
|
|
67
67
|
import {
|
|
68
68
|
buildDeliveredTurnStatePatch,
|
|
69
69
|
claimDispatchMailboxAppend,
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
requireTurnFailureEventId,
|
|
95
95
|
resolveTurnSessionRouting,
|
|
96
96
|
scheduleSessionCompletedPluginTasks
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-URPLKXLG.js";
|
|
98
98
|
import {
|
|
99
99
|
ConversationTurnLifecycleService,
|
|
100
100
|
coerceThreadConversationState,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
persistThreadRuntimeState,
|
|
105
105
|
persistThreadState,
|
|
106
106
|
persistThreadStateById
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-3AHIB66R.js";
|
|
108
108
|
import "./chunk-UTL3MHPC.js";
|
|
109
109
|
import {
|
|
110
110
|
getVercelConversationWorkQueue,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
import {
|
|
124
124
|
validatePluginEgressCredentialHooks,
|
|
125
125
|
validatePluginRegistrations
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-PZUJPPON.js";
|
|
127
127
|
import {
|
|
128
128
|
defineJuniorPlugins,
|
|
129
129
|
pluginCatalogConfigFromEnv,
|
|
@@ -155,11 +155,11 @@ import {
|
|
|
155
155
|
setConfigDefaults,
|
|
156
156
|
shouldEmitDevAgentTrace,
|
|
157
157
|
shouldPropagateSandboxEgressTrace
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-M5HCOMDR.js";
|
|
159
159
|
import {
|
|
160
160
|
AuthorizationFlowDisabledError,
|
|
161
161
|
PluginCredentialFailureError
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-756F567I.js";
|
|
163
163
|
import "./chunk-DIB4GX3G.js";
|
|
164
164
|
import {
|
|
165
165
|
createAgentRunner,
|
|
@@ -167,7 +167,7 @@ import {
|
|
|
167
167
|
deleteMcpAuthSessionsForUserProvider,
|
|
168
168
|
deleteMcpServerSessionId,
|
|
169
169
|
deleteMcpStoredOAuthCredentials
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-PVIM2RWO.js";
|
|
171
171
|
import {
|
|
172
172
|
RetryableDeliveryError
|
|
173
173
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -175,7 +175,7 @@ import {
|
|
|
175
175
|
formatProviderLabel,
|
|
176
176
|
postSlackMessage,
|
|
177
177
|
startOAuthFlow
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-P7W3ZL5J.js";
|
|
179
179
|
import "./chunk-7MA4HV4W.js";
|
|
180
180
|
import {
|
|
181
181
|
getExperimentalFeatures,
|
|
@@ -184,7 +184,7 @@ import {
|
|
|
184
184
|
import {
|
|
185
185
|
getSandboxResourceConfig,
|
|
186
186
|
setSandboxResourceConfig
|
|
187
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-BGVQGEKB.js";
|
|
188
188
|
import {
|
|
189
189
|
collectAttachmentGarbage,
|
|
190
190
|
createSchedulerSqlStore,
|
|
@@ -192,10 +192,10 @@ import {
|
|
|
192
192
|
logScheduledTaskRunSkipped,
|
|
193
193
|
requestAttachmentDeletion,
|
|
194
194
|
scheduledTaskRunAttributes
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-RJGRXDA7.js";
|
|
196
196
|
import {
|
|
197
197
|
parseSlackThreadId
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-56TFPTZU.js";
|
|
199
199
|
import {
|
|
200
200
|
ConversationTurnBoundaryError,
|
|
201
201
|
CooperativeTurnYieldError,
|
|
@@ -245,7 +245,7 @@ import {
|
|
|
245
245
|
trimTrailingAssistantMessages,
|
|
246
246
|
turnHasReply,
|
|
247
247
|
upsertConversationMessage
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-RLOXMHLA.js";
|
|
249
249
|
import "./chunk-3Y47VMHV.js";
|
|
250
250
|
import "./chunk-PDO5BLNM.js";
|
|
251
251
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -265,7 +265,7 @@ import {
|
|
|
265
265
|
verifyEventTaskCredentialSubject,
|
|
266
266
|
verifyScheduledTaskCredentialSubject,
|
|
267
267
|
verifySlackDirectCredentialSubject
|
|
268
|
-
} from "./chunk-
|
|
268
|
+
} from "./chunk-U26KRMYX.js";
|
|
269
269
|
import {
|
|
270
270
|
SlackActionError,
|
|
271
271
|
downloadPrivateSlackFile,
|
|
@@ -275,7 +275,7 @@ import {
|
|
|
275
275
|
normalizeSlackConversationId,
|
|
276
276
|
runWithSlackInstallationToken,
|
|
277
277
|
runWithWorkspaceTeamId
|
|
278
|
-
} from "./chunk-
|
|
278
|
+
} from "./chunk-OUAZDZTZ.js";
|
|
279
279
|
import {
|
|
280
280
|
contextProvenance,
|
|
281
281
|
createSlackDestination,
|
|
@@ -288,19 +288,19 @@ import {
|
|
|
288
288
|
requireSlackDestination,
|
|
289
289
|
withConversationEventLock,
|
|
290
290
|
withConversationMutationLock
|
|
291
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-JQZIUESN.js";
|
|
292
292
|
import {
|
|
293
293
|
juniorAgentBindings,
|
|
294
294
|
juniorAgentInvocations,
|
|
295
295
|
juniorConversationEvents,
|
|
296
296
|
juniorConversations
|
|
297
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-4UO3UAW7.js";
|
|
298
298
|
import "./chunk-EM225ITJ.js";
|
|
299
299
|
import {
|
|
300
300
|
acquireActiveLock,
|
|
301
301
|
getStateAdapter,
|
|
302
302
|
withActiveLock
|
|
303
|
-
} from "./chunk-
|
|
303
|
+
} from "./chunk-UNDTW2PY.js";
|
|
304
304
|
import {
|
|
305
305
|
STANDARD_MODEL_PROFILE,
|
|
306
306
|
botConfig,
|
|
@@ -318,16 +318,16 @@ import {
|
|
|
318
318
|
modelIdForProfile,
|
|
319
319
|
setSlackReactionConfig,
|
|
320
320
|
standardModelId
|
|
321
|
-
} from "./chunk-
|
|
321
|
+
} from "./chunk-J77DLAPE.js";
|
|
322
322
|
import {
|
|
323
323
|
juniorDestinations
|
|
324
324
|
} from "./chunk-VFUK3X5B.js";
|
|
325
|
-
import "./chunk-
|
|
326
|
-
import "./chunk-
|
|
325
|
+
import "./chunk-TBRJGMTO.js";
|
|
326
|
+
import "./chunk-XPX3DYG7.js";
|
|
327
327
|
import {
|
|
328
328
|
pluginCatalogRuntime
|
|
329
|
-
} from "./chunk-
|
|
330
|
-
import "./chunk-
|
|
329
|
+
} from "./chunk-2SFMRMDV.js";
|
|
330
|
+
import "./chunk-42E7432W.js";
|
|
331
331
|
import {
|
|
332
332
|
credentialContextForActor
|
|
333
333
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -359,7 +359,7 @@ import {
|
|
|
359
359
|
withContext,
|
|
360
360
|
withLogContext,
|
|
361
361
|
withSpan
|
|
362
|
-
} from "./chunk-
|
|
362
|
+
} from "./chunk-ZNBGWMVQ.js";
|
|
363
363
|
import {
|
|
364
364
|
continueTrace
|
|
365
365
|
} from "./chunk-6GWA276C.js";
|
|
@@ -367,10 +367,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
367
367
|
import "./chunk-H4HBKISO.js";
|
|
368
368
|
import {
|
|
369
369
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
370
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-HDPH4CHJ.js";
|
|
371
371
|
import {
|
|
372
372
|
JUNIOR_VERSION
|
|
373
|
-
} from "./chunk-
|
|
373
|
+
} from "./chunk-YPMDNE7R.js";
|
|
374
374
|
import "./chunk-MLKGABMK.js";
|
|
375
375
|
|
|
376
376
|
// src/app.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2SFMRMDV.js";
|
|
4
|
+
import "./chunk-42E7432W.js";
|
|
5
5
|
import "./chunk-BDUENQD3.js";
|
|
6
6
|
import "./chunk-V7YE4WCP.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-ZNBGWMVQ.js";
|
|
8
8
|
import "./chunk-6GWA276C.js";
|
|
9
9
|
import "./chunk-OOUNJNMR.js";
|
|
10
10
|
import "./chunk-H4HBKISO.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-HDPH4CHJ.js";
|
|
12
|
+
import "./chunk-YPMDNE7R.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
export {
|
|
15
15
|
pluginCatalogRuntime
|