@sentry/junior 0.302.0 → 0.303.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-Cx9fn9B3.js → adapter-context-BdVnSuY5.js} +2 -2
- package/dist/{admin-_poE5NKL.js → admin-AfeAdS3J.js} +2 -2
- package/dist/{agent-runner-CY9RvsTX.js → agent-runner-BP8_DLUv.js} +2987 -2948
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +6 -6
- package/dist/api.d.ts +13 -12
- package/dist/api.js +207 -80
- package/dist/{app-BpY3wtRP.d.ts → app-Dd9v1mNx.d.ts} +15 -15
- package/dist/app.d.ts +1 -1
- package/dist/app.js +63 -64
- package/dist/{automation-Cva5ZOwW.js → automation-D9MvhOWY.js} +3 -1
- package/dist/{background-compaction-queue-CXFq1_Cz.js → background-compaction-queue-xaE05jxH.js} +6 -6
- package/dist/{briefs-B3NG-pid.js → briefs-D8i-dKTp.js} +4 -4
- package/dist/{catalog-runtime-Dss0lSV6.js → catalog-runtime-d1EM6Z0V.js} +2 -2
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +21 -21
- package/dist/cli/check.js +8 -8
- package/dist/cli/env.d.ts +1 -0
- package/dist/cli/env.js +8 -7
- package/dist/cli/init.js +13 -4
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +6 -6
- package/dist/cli/snapshot-create.js +7 -5
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +5 -5
- package/dist/{config-CzeZiMKs.js → config-oGM7KA9M.js} +44 -63
- package/dist/{connections-CDYhMfrs.js → connections-BlikzEJv.js} +6 -6
- package/dist/{continue-in-slack-7Uf05ndC.js → continue-in-slack-BZnYifiG.js} +5 -5
- package/dist/{conversation-BNXfq6Lb.js → conversation-CY1jnBiC.js} +1 -1
- package/dist/{conversation-feed-Clf_cv0n.js → conversation-feed-BZJRk6UV.js} +1 -1
- package/dist/{conversation-privacy-D9xnM5mK.js → conversation-privacy-Cx515ddM.js} +7 -7
- package/dist/{conversation-turn-D7SEZgTG.js → conversation-turn-DAhRdX4m.js} +20 -23
- package/dist/{credential-sync-DoD0gW-j.js → credential-sync-DfhmWFeo.js} +18 -18
- package/dist/{db-B-gtnNjr.js → db-C-2tFxk3.js} +15 -15
- package/dist/{db-BdsCzytP.d.ts → db-DPqcEM9_.d.ts} +25 -25
- package/dist/{executor-DZg20EqU.js → executor-NVfS8aQ2.js} +14 -8
- package/dist/{history-IjdmO_r6.js → history-UZ3M2M9r.js} +13 -10
- package/dist/{install-t1KQyTUs.js → install-CHLrpRZc.js} +3 -3
- package/dist/instrumentation.d.ts +4 -4
- package/dist/instrumentation.js +10 -10
- package/dist/{lineage-C79GjoQr.js → lineage-HGLhd_-N.js} +2 -2
- package/dist/{logging-C9oDAg4M.js → logging-DiyqRLBx.js} +19 -19
- package/dist/{message-BLUCzJXN.js → message-CkCOcbFH.js} +9 -9
- package/dist/{model-input-5jwNC45G.js → model-input-DmoPPtPE.js} +4 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +7 -7
- package/dist/{oauth-callback-server-BBl66vCb.js → oauth-callback-server-CIf_6YmA.js} +5 -4
- package/dist/{oauth-relay-DRzq73b6.js → oauth-relay-DAmfVmJu.js} +3 -6
- package/dist/{package-discovery-DJhGdS4c.js → package-discovery-x4AvVhMj.js} +1 -1
- package/dist/{plugin-module-Cf5gVPWP.js → plugin-module-Cv2ETe8Y.js} +1 -1
- package/dist/{plugins-BBX07Jzt.js → plugins-Bkk0XRo2.js} +3 -3
- package/dist/{projection-CIBwgD3s.js → projection-DBq8tsA5.js} +221 -173
- package/dist/{prompt-CRQbzp5e.js → prompt-D2KlJopL.js} +4 -4
- package/dist/{queue-CZyYgPF0.d.ts → queue-CbEHUO0l.d.ts} +1 -1
- package/dist/{queue-DtCDaIct.js → queue-DFaOscp5.js} +4 -4
- package/dist/{registry-DdFQHZ_d.js → registry-Bu0Z9BEO.js} +37 -37
- package/dist/{resolve-CdW4BdrK.js → resolve-DXuA3G0g.js} +3 -3
- package/dist/{result-oOMv1t4O.js → result-DpiNseDA.js} +10 -15
- package/dist/rolldown-runtime-BKpuH2hG.js +26 -0
- package/dist/{runner-DqitLtm-.js → runner-iu1heRFv.js} +10 -10
- package/dist/{sandbox-egress-signals-Bw9I0yfJ.js → sandbox-egress-signals-2HFYDcQf.js} +1 -1
- package/dist/{schema-BIFM-U1a.d.ts → schema-DHMOaRzC.d.ts} +520 -13
- package/dist/{schema-DnVQepWP.js → schema-DvfX3Gq_.js} +77 -13
- package/dist/{secrets-DebYU866.js → secrets-DHaJ5TTn.js} +4 -4
- package/dist/{sentry-BRTJqumy.js → sentry-CPbZjomA.js} +3 -28
- package/dist/{sentry-route-name-BhwWnfqj.js → sentry-route-name-C6EIzAGP.js} +1 -1
- package/dist/{service-account-CrZftRTb.js → service-account-BcT5LR7V.js} +47 -47
- package/dist/{service-account-B6mKAPVo.js → service-account-xYkaQTrw.js} +3 -3
- package/dist/{session-stop-DW63Z3kj.js → session-stop-BLLp1IP_.js} +28 -35
- package/dist/{skills-C16fz60Z.js → skills-CNAGH4ju.js} +6 -9
- package/dist/{slack-conversation-unfurl-BHhefEb7.js → slack-conversation-unfurl-DYnqe5ci.js} +10 -15
- package/dist/{spawn-D_RnFYfy.js → spawn-cGasWW33.js} +7 -7
- package/dist/{legacy-web-actor-id-C-cEeWqL.js → state-CDS6h_Wv.js} +32 -32
- package/dist/{stop-7p1i08CY.js → stop-DMMA67yT.js} +221 -139
- package/dist/{store-C28I0CVW.js → store-Dgs7Oe44.js} +5 -5
- package/dist/{task-queue-BVUJbQ28.js → task-queue-DcF0nhhz.js} +3 -3
- package/dist/{task-runner-CWi8j7Z6.js → task-runner-BGXF7Fo7.js} +15 -18
- package/dist/{thread-context-D3-yYUd0.js → thread-context-BPky1KBe.js} +12 -12
- package/dist/{turn-session-routing-BFMS9ATF.js → turn-session-routing-DGvn9MSl.js} +32 -32
- package/dist/{turn-user-message-C3-O8Omt.js → turn-user-message-19CkuUvM.js} +3 -3
- package/dist/{validation-BSFKUIb4.js → validation-lu1DgjNQ.js} +2 -2
- package/dist/vercel.js +1 -1
- package/dist/{version-BHHXNi-0.js → version-Uo3c94Dx.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-B1SO21Qa.js → viewer-BPQHMx3-.js} +3 -3
- package/dist/{warmup-Bz9bzkzN.js → warmup-H8uLvW9e.js} +149 -130
- package/dist/{worker-BspReIIK.js → worker-B-pM_-3K.js} +9 -12
- package/migrations/0109_user_preferences.sql +1 -0
- package/migrations/0110_code_change_repository_state_index.sql +1 -0
- package/migrations/meta/0109_snapshot.json +4925 -0
- package/migrations/meta/0110_snapshot.json +4952 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +16 -19
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as loadTurnCheckpoint, $a as
|
|
3
|
-
import { D as resolveGatewayModel, X as bufferBody, Y as resolveGatewayCredential, _ as TURN_REASONING_LEVELS, b as GEN_AI_PROVIDER_NAME, i as getChatConfig, n as botConfig, q as isProviderRetryError, x as GEN_AI_SERVER_ADDRESS } from "./config-
|
|
4
|
-
import { E as withSpan, G as normalizeIdentityEmail, J as toOptionalString, h as logWarn, i as extractGenAiUsageAttributes, m as logInfo, o as getActiveTraceContext, p as logException, x as setSpanStatus, z as getDeploymentId } from "./logging-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { $ as loadTurnCheckpoint, $a as SANDBOX_RUNTIME, $i as loadSnapshotsForProfile, $o as isConversationScopedChannel, Ba as WorkspaceSnapshotNotReadyError, Bo as loadForkHistory, Cn as getTerminalAssistantMessages, Co as readConversationAccessFromSql, Cs as createPluginCache, Ea as openSlackDirectMessage, Fr as insertReviewItem, Gi as deleteWorkspace, Gr as canReadReviewItem, H as PluginCredentialFailureError, Ha as isWorkspaceSnapshotNotReadyError, Hr as PLUGIN_REVIEW_ITEM_KEY_PREFIX, Ia as isAbortError, Ji as listWorkspaces, Jo as SlackActionError, K as AuthorizationFlowDisabledError, Ki as getWorkspace, Li as getDashboardTaskLink, Mr as dismissOpenReviewItems, Nr as getOpenReviewItemByDedupeKey, Pr as getReviewItem, Qi as invalidateReadySnapshot, Qn as getOAuthAccountProviders, Qo as getSlackClient, T as resolveTaskTitle, Ta as getSlackMessagePermalink, Un as escapeClosingTags, Uo as matchSlackAttachments, Vr as updateReviewItemContent, Wi as createWorkspace, Wr as canAgentChangeReviewItem, X as clearPendingAuth, Xa as buildSandboxEgressNetworkPolicy, Xi as updateWorkspace, Xo as getFilePermalink, Xr as requireReviewItemAssignees, Yo as downloadPrivateSlackFile, Yr as readReviewItemAgentScope, Zi as WorkspaceValidationError, Zr as requireReviewItemLinks, _i as createWatch, _s as defaultTimezone, ai as resolveAssignees, as as withSlackRetries, at as failTurnRecord, bi as getWatch, bo as canAccessConversation, ci as getSlackToolContext, cn as replyTextSchema, di as RESOURCE_WATCH_TOOL_SOURCE, do as SANDBOX_WORKSPACE_ROOT, dr as getStaticPluginToolDefinitions, ds as searchConversations, ea as setWorkspaceSnapshot, et as lostWorkerBeforeFirstSave, fi as STOP_WATCHING_TOOL_NAME, fn as NO_REPLY_TOOL_NAME, gi as createTimerWatch, ia as isStale, ii as resolveAssignee, in as REPLY_TOOL_NAME, j as markConversationMessage, ji as getDashboardConversationLink, kr as closeReviewItem, li as RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS, lo as SANDBOX_REPOS_ROOT, mi as cancelWatch, mn as isLegacyNoReplyMarker, ms as createPluginAnnotations, na as create, ni as activeParticipantUserIds, no as ToolInputError, ns as normalizeSlackConversationId, nt as saveTurnCheckpoint, oa as getSandboxProvider, on as readTurnAnswer, os as sleep, pn as findLegacyNoReplyMarker, ps as saveObjectAnnotations, qa as createSandboxEgressCredentialToken, qi as getWorkspaceByName, qn as renderTag, ri as automationCreatorUserId, rn as isTurnExecutionLimitExceededError, rr as createPluginHookRunner, rt as abandonTurnRecord, s as openConversationProjection, st as getTurnRecord, ta as setWorkspaceSnapshotBuild, ti as EVERYONE_ASSIGNEE, to as workspaceRepoCheckoutPath, tt as pauseLostWorkerTurn, ui as RESOURCE_SUBSCRIPTION_MAX_TTL_MS, un as getAssistantReplyText, ur as getPlugins, v as hydrateConversationMessages, vi as deliverWatch, vn as REPORT_BLOCKED_TOOL_NAME, w as fallbackShortTitle, xi as listWatches, ya as slackMention, yi as findMatchingWatches, yo as createPluginLogger, zo as FORK_INSTRUCTIONS, zr as searchReviewItems } from "./projection-DBq8tsA5.js";
|
|
3
|
+
import { D as resolveGatewayModel, X as bufferBody, Y as resolveGatewayCredential, _ as TURN_REASONING_LEVELS, b as GEN_AI_PROVIDER_NAME, i as getChatConfig, n as botConfig, q as isProviderRetryError, x as GEN_AI_SERVER_ADDRESS } from "./config-oGM7KA9M.js";
|
|
4
|
+
import { E as withSpan, G as normalizeIdentityEmail, J as toOptionalString, h as logWarn, i as extractGenAiUsageAttributes, m as logInfo, o as getActiveTraceContext, p as logException, x as setSpanStatus, z as getDeploymentId } from "./logging-DiyqRLBx.js";
|
|
5
|
+
import { h as startSpan, n as captureMessage, u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
6
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-d1EM6Z0V.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-BLLp1IP_.js";
|
|
8
|
+
import { A as agentTypeInstructions, M as formatAgentTypes, Q as briefOutcomeStatusSchema, U as removedCardSchema, Z as briefLinkSchema, j as agentTypeSchema, k as AGENT_TYPES } from "./conversation-CY1jnBiC.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-D9MvhOWY.js";
|
|
5
10
|
import { d as parseSlackChannelReferenceId, f as parseSlackTeamId, o as isUserActor, p as parseSlackUserId, u as parseSlackChannelId, v as parseSlackMessageTs } from "./actor-D2iXzvlN.js";
|
|
6
|
-
import { $ as fenceLock, C as isPersonInput, D as turnBehavior, E as promptModeTurnTools, J as getStateAdapter, M as SYSTEM_IDENTITY_ID, O as conversationKindFromRow, P as resolveActorIdentityId, _t as sameDestination, a as getConversationStore, dt as conversationDetailTouch, et as withLock, ft as nextDetailVersion, g as setArchivedAt, h as readConversationTrees, i as getConversationMessageSearchStore, lt as resolveRootConversationId, m as conversationDescendants, o as getDb, p as conversationAncestors, pt as touchConversationDetail, r as getConversationEventStore, s as getSqlExecutor, ut as rootConversationIsArchived, w as isTopLevelKind, y as userMessageQueries } from "./db-
|
|
7
|
-
import { A as
|
|
8
|
-
import {
|
|
9
|
-
import { f as credentialContextForActor, p as credentialContextSchema } from "./registry-DdFQHZ_d.js";
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-Dss0lSV6.js";
|
|
11
|
-
import { t as discoverSkills } from "./skills-C16fz60Z.js";
|
|
12
|
-
import { r as EVENT_AUTHOR_ID, u as completeText } from "./prompt-CRQbzp5e.js";
|
|
11
|
+
import { $ as fenceLock, C as isPersonInput, D as turnBehavior, E as promptModeTurnTools, J as getStateAdapter, M as SYSTEM_IDENTITY_ID, O as conversationKindFromRow, P as resolveActorIdentityId, _t as sameDestination, a as getConversationStore, dt as conversationDetailTouch, et as withLock, ft as nextDetailVersion, g as setArchivedAt, h as readConversationTrees, i as getConversationMessageSearchStore, lt as resolveRootConversationId, m as conversationDescendants, o as getDb, p as conversationAncestors, pt as touchConversationDetail, r as getConversationEventStore, s as getSqlExecutor, ut as rootConversationIsArchived, w as isTopLevelKind, y as userMessageQueries } from "./db-C-2tFxk3.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-DGvn9MSl.js";
|
|
13
|
+
import { A as juniorAttachmentUploads, F as juniorDestinations, M as juniorConversations, N as juniorIdentities, P as juniorUsers, 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-NVfS8aQ2.js";
|
|
13
14
|
import { i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-cP0AACm1.js";
|
|
14
|
-
import {
|
|
15
|
-
import { A as agentTypeInstructions, M as formatAgentTypes, Q as briefOutcomeStatusSchema, U as removedCardSchema, Z as briefLinkSchema, j as agentTypeSchema, k as AGENT_TYPES } from "./conversation-BNXfq6Lb.js";
|
|
16
|
-
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-DW63Z3kj.js";
|
|
17
|
-
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-Cva5ZOwW.js";
|
|
18
|
-
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-BFMS9ATF.js";
|
|
15
|
+
import { t as discoverSkills } from "./skills-CNAGH4ju.js";
|
|
19
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";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
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-
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
17
|
+
import { f as identityAvatarUrl, h as readUserAvatarUrls } from "./viewer-BPQHMx3-.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-19CkuUvM.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-Dgs7Oe44.js";
|
|
20
|
+
import { d as contextProvenance, m as sameActorIdentity, t as KNOWN_CONVERSATION_EVENT_TYPES, u as agentInstructionProvenance } from "./history-UZ3M2M9r.js";
|
|
21
|
+
import { f as credentialContextForActor, p as credentialContextSchema } from "./registry-Bu0Z9BEO.js";
|
|
22
|
+
import { o as getVercelConversationWorkQueue, p as getTurnRequestDeadline } from "./background-compaction-queue-xaE05jxH.js";
|
|
23
|
+
import { r as EVENT_AUTHOR_ID, u as completeText } from "./prompt-D2KlJopL.js";
|
|
24
|
+
import { n as postinstall, o as getSandboxResources, t as dependencies } from "./install-CHLrpRZc.js";
|
|
25
|
+
import { a as sendCacheWarmup, c as sendWorkspaceSnapshotJob, s as sendNextWorkspaceSnapshotJob } from "./queue-DFaOscp5.js";
|
|
25
26
|
import * as z from "zod";
|
|
26
27
|
import { streamSimple } from "@earendil-works/pi-ai/compat";
|
|
27
28
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -41,7 +42,7 @@ import { NodeHtmlMarkdown } from "node-html-markdown";
|
|
|
41
42
|
import { structuredPatch } from "diff";
|
|
42
43
|
import { HTTPException } from "hono/http-exception";
|
|
43
44
|
import https from "node:https";
|
|
44
|
-
import { constants, zstdCompress, zstdDecompress } from "node:zlib";
|
|
45
|
+
import { constants, zstdCompress as zstdCompress$1, zstdDecompress as zstdDecompress$1 } from "node:zlib";
|
|
45
46
|
// src/chat/cache-warming/model.ts
|
|
46
47
|
/**
|
|
47
48
|
* Cost model for prompt cache warming.
|
|
@@ -75,7 +76,7 @@ const GAP_BIN_EDGES_MS = [
|
|
|
75
76
|
90 * MINUTE_MS$1,
|
|
76
77
|
120 * MINUTE_MS$1,
|
|
77
78
|
240 * MINUTE_MS$1,
|
|
78
|
-
|
|
79
|
+
1e400
|
|
79
80
|
];
|
|
80
81
|
const GAP_BIN_COUNT = GAP_BIN_EDGES_MS.length;
|
|
81
82
|
/**
|
|
@@ -383,29 +384,56 @@ function viewerAutomationCollection(viewer) {
|
|
|
383
384
|
task: sql`${automation.record}->'task'`.as("task")
|
|
384
385
|
}).from(automation).leftJoin(destination, and(eq(destination.provider, "slack"), eq(destination.providerTenantId, automation.teamId), eq(destination.providerDestinationId, automation.channelId))).where(and(ne(automation.status, "deleted"), or(owned, sharedToViewer))).as("accessible_automations");
|
|
385
386
|
}
|
|
387
|
+
function eventTriggerAvailable(catalog, trigger) {
|
|
388
|
+
const parsed = eventAutomationTriggerSchema.safeParse(trigger);
|
|
389
|
+
return parsed.success && registeredEventTriggerProblems(catalog, parsed.data).length === 0;
|
|
390
|
+
}
|
|
386
391
|
/**
|
|
387
392
|
* List the accessible event automations whose trigger cannot work with the
|
|
388
|
-
* enabled plugins.
|
|
389
|
-
* tools and the dashboard use, so SQL does not keep its own copy of the rules.
|
|
393
|
+
* enabled plugins.
|
|
390
394
|
*/
|
|
391
395
|
async function unavailableEventAutomationIds(collection) {
|
|
392
396
|
const catalog = automationEventCatalog(getEventCatalog());
|
|
393
397
|
return (await getDb().select({
|
|
394
398
|
id: collection.id,
|
|
395
399
|
trigger: collection.trigger
|
|
396
|
-
}).from(collection).where(eq(collection.kind, "event"))).flatMap((row) =>
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
+
}).from(collection).where(eq(collection.kind, "event"))).flatMap((row) => eventTriggerAvailable(catalog, row.trigger) ? [] : [row.id]);
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Build the filters for Automations whose trigger cannot work and for those
|
|
404
|
+
* that need attention: blocked, an unavailable trigger, or a last run that
|
|
405
|
+
* failed or blocked. Paused and completed Automations never need attention.
|
|
406
|
+
*/
|
|
407
|
+
async function attentionFilters(collection) {
|
|
408
|
+
const unavailableIds = await unavailableEventAutomationIds(collection);
|
|
409
|
+
const unavailable = unavailableIds.length > 0 ? inArray(collection.id, unavailableIds) : sql`false`;
|
|
410
|
+
return {
|
|
411
|
+
attention: and(notInArray(collection.state, ["paused", "completed"]), or(eq(collection.state, "blocked"), unavailable, eq(collection.lastRunNeedsAttention, true))),
|
|
412
|
+
unavailable
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
/**
|
|
416
|
+
* Count the viewer's own Automations that need attention, the rows that the
|
|
417
|
+
* Inbox lists from `scope=attention&owner=me`. One query reads the owned
|
|
418
|
+
* candidates, and the trigger check runs on the event ones.
|
|
419
|
+
*/
|
|
420
|
+
async function countOwnedAutomationsNeedingAttention(viewer) {
|
|
421
|
+
const collection = viewerAutomationCollection(viewer);
|
|
422
|
+
const rows = await getDb().select({
|
|
423
|
+
kind: collection.kind,
|
|
424
|
+
lastRunNeedsAttention: collection.lastRunNeedsAttention,
|
|
425
|
+
state: collection.state,
|
|
426
|
+
trigger: collection.trigger
|
|
427
|
+
}).from(collection).where(and(eq(collection.owned, true), notInArray(collection.state, ["paused", "completed"]), or(eq(collection.state, "blocked"), eq(collection.kind, "event"), eq(collection.lastRunNeedsAttention, true))));
|
|
428
|
+
const catalog = automationEventCatalog(getEventCatalog());
|
|
429
|
+
return rows.filter((row) => row.state === "blocked" || row.lastRunNeedsAttention || row.kind === "event" && !eventTriggerAvailable(catalog, row.trigger)).length;
|
|
400
430
|
}
|
|
401
431
|
/** Read an SQL page and complete, access-scoped counts and filter options. */
|
|
402
432
|
async function readAutomationCollection(viewer, input) {
|
|
403
433
|
const db = getDb();
|
|
404
434
|
const collection = viewerAutomationCollection(viewer);
|
|
405
|
-
const
|
|
406
|
-
const
|
|
407
|
-
const attention = and(notInArray(collection.state, ["paused", "completed"]), or(eq(collection.state, "blocked"), unavailable, eq(collection.lastRunNeedsAttention, true)));
|
|
408
|
-
const where = and(input.scope === "mine" ? eq(collection.owned, true) : input.scope === "public" ? eq(collection.isPublic, true) : input.scope === "attention" ? attention : void 0, input.type === "all" ? void 0 : eq(collection.kind, input.type), input.state === "all" ? void 0 : input.state === "unavailable" ? unavailable : eq(collection.state, input.state), input.creator ? eq(collection.creator, input.creator) : void 0, input.destination ? eq(collection.destination, input.destination) : void 0, input.skill ? eq(collection.skill, input.skill) : void 0, input.q ? sql`(strpos(lower(concat_ws(' ', ${collection.title}, ${collection.instruction}, ${collection.skill}, ${collection.resource})), ${input.q.toLowerCase()}) > 0 or strpos(${input.q.toLowerCase()}, lower(${collection.id})) > 0)` : void 0);
|
|
435
|
+
const { attention, unavailable } = await attentionFilters(collection);
|
|
436
|
+
const where = and(input.scope === "mine" ? eq(collection.owned, true) : input.scope === "public" ? eq(collection.isPublic, true) : input.scope === "attention" ? attention : void 0, input.type === "all" ? void 0 : eq(collection.kind, input.type), input.state === "all" ? void 0 : input.state === "unavailable" ? unavailable : eq(collection.state, input.state), input.creator ? eq(collection.creator, input.creator) : void 0, input.owner === "me" ? eq(collection.owned, true) : void 0, input.destination ? eq(collection.destination, input.destination) : void 0, input.skill ? eq(collection.skill, input.skill) : void 0, input.q ? sql`(strpos(lower(concat_ws(' ', ${collection.title}, ${collection.instruction}, ${collection.skill}, ${collection.resource})), ${input.q.toLowerCase()}) > 0 or strpos(${input.q.toLowerCase()}, lower(${collection.id})) > 0)` : void 0);
|
|
409
437
|
const [totals, counts, creators, destinations] = await Promise.all([
|
|
410
438
|
db.select({ total: count() }).from(collection).where(where),
|
|
411
439
|
db.select({
|
|
@@ -1879,11 +1907,11 @@ function isRecord(value) {
|
|
|
1879
1907
|
}
|
|
1880
1908
|
/** Bind continuation metadata to the exposed runtime tool name. */
|
|
1881
1909
|
function injectContinuationToolName(details, toolName) {
|
|
1882
|
-
if (!isRecord(details) || !isRecord(details
|
|
1910
|
+
if (!isRecord(details) || !isRecord(details["continuation"])) return details;
|
|
1883
1911
|
return {
|
|
1884
1912
|
...details,
|
|
1885
1913
|
continuation: juniorToolBoundContinuationSchema.parse({
|
|
1886
|
-
...details
|
|
1914
|
+
...details["continuation"],
|
|
1887
1915
|
tool_name: toolName
|
|
1888
1916
|
})
|
|
1889
1917
|
};
|
|
@@ -2585,32 +2613,32 @@ function firstChangedLine(oldLines, newLines) {
|
|
|
2585
2613
|
function prepareTextReplacementArguments(input) {
|
|
2586
2614
|
if (!input || typeof input !== "object") return input;
|
|
2587
2615
|
const raw = { ...input };
|
|
2588
|
-
if (typeof raw
|
|
2589
|
-
raw
|
|
2616
|
+
if (typeof raw["edits"] === "string") try {
|
|
2617
|
+
raw["edits"] = JSON.parse(raw["edits"]);
|
|
2590
2618
|
} catch {
|
|
2591
2619
|
return raw;
|
|
2592
2620
|
}
|
|
2593
|
-
const edits = Array.isArray(raw
|
|
2594
|
-
const oldText = raw
|
|
2595
|
-
const newText = raw
|
|
2621
|
+
const edits = Array.isArray(raw["edits"]) ? Array.from(raw["edits"]) : [];
|
|
2622
|
+
const oldText = raw["old_text"] ?? raw["oldText"];
|
|
2623
|
+
const newText = raw["new_text"] ?? raw["newText"];
|
|
2596
2624
|
if (typeof oldText === "string" && typeof newText === "string") edits.push({
|
|
2597
2625
|
old_text: oldText,
|
|
2598
2626
|
new_text: newText
|
|
2599
2627
|
});
|
|
2600
|
-
if (edits.length > 0) raw
|
|
2628
|
+
if (edits.length > 0) raw["edits"] = edits.map((edit) => {
|
|
2601
2629
|
if (!edit || typeof edit !== "object") return edit;
|
|
2602
2630
|
const record = edit;
|
|
2603
2631
|
const { oldText, newText, ...rest } = record;
|
|
2604
2632
|
return {
|
|
2605
2633
|
...rest,
|
|
2606
|
-
old_text: record
|
|
2607
|
-
new_text: record
|
|
2634
|
+
old_text: record["old_text"] ?? oldText,
|
|
2635
|
+
new_text: record["new_text"] ?? newText
|
|
2608
2636
|
};
|
|
2609
2637
|
});
|
|
2610
|
-
delete raw
|
|
2611
|
-
delete raw
|
|
2612
|
-
delete raw
|
|
2613
|
-
delete raw
|
|
2638
|
+
delete raw["oldText"];
|
|
2639
|
+
delete raw["old_text"];
|
|
2640
|
+
delete raw["newText"];
|
|
2641
|
+
delete raw["new_text"];
|
|
2614
2642
|
return raw;
|
|
2615
2643
|
}
|
|
2616
2644
|
/** Build a small line-oriented diff that gives agents enough context to review edits. */
|
|
@@ -4339,7 +4367,7 @@ function toText(value) {
|
|
|
4339
4367
|
function readText(value) {
|
|
4340
4368
|
if (typeof value === "string") return toText(value);
|
|
4341
4369
|
if (!value || typeof value !== "object") return void 0;
|
|
4342
|
-
return toText(value
|
|
4370
|
+
return toText(value["text"]);
|
|
4343
4371
|
}
|
|
4344
4372
|
function parseChildren(value, budget, depth) {
|
|
4345
4373
|
if (Array.isArray(value)) return value.slice(0, MAX_CHILDREN).flatMap((child) => parseChildren(child, budget, depth));
|
|
@@ -4349,49 +4377,49 @@ function parseElement(value, budget, depth) {
|
|
|
4349
4377
|
if (!value || typeof value !== "object" || depth > MAX_DEPTH || budget.remainingNodes <= 0) return [];
|
|
4350
4378
|
budget.remainingNodes -= 1;
|
|
4351
4379
|
const element = value;
|
|
4352
|
-
const type = toText(element
|
|
4353
|
-
const text = readText(element
|
|
4380
|
+
const type = toText(element["type"]);
|
|
4381
|
+
const text = readText(element["text"]);
|
|
4354
4382
|
if (type === "link") {
|
|
4355
|
-
const url = toText(element
|
|
4383
|
+
const url = toText(element["url"]);
|
|
4356
4384
|
return [text && url && text !== url ? `${text} (${url})` : text || url].filter((part) => Boolean(part));
|
|
4357
4385
|
}
|
|
4358
4386
|
if (type === "button") {
|
|
4359
|
-
const url = toText(element
|
|
4387
|
+
const url = toText(element["url"]);
|
|
4360
4388
|
return [text && url ? `${text} (${url})` : text].filter((part) => Boolean(part));
|
|
4361
4389
|
}
|
|
4362
4390
|
if (type === "emoji") {
|
|
4363
|
-
const name = toText(element
|
|
4391
|
+
const name = toText(element["name"]);
|
|
4364
4392
|
return name ? [`:${name}:`] : [];
|
|
4365
4393
|
}
|
|
4366
4394
|
if (type === "user") {
|
|
4367
|
-
const userId = toText(element
|
|
4395
|
+
const userId = toText(element["user_id"]);
|
|
4368
4396
|
return userId ? [`<@${userId}>`] : [];
|
|
4369
4397
|
}
|
|
4370
4398
|
if (type === "channel") {
|
|
4371
|
-
const channelId = toText(element
|
|
4399
|
+
const channelId = toText(element["channel_id"]);
|
|
4372
4400
|
return channelId ? [`<#${channelId}>`] : [];
|
|
4373
4401
|
}
|
|
4374
4402
|
if (type === "usergroup") {
|
|
4375
|
-
const usergroupId = toText(element
|
|
4403
|
+
const usergroupId = toText(element["usergroup_id"]);
|
|
4376
4404
|
return usergroupId ? [`<!subteam^${usergroupId}>`] : [];
|
|
4377
4405
|
}
|
|
4378
4406
|
if (type === "broadcast") {
|
|
4379
|
-
const range = toText(element
|
|
4407
|
+
const range = toText(element["range"]);
|
|
4380
4408
|
return range ? [`<!${range}>`] : [];
|
|
4381
4409
|
}
|
|
4382
4410
|
const parts = [
|
|
4383
4411
|
text,
|
|
4384
|
-
readText(element
|
|
4385
|
-
readText(element
|
|
4386
|
-
readText(element
|
|
4387
|
-
readText(element
|
|
4388
|
-
readText(element
|
|
4389
|
-
toText(element
|
|
4390
|
-
toText(element
|
|
4391
|
-
toText(element
|
|
4412
|
+
readText(element["title"]),
|
|
4413
|
+
readText(element["description"]),
|
|
4414
|
+
readText(element["label"]),
|
|
4415
|
+
readText(element["hint"]),
|
|
4416
|
+
readText(element["placeholder"]),
|
|
4417
|
+
toText(element["alt_text"]),
|
|
4418
|
+
toText(element["provider_name"]),
|
|
4419
|
+
toText(element["fallback"])
|
|
4392
4420
|
].filter((part) => Boolean(part));
|
|
4393
4421
|
for (const key of CHILD_KEYS) parts.push(...parseChildren(element[key], budget, depth + 1));
|
|
4394
|
-
if (type === "checkboxes" || type === "radio_buttons") parts.push(...parseChildren(element
|
|
4422
|
+
if (type === "checkboxes" || type === "radio_buttons") parts.push(...parseChildren(element["options"], budget, depth + 1));
|
|
4395
4423
|
return parts;
|
|
4396
4424
|
}
|
|
4397
4425
|
/** Render visible block text without exposing hidden interaction data. */
|
|
@@ -4414,15 +4442,15 @@ function toNum(value) {
|
|
|
4414
4442
|
function toFileRef(raw) {
|
|
4415
4443
|
if (!raw || typeof raw !== "object") return void 0;
|
|
4416
4444
|
const obj = raw;
|
|
4417
|
-
const id = toStr(obj
|
|
4445
|
+
const id = toStr(obj["id"]);
|
|
4418
4446
|
if (!id) return void 0;
|
|
4419
4447
|
return {
|
|
4420
4448
|
id,
|
|
4421
|
-
name: toStr(obj
|
|
4422
|
-
mimetype: toStr(obj
|
|
4423
|
-
size: toNum(obj
|
|
4424
|
-
url_private: toStr(obj
|
|
4425
|
-
url_private_download: toStr(obj
|
|
4449
|
+
name: toStr(obj["name"]),
|
|
4450
|
+
mimetype: toStr(obj["mimetype"]),
|
|
4451
|
+
size: toNum(obj["size"]),
|
|
4452
|
+
url_private: toStr(obj["url_private"]),
|
|
4453
|
+
url_private_download: toStr(obj["url_private_download"])
|
|
4426
4454
|
};
|
|
4427
4455
|
}
|
|
4428
4456
|
/**
|
|
@@ -4437,7 +4465,7 @@ function extractAttachmentFiles(input) {
|
|
|
4437
4465
|
const seen = /* @__PURE__ */ new Set();
|
|
4438
4466
|
for (const attachment of getAttachmentPayload(input)) {
|
|
4439
4467
|
if (!attachment || typeof attachment !== "object") continue;
|
|
4440
|
-
const rawFiles = attachment
|
|
4468
|
+
const rawFiles = attachment["files"];
|
|
4441
4469
|
if (!Array.isArray(rawFiles)) continue;
|
|
4442
4470
|
for (const rawFile of rawFiles) {
|
|
4443
4471
|
const fileRef = toFileRef(rawFile);
|
|
@@ -4451,14 +4479,14 @@ function extractAttachmentFiles(input) {
|
|
|
4451
4479
|
function getAttachmentPayload(input) {
|
|
4452
4480
|
if (Array.isArray(input)) return input;
|
|
4453
4481
|
if (!input || typeof input !== "object") return [];
|
|
4454
|
-
const attachments = input
|
|
4482
|
+
const attachments = input["attachments"];
|
|
4455
4483
|
return Array.isArray(attachments) ? attachments : [];
|
|
4456
4484
|
}
|
|
4457
4485
|
function renderField(raw) {
|
|
4458
4486
|
if (!raw || typeof raw !== "object") return void 0;
|
|
4459
4487
|
const obj = raw;
|
|
4460
|
-
const title = toStr(obj
|
|
4461
|
-
const value = toStr(obj
|
|
4488
|
+
const title = toStr(obj["title"]);
|
|
4489
|
+
const value = toStr(obj["value"])?.slice(0, MAX_FIELD_CHARS);
|
|
4462
4490
|
if (title && value) return `${title}: ${value}`;
|
|
4463
4491
|
return title || value;
|
|
4464
4492
|
}
|
|
@@ -4470,15 +4498,15 @@ function renderAttachment(raw) {
|
|
|
4470
4498
|
const obj = raw;
|
|
4471
4499
|
const parts = [];
|
|
4472
4500
|
const seen = /* @__PURE__ */ new Set();
|
|
4473
|
-
const fallback = toStr(obj
|
|
4474
|
-
const pretext = toStr(obj
|
|
4475
|
-
const authorName = toStr(obj
|
|
4476
|
-
const title = toStr(obj
|
|
4477
|
-
const titleLink = toStr(obj
|
|
4478
|
-
const text = toStr(obj
|
|
4479
|
-
const footer = toStr(obj
|
|
4480
|
-
const fields = Array.isArray(obj
|
|
4481
|
-
const blockText = renderBlockText(obj
|
|
4501
|
+
const fallback = toStr(obj["fallback"]);
|
|
4502
|
+
const pretext = toStr(obj["pretext"]);
|
|
4503
|
+
const authorName = toStr(obj["author_name"]);
|
|
4504
|
+
const title = toStr(obj["title"]);
|
|
4505
|
+
const titleLink = toStr(obj["title_link"]);
|
|
4506
|
+
const text = toStr(obj["text"]);
|
|
4507
|
+
const footer = toStr(obj["footer"]);
|
|
4508
|
+
const fields = Array.isArray(obj["fields"]) ? obj["fields"] : [];
|
|
4509
|
+
const blockText = renderBlockText(obj["blocks"]);
|
|
4482
4510
|
const add = (value) => {
|
|
4483
4511
|
if (!value) return;
|
|
4484
4512
|
const normalized = normalizeAttachmentText(value);
|
|
@@ -5390,8 +5418,9 @@ var AgentMessagePausedError = class extends Error {
|
|
|
5390
5418
|
}
|
|
5391
5419
|
};
|
|
5392
5420
|
/**
|
|
5393
|
-
* Cap the non-terminal
|
|
5394
|
-
* runs. Each message to a busy child queues one more.
|
|
5421
|
+
* Cap the non-terminal Agent invocations of one child, including the one that
|
|
5422
|
+
* runs. Each message to a busy child with a row queues one more. A child with
|
|
5423
|
+
* no row has no cap: its parent messages wait in its mailbox like any input.
|
|
5395
5424
|
*/
|
|
5396
5425
|
const MAX_OPEN_AGENT_INVOCATIONS_PER_CHILD = 4;
|
|
5397
5426
|
/**
|
|
@@ -5562,12 +5591,13 @@ async function createAgentInvocationForMessage(input, nowMs = Date.now()) {
|
|
|
5562
5591
|
const agentConfig = latest ?? await readAgentConfig(input.childConversationId) ?? {};
|
|
5563
5592
|
const open = await listOpenAgentInvocations(input.parentConversationId);
|
|
5564
5593
|
await assertCanGiveChildWork(input.parentConversationId, open);
|
|
5565
|
-
const openCount = open.filter((row) => row.childConversationId === input.childConversationId).length
|
|
5566
|
-
if (openCount >= MAX_OPEN_AGENT_INVOCATIONS_PER_CHILD) throw new AgentMessageQueueFullError(MAX_OPEN_AGENT_INVOCATIONS_PER_CHILD);
|
|
5594
|
+
const openCount = open.filter((row) => row.childConversationId === input.childConversationId).length;
|
|
5595
|
+
if (latest && openCount >= MAX_OPEN_AGENT_INVOCATIONS_PER_CHILD) throw new AgentMessageQueueFullError(MAX_OPEN_AGENT_INVOCATIONS_PER_CHILD);
|
|
5567
5596
|
await assertChildAgentCapacity(open, {
|
|
5568
5597
|
childConversationId: input.childConversationId,
|
|
5569
5598
|
parentConversationId: input.parentConversationId
|
|
5570
5599
|
});
|
|
5600
|
+
const queued = openCount > 0 || !latest && (await listOpenChildAgentsWithoutAgentInvocations(input.parentConversationId)).includes(input.childConversationId);
|
|
5571
5601
|
const invocation = await insertAgentInvocation({
|
|
5572
5602
|
actor: input.actor,
|
|
5573
5603
|
agentName: child.agentName,
|
|
@@ -5584,7 +5614,7 @@ async function createAgentInvocationForMessage(input, nowMs = Date.now()) {
|
|
|
5584
5614
|
if (!invocation) throw new Error(`Agent invocation creation raced for ${invocationId}`);
|
|
5585
5615
|
return {
|
|
5586
5616
|
invocation,
|
|
5587
|
-
queued
|
|
5617
|
+
queued
|
|
5588
5618
|
};
|
|
5589
5619
|
});
|
|
5590
5620
|
}
|
|
@@ -7086,15 +7116,6 @@ async function listOpenChildAgentsWithoutAgentInvocations(parentConversationId)
|
|
|
7086
7116
|
return (await listChildAgentsWithoutAgentInvocations(parentConversationId)).filter((child) => NON_TERMINAL_AGENT_INVOCATION_STATUSES.includes(child.status)).map((child) => child.childConversationId);
|
|
7087
7117
|
}
|
|
7088
7118
|
/**
|
|
7089
|
-
* Count the open parent messages of one child that no Agent invocation
|
|
7090
|
-
* names: each one that waits in its mailbox, and each open Turn, which runs
|
|
7091
|
-
* one. This is the queue that `MAX_OPEN_AGENT_INVOCATIONS_PER_CHILD` caps.
|
|
7092
|
-
*/
|
|
7093
|
-
async function countOpenParentMessages(childConversationId) {
|
|
7094
|
-
const [turns, work] = await Promise.all([listActiveMailboxTurns(childConversationId), getConversationWorkState({ conversationId: childConversationId })]);
|
|
7095
|
-
return turns.length + (work?.messages ?? []).filter((message) => readParentMessage(message) !== void 0).length;
|
|
7096
|
-
}
|
|
7097
|
-
/**
|
|
7098
7119
|
* List the child agents of one parent that no agent invocation names. Each
|
|
7099
7120
|
* stores its agent config, so older children of a parent, such as ones
|
|
7100
7121
|
* that a removed feature created, are not listed. A child is `running` while
|
|
@@ -7530,8 +7551,8 @@ function createReadConversationEventTool(context) {
|
|
|
7530
7551
|
function toolResultFields(data) {
|
|
7531
7552
|
if (data.type !== "tool_result") return void 0;
|
|
7532
7553
|
return {
|
|
7533
|
-
...typeof data
|
|
7534
|
-
...typeof data
|
|
7554
|
+
...typeof data["toolName"] === "string" && data["toolName"] ? { tool_name: data["toolName"] } : void 0,
|
|
7555
|
+
...typeof data["isError"] === "boolean" ? { is_error: data["isError"] } : void 0
|
|
7535
7556
|
};
|
|
7536
7557
|
}
|
|
7537
7558
|
/**
|
|
@@ -7543,7 +7564,7 @@ function eventText(data) {
|
|
|
7543
7564
|
switch (data.type) {
|
|
7544
7565
|
case "user_message":
|
|
7545
7566
|
case "assistant_message":
|
|
7546
|
-
case "tool_result": return contentText(data
|
|
7567
|
+
case "tool_result": return contentText(data["content"]);
|
|
7547
7568
|
case "message":
|
|
7548
7569
|
case "message_updated": return data.text;
|
|
7549
7570
|
default: return JSON.stringify(stripReplacementHistory(data), null, 2);
|
|
@@ -7557,10 +7578,10 @@ function contentText(content) {
|
|
|
7557
7578
|
function contentPartText(part) {
|
|
7558
7579
|
if (!part || typeof part !== "object") return "";
|
|
7559
7580
|
const value = part;
|
|
7560
|
-
switch (value
|
|
7561
|
-
case "text": return typeof value
|
|
7562
|
-
case "image": return `[image: ${typeof value
|
|
7563
|
-
case "toolCall": return `[tool call: ${String(value
|
|
7581
|
+
switch (value["type"]) {
|
|
7582
|
+
case "text": return typeof value["text"] === "string" ? value["text"] : "";
|
|
7583
|
+
case "image": return `[image: ${typeof value["mimeType"] === "string" ? value["mimeType"] : "unknown type"}]`;
|
|
7584
|
+
case "toolCall": return `[tool call: ${String(value["name"])} ${JSON.stringify(value["arguments"] ?? {})}]`;
|
|
7564
7585
|
default: return "";
|
|
7565
7586
|
}
|
|
7566
7587
|
}
|
|
@@ -9964,7 +9985,7 @@ const searchConversationsOutputSchema = juniorToolOutputSchema.extend({ conversa
|
|
|
9964
9985
|
function searchConversationsInputSchema(channels) {
|
|
9965
9986
|
return z.object({
|
|
9966
9987
|
query: z.string().trim().min(1).max(200).nullable().optional().describe("Words or meaning to match in the latest Brief, or words in the title."),
|
|
9967
|
-
annotation: z.string().trim().min(1).max(256).nullable().optional().describe("Linked resource key, such as owner/repo#123 for a pull request. Matches that key, or nested children that continue with #. Matches a conversation when it or one of its child agents created
|
|
9988
|
+
annotation: z.string().trim().min(1).max(256).nullable().optional().describe("Linked resource key, such as owner/repo#123 for a pull request. Matches that key, or nested children that continue with #. Matches a conversation when it or one of its child agents created or changed the resource."),
|
|
9968
9989
|
conversation_ids: z.array(z.string().trim().min(1)).min(1).max(CONVERSATION_IDS_MAX).nullable().optional().describe("Return only these conversation IDs."),
|
|
9969
9990
|
outcome: briefOutcomeStatusSchema.nullable().optional().describe("Outcome status of the latest Brief."),
|
|
9970
9991
|
after: z.string().datetime().nullable().optional().describe("Activity at or after this timestamp."),
|
|
@@ -11278,16 +11299,16 @@ function parseSearchResults(toolResults, maxResults) {
|
|
|
11278
11299
|
const typedResults = Array.isArray(toolResults) ? toolResults : [];
|
|
11279
11300
|
const parsedResults = [];
|
|
11280
11301
|
for (const toolResult of typedResults) {
|
|
11281
|
-
if (toolResult
|
|
11302
|
+
if (toolResult["type"] !== "tool-result" || toolResult["toolName"] !== SEARCH_TOOL_NAME) continue;
|
|
11282
11303
|
const output = toolResult.output;
|
|
11283
11304
|
const results = Array.isArray(output?.results) ? output.results : [];
|
|
11284
11305
|
for (const result of results) {
|
|
11285
|
-
const url = asString(result
|
|
11306
|
+
const url = asString(result["url"]);
|
|
11286
11307
|
if (!url) continue;
|
|
11287
11308
|
parsedResults.push({
|
|
11288
|
-
title: asString(result
|
|
11309
|
+
title: asString(result["title"]) ?? url,
|
|
11289
11310
|
url,
|
|
11290
|
-
snippet: asString(result
|
|
11311
|
+
snippet: asString(result["excerpt"]) ?? asString(result["snippet"]) ?? ""
|
|
11291
11312
|
});
|
|
11292
11313
|
if (parsedResults.length >= maxResults) return parsedResults;
|
|
11293
11314
|
}
|
|
@@ -12054,7 +12075,7 @@ const WORKSPACES_TOOL_SOURCE = {
|
|
|
12054
12075
|
};
|
|
12055
12076
|
/** Record optional reporting without changing the switchWorkspace outcome. */
|
|
12056
12077
|
async function tryRecordWorkspaceSwitchStat(workspace) {
|
|
12057
|
-
if (!process.env
|
|
12078
|
+
if (!process.env["DATABASE_URL"]) return;
|
|
12058
12079
|
try {
|
|
12059
12080
|
await incrementStat({
|
|
12060
12081
|
namespace: "junior",
|
|
@@ -12927,7 +12948,7 @@ function periodCounts(savings, warmed) {
|
|
|
12927
12948
|
};
|
|
12928
12949
|
}
|
|
12929
12950
|
async function addSavingsStats(modelId, counts) {
|
|
12930
|
-
if (!process.env
|
|
12951
|
+
if (!process.env["DATABASE_URL"]) return;
|
|
12931
12952
|
try {
|
|
12932
12953
|
await addStats(savingsStats(modelId, counts));
|
|
12933
12954
|
} catch (error) {
|
|
@@ -13024,8 +13045,8 @@ function savingsTotals(stats) {
|
|
|
13024
13045
|
* Conversation cannot keep an unbounded amount of image data in state.
|
|
13025
13046
|
* Removing its images would change the request, so it would miss the cache.
|
|
13026
13047
|
*/
|
|
13027
|
-
const zstdCompress
|
|
13028
|
-
const zstdDecompress
|
|
13048
|
+
const zstdCompress = promisify(zstdCompress$1);
|
|
13049
|
+
const zstdDecompress = promisify(zstdDecompress$1);
|
|
13029
13050
|
const SNAPSHOT_ZSTD_PARAMS = { params: { [constants.ZSTD_c_compressionLevel]: 1 } };
|
|
13030
13051
|
const MAX_SNAPSHOT_BYTES = 1048576;
|
|
13031
13052
|
const MAX_SNAPSHOT_IMAGE_BYTES = 33554432;
|
|
@@ -13068,7 +13089,7 @@ async function saveSnapshot(state, conversationId, key, context, ttlMs) {
|
|
|
13068
13089
|
data: `${IMAGE_REF_PREFIX}${sha256}`
|
|
13069
13090
|
};
|
|
13070
13091
|
};
|
|
13071
|
-
const snapshot = (await zstdCompress
|
|
13092
|
+
const snapshot = (await zstdCompress(JSON.stringify(snapshotContext(context, toRef)), SNAPSHOT_ZSTD_PARAMS)).toString("base64");
|
|
13072
13093
|
const size = {
|
|
13073
13094
|
bytes: snapshot.length,
|
|
13074
13095
|
imageCount: images.size,
|
|
@@ -13093,7 +13114,7 @@ async function saveSnapshot(state, conversationId, key, context, ttlMs) {
|
|
|
13093
13114
|
async function loadSnapshot(state, conversationId, key) {
|
|
13094
13115
|
const snapshot = await state.get(key);
|
|
13095
13116
|
if (!snapshot) return "stopped";
|
|
13096
|
-
const context = JSON.parse((await zstdDecompress
|
|
13117
|
+
const context = JSON.parse((await zstdDecompress(Buffer.from(snapshot, "base64"))).toString("utf8"));
|
|
13097
13118
|
for (const part of context.messages.flatMap(imageParts)) {
|
|
13098
13119
|
if (!part.data.startsWith(IMAGE_REF_PREFIX)) continue;
|
|
13099
13120
|
const sha256 = part.data.slice(7);
|
|
@@ -13286,14 +13307,14 @@ function createToolWaitWarmer(conversationId) {
|
|
|
13286
13307
|
stop();
|
|
13287
13308
|
if (waiting) returnedAtMs ??= Date.now();
|
|
13288
13309
|
},
|
|
13289
|
-
async end() {
|
|
13310
|
+
async end(turnEnded = false) {
|
|
13290
13311
|
stop();
|
|
13291
13312
|
const open = waiting;
|
|
13292
13313
|
const returned = returnedAtMs;
|
|
13293
13314
|
waiting = void 0;
|
|
13294
13315
|
returnedAtMs = void 0;
|
|
13295
13316
|
if (!open) return;
|
|
13296
|
-
await (await connectedState()).set(storedWaitKey(conversationId), storedWait(open), STORED_WAIT_TTL_MS);
|
|
13317
|
+
if (!turnEnded) await (await connectedState()).set(storedWaitKey(conversationId), storedWait(open), STORED_WAIT_TTL_MS);
|
|
13297
13318
|
if (returned !== void 0) {
|
|
13298
13319
|
await recordWait(returned - open.request.startedAtMs);
|
|
13299
13320
|
return;
|
|
@@ -13309,7 +13330,7 @@ function createToolWaitWarmer(conversationId) {
|
|
|
13309
13330
|
* changes nothing, so the idle period warms as without a timer.
|
|
13310
13331
|
*/
|
|
13311
13332
|
function earliestTimerDueIdleMs(watches, sinceMs, maxDueIdleMs) {
|
|
13312
|
-
const dueIdleMs = Math.min(...watches.map((watch) => watch.firesAtMs ??
|
|
13333
|
+
const dueIdleMs = Math.min(...watches.map((watch) => watch.firesAtMs ?? 1e400)) - sinceMs;
|
|
13313
13334
|
return dueIdleMs <= maxDueIdleMs ? dueIdleMs : void 0;
|
|
13314
13335
|
}
|
|
13315
13336
|
function askedReviewItem(messages, final) {
|
|
@@ -13487,14 +13508,7 @@ async function readSegmentState(conversationId, nowMs) {
|
|
|
13487
13508
|
* period (`generation`): the snapshot, the warmup count, and the gap claim.
|
|
13488
13509
|
* Work for an old idle period then cannot change a newer one.
|
|
13489
13510
|
*/
|
|
13490
|
-
var warmup_exports = /* @__PURE__ */ __exportAll({
|
|
13491
|
-
CONVERSATION_STATE_TTL_MS: () => CONVERSATION_STATE_TTL_MS,
|
|
13492
|
-
GLOBAL_GAPS_MAX: () => GLOBAL_GAPS_MAX,
|
|
13493
|
-
GLOBAL_GAPS_TTL_MS: () => GLOBAL_GAPS_TTL_MS,
|
|
13494
|
-
createCacheWarmingRecorder: () => createCacheWarmingRecorder,
|
|
13495
|
-
runCacheWarmup: () => runCacheWarmup,
|
|
13496
|
-
segmentGapsKey: () => segmentGapsKey
|
|
13497
|
-
});
|
|
13511
|
+
var warmup_exports = /* @__PURE__ */ __exportAll({ runCacheWarmup: () => runCacheWarmup });
|
|
13498
13512
|
/** Gaps kept in each segment list. */
|
|
13499
13513
|
const GLOBAL_GAPS_MAX = 2e3;
|
|
13500
13514
|
/** A segment list expires this long after its last gap. */
|
|
@@ -13502,6 +13516,11 @@ const GLOBAL_GAPS_TTL_MS = 43200 * MINUTE_MS$1;
|
|
|
13502
13516
|
const CONVERSATION_GAPS_MAX = 50;
|
|
13503
13517
|
/** The Turn count of a Conversation resets after this long with no call. */
|
|
13504
13518
|
const CONVERSATION_STATE_TTL_MS = 10080 * MINUTE_MS$1;
|
|
13519
|
+
/**
|
|
13520
|
+
* Answer tools that end the run without a final response. A child agent
|
|
13521
|
+
* answers its parent with `reply`. People often answer a Turn that posted
|
|
13522
|
+
* nothing or that ended blocked, so it warms like a reply.
|
|
13523
|
+
*/
|
|
13505
13524
|
const ANSWER_TOOL_ENDINGS = {
|
|
13506
13525
|
[REPLY_TOOL_NAME]: "reply",
|
|
13507
13526
|
[NO_REPLY_TOOL_NAME]: "no_reply",
|
|
@@ -13747,7 +13766,7 @@ function createCacheWarmingRecorder(conversationId, userActor, definitionsKey) {
|
|
|
13747
13766
|
},
|
|
13748
13767
|
stop: async () => {
|
|
13749
13768
|
try {
|
|
13750
|
-
await toolWait.end();
|
|
13769
|
+
await toolWait.end(answerToolEnding !== void 0);
|
|
13751
13770
|
} catch (error) {
|
|
13752
13771
|
logWarn("cache_warming.tool_wait.record_failed", { "exception.message": error instanceof Error ? error.message : String(error) });
|
|
13753
13772
|
}
|
|
@@ -13924,4 +13943,4 @@ async function runCacheWarmup(message) {
|
|
|
13924
13943
|
}, startedAtMs, warm);
|
|
13925
13944
|
}, attributes);
|
|
13926
13945
|
}
|
|
13927
|
-
export {
|
|
13946
|
+
export { createStopAgentTool as $, renderAttachmentText as $n, automationToolContext as $r, markAgentInvocationParentMailboxAppended as $t, createWebSearchTool as A, resolveTaskOutcomes as Ai, PARENT_AGENT_TARGET as An, positiveInteger$1 as Ar, verifyAttachmentUploads as At, createStopWatchingResourcesTool as B, isAttemptInterrupt as Bn, automationIdForToolCall as Br, listOwnedWatches as Bt, incrementStat as C, requireAutomationTaskText as Ci, createAgentInvocationForMessage as Cn, joinPublicChannel as Cr, createConversationId as Ct, requireReadyWorkspaceSnapshot as D, missingAutomationSkillReason as Di, AgentMessageTargetError as Dn, createSlackCanvasEditTool as Dr, AttachmentUploadError as Dt, processWorkspaceSnapshotJob as E, findAutomationSkill as Ei, AgentMessagePausedError as En, createSlackCanvasReadTool as Er, resolveConversationDestination as Et, userLookupIdentityProviders as F, NO_REPLY_GAP_MS as Fi, wakeAuthorizedTurn as Fn, createRunAutomationNowTool as Fr, storeAttachment as Ft, createReadFileTool as G, AgentRunError as Gn, automationTriggerSchema as Gr, getActiveAgentInvocationForConversation as Gt, createSearchConversationEventsTool as H, createWebAuthorization as Hn, automationToolResult as Hr, listUnreportedSiblingAgents as Ht, lookupSlackBot as I, gapSegment as Ii, wakePausedTurn as In, createDeleteAutomationTool as Ir, storeAttachments as It, capToolResult as J, setConversationSubscription as Jn, triggerKind as Jr, getLatestAgentInvocationForConversation as Jt, missingFileResult as K, executeTurn as Kn, editedAutomationTask as Kr, getAgentInvocation as Kt, lookupSlackUserProfile as L, getTurnAuthorization as Ln, AUTOMATIONS_TOOL_SOURCE as Lr, createReadConversationEventTool as Lt, createWatchTimerTool as M, IDLE_HORIZON_MS as Mi, supersedeTurnForInput as Mn, createOperationKey as Mr, collectAttachmentGarbage as Mt, createWatchEventsTool as N, MINUTE_MS$1 as Ni, createPausedTurns as Nn, createCanvas as Nr, readLiveAttachment as Nt, prepareWorkspaceSnapshot as O, effectiveTaskOutcomes as Oi, findChildAgentConversationId as On, SLACK_TOOL_SOURCE as Or, collectAttachmentUploadGarbage as Ot, createUserLookupTool as P, MIN_WARMUP_PREFIX_TOKENS as Pi, getPausedTurnRequest as Pn, createSearchAutomationsTool as Pr, requestAttachmentDeletion as Pt, createUpdatePlanTool as Q, createSlackThreadReadTool as Qn, getConversationAccess as Qr, listPendingAgentInvocationResults as Qt, createUpdateUserCustomizationTool as R, canJoinTurn as Rn, zodTool as Rr, createRunOperatorSqlTool as Rt, createWorkspaceTools as S, requireEventAutomationTrigger as Si, recordSubagentEnded as Sn, isPublicSlackChannel as Sr, createAndEnqueueConversation as St, ensureWorkspaceSnapshotBuild as T, requireAutomationSkill as Ti, AgentDepthLimitError as Tn, createSlackCanvasWriteTool as Tr, webActorFromUser as Tt, createSearchConversationsTool as U, deleteWebAuthorization as Un, automationToolResultSchema as Ur, NON_TERMINAL_AGENT_INVOCATION_STATUSES as Ut, createSearchEventTypesTool as V, selectAttemptMessages as Vn, automationSkillToolSchema as Vr, listChildAgents as Vt, createWriteFileTool as W, getWebAuthorization as Wn, automationTriggerChangesSchema as Wr, TERMINAL_AGENT_INVOCATION_STATUSES as Wt, editFile as X, jsonResponse as Xn, juniorToolOutputSchema as Xr, listAgentInvocationsForConversation as Xt, createEditFileTool as Y, emptyResponse as Yn, injectContinuationToolName as Yr, isTerminalAgentInvocation as Yt, createBashTool as Z, throwApiError as Zn, makeStructuredToolOutput as Zr, listPendingAgentInvocationMailboxAppends as Zt, closeBreaker as _, readViewerAutomationVersions as _i, dropOwnUnreadLoopReplies as _n, checkSlackChannelReadAccess as _r, renderReviewItemMessage as _t, createCacheWarmingRecorder as a, activateViewerAutomationVersion as ai, routeChildInput as an, createSlackListCreateTool as ar, createNoReplyTool as at, coreToolSlots as b, editEventAutomation as bi, cancelSignInWait as bn, getConversationInfo as br, appendAndEnqueueWebMessage as bt, isConversationWorkDone as c, changeViewerAutomationLifecycle as ci, logDroppedParentMessage as cn, createSlackConversationSearchChannelPort as cr, readLastUserMessageAtByConversation as ct, addHistoryPeriod as d, updateViewerAutomation as di, createAgentInvocationWorker as dn, readSlackRawMessageContext as dr, markConversationRead as dt, automationToolsDisabledReason as ei, reportReplacedWithoutOpenWork as en, renderBlockText as er, createSpawnAgentTool as et, firstLiveSavingsDate as f, ViewerTaskNotFoundError as fi, createAndEnqueueAgentInvocation as fn, resolveSlackChannelIdFromMessage as fr, reportConversationRead as ft, breakerStates as g, readViewerAutomationSummary as gi, resolveAgentInvocationId as gn, slackChannelRefParam as gr, deliverReviewItemChange as gt, savingsTotals as h, readViewerAutomationRuns as hi, enqueueAgentInvocation as hn, resolveSlackChannelRef as hr, createUpdateReviewItemTool as ht, GLOBAL_GAPS_TTL_MS as i, requireToolDestination as ii, readChildConversationSender as in, createSlackListGetItemsTool as ir, createReplyTool as it, createWebFetchTool as j, countOwnedAutomationsNeedingAttention as ji, supersedeOpenMailboxTurns as jn, resolveWorkspacePath as jr, writeAttachmentUpload as jt, ingestEvent as k, moveTaskOutcomes as ki, getAgentBinding as kn, isMissingPathError as kr, createAttachmentUpload as kt, listConversationWork as l, deleteViewerTask as li, parentMessageText as ln, createSlackChannelListMessagesTool as lr, archiveConversation as lt, replaceHistorySavings as m, readViewerAutomationExecutions as mi, endAgentInvocationsOfStoppedWork as mn, createSlackChannelJoinTool as mr, createSearchReviewItemsTool as mt, CONVERSATION_STATE_TTL_MS as n, requireToolCaller as ni, childAgentInput as nn, createSlackPublicSearchTool as nr, createReportProgressTool as nt, segmentGapsKey as o, automationEditor as oi, childAgentTurnOptions as on, createSlackListAddItemsTool as or, createMessageAgentTool as ot, idlePeriodSavings as p, readConversationSourceTask as pi, endActiveAgentInvocations as pn, resolveSlackChannelIdFromThreadId as pr, createAddReviewItemTool as pt, sliceFileContent as q, createSetConversationSubscriptionTool as qn, newAutomationTask as qr, getChildAgentLabel as qt, GLOBAL_GAPS_MAX as r, requireToolCreator as ri, getChildAgentInputSender as rn, createSlackListUpdateItemTool as rr, createReportBlockedTool as rt, warmup_exports as s, changeAutomationLifecycle as si, isParentMessageMeta as sn, createSlackConversationMessageSearchTool as sr, createArchiveAgentTool as st, ANSWER_TOOL_ENDINGS as t, requireToolAutomation as ti, sendsResultToParent as tn, parseSlackMessageReference as tr, createListAgentsTool as tt, SAVINGS_NAMESPACE as u, readViewerAutomationEdit as ui, readParentMessage as un, parseSlackThreadId as ur, conversationReadPositionQuery as ut, connectedState as v, readViewerAutomations as vi, stopChildAgentsBelow as vn, joinPublicChannelForRead as vr, reviewItemChangeRecord as vt, readStats as w, AutomationEditError as wi, createAgentInvocationFromLatest as wn, listThreadReplies as wr, recordWebConversationActivity as wt, enabledMode as x, changedEventMatch as xi, completeCancelledConversationTurn as xn, isConversationMember as xr, conversationTurnIdForMessage as xt, providerCacheTtlMs as y, editScheduledAutomation as yi, stopChildAgentsOf as yn, getChannelMessage as yr, acceptsWebMessages as yt, createSystemTimeTool as z, canShareTurn as zn, zodToolDefinition as zr, createListWatchesTool as zt };
|