@sentry/junior 0.288.0 → 0.289.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-Cikcqdty.js → adapter-tE1wnl0T.js} +1 -1
- package/dist/{admin-BcSxHuTB.js → admin-BmsPbmO_.js} +2 -2
- package/dist/{agent-runner-9MXyWUL8.js → agent-runner-bvl8U5uH.js} +343 -103
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +6 -7
- package/dist/api.d.ts +1 -1
- package/dist/api.js +281 -254
- package/dist/{app-BUklJVBe.d.ts → app-Cu454FXq.d.ts} +2 -4
- package/dist/app.d.ts +1 -1
- package/dist/app.js +92 -64
- package/dist/assistant-reply-1N9oxyyb.js +58 -0
- package/dist/{automation-DDXwHQs5.js → automation-DWbjJltM.js} +1 -1
- package/dist/{background-compaction-queue-CjllSPir.js → background-compaction-queue-D36oCldp.js} +4 -4
- package/dist/{briefs-DW9iuolG.js → briefs-CV-1qkXa.js} +3 -4
- package/dist/{catalog-runtime-B3gfH58M.js → catalog-runtime-BNK4uJVZ.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-CLJcyYEF.js → config-DHAy7XlP.js} +4 -41
- package/dist/{connections-BtdJftow.js → connections-C3VmH3cf.js} +7 -129
- package/dist/{conversation-DhoqHtQ7.js → conversation-CwC8K3RZ.js} +8 -8
- package/dist/{conversation-pending-messages-DHV0S4uF.js → conversation-pending-messages-B0cuLReP.js} +1 -1
- package/dist/{conversation-privacy-BPirIVlX.js → conversation-privacy-Bky_veSp.js} +1 -1
- package/dist/{credential-sync-Co8Q2xRW.js → credential-sync-dY9o0YSj.js} +13 -13
- package/dist/{db-Co7DTYYh.js → db-BS2Kql3j.js} +56 -31
- package/dist/{db-zIs8-Ba3.d.ts → db-BebRmhsH.d.ts} +5 -1
- package/dist/{executor-m0kIN71Q.js → executor-cc4nH86C.js} +35 -9
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-DbD-dErY.js → logging-CtCJmt9p.js} +2 -2
- package/dist/{history-IjdmO_r6.js → media-BepyEUNm.js} +85 -1
- package/dist/{message-DKTdTYm-.js → message-C5VuRcP9.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-CpbepSbp.js → oauth-callback-server-KRrYUZ35.js} +2 -2
- package/dist/{projection-BViECfYu.js → projection-BFJG58TG.js} +153 -119
- package/dist/{prompt-KT6MaDHN.js → prompt-D15oftoL.js} +183 -3
- package/dist/{registry-D-Acyjhh.js → registry-C_JrgqUz.js} +1 -1
- package/dist/{resolve-gkT2R66z.js → resolve-Cn_7JfP-.js} +3 -3
- package/dist/{result-DHmCFEt8.js → result-CIbQFLp6.js} +16 -10
- package/dist/{runner-DBKjGjH-.js → runner-BwmaMJVO.js} +8 -8
- package/dist/{sandbox-egress-signals-9n8hqx29.js → sandbox-egress-signals-BOQ8gn7i.js} +1 -1
- package/dist/{schema-DxicIQbc.js → schema-Bptz19Ja.js} +14 -9
- package/dist/{schema-B_6aOcx5.d.ts → schema-DQaFSkZZ.d.ts} +13 -5
- package/dist/{service-account-CDlC9ssy.js → service-account-AGw_pANb.js} +3 -3
- package/dist/{service-account-Bi0HsY6w.js → service-account-CLZfF8O1.js} +3 -3
- package/dist/{session-stop-BWOsuo8p.js → session-stop-CbzKf7UI.js} +41 -30
- package/dist/{skills-DO5K68Rq.js → skills-CcAJBquq.js} +2 -2
- package/dist/{spawn-BBqZDcPa.js → spawn-BvAk2vTI.js} +5 -5
- package/dist/{stop-WC97cmHz.js → stop-BQU4u7la.js} +123 -213
- package/dist/{store-ByR1Lr7e.js → store-DE7NJOvQ.js} +3 -3
- package/dist/{task-runner-B-Ewf8TX.js → task-runner-Q_7duP_T.js} +13 -17
- package/dist/{turn-failure-response-CpdPoZSl.js → turn-failure-response-aWZLfUM8.js} +8 -8
- package/dist/{validation-B4sbIoES.js → validation-BOoPeIJR.js} +1 -1
- package/dist/{version-D6lpuAgL.js → version-Db0MFy61.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CeP27tC3.js → viewer-FFEFu9In.js} +4 -4
- package/dist/{warmup-P_GJCL1c.js → warmup-DDzrA9Gv.js} +260 -60
- package/dist/{work-DI7x1Slm.js → work-BBJK458E.js} +14 -14
- package/dist/{worker-CYPTOT4j.js → worker-2iU5RFyq.js} +6 -30
- package/migrations/0091_conversation_participant_unsubscribed_index.sql +20 -0
- package/migrations/0092_turn_metric_actor.sql +12 -0
- package/migrations/0093_participant_root_actor_backfill.sql +18 -0
- package/migrations/0094_conversation_delivery_paused_at.sql +1 -0
- package/migrations/meta/0091_snapshot.json +4410 -0
- package/migrations/meta/0092_snapshot.json +4446 -0
- package/migrations/meta/0093_snapshot.json +4446 -0
- package/migrations/meta/0094_snapshot.json +4452 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +5 -5
- package/dist/assistant-reply-mj47jMRV.js +0 -65
- package/dist/core-model-BTt5E5b0.js +0 -182
- package/dist/media-BAHvgkok.js +0 -85
|
@@ -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-Db0MFy61.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";
|
|
@@ -1248,4 +1248,4 @@ function extractGenAiUsageAttributes(...sources) {
|
|
|
1248
1248
|
...cost?.total !== void 0 ? { "app.cost.total_usd": cost.total } : void 0
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
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,
|
|
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, isRecord as G, GOOGLE_IDENTITY_PROVIDER as H, JUNIOR_RETENTION_ROUTE as I, toOptionalNumber 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, isNativeIdentityProvider as U, runWithLogAttributes as V, normalizeIdentityEmail 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, toOptionalString 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 };
|
|
@@ -555,4 +555,88 @@ const newConversationEventSchema = z.object({
|
|
|
555
555
|
idempotencyKey: z.string().min(1).optional(),
|
|
556
556
|
createdAtMs: z.number().finite()
|
|
557
557
|
}).strict();
|
|
558
|
-
|
|
558
|
+
// src/chat/attachments/media.ts
|
|
559
|
+
const INPUT_IMAGE_TYPES = [
|
|
560
|
+
"image/png",
|
|
561
|
+
"image/jpeg",
|
|
562
|
+
"image/gif",
|
|
563
|
+
"image/webp"
|
|
564
|
+
];
|
|
565
|
+
/** Video types that browsers play in a `<video>` element. */
|
|
566
|
+
const INLINE_VIDEO_TYPES = ["video/mp4", "video/webm"];
|
|
567
|
+
/** Leading bytes of each accepted image type. `null` matches any byte. */
|
|
568
|
+
const IMAGE_SIGNATURES = [
|
|
569
|
+
{
|
|
570
|
+
mediaType: "image/png",
|
|
571
|
+
bytes: [
|
|
572
|
+
137,
|
|
573
|
+
80,
|
|
574
|
+
78,
|
|
575
|
+
71,
|
|
576
|
+
13,
|
|
577
|
+
10,
|
|
578
|
+
26,
|
|
579
|
+
10
|
|
580
|
+
]
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
mediaType: "image/jpeg",
|
|
584
|
+
bytes: [
|
|
585
|
+
255,
|
|
586
|
+
216,
|
|
587
|
+
255
|
|
588
|
+
]
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
mediaType: "image/gif",
|
|
592
|
+
bytes: [
|
|
593
|
+
71,
|
|
594
|
+
73,
|
|
595
|
+
70,
|
|
596
|
+
56,
|
|
597
|
+
55,
|
|
598
|
+
97
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
mediaType: "image/gif",
|
|
603
|
+
bytes: [
|
|
604
|
+
71,
|
|
605
|
+
73,
|
|
606
|
+
70,
|
|
607
|
+
56,
|
|
608
|
+
57,
|
|
609
|
+
97
|
|
610
|
+
]
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
mediaType: "image/webp",
|
|
614
|
+
bytes: [
|
|
615
|
+
82,
|
|
616
|
+
73,
|
|
617
|
+
70,
|
|
618
|
+
70,
|
|
619
|
+
null,
|
|
620
|
+
null,
|
|
621
|
+
null,
|
|
622
|
+
null,
|
|
623
|
+
87,
|
|
624
|
+
69,
|
|
625
|
+
66,
|
|
626
|
+
80
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
];
|
|
630
|
+
/**
|
|
631
|
+
* Detect an accepted image type from file bytes. Use this instead of a file
|
|
632
|
+
* name or declared content type, which can be wrong.
|
|
633
|
+
*/
|
|
634
|
+
function detectImageMediaType(data) {
|
|
635
|
+
return IMAGE_SIGNATURES.find(({ bytes }) => data.length >= bytes.length && bytes.every((byte, index) => byte === null || data[index] === byte))?.mediaType;
|
|
636
|
+
}
|
|
637
|
+
/** Report whether a media type is a raster image accepted by vision models. */
|
|
638
|
+
function isVisionImageMediaType(mediaType) {
|
|
639
|
+
const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
|
|
640
|
+
return normalized ? INPUT_IMAGE_TYPES.some((type) => type === normalized) : false;
|
|
641
|
+
}
|
|
642
|
+
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 };
|
|
@@ -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 {
|
|
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 { $a as readConversationAccessFromSql, Cn as renderUntrustedTag, Xa as canAccessConversation } from "./projection-BFJG58TG.js";
|
|
3
|
+
import { n as botConfig } from "./config-DHAy7XlP.js";
|
|
4
|
+
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-BS2Kql3j.js";
|
|
5
|
+
import { dn as actorFromRun, fn as toolInvocationDestination, in as AgentMessageTargetError, nn as AgentMessagePausedError } from "./agent-runner-bvl8U5uH.js";
|
|
6
|
+
import { I as PARENT_AGENT_TARGET, v as getActiveAgentInvocationForConversation } from "./turn-failure-response-aWZLfUM8.js";
|
|
7
|
+
import { G as admitAutomatedTurn, S as EVENT_WAIT_MS, V as postAutomatedTurnLimitNoticeForConversation } from "./session-stop-CbzKf7UI.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DE7NJOvQ.js";
|
|
9
|
+
import { a as enqueueAgentInvocation, c as createAgentInvocationForMessage, u as findChildAgentConversationId } from "./work-BBJK458E.js";
|
|
10
|
+
import { r as enqueueAgentMessageToParent } from "./result-CIbQFLp6.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-Cu454FXq.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 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-
|
|
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-CtCJmt9p.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJhGdS4c.js";
|
|
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-
|
|
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-D36oCldp.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { En as createUserTokenStore } from "./projection-BFJG58TG.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-dY9o0YSj.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;
|