@sentry/junior 0.275.0 → 0.276.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-DoPR2jS-.js} +1 -1
- package/dist/{admin-CkPaAYuZ.js → admin-BJTT-kXb.js} +1 -1
- package/dist/{agent-invocations-C1RNOCs8.js → agent-invocations-CUWrrzkc.js} +1 -0
- package/dist/{agent-runner-bE7aH7ew.js → agent-runner-sMpA5qGM.js} +266 -202
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +3 -3
- package/dist/api.d.ts +1 -1
- package/dist/api.js +75 -66
- package/dist/{app-CgkquhZ8.d.ts → app-DTj-yAQt.d.ts} +10 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +192 -86
- package/dist/{assistant-reply-CjRU9Z59.js → assistant-reply-DbxKnBQF.js} +1 -1
- package/dist/{automation-BGrd03QO.js → automation-B8_mC68r.js} +42 -13
- package/dist/{background-compaction-queue-BYuOt3qK.js → background-compaction-queue-Bywqo1WJ.js} +2 -2
- package/dist/{briefs-6xUvmGos.js → briefs-IL7QnCCR.js} +4 -4
- package/dist/{catalog-runtime-DcJ5NHDW.js → catalog-runtime--sC2CYLQ.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/{client-gnKpkpqP.js → client-7diKvInp.js} +2 -2
- package/dist/{config-D0GKc9sC.js → config-Cb--cuv-.js} +2 -2
- package/dist/{connections-DLqP5Bp1.js → connections-C4-4fxaE.js} +14 -14
- package/dist/{conversation-BjTo9ZFL.js → conversation-DppJ83Hw.js} +32 -7
- package/dist/{conversation-privacy-BCXFshP9.js → conversation-privacy-DTwdT3Pi.js} +1 -1
- package/dist/{credential-sync-BjihXFF2.js → credential-sync-Sl5RQCkS.js} +13 -13
- package/dist/{db-BMZhoYKj.d.ts → db-Ck6TXQIx.d.ts} +1 -1
- package/dist/{executor-j8VMt-To.js → executor-BFKmqxYe.js} +3 -3
- package/dist/instrumentation.d.ts +14 -0
- package/dist/instrumentation.js +29 -6
- package/dist/{logging-CFHIO4Vs.js → logging-B04X_eCB.js} +1 -1
- package/dist/{message-DH0cqFRS.js → message-DQMFyyE-.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-BgU4EZsJ.js → oauth-callback-server-BGq0_vQI.js} +2 -2
- package/dist/{projection-CTvLSwcm.js → projection-6dXaN0n-.js} +99 -17
- package/dist/{prompt-JEWUUpLW.js → prompt-B4fQKGZR.js} +1 -1
- package/dist/{registry-OsyWR4GO.js → registry-CEqKR_ld.js} +1 -1
- package/dist/{resolve-DCrKjmVP.js → resolve-8I5DkrfI.js} +3 -3
- package/dist/{result-Btdt5bSl.js → result-BgAW90IM.js} +9 -9
- package/dist/{runner-C1AwS93W.js → runner-CSKDr_19.js} +12 -12
- package/dist/{sandbox-egress-signals-C-5i7Zxm.js → sandbox-egress-signals-BxAT276e.js} +1 -1
- package/dist/{schema-DfdHlBnb.d.ts → schema-CaUWl2EV.d.ts} +74 -6
- package/dist/{schema-CX9XGKCm.js → schema-Cal-EFdi.js} +9 -7
- package/dist/{service-account-CQIW6At4.js → service-account-CUuVJCKT.js} +3 -3
- package/dist/{service-account-DZX1KlQl.js → service-account-CtOab1Xz.js} +3 -3
- package/dist/{session-stop-DjIyORJw.js → session-stop-DK8LuPZW.js} +155 -54
- package/dist/{skills-BEfAAT6p.js → skills-Bc0D7BGy.js} +2 -2
- package/dist/{spawn-Dgj4xxvO.js → spawn-DF_GUcd8.js} +2 -2
- package/dist/{stop-DomyNvuv.js → stop-DthSy-z8.js} +130 -81
- package/dist/{store-Dp3RMEQd.js → store-BgH2P3X9.js} +3 -3
- package/dist/{store-B7Z6zIc7.js → store-C5uVTx2G.js} +11 -9
- package/dist/{task-queue-CVQ9cWnC.js → task-queue-C6ROM_XJ.js} +3 -3
- package/dist/{task-runner-DHBG47gS.js → task-runner-BwAkjjVE.js} +6 -6
- package/dist/{thread-state-BF8VwIxd.js → thread-state-BXjgk1pW.js} +4 -4
- package/dist/{turn-failure-response-Di7TbgsF.js → turn-failure-response-CVI57qKL.js} +7 -7
- package/dist/{turn-lifecycle-DzXwXmLg.js → turn-lifecycle-CF6ibonp.js} +6 -1
- package/dist/{turn-session-routing-CIWhXKeT.js → turn-session-routing-DddybdNu.js} +17 -16
- package/dist/{validation-BRmwRaXc.js → validation-BxF1nQbC.js} +1 -1
- package/dist/{version-DBVMsgvA.js → version-CTzSbCmR.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BFADRGP8.js → viewer-CQwBszc7.js} +10 -7
- package/dist/{work-DDaoxZAw.js → work-BHlShEQ6.js} +30 -12
- package/dist/{worker-Bub0fDtW.js → worker-DhY9MnsH.js} +6 -6
- package/migrations/0073_conversation_quick_question.sql +1 -0
- package/migrations/meta/0073_snapshot.json +4070 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +6 -5
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-sMpA5qGM.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-DOm9Y6qI.js").then((n) => n.o),
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
102
|
+
import("../projection-6dXaN0n-.js").then((n) => n.Mn),
|
|
103
|
+
import("../catalog-runtime--sC2CYLQ.js").then((n) => n.t),
|
|
104
|
+
import("../validation-BxF1nQbC.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-CQwBszc7.js").then((n) => n.v)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,18 +152,18 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig } = await import("../projection-6dXaN0n-.js").then((n) => n.Wn);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-CSKDr_19.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BGq0_vQI.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-C6ZAyJgf.js").then((n) => n.t);
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-BxAT276e.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-DF_GUcd8.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-DQMFyyE-.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-BgAW90IM.js").then((n) => n.i);
|
|
164
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-DK8LuPZW.js").then((n) => n.r);
|
|
165
165
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
166
|
+
const { processConversationWork } = await import("../worker-DhY9MnsH.js").then((n) => n.n);
|
|
167
167
|
let agentRunner;
|
|
168
168
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
169
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as JUNIOR_HEARTBEAT_ROUTE, F as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { A as JUNIOR_HEARTBEAT_ROUTE, F as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-B04X_eCB.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-CEqKR_ld.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-Bc0D7BGy.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-BJTT-kXb.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runServiceAccount(argv) {
|
|
31
|
-
return await (await import("../service-account-
|
|
31
|
+
return await (await import("../service-account-CtOab1Xz.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-IL7QnCCR.js")).runBriefs(argv);
|
|
35
35
|
}
|
|
36
36
|
function topLevelCommand(argv) {
|
|
37
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as getDb } from "../viewer-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { Aa as createPluginLogger, Hn as validatePlugins, Vn as setPlugins } from "../projection-6dXaN0n-.js";
|
|
2
|
+
import { S as getDb } from "../viewer-CQwBszc7.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime--sC2CYLQ.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BxF1nQbC.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { kr as create } from "../projection-6dXaN0n-.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime--sC2CYLQ.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-DoPR2jS-.js";
|
|
4
|
+
import { n as resolve } from "../resolve-8I5DkrfI.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_RUNTIME = "node22";
|
|
7
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.d.ts
CHANGED
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-Cb--cuv-.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-BFKmqxYe.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-CEqKR_ld.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-B04X_eCB.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DTwdT3Pi.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { C as toOptionalTrimmed, c as resolveGatewayModel } from "./client-
|
|
3
|
-
import { h as logWarn } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, c as resolveGatewayModel } from "./client-7diKvInp.js";
|
|
3
|
+
import { h as logWarn } from "./logging-B04X_eCB.js";
|
|
4
4
|
import { c as modelProfileSchema, d as parseTurnReasoningLevel, t as DEFAULT_MODEL_PROFILES, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
|
|
5
5
|
import { AwsClient } from "aws4fetch";
|
|
6
6
|
// src/chat/attachments/s3.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { $ as loadTurnCheckpoint,
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime
|
|
6
|
-
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-
|
|
9
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
10
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { $ as loadTurnCheckpoint, Br as startOAuthFlow, it as getTurnRecord, rt as failTurnRecord } from "./projection-6dXaN0n-.js";
|
|
2
|
+
import { n as botConfig } from "./config-Cb--cuv-.js";
|
|
3
|
+
import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } from "./viewer-CQwBszc7.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-CEqKR_ld.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime--sC2CYLQ.js";
|
|
6
|
+
import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-sMpA5qGM.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-DoPR2jS-.js";
|
|
8
|
+
import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-Bywqo1WJ.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-BgH2P3X9.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DddybdNu.js";
|
|
11
11
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -393,12 +393,12 @@ async function startConnection(provider, actor) {
|
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
395
|
/**
|
|
396
|
-
* Remove the
|
|
397
|
-
* identity that the connection linked to the viewer's
|
|
396
|
+
* Remove the viewer's stored connection for one provider and the provider
|
|
397
|
+
* identity that the connection linked to the viewer's User.
|
|
398
398
|
*/
|
|
399
|
-
async function disconnectConnection(userId, provider, userTokenStore
|
|
399
|
+
async function disconnectConnection(userId, provider, userTokenStore) {
|
|
400
400
|
const tokens = await userTokenStore.get(userId, provider);
|
|
401
|
-
if (tokens?.account) await deleteProviderIdentityForUser(getSqlExecutor(),
|
|
401
|
+
if (tokens?.account) await deleteProviderIdentityForUser(getSqlExecutor(), userId, provider, tokens.account.id);
|
|
402
402
|
await unlinkProvider(userId, provider, userTokenStore);
|
|
403
403
|
}
|
|
404
404
|
export { startConnection as a, deleteWebAuthorization as c, createPausedTurns as d, getPausedTurnRequest as f, getTurnAuthorization as h, readConnectedOAuthTokens as i, getWebAuthorization as l, wakePausedTurn as m, isConnectableProvider as n, unlinkProvider as o, wakeAuthorizedTurn as p, listConnections as r, createWebAuthorization as s, disconnectConnection as t, htmlCallbackResponse as u };
|
|
@@ -230,6 +230,21 @@ function annotationCard(annotation) {
|
|
|
230
230
|
title: value.label
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
+
// src/chat/review-items/change-record.ts
|
|
234
|
+
/**
|
|
235
|
+
* The person change to a Review item that one message records. Each inbound
|
|
236
|
+
* message and saved Message that reports a take, answer, or dismiss carries
|
|
237
|
+
* its own record, so the dashboard shows what that message did, not what the
|
|
238
|
+
* item looks like now.
|
|
239
|
+
*/
|
|
240
|
+
const reviewItemChangeRecordSchema = z.object({
|
|
241
|
+
kind: z.enum([
|
|
242
|
+
"submitted",
|
|
243
|
+
"dismissed",
|
|
244
|
+
"taken"
|
|
245
|
+
]),
|
|
246
|
+
reviewItemId: z.string().min(1)
|
|
247
|
+
}).strict();
|
|
233
248
|
// src/api/schema/conversation-read-position.ts
|
|
234
249
|
/**
|
|
235
250
|
* How far the signed-in viewer has read a Conversation transcript.
|
|
@@ -327,15 +342,17 @@ const conversationPendingMessageSchema = z.object({
|
|
|
327
342
|
/** People mentioned in the text, resolved at read time. */
|
|
328
343
|
mentions: z.array(actorIdentitySchema).optional(),
|
|
329
344
|
attachments: z.array(messageAttachmentSchema).optional(),
|
|
345
|
+
/** Review item change that this Message records. */
|
|
346
|
+
reviewItemChange: reviewItemChangeRecordSchema.optional(),
|
|
330
347
|
redacted: z.literal(true).optional()
|
|
331
348
|
}).strict().superRefine((data, context) => {
|
|
332
349
|
if (data.text === void 0 === (data.redacted !== true)) context.addIssue({
|
|
333
350
|
code: "custom",
|
|
334
351
|
message: "pending message content must be text or explicitly redacted"
|
|
335
352
|
});
|
|
336
|
-
if (data.redacted && (data.actorIdentity || data.attachments || data.mentions)) context.addIssue({
|
|
353
|
+
if (data.redacted && (data.actorIdentity || data.attachments || data.mentions || data.reviewItemChange)) context.addIssue({
|
|
337
354
|
code: "custom",
|
|
338
|
-
message: "redacted pending messages must not expose actor identity, attachments, or
|
|
355
|
+
message: "redacted pending messages must not expose actor identity, attachments, mentions, or a review item"
|
|
339
356
|
});
|
|
340
357
|
});
|
|
341
358
|
/** Participant-only authorization prompt for a parked web turn. */
|
|
@@ -481,9 +498,15 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
481
498
|
eventObjectType: objectTypeSchema.optional(),
|
|
482
499
|
explicitMention: z.boolean().optional(),
|
|
483
500
|
trustedSummary: z.string().min(1).optional(),
|
|
484
|
-
/**
|
|
501
|
+
/**
|
|
502
|
+
* The Watch Events when several arrived together. A message that also
|
|
503
|
+
* records Review item changes lists its own Event here even when it has
|
|
504
|
+
* one.
|
|
505
|
+
*/
|
|
485
506
|
events: z.array(conversationReportMessageEventSchema).optional(),
|
|
486
507
|
cards: z.array(messageCardRefSchema).optional(),
|
|
508
|
+
/** Person changes to Review items that this message records. */
|
|
509
|
+
reviewItemChanges: z.array(reviewItemChangeRecordSchema).min(1).optional(),
|
|
487
510
|
text: z.string().optional(),
|
|
488
511
|
attachments: z.array(messageAttachmentSchema).optional(),
|
|
489
512
|
redacted: z.literal(true).optional()
|
|
@@ -492,9 +515,9 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
492
515
|
code: "custom",
|
|
493
516
|
message: "message content must be text or explicitly redacted"
|
|
494
517
|
});
|
|
495
|
-
if (data.redacted && (data.actorIdentity || data.cards || data.attachments || data.events)) context.addIssue({
|
|
518
|
+
if (data.redacted && (data.actorIdentity || data.cards || data.attachments || data.events || data.reviewItemChanges)) context.addIssue({
|
|
496
519
|
code: "custom",
|
|
497
|
-
message: "redacted messages must not expose actor identity, cards, attachments, or
|
|
520
|
+
message: "redacted messages must not expose actor identity, cards, attachments, events, or review item changes"
|
|
498
521
|
});
|
|
499
522
|
});
|
|
500
523
|
const conversationReportMessageHandledEventDataSchema = z.object({
|
|
@@ -812,7 +835,9 @@ function validateConversationEvents(report, context) {
|
|
|
812
835
|
const forkConversationBodySchema = z.object({
|
|
813
836
|
/** Assistant reply that ends the copied history. */
|
|
814
837
|
messageId: z.string().min(1).max(500),
|
|
815
|
-
idempotencyKey: z.string().trim().min(1).max(200)
|
|
838
|
+
idempotencyKey: z.string().trim().min(1).max(200),
|
|
839
|
+
/** Start a hidden, read-only Quick question about this reply text. */
|
|
840
|
+
quickQuestion: z.object({ quote: z.string().trim().min(1).max(4e3) }).strict().optional()
|
|
816
841
|
}).strict();
|
|
817
842
|
const forkConversationResponseSchema = z.object({ conversationId: z.string() }).strict();
|
|
818
843
|
/** One Conversation in the agent tree of a child Conversation. */
|
|
@@ -866,4 +891,4 @@ const conversationFeedSchema = z.object({
|
|
|
866
891
|
source: z.literal("conversation_index"),
|
|
867
892
|
generatedAt: z.string()
|
|
868
893
|
}).strict();
|
|
869
|
-
export { createConversationMessageBodySchema as A,
|
|
894
|
+
export { createConversationMessageBodySchema as A, messageCardText as B, conversationReportEventSchema as C, conversationSurfaceSchema as D, conversationSummaryReportSchema as E, conversationChildAgentTotalsSchema as F, MAX_INPUT_IMAGE_BYTES as G, removedCardSchema as H, conversationReadPositionSchema as I, briefLinkSchema as J, readMessageAttachments as K, reviewItemChangeRecordSchema as L, forkConversationResponseSchema as M, steerConversationPendingMessagesBodySchema as N, conversationUsageSchema as O, steerConversationPendingMessagesResponseSchema as P, annotationCard as R, conversationReportEventDataSchema as S, conversationReportStatusSchema as T, resolveMessageCards as U, readMessageCardRefs as V, MAX_INPUT_IMAGES as W, conversationBriefSchema as X, briefOutcomeStatusSchema as Y, parseBriefInput as Z, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, forkConversationBodySchema as j, createConversationBodySchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, briefCodeChangeSchema as q, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationReportMessageEventSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, messageCardRef as z };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import { B as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-
|
|
1
|
+
import { $r as postSlackMessage, Dn as createUserTokenStore, Lr as formatProviderLabel, Qi as getSlackClient, Rr as parseOAuthStatePayload, X as getConversationPendingAuth, f as recordAuthenticationLinked, it as getTurnRecord, jn as resolvePluginOAuthAccount, p as recordAuthorizationCompleted, zr as resolveBaseUrl } from "./projection-6dXaN0n-.js";
|
|
2
|
+
import { m as escapeXml } from "./client-7diKvInp.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-Cb--cuv-.js";
|
|
4
|
+
import { B as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-B04X_eCB.js";
|
|
5
5
|
import { p as parseSlackUserId } from "./actor-B4DYygOB.js";
|
|
6
|
-
import { C as getSqlExecutor, L as findUserByVerifiedEmails, N as resolveActorIdentityId, V as upsertLinkedIdentity, o as readIdentityById } from "./viewer-
|
|
6
|
+
import { C as getSqlExecutor, L as findUserByVerifiedEmails, N as resolveActorIdentityId, V as upsertLinkedIdentity, o as readIdentityById } from "./viewer-CQwBszc7.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJBompdd.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-CEqKR_ld.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime--sC2CYLQ.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-Bc0D7BGy.js";
|
|
11
|
+
import { d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, y as lookupSlackUserProfile } from "./agent-runner-sMpA5qGM.js";
|
|
12
12
|
import { r as acquireActiveLock } from "./locks-D-0h111u.js";
|
|
13
|
-
import { r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
13
|
+
import { r as getStateAdapter } from "./adapter-DoPR2jS-.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-CUuVJCKT.js";
|
|
15
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BXjgk1pW.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-C4-4fxaE.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-C6ZAyJgf.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import { p as logException } from "./logging-
|
|
3
|
-
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-
|
|
1
|
+
import "./config-Cb--cuv-.js";
|
|
2
|
+
import { p as logException } from "./logging-B04X_eCB.js";
|
|
3
|
+
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CUWrrzkc.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { sql } from "drizzle-orm";
|
|
6
6
|
import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
+
/** Browser SDK settings and the current request's trace, for an HTML page. */
|
|
2
|
+
export interface BrowserSentryConfig {
|
|
3
|
+
baggage?: string;
|
|
4
|
+
dsn: string;
|
|
5
|
+
environment?: string;
|
|
6
|
+
release?: string;
|
|
7
|
+
sentryTrace?: string;
|
|
8
|
+
tracesSampleRate: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Read the settings a served page needs to send browser spans to the same
|
|
12
|
+
* project, continuing the trace of the request that rendered it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getBrowserSentryConfig(): BrowserSentryConfig | undefined;
|
|
1
15
|
/** Initialize Sentry for the Junior runtime. Call at the top of your entry point. */
|
|
2
16
|
export declare function initSentry(): void;
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as getDeploymentServiceVersion, L as getDeploymentTelemetryAttributes } from "./logging-
|
|
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 { I as getDeploymentServiceVersion, L as getDeploymentTelemetryAttributes } from "./logging-B04X_eCB.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-DTwdT3Pi.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-CTzSbCmR.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 { 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 { ja as readConversationAccessFromSql } from "./projection-6dXaN0n-.js";
|
|
3
|
+
import { n as botConfig } from "./config-Cb--cuv-.js";
|
|
4
|
+
import { M as SYSTEM_IDENTITY_ID, S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-CQwBszc7.js";
|
|
5
|
+
import { Ft as toolInvocationDestination, Pt as actorFromRun } from "./agent-runner-sMpA5qGM.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-C5uVTx2G.js";
|
|
7
|
+
import { D as postAutomatedTurnLimitNoticeForConversation, a as EVENT_WAIT_MS, j as admitAutomatedTurn } from "./session-stop-DK8LuPZW.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-BgH2P3X9.js";
|
|
9
|
+
import { r as enqueueAgentMessageToParent } from "./result-BgAW90IM.js";
|
|
10
|
+
import { i as enqueueAgentInvocation } from "./work-BHlShEQ6.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-DTj-yAQt.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.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_HEARTBEAT_ROUTE, D as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, I as getDeploymentServiceVersion, M as JUNIOR_RETENTION_CRON_SCHEDULE, N as JUNIOR_RETENTION_ROUTE, O as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, j as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, k as JUNIOR_HEARTBEAT_CRON_SCHEDULE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_HEARTBEAT_ROUTE, D as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, I as getDeploymentServiceVersion, M as JUNIOR_RETENTION_CRON_SCHEDULE, N as JUNIOR_RETENTION_ROUTE, O as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, j as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, k as JUNIOR_HEARTBEAT_CRON_SCHEDULE } from "./logging-B04X_eCB.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-Bywqo1WJ.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-C6ROM_XJ.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 { Dn as createUserTokenStore } from "./projection-6dXaN0n-.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Sl5RQCkS.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;
|