@sentry/junior 0.187.0 → 0.188.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-XVAE2554.js → agent-hooks-5RQEVLQD.js} +11 -11
- package/dist/api.js +31 -31
- package/dist/app.js +52 -46
- package/dist/{catalog-runtime-DWFAC562.js → catalog-runtime-L4A6BJ3U.js} +4 -4
- package/dist/chat/agent/types.d.ts +8 -12
- package/dist/chat/agent-invocations/types.d.ts +72 -0
- package/dist/chat/conversations/location.d.ts +3 -8
- package/dist/chat/conversations/store.d.ts +4 -7
- package/dist/chat/event-tasks/tool-support.d.ts +6 -0
- package/dist/chat/services/turn-session-routing.d.ts +5 -5
- package/dist/chat/task-execution/slack-resource-event.d.ts +13 -5
- package/dist/{chunk-7LRRVMPH.js → chunk-32XSSFZV.js} +1 -1
- package/dist/{chunk-Z6OHCDXP.js → chunk-3HEZWDS5.js} +2 -2
- package/dist/{chunk-WRDW3A3D.js → chunk-6JZGXLL2.js} +5 -5
- package/dist/{chunk-D5BWM37G.js → chunk-6YGFBU3A.js} +12 -12
- package/dist/{chunk-WL3R2KTS.js → chunk-AW77HH54.js} +92 -10
- package/dist/{chunk-TQHCZXN7.js → chunk-CDSLOYOR.js} +5 -5
- package/dist/{chunk-27T5HZHO.js → chunk-CIG6WI7Q.js} +6 -87
- package/dist/{chunk-4A2R3AQB.js → chunk-CVBDVIF4.js} +1 -1
- package/dist/{chunk-2VUDJGB6.js → chunk-CZRWU4ZM.js} +1 -1
- package/dist/{chunk-OM4SFFJK.js → chunk-ERZMACYA.js} +2 -2
- package/dist/{chunk-Q6OCUQ7W.js → chunk-FIUCHYT6.js} +1 -1
- package/dist/{chunk-U3KMII5Y.js → chunk-HCIVBCP5.js} +1 -1
- package/dist/{chunk-WKIS4VRK.js → chunk-IUUQWIG2.js} +14 -31
- package/dist/{chunk-4YD3DET6.js → chunk-LODJKINF.js} +19 -20
- package/dist/{chunk-NIKLTFBP.js → chunk-MQDIIFZM.js} +4 -4
- package/dist/{chunk-QH3I7ZOK.js → chunk-NZLZ4KYZ.js} +1 -1
- package/dist/{chunk-ITLYUKGZ.js → chunk-PSHMPRIU.js} +1 -1
- package/dist/{chunk-URZ7UD4P.js → chunk-Q7O74WOO.js} +2 -2
- package/dist/{chunk-DUE4EUNL.js → chunk-QCGNHSMA.js} +6 -6
- package/dist/{chunk-EIWYZXSM.js → chunk-QDHJTKPE.js} +5 -5
- package/dist/{chunk-6YCIYOVA.js → chunk-QIMN3FXL.js} +1 -1
- package/dist/{chunk-X5SXFVZT.js → chunk-QIOUTXTZ.js} +1 -1
- package/dist/{chunk-HXR3FHTE.js → chunk-QVH6FW3T.js} +1 -1
- package/dist/{chunk-U5POFCKM.js → chunk-RMB7CERI.js} +26 -26
- package/dist/{chunk-KRYJ5VOD.js → chunk-SC67CH3C.js} +13 -15
- package/dist/{chunk-6FKNNUSN.js → chunk-UVUXFRYN.js} +6 -6
- package/dist/{chunk-MUPPP7A7.js → chunk-VFZAUQ5V.js} +6 -6
- package/dist/{chunk-BITZUBPJ.js → chunk-W2DDJCPS.js} +8 -8
- package/dist/{chunk-VC343WHM.js → chunk-W42ENMJW.js} +1 -1
- package/dist/{chunk-JCRXXEMC.js → chunk-WGZJ5SU4.js} +1 -1
- package/dist/{chunk-P2VU5JNH.js → chunk-WW2Y7JIA.js} +27 -26
- package/dist/{chunk-JZPDYKRG.js → chunk-X55FOVZO.js} +3 -3
- package/dist/{chunk-STF4GSK4.js → chunk-XI4PVY2T.js} +3 -3
- package/dist/{chunk-D3GDGREI.js → chunk-XJIPMHKI.js} +3 -3
- package/dist/{chunk-NU775DLU.js → chunk-Z5SKZE5B.js} +1 -1
- package/dist/{chunk-U6ZQHRIP.js → chunk-ZX7RSBQ6.js} +1 -1
- package/dist/cli/chat.js +32 -32
- 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/schema/agent-invocations.d.ts +36 -0
- package/dist/db/schema.d.ts +36 -0
- package/dist/{db-FBHAWVXU.js → db-YPRZAA2T.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-5HS5ULC6.js → oauth-callback-server-DBBIR3XG.js} +27 -27
- package/dist/{runner-46W6NV6B.js → runner-FKVFFPLO.js} +20 -20
- package/dist/{skills-TG3QC4B6.js → skills-4RBAZEMV.js} +5 -5
- package/dist/spawn-CO7QFCNJ.js +41 -0
- package/dist/task-runner-DUGZGI7V.js +34 -0
- package/dist/{validation-GMRIDBC5.js → validation-E6Z5LHZM.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-W4ULBJTU.js → work-OFTXWOK4.js} +20 -20
- package/dist/{worker-M6NVACS2.js → worker-OMWNOKTJ.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-Y6YWBIJS.js +0 -41
- package/dist/task-runner-YSGBPN4U.js +0 -34
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6YGFBU3A.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-IUUQWIG2.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QVH6FW3T.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZX7RSBQ6.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-QIMN3FXL.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/state/conversation.ts
|
|
26
26
|
function defaultConversationState() {
|
|
@@ -507,85 +507,6 @@ function getLocationConfigurationService(destination) {
|
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
// src/chat/services/turn-session-routing.ts
|
|
511
|
-
async function loadConversationChain(conversationId, conversationStore) {
|
|
512
|
-
const chain = [];
|
|
513
|
-
const seen = /* @__PURE__ */ new Set();
|
|
514
|
-
let cursor = conversationId;
|
|
515
|
-
while (cursor && !seen.has(cursor)) {
|
|
516
|
-
seen.add(cursor);
|
|
517
|
-
const conversation = await conversationStore.get({
|
|
518
|
-
conversationId: cursor
|
|
519
|
-
});
|
|
520
|
-
if (!conversation) {
|
|
521
|
-
break;
|
|
522
|
-
}
|
|
523
|
-
chain.push(conversation);
|
|
524
|
-
cursor = conversation.lineage?.parentConversationId;
|
|
525
|
-
}
|
|
526
|
-
return chain;
|
|
527
|
-
}
|
|
528
|
-
function slackSourceForDestination(args) {
|
|
529
|
-
if (args.source?.platform !== "slack" || args.source.channelId !== args.destination.channelId) {
|
|
530
|
-
return void 0;
|
|
531
|
-
}
|
|
532
|
-
const threadTs = args.source.threadTs?.trim();
|
|
533
|
-
return {
|
|
534
|
-
platform: "slack",
|
|
535
|
-
visibility: args.source.visibility ?? "public",
|
|
536
|
-
teamId: args.source.teamId?.trim() || args.destination.teamId,
|
|
537
|
-
channelId: args.source.channelId,
|
|
538
|
-
...threadTs ? { threadTs } : void 0
|
|
539
|
-
};
|
|
540
|
-
}
|
|
541
|
-
async function resolveConversationRouting(args) {
|
|
542
|
-
const conversationStore = args.conversationStore ?? (await import("./db-FBHAWVXU.js")).getConversationStore();
|
|
543
|
-
const chain = await loadConversationChain(
|
|
544
|
-
args.conversationId,
|
|
545
|
-
conversationStore
|
|
546
|
-
);
|
|
547
|
-
let destination;
|
|
548
|
-
let source;
|
|
549
|
-
let location;
|
|
550
|
-
for (const conversation of chain) {
|
|
551
|
-
destination ??= conversation.destination;
|
|
552
|
-
source ??= conversation.sessionSource;
|
|
553
|
-
location ??= conversation.location;
|
|
554
|
-
if (destination && source) {
|
|
555
|
-
break;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
if (!destination) {
|
|
559
|
-
return void 0;
|
|
560
|
-
}
|
|
561
|
-
if (destination.platform === "slack") {
|
|
562
|
-
const slackSource = slackSourceForDestination({ destination, source });
|
|
563
|
-
return {
|
|
564
|
-
destination,
|
|
565
|
-
...location ? { location } : void 0,
|
|
566
|
-
...slackSource ? { source: slackSource } : void 0
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
return {
|
|
570
|
-
destination,
|
|
571
|
-
...location ? { location } : void 0,
|
|
572
|
-
...source ? { source } : void 0
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
async function resolveTurnSessionRouting(args) {
|
|
576
|
-
const routing = await resolveConversationRouting(args);
|
|
577
|
-
if (!routing?.destination || !routing.source) {
|
|
578
|
-
throw new Error(
|
|
579
|
-
`Conversation ${args.conversationId} is missing durable routing metadata`
|
|
580
|
-
);
|
|
581
|
-
}
|
|
582
|
-
return {
|
|
583
|
-
destination: routing.destination,
|
|
584
|
-
source: routing.source,
|
|
585
|
-
...routing.location ? { location: routing.location } : void 0
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
|
|
589
510
|
export {
|
|
590
511
|
configValueSchema,
|
|
591
512
|
coerceThreadConversationState,
|
|
@@ -594,7 +515,5 @@ export {
|
|
|
594
515
|
persistThreadRuntimeState,
|
|
595
516
|
getPersistedThreadState,
|
|
596
517
|
persistThreadStateById,
|
|
597
|
-
getLocationConfigurationService
|
|
598
|
-
resolveConversationRouting,
|
|
599
|
-
resolveTurnSessionRouting
|
|
518
|
+
getLocationConfigurationService
|
|
600
519
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConversationTurnLifecycleService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W42ENMJW.js";
|
|
4
4
|
import {
|
|
5
5
|
runAgentWithTimeout
|
|
6
6
|
} from "./chunk-6FGN7ZEG.js";
|
|
7
7
|
import {
|
|
8
8
|
getConversationEventStore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IUUQWIG2.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/runtime/turn-execution.ts
|
|
12
12
|
var AgentRunError = class extends Error {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
juniorConversations,
|
|
9
9
|
juniorIdentities,
|
|
10
10
|
juniorUsers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QVH6FW3T.js";
|
|
12
12
|
import {
|
|
13
13
|
conversationEventDataSchema,
|
|
14
14
|
decodeStoredConversationEvent,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-VFUK3X5B.js";
|
|
21
21
|
import {
|
|
22
22
|
getChatConfig
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-Q7O74WOO.js";
|
|
24
24
|
import {
|
|
25
25
|
parseActorUserId,
|
|
26
26
|
parseSlackChannelReferenceId,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
} from "./chunk-N7TMSOZH.js";
|
|
29
29
|
import {
|
|
30
30
|
normalizeIdentityEmail
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QIMN3FXL.js";
|
|
32
32
|
|
|
33
33
|
// src/chat/conversations/sql/store.ts
|
|
34
34
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -418,18 +418,7 @@ function mergeActor(current2, next) {
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
// src/chat/conversations/location.ts
|
|
421
|
-
import {
|
|
422
|
-
import { z } from "zod";
|
|
423
|
-
var locationSchema = z.object({
|
|
424
|
-
/** Junior-owned stable identity for this location. */
|
|
425
|
-
id: nonBlankStringSchema,
|
|
426
|
-
/** Provider namespace that owns the provider and tenant identifiers. */
|
|
427
|
-
provider: nonBlankStringSchema,
|
|
428
|
-
/** Optional provider-native workspace, account, or tenant scope. */
|
|
429
|
-
tenantId: nonBlankStringSchema.optional(),
|
|
430
|
-
/** Provider-native identifier for the container within its tenant scope. */
|
|
431
|
-
providerId: nonBlankStringSchema
|
|
432
|
-
}).strict();
|
|
421
|
+
import { locationSchema } from "@sentry/junior-plugin-api";
|
|
433
422
|
|
|
434
423
|
// src/chat/conversations/sql/location.ts
|
|
435
424
|
function locationFromRow(row) {
|
|
@@ -594,11 +583,7 @@ function conversationFromRow(readRow) {
|
|
|
594
583
|
...row.metricRunId ? { runId: row.metricRunId } : void 0,
|
|
595
584
|
...row.executionUsage ? { usage: row.executionUsage } : void 0
|
|
596
585
|
},
|
|
597
|
-
...row.parentConversationId ? {
|
|
598
|
-
lineage: {
|
|
599
|
-
parentConversationId: row.parentConversationId
|
|
600
|
-
}
|
|
601
|
-
} : void 0,
|
|
586
|
+
...row.parentConversationId ? { parentConversationId: row.parentConversationId } : void 0,
|
|
602
587
|
...destination ? { destination } : void 0,
|
|
603
588
|
...location ? { location } : void 0,
|
|
604
589
|
...actor ? { actor } : void 0,
|
|
@@ -686,9 +671,9 @@ var SqlStore = class {
|
|
|
686
671
|
conversationId: args.childConversationId
|
|
687
672
|
});
|
|
688
673
|
if (existing) {
|
|
689
|
-
if (existing.
|
|
674
|
+
if (existing.parentConversationId !== args.parentConversationId) {
|
|
690
675
|
throw new Error(
|
|
691
|
-
`Conversation
|
|
676
|
+
`Conversation parent changed for ${args.childConversationId}`
|
|
692
677
|
);
|
|
693
678
|
}
|
|
694
679
|
return;
|
|
@@ -701,7 +686,7 @@ var SqlStore = class {
|
|
|
701
686
|
`Conversation parent is missing for ${args.childConversationId}`
|
|
702
687
|
);
|
|
703
688
|
}
|
|
704
|
-
if (parent.
|
|
689
|
+
if (parent.parentConversationId) {
|
|
705
690
|
throw new Error("Recursive agent delegation is not enabled");
|
|
706
691
|
}
|
|
707
692
|
const child = {
|
|
@@ -710,9 +695,7 @@ var SqlStore = class {
|
|
|
710
695
|
nowMs,
|
|
711
696
|
source: args.source
|
|
712
697
|
}),
|
|
713
|
-
|
|
714
|
-
parentConversationId: args.parentConversationId
|
|
715
|
-
}
|
|
698
|
+
parentConversationId: args.parentConversationId
|
|
716
699
|
};
|
|
717
700
|
await this.upsertConversation({ conversation: child });
|
|
718
701
|
}
|
|
@@ -793,7 +776,7 @@ var SqlStore = class {
|
|
|
793
776
|
createdAtMs: args.createdAtMs,
|
|
794
777
|
lastActivityAtMs: args.lastActivityAtMs,
|
|
795
778
|
updatedAtMs: args.updatedAtMs,
|
|
796
|
-
...existing?.
|
|
779
|
+
...existing?.parentConversationId ? { parentConversationId: existing.parentConversationId } : void 0,
|
|
797
780
|
...args.channelName ? { channelName: args.channelName } : void 0,
|
|
798
781
|
...args.destination ? { destination: args.destination } : void 0,
|
|
799
782
|
...args.actor ? { actor: args.actor } : void 0,
|
|
@@ -921,7 +904,7 @@ var SqlStore = class {
|
|
|
921
904
|
/** Upsert the conversation row while preserving previously discovered nullable metadata fields. */
|
|
922
905
|
async upsertConversation(args) {
|
|
923
906
|
const { conversation } = args;
|
|
924
|
-
if (!conversation.
|
|
907
|
+
if (!conversation.parentConversationId && !conversation.destination) {
|
|
925
908
|
const existing = await this.get({
|
|
926
909
|
conversationId: conversation.conversationId
|
|
927
910
|
});
|
|
@@ -949,10 +932,10 @@ var SqlStore = class {
|
|
|
949
932
|
actorIdentityObservation,
|
|
950
933
|
conversation.updatedAtMs
|
|
951
934
|
) : void 0;
|
|
952
|
-
const rootConversationId = conversation.
|
|
935
|
+
const rootConversationId = conversation.parentConversationId ? sql3`(
|
|
953
936
|
select parent.root_conversation_id
|
|
954
937
|
from junior_conversations parent
|
|
955
|
-
where parent.conversation_id = ${conversation.
|
|
938
|
+
where parent.conversation_id = ${conversation.parentConversationId}
|
|
956
939
|
)` : conversation.conversationId;
|
|
957
940
|
const rows = await this.executor.db().insert(juniorConversations).values({
|
|
958
941
|
conversationId: conversation.conversationId,
|
|
@@ -978,7 +961,7 @@ var SqlStore = class {
|
|
|
978
961
|
runId: conversation.execution.runId ?? null,
|
|
979
962
|
lastCheckpointAt: conversation.execution.lastCheckpointAtMs === void 0 ? null : dateFromMs2(conversation.execution.lastCheckpointAtMs),
|
|
980
963
|
lastEnqueuedAt: conversation.execution.lastEnqueuedAtMs === void 0 ? null : dateFromMs2(conversation.execution.lastEnqueuedAtMs),
|
|
981
|
-
parentConversationId: conversation.
|
|
964
|
+
parentConversationId: conversation.parentConversationId ?? null,
|
|
982
965
|
rootConversationId
|
|
983
966
|
}).onConflictDoUpdate({
|
|
984
967
|
target: juniorConversations.conversationId,
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWebAuthorization,
|
|
3
3
|
deleteWebAuthorization
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PSHMPRIU.js";
|
|
5
5
|
import {
|
|
6
6
|
AgentRunError,
|
|
7
7
|
executeTurn
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ERZMACYA.js";
|
|
9
9
|
import {
|
|
10
10
|
buildDeliveredTurnStatePatch,
|
|
11
11
|
completeAuthPauseTurn,
|
|
12
12
|
finalizeFailedTurnReplyWithEvent,
|
|
13
13
|
getTurnUserMessage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QDHJTKPE.js";
|
|
15
15
|
import {
|
|
16
16
|
processPluginTask,
|
|
17
17
|
scheduleSessionCompletedPluginTasks
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AW77HH54.js";
|
|
19
19
|
import {
|
|
20
20
|
ConversationTurnLifecycleService
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-W42ENMJW.js";
|
|
22
22
|
import {
|
|
23
23
|
coerceThreadConversationState,
|
|
24
24
|
getPersistedSandboxState,
|
|
25
25
|
getPersistedThreadState,
|
|
26
26
|
persistThreadStateById
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CIG6WI7Q.js";
|
|
28
28
|
import {
|
|
29
29
|
healthReportSchema
|
|
30
30
|
} from "./chunk-UTL3MHPC.js";
|
|
@@ -33,14 +33,14 @@ import {
|
|
|
33
33
|
RESOURCE_EVENT_SYSTEM_ACTOR,
|
|
34
34
|
isResourceEventConversationMessage,
|
|
35
35
|
isResourceEventMailboxMetadata
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-VFZAUQ5V.js";
|
|
37
37
|
import {
|
|
38
38
|
parseSlackThreadId
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CVBDVIF4.js";
|
|
40
40
|
import {
|
|
41
41
|
appendAndEnqueueExclusiveInboundMessage,
|
|
42
42
|
appendAndEnqueueInboundMessage
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-MQDIIFZM.js";
|
|
44
44
|
import {
|
|
45
45
|
TurnInputCommitLostError,
|
|
46
46
|
buildDeterministicTurnId,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
markTurnClosed,
|
|
52
52
|
markTurnFailed,
|
|
53
53
|
startActiveTurn
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-Z5SKZE5B.js";
|
|
55
55
|
import {
|
|
56
56
|
abandonTurnRecord,
|
|
57
57
|
buildConversationContext,
|
|
@@ -67,30 +67,30 @@ import {
|
|
|
67
67
|
recordDeliveredAssistantMessage,
|
|
68
68
|
saveTurnCheckpoint,
|
|
69
69
|
upsertConversationMessage
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-6YGFBU3A.js";
|
|
71
71
|
import {
|
|
72
72
|
normalizeSlackConversationId
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-QCGNHSMA.js";
|
|
74
74
|
import {
|
|
75
75
|
getConversationEventStore,
|
|
76
76
|
getConversationStore,
|
|
77
77
|
getDb
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-IUUQWIG2.js";
|
|
79
79
|
import {
|
|
80
80
|
juniorConversationParticipants,
|
|
81
81
|
juniorConversations,
|
|
82
82
|
juniorIdentities,
|
|
83
83
|
juniorUsers
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-QVH6FW3T.js";
|
|
85
85
|
import {
|
|
86
86
|
juniorDestinations
|
|
87
87
|
} from "./chunk-VFUK3X5B.js";
|
|
88
88
|
import {
|
|
89
89
|
getSlackBotToken
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-Q7O74WOO.js";
|
|
91
91
|
import {
|
|
92
92
|
canExposeConversationPayload
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-FIUCHYT6.js";
|
|
94
94
|
import {
|
|
95
95
|
credentialContextForActor
|
|
96
96
|
} from "./chunk-CEMMLV5L.js";
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
logWarn,
|
|
103
103
|
setTags,
|
|
104
104
|
withLogContext
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-QIMN3FXL.js";
|
|
106
106
|
|
|
107
107
|
// src/handlers/health.ts
|
|
108
108
|
function readHealthReport() {
|
|
@@ -863,9 +863,8 @@ function createApiTurnWorker(agentRunner, cancellation) {
|
|
|
863
863
|
actor,
|
|
864
864
|
credentialContext: credentialContextForActor(actor),
|
|
865
865
|
destination,
|
|
866
|
-
...storedConversation?.location ? { location: storedConversation.location } : void 0,
|
|
867
866
|
publishExternally: false,
|
|
868
|
-
source,
|
|
867
|
+
source: storedConversation?.location ? { ...source, location: storedConversation.location } : source,
|
|
869
868
|
surface: "api",
|
|
870
869
|
...cancellationSignal ? { signal: cancellationSignal } : void 0,
|
|
871
870
|
...webActor ? {
|
|
@@ -878,7 +877,7 @@ function createApiTurnWorker(agentRunner, cancellation) {
|
|
|
878
877
|
pendingAuth: conversation.processing.pendingAuth,
|
|
879
878
|
sandboxRef
|
|
880
879
|
},
|
|
881
|
-
delivery: deliverAssistantMessage,
|
|
880
|
+
delivery: { send: deliverAssistantMessage },
|
|
882
881
|
durability: {
|
|
883
882
|
onInputCommitted: acknowledge,
|
|
884
883
|
shouldYield: context.shouldYield,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IUUQWIG2.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZX7RSBQ6.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Q7O74WOO.js";
|
|
19
19
|
import {
|
|
20
20
|
parseStoredSlackActor
|
|
21
21
|
} from "./chunk-N7TMSOZH.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isRecord,
|
|
24
24
|
toOptionalNumber,
|
|
25
25
|
toOptionalString
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QIMN3FXL.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toCanonicalInputMessage,
|
|
8
8
|
toCanonicalOutputMessage,
|
|
9
9
|
toGenAiMessagesTraceAttributes
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FIUCHYT6.js";
|
|
11
11
|
import {
|
|
12
12
|
extractGenAiUsageAttributes,
|
|
13
13
|
logException,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
normalizeGenAiFinishReason,
|
|
16
16
|
serializeGenAiAttribute,
|
|
17
17
|
withSpan
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QIMN3FXL.js";
|
|
19
19
|
|
|
20
20
|
// src/chat/services/provider-error.ts
|
|
21
21
|
var ProviderError = class extends Error {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getConversationEventStore,
|
|
6
6
|
getDb,
|
|
7
7
|
getSqlExecutor
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IUUQWIG2.js";
|
|
9
9
|
import {
|
|
10
10
|
juniorCodeChanges,
|
|
11
11
|
juniorCodeRepositories,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
juniorUsers,
|
|
17
17
|
juniorWorkspaceRepos,
|
|
18
18
|
juniorWorkspaces
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QVH6FW3T.js";
|
|
20
20
|
import {
|
|
21
21
|
SANDBOX_WORKSPACE_ROOT,
|
|
22
22
|
getVercelSandboxCredentials,
|
|
@@ -24,16 +24,16 @@ import {
|
|
|
24
24
|
isSandboxMissingError,
|
|
25
25
|
runNonInteractiveCommand,
|
|
26
26
|
sleep
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-X55FOVZO.js";
|
|
28
28
|
import {
|
|
29
29
|
getStateAdapter
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZX7RSBQ6.js";
|
|
31
31
|
import {
|
|
32
32
|
botConfig,
|
|
33
33
|
completeObject,
|
|
34
34
|
embedTexts,
|
|
35
35
|
getSlackBotToken
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-Q7O74WOO.js";
|
|
37
37
|
import {
|
|
38
38
|
defaultModelId
|
|
39
39
|
} from "./chunk-D4YV5TDV.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
setSpanAttributes,
|
|
53
53
|
setSpanStatus,
|
|
54
54
|
withSpan
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-QIMN3FXL.js";
|
|
56
56
|
|
|
57
57
|
// src/chat/plugins/agent-hooks.ts
|
|
58
58
|
import {
|
|
@@ -2,29 +2,29 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CIG6WI7Q.js";
|
|
6
6
|
import {
|
|
7
7
|
buildDeterministicTurnId,
|
|
8
8
|
clearPendingAuth,
|
|
9
9
|
markTurnClosed,
|
|
10
10
|
markTurnCompleted
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Z5SKZE5B.js";
|
|
12
12
|
import {
|
|
13
13
|
hydrateConversationMessages,
|
|
14
14
|
markConversationMessage
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6YGFBU3A.js";
|
|
16
16
|
import {
|
|
17
17
|
ProviderError,
|
|
18
18
|
findProviderError,
|
|
19
19
|
getProviderErrorAttributes,
|
|
20
20
|
getProviderErrorUserMessage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-Q7O74WOO.js";
|
|
22
22
|
import {
|
|
23
23
|
parseSlackMessageTs
|
|
24
24
|
} from "./chunk-N7TMSOZH.js";
|
|
25
25
|
import {
|
|
26
26
|
buildTurnFailureResponse
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QIMN3FXL.js";
|
|
28
28
|
|
|
29
29
|
// src/chat/runtime/delivered-turn-state.ts
|
|
30
30
|
function buildDeliveredTurnStatePatch(args) {
|