@sentry/junior 0.283.0 → 0.285.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-D8-lqOBF.js → adapter-DN5AB4VU.js} +37 -3
- package/dist/{admin-Dnw5SCXp.js → admin-DOITMKnn.js} +1 -1
- package/dist/{agent-runner-Bj7GhysW.js → agent-runner-BsWhHe4N.js} +583 -1655
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +8 -6
- package/dist/api.d.ts +1 -1
- package/dist/api.js +214 -43
- package/dist/{app-CMBP-N43.d.ts → app-DyMs9330.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +230 -187
- package/dist/{assistant-reply-CdYsLbXL.js → assistant-reply-9Jip5bsr.js} +1 -1
- package/dist/{automation-MLWOrghe.js → automation-Mk8aaHzy.js} +2 -2
- package/dist/{background-compaction-queue-Bbsqx8Vm.js → background-compaction-queue-DXkLsWoH.js} +2 -2
- package/dist/{briefs-C4qBY-jb.js → briefs-Cl8-nK9B.js} +5 -5
- package/dist/{catalog-runtime-B7NRB7eH.js → catalog-runtime-Bte6jRB2.js} +1 -1
- package/dist/cli/chat.js +19 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +3 -0
- 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 +25 -4
- package/dist/{client-a3Ib6wxr.js → client-DDbBucBw.js} +2 -2
- package/dist/{config-DFVlYCeY.js → config-DqFnykQT.js} +1 -1
- package/dist/{connections-BtnvpBEV.js → connections-DA4LT9LL.js} +10 -10
- package/dist/{conversation-DdT7SNar.js → conversation-D8kVoCrP.js} +58 -6
- package/dist/{conversation-pending-messages-Dct5pheX.js → conversation-pending-messages-BvROq1bq.js} +1 -1
- package/dist/{conversation-privacy-DLq-abjU.js → conversation-privacy-D0j_h70R.js} +1 -1
- package/dist/{credential-sync-B4XFVcjM.js → credential-sync-hcsYatw-.js} +13 -13
- package/dist/{db-A_WrTY-s.d.ts → db-BhHZSuFw.d.ts} +18 -2
- package/dist/{executor-HPgHGAWK.js → executor-BLEMIgIZ.js} +29 -4
- package/dist/instrumentation.js +37 -13
- package/dist/{logging-2BXvW7Mp.js → logging-BfORLKoq.js} +1 -1
- package/dist/{message-BG1v1lXX.js → message-DqjuKzUx.js} +13 -23
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CXNZJymo.js → oauth-callback-server-CFSRzu1n.js} +2 -2
- package/dist/{projection-BfKkpOGQ.js → projection-DliWYrnT.js} +575 -74
- package/dist/{prompt-CCtaGgbI.js → prompt-BvIUzY4y.js} +8 -6
- package/dist/push-endpoint-CO-nomUd.js +36 -0
- package/dist/{registry-CLooHPAz.js → registry-rC7MCxu8.js} +1 -1
- package/dist/{reporting-window-B-QP9zX1.js → reporting-window-B4TwyuJo.js} +14 -14
- package/dist/{resolve-D3MK9oRJ.js → resolve-Biu8Qw3u.js} +3 -3
- package/dist/result-DxJMCX47.js +299 -0
- package/dist/result-event-type-DD6BAgT7.js +11 -0
- package/dist/{runner-Ds31u3rB.js → runner-BQJSFLKg.js} +11 -11
- package/dist/{sandbox-egress-signals-CLd5RPUw.js → sandbox-egress-signals-6aMxJSDn.js} +1 -1
- package/dist/{cadence-R7Em4RjE.js → schedule-BTp__wrw.js} +81 -1
- package/dist/{schema-jW3ccLjp.d.ts → schema-BUviRAs8.d.ts} +196 -220
- package/dist/{schema-CHNP0GfH.js → schema-BasXTvi2.js} +94 -5
- package/dist/{service-account-D6AMahy7.js → service-account-BI5Wgx22.js} +3 -3
- package/dist/{service-account-CWpTsoIM.js → service-account-CAE-_1dR.js} +3 -3
- package/dist/session-stop-CA-jOJ84.js +2924 -0
- package/dist/{skills-DuOKByQH.js → skills-B22duVJU.js} +2 -2
- package/dist/{spawn-CNIQGgAS.js → spawn-BB2_4VYn.js} +2 -2
- package/dist/{stop-DX2oOIgl.js → stop-DioIcEAu.js} +4830 -4200
- package/dist/{store-61mD4ZSh.js → store-B26LV6UP.js} +78 -311
- package/dist/{store-DAJntSEv.js → store-Dn4W7qgH.js} +30 -5
- package/dist/{task-queue-BE70Pb9p.js → task-queue-Bt0IoR2i.js} +3 -3
- package/dist/{task-runner-CmmfddSZ.js → task-runner-D8lddjzp.js} +17 -8
- package/dist/{thread-state-0UfRMWYd.js → thread-state-CrFk3K_7.js} +4 -4
- package/dist/{turn-failure-response-DKdzxJHE.js → turn-failure-response-DaJ04qVj.js} +7 -7
- package/dist/{turn-lifecycle-24sBZ4Ip.js → turn-lifecycle-C2mXS7AZ.js} +1 -1
- package/dist/{turn-session-routing-CzCnNAUO.js → turn-session-routing-CGMKrYOj.js} +10 -10
- package/dist/{validation-Cs_knhR8.js → validation-TzhfQABF.js} +1 -1
- package/dist/{version-ZMC4cXWN.js → version-DSk8CFvA.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CYB9T4rm.js → viewer-1Ea81s0b.js} +190 -53
- package/dist/{work-J1n6RQkY.js → work-ybG4_q5C.js} +238 -32
- package/dist/{worker-s1fCvj1z.js → worker-ccSyZRNz.js} +6 -6
- package/migrations/0082_push_notifications.sql +14 -0
- package/migrations/0083_conversation_kind.sql +11 -0
- package/migrations/0084_read_position_backfill.sql +25 -0
- package/migrations/0085_child_archived_at.sql +1 -0
- package/migrations/meta/0082_snapshot.json +4373 -0
- package/migrations/meta/0083_snapshot.json +4388 -0
- package/migrations/meta/0084_snapshot.json +4388 -0
- package/migrations/meta/0085_snapshot.json +4394 -0
- package/migrations/meta/_journal.json +28 -0
- package/package.json +7 -5
- package/dist/result-BPCjUefO.js +0 -483
- package/dist/session-stop-D8LGC3H6.js +0 -1438
package/dist/instrumentation.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
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 { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
2
|
+
import { R as getDeploymentServiceVersion, z as getDeploymentTelemetryAttributes } from "./logging-BfORLKoq.js";
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-D0j_h70R.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";
|
|
7
|
+
import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
|
|
7
8
|
import { performance } from "node:perf_hooks";
|
|
8
9
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
9
10
|
// src/chat/pi/gateway-request-timing.ts
|
|
@@ -145,9 +146,15 @@ const SECRET_HEADER_NAMES = /* @__PURE__ */ new Set([
|
|
|
145
146
|
]);
|
|
146
147
|
const SDK_REQUEST_HEADER_PREFIX = "http.request.header.";
|
|
147
148
|
const URL_SPAN_NAME = /^([A-Z]+ )((?:https?:\/\/|\/)\S*)$/;
|
|
148
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Drop the query and fragment, hide the sandbox egress credential token, and
|
|
151
|
+
* keep only the host of a push endpoint.
|
|
152
|
+
*/
|
|
149
153
|
function scrubUrl(value) {
|
|
150
|
-
|
|
154
|
+
const url = value.split(/[?#]/, 1)[0] ?? value;
|
|
155
|
+
const host = url.includes("://") ? urlHost(url) : void 0;
|
|
156
|
+
if (host && isPushServiceHost(host)) return `https://${host}`;
|
|
157
|
+
return redactSandboxEgressProxyPath(url);
|
|
151
158
|
}
|
|
152
159
|
function scrubSpanName(name) {
|
|
153
160
|
const match = URL_SPAN_NAME.exec(name);
|
|
@@ -159,18 +166,34 @@ function isSecretHeaderAttribute(key) {
|
|
|
159
166
|
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
160
167
|
return normalized.endsWith("xjuniorlocalcredentialsignature") || normalized.endsWith("xjuniorsandboxegresstoken");
|
|
161
168
|
}
|
|
162
|
-
function
|
|
163
|
-
|
|
169
|
+
function urlHost(value) {
|
|
170
|
+
try {
|
|
171
|
+
return new URL(value).hostname;
|
|
172
|
+
} catch {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The URL path of a private Slack file names the workspace and file. The URL
|
|
178
|
+
* path of a push endpoint identifies one browser. Keep only their host.
|
|
179
|
+
*/
|
|
180
|
+
function isHostOnly(host) {
|
|
181
|
+
return host === SLACK_FILE_HOST || isPushServiceHost(host);
|
|
182
|
+
}
|
|
183
|
+
function hostOnlyRequestHost(attributes) {
|
|
184
|
+
const address = attributes["server.address"];
|
|
185
|
+
if (typeof address === "string" && isHostOnly(address)) return address;
|
|
186
|
+
for (const key of URL_ATTRIBUTE_KEYS) {
|
|
164
187
|
const value = attributes[key];
|
|
165
|
-
|
|
166
|
-
|
|
188
|
+
const host = typeof value === "string" ? urlHost(value) : void 0;
|
|
189
|
+
if (host && isHostOnly(host)) return host;
|
|
190
|
+
}
|
|
167
191
|
}
|
|
168
|
-
|
|
169
|
-
function scrubSlackFileUrls(attributes) {
|
|
192
|
+
function keepOnlyHost(attributes, host) {
|
|
170
193
|
for (const key of URL_ATTRIBUTE_KEYS) {
|
|
171
194
|
const value = attributes[key];
|
|
172
195
|
if (typeof value !== "string") continue;
|
|
173
|
-
if (value.includes("://")) attributes[key] = `https://${
|
|
196
|
+
if (value.includes("://")) attributes[key] = `https://${host}`;
|
|
174
197
|
else delete attributes[key];
|
|
175
198
|
}
|
|
176
199
|
}
|
|
@@ -180,8 +203,9 @@ function scrubSensitiveUrlAttributes(attributes) {
|
|
|
180
203
|
delete attributes["url.fragment"];
|
|
181
204
|
delete attributes["http.request.body.data"];
|
|
182
205
|
for (const key of Object.keys(attributes)) if (isSecretHeaderAttribute(key)) delete attributes[key];
|
|
183
|
-
|
|
184
|
-
|
|
206
|
+
const hostOnly = hostOnlyRequestHost(attributes);
|
|
207
|
+
if (hostOnly) {
|
|
208
|
+
keepOnlyHost(attributes, hostOnly);
|
|
185
209
|
return;
|
|
186
210
|
}
|
|
187
211
|
for (const key of URL_ATTRIBUTE_KEYS) {
|
|
@@ -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-DSk8CFvA.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
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import { Ft as toolInvocationDestination,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { Qa as readConversationAccessFromSql, Xa as canAccessConversation, _n as renderUntrustedTag } from "./projection-DliWYrnT.js";
|
|
3
|
+
import { n as botConfig } from "./config-DqFnykQT.js";
|
|
4
|
+
import { H as SYSTEM_IDENTITY_ID, S as getDb, x as getConversationStore } from "./viewer-1Ea81s0b.js";
|
|
5
|
+
import { Et as AgentMessagePausedError, Ft as actorFromRun, It as toolInvocationDestination, Ot as AgentMessageTargetError } from "./agent-runner-BsWhHe4N.js";
|
|
6
|
+
import { i as getActiveAgentInvocationForConversation, x as PARENT_AGENT_TARGET } from "./store-B26LV6UP.js";
|
|
7
|
+
import { U as admitAutomatedTurn, b as EVENT_WAIT_MS, z as postAutomatedTurnLimitNoticeForConversation } from "./session-stop-CA-jOJ84.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-Dn4W7qgH.js";
|
|
9
|
+
import { c as createAgentInvocationForMessage, i as enqueueAgentInvocation, u as findChildAgentConversationId } from "./work-ybG4_q5C.js";
|
|
10
|
+
import { r as enqueueAgentMessageToParent } from "./result-DxJMCX47.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. */
|
|
@@ -36,19 +36,10 @@ async function requireTopLevelAgentAccess(args) {
|
|
|
36
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`);
|
|
37
37
|
}
|
|
38
38
|
function renderTopLevelMessageInput(args) {
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
""
|
|
42
|
-
|
|
43
|
-
"",
|
|
44
|
-
args.summary,
|
|
45
|
-
`Sender conversation: ${args.senderConversationId}`,
|
|
46
|
-
"",
|
|
47
|
-
"Message:",
|
|
48
|
-
args.text.trim(),
|
|
49
|
-
"",
|
|
50
|
-
`To answer the sender, use messageAgent with to set to "${args.senderConversationId}".`
|
|
51
|
-
].join("\n");
|
|
39
|
+
return renderUntrustedTag("agent-message", {
|
|
40
|
+
conversation_id: args.senderConversationId,
|
|
41
|
+
source: "top_level_agent"
|
|
42
|
+
}, "Another top-level agent", args.text.trim());
|
|
52
43
|
}
|
|
53
44
|
/**
|
|
54
45
|
* Send one message from a top-level agent to another top-level agent and
|
|
@@ -98,7 +89,6 @@ async function enqueueTopLevelAgentMessage(args) {
|
|
|
98
89
|
metadata,
|
|
99
90
|
text: renderTopLevelMessageInput({
|
|
100
91
|
senderConversationId: args.senderConversationId,
|
|
101
|
-
summary,
|
|
102
92
|
text: args.text
|
|
103
93
|
})
|
|
104
94
|
},
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions } from "./app-DyMs9330.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-
|
|
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-BfORLKoq.js";
|
|
2
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-
|
|
3
|
+
import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic } from "./background-compaction-queue-DXkLsWoH.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-HYh_JOdw.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-Bt0IoR2i.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Pn as createUserTokenStore } from "./projection-DliWYrnT.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-hcsYatw-.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;
|