@sentry/junior 0.287.0 → 0.288.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-CL-HUKgd.js → adapter-Cikcqdty.js} +1 -1
- package/dist/{admin-C9urXVfi.js → admin-BcSxHuTB.js} +2 -2
- package/dist/{agent-runner-Bfnw551N.js → agent-runner-9MXyWUL8.js} +173 -89
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +8 -7
- package/dist/api.d.ts +1 -1
- package/dist/api.js +403 -40
- package/dist/{app-DBY5TnfY.d.ts → app-BUklJVBe.d.ts} +4 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +521 -70
- package/dist/{assistant-reply-u_PRYzuz.js → assistant-reply-mj47jMRV.js} +1 -1
- package/dist/{automation-DksGNDRO.js → automation-DDXwHQs5.js} +2 -2
- package/dist/{background-compaction-queue-CYI909P5.js → background-compaction-queue-CjllSPir.js} +161 -90
- package/dist/{briefs-DaXiMWzT.js → briefs-DW9iuolG.js} +4 -3
- package/dist/{catalog-runtime-BCIuBe4d.js → catalog-runtime-B3gfH58M.js} +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- 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.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-CkHcUMN7.js → config-CLJcyYEF.js} +401 -9
- package/dist/{connections-BnIj0wtx.js → connections-BtdJftow.js} +9 -9
- package/dist/{conversation-E7ZPJx2H.js → conversation-DhoqHtQ7.js} +23 -6
- package/dist/{conversation-pending-messages-DVch6YQw.js → conversation-pending-messages-DHV0S4uF.js} +1 -1
- package/dist/{conversation-privacy-DF1hW0ja.js → conversation-privacy-BPirIVlX.js} +1 -1
- package/dist/core-model-BTt5E5b0.js +182 -0
- package/dist/{credential-sync-CzMar9hq.js → credential-sync-Co8Q2xRW.js} +28 -20
- package/dist/{db-DJ11eZqq.js → db-Co7DTYYh.js} +30 -20
- package/dist/{db-YDKKDxlh.d.ts → db-zIs8-Ba3.d.ts} +6 -2
- package/dist/{executor-BY9TB31g.js → executor-m0kIN71Q.js} +93 -12
- package/dist/{media-Cz1ZiV1U.js → history-IjdmO_r6.js} +6 -86
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-BO5zU6Mt.js → logging-DbD-dErY.js} +3 -2
- package/dist/media-BAHvgkok.js +85 -0
- package/dist/{message-CsUbuEc8.js → message-DKTdTYm-.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +19 -41
- package/dist/{oauth-callback-server-hiDKK0_n.js → oauth-callback-server-CpbepSbp.js} +2 -2
- package/dist/{projection-CL_YWeGf.js → projection-BViECfYu.js} +309 -616
- package/dist/{prompt-BHOEQSmf.js → prompt-KT6MaDHN.js} +2 -182
- package/dist/{registry-BriFLnaJ.js → registry-D-Acyjhh.js} +1 -1
- package/dist/{resolve-Bt6GgAiA.js → resolve-gkT2R66z.js} +3 -3
- package/dist/{result-Bo1TZu0Q.js → result-DHmCFEt8.js} +8 -8
- package/dist/{runner-D3YeCQgt.js → runner-DBKjGjH-.js} +8 -8
- package/dist/{sandbox-egress-signals-CcnSPP4S.js → sandbox-egress-signals-9n8hqx29.js} +1 -1
- package/dist/{schedule-BTp__wrw.js → schedule-cP0AACm1.js} +11 -2
- package/dist/{schema-C6fsEwjo.d.ts → schema-B_6aOcx5.d.ts} +114 -3
- package/dist/{schema-BWE3RJEB.js → schema-DxicIQbc.js} +66 -13
- package/dist/{service-account-r6fl0b-9.js → service-account-Bi0HsY6w.js} +3 -3
- package/dist/{service-account-DiQQuuw7.js → service-account-CDlC9ssy.js} +3 -3
- package/dist/{session-stop-B2Nut40V.js → session-stop-BWOsuo8p.js} +56 -14
- package/dist/{skills-CD5aJdzg.js → skills-DO5K68Rq.js} +2 -2
- package/dist/{spawn-CalgZQiu.js → spawn-BBqZDcPa.js} +5 -5
- package/dist/{stop-kujZLbi0.js → stop-WC97cmHz.js} +802 -338
- package/dist/{store-DdIEUL1q.js → store-ByR1Lr7e.js} +4 -16
- package/dist/{task-runner-D_RDr2Hu.js → task-runner-B-Ewf8TX.js} +30 -22
- package/dist/{turn-failure-response-B5nV1Er-.js → turn-failure-response-CpdPoZSl.js} +18 -9
- package/dist/{validation-K4pqwoVZ.js → validation-B4sbIoES.js} +1 -1
- package/dist/{version-DBvhk1X9.js → version-D6lpuAgL.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DrMmFUul.js → viewer-CeP27tC3.js} +4 -4
- package/dist/warmup-P_GJCL1c.js +767 -0
- package/dist/{work-ljRoODGu.js → work-DI7x1Slm.js} +14 -13
- package/dist/{worker-CYO1Q0Js.js → worker-CYPTOT4j.js} +6 -6
- package/migrations/0089_conversation_paused_status.sql +3 -0
- package/migrations/0090_guardian_review_time_index.sql +20 -0
- package/migrations/meta/0089_snapshot.json +4372 -0
- package/migrations/meta/0090_snapshot.json +4388 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +5 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-
|
|
2
|
-
import { i as actorIdentitySchema } from "./conversation-
|
|
1
|
+
import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-cP0AACm1.js";
|
|
2
|
+
import { i as actorIdentitySchema } from "./conversation-DhoqHtQ7.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
5
5
|
// src/chat/scheduled-automations/schedule-intent.ts
|
package/dist/{background-compaction-queue-CYI909P5.js → background-compaction-queue-CjllSPir.js}
RENAMED
|
@@ -1,45 +1,9 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-CLJcyYEF.js";
|
|
2
|
+
import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-DbD-dErY.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { QueueClient, handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
7
|
-
/** Validate the v2 conversation work hint sent through Vercel Queue. */
|
|
8
|
-
const conversationQueueMessageSchema = z.object({
|
|
9
|
-
schemaVersion: z.literal(2),
|
|
10
|
-
conversationId: z.string().trim().min(1)
|
|
11
|
-
}).strict();
|
|
12
|
-
var ConversationQueueMessageRejectedError = class extends Error {
|
|
13
|
-
conversationId;
|
|
14
|
-
reason;
|
|
15
|
-
constructor(reason, message, options = {}) {
|
|
16
|
-
super(message);
|
|
17
|
-
this.name = "ConversationQueueMessageRejectedError";
|
|
18
|
-
this.reason = reason;
|
|
19
|
-
this.conversationId = options.conversationId;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
/** Return whether an error means the queue message was permanently rejected. */
|
|
23
|
-
function isConversationQueueMessageRejectedError(error) {
|
|
24
|
-
return error instanceof ConversationQueueMessageRejectedError;
|
|
25
|
-
}
|
|
26
|
-
// src/chat/runtime/request-deadline.ts
|
|
27
|
-
const requestDeadlineStorage = new AsyncLocalStorage();
|
|
28
|
-
function createTurnRequestDeadline(startedAtMs) {
|
|
29
|
-
return {
|
|
30
|
-
startedAtMs,
|
|
31
|
-
deadlineAtMs: startedAtMs + Math.max(1, getChatConfig().functionMaxDurationSeconds * 1e3 - 2e4)
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/** Return the host request deadline inherited by the current async turn. */
|
|
35
|
-
function getTurnRequestDeadline() {
|
|
36
|
-
return requestDeadlineStorage.getStore();
|
|
37
|
-
}
|
|
38
|
-
/** Run work with one host request deadline shared by nested queued turns. */
|
|
39
|
-
function runWithTurnRequestDeadline(callback, startedAtMs = Date.now()) {
|
|
40
|
-
if (requestDeadlineStorage.getStore()) return callback();
|
|
41
|
-
return requestDeadlineStorage.run(createTurnRequestDeadline(startedAtMs), callback);
|
|
42
|
-
}
|
|
43
7
|
// src/chat/queue/bullmq.ts
|
|
44
8
|
const MAX_ATTEMPTS = 50;
|
|
45
9
|
const MAX_BACKOFF_MS = 3e4;
|
|
@@ -203,6 +167,73 @@ const vercelQueueProvider = {
|
|
|
203
167
|
function getQueueProvider() {
|
|
204
168
|
return getChatConfig().queue.provider === "bullmq" ? bullmqQueueProvider : vercelQueueProvider;
|
|
205
169
|
}
|
|
170
|
+
// src/chat/runtime/request-deadline.ts
|
|
171
|
+
const requestDeadlineStorage = new AsyncLocalStorage();
|
|
172
|
+
function createTurnRequestDeadline(startedAtMs) {
|
|
173
|
+
return {
|
|
174
|
+
startedAtMs,
|
|
175
|
+
deadlineAtMs: startedAtMs + Math.max(1, getChatConfig().functionMaxDurationSeconds * 1e3 - 2e4)
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/** Return the host request deadline inherited by the current async turn. */
|
|
179
|
+
function getTurnRequestDeadline() {
|
|
180
|
+
return requestDeadlineStorage.getStore();
|
|
181
|
+
}
|
|
182
|
+
/** Run work with one host request deadline shared by nested queued turns. */
|
|
183
|
+
function runWithTurnRequestDeadline(callback, startedAtMs = Date.now()) {
|
|
184
|
+
if (requestDeadlineStorage.getStore()) return callback();
|
|
185
|
+
return requestDeadlineStorage.run(createTurnRequestDeadline(startedAtMs), callback);
|
|
186
|
+
}
|
|
187
|
+
// src/chat/queue/callback.ts
|
|
188
|
+
/** Shared queue callback wiring for signed messages. */
|
|
189
|
+
/** Build the HTTP callback and local-dev consumer for one signed queue. */
|
|
190
|
+
function queueCallback(options) {
|
|
191
|
+
const consume = async (message, metadata) => {
|
|
192
|
+
if (options.skip?.(metadata)) return;
|
|
193
|
+
try {
|
|
194
|
+
await runWithTurnRequestDeadline(() => options.run(message, metadata));
|
|
195
|
+
} catch (error) {
|
|
196
|
+
const reason = options.permanentError?.(error);
|
|
197
|
+
if (!reason) throw error;
|
|
198
|
+
options.onRejected(reason, metadata, error);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
const handler = async (value, metadata) => {
|
|
202
|
+
if (options.skip?.(metadata)) return;
|
|
203
|
+
const checked = options.verify(value);
|
|
204
|
+
if (checked.status === "rejected") {
|
|
205
|
+
options.onRejected(checked.reason, metadata);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (checked.status === "unavailable") throw new Error(`Queue message verification unavailable: ${checked.reason}`);
|
|
209
|
+
await consume(checked.message, metadata);
|
|
210
|
+
};
|
|
211
|
+
const retry = (error, metadata) => {
|
|
212
|
+
const reason = options.permanentError?.(error);
|
|
213
|
+
if (reason) {
|
|
214
|
+
options.onRejected(reason, metadata, error);
|
|
215
|
+
return { acknowledge: true };
|
|
216
|
+
}
|
|
217
|
+
if (options.maxDeliveries !== null && metadata.deliveryCount >= options.maxDeliveries) return { acknowledge: true };
|
|
218
|
+
};
|
|
219
|
+
const consumer = {
|
|
220
|
+
consumerGroup: options.consumerGroup,
|
|
221
|
+
handler,
|
|
222
|
+
retry,
|
|
223
|
+
topic: options.topic,
|
|
224
|
+
visibilityTimeoutSeconds: options.visibilityTimeoutSeconds
|
|
225
|
+
};
|
|
226
|
+
return {
|
|
227
|
+
/** Run a message that an in-process queue already trusts. */
|
|
228
|
+
consume,
|
|
229
|
+
consumer,
|
|
230
|
+
create: () => getQueueProvider().createCallback(consumer),
|
|
231
|
+
registerDev: () => {
|
|
232
|
+
if (process.env.NODE_ENV !== "development") return;
|
|
233
|
+
return getQueueProvider().registerDevConsumer?.(consumer);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
}
|
|
206
237
|
// src/chat/queue/sign.ts
|
|
207
238
|
/** Sign and check queue messages before public callbacks run them. */
|
|
208
239
|
const QUEUE_SIGNATURE_MAX_AGE_MS = 36e5;
|
|
@@ -289,6 +320,96 @@ function verifyQueueMessage(config, value, nowMs = Date.now()) {
|
|
|
289
320
|
message: message.data
|
|
290
321
|
};
|
|
291
322
|
}
|
|
323
|
+
// src/chat/cache-warming/queue.ts
|
|
324
|
+
/** Send and receive delayed cache warmup messages. */
|
|
325
|
+
/** Deploy topic name. Keep stable for Vercel queue wiring. */
|
|
326
|
+
const CACHE_WARMUP_QUEUE_TOPIC = "junior_cache_warmups";
|
|
327
|
+
const CACHE_WARMUP_DEV_CONSUMER_GROUP = "junior_cache_warmups_dev";
|
|
328
|
+
const cacheWarmupSign = {
|
|
329
|
+
context: "junior.cache_warmup_queue.v1",
|
|
330
|
+
schema: z.discriminatedUnion("kind", [z.object({
|
|
331
|
+
kind: z.literal("warmup"),
|
|
332
|
+
conversationId: z.string().min(1),
|
|
333
|
+
cycle: z.number().int().positive(),
|
|
334
|
+
generation: z.string().min(1),
|
|
335
|
+
cacheExpiresAtMs: z.number().int().positive()
|
|
336
|
+
}).strict(), z.object({
|
|
337
|
+
kind: z.literal("horizon"),
|
|
338
|
+
conversationId: z.string().min(1),
|
|
339
|
+
generation: z.string().min(1)
|
|
340
|
+
}).strict()]),
|
|
341
|
+
signatureVersion: "v1",
|
|
342
|
+
parts: (message) => [
|
|
343
|
+
message.kind,
|
|
344
|
+
message.conversationId,
|
|
345
|
+
message.generation,
|
|
346
|
+
message.kind === "warmup" ? String(message.cycle) : "",
|
|
347
|
+
message.kind === "warmup" ? String(message.cacheExpiresAtMs) : ""
|
|
348
|
+
]
|
|
349
|
+
};
|
|
350
|
+
/** Send a cache warming message that is delivered after `delayMs`. */
|
|
351
|
+
async function sendCacheWarmup(message, delayMs) {
|
|
352
|
+
await getQueueProvider().send(CACHE_WARMUP_QUEUE_TOPIC, signQueueMessage(cacheWarmupSign, message), {
|
|
353
|
+
delaySeconds: Math.max(0, Math.floor(delayMs / 1e3)),
|
|
354
|
+
retentionSeconds: message.kind === "warmup" ? Math.min(QUEUE_SIGNATURE_MAX_AGE_MS / 1e3, Math.ceil(Math.max(0, delayMs) / 1e3) + 120) : QUEUE_SIGNATURE_MAX_AGE_MS / 1e3,
|
|
355
|
+
idempotencyKey: `cache-warmup_${message.generation}_${message.kind === "warmup" ? message.cycle : message.kind}`
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
function logCacheWarmupRejected(reason, metadata, error) {
|
|
359
|
+
logWarn("cache_warming.queue_message.rejected", {
|
|
360
|
+
"app.queue.consumer_group": metadata.consumerGroup,
|
|
361
|
+
"app.queue.delivery_count": metadata.deliveryCount,
|
|
362
|
+
"app.queue.message_id": metadata.messageId,
|
|
363
|
+
"app.queue.reject_reason": reason,
|
|
364
|
+
"app.queue.topic_name": metadata.topicName,
|
|
365
|
+
...error instanceof Error ? { "exception.message": error.message } : void 0
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
function cacheWarmupCallback() {
|
|
369
|
+
return queueCallback({
|
|
370
|
+
consumerGroup: CACHE_WARMUP_DEV_CONSUMER_GROUP,
|
|
371
|
+
maxDeliveries: 1,
|
|
372
|
+
onRejected: logCacheWarmupRejected,
|
|
373
|
+
run: async (message) => {
|
|
374
|
+
const { runCacheWarmup } = await import("./warmup-P_GJCL1c.js").then((n) => n.o);
|
|
375
|
+
await runCacheWarmup(message);
|
|
376
|
+
},
|
|
377
|
+
skip: () => !getChatConfig().cacheWarmingEnabled,
|
|
378
|
+
topic: CACHE_WARMUP_QUEUE_TOPIC,
|
|
379
|
+
verify: (value) => verifyQueueMessage(cacheWarmupSign, value)
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
/** Create the HTTP route for cache warmup messages. */
|
|
383
|
+
function createVercelCacheWarmupCallback() {
|
|
384
|
+
return cacheWarmupCallback().create();
|
|
385
|
+
}
|
|
386
|
+
/** Return the queue consumer for cache warmups, for a pulling queue worker. */
|
|
387
|
+
function cacheWarmupQueueConsumer() {
|
|
388
|
+
return cacheWarmupCallback().consumer;
|
|
389
|
+
}
|
|
390
|
+
/** Receive cache warmup messages during local development. */
|
|
391
|
+
function registerVercelCacheWarmupDevConsumer() {
|
|
392
|
+
return cacheWarmupCallback().registerDev();
|
|
393
|
+
}
|
|
394
|
+
/** Validate the v2 conversation work hint sent through Vercel Queue. */
|
|
395
|
+
const conversationQueueMessageSchema = z.object({
|
|
396
|
+
schemaVersion: z.literal(2),
|
|
397
|
+
conversationId: z.string().trim().min(1)
|
|
398
|
+
}).strict();
|
|
399
|
+
var ConversationQueueMessageRejectedError = class extends Error {
|
|
400
|
+
conversationId;
|
|
401
|
+
reason;
|
|
402
|
+
constructor(reason, message, options = {}) {
|
|
403
|
+
super(message);
|
|
404
|
+
this.name = "ConversationQueueMessageRejectedError";
|
|
405
|
+
this.reason = reason;
|
|
406
|
+
this.conversationId = options.conversationId;
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
/** Return whether an error means the queue message was permanently rejected. */
|
|
410
|
+
function isConversationQueueMessageRejectedError(error) {
|
|
411
|
+
return error instanceof ConversationQueueMessageRejectedError;
|
|
412
|
+
}
|
|
292
413
|
// src/chat/task-execution/queue-signing.ts
|
|
293
414
|
const conversationQueueSign = {
|
|
294
415
|
context: "junior.conversation_work_queue.v2",
|
|
@@ -381,56 +502,6 @@ async function sendWorkspaceSnapshotJob(message) {
|
|
|
381
502
|
async function sendNextWorkspaceSnapshotJob(message) {
|
|
382
503
|
await send(message);
|
|
383
504
|
}
|
|
384
|
-
// src/chat/queue/callback.ts
|
|
385
|
-
/** Shared queue callback wiring for signed messages. */
|
|
386
|
-
/** Build the HTTP callback and local-dev consumer for one signed queue. */
|
|
387
|
-
function queueCallback(options) {
|
|
388
|
-
const consume = async (message, metadata) => {
|
|
389
|
-
if (options.skip?.(metadata)) return;
|
|
390
|
-
try {
|
|
391
|
-
await runWithTurnRequestDeadline(() => options.run(message, metadata));
|
|
392
|
-
} catch (error) {
|
|
393
|
-
const reason = options.permanentError?.(error);
|
|
394
|
-
if (!reason) throw error;
|
|
395
|
-
options.onRejected(reason, metadata, error);
|
|
396
|
-
}
|
|
397
|
-
};
|
|
398
|
-
const handler = async (value, metadata) => {
|
|
399
|
-
if (options.skip?.(metadata)) return;
|
|
400
|
-
const checked = options.verify(value);
|
|
401
|
-
if (checked.status === "rejected") {
|
|
402
|
-
options.onRejected(checked.reason, metadata);
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
if (checked.status === "unavailable") throw new Error(`Queue message verification unavailable: ${checked.reason}`);
|
|
406
|
-
await consume(checked.message, metadata);
|
|
407
|
-
};
|
|
408
|
-
const retry = (error, metadata) => {
|
|
409
|
-
const reason = options.permanentError?.(error);
|
|
410
|
-
if (reason) {
|
|
411
|
-
options.onRejected(reason, metadata, error);
|
|
412
|
-
return { acknowledge: true };
|
|
413
|
-
}
|
|
414
|
-
if (options.maxDeliveries !== null && metadata.deliveryCount >= options.maxDeliveries) return { acknowledge: true };
|
|
415
|
-
};
|
|
416
|
-
const consumer = {
|
|
417
|
-
consumerGroup: options.consumerGroup,
|
|
418
|
-
handler,
|
|
419
|
-
retry,
|
|
420
|
-
topic: options.topic,
|
|
421
|
-
visibilityTimeoutSeconds: options.visibilityTimeoutSeconds
|
|
422
|
-
};
|
|
423
|
-
return {
|
|
424
|
-
/** Run a message that an in-process queue already trusts. */
|
|
425
|
-
consume,
|
|
426
|
-
consumer,
|
|
427
|
-
create: () => getQueueProvider().createCallback(consumer),
|
|
428
|
-
registerDev: () => {
|
|
429
|
-
if (process.env.NODE_ENV !== "development") return;
|
|
430
|
-
return getQueueProvider().registerDevConsumer?.(consumer);
|
|
431
|
-
}
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
505
|
// src/chat/plugins/task-queue.ts
|
|
435
506
|
/**
|
|
436
507
|
* Delivery for plugin-registered tasks.
|
|
@@ -489,7 +560,7 @@ function pluginTaskCallback() {
|
|
|
489
560
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
490
561
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
491
562
|
run: async (message) => {
|
|
492
|
-
const { processPluginTask } = await import("./task-runner-
|
|
563
|
+
const { processPluginTask } = await import("./task-runner-B-Ewf8TX.js").then((n) => n.r);
|
|
493
564
|
await processPluginTask(message);
|
|
494
565
|
},
|
|
495
566
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -554,4 +625,4 @@ const vercelBackgroundCompactionQueue = { send: async (message) => {
|
|
|
554
625
|
retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
|
|
555
626
|
});
|
|
556
627
|
} };
|
|
557
|
-
export {
|
|
628
|
+
export { getQueueProvider as A, cacheWarmupQueueConsumer as C, QUEUE_SIGNATURE_MAX_AGE_MS as D, sendCacheWarmup as E, queueCallback as O, CACHE_WARMUP_QUEUE_TOPIC as S, registerVercelCacheWarmupDevConsumer as T, resolveConversationWorkQueueTopic as _, PLUGIN_TASK_QUEUE_TOPIC as a, conversationQueueMessageSchema as b, pluginTaskParamsSchema as c, sendVercelPluginTask as d, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as f, getVercelConversationWorkQueue as g, verifyWorkspaceSnapshotJobMessage as h, verifyBackgroundCompactionMessage as i, getTurnRequestDeadline as k, pluginTaskQueueConsumer as l, sendWorkspaceSnapshotJob as m, backgroundCompactionId as n, createVercelPluginTaskCallback as o, sendNextWorkspaceSnapshotJob as p, vercelBackgroundCompactionQueue as r, pluginTaskId as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, registerVercelPluginTaskDevConsumer as u, verifyConversationQueueMessage as v, createVercelCacheWarmupCallback as w, isConversationQueueMessageRejectedError as x, ConversationQueueMessageRejectedError as y };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { K as
|
|
1
|
+
import { n as completeObject } from "./core-model-BTt5E5b0.js";
|
|
2
|
+
import { K as briefCodeChangeSchema, Y as briefResourceLabel, Z as parseBriefInput, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-DhoqHtQ7.js";
|
|
3
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-KT6MaDHN.js";
|
|
3
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import * as z from "zod";
|
|
@@ -262,7 +263,7 @@ async function parseRunOptions(argv) {
|
|
|
262
263
|
* token.
|
|
263
264
|
*/
|
|
264
265
|
async function configuredBriefModelId() {
|
|
265
|
-
const { botConfig } = await import("./config-
|
|
266
|
+
const { botConfig } = await import("./config-CLJcyYEF.js").then((n) => n.r);
|
|
266
267
|
return botConfig.fastModelId;
|
|
267
268
|
}
|
|
268
269
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-D-Acyjhh.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-9MXyWUL8.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-HYh_JOdw.js").then((n) => n.o),
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../db-
|
|
102
|
+
import("../projection-BViECfYu.js").then((n) => n.Mn),
|
|
103
|
+
import("../catalog-runtime-B3gfH58M.js").then((n) => n.t),
|
|
104
|
+
import("../validation-B4sbIoES.js").then((n) => n.r),
|
|
105
|
+
import("../db-Co7DTYYh.js").then((n) => n.n)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,18 +152,18 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig } = await import("../projection-BViECfYu.js").then((n) => n.Wn);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-DBKjGjH-.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CpbepSbp.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.js").then((n) => n.t);
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const { skipInputAfterConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-9n8hqx29.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-BBqZDcPa.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-DKTdTYm-.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-DHmCFEt8.js").then((n) => n.i);
|
|
164
|
+
const { skipInputAfterConversationStop } = await import("../session-stop-BWOsuo8p.js").then((n) => n.a);
|
|
165
165
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
166
|
+
const { processConversationWork } = await import("../worker-CYPTOT4j.js").then((n) => n.n);
|
|
167
167
|
let agentRunner;
|
|
168
168
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
169
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-DbD-dErY.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-D-Acyjhh.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DO5K68Rq.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-BcSxHuTB.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runServiceAccount(argv) {
|
|
31
|
-
return await (await import("../service-account-
|
|
31
|
+
return await (await import("../service-account-Bi0HsY6w.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-DW9iuolG.js")).runBriefs(argv);
|
|
35
35
|
}
|
|
36
36
|
function topLevelCommand(argv) {
|
|
37
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as getDb } from "../db-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { Hn as validatePlugins, Ka as createPluginLogger, Vn as setPlugins } from "../projection-BViECfYu.js";
|
|
2
|
+
import { o as getDb } from "../db-Co7DTYYh.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-B3gfH58M.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-B4sbIoES.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { Da as SANDBOX_RUNTIME, xi as create } from "../projection-BViECfYu.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-B3gfH58M.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-Cikcqdty.js";
|
|
4
|
+
import { n as resolve } from "../resolve-gkT2R66z.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
|
7
7
|
function progressMessage(phase) {
|
package/dist/cli/upgrade.d.ts
CHANGED
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-CLJcyYEF.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-m0kIN71Q.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-D-Acyjhh.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|