@sentry/junior 0.197.0 → 0.198.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-CM4EKXL4.js → agent-hooks-3E7O7ATZ.js} +11 -11
- package/dist/api.js +24 -24
- package/dist/app.d.ts +2 -1
- package/dist/app.js +44 -42
- package/dist/{catalog-runtime-V7WGCXUD.js → catalog-runtime-QDUBRXEW.js} +4 -4
- package/dist/chat/config.d.ts +16 -0
- package/dist/{chunk-6ZQ3CE6X.js → chunk-2ACXVY6O.js} +1 -1
- package/dist/{chunk-5MMQLB2B.js → chunk-342FVAX5.js} +1 -1
- package/dist/{chunk-2K26W3FP.js → chunk-3J5Y4RWY.js} +1 -1
- package/dist/{chunk-7ENMKNEK.js → chunk-3TMKXW4H.js} +1 -1
- package/dist/{chunk-EZKISZ3Q.js → chunk-4FHQ6CCO.js} +1 -1
- package/dist/{chunk-4UUKQB6I.js → chunk-4UW7BEJZ.js} +6 -6
- package/dist/{chunk-DHWYAHAM.js → chunk-7KXZRRMK.js} +1 -1
- package/dist/{chunk-IGSAXSM7.js → chunk-A6KKPVEA.js} +4 -4
- package/dist/{chunk-YLBJBBYX.js → chunk-BFIFTKUS.js} +3 -3
- package/dist/{chunk-H6QL3FWC.js → chunk-C3SNQB6B.js} +21 -21
- package/dist/{chunk-BQ7UXCUO.js → chunk-CBHQOGFA.js} +1 -1
- package/dist/{chunk-WOJG25QZ.js → chunk-CGNZXN7B.js} +8 -8
- package/dist/{chunk-XALIC5SY.js → chunk-CSGQWJIY.js} +2 -2
- package/dist/{chunk-LIK4T6CF.js → chunk-CZC6ZEXR.js} +6 -6
- package/dist/{chunk-DLXA2ZXJ.js → chunk-D3SLBCD4.js} +2 -2
- package/dist/{chunk-BR5GNDPS.js → chunk-EATO3SKS.js} +54 -2
- package/dist/{chunk-T5MK3RUT.js → chunk-EWPTEQXA.js} +3 -3
- package/dist/{chunk-S3DRTWPX.js → chunk-F3XUS2T5.js} +5 -5
- package/dist/{chunk-YZQLXALE.js → chunk-FU4OWKCL.js} +2 -2
- package/dist/{chunk-4USCVHQZ.js → chunk-G2CT2D5U.js} +5 -5
- package/dist/{chunk-MJCJ62RZ.js → chunk-G6XSYS3Q.js} +4 -4
- package/dist/{chunk-SBCWV4E4.js → chunk-IZ4CIFJY.js} +9 -9
- package/dist/{chunk-YC5CFKME.js → chunk-KVXHBJCH.js} +1 -1
- package/dist/{chunk-O5RG7SKU.js → chunk-LXPGGSYD.js} +3 -3
- package/dist/{chunk-HDSDOBWN.js → chunk-N3GQY63R.js} +8 -2
- package/dist/{chunk-BGSAFVJO.js → chunk-N6LJYW7V.js} +1 -1
- package/dist/{chunk-FCONFDZ4.js → chunk-NVDUM2CM.js} +1 -1
- package/dist/{chunk-DBTI74IT.js → chunk-OKQMTCHU.js} +5 -5
- package/dist/{chunk-VAUPAX3O.js → chunk-QYSJWJLJ.js} +4 -4
- package/dist/{chunk-O2H7JUEQ.js → chunk-SCVIT6K4.js} +22 -22
- package/dist/{chunk-5GWV7SXF.js → chunk-SPEJV3TW.js} +3 -3
- package/dist/{chunk-PF3PEX4Q.js → chunk-T5KV6DUY.js} +1 -1
- package/dist/{chunk-LMTHFU5D.js → chunk-U67DBSNZ.js} +6 -6
- package/dist/{chunk-ITP4OR7R.js → chunk-VYGZPJSM.js} +4 -4
- package/dist/{chunk-V2IX5Q5L.js → chunk-X2WFY3TM.js} +8 -8
- package/dist/{chunk-PM5WSDAD.js → chunk-XNZAZ57D.js} +1 -1
- package/dist/{chunk-NANQFFGO.js → chunk-ZORFTPFN.js} +8 -8
- package/dist/{chunk-C2SOA3KN.js → chunk-ZUEUBQWE.js} +3 -3
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/{db-6BD722UD.js → db-OSPYS4WA.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-P6AIT27Q.js → oauth-callback-server-VG736DHZ.js} +29 -29
- package/dist/{runner-OKPDZOJC.js → runner-3GKIVG6A.js} +21 -21
- package/dist/{skills-CQFX3V2I.js → skills-FKMV7HTX.js} +5 -5
- package/dist/spawn-5YR3E42B.js +42 -0
- package/dist/task-runner-GR2WZNCW.js +36 -0
- package/dist/{validation-STB4W433.js → validation-4XYG33GY.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-B7N5TEYI.js → work-TJAL6PV3.js} +21 -21
- package/dist/{worker-W6PBEHCA.js → worker-3OYUEME2.js} +10 -10
- package/package.json +4 -4
- package/dist/spawn-GA5MADGU.js +0 -42
- package/dist/task-runner-7IIYO44C.js +0 -36
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toOptionalTrimmed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EATO3SKS.js";
|
|
4
4
|
import {
|
|
5
5
|
pluginCatalogRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3J5Y4RWY.js";
|
|
7
7
|
import {
|
|
8
8
|
setSpanAttributes,
|
|
9
9
|
setSpanStatus
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3TMKXW4H.js";
|
|
11
11
|
|
|
12
12
|
// src/chat/sandbox/paths.ts
|
|
13
13
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
AgentRunError,
|
|
6
6
|
executeTurn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LXPGGSYD.js";
|
|
8
8
|
import {
|
|
9
9
|
buildDeliveredTurnStatePatch,
|
|
10
10
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
getTurnUserSlackMessageTs,
|
|
16
16
|
persistAuthPauseTurnState,
|
|
17
17
|
requireTurnFailureEventId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-F3XUS2T5.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveTurnSessionRouting,
|
|
21
21
|
scheduleSessionCompletedPluginTasks
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-CGNZXN7B.js";
|
|
23
23
|
import {
|
|
24
24
|
getTurnLifecycle
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-342FVAX5.js";
|
|
26
26
|
import {
|
|
27
27
|
coerceThreadConversationState,
|
|
28
28
|
configValueSchema,
|
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
getPersistedSandboxState,
|
|
31
31
|
getPersistedThreadState,
|
|
32
32
|
persistThreadStateById
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-G2CT2D5U.js";
|
|
34
34
|
import {
|
|
35
35
|
buildSentryConversationUrl,
|
|
36
36
|
deleteWebAuthorization
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-N3GQY63R.js";
|
|
38
38
|
import {
|
|
39
39
|
createUserTokenStore,
|
|
40
40
|
deleteMcpAuthSession,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
lookupSlackUserProfile,
|
|
46
46
|
putMcpStoredOAuthCredentials,
|
|
47
47
|
resolvePluginOAuthAccount
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-X2WFY3TM.js";
|
|
49
49
|
import {
|
|
50
50
|
RetryableDeliveryError,
|
|
51
51
|
addReactionToMessage,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
removeReactionFromMessage,
|
|
60
60
|
resolveBaseUrl,
|
|
61
61
|
truncateStatusText
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-CZC6ZEXR.js";
|
|
63
63
|
import {
|
|
64
64
|
CooperativeTurnYieldError,
|
|
65
65
|
clearPendingAuth,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
isCooperativeTurnYieldError,
|
|
69
69
|
isPendingAuthLatestRequest,
|
|
70
70
|
markTurnFailed
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-KVXHBJCH.js";
|
|
72
72
|
import {
|
|
73
73
|
abandonTurnRecord,
|
|
74
74
|
buildConversationContext,
|
|
@@ -87,20 +87,20 @@ import {
|
|
|
87
87
|
recordTurnSummary,
|
|
88
88
|
saveTurnCheckpoint,
|
|
89
89
|
turnHasReply
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-U67DBSNZ.js";
|
|
91
91
|
import {
|
|
92
92
|
parseSlackThreadId,
|
|
93
93
|
readSlackRawMessageContext,
|
|
94
94
|
resolveSlackChannelIdFromMessage,
|
|
95
95
|
resolveSlackChannelIdFromThreadId
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-NVDUM2CM.js";
|
|
97
97
|
import {
|
|
98
98
|
ensureConversationWake,
|
|
99
99
|
requestConversationWork
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-A6KKPVEA.js";
|
|
101
101
|
import {
|
|
102
102
|
getTurnRequestDeadline
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-N6LJYW7V.js";
|
|
104
104
|
import {
|
|
105
105
|
getVercelConversationWorkQueue
|
|
106
106
|
} from "./chunk-DKIJ2RP5.js";
|
|
@@ -112,39 +112,39 @@ import {
|
|
|
112
112
|
getSlackClient,
|
|
113
113
|
isDmChannel,
|
|
114
114
|
normalizeSlackConversationId
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-4UW7BEJZ.js";
|
|
116
116
|
import {
|
|
117
117
|
getConversationStore,
|
|
118
118
|
getSqlExecutor,
|
|
119
119
|
requireSlackDestination,
|
|
120
120
|
upsertIdentity,
|
|
121
121
|
upsertLinkedIdentity
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-SPEJV3TW.js";
|
|
123
123
|
import {
|
|
124
124
|
acquireActiveLock,
|
|
125
125
|
getStateAdapter
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-T5KV6DUY.js";
|
|
127
127
|
import {
|
|
128
128
|
botConfig,
|
|
129
129
|
escapeXml,
|
|
130
130
|
getChatConfig,
|
|
131
131
|
getRuntimeMetadata,
|
|
132
132
|
normalizeSlackEmojiName
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-EATO3SKS.js";
|
|
134
134
|
import {
|
|
135
135
|
defaultModelId
|
|
136
136
|
} from "./chunk-NHJU2ZAL.js";
|
|
137
137
|
import {
|
|
138
138
|
discoverSkills
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-D3SLBCD4.js";
|
|
140
140
|
import {
|
|
141
141
|
pluginCatalogRuntime
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-3J5Y4RWY.js";
|
|
143
143
|
import {
|
|
144
144
|
buildOAuthTokenRequest,
|
|
145
145
|
hasRequiredOAuthScope,
|
|
146
146
|
parseOAuthTokenResponse
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-7KXZRRMK.js";
|
|
148
148
|
import {
|
|
149
149
|
createSlackResumeActor,
|
|
150
150
|
isUserActor,
|
|
@@ -162,7 +162,7 @@ import {
|
|
|
162
162
|
setTags,
|
|
163
163
|
toOptionalString,
|
|
164
164
|
withLogContext
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-3TMKXW4H.js";
|
|
166
166
|
|
|
167
167
|
// src/chat/slack/assistant-thread/status-render.ts
|
|
168
168
|
var DEFAULT_STATUS_CONTEXTS = {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-G2CT2D5U.js";
|
|
5
5
|
import {
|
|
6
6
|
recordTaskExecution
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G6XSYS3Q.js";
|
|
8
8
|
import {
|
|
9
9
|
pluginTaskId,
|
|
10
10
|
pluginTaskParamsSchema,
|
|
11
11
|
sendVercelPluginTask
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EWPTEQXA.js";
|
|
13
13
|
import {
|
|
14
14
|
getPiMessageRole,
|
|
15
15
|
getTurnRecord,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isToolResultMessage,
|
|
20
20
|
normalizeToolNameFromResult,
|
|
21
21
|
stripRuntimeTurnContext
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-U67DBSNZ.js";
|
|
23
23
|
import {
|
|
24
24
|
createPluginConversationEvents,
|
|
25
25
|
createPluginEmbedder,
|
|
@@ -28,17 +28,17 @@ import {
|
|
|
28
28
|
createPluginState,
|
|
29
29
|
getPlugins,
|
|
30
30
|
readActorIdentity
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4UW7BEJZ.js";
|
|
32
32
|
import {
|
|
33
33
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
34
34
|
} from "./chunk-3Y47VMHV.js";
|
|
35
35
|
import {
|
|
36
36
|
getConversationStore,
|
|
37
37
|
getDb
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-SPEJV3TW.js";
|
|
39
39
|
import {
|
|
40
40
|
getStateAdapter
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-T5KV6DUY.js";
|
|
42
42
|
import {
|
|
43
43
|
sameActorIdentity
|
|
44
44
|
} from "./chunk-7NL7T6VU.js";
|
|
@@ -84,7 +84,7 @@ function slackSourceForDestination(args) {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
async function resolveConversationRouting(args) {
|
|
87
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
87
|
+
const conversationStore = args.conversationStore ?? (await import("./db-OSPYS4WA.js")).getConversationStore();
|
|
88
88
|
const chain = await loadConversationChain(
|
|
89
89
|
args.conversationId,
|
|
90
90
|
conversationStore
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAndEnqueueAgentInvocation
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IZ4CIFJY.js";
|
|
4
4
|
import {
|
|
5
5
|
actorFromRun,
|
|
6
6
|
toolInvocationDestination
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CZC6ZEXR.js";
|
|
8
8
|
|
|
9
9
|
// src/chat/agent-invocations/spawn.ts
|
|
10
10
|
function bindSpawnAgent(run, options) {
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
isDmChannel,
|
|
9
9
|
normalizeSlackConversationId,
|
|
10
10
|
withSlackRetries
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4UW7BEJZ.js";
|
|
12
12
|
import {
|
|
13
13
|
parseDestination
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SPEJV3TW.js";
|
|
15
15
|
import {
|
|
16
16
|
getStateAdapter
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T5KV6DUY.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeSlackEmojiName
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EATO3SKS.js";
|
|
21
21
|
import {
|
|
22
22
|
pluginCatalogRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3J5Y4RWY.js";
|
|
24
24
|
import {
|
|
25
25
|
parseSlackMessageTs,
|
|
26
26
|
parseSlackUserId
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
isRecord,
|
|
30
30
|
logInfo,
|
|
31
31
|
logWarn
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3TMKXW4H.js";
|
|
33
33
|
|
|
34
34
|
// src/chat/agent/types.ts
|
|
35
35
|
var RetryableDeliveryError = class extends Error {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3J5Y4RWY.js";
|
|
4
4
|
import {
|
|
5
5
|
skillRoots
|
|
6
6
|
} from "./chunk-TXKUKMVO.js";
|
|
7
7
|
import {
|
|
8
8
|
logWarn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3TMKXW4H.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/skills.ts
|
|
12
12
|
import fs from "fs/promises";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
toCanonicalInputMessage,
|
|
9
9
|
toCanonicalOutputMessage,
|
|
10
10
|
toGenAiMessagesTraceAttributes
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4FHQ6CCO.js";
|
|
12
12
|
import {
|
|
13
13
|
extractGenAiUsageAttributes,
|
|
14
14
|
logException,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
normalizeGenAiFinishReason,
|
|
17
17
|
serializeGenAiAttribute,
|
|
18
18
|
withSpan
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3TMKXW4H.js";
|
|
20
20
|
|
|
21
21
|
// src/chat/services/provider-error.ts
|
|
22
22
|
var ProviderError = class extends Error {
|
|
@@ -808,6 +808,13 @@ function validateGatewayModelId(raw) {
|
|
|
808
808
|
function validateEmbeddingModelId(raw) {
|
|
809
809
|
return toOptionalTrimmed(raw);
|
|
810
810
|
}
|
|
811
|
+
function requireModelId(configName, raw, validate) {
|
|
812
|
+
const modelId = validate(raw);
|
|
813
|
+
if (!modelId) {
|
|
814
|
+
throw new Error(`${configName} must not be empty`);
|
|
815
|
+
}
|
|
816
|
+
return modelId;
|
|
817
|
+
}
|
|
811
818
|
var DEFAULT_STANDARD_PROFILE_DESCRIPTION = "Use for default assistant work: lookups, explanations, ordinary tool use, short answers, and light investigation of one source. Avoid for implementation, debugging, multi-file changes, architecture decisions, or research across several systems.";
|
|
812
819
|
var DEFAULT_HANDOFF_PROFILE_DESCRIPTION = "Use for coding and difficult multi-step work: implementation, debugging, root-cause analysis, broad refactors, multi-file changes, architecture decisions, and research across several systems. Avoid for simple lookups, short answers, single-file reads, or ordinary tool use that the default profile can finish.";
|
|
813
820
|
function parseOptionalProfileDescription(rawDescription, configName, profile) {
|
|
@@ -1093,6 +1100,50 @@ function getRuntimeMetadata() {
|
|
|
1093
1100
|
version: toOptionalTrimmed(process.env.VERCEL_GIT_COMMIT_SHA)
|
|
1094
1101
|
};
|
|
1095
1102
|
}
|
|
1103
|
+
function setBotModelConfig(config) {
|
|
1104
|
+
if (config.embeddingModelId !== void 0) {
|
|
1105
|
+
botConfig.embeddingModelId = requireModelId(
|
|
1106
|
+
"embeddingModelId",
|
|
1107
|
+
config.embeddingModelId,
|
|
1108
|
+
validateEmbeddingModelId
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
if (config.fastModelId !== void 0) {
|
|
1112
|
+
botConfig.fastModelId = requireModelId(
|
|
1113
|
+
"fastModelId",
|
|
1114
|
+
config.fastModelId,
|
|
1115
|
+
validateGatewayModelId
|
|
1116
|
+
);
|
|
1117
|
+
}
|
|
1118
|
+
if (config.guardianModelId !== void 0) {
|
|
1119
|
+
botConfig.guardianModelId = requireModelId(
|
|
1120
|
+
"guardianModelId",
|
|
1121
|
+
config.guardianModelId,
|
|
1122
|
+
validateGatewayModelId
|
|
1123
|
+
);
|
|
1124
|
+
}
|
|
1125
|
+
if (config.imageGenerationModelId !== void 0) {
|
|
1126
|
+
botConfig.imageGenerationModelId = requireModelId(
|
|
1127
|
+
"imageGenerationModelId",
|
|
1128
|
+
config.imageGenerationModelId,
|
|
1129
|
+
validateEmbeddingModelId
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
if (config.visionModelId !== void 0) {
|
|
1133
|
+
botConfig.visionModelId = requireModelId(
|
|
1134
|
+
"visionModelId",
|
|
1135
|
+
config.visionModelId,
|
|
1136
|
+
validateGatewayModelId
|
|
1137
|
+
);
|
|
1138
|
+
}
|
|
1139
|
+
if (config.webSearchModelId !== void 0) {
|
|
1140
|
+
botConfig.webSearchModelId = requireModelId(
|
|
1141
|
+
"webSearchModelId",
|
|
1142
|
+
config.webSearchModelId,
|
|
1143
|
+
validateGatewayModelId
|
|
1144
|
+
);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1096
1147
|
function setProfiles(profiles, defaultProfile) {
|
|
1097
1148
|
if (!profiles || !defaultProfile) {
|
|
1098
1149
|
throw new Error("profiles and defaultProfile must be configured together");
|
|
@@ -1170,6 +1221,7 @@ export {
|
|
|
1170
1221
|
getSlackClientId,
|
|
1171
1222
|
getSlackClientSecret,
|
|
1172
1223
|
getRuntimeMetadata,
|
|
1224
|
+
setBotModelConfig,
|
|
1173
1225
|
setProfiles,
|
|
1174
1226
|
getSlackReactionConfig,
|
|
1175
1227
|
setSlackReactionConfig
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithTurnRequestDeadline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N6LJYW7V.js";
|
|
4
4
|
import {
|
|
5
5
|
QUEUE_SIGNATURE_MAX_AGE_MS,
|
|
6
6
|
createVercelQueueClient,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7H2VZTWN.js";
|
|
10
10
|
import {
|
|
11
11
|
logWarn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3TMKXW4H.js";
|
|
13
13
|
|
|
14
14
|
// src/chat/plugins/task-queue.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -129,7 +129,7 @@ function pluginTaskCallback() {
|
|
|
129
129
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
130
130
|
// Load the runner on first use so this module can send without a cycle.
|
|
131
131
|
run: async (message) => {
|
|
132
|
-
const { processPluginTask } = await import("./task-runner-
|
|
132
|
+
const { processPluginTask } = await import("./task-runner-GR2WZNCW.js");
|
|
133
133
|
await processPluginTask(message);
|
|
134
134
|
},
|
|
135
135
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G2CT2D5U.js";
|
|
6
6
|
import {
|
|
7
7
|
clearPendingAuth,
|
|
8
8
|
markTurnClosed,
|
|
9
9
|
markTurnCompleted
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KVXHBJCH.js";
|
|
11
11
|
import {
|
|
12
12
|
hydrateConversationMessages,
|
|
13
13
|
markConversationMessage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-U67DBSNZ.js";
|
|
15
15
|
import {
|
|
16
16
|
buildDeterministicTurnId
|
|
17
17
|
} from "./chunk-DA2KGZZI.js";
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
findProviderError,
|
|
21
21
|
getProviderErrorAttributes,
|
|
22
22
|
getProviderErrorUserMessage
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EATO3SKS.js";
|
|
24
24
|
import {
|
|
25
25
|
parseSlackMessageTs
|
|
26
26
|
} from "./chunk-N7TMSOZH.js";
|
|
27
27
|
import {
|
|
28
28
|
buildTurnFailureResponse
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3TMKXW4H.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/runtime/delivered-turn-state.ts
|
|
32
32
|
function buildDeliveredTurnStatePatch(args) {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-PDO5BLNM.js";
|
|
4
4
|
import {
|
|
5
5
|
botConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EATO3SKS.js";
|
|
7
7
|
import {
|
|
8
8
|
logWarn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3TMKXW4H.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/conversations/structured-events.ts
|
|
12
12
|
import {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-U67DBSNZ.js";
|
|
4
4
|
import {
|
|
5
5
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
6
6
|
} from "./chunk-3Y47VMHV.js";
|
|
7
7
|
import {
|
|
8
8
|
getDb
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SPEJV3TW.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2ACXVY6O.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-T5KV6DUY.js";
|
|
16
16
|
import {
|
|
17
17
|
juniorDestinations
|
|
18
18
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
isRecord,
|
|
21
21
|
toOptionalNumber,
|
|
22
22
|
toOptionalString
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3TMKXW4H.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/state/conversation.ts
|
|
26
26
|
function defaultConversationState() {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
agentTurnCostUsd,
|
|
3
3
|
agentTurnTotalTokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FU4OWKCL.js";
|
|
5
5
|
import {
|
|
6
6
|
getDb
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SPEJV3TW.js";
|
|
8
8
|
import {
|
|
9
9
|
juniorConversations,
|
|
10
10
|
juniorTaskExecutions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2ACXVY6O.js";
|
|
12
12
|
import {
|
|
13
13
|
logWarn
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3TMKXW4H.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/tasks/execution-stats.ts
|
|
17
17
|
import {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRunError,
|
|
3
3
|
executeTurn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LXPGGSYD.js";
|
|
5
5
|
import {
|
|
6
6
|
ConversationTurnLifecycleService
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-342FVAX5.js";
|
|
8
8
|
import {
|
|
9
9
|
getPersistedSandboxState,
|
|
10
10
|
getPersistedThreadState,
|
|
11
11
|
persistThreadStateById
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-G2CT2D5U.js";
|
|
13
13
|
import {
|
|
14
14
|
AgentInvocationBusyError,
|
|
15
15
|
AgentInvocationLimitError,
|
|
@@ -18,32 +18,32 @@ import {
|
|
|
18
18
|
agentBindingSchema,
|
|
19
19
|
agentInvocationSchema,
|
|
20
20
|
createAgentInvocationSchema
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OKQMTCHU.js";
|
|
22
22
|
import {
|
|
23
23
|
TurnInputCommitLostError,
|
|
24
24
|
getAssistantReplyText,
|
|
25
25
|
getConversationTurnBoundaryError,
|
|
26
26
|
isTurnInputCommitLostError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KVXHBJCH.js";
|
|
28
28
|
import {
|
|
29
29
|
failTurnRecord,
|
|
30
30
|
getTerminalAssistantMessages,
|
|
31
31
|
getTurnRecord,
|
|
32
32
|
openConversationProjection,
|
|
33
33
|
saveTurnCheckpoint
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-U67DBSNZ.js";
|
|
35
35
|
import {
|
|
36
36
|
appendAndEnqueueInboundMessage
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-A6KKPVEA.js";
|
|
38
38
|
import {
|
|
39
39
|
getConversationEventStore,
|
|
40
40
|
getConversationStore,
|
|
41
41
|
getSqlExecutor
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-SPEJV3TW.js";
|
|
43
43
|
import {
|
|
44
44
|
juniorAgentBindings,
|
|
45
45
|
juniorAgentInvocations
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-2ACXVY6O.js";
|
|
47
47
|
|
|
48
48
|
// src/chat/agent-invocations/work.ts
|
|
49
49
|
import { z } from "zod";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConversationTurnLifecycleService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-342FVAX5.js";
|
|
4
4
|
import {
|
|
5
5
|
runAgentWithTimeout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CZC6ZEXR.js";
|
|
7
7
|
import {
|
|
8
8
|
getConversationEventStore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-SPEJV3TW.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/runtime/turn-execution.ts
|
|
12
12
|
var AgentRunError = class extends Error {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getStateAdapter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T5KV6DUY.js";
|
|
4
4
|
import {
|
|
5
5
|
getClient
|
|
6
6
|
} from "./chunk-PEQXYSSE.js";
|
|
@@ -73,6 +73,11 @@ function buildSentryOrgPath(args) {
|
|
|
73
73
|
}
|
|
74
74
|
const params = new URLSearchParams();
|
|
75
75
|
params.set("project", dsn.projectId);
|
|
76
|
+
if (args.query) {
|
|
77
|
+
for (const [key, value] of Object.entries(args.query)) {
|
|
78
|
+
params.set(key, value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
76
81
|
const path = `${args.path}?${params.toString()}`;
|
|
77
82
|
if (isSentrySaasDsnHost(dsn.host)) {
|
|
78
83
|
return `https://${orgSlug}.sentry.io/${path}`;
|
|
@@ -86,7 +91,8 @@ function buildSentryConversationUrl(conversationId) {
|
|
|
86
91
|
}
|
|
87
92
|
function buildSentryEventUrl(eventId) {
|
|
88
93
|
return buildSentryOrgPath({
|
|
89
|
-
path:
|
|
94
|
+
path: "issues/",
|
|
95
|
+
query: { query: eventId }
|
|
90
96
|
});
|
|
91
97
|
}
|
|
92
98
|
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
formatProviderLabel,
|
|
9
9
|
startOAuthFlow
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CZC6ZEXR.js";
|
|
11
11
|
import {
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KVXHBJCH.js";
|
|
15
15
|
import {
|
|
16
16
|
recordAuthorizationRequested
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U67DBSNZ.js";
|
|
18
18
|
import {
|
|
19
19
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2ACXVY6O.js";
|
|
21
21
|
import {
|
|
22
22
|
TURN_REASONING_LEVELS
|
|
23
23
|
} from "./chunk-NHJU2ZAL.js";
|
|
24
24
|
import {
|
|
25
25
|
pluginCatalogRuntime
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-3J5Y4RWY.js";
|
|
27
27
|
import {
|
|
28
28
|
credentialContextSchema
|
|
29
29
|
} from "./chunk-CEMMLV5L.js";
|