@sentry/junior 0.151.0 → 0.153.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-7BWOB7SN.js} +10 -10
- package/dist/api/conversations/list.d.ts +11 -5
- 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 +52 -31
- package/dist/app.js +38 -38
- package/dist/{catalog-runtime-2LCLLOBI.js → catalog-runtime-CGUDNL3D.js} +5 -5
- package/dist/chat/api-turns/authorization.d.ts +23 -0
- package/dist/{chunk-QVQBWWXQ.js → chunk-2J4VCHRX.js} +6 -6
- package/dist/{chunk-J5LAA2LI.js → chunk-2NS3ACHB.js} +45 -11
- package/dist/chunk-37LMRT7G.js +89 -0
- package/dist/{chunk-JSKTDBSS.js → chunk-4TWLKHOM.js} +4 -4
- package/dist/{chunk-ZGSL5ARH.js → chunk-5DMPHA4V.js} +141 -66
- package/dist/{chunk-JIJOPRD4.js → chunk-5QBK3QHJ.js} +4 -4
- package/dist/{chunk-KPQBQRNM.js → chunk-5TXDKTET.js} +5 -5
- package/dist/{chunk-OYRFUQOV.js → chunk-5XBRH3N7.js} +59 -12
- package/dist/{chunk-6A46QL4O.js → chunk-A5SROS6H.js} +4 -4
- package/dist/{chunk-WVXFEQXE.js → chunk-COC65LIW.js} +1 -1
- package/dist/{chunk-6DLWRSGV.js → chunk-EPOA52SD.js} +1 -1
- package/dist/{chunk-5N3XLYBW.js → chunk-ET54Q4TD.js} +1 -1
- package/dist/{chunk-M6KRPBXC.js → chunk-FLEY546A.js} +6 -6
- package/dist/{chunk-OAPPJ3TM.js → chunk-HMU2QP5M.js} +1 -1
- package/dist/{chunk-H7ZMEHAN.js → chunk-HOK7MEWG.js} +1 -1
- package/dist/{chunk-6PGJPCN2.js → chunk-HYEAR6HL.js} +1 -1
- package/dist/{chunk-EMB4VY7H.js → chunk-ISEROVYZ.js} +5 -5
- package/dist/{chunk-AGSUPAD5.js → chunk-JAJVUQV7.js} +3 -3
- package/dist/{chunk-DJAOSWB6.js → chunk-JJAMURMR.js} +1 -1
- package/dist/{chunk-2MGJ64SL.js → chunk-JY2HJYJT.js} +1 -1
- package/dist/{chunk-CL5DT6D2.js → chunk-K4LK6KYO.js} +4 -4
- package/dist/{chunk-OFRJXFTH.js → chunk-O2YXWWPM.js} +8 -8
- package/dist/{chunk-D22FO4LW.js → chunk-PGJBNO3I.js} +2 -2
- package/dist/{chunk-6WNWM5JD.js → chunk-PMJAY6JS.js} +5 -5
- package/dist/{chunk-C7D2ONB5.js → chunk-RKW5QGGN.js} +1 -1
- package/dist/{chunk-UDDCHQN2.js → chunk-TIV3PX5H.js} +1 -1
- package/dist/{chunk-XN3QKNQX.js → chunk-UG5UCHHJ.js} +7 -0
- package/dist/{chunk-3WOK4ZLX.js → chunk-URFV5RWN.js} +18 -18
- package/dist/{chunk-PWMVR2MD.js → chunk-VXWTGOLW.js} +1 -1
- package/dist/{chunk-B7KWBJAR.js → chunk-WTKAALLV.js} +6 -6
- package/dist/{chunk-K3QXMZDU.js → chunk-XAYXN4EG.js} +3 -3
- package/dist/{chunk-YN4W5SRJ.js → chunk-XQPKMLRI.js} +1 -1
- package/dist/{chunk-PQUV3NA5.js → chunk-YECBSG77.js} +2 -2
- 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-QNQM5YRR.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-ERQPIR27.js} +23 -24
- package/dist/{runner-V6C3EELU.js → runner-BX46SQIE.js} +14 -16
- package/dist/{skills-43PFYZIZ.js → skills-JL44EIRX.js} +6 -6
- package/dist/spawn-W6FO32T4.js +38 -0
- package/dist/{validation-4MNN6QKE.js → validation-UU2AIJIY.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-YZO6XTEB.js → work-SS7RU5CH.js} +17 -17
- package/dist/{worker-42AR7323.js → worker-5P2E7LVI.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
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
formatProviderLabel,
|
|
6
6
|
startOAuthFlow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FLEY546A.js";
|
|
8
8
|
import {
|
|
9
9
|
parseSandboxEgressAuthRequiredSignal
|
|
10
10
|
} from "./chunk-HUO3UTAQ.js";
|
|
@@ -12,16 +12,16 @@ import {
|
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink,
|
|
14
14
|
recordAuthorizationRequested
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5QBK3QHJ.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ET54Q4TD.js";
|
|
19
19
|
import {
|
|
20
20
|
TURN_REASONING_LEVELS
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PGJBNO3I.js";
|
|
22
22
|
import {
|
|
23
23
|
pluginCatalogRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EPOA52SD.js";
|
|
25
25
|
import {
|
|
26
26
|
credentialContextSchema
|
|
27
27
|
} from "./chunk-RUIXF3YQ.js";
|
|
@@ -1,28 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createWebAuthorization,
|
|
3
|
+
deleteWebAuthorization
|
|
4
|
+
} from "./chunk-37LMRT7G.js";
|
|
1
5
|
import {
|
|
2
6
|
appendAndEnqueueInboundMessage
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A5SROS6H.js";
|
|
4
8
|
import {
|
|
5
9
|
buildDeliveredTurnStatePatch,
|
|
10
|
+
completeAuthPauseTurn,
|
|
6
11
|
finalizeFailedTurnReplyWithEvent,
|
|
7
12
|
getTurnUserMessage,
|
|
8
13
|
processPluginTask,
|
|
9
14
|
scheduleSessionCompletedPluginTasks
|
|
10
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2NS3ACHB.js";
|
|
11
16
|
import {
|
|
12
17
|
ConversationTurnLifecycleService,
|
|
13
18
|
coerceThreadConversationState,
|
|
14
19
|
getPersistedSandboxState,
|
|
15
20
|
getPersistedThreadState,
|
|
16
21
|
persistThreadStateById
|
|
17
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ISEROVYZ.js";
|
|
18
23
|
import {
|
|
19
24
|
healthReportSchema
|
|
20
25
|
} from "./chunk-UTL3MHPC.js";
|
|
21
26
|
import {
|
|
22
27
|
parseSlackThreadId
|
|
23
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-TIV3PX5H.js";
|
|
24
29
|
import {
|
|
25
30
|
TurnInputCommitLostError,
|
|
31
|
+
abandonTurnRecord,
|
|
26
32
|
buildConversationContext,
|
|
27
33
|
buildDeterministicTurnId,
|
|
28
34
|
getAssistantReplyText,
|
|
@@ -33,6 +39,7 @@ import {
|
|
|
33
39
|
listTurnSummaries,
|
|
34
40
|
loadProjection,
|
|
35
41
|
markConversationMessage,
|
|
42
|
+
markTurnClosed,
|
|
36
43
|
markTurnFailed,
|
|
37
44
|
normalizeConversationText,
|
|
38
45
|
persistConversationMessages,
|
|
@@ -41,17 +48,17 @@ import {
|
|
|
41
48
|
saveTurnCheckpoint,
|
|
42
49
|
startActiveTurn,
|
|
43
50
|
upsertConversationMessage
|
|
44
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-5QBK3QHJ.js";
|
|
45
52
|
import {
|
|
46
53
|
normalizeSlackConversationId
|
|
47
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-JAJVUQV7.js";
|
|
48
55
|
import {
|
|
49
56
|
getConversationEventStore,
|
|
50
57
|
getConversationStore
|
|
51
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-XAYXN4EG.js";
|
|
52
59
|
import {
|
|
53
60
|
getSlackBotToken
|
|
54
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-PGJBNO3I.js";
|
|
55
62
|
import {
|
|
56
63
|
credentialContextForActor
|
|
57
64
|
} from "./chunk-RUIXF3YQ.js";
|
|
@@ -60,7 +67,7 @@ import {
|
|
|
60
67
|
logWarn,
|
|
61
68
|
setTags,
|
|
62
69
|
withLogContext
|
|
63
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-HMU2QP5M.js";
|
|
64
71
|
|
|
65
72
|
// src/handlers/health.ts
|
|
66
73
|
function readHealthReport() {
|
|
@@ -527,6 +534,27 @@ function createApiTurnWorker(options) {
|
|
|
527
534
|
startedAtMs = userMessage.createdAtMs;
|
|
528
535
|
inputMessageIds = [userMessageId];
|
|
529
536
|
} else {
|
|
537
|
+
const authParked = (await listTurnSummaries(context.conversationId)).filter(
|
|
538
|
+
(summary) => summary.surface === "api" && !summary.dispatchId && summary.state === "paused" && summary.resumeReason === "auth"
|
|
539
|
+
);
|
|
540
|
+
for (const parked of authParked) {
|
|
541
|
+
await abandonTurnRecord({
|
|
542
|
+
conversationId: context.conversationId,
|
|
543
|
+
turnId: parked.turnId,
|
|
544
|
+
errorMessage: "Auth-parked session superseded by a new user message"
|
|
545
|
+
});
|
|
546
|
+
markTurnClosed({
|
|
547
|
+
conversation,
|
|
548
|
+
nowMs: Date.now(),
|
|
549
|
+
sessionId: parked.turnId
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
if (authParked.length > 0) {
|
|
553
|
+
await deleteWebAuthorization({
|
|
554
|
+
actorId: actor.userId,
|
|
555
|
+
conversationId: context.conversationId
|
|
556
|
+
});
|
|
557
|
+
}
|
|
530
558
|
upsertConversationMessage(conversation, {
|
|
531
559
|
id: userMessageId,
|
|
532
560
|
role: "user",
|
|
@@ -624,7 +652,10 @@ function createApiTurnWorker(options) {
|
|
|
624
652
|
publishExternally: false,
|
|
625
653
|
source,
|
|
626
654
|
surface: "api",
|
|
627
|
-
|
|
655
|
+
authorization: createWebAuthorization({
|
|
656
|
+
actorId: actor.userId,
|
|
657
|
+
conversationId: context.conversationId
|
|
658
|
+
}),
|
|
628
659
|
state: {
|
|
629
660
|
pendingAuth: conversation.processing.pendingAuth,
|
|
630
661
|
sandboxRef
|
|
@@ -639,14 +670,30 @@ function createApiTurnWorker(options) {
|
|
|
639
670
|
conversation,
|
|
640
671
|
sandboxRef
|
|
641
672
|
});
|
|
673
|
+
},
|
|
674
|
+
recordPendingAuth: async (pendingAuth) => {
|
|
675
|
+
conversation.processing.pendingAuth = pendingAuth;
|
|
676
|
+
await persistThreadStateById(context.conversationId, {
|
|
677
|
+
conversation,
|
|
678
|
+
sandboxRef
|
|
679
|
+
});
|
|
642
680
|
}
|
|
643
681
|
}
|
|
644
682
|
});
|
|
645
683
|
if (outcome.status === "suspended") {
|
|
646
684
|
return { status: "yielded" };
|
|
647
685
|
}
|
|
648
|
-
if (outcome.status
|
|
649
|
-
|
|
686
|
+
if (outcome.status === "awaiting_auth") {
|
|
687
|
+
completeAuthPauseTurn({
|
|
688
|
+
conversation,
|
|
689
|
+
sessionId: turnId
|
|
690
|
+
});
|
|
691
|
+
await persistThreadStateById(context.conversationId, {
|
|
692
|
+
conversation,
|
|
693
|
+
sandboxRef
|
|
694
|
+
});
|
|
695
|
+
await acknowledge();
|
|
696
|
+
return { status: "completed" };
|
|
650
697
|
}
|
|
651
698
|
reply = outcome.result;
|
|
652
699
|
modelFailureCaptureAttempted = reply.diagnostics.outcome !== "success";
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XAYXN4EG.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XQPKMLRI.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PGJBNO3I.js";
|
|
19
19
|
import {
|
|
20
20
|
parseStoredSlackActor
|
|
21
21
|
} from "./chunk-HZF5P5UN.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isRecord,
|
|
24
24
|
toOptionalNumber,
|
|
25
25
|
toOptionalString
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HMU2QP5M.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
isDmChannel,
|
|
5
5
|
normalizeSlackConversationId,
|
|
6
6
|
withSlackRetries
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JAJVUQV7.js";
|
|
8
8
|
import {
|
|
9
9
|
parseDestination
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XAYXN4EG.js";
|
|
11
11
|
import {
|
|
12
12
|
getStateAdapter
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XQPKMLRI.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeSlackEmojiName
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PGJBNO3I.js";
|
|
17
17
|
import {
|
|
18
18
|
pluginCatalogRuntime
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-EPOA52SD.js";
|
|
20
20
|
import {
|
|
21
21
|
parseSlackMessageTs,
|
|
22
22
|
parseSlackUserId
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
isRecord,
|
|
26
26
|
logInfo,
|
|
27
27
|
logWarn
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-HMU2QP5M.js";
|
|
29
29
|
|
|
30
30
|
// src/chat/slack/outbound.ts
|
|
31
31
|
var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5QBK3QHJ.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-XAYXN4EG.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ET54Q4TD.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XQPKMLRI.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-HMU2QP5M.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/conversations/turn-lifecycle.ts
|
|
26
26
|
var ConversationTurnLifecycleService = class {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-EM225ITJ.js";
|
|
4
4
|
import {
|
|
5
5
|
getSlackBotToken
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PGJBNO3I.js";
|
|
7
7
|
import {
|
|
8
8
|
parseSlackChannelReferenceId
|
|
9
9
|
} from "./chunk-F3B2YJ76.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
setSpanAttributes,
|
|
13
13
|
setSpanStatus,
|
|
14
14
|
withSpan
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HMU2QP5M.js";
|
|
16
16
|
|
|
17
17
|
// src/chat/slack/client.ts
|
|
18
18
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "async_hooks";
|
|
@@ -314,7 +314,7 @@ async function withSlackRetries(task, maxAttempts = 3, context = {}) {
|
|
|
314
314
|
"url.path": `/api/${action}`,
|
|
315
315
|
"app.slack.method": action,
|
|
316
316
|
"app.retry.max_attempts": maxAttempts,
|
|
317
|
-
...attemptNumber > 1 ? { "http.resend_count": attemptNumber - 1 } : {},
|
|
317
|
+
...attemptNumber > 1 ? { "http.request.resend_count": attemptNumber - 1 } : {},
|
|
318
318
|
...context.attributes ?? {},
|
|
319
319
|
...context.spanAttributes ?? {}
|
|
320
320
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTurnRequestDeadline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HOK7MEWG.js";
|
|
4
4
|
import {
|
|
5
5
|
CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
|
|
6
6
|
CONVERSATION_WORK_MAX_RETRIES,
|
|
@@ -21,20 +21,20 @@ import {
|
|
|
21
21
|
releaseConversationWork,
|
|
22
22
|
requestAnotherSlice,
|
|
23
23
|
startConversationWork
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-A5SROS6H.js";
|
|
25
25
|
import {
|
|
26
26
|
ConversationQueueMessageRejectedError
|
|
27
27
|
} from "./chunk-JAL3CH4G.js";
|
|
28
28
|
import {
|
|
29
29
|
getChatConfig,
|
|
30
30
|
isProviderRetryError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PGJBNO3I.js";
|
|
32
32
|
import {
|
|
33
33
|
logException,
|
|
34
34
|
logInfo,
|
|
35
35
|
logWarn,
|
|
36
36
|
withLogContext
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-HMU2QP5M.js";
|
|
38
38
|
|
|
39
39
|
// src/chat/task-execution/worker.ts
|
|
40
40
|
var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveBaseUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FLEY546A.js";
|
|
4
4
|
import {
|
|
5
5
|
createPluginLogger,
|
|
6
6
|
getPlugins
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2J4VCHRX.js";
|
|
8
8
|
import {
|
|
9
9
|
getSlackClient,
|
|
10
10
|
withSlackRetries
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JAJVUQV7.js";
|
|
12
12
|
import {
|
|
13
13
|
getDb,
|
|
14
14
|
parseDestination
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-XAYXN4EG.js";
|
|
16
16
|
import {
|
|
17
17
|
sleep
|
|
18
18
|
} from "./chunk-EM225ITJ.js";
|
|
19
19
|
import {
|
|
20
20
|
acquireActiveLock,
|
|
21
21
|
getStateAdapter
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XQPKMLRI.js";
|
|
23
23
|
import {
|
|
24
24
|
pluginCatalogRuntime
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EPOA52SD.js";
|
|
26
26
|
import {
|
|
27
27
|
fetchWithBoundedOAuthErrorBodies
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-JY2HJYJT.js";
|
|
29
29
|
import {
|
|
30
30
|
isRecord
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HMU2QP5M.js";
|
|
32
32
|
|
|
33
33
|
// src/chat/capabilities/router.ts
|
|
34
34
|
var ProviderCredentialRouter = class {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VXWTGOLW.js";
|
|
7
7
|
import {
|
|
8
8
|
extractGenAiUsageAttributes,
|
|
9
9
|
logException,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
normalizeGenAiFinishReason,
|
|
12
12
|
serializeGenAiAttribute,
|
|
13
13
|
withSpan
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HMU2QP5M.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/services/provider-error.ts
|
|
17
17
|
var ProviderError = class extends Error {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolInputError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5QBK3QHJ.js";
|
|
4
4
|
import {
|
|
5
5
|
canRouteResourceEvents,
|
|
6
6
|
getPlugins
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2J4VCHRX.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XAYXN4EG.js";
|
|
11
11
|
import {
|
|
12
12
|
juniorEventTasks,
|
|
13
13
|
juniorSchedulerRuns,
|
|
14
14
|
juniorSchedulerTasks,
|
|
15
15
|
juniorStats
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ET54Q4TD.js";
|
|
17
17
|
import {
|
|
18
18
|
juniorDestinations
|
|
19
19
|
} from "./chunk-VFUK3X5B.js";
|
|
20
20
|
import {
|
|
21
21
|
logInfo
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HMU2QP5M.js";
|
|
23
23
|
|
|
24
24
|
// src/chat/event-tasks/store.ts
|
|
25
25
|
import { and, asc, desc, eq, inArray, or, sql } from "drizzle-orm";
|
|
@@ -118,7 +118,13 @@ var conversationPendingMessageSchema = z2.object({
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
|
+
var conversationPendingAuthorizationSchema = z2.object({
|
|
122
|
+
authorizationUrl: z2.string().url(),
|
|
123
|
+
completionText: z2.string().min(1),
|
|
124
|
+
label: z2.string().min(1)
|
|
125
|
+
}).strict();
|
|
121
126
|
var conversationPendingMessagesReportSchema = z2.object({
|
|
127
|
+
authorization: conversationPendingAuthorizationSchema.optional(),
|
|
122
128
|
conversationId: z2.string().min(1),
|
|
123
129
|
generatedAt: z2.string().datetime(),
|
|
124
130
|
messages: z2.array(conversationPendingMessageSchema)
|
|
@@ -784,6 +790,7 @@ export {
|
|
|
784
790
|
acceptedConversationMessageSchema,
|
|
785
791
|
conversationPendingMessageDeliverySchema,
|
|
786
792
|
conversationPendingMessageSchema,
|
|
793
|
+
conversationPendingAuthorizationSchema,
|
|
787
794
|
conversationPendingMessagesReportSchema,
|
|
788
795
|
conversationAuxiliaryCostsSchema,
|
|
789
796
|
conversationSummaryReportSchema,
|