@sentry/junior 0.259.0 → 0.261.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-Bn0gFVSF.js → adapter-Bx_1B2De.js} +1 -1
- package/dist/{admin-C8xz2f10.js → admin-BAbbVgVc.js} +1 -1
- package/dist/{agent-hooks-B00FaKdP.js → agent-hooks-ghyZZQqB.js} +721 -704
- package/dist/{agent-runner-CPSd7rKm.js → agent-runner-g110-xgg.js} +688 -2223
- package/dist/api/schema.d.ts +210 -54
- package/dist/api/schema.js +3 -3
- package/dist/api.js +161 -73
- package/dist/{app-Bbxrehjf.d.ts → app-VCiPQ65Q.d.ts} +6 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +36 -35
- package/dist/{assistant-reply-CqthTerd.js → assistant-reply-CQcMaWNL.js} +1 -1
- package/dist/{automation-DWBFBenG.js → automation-DrpcA-SX.js} +3 -0
- package/dist/{briefs-DNYbQ9cD.js → briefs-CKcfrIQL.js} +4 -4
- package/dist/{catalog-runtime-B8SuFPGb.js → catalog-runtime-cd60vzAB.js} +1 -1
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +1 -1
- 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.js +3 -3
- package/dist/{client-BZdxgKyL.js → client-2i0JJpoC.js} +2 -2
- package/dist/{config-Deqpfpg9.js → config-C9qM41O0.js} +2 -2
- package/dist/{connections-9gJkfS85.js → connections-DrtTrwkp.js} +10 -10
- package/dist/{conversation-DjN3mlog.js → conversation-CvuKJ3tA.js} +108 -155
- package/dist/{conversation-privacy-CFhNKxp-.js → conversation-privacy-1iTiFX1O.js} +1 -1
- package/dist/{credential-sync-BABGymK3.js → credential-sync-wKNQ1dYc.js} +14 -15
- package/dist/{executor-Bb3eQb8q.js → executor-Rimyj8HZ.js} +3 -2
- package/dist/{images-BbSdVHC6.js → images-D1JggcVY.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-vdGU-5ge.js → job-queue-BjQdSqA3.js} +1 -1
- package/dist/{logging-BStXN56b.js → logging-BLTa7R7f.js} +1 -1
- package/dist/{message-DRf6m4uO.js → message-DAeP5WWW.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-JmOgLcGl.js → oauth-callback-server-BAy1hhF1.js} +2 -2
- package/dist/{profile-qBM6B_-V.js → profile-CthM2qFM.js} +24 -24
- package/dist/{prompt-xgpyMtg7.js → prompt-DeVax2qO.js} +1 -1
- package/dist/{registry-B_M_x_iS.js → registry-BnSaArNb.js} +1 -1
- package/dist/{resolve-BzpuLh8c.js → resolve-B5eLRl0v.js} +9 -5
- package/dist/{result-DEZH_AnZ.js → result-Cvm0GZCv.js} +9 -14
- package/dist/{runner-BqQlG10t.js → runner-D-pUzHbU.js} +11 -11
- package/dist/{sandbox-egress-signals-DCq3WLs5.js → sandbox-egress-signals-mvwGV7rl.js} +1 -1
- package/dist/{schema-CF9HqNRY.js → schema-OzL8Zw4H.js} +68 -3
- package/dist/{service-account-BzhW7kXu.js → service-account-Ch1uIpnR.js} +3 -3
- package/dist/{service-account-BqTBkyD7.js → service-account-DWxvpSfd.js} +3 -3
- package/dist/{session-stop-CV65ZlU3.js → session-stop-Boj_zpTa.js} +180 -22
- package/dist/{skills-CiWS5_Ub.js → skills-BpdYCfFt.js} +2 -2
- package/dist/{spawn-BSAQ7UQZ.js → spawn-h1DJMQTf.js} +2 -2
- package/dist/{store-B1GES4gC.js → store-B6KqcdCQ.js} +6 -6
- package/dist/{task-queue-BAeGEMjJ.js → task-queue-BaDwKSYv.js} +3 -3
- package/dist/{task-runner-BlGhcQPi.js → task-runner-BAX5li9a.js} +10 -10
- package/dist/{tasks-DieKX3d4.js → tasks-uCfmlWga.js} +4170 -1606
- package/dist/thread-state-BJHVIz8G.js +184 -0
- package/dist/{turn-failure-response-DQljogGJ.js → turn-failure-response-CCC76P6-.js} +8 -9
- package/dist/{turn-lifecycle-BLgrkV_L.js → turn-lifecycle-pHSESVR9.js} +1 -1
- package/dist/{turn-session-routing-BlajheOU.js → turn-session-routing-BIKJZaiw.js} +1 -1
- package/dist/{validation-23d7K9tX.js → validation-B9KL_5Wc.js} +1 -1
- package/dist/{version-B_XumRx-.js → version-CN9BXMW_.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-B2_ABsYi.js → viewer-C5xFaYVi.js} +19 -10
- package/dist/{web-input-BZDyxpzR.js → web-input-D6eqfXYd.js} +38 -34
- package/dist/{work-D3QKiV0O.js → work-C-ecZAme.js} +9 -10
- package/dist/{worker-C8mUjYf9.js → worker-BpYDqiOf.js} +5 -5
- package/migrations/0061_workspace_vcpus.sql +1 -0
- package/migrations/meta/0061_snapshot.json +3471 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +10 -10
- package/dist/experimental-BNK1l1jv.js +0 -49
- package/dist/oauth-authorization-djQn5Nhy.js +0 -97
- package/dist/pending-auth-rG5U_QS1.js +0 -442
- package/dist/thread-state-DpSWS4Rr.js +0 -426
package/dist/app.js
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as withContext, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, R as normalizeIdentityEmail, T as withSpan, b as setSpanStatus, f as logException, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, m as logWarn, p as logInfo, r as createRequestContext, v as setSentryUser, w as withLogContext, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { $ as projectConversationMessages, C as automationVersionOf, Cn as resolveSandboxEgressProviderForHost, Dn as clearSandboxEgressSignals, En as SANDBOX_EGRESS_PROXY_PATH, Hn as slackMention, In as resolveBaseUrl, Ln as startOAuthFlow, On as consumeSandboxEgressAuthRequiredSignal, Pn as formatProviderLabel, Tn as shouldPropagateSandboxEgressTrace, X as appendConversationMessages, Xn as slackEntitySchema, Zn as slackExternalRefIdSchema, _n as isExperimentalFeatureEnabled, ar as setConfigDefaults, b as admitEventAutomationRun, bn as createUserTokenStore, c as withScheduledAutomationLock, cn as SubscribedReplyReason, dn as getThreadStopDecision, gn as getExperimentalFeatures, i as readScheduledAutomation, ir as getConfigDefaults, jn as parseSandboxEgressCredentialToken, kn as consumeSandboxEgressPermissionDeniedSignal, l as blockEventAutomation, n as listScheduledAutomationsForTeam, nt as settleConversationTitleWork, o as saveScheduledAutomationInLock, p as findMatchingEventAutomations, s as scheduledRunId, u as collectEventAutomationMatchKeys, vn as setExperimentalFeatures, wn as normalizeSandboxEgressTracePropagationDomains, x as eventAutomationRunLimitReason, yn as executeCredentialedEgressRequest } from "./tasks-uCfmlWga.js";
|
|
2
|
+
import { C as withContext, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, R as normalizeIdentityEmail, T as withSpan, b as setSpanStatus, f as logException, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, m as logWarn, p as logInfo, r as createRequestContext, v as setSentryUser, w as withLogContext, y as setSpanAttributes } from "./logging-BLTa7R7f.js";
|
|
3
3
|
import { n as captureMessage, r as continueTrace } from "./sentry-BBUlHih9.js";
|
|
4
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
5
|
-
import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-
|
|
4
|
+
import { t as JUNIOR_VERSION } from "./version-CN9BXMW_.js";
|
|
5
|
+
import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-C9qM41O0.js";
|
|
6
6
|
import { _ as slackMessageTsSchema, d as parseSlackTeamId, f as parseSlackUserId, h as slackUserIdSchema, m as slackTeamIdSchema, o as parseActorUserId, p as slackChannelIdSchema } from "./actor-tlxzqaRe.js";
|
|
7
|
-
import { N as recordGoogleSignIn, _ as withConversationMutationLock, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-
|
|
7
|
+
import { N as recordGoogleSignIn, _ as withConversationMutationLock, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-C5xFaYVi.js";
|
|
8
8
|
import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
|
|
9
|
-
import { a as juniorAutomationRuns, f as juniorConversationBriefs, h as juniorConversationEvents, s as juniorAutomations } from "./executor-
|
|
10
|
-
import { m as credentialLogContext } from "./registry-
|
|
11
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
12
|
-
import {
|
|
13
|
-
import { $ as bindSlackDirectCredentialSubject,
|
|
14
|
-
import { W as annotationCard } from "./conversation-DjN3mlog.js";
|
|
15
|
-
import { l as getThreadStopDecision, o as SubscribedReplyReason } from "./pending-auth-rG5U_QS1.js";
|
|
16
|
-
import { b as eventGuidance, f as slackChannelMessageEvent, k as renderTaskInput, l as getEventCatalog, m as slackChannelMessageRunsAutomation, p as slackChannelMessageReplyThreadTs, u as SLACK_EVENT_NAMESPACE } from "./session-stop-CV65ZlU3.js";
|
|
17
|
-
import { r as getStateAdapter, s as withLock$1 } from "./adapter-Bn0gFVSF.js";
|
|
9
|
+
import { a as juniorAutomationRuns, f as juniorConversationBriefs, h as juniorConversationEvents, s as juniorAutomations } from "./executor-Rimyj8HZ.js";
|
|
10
|
+
import { m as credentialLogContext } from "./registry-BnSaArNb.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-cd60vzAB.js";
|
|
12
|
+
import { B as stopConversationSession, C as requestAttachmentDeletion, L as effectiveTaskOutcomes, M as logScheduledAutomationRunSkipped, N as scheduledAutomationRunAttributes, T as parseSlackThreadId, V as recordSubagentEnded, _ as unpublishedArtifactHeaders, g as readPublicArtifact, h as publicArtifactHeaders, n as executeAgentRun, ot as listPendingAgentInvocationMailboxAppends, st as listPendingAgentInvocationResults, t as createAgentRunner, v as lookupSlackUserProfile, vt as processWorkspaceSnapshotJob, x as collectAttachmentGarbage, yt as ingestEvent } from "./agent-runner-g110-xgg.js";
|
|
13
|
+
import { $ as bindSlackDirectCredentialSubject, Gt as listConversationAnnotations, Ht as resolveRootVisibility, Q as bindScheduledAutomationCredentialSubject, Tt as readConversationAccessFromSql, U as collectEventMatchKeys, X as takeDueTimerWatches, Z as bindEventAutomationCredentialSubject, _t as getDashboardConversationLink, a as getPluginRoutes, bt as setDashboardConversationLinkOptions, ct as getSlackClient, d as setPlugins, et as verifyEventAutomationCredentialSubject, f as validatePlugins, h as setBriefsConfig, ht as runWithWorkspaceTeamId, i as getPluginApiRoutes, mt as getWorkspaceTeamId, nt as verifySlackDirectCredentialSubject, q as findMatchingWatches, tt as verifyScheduledAutomationCredentialSubject, u as getPlugins, ut as isDmChannel, wt as createPluginLogger, xt as createPluginState, yt as getDashboardTaskLink } from "./agent-hooks-ghyZZQqB.js";
|
|
18
14
|
import { n as getNextRunAtMs } from "./cadence-R7Em4RjE.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { i as
|
|
24
|
-
import {
|
|
15
|
+
import { M as annotationCard } from "./conversation-CvuKJ3tA.js";
|
|
16
|
+
import { r as getStateAdapter, s as withLock$1 } from "./adapter-Bx_1B2De.js";
|
|
17
|
+
import { M as renderTaskInput, S as eventGuidance, d as getEventCatalog, f as SLACK_EVENT_NAMESPACE, g as slackChannelMessageRunsAutomation, h as slackChannelMessageReplyThreadTs, m as slackChannelMessageEvent } from "./session-stop-Boj_zpTa.js";
|
|
18
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-B5eLRl0v.js";
|
|
19
|
+
import { a as getVercelConversationWorkQueue, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyWorkspaceSnapshotJobMessage, o as resolveConversationWorkQueueTopic, s as verifyConversationQueueMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-BjQdSqA3.js";
|
|
20
|
+
import { A as hasRunnableConversationWork$1, M as isInvalidConversationRecordError, O as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as removeActiveConversation, _ as hasRunnableConversationWork, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-B6KqcdCQ.js";
|
|
21
|
+
import { D as scheduledRunSchema } from "./automation-DrpcA-SX.js";
|
|
22
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-B9KL_5Wc.js";
|
|
25
23
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-DOm9Y6qI.js";
|
|
26
|
-
import { A as THREAD_OPTOUT_ACK, C as buildSlackInboundMessage, D as normalizeIncomingSlackThreadId, E as stopSlackThread, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as parseContent, N as runWithSlackInstallation, O as withNormalizedThreadId, P as verifySlackSignature, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as isSlackMessageStopped, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as startProcessingReaction, k as stopConversationTurn, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, v as readViewerAutomationSummary, w as clearSlackPendingReactions, z as GET$3 } from "./web-input-
|
|
27
|
-
import { C as existingConversationId, N as recordAutomationExecution, c as getDispatchConversationId, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-
|
|
28
|
-
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-
|
|
29
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
30
|
-
import { s as coerceThreadConversationState } from "./thread-state-
|
|
31
|
-
import { o as unlinkProvider } from "./connections-
|
|
32
|
-
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
33
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
34
|
-
import { t as processConversationWork } from "./worker-
|
|
35
|
-
import { t as bindMessageAgent } from "./message-
|
|
36
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
24
|
+
import { A as THREAD_OPTOUT_ACK, C as buildSlackInboundMessage, D as normalizeIncomingSlackThreadId, E as stopSlackThread, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as parseContent, N as runWithSlackInstallation, O as withNormalizedThreadId, P as verifySlackSignature, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as isSlackMessageStopped, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as startProcessingReaction, k as stopConversationTurn, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, v as readViewerAutomationSummary, w as clearSlackPendingReactions, z as GET$3 } from "./web-input-D6eqfXYd.js";
|
|
25
|
+
import { C as existingConversationId, N as recordAutomationExecution, c as getDispatchConversationId, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-BAX5li9a.js";
|
|
26
|
+
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-Cvm0GZCv.js";
|
|
27
|
+
import { r as enqueueAgentInvocation } from "./work-C-ecZAme.js";
|
|
28
|
+
import { s as coerceThreadConversationState } from "./thread-state-BJHVIz8G.js";
|
|
29
|
+
import { o as unlinkProvider } from "./connections-DrtTrwkp.js";
|
|
30
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-wKNQ1dYc.js";
|
|
31
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BaDwKSYv.js";
|
|
32
|
+
import { t as processConversationWork } from "./worker-BpYDqiOf.js";
|
|
33
|
+
import { t as bindMessageAgent } from "./message-DAeP5WWW.js";
|
|
34
|
+
import { t as bindSpawnAgent } from "./spawn-h1DJMQTf.js";
|
|
37
35
|
import { createRequire } from "node:module";
|
|
38
36
|
import { Hono } from "hono";
|
|
39
37
|
import { z } from "zod";
|
|
@@ -2398,12 +2396,14 @@ const NOT_ALLOWED_TTL_MS = 3e4;
|
|
|
2398
2396
|
/**
|
|
2399
2397
|
* Return whether a Slack author may start a Turn. With allowed domains, the
|
|
2400
2398
|
* email of the author's Slack profile must be on one of them. Slack verifies
|
|
2401
|
-
* that email, so Junior trusts it.
|
|
2399
|
+
* that email, so Junior trusts it. Bots have no profile email, so the allowed
|
|
2400
|
+
* bot user IDs skip this check. Without allowed domains, every author may.
|
|
2402
2401
|
*/
|
|
2403
2402
|
async function isSlackAuthorDomainAllowed(args) {
|
|
2404
2403
|
if (args.allowedDomains.length === 0) return true;
|
|
2405
2404
|
const userId = parseSlackUserId(args.user);
|
|
2406
2405
|
if (!args.teamId || !userId) return false;
|
|
2406
|
+
if (args.allowedBotUserIds.includes(userId)) return true;
|
|
2407
2407
|
const key = `slack:allowed-domain:${args.teamId}:${userId}`;
|
|
2408
2408
|
const cached = await args.state.get(key);
|
|
2409
2409
|
if (typeof cached === "boolean") return cached;
|
|
@@ -2837,6 +2837,7 @@ async function routeParsedMessage(args) {
|
|
|
2837
2837
|
return;
|
|
2838
2838
|
}
|
|
2839
2839
|
if (route === "mention" && !await isSlackAuthorDomainAllowed({
|
|
2840
|
+
allowedBotUserIds: args.allowedBotUserIds,
|
|
2840
2841
|
allowedDomains: args.allowedDomains,
|
|
2841
2842
|
state: args.state,
|
|
2842
2843
|
teamId: args.installation.teamId,
|
|
@@ -2958,6 +2959,7 @@ async function handleSlackEvent(args) {
|
|
|
2958
2959
|
conversationStore: args.services.conversationStore,
|
|
2959
2960
|
queue: args.services.queue,
|
|
2960
2961
|
receivedAtMs,
|
|
2962
|
+
allowedBotUserIds: args.services.allowedBotUserIds ?? [],
|
|
2961
2963
|
allowedDomains: args.services.allowedDomains ?? [],
|
|
2962
2964
|
state
|
|
2963
2965
|
}), {
|
|
@@ -5057,8 +5059,7 @@ function readGoogleClaims(idToken) {
|
|
|
5057
5059
|
} catch {
|
|
5058
5060
|
return;
|
|
5059
5061
|
}
|
|
5060
|
-
|
|
5061
|
-
return parsed.success ? parsed.data : void 0;
|
|
5062
|
+
return googleClaimsSchema.safeParse(payload).success ? payload : void 0;
|
|
5062
5063
|
}
|
|
5063
5064
|
function trimSlashes(value, leading) {
|
|
5064
5065
|
let start = 0;
|
|
@@ -5108,7 +5109,6 @@ function createBetterAuth(config) {
|
|
|
5108
5109
|
if (!isAllowedDomain(claims.hd, allowedDomains)) return null;
|
|
5109
5110
|
return {
|
|
5110
5111
|
user: {
|
|
5111
|
-
id: claims.sub,
|
|
5112
5112
|
email: claims.email,
|
|
5113
5113
|
emailVerified: claims.email_verified === true,
|
|
5114
5114
|
image: claims.picture,
|
|
@@ -5595,6 +5595,7 @@ async function createApp(options) {
|
|
|
5595
5595
|
queue: conversationWorkQueue,
|
|
5596
5596
|
services: runtimeServiceOverrides
|
|
5597
5597
|
}),
|
|
5598
|
+
allowedBotUserIds: options?.slack?.allowedBotUserIds ?? [],
|
|
5598
5599
|
allowedDomains
|
|
5599
5600
|
};
|
|
5600
5601
|
const app = new Hono();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
|
|
2
|
+
import { n as actorIdentitySchema } from "./conversation-CvuKJ3tA.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
4
5
|
// src/chat/task-outcomes-schema.ts
|
|
@@ -395,6 +396,8 @@ const automationSummaryBaseSchema = z.object({
|
|
|
395
396
|
destination: automationDestinationSchema,
|
|
396
397
|
id: z.string().min(1),
|
|
397
398
|
instruction: z.string().min(1),
|
|
399
|
+
/** People mentioned in the instruction, resolved at read time. */
|
|
400
|
+
mentions: z.array(actorIdentitySchema).optional(),
|
|
398
401
|
lastConversationId: z.string().min(1).optional(),
|
|
399
402
|
lastRunAt: z.string().datetime().optional(),
|
|
400
403
|
lastRunStatus: z.enum([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as completeObject } from "./client-
|
|
1
|
+
import { i as completeObject } from "./client-2i0JJpoC.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
3
|
+
import { J as parseBriefInput, W as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-CvuKJ3tA.js";
|
|
4
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-DeVax2qO.js";
|
|
5
5
|
import { CLI_USAGE } from "./cli/run.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -267,7 +267,7 @@ async function parseRunOptions(argv) {
|
|
|
267
267
|
* `DATABASE_URL` at import, and `briefs pull` must work with only a token.
|
|
268
268
|
*/
|
|
269
269
|
async function configuredDefaultModelId() {
|
|
270
|
-
const { botConfig } = await import("./config-
|
|
270
|
+
const { botConfig } = await import("./config-C9qM41O0.js").then((n) => n.r);
|
|
271
271
|
return defaultModelId(botConfig);
|
|
272
272
|
}
|
|
273
273
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-BnSaArNb.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
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-g110-xgg.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("../agent-hooks-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
102
|
+
import("../agent-hooks-ghyZZQqB.js").then((n) => n.t),
|
|
103
|
+
import("../catalog-runtime-cd60vzAB.js").then((n) => n.t),
|
|
104
|
+
import("../validation-B9KL_5Wc.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-C5xFaYVi.js").then((n) => n.s)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,21 +152,21 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setExperimentalFeatures } = await import("../
|
|
155
|
+
const { setExperimentalFeatures } = await import("../tasks-uCfmlWga.js").then((n) => n.hn);
|
|
156
156
|
setExperimentalFeatures({ subagents: true });
|
|
157
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
157
|
+
const { setBriefsConfig } = await import("../agent-hooks-ghyZZQqB.js").then((n) => n.m);
|
|
158
158
|
setBriefsConfig({ enabled: true });
|
|
159
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
160
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
159
|
+
const { runLocalAgentTurn } = await import("../runner-D-pUzHbU.js");
|
|
160
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BAy1hhF1.js");
|
|
161
161
|
const { createLocalOAuthState } = await import("../oauth-relay-CTygMkNx.js").then((n) => n.t);
|
|
162
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
163
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
164
|
-
const { bindMessageAgent } = await import("../message-
|
|
165
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
166
|
-
const { startAgentInvocationsForChildInput } = await import("../result-
|
|
167
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
162
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-mvwGV7rl.js");
|
|
163
|
+
const { bindSpawnAgent } = await import("../spawn-h1DJMQTf.js").then((n) => n.n);
|
|
164
|
+
const { bindMessageAgent } = await import("../message-DAeP5WWW.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-C-ecZAme.js").then((n) => n.a);
|
|
166
|
+
const { startAgentInvocationsForChildInput } = await import("../result-Cvm0GZCv.js").then((n) => n.r);
|
|
167
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-Boj_zpTa.js").then((n) => n.r);
|
|
168
168
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
169
|
-
const { processConversationWork } = await import("../worker-
|
|
169
|
+
const { processConversationWork } = await import("../worker-BpYDqiOf.js").then((n) => n.n);
|
|
170
170
|
let agentRunner;
|
|
171
171
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
172
172
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-BLTa7R7f.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-BnSaArNb.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-BpdYCfFt.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/init.js
CHANGED
|
@@ -136,7 +136,7 @@ async function runInit(dir, log = console.log) {
|
|
|
136
136
|
"@sentry/junior-memory": "latest",
|
|
137
137
|
"@sentry/junior-maintenance": "latest",
|
|
138
138
|
"@sentry/nitro": "10.65.0",
|
|
139
|
-
hono: "^4.
|
|
139
|
+
hono: "^4.13.11"
|
|
140
140
|
},
|
|
141
141
|
devDependencies: {
|
|
142
142
|
"@types/node": "^25.9.1",
|
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-BAbbVgVc.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-DWxvpSfd.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-CKcfrIQL.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 { d as getDb } from "../viewer-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { d as setPlugins, f as validatePlugins,
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { d as getDb } from "../viewer-C5xFaYVi.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-cd60vzAB.js";
|
|
3
|
+
import { d as setPlugins, f as validatePlugins, wt as createPluginLogger } from "../agent-hooks-ghyZZQqB.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-B9KL_5Wc.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 { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-cd60vzAB.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "../adapter-Bx_1B2De.js";
|
|
3
|
+
import { t as create } from "../profile-CthM2qFM.js";
|
|
4
|
+
import { r as resolve } from "../resolve-B5eLRl0v.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.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-C9qM41O0.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-Rimyj8HZ.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BnSaArNb.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 { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-BLTa7R7f.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-1iTiFX1O.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, s as resolveGatewayModel } from "./client-
|
|
3
|
-
import { m as logWarn } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-2i0JJpoC.js";
|
|
3
|
+
import { m as logWarn } from "./logging-BLTa7R7f.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-Bg8EoCKD.js";
|
|
5
5
|
// src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { A as deleteProviderIdentityForUser, c as getConversationEventStore, f as getSqlExecutor, k as deleteProviderIdentityForSlackUser } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import {
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
9
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
10
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { Ln as startOAuthFlow, Nt as failTurnRecord, Pt as getTurnRecord, kt as loadTurnCheckpoint } from "./tasks-uCfmlWga.js";
|
|
2
|
+
import { n as botConfig } from "./config-C9qM41O0.js";
|
|
3
|
+
import { A as deleteProviderIdentityForUser, c as getConversationEventStore, f as getSqlExecutor, k as deleteProviderIdentityForSlackUser } from "./viewer-C5xFaYVi.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-BnSaArNb.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-cd60vzAB.js";
|
|
6
|
+
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-g110-xgg.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-Bx_1B2De.js";
|
|
8
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-BjQdSqA3.js";
|
|
9
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-B6KqcdCQ.js";
|
|
10
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-BIKJZaiw.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
13
13
|
// src/chat/task-execution/authorized-turn.ts
|