@sentry/junior 0.151.0 → 0.152.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-EYUAEBMA.js → agent-hooks-U66Q3X2P.js} +10 -10
- package/dist/api/schema/conversation.d.ts +11 -0
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +3 -1
- package/dist/api.js +40 -25
- package/dist/app.js +38 -38
- package/dist/{catalog-runtime-2LCLLOBI.js → catalog-runtime-CVCR7SND.js} +5 -5
- package/dist/chat/api-turns/authorization.d.ts +23 -0
- package/dist/{chunk-JIJOPRD4.js → chunk-3PCKG4BT.js} +4 -4
- package/dist/{chunk-OYRFUQOV.js → chunk-3UJ3QYRV.js} +59 -12
- package/dist/{chunk-3WOK4ZLX.js → chunk-5LDOQV7Y.js} +18 -18
- package/dist/{chunk-EMB4VY7H.js → chunk-67VR4BJK.js} +5 -5
- package/dist/{chunk-PWMVR2MD.js → chunk-732P2RBQ.js} +1 -1
- package/dist/{chunk-OAPPJ3TM.js → chunk-7TZM33YX.js} +1 -1
- package/dist/{chunk-6A46QL4O.js → chunk-AYPU5T5L.js} +4 -4
- package/dist/{chunk-2MGJ64SL.js → chunk-CLX3T7Q3.js} +1 -1
- package/dist/{chunk-WVXFEQXE.js → chunk-ELAVLP7Z.js} +1 -1
- package/dist/{chunk-CL5DT6D2.js → chunk-ETXLHT3S.js} +4 -4
- package/dist/{chunk-J5LAA2LI.js → chunk-I4LR7MS2.js} +45 -11
- package/dist/{chunk-PQUV3NA5.js → chunk-KC47ZY6Q.js} +2 -2
- package/dist/{chunk-JSKTDBSS.js → chunk-KC5XZBRB.js} +4 -4
- package/dist/{chunk-AGSUPAD5.js → chunk-KTYC3GDO.js} +3 -3
- package/dist/{chunk-6WNWM5JD.js → chunk-KW2MGCW5.js} +5 -5
- package/dist/{chunk-C7D2ONB5.js → chunk-LETPYIDF.js} +1 -1
- package/dist/{chunk-DJAOSWB6.js → chunk-M6PWM3OK.js} +1 -1
- package/dist/{chunk-OFRJXFTH.js → chunk-N2472SQK.js} +8 -8
- package/dist/{chunk-QVQBWWXQ.js → chunk-NF733C66.js} +6 -6
- package/dist/{chunk-D22FO4LW.js → chunk-OEECXAGT.js} +2 -2
- package/dist/{chunk-M6KRPBXC.js → chunk-QKPIW2CY.js} +6 -6
- package/dist/{chunk-UDDCHQN2.js → chunk-RCBAXKMB.js} +1 -1
- package/dist/{chunk-ZGSL5ARH.js → chunk-SDMVFTH4.js} +141 -66
- package/dist/chunk-SFYDSI34.js +89 -0
- package/dist/{chunk-B7KWBJAR.js → chunk-TSQMITMQ.js} +6 -6
- package/dist/{chunk-KPQBQRNM.js → chunk-UFKSILED.js} +5 -5
- package/dist/{chunk-XN3QKNQX.js → chunk-UG5UCHHJ.js} +7 -0
- package/dist/{chunk-6PGJPCN2.js → chunk-VD6CRYCT.js} +1 -1
- package/dist/{chunk-6DLWRSGV.js → chunk-WZN4RQ64.js} +1 -1
- package/dist/{chunk-5N3XLYBW.js → chunk-X4RM4TBW.js} +1 -1
- package/dist/{chunk-YN4W5SRJ.js → chunk-X6JP6AMX.js} +1 -1
- package/dist/{chunk-K3QXMZDU.js → chunk-XTLF7C4I.js} +3 -3
- package/dist/{chunk-H7ZMEHAN.js → chunk-Z5WLTGME.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-ALCBI4JZ.js → db-HQAZQASY.js} +7 -7
- package/dist/handlers/mcp-oauth-callback.d.ts +3 -0
- package/dist/handlers/oauth-callback.d.ts +3 -0
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-3RRMG62B.js → oauth-callback-server-OJONZ7T3.js} +23 -24
- package/dist/{runner-V6C3EELU.js → runner-BIJAVQDX.js} +14 -16
- package/dist/{skills-43PFYZIZ.js → skills-SIPNY4AT.js} +6 -6
- package/dist/spawn-ABDIBQT6.js +38 -0
- package/dist/{validation-4MNN6QKE.js → validation-KRPOY5RQ.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-YZO6XTEB.js → work-KS3JOEI2.js} +17 -17
- package/dist/{worker-42AR7323.js → worker-CZ5KNZUI.js} +11 -11
- package/package.json +5 -5
- package/dist/chunk-4ABTAQYC.js +0 -48
- package/dist/chunk-4CODA7P5.js +0 -43
- package/dist/spawn-UZNNTNFU.js +0 -38
|
@@ -11,21 +11,21 @@ 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-NF733C66.js";
|
|
15
|
+
import "./chunk-KTYC3GDO.js";
|
|
16
|
+
import "./chunk-XTLF7C4I.js";
|
|
17
|
+
import "./chunk-X4RM4TBW.js";
|
|
18
18
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-X6JP6AMX.js";
|
|
20
|
+
import "./chunk-OEECXAGT.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-732P2RBQ.js";
|
|
23
23
|
import "./chunk-HZF5P5UN.js";
|
|
24
24
|
import "./chunk-F3B2YJ76.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-7TZM33YX.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-M6PWM3OK.js";
|
|
28
|
+
import "./chunk-ELAVLP7Z.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
|
@@ -107,8 +107,19 @@ export declare const conversationPendingMessageSchema: z.ZodObject<{
|
|
|
107
107
|
text: z.ZodOptional<z.ZodString>;
|
|
108
108
|
redacted: z.ZodOptional<z.ZodLiteral<true>>;
|
|
109
109
|
}, z.core.$strict>;
|
|
110
|
+
/** Participant-only authorization prompt for a parked web turn. */
|
|
111
|
+
export declare const conversationPendingAuthorizationSchema: z.ZodObject<{
|
|
112
|
+
authorizationUrl: z.ZodString;
|
|
113
|
+
completionText: z.ZodString;
|
|
114
|
+
label: z.ZodString;
|
|
115
|
+
}, z.core.$strict>;
|
|
110
116
|
/** Bounded mailbox snapshot for one conversation transcript. */
|
|
111
117
|
export declare const conversationPendingMessagesReportSchema: z.ZodObject<{
|
|
118
|
+
authorization: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
authorizationUrl: z.ZodString;
|
|
120
|
+
completionText: z.ZodString;
|
|
121
|
+
label: z.ZodString;
|
|
122
|
+
}, z.core.$strict>>;
|
|
112
123
|
conversationId: z.ZodString;
|
|
113
124
|
generatedAt: z.ZodString;
|
|
114
125
|
messages: z.ZodArray<z.ZodObject<{
|
package/dist/api/schema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, createConversationBodySchema, createConversationMessageBodySchema, } from "./schema/conversation";
|
|
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
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";
|
|
5
5
|
export { actorDirectoryReportSchema, actorProfileReportSchema, personalSpendReportSchema, personParamsSchema, } from "./schema/person";
|
|
6
6
|
export { locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, } from "./schema/location";
|
package/dist/api/schema.js
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
conversationFeedQuerySchema,
|
|
15
15
|
conversationFeedSchema,
|
|
16
16
|
conversationParamsSchema,
|
|
17
|
+
conversationPendingAuthorizationSchema,
|
|
17
18
|
conversationPendingMessageDeliverySchema,
|
|
18
19
|
conversationPendingMessageSchema,
|
|
19
20
|
conversationPendingMessagesReportSchema,
|
|
@@ -49,7 +50,7 @@ import {
|
|
|
49
50
|
taskRunListSchema,
|
|
50
51
|
taskRunSchema,
|
|
51
52
|
taskSummarySchema
|
|
52
|
-
} from "../chunk-
|
|
53
|
+
} from "../chunk-UG5UCHHJ.js";
|
|
53
54
|
import {
|
|
54
55
|
healthReportSchema,
|
|
55
56
|
pluginOperationalReportFeedSchema,
|
|
@@ -81,6 +82,7 @@ export {
|
|
|
81
82
|
conversationFeedQuerySchema,
|
|
82
83
|
conversationFeedSchema,
|
|
83
84
|
conversationParamsSchema,
|
|
85
|
+
conversationPendingAuthorizationSchema,
|
|
84
86
|
conversationPendingMessageDeliverySchema,
|
|
85
87
|
conversationPendingMessageSchema,
|
|
86
88
|
conversationPendingMessagesReportSchema,
|
package/dist/api.js
CHANGED
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
taskListSchema,
|
|
34
34
|
taskParamsSchema,
|
|
35
35
|
taskRunListSchema
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UG5UCHHJ.js";
|
|
37
37
|
import {
|
|
38
38
|
appendAndEnqueueApiConversationMessage,
|
|
39
39
|
createAndEnqueueApiConversation,
|
|
@@ -42,13 +42,14 @@ import {
|
|
|
42
42
|
readHealthReport,
|
|
43
43
|
resolveSlackConversationContextFromThreadId,
|
|
44
44
|
webActorFromEmail
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3UJ3QYRV.js";
|
|
46
46
|
import {
|
|
47
|
-
buildSentryConversationUrl
|
|
48
|
-
|
|
47
|
+
buildSentryConversationUrl,
|
|
48
|
+
getWebAuthorization
|
|
49
|
+
} from "./chunk-SFYDSI34.js";
|
|
49
50
|
import {
|
|
50
51
|
getConversation
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-AYPU5T5L.js";
|
|
52
53
|
import {
|
|
53
54
|
readTaskExecutionByConversationId,
|
|
54
55
|
readTaskExecutionDays,
|
|
@@ -56,8 +57,8 @@ import {
|
|
|
56
57
|
readTaskExecutionSummaries,
|
|
57
58
|
readTaskExecutions,
|
|
58
59
|
readTaskRuns
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import "./chunk-
|
|
60
|
+
} from "./chunk-I4LR7MS2.js";
|
|
61
|
+
import "./chunk-67VR4BJK.js";
|
|
61
62
|
import {
|
|
62
63
|
healthReportSchema,
|
|
63
64
|
pluginOperationalReportFeedSchema,
|
|
@@ -81,16 +82,16 @@ import {
|
|
|
81
82
|
listPublicEventTasksForTeams,
|
|
82
83
|
listPublicScheduledTasksForTeams,
|
|
83
84
|
readStats
|
|
84
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-KW2MGCW5.js";
|
|
85
86
|
import {
|
|
86
87
|
parseSlackThreadId
|
|
87
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-RCBAXKMB.js";
|
|
88
89
|
import {
|
|
89
90
|
agentTurnUsageSchema,
|
|
90
91
|
fallbackShortTitle,
|
|
91
92
|
hasAgentTurnUsage,
|
|
92
93
|
renderJuniorNativeConversationEvent
|
|
93
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-3PCKG4BT.js";
|
|
94
95
|
import "./chunk-3Y47VMHV.js";
|
|
95
96
|
import "./chunk-PDO5BLNM.js";
|
|
96
97
|
import {
|
|
@@ -100,11 +101,11 @@ import {
|
|
|
100
101
|
renderPluginConversationEvent,
|
|
101
102
|
resolveViewerUser,
|
|
102
103
|
updateViewerDisplayName
|
|
103
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-NF733C66.js";
|
|
104
105
|
import {
|
|
105
106
|
getSlackClient,
|
|
106
107
|
withSlackRetries
|
|
107
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-KTYC3GDO.js";
|
|
108
109
|
import {
|
|
109
110
|
decodeStoredConversationEvent,
|
|
110
111
|
getConversationStore,
|
|
@@ -112,23 +113,23 @@ import {
|
|
|
112
113
|
getSqlExecutor,
|
|
113
114
|
locationFromRow,
|
|
114
115
|
parseSessionSource
|
|
115
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-XTLF7C4I.js";
|
|
116
117
|
import {
|
|
117
118
|
juniorApiTokens,
|
|
118
119
|
juniorConversationEvents,
|
|
119
120
|
juniorConversations,
|
|
120
121
|
juniorIdentities,
|
|
121
122
|
juniorUsers
|
|
122
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-X4RM4TBW.js";
|
|
123
124
|
import "./chunk-EM225ITJ.js";
|
|
124
|
-
import "./chunk-
|
|
125
|
-
import "./chunk-
|
|
125
|
+
import "./chunk-X6JP6AMX.js";
|
|
126
|
+
import "./chunk-OEECXAGT.js";
|
|
126
127
|
import {
|
|
127
128
|
juniorDestinations
|
|
128
129
|
} from "./chunk-VFUK3X5B.js";
|
|
129
130
|
import {
|
|
130
131
|
canExposeConversationPayload
|
|
131
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-732P2RBQ.js";
|
|
132
133
|
import "./chunk-RUIXF3YQ.js";
|
|
133
134
|
import "./chunk-HZF5P5UN.js";
|
|
134
135
|
import {
|
|
@@ -138,10 +139,10 @@ import {
|
|
|
138
139
|
} from "./chunk-F3B2YJ76.js";
|
|
139
140
|
import {
|
|
140
141
|
logException
|
|
141
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-7TZM33YX.js";
|
|
142
143
|
import "./chunk-6GWA276C.js";
|
|
143
|
-
import "./chunk-
|
|
144
|
-
import "./chunk-
|
|
144
|
+
import "./chunk-M6PWM3OK.js";
|
|
145
|
+
import "./chunk-ELAVLP7Z.js";
|
|
145
146
|
import "./chunk-MLKGABMK.js";
|
|
146
147
|
|
|
147
148
|
// src/api.ts
|
|
@@ -2457,8 +2458,15 @@ async function projectPendingMessage(message2, canExposePayload) {
|
|
|
2457
2458
|
async function readConversationPendingMessages(conversationId, options = {}) {
|
|
2458
2459
|
const conversation = await getConversationStore().get({ conversationId });
|
|
2459
2460
|
if (!conversation) return void 0;
|
|
2460
|
-
const access = (await readConversationAccessFromSql(
|
|
2461
|
+
const access = (await readConversationAccessFromSql(
|
|
2462
|
+
getDb(),
|
|
2463
|
+
[conversationId],
|
|
2464
|
+
options.viewer
|
|
2465
|
+
)).get(conversationId);
|
|
2461
2466
|
const canExposePayload = access?.canViewPrivateContent ?? false;
|
|
2467
|
+
const isParticipant = access?.isParticipant ?? false;
|
|
2468
|
+
const actorId = options.viewer?.email ? webActorFromEmail(options.viewer.email).userId : void 0;
|
|
2469
|
+
const authorization = isParticipant && actorId ? await getWebAuthorization({ actorId, conversationId }) : void 0;
|
|
2462
2470
|
const work = await getConversation({ conversationId });
|
|
2463
2471
|
const projectedMessages = await Promise.all(
|
|
2464
2472
|
(work?.execution.pendingMessages ?? []).map(
|
|
@@ -2469,6 +2477,13 @@ async function readConversationPendingMessages(conversationId, options = {}) {
|
|
|
2469
2477
|
(message2) => Boolean(message2)
|
|
2470
2478
|
);
|
|
2471
2479
|
return conversationPendingMessagesReportSchema.parse({
|
|
2480
|
+
...authorization ? {
|
|
2481
|
+
authorization: {
|
|
2482
|
+
authorizationUrl: authorization.authorizationUrl,
|
|
2483
|
+
completionText: authorization.completionText,
|
|
2484
|
+
label: authorization.label
|
|
2485
|
+
}
|
|
2486
|
+
} : {},
|
|
2472
2487
|
conversationId,
|
|
2473
2488
|
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2474
2489
|
messages
|
|
@@ -4338,7 +4353,7 @@ function readDescriptionText(home) {
|
|
|
4338
4353
|
}
|
|
4339
4354
|
}
|
|
4340
4355
|
async function readSkillReports() {
|
|
4341
|
-
const { discoverSkills } = await import("./skills-
|
|
4356
|
+
const { discoverSkills } = await import("./skills-SIPNY4AT.js");
|
|
4342
4357
|
const skills = await discoverSkills();
|
|
4343
4358
|
return skillReportsSchema.parse(
|
|
4344
4359
|
skills.map((skill) => ({
|
|
@@ -4348,7 +4363,7 @@ async function readSkillReports() {
|
|
|
4348
4363
|
);
|
|
4349
4364
|
}
|
|
4350
4365
|
async function readPlugins() {
|
|
4351
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4366
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-CVCR7SND.js");
|
|
4352
4367
|
return pluginsSchema.parse(
|
|
4353
4368
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4354
4369
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -4361,7 +4376,7 @@ async function readPlugins() {
|
|
|
4361
4376
|
async function readRuntimeInfoReport() {
|
|
4362
4377
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4363
4378
|
import("./discovery-GUFTFBTL.js"),
|
|
4364
|
-
import("./catalog-runtime-
|
|
4379
|
+
import("./catalog-runtime-CVCR7SND.js"),
|
|
4365
4380
|
readPlugins(),
|
|
4366
4381
|
readSkillReports()
|
|
4367
4382
|
]);
|
|
@@ -4377,7 +4392,7 @@ async function readRuntimeInfoReport() {
|
|
|
4377
4392
|
}
|
|
4378
4393
|
async function readPluginOperationalReportFeed() {
|
|
4379
4394
|
const nowMs = Date.now();
|
|
4380
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4395
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-U66Q3X2P.js");
|
|
4381
4396
|
return pluginOperationalReportFeedSchema.parse({
|
|
4382
4397
|
source: "plugins",
|
|
4383
4398
|
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-ETXLHT3S.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LETPYIDF.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TSQMITMQ.js";
|
|
13
13
|
import {
|
|
14
14
|
GET as GET2,
|
|
15
15
|
GET2 as GET3,
|
|
@@ -36,16 +36,12 @@ import {
|
|
|
36
36
|
startSlackProcessingReaction,
|
|
37
37
|
stripLeadingBotMention,
|
|
38
38
|
wakePausedTurn
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-SDMVFTH4.js";
|
|
40
40
|
import "./chunk-FA6POGLH.js";
|
|
41
41
|
import {
|
|
42
42
|
getTurnRequestDeadline,
|
|
43
43
|
runWithTurnRequestDeadline
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import {
|
|
46
|
-
completeAuthPauseTurn,
|
|
47
|
-
persistAuthPauseTurnState
|
|
48
|
-
} from "./chunk-4ABTAQYC.js";
|
|
44
|
+
} from "./chunk-Z5WLTGME.js";
|
|
49
45
|
import {
|
|
50
46
|
GET,
|
|
51
47
|
conversationVisibilityFromSlackChannelType,
|
|
@@ -54,8 +50,8 @@ import {
|
|
|
54
50
|
resolveSlackChannelTypeFromMessage,
|
|
55
51
|
resolveSlackConversationContext,
|
|
56
52
|
routeApiTurnWork
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-3UJ3QYRV.js";
|
|
54
|
+
import "./chunk-SFYDSI34.js";
|
|
59
55
|
import {
|
|
60
56
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
61
57
|
appendAndEnqueueInboundMessage,
|
|
@@ -66,10 +62,11 @@ import {
|
|
|
66
62
|
isInvalidConversationRecordError,
|
|
67
63
|
listActiveConversationIds,
|
|
68
64
|
removeActiveConversation
|
|
69
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-AYPU5T5L.js";
|
|
70
66
|
import {
|
|
71
67
|
buildDeliveredTurnStatePatch,
|
|
72
68
|
claimDispatchMailboxAppend,
|
|
69
|
+
completeAuthPauseTurn,
|
|
73
70
|
confirmDispatchMailboxAppend,
|
|
74
71
|
createOrGetDispatch,
|
|
75
72
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -90,12 +87,13 @@ import {
|
|
|
90
87
|
markDispatchCompleted,
|
|
91
88
|
markDispatchFailed,
|
|
92
89
|
markDispatchRunning,
|
|
90
|
+
persistAuthPauseTurnState,
|
|
93
91
|
processPluginTask,
|
|
94
92
|
recordTaskExecution,
|
|
95
93
|
requireTurnFailureEventId,
|
|
96
94
|
resolveTurnSessionRouting,
|
|
97
95
|
scheduleSessionCompletedPluginTasks
|
|
98
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-I4LR7MS2.js";
|
|
99
97
|
import {
|
|
100
98
|
ConversationTurnLifecycleService,
|
|
101
99
|
coerceThreadConversationState,
|
|
@@ -105,7 +103,7 @@ import {
|
|
|
105
103
|
persistThreadRuntimeState,
|
|
106
104
|
persistThreadState,
|
|
107
105
|
persistThreadStateById
|
|
108
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-67VR4BJK.js";
|
|
109
107
|
import "./chunk-UTL3MHPC.js";
|
|
110
108
|
import {
|
|
111
109
|
getVercelConversationWorkQueue,
|
|
@@ -124,7 +122,7 @@ import {
|
|
|
124
122
|
import {
|
|
125
123
|
validatePluginEgressCredentialHooks,
|
|
126
124
|
validatePluginRegistrations
|
|
127
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-VD6CRYCT.js";
|
|
128
126
|
import {
|
|
129
127
|
defineJuniorPlugins,
|
|
130
128
|
pluginCatalogConfigFromEnv,
|
|
@@ -157,18 +155,18 @@ import {
|
|
|
157
155
|
setConfigDefaults,
|
|
158
156
|
shouldEmitDevAgentTrace,
|
|
159
157
|
shouldPropagateSandboxEgressTrace
|
|
160
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-5LDOQV7Y.js";
|
|
161
159
|
import {
|
|
162
160
|
AuthorizationFlowDisabledError,
|
|
163
161
|
PluginCredentialFailureError
|
|
164
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-UFKSILED.js";
|
|
165
163
|
import "./chunk-DIB4GX3G.js";
|
|
166
164
|
import {
|
|
167
165
|
createUserTokenStore,
|
|
168
166
|
deleteMcpAuthSessionsForUserProvider,
|
|
169
167
|
deleteMcpServerSessionId,
|
|
170
168
|
deleteMcpStoredOAuthCredentials
|
|
171
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-N2472SQK.js";
|
|
172
170
|
import {
|
|
173
171
|
RetryableDeliveryError
|
|
174
172
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -176,7 +174,7 @@ import {
|
|
|
176
174
|
formatProviderLabel,
|
|
177
175
|
postSlackMessage,
|
|
178
176
|
startOAuthFlow
|
|
179
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-QKPIW2CY.js";
|
|
180
178
|
import "./chunk-HUO3UTAQ.js";
|
|
181
179
|
import {
|
|
182
180
|
getExperimentalFeatures,
|
|
@@ -185,16 +183,16 @@ import {
|
|
|
185
183
|
import {
|
|
186
184
|
getSandboxResourceConfig,
|
|
187
185
|
setSandboxResourceConfig
|
|
188
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-KC5XZBRB.js";
|
|
189
187
|
import {
|
|
190
188
|
createSchedulerSqlStore,
|
|
191
189
|
findMatchingEventTasks,
|
|
192
190
|
logScheduledTaskRunSkipped,
|
|
193
191
|
scheduledTaskRunAttributes
|
|
194
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-KW2MGCW5.js";
|
|
195
193
|
import {
|
|
196
194
|
parseSlackThreadId
|
|
197
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-RCBAXKMB.js";
|
|
198
196
|
import {
|
|
199
197
|
ConversationTurnBoundaryError,
|
|
200
198
|
CooperativeTurnYieldError,
|
|
@@ -244,7 +242,7 @@ import {
|
|
|
244
242
|
trimTrailingAssistantMessages,
|
|
245
243
|
turnHasReply,
|
|
246
244
|
upsertConversationMessage
|
|
247
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-3PCKG4BT.js";
|
|
248
246
|
import "./chunk-3Y47VMHV.js";
|
|
249
247
|
import "./chunk-PDO5BLNM.js";
|
|
250
248
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -264,7 +262,7 @@ import {
|
|
|
264
262
|
verifyEventTaskCredentialSubject,
|
|
265
263
|
verifyScheduledTaskCredentialSubject,
|
|
266
264
|
verifySlackDirectCredentialSubject
|
|
267
|
-
} from "./chunk-
|
|
265
|
+
} from "./chunk-NF733C66.js";
|
|
268
266
|
import {
|
|
269
267
|
SlackActionError,
|
|
270
268
|
downloadPrivateSlackFile,
|
|
@@ -274,7 +272,7 @@ import {
|
|
|
274
272
|
normalizeSlackConversationId,
|
|
275
273
|
runWithSlackInstallationToken,
|
|
276
274
|
runWithWorkspaceTeamId
|
|
277
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-KTYC3GDO.js";
|
|
278
276
|
import {
|
|
279
277
|
contextProvenance,
|
|
280
278
|
createSlackDestination,
|
|
@@ -287,19 +285,19 @@ import {
|
|
|
287
285
|
requireSlackDestination,
|
|
288
286
|
withConversationEventLock,
|
|
289
287
|
withConversationMutationLock
|
|
290
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-XTLF7C4I.js";
|
|
291
289
|
import {
|
|
292
290
|
juniorAgentBindings,
|
|
293
291
|
juniorAgentInvocations,
|
|
294
292
|
juniorConversationEvents,
|
|
295
293
|
juniorConversations
|
|
296
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-X4RM4TBW.js";
|
|
297
295
|
import "./chunk-EM225ITJ.js";
|
|
298
296
|
import {
|
|
299
297
|
acquireActiveLock,
|
|
300
298
|
getStateAdapter,
|
|
301
299
|
withActiveLock
|
|
302
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-X6JP6AMX.js";
|
|
303
301
|
import {
|
|
304
302
|
STANDARD_MODEL_PROFILE,
|
|
305
303
|
botConfig,
|
|
@@ -317,16 +315,16 @@ import {
|
|
|
317
315
|
modelIdForProfile,
|
|
318
316
|
setSlackReactionConfig,
|
|
319
317
|
standardModelId
|
|
320
|
-
} from "./chunk-
|
|
318
|
+
} from "./chunk-OEECXAGT.js";
|
|
321
319
|
import {
|
|
322
320
|
juniorDestinations
|
|
323
321
|
} from "./chunk-VFUK3X5B.js";
|
|
324
|
-
import "./chunk-
|
|
325
|
-
import "./chunk-
|
|
322
|
+
import "./chunk-732P2RBQ.js";
|
|
323
|
+
import "./chunk-KC47ZY6Q.js";
|
|
326
324
|
import {
|
|
327
325
|
pluginCatalogRuntime
|
|
328
|
-
} from "./chunk-
|
|
329
|
-
import "./chunk-
|
|
326
|
+
} from "./chunk-WZN4RQ64.js";
|
|
327
|
+
import "./chunk-CLX3T7Q3.js";
|
|
330
328
|
import {
|
|
331
329
|
credentialContextForActor
|
|
332
330
|
} from "./chunk-RUIXF3YQ.js";
|
|
@@ -360,7 +358,7 @@ import {
|
|
|
360
358
|
withContext,
|
|
361
359
|
withLogContext,
|
|
362
360
|
withSpan
|
|
363
|
-
} from "./chunk-
|
|
361
|
+
} from "./chunk-7TZM33YX.js";
|
|
364
362
|
import {
|
|
365
363
|
continueTrace
|
|
366
364
|
} from "./chunk-6GWA276C.js";
|
|
@@ -368,10 +366,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
368
366
|
import "./chunk-H4HBKISO.js";
|
|
369
367
|
import {
|
|
370
368
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
371
|
-
} from "./chunk-
|
|
369
|
+
} from "./chunk-M6PWM3OK.js";
|
|
372
370
|
import {
|
|
373
371
|
JUNIOR_VERSION
|
|
374
|
-
} from "./chunk-
|
|
372
|
+
} from "./chunk-ELAVLP7Z.js";
|
|
375
373
|
import "./chunk-MLKGABMK.js";
|
|
376
374
|
|
|
377
375
|
// src/app.ts
|
|
@@ -9098,12 +9096,14 @@ async function createApp(options) {
|
|
|
9098
9096
|
app.get("/health", () => GET());
|
|
9099
9097
|
app.get("/api/oauth/callback/mcp/:provider", (c) => {
|
|
9100
9098
|
return GET2(c.req.raw, c.req.param("provider"), waitUntil, {
|
|
9101
|
-
agentRunner
|
|
9099
|
+
agentRunner,
|
|
9100
|
+
conversationWorkQueue: getVercelConversationWorkQueue()
|
|
9102
9101
|
});
|
|
9103
9102
|
});
|
|
9104
9103
|
app.get("/api/oauth/callback/:provider", (c) => {
|
|
9105
9104
|
return GET3(c.req.raw, c.req.param("provider"), waitUntil, {
|
|
9106
|
-
agentRunner
|
|
9105
|
+
agentRunner,
|
|
9106
|
+
conversationWorkQueue: getVercelConversationWorkQueue()
|
|
9107
9107
|
});
|
|
9108
9108
|
});
|
|
9109
9109
|
app.get("/api/internal/sandbox-egress/signals", (c) => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-WZN4RQ64.js";
|
|
4
|
+
import "./chunk-CLX3T7Q3.js";
|
|
5
5
|
import "./chunk-RUIXF3YQ.js";
|
|
6
6
|
import "./chunk-HZF5P5UN.js";
|
|
7
7
|
import "./chunk-F3B2YJ76.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-7TZM33YX.js";
|
|
9
9
|
import "./chunk-6GWA276C.js";
|
|
10
10
|
import "./chunk-OOUNJNMR.js";
|
|
11
11
|
import "./chunk-H4HBKISO.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-M6PWM3OK.js";
|
|
13
|
+
import "./chunk-ELAVLP7Z.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
export {
|
|
16
16
|
pluginCatalogRuntime
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { OAuthAuthorizationRequest } from "@/chat/oauth-authorization";
|
|
2
|
+
export interface WebAuthorizationState extends OAuthAuthorizationRequest {
|
|
3
|
+
actorId: string;
|
|
4
|
+
conversationId: string;
|
|
5
|
+
}
|
|
6
|
+
/** Build authorization delivery for one web turn. */
|
|
7
|
+
export declare function createWebAuthorization(args: {
|
|
8
|
+
actorId: string;
|
|
9
|
+
conversationId: string;
|
|
10
|
+
}): {
|
|
11
|
+
createState: () => Promise<`${string}-${string}-${string}-${string}-${string}`>;
|
|
12
|
+
deliver: (request: OAuthAuthorizationRequest) => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
/** Read the pending authorization request for one web actor. */
|
|
15
|
+
export declare function getWebAuthorization(args: {
|
|
16
|
+
actorId: string;
|
|
17
|
+
conversationId: string;
|
|
18
|
+
}): Promise<WebAuthorizationState | undefined>;
|
|
19
|
+
/** Remove a web authorization request after the parked turn continues. */
|
|
20
|
+
export declare function deleteWebAuthorization(args: {
|
|
21
|
+
actorId: string;
|
|
22
|
+
conversationId: string;
|
|
23
|
+
}): Promise<void>;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
instructionProvenanceFor,
|
|
14
14
|
sanitizePostgresJson,
|
|
15
15
|
withConversationEventLock
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XTLF7C4I.js";
|
|
17
17
|
import {
|
|
18
18
|
SANDBOX_WORKSPACE_ROOT,
|
|
19
19
|
sleep
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
fenceLock,
|
|
24
24
|
getStateAdapter,
|
|
25
25
|
withLock
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-X6JP6AMX.js";
|
|
27
27
|
import {
|
|
28
28
|
botConfig,
|
|
29
29
|
completeText,
|
|
30
30
|
escapeXml,
|
|
31
31
|
resolveGatewayModel,
|
|
32
32
|
unwrapCurrentInstruction
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OEECXAGT.js";
|
|
34
34
|
import {
|
|
35
35
|
toStoredSlackActor
|
|
36
36
|
} from "./chunk-HZF5P5UN.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
logException,
|
|
43
43
|
logWarn,
|
|
44
44
|
setSpanAttributes
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-7TZM33YX.js";
|
|
46
46
|
|
|
47
47
|
// src/chat/turn-context-tag.ts
|
|
48
48
|
var TURN_CONTEXT_TAG = "runtime-turn-context";
|