@sentry/junior 0.191.0 → 0.192.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-HIWWBBKO.js → agent-hooks-3JY76L5X.js} +11 -11
- package/dist/api/activity.d.ts +3 -1
- package/dist/api/code/overview.d.ts +12 -0
- package/dist/api/locations/detail.d.ts +8 -0
- package/dist/api/locations/list.d.ts +5 -0
- package/dist/api/people/code.d.ts +6 -0
- package/dist/api/people/shared.d.ts +2 -0
- package/dist/api/reporting-window.d.ts +40 -0
- package/dist/api/schema/code.d.ts +14 -0
- package/dist/api/schema/conversation.d.ts +27 -0
- package/dist/api/schema/location.d.ts +15 -0
- package/dist/api/schema/person.d.ts +104 -0
- package/dist/api/schema/task.d.ts +15 -2
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +2 -2
- package/dist/api.js +536 -141
- package/dist/app.js +39 -39
- package/dist/{catalog-runtime-4OKH4265.js → catalog-runtime-5JVLWXRY.js} +4 -4
- package/dist/chat/tasks/execution-stats.d.ts +12 -0
- package/dist/{chunk-L4JLLS6C.js → chunk-3ADPXQBL.js} +1 -1
- package/dist/{chunk-VGYZ3YZM.js → chunk-3O2NXVGB.js} +21 -21
- package/dist/{chunk-CUUE5MGF.js → chunk-3UJSII43.js} +3 -3
- package/dist/{chunk-X6PQKQTY.js → chunk-47JFLZSF.js} +4 -4
- package/dist/{chunk-WBNQYVCM.js → chunk-4AFSQJD6.js} +2 -2
- package/dist/{chunk-NY5SJGJZ.js → chunk-4B4DQGOM.js} +22 -22
- package/dist/{chunk-AWFSSFAX.js → chunk-4CCQZHD3.js} +9 -9
- package/dist/{chunk-DP6H3U2X.js → chunk-4WIA45WD.js} +1 -1
- package/dist/{chunk-2JAWOTUT.js → chunk-4Z7B5WVV.js} +2 -2
- package/dist/{chunk-BVWC5DBM.js → chunk-5V4BAUCH.js} +1 -1
- package/dist/{chunk-QRNJO7DZ.js → chunk-6FCKJDKS.js} +1 -1
- package/dist/{chunk-7PYCRKQL.js → chunk-6LX6KV5C.js} +3 -3
- package/dist/{chunk-WCSXTDOL.js → chunk-7XO7PTZE.js} +1 -1
- package/dist/{chunk-S7NSFCCW.js → chunk-AKR6W7VV.js} +3 -3
- package/dist/{chunk-ZNFNGDT7.js → chunk-ARSUYYQG.js} +1 -1
- package/dist/{chunk-CCPOZMS4.js → chunk-BGLMT6KP.js} +3 -3
- package/dist/{chunk-NK3UEKAW.js → chunk-BUTAWPUV.js} +50 -8
- package/dist/{chunk-LOYTPSAK.js → chunk-EIYOABL4.js} +4 -4
- package/dist/{chunk-PFAZSRGR.js → chunk-EYIMZY5O.js} +114 -19
- package/dist/{chunk-BVYUIVXE.js → chunk-EYNUOZCN.js} +1 -1
- package/dist/{chunk-EQZUBYRF.js → chunk-FGYWKKTJ.js} +1 -1
- package/dist/{chunk-3PDR63SX.js → chunk-G4E5WIRL.js} +4 -4
- package/dist/{chunk-ZRN3OS7M.js → chunk-H5Q2T5VC.js} +1 -1
- package/dist/{chunk-SEIZ2XLD.js → chunk-IBO4YFFZ.js} +1 -1
- package/dist/{chunk-Q32BSFN4.js → chunk-ITTEDZGY.js} +8 -8
- package/dist/{chunk-5IMKUVMS.js → chunk-KR5F3QSP.js} +9 -9
- package/dist/{chunk-YNRLCUCB.js → chunk-LRTEMMCZ.js} +1 -1
- package/dist/{chunk-ZJRGWZZ2.js → chunk-MB2CTEPD.js} +74 -4
- package/dist/{chunk-WNIVCR74.js → chunk-OBN7UEQJ.js} +2 -2
- package/dist/{chunk-HNMRX2EN.js → chunk-PXP2M32M.js} +5 -5
- package/dist/{chunk-TH6LMEOW.js → chunk-PXUBRZBU.js} +1 -1
- package/dist/{chunk-6KISW5UY.js → chunk-PYVGXGKC.js} +2 -2
- package/dist/{chunk-UTL3MHPC.js → chunk-RC745GGZ.js} +8 -1
- package/dist/{chunk-RZS4F5K4.js → chunk-RWBZZMW6.js} +3 -3
- package/dist/{chunk-GQN4REF5.js → chunk-SSR6YBWW.js} +6 -6
- package/dist/{chunk-MFZOIKET.js → chunk-SZ2O3CGS.js} +1 -1
- package/dist/{chunk-KTW62MG5.js → chunk-VF3EDS7P.js} +6 -6
- package/dist/{chunk-CECRMPXJ.js → chunk-YE6DVM43.js} +8 -8
- package/dist/{chunk-K2NKG42A.js → chunk-YRWGJ5OO.js} +5 -5
- package/dist/{chunk-SGRL7NV6.js → chunk-Z4DNJI5F.js} +5 -5
- 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/schema/stats.d.ts +5 -1
- package/dist/{db-LG4ZEWA3.js → db-LRM6AP66.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-KI7ZRTOG.js → oauth-callback-server-BKCDVYVH.js} +29 -29
- package/dist/reporting-schema.d.ts +2 -2
- package/dist/{runner-K2EOSAZQ.js → runner-RUXGS3E6.js} +21 -21
- package/dist/{skills-JTRDFKMA.js → skills-DXP2RCJF.js} +5 -5
- package/dist/spawn-HH7GH7XT.js +42 -0
- package/dist/task-runner-H5I7R3LJ.js +36 -0
- package/dist/{validation-NBWURHAP.js → validation-F4KYLIF2.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-35TBEAUI.js → work-UUNMNSML.js} +21 -21
- package/dist/{worker-F762M6XM.js → worker-PMIJ5NLD.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-SRBETYCF.js +0 -42
- package/dist/task-runner-INQIQ4VF.js +0 -36
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Z4DNJI5F.js";
|
|
5
5
|
import {
|
|
6
6
|
recordTaskExecution
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MB2CTEPD.js";
|
|
8
8
|
import {
|
|
9
9
|
pluginTaskId,
|
|
10
10
|
pluginTaskParamsSchema,
|
|
11
11
|
sendVercelPluginTask
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RWBZZMW6.js";
|
|
13
13
|
import {
|
|
14
14
|
getPiMessageRole,
|
|
15
15
|
getTurnRecord,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
isToolResultMessage,
|
|
20
20
|
normalizeToolNameFromResult,
|
|
21
21
|
stripRuntimeTurnContext
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VF3EDS7P.js";
|
|
23
23
|
import {
|
|
24
24
|
createPluginConversationEvents,
|
|
25
25
|
createPluginEmbedder,
|
|
@@ -28,17 +28,17 @@ import {
|
|
|
28
28
|
createPluginState,
|
|
29
29
|
getPlugins,
|
|
30
30
|
readActorIdentity
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-BUTAWPUV.js";
|
|
32
32
|
import {
|
|
33
33
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
34
34
|
} from "./chunk-3Y47VMHV.js";
|
|
35
35
|
import {
|
|
36
36
|
getConversationStore,
|
|
37
37
|
getDb
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-AKR6W7VV.js";
|
|
39
39
|
import {
|
|
40
40
|
getStateAdapter
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LRTEMMCZ.js";
|
|
42
42
|
import {
|
|
43
43
|
sameActorIdentity
|
|
44
44
|
} from "./chunk-GFBR4S3Q.js";
|
|
@@ -84,7 +84,7 @@ function slackSourceForDestination(args) {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
async function resolveConversationRouting(args) {
|
|
87
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
87
|
+
const conversationStore = args.conversationStore ?? (await import("./db-LRM6AP66.js")).getConversationStore();
|
|
88
88
|
const chain = await loadConversationChain(
|
|
89
89
|
args.conversationId,
|
|
90
90
|
conversationStore
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
2
|
healthReportSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RC745GGZ.js";
|
|
4
4
|
import {
|
|
5
5
|
parseSlackThreadId
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4WIA45WD.js";
|
|
7
7
|
import {
|
|
8
8
|
appendAndEnqueueExclusiveInboundMessage,
|
|
9
9
|
appendAndEnqueueInboundMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-G4E5WIRL.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDeterministicTurnId
|
|
13
13
|
} from "./chunk-DA2KGZZI.js";
|
|
14
14
|
import {
|
|
15
15
|
normalizeSlackConversationId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BUTAWPUV.js";
|
|
17
17
|
import {
|
|
18
18
|
getConversationStore,
|
|
19
19
|
getDb
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AKR6W7VV.js";
|
|
21
21
|
import {
|
|
22
22
|
juniorConversationParticipants,
|
|
23
23
|
juniorConversations,
|
|
24
24
|
juniorIdentities,
|
|
25
25
|
juniorUsers
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IBO4YFFZ.js";
|
|
27
27
|
import {
|
|
28
28
|
juniorDestinations
|
|
29
29
|
} from "./chunk-VFUK3X5B.js";
|
|
30
30
|
import {
|
|
31
31
|
getSlackBotToken
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4Z7B5WVV.js";
|
|
33
33
|
import {
|
|
34
34
|
canExposeConversationPayload
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-EYNUOZCN.js";
|
|
36
36
|
import {
|
|
37
37
|
logWarn
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-3ADPXQBL.js";
|
|
39
39
|
|
|
40
40
|
// src/handlers/health.ts
|
|
41
41
|
function readHealthReport() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDb
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AKR6W7VV.js";
|
|
4
4
|
import {
|
|
5
5
|
juniorConversations,
|
|
6
6
|
juniorTaskExecutions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IBO4YFFZ.js";
|
|
8
8
|
import {
|
|
9
9
|
logWarn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3ADPXQBL.js";
|
|
11
11
|
|
|
12
12
|
// src/chat/tasks/execution-stats.ts
|
|
13
13
|
import {
|
|
@@ -139,6 +139,37 @@ async function readTaskExecutionDays(dayCount = 90, options = {}) {
|
|
|
139
139
|
}
|
|
140
140
|
return [...byDate.values()];
|
|
141
141
|
}
|
|
142
|
+
async function readTaskExecutionHours(hourCount = 24, options = {}) {
|
|
143
|
+
const nowMs = options.nowMs ?? Date.now();
|
|
144
|
+
const end = new Date(nowMs);
|
|
145
|
+
end.setUTCMinutes(0, 0, 0);
|
|
146
|
+
const endMs = end.getTime() + 3599999;
|
|
147
|
+
const startMs = end.getTime() - (hourCount - 1) * 36e5;
|
|
148
|
+
const executionHour = sql`to_char(to_timestamp(${juniorTaskExecutions.executedAtMs} / 1000.0) at time zone 'UTC', 'YYYY-MM-DD"T"HH24')`;
|
|
149
|
+
const rows = await getDb().select({
|
|
150
|
+
count: count(),
|
|
151
|
+
date: executionHour,
|
|
152
|
+
kind: juniorTaskExecutions.kind
|
|
153
|
+
}).from(juniorTaskExecutions).where(
|
|
154
|
+
and(
|
|
155
|
+
gte(juniorTaskExecutions.executedAtMs, startMs),
|
|
156
|
+
lte(juniorTaskExecutions.executedAtMs, endMs),
|
|
157
|
+
eq(juniorTaskExecutions.status, "completed")
|
|
158
|
+
)
|
|
159
|
+
).groupBy(executionHour, juniorTaskExecutions.kind).orderBy(asc(executionHour), asc(juniorTaskExecutions.kind));
|
|
160
|
+
const byHour = /* @__PURE__ */ new Map();
|
|
161
|
+
for (let offset = 0; offset < hourCount; offset += 1) {
|
|
162
|
+
const date = new Date(startMs + offset * 36e5).toISOString().slice(0, 13);
|
|
163
|
+
byHour.set(date, emptyDay(date));
|
|
164
|
+
}
|
|
165
|
+
for (const row of rows) {
|
|
166
|
+
const hour = byHour.get(row.date);
|
|
167
|
+
if (!hour) continue;
|
|
168
|
+
if (row.kind === "scheduled") hour.scheduled = row.count;
|
|
169
|
+
else if (row.kind === "event") hour.event = row.count;
|
|
170
|
+
}
|
|
171
|
+
return [...byHour.values()];
|
|
172
|
+
}
|
|
142
173
|
async function readTaskExecutionByConversationId(args) {
|
|
143
174
|
const namespace = args.namespace ?? "junior";
|
|
144
175
|
const rows = await getDb().select({
|
|
@@ -273,13 +304,52 @@ async function readTaskExecutionStatusDays(args) {
|
|
|
273
304
|
}
|
|
274
305
|
return [...byDate.values()];
|
|
275
306
|
}
|
|
307
|
+
async function readTaskExecutionStatusHours(args) {
|
|
308
|
+
const hourCount = args.hourCount ?? 24;
|
|
309
|
+
const namespace = args.namespace ?? "junior";
|
|
310
|
+
const nowMs = args.nowMs ?? Date.now();
|
|
311
|
+
const end = new Date(nowMs);
|
|
312
|
+
end.setUTCMinutes(0, 0, 0);
|
|
313
|
+
const endMs = end.getTime() + 3599999;
|
|
314
|
+
const startMs = end.getTime() - (hourCount - 1) * 36e5;
|
|
315
|
+
const executionHour = sql`to_char(to_timestamp(${juniorTaskExecutions.executedAtMs} / 1000.0) at time zone 'UTC', 'YYYY-MM-DD"T"HH24')`;
|
|
316
|
+
const rows = await getDb().select({
|
|
317
|
+
count: count(),
|
|
318
|
+
date: executionHour,
|
|
319
|
+
status: juniorTaskExecutions.status
|
|
320
|
+
}).from(juniorTaskExecutions).where(
|
|
321
|
+
and(
|
|
322
|
+
eq(juniorTaskExecutions.kind, args.kind),
|
|
323
|
+
eq(juniorTaskExecutions.namespace, namespace),
|
|
324
|
+
eq(juniorTaskExecutions.taskId, args.taskId),
|
|
325
|
+
gte(juniorTaskExecutions.executedAtMs, startMs),
|
|
326
|
+
lte(juniorTaskExecutions.executedAtMs, endMs),
|
|
327
|
+
inArray(juniorTaskExecutions.status, [...TASK_EXECUTION_STATUSES])
|
|
328
|
+
)
|
|
329
|
+
).groupBy(executionHour, juniorTaskExecutions.status).orderBy(asc(executionHour), asc(juniorTaskExecutions.status));
|
|
330
|
+
const byHour = /* @__PURE__ */ new Map();
|
|
331
|
+
for (let offset = 0; offset < hourCount; offset += 1) {
|
|
332
|
+
const date = new Date(startMs + offset * 36e5).toISOString().slice(0, 13);
|
|
333
|
+
byHour.set(date, emptyStatusDay(date));
|
|
334
|
+
}
|
|
335
|
+
for (const row of rows) {
|
|
336
|
+
const hour = byHour.get(row.date);
|
|
337
|
+
if (!hour) continue;
|
|
338
|
+
if (row.status === "completed") hour.completed = row.count;
|
|
339
|
+
else if (row.status === "failed") hour.failed = row.count;
|
|
340
|
+
else if (row.status === "blocked") hour.blocked = row.count;
|
|
341
|
+
}
|
|
342
|
+
return [...byHour.values()];
|
|
343
|
+
}
|
|
276
344
|
|
|
277
345
|
export {
|
|
278
346
|
recordTaskExecution,
|
|
279
347
|
readTaskExecutionSummaries,
|
|
280
348
|
readTaskExecutionDays,
|
|
349
|
+
readTaskExecutionHours,
|
|
281
350
|
readTaskExecutionByConversationId,
|
|
282
351
|
readTaskExecutions,
|
|
283
352
|
readTaskRuns,
|
|
284
|
-
readTaskExecutionStatusDays
|
|
353
|
+
readTaskExecutionStatusDays,
|
|
354
|
+
readTaskExecutionStatusHours
|
|
285
355
|
};
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-PDO5BLNM.js";
|
|
4
4
|
import {
|
|
5
5
|
botConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4Z7B5WVV.js";
|
|
7
7
|
import {
|
|
8
8
|
logWarn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3ADPXQBL.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/conversations/structured-events.ts
|
|
12
12
|
import {
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
formatProviderLabel,
|
|
9
9
|
startOAuthFlow
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SSR6YBWW.js";
|
|
11
11
|
import {
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7XO7PTZE.js";
|
|
15
15
|
import {
|
|
16
16
|
recordAuthorizationRequested
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VF3EDS7P.js";
|
|
18
18
|
import {
|
|
19
19
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-IBO4YFFZ.js";
|
|
21
21
|
import {
|
|
22
22
|
TURN_REASONING_LEVELS
|
|
23
23
|
} from "./chunk-D4YV5TDV.js";
|
|
24
24
|
import {
|
|
25
25
|
pluginCatalogRuntime
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FGYWKKTJ.js";
|
|
27
27
|
import {
|
|
28
28
|
credentialContextSchema
|
|
29
29
|
} from "./chunk-CEMMLV5L.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FGYWKKTJ.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-3ADPXQBL.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/skills.ts
|
|
12
12
|
import fs from "fs/promises";
|
|
@@ -83,7 +83,14 @@ var pluginOperationalBarChartWidgetSchema = z.object({
|
|
|
83
83
|
tone: pluginOperationalToneSchema.optional()
|
|
84
84
|
}).strict()
|
|
85
85
|
).min(1).max(8),
|
|
86
|
-
timeRangeDays: z.array(
|
|
86
|
+
timeRangeDays: z.array(
|
|
87
|
+
z.union([
|
|
88
|
+
z.literal(1),
|
|
89
|
+
z.literal(7),
|
|
90
|
+
z.literal(30),
|
|
91
|
+
z.literal(90)
|
|
92
|
+
])
|
|
93
|
+
).min(1).max(4).optional(),
|
|
87
94
|
title: z.string().min(1),
|
|
88
95
|
type: z.literal("bar_chart")
|
|
89
96
|
}).strict();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runWithTurnRequestDeadline
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SZ2O3CGS.js";
|
|
4
4
|
import {
|
|
5
5
|
QUEUE_SIGNATURE_MAX_AGE_MS,
|
|
6
6
|
createVercelQueueClient,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-7H2VZTWN.js";
|
|
10
10
|
import {
|
|
11
11
|
logWarn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3ADPXQBL.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-H5I7R3LJ.js");
|
|
133
133
|
await processPluginTask(message);
|
|
134
134
|
},
|
|
135
135
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
isDmChannel,
|
|
9
9
|
normalizeSlackConversationId,
|
|
10
10
|
withSlackRetries
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BUTAWPUV.js";
|
|
12
12
|
import {
|
|
13
13
|
parseDestination
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AKR6W7VV.js";
|
|
15
15
|
import {
|
|
16
16
|
getStateAdapter
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LRTEMMCZ.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeSlackEmojiName
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4Z7B5WVV.js";
|
|
21
21
|
import {
|
|
22
22
|
pluginCatalogRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FGYWKKTJ.js";
|
|
24
24
|
import {
|
|
25
25
|
parseSlackMessageTs,
|
|
26
26
|
parseSlackUserId
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
isRecord,
|
|
30
30
|
logInfo,
|
|
31
31
|
logWarn
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-3ADPXQBL.js";
|
|
33
33
|
|
|
34
34
|
// src/chat/agent/types.ts
|
|
35
35
|
var RetryableDeliveryError = class extends Error {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
authenticationUnlinkedEvent,
|
|
8
8
|
fallbackShortTitle,
|
|
9
9
|
generateShortTitle
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OBN7UEQJ.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-AKR6W7VV.js";
|
|
20
20
|
import {
|
|
21
21
|
SANDBOX_REPOS_ROOT,
|
|
22
22
|
SANDBOX_WORKSPACE_ROOT,
|
|
23
23
|
sleep
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6LX6KV5C.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-LRTEMMCZ.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-4Z7B5WVV.js";
|
|
44
44
|
import {
|
|
45
45
|
parseSlackMessageTs,
|
|
46
46
|
toStoredSlackActor
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
logException,
|
|
51
51
|
logWarn,
|
|
52
52
|
setSpanAttributes
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-3ADPXQBL.js";
|
|
54
54
|
|
|
55
55
|
// src/chat/turn-context-tag.ts
|
|
56
56
|
var TURN_CONTEXT_TAG = "runtime-turn-context";
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveBaseUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SSR6YBWW.js";
|
|
4
4
|
import {
|
|
5
5
|
createPluginLogger,
|
|
6
6
|
getPlugins,
|
|
7
7
|
getSlackClient,
|
|
8
8
|
withSlackRetries
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BUTAWPUV.js";
|
|
10
10
|
import {
|
|
11
11
|
getDb,
|
|
12
12
|
parseDestination
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AKR6W7VV.js";
|
|
14
14
|
import {
|
|
15
15
|
sleep
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6LX6KV5C.js";
|
|
17
17
|
import {
|
|
18
18
|
acquireActiveLock,
|
|
19
19
|
getStateAdapter
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LRTEMMCZ.js";
|
|
21
21
|
import {
|
|
22
22
|
pluginCatalogRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FGYWKKTJ.js";
|
|
24
24
|
import {
|
|
25
25
|
fetchWithBoundedOAuthErrorBodies
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-6FCKJDKS.js";
|
|
27
27
|
import {
|
|
28
28
|
isRecord
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3ADPXQBL.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/capabilities/router.ts
|
|
32
32
|
var ProviderCredentialRouter = class {
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Z4DNJI5F.js";
|
|
6
6
|
import {
|
|
7
7
|
clearPendingAuth,
|
|
8
8
|
markTurnClosed,
|
|
9
9
|
markTurnCompleted
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7XO7PTZE.js";
|
|
11
11
|
import {
|
|
12
12
|
hydrateConversationMessages,
|
|
13
13
|
markConversationMessage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VF3EDS7P.js";
|
|
15
15
|
import {
|
|
16
16
|
buildDeterministicTurnId
|
|
17
17
|
} from "./chunk-DA2KGZZI.js";
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
findProviderError,
|
|
21
21
|
getProviderErrorAttributes,
|
|
22
22
|
getProviderErrorUserMessage
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-4Z7B5WVV.js";
|
|
24
24
|
import {
|
|
25
25
|
parseSlackMessageTs
|
|
26
26
|
} from "./chunk-N7TMSOZH.js";
|
|
27
27
|
import {
|
|
28
28
|
buildTurnFailureResponse
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3ADPXQBL.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/runtime/delivered-turn-state.ts
|
|
32
32
|
function buildDeliveredTurnStatePatch(args) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VF3EDS7P.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-AKR6W7VV.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IBO4YFFZ.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LRTEMMCZ.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-3ADPXQBL.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/state/conversation.ts
|
|
26
26
|
function defaultConversationState() {
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAgentRun
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-4B4DQGOM.js";
|
|
4
|
+
import "../chunk-PXP2M32M.js";
|
|
5
5
|
import "../chunk-6Y5B5PEX.js";
|
|
6
6
|
import "../chunk-DIB4GX3G.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-YE6DVM43.js";
|
|
8
8
|
import {
|
|
9
9
|
createAgentRunner
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-SSR6YBWW.js";
|
|
11
|
+
import "../chunk-7XO7PTZE.js";
|
|
12
|
+
import "../chunk-VF3EDS7P.js";
|
|
13
13
|
import "../chunk-2LYHWMR4.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-EIYOABL4.js";
|
|
15
|
+
import "../chunk-4WIA45WD.js";
|
|
16
|
+
import "../chunk-G4E5WIRL.js";
|
|
17
17
|
import "../chunk-DA2KGZZI.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-OBN7UEQJ.js";
|
|
19
|
+
import "../chunk-3UJSII43.js";
|
|
20
20
|
import "../chunk-PDO5BLNM.js";
|
|
21
21
|
import "../chunk-UIE3R5XU.js";
|
|
22
22
|
import "../chunk-X6GDDWQH.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-SZ2O3CGS.js";
|
|
24
24
|
import "../chunk-DKIJ2RP5.js";
|
|
25
25
|
import "../chunk-JAL3CH4G.js";
|
|
26
26
|
import "../chunk-7H2VZTWN.js";
|
|
27
27
|
import {
|
|
28
28
|
loadAppPluginSet
|
|
29
29
|
} from "../chunk-Y2CM7HXH.js";
|
|
30
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-BUTAWPUV.js";
|
|
31
31
|
import "../chunk-3Y47VMHV.js";
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
35
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-AKR6W7VV.js";
|
|
33
|
+
import "../chunk-IBO4YFFZ.js";
|
|
34
|
+
import "../chunk-6LX6KV5C.js";
|
|
35
|
+
import "../chunk-LRTEMMCZ.js";
|
|
36
36
|
import "../chunk-GFBR4S3Q.js";
|
|
37
37
|
import "../chunk-VFUK3X5B.js";
|
|
38
|
-
import "../chunk-
|
|
38
|
+
import "../chunk-4Z7B5WVV.js";
|
|
39
39
|
import "../chunk-D4YV5TDV.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
43
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-EYNUOZCN.js";
|
|
41
|
+
import "../chunk-PYVGXGKC.js";
|
|
42
|
+
import "../chunk-FGYWKKTJ.js";
|
|
43
|
+
import "../chunk-6FCKJDKS.js";
|
|
44
44
|
import "../chunk-CEMMLV5L.js";
|
|
45
45
|
import "../chunk-N7TMSOZH.js";
|
|
46
46
|
import "../chunk-DWPN6SCH.js";
|
|
47
47
|
import "../chunk-TXKUKMVO.js";
|
|
48
|
-
import "../chunk-
|
|
48
|
+
import "../chunk-3ADPXQBL.js";
|
|
49
49
|
import "../chunk-PEQXYSSE.js";
|
|
50
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-ARSUYYQG.js";
|
|
51
51
|
|
|
52
52
|
// src/cli/chat.ts
|
|
53
53
|
import {
|
|
@@ -169,10 +169,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
169
169
|
databaseModule
|
|
170
170
|
] = await Promise.all([
|
|
171
171
|
import("../plugins-YTYJMMJF.js"),
|
|
172
|
-
import("../agent-hooks-
|
|
173
|
-
import("../catalog-runtime-
|
|
174
|
-
import("../validation-
|
|
175
|
-
import("../db-
|
|
172
|
+
import("../agent-hooks-3JY76L5X.js"),
|
|
173
|
+
import("../catalog-runtime-5JVLWXRY.js"),
|
|
174
|
+
import("../validation-F4KYLIF2.js"),
|
|
175
|
+
import("../db-LRM6AP66.js")
|
|
176
176
|
]);
|
|
177
177
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
178
178
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -238,14 +238,14 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
238
238
|
await configureLocalChatPlugins(pluginSet);
|
|
239
239
|
const { setExperimentalFeatures } = await import("../experimental-P5FZM4CU.js");
|
|
240
240
|
setExperimentalFeatures({ subagents: true });
|
|
241
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
242
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
241
|
+
const { runLocalAgentTurn } = await import("../runner-RUXGS3E6.js");
|
|
242
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BKCDVYVH.js");
|
|
243
243
|
const { createLocalOAuthState } = await import("../oauth-relay-5XPVRPYB.js");
|
|
244
244
|
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-FIL7EGPR.js");
|
|
245
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
246
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
245
|
+
const { bindSpawnAgent } = await import("../spawn-HH7GH7XT.js");
|
|
246
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-UUNMNSML.js");
|
|
247
247
|
const { createLocalConversationWork } = await import("../conversation-work-VIOQ5ZF3.js");
|
|
248
|
-
const { processConversationWork } = await import("../worker-
|
|
248
|
+
const { processConversationWork } = await import("../worker-PMIJ5NLD.js");
|
|
249
249
|
let agentRunner;
|
|
250
250
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
251
251
|
if (!agentRunner) {
|