@sentry/junior 0.249.0 → 0.250.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/{admin-DZeUvFHI.js → admin-DMKyXi83.js} +1 -1
- package/dist/{agent-hooks-B4bQ4kBT.js → agent-hooks-CtZuJPTU.js} +23 -8
- package/dist/{agent-runner-B8u9yBSO.js → agent-runner-CNiTpIpb.js} +101 -20
- package/dist/api/schema.d.ts +33 -0
- package/dist/api/schema.js +2 -2
- package/dist/api.js +54 -22
- package/dist/app.js +35 -43
- package/dist/{assistant-reply-Bhi3sqgj.js → assistant-reply-K5r1pcgJ.js} +1 -1
- package/dist/{briefs-pUYuPjCW.js → briefs-8xyS3oeV.js} +2 -2
- package/dist/{catalog-runtime-oITS5Rjx.js → catalog-runtime-BQ3g3OX_.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-CvAOTqQF.js → client-Q27hki0Y.js} +2 -2
- package/dist/{config-DytdkbYS.js → config-Cb--Qs-g.js} +2 -2
- package/dist/{web-authorization-DLz3WwL6.js → connections-DZ70JeSN.js} +85 -8
- package/dist/{conversation-privacy-B1yNx-7X.js → conversation-privacy-BIDN1sW3.js} +1 -1
- package/dist/{credential-sync-BejMAPTR.js → credential-sync-CyAN-Gos.js} +18 -23
- package/dist/{executor-BYtCR1fJ.js → executor-D8y7v95s.js} +2 -2
- package/dist/{images-CbP-PoMG.js → images-BkGhqKIK.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-B-8tT6DC.js → job-queue-uGq6Grnt.js} +1 -1
- package/dist/{logging-DkfhlwYe.js → logging-C22RdmU8.js} +1 -1
- package/dist/{message-D1tGYTCC.js → message-D0RPetp-.js} +3 -3
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-Ck1Vs9l_.js → oauth-callback-server-DF_Odkvh.js} +2 -2
- package/dist/{pending-auth-CBZduFHf.js → pending-auth-Bg3A1-pE.js} +2 -2
- package/dist/{profile-Ch9aZ6bb.js → profile-DK9umvav.js} +4 -4
- package/dist/{registry-BPeYibTN.js → registry-BvsLuoLK.js} +1 -1
- package/dist/{resolve-QOZbqF7t.js → resolve-C9btOXju.js} +2 -2
- package/dist/{result-Dp8BPIuR.js → result-CcdQ2iau.js} +6 -6
- package/dist/{runner-dfLJ6ZCW.js → runner-Bem4DUHN.js} +9 -9
- package/dist/{sandbox-egress-signals-Y5eS_FDi.js → sandbox-egress-signals-Bl-4cF7E.js} +1 -1
- package/dist/{schema-Bz-kE1z4.js → schema-DELmAdjR.js} +17 -1
- package/dist/{session-stop-Akrz6ImY.js → session-stop-DteRDRCi.js} +16 -13
- package/dist/{skills-D4Tpsuvg.js → skills-CVwSL6Gc.js} +2 -2
- package/dist/{spawn-DYgYT32M.js → spawn-CA0YYtzr.js} +2 -2
- package/dist/{store-DqnCyIPs.js → store-Dw3eBN9S.js} +6 -6
- package/dist/{task-queue-BNllROcl.js → task-queue-C7cyjcVj.js} +3 -3
- package/dist/{task-runner-exdzicSg.js → task-runner-BbSyWmOq.js} +10 -10
- package/dist/{tasks-Cf4ib3bG.js → tasks-B8nH3ND_.js} +8 -8
- package/dist/{thread-state-CPvS5vpy.js → thread-state-BTOLzCM-.js} +6 -6
- package/dist/{turn-failure-response-CdixRkEW.js → turn-failure-response-BwNfO8Xt.js} +7 -7
- package/dist/{turn-lifecycle-DahlJysg.js → turn-lifecycle-DSN0xGW7.js} +1 -1
- package/dist/{turn-session-routing-B3pBx_Ep.js → turn-session-routing-BRKYIn6n.js} +1 -1
- package/dist/{validation-LNypV_fu.js → validation-CBkyzKCP.js} +1 -1
- package/dist/{version-DEl6GNnH.js → version-CkwwLVLb.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BQqX8fDS.js → viewer-DdzigZQh.js} +3 -3
- package/dist/{web-input-DisCMhtH.js → web-input-BjdnnpuN.js} +26 -26
- package/dist/{work-6KB-2tbx.js → work-qQEjtmlv.js} +9 -9
- package/dist/{worker-6RfyAjWY.js → worker-C-CSZMy_.js} +5 -5
- package/package.json +4 -4
package/dist/app.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { B as effectiveTaskOutcomes, Ct as normalizeSandboxEgressTracePropagationDomains, Dt as consumeSandboxEgressAuthRequiredSignal, E as requestAttachmentDeletion, Et as clearSandboxEgressSignals, F as logScheduledAutomationRunSkipped, Ft as createUserTokenStore, Gt as setConfigDefaults, I as scheduledAutomationRunAttributes, O as parseSlackThreadId, Ot as consumeSandboxEgressPermissionDeniedSignal, Pt as startOAuthFlow, St as resolveSandboxEgressProviderForHost, Tt as SANDBOX_EGRESS_PROXY_PATH, U as stopConversationSession, W as recordSubagentEnded, Wt as getConfigDefaults, b as unpublishedArtifactHeaders, bt as processWorkspaceSnapshotJob,
|
|
2
|
-
import { C as withLogContext, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, S as withContext, d as logException, f as logInfo, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, p as logWarn, r as createRequestContext, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-
|
|
1
|
+
import { B as effectiveTaskOutcomes, Ct as normalizeSandboxEgressTracePropagationDomains, Dt as consumeSandboxEgressAuthRequiredSignal, E as requestAttachmentDeletion, Et as clearSandboxEgressSignals, F as logScheduledAutomationRunSkipped, Ft as createUserTokenStore, Gt as setConfigDefaults, I as scheduledAutomationRunAttributes, O as parseSlackThreadId, Ot as consumeSandboxEgressPermissionDeniedSignal, Pt as startOAuthFlow, St as resolveSandboxEgressProviderForHost, Tt as SANDBOX_EGRESS_PROXY_PATH, U as stopConversationSession, W as recordSubagentEnded, Wt as getConfigDefaults, b as unpublishedArtifactHeaders, bt as processWorkspaceSnapshotJob, i as executeCredentialedEgressRequest, jt as formatProviderLabel, kt as parseSandboxEgressCredentialToken, lt as listPendingAgentInvocationMailboxAppends, n as executeAgentRun, t as createAgentRunner, ut as listPendingAgentInvocationResults, v as publicArtifactHeaders, w as collectAttachmentGarbage, wt as shouldPropagateSandboxEgressTrace, x as lookupSlackUserProfile, xt as ingestEvent, y as readPublicArtifact } from "./agent-runner-CNiTpIpb.js";
|
|
2
|
+
import { C as withLogContext, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, S as withContext, d as logException, f as logInfo, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, p as logWarn, r as createRequestContext, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-C22RdmU8.js";
|
|
3
3
|
import { n as captureMessage, r as continueTrace } from "./sentry-CgWZM_kV.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-CkwwLVLb.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-Cb--Qs-g.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-BTtLaeWy.js";
|
|
7
|
-
import {
|
|
7
|
+
import { c as getConversationEventStore, d as getDb, f as getSqlExecutor, g as withConversationMutationLock, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-DdzigZQh.js";
|
|
8
8
|
import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
9
|
-
import { _ as juniorConversationEvents, a as juniorSchedulerRuns, m as juniorConversationBriefs, o as juniorSchedulerTasks } from "./executor-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
import { C as eventAutomationRunLimitReason, F as slackMention, G as slackExternalRefIdSchema, S as admitEventAutomationRun, W as slackEntitySchema, Wt as appendConversationMessages, Xt as settleConversationTitleWork, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, qt as projectConversationMessages, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock, u as blockEventAutomation } from "./tasks-
|
|
12
|
-
import { $ as verifyEventAutomationCredentialSubject, Jt as runWithWorkspaceTeamId, Mt as listConversationAnnotations, Q as bindSlackDirectCredentialSubject, U as collectEventMatchKeys, Ut as isDmChannel, Vt as getSlackClient, X as bindEventAutomationCredentialSubject, Y as takeDueTimerWatches, Z as bindScheduledAutomationCredentialSubject, a as getPluginRoutes, ct as createPluginState, d as setPlugins, dt as createPluginLogger, et as verifyScheduledAutomationCredentialSubject, f as validatePlugins, ft as readConversationAccessFromSql, h as setBriefsConfig, i as getPluginApiRoutes, it as getDashboardConversationLink, kt as resolveRootVisibility, ot as getDashboardTaskLink, q as findMatchingWatches, qt as getWorkspaceTeamId, st as setDashboardConversationLinkOptions, tt as verifySlackDirectCredentialSubject, u as getPlugins } from "./agent-hooks-
|
|
9
|
+
import { _ as juniorConversationEvents, a as juniorSchedulerRuns, m as juniorConversationBriefs, o as juniorSchedulerTasks } from "./executor-D8y7v95s.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
|
|
11
|
+
import { C as eventAutomationRunLimitReason, F as slackMention, G as slackExternalRefIdSchema, S as admitEventAutomationRun, W as slackEntitySchema, Wt as appendConversationMessages, Xt as settleConversationTitleWork, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, qt as projectConversationMessages, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock, u as blockEventAutomation } from "./tasks-B8nH3ND_.js";
|
|
12
|
+
import { $ as verifyEventAutomationCredentialSubject, Jt as runWithWorkspaceTeamId, Mt as listConversationAnnotations, Q as bindSlackDirectCredentialSubject, U as collectEventMatchKeys, Ut as isDmChannel, Vt as getSlackClient, X as bindEventAutomationCredentialSubject, Y as takeDueTimerWatches, Z as bindScheduledAutomationCredentialSubject, a as getPluginRoutes, ct as createPluginState, d as setPlugins, dt as createPluginLogger, et as verifyScheduledAutomationCredentialSubject, f as validatePlugins, ft as readConversationAccessFromSql, h as setBriefsConfig, i as getPluginApiRoutes, it as getDashboardConversationLink, kt as resolveRootVisibility, ot as getDashboardTaskLink, q as findMatchingWatches, qt as getWorkspaceTeamId, st as setDashboardConversationLinkOptions, tt as verifySlackDirectCredentialSubject, u as getPlugins } from "./agent-hooks-CtZuJPTU.js";
|
|
13
13
|
import { W as annotationCard } from "./conversation-NutPJ8S8.js";
|
|
14
|
-
import { O as withLock$1, w as getStateAdapter } from "./profile-
|
|
15
|
-
import { c as getThreadStopDecision } from "./pending-auth-
|
|
16
|
-
import { O as renderTaskInput, f as slackChannelMessageEvent, l as getEventCatalog, p as slackChannelMessageReplyThreadTs, u as SLACK_EVENT_NAMESPACE, y as eventGuidance } from "./session-stop-
|
|
14
|
+
import { O as withLock$1, w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
15
|
+
import { c as getThreadStopDecision } from "./pending-auth-Bg3A1-pE.js";
|
|
16
|
+
import { O as renderTaskInput, f as slackChannelMessageEvent, l as getEventCatalog, p as slackChannelMessageReplyThreadTs, u as SLACK_EVENT_NAMESPACE, y as eventGuidance } from "./session-stop-DteRDRCi.js";
|
|
17
17
|
import { n as getNextRunAtMs } from "./cadence-D00SCzT1.js";
|
|
18
|
-
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-
|
|
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-
|
|
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-
|
|
18
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-C9btOXju.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-uGq6Grnt.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-Dw3eBN9S.js";
|
|
21
21
|
import { D as scheduledRunSchema } from "./automation-gznOMaQ2.js";
|
|
22
22
|
import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
|
|
23
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
23
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-CBkyzKCP.js";
|
|
24
24
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
|
|
25
|
-
import { A as withNormalizedThreadId, C as buildSlackInboundMessage, D as isSlackMessageStopped, E as verifySlackSignature, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as THREAD_OPTOUT_ACK, N as startProcessingReaction, O as stopSlackThread, P as parseContent, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as runWithSlackInstallation, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as stopConversationTurn, k as normalizeIncomingSlackThreadId, 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-
|
|
26
|
-
import { _ as markDispatchFailed, a as confirmDispatchMailboxAppend, d as getPluginDispatchProjection, f as isTerminalDispatchStatus, k as recordAutomationExecution, l as getDispatchRecord, o as createOrGetDispatch, p as listPendingDispatchMailboxAppends, s as getDispatchConversationId, t as processPluginTask, y as notifyAutomationBlocked } from "./task-runner-
|
|
27
|
-
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-
|
|
28
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
29
|
-
import { s as coerceThreadConversationState } from "./thread-state-
|
|
30
|
-
import {
|
|
31
|
-
import { a as
|
|
32
|
-
import {
|
|
33
|
-
import { t as
|
|
34
|
-
import { t as
|
|
25
|
+
import { A as withNormalizedThreadId, C as buildSlackInboundMessage, D as isSlackMessageStopped, E as verifySlackSignature, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as THREAD_OPTOUT_ACK, N as startProcessingReaction, O as stopSlackThread, P as parseContent, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as runWithSlackInstallation, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as stopConversationTurn, k as normalizeIncomingSlackThreadId, 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-BjdnnpuN.js";
|
|
26
|
+
import { _ as markDispatchFailed, a as confirmDispatchMailboxAppend, d as getPluginDispatchProjection, f as isTerminalDispatchStatus, k as recordAutomationExecution, l as getDispatchRecord, o as createOrGetDispatch, p as listPendingDispatchMailboxAppends, s as getDispatchConversationId, t as processPluginTask, y as notifyAutomationBlocked } from "./task-runner-BbSyWmOq.js";
|
|
27
|
+
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-CcdQ2iau.js";
|
|
28
|
+
import { r as enqueueAgentInvocation } from "./work-qQEjtmlv.js";
|
|
29
|
+
import { s as coerceThreadConversationState } from "./thread-state-BTOLzCM-.js";
|
|
30
|
+
import { o as unlinkProvider } from "./connections-DZ70JeSN.js";
|
|
31
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-CyAN-Gos.js";
|
|
32
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-C7cyjcVj.js";
|
|
33
|
+
import { t as processConversationWork } from "./worker-C-CSZMy_.js";
|
|
34
|
+
import { t as bindMessageAgent } from "./message-D0RPetp-.js";
|
|
35
|
+
import { t as bindSpawnAgent } from "./spawn-CA0YYtzr.js";
|
|
35
36
|
import { createRequire } from "node:module";
|
|
36
37
|
import { Hono } from "hono";
|
|
37
38
|
import { z } from "zod";
|
|
@@ -2190,19 +2191,6 @@ function slackMessageAttributes(body) {
|
|
|
2190
2191
|
};
|
|
2191
2192
|
}
|
|
2192
2193
|
//#endregion
|
|
2193
|
-
//#region src/chat/credentials/unlink-provider.ts
|
|
2194
|
-
/** Remove one provider connection and its exact stored account identity. */
|
|
2195
|
-
async function unlinkProvider(userId, provider, userTokenStore, slackTeamId) {
|
|
2196
|
-
const tokens = await userTokenStore.get(userId, provider);
|
|
2197
|
-
if (tokens?.account && slackTeamId) await deleteProviderIdentityForSlackUser(getSqlExecutor(), slackTeamId, userId, provider, tokens.account.id);
|
|
2198
|
-
await Promise.all([
|
|
2199
|
-
userTokenStore.delete(userId, provider),
|
|
2200
|
-
deleteMcpStoredOAuthCredentials(userId, provider),
|
|
2201
|
-
deleteMcpServerSessionId(userId, provider),
|
|
2202
|
-
deleteMcpAuthSessionsForUserProvider(userId, provider)
|
|
2203
|
-
]);
|
|
2204
|
-
}
|
|
2205
|
-
//#endregion
|
|
2206
2194
|
//#region src/chat/ingress/slash-command.ts
|
|
2207
2195
|
async function postEphemeral(event, text) {
|
|
2208
2196
|
await event.channel.postEphemeral(event.userId, text, { fallbackToDM: false });
|
|
@@ -3124,11 +3112,12 @@ async function publicArtifactGET(args) {
|
|
|
3124
3112
|
//#endregion
|
|
3125
3113
|
//#region src/chat/events/workspace.ts
|
|
3126
3114
|
/**
|
|
3127
|
-
* Resolve the single-bot Slack team id for event-automation indexing
|
|
3115
|
+
* Resolve the single-bot Slack team id for event-automation indexing and
|
|
3116
|
+
* Event people mentions.
|
|
3128
3117
|
*
|
|
3129
|
-
*
|
|
3130
|
-
* until that store is conversation-owned. Event delivery
|
|
3131
|
-
* not gated on Slack.
|
|
3118
|
+
* Watch matching does not use this. Event automations still key by
|
|
3119
|
+
* destination team until that store is conversation-owned. Event delivery
|
|
3120
|
+
* itself is not gated on Slack.
|
|
3132
3121
|
*/
|
|
3133
3122
|
function createEventTeamIdResolver() {
|
|
3134
3123
|
let pending;
|
|
@@ -3185,6 +3174,7 @@ function createEventAppPublisher(args) {
|
|
|
3185
3174
|
const eventAutomationTeamId = await resolveEventAutomationTeamId();
|
|
3186
3175
|
await Promise.all([ingestEvent(event, {
|
|
3187
3176
|
queue,
|
|
3177
|
+
slackTeamId: eventAutomationTeamId,
|
|
3188
3178
|
state: work.state
|
|
3189
3179
|
}), eventAutomationTeamId ? ingestEventAutomations(event, {
|
|
3190
3180
|
queue,
|
|
@@ -5050,6 +5040,8 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
5050
5040
|
"/api/skills",
|
|
5051
5041
|
"/api/code",
|
|
5052
5042
|
"/api/code/*",
|
|
5043
|
+
"/api/connections",
|
|
5044
|
+
"/api/connections/*",
|
|
5053
5045
|
"/api/stats",
|
|
5054
5046
|
"/api/conversations",
|
|
5055
5047
|
"/api/conversations/*",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as completeObject } from "./client-
|
|
1
|
+
import { r as completeObject } from "./client-Q27hki0Y.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
3
3
|
import { U as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-NutPJ8S8.js";
|
|
4
4
|
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-kYP1FAX_.js";
|
|
@@ -269,7 +269,7 @@ async function parseRunOptions(argv) {
|
|
|
269
269
|
* `DATABASE_URL` at import, and `briefs pull` must work with only a token.
|
|
270
270
|
*/
|
|
271
271
|
async function configuredDefaultModelId() {
|
|
272
|
-
const { botConfig } = await import("./config-
|
|
272
|
+
const { botConfig } = await import("./config-Cb--Qs-g.js").then((n) => n.r);
|
|
273
273
|
return defaultModelId(botConfig);
|
|
274
274
|
}
|
|
275
275
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-BvsLuoLK.js";
|
|
3
3
|
//#region 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-CNiTpIpb.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -100,10 +100,10 @@ async function loadLocalPluginSet() {
|
|
|
100
100
|
async function configureLocalChatPlugins(pluginSet) {
|
|
101
101
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
102
102
|
import("../plugins-egKWjgue.js").then((n) => n.o),
|
|
103
|
-
import("../agent-hooks-
|
|
104
|
-
import("../catalog-runtime-
|
|
105
|
-
import("../validation-
|
|
106
|
-
import("../viewer-
|
|
103
|
+
import("../agent-hooks-CtZuJPTU.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-BQ3g3OX_.js").then((n) => n.t),
|
|
105
|
+
import("../validation-CBkyzKCP.js").then((n) => n.r),
|
|
106
|
+
import("../viewer-DdzigZQh.js").then((n) => n.s)
|
|
107
107
|
]);
|
|
108
108
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
109
109
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -155,19 +155,19 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
155
155
|
await configureLocalChatPlugins(pluginSet);
|
|
156
156
|
const { setExperimentalFeatures } = await import("../experimental-Qn9rKLgx.js").then((n) => n.t);
|
|
157
157
|
setExperimentalFeatures({ subagents: true });
|
|
158
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
158
|
+
const { setBriefsConfig } = await import("../agent-hooks-CtZuJPTU.js").then((n) => n.m);
|
|
159
159
|
setBriefsConfig({ enabled: true });
|
|
160
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
161
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
160
|
+
const { runLocalAgentTurn } = await import("../runner-Bem4DUHN.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DF_Odkvh.js");
|
|
162
162
|
const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
|
|
163
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
164
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
165
|
-
const { bindMessageAgent } = await import("../message-
|
|
166
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
167
|
-
const { startAgentInvocationsForChildInput } = await import("../result-
|
|
168
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
163
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-Bl-4cF7E.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-CA0YYtzr.js").then((n) => n.n);
|
|
165
|
+
const { bindMessageAgent } = await import("../message-D0RPetp-.js").then((n) => n.n);
|
|
166
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-qQEjtmlv.js").then((n) => n.a);
|
|
167
|
+
const { startAgentInvocationsForChildInput } = await import("../result-CcdQ2iau.js").then((n) => n.r);
|
|
168
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-DteRDRCi.js").then((n) => n.r);
|
|
169
169
|
const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
|
|
170
|
-
const { processConversationWork } = await import("../worker-
|
|
170
|
+
const { processConversationWork } = await import("../worker-C-CSZMy_.js").then((n) => n.n);
|
|
171
171
|
let agentRunner;
|
|
172
172
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
173
173
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-C22RdmU8.js";
|
|
2
|
+
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-BvsLuoLK.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-CVwSL6Gc.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,10 +25,10 @@ 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-DMKyXi83.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runBriefs(argv) {
|
|
31
|
-
return await (await import("../briefs-
|
|
31
|
+
return await (await import("../briefs-8xyS3oeV.js")).runBriefs(argv);
|
|
32
32
|
}
|
|
33
33
|
function topLevelCommand(argv) {
|
|
34
34
|
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, dt as createPluginLogger, f as validatePlugins } from "../agent-hooks-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { d as getDb } from "../viewer-DdzigZQh.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BQ3g3OX_.js";
|
|
3
|
+
import { d as setPlugins, dt as createPluginLogger, f as validatePlugins } from "../agent-hooks-CtZuJPTU.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-CBkyzKCP.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { S as disconnectStateAdapter, t as create } from "../profile-
|
|
3
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BQ3g3OX_.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-DK9umvav.js";
|
|
3
|
+
import { r as resolve } from "../resolve-C9btOXju.js";
|
|
4
4
|
//#region src/cli/snapshot-create.ts
|
|
5
5
|
const DEFAULT_RUNTIME = "node22";
|
|
6
6
|
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-Cb--Qs-g.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-D8y7v95s.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BvsLuoLK.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-C22RdmU8.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BIDN1sW3.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-B4FMCO8f.js";
|
|
2
|
-
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-
|
|
3
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-Q27hki0Y.js";
|
|
3
|
+
import { p as logWarn } from "./logging-C22RdmU8.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
|
|
5
5
|
//#region src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Pt as startOAuthFlow, c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-CNiTpIpb.js";
|
|
2
|
+
import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, f as getSqlExecutor } from "./viewer-DdzigZQh.js";
|
|
3
|
+
import { u as hasRequiredOAuthScope } from "./registry-BvsLuoLK.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
|
|
5
|
+
import { Q as getTurnRecord, Z as failTurnRecord, q as loadTurnCheckpoint } from "./tasks-B8nH3ND_.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
7
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-uGq6Grnt.js";
|
|
8
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-Dw3eBN9S.js";
|
|
9
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-BRKYIn6n.js";
|
|
7
10
|
import { z } from "zod";
|
|
8
|
-
import { randomUUID } from "node:crypto";
|
|
11
|
+
import { randomBytes, randomUUID } from "node:crypto";
|
|
9
12
|
//#region src/chat/task-execution/authorized-turn.ts
|
|
10
13
|
/**
|
|
11
14
|
* OAuth callbacks save readiness, not agent history. The conversation worker
|
|
@@ -159,4 +162,78 @@ async function deleteWebAuthorization(args) {
|
|
|
159
162
|
await getStateAdapter().delete(authorizationKey(args.conversationId, args.actorId));
|
|
160
163
|
}
|
|
161
164
|
//#endregion
|
|
162
|
-
|
|
165
|
+
//#region src/chat/credentials/unlink-provider.ts
|
|
166
|
+
/** Remove one provider connection and its exact stored account identity. */
|
|
167
|
+
async function unlinkProvider(userId, provider, userTokenStore, slackTeamId) {
|
|
168
|
+
const tokens = await userTokenStore.get(userId, provider);
|
|
169
|
+
if (tokens?.account && slackTeamId) await deleteProviderIdentityForSlackUser(getSqlExecutor(), slackTeamId, userId, provider, tokens.account.id);
|
|
170
|
+
await Promise.all([
|
|
171
|
+
userTokenStore.delete(userId, provider),
|
|
172
|
+
deleteMcpStoredOAuthCredentials(userId, provider),
|
|
173
|
+
deleteMcpServerSessionId(userId, provider),
|
|
174
|
+
deleteMcpAuthSessionsForUserProvider(userId, provider)
|
|
175
|
+
]);
|
|
176
|
+
}
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/chat/credentials/connections.ts
|
|
179
|
+
/** Return stored OAuth tokens only when they still carry the manifest scope. */
|
|
180
|
+
async function readConnectedOAuthTokens(userId, plugin, userTokenStore) {
|
|
181
|
+
if (!plugin.manifest.oauth && !plugin.manifest.credentials) return;
|
|
182
|
+
const stored = await userTokenStore.get(userId, plugin.manifest.name);
|
|
183
|
+
return stored && hasRequiredOAuthScope(stored.scope, plugin.manifest.oauth?.scope) ? stored : void 0;
|
|
184
|
+
}
|
|
185
|
+
function connectablePlugin(provider) {
|
|
186
|
+
const plugin = pluginCatalogRuntime.getDefinition(provider);
|
|
187
|
+
return plugin?.manifest.oauth ? plugin : void 0;
|
|
188
|
+
}
|
|
189
|
+
/** List OAuth plugins and the user's connection state for each one. */
|
|
190
|
+
async function listConnections(userId, userTokenStore) {
|
|
191
|
+
const plugins = pluginCatalogRuntime.getProviders().filter((plugin) => Boolean(plugin.manifest.oauth));
|
|
192
|
+
return await Promise.all(plugins.map(async (plugin) => {
|
|
193
|
+
const tokens = await readConnectedOAuthTokens(userId, plugin, userTokenStore);
|
|
194
|
+
const account = tokens?.account;
|
|
195
|
+
return {
|
|
196
|
+
provider: plugin.manifest.name,
|
|
197
|
+
displayName: plugin.manifest.displayName,
|
|
198
|
+
description: plugin.manifest.description,
|
|
199
|
+
connected: Boolean(tokens),
|
|
200
|
+
...account ? { account: {
|
|
201
|
+
label: account.label ?? account.id,
|
|
202
|
+
...account.url ? { url: account.url } : void 0
|
|
203
|
+
} } : void 0
|
|
204
|
+
};
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
/** True when the provider is an installed plugin with user OAuth. */
|
|
208
|
+
function isConnectableProvider(provider) {
|
|
209
|
+
return Boolean(connectablePlugin(provider));
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Start OAuth for a dashboard viewer and return the provider authorization URL.
|
|
213
|
+
* The callback stores tokens under the viewer's web actor id.
|
|
214
|
+
*/
|
|
215
|
+
async function startConnection(provider, actor) {
|
|
216
|
+
let request;
|
|
217
|
+
const result = await startOAuthFlow(provider, {
|
|
218
|
+
actorId: actor.userId,
|
|
219
|
+
actor,
|
|
220
|
+
authorization: {
|
|
221
|
+
createState: async () => randomBytes(32).toString("hex"),
|
|
222
|
+
deliver: (next) => {
|
|
223
|
+
request = next;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
if (!result.ok) return result;
|
|
228
|
+
if (!request) throw new Error("OAuth flow finished without an authorization request");
|
|
229
|
+
return {
|
|
230
|
+
ok: true,
|
|
231
|
+
authorizationUrl: request.authorizationUrl
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/** Remove the user's stored connection for one provider. */
|
|
235
|
+
async function disconnectConnection(userId, provider, userTokenStore) {
|
|
236
|
+
await unlinkProvider(userId, provider, userTokenStore);
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
export { startConnection as a, deleteWebAuthorization as c, getPausedTurnRequest as d, wakeAuthorizedTurn as f, readConnectedOAuthTokens as i, getWebAuthorization as l, getTurnAuthorization as m, isConnectableProvider as n, unlinkProvider as o, wakePausedTurn as p, listConnections as r, createWebAuthorization as s, disconnectConnection as t, createPausedTurns as u };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Ft as createUserTokenStore, Mt as parseOAuthStatePayload, Nt as resolveBaseUrl, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, jt as formatProviderLabel, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, yt as getMcpProviderErrorAttributes } from "./agent-runner-
|
|
2
|
-
import { f as escapeXml } from "./client-
|
|
3
|
-
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-
|
|
4
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
1
|
+
import { Ft as createUserTokenStore, Mt as parseOAuthStatePayload, Nt as resolveBaseUrl, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, jt as formatProviderLabel, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, yt as getMcpProviderErrorAttributes } from "./agent-runner-CNiTpIpb.js";
|
|
2
|
+
import { f as escapeXml } from "./client-Q27hki0Y.js";
|
|
3
|
+
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-C22RdmU8.js";
|
|
4
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-Cb--Qs-g.js";
|
|
5
5
|
import { f as parseSlackUserId } from "./actor-BTtLaeWy.js";
|
|
6
|
-
import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-
|
|
6
|
+
import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-DdzigZQh.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-BVvSnQBB.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 { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-
|
|
12
|
-
import { Vt as getSlackClient } from "./agent-hooks-
|
|
13
|
-
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-
|
|
14
|
-
import { i as getConversationPendingAuth } from "./pending-auth-
|
|
15
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
16
|
-
import {
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-BvsLuoLK.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-CVwSL6Gc.js";
|
|
11
|
+
import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-B8nH3ND_.js";
|
|
12
|
+
import { Vt as getSlackClient } from "./agent-hooks-CtZuJPTU.js";
|
|
13
|
+
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-DK9umvav.js";
|
|
14
|
+
import { i as getConversationPendingAuth } from "./pending-auth-Bg3A1-pE.js";
|
|
15
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BTOLzCM-.js";
|
|
16
|
+
import { c as deleteWebAuthorization, f as wakeAuthorizedTurn, i as readConnectedOAuthTokens, p as wakePausedTurn } from "./connections-DZ70JeSN.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -437,12 +437,6 @@ function accountLabel(account) {
|
|
|
437
437
|
function connectedAccountText(plugin, account) {
|
|
438
438
|
return account ? `*${plugin.manifest.name}*\nConnected as ${accountLabel(account)}` : `*${plugin.manifest.name}*\n${plugin.manifest.description}`;
|
|
439
439
|
}
|
|
440
|
-
async function connectedOAuthTokens(userId, plugin, userTokenStore) {
|
|
441
|
-
if (plugin.manifest.oauth || plugin.manifest.credentials) {
|
|
442
|
-
const stored = await userTokenStore.get(userId, plugin.manifest.name);
|
|
443
|
-
return stored && hasRequiredOAuthScope(stored.scope, plugin.manifest.oauth?.scope) ? stored : void 0;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
440
|
async function hasConnectedMcpAccount(userId, plugin) {
|
|
447
441
|
if (!plugin.manifest.mcp) return false;
|
|
448
442
|
const credentials = await getMcpStoredOAuthCredentials(userId, plugin.manifest.name);
|
|
@@ -456,7 +450,7 @@ async function buildHomeView(userId, userTokenStore) {
|
|
|
456
450
|
const providers = pluginCatalogRuntime.getProviders();
|
|
457
451
|
const connectedSections = [];
|
|
458
452
|
for (const plugin of providers) {
|
|
459
|
-
const tokens = await
|
|
453
|
+
const tokens = await readConnectedOAuthTokens(userId, plugin, userTokenStore);
|
|
460
454
|
if (!tokens && !await hasConnectedMcpAccount(userId, plugin)) continue;
|
|
461
455
|
connectedSections.push({
|
|
462
456
|
type: "section",
|
|
@@ -711,7 +705,8 @@ async function GET(request, provider, waitUntil, options) {
|
|
|
711
705
|
} : void 0
|
|
712
706
|
});
|
|
713
707
|
}, "oauth.callback.authentication_event.failed", { "app.credential.provider": provider });
|
|
714
|
-
|
|
708
|
+
const webActor = stored.actor?.platform === "web";
|
|
709
|
+
if (stored.destination?.platform !== "local" && stored.source?.kind !== "web" && !webActor) waitUntil(async () => {
|
|
715
710
|
try {
|
|
716
711
|
await publishAppHomeView(getSlackClient(), stored.userId, userTokenStore);
|
|
717
712
|
} catch {}
|
|
@@ -753,7 +748,7 @@ async function GET(request, provider, waitUntil, options) {
|
|
|
753
748
|
}
|
|
754
749
|
const botName = botConfig.userName;
|
|
755
750
|
const statusMessage = stored.destination?.platform === "local" && !resumesWebTurn ? `Your request is continuing in the local ${botName} client.` : resumesWebTurn ? `Your request is continuing in ${botName}.` : resumesAgentTurn ? "Your request is being processed in Slack." : `Your ${providerLabel} account is connected.`;
|
|
756
|
-
const footerMessage = stored.destination?.platform === "local" || resumesWebTurn ? `You can close this tab and return to ${botName}.` : "You can close this tab and return to Slack.";
|
|
751
|
+
const footerMessage = stored.destination?.platform === "local" || resumesWebTurn || webActor ? `You can close this tab and return to ${botName}.` : "You can close this tab and return to Slack.";
|
|
757
752
|
return htmlCallbackResponse(escapeXml(`${providerLabel} account connected`), escapeXml(statusMessage), 200, { footerMessage: escapeXml(footerMessage) });
|
|
758
753
|
}
|
|
759
754
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as logException } from "./logging-
|
|
1
|
+
import { d as logException } from "./logging-C22RdmU8.js";
|
|
2
2
|
import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import "./config-
|
|
3
|
+
import "./config-Cb--Qs-g.js";
|
|
4
4
|
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-D_YoNnAn.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { sql } from "drizzle-orm";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-
|
|
3
|
-
import { f as getSqlExecutor } from "./viewer-
|
|
2
|
+
import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-CNiTpIpb.js";
|
|
3
|
+
import { f as getSqlExecutor } from "./viewer-DdzigZQh.js";
|
|
4
4
|
import { L as detectImageMediaType } from "./conversation-NutPJ8S8.js";
|
|
5
5
|
//#region src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-
|
|
1
|
+
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-C22RdmU8.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-BIDN1sW3.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
|
|
5
5
|
//#region src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-Cb--Qs-g.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { 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, y as withScope } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-CkwwLVLb.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,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { Bt as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET, zt as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
4
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Bt as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET, zt as actorFromRun } from "./agent-runner-CNiTpIpb.js";
|
|
3
|
+
import { n as enqueueAgentMessageToParent } from "./result-CcdQ2iau.js";
|
|
4
|
+
import { r as enqueueAgentInvocation } from "./work-qQEjtmlv.js";
|
|
5
5
|
//#region src/chat/agent-invocations/message.ts
|
|
6
6
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
7
7
|
/**
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-C22RdmU8.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-BVvSnQBB.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-uGq6Grnt.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-C7cyjcVj.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-CVvEUSMH.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 { Ft as createUserTokenStore } from "./agent-runner-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Ft as createUserTokenStore } from "./agent-runner-CNiTpIpb.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CyAN-Gos.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
//#region src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as isProviderRetryError } from "./client-
|
|
2
|
-
import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-
|
|
1
|
+
import { v as isProviderRetryError } from "./client-Q27hki0Y.js";
|
|
2
|
+
import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-B8nH3ND_.js";
|
|
3
3
|
import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/chat/state/turn-id.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-
|
|
3
|
-
import { i as getChatConfig } from "./config-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { S as toOptionalTrimmed } from "./client-Q27hki0Y.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-C22RdmU8.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-Cb--Qs-g.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BQ3g3OX_.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|