@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
|
@@ -177,6 +177,7 @@ const historyReplacementEventDataSchema = z.object({
|
|
|
177
177
|
modelProfile: legacyModelProfileSchema,
|
|
178
178
|
modelId: z.string().min(1),
|
|
179
179
|
details: compactionDetailsSchema.optional(),
|
|
180
|
+
costUsd: z.number().finite().nonnegative().optional(),
|
|
180
181
|
summary: z.string().min(1).optional(),
|
|
181
182
|
replacementHistory: replacementHistorySchema
|
|
182
183
|
}).strict();
|
|
@@ -414,7 +415,10 @@ const compactionRequestedEventDataSchema = z.object({
|
|
|
414
415
|
modelProfile: legacyModelProfileSchema,
|
|
415
416
|
modelId: z.string().min(1)
|
|
416
417
|
}).strict();
|
|
417
|
-
const compactionPreparedFields = compactionRequestedEventDataSchema.extend({
|
|
418
|
+
const compactionPreparedFields = compactionRequestedEventDataSchema.extend({
|
|
419
|
+
type: z.literal("compaction_prepared"),
|
|
420
|
+
costUsd: z.number().finite().nonnegative().optional()
|
|
421
|
+
});
|
|
418
422
|
const compactionPreparedEventDataSchema = z.discriminatedUnion("outcome", [compactionPreparedFields.extend({
|
|
419
423
|
outcome: z.literal("ready"),
|
|
420
424
|
summary: z.string().min(1)
|
|
@@ -551,88 +555,4 @@ const newConversationEventSchema = z.object({
|
|
|
551
555
|
idempotencyKey: z.string().min(1).optional(),
|
|
552
556
|
createdAtMs: z.number().finite()
|
|
553
557
|
}).strict();
|
|
554
|
-
|
|
555
|
-
const INPUT_IMAGE_TYPES = [
|
|
556
|
-
"image/png",
|
|
557
|
-
"image/jpeg",
|
|
558
|
-
"image/gif",
|
|
559
|
-
"image/webp"
|
|
560
|
-
];
|
|
561
|
-
/** Video types that browsers play in a `<video>` element. */
|
|
562
|
-
const INLINE_VIDEO_TYPES = ["video/mp4", "video/webm"];
|
|
563
|
-
/** Leading bytes of each accepted image type. `null` matches any byte. */
|
|
564
|
-
const IMAGE_SIGNATURES = [
|
|
565
|
-
{
|
|
566
|
-
mediaType: "image/png",
|
|
567
|
-
bytes: [
|
|
568
|
-
137,
|
|
569
|
-
80,
|
|
570
|
-
78,
|
|
571
|
-
71,
|
|
572
|
-
13,
|
|
573
|
-
10,
|
|
574
|
-
26,
|
|
575
|
-
10
|
|
576
|
-
]
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
mediaType: "image/jpeg",
|
|
580
|
-
bytes: [
|
|
581
|
-
255,
|
|
582
|
-
216,
|
|
583
|
-
255
|
|
584
|
-
]
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
mediaType: "image/gif",
|
|
588
|
-
bytes: [
|
|
589
|
-
71,
|
|
590
|
-
73,
|
|
591
|
-
70,
|
|
592
|
-
56,
|
|
593
|
-
55,
|
|
594
|
-
97
|
|
595
|
-
]
|
|
596
|
-
},
|
|
597
|
-
{
|
|
598
|
-
mediaType: "image/gif",
|
|
599
|
-
bytes: [
|
|
600
|
-
71,
|
|
601
|
-
73,
|
|
602
|
-
70,
|
|
603
|
-
56,
|
|
604
|
-
57,
|
|
605
|
-
97
|
|
606
|
-
]
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
mediaType: "image/webp",
|
|
610
|
-
bytes: [
|
|
611
|
-
82,
|
|
612
|
-
73,
|
|
613
|
-
70,
|
|
614
|
-
70,
|
|
615
|
-
null,
|
|
616
|
-
null,
|
|
617
|
-
null,
|
|
618
|
-
null,
|
|
619
|
-
87,
|
|
620
|
-
69,
|
|
621
|
-
66,
|
|
622
|
-
80
|
|
623
|
-
]
|
|
624
|
-
}
|
|
625
|
-
];
|
|
626
|
-
/**
|
|
627
|
-
* Detect an accepted image type from file bytes. Use this instead of a file
|
|
628
|
-
* name or declared content type, which can be wrong.
|
|
629
|
-
*/
|
|
630
|
-
function detectImageMediaType(data) {
|
|
631
|
-
return IMAGE_SIGNATURES.find(({ bytes }) => data.length >= bytes.length && bytes.every((byte, index) => byte === null || data[index] === byte))?.mediaType;
|
|
632
|
-
}
|
|
633
|
-
/** Report whether a media type is a raster image accepted by vision models. */
|
|
634
|
-
function isVisionImageMediaType(mediaType) {
|
|
635
|
-
const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
|
|
636
|
-
return normalized ? INPUT_IMAGE_TYPES.some((type) => type === normalized) : false;
|
|
637
|
-
}
|
|
638
|
-
export { instructionProvenanceFor as _, KNOWN_CONVERSATION_EVENT_TYPES as a, conversationTurnFailureCodeSchema as c, historyReplacementSchema as d, newConversationEventSchema as f, instructionActors as g, contextProvenance as h, isVisionImageMediaType as i, conversationTurnFailureReasonSchema as l, agentInstructionProvenance as m, INPUT_IMAGE_TYPES as n, agentHistoryItemSchema as o, encodeHistoryPayload as p, detectImageMediaType as r, conversationEventDataSchema as s, INLINE_VIDEO_TYPES as t, decodeStoredConversationEvent as u, sameActorIdentity as v, usageSchema as y };
|
|
558
|
+
export { conversationTurnFailureReasonSchema as a, newConversationEventSchema as c, contextProvenance as d, instructionActors as f, usageSchema as h, conversationTurnFailureCodeSchema as i, encodeHistoryPayload as l, sameActorIdentity as m, agentHistoryItemSchema as n, decodeStoredConversationEvent as o, instructionProvenanceFor as p, conversationEventDataSchema as r, historyReplacementSchema as s, KNOWN_CONVERSATION_EVENT_TYPES as t, agentInstructionProvenance as u };
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
2
|
+
import { B as getDeploymentTelemetryAttributes, z as getDeploymentServiceVersion } from "./logging-DbD-dErY.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BPirIVlX.js";
|
|
4
4
|
import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
|
|
5
5
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
6
6
|
import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withScope, 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 } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-D6lpuAgL.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";
|
|
@@ -117,6 +117,7 @@ const JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE = "17 * * * *";
|
|
|
117
117
|
const JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE = "/api/internal/agent/continue";
|
|
118
118
|
const JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE = "/api/internal/plugin/tasks";
|
|
119
119
|
const JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE = "/api/internal/workspace/snapshots";
|
|
120
|
+
const JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE = "/api/internal/cache/warmups";
|
|
120
121
|
const JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE = "/api/internal/context/compactions";
|
|
121
122
|
const LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION = "api/internal/agent/continue.ts";
|
|
122
123
|
const SERVICE_INSTANCE_ID = randomUUID();
|
|
@@ -1247,4 +1248,4 @@ function extractGenAiUsageAttributes(...sources) {
|
|
|
1247
1248
|
...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
|
|
1248
1249
|
};
|
|
1249
1250
|
}
|
|
1250
|
-
export {
|
|
1251
|
+
export { JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE as A, getDeploymentTelemetryAttributes as B, summarizeMessageText as C, JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE as D, withSpan as E, JUNIOR_RETENTION_CRON_SCHEDULE as F, normalizeIdentityEmail as G, runWithLogContext as H, JUNIOR_RETENTION_ROUTE as I, toOptionalString as J, isRecord as K, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as L, JUNIOR_HEARTBEAT_CRON_SCHEDULE as M, JUNIOR_HEARTBEAT_ROUTE as N, JUNIOR_AUTO_ARCHIVE_ROUTE as O, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as P, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as R, setTags as S, withLogContext as T, GOOGLE_IDENTITY_PROVIDER as U, runWithLogAttributes as V, isNativeIdentityProvider as W, runBestEffort as _, extractGenAiUsageSummary as a, setSpanAttributes as b, getLogContextAttributes as c, logAudit as d, logError as f, normalizeGenAiFinishReason as g, logWarn as h, extractGenAiUsageAttributes as i, JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as j, JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, toOptionalNumber as q, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, getDeploymentServiceVersion as z };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// src/chat/attachments/media.ts
|
|
2
|
+
const INPUT_IMAGE_TYPES = [
|
|
3
|
+
"image/png",
|
|
4
|
+
"image/jpeg",
|
|
5
|
+
"image/gif",
|
|
6
|
+
"image/webp"
|
|
7
|
+
];
|
|
8
|
+
/** Video types that browsers play in a `<video>` element. */
|
|
9
|
+
const INLINE_VIDEO_TYPES = ["video/mp4", "video/webm"];
|
|
10
|
+
/** Leading bytes of each accepted image type. `null` matches any byte. */
|
|
11
|
+
const IMAGE_SIGNATURES = [
|
|
12
|
+
{
|
|
13
|
+
mediaType: "image/png",
|
|
14
|
+
bytes: [
|
|
15
|
+
137,
|
|
16
|
+
80,
|
|
17
|
+
78,
|
|
18
|
+
71,
|
|
19
|
+
13,
|
|
20
|
+
10,
|
|
21
|
+
26,
|
|
22
|
+
10
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
mediaType: "image/jpeg",
|
|
27
|
+
bytes: [
|
|
28
|
+
255,
|
|
29
|
+
216,
|
|
30
|
+
255
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
mediaType: "image/gif",
|
|
35
|
+
bytes: [
|
|
36
|
+
71,
|
|
37
|
+
73,
|
|
38
|
+
70,
|
|
39
|
+
56,
|
|
40
|
+
55,
|
|
41
|
+
97
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
mediaType: "image/gif",
|
|
46
|
+
bytes: [
|
|
47
|
+
71,
|
|
48
|
+
73,
|
|
49
|
+
70,
|
|
50
|
+
56,
|
|
51
|
+
57,
|
|
52
|
+
97
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
mediaType: "image/webp",
|
|
57
|
+
bytes: [
|
|
58
|
+
82,
|
|
59
|
+
73,
|
|
60
|
+
70,
|
|
61
|
+
70,
|
|
62
|
+
null,
|
|
63
|
+
null,
|
|
64
|
+
null,
|
|
65
|
+
null,
|
|
66
|
+
87,
|
|
67
|
+
69,
|
|
68
|
+
66,
|
|
69
|
+
80
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
];
|
|
73
|
+
/**
|
|
74
|
+
* Detect an accepted image type from file bytes. Use this instead of a file
|
|
75
|
+
* name or declared content type, which can be wrong.
|
|
76
|
+
*/
|
|
77
|
+
function detectImageMediaType(data) {
|
|
78
|
+
return IMAGE_SIGNATURES.find(({ bytes }) => data.length >= bytes.length && bytes.every((byte, index) => byte === null || data[index] === byte))?.mediaType;
|
|
79
|
+
}
|
|
80
|
+
/** Report whether a media type is a raster image accepted by vision models. */
|
|
81
|
+
function isVisionImageMediaType(mediaType) {
|
|
82
|
+
const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
|
|
83
|
+
return normalized ? INPUT_IMAGE_TYPES.some((type) => type === normalized) : false;
|
|
84
|
+
}
|
|
85
|
+
export { isVisionImageMediaType as i, INPUT_IMAGE_TYPES as n, detectImageMediaType as r, INLINE_VIDEO_TYPES as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-
|
|
5
|
-
import { $t as
|
|
6
|
-
import { I as PARENT_AGENT_TARGET, v as getActiveAgentInvocationForConversation } from "./turn-failure-response-
|
|
7
|
-
import { G as admitAutomatedTurn, S as EVENT_WAIT_MS, V as postAutomatedTurnLimitNoticeForConversation } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { a as enqueueAgentInvocation, c as createAgentInvocationForMessage, u as findChildAgentConversationId } from "./work-
|
|
10
|
-
import { r as enqueueAgentMessageToParent } from "./result-
|
|
2
|
+
import { Ya as readConversationAccessFromSql, qa as canAccessConversation, wn as renderUntrustedTag } from "./projection-BViECfYu.js";
|
|
3
|
+
import { n as botConfig } from "./config-CLJcyYEF.js";
|
|
4
|
+
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-Co7DTYYh.js";
|
|
5
|
+
import { $t as actorFromRun, Kt as AgentMessageTargetError, Wt as AgentMessagePausedError, en as toolInvocationDestination } from "./agent-runner-9MXyWUL8.js";
|
|
6
|
+
import { I as PARENT_AGENT_TARGET, v as getActiveAgentInvocationForConversation } from "./turn-failure-response-CpdPoZSl.js";
|
|
7
|
+
import { G as admitAutomatedTurn, S as EVENT_WAIT_MS, V as postAutomatedTurnLimitNoticeForConversation } from "./session-stop-BWOsuo8p.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-ByR1Lr7e.js";
|
|
9
|
+
import { a as enqueueAgentInvocation, c as createAgentInvocationForMessage, u as findChildAgentConversationId } from "./work-DI7x1Slm.js";
|
|
10
|
+
import { r as enqueueAgentMessageToParent } from "./result-DHmCFEt8.js";
|
|
11
11
|
// src/chat/agent-invocations/top-level-message.ts
|
|
12
12
|
const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
|
|
13
13
|
/** Event type of a message from another top-level agent. */
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-BUklJVBe.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-DtmjkTza.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
package/dist/nitro.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_CRON_SCHEDULE, I as JUNIOR_RETENTION_ROUTE, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_CRON_SCHEDULE, N as JUNIOR_HEARTBEAT_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, z as getDeploymentServiceVersion } from "./logging-DbD-dErY.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
|
|
3
|
-
import { a as PLUGIN_TASK_QUEUE_TOPIC,
|
|
3
|
+
import { S as CACHE_WARMUP_QUEUE_TOPIC, _ as resolveConversationWorkQueueTopic, a as PLUGIN_TASK_QUEUE_TOPIC, f as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./background-compaction-queue-CjllSPir.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
|
|
5
5
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import path from "node:path";
|
|
@@ -239,46 +239,24 @@ function configureVercelDeployment(nitro, options) {
|
|
|
239
239
|
nitro.options.vercel.functions ??= {};
|
|
240
240
|
nitro.options.vercel.functions.maxDuration = defaultMaxDuration;
|
|
241
241
|
nitro.options.vercel.functionRules ??= {};
|
|
242
|
-
const
|
|
243
|
-
const
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
nitro.options.vercel.functionRules[JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE] = {
|
|
255
|
-
...existingPluginTaskRule,
|
|
256
|
-
maxDuration: defaultMaxDuration,
|
|
257
|
-
experimentalTriggers: [...otherPluginTaskTriggers, {
|
|
258
|
-
type: VERCEL_QUEUE_TRIGGER_TYPE,
|
|
259
|
-
topic: PLUGIN_TASK_QUEUE_TOPIC
|
|
260
|
-
}]
|
|
261
|
-
};
|
|
262
|
-
const existingSnapshotJobRule = nitro.options.vercel.functionRules["/api/internal/workspace/snapshots"] ?? {};
|
|
263
|
-
const otherSnapshotJobTriggers = (Array.isArray(existingSnapshotJobRule.experimentalTriggers) ? existingSnapshotJobRule.experimentalTriggers : []).filter((trigger) => trigger.type !== VERCEL_QUEUE_TRIGGER_TYPE);
|
|
264
|
-
nitro.options.vercel.functionRules[JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE] = {
|
|
265
|
-
...existingSnapshotJobRule,
|
|
266
|
-
maxDuration: defaultMaxDuration,
|
|
267
|
-
experimentalTriggers: [...otherSnapshotJobTriggers, {
|
|
268
|
-
type: VERCEL_QUEUE_TRIGGER_TYPE,
|
|
269
|
-
topic: WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC
|
|
270
|
-
}]
|
|
271
|
-
};
|
|
272
|
-
const existingCompactionRule = nitro.options.vercel.functionRules["/api/internal/context/compactions"] ?? {};
|
|
273
|
-
const otherCompactionTriggers = (Array.isArray(existingCompactionRule.experimentalTriggers) ? existingCompactionRule.experimentalTriggers : []).filter((trigger) => trigger.type !== VERCEL_QUEUE_TRIGGER_TYPE);
|
|
274
|
-
nitro.options.vercel.functionRules[JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE] = {
|
|
275
|
-
...existingCompactionRule,
|
|
276
|
-
maxDuration: defaultMaxDuration,
|
|
277
|
-
experimentalTriggers: [...otherCompactionTriggers, {
|
|
278
|
-
type: VERCEL_QUEUE_TRIGGER_TYPE,
|
|
279
|
-
topic: BACKGROUND_COMPACTION_QUEUE_TOPIC
|
|
280
|
-
}]
|
|
242
|
+
const functionRules = nitro.options.vercel.functionRules;
|
|
243
|
+
const addQueueTrigger = (route, topic) => {
|
|
244
|
+
const existingRule = functionRules[route] ?? {};
|
|
245
|
+
const existingTriggers = Array.isArray(existingRule.experimentalTriggers) ? existingRule.experimentalTriggers : [];
|
|
246
|
+
functionRules[route] = {
|
|
247
|
+
...existingRule,
|
|
248
|
+
maxDuration: defaultMaxDuration,
|
|
249
|
+
experimentalTriggers: [...existingTriggers.filter((trigger) => trigger.type !== VERCEL_QUEUE_TRIGGER_TYPE), {
|
|
250
|
+
type: VERCEL_QUEUE_TRIGGER_TYPE,
|
|
251
|
+
topic
|
|
252
|
+
}]
|
|
253
|
+
};
|
|
281
254
|
};
|
|
255
|
+
addQueueTrigger(JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, queueTopic);
|
|
256
|
+
addQueueTrigger(JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, PLUGIN_TASK_QUEUE_TOPIC);
|
|
257
|
+
addQueueTrigger(JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC);
|
|
258
|
+
addQueueTrigger(JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, CACHE_WARMUP_QUEUE_TOPIC);
|
|
259
|
+
addQueueTrigger(JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, BACKGROUND_COMPACTION_QUEUE_TOPIC);
|
|
282
260
|
return defaultMaxDuration;
|
|
283
261
|
}
|
|
284
262
|
/** Nitro module that configures deployment wiring and copies app/plugin content into the Vercel build output. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Dn as createUserTokenStore } from "./projection-BViECfYu.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Co8Q2xRW.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;
|