@sentry/junior 0.168.0 → 0.170.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-D7JHU7WE.js → agent-hooks-IPUNCZPZ.js} +10 -10
- package/dist/api.js +27 -27
- package/dist/app.js +34 -34
- package/dist/catalog-runtime-E6XHWRPG.js +16 -0
- package/dist/chat/conversations/sql/store.d.ts +7 -0
- package/dist/chat/conversations/store.d.ts +14 -0
- package/dist/chat/slack/channel.d.ts +0 -13
- package/dist/chat/slack/ids.d.ts +7 -1
- package/dist/chat/slack/tool-support/channel-target.d.ts +6 -5
- package/dist/chat/workspaces/tools.d.ts +1 -1
- package/dist/{chunk-I654GTNX.js → chunk-2XI6OLXA.js} +11 -11
- package/dist/{chunk-SA6HSGDQ.js → chunk-3SFZJVX5.js} +2 -2
- package/dist/{chunk-JYZA27WZ.js → chunk-47GJ7QRO.js} +1 -1
- package/dist/{chunk-GFAFJWSD.js → chunk-4PSUCN4P.js} +2 -2
- package/dist/{chunk-36ANNINB.js → chunk-5EPG7PYS.js} +1 -1
- package/dist/{chunk-2AZWPCBL.js → chunk-6E4WQV75.js} +1 -1
- package/dist/{chunk-CHYKJIKV.js → chunk-6GOKKLWF.js} +7 -7
- package/dist/{chunk-JW5SNARN.js → chunk-6W2UIZSA.js} +1 -1
- package/dist/{chunk-7MA4HV4W.js → chunk-6ZWRNC4D.js} +1 -1
- package/dist/{chunk-HFCY2MP6.js → chunk-74XMBKRI.js} +1 -1
- package/dist/{chunk-IC2R5ZYK.js → chunk-7TVGQZOH.js} +5 -5
- package/dist/{chunk-7JMIQWSP.js → chunk-A22DGDXT.js} +2 -2
- package/dist/{chunk-2IMUHQWT.js → chunk-B53NR3XY.js} +4 -4
- package/dist/{chunk-24LYO2C5.js → chunk-BW644E3V.js} +1 -1
- package/dist/{chunk-FEJNF6FM.js → chunk-CA6JIB7S.js} +226 -97
- package/dist/{chunk-BDUENQD3.js → chunk-CGA4ERJ5.js} +1 -1
- package/dist/{chunk-RQTHGAPN.js → chunk-E7HKIHI5.js} +2 -2
- package/dist/{chunk-KXC3RX7T.js → chunk-F3I6YFB4.js} +6 -6
- package/dist/{chunk-PGEWSREG.js → chunk-F4UM52UH.js} +1 -1
- package/dist/{chunk-B547UCF7.js → chunk-FKOLWEMX.js} +7 -7
- package/dist/{chunk-YPLOMUS4.js → chunk-HZALSYOW.js} +5 -5
- package/dist/{chunk-WE6OK3UZ.js → chunk-IF3OK4XO.js} +6 -6
- package/dist/{chunk-ME26L5R4.js → chunk-IJTFG6AK.js} +5 -5
- package/dist/{chunk-6MG6K3YZ.js → chunk-IX7VHMIJ.js} +32 -4
- package/dist/{chunk-AE7IUAXH.js → chunk-KQCHIOME.js} +7 -7
- package/dist/{chunk-V7YE4WCP.js → chunk-M63DETLL.js} +7 -4
- package/dist/{chunk-KX2QWO3Z.js → chunk-NESGW5HV.js} +1 -1
- package/dist/{chunk-AGVNNQCS.js → chunk-NFERKIUX.js} +4 -4
- package/dist/{chunk-O6KWHWGM.js → chunk-NGL4XFT2.js} +1 -1
- package/dist/{chunk-76TU3ROD.js → chunk-T4SEUU7A.js} +1 -1
- package/dist/{chunk-DL4L7BBJ.js → chunk-TX553KXA.js} +5 -5
- package/dist/{chunk-T5RDAC5O.js → chunk-UD4BNNM2.js} +1 -1
- package/dist/{chunk-7GXMR4MF.js → chunk-UHW5RAIB.js} +13 -13
- package/dist/{chunk-H4RVQPJF.js → chunk-YWX7D7BJ.js} +18 -18
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +8 -8
- package/dist/cli/plugins.js +14 -14
- package/dist/cli/snapshot-create.js +11 -11
- package/dist/cli/upgrade.js +9 -9
- package/dist/{db-J2DG77RS.js → db-WMSEGSFM.js} +8 -8
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-AZSRYN3C.js → oauth-callback-server-GBS47NTO.js} +24 -24
- package/dist/{runner-U2WWTGBB.js → runner-V2A2Z7K3.js} +14 -14
- package/dist/{sandbox-egress-signals-U3ZX7C5W.js → sandbox-egress-signals-DXOOBSBI.js} +3 -3
- package/dist/{skills-VO5YJ2VN.js → skills-Z35YXLUG.js} +8 -8
- package/dist/spawn-AKPJBUS2.js +37 -0
- package/dist/{validation-ZNI5KAOD.js → validation-EQCK4DA5.js} +8 -8
- package/dist/version.js +1 -1
- package/dist/{work-F3T7M2KC.js → work-XIANCABO.js} +20 -20
- package/dist/worker-YALLEN2Z.js +24 -0
- package/package.json +4 -4
- package/dist/catalog-runtime-LXATMEQ6.js +0 -16
- package/dist/spawn-KOVJQOQA.js +0 -37
- package/dist/worker-B3NU3RWC.js +0 -24
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NGL4XFT2.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-5EPG7PYS.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/services/provider-error.ts
|
|
17
17
|
var ProviderError = class extends Error {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getConversationEventStore,
|
|
3
3
|
getDb,
|
|
4
4
|
getSqlExecutor
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IX7VHMIJ.js";
|
|
6
6
|
import {
|
|
7
7
|
juniorConversationAnnotations,
|
|
8
8
|
juniorConversationEvents,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
juniorUsers,
|
|
11
11
|
juniorWorkspaceRepos,
|
|
12
12
|
juniorWorkspaces
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6W2UIZSA.js";
|
|
14
14
|
import {
|
|
15
15
|
SANDBOX_WORKSPACE_ROOT,
|
|
16
16
|
runNonInteractiveCommand,
|
|
@@ -18,21 +18,21 @@ import {
|
|
|
18
18
|
} from "./chunk-BVREIWBD.js";
|
|
19
19
|
import {
|
|
20
20
|
getStateAdapter
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-74XMBKRI.js";
|
|
22
22
|
import {
|
|
23
23
|
botConfig,
|
|
24
24
|
completeObject,
|
|
25
25
|
embedTexts,
|
|
26
26
|
getSlackBotToken,
|
|
27
27
|
standardModelId
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-E7HKIHI5.js";
|
|
29
29
|
import {
|
|
30
30
|
isActorUserId,
|
|
31
31
|
parseActorUserId,
|
|
32
32
|
parseSlackChannelReferenceId,
|
|
33
33
|
parseSlackMessageTs,
|
|
34
34
|
parseSlackTeamId
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-M63DETLL.js";
|
|
36
36
|
import {
|
|
37
37
|
logException,
|
|
38
38
|
logInfo,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
setSpanAttributes,
|
|
42
42
|
setSpanStatus,
|
|
43
43
|
withSpan
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-5EPG7PYS.js";
|
|
45
45
|
|
|
46
46
|
// src/chat/plugins/agent-hooks.ts
|
|
47
47
|
import {
|
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
formatProviderLabel,
|
|
6
6
|
startOAuthFlow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6GOKKLWF.js";
|
|
8
8
|
import {
|
|
9
9
|
parseSandboxEgressAuthRequiredSignal
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6ZWRNC4D.js";
|
|
11
11
|
import {
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink,
|
|
14
14
|
recordAuthorizationRequested
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HZALSYOW.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6W2UIZSA.js";
|
|
19
19
|
import {
|
|
20
20
|
TURN_REASONING_LEVELS
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-E7HKIHI5.js";
|
|
22
22
|
import {
|
|
23
23
|
pluginCatalogRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6E4WQV75.js";
|
|
25
25
|
import {
|
|
26
26
|
credentialContextSchema
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CGA4ERJ5.js";
|
|
28
28
|
|
|
29
29
|
// src/chat/services/auth-pause.ts
|
|
30
30
|
var AuthorizationPauseError = class extends Error {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
instructionProvenanceFor,
|
|
14
14
|
sanitizePostgresJson,
|
|
15
15
|
withConversationEventLock
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-IX7VHMIJ.js";
|
|
17
17
|
import {
|
|
18
18
|
SANDBOX_REPOS_ROOT,
|
|
19
19
|
SANDBOX_WORKSPACE_ROOT,
|
|
@@ -24,24 +24,24 @@ import {
|
|
|
24
24
|
fenceLock,
|
|
25
25
|
getStateAdapter,
|
|
26
26
|
withLock
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-74XMBKRI.js";
|
|
28
28
|
import {
|
|
29
29
|
botConfig,
|
|
30
30
|
completeText,
|
|
31
31
|
escapeXml,
|
|
32
32
|
resolveGatewayModel,
|
|
33
33
|
unwrapCurrentInstruction
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-E7HKIHI5.js";
|
|
35
35
|
import {
|
|
36
36
|
parseSlackMessageTs,
|
|
37
37
|
toStoredSlackActor
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-M63DETLL.js";
|
|
39
39
|
import {
|
|
40
40
|
getActiveTraceId,
|
|
41
41
|
logException,
|
|
42
42
|
logWarn,
|
|
43
43
|
setSpanAttributes
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-5EPG7PYS.js";
|
|
45
45
|
|
|
46
46
|
// src/chat/turn-context-tag.ts
|
|
47
47
|
var TURN_CONTEXT_TAG = "runtime-turn-context";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appendAndEnqueueInboundMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7TVGQZOH.js";
|
|
4
4
|
import {
|
|
5
5
|
ConversationTurnLifecycleService,
|
|
6
6
|
getPersistedSandboxState,
|
|
7
7
|
getPersistedThreadState,
|
|
8
8
|
persistThreadStateById
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TX553KXA.js";
|
|
10
10
|
import {
|
|
11
11
|
AgentInvocationBusyError,
|
|
12
12
|
AgentInvocationLimitError,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
agentBindingSchema,
|
|
16
16
|
agentInvocationSchema,
|
|
17
17
|
createAgentInvocationSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FKOLWEMX.js";
|
|
19
19
|
import {
|
|
20
20
|
TurnInputCommitLostError,
|
|
21
21
|
failTurnRecord,
|
|
@@ -26,16 +26,16 @@ import {
|
|
|
26
26
|
isTurnInputCommitLostError,
|
|
27
27
|
openConversationProjection,
|
|
28
28
|
saveTurnCheckpoint
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-HZALSYOW.js";
|
|
30
30
|
import {
|
|
31
31
|
getConversationEventStore,
|
|
32
32
|
getConversationStore,
|
|
33
33
|
getSqlExecutor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-IX7VHMIJ.js";
|
|
35
35
|
import {
|
|
36
36
|
juniorAgentBindings,
|
|
37
37
|
juniorAgentInvocations
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6W2UIZSA.js";
|
|
39
39
|
|
|
40
40
|
// src/chat/agent-invocations/work.ts
|
|
41
41
|
import { z } from "zod";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolInputError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HZALSYOW.js";
|
|
4
4
|
import {
|
|
5
5
|
canRouteResourceEvents,
|
|
6
6
|
getPlugins
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F3I6YFB4.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IX7VHMIJ.js";
|
|
11
11
|
import {
|
|
12
12
|
juniorAttachments,
|
|
13
13
|
juniorConversations,
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
juniorSchedulerRuns,
|
|
16
16
|
juniorSchedulerTasks,
|
|
17
17
|
juniorStats
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6W2UIZSA.js";
|
|
19
19
|
import {
|
|
20
20
|
juniorDestinations
|
|
21
21
|
} from "./chunk-VFUK3X5B.js";
|
|
22
22
|
import {
|
|
23
23
|
logInfo
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5EPG7PYS.js";
|
|
25
25
|
|
|
26
26
|
// src/chat/sandbox/snapshot/runtime.ts
|
|
27
27
|
var SANDBOX_RUNTIME = "node22";
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
juniorConversations,
|
|
8
8
|
juniorIdentities,
|
|
9
9
|
juniorUsers
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6W2UIZSA.js";
|
|
11
11
|
import {
|
|
12
12
|
TURN_REASONING_LEVELS,
|
|
13
13
|
getChatConfig,
|
|
14
14
|
modelProfileSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-E7HKIHI5.js";
|
|
16
16
|
import {
|
|
17
17
|
juniorDestinations
|
|
18
18
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
parseActorUserId,
|
|
21
21
|
parseSlackChannelReferenceId,
|
|
22
22
|
parseSlackTeamId
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-M63DETLL.js";
|
|
24
24
|
import {
|
|
25
25
|
normalizeIdentityEmail
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5EPG7PYS.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/conversations/sql/store.ts
|
|
29
29
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -858,6 +858,34 @@ var SqlStore = class {
|
|
|
858
858
|
}
|
|
859
859
|
return void 0;
|
|
860
860
|
}
|
|
861
|
+
async findSlackDestinationByName(args) {
|
|
862
|
+
const normalized = args.channelName.trim().replace(/^#/, "").toLowerCase();
|
|
863
|
+
if (!normalized) {
|
|
864
|
+
return void 0;
|
|
865
|
+
}
|
|
866
|
+
const rows = await this.executor.db().select({
|
|
867
|
+
channelId: juniorDestinations.providerDestinationId,
|
|
868
|
+
channelName: juniorDestinations.displayName
|
|
869
|
+
}).from(juniorDestinations).where(
|
|
870
|
+
and4(
|
|
871
|
+
eq4(juniorDestinations.provider, "slack"),
|
|
872
|
+
eq4(juniorDestinations.providerTenantId, tenantId2(args.teamId)),
|
|
873
|
+
eq4(juniorDestinations.kind, "channel"),
|
|
874
|
+
sql3`lower(ltrim(${juniorDestinations.displayName}, '#')) = ${normalized}`
|
|
875
|
+
)
|
|
876
|
+
).limit(2);
|
|
877
|
+
if (rows.length !== 1) {
|
|
878
|
+
return void 0;
|
|
879
|
+
}
|
|
880
|
+
const row = rows[0];
|
|
881
|
+
if (!row?.channelId) {
|
|
882
|
+
return void 0;
|
|
883
|
+
}
|
|
884
|
+
return {
|
|
885
|
+
channelId: row.channelId,
|
|
886
|
+
...row.channelName ? { channelName: row.channelName } : {}
|
|
887
|
+
};
|
|
888
|
+
}
|
|
861
889
|
/** Serialize all durable mutations for one conversation inside a SQL transaction. */
|
|
862
890
|
async withConversationMutation(conversationId, callback) {
|
|
863
891
|
return await withConversationMutationLock(
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-RF6J3DIO.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6GOKKLWF.js";
|
|
7
7
|
import {
|
|
8
8
|
isExperimentalFeatureEnabled
|
|
9
9
|
} from "./chunk-VRS6WDK5.js";
|
|
@@ -12,27 +12,27 @@ import {
|
|
|
12
12
|
getPlugins,
|
|
13
13
|
getSlackClient,
|
|
14
14
|
withSlackRetries
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-F3I6YFB4.js";
|
|
16
16
|
import {
|
|
17
17
|
getDb,
|
|
18
18
|
parseDestination
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IX7VHMIJ.js";
|
|
20
20
|
import {
|
|
21
21
|
sleep
|
|
22
22
|
} from "./chunk-BVREIWBD.js";
|
|
23
23
|
import {
|
|
24
24
|
acquireActiveLock,
|
|
25
25
|
getStateAdapter
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-74XMBKRI.js";
|
|
27
27
|
import {
|
|
28
28
|
pluginCatalogRuntime
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-6E4WQV75.js";
|
|
30
30
|
import {
|
|
31
31
|
fetchWithBoundedOAuthErrorBodies
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-A22DGDXT.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-5EPG7PYS.js";
|
|
36
36
|
|
|
37
37
|
// src/chat/capabilities/router.ts
|
|
38
38
|
var ProviderCredentialRouter = class {
|
|
@@ -11,6 +11,7 @@ import { z as z2 } from "zod";
|
|
|
11
11
|
var slackChannelIdSchema = z2.string().regex(/^[CDG][A-Z0-9]+$/).brand();
|
|
12
12
|
var slackTeamIdSchema = z2.string().regex(/^T[A-Z0-9]+$/).brand();
|
|
13
13
|
var slackUserIdSchema = z2.string().regex(/^[UW][A-Z0-9]+$/).brand();
|
|
14
|
+
var SLACK_CHANNEL_MENTION_RE = /^<#([CDG][A-Z0-9]+)(?:\|[^>]*)?>$/;
|
|
14
15
|
function slackChannelReferenceCandidate(value) {
|
|
15
16
|
const trimmed = value.trim();
|
|
16
17
|
if (!trimmed.startsWith("slack:")) {
|
|
@@ -32,10 +33,12 @@ function parseSlackChannelId(value) {
|
|
|
32
33
|
}
|
|
33
34
|
function parseSlackChannelReferenceId(value) {
|
|
34
35
|
if (typeof value !== "string") return void 0;
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
)
|
|
38
|
-
|
|
36
|
+
const trimmed = value.trim();
|
|
37
|
+
const mentionMatch = SLACK_CHANNEL_MENTION_RE.exec(trimmed);
|
|
38
|
+
if (mentionMatch?.[1]) {
|
|
39
|
+
return parseSlackChannelId(mentionMatch[1]);
|
|
40
|
+
}
|
|
41
|
+
return parseSlackChannelId(slackChannelReferenceCandidate(trimmed));
|
|
39
42
|
}
|
|
40
43
|
function parseSlackTeamId(value) {
|
|
41
44
|
if (typeof value !== "string") return void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTurnRequestDeadline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-T4SEUU7A.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-7TVGQZOH.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-E7HKIHI5.js";
|
|
32
32
|
import {
|
|
33
33
|
logException,
|
|
34
34
|
logInfo,
|
|
35
35
|
logWarn,
|
|
36
36
|
withLogContext
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-5EPG7PYS.js";
|
|
38
38
|
|
|
39
39
|
// src/chat/task-execution/worker.ts
|
|
40
40
|
var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HZALSYOW.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-IX7VHMIJ.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6W2UIZSA.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-74XMBKRI.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-5EPG7PYS.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/conversations/turn-lifecycle.ts
|
|
26
26
|
var ConversationTurnLifecycleService = class {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWebAuthorization,
|
|
3
3
|
deleteWebAuthorization
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NESGW5HV.js";
|
|
5
5
|
import {
|
|
6
6
|
appendAndEnqueueInboundMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7TVGQZOH.js";
|
|
8
8
|
import {
|
|
9
9
|
buildDeliveredTurnStatePatch,
|
|
10
10
|
completeAuthPauseTurn,
|
|
@@ -12,20 +12,20 @@ import {
|
|
|
12
12
|
getTurnUserMessage,
|
|
13
13
|
processPluginTask,
|
|
14
14
|
scheduleSessionCompletedPluginTasks
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2XI6OLXA.js";
|
|
16
16
|
import {
|
|
17
17
|
ConversationTurnLifecycleService,
|
|
18
18
|
coerceThreadConversationState,
|
|
19
19
|
getPersistedSandboxState,
|
|
20
20
|
getPersistedThreadState,
|
|
21
21
|
persistThreadStateById
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-TX553KXA.js";
|
|
23
23
|
import {
|
|
24
24
|
healthReportSchema
|
|
25
25
|
} from "./chunk-UTL3MHPC.js";
|
|
26
26
|
import {
|
|
27
27
|
parseSlackThreadId
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-4PSUCN4P.js";
|
|
29
29
|
import {
|
|
30
30
|
TurnInputCommitLostError,
|
|
31
31
|
abandonTurnRecord,
|
|
@@ -49,40 +49,40 @@ import {
|
|
|
49
49
|
saveTurnCheckpoint,
|
|
50
50
|
startActiveTurn,
|
|
51
51
|
upsertConversationMessage
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-HZALSYOW.js";
|
|
53
53
|
import {
|
|
54
54
|
normalizeSlackConversationId
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-F3I6YFB4.js";
|
|
56
56
|
import {
|
|
57
57
|
getConversationEventStore,
|
|
58
58
|
getConversationStore,
|
|
59
59
|
getDb
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-IX7VHMIJ.js";
|
|
61
61
|
import {
|
|
62
62
|
juniorApiTokens,
|
|
63
63
|
juniorConversationParticipants,
|
|
64
64
|
juniorConversations,
|
|
65
65
|
juniorIdentities,
|
|
66
66
|
juniorUsers
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-6W2UIZSA.js";
|
|
68
68
|
import {
|
|
69
69
|
getSlackBotToken
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-E7HKIHI5.js";
|
|
71
71
|
import {
|
|
72
72
|
juniorDestinations
|
|
73
73
|
} from "./chunk-VFUK3X5B.js";
|
|
74
74
|
import {
|
|
75
75
|
canExposeConversationPayload
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-NGL4XFT2.js";
|
|
77
77
|
import {
|
|
78
78
|
credentialContextForActor
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-CGA4ERJ5.js";
|
|
80
80
|
import {
|
|
81
81
|
logException,
|
|
82
82
|
logWarn,
|
|
83
83
|
setTags,
|
|
84
84
|
withLogContext
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-5EPG7PYS.js";
|
|
86
86
|
|
|
87
87
|
// src/handlers/health.ts
|
|
88
88
|
function readHealthReport() {
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
} from "./chunk-FA6POGLH.js";
|
|
4
4
|
import {
|
|
5
5
|
getTurnRequestDeadline
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T4SEUU7A.js";
|
|
7
7
|
import {
|
|
8
8
|
buildSentryConversationUrl,
|
|
9
9
|
deleteWebAuthorization
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NESGW5HV.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureConversationWake,
|
|
13
13
|
requestConversationWork
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7TVGQZOH.js";
|
|
15
15
|
import {
|
|
16
16
|
buildDeliveredTurnStatePatch,
|
|
17
17
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
requireTurnFailureEventId,
|
|
25
25
|
resolveTurnSessionRouting,
|
|
26
26
|
scheduleSessionCompletedPluginTasks
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-2XI6OLXA.js";
|
|
28
28
|
import {
|
|
29
29
|
ConversationTurnLifecycleService,
|
|
30
30
|
coerceThreadConversationState,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
getPersistedSandboxState,
|
|
34
34
|
getPersistedThreadState,
|
|
35
35
|
persistThreadStateById
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TX553KXA.js";
|
|
37
37
|
import {
|
|
38
38
|
getVercelConversationWorkQueue
|
|
39
39
|
} from "./chunk-WR76IVA5.js";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
lookupSlackUserProfile,
|
|
48
48
|
resolvePluginOAuthAccount,
|
|
49
49
|
runAgentWithTimeout
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-KQCHIOME.js";
|
|
51
51
|
import {
|
|
52
52
|
RetryableDeliveryError
|
|
53
53
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -63,13 +63,13 @@ import {
|
|
|
63
63
|
removeReactionFromMessage,
|
|
64
64
|
resolveBaseUrl,
|
|
65
65
|
truncateStatusText
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-6GOKKLWF.js";
|
|
67
67
|
import {
|
|
68
68
|
parseSlackThreadId,
|
|
69
69
|
readSlackRawMessageContext,
|
|
70
70
|
resolveSlackChannelIdFromMessage,
|
|
71
71
|
resolveSlackChannelIdFromThreadId
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-4PSUCN4P.js";
|
|
73
73
|
import {
|
|
74
74
|
CooperativeTurnYieldError,
|
|
75
75
|
TurnSliceLimitExceededError,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
recordTurnSummary,
|
|
97
97
|
saveTurnCheckpoint,
|
|
98
98
|
turnHasReply
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-HZALSYOW.js";
|
|
100
100
|
import {
|
|
101
101
|
SlackActionError,
|
|
102
102
|
getDashboardConversationLink,
|
|
@@ -105,18 +105,18 @@ import {
|
|
|
105
105
|
getSlackClient,
|
|
106
106
|
isDmChannel,
|
|
107
107
|
normalizeSlackConversationId
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-F3I6YFB4.js";
|
|
109
109
|
import {
|
|
110
110
|
getConversationEventStore,
|
|
111
111
|
getSqlExecutor,
|
|
112
112
|
requireSlackDestination,
|
|
113
113
|
upsertIdentity,
|
|
114
114
|
upsertLinkedIdentity
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-IX7VHMIJ.js";
|
|
116
116
|
import {
|
|
117
117
|
acquireActiveLock,
|
|
118
118
|
getStateAdapter
|
|
119
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-74XMBKRI.js";
|
|
120
120
|
import {
|
|
121
121
|
botConfig,
|
|
122
122
|
escapeXml,
|
|
@@ -124,24 +124,24 @@ import {
|
|
|
124
124
|
getRuntimeMetadata,
|
|
125
125
|
normalizeSlackEmojiName,
|
|
126
126
|
standardModelId
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-E7HKIHI5.js";
|
|
128
128
|
import {
|
|
129
129
|
discoverSkills
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-3SFZJVX5.js";
|
|
131
131
|
import {
|
|
132
132
|
pluginCatalogRuntime
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-6E4WQV75.js";
|
|
134
134
|
import {
|
|
135
135
|
buildOAuthTokenRequest,
|
|
136
136
|
hasRequiredOAuthScope,
|
|
137
137
|
parseOAuthTokenResponse
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-A22DGDXT.js";
|
|
139
139
|
import {
|
|
140
140
|
createSlackResumeActor,
|
|
141
141
|
isUserActor,
|
|
142
142
|
parseSlackMessageTs,
|
|
143
143
|
parseSlackUserId
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-M63DETLL.js";
|
|
145
145
|
import {
|
|
146
146
|
buildTurnFailureResponse,
|
|
147
147
|
logException,
|
|
@@ -151,7 +151,7 @@ import {
|
|
|
151
151
|
setTags,
|
|
152
152
|
toOptionalString,
|
|
153
153
|
withLogContext
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-5EPG7PYS.js";
|
|
155
155
|
import {
|
|
156
156
|
homeDir
|
|
157
157
|
} from "./chunk-H4HBKISO.js";
|