@sentry/junior 0.180.0 → 0.181.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-DKDDRKZA.js → agent-hooks-IQUW6ERD.js} +11 -11
- package/dist/api/schema/workspace.d.ts +2 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +32 -31
- package/dist/app.js +34 -34
- package/dist/{catalog-runtime-WXKGUF3W.js → catalog-runtime-PMQWNIXA.js} +4 -4
- package/dist/chat/plugins/agent-hooks.d.ts +1 -1
- package/dist/chat/services/turn-session-routing.d.ts +1 -0
- package/dist/chat/tools/types.d.ts +2 -0
- package/dist/chat/workspaces/types.d.ts +2 -0
- package/dist/{chunk-LGVQLNLS.js → chunk-3KCQEG6W.js} +8 -8
- package/dist/{chunk-CK6EINVZ.js → chunk-3KSSALN4.js} +5 -5
- package/dist/{chunk-VG722ONZ.js → chunk-3X55QRAG.js} +6 -6
- package/dist/{chunk-2YIRH4E3.js → chunk-4IX32NSL.js} +1 -1
- package/dist/{chunk-TKB25A3L.js → chunk-CZYNWPWD.js} +2 -1
- package/dist/{chunk-DHLOGWYH.js → chunk-D6ZD7VXP.js} +19 -8
- package/dist/{chunk-KCL6AWYW.js → chunk-DSA6WTRP.js} +19 -19
- package/dist/{chunk-RAZG3YHC.js → chunk-EBMRB6Z6.js} +1 -1
- package/dist/{chunk-VGPPWWHF.js → chunk-EM7EECT5.js} +2 -2
- package/dist/{chunk-6YCEWOLO.js → chunk-ETJTXYHY.js} +1 -1
- package/dist/{chunk-MXEUIGHO.js → chunk-EU7KJDOG.js} +1 -1
- package/dist/{chunk-5TUR4M3M.js → chunk-FWILPBVQ.js} +5 -5
- package/dist/{chunk-ZE2KOV3G.js → chunk-GPA3ZSYY.js} +1 -1
- package/dist/{chunk-SDBKZ5LV.js → chunk-GREV5PJK.js} +4 -4
- package/dist/{chunk-3ILJBWP7.js → chunk-GWFRPQNP.js} +17 -12
- package/dist/{chunk-DRHEGXTZ.js → chunk-HEBMSITT.js} +1 -1
- package/dist/{chunk-GUKXEPMX.js → chunk-HJ27A6YB.js} +1 -1
- package/dist/{chunk-IANUX7HX.js → chunk-HZHUMCNV.js} +1 -1
- package/dist/{chunk-QSO7B5JO.js → chunk-IJ6SS4WB.js} +1 -1
- package/dist/{chunk-2AYEVN7K.js → chunk-IKKETMQC.js} +3 -3
- package/dist/{chunk-FGC3PHNH.js → chunk-KKSVCHDO.js} +8 -1
- package/dist/{chunk-WVAMRKYG.js → chunk-KMBU4PJP.js} +3 -3
- package/dist/{chunk-U5EUCUBH.js → chunk-KQZX24QQ.js} +3 -3
- package/dist/{chunk-TC5DE5KJ.js → chunk-LCNPXLE7.js} +7 -7
- package/dist/{chunk-O4QYZTDK.js → chunk-LG5MYY6U.js} +6 -6
- package/dist/{chunk-EWHP2IRG.js → chunk-LZOQFC5F.js} +5 -5
- package/dist/{chunk-GPXAHUQH.js → chunk-NQTA72Q3.js} +6 -6
- package/dist/{chunk-5PUMIMNQ.js → chunk-PBKZQAUA.js} +53 -33
- package/dist/{chunk-GA5NS74S.js → chunk-PL57B6NC.js} +1 -1
- package/dist/{chunk-CP73FKME.js → chunk-PPYDHUEL.js} +13 -13
- package/dist/{chunk-L7LTGN4Z.js → chunk-Q2KY27IX.js} +4 -4
- package/dist/{chunk-S7YRTOSQ.js → chunk-RNMASWLP.js} +3 -3
- package/dist/{chunk-CCDXTDSY.js → chunk-TDT2R77B.js} +1 -1
- package/dist/{chunk-ZM7ZURJS.js → chunk-TJHSAHQN.js} +1 -1
- package/dist/{chunk-I6IFTAPF.js → chunk-XYTJUHRZ.js} +2 -2
- 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/snapshots.d.ts +17 -0
- package/dist/db/schema.d.ts +17 -0
- package/dist/{db-6SBHIAJK.js → db-QNPVCQPT.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-WSDQPZZS.js → oauth-callback-server-KYMPJOTC.js} +25 -25
- package/dist/{runner-GWTSWESR.js → runner-3RS2D2ZR.js} +18 -18
- package/dist/{skills-F32BPFYW.js → skills-5B3Y6XX6.js} +5 -5
- package/dist/spawn-VYARS3DU.js +37 -0
- package/dist/task-runner-4IXKKZHL.js +32 -0
- package/dist/{validation-62WO524A.js → validation-Q65QD27B.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-3C3CMZ24.js → work-DCMQWAAP.js} +18 -18
- package/dist/worker-QL3CHLZL.js +22 -0
- package/migrations/0035_workspace_snapshot_size_bytes.sql +2 -0
- package/migrations/meta/0035_snapshot.json +3048 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
- package/dist/spawn-X5BPP5OE.js +0 -37
- package/dist/task-runner-2FPBV5PP.js +0 -32
- package/dist/worker-MFAI6ZEK.js +0 -22
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getConversationEventStore,
|
|
6
6
|
getDb,
|
|
7
7
|
getSqlExecutor
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RNMASWLP.js";
|
|
9
9
|
import {
|
|
10
10
|
juniorConversationAnnotations,
|
|
11
11
|
juniorConversationEvents,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
juniorUsers,
|
|
15
15
|
juniorWorkspaceRepos,
|
|
16
16
|
juniorWorkspaces
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KKSVCHDO.js";
|
|
18
18
|
import {
|
|
19
19
|
SANDBOX_WORKSPACE_ROOT,
|
|
20
20
|
getVercelSandboxCredentials,
|
|
@@ -22,17 +22,17 @@ import {
|
|
|
22
22
|
isSandboxMissingError,
|
|
23
23
|
runNonInteractiveCommand,
|
|
24
24
|
sleep
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KMBU4PJP.js";
|
|
26
26
|
import {
|
|
27
27
|
getStateAdapter
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-PL57B6NC.js";
|
|
29
29
|
import {
|
|
30
30
|
botConfig,
|
|
31
31
|
completeObject,
|
|
32
32
|
defaultModelId,
|
|
33
33
|
embedTexts,
|
|
34
34
|
getSlackBotToken
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
36
36
|
import {
|
|
37
37
|
isActorUserId,
|
|
38
38
|
parseActorUserId,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
setSpanAttributes,
|
|
49
49
|
setSpanStatus,
|
|
50
50
|
withSpan
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
52
52
|
|
|
53
53
|
// src/chat/plugins/agent-hooks.ts
|
|
54
54
|
import {
|
|
@@ -1733,6 +1733,7 @@ function snapshotFromRow(row) {
|
|
|
1733
1733
|
id: row.snapshotId,
|
|
1734
1734
|
generatedAt: row.generatedAt,
|
|
1735
1735
|
buildDurationMs: row.buildDurationMs,
|
|
1736
|
+
sizeBytes: row.sizeBytes,
|
|
1736
1737
|
profileHash: row.profileHash
|
|
1737
1738
|
};
|
|
1738
1739
|
}
|
|
@@ -1799,6 +1800,7 @@ async function setWorkspaceSnapshot(workspaceId, snapshot, options) {
|
|
|
1799
1800
|
status: "ready",
|
|
1800
1801
|
snapshotId: snapshot.id,
|
|
1801
1802
|
buildDurationMs: snapshot.buildDurationMs,
|
|
1803
|
+
sizeBytes: snapshot.sizeBytes,
|
|
1802
1804
|
generatedAt: snapshot.generatedAt,
|
|
1803
1805
|
buildStartedAt: null,
|
|
1804
1806
|
buildPhase: null,
|
|
@@ -1877,6 +1879,7 @@ async function setWorkspaceSnapshotBuild(workspaceId, build, options = {}) {
|
|
|
1877
1879
|
status: build.status,
|
|
1878
1880
|
snapshotId: null,
|
|
1879
1881
|
buildDurationMs: null,
|
|
1882
|
+
sizeBytes: null,
|
|
1880
1883
|
generatedAt: null,
|
|
1881
1884
|
buildStartedAt: build.startedAt,
|
|
1882
1885
|
buildPhase: build.phase,
|
|
@@ -2221,7 +2224,10 @@ function systemPromptPluginContext(plugin) {
|
|
|
2221
2224
|
};
|
|
2222
2225
|
}
|
|
2223
2226
|
function pluginInvocationContext(context) {
|
|
2224
|
-
const common = {
|
|
2227
|
+
const common = {
|
|
2228
|
+
conversationId: context.conversationId,
|
|
2229
|
+
locationId: context.locationId
|
|
2230
|
+
};
|
|
2225
2231
|
switch (context.source.platform) {
|
|
2226
2232
|
case "slack": {
|
|
2227
2233
|
if (context.destination.platform !== "slack") {
|
|
@@ -2259,6 +2265,7 @@ function invocationPluginContext(plugin, context, turnId) {
|
|
|
2259
2265
|
const common = {
|
|
2260
2266
|
...base,
|
|
2261
2267
|
conversationId: context.conversationId,
|
|
2268
|
+
locationId: context.locationId,
|
|
2262
2269
|
embedder: createPluginEmbedder(plugin.manifest.name),
|
|
2263
2270
|
...context.conversationId && turnId ? {
|
|
2264
2271
|
events: createPluginConversationEvents({
|
|
@@ -2271,7 +2278,10 @@ function invocationPluginContext(plugin, context, turnId) {
|
|
|
2271
2278
|
model: createPluginModel(plugin.manifest.name, plugin.model),
|
|
2272
2279
|
source: context.source,
|
|
2273
2280
|
text: context.userText ?? "",
|
|
2274
|
-
state: createPluginState(plugin.manifest.name)
|
|
2281
|
+
state: createPluginState(plugin.manifest.name),
|
|
2282
|
+
users: {
|
|
2283
|
+
resolveActor: context.resolveActorIdentity ?? (async () => void 0)
|
|
2284
|
+
}
|
|
2275
2285
|
};
|
|
2276
2286
|
return {
|
|
2277
2287
|
...common,
|
|
@@ -2621,6 +2631,7 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
2621
2631
|
...basePluginContext(plugin),
|
|
2622
2632
|
...annotations ? { annotations } : void 0,
|
|
2623
2633
|
conversationId: context.conversationId,
|
|
2634
|
+
locationId: context.locationId,
|
|
2624
2635
|
userText: context.userText,
|
|
2625
2636
|
embedder: createPluginEmbedder(pluginName),
|
|
2626
2637
|
egress: context.egress,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
buildSentryConversationUrl,
|
|
6
6
|
deleteWebAuthorization
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EU7KJDOG.js";
|
|
8
8
|
import {
|
|
9
9
|
buildDeliveredTurnStatePatch,
|
|
10
10
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
getTurnUserSlackMessageTs,
|
|
16
16
|
persistAuthPauseTurnState,
|
|
17
17
|
requireTurnFailureEventId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LZOQFC5F.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveTurnSessionRouting,
|
|
21
21
|
scheduleSessionCompletedPluginTasks
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GWFRPQNP.js";
|
|
23
23
|
import {
|
|
24
24
|
ConversationTurnLifecycleService
|
|
25
25
|
} from "./chunk-M3QYTBQ6.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getPersistedSandboxState,
|
|
31
31
|
getPersistedThreadState,
|
|
32
32
|
persistThreadStateById
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-FWILPBVQ.js";
|
|
34
34
|
import {
|
|
35
35
|
createUserTokenStore,
|
|
36
36
|
deleteMcpAuthSession,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
lookupSlackUserProfile,
|
|
42
42
|
resolvePluginOAuthAccount,
|
|
43
43
|
runAgentWithTimeout
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-3KCQEG6W.js";
|
|
45
45
|
import {
|
|
46
46
|
RetryableDeliveryError
|
|
47
47
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -57,17 +57,17 @@ import {
|
|
|
57
57
|
removeReactionFromMessage,
|
|
58
58
|
resolveBaseUrl,
|
|
59
59
|
truncateStatusText
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-LG5MYY6U.js";
|
|
61
61
|
import {
|
|
62
62
|
parseSlackThreadId,
|
|
63
63
|
readSlackRawMessageContext,
|
|
64
64
|
resolveSlackChannelIdFromMessage,
|
|
65
65
|
resolveSlackChannelIdFromThreadId
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-TDT2R77B.js";
|
|
67
67
|
import {
|
|
68
68
|
ensureConversationWake,
|
|
69
69
|
requestConversationWork
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-Q2KY27IX.js";
|
|
71
71
|
import {
|
|
72
72
|
CooperativeTurnYieldError,
|
|
73
73
|
clearPendingAuth,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
isCooperativeTurnYieldError,
|
|
77
77
|
isPendingAuthLatestRequest,
|
|
78
78
|
markTurnFailed
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-HJ27A6YB.js";
|
|
80
80
|
import {
|
|
81
81
|
TurnSliceLimitExceededError,
|
|
82
82
|
abandonTurnRecord,
|
|
@@ -96,13 +96,13 @@ import {
|
|
|
96
96
|
recordTurnSummary,
|
|
97
97
|
saveTurnCheckpoint,
|
|
98
98
|
turnHasReply
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-NQTA72Q3.js";
|
|
100
100
|
import {
|
|
101
101
|
getVercelConversationWorkQueue
|
|
102
102
|
} from "./chunk-DKIJ2RP5.js";
|
|
103
103
|
import {
|
|
104
104
|
getTurnRequestDeadline
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-GPA3ZSYY.js";
|
|
106
106
|
import {
|
|
107
107
|
SlackActionError,
|
|
108
108
|
getDashboardConversationLink,
|
|
@@ -111,18 +111,18 @@ import {
|
|
|
111
111
|
getSlackClient,
|
|
112
112
|
isDmChannel,
|
|
113
113
|
normalizeSlackConversationId
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-D6ZD7VXP.js";
|
|
115
115
|
import {
|
|
116
116
|
getConversationEventStore,
|
|
117
117
|
getSqlExecutor,
|
|
118
118
|
requireSlackDestination,
|
|
119
119
|
upsertIdentity,
|
|
120
120
|
upsertLinkedIdentity
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-RNMASWLP.js";
|
|
122
122
|
import {
|
|
123
123
|
acquireActiveLock,
|
|
124
124
|
getStateAdapter
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-PL57B6NC.js";
|
|
126
126
|
import {
|
|
127
127
|
botConfig,
|
|
128
128
|
defaultModelId,
|
|
@@ -130,18 +130,18 @@ import {
|
|
|
130
130
|
getChatConfig,
|
|
131
131
|
getRuntimeMetadata,
|
|
132
132
|
normalizeSlackEmojiName
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
134
134
|
import {
|
|
135
135
|
discoverSkills
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-EM7EECT5.js";
|
|
137
137
|
import {
|
|
138
138
|
pluginCatalogRuntime
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-HEBMSITT.js";
|
|
140
140
|
import {
|
|
141
141
|
buildOAuthTokenRequest,
|
|
142
142
|
hasRequiredOAuthScope,
|
|
143
143
|
parseOAuthTokenResponse
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-4IX32NSL.js";
|
|
145
145
|
import {
|
|
146
146
|
createSlackResumeActor,
|
|
147
147
|
isUserActor,
|
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
setTags,
|
|
161
161
|
toOptionalString,
|
|
162
162
|
withLogContext
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
164
164
|
|
|
165
165
|
// src/chat/slack/assistant-thread/status-render.ts
|
|
166
166
|
var DEFAULT_STATUS_CONTEXTS = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HEBMSITT.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-EBMRB6Z6.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/skills.ts
|
|
12
12
|
import fs from "fs/promises";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NQTA72Q3.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-RNMASWLP.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KKSVCHDO.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PL57B6NC.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-EBMRB6Z6.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/state/conversation.ts
|
|
26
26
|
function defaultConversationState() {
|
|
@@ -19,23 +19,23 @@ import {
|
|
|
19
19
|
releaseConversationWork,
|
|
20
20
|
requestAnotherSlice,
|
|
21
21
|
startConversationWork
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Q2KY27IX.js";
|
|
23
23
|
import {
|
|
24
24
|
ConversationQueueMessageRejectedError
|
|
25
25
|
} from "./chunk-JAL3CH4G.js";
|
|
26
26
|
import {
|
|
27
27
|
getTurnRequestDeadline
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GPA3ZSYY.js";
|
|
29
29
|
import {
|
|
30
30
|
getChatConfig,
|
|
31
31
|
isProviderRetryError
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
33
33
|
import {
|
|
34
34
|
logException,
|
|
35
35
|
logInfo,
|
|
36
36
|
logWarn,
|
|
37
37
|
withLogContext
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
39
39
|
|
|
40
40
|
// src/chat/task-execution/worker.ts
|
|
41
41
|
var CONVERSATION_WORK_DEFER_DELAY_MS = 15e3;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FWILPBVQ.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginTaskId,
|
|
7
7
|
pluginTaskParamsSchema,
|
|
8
8
|
sendVercelPluginTask
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KQZX24QQ.js";
|
|
10
10
|
import {
|
|
11
11
|
getPiMessageRole,
|
|
12
12
|
getTurnRecord,
|
|
@@ -16,15 +16,16 @@ import {
|
|
|
16
16
|
isToolResultMessage,
|
|
17
17
|
normalizeToolNameFromResult,
|
|
18
18
|
stripRuntimeTurnContext
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NQTA72Q3.js";
|
|
20
20
|
import {
|
|
21
21
|
createPluginConversationEvents,
|
|
22
22
|
createPluginEmbedder,
|
|
23
23
|
createPluginLogger,
|
|
24
24
|
createPluginModel,
|
|
25
25
|
createPluginState,
|
|
26
|
-
getPlugins
|
|
27
|
-
|
|
26
|
+
getPlugins,
|
|
27
|
+
readActorIdentity
|
|
28
|
+
} from "./chunk-D6ZD7VXP.js";
|
|
28
29
|
import {
|
|
29
30
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
30
31
|
} from "./chunk-3Y47VMHV.js";
|
|
@@ -32,14 +33,14 @@ import {
|
|
|
32
33
|
getConversationStore,
|
|
33
34
|
getDb,
|
|
34
35
|
sameActorIdentity
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RNMASWLP.js";
|
|
36
37
|
import {
|
|
37
38
|
juniorConversations,
|
|
38
39
|
juniorTaskExecutions
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-KKSVCHDO.js";
|
|
40
41
|
import {
|
|
41
42
|
getStateAdapter
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-PL57B6NC.js";
|
|
43
44
|
import {
|
|
44
45
|
credentialSubjectSchema
|
|
45
46
|
} from "./chunk-CEMMLV5L.js";
|
|
@@ -48,14 +49,14 @@ import {
|
|
|
48
49
|
} from "./chunk-N7TMSOZH.js";
|
|
49
50
|
import {
|
|
50
51
|
logWarn
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
52
53
|
|
|
53
54
|
// src/chat/plugins/task-runner.ts
|
|
54
55
|
import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
55
56
|
|
|
56
57
|
// src/chat/services/turn-session-routing.ts
|
|
57
58
|
async function resolveTurnSessionRouting(args) {
|
|
58
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
59
|
+
const conversationStore = args.conversationStore ?? (await import("./db-QNPVCQPT.js")).getConversationStore();
|
|
59
60
|
const conversation = await conversationStore.get({
|
|
60
61
|
conversationId: args.conversationId
|
|
61
62
|
});
|
|
@@ -66,6 +67,7 @@ async function resolveTurnSessionRouting(args) {
|
|
|
66
67
|
}
|
|
67
68
|
return {
|
|
68
69
|
destination: conversation.destination,
|
|
70
|
+
...conversation.location ? { locationId: conversation.location.id } : void 0,
|
|
69
71
|
source: conversation.sessionSource
|
|
70
72
|
};
|
|
71
73
|
}
|
|
@@ -887,6 +889,7 @@ async function loadPluginRun(params) {
|
|
|
887
889
|
conversationId: params.conversationId
|
|
888
890
|
});
|
|
889
891
|
const runActor = record.actors[0] ?? (record.dispatchId ? (await getDispatchRecord(record.dispatchId))?.actor : void 0);
|
|
892
|
+
const actorUser = runActor ? (await readActorIdentity(runActor))?.user : void 0;
|
|
890
893
|
const runEntries = turnMessagesWithProvenance(record).map(
|
|
891
894
|
({ message, provenance }) => runTranscriptEntry(message, provenance, runActor)
|
|
892
895
|
).filter((entry) => Boolean(entry));
|
|
@@ -901,11 +904,13 @@ async function loadPluginRun(params) {
|
|
|
901
904
|
(entry) => entry.type !== "message" || !runMessageTexts.has(entry.text)
|
|
902
905
|
);
|
|
903
906
|
return pluginRunContextSchema.parse({
|
|
907
|
+
...actorUser ? { actorUserId: actorUser.id } : void 0,
|
|
904
908
|
completedAtMs: record.updatedAtMs,
|
|
905
909
|
conversationId: record.conversationId,
|
|
906
910
|
destination: routing.destination,
|
|
907
|
-
|
|
908
|
-
//
|
|
911
|
+
...routing.locationId ? { locationId: routing.locationId } : void 0,
|
|
912
|
+
// Read Actors from the full run record, not the shorter transcript.
|
|
913
|
+
// This includes every Actor that supplied an instruction.
|
|
909
914
|
actors: record.actors,
|
|
910
915
|
...runActor ? { actor: runActor } : void 0,
|
|
911
916
|
runId: record.turnId,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
isStale,
|
|
7
7
|
runNonInteractiveCommand,
|
|
8
8
|
sleep
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KMBU4PJP.js";
|
|
10
10
|
import {
|
|
11
11
|
getStateAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PL57B6NC.js";
|
|
13
13
|
import {
|
|
14
14
|
setSpanAttributes,
|
|
15
15
|
withSpan
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
17
17
|
|
|
18
18
|
// src/chat/sandbox/resources.ts
|
|
19
19
|
var configuredResources;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-VFUK3X5B.js";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_SQL_STATEMENT_TIMEOUT_MS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
8
8
|
|
|
9
9
|
// src/db/neon.ts
|
|
10
10
|
import { AsyncLocalStorage } from "async_hooks";
|
|
@@ -655,6 +655,7 @@ var juniorSchedulerRuns = pgTable16(
|
|
|
655
655
|
// src/db/schema/snapshots.ts
|
|
656
656
|
import { sql as sql6 } from "drizzle-orm";
|
|
657
657
|
import {
|
|
658
|
+
bigint as bigint4,
|
|
658
659
|
check as check2,
|
|
659
660
|
index as index13,
|
|
660
661
|
integer as integer6,
|
|
@@ -699,6 +700,8 @@ var juniorSnapshots = pgTable18(
|
|
|
699
700
|
// Ready artifact facts.
|
|
700
701
|
snapshotId: text18("snapshot_id"),
|
|
701
702
|
buildDurationMs: integer6("build_duration_ms"),
|
|
703
|
+
// Provider snapshot size when the capture response includes it.
|
|
704
|
+
sizeBytes: bigint4("size_bytes", { mode: "number" }),
|
|
702
705
|
generatedAt: timestamptz("generated_at"),
|
|
703
706
|
// Builder references for check-in and snapshot-owner cleanup.
|
|
704
707
|
buildStartedAt: timestamptz("build_started_at"),
|
|
@@ -730,6 +733,10 @@ var juniorSnapshots = pgTable18(
|
|
|
730
733
|
"junior_snapshots_build_duration_check",
|
|
731
734
|
sql6`${table.buildDurationMs} is null or ${table.buildDurationMs} >= 0`
|
|
732
735
|
),
|
|
736
|
+
check2(
|
|
737
|
+
"junior_snapshots_size_bytes_check",
|
|
738
|
+
sql6`${table.sizeBytes} is null or ${table.sizeBytes} >= 0`
|
|
739
|
+
),
|
|
733
740
|
// Provider snapshot ids are unique. Nulls stay allowed for in-flight rows.
|
|
734
741
|
uniqueIndex8("junior_snapshots_snapshot_id_uidx").on(table.snapshotId),
|
|
735
742
|
index13("junior_snapshots_workspace_idx").on(table.workspaceId),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toOptionalTrimmed
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
4
4
|
import {
|
|
5
5
|
pluginCatalogRuntime
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HEBMSITT.js";
|
|
7
7
|
import {
|
|
8
8
|
setSpanAttributes,
|
|
9
9
|
setSpanStatus
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
11
11
|
|
|
12
12
|
// src/chat/sandbox/paths.ts
|
|
13
13
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-7H2VZTWN.js";
|
|
7
7
|
import {
|
|
8
8
|
runWithTurnRequestDeadline
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GPA3ZSYY.js";
|
|
10
10
|
import {
|
|
11
11
|
logWarn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EBMRB6Z6.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-4IXKKZHL.js");
|
|
133
133
|
await processPluginTask(message);
|
|
134
134
|
},
|
|
135
135
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getPersistedSandboxState,
|
|
6
6
|
getPersistedThreadState,
|
|
7
7
|
persistThreadStateById
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FWILPBVQ.js";
|
|
9
9
|
import {
|
|
10
10
|
AgentInvocationBusyError,
|
|
11
11
|
AgentInvocationLimitError,
|
|
@@ -14,32 +14,32 @@ import {
|
|
|
14
14
|
agentBindingSchema,
|
|
15
15
|
agentInvocationSchema,
|
|
16
16
|
createAgentInvocationSchema
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3X55QRAG.js";
|
|
18
18
|
import {
|
|
19
19
|
appendAndEnqueueInboundMessage
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-Q2KY27IX.js";
|
|
21
21
|
import {
|
|
22
22
|
TurnInputCommitLostError,
|
|
23
23
|
getAssistantReplyText,
|
|
24
24
|
getConversationTurnBoundaryError,
|
|
25
25
|
isTurnInputCommitLostError
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HJ27A6YB.js";
|
|
27
27
|
import {
|
|
28
28
|
failTurnRecord,
|
|
29
29
|
getTerminalAssistantMessages,
|
|
30
30
|
getTurnRecord,
|
|
31
31
|
openConversationProjection,
|
|
32
32
|
saveTurnCheckpoint
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-NQTA72Q3.js";
|
|
34
34
|
import {
|
|
35
35
|
getConversationEventStore,
|
|
36
36
|
getConversationStore,
|
|
37
37
|
getSqlExecutor
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-RNMASWLP.js";
|
|
39
39
|
import {
|
|
40
40
|
juniorAgentBindings,
|
|
41
41
|
juniorAgentInvocations
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KKSVCHDO.js";
|
|
43
43
|
|
|
44
44
|
// src/chat/agent-invocations/work.ts
|
|
45
45
|
import { z } from "zod";
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
isDmChannel,
|
|
6
6
|
normalizeSlackConversationId,
|
|
7
7
|
withSlackRetries
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-D6ZD7VXP.js";
|
|
9
9
|
import {
|
|
10
10
|
parseDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RNMASWLP.js";
|
|
12
12
|
import {
|
|
13
13
|
getStateAdapter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PL57B6NC.js";
|
|
15
15
|
import {
|
|
16
16
|
normalizeSlackEmojiName
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XYTJUHRZ.js";
|
|
18
18
|
import {
|
|
19
19
|
pluginCatalogRuntime
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-HEBMSITT.js";
|
|
21
21
|
import {
|
|
22
22
|
parseSlackMessageTs,
|
|
23
23
|
parseSlackUserId
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
isRecord,
|
|
27
27
|
logInfo,
|
|
28
28
|
logWarn
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-EBMRB6Z6.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/slack/outbound.ts
|
|
32
32
|
var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
|