@sentry/junior 0.259.0 → 0.261.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/{adapter-Bn0gFVSF.js → adapter-Bx_1B2De.js} +1 -1
- package/dist/{admin-C8xz2f10.js → admin-BAbbVgVc.js} +1 -1
- package/dist/{agent-hooks-B00FaKdP.js → agent-hooks-ghyZZQqB.js} +721 -704
- package/dist/{agent-runner-CPSd7rKm.js → agent-runner-g110-xgg.js} +688 -2223
- package/dist/api/schema.d.ts +210 -54
- package/dist/api/schema.js +3 -3
- package/dist/api.js +161 -73
- package/dist/{app-Bbxrehjf.d.ts → app-VCiPQ65Q.d.ts} +6 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +36 -35
- package/dist/{assistant-reply-CqthTerd.js → assistant-reply-CQcMaWNL.js} +1 -1
- package/dist/{automation-DWBFBenG.js → automation-DrpcA-SX.js} +3 -0
- package/dist/{briefs-DNYbQ9cD.js → briefs-CKcfrIQL.js} +4 -4
- package/dist/{catalog-runtime-B8SuFPGb.js → catalog-runtime-cd60vzAB.js} +1 -1
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +1 -1
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-BZdxgKyL.js → client-2i0JJpoC.js} +2 -2
- package/dist/{config-Deqpfpg9.js → config-C9qM41O0.js} +2 -2
- package/dist/{connections-9gJkfS85.js → connections-DrtTrwkp.js} +10 -10
- package/dist/{conversation-DjN3mlog.js → conversation-CvuKJ3tA.js} +108 -155
- package/dist/{conversation-privacy-CFhNKxp-.js → conversation-privacy-1iTiFX1O.js} +1 -1
- package/dist/{credential-sync-BABGymK3.js → credential-sync-wKNQ1dYc.js} +14 -15
- package/dist/{executor-Bb3eQb8q.js → executor-Rimyj8HZ.js} +3 -2
- package/dist/{images-BbSdVHC6.js → images-D1JggcVY.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-vdGU-5ge.js → job-queue-BjQdSqA3.js} +1 -1
- package/dist/{logging-BStXN56b.js → logging-BLTa7R7f.js} +1 -1
- package/dist/{message-DRf6m4uO.js → message-DAeP5WWW.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-JmOgLcGl.js → oauth-callback-server-BAy1hhF1.js} +2 -2
- package/dist/{profile-qBM6B_-V.js → profile-CthM2qFM.js} +24 -24
- package/dist/{prompt-xgpyMtg7.js → prompt-DeVax2qO.js} +1 -1
- package/dist/{registry-B_M_x_iS.js → registry-BnSaArNb.js} +1 -1
- package/dist/{resolve-BzpuLh8c.js → resolve-B5eLRl0v.js} +9 -5
- package/dist/{result-DEZH_AnZ.js → result-Cvm0GZCv.js} +9 -14
- package/dist/{runner-BqQlG10t.js → runner-D-pUzHbU.js} +11 -11
- package/dist/{sandbox-egress-signals-DCq3WLs5.js → sandbox-egress-signals-mvwGV7rl.js} +1 -1
- package/dist/{schema-CF9HqNRY.js → schema-OzL8Zw4H.js} +68 -3
- package/dist/{service-account-BzhW7kXu.js → service-account-Ch1uIpnR.js} +3 -3
- package/dist/{service-account-BqTBkyD7.js → service-account-DWxvpSfd.js} +3 -3
- package/dist/{session-stop-CV65ZlU3.js → session-stop-Boj_zpTa.js} +180 -22
- package/dist/{skills-CiWS5_Ub.js → skills-BpdYCfFt.js} +2 -2
- package/dist/{spawn-BSAQ7UQZ.js → spawn-h1DJMQTf.js} +2 -2
- package/dist/{store-B1GES4gC.js → store-B6KqcdCQ.js} +6 -6
- package/dist/{task-queue-BAeGEMjJ.js → task-queue-BaDwKSYv.js} +3 -3
- package/dist/{task-runner-BlGhcQPi.js → task-runner-BAX5li9a.js} +10 -10
- package/dist/{tasks-DieKX3d4.js → tasks-uCfmlWga.js} +4170 -1606
- package/dist/thread-state-BJHVIz8G.js +184 -0
- package/dist/{turn-failure-response-DQljogGJ.js → turn-failure-response-CCC76P6-.js} +8 -9
- package/dist/{turn-lifecycle-BLgrkV_L.js → turn-lifecycle-pHSESVR9.js} +1 -1
- package/dist/{turn-session-routing-BlajheOU.js → turn-session-routing-BIKJZaiw.js} +1 -1
- package/dist/{validation-23d7K9tX.js → validation-B9KL_5Wc.js} +1 -1
- package/dist/{version-B_XumRx-.js → version-CN9BXMW_.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-B2_ABsYi.js → viewer-C5xFaYVi.js} +19 -10
- package/dist/{web-input-BZDyxpzR.js → web-input-D6eqfXYd.js} +38 -34
- package/dist/{work-D3QKiV0O.js → work-C-ecZAme.js} +9 -10
- package/dist/{worker-C8mUjYf9.js → worker-BpYDqiOf.js} +5 -5
- package/migrations/0061_workspace_vcpus.sql +1 -0
- package/migrations/meta/0061_snapshot.json +3471 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +10 -10
- package/dist/experimental-BNK1l1jv.js +0 -49
- package/dist/oauth-authorization-djQn5Nhy.js +0 -97
- package/dist/pending-auth-rG5U_QS1.js +0 -442
- package/dist/thread-state-DpSWS4Rr.js +0 -426
|
@@ -1,97 +1,6 @@
|
|
|
1
1
|
import { a as conversationTurnFailureReasonSchema, h as usageSchema, i as conversationTurnFailureCodeSchema } from "./history-AY8rs-FR.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
4
|
-
// src/chat/automations/card.ts
|
|
5
|
-
/** Saved automation facts shown with a Message, not a live status view. */
|
|
6
|
-
const automationCardSchema = z.object({
|
|
7
|
-
kind: z.literal("automation"),
|
|
8
|
-
id: z.string().min(1),
|
|
9
|
-
title: z.string().min(1).max(160),
|
|
10
|
-
url: z.string().url().nullable(),
|
|
11
|
-
instruction: z.string().max(4e3),
|
|
12
|
-
trigger: z.string().min(1),
|
|
13
|
-
warning: z.string().nullable()
|
|
14
|
-
}).strict();
|
|
15
|
-
/** Render saved card facts for text-only delivery and accessible fallbacks. */
|
|
16
|
-
function automationCardText(card) {
|
|
17
|
-
return [
|
|
18
|
-
card.title,
|
|
19
|
-
card.warning,
|
|
20
|
-
card.trigger,
|
|
21
|
-
card.instruction,
|
|
22
|
-
card.url,
|
|
23
|
-
`Automation ID: ${card.id}`
|
|
24
|
-
].filter(Boolean).join("\n");
|
|
25
|
-
}
|
|
26
|
-
// src/chat/conversations/cards.ts
|
|
27
|
-
const storedCardSchema = automationCardSchema.extend({ operation: z.enum([
|
|
28
|
-
"created",
|
|
29
|
-
"updated",
|
|
30
|
-
"deleted"
|
|
31
|
-
]).optional() });
|
|
32
|
-
/** Render each built-in card with its own text format. */
|
|
33
|
-
function messageCardText(card) {
|
|
34
|
-
switch (card.kind) {
|
|
35
|
-
case "object": return [
|
|
36
|
-
card.title,
|
|
37
|
-
card.label !== card.title ? card.label : void 0,
|
|
38
|
-
card.description,
|
|
39
|
-
card.status,
|
|
40
|
-
...objectFactFields(card.facts).map((field) => `${field.label}: ${field.value}`),
|
|
41
|
-
card.trigger,
|
|
42
|
-
card.warning,
|
|
43
|
-
card.url
|
|
44
|
-
].filter(Boolean).join("\n");
|
|
45
|
-
case "automation": return automationCardText(card);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/** Identify a deleted object whose pending card must be omitted. */
|
|
49
|
-
const removedCardSchema = z.object({
|
|
50
|
-
plugin: z.string().min(1),
|
|
51
|
-
key: z.string().min(1)
|
|
52
|
-
}).strict();
|
|
53
|
-
/** Store only the annotation identity with a Message. */
|
|
54
|
-
const messageCardRefSchema = removedCardSchema.extend({ kind: z.literal("object") });
|
|
55
|
-
/** Remove display facts before saving or reporting a Message card. */
|
|
56
|
-
function messageCardRef(card) {
|
|
57
|
-
return card.kind === "object" ? {
|
|
58
|
-
kind: "object",
|
|
59
|
-
plugin: card.plugin,
|
|
60
|
-
key: card.key
|
|
61
|
-
} : {
|
|
62
|
-
kind: "object",
|
|
63
|
-
plugin: "junior",
|
|
64
|
-
key: card.id
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/** Read references, including identities from older saved card snapshots. */
|
|
68
|
-
function readMessageCardRefs(value) {
|
|
69
|
-
return [...storedCardSchema.array().parse(value.cards ?? []).flatMap(({ operation, ...card }) => operation === "deleted" ? [] : [messageCardRef(card)]), ...messageCardRefSchema.strip().array().parse(value.objectCards ?? [])];
|
|
70
|
-
}
|
|
71
|
-
/** Resolve current saved facts without fetching providers or changing history. */
|
|
72
|
-
function resolveMessageCards(refs, annotations) {
|
|
73
|
-
return refs.map((ref) => {
|
|
74
|
-
const annotation = annotations.find((item) => item.kind === ref.kind && item.plugin === ref.plugin && item.key === ref.key);
|
|
75
|
-
return annotation ? annotationCard(annotation) : {
|
|
76
|
-
...ref,
|
|
77
|
-
objectType: "item",
|
|
78
|
-
title: ref.key,
|
|
79
|
-
label: ref.key,
|
|
80
|
-
url: null,
|
|
81
|
-
warning: "Saved annotation is unavailable."
|
|
82
|
-
};
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/** Copy saved annotation facts without storage timestamps for Message delivery. */
|
|
86
|
-
function annotationCard(annotation) {
|
|
87
|
-
const { createdAt: _createdAt, updatedAt: _updatedAt, ...value } = annotation;
|
|
88
|
-
return value.kind === "object" ? value : {
|
|
89
|
-
...value,
|
|
90
|
-
kind: "object",
|
|
91
|
-
objectType: value.objectType ?? "item",
|
|
92
|
-
title: value.label
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
4
|
// src/chat/briefs/schema.ts
|
|
96
5
|
/**
|
|
97
6
|
* Runtime schemas for the Brief record and the generator input. Both cross a
|
|
@@ -312,6 +221,97 @@ const messageAttachmentSchema = z.object({
|
|
|
312
221
|
function readMessageAttachments(value) {
|
|
313
222
|
return messageAttachmentSchema.array().parse(value ?? []);
|
|
314
223
|
}
|
|
224
|
+
// src/chat/automations/card.ts
|
|
225
|
+
/** Saved automation facts shown with a Message, not a live status view. */
|
|
226
|
+
const automationCardSchema = z.object({
|
|
227
|
+
kind: z.literal("automation"),
|
|
228
|
+
id: z.string().min(1),
|
|
229
|
+
title: z.string().min(1).max(160),
|
|
230
|
+
url: z.string().url().nullable(),
|
|
231
|
+
instruction: z.string().max(4e3),
|
|
232
|
+
trigger: z.string().min(1),
|
|
233
|
+
warning: z.string().nullable()
|
|
234
|
+
}).strict();
|
|
235
|
+
/** Render saved card facts for text-only delivery and accessible fallbacks. */
|
|
236
|
+
function automationCardText(card) {
|
|
237
|
+
return [
|
|
238
|
+
card.title,
|
|
239
|
+
card.warning,
|
|
240
|
+
card.trigger,
|
|
241
|
+
card.instruction,
|
|
242
|
+
card.url,
|
|
243
|
+
`Automation ID: ${card.id}`
|
|
244
|
+
].filter(Boolean).join("\n");
|
|
245
|
+
}
|
|
246
|
+
// src/chat/conversations/cards.ts
|
|
247
|
+
const storedCardSchema = automationCardSchema.extend({ operation: z.enum([
|
|
248
|
+
"created",
|
|
249
|
+
"updated",
|
|
250
|
+
"deleted"
|
|
251
|
+
]).optional() });
|
|
252
|
+
/** Render each built-in card with its own text format. */
|
|
253
|
+
function messageCardText(card) {
|
|
254
|
+
switch (card.kind) {
|
|
255
|
+
case "object": return [
|
|
256
|
+
card.title,
|
|
257
|
+
card.label !== card.title ? card.label : void 0,
|
|
258
|
+
card.description,
|
|
259
|
+
card.status,
|
|
260
|
+
...objectFactFields(card.facts).map((field) => `${field.label}: ${field.value}`),
|
|
261
|
+
card.trigger,
|
|
262
|
+
card.warning,
|
|
263
|
+
card.url
|
|
264
|
+
].filter(Boolean).join("\n");
|
|
265
|
+
case "automation": return automationCardText(card);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/** Identify a deleted object whose pending card must be omitted. */
|
|
269
|
+
const removedCardSchema = z.object({
|
|
270
|
+
plugin: z.string().min(1),
|
|
271
|
+
key: z.string().min(1)
|
|
272
|
+
}).strict();
|
|
273
|
+
/** Store only the annotation identity with a Message. */
|
|
274
|
+
const messageCardRefSchema = removedCardSchema.extend({ kind: z.literal("object") });
|
|
275
|
+
/** Remove display facts before saving or reporting a Message card. */
|
|
276
|
+
function messageCardRef(card) {
|
|
277
|
+
return card.kind === "object" ? {
|
|
278
|
+
kind: "object",
|
|
279
|
+
plugin: card.plugin,
|
|
280
|
+
key: card.key
|
|
281
|
+
} : {
|
|
282
|
+
kind: "object",
|
|
283
|
+
plugin: "junior",
|
|
284
|
+
key: card.id
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
/** Read references, including identities from older saved card snapshots. */
|
|
288
|
+
function readMessageCardRefs(value) {
|
|
289
|
+
return [...storedCardSchema.array().parse(value.cards ?? []).flatMap(({ operation, ...card }) => operation === "deleted" ? [] : [messageCardRef(card)]), ...messageCardRefSchema.strip().array().parse(value.objectCards ?? [])];
|
|
290
|
+
}
|
|
291
|
+
/** Resolve current saved facts without fetching providers or changing history. */
|
|
292
|
+
function resolveMessageCards(refs, annotations) {
|
|
293
|
+
return refs.map((ref) => {
|
|
294
|
+
const annotation = annotations.find((item) => item.kind === ref.kind && item.plugin === ref.plugin && item.key === ref.key);
|
|
295
|
+
return annotation ? annotationCard(annotation) : {
|
|
296
|
+
...ref,
|
|
297
|
+
objectType: "item",
|
|
298
|
+
title: ref.key,
|
|
299
|
+
label: ref.key,
|
|
300
|
+
url: null,
|
|
301
|
+
warning: "Saved annotation is unavailable."
|
|
302
|
+
};
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/** Copy saved annotation facts without storage timestamps for Message delivery. */
|
|
306
|
+
function annotationCard(annotation) {
|
|
307
|
+
const { createdAt: _createdAt, updatedAt: _updatedAt, ...value } = annotation;
|
|
308
|
+
return value.kind === "object" ? value : {
|
|
309
|
+
...value,
|
|
310
|
+
kind: "object",
|
|
311
|
+
objectType: value.objectType ?? "item",
|
|
312
|
+
title: value.label
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
315
|
// src/api/schema/child-agent-totals.ts
|
|
316
316
|
/**
|
|
317
317
|
* The part of a Conversation total that its child agents spent, at any depth.
|
|
@@ -462,6 +462,7 @@ const conversationAnnotationReportSchema = conversationAnnotationInputSchema.and
|
|
|
462
462
|
}));
|
|
463
463
|
const conversationActivityPreviewSchema = z.object({
|
|
464
464
|
createdAt: z.string().datetime(),
|
|
465
|
+
mentions: z.array(actorIdentitySchema).optional(),
|
|
465
466
|
role: z.enum(["assistant", "user"]),
|
|
466
467
|
text: z.string().min(1)
|
|
467
468
|
}).strict();
|
|
@@ -512,6 +513,13 @@ const conversationSummaryReportSchema = z.object({
|
|
|
512
513
|
isPriority: z.boolean().optional(),
|
|
513
514
|
unfinishedWork: z.boolean().optional()
|
|
514
515
|
}).strict();
|
|
516
|
+
/** One Event listed on a message that holds several Events. */
|
|
517
|
+
const conversationReportMessageEventSchema = z.object({
|
|
518
|
+
eventType: z.string().min(1),
|
|
519
|
+
label: z.string().min(1).optional(),
|
|
520
|
+
objectType: objectTypeSchema.optional(),
|
|
521
|
+
trustedSummary: z.string().min(1).optional()
|
|
522
|
+
}).strict();
|
|
515
523
|
const conversationReportMessageEventDataSchema = z.object({
|
|
516
524
|
type: z.literal("message"),
|
|
517
525
|
messageId: z.string().min(1),
|
|
@@ -522,11 +530,12 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
522
530
|
]),
|
|
523
531
|
source: z.enum(["slack", "web"]).optional(),
|
|
524
532
|
actorIdentity: actorIdentitySchema.optional(),
|
|
525
|
-
mentions: z.array(actorIdentitySchema).optional(),
|
|
526
533
|
eventType: z.string().min(1).optional(),
|
|
527
534
|
eventObjectType: objectTypeSchema.optional(),
|
|
528
535
|
explicitMention: z.boolean().optional(),
|
|
529
536
|
trustedSummary: z.string().min(1).optional(),
|
|
537
|
+
/** Every Event when several arrived together in one message. */
|
|
538
|
+
events: z.array(conversationReportMessageEventSchema).optional(),
|
|
530
539
|
cards: z.array(messageCardRefSchema).optional(),
|
|
531
540
|
text: z.string().optional(),
|
|
532
541
|
attachments: z.array(messageAttachmentSchema).optional(),
|
|
@@ -536,9 +545,9 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
536
545
|
code: "custom",
|
|
537
546
|
message: "message content must be text or explicitly redacted"
|
|
538
547
|
});
|
|
539
|
-
if (data.redacted && (data.actorIdentity || data.
|
|
548
|
+
if (data.redacted && (data.actorIdentity || data.cards || data.attachments || data.events)) context.addIssue({
|
|
540
549
|
code: "custom",
|
|
541
|
-
message: "redacted messages must not expose actor identity,
|
|
550
|
+
message: "redacted messages must not expose actor identity, cards, attachments, or events"
|
|
542
551
|
});
|
|
543
552
|
});
|
|
544
553
|
const conversationReportMessageHandledEventDataSchema = z.object({
|
|
@@ -743,6 +752,8 @@ const conversationReportEventSchema = z.object({
|
|
|
743
752
|
seq: z.number().int().nonnegative(),
|
|
744
753
|
createdAt: z.string().datetime(),
|
|
745
754
|
data: conversationReportEventDataSchema,
|
|
755
|
+
/** People mentioned in the event text, resolved at read time. */
|
|
756
|
+
mentions: z.array(actorIdentitySchema).optional(),
|
|
746
757
|
model: z.object({
|
|
747
758
|
modelId: z.string().min(1),
|
|
748
759
|
modelProfile: z.string().min(1).optional(),
|
|
@@ -872,6 +883,8 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
|
|
|
872
883
|
forks: z.array(z.string()).optional(),
|
|
873
884
|
brief: z.object({
|
|
874
885
|
content: conversationBriefSchema,
|
|
886
|
+
/** People mentioned in the Brief text, resolved at read time. */
|
|
887
|
+
mentions: z.array(actorIdentitySchema).optional(),
|
|
875
888
|
updatedAt: z.string().datetime(),
|
|
876
889
|
version: z.number().int().positive()
|
|
877
890
|
}).strict().optional(),
|
|
@@ -894,64 +907,4 @@ const conversationFeedSchema = z.object({
|
|
|
894
907
|
source: z.literal("conversation_index"),
|
|
895
908
|
generatedAt: z.string()
|
|
896
909
|
}).strict();
|
|
897
|
-
|
|
898
|
-
active: z.number(),
|
|
899
|
-
conversations: z.number(),
|
|
900
|
-
durationMs: z.number(),
|
|
901
|
-
failed: z.number(),
|
|
902
|
-
label: z.string(),
|
|
903
|
-
costUsd: z.number().optional(),
|
|
904
|
-
tokens: z.number().optional()
|
|
905
|
-
}).strict();
|
|
906
|
-
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) activity bucket key. */
|
|
907
|
-
const conversationMetricBucketSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/);
|
|
908
|
-
const conversationMetricDaySchema = z.object({
|
|
909
|
-
cachedInputTokens: z.number().optional(),
|
|
910
|
-
cacheCreationTokens: z.number().optional(),
|
|
911
|
-
conversations: z.number(),
|
|
912
|
-
costUsd: z.number().optional(),
|
|
913
|
-
date: conversationMetricBucketSchema,
|
|
914
|
-
durationMs: z.number(),
|
|
915
|
-
inputTokens: z.number().optional(),
|
|
916
|
-
tokens: z.number().optional()
|
|
917
|
-
}).strict();
|
|
918
|
-
const guardianMetricDaySchema = z.object({
|
|
919
|
-
allow: z.number(),
|
|
920
|
-
ask: z.number(),
|
|
921
|
-
costUsd: z.number().optional(),
|
|
922
|
-
date: conversationMetricBucketSchema,
|
|
923
|
-
deny: z.number(),
|
|
924
|
-
requests: z.number()
|
|
925
|
-
}).strict();
|
|
926
|
-
const guardianStatsSchema = z.object({
|
|
927
|
-
allow: z.number(),
|
|
928
|
-
ask: z.number(),
|
|
929
|
-
costUsd: z.number().optional(),
|
|
930
|
-
deny: z.number(),
|
|
931
|
-
metricDays: z.array(guardianMetricDaySchema),
|
|
932
|
-
metricHours: z.array(guardianMetricDaySchema).optional(),
|
|
933
|
-
metricSixHours: z.array(guardianMetricDaySchema).optional(),
|
|
934
|
-
requests: z.number()
|
|
935
|
-
}).strict();
|
|
936
|
-
const conversationStatsReportSchema = z.object({
|
|
937
|
-
active: z.number(),
|
|
938
|
-
cachedInputTokens: z.number().optional(),
|
|
939
|
-
cacheCreationTokens: z.number().optional(),
|
|
940
|
-
conversations: z.number(),
|
|
941
|
-
durationMs: z.number(),
|
|
942
|
-
failed: z.number(),
|
|
943
|
-
generatedAt: z.string(),
|
|
944
|
-
guardian: guardianStatsSchema,
|
|
945
|
-
metricDays: z.array(conversationMetricDaySchema),
|
|
946
|
-
metricHours: z.array(conversationMetricDaySchema).optional(),
|
|
947
|
-
metricSixHours: z.array(conversationMetricDaySchema).optional(),
|
|
948
|
-
locations: z.array(conversationStatsItemSchema),
|
|
949
|
-
actors: z.array(conversationStatsItemSchema),
|
|
950
|
-
source: z.literal("conversation_index"),
|
|
951
|
-
costUsd: z.number().optional(),
|
|
952
|
-
inputTokens: z.number().optional(),
|
|
953
|
-
tokens: z.number().optional(),
|
|
954
|
-
windowEnd: z.string(),
|
|
955
|
-
windowStart: z.string()
|
|
956
|
-
}).strict();
|
|
957
|
-
export { forkConversationBodySchema as A, briefLinkSchema as B, conversationReportEventSchema as C, conversationUsageSchema as D, conversationSummaryReportSchema as E, readMessageAttachments as F, messageCardRef as G, conversationBriefSchema as H, INPUT_IMAGE_TYPES as I, removedCardSchema as J, messageCardText as K, detectImageMediaType as L, conversationChildAgentTotalsSchema as M, MAX_INPUT_IMAGES as N, createConversationBodySchema as O, MAX_INPUT_IMAGE_BYTES as P, isVisionImageMediaType as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, parseBriefInput as U, briefOutcomeStatusSchema as V, annotationCard as W, resolveMessageCards as Y, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, forkConversationResponseSchema as j, createConversationMessageBodySchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, readMessageCardRefs as q, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, briefCodeChangeSchema as z };
|
|
910
|
+
export { forkConversationResponseSchema as A, readMessageAttachments as B, conversationReportEventSchema as C, createConversationBodySchema as D, conversationUsageSchema as E, readMessageCardRefs as F, briefLinkSchema as G, detectImageMediaType as H, removedCardSchema as I, parseBriefInput as J, briefOutcomeStatusSchema as K, resolveMessageCards as L, annotationCard as M, messageCardRef as N, createConversationMessageBodySchema as O, messageCardText as P, MAX_INPUT_IMAGES as R, conversationReportEventDataSchema as S, conversationSummaryReportSchema as T, isVisionImageMediaType as U, INPUT_IMAGE_TYPES as V, briefCodeChangeSchema as W, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, conversationChildAgentTotalsSchema as j, forkConversationBodySchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, conversationBriefSchema as q, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationReportMessageEventSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, MAX_INPUT_IMAGE_BYTES as z };
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as escapeXml } from "./client-
|
|
3
|
-
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-
|
|
4
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
1
|
+
import { $n as resolvePluginOAuthAccount, Et as getConversationPendingAuth, Fn as parseOAuthStatePayload, H as recordAuthenticationLinked, In as resolveBaseUrl, Pn as formatProviderLabel, Pt as getTurnRecord, U as recordAuthorizationCompleted, bn as createUserTokenStore, qn as postSlackMessage } from "./tasks-uCfmlWga.js";
|
|
2
|
+
import { p as escapeXml } from "./client-2i0JJpoC.js";
|
|
3
|
+
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-BLTa7R7f.js";
|
|
4
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-C9qM41O0.js";
|
|
5
5
|
import { f as parseSlackUserId } from "./actor-tlxzqaRe.js";
|
|
6
|
-
import { F as upsertIdentity, I as upsertLinkedIdentity, b as identityFromActor, f as getSqlExecutor, j as findUserByVerifiedEmails } from "./viewer-
|
|
6
|
+
import { F as upsertIdentity, I as upsertLinkedIdentity, b as identityFromActor, f as getSqlExecutor, j as findUserByVerifiedEmails } from "./viewer-C5xFaYVi.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJBompdd.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-9gJkfS85.js";
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BnSaArNb.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-cd60vzAB.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-BpdYCfFt.js";
|
|
11
|
+
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-g110-xgg.js";
|
|
12
|
+
import { ct as getSlackClient } from "./agent-hooks-ghyZZQqB.js";
|
|
13
|
+
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-Bx_1B2De.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-Ch1uIpnR.js";
|
|
15
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BJHVIz8G.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-DrtTrwkp.js";
|
|
18
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
|
|
19
18
|
import path from "node:path";
|
|
20
19
|
import { z } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as logException } from "./logging-
|
|
1
|
+
import { f as logException } from "./logging-BLTa7R7f.js";
|
|
2
2
|
import { g as startSpanManual } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import "./config-
|
|
3
|
+
import "./config-C9qM41O0.js";
|
|
4
4
|
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { sql } from "drizzle-orm";
|
|
@@ -386,6 +386,7 @@ const juniorWorkspaces = pgTable("junior_workspaces", {
|
|
|
386
386
|
id: text("id").primaryKey(),
|
|
387
387
|
name: text("name").notNull(),
|
|
388
388
|
setupScript: text("setup_script").notNull().default(""),
|
|
389
|
+
vcpus: integer("vcpus"),
|
|
389
390
|
createdAt: timestamptz("created_at").notNull(),
|
|
390
391
|
updatedAt: timestamptz("updated_at").notNull()
|
|
391
392
|
}, (table) => [uniqueIndex("junior_workspaces_name_idx").on(table.name)]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { f as getSqlExecutor } from "./viewer-C5xFaYVi.js";
|
|
3
|
+
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-g110-xgg.js";
|
|
4
|
+
import { H as detectImageMediaType } from "./conversation-CvuKJ3tA.js";
|
|
5
5
|
// src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
decodeInputImages: () => decodeInputImages,
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-
|
|
1
|
+
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-BLTa7R7f.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-BBUlHih9.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-1iTiFX1O.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
// src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-C9qM41O0.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-BBUlHih9.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-CN9BXMW_.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
4
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Ct as actorFromRun, J as findChildAgentConversationId, K as createAgentInvocationForMessage, Y as getActiveAgentInvocationForConversation, ht as PARENT_AGENT_TARGET, mt as AgentMessageTargetError, wt as toolInvocationDestination } from "./agent-runner-g110-xgg.js";
|
|
3
|
+
import { n as enqueueAgentMessageToParent } from "./result-Cvm0GZCv.js";
|
|
4
|
+
import { r as enqueueAgentInvocation } from "./work-C-ecZAme.js";
|
|
5
5
|
// src/chat/agent-invocations/message.ts
|
|
6
6
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
7
7
|
/**
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { r as JuniorDashboardOptions } from "./app-VCiPQ65Q.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
|
4
4
|
export interface JuniorPluginModuleReference {
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-BLTa7R7f.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BjQdSqA3.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BaDwKSYv.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { bn as createUserTokenStore } from "./tasks-uCfmlWga.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-wKNQ1dYc.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { C as toOptionalTrimmed } from "./client-2i0JJpoC.js";
|
|
2
|
+
import { b as setSpanStatus, y as setSpanAttributes } from "./logging-BLTa7R7f.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-cd60vzAB.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
// src/chat/sandbox/paths.ts
|
|
6
6
|
function normalizeWorkspaceRoot(input) {
|
|
@@ -24,26 +24,6 @@ function sandboxSkillPathResolution(skillName) {
|
|
|
24
24
|
const skillDir = sandboxSkillDir(skillName);
|
|
25
25
|
return `Resolve relative paths in this skill against ${skillDir}. For bash commands from this skill, cd to ${skillDir} first or use absolute paths.`;
|
|
26
26
|
}
|
|
27
|
-
// src/chat/sleep.ts
|
|
28
|
-
/** Wait for a duration, rejecting with the owning signal reason when cancelled. */
|
|
29
|
-
function sleep(ms, signal) {
|
|
30
|
-
if (!signal) return new Promise((resolve) => setTimeout(resolve, ms));
|
|
31
|
-
return new Promise((resolve, reject) => {
|
|
32
|
-
if (signal.aborted) {
|
|
33
|
-
reject(signal.reason);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const timeoutId = setTimeout(() => {
|
|
37
|
-
signal.removeEventListener("abort", onAbort);
|
|
38
|
-
resolve();
|
|
39
|
-
}, ms);
|
|
40
|
-
const onAbort = () => {
|
|
41
|
-
clearTimeout(timeoutId);
|
|
42
|
-
reject(signal.reason);
|
|
43
|
-
};
|
|
44
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
27
|
// src/chat/sandbox/noninteractive-command.ts
|
|
48
28
|
const NON_INTERACTIVE_ENV = {
|
|
49
29
|
CI: "1",
|
|
@@ -109,6 +89,26 @@ async function runNonInteractiveCommand(sandbox, input) {
|
|
|
109
89
|
};
|
|
110
90
|
return await sandbox.runCommand(command);
|
|
111
91
|
}
|
|
92
|
+
// src/chat/sleep.ts
|
|
93
|
+
/** Wait for a duration, rejecting with the owning signal reason when cancelled. */
|
|
94
|
+
function sleep(ms, signal) {
|
|
95
|
+
if (!signal) return new Promise((resolve) => setTimeout(resolve, ms));
|
|
96
|
+
return new Promise((resolve, reject) => {
|
|
97
|
+
if (signal.aborted) {
|
|
98
|
+
reject(signal.reason);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
const timeoutId = setTimeout(() => {
|
|
102
|
+
signal.removeEventListener("abort", onAbort);
|
|
103
|
+
resolve();
|
|
104
|
+
}, ms);
|
|
105
|
+
const onAbort = () => {
|
|
106
|
+
clearTimeout(timeoutId);
|
|
107
|
+
reject(signal.reason);
|
|
108
|
+
};
|
|
109
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
112
|
// src/chat/sandbox/credentials.ts
|
|
113
113
|
/**
|
|
114
114
|
* Resolve explicit Vercel Sandbox credentials, or return undefined to let
|
|
@@ -572,4 +572,4 @@ function isStale(profile, createdAtMs) {
|
|
|
572
572
|
const maxAgeMs = floatingMaxAgeMs();
|
|
573
573
|
return maxAgeMs === 0 || Date.now() - createdAtMs > maxAgeMs;
|
|
574
574
|
}
|
|
575
|
-
export { SANDBOX_DATA_ROOT as C, sandboxSkillDir as D, SANDBOX_WORKSPACE_ROOT as E, sandboxSkillFile as O,
|
|
575
|
+
export { SANDBOX_DATA_ROOT as C, sandboxSkillDir as D, SANDBOX_WORKSPACE_ROOT as E, sandboxSkillFile as O, runNonInteractiveCommand as S, SANDBOX_SKILLS_ROOT as T, workspaceSnapshotNotReadyUserMessage as _, isAbortError as a, buildCommandScript as b, isSandboxCommandStreamInterruptedError as c, isSnapshottingError as d, throwSandboxOperationError as f, isWorkspaceSnapshotNotReadyError as g, getWorkspaceSnapshotNotReadyError as h, ensureDockerDaemon as i, sandboxSkillPathResolution as k, isSandboxMissingError as l, WorkspaceSnapshotNotReadyError as m, hash as n, isAlreadyExistsError as o, wrapSandboxSetupError as p, isStale as r, isSandboxApiTransientError as s, create as t, isSandboxUnavailableError as u, getVercelSandboxCredentials as v, SANDBOX_REPOS_ROOT as w, buildNonInteractiveShellScript as x, sleep as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as parseBriefInput, K as briefOutcomeStatusSchema, q as conversationBriefSchema } from "./conversation-CvuKJ3tA.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
// src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-BLTa7R7f.js";
|
|
2
2
|
import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
2
|
-
import {
|
|
3
|
-
import { r as
|
|
1
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-BLTa7R7f.js";
|
|
2
|
+
import { r as getStateAdapter } from "./adapter-Bx_1B2De.js";
|
|
3
|
+
import { E as SANDBOX_WORKSPACE_ROOT, S as runNonInteractiveCommand, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, y as sleep } from "./profile-CthM2qFM.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
6
6
|
// src/chat/sandbox/resources.ts
|
|
@@ -27,8 +27,12 @@ function setSandboxResourceConfig(config) {
|
|
|
27
27
|
configuredResources = { vcpus: config.vcpus };
|
|
28
28
|
return previous;
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Resolve sandbox sizing. A Workspace vCPU setting wins over the app setting,
|
|
32
|
+
* which wins over the legacy environment setting.
|
|
33
|
+
*/
|
|
34
|
+
function getSandboxResources(workspace) {
|
|
35
|
+
if (workspace?.vcpus) return { vcpus: workspace.vcpus };
|
|
32
36
|
return configuredResources ?? resourcesFromEnv();
|
|
33
37
|
}
|
|
34
38
|
// src/chat/sandbox/snapshot/span.ts
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Ft as listTurnSummaries, Pt as getTurnRecord } from "./tasks-uCfmlWga.js";
|
|
3
3
|
import { t as createActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { Q as
|
|
6
|
-
import { a as
|
|
7
|
-
import { a as
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-BnSaArNb.js";
|
|
5
|
+
import { $ as getAgentInvocationIdForResult, Q as getAgentInvocationIdForMessage, X as getAgentInvocation, Z as getAgentInvocationIdForEvents, at as isTerminalAgentInvocation, it as getLatestAgentInvocationForConversation, lt as markAgentInvocationParentMailboxAppended, q as createAgentInvocationFromLatest, tt as getAgentInvocationResultMessageId } from "./agent-runner-g110-xgg.js";
|
|
6
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DeVax2qO.js";
|
|
7
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-Boj_zpTa.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-B6KqcdCQ.js";
|
|
9
|
+
import { r as enqueueAgentInvocation } from "./work-C-ecZAme.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
12
|
-
// src/chat/task-execution/mailbox-input.ts
|
|
13
|
-
/** Join non-empty mailbox Message text for one Turn. */
|
|
14
|
-
function joinMailboxText(messages) {
|
|
15
|
-
return messages.map((message) => message.input.text.trim()).filter(Boolean).join("\n\n");
|
|
16
|
-
}
|
|
17
12
|
// src/chat/conversations/web-mailbox.ts
|
|
18
13
|
/** Parse web mailbox metadata written before Source and Actor were complete. */
|
|
19
14
|
const legacyWebMailboxMetadataSchema = z.object({
|
|
@@ -405,7 +400,7 @@ async function startAgentInvocationsForChildInput(context, options) {
|
|
|
405
400
|
};
|
|
406
401
|
const { actor, source } = events[0];
|
|
407
402
|
const invocation = await createAgentInvocationFromLatest({
|
|
408
|
-
input:
|
|
403
|
+
input: renderEventBatchText(messages),
|
|
409
404
|
invocationId: getAgentInvocationIdForEvents(messages[0].inboundMessageId),
|
|
410
405
|
latest,
|
|
411
406
|
runAs: {
|
|
@@ -456,4 +451,4 @@ async function withAgentInvocationResultActors(work) {
|
|
|
456
451
|
}))
|
|
457
452
|
};
|
|
458
453
|
}
|
|
459
|
-
export { withAgentInvocationResultActors as a, resolveMailboxTurnWork as c, legacyWebMailboxMetadataSchema as d,
|
|
454
|
+
export { withAgentInvocationResultActors as a, resolveMailboxTurnWork as c, legacyWebMailboxMetadataSchema as d, startAgentInvocationsForChildInput as i, sourceFromTurnInput as l, enqueueAgentMessageToParent as n, getAuthPausedConversationTurnId as o, result_exports as r, getEventBatchDelayMs as s, enqueueAgentInvocationResult as t, turnInputFactsFromConversationMessage as u };
|