@sentry/junior 0.204.0 → 0.206.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-CMyTD4DD.js → agent-C9yuiZUF.js} +277 -85
- package/dist/{agent-hooks-Bbcp9e33.js → agent-hooks-DNjlz2A-.js} +1084 -16
- package/dist/{agent-runner-DNb1A49M.js → agent-runner-E67lFrDG.js} +5 -5
- package/dist/api/schema.d.ts +85 -0
- package/dist/api/schema.js +2 -2
- package/dist/api.js +44 -511
- package/dist/{app-B1TOqBI8.d.ts → app-AxGmJHwK.d.ts} +8 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +56 -84
- package/dist/{auth-pause-state-DosEalIG.js → auth-pause-state-MVZ6xvEK.js} +6 -6
- package/dist/briefs-CvJFQvhJ.js +398 -0
- package/dist/{catalog-runtime-BReos-D4.js → catalog-runtime-TBR8n4e1.js} +1 -1
- package/dist/{checkpoint-CNrPyRJN.js → checkpoint-BY47jJCB.js} +7 -6
- package/dist/cli/chat.js +14 -12
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +1 -0
- package/dist/cli/main.js +5 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/run.d.ts +2 -1
- package/dist/cli/run.js +2 -1
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-nGCW1OTG.js → client-ceE7NtvC.js} +4 -367
- package/dist/config-CIE83sR2.js +386 -0
- package/dist/{schema-Rn8-XEaN.js → conversation-AA4R1VUn.js} +580 -558
- package/dist/{conversation-privacy-B4voFRSm.js → conversation-privacy-Auyq26XQ.js} +1 -1
- package/dist/{credential-sync-kXr1hvO1.js → credential-sync-BO33aNQd.js} +22 -20
- package/dist/{execution-stats-DWfSihcH.js → execution-stats-SiS2FLcv.js} +4 -4
- package/dist/{executor-DcMSlI5c.js → executor-BfbYPW63.js} +31 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-Drn_LXlM.js → job-queue-CyTc24Es.js} +1 -1
- package/dist/{logging-BzAk1S_s.js → logging-D37bayDc.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-JiftokvA.js → oauth-callback-server-BtfOeHTZ.js} +2 -2
- package/dist/{pending-auth-CWmSdZVg.js → pending-auth-BPUzcs7n.js} +2 -2
- package/dist/{profile-CrT5nXbw.js → profile-CSixooTi.js} +4 -3
- package/dist/prompt-3gqNY1Ka.js +552 -0
- package/dist/{registry-DH1xUo2N.js → registry-DiR0-xRg.js} +1 -1
- package/dist/{resolve-CZHnfxaS.js → resolve-Bn5q__9b.js} +2 -2
- package/dist/{runner-CZV2sC46.js → runner-DFx3dIJH.js} +9 -9
- package/dist/{sandbox-egress-signals-bHZfmhbd.js → sandbox-egress-signals-bwvjihxA.js} +1 -1
- package/dist/schema-8GXFfclK.js +559 -0
- package/dist/{skills-CIcDQSgM.js → skills-BhM5qyCF.js} +2 -2
- package/dist/{spawn-DdkUFRmq.js → spawn-Dk0PqdH6.js} +2 -2
- package/dist/{stats-DTUbAb88.js → stats-DKRP4rsY.js} +26 -12
- package/dist/{task-queue-CJIR4RF7.js → task-queue-CdpTvu4R.js} +3 -3
- package/dist/{task-runner-D-O3A-Cp.js → task-runner-alpjVSxQ.js} +10 -10
- package/dist/{thread-state-CRc9jTJS.js → thread-state-CRK7aA41.js} +5 -5
- package/dist/{turn-execution-BkinIdJF.js → turn-execution-XtyzIHog.js} +3 -3
- package/dist/{turn-lifecycle-DQV19VTW.js → turn-lifecycle-VbwZLfBv.js} +1 -1
- package/dist/{usage-D3EbSO7w.js → usage-D4A48Bdl.js} +4 -125
- package/dist/{validation-C2CR-OX3.js → validation-jn_46o4U.js} +1 -1
- package/dist/{version-DxcWdoKa.js → version-DcfJxB4z.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/web-authorization-CsfLSfEs.js +38 -0
- package/dist/{web-input-3EPfpf55.js → web-input-BPp_sc7t.js} +6 -6
- package/dist/{work-fGofI7Op.js → work-Di-ubSGg.js} +9 -9
- package/dist/{worker-CsOLq-mR.js → worker-Cu_D5Mr8.js} +5 -4
- package/migrations/0040_conversation_briefs.sql +17 -0
- package/migrations/meta/0040_snapshot.json +3516 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +4 -4
- package/dist/history-CqTuSAdI.js +0 -441
- package/dist/usage-schema-CKaDkH_j.js +0 -20
- package/dist/web-authorization-RMBxAR_t.js +0 -76
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
import { t as juniorDestinationKindSchema } from "./destinations-BeBiJeEM.js";
|
|
2
|
+
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-AA4R1VUn.js";
|
|
3
|
+
import "./reporting-schema-DosTN__Q.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { codeChangeStateSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
6
|
+
//#region src/api/schema/common.ts
|
|
7
|
+
/** Stable error body returned by Junior-owned REST endpoints. */
|
|
8
|
+
const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/api/reporting-window.ts
|
|
11
|
+
/** Shared UTC day/hour/six-hour windows for dashboard activity series. */
|
|
12
|
+
const HOUR_MS = 36e5;
|
|
13
|
+
const SIX_HOUR_MS = 6 * HOUR_MS;
|
|
14
|
+
const DAY_MS = 24 * HOUR_MS;
|
|
15
|
+
/** Start of the UTC calendar day containing `valueMs`. */
|
|
16
|
+
function startOfUtcDay(valueMs) {
|
|
17
|
+
const date = new Date(valueMs);
|
|
18
|
+
date.setUTCHours(0, 0, 0, 0);
|
|
19
|
+
return date;
|
|
20
|
+
}
|
|
21
|
+
/** Start of the UTC hour containing `valueMs`. */
|
|
22
|
+
function startOfUtcHour(valueMs) {
|
|
23
|
+
const date = new Date(valueMs);
|
|
24
|
+
date.setUTCMinutes(0, 0, 0);
|
|
25
|
+
return date;
|
|
26
|
+
}
|
|
27
|
+
/** Start of the UTC 6-hour bucket containing `valueMs` (00/06/12/18). */
|
|
28
|
+
function startOfUtcSixHour(valueMs) {
|
|
29
|
+
const date = startOfUtcHour(valueMs);
|
|
30
|
+
date.setUTCHours(Math.floor(date.getUTCHours() / 6) * 6, 0, 0, 0);
|
|
31
|
+
return date;
|
|
32
|
+
}
|
|
33
|
+
/** UTC day key `YYYY-MM-DD`. */
|
|
34
|
+
function utcDayKey(value) {
|
|
35
|
+
return (typeof value === "number" ? new Date(value) : value).toISOString().slice(0, 10);
|
|
36
|
+
}
|
|
37
|
+
/** UTC hour key `YYYY-MM-DDTHH`. */
|
|
38
|
+
function utcHourKey(value) {
|
|
39
|
+
return (typeof value === "number" ? new Date(value) : value).toISOString().slice(0, 13);
|
|
40
|
+
}
|
|
41
|
+
/** UTC 6-hour bucket key `YYYY-MM-DDTHH` at 00/06/12/18. */
|
|
42
|
+
function utcSixHourKey(value) {
|
|
43
|
+
return utcHourKey(startOfUtcSixHour(typeof value === "number" ? value : value.getTime()));
|
|
44
|
+
}
|
|
45
|
+
/** Inclusive trailing UTC day window ending on today's UTC day. */
|
|
46
|
+
function trailingUtcDayWindow(nowMs, dayCount) {
|
|
47
|
+
const end = startOfUtcDay(nowMs);
|
|
48
|
+
const start = new Date(end);
|
|
49
|
+
start.setUTCDate(start.getUTCDate() - (dayCount - 1));
|
|
50
|
+
return {
|
|
51
|
+
end,
|
|
52
|
+
start
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** Inclusive trailing UTC hour window ending on the current UTC hour. */
|
|
56
|
+
function trailingUtcHourWindow(nowMs, hourCount = 24) {
|
|
57
|
+
const end = startOfUtcHour(nowMs);
|
|
58
|
+
return {
|
|
59
|
+
end,
|
|
60
|
+
start: /* @__PURE__ */ new Date(end.getTime() - (hourCount - 1) * HOUR_MS)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** Inclusive trailing UTC 6-hour window ending on the current 6h bucket. */
|
|
64
|
+
function trailingUtcSixHourWindow(nowMs, bucketCount = 28) {
|
|
65
|
+
const end = startOfUtcSixHour(nowMs);
|
|
66
|
+
return {
|
|
67
|
+
end,
|
|
68
|
+
start: /* @__PURE__ */ new Date(end.getTime() - (bucketCount - 1) * SIX_HOUR_MS)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** Fill a fixed UTC day window from a sparse map. */
|
|
72
|
+
function fillUtcDays(args) {
|
|
73
|
+
const { end, start } = trailingUtcDayWindow(args.nowMs, args.count);
|
|
74
|
+
const items = [];
|
|
75
|
+
for (const cursor = new Date(start); cursor.getTime() <= end.getTime(); cursor.setUTCDate(cursor.getUTCDate() + 1)) {
|
|
76
|
+
const date = utcDayKey(cursor);
|
|
77
|
+
items.push(args.rows.get(date) ?? args.empty(date));
|
|
78
|
+
}
|
|
79
|
+
return items;
|
|
80
|
+
}
|
|
81
|
+
/** Fill a fixed UTC hour window from a sparse map. */
|
|
82
|
+
function fillUtcHours(args) {
|
|
83
|
+
const hourCount = args.count ?? 24;
|
|
84
|
+
const { end, start } = trailingUtcHourWindow(args.nowMs, hourCount);
|
|
85
|
+
const items = [];
|
|
86
|
+
for (const cursor = new Date(start); cursor.getTime() <= end.getTime(); cursor.setTime(cursor.getTime() + HOUR_MS)) {
|
|
87
|
+
const date = utcHourKey(cursor);
|
|
88
|
+
items.push(args.rows.get(date) ?? args.empty(date));
|
|
89
|
+
}
|
|
90
|
+
return items;
|
|
91
|
+
}
|
|
92
|
+
/** Fill a fixed UTC 6-hour window from a map of known rows. */
|
|
93
|
+
function fillUtcSixHours(args) {
|
|
94
|
+
const bucketCount = args.count ?? 28;
|
|
95
|
+
const { end, start } = trailingUtcSixHourWindow(args.nowMs, bucketCount);
|
|
96
|
+
const items = [];
|
|
97
|
+
for (const cursor = new Date(start); cursor.getTime() <= end.getTime(); cursor.setTime(cursor.getTime() + SIX_HOUR_MS)) {
|
|
98
|
+
const date = utcSixHourKey(cursor);
|
|
99
|
+
items.push(args.rows.get(date) ?? args.empty(date));
|
|
100
|
+
}
|
|
101
|
+
return items;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Sum hour rows into trailing 6-hour buckets.
|
|
105
|
+
* Adds number fields. Keeps other fields from the first row in the bucket.
|
|
106
|
+
* Sets `date` to the 6-hour bucket key.
|
|
107
|
+
*/
|
|
108
|
+
function sumUtcHoursIntoSixHours(args) {
|
|
109
|
+
const bucketCount = args.count ?? 28;
|
|
110
|
+
const bySix = /* @__PURE__ */ new Map();
|
|
111
|
+
for (const hour of args.hours) {
|
|
112
|
+
const key = utcSixHourKey(Date.parse(`${hour.date}:00:00.000Z`));
|
|
113
|
+
const next = {
|
|
114
|
+
...bySix.get(key) ?? args.empty(key),
|
|
115
|
+
date: key
|
|
116
|
+
};
|
|
117
|
+
for (const [field, value] of Object.entries(hour)) {
|
|
118
|
+
if (field === "date") continue;
|
|
119
|
+
if (typeof value === "number") {
|
|
120
|
+
const prior = next[field];
|
|
121
|
+
next[field] = (typeof prior === "number" ? prior : 0) + value;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
bySix.set(key, next);
|
|
125
|
+
}
|
|
126
|
+
return fillUtcSixHours({
|
|
127
|
+
count: bucketCount,
|
|
128
|
+
empty: args.empty,
|
|
129
|
+
nowMs: args.nowMs,
|
|
130
|
+
rows: bySix
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/api/schema/code.ts
|
|
135
|
+
const codeChangeSummarySchema = z.object({
|
|
136
|
+
closed: z.number().int().nonnegative(),
|
|
137
|
+
costUsd: z.number().nonnegative().optional(),
|
|
138
|
+
created: z.number().int().nonnegative(),
|
|
139
|
+
medianCostUsd: z.number().nonnegative().optional(),
|
|
140
|
+
medianMergeTimeMs: z.number().nonnegative().optional(),
|
|
141
|
+
merged: z.number().int().nonnegative(),
|
|
142
|
+
mergeRate: z.number().min(0).max(1).optional(),
|
|
143
|
+
open: z.number().int().nonnegative()
|
|
144
|
+
}).strict();
|
|
145
|
+
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) activity bucket key. */
|
|
146
|
+
const codeMetricBucketSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/);
|
|
147
|
+
const codeActivityDaySchema = z.object({
|
|
148
|
+
closed: z.number().int().nonnegative(),
|
|
149
|
+
created: z.number().int().nonnegative(),
|
|
150
|
+
date: codeMetricBucketSchema,
|
|
151
|
+
merged: z.number().int().nonnegative()
|
|
152
|
+
}).strict();
|
|
153
|
+
const codeRepositorySummarySchema = z.object({
|
|
154
|
+
closed: z.number().int().nonnegative(),
|
|
155
|
+
created: z.number().int().nonnegative(),
|
|
156
|
+
id: z.string().uuid(),
|
|
157
|
+
medianCostUsd: z.number().nonnegative().optional(),
|
|
158
|
+
merged: z.number().int().nonnegative(),
|
|
159
|
+
mergeRate: z.number().min(0).max(1).optional(),
|
|
160
|
+
name: z.string().min(1),
|
|
161
|
+
open: z.number().int().nonnegative(),
|
|
162
|
+
provider: z.string().min(1),
|
|
163
|
+
url: z.string().url().optional()
|
|
164
|
+
}).strict();
|
|
165
|
+
const codeChangeSummaryReportSchema = z.object({
|
|
166
|
+
closedAt: z.string().optional(),
|
|
167
|
+
id: z.string().uuid(),
|
|
168
|
+
mergedAt: z.string().optional(),
|
|
169
|
+
number: z.number().int().positive(),
|
|
170
|
+
openedAt: z.string(),
|
|
171
|
+
provider: z.string().min(1),
|
|
172
|
+
repository: z.string().min(1),
|
|
173
|
+
state: codeChangeStateSchema,
|
|
174
|
+
title: z.string().optional(),
|
|
175
|
+
url: z.string().url().optional()
|
|
176
|
+
}).strict();
|
|
177
|
+
const codeOverviewReportSchema = z.object({
|
|
178
|
+
activityDays: z.array(codeActivityDaySchema),
|
|
179
|
+
activityHours: z.array(codeActivityDaySchema).optional(),
|
|
180
|
+
activitySixHours: z.array(codeActivityDaySchema).optional(),
|
|
181
|
+
changes: z.array(codeChangeSummaryReportSchema),
|
|
182
|
+
generatedAt: z.string(),
|
|
183
|
+
repositories: z.array(codeRepositorySummarySchema),
|
|
184
|
+
summary: codeChangeSummarySchema,
|
|
185
|
+
windowEnd: z.string(),
|
|
186
|
+
windowStart: z.string()
|
|
187
|
+
}).strict();
|
|
188
|
+
/** Person-scoped code activity for one People profile. */
|
|
189
|
+
const codePersonReportSchema = z.object({
|
|
190
|
+
activityDays: z.array(codeActivityDaySchema),
|
|
191
|
+
activityHours: z.array(codeActivityDaySchema).optional(),
|
|
192
|
+
activitySixHours: z.array(codeActivityDaySchema).optional(),
|
|
193
|
+
generatedAt: z.string(),
|
|
194
|
+
summary: codeChangeSummarySchema,
|
|
195
|
+
windowEnd: z.string(),
|
|
196
|
+
windowStart: z.string()
|
|
197
|
+
}).strict();
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region src/api/activity.ts
|
|
200
|
+
const dailyConversationActivitySchema = z.object({
|
|
201
|
+
active: z.number(),
|
|
202
|
+
conversations: z.number(),
|
|
203
|
+
date: z.string(),
|
|
204
|
+
durationMs: z.number(),
|
|
205
|
+
failed: z.number(),
|
|
206
|
+
tokens: z.number().optional()
|
|
207
|
+
}).strict();
|
|
208
|
+
/** Build a zeroed day for conversation activity projections. */
|
|
209
|
+
function emptyActivityDay(date) {
|
|
210
|
+
return {
|
|
211
|
+
active: 0,
|
|
212
|
+
conversations: 0,
|
|
213
|
+
date,
|
|
214
|
+
durationMs: 0,
|
|
215
|
+
failed: 0
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
/** Fill a fixed UTC day window from sparse conversation activity. */
|
|
219
|
+
function activityDays(days, nowMs, count) {
|
|
220
|
+
return fillUtcDays({
|
|
221
|
+
count,
|
|
222
|
+
empty: emptyActivityDay,
|
|
223
|
+
nowMs,
|
|
224
|
+
rows: days
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Fill the trailing 7-day UTC hour window from known hour rows.
|
|
229
|
+
* 24h charts use the last 24 points. 7d charts sum hours into 6-hour buckets.
|
|
230
|
+
*/
|
|
231
|
+
function activityHours(hours, nowMs) {
|
|
232
|
+
return fillUtcHours({
|
|
233
|
+
count: 168,
|
|
234
|
+
empty: emptyActivityDay,
|
|
235
|
+
nowMs,
|
|
236
|
+
rows: hours
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Fill trailing 6-hour buckets from hour keys or hour rows.
|
|
241
|
+
* Hour keys must be summed into 6-hour keys first.
|
|
242
|
+
*/
|
|
243
|
+
function activitySixHours(hours, nowMs) {
|
|
244
|
+
return sumUtcHoursIntoSixHours({
|
|
245
|
+
empty: emptyActivityDay,
|
|
246
|
+
hours: hours instanceof Map ? activityHours(hours, nowMs) : [...hours],
|
|
247
|
+
nowMs
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
//#endregion
|
|
251
|
+
//#region src/api/schema/location.ts
|
|
252
|
+
const locationParamsSchema = z.object({ locationId: z.string().min(1) }).strict();
|
|
253
|
+
const locationSummaryReportSchema = conversationStatsItemSchema.extend({
|
|
254
|
+
id: z.string(),
|
|
255
|
+
firstSeenAt: z.string(),
|
|
256
|
+
kind: juniorDestinationKindSchema,
|
|
257
|
+
lastSeenAt: z.string(),
|
|
258
|
+
provider: z.string(),
|
|
259
|
+
providerDestinationId: z.string(),
|
|
260
|
+
visibility: z.literal("public")
|
|
261
|
+
}).strict();
|
|
262
|
+
const locationActorSummaryReportSchema = conversationStatsItemSchema.extend({ actor: actorIdentitySchema }).strict();
|
|
263
|
+
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) activity bucket key. */
|
|
264
|
+
const locationMetricBucketSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/);
|
|
265
|
+
const locationActivityDayReportSchema = z.object({
|
|
266
|
+
date: locationMetricBucketSchema,
|
|
267
|
+
privateConversations: z.number(),
|
|
268
|
+
publicConversations: z.number()
|
|
269
|
+
}).strict();
|
|
270
|
+
const locationDirectoryReportSchema = z.object({
|
|
271
|
+
activityDays: z.array(locationActivityDayReportSchema),
|
|
272
|
+
activityHours: z.array(locationActivityDayReportSchema).optional(),
|
|
273
|
+
activitySixHours: z.array(locationActivityDayReportSchema).optional(),
|
|
274
|
+
generatedAt: z.string(),
|
|
275
|
+
locations: z.array(locationSummaryReportSchema),
|
|
276
|
+
privateActivity: conversationStatsItemSchema,
|
|
277
|
+
source: z.literal("conversation_index"),
|
|
278
|
+
windowEnd: z.string(),
|
|
279
|
+
windowStart: z.string()
|
|
280
|
+
}).strict();
|
|
281
|
+
const locationDetailReportSchema = locationSummaryReportSchema.extend({
|
|
282
|
+
activityDays: z.array(dailyConversationActivitySchema),
|
|
283
|
+
activityHours: z.array(dailyConversationActivitySchema).optional(),
|
|
284
|
+
activitySixHours: z.array(dailyConversationActivitySchema).optional(),
|
|
285
|
+
actors: z.array(locationActorSummaryReportSchema),
|
|
286
|
+
generatedAt: z.string(),
|
|
287
|
+
recentConversations: z.array(conversationSummaryReportSchema),
|
|
288
|
+
source: z.literal("conversation_index"),
|
|
289
|
+
windowEnd: z.string(),
|
|
290
|
+
windowStart: z.string()
|
|
291
|
+
}).strict();
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region src/api/schema/person.ts
|
|
294
|
+
const personParamsSchema = z.object({ email: z.string().trim().min(1) }).strict();
|
|
295
|
+
const peopleConversationStatsItemSchema = conversationStatsItemSchema.omit({ costUsd: true });
|
|
296
|
+
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) activity bucket key. */
|
|
297
|
+
const peopleMetricBucketSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/);
|
|
298
|
+
const actorActivityDayReportSchema = z.object({
|
|
299
|
+
active: z.number(),
|
|
300
|
+
conversations: z.number(),
|
|
301
|
+
costUsd: z.number().optional(),
|
|
302
|
+
date: peopleMetricBucketSchema,
|
|
303
|
+
durationMs: z.number(),
|
|
304
|
+
failed: z.number(),
|
|
305
|
+
tokens: z.number().optional()
|
|
306
|
+
}).strict();
|
|
307
|
+
const peopleActivityDayReportSchema = z.object({
|
|
308
|
+
activePeople: z.number(),
|
|
309
|
+
conversations: z.number(),
|
|
310
|
+
date: peopleMetricBucketSchema
|
|
311
|
+
}).strict();
|
|
312
|
+
const actorTotalsReportSchema = z.object({
|
|
313
|
+
active: z.number(),
|
|
314
|
+
activeDays: z.number(),
|
|
315
|
+
conversations: z.number(),
|
|
316
|
+
durationMs: z.number(),
|
|
317
|
+
failed: z.number(),
|
|
318
|
+
tokens: z.number().optional()
|
|
319
|
+
}).strict();
|
|
320
|
+
/** Spend and activity for one people-directory range, plus the prior period's spend. */
|
|
321
|
+
const actorWindowMetricsSchema = z.object({
|
|
322
|
+
conversations: z.number().int().nonnegative(),
|
|
323
|
+
costUsd: z.number().finite().nonnegative(),
|
|
324
|
+
durationMs: z.number().finite().nonnegative(),
|
|
325
|
+
priorCostUsd: z.number().finite().nonnegative()
|
|
326
|
+
}).strict();
|
|
327
|
+
/** People-directory ranges that match the dashboard range control. */
|
|
328
|
+
const actorDirectoryWindowsSchema = z.object({
|
|
329
|
+
1: actorWindowMetricsSchema,
|
|
330
|
+
7: actorWindowMetricsSchema,
|
|
331
|
+
30: actorWindowMetricsSchema,
|
|
332
|
+
90: actorWindowMetricsSchema
|
|
333
|
+
}).strict();
|
|
334
|
+
const identifiedActorSchema = actorIdentitySchema.extend({ email: z.string().min(1) }).strict();
|
|
335
|
+
const actorSummaryReportSchema = actorTotalsReportSchema.extend({
|
|
336
|
+
firstSeenAt: z.string(),
|
|
337
|
+
lastSeenAt: z.string(),
|
|
338
|
+
actor: identifiedActorSchema,
|
|
339
|
+
windows: actorDirectoryWindowsSchema
|
|
340
|
+
}).strict();
|
|
341
|
+
const actorDirectoryReportSchema = z.object({
|
|
342
|
+
activityDays: z.array(peopleActivityDayReportSchema),
|
|
343
|
+
activityHours: z.array(peopleActivityDayReportSchema).optional(),
|
|
344
|
+
activitySixHours: z.array(peopleActivityDayReportSchema).optional(),
|
|
345
|
+
generatedAt: z.string(),
|
|
346
|
+
people: z.array(actorSummaryReportSchema),
|
|
347
|
+
source: z.literal("conversation_index"),
|
|
348
|
+
windowEnd: z.string(),
|
|
349
|
+
windowStart: z.string()
|
|
350
|
+
}).strict();
|
|
351
|
+
const actorProfileReportSchema = z.object({
|
|
352
|
+
activityDays: z.array(actorActivityDayReportSchema),
|
|
353
|
+
activityHours: z.array(actorActivityDayReportSchema).optional(),
|
|
354
|
+
activitySixHours: z.array(actorActivityDayReportSchema).optional(),
|
|
355
|
+
generatedAt: z.string(),
|
|
356
|
+
locations: z.array(peopleConversationStatsItemSchema),
|
|
357
|
+
recentConversations: z.array(conversationSummaryReportSchema),
|
|
358
|
+
actor: identifiedActorSchema,
|
|
359
|
+
source: z.literal("conversation_index"),
|
|
360
|
+
surfaces: z.array(peopleConversationStatsItemSchema),
|
|
361
|
+
totals: actorTotalsReportSchema,
|
|
362
|
+
windowEnd: z.string(),
|
|
363
|
+
windowStart: z.string()
|
|
364
|
+
}).strict();
|
|
365
|
+
const personalSpendReportSchema = z.object({
|
|
366
|
+
generatedAt: z.string(),
|
|
367
|
+
sevenDaysUsd: z.number().finite().nonnegative(),
|
|
368
|
+
source: z.literal("conversation_index"),
|
|
369
|
+
thirtyDaysUsd: z.number().finite().nonnegative(),
|
|
370
|
+
windowEnd: z.string(),
|
|
371
|
+
windowStart: z.string()
|
|
372
|
+
}).strict();
|
|
373
|
+
//#endregion
|
|
374
|
+
//#region src/api/schema/personal-token.ts
|
|
375
|
+
const personalTokenMetadataSchema = z.object({
|
|
376
|
+
id: z.string().uuid(),
|
|
377
|
+
name: z.string(),
|
|
378
|
+
tokenSuffix: z.string(),
|
|
379
|
+
createdAt: z.string().datetime(),
|
|
380
|
+
expiresAt: z.string().datetime(),
|
|
381
|
+
lastUsedAt: z.string().datetime().nullable()
|
|
382
|
+
}).strict();
|
|
383
|
+
const personalTokenListSchema = z.object({ tokens: z.array(personalTokenMetadataSchema) }).strict();
|
|
384
|
+
const createPersonalTokenBodySchema = z.object({ name: z.string().trim().min(1).max(80) }).strict();
|
|
385
|
+
const createdPersonalTokenSchema = personalTokenMetadataSchema.extend({ token: z.string().startsWith("jr_pat_") }).strict();
|
|
386
|
+
const personalTokenParamsSchema = z.object({ id: z.string().uuid() }).strict();
|
|
387
|
+
const revokePersonalTokenResponseSchema = z.object({ revoked: z.literal(true) }).strict();
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/api/schema/task.ts
|
|
390
|
+
const taskDestinationSchema = z.object({
|
|
391
|
+
channelId: z.string().min(1),
|
|
392
|
+
label: z.string().min(1),
|
|
393
|
+
teamId: z.string().min(1),
|
|
394
|
+
visibility: z.enum(["private", "public"])
|
|
395
|
+
}).strict();
|
|
396
|
+
/** Task run counts for the dashboard range control (24h/7d/30d/90d). */
|
|
397
|
+
const taskRunWindowsSchema = z.object({
|
|
398
|
+
1: z.number().int().nonnegative(),
|
|
399
|
+
7: z.number().int().nonnegative(),
|
|
400
|
+
30: z.number().int().nonnegative(),
|
|
401
|
+
90: z.number().int().nonnegative()
|
|
402
|
+
}).strict();
|
|
403
|
+
const taskSummaryBaseSchema = z.object({
|
|
404
|
+
createdAt: z.string().datetime(),
|
|
405
|
+
createdBy: z.string().min(1),
|
|
406
|
+
createdByEmail: z.string().trim().email().optional(),
|
|
407
|
+
destination: taskDestinationSchema,
|
|
408
|
+
id: z.string().min(1),
|
|
409
|
+
instruction: z.string().min(1),
|
|
410
|
+
lastConversationId: z.string().min(1).optional(),
|
|
411
|
+
lastRunAt: z.string().datetime().optional(),
|
|
412
|
+
ownedByViewer: z.boolean(),
|
|
413
|
+
runs: taskRunWindowsSchema,
|
|
414
|
+
outcomes: z.array(taskOutcomeSchema).max(5),
|
|
415
|
+
/** Short display title; falls back from instruction when unset. */
|
|
416
|
+
title: z.string().min(1),
|
|
417
|
+
totalRuns: z.number().int().nonnegative()
|
|
418
|
+
});
|
|
419
|
+
const scheduledTaskSummarySchema = taskSummaryBaseSchema.extend({
|
|
420
|
+
kind: z.literal("scheduled"),
|
|
421
|
+
nextRunAt: z.string().datetime().optional(),
|
|
422
|
+
schedule: z.string().min(1),
|
|
423
|
+
status: z.enum([
|
|
424
|
+
"active",
|
|
425
|
+
"blocked",
|
|
426
|
+
"completed"
|
|
427
|
+
])
|
|
428
|
+
}).strict();
|
|
429
|
+
const eventTaskSummarySchema = taskSummaryBaseSchema.extend({
|
|
430
|
+
events: z.array(z.string().min(1)).min(1),
|
|
431
|
+
kind: z.literal("event"),
|
|
432
|
+
resource: z.string().min(1),
|
|
433
|
+
source: z.string().min(1),
|
|
434
|
+
triggerAvailable: z.boolean()
|
|
435
|
+
}).strict();
|
|
436
|
+
const taskSummarySchema = z.discriminatedUnion("kind", [scheduledTaskSummarySchema, eventTaskSummarySchema]);
|
|
437
|
+
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) execution bucket key. */
|
|
438
|
+
const taskMetricBucketSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/);
|
|
439
|
+
/** One UTC day/hour of completed task executions stacked by task type. */
|
|
440
|
+
const taskExecutionDaySchema = z.object({
|
|
441
|
+
/** Linked conversation spend for executions in this bucket. */
|
|
442
|
+
costUsd: z.number().finite().nonnegative(),
|
|
443
|
+
date: taskMetricBucketSchema,
|
|
444
|
+
event: z.number().int().nonnegative(),
|
|
445
|
+
scheduled: z.number().int().nonnegative()
|
|
446
|
+
}).strict();
|
|
447
|
+
const taskListQuerySchema = z.object({ q: z.string().trim().max(200).optional() }).strict();
|
|
448
|
+
const taskListSchema = z.object({
|
|
449
|
+
executionDays: z.array(taskExecutionDaySchema),
|
|
450
|
+
executionHours: z.array(taskExecutionDaySchema).optional(),
|
|
451
|
+
executionSixHours: z.array(taskExecutionDaySchema).optional(),
|
|
452
|
+
tasks: z.array(taskSummarySchema),
|
|
453
|
+
truncated: z.boolean()
|
|
454
|
+
}).strict();
|
|
455
|
+
const taskParamsSchema = z.object({
|
|
456
|
+
id: z.string().min(1),
|
|
457
|
+
kind: z.enum(["scheduled", "event"])
|
|
458
|
+
}).strict();
|
|
459
|
+
const taskExecutionStatusSchema = z.enum([
|
|
460
|
+
"blocked",
|
|
461
|
+
"completed",
|
|
462
|
+
"failed"
|
|
463
|
+
]);
|
|
464
|
+
const taskExecutionSchema = z.object({
|
|
465
|
+
conversationId: z.string().min(1).optional(),
|
|
466
|
+
/** Estimated model cost for the linked conversation, when known. */
|
|
467
|
+
costUsd: z.number().finite().nonnegative().optional(),
|
|
468
|
+
/** Cumulative conversation runtime in milliseconds, when known. */
|
|
469
|
+
durationMs: z.number().finite().nonnegative().optional(),
|
|
470
|
+
executedAt: z.string().datetime(),
|
|
471
|
+
executionId: z.string().min(1),
|
|
472
|
+
status: taskExecutionStatusSchema,
|
|
473
|
+
title: z.string().min(1).optional(),
|
|
474
|
+
/** Cumulative conversation token total, when known. */
|
|
475
|
+
totalTokens: z.number().int().nonnegative().optional()
|
|
476
|
+
}).strict();
|
|
477
|
+
/** One UTC day/hour of terminal executions for a single task, stacked by status. */
|
|
478
|
+
const taskExecutionStatusDaySchema = z.object({
|
|
479
|
+
blocked: z.number().int().nonnegative(),
|
|
480
|
+
completed: z.number().int().nonnegative(),
|
|
481
|
+
date: taskMetricBucketSchema,
|
|
482
|
+
failed: z.number().int().nonnegative()
|
|
483
|
+
}).strict();
|
|
484
|
+
const taskExecutionListSchema = z.object({
|
|
485
|
+
executionDays: z.array(taskExecutionStatusDaySchema),
|
|
486
|
+
executionHours: z.array(taskExecutionStatusDaySchema).optional(),
|
|
487
|
+
executionSixHours: z.array(taskExecutionStatusDaySchema).optional(),
|
|
488
|
+
executions: z.array(taskExecutionSchema),
|
|
489
|
+
task: taskSummarySchema,
|
|
490
|
+
truncated: z.boolean()
|
|
491
|
+
}).strict();
|
|
492
|
+
const taskRunSchema = taskExecutionSchema.extend({
|
|
493
|
+
kind: z.enum(["scheduled", "event"]),
|
|
494
|
+
taskId: z.string().min(1),
|
|
495
|
+
taskTitle: z.string().min(1)
|
|
496
|
+
}).strict();
|
|
497
|
+
const taskRunListSchema = z.object({
|
|
498
|
+
runs: z.array(taskRunSchema),
|
|
499
|
+
truncated: z.boolean()
|
|
500
|
+
}).strict();
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region src/api/schema/workspace.ts
|
|
503
|
+
const workspaceRepoInputSchema = z.object({
|
|
504
|
+
provider: z.string(),
|
|
505
|
+
repo: z.string()
|
|
506
|
+
}).strict();
|
|
507
|
+
const workspaceRepoSchema = z.object({
|
|
508
|
+
provider: z.string(),
|
|
509
|
+
repo: z.string(),
|
|
510
|
+
checkoutPath: z.string()
|
|
511
|
+
}).strict();
|
|
512
|
+
const workspaceSnapshotSchema = z.object({
|
|
513
|
+
id: z.string(),
|
|
514
|
+
generatedAt: z.iso.datetime(),
|
|
515
|
+
buildDurationMs: z.number().int().nonnegative(),
|
|
516
|
+
sizeBytes: z.number().int().nonnegative().nullable()
|
|
517
|
+
}).strict();
|
|
518
|
+
/** Install-wide baseline Sandbox snapshot used when no Workspace recipe is selected. */
|
|
519
|
+
const baselineSnapshotSchema = z.object({
|
|
520
|
+
id: z.string(),
|
|
521
|
+
generatedAt: z.iso.datetime(),
|
|
522
|
+
buildDurationMs: z.number().int().nonnegative(),
|
|
523
|
+
dependencyCount: z.number().int().nonnegative()
|
|
524
|
+
}).strict();
|
|
525
|
+
const workspaceSchema = z.object({
|
|
526
|
+
id: z.string().uuid(),
|
|
527
|
+
name: z.string(),
|
|
528
|
+
setupScript: z.string(),
|
|
529
|
+
repos: z.array(workspaceRepoSchema),
|
|
530
|
+
snapshot: workspaceSnapshotSchema.nullable()
|
|
531
|
+
}).strict();
|
|
532
|
+
const workspaceListSchema = z.object({
|
|
533
|
+
baselineSnapshot: baselineSnapshotSchema.nullable(),
|
|
534
|
+
workspaces: z.array(workspaceSchema)
|
|
535
|
+
}).strict();
|
|
536
|
+
const workspaceBodySchema = z.object({
|
|
537
|
+
name: z.string(),
|
|
538
|
+
setupScript: z.string().optional(),
|
|
539
|
+
repos: z.array(workspaceRepoInputSchema)
|
|
540
|
+
}).strict();
|
|
541
|
+
const workspaceParamsSchema = z.object({ id: z.string().uuid() }).strict();
|
|
542
|
+
const deleteWorkspaceResponseSchema = z.object({ deleted: z.literal(true) }).strict();
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region src/api/schema/stats.ts
|
|
545
|
+
const statSchema = z.object({
|
|
546
|
+
count: z.number().int().nonnegative(),
|
|
547
|
+
date: z.string(),
|
|
548
|
+
metric: z.string().min(1),
|
|
549
|
+
name: z.string().min(1),
|
|
550
|
+
namespace: z.string().min(1)
|
|
551
|
+
}).strict();
|
|
552
|
+
const statsReportSchema = z.object({
|
|
553
|
+
generatedAt: z.string().datetime(),
|
|
554
|
+
stats: z.array(statSchema),
|
|
555
|
+
windowEnd: z.string(),
|
|
556
|
+
windowStart: z.string()
|
|
557
|
+
}).strict();
|
|
558
|
+
//#endregion
|
|
559
|
+
export { sumUtcHoursIntoSixHours as $, actorProfileReportSchema as A, dailyConversationActivitySchema as B, createPersonalTokenBodySchema as C, personalTokenParamsSchema as D, personalTokenMetadataSchema as E, locationDirectoryReportSchema as F, codePersonReportSchema as G, codeChangeSummaryReportSchema as H, locationParamsSchema as I, HOUR_MS as J, codeRepositorySummarySchema as K, activityDays as L, personalSpendReportSchema as M, locationActivityDayReportSchema as N, revokePersonalTokenResponseSchema as O, locationDetailReportSchema as P, startOfUtcHour as Q, activityHours as R, taskSummarySchema as S, personalTokenListSchema as T, codeChangeSummarySchema as U, codeActivityDaySchema as V, codeOverviewReportSchema as W, fillUtcHours as X, fillUtcDays as Y, fillUtcSixHours as Z, taskListSchema as _, workspaceBodySchema as a, apiErrorSchema as at, taskRunSchema as b, workspaceRepoSchema as c, scheduledTaskSummarySchema as d, trailingUtcDayWindow as et, taskExecutionListSchema as f, taskListQuerySchema as g, taskExecutionStatusSchema as h, deleteWorkspaceResponseSchema as i, utcHourKey as it, personParamsSchema as j, actorDirectoryReportSchema as k, workspaceSchema as l, taskExecutionStatusDaySchema as m, statsReportSchema as n, trailingUtcSixHourWindow as nt, workspaceListSchema as o, taskExecutionSchema as p, DAY_MS as q, baselineSnapshotSchema as r, utcDayKey as rt, workspaceParamsSchema as s, statSchema as t, trailingUtcHourWindow as tt, eventTaskSummarySchema as u, taskParamsSchema as v, createdPersonalTokenSchema as w, taskRunWindowsSchema as x, taskRunListSchema as y, activitySixHours as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { f as logWarn } from "./logging-
|
|
2
|
+
import { f as logWarn } from "./logging-D37bayDc.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-7a9YqLhE.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-TBR8n4e1.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { C as toolInvocationDestination, y as actorFromRun } from "./agent-runner-E67lFrDG.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-Di-ubSGg.js";
|
|
4
4
|
//#region src/chat/agent-invocations/spawn.ts
|
|
5
5
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
6
6
|
/** Bind a Run's Actor and credentials to new Agent invocations. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { F as isRecord$1, I as toOptionalNumber, L as toOptionalString } from "./logging-D37bayDc.js";
|
|
2
|
+
import { a as getChatConfig } from "./config-CIE83sR2.js";
|
|
3
3
|
import { _ as parseSlackMessageTs, d as parseStoredSlackActor, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-B45_WqVX.js";
|
|
4
|
-
import {
|
|
4
|
+
import { Ft as getConversationStore, It as getDb, J as withSlackRetries, Qt as sameDestination, U as getSlackClient, Xt as parseDestination, pt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins } from "./agent-hooks-DNjlz2A-.js";
|
|
5
5
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
6
|
-
import {
|
|
7
|
-
import { o as ToolInputError } from "./usage-
|
|
8
|
-
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-
|
|
6
|
+
import { S as juniorAttachments, a as juniorSchedulerRuns, c as juniorStats, l as juniorEventTasks, o as juniorSchedulerTasks, w as juniorConversations } from "./executor-BfbYPW63.js";
|
|
7
|
+
import { o as ToolInputError } from "./usage-D4A48Bdl.js";
|
|
8
|
+
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-CSixooTi.js";
|
|
9
9
|
import "./vercel-queue-DIkVcfK4.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1830,7 +1830,7 @@ async function resolveTaskOutcomes(outcomes, currentDestination, creatorSlackUse
|
|
|
1830
1830
|
if (outcome.destination.channelId !== currentDestination.channelId) throw new Error("Messages can only be sent to the current Slack conversation or the task creator.");
|
|
1831
1831
|
resolved.push({
|
|
1832
1832
|
action: "send_message",
|
|
1833
|
-
destination:
|
|
1833
|
+
destination: currentDestination
|
|
1834
1834
|
});
|
|
1835
1835
|
continue;
|
|
1836
1836
|
}
|
|
@@ -1849,12 +1849,25 @@ async function resolveTaskOutcomes(outcomes, currentDestination, creatorSlackUse
|
|
|
1849
1849
|
}
|
|
1850
1850
|
return resolved;
|
|
1851
1851
|
}
|
|
1852
|
-
|
|
1852
|
+
function outcomeTargetsDestination(outcome, destination) {
|
|
1853
|
+
return outcome.destination.teamId === destination.teamId && outcome.destination.channelId === destination.channelId && (!outcome.destination.threadTs || outcome.destination.threadTs === destination.threadTs);
|
|
1854
|
+
}
|
|
1855
|
+
/** Return outcomes with legacy same-channel messages bound to the task Destination. */
|
|
1853
1856
|
function effectiveTaskOutcomes(outcomes, destination) {
|
|
1854
|
-
return outcomes ?? [{
|
|
1857
|
+
return (outcomes ?? [{
|
|
1855
1858
|
action: "send_message",
|
|
1856
1859
|
destination
|
|
1857
|
-
}]
|
|
1860
|
+
}]).map((outcome) => destination.threadTs && outcomeTargetsDestination(outcome, destination) ? {
|
|
1861
|
+
...outcome,
|
|
1862
|
+
destination
|
|
1863
|
+
} : outcome);
|
|
1864
|
+
}
|
|
1865
|
+
/** Move outcomes that target the task Destination and keep other outcomes unchanged. */
|
|
1866
|
+
function moveTaskOutcomes(outcomes, currentDestination, nextDestination) {
|
|
1867
|
+
return effectiveTaskOutcomes(outcomes, currentDestination).map((outcome) => outcomeTargetsDestination(outcome, currentDestination) ? {
|
|
1868
|
+
...outcome,
|
|
1869
|
+
destination: nextDestination
|
|
1870
|
+
} : outcome);
|
|
1858
1871
|
}
|
|
1859
1872
|
//#endregion
|
|
1860
1873
|
//#region src/chat/event-tasks/tool-support.ts
|
|
@@ -1909,7 +1922,8 @@ function requireEventTaskSlackContext(context) {
|
|
|
1909
1922
|
destination: {
|
|
1910
1923
|
platform: "slack",
|
|
1911
1924
|
teamId: context.source.teamId,
|
|
1912
|
-
channelId: context.source.channelId
|
|
1925
|
+
channelId: context.source.channelId,
|
|
1926
|
+
threadTs: context.source.threadTs ?? context.source.messageTs
|
|
1913
1927
|
},
|
|
1914
1928
|
source: context.source
|
|
1915
1929
|
};
|
|
@@ -2631,4 +2645,4 @@ async function readStats(start, end) {
|
|
|
2631
2645
|
return await getDb().select().from(juniorStats).where(and(gte(juniorStats.date, start), lte(juniorStats.date, end))).orderBy(asc(juniorStats.date), asc(juniorStats.namespace), asc(juniorStats.metric), asc(juniorStats.name));
|
|
2632
2646
|
}
|
|
2633
2647
|
//#endregion
|
|
2634
|
-
export {
|
|
2648
|
+
export { workspaceSnapshotFinishedEvent as $, eventTaskTriggerAvailable as A, recordConversationRetry as At, createEventTask as B, isFinalAttempt as Bt, SCHEDULED_TASK_SYSTEM_ACTOR as C, drainConversationMailbox as Ct, eventTaskMatchesDestination as D, hasRunnableConversationWork as Dt, eventTaskListToolResultSchema as E, getConversationWorkState as Et, effectiveTaskOutcomes as F, startConversationWork as Ft, listDeletedEventTasksCreatedBy as G, buildDeterministicAssistantMessageId as Gt, eventTaskBelongsToUser as H, injectContinuationToolName as Ht, moveTaskOutcomes as I, stopConversationWork as It, listPublicEventTasksForTeams as J, listEventTasksCreatedBy as K, buildDeterministicTurnId as Kt, resolveTaskOutcomes as L, CONVERSATION_WORK_CHECK_IN_INTERVAL_MS as Lt, requireEventTaskSlackContext as M, removeActiveConversation as Mt, requireSupportedEventTaskTrigger as N, requestAnotherSlice as Nt, eventTaskSuccess as O, listActiveConversationIds as Ot, writableEventTask as P, requestConversationWork as Pt, WORKSPACE_SNAPSHOT_READY_EVENT as Q, taskOutcomeInputSchema as R, CONVERSATION_WORK_STALE_ENQUEUE_MS as Rt, withScheduledTaskLock as S, deadLetterAttempt as St, compactEventTask as T, getConversation as Tt, findMatchingEventTasks as U, juniorToolOutputSchema as Ut, deleteEventTask as V, isInvalidConversationRecordError as Vt, getEventTask as W, makeStructuredToolOutput as Wt, getResourceEventCatalog as X, saveEventTask as Y, WORKSPACE_SNAPSHOT_FAILED_EVENT as Z, parseScheduledTaskRow as _, clearConsumedConversationWake as _t, requestAttachmentDeletion as a, pluginSupportsEvent as at, saveScheduledTaskInLock as b, completeConversationWork as bt, parseSlackThreadId as c, registeredResourceTypeSchema as ct, resolveSlackChannelIdFromThreadId as d, ackMessages as dt, workspaceSnapshotWatch as et, createScheduledTask as f, appendAndEnqueueExclusiveInboundMessage as ft, listScheduledTasksForTeam as g, checkInConversationWork as gt, listScheduledTasks as h, cancelHumanFacingPendingMessages as ht, readLiveAttachment as i, normalizeEventIdentifier as it, registeredEventTaskTriggerSchema as j, releaseConversationWork as jt, eventTaskToolResultSchema as k, recordAttemptFailure as kt, readSlackRawMessageContext as l, requireSupportedResourceEventMatch as lt, listPublicScheduledTasksForTeams as m, beginConversationResume as mt, readStats as n, hasPluginResourceEventCatalogEntries as nt, storeAttachment as o, registeredEventTypeSchema as ot, isListedScheduledTask as p, appendAndEnqueueInboundMessage as pt, listEventTasksForTeam as q, collectAttachmentGarbage as r, hasResourceEventCatalogEntries as rt, storeAttachments as s, registeredResourceEventMatchSchema as st, incrementStat as t, eventNamespaceSchema as tt, resolveSlackChannelIdFromMessage as u, resourceEventGuidance as ut, readScheduledTask as v, clearExpiredConversationLease as vt, scheduledRunSchema as w, ensureConversationWake as wt, scheduledRunId as x, countPendingConversationMessages as xt, saveScheduledTask as y, completeConversationStop as yt, collectEventTaskMatchKeys as z, hasRunnableConversationWork$1 as zt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as logWarn } from "./logging-
|
|
1
|
+
import { f as logWarn } from "./logging-D37bayDc.js";
|
|
2
2
|
import { a as signQueueMessage, i as QUEUE_SIGNATURE_MAX_AGE_MS, o as verifyQueueMessage, s as createVercelQueueClient } from "./vercel-queue-DIkVcfK4.js";
|
|
3
|
-
import { o as runWithTurnRequestDeadline } from "./job-queue-
|
|
3
|
+
import { o as runWithTurnRequestDeadline } from "./job-queue-CyTc24Es.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -110,7 +110,7 @@ function pluginTaskCallback() {
|
|
|
110
110
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
111
111
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
112
112
|
run: async (message) => {
|
|
113
|
-
const { processPluginTask } = await import("./task-runner-
|
|
113
|
+
const { processPluginTask } = await import("./task-runner-alpjVSxQ.js").then((n) => n.r);
|
|
114
114
|
await processPluginTask(message);
|
|
115
115
|
},
|
|
116
116
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|