@sentry/junior 0.278.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-BXosqTMx.js → adapter-phTTgw7H.js} +1 -1
- package/dist/{admin-Thn7NfOi.js → admin-PcpJDugZ.js} +1 -1
- package/dist/{agent-invocations-D7c4BQGc.js → agent-invocations-CUg_SODU.js} +0 -1
- package/dist/{agent-runner-DE-43MPb.js → agent-runner-DwvT1BY0.js} +76 -35
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +1 -1
- package/dist/api.js +37 -367
- package/dist/{app-CHNS-AX2.d.ts → app-DVs6noo7.d.ts} +3 -3
- package/dist/app.d.ts +1 -1
- package/dist/app.js +460 -77
- package/dist/{assistant-reply-pauL6qyn.js → assistant-reply-BXfxczd7.js} +1 -1
- package/dist/{automation-DphoTRYl.js → automation-BehArCcq.js} +1 -1
- package/dist/{background-compaction-queue-CAL4A2y7.js → background-compaction-queue-CcbuLJrZ.js} +2 -2
- package/dist/{briefs-4fyPJJEu.js → briefs-Dd_ezwED.js} +10 -9
- package/dist/{catalog-runtime-BoOb5oUv.js → catalog-runtime-BWVMeZhW.js} +2 -2
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +3 -3
- 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-v_OVYuHZ.js → client-Bpxe4vKa.js} +7 -3
- package/dist/{config-o2jLRY5J.js → config-C_bmRhrJ.js} +2 -2
- package/dist/{connections-RC4NXAx8.js → connections-B2rHe5W5.js} +10 -10
- package/dist/{conversation-CZfyQvdm.js → conversation-CIiJtx5q.js} +6 -1
- package/dist/conversation-pending-messages-CnBvE6-6.js +173 -0
- package/dist/{conversation-privacy-C23M8KaD.js → conversation-privacy-CzOfcz0U.js} +1 -1
- package/dist/{credential-sync-Dd0WyNfF.js → credential-sync-Dal_unpv.js} +15 -15
- package/dist/{db-BjLzDJCt.d.ts → db-CyLrV9C7.d.ts} +1 -1
- package/dist/{executor-CJfsD0VX.js → executor-BfYH-Wws.js} +6 -4
- package/dist/instrumentation.d.ts +12 -0
- package/dist/instrumentation.js +56 -23
- package/dist/{logging-dFaXvBRK.js → logging-CkT3_Xxp.js} +2 -2
- package/dist/{message-DSwxIZet.js → message-Q5dkgaJ5.js} +10 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +18 -6
- package/dist/{oauth-callback-server-CDcuCp27.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-BTge9wrH.js → projection-DWxX7pb1.js} +122 -44
- package/dist/{prompt-DDtCnlHP.js → prompt--dwus7Y-.js} +1 -1
- package/dist/proxy-path-BHYoKZdq.js +15 -0
- package/dist/{registry-Cp6CNmtP.js → registry-DnrdeO4s.js} +2 -2
- package/dist/{resolve-B_7h2cXx.js → resolve-C_QXfqD_.js} +3 -3
- package/dist/{result-5LBEfnLX.js → result-DNmOxT-N.js} +10 -10
- package/dist/{runner-C5-S4oq-.js → runner-zd_noJ1l.js} +11 -11
- package/dist/{sandbox-egress-signals-B4GehT1L.js → sandbox-egress-signals-DQjv-nbG.js} +1 -1
- package/dist/{schema-B5fpczDw.js → schema-CNJNzvr8.js} +5 -68
- package/dist/{schema-Tr484cCC.d.ts → schema-e90H5FIN.d.ts} +988 -1
- 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-Cq_dLrZJ.js → service-account-BK26XlHo.js} +3 -3
- package/dist/{service-account-BkEv20zf.js → service-account-CCH2Hv4h.js} +3 -3
- package/dist/{session-stop-BsS4qFS2.js → session-stop-6Tf--T7G.js} +14 -14
- package/dist/{skills-M0BA0_s6.js → skills-BNrk8gi4.js} +4 -4
- package/dist/{spawn-BO3y7H4d.js → spawn-C75hAB9l.js} +3 -3
- package/dist/{stop-D5R82Wla.js → stop-RYbf7PWi.js} +516 -172
- package/dist/{store-BGBzQWNf.js → store-CO5vGjwD.js} +5 -5
- package/dist/{store-CGJZTEVz.js → store-G3h2djJU.js} +3 -3
- package/dist/{task-queue-UD27ei2U.js → task-queue-DlN58XeM.js} +3 -3
- package/dist/{task-runner-noxjOjkM.js → task-runner-B-Bdm23d.js} +21 -9
- package/dist/{thread-state-BSu6rM6p.js → thread-state-Cj_7Slru.js} +4 -4
- package/dist/{turn-failure-response-wahwyPrZ.js → turn-failure-response-CE7gaoC7.js} +7 -7
- package/dist/{turn-lifecycle-Bo4Trccw.js → turn-lifecycle-7sXwXLJ6.js} +1 -1
- package/dist/{turn-session-routing-DnSaaEpn.js → turn-session-routing-FBdaH1zf.js} +10 -10
- package/dist/{validation-B9-8iKyw.js → validation-DLWxEzWW.js} +2 -2
- package/dist/{version-C7HejFP2.js → version-DtQ8WFIZ.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DLXajQZE.js → viewer-vsM8_90o.js} +5 -5
- package/dist/{work-DRGSlfia.js → work-DsoFRO_0.js} +10 -10
- package/dist/{worker-BGh5Dwc6.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/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 +21 -0
- package/package.json +5 -5
- package/dist/common-Eu6sx09c.js +0 -107
- package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
- package/dist/sentry-MDkYAVPV.js +0 -23
package/dist/instrumentation.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
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 { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-CkT3_Xxp.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CzOfcz0U.js";
|
|
4
|
+
import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
|
|
4
5
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
6
|
+
import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
5
7
|
import { performance } from "node:perf_hooks";
|
|
6
8
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
7
9
|
// src/chat/pi/gateway-request-timing.ts
|
|
@@ -130,14 +132,30 @@ const URL_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
|
130
132
|
"url.path"
|
|
131
133
|
]);
|
|
132
134
|
const SLACK_FILE_HOST = "files.slack.com";
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
const SECRET_HEADER_NAMES = /* @__PURE__ */ new Set([
|
|
136
|
+
"authorization",
|
|
137
|
+
"forwarded",
|
|
138
|
+
"referer",
|
|
139
|
+
"vercel-forwarded-path",
|
|
140
|
+
"x-hub-signature",
|
|
141
|
+
"x-hub-signature-256",
|
|
142
|
+
"x-junior-local-credential-signature",
|
|
143
|
+
"x-junior-sandbox-egress-token",
|
|
144
|
+
"x-slack-signature"
|
|
145
|
+
]);
|
|
146
|
+
const SDK_REQUEST_HEADER_PREFIX = "http.request.header.";
|
|
147
|
+
const URL_SPAN_NAME = /^([A-Z]+ )((?:https?:\/\/|\/)\S*)$/;
|
|
148
|
+
/** Drop the query and fragment, and hide the sandbox egress credential token. */
|
|
149
|
+
function scrubUrl(value) {
|
|
150
|
+
return redactSandboxEgressProxyPath(value.split(/[?#]/, 1)[0] ?? value);
|
|
151
|
+
}
|
|
152
|
+
function scrubSpanName(name) {
|
|
153
|
+
const match = URL_SPAN_NAME.exec(name);
|
|
154
|
+
return match ? `${match[1]}${scrubUrl(match[2] ?? "")}` : name;
|
|
139
155
|
}
|
|
140
156
|
function isSecretHeaderAttribute(key) {
|
|
157
|
+
const lowerKey = key.toLowerCase();
|
|
158
|
+
if (lowerKey.startsWith(SDK_REQUEST_HEADER_PREFIX) && SECRET_HEADER_NAMES.has(lowerKey.slice(20).replaceAll("_", "-"))) return true;
|
|
141
159
|
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
142
160
|
return normalized.endsWith("xjuniorlocalcredentialsignature") || normalized.endsWith("xjuniorsandboxegresstoken");
|
|
143
161
|
}
|
|
@@ -160,29 +178,23 @@ function scrubSensitiveUrlAttributes(attributes) {
|
|
|
160
178
|
if (!attributes) return;
|
|
161
179
|
delete attributes["url.query"];
|
|
162
180
|
delete attributes["url.fragment"];
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
return typeof value === "string" && value.includes(LOCAL_CREDENTIAL_PATH);
|
|
166
|
-
});
|
|
167
|
-
for (const key of Object.keys(attributes)) if (isSecretHeaderAttribute(key) || hasLocalCredentialUrl && key === "http.request.body.data") delete attributes[key];
|
|
181
|
+
delete attributes["http.request.body.data"];
|
|
182
|
+
for (const key of Object.keys(attributes)) if (isSecretHeaderAttribute(key)) delete attributes[key];
|
|
168
183
|
if (isSlackFileRequest(attributes)) {
|
|
169
184
|
scrubSlackFileUrls(attributes);
|
|
170
185
|
return;
|
|
171
186
|
}
|
|
172
187
|
for (const key of URL_ATTRIBUTE_KEYS) {
|
|
173
188
|
const value = attributes[key];
|
|
174
|
-
if (typeof value
|
|
175
|
-
attributes[key] = stripQuery(value);
|
|
189
|
+
if (typeof value === "string") attributes[key] = scrubUrl(value);
|
|
176
190
|
}
|
|
177
191
|
}
|
|
178
192
|
function scrubSensitiveRequest(request) {
|
|
179
193
|
if (!request) return;
|
|
180
194
|
const url = request.url;
|
|
181
|
-
if (url
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
if (url?.includes(LOCAL_CREDENTIAL_PATH)) delete request.data;
|
|
195
|
+
if (url !== void 0) request.url = scrubUrl(url);
|
|
196
|
+
delete request.query_string;
|
|
197
|
+
delete request.data;
|
|
186
198
|
if (!request.headers) return;
|
|
187
199
|
for (const key of Object.keys(request.headers)) if (SECRET_HEADER_NAMES.has(key.toLowerCase())) delete request.headers[key];
|
|
188
200
|
}
|
|
@@ -216,6 +228,7 @@ function scrubContainer(container) {
|
|
|
216
228
|
function scrubPrivateSentryEvent(event) {
|
|
217
229
|
scrubContainer(event);
|
|
218
230
|
scrubSensitiveRequest(event.request);
|
|
231
|
+
if (event.transaction) event.transaction = scrubSpanName(event.transaction);
|
|
219
232
|
scrubContainer(event.contexts?.trace);
|
|
220
233
|
for (const breadcrumb of event.breadcrumbs ?? []) scrubContainer(breadcrumb);
|
|
221
234
|
return event;
|
|
@@ -223,6 +236,10 @@ function scrubPrivateSentryEvent(event) {
|
|
|
223
236
|
/** Remove private conversation payloads and boundary secrets from streamed spans. */
|
|
224
237
|
function scrubPrivateSentrySpan(span) {
|
|
225
238
|
scrubContainer(span);
|
|
239
|
+
span.name = scrubSpanName(span.name);
|
|
240
|
+
const segmentName = span.attributes?.["sentry.segment.name"];
|
|
241
|
+
if (span.attributes && typeof segmentName === "string") span.attributes["sentry.segment.name"] = scrubSpanName(segmentName);
|
|
242
|
+
promoteHttpRouteName(span);
|
|
226
243
|
return span;
|
|
227
244
|
}
|
|
228
245
|
/** Remove private conversation payloads and boundary secrets from structured logs. */
|
|
@@ -302,7 +319,23 @@ function initSentry() {
|
|
|
302
319
|
attributes: { "url.path": "/_vercel/ping" }
|
|
303
320
|
}],
|
|
304
321
|
dataCollection: {
|
|
305
|
-
httpBodies: [
|
|
322
|
+
httpBodies: [],
|
|
323
|
+
httpHeaders: { request: { allow: [
|
|
324
|
+
"accept",
|
|
325
|
+
"baggage",
|
|
326
|
+
"content-encoding",
|
|
327
|
+
"content-length",
|
|
328
|
+
"content-type",
|
|
329
|
+
"host",
|
|
330
|
+
"sentry-trace",
|
|
331
|
+
"user-agent",
|
|
332
|
+
"x-github-delivery",
|
|
333
|
+
"x-github-event",
|
|
334
|
+
"x-slack-request-timestamp",
|
|
335
|
+
"x-slack-retry",
|
|
336
|
+
"x-vercel-id"
|
|
337
|
+
] } },
|
|
338
|
+
urlQueryParams: false,
|
|
306
339
|
databaseQueryData: false
|
|
307
340
|
},
|
|
308
341
|
beforeSend: scrubPrivateSentryEvent,
|
|
@@ -313,4 +346,4 @@ function initSentry() {
|
|
|
313
346
|
getGlobalScope().setAttributes(deploymentSpanAttributes);
|
|
314
347
|
subscribeGatewayRequestTiming();
|
|
315
348
|
}
|
|
316
|
-
export { getBrowserSentryConfig, initSentry };
|
|
349
|
+
export { getBrowserSentryConfig, initSentry, nameRequestRoute, routeNameMiddleware };
|
|
@@ -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,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { F as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-
|
|
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. */
|
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 { wn as createUserTokenStore } from "./projection-
|
|
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;
|