@sentry/junior 0.320.0 → 0.321.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-DlLLoJKj.js → adapter-BkDQYdg6.js} +1 -1
- package/dist/{admin-BzRXDVfh.js → admin-XS3G9BOj.js} +1 -1
- package/dist/{agent-DxZ7nHfD.js → agent-CL9ZkOgx.js} +20 -17
- package/dist/{agent-update-delivery-CO4FU5Gg.js → agent-update-delivery-t0bXEgPs.js} +4 -4
- package/dist/api/schema.d.ts +2 -12
- package/dist/api/schema.js +4 -4
- package/dist/api.js +21 -21
- package/dist/{app-CHCFIIDu.d.ts → app-CwFRvmEH.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +21 -21
- package/dist/{change-record-K-KsqNhT.d.ts → change-record-CRuG9Mu3.d.ts} +1 -6
- package/dist/{channel-access-BghWqlXx.js → channel-access-BUHB0saC.js} +1 -1
- package/dist/{chat-core-engine-BgfSLrDu.js → chat-core-engine-DuBaPbqK.js} +4 -4
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +4 -4
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.js +2 -2
- package/dist/{continue-in-slack-DBlQP4PC.js → continue-in-slack-D9naZmqM.js} +3 -3
- package/dist/{conversation-feed-DEUdD7mb.js → conversation-feed-B1_1NJc8.js} +2 -12
- package/dist/{conversation-privacy-qoh95v90.js → conversation-privacy-C0mixZKx.js} +1 -1
- package/dist/{create-jZSaDrCR.js → create-CLV0M1vw.js} +2 -2
- package/dist/{credential-sync-Bj9-UlNE.js → credential-sync-DL9r-ry5.js} +11 -11
- package/dist/{db-BacvswT0.js → db-CbURDbaB.js} +23 -15
- package/dist/{deployment-BoJkRPDt.js → deployment-D9uPRDMD.js} +1 -1
- package/dist/{engine-context-Bi3Ync5t.js → engine-context-BP0h6u4m.js} +9 -9
- package/dist/{html-DW0pw5Pr.js → html-l4hKICAL.js} +4 -4
- package/dist/instrumentation.js +2 -2
- package/dist/{list-Dz3CdP3g.js → list-cGaO9_Hf.js} +12 -46
- package/dist/{logging-DsTnMqyi.js → logging-CqgOoICc.js} +1 -1
- package/dist/{markers-C33gNYNE.js → markers-BtUv4-oc.js} +18 -16
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-C-pEhAQK.js → oauth-callback-server-C3GxhsuB.js} +2 -2
- package/dist/{oauth-relay-DIXdH-io.js → oauth-relay-BGm6sLCB.js} +1 -1
- package/dist/{profile-v9vA3RvH.js → profile-bLo0h7Le.js} +12 -6
- package/dist/{prompt-C5CW2wKO.js → prompt-CX29OGO9.js} +1 -1
- package/dist/{reports-eBgrhPXS.js → reports-DeDCCu_H.js} +2 -2
- package/dist/{resolve-HVXmbeCr.js → resolve-D9RKNH3v.js} +5 -5
- package/dist/{result-BPNzgeTl.js → result-BFBwK1M2.js} +7 -7
- package/dist/{runner-aNSDTST6.js → runner-DNdoVQg8.js} +7 -7
- package/dist/{sandbox-egress-signals-nzp9Ykf7.js → sandbox-egress-signals-BBcCiEhm.js} +1 -1
- package/dist/{schema-BlTO5M1d.js → schema-RzsplzdI.js} +2 -2
- package/dist/{service-account-DWIf1t6p.js → service-account-B7E7OIFP.js} +2 -2
- package/dist/{skills-50izzzdK.js → skills-DMJsS5e4.js} +4 -4
- package/dist/{slack-conversation-unfurl-C6jXhVYg.js → slack-conversation-unfurl-EWYTnBZI.js} +7 -7
- package/dist/{storage-BtCxXiNt.js → storage-XD0lB4Gk.js} +2 -2
- package/dist/{system-prompt-table-CIR1B44Z.js → system-prompt-table-C886lsT9.js} +4 -4
- package/dist/{types-BNHkJrOP.js → types-CGgQ3-Bb.js} +1 -9
- package/dist/{users-DOVo9sdU.js → users-DBrcQl47.js} +1 -1
- package/dist/{validation-CK0vuEHB.js → validation-CofUHWqz.js} +1 -1
- package/dist/{version-BuLVNlxB.js → version-D_vbXyNw.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-C82kHU1R.js → worker-buhFcpl9.js} +4 -4
- package/package.json +6 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as resolveGatewayModel, L as botConfig, f as credentialContextForActor } from "./adapter-
|
|
2
|
-
import { $a as usdToMicroUsd,
|
|
3
|
-
import { St as contextProvenance, dt as agentHistoryFromRow, ft as encodeAgentHistoryPayload, gt as historyItemFromPiMessage, ht as HISTORY_REPLACEMENT_TYPES, mt as AGENT_HISTORY_ITEM_TYPES,
|
|
4
|
-
import { _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageSummary, m as logWarn, r as extractGenAiUsageAttributes } from "./logging-
|
|
5
|
-
import { h as SERVICE_INSTANCE_ID } from "./deployment-
|
|
6
|
-
import { G as mapBounded } from "./prompt-
|
|
7
|
-
import { a as toCanonicalInputMessage, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
8
|
-
import { $n as normalizeConversationText, Br as TurnToolCallLimitExceededError, Fr as turnTerminalKey, J as getPersistedThreadState, K as getLocationConfigurationService, Lr as TURN_LIMIT_WRAP_UP_MESSAGE, Pr as turnStartedKey, Rr as TurnBudgetExceededError, Wn as toStoredConversationMessage, Y as persistThreadRuntimeState, Zt as getWorkspace, dn as buildDeploymentSystemPrompt, q as getPersistedSandboxState, ti as reviewToolActions } from "./markers-
|
|
9
|
-
import { A as createBashTool, D as createWriteFileTool, E as createSystemTimeTool, O as createReadFileTool, c as createAgentSandbox, dn as isRetryableSlackPostError, k as createEditFileTool, l as normalizeToolResult, n as buildSandboxInput, u as capToolResult } from "./agent-
|
|
1
|
+
import { $ as resolveGatewayModel, L as botConfig, f as credentialContextForActor } from "./adapter-BkDQYdg6.js";
|
|
2
|
+
import { $a as usdToMicroUsd, $f as juniorTurnOutbox, Dp as juniorConversationEvents, Ff as agentTurnTotalTokens, Gr as QUEUE_SIGNATURE_MAX_AGE_MS, Jr as getQueueProvider, Kr as signQueueMessage, M as locationSchema, N as claimProviderConversation, Nf as addAgentTurnUsage, O as withConversationMutationLock, Op as juniorTurns, Pf as agentTurnCostUsd, Qa as microUsdToUsd, Qn as sendSlackReply, R as replaceConversationMetrics, Rp as juniorConversations, Td as getGatewayApiKey, _ as unseenEvents, a as getDb, d as createSqlConversationEventStore, ep as juniorTurnInbox, g as readEventCursor, h as insertEventRows, j as startLocationThread, js as resolveRootVisibility, o as getSqlExecutor, od as requestPrefixAttributes, pd as gatewayRoutingAttributes, qr as verifyQueueMessage, ti as runWithSlackInstallation, v as withConversationEventLock } from "./db-CbURDbaB.js";
|
|
3
|
+
import { Kn as usageTokensSchema, St as contextProvenance, dt as agentHistoryFromRow, ft as encodeAgentHistoryPayload, gt as historyItemFromPiMessage, ht as HISTORY_REPLACEMENT_TYPES, mt as AGENT_HISTORY_ITEM_TYPES, vt as isHistoryReplacement, wt as instructionProvenanceFor, yt as piMessageFromHistoryItem } from "./types-CGgQ3-Bb.js";
|
|
4
|
+
import { _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageSummary, m as logWarn, r as extractGenAiUsageAttributes } from "./logging-CqgOoICc.js";
|
|
5
|
+
import { h as SERVICE_INSTANCE_ID } from "./deployment-D9uPRDMD.js";
|
|
6
|
+
import { G as mapBounded } from "./prompt-CX29OGO9.js";
|
|
7
|
+
import { a as toCanonicalInputMessage, o as toCanonicalOutputMessage, r as resolveConversationPrivacy, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-C0mixZKx.js";
|
|
8
|
+
import { $n as normalizeConversationText, Br as TurnToolCallLimitExceededError, Fr as turnTerminalKey, J as getPersistedThreadState, K as getLocationConfigurationService, Lr as TURN_LIMIT_WRAP_UP_MESSAGE, Pr as turnStartedKey, Rr as TurnBudgetExceededError, Wn as toStoredConversationMessage, Y as persistThreadRuntimeState, Zt as getWorkspace, dn as buildDeploymentSystemPrompt, q as getPersistedSandboxState, ti as reviewToolActions } from "./markers-BtUv4-oc.js";
|
|
9
|
+
import { A as createBashTool, D as createWriteFileTool, E as createSystemTimeTool, O as createReadFileTool, c as createAgentSandbox, dn as isRetryableSlackPostError, k as createEditFileTool, l as normalizeToolResult, n as buildSandboxInput, u as capToolResult } from "./agent-CL9ZkOgx.js";
|
|
10
10
|
import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
|
|
11
11
|
import * as z from "zod";
|
|
12
12
|
import { streamSimple } from "@earendil-works/pi-ai/compat";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { L as botConfig } from "./adapter-
|
|
2
|
-
import {
|
|
3
|
-
import { G as mapBounded } from "./prompt-
|
|
4
|
-
import { pi as startOAuthFlow } from "./markers-
|
|
1
|
+
import { L as botConfig } from "./adapter-BkDQYdg6.js";
|
|
2
|
+
import { Jd as hasRequiredOAuthScope, Nd as getAppContext, Sc as deleteProviderIdentityForUser, ef as deleteMcpAuthSessionsForUserProvider, nf as deleteMcpStoredOAuthCredentials, o as getSqlExecutor, tf as deleteMcpServerSessionId, xc as deleteProviderIdentityForSlackUser } from "./db-CbURDbaB.js";
|
|
3
|
+
import { G as mapBounded } from "./prompt-CX29OGO9.js";
|
|
4
|
+
import { pi as startOAuthFlow } from "./markers-BtUv4-oc.js";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
// src/handlers/oauth-html.ts
|
|
7
7
|
/** Build pre-escaped callback HTML with the shared response security policy. */
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData, u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
2
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
2
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-C0mixZKx.js";
|
|
3
3
|
import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
|
|
4
4
|
import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
|
|
5
5
|
import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
|
|
6
6
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
7
|
-
import { _ as getDeploymentTelemetryAttributes, g as getDeploymentServiceVersion } from "./deployment-
|
|
7
|
+
import { _ as getDeploymentTelemetryAttributes, g as getDeploymentServiceVersion } from "./deployment-D9uPRDMD.js";
|
|
8
8
|
import { performance } from "node:perf_hooks";
|
|
9
9
|
import { subscribe, unsubscribe } from "node:diagnostics_channel";
|
|
10
10
|
// src/chat/pi/gateway-request-timing.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { $ as resolveGatewayModel, L as botConfig, R as getChatConfig, a as getStateValues, i as getStateAdapter, o as setStateValues } from "./adapter-
|
|
2
|
-
import { $ as canActOnInboxItem, $
|
|
3
|
-
import { $ as activityPreviewText, Lt as conversationTreeStateSchema, St as contextProvenance, Y as conversationReportStatusSchema, Z as conversationSurfaceSchema, Zt as readMessageAttachments,
|
|
4
|
-
import { T as withSpan, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { $ as resolveGatewayModel, L as botConfig, R as getChatConfig, a as getStateValues, i as getStateAdapter, o as setStateValues } from "./adapter-BkDQYdg6.js";
|
|
2
|
+
import { $ as canActOnInboxItem, $l as isThread, $s as isDmChannel, Ao as collectEventMatchKeys, Ap as juniorConversationAnnotations, Ar as readConversationAccessRows, As as isPublicConversation, Bi as slackMentionedUserIds, Bn as pushInboxSnoozeWakes, Bt as setTodoStatusByUser, Bu as storedMessageJson, C as conversationSlackTenantId, Cr as canAddConversationMessages, Cs as conversationAncestorsOrSelf, Dp as juniorConversationEvents, Dr as createConversationAccessReader, Ds as conversationSearchVector, Ed as JUNIOR_NATIVE_EVENT_NAMESPACE, Er as conversationAccessFromRows, Fr as readMemberParticipants, G as conversationStatusSql, Gc as takeInboxItem, Gi as createPluginState, Go as verifyEventAutomationCredentialSubject, Gp as juniorDestinations, Hc as listReplyActionItems, Hf as nextDetailVersion, Hi as applyPluginFormatMarkdown, Ho as bindScheduledAutomationCredentialSubject, If as agentTurnUsageSchema, Ip as juniorAttachments, Ir as rootVisibleToViewer, Ja as readAutomationTitlesByConversationId, K as conversationTurnFailedSql, Ko as verifyScheduledAutomationCredentialSubject, Kt as cancelHumanFacingPendingMessages, Ku as completeDecision, Lc as closeInboxItem, Lf as hasAgentTurnUsage, Lo as listConversationsWithWatches, Lp as juniorMessageAttachments, Lr as viewerMarksFromParticipant, Mr as conversationIsMemberRoot, Nc as waitingConversationIdsQuery, Nf as addAgentTurnUsage, Np as juniorCodeChanges, Nr as conversationIsNotUnsubscribedRoot, Oa as admitEventAutomationRun, Or as leaveEndsAccess, Pc as closeHandledReplyNotices, Po as findMatchingWatches, Pr as conversationPinnedForUser, Q as treeAwaitsAuthorization, Qi as basePluginContext, Rc as dismissOpenInboxItems, Rn as createInboxItemShow, Rp as juniorConversations, Rr as getVercelConversationWorkQueue, Rs as lookupSlackUser, S as setArchivedAt, Sa as findMatchingEventAutomations, Si as notifyAutomationBlocked, Sp as juniorConversationParticipants, St as inboxItemOwnedByThroughSubject, T as lastMessageAtSql, Ts as conversationSubtreeColumns, Tt as getPlugins, U as conversationIsActiveSql, Uc as ownerConversationId, Uo as bindSlackDirectCredentialSubject, Vi as wrapBareSlackUserIds, Vo as bindEventAutomationCredentialSubject, Vp as juniorIdentities, Wp as juniorUsers, X as awaitsAuthorizationFrom, Xc as INBOX_SUBJECT_KINDS, Xf as listedConversation, Y as conversationKindFromRow, Ya as recordAutomationExecution, Yc as itemQuestion, Yf as spaceLeadIds, Yn as safeLinkUrl, Yo as updateTimerIndex, Yr as buildSentryConversationUrl, Z as hasUnexpiredAuthorizationRequest, Zo as canPauseConversationDelivery, _l as settleInboxSnoozes, _o as slackChannelMessageRunsAutomation, _r as dismissPluginInboxItem, a as getDb, aa as createPluginCache, ai as buildDispatchId, an as getConversationWorkState, au as turnBehavior, br as takeOverPluginClose, bs as listConversationAnnotationsById, cc as createPluginUsers, ci as createOrGetDispatch, ct as inboxItemNeedsInput, er as createPluginEventPublisher, eu as isTopLevel, fi as getDispatchRecord, fo as getEventCatalog, go as slackChannelMessageReplyThreadTs, gr as createPluginInboxItems, gt as isPluginInboxItem, gu as eventGuidance, hi as isTerminalDispatchStatus, hl as listFiringInboxSnoozeTriggers, hr as PLUGIN_CHOICE_FIELD_ID, ht as isOnlyAssignee, i as getConversationStore, il as identityAvatarUrl, in as getConversation, ip as juniorTodos, it as conversationOwnsInboxItem, ja as automationVersionOf, ka as eventAutomationRunLimitReason, kl as parseDashboardConversationLink, kr as readConversationAccessFromSql, li as getDispatchConversationId, ll as userAvatarUrlsFromJoinedPhotos, lt as inboxItemPlugin, mi as getPluginDispatchProjection, mr as createPluginConversationChanges, mt as isInboxItemForEveryone, n as getConversationEventStore, nl as subjectTodo, no as AUTOMATION_ALERT_STEP_FIELD_ID, ns as annotationMatches, o as getSqlExecutor, ot as inboxItemAddedByAutomation, p as copyMessageLinks, pf as webActorUserIds, pp as juniorAutomations, pt as isAutomationAlertItem, pu as CORE_EVENT_NAMESPACE, q as conversationWaitsOnUserSql, qi as createPluginEmbedder, qo as verifySlackDirectCredentialSubject, rl as hasUserPhoto, rr as createPluginTaskStarter, rs as resolveAnnotationFilter, rt as canUserReadInboxItem, sp as juniorQuestions, ss as subjectKey, st as inboxItemForUser, to as AUTOMATION_ALERT_STEPS, tt as canAnswerInboxItem, u as isPostgresErrorCode, ul as SNOOZE_TIMER_EVENT_TYPE, up as juniorAutomationRuns, v as withConversationEventLock, va as blockEventAutomation, vp as juniorInboxItems, vr as hasAssigneeRoles, vs as createPluginConversationAnnotations, w as loadConversationSlackTenantIds, wr as canInviteToConversation, ws as conversationSubtree, x as readConversationTrees, xl as getDashboardConversationLink, xr as createPluginCodeChanges, y as conversationAncestors, ya as collectEventAutomationMatchKeys, yr as leavePluginInboxItem, ys as listConversationAnnotations, z as conversationCostOf, za as existingConversationId, zc as getInboxItem, zf as resolveRootConversationId, zi as slackMention, zs as lookupSlackUserNames } from "./db-CbURDbaB.js";
|
|
3
|
+
import { $ as activityPreviewText, Lt as conversationTreeStateSchema, On as automationTaskText, St as contextProvenance, Y as conversationReportStatusSchema, Z as conversationSurfaceSchema, Zt as readMessageAttachments, at as KNOWN_CONVERSATION_EVENT_TYPES, bn as normalizeUserInputAnswer, pn as inboxItemQuestion, t as OPEN_TODO_STATUSES, yn as isEmptyUserInputAnswer, yt as piMessageFromHistoryItem } from "./types-CGgQ3-Bb.js";
|
|
4
|
+
import { T as withSpan, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-CqgOoICc.js";
|
|
5
5
|
import { h as startSpan, n as captureMessage } from "./sentry-CPbZjomA.js";
|
|
6
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
7
|
-
import { G as mapBounded, h as createPluginLogger } from "./prompt-
|
|
6
|
+
import { t as JUNIOR_VERSION } from "./version-D_vbXyNw.js";
|
|
7
|
+
import { G as mapBounded, h as createPluginLogger } from "./prompt-CX29OGO9.js";
|
|
8
8
|
import { o as webMessageId } from "./agent-status-Bq_AIpyp.js";
|
|
9
|
-
import { D as notInheritedByForkChild, V as legacyWebMailboxMetadataSchema, _t as resolveBotSlackTeamId, dt as eventAuthorText, et as getWebAuthorization, gt as resolveEventAuthor, jt as renderTaskInput, kn as loadTurnProjection } from "./markers-
|
|
10
|
-
import { An as setConversationTitle, Ar as gapSegment, Bn as isFileAttachment, Bt as conversationRecordColumns, Cn as recordWebConversationActivity, Dr as MINUTE_MS, Et as resolveObjectCards, F as markConversationRead, Fn as jsonResponse, G as getSpaceLead, Gt as conversationEventHistory, H as setConversationSpaceForViewer, Ht as conversationRecordJoins, In as throwApiError, J as getProductionSlackAdapter, Jt as readConversationParticipants, Kt as conversationSummaryFromStoredConversation, L as deliverInboxItemChange, Lt as resolveSlackTeamDomains, Mn as leaveConversation, Nn as setConversationSubscription, On as verifyAttachmentUploads, P as conversationReadPositionQuery, Q as clearSlackPendingReactions, Qn as takeViewerAutomationAlertStep, Rn as slackAttachmentsVersionQuery, Sn as createConversationId, T as ingestEvent, Tn as AttachmentUploadError, Tr as providerCacheTtlMs, Tt as readLiveAnnotationsById, U as readSpaceRefs, Ut as readConversationRecordFromSql, V as requireSpaceForWork, Vt as conversationRecordFromRow, Wt as selectConversationRecords, Yt as readFirstHumanMessageTexts, _ as listConversationWork, _r as historyPeriodSavings, at as enqueueAgentDispatch, cr as AutomationEditError, d as ANSWER_TOOL_ENDINGS, dr as effectiveTaskOutcomes, dt as readConversationEventPage, en as imagePath, er as ViewerTaskNotFoundError, f as CONVERSATION_STATE_TTL_MS, ft as readConversationEventPageAfter, g as isConversationWorkDone, gr as firstLiveSavingsDate, h as segmentGapsKey, hr as addHistoryWarmupCost, j as archiveConversation, kr as NO_REPLY_GAP_MS, lr as findAutomationSkill, m as GLOBAL_GAPS_TTL_MS, mr as addHistoryPeriod, nr as readConversationSourceTask, p as GLOBAL_GAPS_MAX, pt as readConversationEventPageAround, qn as createPluginConversationWatches, qt as readConversationAuthors, rn as readConversationLineage, un as parseContent, ur as missingAutomationSkillReason, v as readLastUserMessageAtByConversation, vn as acceptsWebMessages, vr as replaceHistorySavings, vt as stopConversation, wn as webActorFromUser, wr as connectedState, wt as readLiveAnnotations, xn as createAndEnqueueConversation, yn as appendAndEnqueueWebMessage, zt as conversationFromRecordRow } from "./agent-
|
|
11
|
-
import { a as getChildAgentLabel } from "./result-
|
|
12
|
-
import { C as cancelConversationPendingMessagesBodySchema, D as conversationPendingMessageDeliverySchema, N as healthReportSchema, S as conversationAutoArchiveSchema, b as archiveConversationResponseSchema, c as conversationSubscriptionResponseSchema, g as pinConversationResponseSchema, h as pinConversationBodySchema, l as setConversationSpaceBodySchema, m as renameConversationResponseSchema, o as conversationLeaveResponseSchema, p as renameConversationBodySchema, r as stopConversationTurnResponseSchema, s as conversationSubscriptionBodySchema, u as setConversationSpaceResponseSchema, w as cancelConversationPendingMessagesResponseSchema, x as archiveDoneConversationsResponseSchema, y as archiveConversationBodySchema } from "./conversation-feed-
|
|
13
|
-
import { r as canContinueInSlack } from "./continue-in-slack-
|
|
9
|
+
import { D as notInheritedByForkChild, V as legacyWebMailboxMetadataSchema, _t as resolveBotSlackTeamId, dt as eventAuthorText, et as getWebAuthorization, gt as resolveEventAuthor, jt as renderTaskInput, kn as loadTurnProjection } from "./markers-BtUv4-oc.js";
|
|
10
|
+
import { An as setConversationTitle, Ar as gapSegment, Bn as isFileAttachment, Bt as conversationRecordColumns, Cn as recordWebConversationActivity, Dr as MINUTE_MS, Et as resolveObjectCards, F as markConversationRead, Fn as jsonResponse, G as getSpaceLead, Gt as conversationEventHistory, H as setConversationSpaceForViewer, Ht as conversationRecordJoins, In as throwApiError, J as getProductionSlackAdapter, Jt as readConversationParticipants, Kt as conversationSummaryFromStoredConversation, L as deliverInboxItemChange, Lt as resolveSlackTeamDomains, Mn as leaveConversation, Nn as setConversationSubscription, On as verifyAttachmentUploads, P as conversationReadPositionQuery, Q as clearSlackPendingReactions, Qn as takeViewerAutomationAlertStep, Rn as slackAttachmentsVersionQuery, Sn as createConversationId, T as ingestEvent, Tn as AttachmentUploadError, Tr as providerCacheTtlMs, Tt as readLiveAnnotationsById, U as readSpaceRefs, Ut as readConversationRecordFromSql, V as requireSpaceForWork, Vt as conversationRecordFromRow, Wt as selectConversationRecords, Yt as readFirstHumanMessageTexts, _ as listConversationWork, _r as historyPeriodSavings, at as enqueueAgentDispatch, cr as AutomationEditError, d as ANSWER_TOOL_ENDINGS, dr as effectiveTaskOutcomes, dt as readConversationEventPage, en as imagePath, er as ViewerTaskNotFoundError, f as CONVERSATION_STATE_TTL_MS, ft as readConversationEventPageAfter, g as isConversationWorkDone, gr as firstLiveSavingsDate, h as segmentGapsKey, hr as addHistoryWarmupCost, j as archiveConversation, kr as NO_REPLY_GAP_MS, lr as findAutomationSkill, m as GLOBAL_GAPS_TTL_MS, mr as addHistoryPeriod, nr as readConversationSourceTask, p as GLOBAL_GAPS_MAX, pt as readConversationEventPageAround, qn as createPluginConversationWatches, qt as readConversationAuthors, rn as readConversationLineage, un as parseContent, ur as missingAutomationSkillReason, v as readLastUserMessageAtByConversation, vn as acceptsWebMessages, vr as replaceHistorySavings, vt as stopConversation, wn as webActorFromUser, wr as connectedState, wt as readLiveAnnotations, xn as createAndEnqueueConversation, yn as appendAndEnqueueWebMessage, zt as conversationFromRecordRow } from "./agent-CL9ZkOgx.js";
|
|
11
|
+
import { a as getChildAgentLabel } from "./result-BFBwK1M2.js";
|
|
12
|
+
import { C as cancelConversationPendingMessagesBodySchema, D as conversationPendingMessageDeliverySchema, N as healthReportSchema, S as conversationAutoArchiveSchema, b as archiveConversationResponseSchema, c as conversationSubscriptionResponseSchema, g as pinConversationResponseSchema, h as pinConversationBodySchema, l as setConversationSpaceBodySchema, m as renameConversationResponseSchema, o as conversationLeaveResponseSchema, p as renameConversationBodySchema, r as stopConversationTurnResponseSchema, s as conversationSubscriptionBodySchema, u as setConversationSpaceResponseSchema, w as cancelConversationPendingMessagesResponseSchema, x as archiveDoneConversationsResponseSchema, y as archiveConversationBodySchema } from "./conversation-feed-B1_1NJc8.js";
|
|
13
|
+
import { r as canContinueInSlack } from "./continue-in-slack-D9naZmqM.js";
|
|
14
14
|
import * as z from "zod";
|
|
15
15
|
import { and, asc, count, desc, eq, gt, gte, inArray, isNotNull, isNull, lt, lte, min, ne, not, notInArray, or, sql } from "drizzle-orm";
|
|
16
16
|
import { alias } from "drizzle-orm/pg-core";
|
|
@@ -4609,37 +4609,6 @@ function feedMediaSql(db) {
|
|
|
4609
4609
|
const files = db.select({ files: sql`jsonb_agg(jsonb_build_object('contentType', ${recentFiles.contentType}, 'filename', ${recentFiles.filename}, 'id', ${recentFiles.id}) order by ${recentFiles.createdAt} desc, ${recentFiles.id} desc)` }).from(recentFiles);
|
|
4610
4610
|
return sql`(${files})`;
|
|
4611
4611
|
}
|
|
4612
|
-
// src/api/conversations/feed-answer.ts
|
|
4613
|
-
/**
|
|
4614
|
-
* A feed row column with the viewer's newest answered Inbox item of its
|
|
4615
|
-
* Conversation, or null. It is a scalar subquery on the row read, so the
|
|
4616
|
-
* answer costs no round trip of its own, however many items the viewer
|
|
4617
|
-
* closed since.
|
|
4618
|
-
*/
|
|
4619
|
-
function feedViewerAnswerSql(db, userId) {
|
|
4620
|
-
const answered = db.select({
|
|
4621
|
-
answer: sql`jsonb_build_object('answer', ${inboxItemAnswer}, 'closedAt', ${juniorInboxItems.closedAt}, 'request', ${inboxItemRequest})`.as("answer"),
|
|
4622
|
-
closedAt: juniorInboxItems.closedAt,
|
|
4623
|
-
id: juniorInboxItems.id,
|
|
4624
|
-
ownerId: inboxItemOwnerConversationId().as("owner_id")
|
|
4625
|
-
}).from(juniorInboxItems).leftJoin(juniorQuestions, itemQuestion).where(and(eq(juniorInboxItems.closedByUserId, userId), isNotNull(inboxItemAnswer), isNotNull(inboxItemRequest))).as("viewer_answered");
|
|
4626
|
-
const answers = db.selectDistinctOn([answered.ownerId], {
|
|
4627
|
-
answer: answered.answer,
|
|
4628
|
-
ownerId: answered.ownerId
|
|
4629
|
-
}).from(answered).where(isNotNull(answered.ownerId)).orderBy(answered.ownerId, desc(answered.closedAt), desc(answered.id)).as("viewer_answers");
|
|
4630
|
-
return sql`((select jsonb_object_agg(${answers.ownerId}, ${answers.answer}) from ${answers}) -> ${juniorConversations.conversationId})`;
|
|
4631
|
-
}
|
|
4632
|
-
/**
|
|
4633
|
-
* Keep only what a row says about the answer: when it closed and the
|
|
4634
|
-
* options that the viewer picked. Text answers have no choices.
|
|
4635
|
-
*/
|
|
4636
|
-
function feedViewerAnswer(stored) {
|
|
4637
|
-
if (!stored) return void 0;
|
|
4638
|
-
return {
|
|
4639
|
-
choices: answeredChoices(stored.request, stored.answer),
|
|
4640
|
-
closedAt: new Date(stored.closedAt).toISOString()
|
|
4641
|
-
};
|
|
4642
|
-
}
|
|
4643
4612
|
// src/api/page-cursor.ts
|
|
4644
4613
|
/**
|
|
4645
4614
|
* Encode the position after the last row of a page as an opaque `cursor`
|
|
@@ -4711,8 +4680,7 @@ async function conversationRows(db, { codeRepository, conversationIds, cursor, f
|
|
|
4711
4680
|
awaitingAuthorization: treeAwaitsAuthorization(juniorConversations.conversationId),
|
|
4712
4681
|
latestTurnFailed: conversationTurnFailedSql(juniorConversations),
|
|
4713
4682
|
links: include.includes("links") ? feedLinksSql(db) : sql`null`,
|
|
4714
|
-
media: include.includes("media") ? feedMediaSql(db) : sql`null
|
|
4715
|
-
viewerAnswer: filter?.kind === "viewer" ? feedViewerAnswerSql(db, filter.userId) : sql`null`
|
|
4683
|
+
media: include.includes("media") ? feedMediaSql(db) : sql`null`
|
|
4716
4684
|
}).from(juniorConversations).leftJoin(juniorDestinations, conversationRecordJoins.location).leftJoin(juniorIdentities, conversationRecordJoins.identity).leftJoin(juniorUsers, conversationRecordJoins.user).where(and(space ? conversationSpaceFilter(space.id, status, space.viewerUserId) : and(listedConversation(), conversationFeedMembershipFilter(status, filter)), conversationIds ? inArray(juniorConversations.conversationId, conversationIds) : void 0, waitingForUserId ? inArray(juniorConversations.conversationId, waitingConversationIdsQuery(db, waitingForUserId)) : void 0, pinnedForUserId ? pinnedForUserId.pinned ? conversationPinnedForUser(pinnedForUserId.userId) : not(conversationPinnedForUser(pinnedForUserId.userId)) : void 0, cursor ? sql`(${juniorConversations.lastActivityAt} < ${cursor.at}::timestamptz or (${juniorConversations.lastActivityAt} = ${cursor.at}::timestamptz and ${juniorConversations.conversationId} > ${cursor.conversationId}))` : void 0, codeRepository ? conversationCodeRepositoryFilter(codeRepository.id, codeRepository.viewerUserId) : void 0, query ? or(sql`strpos(lower(coalesce(${juniorConversations.title}, '')), ${query}) > 0`, and(includePrivateMatches ? void 0 : isPublicConversation(juniorConversations), sql`${conversationSearchVector} @@ websearch_to_tsquery('english', ${query})`), annotationMatch(db, {
|
|
4717
4685
|
includePrivate: includePrivateMatches,
|
|
4718
4686
|
query,
|
|
@@ -4970,7 +4938,6 @@ async function readConversationFeedFromSql(options = {}) {
|
|
|
4970
4938
|
const links = access?.canViewPrivateContent && row.links ? pickFeedLinks(conversation.conversationId, row.links, annotationUrls(visibleAnnotationsByConversation.get(conversation.conversationId))) : [];
|
|
4971
4939
|
const lastMessageAt = row.lastMessageAt?.toISOString();
|
|
4972
4940
|
const treeRead = treeStateByConversation.get(conversation.conversationId);
|
|
4973
|
-
const viewerAnswer = access?.canViewPrivateContent ? feedViewerAnswer(row.viewerAnswer) : void 0;
|
|
4974
4941
|
return {
|
|
4975
4942
|
...summary,
|
|
4976
4943
|
...work,
|
|
@@ -4982,7 +4949,6 @@ async function readConversationFeedFromSql(options = {}) {
|
|
|
4982
4949
|
...threads?.omittedThreadCount ? { omittedThreadCount: threads.omittedThreadCount } : void 0,
|
|
4983
4950
|
...participants && participants.length > 0 ? { participants } : void 0,
|
|
4984
4951
|
...activityPreview ? { activityPreview } : void 0,
|
|
4985
|
-
...viewerAnswer ? { viewerAnswer } : void 0,
|
|
4986
4952
|
...media?.length ? { media } : void 0,
|
|
4987
4953
|
...links.length > 0 ? { links } : void 0,
|
|
4988
4954
|
...sidebarAnnotationsByConversation[conversation.conversationId] ? { sidebarAnnotations: sidebarAnnotationsByConversation[conversation.conversationId] } : void 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-CPbZjomA.js";
|
|
2
|
-
import { _ as getDeploymentTelemetryAttributes } from "./deployment-
|
|
2
|
+
import { _ as getDeploymentTelemetryAttributes } from "./deployment-D9uPRDMD.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { $ as resolveGatewayModel, B as getSlackBotToken, L as botConfig, P as parseSlackMessageTs, R as getChatConfig, S as isUserActor, T as toStoredSlackActor, Y as TURN_REASONING_LEVELS, _ as createActor, a as getStateValues, f as credentialContextForActor, h as credentialSubjectSchema, i as getStateAdapter, k as parseSlackUserId, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-
|
|
3
|
-
import { $
|
|
4
|
-
import { Ct as instructionActors,
|
|
5
|
-
import { A as toOptionalString, O as isNativeIdentityProvider, S as summarizeMessageText, T as withSpan, _ as serializeGenAiAttribute, a as getActiveTraceContext, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
6
|
-
import { A as retainRuntimeTurnContext, B as authorAttrs, D as isToolResultError, G as mapBounded, I as TURN_CONTEXT_TAG, L as renderCurrentInstruction, M as trimTrailingAssistantMessages, O as isToolResultMessage, T as isContinuablePiBoundary, U as renderParentAgentTask, W as renderThreadContext, _ as extractAssistantText, c as SANDBOX_REPOS_ROOT, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger, j as stripRuntimeTurnContext, k as normalizeToolNameFromResult, w as isAssistantMessage, x as hasRuntimeTurnContext, y as getTerminalAssistantMessages, z as THREAD_CONTEXT_TAGS } from "./prompt-
|
|
7
|
-
import { a as toCanonicalInputMessage } from "./conversation-privacy-
|
|
8
|
-
import { a as parseSkillFile, i as openAiPolicyDisablesImplicitInvocation } from "./skills-
|
|
9
|
-
import { N as resolveSandboxEgressProviderForHost, O as parseSandboxEgressAuthRequiredSignal, f as findInErrorChain, n as hash, o as getSandboxProvider, u as SANDBOX_RUNTIME, x as executeCredentialedEgressRequest } from "./profile-
|
|
10
|
-
import { S as readBlockedReport, _ as NO_REPLY_TOOL_NAME, a as buildCapabilitySections, b as readNoReply, d as readTurnAnswer, g as sanitizeAssistantText, l as REPLY_TOOL_NAME, m as decideReply, n as buildPluginSections, o as buildTurnContextPrompt, s as readPluginContributions, t as buildModeSections, x as REPORT_BLOCKED_TOOL_NAME, y as isLegacyNoReplyMarker } from "./system-prompt-table-
|
|
2
|
+
import { $ as resolveGatewayModel, B as getSlackBotToken, L as botConfig, P as parseSlackMessageTs, R as getChatConfig, S as isUserActor, T as toStoredSlackActor, Y as TURN_REASONING_LEVELS, _ as createActor, a as getStateValues, f as credentialContextForActor, h as credentialSubjectSchema, i as getStateAdapter, k as parseSlackUserId, l as fenceLock, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-BkDQYdg6.js";
|
|
3
|
+
import { $s as isDmChannel, Cc as findLinkedSlackUser, Dd as agentsInstructionsUpdatedEvent, Dn as releaseInboundMessage, Dp as juniorConversationEvents, Ed as JUNIOR_NATIVE_EVENT_NAMESPACE, Eo as publishAgentUpdate, Et as getRegistrations, Eu as ToolInputError, Fn as readInboundMessageSender, Gp as juniorDestinations, Hf as nextDetailVersion, Ii as escapeSlackMrkdwnText, In as isEventMailboxMetadata, Is as findActorTimezone, Jo as verifyTimerWatchCredentialSubject, Ju as completeText, Li as formatSlackLink, Ml as projectConversationMessages, N as claimProviderConversation, Nd as getAppContext, Nf as addAgentTurnUsage, Od as authenticationLinkedEvent, Oi as postSlackEphemeralMessage, On as traceContextSchema, Pn as readParentMessage, Ql as isPersonInput, Rp as juniorConversations, Rr as getVercelConversationWorkQueue, Sd as getProviderErrorUserMessage, Ts as conversationSubtreeColumns, Tt as getPlugins, Ui as getPluginUserPromptContributions, Ut as appendAndEnqueueInboundMessage, W as conversationLastTurnOutcomeSql, Wp as juniorUsers, Wt as appendInboundMessage, Xo as JUNIOR_THREAD_STATE_TTL_MS, Xs as getSlackClient, Yl as dispatchInstructionsInvokeSkills, Zl as instructionAuthor, Zr as formatSentryEventReference, a as getDb, aa as createPluginCache, ac as sleep, ad as createCache, an as getConversationWorkState, ao as generateShortTitle, bd as findProviderError, bp as juniorAgentBindings, cu as EVENT_MESSAGE_AUTHOR, d as createSqlConversationEventStore, dr as readThroughHttpCache, ea as pluginConfigValues, fo as getEventCatalog, fu as isEventConversationMessage, gd as isCompactionSummaryText, gn as takePendingEventMessages, gu as eventGuidance, hn as stopConversationWork, i as getConversationStore, ic as withSlackRetries, io as fallbackShortTitle, j as startLocationThread, kd as conversationNoteEvent, ki as postSlackMessage, lu as EVENT_SYSTEM_ACTOR, n as getConversationEventStore, nn as dropPendingMessages, np as juniorWorkspaceRepos, o as getSqlExecutor, oa as getConfigDefaults, on as getConversationWorkStates, rp as juniorWorkspaces, su as EVENT_AUTHOR_ID, tp as juniorSnapshots, u as isPostgresErrorCode, ud as estimateTextTokens, uu as eventBotAuthorId, v as withConversationEventLock, vc as SYSTEM_IDENTITY_ID, vd as createAssistantProviderError, wc as findSlackUserByPrimaryEmail, ws as conversationSubtree, xd as getProviderErrorAttributes, yc as resolveActorIdentityId, yd as createProviderError, yp as juniorLocationConfigurations, zc as getInboxItem } from "./db-CbURDbaB.js";
|
|
4
|
+
import { Ct as instructionActors, Hn as isAgentUpdateEventType, St as contextProvenance, Vt as messageCardRef, bn as normalizeUserInputAnswer, bt as piMessageSchema, gt as historyItemFromPiMessage, nt as agentTypeInstructions, pn as inboxItemQuestion, rt as agentTypeSchema, vn as formatUserInputAnswer, wt as instructionProvenanceFor, xt as agentInstructionProvenance, yt as piMessageFromHistoryItem } from "./types-CGgQ3-Bb.js";
|
|
5
|
+
import { A as toOptionalString, O as isNativeIdentityProvider, S as summarizeMessageText, T as withSpan, _ as serializeGenAiAttribute, a as getActiveTraceContext, f as logException, m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-CqgOoICc.js";
|
|
6
|
+
import { A as retainRuntimeTurnContext, B as authorAttrs, D as isToolResultError, G as mapBounded, I as TURN_CONTEXT_TAG, L as renderCurrentInstruction, M as trimTrailingAssistantMessages, O as isToolResultMessage, T as isContinuablePiBoundary, U as renderParentAgentTask, W as renderThreadContext, _ as extractAssistantText, c as SANDBOX_REPOS_ROOT, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger, j as stripRuntimeTurnContext, k as normalizeToolNameFromResult, w as isAssistantMessage, x as hasRuntimeTurnContext, y as getTerminalAssistantMessages, z as THREAD_CONTEXT_TAGS } from "./prompt-CX29OGO9.js";
|
|
7
|
+
import { a as toCanonicalInputMessage } from "./conversation-privacy-C0mixZKx.js";
|
|
8
|
+
import { a as parseSkillFile, i as openAiPolicyDisablesImplicitInvocation } from "./skills-DMJsS5e4.js";
|
|
9
|
+
import { N as resolveSandboxEgressProviderForHost, O as parseSandboxEgressAuthRequiredSignal, f as findInErrorChain, n as hash, o as getSandboxProvider, u as SANDBOX_RUNTIME, x as executeCredentialedEgressRequest } from "./profile-bLo0h7Le.js";
|
|
10
|
+
import { S as readBlockedReport, _ as NO_REPLY_TOOL_NAME, a as buildCapabilitySections, b as readNoReply, d as readTurnAnswer, g as sanitizeAssistantText, l as REPLY_TOOL_NAME, m as decideReply, n as buildPluginSections, o as buildTurnContextPrompt, s as readPluginContributions, t as buildModeSections, x as REPORT_BLOCKED_TOOL_NAME, y as isLegacyNoReplyMarker } from "./system-prompt-table-C886lsT9.js";
|
|
11
11
|
import { t as isMissingVirtualModule } from "./virtual-module-BeKA_EII.js";
|
|
12
|
-
import { i as lookupSlackUserProfile, t as lookupActiveSlackWorkspaceMember } from "./users-
|
|
12
|
+
import { i as lookupSlackUserProfile, t as lookupActiveSlackWorkspaceMember } from "./users-DBrcQl47.js";
|
|
13
13
|
import { r as userCustomizationTextSchema, s as isVisionImageMediaType } from "./user-customization-CvfuY9Eo.js";
|
|
14
14
|
import * as z from "zod";
|
|
15
15
|
import { getCurrentSystemMessage, getSystemMessageText } from "@earendil-works/pi-ai/compat";
|
|
@@ -786,12 +786,14 @@ var ToolActionReviewLimitError = class extends Error {
|
|
|
786
786
|
}
|
|
787
787
|
};
|
|
788
788
|
/**
|
|
789
|
-
* True when an `auto` action must enter review. Only
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
*
|
|
789
|
+
* True when an `auto` action must enter review. Only Junior or plugin code
|
|
790
|
+
* can skip it: annotations that it declares on the tool, read-only and not
|
|
791
|
+
* destructive, or a remote MCP tool that the plugin lists by exact name in
|
|
792
|
+
* `mcp.guardian.skipReview`. Annotations that an MCP server sends reach
|
|
793
|
+
* Guardian only as hints, because a server can mark a write as read-only.
|
|
793
794
|
*/
|
|
794
|
-
function autoActionNeedsReview({ annotations }) {
|
|
795
|
+
function autoActionNeedsReview({ annotations }, resolved) {
|
|
796
|
+
if (resolved?.skipReview) return false;
|
|
795
797
|
return !(annotations?.readOnlyHint === true && annotations.destructiveHint !== true);
|
|
796
798
|
}
|
|
797
799
|
function actionActor(actor) {
|
|
@@ -932,7 +934,7 @@ async function prepareToolActionReview(action, context, priorRejections) {
|
|
|
932
934
|
const { tool, input } = action;
|
|
933
935
|
if (!mayNeedReview(tool)) return;
|
|
934
936
|
const resolved = await tool.resolveApprovalMetadata?.(input);
|
|
935
|
-
if (tool.approvalMode === "auto" && !autoActionNeedsReview(tool)) return;
|
|
937
|
+
if (tool.approvalMode === "auto" && !autoActionNeedsReview(tool, resolved)) return;
|
|
936
938
|
assertAuthoritativeContext(context);
|
|
937
939
|
const proposal = buildProposal(action.toolName, tool, input, resolved, context, priorRejections, await context.rootConversation?.(), action.script);
|
|
938
940
|
return {
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as JuniorPluginSet } from "./plugins-DhGXZjlu.js";
|
|
2
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
2
|
+
import { r as JuniorDashboardOptions } from "./app-CwFRvmEH.js";
|
|
3
3
|
import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
|
|
4
4
|
type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
|
|
5
5
|
type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
|
package/dist/nitro.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as toOptionalTrimmed, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, g as resolvePackageDir, h as isValidPackageName, i as PLUGIN_TASK_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as discoverInstalledPluginPackageContent, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./topics-DxuKurCX.js";
|
|
2
2
|
import { t as startLocalVercelQueueServer } from "./local-server-CpnGhYml.js";
|
|
3
3
|
import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
|
|
4
|
-
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-
|
|
4
|
+
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-D9uPRDMD.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-D_Ru4CWc.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cv2ETe8Y.js";
|
|
7
7
|
import path from "node:path";
|
|
@@ -252,7 +252,7 @@ function injectVirtualConfig(nitro, options) {
|
|
|
252
252
|
*/
|
|
253
253
|
function injectVirtualSystemPrompts(nitro, options) {
|
|
254
254
|
nitro.options.virtual["#junior/system-prompts"] = async () => {
|
|
255
|
-
const { buildSystemPromptTable } = await import("./system-prompt-table-
|
|
255
|
+
const { buildSystemPromptTable } = await import("./system-prompt-table-C886lsT9.js").then((n) => n.r);
|
|
256
256
|
const table = await buildSystemPromptTable(await options.loadPlugins(), options.botName);
|
|
257
257
|
return `export const systemPrompts = ${JSON.stringify(table)};`;
|
|
258
258
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
2
|
-
import { A as createUserTokenStore } from "./profile-
|
|
1
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DL9r-ry5.js";
|
|
2
|
+
import { A as createUserTokenStore } from "./profile-bLo0h7Le.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { R as getChatConfig } from "./adapter-
|
|
2
|
+
import { R as getChatConfig } from "./adapter-BkDQYdg6.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { SignJWT, jwtVerify } from "jose";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-
|
|
2
|
-
import {
|
|
3
|
-
import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-
|
|
4
|
-
import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-BkDQYdg6.js";
|
|
2
|
+
import { Df as CredentialMintError, Id as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, Ld as resolveAuthTokenPlaceholder, Mf as workloadIdentityHeader, Nd as getAppContext, Of as CredentialUnavailableError, Rd as mergeHeaderTransforms, Tt as getPlugins, a as getDb, aa as createPluginCache, ac as sleep, df as readEncryptedState, ff as findLegacyWebActorUserId, gf as resolvePluginCommandEnv, ia as runNonInteractiveCommand, kf as ServiceAccountUnavailableError, mf as resolveApiHeaderTransforms, uf as createEncryptedState } from "./db-CbURDbaB.js";
|
|
3
|
+
import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-CX29OGO9.js";
|
|
4
|
+
import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-CqgOoICc.js";
|
|
5
5
|
import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
6
6
|
import { r as continueTrace } from "./sentry-CPbZjomA.js";
|
|
7
7
|
import * as z from "zod";
|
|
@@ -1117,12 +1117,18 @@ async function responseTextWithinLimit(upstream, maxBytes) {
|
|
|
1117
1117
|
}
|
|
1118
1118
|
const body = clone.body;
|
|
1119
1119
|
if (!body) return "";
|
|
1120
|
+
const reader = body.getReader();
|
|
1120
1121
|
const chunks = [];
|
|
1121
1122
|
let bytes = 0;
|
|
1122
1123
|
try {
|
|
1123
|
-
|
|
1124
|
+
while (true) {
|
|
1125
|
+
const { done, value } = await reader.read();
|
|
1126
|
+
if (done) break;
|
|
1124
1127
|
bytes += value.byteLength;
|
|
1125
|
-
if (bytes > limit)
|
|
1128
|
+
if (bytes > limit) {
|
|
1129
|
+
reader.cancel().catch(() => void 0);
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1126
1132
|
chunks.push(value);
|
|
1127
1133
|
}
|
|
1128
1134
|
} catch {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as logException, m as logWarn, p as logInfo } from "./logging-
|
|
1
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-CqgOoICc.js";
|
|
2
2
|
import { escapeClosingTags, escapeTagText, escapeTagTextAndQuotes, findTag, openingTag, readTag, renderTag, startsWithTag, stripTags, unescapeClosingTags, unescapeTagText } from "@sentry/junior-plugin-api";
|
|
3
3
|
import pLimit from "p-limit";
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Et as getRegistrations, Gi as createPluginState, Qi as basePluginContext, fr as createPluginConversationEventStats } from "./db-
|
|
2
|
-
import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-
|
|
1
|
+
import { Et as getRegistrations, Gi as createPluginState, Qi as basePluginContext, fr as createPluginConversationEventStats } from "./db-CbURDbaB.js";
|
|
2
|
+
import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-CX29OGO9.js";
|
|
3
3
|
// src/chat/plugins/hooks/reports.ts
|
|
4
4
|
const OPERATIONAL_REPORT_MAX_METRICS = 8;
|
|
5
5
|
const OPERATIONAL_REPORT_MAX_WIDGETS = 12;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { R as getChatConfig, i as getStateAdapter } from "./adapter-
|
|
2
|
-
import { ac as sleep, ia as runNonInteractiveCommand } from "./db-
|
|
3
|
-
import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-
|
|
4
|
-
import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-
|
|
5
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { R as getChatConfig, i as getStateAdapter } from "./adapter-BkDQYdg6.js";
|
|
2
|
+
import { ac as sleep, ia as runNonInteractiveCommand } from "./db-CbURDbaB.js";
|
|
3
|
+
import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-CX29OGO9.js";
|
|
4
|
+
import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-bLo0h7Le.js";
|
|
5
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-CqgOoICc.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
// src/chat/sandbox/resources.ts
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Eo as publishAgentUpdate, Fn as readInboundMessageSender, an as getConversationWorkState,
|
|
2
|
-
import { Jt as buildDeterministicTurnId, L as listActiveMailboxTurns, O as enqueueAutomatedInput, S as getAgentReplyMessageId, b as readAgentConfig, c as resultAuthorId, f as readChildConversationSender, it as EVENT_WAIT_MS, k as getConversationStoppedAtMs, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as getAgentMessageId } from "./markers-
|
|
3
|
-
import { H as renderDataTag } from "./prompt-
|
|
4
|
-
import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-
|
|
5
|
-
import {
|
|
1
|
+
import { Eo as publishAgentUpdate, Fn as readInboundMessageSender, an as getConversationWorkState, i as getConversationStore, iu as remindsNoReplyForChildStatus, lu as EVENT_SYSTEM_ACTOR, pu as CORE_EVENT_NAMESPACE, tu as parentResultActor, vc as SYSTEM_IDENTITY_ID } from "./db-CbURDbaB.js";
|
|
2
|
+
import { Jt as buildDeterministicTurnId, L as listActiveMailboxTurns, O as enqueueAutomatedInput, S as getAgentReplyMessageId, b as readAgentConfig, c as resultAuthorId, f as readChildConversationSender, it as EVENT_WAIT_MS, k as getConversationStoppedAtMs, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as getAgentMessageId } from "./markers-BtUv4-oc.js";
|
|
3
|
+
import { H as renderDataTag } from "./prompt-CX29OGO9.js";
|
|
4
|
+
import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-C886lsT9.js";
|
|
5
|
+
import { Rn as AGENT_MESSAGE_EVENT_TYPE, zn as AGENT_UPDATE_EVENT_TYPE } from "./types-CGgQ3-Bb.js";
|
|
6
6
|
// src/chat/child-agents/child-message.ts
|
|
7
7
|
/**
|
|
8
8
|
* List the child replies and results among the ids that reached one
|
|
@@ -70,7 +70,7 @@ function renderAgentResult(args) {
|
|
|
70
70
|
* Render the parent agent input for one child agent result as one
|
|
71
71
|
* `<agent-result>`, the agent update that a Watch on the child also gets.
|
|
72
72
|
* The system prompt says what to do for each status. A Lead's done result
|
|
73
|
-
* also reminds it that a status update needs no reply.
|
|
73
|
+
* also reminds it that only a status update with no news needs no reply.
|
|
74
74
|
*/
|
|
75
75
|
function renderResultInput(sender, result, openSiblings) {
|
|
76
76
|
const agentResult = renderAgentResult({
|
|
@@ -86,7 +86,7 @@ function renderResultInput(sender, result, openSiblings) {
|
|
|
86
86
|
});
|
|
87
87
|
return result.status === "done" ? withNoReplyReminder(sender, agentResult) : agentResult;
|
|
88
88
|
}
|
|
89
|
-
const NO_REPLY_REMINDER = `If this is only a status update with
|
|
89
|
+
const NO_REPLY_REMINDER = `If this is only a status update with no news for a member, end with \`${NO_REPLY_TOOL_NAME}\`. A done signal that is now true is news.`;
|
|
90
90
|
function withNoReplyReminder(sender, input) {
|
|
91
91
|
return remindsNoReplyForChildStatus(sender.parentKind) ? `${input}\n${NO_REPLY_REMINDER}` : input;
|
|
92
92
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Ht as messageCardText } from "./types-
|
|
2
|
-
import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-
|
|
3
|
-
import { h as getAssistantReplyText } from "./system-prompt-table-
|
|
4
|
-
import { f as logException, w as withLogContext, x as setTags } from "./logging-
|
|
5
|
-
import { $n as normalizeConversationText, Dn as loadConversationProjection, Gt as markTurnFailed, J as getPersistedThreadState, Kr as finalizeFailedTurnReplyWithEvent, Kt as startActiveTurn, Mr as getTurnLifecycle, Nn as recordAuthorizationCompleted, Qn as markConversationMessage, Un as persistConversationMessages, Vn as hydrateConversationMessages, X as persistThreadStateById, Z as coerceThreadConversationState, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, li as persistWithRetry, q as getPersistedSandboxState, wn as commitAcceptedReply, wr as saveTurnCheckpoint } from "./markers-
|
|
6
|
-
import { f as credentialContextForActor } from "./adapter-
|
|
7
|
-
import { i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-
|
|
1
|
+
import { Ht as messageCardText } from "./types-CGgQ3-Bb.js";
|
|
2
|
+
import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-CL9ZkOgx.js";
|
|
3
|
+
import { h as getAssistantReplyText } from "./system-prompt-table-C886lsT9.js";
|
|
4
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-CqgOoICc.js";
|
|
5
|
+
import { $n as normalizeConversationText, Dn as loadConversationProjection, Gt as markTurnFailed, J as getPersistedThreadState, Kr as finalizeFailedTurnReplyWithEvent, Kt as startActiveTurn, Mr as getTurnLifecycle, Nn as recordAuthorizationCompleted, Qn as markConversationMessage, Un as persistConversationMessages, Vn as hydrateConversationMessages, X as persistThreadStateById, Z as coerceThreadConversationState, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, li as persistWithRetry, q as getPersistedSandboxState, wn as commitAcceptedReply, wr as saveTurnCheckpoint } from "./markers-BtUv4-oc.js";
|
|
6
|
+
import { f as credentialContextForActor } from "./adapter-BkDQYdg6.js";
|
|
7
|
+
import { i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-CbURDbaB.js";
|
|
8
8
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as sandboxEgressSignalsResponseSchema } from "./profile-
|
|
1
|
+
import { k as sandboxEgressSignalsResponseSchema } from "./profile-bLo0h7Le.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./user-customization-CvfuY9Eo.js";
|
|
2
|
-
import { F as actorIdentitySchema, G as conversationParamsSchema, Lt as conversationTreeStateSchema,
|
|
2
|
+
import { F as actorIdentitySchema, G as conversationParamsSchema, Lt as conversationTreeStateSchema, Q as conversationUsageSchema, X as conversationSummaryReportSchema, Yt as inputFileSchema, et as conversationChildAgentTotalsSchema, fn as inboxItemNoticeRequestSchema, i as TODO_STATUSES, jn as notificationScheduleSchema, mn as inboxItemRequestSchema, z as conversationAuxiliaryCostsSchema } from "./types-CGgQ3-Bb.js";
|
|
3
3
|
import { l as fillUtcDays, p as sumUtcHoursIntoSixHours, t as AGENT_STATUSES, u as fillUtcHours, v as CHILD_AGENT_RESULTS } from "./agent-status-Bq_AIpyp.js";
|
|
4
|
-
import { f as conversationTitleSchema } from "./conversation-feed-
|
|
4
|
+
import { f as conversationTitleSchema } from "./conversation-feed-B1_1NJc8.js";
|
|
5
5
|
import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import { codeChangeStateSchema, eventMatchSchema, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bd as
|
|
2
|
-
import { n as disconnectStateAdapter } from "./adapter-
|
|
1
|
+
import { Bd as finishServiceAccountSignIn, Gd as startServiceAccountSignIn, Nd as getAppContext, Vd as getServiceAccountStatus, Wd as serviceAccountPlugins, zd as disconnectServiceAccount } from "./db-CbURDbaB.js";
|
|
2
|
+
import { n as disconnectStateAdapter } from "./adapter-BkDQYdg6.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
import { createServer } from "node:http";
|
|
5
5
|
// src/cli/service-account.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { R as getChatConfig } from "./adapter-
|
|
2
|
+
import { R as getChatConfig } from "./adapter-BkDQYdg6.js";
|
|
3
3
|
import { f as skillRoots } from "./topics-DxuKurCX.js";
|
|
4
|
-
import { m as logWarn } from "./logging-
|
|
5
|
-
import {
|
|
6
|
-
import { G as mapBounded } from "./prompt-
|
|
4
|
+
import { m as logWarn } from "./logging-CqgOoICc.js";
|
|
5
|
+
import { Nd as getAppContext } from "./db-CbURDbaB.js";
|
|
6
|
+
import { G as mapBounded } from "./prompt-CX29OGO9.js";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { parse } from "yaml";
|
package/dist/{slack-conversation-unfurl-C6jXhVYg.js → slack-conversation-unfurl-EWYTnBZI.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-
|
|
4
|
-
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-
|
|
5
|
-
import { T as withSpan } from "./logging-
|
|
6
|
-
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-
|
|
7
|
-
import { t as checkSlackChannelReadAccess } from "./channel-access-
|
|
8
|
-
import { G as mapBounded } from "./prompt-
|
|
2
|
+
import { Ii as escapeSlackMrkdwnText, Li as formatSlackLink, Oi as postSlackEphemeralMessage, P as getConversationIdByProviderConversation, a as getDb, ad as createCache, bn as deferConversationMove, dc as readActorIdentity, i as getConversationStore, ji as unfurlSlackLinks, kl as parseDashboardConversationLink, kr as readConversationAccessFromSql, o as getSqlExecutor, oc as getWorkspaceTeamId, ti as runWithSlackInstallation } from "./db-CbURDbaB.js";
|
|
3
|
+
import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-BkDQYdg6.js";
|
|
4
|
+
import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-DBrcQl47.js";
|
|
5
|
+
import { T as withSpan } from "./logging-CqgOoICc.js";
|
|
6
|
+
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-D9naZmqM.js";
|
|
7
|
+
import { t as checkSlackChannelReadAccess } from "./channel-access-BUHB0saC.js";
|
|
8
|
+
import { G as mapBounded } from "./prompt-CX29OGO9.js";
|
|
9
9
|
import * as z from "zod";
|
|
10
10
|
// src/chat/ingress/workspace-membership.ts
|
|
11
11
|
const MEMBER_TTL_MS = 3e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as getChatConfig } from "./adapter-
|
|
2
|
-
import { G as mapBounded } from "./prompt-
|
|
1
|
+
import { R as getChatConfig } from "./adapter-BkDQYdg6.js";
|
|
2
|
+
import { G as mapBounded } from "./prompt-CX29OGO9.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { AwsClient } from "aws4fetch";
|
|
5
5
|
import { del, get, issueSignedToken, presignUrl, put } from "@vercel/blob";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { D as isToolResultError, F as SESSION_CONTEXT_SECTION_TAG, I as TURN_CONTEXT_TAG, N as CAPABILITY_SECTION_TAG, O as isToolResultMessage, P as REQUEST_CONTEXT_SECTION_TAG, _ as extractAssistantText, d as SANDBOX_WORKSPACE_ROOT, f as sandboxSkillDir, h as createPluginLogger, k as normalizeToolNameFromResult, n as toPromptContributionContext, o as SANDBOX_DATA_ROOT, r as runPluginHooksAtOnce, t as PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS, w as isAssistantMessage } from "./prompt-
|
|
2
|
+
import { D as isToolResultError, F as SESSION_CONTEXT_SECTION_TAG, I as TURN_CONTEXT_TAG, N as CAPABILITY_SECTION_TAG, O as isToolResultMessage, P as REQUEST_CONTEXT_SECTION_TAG, _ as extractAssistantText, d as SANDBOX_WORKSPACE_ROOT, f as sandboxSkillDir, h as createPluginLogger, k as normalizeToolNameFromResult, n as toPromptContributionContext, o as SANDBOX_DATA_ROOT, r as runPluginHooksAtOnce, t as PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS, w as isAssistantMessage } from "./prompt-CX29OGO9.js";
|
|
3
3
|
import { m as worldPathCandidates, p as soulPathCandidates, u as listReferenceFiles } from "./topics-DxuKurCX.js";
|
|
4
|
-
import { m as logWarn, p as logInfo } from "./logging-
|
|
4
|
+
import { m as logWarn, p as logInfo } from "./logging-CqgOoICc.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { escapeClosingTag, escapeTagText, escapeTagTextAndQuotes, findTags, indentTagLines, markdownNodes, openingTag, parseMarkdown, promptMessageSchema, renderInlineTag, renderTag, unescapeTagText } from "@sentry/junior-plugin-api";
|
|
@@ -333,9 +333,9 @@ const LEAD_RULES = [
|
|
|
333
333
|
"- A member who tells you about a problem, a worry, or something they do not understand in the Space's area asks you to deal with it. Start the work that investigates it and delivers the fix or the answer, without asking first.",
|
|
334
334
|
"- A brief gives the goal, the targets, the facts with their source, the constraints, what done means, and the shape of the result. Hand off only the work that the member asked for, and name other work as a follow-up. When you pass on a member's approval, quote their exact words.",
|
|
335
335
|
"- When the result of one Thread changes the work of another, such as a renamed function or a moved file, tell the other Thread with `messageAgent`. Tell the members only when it changes what they get.",
|
|
336
|
-
"- When the done signal of a Thread's work is true, archive the Thread with `archiveAgent`.",
|
|
337
336
|
"- A decision is a member's only when it changes what ships or who sees it, and nothing that they said settles it. Look for their earlier words first. A child's question about how to do the work, such as a design detail, is not a member's decision. A confirmation that a child or Guardian asks for before an action is the member's, as `<task-execution>` says. Make every other decision yourself and say that it is your decision. Do not write that a member gave it to you, such as \"they delegated it to me\".",
|
|
338
|
-
|
|
337
|
+
"- When a child reports that the done signal of its work is true, such as a merged pull request, archive the child unless it still has open work. Then start the next step that the members agreed to, or tell the member what is done and the one next step that you suggest.",
|
|
338
|
+
`- When a child's result or message has no news for the members, such as checks that still run, end the Turn with \`${NO_REPLY_TOOL_NAME}\`.`,
|
|
339
339
|
"- When a member asks where the work is, answer from `listAgents` and the live state of its pull requests, which a Task reads for you, in this order: what needs them, what is in flight, what is done.",
|
|
340
340
|
"- The world section's facts, such as repositories and owners, help you write briefs. Its rules for how to do the work are for the Threads that do it."
|
|
341
341
|
];
|