@sentry/junior 0.158.0 → 0.159.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-IAD3AANZ.js} +10 -10
- package/dist/api/conversations/cancel-pending-messages.d.ts +4 -0
- package/dist/api/schema/conversation.d.ts +13 -0
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +5 -1
- package/dist/api.js +87 -23
- package/dist/app.js +32 -32
- package/dist/{catalog-runtime-7GZ25WTR.js → catalog-runtime-6VANKLH5.js} +5 -5
- package/dist/chat/conversations/history.d.ts +4 -1
- package/dist/chat/slack/mrkdwn.d.ts +2 -1
- package/dist/chat/task-execution/state.d.ts +10 -0
- package/dist/chat/task-execution/store.d.ts +11 -0
- package/dist/{chunk-X4BLYIMV.js → chunk-27UQ7UB3.js} +6 -6
- package/dist/{chunk-C3FYJZSA.js → chunk-54O6IKUS.js} +4 -4
- package/dist/{chunk-SAJPQLTY.js → chunk-6IADZQJR.js} +1 -1
- package/dist/{chunk-UQJO35BP.js → chunk-AIQKUJKK.js} +4 -4
- package/dist/{chunk-3A7VXSPJ.js → chunk-AZW5HKC5.js} +8 -8
- package/dist/{chunk-YEZS4TEY.js → chunk-CNHELV2P.js} +1 -1
- package/dist/{chunk-4JAOLUDB.js → chunk-DJZPA72K.js} +35 -6
- package/dist/{chunk-JEXQQLEC.js → chunk-DXSZJAVZ.js} +18 -18
- package/dist/{chunk-NOEERHHR.js → chunk-EBP6IS66.js} +6 -6
- package/dist/{chunk-CZCMFRUQ.js → chunk-EQXVKNLM.js} +11 -0
- package/dist/{chunk-A7EDLNGU.js → chunk-FWDN67U3.js} +55 -4
- package/dist/{chunk-DTVTBZNP.js → chunk-IJ6KWS3V.js} +1 -1
- package/dist/{chunk-ROOTB7J7.js → chunk-K2LAI7RW.js} +2 -2
- package/dist/{chunk-FAJ6SMEE.js → chunk-L2PEQ2PY.js} +2 -2
- package/dist/{chunk-IXYGGJRA.js → chunk-LUIKMY35.js} +1 -1
- package/dist/{chunk-IEM3GFXL.js → chunk-NCJV265M.js} +9 -9
- package/dist/{chunk-4Q6QVTKA.js → chunk-NT6V5WEE.js} +5 -5
- package/dist/{chunk-VURJ2NSF.js → chunk-O2DZWUPQ.js} +1 -1
- package/dist/{chunk-6GJCOUTA.js → chunk-OGMHLKNO.js} +1 -1
- package/dist/{chunk-UJ6N32ZM.js → chunk-PQWWCKNB.js} +4 -4
- package/dist/{chunk-UPPU3FQU.js → chunk-PT7B6A3O.js} +1 -1
- package/dist/{chunk-PHQDXC27.js → chunk-Q5X37U6G.js} +1 -1
- package/dist/{chunk-AF4PHIP6.js → chunk-QODFNKQS.js} +27 -10
- package/dist/{chunk-EXITAVHO.js → chunk-SQOVZSWF.js} +20 -18
- package/dist/{chunk-KSZXVR5G.js → chunk-TD7ZQZ5W.js} +1 -1
- package/dist/{chunk-LUSAAJJA.js → chunk-U7D4VLUF.js} +2 -2
- package/dist/{chunk-SSU65ZTZ.js → chunk-UG673UVL.js} +1 -1
- package/dist/{chunk-4XJ2WSTI.js → chunk-UKKOKMRE.js} +5 -5
- package/dist/{chunk-BNFGY66A.js → chunk-UP6KQVF5.js} +1 -1
- package/dist/{chunk-RCIKTZZF.js → chunk-WTQ3CKC3.js} +1 -1
- package/dist/{chunk-FA32YRZ3.js → chunk-X7AIXRVJ.js} +5 -5
- package/dist/{chunk-EQ6Y37MD.js → chunk-YCBZ47LC.js} +1 -1
- package/dist/{chunk-KAFYW3O6.js → chunk-YSMAMSOU.js} +10 -10
- 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-BIIMAPFB.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-4BENCPP3.js} +23 -23
- package/dist/{runner-CL6QHML5.js → runner-TUBJLEYO.js} +13 -13
- package/dist/{skills-WZWKZIFQ.js → skills-MBRLNBRV.js} +6 -6
- package/dist/spawn-ZWIXA46E.js +37 -0
- package/dist/{validation-4HVSSLJV.js → validation-YTJGRJYT.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-UF4KXPVG.js → work-5MRHKA54.js} +17 -17
- package/dist/worker-S2V7HZJ4.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-EBP6IS66.js";
|
|
15
|
+
import "./chunk-K2LAI7RW.js";
|
|
16
|
+
import "./chunk-QODFNKQS.js";
|
|
17
|
+
import "./chunk-O2DZWUPQ.js";
|
|
18
18
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-Q5X37U6G.js";
|
|
20
|
+
import "./chunk-L2PEQ2PY.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-PT7B6A3O.js";
|
|
23
23
|
import "./chunk-V7YE4WCP.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TD7ZQZ5W.js";
|
|
25
25
|
import "./chunk-6GWA276C.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-OGMHLKNO.js";
|
|
27
|
+
import "./chunk-LUIKMY35.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>;
|
|
@@ -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<{
|
|
@@ -1341,3 +1352,5 @@ export type AcceptedConversationMessage = z.infer<typeof acceptedConversationMes
|
|
|
1341
1352
|
export type ConversationPendingMessageDelivery = z.infer<typeof conversationPendingMessageDeliverySchema>;
|
|
1342
1353
|
export type ConversationPendingMessage = z.infer<typeof conversationPendingMessageSchema>;
|
|
1343
1354
|
export type ConversationPendingMessagesReport = z.infer<typeof conversationPendingMessagesReportSchema>;
|
|
1355
|
+
export type CancelConversationPendingMessagesBody = z.infer<typeof cancelConversationPendingMessagesBodySchema>;
|
|
1356
|
+
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-EQXVKNLM.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-EQXVKNLM.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-YSMAMSOU.js";
|
|
48
50
|
import {
|
|
49
51
|
buildSentryConversationUrl,
|
|
50
52
|
getWebAuthorization
|
|
51
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-UG673UVL.js";
|
|
52
54
|
import {
|
|
55
|
+
cancelHumanFacingPendingMessages,
|
|
53
56
|
getConversation
|
|
54
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-FWDN67U3.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-NCJV265M.js";
|
|
66
|
+
import "./chunk-UKKOKMRE.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-NT6V5WEE.js";
|
|
89
92
|
import {
|
|
90
93
|
parseSlackThreadId
|
|
91
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-IJ6KWS3V.js";
|
|
92
95
|
import {
|
|
93
96
|
agentTurnUsageSchema,
|
|
94
97
|
fallbackShortTitle,
|
|
95
98
|
hasAgentTurnUsage,
|
|
96
99
|
renderJuniorNativeConversationEvent
|
|
97
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-54O6IKUS.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-EBP6IS66.js";
|
|
108
111
|
import {
|
|
109
112
|
getSlackClient,
|
|
110
113
|
withSlackRetries
|
|
111
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-K2LAI7RW.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-QODFNKQS.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-O2DZWUPQ.js";
|
|
128
131
|
import "./chunk-EM225ITJ.js";
|
|
129
|
-
import "./chunk-
|
|
130
|
-
import "./chunk-
|
|
132
|
+
import "./chunk-Q5X37U6G.js";
|
|
133
|
+
import "./chunk-L2PEQ2PY.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-PT7B6A3O.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-TD7ZQZ5W.js";
|
|
147
150
|
import "./chunk-6GWA276C.js";
|
|
148
|
-
import "./chunk-
|
|
149
|
-
import "./chunk-
|
|
151
|
+
import "./chunk-OGMHLKNO.js";
|
|
152
|
+
import "./chunk-LUIKMY35.js";
|
|
150
153
|
import "./chunk-MLKGABMK.js";
|
|
151
154
|
|
|
152
155
|
// src/api.ts
|
|
@@ -2629,6 +2632,40 @@ async function readConversationEvents(conversationId, beforeValue, options = {})
|
|
|
2629
2632
|
});
|
|
2630
2633
|
}
|
|
2631
2634
|
|
|
2635
|
+
// src/api/conversations/cancel-pending-messages.ts
|
|
2636
|
+
async function cancelConversationPendingMessagesForViewer(viewer, conversationId, body = {}) {
|
|
2637
|
+
const conversation = await getConversationStore().get({ conversationId });
|
|
2638
|
+
if (!conversation) {
|
|
2639
|
+
throwApiError(404, "Conversation not found.");
|
|
2640
|
+
}
|
|
2641
|
+
const access = await readConversationAccessFromSql(
|
|
2642
|
+
getDb(),
|
|
2643
|
+
[conversationId],
|
|
2644
|
+
viewer
|
|
2645
|
+
);
|
|
2646
|
+
if (!access.get(conversationId)?.isParticipant) {
|
|
2647
|
+
throwApiError(
|
|
2648
|
+
403,
|
|
2649
|
+
"Only conversation participants can cancel queued messages."
|
|
2650
|
+
);
|
|
2651
|
+
}
|
|
2652
|
+
try {
|
|
2653
|
+
const result = await cancelHumanFacingPendingMessages({
|
|
2654
|
+
conversationId,
|
|
2655
|
+
...body.inboundMessageIds ? { inboundMessageIds: body.inboundMessageIds } : {},
|
|
2656
|
+
...body.receivedBefore ? { receivedBeforeMs: Date.parse(body.receivedBefore) } : {},
|
|
2657
|
+
conversationStore: getConversationStore()
|
|
2658
|
+
});
|
|
2659
|
+
return {
|
|
2660
|
+
cancelledCount: result.cancelledInboundMessageIds.length,
|
|
2661
|
+
cancelledInboundMessageIds: result.cancelledInboundMessageIds,
|
|
2662
|
+
conversationId
|
|
2663
|
+
};
|
|
2664
|
+
} catch (error) {
|
|
2665
|
+
throwApiError(500, "Unable to cancel queued messages.", error);
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2632
2669
|
// src/api/conversations/pending-messages.ts
|
|
2633
2670
|
import { z as z4 } from "zod";
|
|
2634
2671
|
var apiTurnMailboxMetadataSchema = z4.object({
|
|
@@ -3277,6 +3314,33 @@ function createConversationRoutes(options) {
|
|
|
3277
3314
|
);
|
|
3278
3315
|
}
|
|
3279
3316
|
);
|
|
3317
|
+
app.delete(
|
|
3318
|
+
"/:conversationId/pending-messages",
|
|
3319
|
+
requireViewer,
|
|
3320
|
+
validateRequest(
|
|
3321
|
+
"param",
|
|
3322
|
+
conversationParamsSchema,
|
|
3323
|
+
"Invalid route parameters."
|
|
3324
|
+
),
|
|
3325
|
+
validateRequest(
|
|
3326
|
+
"json",
|
|
3327
|
+
cancelConversationPendingMessagesBodySchema,
|
|
3328
|
+
"Invalid request body."
|
|
3329
|
+
),
|
|
3330
|
+
async (context) => {
|
|
3331
|
+
const viewer = context.get("viewer");
|
|
3332
|
+
const { conversationId } = context.req.valid("param");
|
|
3333
|
+
const body = context.req.valid("json");
|
|
3334
|
+
return jsonResponse(
|
|
3335
|
+
cancelConversationPendingMessagesResponseSchema,
|
|
3336
|
+
await cancelConversationPendingMessagesForViewer(
|
|
3337
|
+
viewer,
|
|
3338
|
+
conversationId,
|
|
3339
|
+
body
|
|
3340
|
+
)
|
|
3341
|
+
);
|
|
3342
|
+
}
|
|
3343
|
+
);
|
|
3280
3344
|
app.get(
|
|
3281
3345
|
"/:conversationId/attachments/:attachmentId",
|
|
3282
3346
|
validateRequest(
|
|
@@ -4660,7 +4724,7 @@ function readDescriptionText(home) {
|
|
|
4660
4724
|
}
|
|
4661
4725
|
}
|
|
4662
4726
|
async function readSkillReports() {
|
|
4663
|
-
const { discoverSkills } = await import("./skills-
|
|
4727
|
+
const { discoverSkills } = await import("./skills-MBRLNBRV.js");
|
|
4664
4728
|
const skills = await discoverSkills();
|
|
4665
4729
|
return skillReportsSchema.parse(
|
|
4666
4730
|
skills.map((skill) => ({
|
|
@@ -4670,7 +4734,7 @@ async function readSkillReports() {
|
|
|
4670
4734
|
);
|
|
4671
4735
|
}
|
|
4672
4736
|
async function readPlugins() {
|
|
4673
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4737
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-6VANKLH5.js");
|
|
4674
4738
|
return pluginsSchema.parse(
|
|
4675
4739
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4676
4740
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4683,7 +4747,7 @@ async function readPlugins() {
|
|
|
4683
4747
|
async function readRuntimeInfoReport() {
|
|
4684
4748
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4685
4749
|
import("./discovery-GUFTFBTL.js"),
|
|
4686
|
-
import("./catalog-runtime-
|
|
4750
|
+
import("./catalog-runtime-6VANKLH5.js"),
|
|
4687
4751
|
readPlugins(),
|
|
4688
4752
|
readSkillReports()
|
|
4689
4753
|
]);
|
|
@@ -4699,7 +4763,7 @@ async function readRuntimeInfoReport() {
|
|
|
4699
4763
|
}
|
|
4700
4764
|
async function readPluginOperationalReportFeed() {
|
|
4701
4765
|
const nowMs = Date.now();
|
|
4702
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4766
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-IAD3AANZ.js");
|
|
4703
4767
|
return pluginOperationalReportFeedSchema.parse({
|
|
4704
4768
|
source: "plugins",
|
|
4705
4769
|
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-AIQKUJKK.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UP6KQVF5.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-27UQ7UB3.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-DXSZJAVZ.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WTQ3CKC3.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-YSMAMSOU.js";
|
|
55
|
+
import "./chunk-UG673UVL.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-FWDN67U3.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-NCJV265M.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-UKKOKMRE.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-6IADZQJR.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-SQOVZSWF.js";
|
|
159
159
|
import {
|
|
160
160
|
AuthorizationFlowDisabledError,
|
|
161
161
|
PluginCredentialFailureError
|
|
162
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-X7AIXRVJ.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-AZW5HKC5.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-DJZPA72K.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-PQWWCKNB.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-NT6V5WEE.js";
|
|
196
196
|
import {
|
|
197
197
|
parseSlackThreadId
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-IJ6KWS3V.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-54O6IKUS.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-EBP6IS66.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-K2LAI7RW.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-QODFNKQS.js";
|
|
292
292
|
import {
|
|
293
293
|
juniorAgentBindings,
|
|
294
294
|
juniorAgentInvocations,
|
|
295
295
|
juniorConversationEvents,
|
|
296
296
|
juniorConversations
|
|
297
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-O2DZWUPQ.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-Q5X37U6G.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-L2PEQ2PY.js";
|
|
322
322
|
import {
|
|
323
323
|
juniorDestinations
|
|
324
324
|
} from "./chunk-VFUK3X5B.js";
|
|
325
|
-
import "./chunk-
|
|
326
|
-
import "./chunk-
|
|
325
|
+
import "./chunk-PT7B6A3O.js";
|
|
326
|
+
import "./chunk-U7D4VLUF.js";
|
|
327
327
|
import {
|
|
328
328
|
pluginCatalogRuntime
|
|
329
|
-
} from "./chunk-
|
|
330
|
-
import "./chunk-
|
|
329
|
+
} from "./chunk-CNHELV2P.js";
|
|
330
|
+
import "./chunk-YCBZ47LC.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-TD7ZQZ5W.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-OGMHLKNO.js";
|
|
371
371
|
import {
|
|
372
372
|
JUNIOR_VERSION
|
|
373
|
-
} from "./chunk-
|
|
373
|
+
} from "./chunk-LUIKMY35.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-CNHELV2P.js";
|
|
4
|
+
import "./chunk-YCBZ47LC.js";
|
|
5
5
|
import "./chunk-BDUENQD3.js";
|
|
6
6
|
import "./chunk-V7YE4WCP.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-TD7ZQZ5W.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-OGMHLKNO.js";
|
|
12
|
+
import "./chunk-LUIKMY35.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
export {
|
|
15
15
|
pluginCatalogRuntime
|
|
@@ -1016,7 +1016,10 @@ export interface ConversationEventPage {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
/** Persist and read the canonical per-conversation event log. */
|
|
1018
1018
|
export interface ConversationEventStore {
|
|
1019
|
-
/**
|
|
1019
|
+
/**
|
|
1020
|
+
* Append events atomically, optionally preserving conversation activity.
|
|
1021
|
+
* Archive clears only for human user activity, not every non-preserve write.
|
|
1022
|
+
*/
|
|
1020
1023
|
append(conversationId: string, events: NewConversationEvent[], options?: {
|
|
1021
1024
|
activity?: "preserve";
|
|
1022
1025
|
}): Promise<void>;
|
|
@@ -11,7 +11,8 @@ export declare function ensureBlockSpacing(text: string): string;
|
|
|
11
11
|
* or `{ type: "markdown" }` blocks.
|
|
12
12
|
*
|
|
13
13
|
* Pre-wraps bare URLs as Slack explicit links to prevent Slack's auto-linker
|
|
14
|
-
* from consuming adjacent formatting markers.
|
|
14
|
+
* from consuming adjacent formatting markers. Also turns unambiguous GitHub
|
|
15
|
+
* `owner/repo#number` mentions into Markdown links. Slack reply delivery owns
|
|
15
16
|
* chunking and continuation markers separately.
|
|
16
17
|
*/
|
|
17
18
|
export declare function normalizeSlackReplyMarkdown(text: string): string;
|
|
@@ -256,6 +256,16 @@ export declare function ackMessages(args: {
|
|
|
256
256
|
nowMs?: number;
|
|
257
257
|
state?: StateAdapter;
|
|
258
258
|
}): Promise<boolean>;
|
|
259
|
+
/** Cancel human-facing pending mailbox rows without requiring a worker lease. */
|
|
260
|
+
export declare function cancelHumanFacingPendingMessages(args: {
|
|
261
|
+
conversationId: string;
|
|
262
|
+
inboundMessageIds?: readonly string[];
|
|
263
|
+
receivedBeforeMs?: number;
|
|
264
|
+
nowMs?: number;
|
|
265
|
+
state?: StateAdapter;
|
|
266
|
+
}): Promise<{
|
|
267
|
+
cancelledInboundMessageIds: string[];
|
|
268
|
+
}>;
|
|
259
269
|
/** Mark the leased conversation as needing another queue-delivered slice. */
|
|
260
270
|
export declare function requestAnotherSlice(args: {
|
|
261
271
|
conversationId: string;
|
|
@@ -136,6 +136,17 @@ export declare function ackMessages(args: {
|
|
|
136
136
|
nowMs?: number;
|
|
137
137
|
state?: StateAdapter;
|
|
138
138
|
}): Promise<boolean>;
|
|
139
|
+
/** Cancel human-facing pending mailbox rows without requiring a worker lease. */
|
|
140
|
+
export declare function cancelHumanFacingPendingMessages(args: {
|
|
141
|
+
conversationId: string;
|
|
142
|
+
inboundMessageIds?: readonly string[];
|
|
143
|
+
receivedBeforeMs?: number;
|
|
144
|
+
conversationStore?: ConversationStore;
|
|
145
|
+
nowMs?: number;
|
|
146
|
+
state?: StateAdapter;
|
|
147
|
+
}): Promise<{
|
|
148
|
+
cancelledInboundMessageIds: string[];
|
|
149
|
+
}>;
|
|
139
150
|
/** Mark the leased conversation as needing another queue-delivered slice. */
|
|
140
151
|
export declare function requestAnotherSlice(args: {
|
|
141
152
|
conversationId: string;
|