@sentry/junior 0.307.1 → 0.309.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/{actor-D2iXzvlN.js → actor-BsBdxDXQ.js} +0 -1
- package/dist/{adapter-context-HrBTD8rJ.js → adapter-context-1YUbMpD3.js} +2 -2
- package/dist/{admin-B78_KmfR.js → admin-u30A8TcD.js} +2 -2
- package/dist/{agent-runner-DxivxUYd.js → agent-runner-sJLhgPQV.js} +93 -90
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +4 -2
- package/dist/api.js +416 -272
- package/dist/{app-EZur8cVC.d.ts → app-B_7Wn0en.d.ts} +6 -7
- package/dist/app.d.ts +1 -1
- package/dist/app.js +73 -193
- package/dist/{background-compaction-queue-HlljT9ql.js → background-compaction-queue-CUJXVKG3.js} +4 -4
- package/dist/{briefs-DR8mp-TK.js → briefs-BHi70IR5.js} +3 -3
- package/dist/{catalog-runtime-Se9idiDR.js → catalog-runtime-Chc_IP2o.js} +1 -1
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +10 -10
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +5 -5
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-DY5c1E0l.js → config-BIyIdTtA.js} +52 -93
- package/dist/{continue-in-slack-DNkrrWuQ.js → continue-in-slack-BQJBfiQh.js} +6 -6
- package/dist/{conversation--f85g4zL.js → conversation-CzrLhdHG.js} +6 -1
- package/dist/{conversation-feed-BNs9KiqC.js → conversation-feed-B9e3_gxz.js} +1 -1
- package/dist/{conversation-privacy-CVj9vSrP.js → conversation-privacy-CkTW29hd.js} +1 -1
- package/dist/{conversation-turn-CkzrIfJ2.js → conversation-turn-CZaYQUum.js} +19 -20
- package/dist/{credential-sync-B9CIkgOT.js → credential-sync-58m_CyIJ.js} +31 -23
- package/dist/{db-C41UgdBj.d.ts → db-B4Hjxr-u.d.ts} +2 -2
- package/dist/{db-C21CyyTE.js → db-CFUpEZi9.js} +11 -9
- package/dist/{executor-DfNoVVGd.js → executor-DXL0O0MV.js} +4 -3
- package/dist/fan-out-Cod-yEHG.js +10 -0
- package/dist/{connections-C-SqzubG.js → html-CaBu2VbT.js} +146 -11
- package/dist/{install-lYZs8UCL.js → install-DhTBUUov.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{lineage-BJTSY53A.js → lineage-CxtOI2_p.js} +2 -2
- package/dist/{logging-DjW7LjgJ.js → logging-BNUovdcX.js} +1 -1
- package/dist/{message-BPPZpdoZ.js → message-DcUsS2vg.js} +8 -8
- package/dist/{model-input-DKqiLFGa.js → model-input-o3rEqgwM.js} +15 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +4 -4
- package/dist/{oauth-callback-server-OJP8Y4Ca.js → oauth-callback-server-1Fizd1EM.js} +2 -2
- package/dist/{oauth-relay-KwDz41Z3.js → oauth-relay-DOwngqdM.js} +1 -1
- package/dist/{package-discovery-x4AvVhMj.js → package-discovery-DD9vencX.js} +0 -1
- package/dist/{projection-D47mlszd.js → projection-Ce4pmhKP.js} +108 -125
- package/dist/{prompt-DuWH_YIb.js → prompt-DEqjDVMs.js} +25 -14
- package/dist/{registry-yht0oxq6.js → registry-CNE4ZBnG.js} +3 -3
- package/dist/{resolve-gZ-hVMYl.js → resolve-qbPg-aC-.js} +3 -3
- package/dist/{result-CP99Ok0_.js → result-ZGnDzcsb.js} +12 -13
- package/dist/{runner-eVlnUkY7.js → runner-eGIxpAMf.js} +10 -10
- package/dist/{sandbox-egress-signals-DZL_0lnG.js → sandbox-egress-signals-DMFB1kCp.js} +1 -1
- package/dist/{schedule-BG1tEbRF.js → schedule-Cire6NU7.js} +1 -1
- package/dist/{schema-D4jdesIu.js → schema-CfIey9Ao.js} +65 -28
- package/dist/{schema-CRXcj4fj.d.ts → schema-DriSvB40.d.ts} +43 -43
- package/dist/{service-account-tI3LBg2_.js → service-account-B1VXCTqg.js} +3 -3
- package/dist/{service-account-CZneZHh7.js → service-account-Cw_LWZ4-.js} +7 -8
- package/dist/{session-stop-D3S7mSkX.js → session-stop-P2XdTiwr.js} +191 -187
- package/dist/{skills-Bm6uSO9V.js → skills-Zg8-vrje.js} +25 -29
- package/dist/{slack-conversation-unfurl-BeBvg3xU.js → slack-conversation-unfurl-DA51qH0c.js} +18 -15
- package/dist/{spawn-vhMAmLuh.js → spawn-DBi4-zD8.js} +6 -6
- package/dist/{state-3Yiy2FvP.js → state-C-Ftk23K.js} +4 -4
- package/dist/{stop-Bh53GUoX.js → stop-D9xideLM.js} +175 -134
- package/dist/{store-BZJdHYR7.js → store-BjIXA0Al.js} +5 -5
- package/dist/{task-queue-BEl5G38v.js → task-queue-D0_qbnpo.js} +7 -4
- package/dist/{task-runner-C6Bujc6h.js → task-runner-DQMq4XY0.js} +10 -11
- package/dist/{thread-context-DxMQGGd_.js → thread-context-D0i1e-5O.js} +13 -11
- package/dist/{turn-session-routing-CmQY0T60.js → turn-session-routing-C0l68I_O.js} +4 -4
- package/dist/{turn-user-message-Dfbr3Ud9.js → turn-user-message-nBVvOXjs.js} +14 -5
- package/dist/{queue-CbEHUO0l.d.ts → types-fnU7Xs__.d.ts} +3 -1
- package/dist/{users-6rSdqXXk.js → users-DdjMjbmM.js} +1 -1
- package/dist/{validation--hsjOLRL.js → validation-CRbvRPvu.js} +1 -1
- package/dist/{version-9iMT25Hq.js → version-BYdVs12p.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-De1vmuEA.js → viewer-DudYrQGj.js} +7 -5
- package/dist/{warmup-C0IblNtf.js → warmup-DN9OHN1-.js} +136 -78
- package/dist/{worker-CiyRr2q7.js → worker-C9ZfJXmV.js} +8 -8
- package/migrations/0121_people_list_metric_index.sql +1 -0
- package/migrations/0122_automation_rollout_repair.sql +56 -0
- package/migrations/0123_cache_warming_history_reset.sql +10 -0
- package/migrations/meta/0121_snapshot.json +5481 -0
- package/migrations/meta/0122_snapshot.json +5481 -0
- package/migrations/meta/0123_snapshot.json +5481 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +7 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import { aa as startOAuthFlow } from "./projection-Ce4pmhKP.js";
|
|
2
|
+
import { n as botConfig } from "./config-BIyIdTtA.js";
|
|
3
|
+
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
4
|
+
import { R as deleteProviderIdentityForSlackUser, s as getSqlExecutor, z as deleteProviderIdentityForUser } from "./db-CFUpEZi9.js";
|
|
5
|
+
import { d as hasRequiredOAuthScope } from "./registry-CNE4ZBnG.js";
|
|
6
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Chc_IP2o.js";
|
|
7
|
+
import { h as deleteMcpStoredOAuthCredentials, m as deleteMcpServerSessionId, p as deleteMcpAuthSessionsForUserProvider } from "./service-account-Cw_LWZ4-.js";
|
|
8
8
|
import { randomBytes } from "node:crypto";
|
|
9
9
|
// src/handlers/oauth-html.ts
|
|
10
10
|
/** Build pre-escaped callback HTML with the shared response security policy. */
|
|
@@ -195,8 +195,7 @@ function connectablePlugin(provider) {
|
|
|
195
195
|
/** List OAuth plugins and the user's connection state for each one. */
|
|
196
196
|
async function listConnections(userId, userTokenStore) {
|
|
197
197
|
const plugins = pluginCatalogRuntime.getProviders().filter((plugin) => Boolean(plugin.manifest.oauth));
|
|
198
|
-
|
|
199
|
-
return await Promise.all(plugins.map((plugin) => limit(async () => {
|
|
198
|
+
return await mapBounded(plugins, async (plugin) => {
|
|
200
199
|
const tokens = await readConnectedOAuthTokens(userId, plugin, userTokenStore);
|
|
201
200
|
const account = tokens?.account;
|
|
202
201
|
return {
|
|
@@ -209,7 +208,7 @@ async function listConnections(userId, userTokenStore) {
|
|
|
209
208
|
...account.url ? { url: account.url } : void 0
|
|
210
209
|
} } : void 0
|
|
211
210
|
};
|
|
212
|
-
})
|
|
211
|
+
});
|
|
213
212
|
}
|
|
214
213
|
/** True when the provider is an installed plugin with user OAuth. */
|
|
215
214
|
function isConnectableProvider(provider) {
|
|
@@ -247,4 +246,140 @@ async function disconnectConnection(userId, provider, userTokenStore) {
|
|
|
247
246
|
if (tokens?.account) await deleteProviderIdentityForUser(getSqlExecutor(), userId, provider, tokens.account.id);
|
|
248
247
|
await unlinkProvider(userId, provider, userTokenStore);
|
|
249
248
|
}
|
|
250
|
-
|
|
249
|
+
// src/api/html.ts
|
|
250
|
+
/** Escape text before it enters server-rendered HTML. */
|
|
251
|
+
function escapeHtml(value) {
|
|
252
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
253
|
+
}
|
|
254
|
+
/** Return true when a browser request comes from its own URL origin. */
|
|
255
|
+
function requestHasSameOrigin(request) {
|
|
256
|
+
const origin = request.headers.get("origin");
|
|
257
|
+
return origin !== null && URL.parse(origin)?.origin === new URL(request.url).origin;
|
|
258
|
+
}
|
|
259
|
+
const PAGE_STYLE = `
|
|
260
|
+
:root {
|
|
261
|
+
color-scheme: dark;
|
|
262
|
+
--bg: #060607;
|
|
263
|
+
--panel: #0c0c0e;
|
|
264
|
+
--raised: #101013;
|
|
265
|
+
--hover: #17171a;
|
|
266
|
+
--text: #f4f4f5;
|
|
267
|
+
--muted: #a1a1aa;
|
|
268
|
+
--faint: #8a8a93;
|
|
269
|
+
--solid: #ffffff;
|
|
270
|
+
--subtle: #c4c4cc;
|
|
271
|
+
--inverse: #000000;
|
|
272
|
+
--focus: #beaaff;
|
|
273
|
+
--border: rgb(255 255 255 / 0.08);
|
|
274
|
+
--border-emphasis: rgb(255 255 255 / 0.15);
|
|
275
|
+
--border-heavy: rgb(255 255 255 / 0.3);
|
|
276
|
+
--warning-bg: rgb(251 191 36 / 0.08);
|
|
277
|
+
--warning-border: rgb(251 191 36 / 0.3);
|
|
278
|
+
--warning-text: #fcd34d;
|
|
279
|
+
--shadow: 0 16px 40px rgb(0 0 0 / 0.5);
|
|
280
|
+
}
|
|
281
|
+
@media (prefers-color-scheme: light) {
|
|
282
|
+
:root {
|
|
283
|
+
color-scheme: light;
|
|
284
|
+
--bg: #ffffff;
|
|
285
|
+
--panel: #f9f9fa;
|
|
286
|
+
--raised: #ffffff;
|
|
287
|
+
--hover: #f1f1f3;
|
|
288
|
+
--text: #18181b;
|
|
289
|
+
--muted: #52525b;
|
|
290
|
+
--faint: #71717a;
|
|
291
|
+
--solid: #09090b;
|
|
292
|
+
--subtle: #3f3f46;
|
|
293
|
+
--inverse: #ffffff;
|
|
294
|
+
--focus: #7553ff;
|
|
295
|
+
--border: rgb(0 0 0 / 0.09);
|
|
296
|
+
--border-emphasis: rgb(0 0 0 / 0.16);
|
|
297
|
+
--border-heavy: rgb(0 0 0 / 0.32);
|
|
298
|
+
--warning-bg: rgb(245 158 11 / 0.1);
|
|
299
|
+
--warning-border: rgb(217 119 6 / 0.35);
|
|
300
|
+
--warning-text: #92400e;
|
|
301
|
+
--shadow: 0 16px 40px rgb(0 0 0 / 0.08);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
* { box-sizing: border-box; }
|
|
305
|
+
body {
|
|
306
|
+
margin: 0;
|
|
307
|
+
min-height: 100vh;
|
|
308
|
+
display: grid;
|
|
309
|
+
place-items: center;
|
|
310
|
+
padding: 24px 16px;
|
|
311
|
+
background: var(--bg);
|
|
312
|
+
color: var(--text);
|
|
313
|
+
font: 16px/1.5 Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
|
|
314
|
+
}
|
|
315
|
+
main {
|
|
316
|
+
width: 100%;
|
|
317
|
+
max-width: 28rem;
|
|
318
|
+
padding: 32px;
|
|
319
|
+
border: 1px solid var(--border);
|
|
320
|
+
border-radius: 12px;
|
|
321
|
+
background: var(--panel);
|
|
322
|
+
box-shadow: var(--shadow);
|
|
323
|
+
}
|
|
324
|
+
h1, h2 { font-family: Outfit, "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif; }
|
|
325
|
+
h1 { margin: 0 0 8px; font-size: 1.5rem; line-height: 1.25; font-weight: 600; text-wrap: balance; overflow-wrap: anywhere; }
|
|
326
|
+
h2 { margin: 24px 0 8px; font-size: 0.875rem; line-height: 1.35; font-weight: 600; color: var(--subtle); }
|
|
327
|
+
p { margin: 0 0 16px; color: var(--muted); text-wrap: pretty; }
|
|
328
|
+
p:last-child { margin-bottom: 0; }
|
|
329
|
+
strong { color: var(--text); font-weight: 600; }
|
|
330
|
+
code { font: 0.8125rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--faint); overflow-wrap: anywhere; }
|
|
331
|
+
.list { margin: 0 0 24px; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 8px; background: var(--raised); }
|
|
332
|
+
.list li { padding: 12px 16px; font-size: 0.875rem; line-height: 1.35; }
|
|
333
|
+
.list li + li { border-top: 1px solid var(--border); }
|
|
334
|
+
.list code { display: block; margin-top: 4px; }
|
|
335
|
+
.warning { margin: 0 0 24px; padding: 12px 16px; border: 1px solid var(--warning-border); border-radius: 8px; background: var(--warning-bg); color: var(--warning-text); font-size: 0.875rem; line-height: 1.35; }
|
|
336
|
+
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
337
|
+
label { display: block; margin: 0 0 16px; font-size: 0.875rem; font-weight: 600; color: var(--subtle); }
|
|
338
|
+
label input {
|
|
339
|
+
display: block; width: 100%; min-height: 44px; margin-top: 8px; padding: 8px 12px;
|
|
340
|
+
border: 1px solid var(--border-emphasis); border-radius: 6px; background: var(--raised);
|
|
341
|
+
color: var(--text); font: 1rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
342
|
+
}
|
|
343
|
+
button {
|
|
344
|
+
width: 100%; min-height: 44px; padding: 8px 16px; border: 1px solid var(--border-emphasis); border-radius: 6px;
|
|
345
|
+
background: var(--raised); color: var(--text); cursor: pointer;
|
|
346
|
+
font-family: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; transition: background-color 0.2s ease, border-color 0.2s ease;
|
|
347
|
+
}
|
|
348
|
+
button:hover { border-color: var(--border-heavy); background: var(--hover); }
|
|
349
|
+
button.primary { border-color: var(--solid); background: var(--solid); color: var(--inverse); }
|
|
350
|
+
button.primary:hover { border-color: var(--subtle); background: var(--subtle); }
|
|
351
|
+
button:focus-visible, label input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
|
|
352
|
+
@media (max-width: 480px) { main { padding: 24px; } }
|
|
353
|
+
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
|
|
354
|
+
`;
|
|
355
|
+
/**
|
|
356
|
+
* Render one sign-in page that browsers cannot frame or cache. `bodyHtml`
|
|
357
|
+
* follows the heading, and the caller escapes every value in it. Callers use
|
|
358
|
+
* the `list`, `warning`, `actions`, and `primary` classes from `PAGE_STYLE`.
|
|
359
|
+
*/
|
|
360
|
+
function renderHtmlPage(page) {
|
|
361
|
+
return new Response(`<!DOCTYPE html>
|
|
362
|
+
<html lang="en">
|
|
363
|
+
<head>
|
|
364
|
+
<meta charset="utf-8" />
|
|
365
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
366
|
+
<title>${escapeHtml(page.title)}</title>
|
|
367
|
+
<style>${PAGE_STYLE}</style>
|
|
368
|
+
</head>
|
|
369
|
+
<body>
|
|
370
|
+
<main>
|
|
371
|
+
<h1>${escapeHtml(page.title)}</h1>
|
|
372
|
+
${page.bodyHtml}
|
|
373
|
+
</main>
|
|
374
|
+
</body>
|
|
375
|
+
</html>`, {
|
|
376
|
+
status: page.status,
|
|
377
|
+
headers: {
|
|
378
|
+
"cache-control": "no-store",
|
|
379
|
+
"content-type": "text/html; charset=utf-8",
|
|
380
|
+
"x-frame-options": "DENY",
|
|
381
|
+
...page.headers
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
export { isConnectableProvider as a, startConnection as c, disconnectConnection as i, unlinkProvider as l, renderHtmlPage as n, listConnections as o, requestHasSameOrigin as r, readConnectedOAuthTokens as s, escapeHtml as t, htmlCallbackResponse as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as withSpan, b as setSpanAttributes } from "./logging-
|
|
1
|
+
import { Ha as runNonInteractiveCommand, Ia as SANDBOX_WORKSPACE_ROOT, ja as SANDBOX_COMMAND_PATH } from "./projection-Ce4pmhKP.js";
|
|
2
|
+
import { E as withSpan, b as setSpanAttributes } from "./logging-BNUovdcX.js";
|
|
3
3
|
// src/chat/sandbox/resources.ts
|
|
4
4
|
let configuredResources;
|
|
5
5
|
function resourcesFromEnv() {
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,10 +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-CPbZjomA.js";
|
|
2
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
2
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CkTW29hd.js";
|
|
3
3
|
import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
|
|
4
4
|
import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
|
|
5
5
|
import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
|
|
6
6
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
7
|
-
import { B as getDeploymentServiceVersion, V as getDeploymentTelemetryAttributes } from "./logging-
|
|
7
|
+
import { B as getDeploymentServiceVersion, V as getDeploymentTelemetryAttributes } from "./logging-BNUovdcX.js";
|
|
8
8
|
import { performance } from "node:perf_hooks";
|
|
9
9
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
10
10
|
// src/chat/pi/gateway-request-timing.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as conversationKindFromRow, o as getDb } from "./db-
|
|
2
|
-
import { R as juniorConversations } from "./executor-
|
|
1
|
+
import { A as conversationKindFromRow, o as getDb } from "./db-CFUpEZi9.js";
|
|
2
|
+
import { R as juniorConversations } from "./executor-DXL0O0MV.js";
|
|
3
3
|
import { desc, eq, sql } from "drizzle-orm";
|
|
4
4
|
// src/chat/conversations/lineage.ts
|
|
5
5
|
/**
|
|
@@ -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-CPbZjomA.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-BYdVs12p.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,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { F as actorFromRun, I as toolInvocationDestination } from "./agent-runner-
|
|
3
|
-
import {
|
|
4
|
-
import { a as enqueueAgentMessageToParent } from "./result-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { P as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-
|
|
8
|
-
import { $ as postAutomatedTurnLimitNoticeForConversation, F as EVENT_WAIT_MS, ot as admitAutomatedTurn } from "./session-stop-
|
|
9
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
2
|
+
import { F as actorFromRun, I as toolInvocationDestination } from "./agent-runner-sJLhgPQV.js";
|
|
3
|
+
import { Cn as AgentMessageTargetError, En as PARENT_AGENT_TARGET, Sn as AgentMessagePausedError, Vt as getActiveAgentInvocationForConversation, Wt as getLatestAgentInvocationForConversation, dn as enqueueAgentInvocation, en as readChildConversationSender, wn as findChildAgentConversationId, yn as createAgentInvocationForMessage } from "./warmup-DN9OHN1-.js";
|
|
4
|
+
import { a as enqueueAgentMessageToParent } from "./result-ZGnDzcsb.js";
|
|
5
|
+
import { Ga as canAccessConversation, Ja as readConversationAccessFromSql } from "./projection-Ce4pmhKP.js";
|
|
6
|
+
import { J as renderUntrustedTag, n as botConfig } from "./config-BIyIdTtA.js";
|
|
7
|
+
import { P as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-CFUpEZi9.js";
|
|
8
|
+
import { $ as postAutomatedTurnLimitNoticeForConversation, F as EVENT_WAIT_MS, ot as admitAutomatedTurn } from "./session-stop-P2XdTiwr.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-BjIXA0Al.js";
|
|
10
10
|
// src/chat/agent-invocations/top-level-message.ts
|
|
11
11
|
const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
|
|
12
12
|
/** Event type of a message from another top-level agent. */
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { s as getSqlExecutor } from "./db-
|
|
2
|
+
import { s as getSqlExecutor } from "./db-CFUpEZi9.js";
|
|
3
3
|
import { h as isVisionImageMediaType, m as detectImageMediaType } from "./web-message-id-BT8Mg8LL.js";
|
|
4
|
-
import {
|
|
4
|
+
import { xo as readLiveAttachment } from "./projection-Ce4pmhKP.js";
|
|
5
|
+
import { escapeTagText, renderTag } from "@sentry/junior-plugin-api";
|
|
5
6
|
// src/chat/attachments/model-input.ts
|
|
6
7
|
var model_input_exports = /* @__PURE__ */ __exportAll({ loadInputAttachments: () => loadInputAttachments });
|
|
7
8
|
/** Largest file that Slack and web send to the model in the prompt. */
|
|
8
9
|
const MAX_MODEL_ATTACHMENT_BYTES = 5242880;
|
|
10
|
+
/**
|
|
11
|
+
* Render the name and type lines of an attachment tag. The person who
|
|
12
|
+
* attached the file chose its name, so both are escaped.
|
|
13
|
+
*/
|
|
14
|
+
function attachmentFactLines(args) {
|
|
15
|
+
return [`filename: ${escapeTagText(args.filename ?? "unnamed")}`, `media_type: ${escapeTagText(args.mediaType)}`];
|
|
16
|
+
}
|
|
9
17
|
/** Tell the model how to read a stored file that the prompt does not carry. */
|
|
10
18
|
function buildStoredAttachmentPromptText(args) {
|
|
11
|
-
return [
|
|
12
|
-
|
|
13
|
-
`filename: ${args.filename ?? "unnamed"}`,
|
|
14
|
-
`media_type: ${args.mediaType}`,
|
|
19
|
+
return renderTag("attachment", {}, [
|
|
20
|
+
...attachmentFactLines(args),
|
|
15
21
|
`attachment_id: ${args.attachmentId}`,
|
|
16
|
-
"Use loadAttachment with this id to access the original file."
|
|
17
|
-
|
|
18
|
-
].join("\n");
|
|
22
|
+
"Use loadAttachment with this id to access the original file."
|
|
23
|
+
]);
|
|
19
24
|
}
|
|
20
25
|
async function readStoredBytes(args) {
|
|
21
26
|
const record = await readLiveAttachment({
|
|
@@ -74,4 +79,4 @@ async function loadInputAttachments(args) {
|
|
|
74
79
|
};
|
|
75
80
|
}));
|
|
76
81
|
}
|
|
77
|
-
export {
|
|
82
|
+
export { model_input_exports as i, attachmentFactLines as n, buildStoredAttachmentPromptText as r, MAX_MODEL_ATTACHMENT_BYTES as t };
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as JuniorPluginSet } from "./plugins-fBrz8PCV.js";
|
|
2
|
-
import { i as JuniorDashboardOptions } from "./app-
|
|
2
|
+
import { i as JuniorDashboardOptions } from "./app-B_7Wn0en.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 { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-
|
|
1
|
+
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DD9vencX.js";
|
|
2
2
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-Bkk0XRo2.js";
|
|
3
|
-
import { a as CACHE_WARMUP_QUEUE_TOPIC, h as resolveConversationWorkQueueTopic, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./background-compaction-queue-
|
|
4
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
-
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, B as getDeploymentServiceVersion, 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 } from "./logging-
|
|
3
|
+
import { a as CACHE_WARMUP_QUEUE_TOPIC, h as resolveConversationWorkQueueTopic, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./background-compaction-queue-CUJXVKG3.js";
|
|
4
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-D0_qbnpo.js";
|
|
5
|
+
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, B as getDeploymentServiceVersion, 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 } from "./logging-BNUovdcX.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cv2ETe8Y.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 { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
2
|
-
import { bn as createUserTokenStore } from "./projection-
|
|
1
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-58m_CyIJ.js";
|
|
2
|
+
import { bn as createUserTokenStore } from "./projection-Ce4pmhKP.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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { d as readJuniorSecret } from "./task-queue-
|
|
2
|
+
import { d as readJuniorSecret } from "./task-queue-D0_qbnpo.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { SignJWT, jwtVerify } from "jose";
|
|
@@ -114,7 +114,6 @@ var discovery_exports = /* @__PURE__ */ __exportAll({
|
|
|
114
114
|
descriptionPath: () => descriptionPath,
|
|
115
115
|
descriptionPathCandidates: () => descriptionPathCandidates,
|
|
116
116
|
discoverNodeModulesDirs: () => discoverNodeModulesDirs,
|
|
117
|
-
discoverProjectRoots: () => discoverProjectRoots,
|
|
118
117
|
homeDir: () => homeDir,
|
|
119
118
|
isDirectory: () => isDirectory,
|
|
120
119
|
isFile: () => isFile,
|