@sentry/junior 0.277.0 → 0.279.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-BtfBHVM5.js → adapter-phTTgw7H.js} +1 -1
- package/dist/{admin-DzAKbZsm.js → admin-PcpJDugZ.js} +1 -1
- package/dist/{agent-invocations-Crs3XHhg.js → agent-invocations-CUg_SODU.js} +0 -1
- package/dist/{agent-runner-BsYAbniN.js → agent-runner-DwvT1BY0.js} +321 -847
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +6 -6
- package/dist/api.d.ts +1 -1
- package/dist/api.js +46 -414
- package/dist/{app-BjEQwNVP.d.ts → app-DVs6noo7.d.ts} +6 -27
- package/dist/app.d.ts +2 -2
- package/dist/app.js +460 -78
- package/dist/{assistant-reply-NebRGG4G.js → assistant-reply-BXfxczd7.js} +28 -6
- package/dist/{automation-Cql9h2vO.js → automation-BehArCcq.js} +1 -1
- package/dist/{background-compaction-queue-hh18yCeU.js → background-compaction-queue-CcbuLJrZ.js} +2 -2
- package/dist/{briefs-BBo0Eimi.js → briefs-Dd_ezwED.js} +10 -10
- package/dist/{catalog-runtime-DE-F4Awo.js → catalog-runtime-BWVMeZhW.js} +2 -2
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +0 -2
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +5 -5
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -4
- package/dist/{client-DZ8HTnYH.js → client-Bpxe4vKa.js} +8 -4
- package/dist/{config-D5uUtrCP.js → config-C_bmRhrJ.js} +25 -100
- package/dist/{connections-Do24CGP5.js → connections-B2rHe5W5.js} +10 -10
- package/dist/{conversation-SsASlWL7.js → conversation-CIiJtx5q.js} +56 -104
- package/dist/conversation-pending-messages-CnBvE6-6.js +173 -0
- package/dist/{conversation-privacy-VuylvlKr.js → conversation-privacy-CzOfcz0U.js} +1 -1
- package/dist/{credential-sync-BGQK3pOa.js → credential-sync-Dal_unpv.js} +15 -15
- package/dist/{db-DEiwO5Sh.d.ts → db-CyLrV9C7.d.ts} +1 -1
- package/dist/{executor-hPfFTH0C.js → executor-BfYH-Wws.js} +6 -4
- package/dist/instrumentation.d.ts +12 -0
- package/dist/instrumentation.js +56 -23
- package/dist/{logging-cI3T1dNc.js → logging-CkT3_Xxp.js} +2 -2
- package/dist/{media-DstkkoNP.js → media-DTAA8Qs_.js} +21 -23
- package/dist/{message-DBwsAl7O.js → message-Q5dkgaJ5.js} +23 -29
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +18 -6
- package/dist/{oauth-callback-server-DXrnbplb.js → oauth-callback-server-BDRaqe8O.js} +2 -2
- package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D0G3T16m.js} +1 -1
- package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
- package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
- package/dist/{projection-7EFIqzuj.js → projection-DWxX7pb1.js} +214 -138
- package/dist/{prompt-oRfGsxd3.js → prompt--dwus7Y-.js} +1 -1
- package/dist/proxy-path-BHYoKZdq.js +15 -0
- package/dist/{registry-Bzefs7kT.js → registry-DnrdeO4s.js} +2 -2
- package/dist/{resolve-CuiEY_2u.js → resolve-C_QXfqD_.js} +3 -3
- package/dist/{result-DrcUtFaD.js → result-DNmOxT-N.js} +10 -10
- package/dist/{runner-CDE4CZ52.js → runner-zd_noJ1l.js} +11 -11
- package/dist/{sandbox-egress-signals-0tcmGd13.js → sandbox-egress-signals-DQjv-nbG.js} +1 -1
- package/dist/{schema-Dzi3lkdP.js → schema-CNJNzvr8.js} +4 -4
- package/dist/{schema-B6N2nc6v.d.ts → schema-e90H5FIN.d.ts} +2176 -967
- package/dist/sentry-BRTJqumy.js +51 -0
- package/dist/sentry-DrKC2NeM.d.ts +1 -0
- package/dist/sentry-route-name-BhwWnfqj.js +51 -0
- package/dist/{service-account-BOz9pqOE.js → service-account-BK26XlHo.js} +3 -3
- package/dist/{service-account-DIyz_9Uh.js → service-account-CCH2Hv4h.js} +3 -3
- package/dist/{session-stop-0juF_BP0.js → session-stop-6Tf--T7G.js} +23 -16
- package/dist/{skills-CU5Is147.js → skills-BNrk8gi4.js} +4 -4
- package/dist/{spawn-6C9jHH4b.js → spawn-C75hAB9l.js} +3 -4
- package/dist/{stop-6FVG1c-r.js → stop-RYbf7PWi.js} +742 -207
- package/dist/{store-DtHZviJ1.js → store-CO5vGjwD.js} +9 -16
- package/dist/{store-DKs1WwdB.js → store-G3h2djJU.js} +3 -3
- package/dist/{task-queue-CcvFQE_p.js → task-queue-DlN58XeM.js} +3 -3
- package/dist/{task-runner-DBkNejLl.js → task-runner-B-Bdm23d.js} +22 -10
- package/dist/{thread-state-4hjEIkIq.js → thread-state-Cj_7Slru.js} +4 -4
- package/dist/{turn-failure-response-BZNLydC3.js → turn-failure-response-CE7gaoC7.js} +7 -7
- package/dist/{turn-lifecycle-BhqYjaa4.js → turn-lifecycle-7sXwXLJ6.js} +1 -1
- package/dist/{turn-session-routing-jnLOfBHJ.js → turn-session-routing-FBdaH1zf.js} +10 -10
- package/dist/{validation-BUFmsnKs.js → validation-DLWxEzWW.js} +2 -2
- package/dist/{version-DJTk0ZCE.js → version-DtQ8WFIZ.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-WY0RYE4E.js → viewer-vsM8_90o.js} +53 -22
- package/dist/{work-C5AKvXJV.js → work-DsoFRO_0.js} +12 -17
- package/dist/{worker-BcYVDVUy.js → worker-6kZEsCXs.js} +7 -7
- package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
- package/migrations/0078_plugin_conversation_index.sql +20 -0
- package/migrations/0079_conversation_event_author_index.sql +20 -0
- package/migrations/meta/0075_snapshot.json +98 -314
- package/migrations/meta/0076_snapshot.json +98 -314
- package/migrations/meta/0077_snapshot.json +4141 -0
- package/migrations/meta/0078_snapshot.json +4175 -0
- package/migrations/meta/0079_snapshot.json +4203 -0
- package/migrations/meta/_journal.json +22 -1
- package/package.json +5 -5
- package/dist/common-Eu6sx09c.js +0 -107
- package/dist/model-profile-B998sjVd.js +0 -67
- package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
- package/dist/sentry-MDkYAVPV.js +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
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-DtQ8WFIZ.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { c as modelProfileSchema, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
|
|
2
1
|
import { z } from "zod";
|
|
3
2
|
import { actorSchema } from "@sentry/junior-plugin-api";
|
|
4
3
|
// src/usage-schema.ts
|
|
@@ -124,8 +123,8 @@ function decodeHistoryPayload(type, payload) {
|
|
|
124
123
|
* Durable conversation event history port.
|
|
125
124
|
*
|
|
126
125
|
* Events append under the conversation lease in stable sequence order.
|
|
127
|
-
* Compaction
|
|
128
|
-
*
|
|
126
|
+
* Compaction replaces the active model history without rewriting prior
|
|
127
|
+
* events. Unsupported stored events remain readable as opaque facts,
|
|
129
128
|
* while malformed known events fail loudly. Provider-specific message fields
|
|
130
129
|
* are validated by the Pi adapter when it restores model context.
|
|
131
130
|
*/
|
|
@@ -172,22 +171,24 @@ const compactionDetailsSchema = z.object({
|
|
|
172
171
|
retainedMessageCount: z.number().int().nonnegative(),
|
|
173
172
|
summaryChars: z.number().int().nonnegative()
|
|
174
173
|
}).strict();
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
const legacyModelProfileSchema = z.string().min(1).optional();
|
|
175
|
+
const historyReplacementEventDataSchema = z.object({
|
|
176
|
+
type: z.literal("compaction"),
|
|
177
|
+
modelProfile: legacyModelProfileSchema,
|
|
178
178
|
modelId: z.string().min(1),
|
|
179
|
-
|
|
180
|
-
triggeringToolCallId: z.string().min(1).optional(),
|
|
179
|
+
details: compactionDetailsSchema.optional(),
|
|
181
180
|
summary: z.string().min(1).optional(),
|
|
182
181
|
replacementHistory: replacementHistorySchema
|
|
183
|
-
}).strict()
|
|
184
|
-
|
|
185
|
-
|
|
182
|
+
}).strict();
|
|
183
|
+
const legacyHandoffEventDataSchema = z.object({
|
|
184
|
+
type: z.literal("handoff"),
|
|
185
|
+
modelProfile: legacyModelProfileSchema,
|
|
186
186
|
modelId: z.string().min(1),
|
|
187
|
-
|
|
187
|
+
reasoningLevel: z.string().min(1).optional(),
|
|
188
|
+
triggeringToolCallId: z.string().min(1).optional(),
|
|
188
189
|
summary: z.string().min(1).optional(),
|
|
189
190
|
replacementHistory: replacementHistorySchema
|
|
190
|
-
}).strict()
|
|
191
|
+
}).strict();
|
|
191
192
|
/** Validate an event that intentionally replaces active model history. */
|
|
192
193
|
const historyReplacementSchema = z.object({
|
|
193
194
|
data: historyReplacementEventDataSchema,
|
|
@@ -316,19 +317,15 @@ const turnStartedEventDataSchema = z.object({
|
|
|
316
317
|
inputMessageIds: z.array(z.string().min(1)).min(1),
|
|
317
318
|
surface: conversationTurnSurfaceSchema
|
|
318
319
|
}).strict().refine((data) => new Set(data.inputMessageIds).size === data.inputMessageIds.length, "turn input message ids must be unique");
|
|
319
|
-
const
|
|
320
|
+
const legacyTurnRoutedEventDataSchema = z.object({
|
|
320
321
|
type: z.literal("turn_routed"),
|
|
321
322
|
turnId: z.string().min(1),
|
|
322
|
-
modelProfile:
|
|
323
|
+
modelProfile: z.string().min(1),
|
|
323
324
|
modelId: z.string().min(1),
|
|
324
325
|
costUsd: z.number().finite().nonnegative().optional(),
|
|
325
|
-
reasoningLevel: z.
|
|
326
|
+
reasoningLevel: z.string().min(1),
|
|
326
327
|
confidence: z.number().min(0).max(1).optional(),
|
|
327
|
-
source: z.
|
|
328
|
-
"configured",
|
|
329
|
-
"inherited",
|
|
330
|
-
"router"
|
|
331
|
-
])
|
|
328
|
+
source: z.string().min(1)
|
|
332
329
|
}).strict();
|
|
333
330
|
const turnContextEventDataSchema = z.object({
|
|
334
331
|
type: z.literal("turn_context"),
|
|
@@ -404,7 +401,7 @@ const compactionRequestedEventDataSchema = z.object({
|
|
|
404
401
|
type: z.literal("compaction_requested"),
|
|
405
402
|
markSeq: z.number().int().nonnegative(),
|
|
406
403
|
historyVersion: z.number().int().nonnegative(),
|
|
407
|
-
modelProfile:
|
|
404
|
+
modelProfile: legacyModelProfileSchema,
|
|
408
405
|
modelId: z.string().min(1)
|
|
409
406
|
}).strict();
|
|
410
407
|
const compactionPreparedFields = compactionRequestedEventDataSchema.extend({ type: z.literal("compaction_prepared") });
|
|
@@ -431,7 +428,6 @@ const appendableConversationEventDataSchema = z.union([
|
|
|
431
428
|
turnContextEventDataSchema,
|
|
432
429
|
structuredConversationEventDataSchema,
|
|
433
430
|
attachmentsDeliveredEventDataSchema,
|
|
434
|
-
turnRoutedEventDataSchema,
|
|
435
431
|
turnCompletedEventDataSchema,
|
|
436
432
|
turnFailedEventDataSchema,
|
|
437
433
|
subagentStartedEventDataSchema,
|
|
@@ -443,6 +439,8 @@ const appendableConversationEventDataSchema = z.union([
|
|
|
443
439
|
const conversationEventDataSchema = z.union([
|
|
444
440
|
appendableConversationEventDataSchema,
|
|
445
441
|
historyReplacementEventDataSchema,
|
|
442
|
+
legacyHandoffEventDataSchema,
|
|
443
|
+
legacyTurnRoutedEventDataSchema,
|
|
446
444
|
unownedMcpProviderConnectedEventDataSchema
|
|
447
445
|
]);
|
|
448
446
|
/** Event type names recognized by current readers and observational queries. */
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-
|
|
6
|
-
import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-
|
|
7
|
-
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentMessageToParent } from "./result-
|
|
10
|
-
import { i as enqueueAgentInvocation } from "./work-
|
|
1
|
+
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
+
import { Ma as readConversationAccessFromSql, ja as canAccessConversation } from "./projection-DWxX7pb1.js";
|
|
3
|
+
import { n as botConfig } from "./config-C_bmRhrJ.js";
|
|
4
|
+
import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-vsM8_90o.js";
|
|
5
|
+
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-DwvT1BY0.js";
|
|
6
|
+
import { F as findChildAgentConversationId, L as PARENT_AGENT_TARGET, N as AgentMessageTargetError, a as createAgentInvocationForMessage, j as AgentMessagePausedError, s as getActiveAgentInvocationForConversation } from "./store-CO5vGjwD.js";
|
|
7
|
+
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-6Tf--T7G.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-G3h2djJU.js";
|
|
9
|
+
import { r as enqueueAgentMessageToParent } from "./result-DNmOxT-N.js";
|
|
10
|
+
import { i as enqueueAgentInvocation } from "./work-DsoFRO_0.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. */
|
|
14
14
|
const TOP_LEVEL_AGENT_MESSAGE_EVENT_TYPE = "agent.top_level_message";
|
|
15
15
|
/**
|
|
16
|
-
* Check that a top-level agent can message another top-level agent
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* cannot see gets the same error, so the error does not show that a private
|
|
22
|
-
* Conversation exists.
|
|
16
|
+
* Check that a top-level agent can message another top-level agent under
|
|
17
|
+
* `policies/conversation-access.md`. A private Conversation is isolated, so
|
|
18
|
+
* only public agents in the same provider tenant can message each other.
|
|
19
|
+
* Every target that the sender cannot reach gets the same error, so the
|
|
20
|
+
* error does not show that a private Conversation exists.
|
|
23
21
|
*/
|
|
24
22
|
async function requireTopLevelAgentAccess(args) {
|
|
25
23
|
const notReachable = new AgentMessageTargetError(`"${args.to}" is not "${PARENT_AGENT_TARGET}", a child agent of this conversation, or a top-level agent that you can message`);
|
|
@@ -28,16 +26,14 @@ async function requireTopLevelAgentAccess(args) {
|
|
|
28
26
|
const [senderConversation, target] = await Promise.all([conversationStore.get({ conversationId: args.senderConversationId }), conversationStore.get({ conversationId: args.to })]);
|
|
29
27
|
if (senderConversation?.parentConversationId) throw new AgentMessageTargetError(`"${args.to}" is not "${PARENT_AGENT_TARGET}" or a child agent of this conversation`);
|
|
30
28
|
if (!target || target.parentConversationId) throw notReachable;
|
|
31
|
-
const
|
|
32
|
-
const access = await readConversationAccessFromSql(getDb(), [args.senderConversationId, args.to], user);
|
|
29
|
+
const access = await readConversationAccessFromSql(getDb(), [args.senderConversationId, args.to]);
|
|
33
30
|
const sender = access.get(args.senderConversationId);
|
|
34
31
|
const receiver = access.get(args.to);
|
|
35
|
-
if (!sender
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (
|
|
40
|
-
return targetScope;
|
|
32
|
+
if (!sender || !receiver || !canAccessConversation({
|
|
33
|
+
requester: sender,
|
|
34
|
+
target: receiver
|
|
35
|
+
})) throw notReachable;
|
|
36
|
+
if (sender.visibility !== "public") throw new AgentMessageTargetError(`"${args.to}" is a public conversation and this conversation is private. A private conversation cannot message another conversation`);
|
|
41
37
|
}
|
|
42
38
|
function renderTopLevelMessageInput(args) {
|
|
43
39
|
return [
|
|
@@ -51,7 +47,7 @@ function renderTopLevelMessageInput(args) {
|
|
|
51
47
|
"Message:",
|
|
52
48
|
args.text.trim(),
|
|
53
49
|
"",
|
|
54
|
-
|
|
50
|
+
`To answer the sender, use messageAgent with to set to "${args.senderConversationId}".`
|
|
55
51
|
].join("\n");
|
|
56
52
|
}
|
|
57
53
|
/**
|
|
@@ -61,7 +57,7 @@ function renderTopLevelMessageInput(args) {
|
|
|
61
57
|
* other running. Repeat calls with the same `messageKey` are safe.
|
|
62
58
|
*/
|
|
63
59
|
async function enqueueTopLevelAgentMessage(args) {
|
|
64
|
-
|
|
60
|
+
await requireTopLevelAgentAccess(args);
|
|
65
61
|
const nowMs = args.nowMs ?? Date.now();
|
|
66
62
|
const maxTurns = botConfig.maxConsecutiveAutomatedTurns;
|
|
67
63
|
const decision = await admitAutomatedTurn({
|
|
@@ -101,7 +97,6 @@ async function enqueueTopLevelAgentMessage(args) {
|
|
|
101
97
|
authorIdentityId: SYSTEM_IDENTITY_ID,
|
|
102
98
|
metadata,
|
|
103
99
|
text: renderTopLevelMessageInput({
|
|
104
|
-
scope,
|
|
105
100
|
senderConversationId: args.senderConversationId,
|
|
106
101
|
summary,
|
|
107
102
|
text: args.text
|
|
@@ -150,7 +145,6 @@ function bindMessageAgent(run, options) {
|
|
|
150
145
|
});
|
|
151
146
|
if (!childConversationId) {
|
|
152
147
|
await enqueueTopLevelAgentMessage({
|
|
153
|
-
actor,
|
|
154
148
|
messageKey: `${run.turnId}:${call.toolCallId}`,
|
|
155
149
|
queue,
|
|
156
150
|
senderConversationId: run.conversationId,
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-DVs6noo7.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,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-
|
|
2
|
-
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-
|
|
3
|
-
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-
|
|
4
|
-
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
1
|
+
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, D as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, F as JUNIOR_RETENTION_ROUTE, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, M as JUNIOR_HEARTBEAT_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_RETENTION_CRON_SCHEDULE, R as getDeploymentServiceVersion, j as JUNIOR_HEARTBEAT_CRON_SCHEDULE, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE } from "./logging-CkT3_Xxp.js";
|
|
2
|
+
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
|
|
3
|
+
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-CcbuLJrZ.js";
|
|
4
|
+
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-DlN58XeM.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -39,7 +39,7 @@ function globToRegex(pattern) {
|
|
|
39
39
|
// src/build/copy-build-content.ts
|
|
40
40
|
const DASHBOARD_PACKAGE_NAME = "@sentry/junior-dashboard";
|
|
41
41
|
const JUNIOR_PACKAGE_NAME = "@sentry/junior";
|
|
42
|
-
const DASHBOARD_ASSET_NAMES = ["
|
|
42
|
+
const DASHBOARD_ASSET_NAMES = ["tailwind.css"];
|
|
43
43
|
/** Copy app, built-in skill, and declared plugin content into server output. */
|
|
44
44
|
function copyRuntimeContent(cwd, serverRoot, packageNames) {
|
|
45
45
|
copyIfExists(path.join(cwd, "app"), path.join(serverRoot, "app"));
|
|
@@ -64,6 +64,12 @@ function copyDashboardAssets(cwd, serverRoot) {
|
|
|
64
64
|
if (!packageDir) throw new Error(`createApp({ dashboard }) requires installing "${DASHBOARD_PACKAGE_NAME}"`);
|
|
65
65
|
for (const fileName of DASHBOARD_ASSET_NAMES) copyIfExists(dashboardAssetPath(packageDir, fileName), path.join(serverRoot, "node_modules", DASHBOARD_PACKAGE_NAME, "dist", fileName));
|
|
66
66
|
}
|
|
67
|
+
/** Find the dashboard folder of content-hashed browser files that Nitro serves as static assets. */
|
|
68
|
+
function resolveDashboardPublicAssetsDir(cwd) {
|
|
69
|
+
const packageDir = resolvePackageDir(cwd, DASHBOARD_PACKAGE_NAME);
|
|
70
|
+
if (!packageDir) throw new Error(`createApp({ dashboard }) requires installing "${DASHBOARD_PACKAGE_NAME}"`);
|
|
71
|
+
return dashboardAssetPath(packageDir, "public");
|
|
72
|
+
}
|
|
67
73
|
/** Copy extra file patterns into server output for files the bundler cannot trace. */
|
|
68
74
|
function copyIncludedFiles(cwd, serverRoot, patterns) {
|
|
69
75
|
if (patterns === void 0) return;
|
|
@@ -289,6 +295,12 @@ function juniorNitro(options = {}) {
|
|
|
289
295
|
const cwd = path.resolve(options.cwd ?? nitro.options.rootDir ?? process.cwd());
|
|
290
296
|
const functionMaxDurationSeconds = configureVercelDeployment(nitro, options);
|
|
291
297
|
applyRolldownTreeshakeWorkaround(nitro);
|
|
298
|
+
if (dashboardEnabled(options.dashboard)) nitro.options.publicAssets.push({
|
|
299
|
+
baseURL: "/_junior/dashboard/assets",
|
|
300
|
+
dir: resolveDashboardPublicAssetsDir(cwd),
|
|
301
|
+
fallthrough: false,
|
|
302
|
+
maxAge: 31536e3
|
|
303
|
+
});
|
|
292
304
|
nitro.options.traceDeps = [...nitro.options.traceDeps ?? [], ...CODEMODE_TRACE_DEPS];
|
|
293
305
|
const pluginSource = options.plugins;
|
|
294
306
|
const pluginModule = isPluginModuleReference(pluginSource) ? resolvePluginModule(cwd, pluginSource) : void 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { wn as createUserTokenStore } from "./projection-DWxX7pb1.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Dal_unpv.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;
|