@sentry/junior 0.296.0 → 0.298.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{admin-z_lgDi-z.js → admin-BF3DbYGf.js} +2 -2
- package/dist/{agent-runner-HoQiUKLL.js → agent-runner-Q9GkoerG.js} +407 -1895
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -7
- package/dist/api.d.ts +1 -1
- package/dist/api.js +38 -267
- package/dist/{app-C75Ft-A_.d.ts → app-DOg_mCtV.d.ts} +7 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +64 -44
- package/dist/attempt-selection-ClP3MMPr.js +61 -0
- package/dist/{automation-yJX3C7i3.js → automation-Cn8qmbdr.js} +1 -1
- package/dist/{background-compaction-queue-Cre1wFt9.js → background-compaction-queue-BZhGFOK6.js} +4 -88
- package/dist/{briefs-BXECHduJ.js → briefs-CQrCRF6-.js} +3 -3
- package/dist/{catalog-runtime-CpCmlD9L.js → catalog-runtime-DZeD2WbL.js} +1 -1
- package/dist/cli/chat.js +19 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-CCPHvTqx.js → config-BOByVnxe.js} +2 -2
- package/dist/{connections-B5pWh8e2.js → connections-BNN5cJam.js} +6 -6
- package/dist/{conversation-CMkSmi02.js → conversation-DCkzvxqB.js} +51 -17
- package/dist/{conversation-feed-BVAOga0H.js → conversation-feed-CMA12Rjs.js} +1 -1
- package/dist/{conversation-privacy-CZD5soDW.js → conversation-privacy-C0eRxsgb.js} +1 -1
- package/dist/conversation-turn-D9qvcDX6.js +805 -0
- package/dist/{credential-sync-DwLkIvXI.js → credential-sync-B_iUpxGL.js} +14 -13
- package/dist/{db-C1M1y-bh.js → db-CoMNr2Zm.js} +43 -15
- package/dist/{db-B3iyr_Or.d.ts → db-DoMcnYol.d.ts} +13 -1
- package/dist/{executor-DUSEwXaO.js → executor-C-m8VrzX.js} +14 -6
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-D0svFM8r.js → logging-CJTi5niy.js} +1 -1
- package/dist/{message-BFnIwKpx.js → message-Q6_5DAWR.js} +15 -13
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -2
- package/dist/{session-stop-hYNTNpVf.js → notification-Bv25xbj0.js} +11 -930
- package/dist/{oauth-callback-server-BXRtD6Fk.js → oauth-callback-server-CH5XAyo-.js} +2 -2
- package/dist/{projection-B6VS7kbo.js → projection-BgwEE36_.js} +333 -106
- package/dist/{prompt-CD11tfG8.js → prompt-DXc9DYT9.js} +4 -4
- package/dist/prompt-input-BUr4J9RO.js +1424 -0
- package/dist/{registry-CHewwYEo.js → registry-9XwqSnM-.js} +1 -1
- package/dist/reporting-window-DopzcOHh.js +137 -0
- package/dist/{resolve-1owMH4qo.js → resolve-DUIAbcRL.js} +3 -3
- package/dist/result-C2Vn8QGn.js +463 -0
- package/dist/{runner-BtWvJslp.js → runner-CXGtw-Mc.js} +9 -8
- package/dist/{sandbox-egress-signals-ByftwJVt.js → sandbox-egress-signals-Di3S_dO7.js} +1 -1
- package/dist/{schema-Ct1Zf2xy.d.ts → schema-BnbZ-rKv.d.ts} +14 -107
- package/dist/{schema-D2iGyYIp.js → schema-Dyp7racy.js} +11 -48
- package/dist/{service-account-BZEuMKdo.js → service-account-DM3KBBeG.js} +3 -3
- package/dist/{service-account-DLoeoHww.js → service-account-GzAMUQ8a.js} +3 -3
- package/dist/session-stop-D4i7e6iT.js +181 -0
- package/dist/{skills-DXgd5Inh.js → skills-DCK9SD_l.js} +2 -2
- package/dist/{spawn-YeqlNDv8.js → spawn-6cX6xE9G.js} +6 -5
- package/dist/{state-C3CbtD_m.js → state-CSuA2J1V.js} +2 -2
- package/dist/{stop-Cze_pEL8.js → stop-Dh2DfwpK.js} +66 -159
- package/dist/{store-CZ9vqR4P.js → store-B1zepKG8.js} +11 -4
- package/dist/{task-runner-CMiNGsER.js → store-DrA17Fbz.js} +939 -1593
- package/dist/task-queue-D1rXWfFN.js +89 -0
- package/dist/task-runner-CT4M8oDz.js +291 -0
- package/dist/thread-context-DnqUkbzN.js +248 -0
- package/dist/turn-cancel-l460pfGW.js +201 -0
- package/dist/turn-session-routing-VXDVXLRl.js +380 -0
- package/dist/{turn-failure-response-pXhZ2wMK.js → turn-user-message-BSPmkm7X.js} +181 -392
- package/dist/turn-wake-DVFVXyhX.js +161 -0
- package/dist/{reporting-window-B3Ze-Qnt.js → user-input-request-CXNIov9n.js} +24 -143
- package/dist/{validation-Du7NdkOR.js → validation-zxAJBDDy.js} +1 -1
- package/dist/{version-EN3Wnq-R.js → version-DcZ40a0g.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-Agxi_o5c.js → viewer-CgiGjW10.js} +3 -3
- package/dist/warmup-CwKbxQLl.js +2698 -0
- package/dist/{worker-BALVdWbv.js → worker-CbDUzaBA.js} +20 -8
- package/migrations/0102_code_change_last_activity.sql +1 -0
- package/migrations/0103_agent_invocation_fork.sql +8 -0
- package/migrations/meta/0102_snapshot.json +4502 -0
- package/migrations/meta/0103_snapshot.json +4509 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +4 -4
- package/dist/result-CEqQFrEf.js +0 -305
- package/dist/result-event-type-DD6BAgT7.js +0 -11
- package/dist/warmup-CY2ArYag.js +0 -2017
- package/dist/work-EA98F0ia.js +0 -768
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-CZyYgPF0.js";
|
|
2
|
-
import { t as ConversationStore } from "./db-
|
|
3
|
-
import "./schema-
|
|
2
|
+
import { t as ConversationStore } from "./db-DoMcnYol.js";
|
|
3
|
+
import "./schema-BnbZ-rKv.js";
|
|
4
4
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
5
5
|
import "./sentry-DrKC2NeM.js";
|
|
6
6
|
import { Hono } from "hono";
|
|
@@ -164,6 +164,11 @@ interface ConversationWorkerContext {
|
|
|
164
164
|
shouldYield(): boolean;
|
|
165
165
|
/** Return an AbortSignal backed by the durable Conversation stop request. */
|
|
166
166
|
stopSignal?(): AbortSignal;
|
|
167
|
+
/**
|
|
168
|
+
* Read the stored stop of the Conversation once, and abort `stopSignal`
|
|
169
|
+
* when it stopped during this attempt. A Run calls it at each step.
|
|
170
|
+
*/
|
|
171
|
+
checkStop?(): Promise<void>;
|
|
167
172
|
}
|
|
168
173
|
interface InboxAttempt {
|
|
169
174
|
ack(): Promise<void>;
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as JuniorDashboardOptions, n as JuniorAppOptions, r as createApp, t as JuniorApp } from "./app-
|
|
1
|
+
import { i as JuniorDashboardOptions, n as JuniorAppOptions, r as createApp, t as JuniorApp } from "./app-DOg_mCtV.js";
|
|
2
2
|
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-Cc2OFd9G.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorApp, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, createApp, defineJuniorPlugins };
|
package/dist/app.js
CHANGED
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $
|
|
3
|
-
import { Y as getAttachmentStorage, d as restoreRuntimeConfig, f as setBotModelConfig, h as snapshotRuntimeConfig, i as getChatConfig, m as setSlackReactionConfig, n as botConfig, o as getSlackBotToken, p as setRuntimeLimits, u as resetRuntimeConfig } from "./config-
|
|
4
|
-
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, H as GOOGLE_IDENTITY_PROVIDER, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, W as normalizeIdentityEmail, b as setSpanAttributes, h as logWarn, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-
|
|
5
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { $i as escapeSlackMrkdwnText, Ao as readConversationMessageEventSeq, Ba as consumeSandboxEgressPermissionDeniedSignal, Bo as resolveRootVisibility, C as settleConversationTitleWork, Ci as getDashboardTaskLink, Di as createPluginState, Do as readConversationEventPageAfter, Eo as readConversationEventPage, Ft as pruneActiveConversation, Ha as parseSandboxEgressCredentialToken, Hn as createUserTokenStore, Ho as createPluginAnnotations, Hr as reviewItemReaderForUserInConversation, Jn as createPluginEventPublisher, Jr as createCodeChangePublisher, Ka as normalizeSandboxEgressTracePropagationDomains, Ki as isVercelSandboxEgressRequest, Mr as canActOnReviewItem, Oa as getWorkspaceTeamId, Or as searchReviewItems, Qa as createPluginEmbedder, Ra as clearSandboxEgressSignals, Sa as getSlackClient, Ti as setDashboardConversationLinkOptions, To as readLatestConversationBrief, Uo as listConversationAnnotations, Vr as reviewItemReaderForUser, Xn as getPluginApiRoutes, Zi as resolveBaseUrl, Zn as getPluginRoutes, Zo as createPluginCache, _ as appendConversationMessages, _a as slackExternalRefIdSchema, _r as projectConversationMessages, di as bindEventAutomationCredentialSubject, ea as formatSlackLink, fi as bindScheduledAutomationCredentialSubject, fo as createPluginLogger, ga as slackEntitySchema, gi as verifySlackDirectCredentialSubject, go as readConversationAccessFromSql, hi as verifyScheduledAutomationCredentialSubject, ir as validatePlugins, is as setConfigDefaults, jt as isInvalidConversationRecordError, ka as runWithWorkspaceTeamId, ko as readConversationLastEventSeq, kt as hasRunnableConversationWork, la as openSlackModal, mi as verifyEventAutomationCredentialSubject, nr as getPlugins, pa as unfurlSlackLinks, pi as bindSlackDirectCredentialSubject, qi as proxyVercelSandboxEgressRequest, ra as slackMention, ri as collectEventMatchKeys, rr as setPlugins, rs as getConfigDefaults, si as findMatchingWatches, sr as setBriefsConfig, ua as postSlackEphemeralMessage, ui as takeDueTimerWatches, ut as CONVERSATION_WORK_STALE_ENQUEUE_MS, wa as isDmChannel, wi as parseDashboardConversationLink, xi as getDashboardReviewItemLink, xr as dismissOpenReviewItems, yi as getDashboardConversationLink, za as consumeSandboxEgressAuthRequiredSignal } from "./projection-BgwEE36_.js";
|
|
3
|
+
import { Y as getAttachmentStorage, d as restoreRuntimeConfig, f as setBotModelConfig, h as snapshotRuntimeConfig, i as getChatConfig, m as setSlackReactionConfig, n as botConfig, o as getSlackBotToken, p as setRuntimeLimits, u as resetRuntimeConfig } from "./config-BOByVnxe.js";
|
|
4
|
+
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, H as GOOGLE_IDENTITY_PROVIDER, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, W as normalizeIdentityEmail, b as setSpanAttributes, h as logWarn, k as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-CJTi5niy.js";
|
|
5
|
+
import { t as JUNIOR_VERSION } from "./version-DcZ40a0g.js";
|
|
6
6
|
import { _ as slackMessageTsSchema, f as parseSlackTeamId, g as slackMessageTsFromMs, h as parseSlackMessageTs, m as slackChannelIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId } from "./actor-6jsm_v96.js";
|
|
7
|
-
import { B as recordGoogleSignIn,
|
|
8
|
-
import { A as juniorConversations, N as juniorDestinations, b as juniorConversationBriefs, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, l as juniorReviewItems, u as juniorAutomationRuns, w as juniorConversationEvents } from "./executor-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import {
|
|
7
|
+
import { B as recordGoogleSignIn, O as conversationKindFromRow, P as resolveActorIdentityId, S as withConversationMutationLock, W as getConversationIdByProviderConversation, a as getConversationStore, nt as createSlackDestination, o as getDb, p as withConversationEventLock, r as getConversationEventStore, s as getSqlExecutor, t as closeDb, tt as touchConversationDetail } from "./db-CoMNr2Zm.js";
|
|
8
|
+
import { A as juniorConversations, N as juniorDestinations, b as juniorConversationBriefs, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, l as juniorReviewItems, u as juniorAutomationRuns, w as juniorConversationEvents } from "./executor-C-m8VrzX.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DZeD2WbL.js";
|
|
10
|
+
import { A as parseSlackUserInputSubmission, At as processWorkspaceSnapshotJob, B as joinPublicChannel, C as createSlackReviewItemShow, D as buildSlackReviewItemModal, L as checkSlackChannelReadAccess, M as verifySlackSignature, Mt as findAutomationSkill, N as parseSlackThreadId, Nt as missingAutomationSkillReason, O as parseSlackReviewItemClick, Q as readViewerAutomationExecutions, St as archiveConversation, T as syncReviewItemSlackCards, U as logScheduledAutomationRunSkipped, W as scheduledAutomationRunAttributes, X as ViewerTaskNotFoundError, _ as readPublicArtifact, b as lookupSlackUserProfile, bt as requestAttachmentDeletion, ct as reviewItemChangeRecord, dt as conversationTurnIdForMessage, et as readViewerAutomationSummary, g as publicArtifactHeaders, ht as webActorFromUser, it as effectiveTaskOutcomes, j as runWithSlackInstallation, jt as ingestEvent, k as parseSlackReviewItemFormTarget, mt as recordWebConversationActivity, n as executeAgentRun, nt as readViewerAutomations, ot as deliverReviewItemChange, r as processBackgroundCompaction, st as renderReviewItemMessage, t as createAgentRunner, ut as appendAndEnqueueWebMessage, v as unpublishedArtifactHeaders, vt as collectAttachmentGarbage, w as readSlackReviewItemCardConversationId, wt as markConversationRead, y as setConversationSubscription } from "./agent-runner-Q9GkoerG.js";
|
|
11
11
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
12
|
-
import { g as createCache, i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-
|
|
13
|
-
import { a as getStateAdapter, r as disconnectStateAdapter } from "./state-
|
|
12
|
+
import { g as createCache, i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-CgiGjW10.js";
|
|
13
|
+
import { a as getStateAdapter, r as disconnectStateAdapter } from "./state-CSuA2J1V.js";
|
|
14
14
|
import { a as getNextRunAtMs } from "./schedule-cP0AACm1.js";
|
|
15
|
-
import {
|
|
15
|
+
import { L as annotationCard, M as conversationTitleSchema, Z as conversationBriefSchema, b as conversationSurfaceSchema, p as conversationFeedQuerySchema, v as conversationReportStatusSchema } from "./conversation-DCkzvxqB.js";
|
|
16
16
|
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
17
17
|
import { n as readSchedulerSecret, r as readSignInSecret } from "./secrets-DebYU866.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { M as
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
18
|
+
import { f as getExperimentalFeatures, g as getAuthPausedConversationTurnId, m as setExperimentalFeatures, p as isExperimentalFeatureEnabled } from "./prompt-input-BUr4J9RO.js";
|
|
19
|
+
import { B as MIN_WARMUP_PREFIX_TOKENS, D as recordSubagentEnded, U as gapSegment, V as NO_REPLY_GAP_MS, a as segmentGapsKey, n as GLOBAL_GAPS_MAX, r as GLOBAL_GAPS_TTL_MS, t as CONVERSATION_STATE_TTL_MS, x as enqueueAgentInvocation, z as MINUTE_MS } from "./warmup-CwKbxQLl.js";
|
|
20
|
+
import { C as queueCallback, T as getQueueProvider, _ as createVercelCacheWarmupCallback, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, c as verifyWorkspaceSnapshotJobMessage, d as verifyConversationQueueMessage, g as cacheWarmupQueueConsumer, i as verifyBackgroundCompactionMessage, l as getVercelConversationWorkQueue, m as isConversationQueueMessageRejectedError, p as conversationQueueMessageSchema, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as resolveConversationWorkQueueTopic, v as registerVercelCacheWarmupDevConsumer } from "./background-compaction-queue-BZhGFOK6.js";
|
|
21
|
+
import { M as listPendingAgentInvocationMailboxAppends, N as listPendingAgentInvocationResults } from "./turn-user-message-BSPmkm7X.js";
|
|
22
|
+
import { C as renderSlackObjectCard, c as SLACK_EVENT_NAMESPACE, d as slackChannelMessageReplyThreadTs, f as slackChannelMessageRunsAutomation, s as getEventCatalog, u as slackChannelMessageEvent, v as renderTaskInput } from "./notification-Bv25xbj0.js";
|
|
23
|
+
import { _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-B1zepKG8.js";
|
|
24
|
+
import { c as coerceThreadConversationState, p as eventGuidance } from "./turn-session-routing-VXDVXLRl.js";
|
|
25
|
+
import { r as buttonUserInputField } from "./user-input-request-CXNIov9n.js";
|
|
26
|
+
import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-DUIAbcRL.js";
|
|
27
|
+
import { H as automationTaskSchema, N as scheduledRunSchema, U as automationTaskText, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-Cn8qmbdr.js";
|
|
28
|
+
import { $ as eventAutomationRunLimitReason, B as scheduledRunId, F as listScheduledAutomationsForTeam, H as blockEventAutomation, K as findMatchingEventAutomations, L as readScheduledAutomation, O as recordAutomationExecution, Q as admitEventAutomationRun, U as collectEventAutomationMatchKeys, V as withScheduledAutomationLock, a as getDispatchConversationId, b as existingConversationId, c as getDispatchRecord, d as isTerminalDispatchStatus, f as listPendingDispatchMailboxAppends, g as markDispatchFailed, i as createOrGetDispatch, r as confirmDispatchMailboxAppend, t as buildDispatchId, tt as automationVersionOf, u as getPluginDispatchProjection, v as notifyAutomationBlocked, z as saveScheduledAutomationInLock } from "./store-DrA17Fbz.js";
|
|
29
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-zxAJBDDy.js";
|
|
28
30
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-HYh_JOdw.js";
|
|
29
|
-
import { s as conversationPendingMessageDeliverySchema } from "./conversation-feed-
|
|
30
|
-
import { $ as
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-DwLkIvXI.js";
|
|
31
|
+
import { s as conversationPendingMessageDeliverySchema } from "./conversation-feed-CMA12Rjs.js";
|
|
32
|
+
import { $ as reviewItemChange, A as assertNoLegacyAllowedDomains, B as normalizeIncomingSlackThreadId, C as cancelConversationPendingMessagesForViewer, D as createProductionConversationWorkOptions, F as startProcessingReaction, G as stopConversation, H as createSlackWebApiStatusSender, I as buildSlackInboundMessage, J as bindMessageAuthorIdentityId, K as parseContent, L as clearSlackPendingReactions, M as isAllowedSignInEmail, N as readEnvList, O as createProductionSlackWebhookServices, P as resolveAllowedDomains, Q as readReviewItemForUser, R as slackInboundMessageId, S as encodeConversationCursor, U as SubscribedReplyReason, V as withNormalizedThreadId, W as getThreadStopDecision, X as actOnReviewItem, Y as ReviewItemActionError, Z as closeReviewItemsAnsweredByReply, a as pinConversation, at as archiveViewerDoneConversations, b as createConversationForViewer, ct as setConversationAutoArchive, dt as enqueueAgentDispatch, et as alreadyContinuesInSlackMessage, ft as GET$4, g as readConversationRecordFromSql, i as readConversationFeed, j as isAllowedDomain, k as getProductionSlackAdapter, n as steerConversationPendingMessagesForViewer, nt as continueConversationInSlack, q as recordSkippedConversationMessage, rt as isMovableToSlack, s as readConversationDetail, st as runAutoArchiveSweep, t as stopConversationTurnForViewer, tt as canContinueInSlack, w as readConversationPendingMessages, x as decodeConversationCursor, y as appendConversationMessageForViewer, z as stripLeadingBotMention } from "./stop-Dh2DfwpK.js";
|
|
33
|
+
import { i as enqueueAgentInvocationResult, r as createEndStoppedChildWork } from "./result-C2Vn8QGn.js";
|
|
34
|
+
import { o as unlinkProvider } from "./connections-BNN5cJam.js";
|
|
35
|
+
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-B_iUpxGL.js";
|
|
35
36
|
import { t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
36
|
-
import {
|
|
37
|
-
import { t as
|
|
38
|
-
import { t as
|
|
37
|
+
import { c as resumeConversationDelivery } from "./conversation-turn-D9qvcDX6.js";
|
|
38
|
+
import { t as processConversationWork } from "./worker-CbDUzaBA.js";
|
|
39
|
+
import { t as bindMessageAgent } from "./message-Q6_5DAWR.js";
|
|
40
|
+
import { t as bindSpawnAgent } from "./spawn-6cX6xE9G.js";
|
|
41
|
+
import { a as pluginTaskQueueConsumer, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-D1rXWfFN.js";
|
|
42
|
+
import { t as processPluginTask } from "./task-runner-CT4M8oDz.js";
|
|
39
43
|
import { createRequire } from "node:module";
|
|
40
44
|
import { Hono } from "hono";
|
|
41
45
|
import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -418,7 +422,13 @@ function createHeartbeatContext(args) {
|
|
|
418
422
|
let dispatchCount = 0;
|
|
419
423
|
return {
|
|
420
424
|
plugin: { name: pluginName },
|
|
425
|
+
annotations: { forConversation: (conversationId) => createPluginAnnotations({
|
|
426
|
+
conversationId,
|
|
427
|
+
db: getDb(),
|
|
428
|
+
plugin: pluginName
|
|
429
|
+
}) },
|
|
421
430
|
cache: createPluginCache(pluginName),
|
|
431
|
+
codeChanges: createCodeChangePublisher(pluginName),
|
|
422
432
|
nowMs: args.nowMs,
|
|
423
433
|
db: getDb(),
|
|
424
434
|
embedder: createPluginEmbedder(pluginName),
|
|
@@ -1560,7 +1570,7 @@ async function runHeartbeat(args) {
|
|
|
1560
1570
|
const queue = args.conversationWorkQueue ?? getVercelConversationWorkQueue();
|
|
1561
1571
|
const events = args.events ?? createEventAppPublisher({ conversationWork: () => ({ queue }) });
|
|
1562
1572
|
await recoverConversationWork({
|
|
1563
|
-
beforeWorkStops:
|
|
1573
|
+
beforeWorkStops: createEndStoppedChildWork({ queue }),
|
|
1564
1574
|
nowMs: args.nowMs,
|
|
1565
1575
|
queue
|
|
1566
1576
|
});
|
|
@@ -2465,11 +2475,12 @@ async function refreshCards(services, user, itemId) {
|
|
|
2465
2475
|
});
|
|
2466
2476
|
}
|
|
2467
2477
|
/**
|
|
2468
|
-
* Do one person action from a Slack card. The thread of the card gets
|
|
2469
|
-
*
|
|
2470
|
-
*
|
|
2471
|
-
* `actOnReviewItem`. An expected failure, such as
|
|
2472
|
-
* closed, goes to the person as an ephemeral
|
|
2478
|
+
* Do one person action from a Slack card. The thread of the card gets an
|
|
2479
|
+
* answer as Slack input from the person, like a typed reply. A dismiss
|
|
2480
|
+
* starts no Turn, so the thread gets the same recorded Message as the other
|
|
2481
|
+
* linked Conversations, from `actOnReviewItem`. An expected failure, such as
|
|
2482
|
+
* an item that is already closed, goes to the person as an ephemeral
|
|
2483
|
+
* message.
|
|
2473
2484
|
*/
|
|
2474
2485
|
async function act(args) {
|
|
2475
2486
|
const { services, target } = args;
|
|
@@ -2483,12 +2494,13 @@ async function act(args) {
|
|
|
2483
2494
|
queue: services.queue,
|
|
2484
2495
|
show: createSlackReviewItemShow(() => services.adapter)
|
|
2485
2496
|
};
|
|
2497
|
+
const recordOnly = args.action === "dismiss";
|
|
2486
2498
|
let item;
|
|
2487
2499
|
try {
|
|
2488
2500
|
const current = await readReviewItemForUser(actor.user, args.itemId);
|
|
2489
2501
|
item = await actOnReviewItem({
|
|
2490
2502
|
action: args.action,
|
|
2491
|
-
exceptConversationId: conversationId,
|
|
2503
|
+
...recordOnly ? void 0 : { exceptConversationId: conversationId },
|
|
2492
2504
|
firstCloseOnly: true,
|
|
2493
2505
|
delivery,
|
|
2494
2506
|
id: current.id,
|
|
@@ -2501,7 +2513,7 @@ async function act(args) {
|
|
|
2501
2513
|
await refreshCards(services, actor.user, args.itemId);
|
|
2502
2514
|
return;
|
|
2503
2515
|
}
|
|
2504
|
-
if (!item.conversationIds.includes(conversationId)) return;
|
|
2516
|
+
if (recordOnly || !item.conversationIds.includes(conversationId)) return;
|
|
2505
2517
|
const change = reviewItemChange(args.action, actor.user);
|
|
2506
2518
|
try {
|
|
2507
2519
|
await services.persistMessage(buildSlackInteractionInput({
|
|
@@ -3214,12 +3226,20 @@ async function resolveSlackConversationId(args) {
|
|
|
3214
3226
|
const providerThread = parseSlackThreadId(args.canonicalThreadId);
|
|
3215
3227
|
const conversationStore = args.conversationStore ?? getConversationStore();
|
|
3216
3228
|
if (!providerThread) return args.canonicalThreadId;
|
|
3217
|
-
|
|
3229
|
+
const thread = {
|
|
3218
3230
|
provider: "slack",
|
|
3219
3231
|
providerDestinationId: providerThread.channelId,
|
|
3220
3232
|
providerTenantId: args.installation.teamId ?? "",
|
|
3221
3233
|
providerConversationId: providerThread.threadTs
|
|
3222
|
-
}
|
|
3234
|
+
};
|
|
3235
|
+
const ownerId = await conversationStore.getConversationIdByProviderConversation(thread);
|
|
3236
|
+
if (ownerId) return ownerId;
|
|
3237
|
+
if (args.claimAtMs === void 0 || !args.installation.teamId) return args.canonicalThreadId;
|
|
3238
|
+
return await conversationStore.claimProviderConversation({
|
|
3239
|
+
...thread,
|
|
3240
|
+
atMs: args.claimAtMs,
|
|
3241
|
+
conversationId: args.canonicalThreadId
|
|
3242
|
+
});
|
|
3223
3243
|
}
|
|
3224
3244
|
/**
|
|
3225
3245
|
* Build the mailbox input for one Slack message. A message and a `stop` get
|
|
@@ -3244,6 +3264,7 @@ async function persistSlackMessage(args) {
|
|
|
3244
3264
|
const canonicalThreadId = normalizeIncomingSlackThreadId(args.message.threadId, args.message);
|
|
3245
3265
|
const conversationId = args.conversationId ?? await resolveSlackConversationId({
|
|
3246
3266
|
canonicalThreadId,
|
|
3267
|
+
...args.route === "mention" ? { claimAtMs: args.receivedAtMs } : void 0,
|
|
3247
3268
|
conversationStore: args.conversationStore,
|
|
3248
3269
|
installation: args.installation
|
|
3249
3270
|
});
|
|
@@ -3323,6 +3344,7 @@ async function routeParsedMessage(args) {
|
|
|
3323
3344
|
await bindSlackAuthorIdentity(message, args.installation);
|
|
3324
3345
|
const conversationId = await resolveSlackConversationId({
|
|
3325
3346
|
canonicalThreadId,
|
|
3347
|
+
...route === "mention" && !stopDecision ? { claimAtMs: args.receivedAtMs } : void 0,
|
|
3326
3348
|
conversationStore: args.conversationStore,
|
|
3327
3349
|
installation: args.installation
|
|
3328
3350
|
});
|
|
@@ -7031,8 +7053,8 @@ function registerGetConversationTool(server, { user }) {
|
|
|
7031
7053
|
/**
|
|
7032
7054
|
* Own the MCP view of one Review item, shared by the review item tools.
|
|
7033
7055
|
*
|
|
7034
|
-
* MCP Review items stay read-only. An answer
|
|
7035
|
-
*
|
|
7056
|
+
* MCP Review items stay read-only. An answer sends a message to the linked
|
|
7057
|
+
* Conversations, which can start a Turn. A dismiss starts no Turn.
|
|
7036
7058
|
*/
|
|
7037
7059
|
/** MCP view of one Review item. Answers happen in Slack or the dashboard. */
|
|
7038
7060
|
const mcpReviewItemSchema = z.object({
|
|
@@ -7956,7 +7978,6 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
7956
7978
|
const pagePaths = [
|
|
7957
7979
|
basePath,
|
|
7958
7980
|
pagePath("admin"),
|
|
7959
|
-
pagePath("board"),
|
|
7960
7981
|
pagePath("code"),
|
|
7961
7982
|
`${pagePath("code")}/*`,
|
|
7962
7983
|
conversationsPath,
|
|
@@ -8003,7 +8024,6 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
8003
8024
|
"/api/automations/*",
|
|
8004
8025
|
"/api/skills",
|
|
8005
8026
|
"/api/skills/*",
|
|
8006
|
-
"/api/board",
|
|
8007
8027
|
"/api/code",
|
|
8008
8028
|
"/api/code/*",
|
|
8009
8029
|
"/api/connections",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { o as isUserActor } from "./actor-6jsm_v96.js";
|
|
2
|
+
// src/chat/task-execution/attempt-selection.ts
|
|
3
|
+
function inputOwner(message) {
|
|
4
|
+
return {
|
|
5
|
+
authorId: message.input.authorId,
|
|
6
|
+
identityId: message.input.authorIdentityId,
|
|
7
|
+
source: message.source
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function turnOwner(turn) {
|
|
11
|
+
return {
|
|
12
|
+
authorId: isUserActor(turn.actor) ? turn.actor.userId : void 0,
|
|
13
|
+
identityId: turn.actorIdentityId,
|
|
14
|
+
source: turn.source?.kind
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One Turn has one Actor and one Source: it runs with that Actor's
|
|
19
|
+
* credentials, so input from anyone else must not join it. Every value that
|
|
20
|
+
* both sides know must match, and they must share an Identity id or an author
|
|
21
|
+
* id. Input with no known author matches nothing.
|
|
22
|
+
*/
|
|
23
|
+
function hasSameOwner(a, b) {
|
|
24
|
+
if (a.source && b.source && a.source !== b.source) return false;
|
|
25
|
+
const sameIdentity = a.identityId && b.identityId ? a.identityId === b.identityId : void 0;
|
|
26
|
+
const sameAuthor = a.authorId && b.authorId ? a.authorId === b.authorId : void 0;
|
|
27
|
+
return sameIdentity !== false && sameAuthor !== false && (sameIdentity ?? sameAuthor) === true;
|
|
28
|
+
}
|
|
29
|
+
/** True when two Inbound messages may share one Turn. */
|
|
30
|
+
function canShareTurn(a, b) {
|
|
31
|
+
return hasSameOwner(inputOwner(a), inputOwner(b));
|
|
32
|
+
}
|
|
33
|
+
/** True when an Inbound message may join `turn`. */
|
|
34
|
+
function canJoinTurn(turn, message) {
|
|
35
|
+
return hasSameOwner(turnOwner(turn), inputOwner(message));
|
|
36
|
+
}
|
|
37
|
+
function selectContiguousTurnBatch(messages) {
|
|
38
|
+
const first = messages[0];
|
|
39
|
+
if (!first) return [];
|
|
40
|
+
const nextTurnIndex = messages.findIndex((message, index) => index > 0 && !canShareTurn(first, message));
|
|
41
|
+
return messages.slice(0, nextTurnIndex === -1 ? messages.length : nextTurnIndex);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* True when an interrupt can start its own attempt.
|
|
45
|
+
*
|
|
46
|
+
* A steered web message must not start a second Turn while a yielded Turn
|
|
47
|
+
* waits to resume. It stays pending for that Turn's drain or the next attempt.
|
|
48
|
+
*/
|
|
49
|
+
function isAttemptInterrupt(message, work) {
|
|
50
|
+
return message.delivery === "interrupt" && !(work.execution.status === "paused" && message.source === "web");
|
|
51
|
+
}
|
|
52
|
+
/** Prioritize interrupts while keeping each attempt to one Actor and Source. */
|
|
53
|
+
function selectAttemptMessages(work) {
|
|
54
|
+
const messages = work.messages;
|
|
55
|
+
const interrupts = messages.filter((message) => isAttemptInterrupt(message, work));
|
|
56
|
+
if (interrupts.length > 0) return selectContiguousTurnBatch(interrupts);
|
|
57
|
+
if (work.execution.status === "paused") return [];
|
|
58
|
+
const nonEventMessages = messages.filter((message) => message.source !== "event");
|
|
59
|
+
return selectContiguousTurnBatch(nonEventMessages.length > 0 ? nonEventMessages : messages);
|
|
60
|
+
}
|
|
61
|
+
export { selectAttemptMessages as i, canShareTurn as n, isAttemptInterrupt as r, canJoinTurn as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-cP0AACm1.js";
|
|
2
|
-
import { i as actorIdentitySchema } from "./conversation-
|
|
2
|
+
import { i as actorIdentitySchema } from "./conversation-DCkzvxqB.js";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
5
5
|
// src/chat/automations/task.ts
|
package/dist/{background-compaction-queue-Cre1wFt9.js → background-compaction-queue-BZhGFOK6.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-BOByVnxe.js";
|
|
2
|
+
import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-CJTi5niy.js";
|
|
3
3
|
import { t as readJuniorSecret } from "./secrets-DebYU866.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -369,7 +369,7 @@ function cacheWarmupCallback() {
|
|
|
369
369
|
maxDeliveries: 1,
|
|
370
370
|
onRejected: logCacheWarmupRejected,
|
|
371
371
|
run: async (message) => {
|
|
372
|
-
const { runCacheWarmup } = await import("./warmup-
|
|
372
|
+
const { runCacheWarmup } = await import("./warmup-CwKbxQLl.js").then((n) => n.o);
|
|
373
373
|
await runCacheWarmup(message);
|
|
374
374
|
},
|
|
375
375
|
skip: () => !getChatConfig().cacheWarmingEnabled,
|
|
@@ -500,90 +500,6 @@ async function sendWorkspaceSnapshotJob(message) {
|
|
|
500
500
|
async function sendNextWorkspaceSnapshotJob(message) {
|
|
501
501
|
await send(message);
|
|
502
502
|
}
|
|
503
|
-
// src/chat/plugins/task-queue.ts
|
|
504
|
-
/**
|
|
505
|
-
* Delivery for plugin-registered tasks.
|
|
506
|
-
*
|
|
507
|
-
* Plugins register named tasks. This module owns the shared signed message,
|
|
508
|
-
* send path, and HTTP/local callback. Core keeps one topic and one runner.
|
|
509
|
-
*/
|
|
510
|
-
/** Deploy topic name. Keep stable for Vercel queue wiring. */
|
|
511
|
-
const PLUGIN_TASK_QUEUE_TOPIC = "junior_plugin_tasks";
|
|
512
|
-
const PLUGIN_TASK_DEV_CONSUMER_GROUP = "junior_plugin_tasks_dev";
|
|
513
|
-
const PLUGIN_TASK_MAX_DELIVERIES = 5;
|
|
514
|
-
const PLUGIN_TASK_SIGN_CONTEXT = "junior.plugin_task_queue.v1";
|
|
515
|
-
const PLUGIN_TASK_SIGN_VERSION = "v1";
|
|
516
|
-
const pluginTaskParamsSchema = z.object({
|
|
517
|
-
conversationId: z.string().min(1),
|
|
518
|
-
sessionId: z.string().min(1)
|
|
519
|
-
}).strict();
|
|
520
|
-
const pluginTaskSign = {
|
|
521
|
-
context: PLUGIN_TASK_SIGN_CONTEXT,
|
|
522
|
-
schema: z.object({
|
|
523
|
-
name: z.string().min(1),
|
|
524
|
-
params: pluginTaskParamsSchema,
|
|
525
|
-
plugin: z.string().min(1)
|
|
526
|
-
}).strict(),
|
|
527
|
-
signatureVersion: PLUGIN_TASK_SIGN_VERSION,
|
|
528
|
-
parts: (message) => [
|
|
529
|
-
message.plugin,
|
|
530
|
-
message.name,
|
|
531
|
-
message.params.conversationId,
|
|
532
|
-
message.params.sessionId
|
|
533
|
-
]
|
|
534
|
-
};
|
|
535
|
-
/** Build the stable id used for delivery dedupe and tracing. */
|
|
536
|
-
function pluginTaskId(args) {
|
|
537
|
-
return `plugin-task_${createHash("sha256").update(args.plugin).update("\0").update(args.name).update("\0").update(args.params.conversationId).update("\0").update(args.params.sessionId).digest("hex").slice(0, 32)}`;
|
|
538
|
-
}
|
|
539
|
-
/** Sign a plugin task message for tests and local checks. */
|
|
540
|
-
function signPluginTaskQueueMessage(message, nowMs = Date.now()) {
|
|
541
|
-
return signQueueMessage(pluginTaskSign, message, nowMs);
|
|
542
|
-
}
|
|
543
|
-
function verifyPluginTaskQueueMessage(value, nowMs = Date.now()) {
|
|
544
|
-
return verifyQueueMessage(pluginTaskSign, value, nowMs);
|
|
545
|
-
}
|
|
546
|
-
function logPluginTaskQueueMessageRejected(reason, metadata) {
|
|
547
|
-
logWarn("plugin.task.queue_message.rejected", {
|
|
548
|
-
"app.queue.consumer_group": metadata.consumerGroup,
|
|
549
|
-
"app.queue.delivery_count": metadata.deliveryCount,
|
|
550
|
-
"app.queue.message_id": metadata.messageId,
|
|
551
|
-
"app.queue.reject_reason": reason,
|
|
552
|
-
"app.queue.topic_name": metadata.topicName
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
function pluginTaskCallback() {
|
|
556
|
-
return queueCallback({
|
|
557
|
-
consumerGroup: PLUGIN_TASK_DEV_CONSUMER_GROUP,
|
|
558
|
-
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
559
|
-
onRejected: logPluginTaskQueueMessageRejected,
|
|
560
|
-
run: async (message) => {
|
|
561
|
-
const { processPluginTask } = await import("./task-runner-CMiNGsER.js").then((n) => n.r);
|
|
562
|
-
await processPluginTask(message);
|
|
563
|
-
},
|
|
564
|
-
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
565
|
-
verify: verifyPluginTaskQueueMessage
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
/** Send one plugin task through the shared signed delivery path. */
|
|
569
|
-
async function sendVercelPluginTask(message) {
|
|
570
|
-
await getQueueProvider().send(PLUGIN_TASK_QUEUE_TOPIC, signPluginTaskQueueMessage(message), {
|
|
571
|
-
idempotencyKey: pluginTaskId(message),
|
|
572
|
-
retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
/** Create the HTTP callback for plugin tasks. */
|
|
576
|
-
function createVercelPluginTaskCallback() {
|
|
577
|
-
return pluginTaskCallback().create();
|
|
578
|
-
}
|
|
579
|
-
/** Return the queue consumer for plugin tasks, for a pulling queue worker. */
|
|
580
|
-
function pluginTaskQueueConsumer() {
|
|
581
|
-
return pluginTaskCallback().consumer;
|
|
582
|
-
}
|
|
583
|
-
/** Register the local-dev consumer for plugin tasks. */
|
|
584
|
-
function registerVercelPluginTaskDevConsumer() {
|
|
585
|
-
return pluginTaskCallback().registerDev();
|
|
586
|
-
}
|
|
587
503
|
// src/chat/services/background-compaction-queue.ts
|
|
588
504
|
/**
|
|
589
505
|
* Messages of background compaction jobs.
|
|
@@ -623,4 +539,4 @@ const vercelBackgroundCompactionQueue = { send: async (message) => {
|
|
|
623
539
|
retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
|
|
624
540
|
});
|
|
625
541
|
} };
|
|
626
|
-
export {
|
|
542
|
+
export { queueCallback as C, verifyQueueMessage as S, getQueueProvider as T, createVercelCacheWarmupCallback as _, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as a, QUEUE_SIGNATURE_MAX_AGE_MS as b, verifyWorkspaceSnapshotJobMessage as c, verifyConversationQueueMessage as d, ConversationQueueMessageRejectedError as f, cacheWarmupQueueConsumer as g, CACHE_WARMUP_QUEUE_TOPIC as h, verifyBackgroundCompactionMessage as i, getVercelConversationWorkQueue as l, isConversationQueueMessageRejectedError as m, backgroundCompactionId as n, sendNextWorkspaceSnapshotJob as o, conversationQueueMessageSchema as p, vercelBackgroundCompactionQueue as r, sendWorkspaceSnapshotJob as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, resolveConversationWorkQueueTopic as u, registerVercelCacheWarmupDevConsumer as v, getTurnRequestDeadline as w, signQueueMessage as x, sendCacheWarmup as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
2
|
-
import {
|
|
1
|
+
import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-DXc9DYT9.js";
|
|
2
|
+
import { Q as parseBriefInput, X as briefResourceLabel, d as conversationEventPageSchema, l as conversationDetailReportSchema, q as briefCodeChangeSchema } from "./conversation-DCkzvxqB.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import * as z from "zod";
|
|
@@ -262,7 +262,7 @@ async function parseRunOptions(argv) {
|
|
|
262
262
|
* token.
|
|
263
263
|
*/
|
|
264
264
|
async function configuredBriefModelId() {
|
|
265
|
-
const { botConfig } = await import("./config-
|
|
265
|
+
const { botConfig } = await import("./config-BOByVnxe.js").then((n) => n.r);
|
|
266
266
|
return botConfig.fastModelId;
|
|
267
267
|
}
|
|
268
268
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-9XwqSnM-.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-Q9GkoerG.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-HYh_JOdw.js").then((n) => n.o),
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../db-
|
|
102
|
+
import("../projection-BgwEE36_.js").then((n) => n.qn),
|
|
103
|
+
import("../catalog-runtime-DZeD2WbL.js").then((n) => n.t),
|
|
104
|
+
import("../validation-zxAJBDDy.js").then((n) => n.r),
|
|
105
|
+
import("../db-CoMNr2Zm.js").then((n) => n.n)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -152,22 +152,26 @@ function localDevServerUrl() {
|
|
|
152
152
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
153
153
|
defaultStateAdapterForLocalChat();
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
|
-
const { setBriefsConfig } = await import("../projection-
|
|
155
|
+
const { setBriefsConfig } = await import("../projection-BgwEE36_.js").then((n) => n.or);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-CXGtw-Mc.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CH5XAyo-.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-CsfIazeF.js").then((n) => n.t);
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createChildConversationWorker } = await import("../result-
|
|
164
|
-
const {
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-Di3S_dO7.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-6cX6xE9G.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-Q6_5DAWR.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker, createDeliverToParent } = await import("../result-C2Vn8QGn.js").then((n) => n.o);
|
|
164
|
+
const { createConversationTurnWorker } = await import("../conversation-turn-D9qvcDX6.js").then((n) => n.t);
|
|
165
|
+
const { skipInputAfterConversationStop } = await import("../session-stop-D4i7e6iT.js").then((n) => n.a);
|
|
165
166
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-CbDUzaBA.js").then((n) => n.n);
|
|
167
168
|
let agentRunner;
|
|
168
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
|
170
|
-
const childWorker = createChildConversationWorker(agentRunner, {
|
|
171
|
+
const childWorker = createChildConversationWorker(agentRunner, {
|
|
172
|
+
queue: localConversationWork.queue,
|
|
173
|
+
runTurn: createConversationTurnWorker(agentRunner, void 0, createDeliverToParent({ queue: localConversationWork.queue }))
|
|
174
|
+
});
|
|
171
175
|
await processConversationWork(message, {
|
|
172
176
|
queue: localConversationWork.queue,
|
|
173
177
|
run: async (context) => {
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-CJTi5niy.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-9XwqSnM-.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DCK9SD_l.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -45,13 +45,13 @@ async function runChat(argv, pluginSet) {
|
|
|
45
45
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
46
46
|
}
|
|
47
47
|
async function runAdmin(argv) {
|
|
48
|
-
return await (await import("../admin-
|
|
48
|
+
return await (await import("../admin-BF3DbYGf.js")).runAdmin(argv);
|
|
49
49
|
}
|
|
50
50
|
async function runServiceAccount(argv) {
|
|
51
|
-
return await (await import("../service-account-
|
|
51
|
+
return await (await import("../service-account-DM3KBBeG.js")).runServiceAccount(argv);
|
|
52
52
|
}
|
|
53
53
|
async function runBriefs(argv) {
|
|
54
|
-
return await (await import("../briefs-
|
|
54
|
+
return await (await import("../briefs-CQrCRF6-.js")).runBriefs(argv);
|
|
55
55
|
}
|
|
56
56
|
function topLevelCommand(argv) {
|
|
57
57
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as getDb } from "../db-
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { fo as createPluginLogger, ir as validatePlugins, rr as setPlugins } from "../projection-BgwEE36_.js";
|
|
2
|
+
import { o as getDb } from "../db-CoMNr2Zm.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DZeD2WbL.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-zxAJBDDy.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { r as disconnectStateAdapter } from "../state-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { Vi as create, qa as SANDBOX_RUNTIME } from "../projection-BgwEE36_.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DZeD2WbL.js";
|
|
3
|
+
import { r as disconnectStateAdapter } from "../state-CSuA2J1V.js";
|
|
4
|
+
import { n as resolve } from "../resolve-DUIAbcRL.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
|
7
7
|
function progressMessage(phase) {
|
package/dist/cli/upgrade.d.ts
CHANGED