@sentry/junior 0.303.0 → 0.304.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-context-BdVnSuY5.js → adapter-context-B1IpoELr.js} +2 -2
- package/dist/{admin-AfeAdS3J.js → admin-BnVFGo_z.js} +5 -5
- package/dist/{agent-runner-BP8_DLUv.js → agent-runner-CoEeZSRh.js} +546 -372
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +1 -1
- package/dist/api.js +59 -61
- package/dist/{app-Dd9v1mNx.d.ts → app-Cs157Zc5.d.ts} +5 -3
- package/dist/app.d.ts +1 -1
- package/dist/app.js +77 -64
- package/dist/{automation-D9MvhOWY.js → automation-CuA3yEcD.js} +1 -1
- package/dist/{background-compaction-queue-xaE05jxH.js → background-compaction-queue-WLPNSF_b.js} +2 -2
- package/dist/{briefs-D8i-dKTp.js → briefs-CagVVefw.js} +11 -8
- package/dist/{catalog-runtime-d1EM6Z0V.js → catalog-runtime-B8ZXvXWm.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +5 -5
- 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 +5 -5
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +4 -4
- package/dist/{config-oGM7KA9M.js → config-DdO1BNcw.js} +101 -7
- package/dist/{connections-BlikzEJv.js → connections-D20kp0j5.js} +6 -6
- package/dist/{continue-in-slack-BZnYifiG.js → continue-in-slack-BKEVMBj1.js} +8 -8
- package/dist/{conversation-CY1jnBiC.js → conversation-BOqdRtUx.js} +4 -12
- package/dist/{conversation-feed-BZJRk6UV.js → conversation-feed-CgpgP7yi.js} +35 -2
- package/dist/{conversation-privacy-Cx515ddM.js → conversation-privacy-L1SK_v0V.js} +10 -2
- package/dist/{conversation-turn-DAhRdX4m.js → conversation-turn-BptVJylj.js} +17 -17
- package/dist/{credential-sync-DfhmWFeo.js → credential-sync-D1J1CGzL.js} +14 -14
- package/dist/{db-C-2tFxk3.js → db-EKJnkrIb.js} +169 -6
- package/dist/{db-DPqcEM9_.d.ts → db-zbN5ZV_o.d.ts} +2 -2
- package/dist/{executor-NVfS8aQ2.js → executor-CoIZmFK8.js} +43 -9
- package/dist/{history-UZ3M2M9r.js → history-m2-ceTTX.js} +8 -2
- package/dist/{install-CHLrpRZc.js → install-BT2Pf6HP.js} +2 -2
- package/dist/instrumentation.js +7 -3
- package/dist/{lineage-HGLhd_-N.js → lineage-C5DGQCS_.js} +2 -2
- package/dist/{logging-DiyqRLBx.js → logging-QSZuMcvo.js} +1 -1
- package/dist/{message-CkCOcbFH.js → message-TtxftRHj.js} +8 -8
- package/dist/{model-input-DmoPPtPE.js → model-input-BHXfA29g.js} +2 -2
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +5 -5
- package/dist/{oauth-callback-server-CIf_6YmA.js → oauth-callback-server-B0enqHtZ.js} +2 -2
- package/dist/{projection-DBq8tsA5.js → projection-CNKK7doO.js} +547 -61
- package/dist/{prompt-D2KlJopL.js → prompt-DSjhoKu5.js} +185 -12
- package/dist/{queue-DFaOscp5.js → queue-CDxkit82.js} +4 -4
- package/dist/{registry-Bu0Z9BEO.js → registry-DBDNUUmz.js} +1 -1
- package/dist/{resolve-DXuA3G0g.js → resolve-CQLhMWSu.js} +3 -3
- package/dist/{result-DpiNseDA.js → result-B-pauj42.js} +8 -8
- package/dist/{runner-iu1heRFv.js → runner-B3KxKks5.js} +9 -9
- package/dist/{sandbox-egress-signals-2HFYDcQf.js → sandbox-egress-signals-DJJX9ClG.js} +1 -1
- package/dist/{schema-DvfX3Gq_.js → schema-Bx0Mlo32.js} +3 -3
- package/dist/{schema-DHMOaRzC.d.ts → schema-CKcu-IK6.d.ts} +43 -11
- package/dist/{service-account-BcT5LR7V.js → service-account-2HmlNPvy.js} +6 -5
- package/dist/{service-account-xYkaQTrw.js → service-account-DQLqkSVv.js} +5 -5
- package/dist/{session-stop-BLLp1IP_.js → session-stop-DEeZKqbX.js} +114 -49
- package/dist/{skills-CNAGH4ju.js → skills-2UrD7JkN.js} +2 -2
- package/dist/{slack-conversation-unfurl-DYnqe5ci.js → slack-conversation-unfurl-Dd129Uov.js} +12 -11
- package/dist/{spawn-cGasWW33.js → spawn-eMho9HDJ.js} +6 -6
- package/dist/{state-CDS6h_Wv.js → state-Bveuc4Zh.js} +4 -4
- package/dist/{stop-DMMA67yT.js → stop-D_ltJLDS.js} +170 -64
- package/dist/{store-Dgs7Oe44.js → store-COeYnPL_.js} +5 -5
- package/dist/{task-queue-DcF0nhhz.js → task-queue-CBIDXZpV.js} +3 -3
- package/dist/{task-runner-BGXF7Fo7.js → task-runner-CJF7zIJL.js} +7 -7
- package/dist/{thread-context-BPky1KBe.js → thread-context-Cg0jt0aE.js} +8 -8
- package/dist/{turn-session-routing-DGvn9MSl.js → turn-session-routing-CaY3Tp8m.js} +8 -8
- package/dist/{turn-user-message-19CkuUvM.js → turn-user-message-tcom1RYd.js} +3 -3
- package/dist/{validation-lu1DgjNQ.js → validation-EU91JwIT.js} +1 -1
- package/dist/{version-Uo3c94Dx.js → version-BYRPhY5G.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BPQHMx3-.js → viewer-Cf8ISkAc.js} +3 -3
- package/dist/{warmup-H8uLvW9e.js → warmup-TgY4S1vx.js} +75 -469
- package/dist/{worker-B-pM_-3K.js → worker-C6Uq4OKD.js} +7 -7
- package/migrations/0111_attachment_kinds.sql +14 -0
- package/migrations/0112_attachment_url_fill.sql +51 -0
- package/migrations/0113_attachment_url_index.sql +1 -0
- package/migrations/meta/0099_snapshot.json +102 -326
- package/migrations/meta/0111_snapshot.json +5011 -0
- package/migrations/meta/0112_snapshot.json +5011 -0
- package/migrations/meta/0113_snapshot.json +5033 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +7 -7
|
@@ -1,32 +1,30 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { $ as loadTurnCheckpoint, $a as
|
|
3
|
-
import {
|
|
4
|
-
import { E as withSpan, G as normalizeIdentityEmail, J as toOptionalString, h as logWarn,
|
|
2
|
+
import { $ as loadTurnCheckpoint, $a as workspaceRepoCheckoutPath, $i as setWorkspaceSnapshotBuild, $r as EVERYONE_ASSIGNEE, Ar as dismissOpenReviewItems, Ba as isWorkspaceSnapshotNotReadyError, Br as PLUGIN_REVIEW_ITEM_KEY_PREFIX, Ca as getSlackMessagePermalink, Cn as getTerminalAssistantMessages, Cs as defaultTimezone, Dr as closeReviewItem, Fi as getDashboardTaskLink, Ga as createSandboxEgressCredentialToken, Gi as getWorkspaceByName, Gn as renderTag, H as PluginCredentialFailureError, Hi as createWorkspace, Hr as canAgentChangeReviewItem, Ja as buildSandboxEgressNetworkPolicy, Ji as updateWorkspace, Jo as readLiveAttachment, Jr as requireReviewItemAssignees, K as AuthorizationFlowDisabledError, Ki as listWorkspaces, Lo as FORK_INSTRUCTIONS, Lr as searchReviewItems, Mr as getReviewItem, Nr as insertReviewItem, Pa as isAbortError, Qi as setWorkspaceSnapshot, Ra as WorkspaceSnapshotNotReadyError, Ro as loadForkHistory, T as resolveTaskTitle, Ui as deleteWorkspace, Ur as canReadReviewItem, Vn as escapeClosingTags, Vo as matchSlackAttachments, Wi as getWorkspace, X as clearPendingAuth, Xi as invalidateReadySnapshot, Xn as getOAuthAccountProviders, Yi as WorkspaceValidationError, Yo as recordUploadedAttachment, Yr as requireReviewItemLinks, Za as SANDBOX_RUNTIME, Zi as loadSnapshotsForProfile, _a as slackMention, _i as findMatchingWatches, _o as createPluginLogger, _s as searchConversations, as as isConversationScopedChannel, at as failTurnRecord, bs as createPluginAnnotations, ci as RESOURCE_SUBSCRIPTION_MAX_TTL_MS, cn as replyTextSchema, cr as getPlugins, cs as normalizeSlackConversationId, ds as withSlackRetries, ea as create, ei as activeParticipantUserIds, eo as ToolInputError, es as SlackActionError, et as lostWorkerBeforeFirstSave, fi as cancelWatch, fn as NO_REPLY_TOOL_NAME, fs as sleep, gi as deliverWatch, hi as createWatch, ia as getSandboxProvider, in as REPLY_TOOL_NAME, is as getSlackClient, j as markConversationMessage, jr as getOpenReviewItemByDedupeKey, ki as getDashboardConversationLink, ks as createPluginCache, li as RESOURCE_WATCH_TOOL_SOURCE, lo as SANDBOX_WORKSPACE_ROOT, lr as getStaticPluginToolDefinitions, mi as createTimerWatch, mn as isLegacyNoReplyMarker, na as isStale, ni as resolveAssignee, ns as getFilePermalink, nt as saveTurnCheckpoint, oi as getSlackToolContext, on as readTurnAnswer, pn as findLegacyNoReplyMarker, qr as readReviewItemAgentScope, ri as resolveAssignees, rn as isTurnExecutionLimitExceededError, rt as abandonTurnRecord, s as openConversationProjection, si as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, so as SANDBOX_REPOS_ROOT, st as getTurnRecord, ti as automationCreatorUserId, tr as createPluginHookRunner, ts as downloadPrivateSlackFile, tt as pauseLostWorkerTurn, ui as STOP_WATCHING_TOOL_NAME, un as getAssistantReplyText, v as hydrateConversationMessages, vi as getWatch, vn as REPORT_BLOCKED_TOOL_NAME, vo as canAccessConversation, w as fallbackShortTitle, wa as openSlackDirectMessage, xo as readConversationAccessFromSql, yi as listWatches, ys as saveObjectAnnotations, zr as updateReviewItemContent } from "./projection-CNKK7doO.js";
|
|
3
|
+
import { $ as bufferBody, X as isProviderRetryError, _ as TURN_REASONING_LEVELS, i as getChatConfig, k as resolveGatewayModel, n as botConfig } from "./config-DdO1BNcw.js";
|
|
4
|
+
import { E as withSpan, G as normalizeIdentityEmail, J as toOptionalString, h as logWarn, m as logInfo, o as getActiveTraceContext, p as logException, x as setSpanStatus, z as getDeploymentId } from "./logging-QSZuMcvo.js";
|
|
5
5
|
import { h as startSpan, n as captureMessage, u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
6
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
7
|
-
import { A as enqueueEventNotification, B as resolveEventMentions, C as listActiveMailboxTurns, G as conversationSubtree, I as maybePostAutomatedTurnLimitNotice, J as isExperimentalFeatureEnabled, K as conversationSubtreeColumns, M as isEventMailboxMetadata, Q as requireSlackChannelMessageScope, S as listActiveMailboxTurnSources, U as recordFinishedTurnForAutomatedLimit, W as resetAutomatedTurnLimit, X as getEventCatalog, at as workspaceSnapshotFinishedEvent, b as getAuthPausedConversationTurnId, f as buildSteeringPiMessage, g as withoutSavedSteeringMessages, i as resumeStoppedConversationTree, it as WORKSPACE_SNAPSHOT_READY_EVENT, k as EVENT_WAIT_MS, m as instructionForInputs, n as isSkippedAfterConversationStop, nt as slackChannelMessageTrigger, ot as workspaceSnapshotWatch, r as markConversationsStopped, rt as WORKSPACE_SNAPSHOT_FAILED_EVENT, st as buildDeploymentSystemPrompt, t as getConversationStoppedAtMs, v as saveUserCustomization, y as addConversationNote } from "./session-stop-
|
|
8
|
-
import { A as
|
|
9
|
-
import { A as eventAutomationTriggerSchema, F as compileScheduleIntent, H as automationTaskSchema, L as toolScheduleIntentSchema, P as ScheduleIntentError, R as weekdaySchema, U as automationTaskText, V as automationTaskDescription, l as automationListQuerySchema, z as automationSkillNameSchema } from "./automation-
|
|
6
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B8ZXvXWm.js";
|
|
7
|
+
import { A as enqueueEventNotification, B as resolveEventMentions, C as listActiveMailboxTurns, G as conversationSubtree, I as maybePostAutomatedTurnLimitNotice, J as isExperimentalFeatureEnabled, K as conversationSubtreeColumns, M as isEventMailboxMetadata, Q as requireSlackChannelMessageScope, S as listActiveMailboxTurnSources, U as recordFinishedTurnForAutomatedLimit, W as resetAutomatedTurnLimit, X as getEventCatalog, at as workspaceSnapshotFinishedEvent, b as getAuthPausedConversationTurnId, f as buildSteeringPiMessage, g as withoutSavedSteeringMessages, i as resumeStoppedConversationTree, it as WORKSPACE_SNAPSHOT_READY_EVENT, k as EVENT_WAIT_MS, m as instructionForInputs, n as isSkippedAfterConversationStop, nt as slackChannelMessageTrigger, ot as workspaceSnapshotWatch, r as markConversationsStopped, rt as WORKSPACE_SNAPSHOT_FAILED_EVENT, st as buildDeploymentSystemPrompt, t as getConversationStoppedAtMs, v as saveUserCustomization, y as addConversationNote } from "./session-stop-DEeZKqbX.js";
|
|
8
|
+
import { A as agentTypeSchema, H as removedCardSchema, O as AGENT_TYPES, X as briefLinkSchema, Z as briefOutcomeStatusSchema, j as formatAgentTypes, k as agentTypeInstructions } from "./conversation-BOqdRtUx.js";
|
|
9
|
+
import { A as eventAutomationTriggerSchema, F as compileScheduleIntent, H as automationTaskSchema, L as toolScheduleIntentSchema, P as ScheduleIntentError, R as weekdaySchema, U as automationTaskText, V as automationTaskDescription, l as automationListQuerySchema, z as automationSkillNameSchema } from "./automation-CuA3yEcD.js";
|
|
10
10
|
import { d as parseSlackChannelReferenceId, f as parseSlackTeamId, o as isUserActor, p as parseSlackUserId, u as parseSlackChannelId, v as parseSlackMessageTs } from "./actor-D2iXzvlN.js";
|
|
11
|
-
import {
|
|
12
|
-
import { $ as deleteEventAutomation, A as readAutomationExecutionStatusDays, Ct as hasEventCatalogEntries, D as emptyAutomationRunWindows, Dt as registeredResourceTypeSchema, Et as registeredEventTypeSchema, H as deleteScheduledAutomation, K as saveScheduledAutomation, M as readAutomationExecutionSummaries, N as readAutomationExecutions, Ot as requireEventIdentifier, P as readAutomationRuns, St as eventWatchUnavailable, Tt as registeredEventTriggerProblems, W as parseScheduledAutomationRow, _t as automationEventCatalog, a as getPersistedThreadState, at as setEventAutomationStatus, c as coerceThreadConversationState, ct as automationDefinition, dt as readAutomationVersion, ft as sameDefinitionValue, g as getDispatchRecord, h as getDispatchInputMessageId, ht as requireAutomationRevision, i as getPersistedSandboxState, it as saveEventAutomation, j as readAutomationExecutionStatusHours, k as readAutomationExecutionByConversationId, kt as requireValidEventTrigger, m as getDispatchIdForConversation, mt as automationRevision, n as resolveTurnSessionRouting, nt as listDeletedEventAutomationsCreatedBy, rt as parseEventAutomationRow, s as persistThreadStateById, ut as listAutomationVersions, vt as describeRegisteredEventTrigger, wt as registeredEventMatchSchema, xt as eventNamespaceSchema } from "./turn-session-routing-
|
|
13
|
-
import { A as juniorAttachmentUploads, F as
|
|
11
|
+
import { A as conversationKindFromRow, E as isTopLevelKind, I as resolveActorIdentityId, O as promptModeTurnTools, P as SYSTEM_IDENTITY_ID, T as isPersonInput, X as getStateAdapter, _ as readConversationTrees, a as getConversationStore, dt as resolveRootConversationId, ft as rootConversationIsArchived, g as conversationDescendants, h as conversationAncestors, i as getConversationMessageSearchStore, k as turnBehavior, mt as nextDetailVersion, nt as withLock, o as getDb, r as getConversationEventStore, s as getSqlExecutor, tt as fenceLock, v as setArchivedAt, x as userMessageQueries, yt as sameDestination } from "./db-EKJnkrIb.js";
|
|
12
|
+
import { $ as deleteEventAutomation, A as readAutomationExecutionStatusDays, Ct as hasEventCatalogEntries, D as emptyAutomationRunWindows, Dt as registeredResourceTypeSchema, Et as registeredEventTypeSchema, H as deleteScheduledAutomation, K as saveScheduledAutomation, M as readAutomationExecutionSummaries, N as readAutomationExecutions, Ot as requireEventIdentifier, P as readAutomationRuns, St as eventWatchUnavailable, Tt as registeredEventTriggerProblems, W as parseScheduledAutomationRow, _t as automationEventCatalog, a as getPersistedThreadState, at as setEventAutomationStatus, c as coerceThreadConversationState, ct as automationDefinition, dt as readAutomationVersion, ft as sameDefinitionValue, g as getDispatchRecord, h as getDispatchInputMessageId, ht as requireAutomationRevision, i as getPersistedSandboxState, it as saveEventAutomation, j as readAutomationExecutionStatusHours, k as readAutomationExecutionByConversationId, kt as requireValidEventTrigger, m as getDispatchIdForConversation, mt as automationRevision, n as resolveTurnSessionRouting, nt as listDeletedEventAutomationsCreatedBy, rt as parseEventAutomationRow, s as persistThreadStateById, ut as listAutomationVersions, vt as describeRegisteredEventTrigger, wt as registeredEventMatchSchema, xt as eventNamespaceSchema } from "./turn-session-routing-CaY3Tp8m.js";
|
|
13
|
+
import { A as juniorAttachmentUploads, F as juniorUsers, I as juniorDestinations, N as juniorConversations, P as juniorIdentities, T as juniorConversationEvents, _ as juniorConversationReadPositions, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, j as juniorAttachments, p as juniorStats, u as juniorAutomationRuns, v as juniorConversationParticipants } from "./executor-CoIZmFK8.js";
|
|
14
14
|
import { i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-cP0AACm1.js";
|
|
15
|
-
import { t as discoverSkills } from "./skills-
|
|
15
|
+
import { t as discoverSkills } from "./skills-2UrD7JkN.js";
|
|
16
16
|
import { M as sumUtcHoursIntoSixHours, T as apiErrorSchema, c as formatUserInputAnswer, d as userInputRequestSchema, g as USER_CUSTOMIZATION_MAX_CHARS, h as isVisionImageMediaType, m as detectImageMediaType, n as AGENT_INVOCATION_MAILBOX_STATUSES, r as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, t as webMessageId, v as userCustomizationTextSchema, w as isAgentInvocationResultEventType, x as AGENT_PARENT_MESSAGE_EVENT_TYPE, y as AGENT_INVOCATION_EVENT_NAMESPACE } from "./web-message-id-lNodcCOI.js";
|
|
17
|
-
import { f as identityAvatarUrl, h as readUserAvatarUrls } from "./viewer-
|
|
18
|
-
import { A as getAgentInvocationResultMessageId, C as ownAgentInvocation, I as getUnnamedAgentConversationId, N as getChildAgentLockName, O as getAgentInvocationIdForResult, P as getNamedAgentConversationId, R as buildDeterministicTurnId, S as listChildMessages, T as getAgentInvocationId, _ as ConversationTurnLifecycleService, b as hasAgentInvocationReply, d as isTurnInputCommitLostError, j as getAgentInvocationTurnId, k as getAgentInvocationMessageId, l as getConversationTurnBoundaryError, p as markTurnClosed, s as TurnInputCommitLostError, t as getTurnUserMessage, w as readChildMessageSender } from "./turn-user-message-
|
|
19
|
-
import { D as stopConversationWork, _ as getConversationWorkState, h as ensureConversationWake, m as dropPendingMessages, n as appendAndEnqueueExclusiveInboundMessage, r as appendAndEnqueueInboundMessage, v as getConversationWorkStates, w as requestConversationWork } from "./store-
|
|
20
|
-
import { d as contextProvenance, m as sameActorIdentity, t as KNOWN_CONVERSATION_EVENT_TYPES, u as agentInstructionProvenance } from "./history-
|
|
21
|
-
import { f as credentialContextForActor, p as credentialContextSchema } from "./registry-
|
|
22
|
-
import { o as getVercelConversationWorkQueue, p as getTurnRequestDeadline } from "./background-compaction-queue-
|
|
23
|
-
import { r as EVENT_AUTHOR_ID, u as completeText } from "./prompt-
|
|
24
|
-
import { n as postinstall, o as getSandboxResources, t as dependencies } from "./install-
|
|
25
|
-
import { a as sendCacheWarmup, c as sendWorkspaceSnapshotJob, s as sendNextWorkspaceSnapshotJob } from "./queue-
|
|
17
|
+
import { f as identityAvatarUrl, h as readUserAvatarUrls } from "./viewer-Cf8ISkAc.js";
|
|
18
|
+
import { A as getAgentInvocationResultMessageId, C as ownAgentInvocation, I as getUnnamedAgentConversationId, N as getChildAgentLockName, O as getAgentInvocationIdForResult, P as getNamedAgentConversationId, R as buildDeterministicTurnId, S as listChildMessages, T as getAgentInvocationId, _ as ConversationTurnLifecycleService, b as hasAgentInvocationReply, d as isTurnInputCommitLostError, j as getAgentInvocationTurnId, k as getAgentInvocationMessageId, l as getConversationTurnBoundaryError, p as markTurnClosed, s as TurnInputCommitLostError, t as getTurnUserMessage, w as readChildMessageSender } from "./turn-user-message-tcom1RYd.js";
|
|
19
|
+
import { D as stopConversationWork, _ as getConversationWorkState, h as ensureConversationWake, m as dropPendingMessages, n as appendAndEnqueueExclusiveInboundMessage, r as appendAndEnqueueInboundMessage, v as getConversationWorkStates, w as requestConversationWork } from "./store-COeYnPL_.js";
|
|
20
|
+
import { d as contextProvenance, m as sameActorIdentity, t as KNOWN_CONVERSATION_EVENT_TYPES, u as agentInstructionProvenance } from "./history-m2-ceTTX.js";
|
|
21
|
+
import { f as credentialContextForActor, p as credentialContextSchema } from "./registry-DBDNUUmz.js";
|
|
22
|
+
import { o as getVercelConversationWorkQueue, p as getTurnRequestDeadline } from "./background-compaction-queue-WLPNSF_b.js";
|
|
23
|
+
import { p as searchWeb, r as EVENT_AUTHOR_ID, u as completeText } from "./prompt-DSjhoKu5.js";
|
|
24
|
+
import { n as postinstall, o as getSandboxResources, t as dependencies } from "./install-BT2Pf6HP.js";
|
|
25
|
+
import { a as sendCacheWarmup, c as sendWorkspaceSnapshotJob, s as sendNextWorkspaceSnapshotJob } from "./queue-CDxkit82.js";
|
|
26
26
|
import * as z from "zod";
|
|
27
27
|
import { streamSimple } from "@earendil-works/pi-ai/compat";
|
|
28
|
-
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
29
|
-
import { generateText } from "ai";
|
|
30
28
|
import path from "node:path";
|
|
31
29
|
import { isDeepStrictEqual, promisify } from "node:util";
|
|
32
30
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -3289,10 +3287,6 @@ function parseSlackThreadId(threadId) {
|
|
|
3289
3287
|
threadTs
|
|
3290
3288
|
};
|
|
3291
3289
|
}
|
|
3292
|
-
/** Resolve the Slack channel ID from a `slack:<channel>:<ts>` thread identifier. */
|
|
3293
|
-
function resolveSlackChannelIdFromThreadId(threadId) {
|
|
3294
|
-
return parseSlackThreadId(threadId)?.channelId;
|
|
3295
|
-
}
|
|
3296
3290
|
/** Best-effort channel ID extraction from a raw Slack message payload. */
|
|
3297
3291
|
function resolveSlackChannelIdFromMessage(message) {
|
|
3298
3292
|
const messageChannelId = parseSlackChannelId(message.channelId);
|
|
@@ -3302,7 +3296,6 @@ function resolveSlackChannelIdFromMessage(message) {
|
|
|
3302
3296
|
const rawChannel = parseSlackChannelId(raw.channel);
|
|
3303
3297
|
if (rawChannel) return rawChannel;
|
|
3304
3298
|
}
|
|
3305
|
-
return resolveSlackChannelIdFromThreadId(toTrimmedSlackString(message.threadId));
|
|
3306
3299
|
}
|
|
3307
3300
|
// src/chat/slack/timestamp-param.ts
|
|
3308
3301
|
/** Define a model-facing Slack timestamp, normalizing numeric model args to strings. */
|
|
@@ -4880,7 +4873,7 @@ function createSetConversationSubscriptionTool(context) {
|
|
|
4880
4873
|
...setConversationSubscriptionToolDefinition,
|
|
4881
4874
|
async execute(input) {
|
|
4882
4875
|
const user = (await context.resolveActorIdentity?.())?.user;
|
|
4883
|
-
if (!user) throw new ToolInputError("This person has no linked
|
|
4876
|
+
if (!user) throw new ToolInputError("This person has no linked User, so their subscription cannot change.");
|
|
4884
4877
|
const result = await updateConversationSubscription(user, context.conversationId, input.subscribed);
|
|
4885
4878
|
if (!result) throw new ToolInputError("This person is not a participant of this conversation.");
|
|
4886
4879
|
return {
|
|
@@ -7585,407 +7578,6 @@ function contentPartText(part) {
|
|
|
7585
7578
|
default: return "";
|
|
7586
7579
|
}
|
|
7587
7580
|
}
|
|
7588
|
-
// src/chat/attachments/store.ts
|
|
7589
|
-
const DAY_MS = 864e5;
|
|
7590
|
-
const ATTACHMENT_GC_BATCH_LIMIT = 200;
|
|
7591
|
-
/** Time that Junior keeps attachment bytes after the file is stored. */
|
|
7592
|
-
const ATTACHMENT_RETENTION_MS = 30 * DAY_MS;
|
|
7593
|
-
function attachmentIdentity(file) {
|
|
7594
|
-
if ("data" in file) return file.source ?? { sha256: createHash("sha256").update(file.data).digest("hex") };
|
|
7595
|
-
return file.source;
|
|
7596
|
-
}
|
|
7597
|
-
/** Stable conversation-owned id for one file and its presentation metadata. */
|
|
7598
|
-
function attachmentId(args) {
|
|
7599
|
-
const identity = "sha256" in args.identity ? [
|
|
7600
|
-
args.conversationId,
|
|
7601
|
-
args.storageProvider,
|
|
7602
|
-
args.identity.sha256,
|
|
7603
|
-
args.filename,
|
|
7604
|
-
args.contentType
|
|
7605
|
-
] : [
|
|
7606
|
-
args.conversationId,
|
|
7607
|
-
args.storageProvider,
|
|
7608
|
-
args.filename,
|
|
7609
|
-
args.contentType,
|
|
7610
|
-
args.identity.provider,
|
|
7611
|
-
args.identity.id
|
|
7612
|
-
];
|
|
7613
|
-
return createHash("sha256").update(identity.join("\0")).digest("hex");
|
|
7614
|
-
}
|
|
7615
|
-
/**
|
|
7616
|
-
* Object key for one write attempt.
|
|
7617
|
-
*
|
|
7618
|
-
* Attachment ids are content-stable. Object keys are not: each put gets a fresh
|
|
7619
|
-
* key so a failed-write cleanup or GC delete cannot remove another writer's
|
|
7620
|
-
* durable blob.
|
|
7621
|
-
*/
|
|
7622
|
-
function attachmentKey(args) {
|
|
7623
|
-
return `conversations/${args.conversationId}/attachments/${args.attachmentId}/${args.writeId}/${args.filename}`;
|
|
7624
|
-
}
|
|
7625
|
-
/** A source whose bytes do not match its declared size. A retry cannot fix it. */
|
|
7626
|
-
var AttachmentSizeError = class extends Error {
|
|
7627
|
-
constructor(bytes, expected, options) {
|
|
7628
|
-
super(`Attachment body does not match its declared ${expected} bytes (read ${bytes})`, options);
|
|
7629
|
-
this.name = "AttachmentSizeError";
|
|
7630
|
-
}
|
|
7631
|
-
};
|
|
7632
|
-
/** Tries for one object write, each with a freshly opened body. */
|
|
7633
|
-
const WRITE_ATTEMPTS = 3;
|
|
7634
|
-
async function bestEffortDelete(storage, key) {
|
|
7635
|
-
if (key === null) return;
|
|
7636
|
-
try {
|
|
7637
|
-
await storage.delete([key]);
|
|
7638
|
-
} catch {}
|
|
7639
|
-
}
|
|
7640
|
-
/**
|
|
7641
|
-
* Stream one file to a fresh key, and return its size and digest.
|
|
7642
|
-
*
|
|
7643
|
-
* The digest is taken while the bytes stream, so the body is never held
|
|
7644
|
-
* whole. A body that does not match its declared size is not kept.
|
|
7645
|
-
*/
|
|
7646
|
-
async function writeAttachmentObject(args) {
|
|
7647
|
-
for (let attempt = 1;; attempt += 1) try {
|
|
7648
|
-
return await writeAttachmentObjectOnce(args);
|
|
7649
|
-
} catch (error) {
|
|
7650
|
-
if (error instanceof AttachmentSizeError || attempt >= WRITE_ATTEMPTS) {
|
|
7651
|
-
await bestEffortDelete(args.storage, args.key);
|
|
7652
|
-
throw error;
|
|
7653
|
-
}
|
|
7654
|
-
}
|
|
7655
|
-
}
|
|
7656
|
-
async function writeAttachmentObjectOnce(args) {
|
|
7657
|
-
const { file } = args;
|
|
7658
|
-
const expected = "data" in file ? file.data.byteLength : file.bytes;
|
|
7659
|
-
const source = "data" in file ? bufferBody(file.data) : await file.open();
|
|
7660
|
-
const hash = createHash("sha256");
|
|
7661
|
-
let bytes = 0;
|
|
7662
|
-
const body = source.pipeThrough(new TransformStream({ transform(chunk, controller) {
|
|
7663
|
-
bytes += chunk.byteLength;
|
|
7664
|
-
if (bytes > expected) throw new AttachmentSizeError(bytes, expected);
|
|
7665
|
-
hash.update(chunk);
|
|
7666
|
-
controller.enqueue(chunk);
|
|
7667
|
-
} }));
|
|
7668
|
-
try {
|
|
7669
|
-
await args.storage.put({
|
|
7670
|
-
body,
|
|
7671
|
-
bytes: expected,
|
|
7672
|
-
contentType: file.mimeType,
|
|
7673
|
-
key: args.key
|
|
7674
|
-
});
|
|
7675
|
-
} catch (error) {
|
|
7676
|
-
if (bytes > expected) throw new AttachmentSizeError(bytes, expected, { cause: error });
|
|
7677
|
-
throw error;
|
|
7678
|
-
}
|
|
7679
|
-
if (bytes !== expected) throw new AttachmentSizeError(bytes, expected);
|
|
7680
|
-
return {
|
|
7681
|
-
bytes,
|
|
7682
|
-
sha256: hash.digest("hex")
|
|
7683
|
-
};
|
|
7684
|
-
}
|
|
7685
|
-
async function isConversationPurged(db, conversationId) {
|
|
7686
|
-
const [row] = await db.db().select({ transcriptPurgedAt: juniorConversations.transcriptPurgedAt }).from(juniorConversations).where(eq(juniorConversations.conversationId, conversationId));
|
|
7687
|
-
return row?.transcriptPurgedAt != null;
|
|
7688
|
-
}
|
|
7689
|
-
function purgedConversationError(conversationId) {
|
|
7690
|
-
return /* @__PURE__ */ new Error(`Cannot store attachment for purged conversation ${conversationId}`);
|
|
7691
|
-
}
|
|
7692
|
-
async function assertConversationNotPurged(db, conversationId) {
|
|
7693
|
-
if (await isConversationPurged(db, conversationId)) throw purgedConversationError(conversationId);
|
|
7694
|
-
}
|
|
7695
|
-
/** Mark a just-written row for deletion and drop its unused object. */
|
|
7696
|
-
async function rejectPurgedAttachmentWrite(args) {
|
|
7697
|
-
const db = args.db.db();
|
|
7698
|
-
await db.with(conversationDetailTouch(db, [args.conversationId])).update(juniorAttachments).set({ deleteRequestedAt: args.now }).where(eq(juniorAttachments.id, args.id));
|
|
7699
|
-
await bestEffortDelete(args.storage, args.storageKey);
|
|
7700
|
-
throw purgedConversationError(args.conversationId);
|
|
7701
|
-
}
|
|
7702
|
-
/**
|
|
7703
|
-
* Return another writer's live row only when the conversation is still active.
|
|
7704
|
-
*
|
|
7705
|
-
* The caller already wrote a unique object for this attempt. Delete that unused
|
|
7706
|
-
* object either way. If the conversation is purged, do not report success for a
|
|
7707
|
-
* row that purge/GC is about to remove.
|
|
7708
|
-
*/
|
|
7709
|
-
async function reuseLiveAttachment(args) {
|
|
7710
|
-
await bestEffortDelete(args.storage, args.storageKey);
|
|
7711
|
-
await assertConversationNotPurged(args.db, args.conversationId);
|
|
7712
|
-
return { id: args.id };
|
|
7713
|
-
}
|
|
7714
|
-
/**
|
|
7715
|
-
* Persist one conversation-owned file.
|
|
7716
|
-
*
|
|
7717
|
-
* Identity is stable under the conversation: it comes from the file's source
|
|
7718
|
-
* when it has one, and from its digest otherwise. Object storage is written
|
|
7719
|
-
* first under a unique key; the SQL row is created only after that write
|
|
7720
|
-
* succeeds. A row means the attachment is durable. Retries reuse an existing
|
|
7721
|
-
* live row. A purge-marked row is revived by writing a new object and pointing
|
|
7722
|
-
* the row at it, unless the conversation is still purged. If the SQL write
|
|
7723
|
-
* fails after object storage accepts the bytes, this path deletes that unique
|
|
7724
|
-
* object. A process crash between those steps can leave an unreferenced unique
|
|
7725
|
-
* object with no SQL row.
|
|
7726
|
-
*/
|
|
7727
|
-
async function storeAttachment(args) {
|
|
7728
|
-
const now = new Date(args.nowMs ?? Date.now());
|
|
7729
|
-
const identity = attachmentIdentity(args.file);
|
|
7730
|
-
const source = args.file.source;
|
|
7731
|
-
const id = attachmentId({
|
|
7732
|
-
conversationId: args.conversationId,
|
|
7733
|
-
contentType: args.file.mimeType,
|
|
7734
|
-
filename: args.file.filename,
|
|
7735
|
-
identity,
|
|
7736
|
-
storageProvider: args.storage.provider
|
|
7737
|
-
});
|
|
7738
|
-
const [existing] = await args.db.db().select({
|
|
7739
|
-
contentType: juniorAttachments.contentType,
|
|
7740
|
-
conversationId: juniorAttachments.conversationId,
|
|
7741
|
-
deleteRequestedAt: juniorAttachments.deleteRequestedAt,
|
|
7742
|
-
filename: juniorAttachments.filename,
|
|
7743
|
-
id: juniorAttachments.id,
|
|
7744
|
-
provider: juniorAttachments.provider,
|
|
7745
|
-
providerId: juniorAttachments.providerId,
|
|
7746
|
-
storageProvider: juniorAttachments.storageProvider,
|
|
7747
|
-
sha256: juniorAttachments.sha256,
|
|
7748
|
-
storageKey: juniorAttachments.storageKey
|
|
7749
|
-
}).from(juniorAttachments).where(eq(juniorAttachments.id, id));
|
|
7750
|
-
if (existing) {
|
|
7751
|
-
if (existing.contentType !== args.file.mimeType || existing.conversationId !== args.conversationId || existing.filename !== args.file.filename || existing.provider !== (source?.provider ?? null) || existing.providerId !== (source?.id ?? null) || existing.storageProvider !== args.storage.provider || "sha256" in identity && existing.sha256 !== identity.sha256) throw new Error(`Attachment write conflicts with ${existing.id}`);
|
|
7752
|
-
if (existing.deleteRequestedAt === null) {
|
|
7753
|
-
await assertConversationNotPurged(args.db, args.conversationId);
|
|
7754
|
-
return { id: existing.id };
|
|
7755
|
-
}
|
|
7756
|
-
}
|
|
7757
|
-
await assertConversationNotPurged(args.db, args.conversationId);
|
|
7758
|
-
const { file } = args;
|
|
7759
|
-
let storageKey = null;
|
|
7760
|
-
let written;
|
|
7761
|
-
if ("deferred" in file) written = {
|
|
7762
|
-
bytes: file.bytes,
|
|
7763
|
-
sha256: null
|
|
7764
|
-
};
|
|
7765
|
-
else {
|
|
7766
|
-
storageKey = attachmentKey({
|
|
7767
|
-
attachmentId: id,
|
|
7768
|
-
conversationId: args.conversationId,
|
|
7769
|
-
filename: file.filename,
|
|
7770
|
-
writeId: randomUUID()
|
|
7771
|
-
});
|
|
7772
|
-
written = await writeAttachmentObject({
|
|
7773
|
-
file,
|
|
7774
|
-
key: storageKey,
|
|
7775
|
-
storage: args.storage
|
|
7776
|
-
});
|
|
7777
|
-
}
|
|
7778
|
-
if (existing?.deleteRequestedAt != null) {
|
|
7779
|
-
if (await isConversationPurged(args.db, args.conversationId)) {
|
|
7780
|
-
await bestEffortDelete(args.storage, storageKey);
|
|
7781
|
-
throw purgedConversationError(args.conversationId);
|
|
7782
|
-
}
|
|
7783
|
-
const oldStorageKey = existing.storageKey;
|
|
7784
|
-
if ((await args.db.db().with(conversationDetailTouch(args.db.db(), [args.conversationId])).update(juniorAttachments).set({
|
|
7785
|
-
...written,
|
|
7786
|
-
deleteRequestedAt: null,
|
|
7787
|
-
storageKey
|
|
7788
|
-
}).where(and(eq(juniorAttachments.id, id), isNotNull(juniorAttachments.deleteRequestedAt))).returning({ id: juniorAttachments.id })).length > 0) {
|
|
7789
|
-
if (await isConversationPurged(args.db, args.conversationId)) await rejectPurgedAttachmentWrite({
|
|
7790
|
-
conversationId: args.conversationId,
|
|
7791
|
-
db: args.db,
|
|
7792
|
-
id,
|
|
7793
|
-
now,
|
|
7794
|
-
storage: args.storage,
|
|
7795
|
-
storageKey
|
|
7796
|
-
});
|
|
7797
|
-
if (oldStorageKey !== storageKey) await bestEffortDelete(args.storage, oldStorageKey);
|
|
7798
|
-
return { id };
|
|
7799
|
-
}
|
|
7800
|
-
const [afterRace] = await args.db.db().select({
|
|
7801
|
-
deleteRequestedAt: juniorAttachments.deleteRequestedAt,
|
|
7802
|
-
id: juniorAttachments.id,
|
|
7803
|
-
storageKey: juniorAttachments.storageKey
|
|
7804
|
-
}).from(juniorAttachments).where(eq(juniorAttachments.id, id));
|
|
7805
|
-
if (afterRace?.deleteRequestedAt === null) return reuseLiveAttachment({
|
|
7806
|
-
conversationId: args.conversationId,
|
|
7807
|
-
db: args.db,
|
|
7808
|
-
id: afterRace.id,
|
|
7809
|
-
storage: args.storage,
|
|
7810
|
-
storageKey
|
|
7811
|
-
});
|
|
7812
|
-
}
|
|
7813
|
-
let inserted = [];
|
|
7814
|
-
try {
|
|
7815
|
-
inserted = await args.db.db().with(conversationDetailTouch(args.db.db(), [args.conversationId])).insert(juniorAttachments).values({
|
|
7816
|
-
id,
|
|
7817
|
-
conversationId: args.conversationId,
|
|
7818
|
-
storageProvider: args.storage.provider,
|
|
7819
|
-
storageKey,
|
|
7820
|
-
provider: source?.provider,
|
|
7821
|
-
providerId: source?.id,
|
|
7822
|
-
filename: args.file.filename,
|
|
7823
|
-
contentType: args.file.mimeType,
|
|
7824
|
-
...written,
|
|
7825
|
-
createdAt: now
|
|
7826
|
-
}).onConflictDoNothing({ target: juniorAttachments.id }).returning({ id: juniorAttachments.id });
|
|
7827
|
-
} catch (error) {
|
|
7828
|
-
await bestEffortDelete(args.storage, storageKey);
|
|
7829
|
-
throw error;
|
|
7830
|
-
}
|
|
7831
|
-
if (inserted.length > 0) {
|
|
7832
|
-
if (await isConversationPurged(args.db, args.conversationId)) await rejectPurgedAttachmentWrite({
|
|
7833
|
-
conversationId: args.conversationId,
|
|
7834
|
-
db: args.db,
|
|
7835
|
-
id,
|
|
7836
|
-
now,
|
|
7837
|
-
storage: args.storage,
|
|
7838
|
-
storageKey
|
|
7839
|
-
});
|
|
7840
|
-
return { id };
|
|
7841
|
-
}
|
|
7842
|
-
const [row] = await args.db.db().select({
|
|
7843
|
-
deleteRequestedAt: juniorAttachments.deleteRequestedAt,
|
|
7844
|
-
id: juniorAttachments.id,
|
|
7845
|
-
storageKey: juniorAttachments.storageKey
|
|
7846
|
-
}).from(juniorAttachments).where(eq(juniorAttachments.id, id));
|
|
7847
|
-
if (!row) {
|
|
7848
|
-
await bestEffortDelete(args.storage, storageKey);
|
|
7849
|
-
throw new Error(`Attachment row missing after write for ${id}`);
|
|
7850
|
-
}
|
|
7851
|
-
if (row.deleteRequestedAt === null) return reuseLiveAttachment({
|
|
7852
|
-
conversationId: args.conversationId,
|
|
7853
|
-
db: args.db,
|
|
7854
|
-
id: row.id,
|
|
7855
|
-
storage: args.storage,
|
|
7856
|
-
storageKey
|
|
7857
|
-
});
|
|
7858
|
-
if (await isConversationPurged(args.db, args.conversationId)) {
|
|
7859
|
-
await bestEffortDelete(args.storage, storageKey);
|
|
7860
|
-
throw purgedConversationError(args.conversationId);
|
|
7861
|
-
}
|
|
7862
|
-
if ((await args.db.db().with(conversationDetailTouch(args.db.db(), [args.conversationId])).update(juniorAttachments).set({
|
|
7863
|
-
...written,
|
|
7864
|
-
deleteRequestedAt: null,
|
|
7865
|
-
storageKey
|
|
7866
|
-
}).where(and(eq(juniorAttachments.id, id), isNotNull(juniorAttachments.deleteRequestedAt))).returning({ id: juniorAttachments.id })).length > 0) {
|
|
7867
|
-
if (await isConversationPurged(args.db, args.conversationId)) await rejectPurgedAttachmentWrite({
|
|
7868
|
-
conversationId: args.conversationId,
|
|
7869
|
-
db: args.db,
|
|
7870
|
-
id,
|
|
7871
|
-
now,
|
|
7872
|
-
storage: args.storage,
|
|
7873
|
-
storageKey
|
|
7874
|
-
});
|
|
7875
|
-
if (row.storageKey !== storageKey) await bestEffortDelete(args.storage, row.storageKey);
|
|
7876
|
-
return { id };
|
|
7877
|
-
}
|
|
7878
|
-
const [afterRace] = await args.db.db().select({
|
|
7879
|
-
deleteRequestedAt: juniorAttachments.deleteRequestedAt,
|
|
7880
|
-
id: juniorAttachments.id
|
|
7881
|
-
}).from(juniorAttachments).where(eq(juniorAttachments.id, id));
|
|
7882
|
-
if (afterRace?.deleteRequestedAt === null) return reuseLiveAttachment({
|
|
7883
|
-
conversationId: args.conversationId,
|
|
7884
|
-
db: args.db,
|
|
7885
|
-
id: afterRace.id,
|
|
7886
|
-
storage: args.storage,
|
|
7887
|
-
storageKey
|
|
7888
|
-
});
|
|
7889
|
-
await bestEffortDelete(args.storage, storageKey);
|
|
7890
|
-
throw new Error(`Attachment ${id} disappeared while reviving`);
|
|
7891
|
-
}
|
|
7892
|
-
/**
|
|
7893
|
-
* Record an object that a browser already wrote, under the upload's id.
|
|
7894
|
-
*
|
|
7895
|
-
* The row takes over the object key. A retry with the same id keeps the
|
|
7896
|
-
* first row. The caller checked the object's size, type, and digest.
|
|
7897
|
-
*/
|
|
7898
|
-
async function recordUploadedAttachment(args) {
|
|
7899
|
-
const { attachment } = args;
|
|
7900
|
-
const now = new Date(args.nowMs);
|
|
7901
|
-
await assertConversationNotPurged(args.db, attachment.conversationId);
|
|
7902
|
-
if ((await args.db.db().with(conversationDetailTouch(args.db.db(), [attachment.conversationId])).insert(juniorAttachments).values({
|
|
7903
|
-
...attachment,
|
|
7904
|
-
storageProvider: args.storage.provider,
|
|
7905
|
-
createdAt: now
|
|
7906
|
-
}).onConflictDoNothing({ target: juniorAttachments.id }).returning({ id: juniorAttachments.id })).length > 0 && await isConversationPurged(args.db, attachment.conversationId)) await rejectPurgedAttachmentWrite({
|
|
7907
|
-
conversationId: attachment.conversationId,
|
|
7908
|
-
db: args.db,
|
|
7909
|
-
id: attachment.id,
|
|
7910
|
-
now,
|
|
7911
|
-
storage: args.storage,
|
|
7912
|
-
storageKey: attachment.storageKey
|
|
7913
|
-
});
|
|
7914
|
-
}
|
|
7915
|
-
/** Load one live attachment owned by a conversation. */
|
|
7916
|
-
async function readLiveAttachment(args) {
|
|
7917
|
-
const [row] = await args.db.db().select({
|
|
7918
|
-
bytes: juniorAttachments.bytes,
|
|
7919
|
-
contentType: juniorAttachments.contentType,
|
|
7920
|
-
conversationId: juniorAttachments.conversationId,
|
|
7921
|
-
deleteRequestedAt: juniorAttachments.deleteRequestedAt,
|
|
7922
|
-
filename: juniorAttachments.filename,
|
|
7923
|
-
id: juniorAttachments.id,
|
|
7924
|
-
provider: juniorAttachments.provider,
|
|
7925
|
-
providerId: juniorAttachments.providerId,
|
|
7926
|
-
storageProvider: juniorAttachments.storageProvider,
|
|
7927
|
-
storageKey: juniorAttachments.storageKey
|
|
7928
|
-
}).from(juniorAttachments).where(and(eq(juniorAttachments.id, args.attachmentId), eq(juniorAttachments.conversationId, args.conversationId), isNull(juniorAttachments.deleteRequestedAt)));
|
|
7929
|
-
if (!row) return null;
|
|
7930
|
-
if (await isConversationPurged(args.db, args.conversationId)) return null;
|
|
7931
|
-
return {
|
|
7932
|
-
bytes: row.bytes,
|
|
7933
|
-
contentType: row.contentType,
|
|
7934
|
-
conversationId: row.conversationId,
|
|
7935
|
-
filename: row.filename,
|
|
7936
|
-
id: row.id,
|
|
7937
|
-
source: row.provider && row.providerId ? {
|
|
7938
|
-
id: row.providerId,
|
|
7939
|
-
provider: row.provider
|
|
7940
|
-
} : null,
|
|
7941
|
-
storageKey: row.storageKey,
|
|
7942
|
-
storageProvider: row.storageProvider
|
|
7943
|
-
};
|
|
7944
|
-
}
|
|
7945
|
-
/** Persist many conversation-owned files. */
|
|
7946
|
-
async function storeAttachments(args) {
|
|
7947
|
-
const stored = [];
|
|
7948
|
-
for (const file of args.files) stored.push(await storeAttachment({
|
|
7949
|
-
conversationId: args.conversationId,
|
|
7950
|
-
db: args.db,
|
|
7951
|
-
file: {
|
|
7952
|
-
data: file.data,
|
|
7953
|
-
filename: file.filename,
|
|
7954
|
-
mimeType: file.mimeType
|
|
7955
|
-
},
|
|
7956
|
-
...args.nowMs !== void 0 ? { nowMs: args.nowMs } : void 0,
|
|
7957
|
-
storage: args.storage
|
|
7958
|
-
}));
|
|
7959
|
-
return stored;
|
|
7960
|
-
}
|
|
7961
|
-
/** Mark attachments unavailable when their conversation content is purged. */
|
|
7962
|
-
async function requestAttachmentDeletion(db, conversationIds, nowMs) {
|
|
7963
|
-
if (conversationIds.length === 0) return;
|
|
7964
|
-
await db.db().with(conversationDetailTouch(db.db(), conversationIds)).update(juniorAttachments).set({ deleteRequestedAt: new Date(nowMs) }).where(and(inArray(juniorAttachments.conversationId, conversationIds), isNull(juniorAttachments.deleteRequestedAt)));
|
|
7965
|
-
}
|
|
7966
|
-
/**
|
|
7967
|
-
* Delete purged attachments in one bounded batch.
|
|
7968
|
-
*
|
|
7969
|
-
* Eligible rows are 30 days old, explicitly purge-marked, or owned by a
|
|
7970
|
-
* conversation whose transcript is already purged. Delete object keys first,
|
|
7971
|
-
* then remove rows that are still eligible so a failed blob delete remains
|
|
7972
|
-
* retryable.
|
|
7973
|
-
*/
|
|
7974
|
-
async function collectAttachmentGarbage(args) {
|
|
7975
|
-
const expiresBefore = /* @__PURE__ */ new Date(args.nowMs - ATTACHMENT_RETENTION_MS);
|
|
7976
|
-
const rows = await args.db.db().select({
|
|
7977
|
-
id: juniorAttachments.id,
|
|
7978
|
-
storageKey: juniorAttachments.storageKey
|
|
7979
|
-
}).from(juniorAttachments).innerJoin(juniorConversations, eq(juniorAttachments.conversationId, juniorConversations.conversationId)).where(and(eq(juniorAttachments.storageProvider, args.storage.provider), or(lte(juniorAttachments.createdAt, expiresBefore), isNotNull(juniorAttachments.deleteRequestedAt), isNotNull(juniorConversations.transcriptPurgedAt)))).orderBy(asc(juniorAttachments.createdAt), asc(juniorAttachments.id)).limit(args.limit ?? ATTACHMENT_GC_BATCH_LIMIT);
|
|
7980
|
-
if (rows.length === 0) return { deleted: 0 };
|
|
7981
|
-
const keys = rows.flatMap((row) => row.storageKey ? [row.storageKey] : []);
|
|
7982
|
-
if (keys.length > 0) await args.storage.delete(keys);
|
|
7983
|
-
const stillEligible = await args.db.db().select({ id: juniorAttachments.id }).from(juniorAttachments).innerJoin(juniorConversations, eq(juniorAttachments.conversationId, juniorConversations.conversationId)).where(and(inArray(juniorAttachments.id, rows.map((row) => row.id)), or(lte(juniorAttachments.createdAt, expiresBefore), isNotNull(juniorAttachments.deleteRequestedAt), isNotNull(juniorConversations.transcriptPurgedAt))));
|
|
7984
|
-
if (stillEligible.length === 0) return { deleted: 0 };
|
|
7985
|
-
const removed = await args.db.db().delete(juniorAttachments).where(inArray(juniorAttachments.id, stillEligible.map((row) => row.id))).returning({ conversationId: juniorAttachments.conversationId });
|
|
7986
|
-
await touchConversationDetail(args.db.db(), removed.map((row) => row.conversationId));
|
|
7987
|
-
return { deleted: removed.length };
|
|
7988
|
-
}
|
|
7989
7581
|
// src/chat/attachments/uploads.ts
|
|
7990
7582
|
const MINUTE_MS = 6e4;
|
|
7991
7583
|
/** Time that a browser has to write the bytes after it asks to upload. */
|
|
@@ -8736,7 +8328,7 @@ function createAddReviewItemTool(context, services) {
|
|
|
8736
8328
|
everyone: existing.assignedToEveryone,
|
|
8737
8329
|
userIds: existing.assignees.map((assignee) => assignee.userId)
|
|
8738
8330
|
} : await defaultAssignees(scope, context.conversationId);
|
|
8739
|
-
if (!assignees.everyone && assignees.userIds.length === 0 && !scope.actorIsPerson) throw new ToolInputError("No person would see this item: no default assignee has a
|
|
8331
|
+
if (!assignees.everyone && assignees.userIds.length === 0 && !scope.actorIsPerson) throw new ToolInputError("No person would see this item: no default assignee has a User, and this Turn has no person. Set `assignees`.");
|
|
8740
8332
|
await requireReviewItemAssignees({
|
|
8741
8333
|
assignees,
|
|
8742
8334
|
automationId: existing ? existing.automationId : scope.reader.automationId,
|
|
@@ -9706,6 +9298,9 @@ function createEditFileTool() {
|
|
|
9706
9298
|
}
|
|
9707
9299
|
});
|
|
9708
9300
|
}
|
|
9301
|
+
// src/chat/tool-support/result-cap.ts
|
|
9302
|
+
/** Default limit for the text that the model sees from one tool result. */
|
|
9303
|
+
const TOOL_RESULT_MAX_CHARS = 32e3;
|
|
9709
9304
|
const FULL_RESULT_DIR = "/tmp/jr";
|
|
9710
9305
|
function fullResultPath(toolCallId) {
|
|
9711
9306
|
const id = createHash("sha256").update(toolCallId).digest("hex").slice(0, 8);
|
|
@@ -10399,6 +9994,38 @@ function getTimeZoneOffsetMinutes(timestampMs, timezone) {
|
|
|
10399
9994
|
const asUtcMs = Date.UTC(parts.year, parts.month - 1, parts.day, parts.hour, parts.minute, parts.second);
|
|
10400
9995
|
return Math.round((timestampMs - asUtcMs) / 6e4);
|
|
10401
9996
|
}
|
|
9997
|
+
const submitFeedbackToolDefinition = zodToolDefinition({
|
|
9998
|
+
annotations: {
|
|
9999
|
+
destructiveHint: false,
|
|
10000
|
+
idempotentHint: false,
|
|
10001
|
+
openWorldHint: true,
|
|
10002
|
+
readOnlyHint: false
|
|
10003
|
+
},
|
|
10004
|
+
description: "Report a problem with your own tools or runtime to the maintainers, not to the user. Use it once when a tool failed, timed out, was too slow, returned wrong data, or was missing, such as a Sandbox that did not start. Skip it when the work went fine, or when the cause is the user's input, access, or a permission they control. Returns the feedback id.",
|
|
10005
|
+
inputSchema: z.object({ message: z.string().trim().min(1).max(4096).describe("What you tried, the tool and its error or delay, and whether you finished. Do not quote message text, file contents, secrets, or personal data.") }),
|
|
10006
|
+
outputSchema: juniorToolOutputSchema.extend({ feedback_id: z.string().describe("Id of the feedback sent to maintainers.") })
|
|
10007
|
+
});
|
|
10008
|
+
/**
|
|
10009
|
+
* Send the agent's report of a tool or runtime problem to the maintainers as
|
|
10010
|
+
* Sentry user feedback, next to the dashboard Reply ratings.
|
|
10011
|
+
*/
|
|
10012
|
+
function createSubmitFeedbackTool(context) {
|
|
10013
|
+
return zodTool({
|
|
10014
|
+
...submitFeedbackToolDefinition,
|
|
10015
|
+
execute: async (input) => {
|
|
10016
|
+
return { feedback_id: sentry_exports.captureFeedback({
|
|
10017
|
+
message: input.message,
|
|
10018
|
+
name: `${botConfig.userName} agent`,
|
|
10019
|
+
source: "junior_agent",
|
|
10020
|
+
tags: {
|
|
10021
|
+
"gen_ai.conversation.id": context.conversationId,
|
|
10022
|
+
...context.conversationPrivacy ? { "app.conversation.privacy": context.conversationPrivacy } : void 0
|
|
10023
|
+
},
|
|
10024
|
+
url: getDashboardConversationLink(context.conversationId)
|
|
10025
|
+
}) };
|
|
10026
|
+
}
|
|
10027
|
+
});
|
|
10028
|
+
}
|
|
10402
10029
|
const updateUserCustomizationToolDefinition = zodToolDefinition({
|
|
10403
10030
|
exposure: "deferred",
|
|
10404
10031
|
source: {
|
|
@@ -10426,7 +10053,7 @@ function createUpdateUserCustomizationTool(context) {
|
|
|
10426
10053
|
...updateUserCustomizationToolDefinition,
|
|
10427
10054
|
async execute(input) {
|
|
10428
10055
|
const user = (await context.resolveActorIdentity?.())?.user;
|
|
10429
|
-
if (!user) throw new ToolInputError("This person has no linked
|
|
10056
|
+
if (!user) throw new ToolInputError("This person has no linked User, so customization cannot be saved.");
|
|
10430
10057
|
if (!await saveUserCustomization(user.id, input.customization)) throw new Error("User customization target user was not found.");
|
|
10431
10058
|
return { customization: input.customization };
|
|
10432
10059
|
}
|
|
@@ -11291,17 +10918,14 @@ function createWebFetchTool(hooks, options = {}) {
|
|
|
11291
10918
|
// src/chat/tools/web/search.ts
|
|
11292
10919
|
const SEARCH_TIMEOUT_MS = 6e4;
|
|
11293
10920
|
const MAX_RESULTS = 5;
|
|
11294
|
-
const SEARCH_TOOL_NAME = "parallelSearch";
|
|
11295
10921
|
function asString(value) {
|
|
11296
10922
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
11297
10923
|
}
|
|
11298
|
-
function parseSearchResults(
|
|
11299
|
-
const typedResults = Array.isArray(toolResults) ? toolResults : [];
|
|
10924
|
+
function parseSearchResults(outputs, maxResults) {
|
|
11300
10925
|
const parsedResults = [];
|
|
11301
|
-
for (const
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
const results = Array.isArray(output?.results) ? output.results : [];
|
|
10926
|
+
for (const output of outputs) {
|
|
10927
|
+
const results = output?.results;
|
|
10928
|
+
if (!Array.isArray(results)) continue;
|
|
11305
10929
|
for (const result of results) {
|
|
11306
10930
|
const url = asString(result["url"]);
|
|
11307
10931
|
if (!url) continue;
|
|
@@ -11329,7 +10953,7 @@ const webSearchToolDefinition = zodToolDefinition({
|
|
|
11329
10953
|
}),
|
|
11330
10954
|
outputSchema: juniorToolOutputSchema
|
|
11331
10955
|
});
|
|
11332
|
-
function createWebSearchTool(modelId, override) {
|
|
10956
|
+
function createWebSearchTool(modelId, cost, override) {
|
|
11333
10957
|
return zodTool({
|
|
11334
10958
|
...webSearchToolDefinition,
|
|
11335
10959
|
execute: async ({ query, max_results }) => {
|
|
@@ -11339,35 +10963,15 @@ function createWebSearchTool(modelId, override) {
|
|
|
11339
10963
|
});
|
|
11340
10964
|
const maxResults = max_results ?? 3;
|
|
11341
10965
|
const controller = new AbortController();
|
|
11342
|
-
const
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
}) },
|
|
11352
|
-
toolChoice: {
|
|
11353
|
-
type: "tool",
|
|
11354
|
-
toolName: SEARCH_TOOL_NAME
|
|
11355
|
-
},
|
|
11356
|
-
abortSignal: controller.signal
|
|
11357
|
-
}), SEARCH_TIMEOUT_MS, "webSearch", { onTimeout: () => controller.abort() });
|
|
11358
|
-
setSpanAttributes({
|
|
11359
|
-
"gen_ai.response.finish_reasons": [response.finishReason],
|
|
11360
|
-
...extractGenAiUsageAttributes(response.usage)
|
|
11361
|
-
});
|
|
11362
|
-
return response;
|
|
11363
|
-
}, {
|
|
11364
|
-
"gen_ai.provider.name": GEN_AI_PROVIDER_NAME,
|
|
11365
|
-
"gen_ai.operation.name": "chat",
|
|
11366
|
-
"gen_ai.request.model": modelId,
|
|
11367
|
-
"server.address": GEN_AI_SERVER_ADDRESS,
|
|
11368
|
-
"server.port": 443,
|
|
11369
|
-
"gen_ai.provider.auth_mode": credential.mode
|
|
11370
|
-
})).toolResults, maxResults);
|
|
10966
|
+
const { outputs } = await withTimeout(searchWeb({
|
|
10967
|
+
operation: "web_search",
|
|
10968
|
+
cost,
|
|
10969
|
+
modelId,
|
|
10970
|
+
query,
|
|
10971
|
+
maxResults,
|
|
10972
|
+
signal: controller.signal
|
|
10973
|
+
}), SEARCH_TIMEOUT_MS, "webSearch", { onTimeout: () => controller.abort() });
|
|
10974
|
+
const results = parseSearchResults(outputs, maxResults);
|
|
11371
10975
|
return {
|
|
11372
10976
|
model: modelId,
|
|
11373
10977
|
query,
|
|
@@ -12416,6 +12020,7 @@ const CORE_TOOLS = {
|
|
|
12416
12020
|
updatePlan: always(updatePlanToolDefinition),
|
|
12417
12021
|
reportProgress: always(reportProgressToolDefinition),
|
|
12418
12022
|
systemTime: always(systemTimeToolDefinition),
|
|
12023
|
+
submitFeedback: always(submitFeedbackToolDefinition),
|
|
12419
12024
|
bash: always(bashToolDefinition),
|
|
12420
12025
|
readFile: always(readFileToolDefinition),
|
|
12421
12026
|
editFile: always(editFileToolDefinition),
|
|
@@ -12468,6 +12073,7 @@ const CORE_TOOLS = {
|
|
|
12468
12073
|
loadAttachment: RUN_BUILT,
|
|
12469
12074
|
publishImage: RUN_BUILT,
|
|
12470
12075
|
unpublishImage: RUN_BUILT,
|
|
12076
|
+
transcribeAudio: RUN_BUILT,
|
|
12471
12077
|
spawnAgent: {
|
|
12472
12078
|
when: hasAgents,
|
|
12473
12079
|
definition: () => spawnAgentToolDefinition
|
|
@@ -13943,4 +13549,4 @@ async function runCacheWarmup(message) {
|
|
|
13943
13549
|
}, startedAtMs, warm);
|
|
13944
13550
|
}, attributes);
|
|
13945
13551
|
}
|
|
13946
|
-
export {
|
|
13552
|
+
export { createBashTool as $, createSlackPublicSearchTool as $n, requireToolCreator as $r, childAgentInput as $t, createWebSearchTool as A, MIN_WARMUP_PREFIX_TOKENS as Ai, createPausedTurns as An, createSearchAutomationsTool as Ar, collectAttachmentUploadGarbage as At, createSystemTimeTool as B, deleteWebAuthorization as Bn, automationTriggerChangesSchema as Br, NON_TERMINAL_AGENT_INVOCATION_STATUSES as Bt, incrementStat as C, missingAutomationSkillReason as Ci, AgentMessagePausedError as Cn, createSlackCanvasEditTool as Cr, conversationTurnIdForMessage as Ct, requireReadyWorkspaceSnapshot as D, countOwnedAutomationsNeedingAttention as Di, PARENT_AGENT_TARGET as Dn, resolveWorkspacePath as Dr, webActorFromUser as Dt, processWorkspaceSnapshotJob as E, resolveTaskOutcomes as Ei, getAgentBinding as En, positiveInteger$1 as Er, recordWebConversationActivity as Et, userLookupIdentityProviders as F, canJoinTurn as Fn, zodToolDefinition as Fr, createRunOperatorSqlTool as Ft, createWriteFileTool as G, setConversationSubscription as Gn, injectContinuationToolName as Gr, getLatestAgentInvocationForConversation as Gt, createSearchEventTypesTool as H, AgentRunError as Hn, editedAutomationTask as Hr, getActiveAgentInvocationForConversation as Ht, lookupSlackBot as I, canShareTurn as In, automationIdForToolCall as Ir, createListWatchesTool as It, sliceFileContent as J, throwApiError as Jn, getConversationAccess as Jr, listPendingAgentInvocationMailboxAppends as Jt, createReadFileTool as K, emptyResponse as Kn, juniorToolOutputSchema as Kr, isTerminalAgentInvocation as Kt, lookupSlackUserProfile as L, isAttemptInterrupt as Ln, automationSkillToolSchema as Lr, listOwnedWatches as Lt, createWatchTimerTool as M, gapSegment as Mi, wakeAuthorizedTurn as Mn, createDeleteAutomationTool as Mr, verifyAttachmentUploads as Mt, createWatchEventsTool as N, wakePausedTurn as Nn, AUTOMATIONS_TOOL_SOURCE as Nr, writeAttachmentUpload as Nt, prepareWorkspaceSnapshot as O, IDLE_HORIZON_MS as Oi, supersedeOpenMailboxTurns as On, createOperationKey as Or, resolveConversationDestination as Ot, createUserLookupTool as P, getTurnAuthorization as Pn, zodTool as Pr, createReadConversationEventTool as Pt, editFile as Q, parseSlackMessageReference as Qn, requireToolCaller as Qr, sendsResultToParent as Qt, createUpdateUserCustomizationTool as R, selectAttemptMessages as Rn, automationToolResult as Rr, listChildAgents as Rt, createWorkspaceTools as S, findAutomationSkill as Si, AgentDepthLimitError as Sn, createSlackCanvasReadTool as Sr, appendAndEnqueueWebMessage as St, ensureWorkspaceSnapshotBuild as T, moveTaskOutcomes as Ti, findChildAgentConversationId as Tn, isMissingPathError as Tr, createConversationId as Tt, createSearchConversationEventsTool as U, executeTurn as Un, newAutomationTask as Ur, getAgentInvocation as Ut, createStopWatchingResourcesTool as V, getWebAuthorization as Vn, automationTriggerSchema as Vr, TERMINAL_AGENT_INVOCATION_STATUSES as Vt, createSearchConversationsTool as W, createSetConversationSubscriptionTool as Wn, triggerKind as Wr, getChildAgentLabel as Wt, capToolResult as X, renderAttachmentText as Xn, automationToolsDisabledReason as Xr, markAgentInvocationParentMailboxAppended as Xt, TOOL_RESULT_MAX_CHARS as Y, createSlackThreadReadTool as Yn, automationToolContext as Yr, listPendingAgentInvocationResults as Yt, createEditFileTool as Z, renderBlockText as Zn, requireToolAutomation as Zr, reportReplacedWithoutOpenWork as Zt, closeBreaker as _, changedEventMatch as _i, cancelSignInWait as _n, isConversationMember as _r, createUpdateReviewItemTool as _t, createCacheWarmingRecorder as a, deleteViewerTask as ai, logDroppedParentMessage as an, createSlackConversationSearchChannelPort as ar, createReportBlockedTool as at, coreToolSlots as b, AutomationEditError as bi, createAgentInvocationForMessage as bn, listThreadReplies as br, reviewItemChangeRecord as bt, isConversationWorkDone as c, ViewerTaskNotFoundError as ci, createAgentInvocationWorker as cn, readSlackRawMessageContext as cr, createMessageAgentTool as ct, addHistoryPeriod as d, readViewerAutomationRuns as di, endAgentInvocationsOfStoppedWork as dn, resolveSlackChannelRef as dr, archiveConversation as dt, requireToolDestination as ei, getChildAgentInputSender as en, createSlackListUpdateItemTool as er, createUpdatePlanTool as et, firstLiveSavingsDate as f, readViewerAutomationSummary as fi, enqueueAgentInvocation as fn, slackChannelRefParam as fr, conversationReadPositionQuery as ft, breakerStates as g, editEventAutomation as gi, stopChildAgentsOf as gn, getConversationInfo as gr, createSearchReviewItemsTool as gt, savingsTotals as h, editScheduledAutomation as hi, stopChildAgentsBelow as hn, getChannelMessage as hr, createAddReviewItemTool as ht, GLOBAL_GAPS_TTL_MS as i, changeViewerAutomationLifecycle as ii, isParentMessageMeta as in, createSlackConversationMessageSearchTool as ir, createReportProgressTool as it, createWebFetchTool as j, NO_REPLY_GAP_MS as ji, getPausedTurnRequest as jn, createRunAutomationNowTool as jr, createAttachmentUpload as jt, ingestEvent as k, MINUTE_MS$1 as ki, supersedeTurnForInput as kn, createCanvas as kr, AttachmentUploadError as kt, listConversationWork as l, readConversationSourceTask as li, createAndEnqueueAgentInvocation as ln, resolveSlackChannelIdFromMessage as lr, createArchiveAgentTool as lt, replaceHistorySavings as m, readViewerAutomations as mi, dropOwnUnreadLoopReplies as mn, joinPublicChannelForRead as mr, reportConversationRead as mt, CONVERSATION_STATE_TTL_MS as n, automationEditor as ni, routeChildInput as nn, createSlackListCreateTool as nr, createSpawnAgentTool as nt, segmentGapsKey as o, readViewerAutomationEdit as oi, parentMessageText as on, createSlackChannelListMessagesTool as or, createReplyTool as ot, idlePeriodSavings as p, readViewerAutomationVersions as pi, resolveAgentInvocationId as pn, checkSlackChannelReadAccess as pr, markConversationRead as pt, missingFileResult as q, jsonResponse as qn, makeStructuredToolOutput as qr, listAgentInvocationsForConversation as qt, GLOBAL_GAPS_MAX as r, changeAutomationLifecycle as ri, childAgentTurnOptions as rn, createSlackListAddItemsTool as rr, createListAgentsTool as rt, warmup_exports as s, updateViewerAutomation as si, readParentMessage as sn, parseSlackThreadId as sr, createNoReplyTool as st, ANSWER_TOOL_ENDINGS as t, activateViewerAutomationVersion as ti, readChildConversationSender as tn, createSlackListGetItemsTool as tr, createStopAgentTool as tt, SAVINGS_NAMESPACE as u, readViewerAutomationExecutions as ui, endActiveAgentInvocations as un, createSlackChannelJoinTool as ur, readLastUserMessageAtByConversation as ut, connectedState as v, requireEventAutomationTrigger as vi, completeCancelledConversationTurn as vn, isPublicSlackChannel as vr, deliverReviewItemChange as vt, readStats as w, effectiveTaskOutcomes as wi, AgentMessageTargetError as wn, SLACK_TOOL_SOURCE as wr, createAndEnqueueConversation as wt, enabledMode as x, requireAutomationSkill as xi, createAgentInvocationFromLatest as xn, createSlackCanvasWriteTool as xr, acceptsWebMessages as xt, providerCacheTtlMs as y, requireAutomationTaskText as yi, recordSubagentEnded as yn, joinPublicChannel as yr, renderReviewItemMessage as yt, createSubmitFeedbackTool as z, createWebAuthorization as zn, automationToolResultSchema as zr, listUnreportedSiblingAgents as zt };
|