@sentry/junior 0.111.0 → 0.112.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-QQ2IWKOP.js → agent-hooks-6MVTPKP4.js} +8 -8
- package/dist/api/people/profile.d.ts +1 -0
- package/dist/api/schema/person.d.ts +2 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +13 -12
- package/dist/app.js +47 -24
- package/dist/{catalog-runtime-D22W6QEJ.js → catalog-runtime-UEO25P2J.js} +5 -5
- package/dist/chat/runtime/agent-run-outcome.d.ts +1 -0
- package/dist/chat/services/auth-pause-response.d.ts +1 -1
- package/dist/chat/services/auth-pause.d.ts +2 -1
- package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/plugin-auth-orchestration.d.ts +2 -1
- package/dist/chat/tools/resource-events.d.ts +3 -129
- package/dist/{chunk-L6JPKANW.js → chunk-2FJ6WEYV.js} +1 -1
- package/dist/{chunk-Z2W4SJZ7.js → chunk-4EJO4HIC.js} +1 -1
- package/dist/{chunk-B45FPP2A.js → chunk-66IP6WED.js} +4 -4
- package/dist/{chunk-MPVES2IC.js → chunk-AU2JVUDF.js} +1 -1
- package/dist/{chunk-PZELBSHC.js → chunk-AWNDKI5K.js} +6 -6
- package/dist/{chunk-J7APPQIJ.js → chunk-CSS7JHEM.js} +1 -1
- package/dist/{chunk-BTRNMS6A.js → chunk-GJG67YFS.js} +2 -2
- package/dist/{chunk-OOLU34J4.js → chunk-GR4IB6OQ.js} +63 -45
- package/dist/{chunk-Z4G3WCP3.js → chunk-IV2O4HQJ.js} +1 -1
- package/dist/{chunk-FPK7XY3F.js → chunk-JE23YR3X.js} +1 -0
- package/dist/{chunk-IFAHK54X.js → chunk-NDQL4ESR.js} +2 -2
- package/dist/{chunk-NQLWOTY4.js → chunk-PK4ETCUQ.js} +1 -1
- package/dist/{chunk-ZRZ4SVWG.js → chunk-QIALGHRN.js} +2 -2
- package/dist/{chunk-SL3ZKNLQ.js → chunk-SKEMI4IF.js} +4 -4
- package/dist/{chunk-XQAYFRWT.js → chunk-TZU3R5OC.js} +1 -1
- package/dist/{chunk-QQIVLZW4.js → chunk-VBSVNOLA.js} +5 -5
- package/dist/{chunk-PYKKM4MM.js → chunk-X3SP5RDW.js} +1 -1
- package/dist/{chunk-WSRBFHPX.js → chunk-ZHP4KNF7.js} +1 -1
- package/dist/cli/chat.js +19 -19
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +11 -11
- package/dist/cli/snapshot-warmup.js +8 -8
- package/dist/cli/upgrade.js +5 -5
- package/dist/{db-WXQOQESG.js → db-P5H5RVQV.js} +5 -5
- package/dist/instrumentation.js +2 -2
- package/dist/nitro.js +2 -2
- package/dist/{runner-4QY4XH4B.js → runner-B4ZDUO3R.js} +10 -10
- package/dist/{skills-P5MU4EBX.js → skills-GWTOZ3XV.js} +6 -6
- package/dist/{validation-PQF5OP6T.js → validation-QFIC6XH6.js} +6 -6
- package/dist/version.js +1 -1
- package/package.json +6 -6
|
@@ -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-VBSVNOLA.js";
|
|
15
|
+
import "./chunk-X3SP5RDW.js";
|
|
16
|
+
import "./chunk-NDQL4ESR.js";
|
|
17
|
+
import "./chunk-QIALGHRN.js";
|
|
18
18
|
import "./chunk-JQFJO5WH.js";
|
|
19
19
|
import "./chunk-4ZNGQH7C.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-PK4ETCUQ.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
22
|
import "./chunk-6Y5L4BOM.js";
|
|
23
23
|
import "./chunk-C4MZ3GP5.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-CSS7JHEM.js";
|
|
25
25
|
import "./chunk-42WRQLJ6.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-AU2JVUDF.js";
|
|
28
|
+
import "./chunk-IV2O4HQJ.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
|
@@ -8,6 +8,7 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
|
8
8
|
activityDays: import("zod").ZodArray<import("zod").ZodObject<{
|
|
9
9
|
active: import("zod").ZodNumber;
|
|
10
10
|
conversations: import("zod").ZodNumber;
|
|
11
|
+
costUsd: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
11
12
|
date: import("zod").ZodString;
|
|
12
13
|
durationMs: import("zod").ZodNumber;
|
|
13
14
|
failed: import("zod").ZodNumber;
|
|
@@ -14,6 +14,7 @@ export declare const peopleConversationStatsItemSchema: z.ZodObject<{
|
|
|
14
14
|
export declare const actorActivityDayReportSchema: z.ZodObject<{
|
|
15
15
|
active: z.ZodNumber;
|
|
16
16
|
conversations: z.ZodNumber;
|
|
17
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
17
18
|
date: z.ZodString;
|
|
18
19
|
durationMs: z.ZodNumber;
|
|
19
20
|
failed: z.ZodNumber;
|
|
@@ -85,6 +86,7 @@ export declare const actorProfileReportSchema: z.ZodObject<{
|
|
|
85
86
|
activityDays: z.ZodArray<z.ZodObject<{
|
|
86
87
|
active: z.ZodNumber;
|
|
87
88
|
conversations: z.ZodNumber;
|
|
89
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
88
90
|
date: z.ZodString;
|
|
89
91
|
durationMs: z.ZodNumber;
|
|
90
92
|
failed: z.ZodNumber;
|
package/dist/api/schema.js
CHANGED
package/dist/api.js
CHANGED
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
locationDirectoryReportSchema,
|
|
16
16
|
locationParamsSchema,
|
|
17
17
|
personParamsSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JE23YR3X.js";
|
|
19
19
|
import {
|
|
20
20
|
buildSentryConversationUrl,
|
|
21
21
|
formatSlackConversationRedactedLabel,
|
|
22
22
|
readHealthReport,
|
|
23
23
|
resolveSlackConversationContextFromThreadId
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2FJ6WEYV.js";
|
|
25
25
|
import {
|
|
26
26
|
healthReportSchema,
|
|
27
27
|
pluginOperationalReportFeedSchema,
|
|
@@ -34,12 +34,12 @@ import {
|
|
|
34
34
|
hasAgentTurnUsage
|
|
35
35
|
} from "./chunk-MU6HHZEN.js";
|
|
36
36
|
import "./chunk-PDO5BLNM.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-NDQL4ESR.js";
|
|
38
38
|
import {
|
|
39
39
|
decodeStoredConversationEvent,
|
|
40
40
|
getDb,
|
|
41
41
|
getSqlExecutor
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-QIALGHRN.js";
|
|
43
43
|
import {
|
|
44
44
|
juniorConversationEvents,
|
|
45
45
|
juniorConversations,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
juniorUsers
|
|
48
48
|
} from "./chunk-JQFJO5WH.js";
|
|
49
49
|
import "./chunk-4ZNGQH7C.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-PK4ETCUQ.js";
|
|
51
51
|
import {
|
|
52
52
|
juniorDestinations
|
|
53
53
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -55,11 +55,11 @@ import {
|
|
|
55
55
|
canExposeConversationPayload,
|
|
56
56
|
parseSlackThreadId
|
|
57
57
|
} from "./chunk-6Y5L4BOM.js";
|
|
58
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-CSS7JHEM.js";
|
|
59
59
|
import "./chunk-42WRQLJ6.js";
|
|
60
60
|
import "./chunk-6GWA276C.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-AU2JVUDF.js";
|
|
62
|
+
import "./chunk-IV2O4HQJ.js";
|
|
63
63
|
import "./chunk-MLKGABMK.js";
|
|
64
64
|
|
|
65
65
|
// src/api.ts
|
|
@@ -2163,6 +2163,7 @@ async function readPeopleProfileFromSql(email, options = {}) {
|
|
|
2163
2163
|
days.set(row.date, {
|
|
2164
2164
|
active: row.active,
|
|
2165
2165
|
conversations: row.conversations,
|
|
2166
|
+
...row.costUsd !== null ? { costUsd: row.costUsd } : {},
|
|
2166
2167
|
date: row.date,
|
|
2167
2168
|
durationMs: row.durationMs,
|
|
2168
2169
|
failed: row.failed,
|
|
@@ -2256,7 +2257,7 @@ function readDescriptionText(home) {
|
|
|
2256
2257
|
}
|
|
2257
2258
|
}
|
|
2258
2259
|
async function readSkillReports() {
|
|
2259
|
-
const { discoverSkills } = await import("./skills-
|
|
2260
|
+
const { discoverSkills } = await import("./skills-GWTOZ3XV.js");
|
|
2260
2261
|
const skills = await discoverSkills();
|
|
2261
2262
|
return skillReportsSchema.parse(
|
|
2262
2263
|
skills.map((skill) => ({
|
|
@@ -2266,7 +2267,7 @@ async function readSkillReports() {
|
|
|
2266
2267
|
);
|
|
2267
2268
|
}
|
|
2268
2269
|
async function readPluginReports() {
|
|
2269
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
2270
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-UEO25P2J.js");
|
|
2270
2271
|
return pluginReportsSchema.parse(
|
|
2271
2272
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
2272
2273
|
name: plugin.manifest.name
|
|
@@ -2276,7 +2277,7 @@ async function readPluginReports() {
|
|
|
2276
2277
|
async function readRuntimeInfoReport() {
|
|
2277
2278
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
2278
2279
|
import("./discovery-RMHYSRL7.js"),
|
|
2279
|
-
import("./catalog-runtime-
|
|
2280
|
+
import("./catalog-runtime-UEO25P2J.js"),
|
|
2280
2281
|
readPluginReports(),
|
|
2281
2282
|
readSkillReports()
|
|
2282
2283
|
]);
|
|
@@ -2292,7 +2293,7 @@ async function readRuntimeInfoReport() {
|
|
|
2292
2293
|
}
|
|
2293
2294
|
async function readPluginOperationalReportFeed() {
|
|
2294
2295
|
const nowMs = Date.now();
|
|
2295
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
2296
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-6MVTPKP4.js");
|
|
2296
2297
|
return pluginOperationalReportFeedSchema.parse({
|
|
2297
2298
|
source: "plugins",
|
|
2298
2299
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.js
CHANGED
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
processPluginTask,
|
|
7
7
|
requireTurnFailureEventId,
|
|
8
8
|
scheduleSessionCompletedPluginTasks
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AWNDKI5K.js";
|
|
10
10
|
import {
|
|
11
11
|
GET,
|
|
12
12
|
buildSentryConversationUrl,
|
|
13
13
|
conversationVisibilityFromSlackChannelType,
|
|
14
14
|
resolveSlackChannelTypeFromMessage,
|
|
15
15
|
resolveSlackConversationContext
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2FJ6WEYV.js";
|
|
17
17
|
import "./chunk-2ZTTXTSZ.js";
|
|
18
18
|
import {
|
|
19
19
|
ConversationQueueMessageRejectedError,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
validatePluginEgressCredentialHooks,
|
|
33
33
|
validatePluginRegistrations
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4EJO4HIC.js";
|
|
35
35
|
import {
|
|
36
36
|
defineJuniorPlugins,
|
|
37
37
|
pluginCatalogConfigFromEnv,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
splitSlackReplyText,
|
|
85
85
|
startOAuthFlow,
|
|
86
86
|
truncateStatusText
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-GR4IB6OQ.js";
|
|
88
88
|
import {
|
|
89
89
|
ConversationTurnBoundaryError,
|
|
90
90
|
CooperativeTurnYieldError,
|
|
@@ -143,8 +143,8 @@ import {
|
|
|
143
143
|
turnHasReply,
|
|
144
144
|
updateConversationStats,
|
|
145
145
|
upsertConversationMessage
|
|
146
|
-
} from "./chunk-
|
|
147
|
-
import "./chunk-
|
|
146
|
+
} from "./chunk-SKEMI4IF.js";
|
|
147
|
+
import "./chunk-66IP6WED.js";
|
|
148
148
|
import "./chunk-MU6HHZEN.js";
|
|
149
149
|
import "./chunk-PDO5BLNM.js";
|
|
150
150
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -163,12 +163,12 @@ import {
|
|
|
163
163
|
validatePlugins,
|
|
164
164
|
verifyScheduledTaskCredentialSubject,
|
|
165
165
|
verifySlackDirectCredentialSubject
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-VBSVNOLA.js";
|
|
167
167
|
import {
|
|
168
168
|
acquireActiveLock,
|
|
169
169
|
getDefaultRedisStateAdapterFor,
|
|
170
170
|
getStateAdapter
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-X3SP5RDW.js";
|
|
172
172
|
import {
|
|
173
173
|
SlackActionError,
|
|
174
174
|
downloadPrivateSlackFile,
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
normalizeSlackConversationId,
|
|
180
180
|
runWithSlackInstallationToken,
|
|
181
181
|
runWithWorkspaceTeamId
|
|
182
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-NDQL4ESR.js";
|
|
183
183
|
import {
|
|
184
184
|
contextProvenance,
|
|
185
185
|
createSlackDestination,
|
|
@@ -193,7 +193,7 @@ import {
|
|
|
193
193
|
requireSlackDestination,
|
|
194
194
|
sameDestination,
|
|
195
195
|
withConversationEventLock
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-QIALGHRN.js";
|
|
197
197
|
import {
|
|
198
198
|
juniorConversationEvents,
|
|
199
199
|
juniorConversations
|
|
@@ -222,7 +222,7 @@ import {
|
|
|
222
222
|
standardModelId,
|
|
223
223
|
stripRuntimeTurnContext,
|
|
224
224
|
trimTrailingAssistantMessages
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-PK4ETCUQ.js";
|
|
226
226
|
import {
|
|
227
227
|
juniorDestinations
|
|
228
228
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -234,16 +234,16 @@ import {
|
|
|
234
234
|
} from "./chunk-6Y5L4BOM.js";
|
|
235
235
|
import {
|
|
236
236
|
discoverSkills
|
|
237
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-GJG67YFS.js";
|
|
238
238
|
import {
|
|
239
239
|
pluginCatalogRuntime
|
|
240
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-ZHP4KNF7.js";
|
|
241
241
|
import {
|
|
242
242
|
buildOAuthTokenRequest,
|
|
243
243
|
credentialSubjectSchema,
|
|
244
244
|
hasRequiredOAuthScope,
|
|
245
245
|
parseOAuthTokenResponse
|
|
246
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-TZU3R5OC.js";
|
|
247
247
|
import {
|
|
248
248
|
createActor,
|
|
249
249
|
createSlackActor,
|
|
@@ -268,7 +268,7 @@ import {
|
|
|
268
268
|
setTags,
|
|
269
269
|
withContext,
|
|
270
270
|
withSpan
|
|
271
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-CSS7JHEM.js";
|
|
272
272
|
import {
|
|
273
273
|
isRecord,
|
|
274
274
|
parseSlackChannelId,
|
|
@@ -285,10 +285,10 @@ import {
|
|
|
285
285
|
} from "./chunk-3V7OFJZC.js";
|
|
286
286
|
import {
|
|
287
287
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
288
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-AU2JVUDF.js";
|
|
289
289
|
import {
|
|
290
290
|
JUNIOR_VERSION
|
|
291
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-IV2O4HQJ.js";
|
|
292
292
|
import "./chunk-MLKGABMK.js";
|
|
293
293
|
|
|
294
294
|
// src/app.ts
|
|
@@ -4111,9 +4111,26 @@ async function startSlackProcessingReactionForMessage(args) {
|
|
|
4111
4111
|
}
|
|
4112
4112
|
|
|
4113
4113
|
// src/chat/services/auth-pause-response.ts
|
|
4114
|
-
|
|
4114
|
+
var MAX_AUTH_REQUEST_LENGTH = 200;
|
|
4115
|
+
function formatAuthRequest(requestText) {
|
|
4116
|
+
const normalized = requestText.replace(/\s+/g, " ").trim();
|
|
4117
|
+
if (!normalized) {
|
|
4118
|
+
return void 0;
|
|
4119
|
+
}
|
|
4120
|
+
const bounded = normalized.length > MAX_AUTH_REQUEST_LENGTH ? `${normalized.slice(0, MAX_AUTH_REQUEST_LENGTH - 1).trimEnd()}\u2026` : normalized;
|
|
4121
|
+
return bounded.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">");
|
|
4122
|
+
}
|
|
4123
|
+
function buildAuthPauseResponse(slackUserId, providerDisplayName, requestText) {
|
|
4115
4124
|
const mention = slackUserId ? `<@${slackUserId}> ` : "";
|
|
4116
|
-
|
|
4125
|
+
const request = requestText ? formatAuthRequest(requestText) : void 0;
|
|
4126
|
+
if (!request) {
|
|
4127
|
+
return `${mention}I'll need you to authorize ${providerDisplayName}. I sent you a link.`;
|
|
4128
|
+
}
|
|
4129
|
+
return `${mention}I need access to ${providerDisplayName} to continue.
|
|
4130
|
+
|
|
4131
|
+
*Why:* ${request}
|
|
4132
|
+
|
|
4133
|
+
I sent you a link.`;
|
|
4117
4134
|
}
|
|
4118
4135
|
|
|
4119
4136
|
// src/chat/runtime/request-deadline.ts
|
|
@@ -4564,7 +4581,8 @@ async function resumeSlackTurn(args) {
|
|
|
4564
4581
|
if (outcome.status === "awaiting_auth" && onAuthPause) {
|
|
4565
4582
|
deferredAuthInfo = {
|
|
4566
4583
|
providerDisplayName: outcome.providerDisplayName,
|
|
4567
|
-
actorId: isUserActor(resumeActor) ? resumeActor.userId : void 0
|
|
4584
|
+
actorId: isUserActor(resumeActor) ? resumeActor.userId : void 0,
|
|
4585
|
+
...outcome.requestText ? { requestText: outcome.requestText } : {}
|
|
4568
4586
|
};
|
|
4569
4587
|
deferredPauseHandler = async () => {
|
|
4570
4588
|
await onAuthPause({
|
|
@@ -4718,7 +4736,8 @@ async function resumeSlackTurn(args) {
|
|
|
4718
4736
|
runArgs.threadTs,
|
|
4719
4737
|
buildAuthPauseResponse(
|
|
4720
4738
|
deferredAuthInfo.actorId,
|
|
4721
|
-
deferredAuthInfo.providerDisplayName
|
|
4739
|
+
deferredAuthInfo.providerDisplayName,
|
|
4740
|
+
deferredAuthInfo.requestText
|
|
4722
4741
|
),
|
|
4723
4742
|
runArgs.conversationId
|
|
4724
4743
|
);
|
|
@@ -10870,13 +10889,14 @@ function createReplyToThread(deps) {
|
|
|
10870
10889
|
beforeFirstResponsePostCalled = true;
|
|
10871
10890
|
await options.beforeFirstResponsePost?.();
|
|
10872
10891
|
};
|
|
10873
|
-
const postAuthPauseNotice = async (providerDisplayName) => {
|
|
10892
|
+
const postAuthPauseNotice = async (providerDisplayName, requestText) => {
|
|
10874
10893
|
if (!actor) {
|
|
10875
10894
|
throw new Error("Slack auth pause notice requires an actor");
|
|
10876
10895
|
}
|
|
10877
10896
|
const text = buildAuthPauseResponse(
|
|
10878
10897
|
actor.userId,
|
|
10879
|
-
providerDisplayName
|
|
10898
|
+
providerDisplayName,
|
|
10899
|
+
requestText
|
|
10880
10900
|
);
|
|
10881
10901
|
try {
|
|
10882
10902
|
await beforeFirstResponsePost();
|
|
@@ -11545,7 +11565,10 @@ function createReplyToThread(deps) {
|
|
|
11545
11565
|
shouldPersistFailureState = false;
|
|
11546
11566
|
return;
|
|
11547
11567
|
}
|
|
11548
|
-
await postAuthPauseNotice(
|
|
11568
|
+
await postAuthPauseNotice(
|
|
11569
|
+
outcome.providerDisplayName,
|
|
11570
|
+
outcome.requestText
|
|
11571
|
+
);
|
|
11549
11572
|
completeAuthPauseTurn({
|
|
11550
11573
|
conversation: preparedState.conversation,
|
|
11551
11574
|
sessionId: turnId
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ZHP4KNF7.js";
|
|
4
|
+
import "./chunk-TZU3R5OC.js";
|
|
5
5
|
import "./chunk-C4MZ3GP5.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-CSS7JHEM.js";
|
|
7
7
|
import "./chunk-42WRQLJ6.js";
|
|
8
8
|
import "./chunk-6GWA276C.js";
|
|
9
9
|
import "./chunk-B3IT5END.js";
|
|
10
10
|
import "./chunk-3V7OFJZC.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-AU2JVUDF.js";
|
|
12
|
+
import "./chunk-IV2O4HQJ.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
export {
|
|
15
15
|
pluginCatalogRuntime
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Build the visible Slack thread note for an auth-paused turn. */
|
|
2
|
-
export declare function buildAuthPauseResponse(slackUserId: string | undefined, providerDisplayName: string): string;
|
|
2
|
+
export declare function buildAuthPauseResponse(slackUserId: string | undefined, providerDisplayName: string, requestText?: string): string;
|
|
@@ -10,7 +10,8 @@ export declare class AuthorizationPauseError extends Error {
|
|
|
10
10
|
readonly kind: AuthorizationPauseKind;
|
|
11
11
|
readonly provider: string;
|
|
12
12
|
readonly providerDisplayName: string;
|
|
13
|
-
|
|
13
|
+
readonly requestText?: string;
|
|
14
|
+
constructor(kind: AuthorizationPauseKind, provider: string, providerDisplayName: string, disposition: AuthorizationPauseDisposition, requestText?: string);
|
|
14
15
|
}
|
|
15
16
|
/** Error indicating an authorization pause could not be made durable. */
|
|
16
17
|
export declare class AuthPausePersistenceError extends Error {
|
|
@@ -13,7 +13,7 @@ import type { ThreadArtifactsState } from "@/chat/state/artifacts";
|
|
|
13
13
|
import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
14
14
|
import type { PluginDefinition } from "@/chat/plugins/types";
|
|
15
15
|
export declare class McpAuthorizationPauseError extends AuthorizationPauseError {
|
|
16
|
-
constructor(provider: string, providerDisplayName: string, disposition: "link_already_sent" | "link_sent");
|
|
16
|
+
constructor(provider: string, providerDisplayName: string, disposition: "link_already_sent" | "link_sent", requestText?: string);
|
|
17
17
|
}
|
|
18
18
|
export interface McpAuthOrchestrationInput {
|
|
19
19
|
abortAgent: () => void;
|
|
@@ -15,7 +15,7 @@ import type { UserTokenStore } from "@/chat/credentials/user-token-store";
|
|
|
15
15
|
import { AuthorizationPauseError, type AuthorizationFlowMode } from "@/chat/services/auth-pause";
|
|
16
16
|
import type { ConversationPendingAuthState } from "@/chat/state/conversation";
|
|
17
17
|
export declare class PluginAuthorizationPauseError extends AuthorizationPauseError {
|
|
18
|
-
constructor(provider: string, providerDisplayName: string, disposition: "link_already_sent" | "link_sent");
|
|
18
|
+
constructor(provider: string, providerDisplayName: string, disposition: "link_already_sent" | "link_sent", requestText?: string);
|
|
19
19
|
}
|
|
20
20
|
export declare class PluginCredentialFailureError extends Error {
|
|
21
21
|
readonly provider: string;
|
|
@@ -30,6 +30,7 @@ export interface PluginAuthOrchestrationInput {
|
|
|
30
30
|
destination?: Destination;
|
|
31
31
|
source?: Source;
|
|
32
32
|
threadTs?: string;
|
|
33
|
+
userMessage?: string;
|
|
33
34
|
pendingAuth?: ConversationPendingAuthState;
|
|
34
35
|
recordPendingAuth?: (pendingAuth: ConversationPendingAuthState) => void | Promise<void>;
|
|
35
36
|
authorizationFlowMode?: AuthorizationFlowMode;
|
|
@@ -1,130 +1,4 @@
|
|
|
1
|
+
import type { ToolRegistry } from "@/chat/tools/definition";
|
|
1
2
|
import type { ToolRuntimeContext } from "@/chat/tools/types";
|
|
2
|
-
/**
|
|
3
|
-
export declare function
|
|
4
|
-
/** Create the tool that subscribes the current conversation to resource events. */
|
|
5
|
-
export declare function createSubscribeToResourceEventsTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
6
|
-
inputSchema: import("./definition").JsonSchemaObject;
|
|
7
|
-
outputSchema: import("./definition").JsonSchemaObject;
|
|
8
|
-
prepareArguments(args: unknown): {
|
|
9
|
-
resourceRef: string;
|
|
10
|
-
provider: string;
|
|
11
|
-
resourceType: string;
|
|
12
|
-
label: string;
|
|
13
|
-
events: string[];
|
|
14
|
-
intent: string;
|
|
15
|
-
ttlMs?: number | undefined;
|
|
16
|
-
};
|
|
17
|
-
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
18
|
-
[x: string]: unknown;
|
|
19
|
-
ok: boolean;
|
|
20
|
-
status: "error" | "success";
|
|
21
|
-
target?: string | undefined;
|
|
22
|
-
data?: unknown;
|
|
23
|
-
truncated?: boolean | undefined;
|
|
24
|
-
continuation?: {
|
|
25
|
-
arguments: Record<string, unknown>;
|
|
26
|
-
reason?: string | undefined;
|
|
27
|
-
} | undefined;
|
|
28
|
-
error?: string | {
|
|
29
|
-
kind: string;
|
|
30
|
-
message: string;
|
|
31
|
-
retryable?: boolean | undefined;
|
|
32
|
-
} | undefined;
|
|
33
|
-
} | Promise<{
|
|
34
|
-
[x: string]: unknown;
|
|
35
|
-
ok: boolean;
|
|
36
|
-
status: "error" | "success";
|
|
37
|
-
target?: string | undefined;
|
|
38
|
-
data?: unknown;
|
|
39
|
-
truncated?: boolean | undefined;
|
|
40
|
-
continuation?: {
|
|
41
|
-
arguments: Record<string, unknown>;
|
|
42
|
-
reason?: string | undefined;
|
|
43
|
-
} | undefined;
|
|
44
|
-
error?: string | {
|
|
45
|
-
kind: string;
|
|
46
|
-
message: string;
|
|
47
|
-
retryable?: boolean | undefined;
|
|
48
|
-
} | undefined;
|
|
49
|
-
}>) | undefined;
|
|
50
|
-
};
|
|
51
|
-
/** Create the tool that lists active resource subscriptions for this conversation. */
|
|
52
|
-
export declare function createListResourceEventSubscriptionsTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
53
|
-
inputSchema: import("./definition").JsonSchemaObject;
|
|
54
|
-
outputSchema: import("./definition").JsonSchemaObject;
|
|
55
|
-
prepareArguments(args: unknown): Record<string, never>;
|
|
56
|
-
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
57
|
-
[x: string]: unknown;
|
|
58
|
-
ok: boolean;
|
|
59
|
-
status: "error" | "success";
|
|
60
|
-
target?: string | undefined;
|
|
61
|
-
data?: unknown;
|
|
62
|
-
truncated?: boolean | undefined;
|
|
63
|
-
continuation?: {
|
|
64
|
-
arguments: Record<string, unknown>;
|
|
65
|
-
reason?: string | undefined;
|
|
66
|
-
} | undefined;
|
|
67
|
-
error?: string | {
|
|
68
|
-
kind: string;
|
|
69
|
-
message: string;
|
|
70
|
-
retryable?: boolean | undefined;
|
|
71
|
-
} | undefined;
|
|
72
|
-
} | Promise<{
|
|
73
|
-
[x: string]: unknown;
|
|
74
|
-
ok: boolean;
|
|
75
|
-
status: "error" | "success";
|
|
76
|
-
target?: string | undefined;
|
|
77
|
-
data?: unknown;
|
|
78
|
-
truncated?: boolean | undefined;
|
|
79
|
-
continuation?: {
|
|
80
|
-
arguments: Record<string, unknown>;
|
|
81
|
-
reason?: string | undefined;
|
|
82
|
-
} | undefined;
|
|
83
|
-
error?: string | {
|
|
84
|
-
kind: string;
|
|
85
|
-
message: string;
|
|
86
|
-
retryable?: boolean | undefined;
|
|
87
|
-
} | undefined;
|
|
88
|
-
}>) | undefined;
|
|
89
|
-
};
|
|
90
|
-
/** Create the tool that cancels a current-conversation resource subscription. */
|
|
91
|
-
export declare function createCancelResourceEventSubscriptionTool(context: ToolRuntimeContext): Omit<import("./definition").AnyToolDefinition, "inputSchema" | "outputSchema" | "prepareArguments" | "execute"> & {
|
|
92
|
-
inputSchema: import("./definition").JsonSchemaObject;
|
|
93
|
-
outputSchema: import("./definition").JsonSchemaObject;
|
|
94
|
-
prepareArguments(args: unknown): {
|
|
95
|
-
subscriptionId: string;
|
|
96
|
-
};
|
|
97
|
-
execute?: ((input: unknown, options: import("./definition").ToolExecuteOptions) => {
|
|
98
|
-
[x: string]: unknown;
|
|
99
|
-
ok: boolean;
|
|
100
|
-
status: "error" | "success";
|
|
101
|
-
target?: string | undefined;
|
|
102
|
-
data?: unknown;
|
|
103
|
-
truncated?: boolean | undefined;
|
|
104
|
-
continuation?: {
|
|
105
|
-
arguments: Record<string, unknown>;
|
|
106
|
-
reason?: string | undefined;
|
|
107
|
-
} | undefined;
|
|
108
|
-
error?: string | {
|
|
109
|
-
kind: string;
|
|
110
|
-
message: string;
|
|
111
|
-
retryable?: boolean | undefined;
|
|
112
|
-
} | undefined;
|
|
113
|
-
} | Promise<{
|
|
114
|
-
[x: string]: unknown;
|
|
115
|
-
ok: boolean;
|
|
116
|
-
status: "error" | "success";
|
|
117
|
-
target?: string | undefined;
|
|
118
|
-
data?: unknown;
|
|
119
|
-
truncated?: boolean | undefined;
|
|
120
|
-
continuation?: {
|
|
121
|
-
arguments: Record<string, unknown>;
|
|
122
|
-
reason?: string | undefined;
|
|
123
|
-
} | undefined;
|
|
124
|
-
error?: string | {
|
|
125
|
-
kind: string;
|
|
126
|
-
message: string;
|
|
127
|
-
retryable?: boolean | undefined;
|
|
128
|
-
} | undefined;
|
|
129
|
-
}>) | undefined;
|
|
130
|
-
};
|
|
3
|
+
/** Build the complete resource-watch tool set allowed by this runtime context. */
|
|
4
|
+
export declare function createResourceEventTools(context: ToolRuntimeContext): ToolRegistry;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SANDBOX_WORKSPACE_ROOT,
|
|
3
3
|
getStateAdapter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X3SP5RDW.js";
|
|
5
5
|
import {
|
|
6
6
|
sleep
|
|
7
7
|
} from "./chunk-4ZNGQH7C.js";
|
|
8
8
|
import {
|
|
9
9
|
toOptionalTrimmed
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PK4ETCUQ.js";
|
|
11
11
|
import {
|
|
12
12
|
pluginCatalogRuntime
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZHP4KNF7.js";
|
|
14
14
|
import {
|
|
15
15
|
setSpanAttributes,
|
|
16
16
|
setSpanStatus,
|
|
17
17
|
withSpan
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CSS7JHEM.js";
|
|
19
19
|
|
|
20
20
|
// src/chat/sandbox/runtime-dependencies.ts
|
|
21
21
|
var GLOBAL_RUNTIME_DEPENDENCIES = [
|
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
markTurnCompleted,
|
|
15
15
|
mergeArtifactsState,
|
|
16
16
|
updateConversationStats
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SKEMI4IF.js";
|
|
18
18
|
import {
|
|
19
19
|
createPluginEmbedder,
|
|
20
20
|
createPluginLogger,
|
|
21
21
|
createPluginModel,
|
|
22
22
|
createPluginState,
|
|
23
23
|
getPlugins
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-VBSVNOLA.js";
|
|
25
25
|
import {
|
|
26
26
|
getStateAdapter
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-X3SP5RDW.js";
|
|
28
28
|
import {
|
|
29
29
|
getDb
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-QIALGHRN.js";
|
|
31
31
|
import {
|
|
32
32
|
getPiMessageRole,
|
|
33
33
|
instructionTextForProjection,
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
isToolResultMessage,
|
|
36
36
|
normalizeToolNameFromResult,
|
|
37
37
|
stripRuntimeTurnContext
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-PK4ETCUQ.js";
|
|
39
39
|
import {
|
|
40
40
|
buildTurnFailureResponse
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-CSS7JHEM.js";
|
|
42
42
|
import {
|
|
43
43
|
parseSlackMessageTs
|
|
44
44
|
} from "./chunk-42WRQLJ6.js";
|