@sentry/junior 0.159.0 → 0.161.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-IAD3AANZ.js → agent-hooks-O75UJNC6.js} +13 -10
- package/dist/api/conversations/events.d.ts +1 -1
- package/dist/api/locations/detail.d.ts +17 -0
- package/dist/api/people/plugin-reports.d.ts +7 -0
- package/dist/api/schema/conversation.d.ts +109 -8
- package/dist/api/schema/location.d.ts +29 -0
- package/dist/api/schema/person.d.ts +29 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +137 -27
- package/dist/app.js +73 -42
- package/dist/{catalog-runtime-6VANKLH5.js → catalog-runtime-Z3FHU4ZY.js} +5 -5
- package/dist/chat/artifacts/store.d.ts +42 -0
- package/dist/chat/conversations/history.d.ts +31 -1
- package/dist/chat/conversations/projection.d.ts +13 -0
- package/dist/chat/plugins/agent-hooks.d.ts +9 -1
- package/dist/chat/plugins/annotations.d.ts +3 -0
- package/dist/chat/plugins/conversation-sidebar.d.ts +3 -0
- package/dist/chat/plugins/viewer.d.ts +4 -0
- package/dist/chat/slack/mrkdwn.d.ts +3 -4
- package/dist/chat/slack/tools/send-files.d.ts +2 -2
- package/dist/chat/tool-support/action-review.d.ts +5 -4
- package/dist/chat/tools/publish-image.d.ts +44 -0
- package/dist/chat/tools/search-conversation-events.d.ts +1 -1
- package/dist/chat/tools/unpublish-image.d.ts +35 -0
- package/dist/{chunk-YSMAMSOU.js → chunk-4WAZ6DGX.js} +10 -10
- package/dist/{chunk-AIQKUJKK.js → chunk-6ILVZOF6.js} +4 -4
- package/dist/{chunk-YCBZ47LC.js → chunk-6WTDZKFR.js} +1 -1
- package/dist/{chunk-CNHELV2P.js → chunk-CGAIDDLD.js} +1 -1
- package/dist/{chunk-U7D4VLUF.js → chunk-DGKLYDX7.js} +2 -2
- package/dist/{chunk-TD7ZQZ5W.js → chunk-DNSIU27S.js} +1 -1
- package/dist/{chunk-PT7B6A3O.js → chunk-EAIQBR66.js} +1 -1
- package/dist/{chunk-O2DZWUPQ.js → chunk-FLMD25Y5.js} +239 -199
- package/dist/{chunk-FWDN67U3.js → chunk-G35DUPNB.js} +4 -4
- package/dist/{chunk-UG673UVL.js → chunk-HSFYTIS2.js} +1 -1
- package/dist/{chunk-WTQ3CKC3.js → chunk-IRHX2S46.js} +1 -1
- package/dist/{chunk-DXSZJAVZ.js → chunk-IW7C5C7E.js} +19 -21
- package/dist/{chunk-Q5X37U6G.js → chunk-IYFKONIL.js} +1 -1
- package/dist/{chunk-EBP6IS66.js → chunk-MNY5M7RB.js} +537 -27
- package/dist/{chunk-6IADZQJR.js → chunk-MVG5UPLM.js} +1 -1
- package/dist/{chunk-27UQ7UB3.js → chunk-O7JTSJPU.js} +6 -6
- package/dist/{chunk-NCJV265M.js → chunk-OPIJ6HY3.js} +9 -9
- package/dist/{chunk-X7AIXRVJ.js → chunk-OY2DBUV4.js} +5 -5
- package/dist/{chunk-SQOVZSWF.js → chunk-OYQEO72I.js} +480 -125
- package/dist/{chunk-UP6KQVF5.js → chunk-QHXT7LLF.js} +1 -1
- package/dist/{chunk-UKKOKMRE.js → chunk-QQ7SY5IZ.js} +5 -5
- package/dist/{chunk-PQWWCKNB.js → chunk-RULQD7OX.js} +4 -4
- package/dist/{chunk-L2PEQ2PY.js → chunk-RVENVPNO.js} +2 -2
- package/dist/{chunk-EQXVKNLM.js → chunk-SA6BEEAB.js} +27 -9
- package/dist/{chunk-54O6IKUS.js → chunk-STZVUVMS.js} +40 -4
- package/dist/{chunk-QODFNKQS.js → chunk-U2XOBFDK.js} +17 -3
- package/dist/{chunk-AZW5HKC5.js → chunk-V67ORYKQ.js} +8 -10
- package/dist/{chunk-DJZPA72K.js → chunk-VXFDVY4C.js} +8 -36
- package/dist/{chunk-LUIKMY35.js → chunk-WKN4ZQTZ.js} +1 -1
- package/dist/{chunk-OGMHLKNO.js → chunk-WVSQ2SCS.js} +1 -1
- package/dist/{chunk-IJ6KWS3V.js → chunk-YSWHAOPQ.js} +1 -1
- package/dist/{chunk-NT6V5WEE.js → chunk-ZBCLWBMV.js} +5 -5
- package/dist/cli/chat.js +29 -30
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +12 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/db/schema/artifacts.d.ts +178 -0
- package/dist/db/schema.d.ts +179 -1
- package/dist/{db-BIIMAPFB.js → db-KKOZRE62.js} +7 -7
- package/dist/handlers/artifacts.d.ts +8 -0
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-4BENCPP3.js → oauth-callback-server-5AUZDWXA.js} +22 -23
- package/dist/{runner-TUBJLEYO.js → runner-K5H5NDEC.js} +12 -13
- package/dist/{skills-MBRLNBRV.js → skills-OZGPB6G4.js} +6 -6
- package/dist/spawn-RCQSC2L5.js +37 -0
- package/dist/{validation-YTJGRJYT.js → validation-TVHCNCYL.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-5MRHKA54.js → work-DXCQMJ5U.js} +17 -17
- package/dist/worker-24HZ5HRI.js +24 -0
- package/migrations/0028_artifacts.sql +16 -0
- package/migrations/meta/0028_snapshot.json +2685 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +4 -4
- package/dist/chunk-K2LAI7RW.js +0 -441
- package/dist/spawn-ZWIXA46E.js +0 -37
- package/dist/worker-S2V7HZJ4.js +0 -24
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
persistConversationMessages
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-STZVUVMS.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-U2XOBFDK.js";
|
|
10
10
|
import {
|
|
11
11
|
juniorLocationConfigurations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FLMD25Y5.js";
|
|
13
13
|
import {
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IYFKONIL.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-DNSIU27S.js";
|
|
24
24
|
|
|
25
25
|
// src/chat/conversations/turn-lifecycle.ts
|
|
26
26
|
var ConversationTurnLifecycleService = class {
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
} from "./chunk-EM225ITJ.js";
|
|
5
5
|
import {
|
|
6
6
|
getStateAdapter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IYFKONIL.js";
|
|
8
8
|
import {
|
|
9
9
|
toOptionalTrimmed
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RVENVPNO.js";
|
|
11
11
|
import {
|
|
12
12
|
pluginCatalogRuntime
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CGAIDDLD.js";
|
|
14
14
|
import {
|
|
15
15
|
setSpanAttributes,
|
|
16
16
|
setSpanStatus,
|
|
17
17
|
withSpan
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DNSIU27S.js";
|
|
19
19
|
|
|
20
20
|
// src/chat/sandbox/resources.ts
|
|
21
21
|
var configuredResources;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
toCanonicalInputMessage,
|
|
4
4
|
toCanonicalOutputMessage,
|
|
5
5
|
toGenAiMessagesTraceAttributes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EAIQBR66.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-DNSIU27S.js";
|
|
15
15
|
|
|
16
16
|
// src/chat/services/provider-error.ts
|
|
17
17
|
var ProviderError = class extends Error {
|
|
@@ -41,6 +41,7 @@ function activityDays(days, nowMs, count) {
|
|
|
41
41
|
import { z as z2 } from "zod";
|
|
42
42
|
import {
|
|
43
43
|
conversationAnnotationInputSchema,
|
|
44
|
+
conversationSidebarAnnotationSchema,
|
|
44
45
|
conversationEventPresentationSchema
|
|
45
46
|
} from "@sentry/junior-plugin-api";
|
|
46
47
|
var conversationReportStatusSchema = z2.enum([
|
|
@@ -166,6 +167,13 @@ var conversationSourceTaskSchema = z2.object({
|
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
169
|
});
|
|
170
|
+
var conversationAnnotationReportSchema = conversationAnnotationInputSchema.and(
|
|
171
|
+
z2.object({
|
|
172
|
+
plugin: z2.string().min(1),
|
|
173
|
+
createdAt: z2.string().datetime(),
|
|
174
|
+
updatedAt: z2.string().datetime()
|
|
175
|
+
})
|
|
176
|
+
);
|
|
169
177
|
var conversationSummaryReportSchema = z2.object({
|
|
170
178
|
displayTitle: z2.string(),
|
|
171
179
|
cumulativeDurationMs: z2.number(),
|
|
@@ -188,6 +196,14 @@ var conversationSummaryReportSchema = z2.object({
|
|
|
188
196
|
sentryTraceUrl: z2.string().optional(),
|
|
189
197
|
sourceUrl: z2.string().url().optional(),
|
|
190
198
|
traceId: z2.string().optional(),
|
|
199
|
+
/**
|
|
200
|
+
* Plugin-owned resource links for this conversation.
|
|
201
|
+
* Present on the conversation feed when the viewer can see private content.
|
|
202
|
+
* Clients must not fetch provider state while rendering these links.
|
|
203
|
+
*/
|
|
204
|
+
annotations: z2.array(conversationAnnotationReportSchema).optional(),
|
|
205
|
+
/** Plugin-selected annotations for the compact conversation row. */
|
|
206
|
+
sidebarAnnotations: z2.array(conversationSidebarAnnotationSchema).optional(),
|
|
191
207
|
assignedWork: z2.boolean().optional(),
|
|
192
208
|
finishedWorkAt: z2.string().datetime().optional(),
|
|
193
209
|
/**
|
|
@@ -362,6 +378,16 @@ var conversationReportStructuredEventDataSchema = z2.object({
|
|
|
362
378
|
turnId: z2.string().min(1).optional(),
|
|
363
379
|
presentation: conversationEventPresentationSchema
|
|
364
380
|
}).strict();
|
|
381
|
+
var conversationReportDeliveredAttachmentSchema = z2.object({
|
|
382
|
+
id: z2.string().min(1),
|
|
383
|
+
filename: z2.string().min(1),
|
|
384
|
+
contentType: z2.string().min(1),
|
|
385
|
+
bytes: z2.number().int().nonnegative()
|
|
386
|
+
}).strict();
|
|
387
|
+
var conversationReportAttachmentsDeliveredEventDataSchema = z2.object({
|
|
388
|
+
type: z2.literal("attachments_delivered"),
|
|
389
|
+
attachments: z2.array(conversationReportDeliveredAttachmentSchema).min(1)
|
|
390
|
+
}).strict();
|
|
365
391
|
var conversationReportCompactionEventDataSchema = z2.object({
|
|
366
392
|
type: z2.literal("compaction"),
|
|
367
393
|
modelProfile: z2.string().min(1).optional(),
|
|
@@ -403,6 +429,7 @@ var conversationReportEventDataSchema = z2.discriminatedUnion("type", [
|
|
|
403
429
|
conversationReportTurnLifecycleEventDataSchema,
|
|
404
430
|
conversationReportTurnContextEventDataSchema,
|
|
405
431
|
conversationReportStructuredEventDataSchema,
|
|
432
|
+
conversationReportAttachmentsDeliveredEventDataSchema,
|
|
406
433
|
conversationReportTurnRoutedEventDataSchema,
|
|
407
434
|
conversationReportGuardianActionReviewedEventDataSchema,
|
|
408
435
|
conversationReportCompactionEventDataSchema,
|
|
@@ -500,15 +527,6 @@ function validateConversationEvents(report, context) {
|
|
|
500
527
|
}
|
|
501
528
|
}
|
|
502
529
|
var conversationDetailReportSchema = conversationSummaryReportSchema.extend({
|
|
503
|
-
annotations: z2.array(
|
|
504
|
-
conversationAnnotationInputSchema.and(
|
|
505
|
-
z2.object({
|
|
506
|
-
plugin: z2.string().min(1),
|
|
507
|
-
createdAt: z2.string().datetime(),
|
|
508
|
-
updatedAt: z2.string().datetime()
|
|
509
|
-
})
|
|
510
|
-
)
|
|
511
|
-
).optional(),
|
|
512
530
|
modelUsage: z2.array(conversationModelUsageSchema).optional(),
|
|
513
531
|
events: z2.array(conversationReportEventSchema),
|
|
514
532
|
eventHistory: conversationEventHistorySchema,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
instructionProvenanceFor,
|
|
14
14
|
sanitizePostgresJson,
|
|
15
15
|
withConversationEventLock
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-U2XOBFDK.js";
|
|
17
17
|
import {
|
|
18
18
|
SANDBOX_WORKSPACE_ROOT,
|
|
19
19
|
sleep
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
fenceLock,
|
|
24
24
|
getStateAdapter,
|
|
25
25
|
withLock
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IYFKONIL.js";
|
|
27
27
|
import {
|
|
28
28
|
botConfig,
|
|
29
29
|
completeText,
|
|
30
30
|
escapeXml,
|
|
31
31
|
resolveGatewayModel,
|
|
32
32
|
unwrapCurrentInstruction
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RVENVPNO.js";
|
|
34
34
|
import {
|
|
35
35
|
parseSlackMessageTs,
|
|
36
36
|
toStoredSlackActor
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
logException,
|
|
41
41
|
logWarn,
|
|
42
42
|
setSpanAttributes
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-DNSIU27S.js";
|
|
44
44
|
|
|
45
45
|
// src/chat/turn-context-tag.ts
|
|
46
46
|
var TURN_CONTEXT_TAG = "runtime-turn-context";
|
|
@@ -1615,6 +1615,41 @@ async function recordToolExecutionStarted(args) {
|
|
|
1615
1615
|
}
|
|
1616
1616
|
]);
|
|
1617
1617
|
}
|
|
1618
|
+
function attachmentsDeliveredIdempotencyKey(args) {
|
|
1619
|
+
if (args.toolCallId) {
|
|
1620
|
+
return `attachments_delivered:tool:${args.toolCallId}`;
|
|
1621
|
+
}
|
|
1622
|
+
if (args.turnId) {
|
|
1623
|
+
return `attachments_delivered:turn:${args.turnId}:` + args.attachments.map((attachment) => attachment.id).sort().join(",");
|
|
1624
|
+
}
|
|
1625
|
+
return `attachments_delivered:${args.conversationId}:` + args.attachments.map((attachment) => attachment.id).sort().join(",");
|
|
1626
|
+
}
|
|
1627
|
+
async function recordAttachmentsDelivered(args) {
|
|
1628
|
+
if (args.attachments.length === 0) return;
|
|
1629
|
+
await getConversationEventStore().append(args.conversationId, [
|
|
1630
|
+
{
|
|
1631
|
+
// Retries after a successful Slack upload must not create duplicate rows.
|
|
1632
|
+
idempotencyKey: attachmentsDeliveredIdempotencyKey({
|
|
1633
|
+
attachments: args.attachments,
|
|
1634
|
+
conversationId: args.conversationId,
|
|
1635
|
+
...args.toolCallId ? { toolCallId: args.toolCallId } : {},
|
|
1636
|
+
...args.turnId ? { turnId: args.turnId } : {}
|
|
1637
|
+
}),
|
|
1638
|
+
data: {
|
|
1639
|
+
type: "attachments_delivered",
|
|
1640
|
+
attachments: args.attachments.map((attachment) => ({
|
|
1641
|
+
id: attachment.id,
|
|
1642
|
+
filename: attachment.filename,
|
|
1643
|
+
contentType: attachment.contentType,
|
|
1644
|
+
bytes: attachment.bytes
|
|
1645
|
+
})),
|
|
1646
|
+
...args.toolCallId ? { toolCallId: args.toolCallId } : {},
|
|
1647
|
+
...args.turnId ? { turnId: args.turnId } : {}
|
|
1648
|
+
},
|
|
1649
|
+
createdAtMs: args.createdAtMs ?? Date.now()
|
|
1650
|
+
}
|
|
1651
|
+
]);
|
|
1652
|
+
}
|
|
1618
1653
|
async function recordGuardianActionReviewed(args) {
|
|
1619
1654
|
await getConversationEventStore().append(args.conversationId, [
|
|
1620
1655
|
{
|
|
@@ -3175,6 +3210,7 @@ export {
|
|
|
3175
3210
|
loadTurnRoute,
|
|
3176
3211
|
recordTurnRoute,
|
|
3177
3212
|
recordToolExecutionStarted,
|
|
3213
|
+
recordAttachmentsDelivered,
|
|
3178
3214
|
recordGuardianActionReviewed,
|
|
3179
3215
|
ToolInputError,
|
|
3180
3216
|
MAX_TEXT_CHARS,
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
juniorConversations,
|
|
7
7
|
juniorIdentities,
|
|
8
8
|
juniorUsers
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FLMD25Y5.js";
|
|
10
10
|
import {
|
|
11
11
|
TURN_REASONING_LEVELS,
|
|
12
12
|
getChatConfig,
|
|
13
13
|
modelProfileSchema
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-RVENVPNO.js";
|
|
15
15
|
import {
|
|
16
16
|
juniorDestinations
|
|
17
17
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-V7YE4WCP.js";
|
|
23
23
|
import {
|
|
24
24
|
normalizeIdentityEmail
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DNSIU27S.js";
|
|
26
26
|
|
|
27
27
|
// src/chat/conversations/sql/store.ts
|
|
28
28
|
import { randomUUID as randomUUID2 } from "crypto";
|
|
@@ -1266,6 +1266,18 @@ var structuredConversationEventDataSchema = z3.object({
|
|
|
1266
1266
|
turnId: z3.string().min(1).optional(),
|
|
1267
1267
|
content: z3.record(z3.string(), z3.unknown())
|
|
1268
1268
|
}).strict();
|
|
1269
|
+
var deliveredAttachmentSchema = z3.object({
|
|
1270
|
+
id: z3.string().min(1),
|
|
1271
|
+
filename: z3.string().min(1),
|
|
1272
|
+
contentType: z3.string().min(1),
|
|
1273
|
+
bytes: z3.number().int().nonnegative()
|
|
1274
|
+
}).strict();
|
|
1275
|
+
var attachmentsDeliveredEventDataSchema = z3.object({
|
|
1276
|
+
type: z3.literal("attachments_delivered"),
|
|
1277
|
+
attachments: z3.array(deliveredAttachmentSchema).min(1),
|
|
1278
|
+
toolCallId: z3.string().min(1).optional(),
|
|
1279
|
+
turnId: z3.string().min(1).optional()
|
|
1280
|
+
}).strict();
|
|
1269
1281
|
var turnCompletedEventDataSchema = z3.object({
|
|
1270
1282
|
type: z3.literal("turn_completed"),
|
|
1271
1283
|
turnId: z3.string().min(1),
|
|
@@ -1310,6 +1322,7 @@ var appendableConversationEventDataSchema = z3.union([
|
|
|
1310
1322
|
turnStartedEventDataSchema,
|
|
1311
1323
|
turnContextEventDataSchema,
|
|
1312
1324
|
structuredConversationEventDataSchema,
|
|
1325
|
+
attachmentsDeliveredEventDataSchema,
|
|
1313
1326
|
turnRoutedEventDataSchema,
|
|
1314
1327
|
turnCompletedEventDataSchema,
|
|
1315
1328
|
turnFailedEventDataSchema,
|
|
@@ -1338,6 +1351,7 @@ var KNOWN_CONVERSATION_EVENT_TYPES = [
|
|
|
1338
1351
|
"turn_started",
|
|
1339
1352
|
"turn_context",
|
|
1340
1353
|
"structured_event",
|
|
1354
|
+
"attachments_delivered",
|
|
1341
1355
|
"turn_routed",
|
|
1342
1356
|
"turn_completed",
|
|
1343
1357
|
"turn_failed",
|
|
@@ -3,38 +3,36 @@ import {
|
|
|
3
3
|
} from "./chunk-RF6J3DIO.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VXFDVY4C.js";
|
|
7
7
|
import {
|
|
8
8
|
isExperimentalFeatureEnabled
|
|
9
9
|
} from "./chunk-5IDFPCON.js";
|
|
10
10
|
import {
|
|
11
11
|
createPluginLogger,
|
|
12
|
-
getPlugins
|
|
13
|
-
} from "./chunk-EBP6IS66.js";
|
|
14
|
-
import {
|
|
12
|
+
getPlugins,
|
|
15
13
|
getSlackClient,
|
|
16
14
|
withSlackRetries
|
|
17
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MNY5M7RB.js";
|
|
18
16
|
import {
|
|
19
17
|
getDb,
|
|
20
18
|
parseDestination
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-U2XOBFDK.js";
|
|
22
20
|
import {
|
|
23
21
|
sleep
|
|
24
22
|
} from "./chunk-EM225ITJ.js";
|
|
25
23
|
import {
|
|
26
24
|
acquireActiveLock,
|
|
27
25
|
getStateAdapter
|
|
28
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-IYFKONIL.js";
|
|
29
27
|
import {
|
|
30
28
|
pluginCatalogRuntime
|
|
31
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CGAIDDLD.js";
|
|
32
30
|
import {
|
|
33
31
|
fetchWithBoundedOAuthErrorBodies
|
|
34
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-6WTDZKFR.js";
|
|
35
33
|
import {
|
|
36
34
|
isRecord
|
|
37
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-DNSIU27S.js";
|
|
38
36
|
|
|
39
37
|
// src/chat/capabilities/router.ts
|
|
40
38
|
var ProviderCredentialRouter = class {
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SlackActionError,
|
|
3
|
+
applyPluginFormatMarkdown,
|
|
3
4
|
getSlackClient,
|
|
4
5
|
isDmChannel,
|
|
5
6
|
normalizeSlackConversationId,
|
|
6
7
|
withSlackRetries
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MNY5M7RB.js";
|
|
8
9
|
import {
|
|
9
10
|
parseDestination
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U2XOBFDK.js";
|
|
11
12
|
import {
|
|
12
13
|
getStateAdapter
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IYFKONIL.js";
|
|
14
15
|
import {
|
|
15
16
|
normalizeSlackEmojiName
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RVENVPNO.js";
|
|
17
18
|
import {
|
|
18
19
|
pluginCatalogRuntime
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CGAIDDLD.js";
|
|
20
21
|
import {
|
|
21
22
|
parseSlackMessageTs,
|
|
22
23
|
parseSlackUserId
|
|
@@ -25,7 +26,7 @@ import {
|
|
|
25
26
|
isRecord,
|
|
26
27
|
logInfo,
|
|
27
28
|
logWarn
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-DNSIU27S.js";
|
|
29
30
|
|
|
30
31
|
// src/chat/slack/outbound.ts
|
|
31
32
|
var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
|
|
@@ -379,29 +380,6 @@ function hasUnmatchedClosingParen(text) {
|
|
|
379
380
|
}
|
|
380
381
|
return balance < 0;
|
|
381
382
|
}
|
|
382
|
-
var GITHUB_OWNER_PATTERN = "[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?";
|
|
383
|
-
var GITHUB_REPO_PATTERN = "[A-Za-z0-9._-]+";
|
|
384
|
-
var GITHUB_REPO_ISSUE_REF_PATTERN = new RegExp(
|
|
385
|
-
`^(${GITHUB_OWNER_PATTERN})\\/(${GITHUB_REPO_PATTERN})#(\\d+)\\b`
|
|
386
|
-
);
|
|
387
|
-
function isGitHubRefBoundary(char) {
|
|
388
|
-
return char === void 0 || !/[A-Za-z0-9._-]/.test(char);
|
|
389
|
-
}
|
|
390
|
-
function readGitHubRepoIssueRef(line, start) {
|
|
391
|
-
if (!isGitHubRefBoundary(start === 0 ? void 0 : line[start - 1])) {
|
|
392
|
-
return void 0;
|
|
393
|
-
}
|
|
394
|
-
const match = GITHUB_REPO_ISSUE_REF_PATTERN.exec(line.slice(start));
|
|
395
|
-
if (!match) {
|
|
396
|
-
return void 0;
|
|
397
|
-
}
|
|
398
|
-
const [text, owner, repo, number] = match;
|
|
399
|
-
return {
|
|
400
|
-
text,
|
|
401
|
-
end: start + text.length,
|
|
402
|
-
url: `https://github.com/${owner}/${repo}/issues/${number}`
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
383
|
function readBareUrl(line, start) {
|
|
406
384
|
let end = start;
|
|
407
385
|
while (end < line.length) {
|
|
@@ -459,12 +437,6 @@ function wrapBareUrlsOnLine(line) {
|
|
|
459
437
|
continue;
|
|
460
438
|
}
|
|
461
439
|
}
|
|
462
|
-
const repoIssueRef = readGitHubRepoIssueRef(line, i);
|
|
463
|
-
if (repoIssueRef) {
|
|
464
|
-
result += `[${repoIssueRef.text}](${repoIssueRef.url})`;
|
|
465
|
-
i = repoIssueRef.end;
|
|
466
|
-
continue;
|
|
467
|
-
}
|
|
468
440
|
result += line[i];
|
|
469
441
|
i++;
|
|
470
442
|
}
|
|
@@ -517,7 +489,7 @@ function ensureBlockSpacing(text) {
|
|
|
517
489
|
return result.join("\n");
|
|
518
490
|
}
|
|
519
491
|
function normalizeSlackReplyMarkdown(text) {
|
|
520
|
-
let normalized = text.replace(/\r\n?/g, "\n").replace(/[ \t]+$/gm, "");
|
|
492
|
+
let normalized = applyPluginFormatMarkdown(text).replace(/\r\n?/g, "\n").replace(/[ \t]+$/gm, "");
|
|
521
493
|
normalized = wrapBareUrls(normalized);
|
|
522
494
|
normalized = ensureBlockSpacing(normalized);
|
|
523
495
|
return normalized.replace(/\n{3,}/g, "\n\n").trim();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolInputError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-STZVUVMS.js";
|
|
4
4
|
import {
|
|
5
5
|
canRouteResourceEvents,
|
|
6
6
|
getPlugins
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MNY5M7RB.js";
|
|
8
8
|
import {
|
|
9
9
|
getDb
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-U2XOBFDK.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-FLMD25Y5.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-DNSIU27S.js";
|
|
25
25
|
|
|
26
26
|
// src/chat/event-tasks/store.ts
|
|
27
27
|
import { and, asc, desc, eq, inArray, or, sql } from "drizzle-orm";
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,45 +1,44 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAgentRun
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-OYQEO72I.js";
|
|
4
|
+
import "../chunk-OY2DBUV4.js";
|
|
5
5
|
import "../chunk-DIB4GX3G.js";
|
|
6
6
|
import {
|
|
7
7
|
createAgentRunner
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-V67ORYKQ.js";
|
|
9
9
|
import "../chunk-RF6J3DIO.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-VXFDVY4C.js";
|
|
11
11
|
import "../chunk-7MA4HV4W.js";
|
|
12
12
|
import "../chunk-5IDFPCON.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-RULQD7OX.js";
|
|
14
|
+
import "../chunk-ZBCLWBMV.js";
|
|
15
|
+
import "../chunk-YSWHAOPQ.js";
|
|
16
|
+
import "../chunk-STZVUVMS.js";
|
|
17
17
|
import "../chunk-3Y47VMHV.js";
|
|
18
18
|
import "../chunk-PDO5BLNM.js";
|
|
19
19
|
import "../chunk-UIE3R5XU.js";
|
|
20
20
|
import {
|
|
21
21
|
loadAppPluginSet
|
|
22
22
|
} from "../chunk-Y2CM7HXH.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-O2DZWUPQ.js";
|
|
23
|
+
import "../chunk-MNY5M7RB.js";
|
|
24
|
+
import "../chunk-U2XOBFDK.js";
|
|
25
|
+
import "../chunk-FLMD25Y5.js";
|
|
27
26
|
import "../chunk-EM225ITJ.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-IYFKONIL.js";
|
|
28
|
+
import "../chunk-RVENVPNO.js";
|
|
30
29
|
import "../chunk-VFUK3X5B.js";
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
34
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-EAIQBR66.js";
|
|
31
|
+
import "../chunk-DGKLYDX7.js";
|
|
32
|
+
import "../chunk-CGAIDDLD.js";
|
|
33
|
+
import "../chunk-6WTDZKFR.js";
|
|
35
34
|
import "../chunk-BDUENQD3.js";
|
|
36
35
|
import "../chunk-V7YE4WCP.js";
|
|
37
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-DNSIU27S.js";
|
|
38
37
|
import "../chunk-6GWA276C.js";
|
|
39
38
|
import "../chunk-OOUNJNMR.js";
|
|
40
39
|
import "../chunk-H4HBKISO.js";
|
|
41
|
-
import "../chunk-
|
|
42
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-WVSQ2SCS.js";
|
|
41
|
+
import "../chunk-WKN4ZQTZ.js";
|
|
43
42
|
import "../chunk-MLKGABMK.js";
|
|
44
43
|
|
|
45
44
|
// src/cli/chat.ts
|
|
@@ -162,10 +161,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
162
161
|
databaseModule
|
|
163
162
|
] = await Promise.all([
|
|
164
163
|
import("../plugins-HW4VWW6G.js"),
|
|
165
|
-
import("../agent-hooks-
|
|
166
|
-
import("../catalog-runtime-
|
|
167
|
-
import("../validation-
|
|
168
|
-
import("../db-
|
|
164
|
+
import("../agent-hooks-O75UJNC6.js"),
|
|
165
|
+
import("../catalog-runtime-Z3FHU4ZY.js"),
|
|
166
|
+
import("../validation-TVHCNCYL.js"),
|
|
167
|
+
import("../db-KKOZRE62.js")
|
|
169
168
|
]);
|
|
170
169
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
171
170
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -231,14 +230,14 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
231
230
|
await configureLocalChatPlugins(pluginSet);
|
|
232
231
|
const { setExperimentalFeatures } = await import("../experimental-HH6OM6UH.js");
|
|
233
232
|
setExperimentalFeatures({ subagents: true });
|
|
234
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
235
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
233
|
+
const { runLocalAgentTurn } = await import("../runner-K5H5NDEC.js");
|
|
234
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-5AUZDWXA.js");
|
|
236
235
|
const { createLocalOAuthState } = await import("../oauth-relay-3ZU72UGL.js");
|
|
237
236
|
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-U3ZX7C5W.js");
|
|
238
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
239
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
237
|
+
const { bindSpawnAgent } = await import("../spawn-RCQSC2L5.js");
|
|
238
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-DXCQMJ5U.js");
|
|
240
239
|
const { createLocalConversationWork } = await import("../conversation-work-KATFHLG3.js");
|
|
241
|
-
const { processConversationWork } = await import("../worker-
|
|
240
|
+
const { processConversationWork } = await import("../worker-24HZ5HRI.js");
|
|
242
241
|
let agentRunner;
|
|
243
242
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
244
243
|
if (!agentRunner) {
|
package/dist/cli/check.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DGKLYDX7.js";
|
|
4
|
+
import "../chunk-CGAIDDLD.js";
|
|
5
5
|
import {
|
|
6
6
|
parseInlinePluginManifest,
|
|
7
7
|
parsePluginManifest
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-6WTDZKFR.js";
|
|
9
9
|
import "../chunk-BDUENQD3.js";
|
|
10
10
|
import "../chunk-V7YE4WCP.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-DNSIU27S.js";
|
|
12
12
|
import "../chunk-6GWA276C.js";
|
|
13
13
|
import "../chunk-OOUNJNMR.js";
|
|
14
14
|
import "../chunk-H4HBKISO.js";
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
17
17
|
JUNIOR_HEARTBEAT_ROUTE,
|
|
18
18
|
LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-WVSQ2SCS.js";
|
|
20
|
+
import "../chunk-WKN4ZQTZ.js";
|
|
21
21
|
import "../chunk-MLKGABMK.js";
|
|
22
22
|
|
|
23
23
|
// src/cli/check.ts
|