@sentry/junior 0.275.0 → 0.277.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-dE2BiWP_.js → adapter-BtfBHVM5.js} +1 -1
- package/dist/{admin-CkPaAYuZ.js → admin-DzAKbZsm.js} +1 -1
- package/dist/{agent-invocations-C1RNOCs8.js → agent-invocations-Crs3XHhg.js} +6 -1
- package/dist/{agent-runner-bE7aH7ew.js → agent-runner-BsYAbniN.js} +394 -244
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +13 -2
- package/dist/api.js +186 -68
- package/dist/{app-CgkquhZ8.d.ts → app-BjEQwNVP.d.ts} +11 -3
- package/dist/app.d.ts +2 -2
- package/dist/app.js +227 -112
- package/dist/{assistant-reply-CjRU9Z59.js → assistant-reply-NebRGG4G.js} +1 -1
- package/dist/{automation-BGrd03QO.js → automation-Cql9h2vO.js} +42 -13
- package/dist/{background-compaction-queue-BYuOt3qK.js → background-compaction-queue-hh18yCeU.js} +2 -2
- package/dist/{briefs-6xUvmGos.js → briefs-BBo0Eimi.js} +4 -4
- package/dist/{catalog-runtime-DcJ5NHDW.js → catalog-runtime-DE-F4Awo.js} +1 -1
- package/dist/cli/chat.d.ts +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.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-gnKpkpqP.js → client-DZ8HTnYH.js} +2 -2
- package/dist/{config-D0GKc9sC.js → config-D5uUtrCP.js} +2 -2
- package/dist/{connections-DLqP5Bp1.js → connections-Do24CGP5.js} +14 -14
- package/dist/{conversation-BjTo9ZFL.js → conversation-SsASlWL7.js} +35 -12
- package/dist/{conversation-privacy-BCXFshP9.js → conversation-privacy-VuylvlKr.js} +1 -1
- package/dist/{credential-sync-BjihXFF2.js → credential-sync-BGQK3pOa.js} +13 -13
- package/dist/{db-BMZhoYKj.d.ts → db-DEiwO5Sh.d.ts} +1 -1
- package/dist/{executor-j8VMt-To.js → executor-hPfFTH0C.js} +13 -5
- package/dist/instrumentation.d.ts +14 -0
- package/dist/instrumentation.js +29 -6
- package/dist/{logging-CFHIO4Vs.js → logging-cI3T1dNc.js} +4 -2
- package/dist/{message-DH0cqFRS.js → message-DBwsAl7O.js} +9 -9
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +7 -3
- package/dist/{oauth-callback-server-BgU4EZsJ.js → oauth-callback-server-DXrnbplb.js} +2 -2
- package/dist/{plugins-B_0Cr0MO.d.ts → plugins-DtmjkTza.d.ts} +1 -0
- package/dist/{projection-CTvLSwcm.js → projection-7EFIqzuj.js} +4108 -3898
- package/dist/{prompt-JEWUUpLW.js → prompt-oRfGsxd3.js} +1 -1
- package/dist/{registry-OsyWR4GO.js → registry-Bzefs7kT.js} +24 -8
- package/dist/{resolve-DCrKjmVP.js → resolve-CuiEY_2u.js} +3 -3
- package/dist/{result-Btdt5bSl.js → result-DrcUtFaD.js} +9 -9
- package/dist/{runner-C1AwS93W.js → runner-CDE4CZ52.js} +12 -12
- package/dist/{sandbox-egress-signals-C-5i7Zxm.js → sandbox-egress-signals-0tcmGd13.js} +1 -1
- package/dist/{schema-DfdHlBnb.d.ts → schema-B6N2nc6v.d.ts} +108 -15
- package/dist/{schema-CX9XGKCm.js → schema-Dzi3lkdP.js} +25 -8
- package/dist/{service-account-DZX1KlQl.js → service-account-BOz9pqOE.js} +3 -3
- package/dist/{service-account-CQIW6At4.js → service-account-DIyz_9Uh.js} +3 -3
- package/dist/{session-stop-DjIyORJw.js → session-stop-0juF_BP0.js} +159 -55
- package/dist/{skills-BEfAAT6p.js → skills-CU5Is147.js} +2 -2
- package/dist/{spawn-Dgj4xxvO.js → spawn-6C9jHH4b.js} +2 -2
- package/dist/{stop-DomyNvuv.js → stop-6FVG1c-r.js} +487 -203
- package/dist/{store-Dp3RMEQd.js → store-DKs1WwdB.js} +3 -3
- package/dist/{store-B7Z6zIc7.js → store-DtHZviJ1.js} +11 -9
- package/dist/{task-queue-CVQ9cWnC.js → task-queue-CcvFQE_p.js} +3 -3
- package/dist/{task-runner-DHBG47gS.js → task-runner-DBkNejLl.js} +6 -6
- package/dist/{thread-state-BF8VwIxd.js → thread-state-4hjEIkIq.js} +4 -4
- package/dist/{turn-failure-response-Di7TbgsF.js → turn-failure-response-BZNLydC3.js} +7 -7
- package/dist/{turn-lifecycle-DzXwXmLg.js → turn-lifecycle-BhqYjaa4.js} +6 -1
- package/dist/{turn-session-routing-CIWhXKeT.js → turn-session-routing-jnLOfBHJ.js} +17 -16
- package/dist/{validation-BRmwRaXc.js → validation-BUFmsnKs.js} +1 -1
- package/dist/{version-DBVMsgvA.js → version-DJTk0ZCE.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BFADRGP8.js → viewer-WY0RYE4E.js} +53 -15
- package/dist/{work-DDaoxZAw.js → work-C5AKvXJV.js} +30 -12
- package/dist/{worker-Bub0fDtW.js → worker-BcYVDVUy.js} +6 -6
- package/migrations/0073_conversation_quick_question.sql +1 -0
- package/migrations/0074_conversation_participant_pins.sql +1 -0
- package/migrations/0075_conversation_detail_version.sql +1 -0
- package/migrations/0076_conversation_auto_archive.sql +5 -0
- package/migrations/meta/0073_snapshot.json +4070 -0
- package/migrations/meta/0074_snapshot.json +4076 -0
- package/migrations/meta/0075_snapshot.json +4299 -0
- package/migrations/meta/0076_snapshot.json +4363 -0
- package/migrations/meta/_journal.json +29 -1
- package/package.json +5 -4
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON } from "./sentry-MDkYAVPV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
1
|
+
import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-cI3T1dNc.js";
|
|
2
|
+
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-MDkYAVPV.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-VuylvlKr.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
import { performance } from "node:perf_hooks";
|
|
6
6
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
@@ -262,6 +262,29 @@ function getBoolean(value, fallback) {
|
|
|
262
262
|
].includes(normalized)) return false;
|
|
263
263
|
return fallback;
|
|
264
264
|
}
|
|
265
|
+
function getEnvironment() {
|
|
266
|
+
return process.env.SENTRY_ENVIRONMENT ?? process.env.VERCEL_ENV ?? process.env.NODE_ENV;
|
|
267
|
+
}
|
|
268
|
+
function getTracesSampleRate() {
|
|
269
|
+
return getSampleRate(process.env.SENTRY_TRACES_SAMPLE_RATE, 1);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Read the settings a served page needs to send browser spans to the same
|
|
273
|
+
* project, continuing the trace of the request that rendered it.
|
|
274
|
+
*/
|
|
275
|
+
function getBrowserSentryConfig() {
|
|
276
|
+
const dsn = process.env.SENTRY_DSN?.trim();
|
|
277
|
+
if (!dsn) return void 0;
|
|
278
|
+
const trace = getTraceData();
|
|
279
|
+
return {
|
|
280
|
+
baggage: trace.baggage,
|
|
281
|
+
dsn,
|
|
282
|
+
environment: getEnvironment(),
|
|
283
|
+
release: getDeploymentServiceVersion(),
|
|
284
|
+
sentryTrace: trace["sentry-trace"],
|
|
285
|
+
tracesSampleRate: getTracesSampleRate()
|
|
286
|
+
};
|
|
287
|
+
}
|
|
265
288
|
/** Initialize Sentry for the Junior runtime. Call at the top of your entry point. */
|
|
266
289
|
function initSentry() {
|
|
267
290
|
if (getClient()) return;
|
|
@@ -271,9 +294,9 @@ function initSentry() {
|
|
|
271
294
|
const deploymentSpanAttributes = getDeploymentTelemetryAttributes();
|
|
272
295
|
init({
|
|
273
296
|
dsn,
|
|
274
|
-
environment:
|
|
297
|
+
environment: getEnvironment(),
|
|
275
298
|
release: serviceVersion,
|
|
276
|
-
tracesSampleRate:
|
|
299
|
+
tracesSampleRate: getTracesSampleRate(),
|
|
277
300
|
ignoreSpans: [{
|
|
278
301
|
op: "http.server",
|
|
279
302
|
attributes: { "url.path": "/_vercel/ping" }
|
|
@@ -290,4 +313,4 @@ function initSentry() {
|
|
|
290
313
|
getGlobalScope().setAttributes(deploymentSpanAttributes);
|
|
291
314
|
subscribeGatewayRequestTiming();
|
|
292
315
|
}
|
|
293
|
-
export { initSentry };
|
|
316
|
+
export { getBrowserSentryConfig, initSentry };
|
|
@@ -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-MDkYAVPV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-DJTk0ZCE.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";
|
|
@@ -112,6 +112,8 @@ const JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
|
|
|
112
112
|
const JUNIOR_HEARTBEAT_CRON_SCHEDULE = "* * * * *";
|
|
113
113
|
const JUNIOR_RETENTION_ROUTE = "/api/internal/retention";
|
|
114
114
|
const JUNIOR_RETENTION_CRON_SCHEDULE = "0 4 * * *";
|
|
115
|
+
const JUNIOR_AUTO_ARCHIVE_ROUTE = "/api/internal/auto-archive";
|
|
116
|
+
const JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE = "17 * * * *";
|
|
115
117
|
const JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE = "/api/internal/agent/continue";
|
|
116
118
|
const JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE = "/api/internal/plugin/tasks";
|
|
117
119
|
const JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE = "/api/internal/workspace/snapshots";
|
|
@@ -1245,4 +1247,4 @@ function extractGenAiUsageAttributes(...sources) {
|
|
|
1245
1247
|
...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
|
|
1246
1248
|
};
|
|
1247
1249
|
}
|
|
1248
|
-
export {
|
|
1250
|
+
export { JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE as A, runWithLogAttributes as B, summarizeMessageText as C, JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE as D, withSpan as E, JUNIOR_RETENTION_ROUTE as F, toOptionalNumber as G, isNativeIdentityProvider as H, JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE as I, toOptionalString as K, LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION as L, JUNIOR_HEARTBEAT_ROUTE as M, JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE as N, JUNIOR_AUTO_ARCHIVE_ROUTE as O, JUNIOR_RETENTION_CRON_SCHEDULE as P, getDeploymentServiceVersion as R, setTags as S, withLogContext as T, normalizeIdentityEmail as U, GOOGLE_IDENTITY_PROVIDER as V, isRecord 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_HEARTBEAT_CRON_SCHEDULE as j, JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE as k, getLogContextAttributesForSpan as l, logInfo as m, createChatSdkLogger as n, getActiveTraceContext as o, logException as p, createRequestContext as r, getActiveTraceId as s, buildTurnFailureResponse as t, getTracePropagationHeaders as u, serializeGenAiAttribute as v, withContext as w, setSpanStatus as x, setSentryUser as y, getDeploymentTelemetryAttributes as z };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentMessageToParent } from "./result-
|
|
10
|
-
import {
|
|
2
|
+
import { Na as readConversationAccessFromSql } from "./projection-7EFIqzuj.js";
|
|
3
|
+
import { n as botConfig } from "./config-D5uUtrCP.js";
|
|
4
|
+
import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-WY0RYE4E.js";
|
|
5
|
+
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-BsYAbniN.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-DtHZviJ1.js";
|
|
7
|
+
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-0juF_BP0.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DKs1WwdB.js";
|
|
9
|
+
import { r as enqueueAgentMessageToParent } from "./result-DrcUtFaD.js";
|
|
10
|
+
import { i as enqueueAgentInvocation } from "./work-C5AKvXJV.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,5 +1,5 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
2
|
-
import { n as JuniorPluginSet } from "./plugins-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-BjEQwNVP.js";
|
|
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];
|
|
5
5
|
type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as
|
|
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-cI3T1dNc.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-
|
|
3
|
+
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-hh18yCeU.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-CcvFQE_p.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";
|
|
@@ -234,6 +234,10 @@ function configureVercelDeployment(nitro, options) {
|
|
|
234
234
|
path: JUNIOR_RETENTION_ROUTE,
|
|
235
235
|
schedule: JUNIOR_RETENTION_CRON_SCHEDULE
|
|
236
236
|
});
|
|
237
|
+
if (!nitro.options.vercel.config.crons.some((cron) => cron.path === "/api/internal/auto-archive")) nitro.options.vercel.config.crons.push({
|
|
238
|
+
path: JUNIOR_AUTO_ARCHIVE_ROUTE,
|
|
239
|
+
schedule: JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE
|
|
240
|
+
});
|
|
237
241
|
nitro.options.vercel.functions ??= {};
|
|
238
242
|
nitro.options.vercel.functions.maxDuration = defaultMaxDuration;
|
|
239
243
|
nitro.options.vercel.functionRules ??= {};
|
|
@@ -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-7EFIqzuj.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BGQK3pOa.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;
|