@sentry/junior 0.202.0 → 0.203.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-UXITLYOK.js → agent-hooks-GB2VPTNA.js} +11 -11
- package/dist/api/schema.d.ts +2 -2
- package/dist/api.js +24 -24
- package/dist/app.js +38 -38
- package/dist/{catalog-runtime-BG3JLLK2.js → catalog-runtime-UBLIWD3O.js} +4 -4
- package/dist/{chunk-QB54UQUS.js → chunk-352OWAZH.js} +5 -5
- package/dist/{chunk-SCOZRLZ4.js → chunk-3YJSKOWF.js} +3 -3
- package/dist/{chunk-B3LY5RCL.js → chunk-4KSSKTQ5.js} +5 -5
- package/dist/{chunk-NSXKRGRT.js → chunk-5AHX53NQ.js} +3 -3
- package/dist/{chunk-M6FHWXE3.js → chunk-5J3E5FWA.js} +8 -8
- package/dist/{chunk-ELWOYVOY.js → chunk-5PDAG6O3.js} +1 -1
- package/dist/{chunk-BXCX5QKA.js → chunk-7GWQ5S5R.js} +1 -1
- package/dist/{chunk-KHKKHDLD.js → chunk-A5L27LE4.js} +2 -2
- package/dist/{chunk-C6VVF43U.js → chunk-ADIAWL34.js} +1 -1
- package/dist/{chunk-3UI3WFTX.js → chunk-ASTEMBKJ.js} +5 -5
- package/dist/{chunk-QP3OGJXF.js → chunk-CRTRBBRI.js} +1 -1
- package/dist/{chunk-DBVY6HLX.js → chunk-EDKUFGPL.js} +1 -1
- package/dist/{chunk-63NKKFJL.js → chunk-ENY6SKIU.js} +2 -2
- package/dist/{chunk-5PKWYPFT.js → chunk-F4MGCZOX.js} +6 -6
- package/dist/{chunk-LOOU2DUR.js → chunk-FSUR7GTG.js} +72 -25
- package/dist/{chunk-M76HMB7M.js → chunk-GKEOHJL5.js} +3 -3
- package/dist/{chunk-7DHZP5KJ.js → chunk-GMCB6W5Y.js} +2 -2
- package/dist/{chunk-PW4P4JYF.js → chunk-IE2VPG7O.js} +1 -1
- package/dist/{chunk-U2GPUYAL.js → chunk-IZ5B5IHQ.js} +6 -6
- package/dist/{chunk-OWMPFXJA.js → chunk-KIIEUXD3.js} +4 -4
- package/dist/{chunk-3PGQSKJV.js → chunk-KXU4NIL7.js} +9 -9
- package/dist/{chunk-BD2KT3OB.js → chunk-NCEBK6PH.js} +1 -1
- package/dist/{chunk-2MK3QBGA.js → chunk-P6KTRNVC.js} +1 -1
- package/dist/{chunk-JSJQEWBJ.js → chunk-PDRNLLFT.js} +21 -21
- package/dist/{chunk-5NOPO64K.js → chunk-PKEX2AQX.js} +1 -1
- package/dist/{chunk-WQSHDTTI.js → chunk-PSJCGIGO.js} +8 -8
- package/dist/{chunk-EWT7H65X.js → chunk-PZUSUL55.js} +4 -4
- package/dist/{chunk-REOIRYPR.js → chunk-R45M4TUS.js} +2 -2
- package/dist/{chunk-IIWUT4FO.js → chunk-SP3QKZXJ.js} +8 -8
- package/dist/{chunk-DL2KLKVH.js → chunk-UE4GPWSD.js} +6 -6
- package/dist/{chunk-6AYH6252.js → chunk-VNMJWREK.js} +4 -4
- package/dist/{chunk-LA6R4A7Q.js → chunk-VZ7CSOX2.js} +3 -3
- package/dist/{chunk-YDUR3ZYW.js → chunk-WCNQJKFT.js} +1 -1
- package/dist/{chunk-HMREVIO2.js → chunk-WDZR3QQM.js} +1 -1
- package/dist/{chunk-TXJSXBV5.js → chunk-WLYVJCHV.js} +4 -4
- package/dist/{chunk-MAGNK5J4.js → chunk-WS7NAFTM.js} +1 -1
- package/dist/{chunk-A76OIMYN.js → chunk-XPDEYNQI.js} +1 -1
- package/dist/{chunk-AWMS3SPP.js → chunk-XRW44VGM.js} +3 -3
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/{db-3L2MCVRI.js → db-NGDJV7YH.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-YVV6C6T2.js → oauth-callback-server-YFY7YEGK.js} +29 -29
- package/dist/{runner-LQ7RETDP.js → runner-ORTNSB2Q.js} +21 -21
- package/dist/{skills-XRWYEDCD.js → skills-H376WQOH.js} +5 -5
- package/dist/spawn-T43WHLOS.js +42 -0
- package/dist/task-runner-LBZWF32V.js +36 -0
- package/dist/{validation-7MNQGCJA.js → validation-REJLRKI6.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-COALHUCG.js → work-3KJ3RE76.js} +21 -21
- package/dist/{worker-6MURZIPD.js → worker-QFEBU72E.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-RC6SJUAI.js +0 -42
- package/dist/task-runner-7DY7ARYH.js +0 -36
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WCNQJKFT.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-WS7NAFTM.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-F4MGCZOX.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-GKEOHJL5.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IE2VPG7O.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P6KTRNVC.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-WS7NAFTM.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/state/conversation.ts
|
|
26
26
|
function defaultConversationState() {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
toCanonicalInputMessage,
|
|
9
9
|
toCanonicalOutputMessage,
|
|
10
10
|
toGenAiMessagesTraceAttributes
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PKEX2AQX.js";
|
|
12
12
|
import {
|
|
13
13
|
extractGenAiUsageAttributes,
|
|
14
14
|
logException,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
normalizeGenAiFinishReason,
|
|
17
17
|
serializeGenAiAttribute,
|
|
18
18
|
withSpan
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WS7NAFTM.js";
|
|
20
20
|
|
|
21
21
|
// src/chat/services/provider-error.ts
|
|
22
22
|
var ProviderError = class extends Error {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
authenticationUnlinkedEvent,
|
|
8
8
|
fallbackShortTitle,
|
|
9
9
|
generateShortTitle
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GMCB6W5Y.js";
|
|
11
11
|
import {
|
|
12
12
|
bindProviderConversation,
|
|
13
13
|
createSqlConversationEventStore,
|
|
@@ -16,18 +16,18 @@ import {
|
|
|
16
16
|
getSqlExecutor,
|
|
17
17
|
sanitizePostgresJson,
|
|
18
18
|
withConversationEventLock
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GKEOHJL5.js";
|
|
20
20
|
import {
|
|
21
21
|
SANDBOX_REPOS_ROOT,
|
|
22
22
|
SANDBOX_WORKSPACE_ROOT,
|
|
23
23
|
sleep
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5AHX53NQ.js";
|
|
25
25
|
import {
|
|
26
26
|
MUTATION_LOCK_TTL_MS,
|
|
27
27
|
fenceLock,
|
|
28
28
|
getStateAdapter,
|
|
29
29
|
withLock
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-P6KTRNVC.js";
|
|
31
31
|
import {
|
|
32
32
|
agentHistoryItemSchema,
|
|
33
33
|
contextProvenance,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
escapeXml,
|
|
41
41
|
resolveGatewayModel,
|
|
42
42
|
unwrapCurrentInstruction
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ENY6SKIU.js";
|
|
44
44
|
import {
|
|
45
45
|
parseSlackMessageTs,
|
|
46
46
|
toStoredSlackActor
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
logException,
|
|
52
52
|
logWarn,
|
|
53
53
|
setSpanAttributes
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-WS7NAFTM.js";
|
|
55
55
|
|
|
56
56
|
// src/chat/turn-context-tag.ts
|
|
57
57
|
var TURN_CONTEXT_TAG = "runtime-turn-context";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PluginCredentialFailureError,
|
|
8
8
|
agentNameSchema,
|
|
9
9
|
createPluginAuthOrchestration
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-352OWAZH.js";
|
|
11
11
|
import {
|
|
12
12
|
parseSandboxEgressAuthRequiredSignal,
|
|
13
13
|
parseSandboxEgressPermissionDeniedSignal,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
searchSlackUsers,
|
|
39
39
|
selectPluginGrant,
|
|
40
40
|
toMcpProviderError
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-PSJCGIGO.js";
|
|
42
42
|
import {
|
|
43
43
|
RetryableDeliveryError,
|
|
44
44
|
actorFromRun,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
surfaceFromRun,
|
|
54
54
|
toolInvocationDestination,
|
|
55
55
|
uploadFilesToConversation
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-UE4GPWSD.js";
|
|
57
57
|
import {
|
|
58
58
|
CooperativeTurnYieldError,
|
|
59
59
|
NO_REPLY_MARKER,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
isNoReplyMarker,
|
|
66
66
|
isTurnInputCommitLostError,
|
|
67
67
|
sanitizeAssistantText
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-5PDAG6O3.js";
|
|
69
69
|
import {
|
|
70
70
|
AGENTS_REMOVAL_NOTICE,
|
|
71
71
|
AGENTS_REPLACEMENT_NOTICE,
|
|
@@ -121,7 +121,7 @@ import {
|
|
|
121
121
|
stripRuntimeTurnContext,
|
|
122
122
|
trimTrailingAssistantMessages,
|
|
123
123
|
truncateText
|
|
124
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-F4MGCZOX.js";
|
|
125
125
|
import {
|
|
126
126
|
SCHEDULED_TASK_SYSTEM_ACTOR,
|
|
127
127
|
WORKSPACE_SNAPSHOT_FAILED_EVENT,
|
|
@@ -163,13 +163,13 @@ import {
|
|
|
163
163
|
workspaceSnapshotFinishedEvent,
|
|
164
164
|
workspaceSnapshotWatch,
|
|
165
165
|
writableEventTask
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-WLYVJCHV.js";
|
|
167
167
|
import {
|
|
168
168
|
parseSlackThreadId
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-XPDEYNQI.js";
|
|
170
170
|
import {
|
|
171
171
|
appendAndEnqueueInboundMessage
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-KIIEUXD3.js";
|
|
173
173
|
import {
|
|
174
174
|
SHORT_TITLE_MAX_LENGTH,
|
|
175
175
|
ToolInputError,
|
|
@@ -177,7 +177,7 @@ import {
|
|
|
177
177
|
generateShortTitle,
|
|
178
178
|
hasAgentTurnUsage,
|
|
179
179
|
resolveTaskTitle
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-GMCB6W5Y.js";
|
|
181
181
|
import {
|
|
182
182
|
bindSandboxFileSystem,
|
|
183
183
|
createSandboxSession,
|
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
resolve,
|
|
189
189
|
setSnapshotSpanAttributes,
|
|
190
190
|
stopSession
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-VZ7CSOX2.js";
|
|
192
192
|
import {
|
|
193
193
|
privateTraceResultAttributes
|
|
194
194
|
} from "./chunk-UIE3R5XU.js";
|
|
@@ -198,7 +198,7 @@ import {
|
|
|
198
198
|
} from "./chunk-X6GDDWQH.js";
|
|
199
199
|
import {
|
|
200
200
|
getTurnRequestDeadline
|
|
201
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-NCEBK6PH.js";
|
|
202
202
|
import {
|
|
203
203
|
getVercelConversationWorkQueue
|
|
204
204
|
} from "./chunk-DKIJ2RP5.js";
|
|
@@ -245,7 +245,7 @@ import {
|
|
|
245
245
|
updateWorkspace,
|
|
246
246
|
withSlackRetries,
|
|
247
247
|
workspaceRepoCheckoutPath
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-IZ5B5IHQ.js";
|
|
249
249
|
import {
|
|
250
250
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
251
251
|
} from "./chunk-3Y47VMHV.js";
|
|
@@ -255,13 +255,13 @@ import {
|
|
|
255
255
|
getConversationStore,
|
|
256
256
|
getDb,
|
|
257
257
|
getSqlExecutor
|
|
258
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-GKEOHJL5.js";
|
|
259
259
|
import {
|
|
260
260
|
juniorArtifacts,
|
|
261
261
|
juniorAttachments,
|
|
262
262
|
juniorIdentities,
|
|
263
263
|
juniorSchedulerRuns
|
|
264
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-IE2VPG7O.js";
|
|
265
265
|
import {
|
|
266
266
|
SANDBOX_DATA_ROOT,
|
|
267
267
|
SANDBOX_REPOS_ROOT,
|
|
@@ -292,12 +292,12 @@ import {
|
|
|
292
292
|
throwSandboxOperationError,
|
|
293
293
|
workspaceSnapshotNotReadyUserMessage,
|
|
294
294
|
wrapSandboxSetupError
|
|
295
|
-
} from "./chunk-
|
|
295
|
+
} from "./chunk-5AHX53NQ.js";
|
|
296
296
|
import {
|
|
297
297
|
fenceLock,
|
|
298
298
|
getStateAdapter,
|
|
299
299
|
withLock
|
|
300
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-P6KTRNVC.js";
|
|
301
301
|
import {
|
|
302
302
|
KNOWN_CONVERSATION_EVENT_TYPES,
|
|
303
303
|
contextProvenance,
|
|
@@ -330,7 +330,7 @@ import {
|
|
|
330
330
|
resolveGatewayCredential,
|
|
331
331
|
resolveGatewayModel,
|
|
332
332
|
unwrapCurrentInstruction
|
|
333
|
-
} from "./chunk-
|
|
333
|
+
} from "./chunk-ENY6SKIU.js";
|
|
334
334
|
import {
|
|
335
335
|
ModelProfileNotConfiguredError,
|
|
336
336
|
TURN_REASONING_LEVELS,
|
|
@@ -349,16 +349,16 @@ import {
|
|
|
349
349
|
toGenAiMessagesTraceAttributes,
|
|
350
350
|
toGenAiPayloadMetadata,
|
|
351
351
|
toGenAiPayloadTraceAttributes
|
|
352
|
-
} from "./chunk-
|
|
352
|
+
} from "./chunk-PKEX2AQX.js";
|
|
353
353
|
import {
|
|
354
354
|
discoverSkills,
|
|
355
355
|
findSkillByName,
|
|
356
356
|
loadSkillsByName,
|
|
357
357
|
parseSkillInvocation
|
|
358
|
-
} from "./chunk-
|
|
358
|
+
} from "./chunk-A5L27LE4.js";
|
|
359
359
|
import {
|
|
360
360
|
pluginCatalogRuntime
|
|
361
|
-
} from "./chunk-
|
|
361
|
+
} from "./chunk-WCNQJKFT.js";
|
|
362
362
|
import {
|
|
363
363
|
CredentialUnavailableError,
|
|
364
364
|
OAuthProviderError,
|
|
@@ -366,7 +366,7 @@ import {
|
|
|
366
366
|
getOAuthProviderErrorAttributes,
|
|
367
367
|
resolveAuthTokenPlaceholder,
|
|
368
368
|
resolvePluginCommandEnv
|
|
369
|
-
} from "./chunk-
|
|
369
|
+
} from "./chunk-7GWQ5S5R.js";
|
|
370
370
|
import {
|
|
371
371
|
credentialContextForActor,
|
|
372
372
|
credentialUserSubjectId
|
|
@@ -402,7 +402,7 @@ import {
|
|
|
402
402
|
summarizeMessageText,
|
|
403
403
|
withLogContext,
|
|
404
404
|
withSpan
|
|
405
|
-
} from "./chunk-
|
|
405
|
+
} from "./chunk-WS7NAFTM.js";
|
|
406
406
|
import {
|
|
407
407
|
startInactiveSpan,
|
|
408
408
|
withActiveSpan
|
|
@@ -13064,6 +13064,39 @@ var MAX_ATTACHMENT_TEXT_CHARS = 4e3;
|
|
|
13064
13064
|
function toStr(value) {
|
|
13065
13065
|
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
13066
13066
|
}
|
|
13067
|
+
function toNum(value) {
|
|
13068
|
+
return typeof value === "number" ? value : void 0;
|
|
13069
|
+
}
|
|
13070
|
+
function toFileRef(raw) {
|
|
13071
|
+
if (!raw || typeof raw !== "object") return void 0;
|
|
13072
|
+
const obj = raw;
|
|
13073
|
+
const id = toStr(obj.id);
|
|
13074
|
+
if (!id) return void 0;
|
|
13075
|
+
return {
|
|
13076
|
+
id,
|
|
13077
|
+
name: toStr(obj.name),
|
|
13078
|
+
mimetype: toStr(obj.mimetype),
|
|
13079
|
+
size: toNum(obj.size),
|
|
13080
|
+
url_private: toStr(obj.url_private),
|
|
13081
|
+
url_private_download: toStr(obj.url_private_download)
|
|
13082
|
+
};
|
|
13083
|
+
}
|
|
13084
|
+
function extractAttachmentFiles(input) {
|
|
13085
|
+
const files = [];
|
|
13086
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13087
|
+
for (const attachment of getAttachmentPayload(input)) {
|
|
13088
|
+
if (!attachment || typeof attachment !== "object") continue;
|
|
13089
|
+
const rawFiles = attachment.files;
|
|
13090
|
+
if (!Array.isArray(rawFiles)) continue;
|
|
13091
|
+
for (const rawFile of rawFiles) {
|
|
13092
|
+
const fileRef = toFileRef(rawFile);
|
|
13093
|
+
if (!fileRef?.id || seen.has(fileRef.id)) continue;
|
|
13094
|
+
seen.add(fileRef.id);
|
|
13095
|
+
files.push(fileRef);
|
|
13096
|
+
}
|
|
13097
|
+
}
|
|
13098
|
+
return files;
|
|
13099
|
+
}
|
|
13067
13100
|
function getAttachmentPayload(input) {
|
|
13068
13101
|
if (Array.isArray(input)) return input;
|
|
13069
13102
|
if (!input || typeof input !== "object") return [];
|
|
@@ -13165,8 +13198,22 @@ async function matchSlackAttachments(args) {
|
|
|
13165
13198
|
|
|
13166
13199
|
// src/chat/slack/tools/thread-read.ts
|
|
13167
13200
|
var MAX_THREAD_READ_CHARS = 4e4;
|
|
13201
|
+
function collectMessageFiles(msg) {
|
|
13202
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13203
|
+
const files = [];
|
|
13204
|
+
for (const file of [
|
|
13205
|
+
...msg.files ?? [],
|
|
13206
|
+
...extractAttachmentFiles(msg.attachments)
|
|
13207
|
+
]) {
|
|
13208
|
+
if (!file.id || seen.has(file.id)) continue;
|
|
13209
|
+
seen.add(file.id);
|
|
13210
|
+
files.push(file);
|
|
13211
|
+
}
|
|
13212
|
+
return files;
|
|
13213
|
+
}
|
|
13168
13214
|
function sanitizeMessage(msg, attachmentIdsBySlackFileId) {
|
|
13169
13215
|
const attachmentText = renderAttachmentText(msg.attachments);
|
|
13216
|
+
const files = collectMessageFiles(msg);
|
|
13170
13217
|
return {
|
|
13171
13218
|
ts: msg.ts,
|
|
13172
13219
|
user: msg.user,
|
|
@@ -13176,8 +13223,8 @@ function sanitizeMessage(msg, attachmentIdsBySlackFileId) {
|
|
|
13176
13223
|
bot_id: msg.bot_id,
|
|
13177
13224
|
type: msg.type,
|
|
13178
13225
|
...attachmentText ? { attachment_text: attachmentText } : void 0,
|
|
13179
|
-
...
|
|
13180
|
-
files:
|
|
13226
|
+
...files.length ? {
|
|
13227
|
+
files: files.map((f) => ({
|
|
13181
13228
|
id: f.id,
|
|
13182
13229
|
name: f.name,
|
|
13183
13230
|
mimetype: f.mimetype,
|
|
@@ -13320,7 +13367,7 @@ function createSlackThreadReadTool(context, attachmentDeps) {
|
|
|
13320
13367
|
const root = replies[0];
|
|
13321
13368
|
const resolvedThreadTs = threadTs ?? root?.thread_ts ?? root?.ts ?? lookupTs;
|
|
13322
13369
|
const slackFileIds = replies.flatMap(
|
|
13323
|
-
(reply) => (reply
|
|
13370
|
+
(reply) => collectMessageFiles(reply).map((file) => file.id).filter((fileId) => Boolean(fileId))
|
|
13324
13371
|
);
|
|
13325
13372
|
const storedAttachments = attachmentDeps ? await matchSlackAttachments({
|
|
13326
13373
|
conversationId: attachmentDeps.conversationId,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
juniorConversations,
|
|
9
9
|
juniorIdentities,
|
|
10
10
|
juniorUsers
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IE2VPG7O.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-ENY6SKIU.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-WS7NAFTM.js";
|
|
32
32
|
|
|
33
33
|
// src/chat/conversations/sql/store.ts
|
|
34
34
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-PDO5BLNM.js";
|
|
4
4
|
import {
|
|
5
5
|
botConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ENY6SKIU.js";
|
|
7
7
|
import {
|
|
8
8
|
logWarn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WS7NAFTM.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/conversations/structured-events.ts
|
|
12
12
|
import {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getConversationEventStore,
|
|
6
6
|
getDb,
|
|
7
7
|
getSqlExecutor
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GKEOHJL5.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-IE2VPG7O.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-5AHX53NQ.js";
|
|
28
28
|
import {
|
|
29
29
|
getStateAdapter
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-P6KTRNVC.js";
|
|
31
31
|
import {
|
|
32
32
|
botConfig,
|
|
33
33
|
completeObject,
|
|
34
34
|
embedTexts,
|
|
35
35
|
getSlackBotToken
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ENY6SKIU.js";
|
|
37
37
|
import {
|
|
38
38
|
defaultModelId
|
|
39
39
|
} from "./chunk-NHJU2ZAL.js";
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
setSpanAttributes,
|
|
53
53
|
setSpanStatus,
|
|
54
54
|
withSpan
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-WS7NAFTM.js";
|
|
56
56
|
|
|
57
57
|
// src/chat/plugins/agent-hooks.ts
|
|
58
58
|
import {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GKEOHJL5.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-P6KTRNVC.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ENY6SKIU.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-WS7NAFTM.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentRunError,
|
|
3
3
|
executeTurn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XRW44VGM.js";
|
|
5
5
|
import {
|
|
6
6
|
ConversationTurnLifecycleService
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EDKUFGPL.js";
|
|
8
8
|
import {
|
|
9
9
|
getPersistedSandboxState,
|
|
10
10
|
getPersistedThreadState,
|
|
11
11
|
persistThreadStateById
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ASTEMBKJ.js";
|
|
13
13
|
import {
|
|
14
14
|
AgentInvocationBusyError,
|
|
15
15
|
AgentInvocationLimitError,
|
|
@@ -18,32 +18,32 @@ import {
|
|
|
18
18
|
agentBindingSchema,
|
|
19
19
|
agentInvocationSchema,
|
|
20
20
|
createAgentInvocationSchema
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-352OWAZH.js";
|
|
22
22
|
import {
|
|
23
23
|
TurnInputCommitLostError,
|
|
24
24
|
getAssistantReplyText,
|
|
25
25
|
getConversationTurnBoundaryError,
|
|
26
26
|
isTurnInputCommitLostError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5PDAG6O3.js";
|
|
28
28
|
import {
|
|
29
29
|
failTurnRecord,
|
|
30
30
|
getTerminalAssistantMessages,
|
|
31
31
|
getTurnRecord,
|
|
32
32
|
openConversationProjection,
|
|
33
33
|
saveTurnCheckpoint
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-F4MGCZOX.js";
|
|
35
35
|
import {
|
|
36
36
|
appendAndEnqueueInboundMessage
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KIIEUXD3.js";
|
|
38
38
|
import {
|
|
39
39
|
getConversationEventStore,
|
|
40
40
|
getConversationStore,
|
|
41
41
|
getSqlExecutor
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GKEOHJL5.js";
|
|
43
43
|
import {
|
|
44
44
|
juniorAgentBindings,
|
|
45
45
|
juniorAgentInvocations
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-IE2VPG7O.js";
|
|
47
47
|
|
|
48
48
|
// src/chat/agent-invocations/work.ts
|
|
49
49
|
import { z } from "zod";
|