@sentry/junior 0.285.0 → 0.287.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-DN5AB4VU.js → adapter-CL-HUKgd.js} +1 -1
- package/dist/{admin-DOITMKnn.js → admin-C9urXVfi.js} +2 -1
- package/dist/{agent-runner-BsWhHe4N.js → agent-runner-Bfnw551N.js} +2174 -1323
- 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 +73 -112
- package/dist/{app-DyMs9330.d.ts → app-DBY5TnfY.d.ts} +2 -3
- package/dist/app.d.ts +1 -1
- package/dist/app.js +72 -42
- package/dist/{assistant-reply-9Jip5bsr.js → assistant-reply-u_PRYzuz.js} +1 -1
- package/dist/{automation-Mk8aaHzy.js → automation-DksGNDRO.js} +3 -6
- package/dist/{background-compaction-queue-DXkLsWoH.js → background-compaction-queue-CYI909P5.js} +137 -3
- package/dist/{briefs-Cl8-nK9B.js → briefs-DaXiMWzT.js} +6 -5
- package/dist/{catalog-runtime-Bte6jRB2.js → catalog-runtime-BCIuBe4d.js} +1 -1
- package/dist/cli/chat.js +14 -14
- 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 +5 -6
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DDbBucBw.js → config-CkHcUMN7.js} +580 -3
- package/dist/{connections-DA4LT9LL.js → connections-BnIj0wtx.js} +16 -50
- package/dist/{conversation-D8kVoCrP.js → conversation-E7ZPJx2H.js} +22 -6
- package/dist/{conversation-pending-messages-BvROq1bq.js → conversation-pending-messages-DVch6YQw.js} +2 -5
- package/dist/{conversation-privacy-D0j_h70R.js → conversation-privacy-DF1hW0ja.js} +1 -1
- package/dist/{credential-sync-hcsYatw-.js → credential-sync-CzMar9hq.js} +13 -13
- package/dist/{viewer-1Ea81s0b.js → db-DJ11eZqq.js} +64 -367
- package/dist/{db-BhHZSuFw.d.ts → db-YDKKDxlh.d.ts} +4 -4
- package/dist/{executor-BLEMIgIZ.js → executor-BY9TB31g.js} +20 -19
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-BfORLKoq.js → logging-BO5zU6Mt.js} +1 -1
- package/dist/{media-Bu9C6lz0.js → media-Cz1ZiV1U.js} +16 -4
- package/dist/{message-DqjuKzUx.js → message-CsUbuEc8.js} +10 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -3
- package/dist/{oauth-callback-server-CFSRzu1n.js → oauth-callback-server-hiDKK0_n.js} +2 -2
- package/dist/{projection-DliWYrnT.js → projection-CL_YWeGf.js} +352 -356
- package/dist/{prompt-BvIUzY4y.js → prompt-BHOEQSmf.js} +182 -2
- package/dist/{registry-rC7MCxu8.js → registry-BriFLnaJ.js} +1 -1
- package/dist/{reporting-window-B4TwyuJo.js → reporting-window-B3Ze-Qnt.js} +4 -1
- package/dist/{resolve-Biu8Qw3u.js → resolve-Bt6GgAiA.js} +3 -3
- package/dist/{result-DxJMCX47.js → result-Bo1TZu0Q.js} +8 -8
- package/dist/{runner-BQJSFLKg.js → runner-D3YeCQgt.js} +16 -12
- package/dist/{sandbox-egress-signals-6aMxJSDn.js → sandbox-egress-signals-CcnSPP4S.js} +1 -1
- package/dist/{schema-BasXTvi2.js → schema-BWE3RJEB.js} +19 -7
- package/dist/{schema-BUviRAs8.d.ts → schema-C6fsEwjo.d.ts} +90 -8
- package/dist/{service-account-BI5Wgx22.js → service-account-DiQQuuw7.js} +3 -3
- package/dist/{service-account-CAE-_1dR.js → service-account-r6fl0b-9.js} +3 -3
- package/dist/{session-stop-CA-jOJ84.js → session-stop-B2Nut40V.js} +27 -25
- package/dist/{skills-B22duVJU.js → skills-CD5aJdzg.js} +2 -2
- package/dist/spawn-CalgZQiu.js +79 -0
- package/dist/{stop-DioIcEAu.js → stop-kujZLbi0.js} +233 -1127
- package/dist/{store-Dn4W7qgH.js → store-DdIEUL1q.js} +3 -3
- package/dist/{turn-session-routing-CGMKrYOj.js → task-runner-D_RDr2Hu.js} +1440 -993
- package/dist/{store-B26LV6UP.js → turn-failure-response-B5nV1Er-.js} +337 -6
- package/dist/{validation-TzhfQABF.js → validation-K4pqwoVZ.js} +1 -1
- package/dist/{version-DSk8CFvA.js → version-DBvhk1X9.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/viewer-DrMmFUul.js +337 -0
- package/dist/{work-ybG4_q5C.js → work-ljRoODGu.js} +110 -94
- package/dist/{worker-ccSyZRNz.js → worker-CYO1Q0Js.js} +5 -6
- package/migrations/0086_shared_archive.sql +31 -0
- package/migrations/0087_child_location.sql +64 -0
- package/migrations/0088_conversation_unsubscribe.sql +1 -0
- package/migrations/meta/0086_snapshot.json +4366 -0
- package/migrations/meta/0087_snapshot.json +4366 -0
- package/migrations/meta/0088_snapshot.json +4372 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +5 -4
- package/dist/config-DqFnykQT.js +0 -579
- package/dist/spawn-BB2_4VYn.js +0 -31
- package/dist/task-queue-Bt0IoR2i.js +0 -139
- package/dist/task-runner-D8lddjzp.js +0 -290
- package/dist/thread-state-CrFk3K_7.js +0 -173
- package/dist/turn-failure-response-DaJ04qVj.js +0 -224
- package/dist/turn-lifecycle-C2mXS7AZ.js +0 -58
package/dist/app.js
CHANGED
|
@@ -1,41 +1,39 @@
|
|
|
1
1
|
import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { $
|
|
3
|
-
import { 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
|
|
4
|
-
import { E as withSpan, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, T as withLogContext, U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CONTEXT_COMPACTION_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 { $a as createPluginLogger, $n as validatePlugins, $r as takeDueTimerWatches, Da as consumeSandboxEgressPermissionDeniedSignal, Dn as getThreadStopDecision, Dt as isInvalidConversationRecordError, Ea as consumeSandboxEgressAuthRequiredSignal, Eo as resolveRootVisibility, Fi as proxyVercelSandboxEgressRequest, Fn as getExperimentalFeatures, Fo as createPluginCache, Gi as slackMention, Gn as getPluginApiRoutes, Ho as setConfigDefaults, In as isExperimentalFeatureEnabled, Kn as getPluginRoutes, Kr as collectEventMatchKeys, Ln as setExperimentalFeatures, Na as normalizeSandboxEgressTracePropagationDomains, Nr as reviewItemReaderForUser, Pi as isVercelSandboxEgressRequest, Qi as postSlackEphemeralMessage, Qn as setPlugins, Rn as createUserTokenStore, S as projectConversationMessages, Ta as clearSandboxEgressSignals, Tr as canActOnReviewItem, Tt as hasRunnableConversationWork, Vo as getConfigDefaults, Xr as findMatchingWatches, Zi as openSlackModal, Zn as getPlugins, _ as appendConversationMessages, _o as readConversationMessageEventSeq, ai as verifySlackDirectCredentialSubject, ci as getDashboardConversationLink, ct as CONVERSATION_WORK_STALE_ENQUEUE_MS, da as isDmChannel, ei as bindEventAutomationCredentialSubject, fi as getDashboardTaskLink, ga as runWithWorkspaceTeamId, go as readConversationLastEventSeq, ha as getWorkspaceTeamId, hi as createPluginState, ia as slackExternalRefIdSchema, ii as verifyScheduledAutomationCredentialSubject, ka as parseSandboxEgressCredentialToken, ko as listConversationAnnotations, la as getSlackClient, mo as readConversationEventPageAfter, mr as dismissOpenReviewItems, ni as bindSlackDirectCredentialSubject, no as readConversationAccessFromSql, nr as setBriefsConfig, pi as setDashboardConversationLinkOptions, po as readConversationEventPage, ra as slackEntitySchema, ri as verifyEventAutomationCredentialSubject, ti as bindScheduledAutomationCredentialSubject, ui as getDashboardReviewItemLink, w as settleConversationTitleWork, wn as SubscribedReplyReason, xr as searchReviewItems, za as createPluginEmbedder, zi as resolveBaseUrl } from "./projection-CL_YWeGf.js";
|
|
3
|
+
import { H 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-CkHcUMN7.js";
|
|
4
|
+
import { E as withSpan, I as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, N as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, T as withLogContext, U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, b as setSpanAttributes, h as logWarn, k as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-BO5zU6Mt.js";
|
|
5
|
+
import { t as JUNIOR_VERSION } from "./version-DBvhk1X9.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 {
|
|
8
|
-
import {
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { $ as readViewerAutomationSummary, A as runWithSlackInstallation, C as readSlackReviewItemCardConversationId, Ct as
|
|
7
|
+
import { B as touchConversationDetail, D as resolveActorIdentityId, N as recordGoogleSignIn, a as getConversationStore, b as withConversationMutationLock, o as getDb, p as withConversationEventLock, q as createSlackDestination, r as getConversationEventStore, s as getSqlExecutor, t as closeDb } from "./db-DJ11eZqq.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-BY9TB31g.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BCIuBe4d.js";
|
|
10
|
+
import { $ as readViewerAutomationSummary, A as runWithSlackInstallation, C as readSlackReviewItemCardConversationId, Ct as markConversationRead, D as parseSlackReviewItemClick, E as buildSlackReviewItemModal, H as logScheduledAutomationRunSkipped, M as parseSlackThreadId, O as parseSlackReviewItemFormTarget, S as createSlackReviewItemShow, U as scheduledAutomationRunAttributes, Xt as ingestEvent, Y as ViewerTaskNotFoundError, Yt as processWorkspaceSnapshotJob, Z as readViewerAutomationExecutions, _ as unpublishedArtifactHeaders, at as deliverReviewItemChange, g as readPublicArtifact, gt as collectAttachmentGarbage, h as publicArtifactHeaders, j as verifySlackSignature, k as parseSlackUserInputSubmission, kt as recordSubagentEnded, lt as appendAndEnqueueWebMessage, mt as webActorFromUser, n as executeAgentRun, ot as renderReviewItemMessage, pt as recordWebConversationActivity, r as processBackgroundCompaction, rt as effectiveTaskOutcomes, st as reviewItemChangeRecord, t as createAgentRunner, tt as readViewerAutomations, ut as conversationTurnIdForMessage, v as setConversationSubscription, vt as requestAttachmentDeletion, w as syncReviewItemSlackCards, xt as archiveConversation, y as lookupSlackUserProfile, z as joinPublicChannel } from "./agent-runner-Bfnw551N.js";
|
|
11
11
|
import { a as withLock, i as fenceLock, n as MUTATION_LOCK_TTL_MS } from "./locks-D-0h111u.js";
|
|
12
|
-
import {
|
|
12
|
+
import { g as createCache, i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-DrMmFUul.js";
|
|
13
|
+
import { r as getStateAdapter, t as disconnectStateAdapter } from "./adapter-CL-HUKgd.js";
|
|
13
14
|
import { a as getNextRunAtMs } from "./schedule-BTp__wrw.js";
|
|
14
|
-
import { G as conversationBriefSchema, j as annotationCard, p as conversationFeedQuerySchema, x as conversationSurfaceSchema, y as conversationReportStatusSchema } from "./conversation-
|
|
15
|
+
import { G as conversationBriefSchema, j as annotationCard, p as conversationFeedQuerySchema, x as conversationSurfaceSchema, y as conversationReportStatusSchema } from "./conversation-E7ZPJx2H.js";
|
|
15
16
|
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-
|
|
20
|
-
import {
|
|
21
|
-
import { C as removeActiveConversation, _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, v as hasRunnableConversationWork$1, y as listActiveConversationIds } from "./store-
|
|
22
|
-
import {
|
|
23
|
-
import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-
|
|
24
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
17
|
+
import { D as listPendingAgentInvocationResults, E as listPendingAgentInvocationMailboxAppends } from "./turn-failure-response-B5nV1Er-.js";
|
|
18
|
+
import { M as slackChannelMessageReplyThreadTs, N as slackChannelMessageRunsAutomation, O as getEventCatalog, W as renderSlackObjectCard, d as getAuthPausedConversationTurnId, j as slackChannelMessageEvent, k as SLACK_EVENT_NAMESPACE, z as renderTaskInput } from "./session-stop-B2Nut40V.js";
|
|
19
|
+
import { _ as buttonUserInputField } from "./reporting-window-B3Ze-Qnt.js";
|
|
20
|
+
import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-Bt6GgAiA.js";
|
|
21
|
+
import { T as isConversationQueueMessageRejectedError, _ as getVercelConversationWorkQueue, f as queueCallback, g as verifyWorkspaceSnapshotJobMessage, i as verifyBackgroundCompactionMessage, l as pluginTaskQueueConsumer, o as createVercelPluginTaskCallback, p as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, r as vercelBackgroundCompactionQueue, t as BACKGROUND_COMPACTION_QUEUE_TOPIC, u as registerVercelPluginTaskDevConsumer, v as resolveConversationWorkQueueTopic, w as conversationQueueMessageSchema, x as getQueueProvider, y as verifyConversationQueueMessage } from "./background-compaction-queue-CYI909P5.js";
|
|
22
|
+
import { C as removeActiveConversation, _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, v as hasRunnableConversationWork$1, y as listActiveConversationIds } from "./store-DdIEUL1q.js";
|
|
23
|
+
import { A as withScheduledAutomationLock, E as readScheduledAutomation, F as findMatchingEventAutomations, H as eventAutomationRunLimitReason, M as collectEventAutomationMatchKeys, O as saveScheduledAutomationInLock, Q as existingConversationId, Tt as eventGuidance, V as admitEventAutomationRun, W as automationVersionOf, bt as coerceThreadConversationState, c as getDispatchConversationId, ct as recordAutomationExecution, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, j as blockEventAutomation, k as scheduledRunId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, w as listScheduledAutomationsForTeam, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-D_RDr2Hu.js";
|
|
24
|
+
import { M as scheduledRunSchema, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-DksGNDRO.js";
|
|
25
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-K4pqwoVZ.js";
|
|
25
26
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-HYh_JOdw.js";
|
|
26
|
-
import { a as conversationPendingMessageDeliverySchema } from "./conversation-pending-messages-
|
|
27
|
-
import { $ as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-hcsYatw-.js";
|
|
27
|
+
import { a as conversationPendingMessageDeliverySchema } from "./conversation-pending-messages-DVch6YQw.js";
|
|
28
|
+
import { $ as readReviewItemForUser, A as createProductionConversationWorkOptions, B as clearSlackPendingReactions, C as createConversationForViewer, D as readConversationPendingMessages, E as cancelConversationPendingMessagesForViewer, F as isAllowedSignInEmail, G as createSlackWebApiStatusSender, H as stripLeadingBotMention, I as readEnvList, J as recordSkippedConversationMessage, K as stopConversation, L as resolveAllowedDomains, M as getProductionSlackAdapter, N as assertNoLegacyAllowedDomains, P as isAllowedDomain, Q as closeReviewItemsAnsweredByReply, R as startProcessingReaction, S as appendConversationMessageForViewer, T as encodeConversationCursor, U as normalizeIncomingSlackThreadId, V as slackInboundMessageId, W as withNormalizedThreadId, X as ReviewItemActionError, Y as bindMessageAuthorIdentityId, Z as actOnReviewItem, a as pinConversation, at as setConversationAutoArchive, b as readConversationRecordFromSql, ct as enqueueAgentDispatch, et as reviewItemChange, i as readConversationFeed, it as runAutoArchiveSweep, j as createProductionSlackWebhookServices, lt as GET$4, n as steerConversationPendingMessagesForViewer, nt as archiveViewerDoneConversations, q as parseContent, s as readConversationDetail, t as stopConversationTurnForViewer, w as decodeConversationCursor, z as buildSlackInboundMessage } from "./stop-kujZLbi0.js";
|
|
29
|
+
import { a as enqueueAgentInvocation, i as endAgentInvocationsOfStoppedWork } from "./work-ljRoODGu.js";
|
|
30
|
+
import { n as enqueueAgentInvocationResult } from "./result-Bo1TZu0Q.js";
|
|
31
|
+
import { o as unlinkProvider } from "./connections-BnIj0wtx.js";
|
|
32
|
+
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-CzMar9hq.js";
|
|
33
33
|
import { t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
34
|
-
import {
|
|
35
|
-
import { t as
|
|
36
|
-
import { t as
|
|
37
|
-
import { t as bindSpawnAgent } from "./spawn-BB2_4VYn.js";
|
|
38
|
-
import { t as processPluginTask } from "./task-runner-D8lddjzp.js";
|
|
34
|
+
import { t as processConversationWork } from "./worker-CYO1Q0Js.js";
|
|
35
|
+
import { t as bindMessageAgent } from "./message-CsUbuEc8.js";
|
|
36
|
+
import { t as bindSpawnAgent } from "./spawn-CalgZQiu.js";
|
|
39
37
|
import { createRequire } from "node:module";
|
|
40
38
|
import { Hono } from "hono";
|
|
41
39
|
import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -45,8 +43,8 @@ import { EVENT_SUMMARY_MAX_LENGTH, EVENT_TEXT_MAX_LENGTH, dispatchOptionsSchema,
|
|
|
45
43
|
import { pathToFileURL } from "node:url";
|
|
46
44
|
import net from "node:net";
|
|
47
45
|
import { decodeJwt } from "jose";
|
|
48
|
-
import https from "node:https";
|
|
49
46
|
import { HTTPException } from "hono/http-exception";
|
|
47
|
+
import https from "node:https";
|
|
50
48
|
import { Message, ThreadImpl } from "chat";
|
|
51
49
|
import * as acp from "@agentclientprotocol/sdk";
|
|
52
50
|
import dns from "node:dns";
|
|
@@ -6038,7 +6036,7 @@ const mcpConversationSchema = z.object({
|
|
|
6038
6036
|
locationUrl: z.string().optional().describe("Slack thread link."),
|
|
6039
6037
|
startedAt: z.string(),
|
|
6040
6038
|
lastSeenAt: z.string().describe("Time of the newest activity. archiveConversation takes this value."),
|
|
6041
|
-
archivedAt: z.string().optional().describe("Set when
|
|
6039
|
+
archivedAt: z.string().optional().describe("Set when anyone archived it. Archive applies to everyone."),
|
|
6042
6040
|
pinnedAt: z.string().optional().describe("Set when you pinned it."),
|
|
6043
6041
|
url: z.string().optional().describe("Dashboard link.")
|
|
6044
6042
|
}).strict();
|
|
@@ -6053,7 +6051,7 @@ function mcpConversation(summary) {
|
|
|
6053
6051
|
locationUrl: summary.locationUrl,
|
|
6054
6052
|
startedAt: summary.startedAt,
|
|
6055
6053
|
lastSeenAt: summary.lastSeenAt,
|
|
6056
|
-
archivedAt:
|
|
6054
|
+
archivedAt: summary.archivedAt ?? void 0,
|
|
6057
6055
|
pinnedAt: summary.pinnedAt ?? void 0,
|
|
6058
6056
|
url: getDashboardConversationLink(summary.conversationId)
|
|
6059
6057
|
};
|
|
@@ -6229,17 +6227,17 @@ async function isConversationParticipant(user, conversationId) {
|
|
|
6229
6227
|
}
|
|
6230
6228
|
// src/api/mcp/tools/archive-conversation.ts
|
|
6231
6229
|
/**
|
|
6232
|
-
* Register `archiveConversation`. It archives or restores
|
|
6233
|
-
*
|
|
6230
|
+
* Register `archiveConversation`. It archives or restores one Conversation,
|
|
6231
|
+
* and optionally its children, for everyone.
|
|
6234
6232
|
*/
|
|
6235
6233
|
function registerArchiveConversationTool(server, { user }) {
|
|
6236
6234
|
server.registerTool("archiveConversation", {
|
|
6237
6235
|
title: "Archive conversation",
|
|
6238
|
-
description: "Archive one of your conversations, or restore it
|
|
6236
|
+
description: "Archive one of your conversations, or restore it, for everyone in it. Archiving a conversation hides it and its child conversations. A restore fails while a conversation above it is archived. A new message from a person restores the conversation and the archived conversations above it.",
|
|
6239
6237
|
inputSchema: {
|
|
6240
6238
|
conversationId: mcpConversationIdSchema,
|
|
6241
6239
|
archived: z.boolean().default(true).describe("False restores an archived conversation."),
|
|
6242
|
-
applyToChildren: z.boolean().default(false).describe("
|
|
6240
|
+
applyToChildren: z.boolean().default(false).describe("On archive, true also archives every child of this conversation at any depth; without it, the archive fails while any of its children is not archived. On restore, true also restores the children that were archived with this conversation."),
|
|
6243
6241
|
lastSeenAt: z.string().datetime().describe("`lastSeenAt` from searchConversations or getConversation. The archive fails when the conversation has newer activity.")
|
|
6244
6242
|
},
|
|
6245
6243
|
outputSchema: { archivedAt: z.string().nullable().describe("Null when the conversation is not archived.") },
|
|
@@ -6269,7 +6267,7 @@ function registerArchiveConversationTool(server, { user }) {
|
|
|
6269
6267
|
function registerArchiveDoneConversationsTool(server, { user }) {
|
|
6270
6268
|
server.registerTool("archiveDoneConversations", {
|
|
6271
6269
|
title: "Archive done conversations",
|
|
6272
|
-
description: "Archive all of your conversations whose work is done and that stayed quiet for your auto-archive wait time, once. It skips pinned
|
|
6270
|
+
description: "Archive all of your conversations whose work is done and that stayed quiet for your auto-archive wait time, once. It skips conversations that anyone pinned or turned auto-archive off for, and conversations that wait on a person. Archive applies to everyone in the conversation.",
|
|
6273
6271
|
inputSchema: {},
|
|
6274
6272
|
outputSchema: { archived: z.number().int().describe("Conversations archived.") },
|
|
6275
6273
|
annotations: {
|
|
@@ -6745,7 +6743,7 @@ function registerMarkConversationReadTool(server, { user }) {
|
|
|
6745
6743
|
function registerPinConversationTool(server, { user }) {
|
|
6746
6744
|
server.registerTool("pinConversation", {
|
|
6747
6745
|
title: "Pin conversation",
|
|
6748
|
-
description: "Pin one of your conversations, or unpin it. A pin applies only to you, restores an archived conversation, and keeps auto-archive from archiving it.",
|
|
6746
|
+
description: "Pin one of your top-level conversations, or unpin it. A child conversation cannot be pinned or unpinned; it uses the pin of its root. A pin applies only to you, restores an archived conversation, and keeps auto-archive from archiving it.",
|
|
6749
6747
|
inputSchema: {
|
|
6750
6748
|
conversationId: mcpConversationIdSchema,
|
|
6751
6749
|
pinned: z.boolean().default(true).describe("False unpins the conversation.")
|
|
@@ -6774,7 +6772,7 @@ function registerSearchConversationsTool(server, { user }) {
|
|
|
6774
6772
|
description: "Search your conversations and return up to 50, newest activity first. Only conversations that you started or take part in match.",
|
|
6775
6773
|
inputSchema: {
|
|
6776
6774
|
q: feedQuery.q.describe("Text to search for in titles and Briefs."),
|
|
6777
|
-
status: feedQuery.status.describe("Return conversations that
|
|
6775
|
+
status: feedQuery.status.describe("Return conversations that are not archived (default) or that are archived. A search ignores this filter.")
|
|
6778
6776
|
},
|
|
6779
6777
|
outputSchema: { conversations: z.array(mcpConversationSchema) },
|
|
6780
6778
|
annotations: {
|
|
@@ -6890,7 +6888,7 @@ function registerSetConversationAutoArchiveTool(server, { user }) {
|
|
|
6890
6888
|
description: "Turn auto-archive on or off for one of your conversations. This overrides your default for that conversation only.",
|
|
6891
6889
|
inputSchema: {
|
|
6892
6890
|
conversationId: mcpConversationIdSchema,
|
|
6893
|
-
autoArchive: z.boolean().describe("True
|
|
6891
|
+
autoArchive: z.boolean().describe("True lets auto-archive archive the conversation for everyone after its work is done. False keeps it from auto-archive for everyone.")
|
|
6894
6892
|
},
|
|
6895
6893
|
outputSchema: { autoArchive: z.boolean() },
|
|
6896
6894
|
annotations: {
|
|
@@ -6907,6 +6905,37 @@ function registerSetConversationAutoArchiveTool(server, { user }) {
|
|
|
6907
6905
|
}
|
|
6908
6906
|
});
|
|
6909
6907
|
}
|
|
6908
|
+
// src/api/mcp/tools/set-conversation-subscription.ts
|
|
6909
|
+
/**
|
|
6910
|
+
* Register `setConversationSubscription`, which subscribes or unsubscribes
|
|
6911
|
+
* the user. It never changes another person's subscription.
|
|
6912
|
+
*/
|
|
6913
|
+
function registerSetConversationSubscriptionTool(server, { user }) {
|
|
6914
|
+
server.registerTool("setConversationSubscription", {
|
|
6915
|
+
title: "Set conversation subscription",
|
|
6916
|
+
description: "Subscribe to one of your conversations, or unsubscribe from it. Unsubscribe removes it only from your feed and clears your pin. When nobody else is subscribed, it archives the conversation for everyone. Your next mention of the bot in it subscribes you again.",
|
|
6917
|
+
inputSchema: {
|
|
6918
|
+
conversationId: mcpConversationIdSchema,
|
|
6919
|
+
subscribed: z.boolean().describe("False unsubscribes you.")
|
|
6920
|
+
},
|
|
6921
|
+
outputSchema: {
|
|
6922
|
+
archivedAt: z.string().nullable().describe("Set when the conversation is archived for everyone."),
|
|
6923
|
+
subscribed: z.boolean()
|
|
6924
|
+
},
|
|
6925
|
+
annotations: {
|
|
6926
|
+
destructiveHint: false,
|
|
6927
|
+
idempotentHint: true,
|
|
6928
|
+
openWorldHint: false,
|
|
6929
|
+
readOnlyHint: false
|
|
6930
|
+
}
|
|
6931
|
+
}, async ({ conversationId, subscribed }) => {
|
|
6932
|
+
try {
|
|
6933
|
+
return mcpToolResult(await setConversationSubscription(user, conversationId, { subscribed }));
|
|
6934
|
+
} catch (error) {
|
|
6935
|
+
return apiToolError(error);
|
|
6936
|
+
}
|
|
6937
|
+
});
|
|
6938
|
+
}
|
|
6910
6939
|
// src/api/mcp/tools/stop-conversation.ts
|
|
6911
6940
|
/**
|
|
6912
6941
|
* Register `stopConversation`, which stops the Conversation and every child
|
|
@@ -6961,6 +6990,7 @@ const TOOLS_BY_SCOPE = {
|
|
|
6961
6990
|
registerArchiveDoneConversationsTool,
|
|
6962
6991
|
registerPinConversationTool,
|
|
6963
6992
|
registerSetConversationAutoArchiveTool,
|
|
6993
|
+
registerSetConversationSubscriptionTool,
|
|
6964
6994
|
registerMarkConversationReadTool,
|
|
6965
6995
|
registerStopConversationTool,
|
|
6966
6996
|
registerCancelQueuedMessagesTool
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as resolveLocalScheduleAtMs, i as getFirstRunAtMs, o as getZonedDateTimeParts, s as isValidTimeZone } from "./schedule-BTp__wrw.js";
|
|
2
|
-
import { i as actorIdentitySchema } from "./conversation-
|
|
2
|
+
import { i as actorIdentitySchema } from "./conversation-E7ZPJx2H.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/scheduled-automations/schedule-intent.ts
|
|
@@ -403,10 +403,7 @@ const automationEditFieldsSchema = z.object({
|
|
|
403
403
|
credentialMode: z.enum(["system", "creator"]).optional(),
|
|
404
404
|
outcomes: z.array(z.union([taskOutcomeInputSchema, taskOutcomeSchema])).max(5).optional()
|
|
405
405
|
});
|
|
406
|
-
const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({
|
|
407
|
-
schedule: scheduleIntentSchema.optional(),
|
|
408
|
-
status: z.enum(["active", "blocked"]).optional()
|
|
409
|
-
}).strict();
|
|
406
|
+
const scheduledAutomationEditSchema = automationEditFieldsSchema.extend({ schedule: scheduleIntentSchema.optional() }).strict();
|
|
410
407
|
const eventAutomationEditSchema = automationEditFieldsSchema.extend({ trigger: eventAutomationTriggerSchema.safeExtend({
|
|
411
408
|
identifier: z.string().trim().min(1).max(300).optional(),
|
|
412
409
|
label: z.string().trim().min(1).max(500)
|
|
@@ -692,7 +689,7 @@ const automationEditSchema = z.discriminatedUnion("kind", [automationEditBaseSch
|
|
|
692
689
|
])
|
|
693
690
|
}).strict()]);
|
|
694
691
|
/** Partial edits require the revision returned by the edit read. */
|
|
695
|
-
const automationUpdateSchema = z.discriminatedUnion("kind", [scheduledAutomationEditSchema.
|
|
692
|
+
const automationUpdateSchema = z.discriminatedUnion("kind", [scheduledAutomationEditSchema.extend({
|
|
696
693
|
kind: z.literal("scheduled"),
|
|
697
694
|
revision: automationRevisionSchema
|
|
698
695
|
}).strict(), eventAutomationEditSchema.extend({
|
package/dist/{background-compaction-queue-DXkLsWoH.js → background-compaction-queue-CYI909P5.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, m as logInfo, p as logException } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-CkHcUMN7.js";
|
|
2
|
+
import { E as withSpan, h as logWarn, m as logInfo, p as logException } from "./logging-BO5zU6Mt.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import * as z from "zod";
|
|
@@ -381,6 +381,140 @@ async function sendWorkspaceSnapshotJob(message) {
|
|
|
381
381
|
async function sendNextWorkspaceSnapshotJob(message) {
|
|
382
382
|
await send(message);
|
|
383
383
|
}
|
|
384
|
+
// src/chat/queue/callback.ts
|
|
385
|
+
/** Shared queue callback wiring for signed messages. */
|
|
386
|
+
/** Build the HTTP callback and local-dev consumer for one signed queue. */
|
|
387
|
+
function queueCallback(options) {
|
|
388
|
+
const consume = async (message, metadata) => {
|
|
389
|
+
if (options.skip?.(metadata)) return;
|
|
390
|
+
try {
|
|
391
|
+
await runWithTurnRequestDeadline(() => options.run(message, metadata));
|
|
392
|
+
} catch (error) {
|
|
393
|
+
const reason = options.permanentError?.(error);
|
|
394
|
+
if (!reason) throw error;
|
|
395
|
+
options.onRejected(reason, metadata, error);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
const handler = async (value, metadata) => {
|
|
399
|
+
if (options.skip?.(metadata)) return;
|
|
400
|
+
const checked = options.verify(value);
|
|
401
|
+
if (checked.status === "rejected") {
|
|
402
|
+
options.onRejected(checked.reason, metadata);
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
if (checked.status === "unavailable") throw new Error(`Queue message verification unavailable: ${checked.reason}`);
|
|
406
|
+
await consume(checked.message, metadata);
|
|
407
|
+
};
|
|
408
|
+
const retry = (error, metadata) => {
|
|
409
|
+
const reason = options.permanentError?.(error);
|
|
410
|
+
if (reason) {
|
|
411
|
+
options.onRejected(reason, metadata, error);
|
|
412
|
+
return { acknowledge: true };
|
|
413
|
+
}
|
|
414
|
+
if (options.maxDeliveries !== null && metadata.deliveryCount >= options.maxDeliveries) return { acknowledge: true };
|
|
415
|
+
};
|
|
416
|
+
const consumer = {
|
|
417
|
+
consumerGroup: options.consumerGroup,
|
|
418
|
+
handler,
|
|
419
|
+
retry,
|
|
420
|
+
topic: options.topic,
|
|
421
|
+
visibilityTimeoutSeconds: options.visibilityTimeoutSeconds
|
|
422
|
+
};
|
|
423
|
+
return {
|
|
424
|
+
/** Run a message that an in-process queue already trusts. */
|
|
425
|
+
consume,
|
|
426
|
+
consumer,
|
|
427
|
+
create: () => getQueueProvider().createCallback(consumer),
|
|
428
|
+
registerDev: () => {
|
|
429
|
+
if (process.env.NODE_ENV !== "development") return;
|
|
430
|
+
return getQueueProvider().registerDevConsumer?.(consumer);
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
// src/chat/plugins/task-queue.ts
|
|
435
|
+
/**
|
|
436
|
+
* Delivery for plugin-registered tasks.
|
|
437
|
+
*
|
|
438
|
+
* Plugins register named tasks. This module owns the shared signed message,
|
|
439
|
+
* send path, and HTTP/local callback. Core keeps one topic and one runner.
|
|
440
|
+
*/
|
|
441
|
+
/** Deploy topic name. Keep stable for Vercel queue wiring. */
|
|
442
|
+
const PLUGIN_TASK_QUEUE_TOPIC = "junior_plugin_tasks";
|
|
443
|
+
const PLUGIN_TASK_DEV_CONSUMER_GROUP = "junior_plugin_tasks_dev";
|
|
444
|
+
const PLUGIN_TASK_MAX_DELIVERIES = 5;
|
|
445
|
+
const PLUGIN_TASK_SIGN_CONTEXT = "junior.plugin_task_queue.v1";
|
|
446
|
+
const PLUGIN_TASK_SIGN_VERSION = "v1";
|
|
447
|
+
const pluginTaskParamsSchema = z.object({
|
|
448
|
+
conversationId: z.string().min(1),
|
|
449
|
+
sessionId: z.string().min(1)
|
|
450
|
+
}).strict();
|
|
451
|
+
const pluginTaskSign = {
|
|
452
|
+
context: PLUGIN_TASK_SIGN_CONTEXT,
|
|
453
|
+
schema: z.object({
|
|
454
|
+
name: z.string().min(1),
|
|
455
|
+
params: pluginTaskParamsSchema,
|
|
456
|
+
plugin: z.string().min(1)
|
|
457
|
+
}).strict(),
|
|
458
|
+
signatureVersion: PLUGIN_TASK_SIGN_VERSION,
|
|
459
|
+
parts: (message) => [
|
|
460
|
+
message.plugin,
|
|
461
|
+
message.name,
|
|
462
|
+
message.params.conversationId,
|
|
463
|
+
message.params.sessionId
|
|
464
|
+
]
|
|
465
|
+
};
|
|
466
|
+
/** Build the stable id used for delivery dedupe and tracing. */
|
|
467
|
+
function pluginTaskId(args) {
|
|
468
|
+
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)}`;
|
|
469
|
+
}
|
|
470
|
+
/** Sign a plugin task message for tests and local checks. */
|
|
471
|
+
function signPluginTaskQueueMessage(message, nowMs = Date.now()) {
|
|
472
|
+
return signQueueMessage(pluginTaskSign, message, nowMs);
|
|
473
|
+
}
|
|
474
|
+
function verifyPluginTaskQueueMessage(value, nowMs = Date.now()) {
|
|
475
|
+
return verifyQueueMessage(pluginTaskSign, value, nowMs);
|
|
476
|
+
}
|
|
477
|
+
function logPluginTaskQueueMessageRejected(reason, metadata) {
|
|
478
|
+
logWarn("plugin.task.queue_message.rejected", {
|
|
479
|
+
"app.queue.consumer_group": metadata.consumerGroup,
|
|
480
|
+
"app.queue.delivery_count": metadata.deliveryCount,
|
|
481
|
+
"app.queue.message_id": metadata.messageId,
|
|
482
|
+
"app.queue.reject_reason": reason,
|
|
483
|
+
"app.queue.topic_name": metadata.topicName
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
function pluginTaskCallback() {
|
|
487
|
+
return queueCallback({
|
|
488
|
+
consumerGroup: PLUGIN_TASK_DEV_CONSUMER_GROUP,
|
|
489
|
+
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
490
|
+
onRejected: logPluginTaskQueueMessageRejected,
|
|
491
|
+
run: async (message) => {
|
|
492
|
+
const { processPluginTask } = await import("./task-runner-D_RDr2Hu.js").then((n) => n.r);
|
|
493
|
+
await processPluginTask(message);
|
|
494
|
+
},
|
|
495
|
+
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
496
|
+
verify: verifyPluginTaskQueueMessage
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
/** Send one plugin task through the shared signed delivery path. */
|
|
500
|
+
async function sendVercelPluginTask(message) {
|
|
501
|
+
await getQueueProvider().send(PLUGIN_TASK_QUEUE_TOPIC, signPluginTaskQueueMessage(message), {
|
|
502
|
+
idempotencyKey: pluginTaskId(message),
|
|
503
|
+
retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
/** Create the HTTP callback for plugin tasks. */
|
|
507
|
+
function createVercelPluginTaskCallback() {
|
|
508
|
+
return pluginTaskCallback().create();
|
|
509
|
+
}
|
|
510
|
+
/** Return the queue consumer for plugin tasks, for a pulling queue worker. */
|
|
511
|
+
function pluginTaskQueueConsumer() {
|
|
512
|
+
return pluginTaskCallback().consumer;
|
|
513
|
+
}
|
|
514
|
+
/** Register the local-dev consumer for plugin tasks. */
|
|
515
|
+
function registerVercelPluginTaskDevConsumer() {
|
|
516
|
+
return pluginTaskCallback().registerDev();
|
|
517
|
+
}
|
|
384
518
|
// src/chat/services/background-compaction-queue.ts
|
|
385
519
|
/**
|
|
386
520
|
* Messages of background compaction jobs.
|
|
@@ -420,4 +554,4 @@ const vercelBackgroundCompactionQueue = { send: async (message) => {
|
|
|
420
554
|
retentionSeconds: QUEUE_SIGNATURE_MAX_AGE_MS / 1e3
|
|
421
555
|
});
|
|
422
556
|
} };
|
|
423
|
-
export {
|
|
557
|
+
export { ConversationQueueMessageRejectedError as C, getTurnRequestDeadline as S, isConversationQueueMessageRejectedError as T, getVercelConversationWorkQueue as _, PLUGIN_TASK_QUEUE_TOPIC as a, QUEUE_SIGNATURE_MAX_AGE_MS as b, pluginTaskParamsSchema as c, sendVercelPluginTask as d, queueCallback as f, verifyWorkspaceSnapshotJobMessage as g, sendWorkspaceSnapshotJob as h, verifyBackgroundCompactionMessage as i, pluginTaskQueueConsumer as l, sendNextWorkspaceSnapshotJob as m, backgroundCompactionId as n, createVercelPluginTaskCallback as o, WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC as p, vercelBackgroundCompactionQueue as r, pluginTaskId as s, BACKGROUND_COMPACTION_QUEUE_TOPIC as t, registerVercelPluginTaskDevConsumer as u, resolveConversationWorkQueueTopic as v, conversationQueueMessageSchema as w, getQueueProvider as x, verifyConversationQueueMessage as y };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { K as parseBriefInput, V as briefCodeChangeSchema, W as briefResourceLabel, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-
|
|
3
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BvIUzY4y.js";
|
|
1
|
+
import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BHOEQSmf.js";
|
|
2
|
+
import { K as parseBriefInput, V as briefCodeChangeSchema, W as briefResourceLabel, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-E7ZPJx2H.js";
|
|
4
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
4
|
import path from "node:path";
|
|
6
5
|
import * as z from "zod";
|
|
@@ -263,7 +262,7 @@ async function parseRunOptions(argv) {
|
|
|
263
262
|
* token.
|
|
264
263
|
*/
|
|
265
264
|
async function configuredBriefModelId() {
|
|
266
|
-
const { botConfig } = await import("./config-
|
|
265
|
+
const { botConfig } = await import("./config-CkHcUMN7.js").then((n) => n.r);
|
|
267
266
|
return botConfig.fastModelId;
|
|
268
267
|
}
|
|
269
268
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -335,7 +334,9 @@ async function runSnapshot(snapshotPath, options, prompt) {
|
|
|
335
334
|
for (const throughIndex of generationIndexes(snapshot, options.turnByTurn, finalThroughIndex)) versions.push(await generateBrief({
|
|
336
335
|
completeObject: (request) => completeObject({
|
|
337
336
|
...request,
|
|
338
|
-
modelId: options.model
|
|
337
|
+
modelId: options.model,
|
|
338
|
+
operation: "brief_update",
|
|
339
|
+
cost: { owner: "caller" }
|
|
339
340
|
}),
|
|
340
341
|
input: briefInputFromSnapshot(snapshot, throughIndex),
|
|
341
342
|
previous: versions.at(-1)?.brief,
|
|
@@ -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-BriFLnaJ.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-Bfnw551N.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("../
|
|
102
|
+
import("../projection-CL_YWeGf.js").then((n) => n.Un),
|
|
103
|
+
import("../catalog-runtime-BCIuBe4d.js").then((n) => n.t),
|
|
104
|
+
import("../validation-K4pqwoVZ.js").then((n) => n.r),
|
|
105
|
+
import("../db-DJ11eZqq.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,18 +152,18 @@ 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-CL_YWeGf.js").then((n) => n.tr);
|
|
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-D3YeCQgt.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-hiDKK0_n.js");
|
|
159
159
|
const { createLocalOAuthState } = await import("../oauth-relay-D6xxVywK.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 { skipInputAfterConversationStop } = await import("../session-stop-
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CcnSPP4S.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-CalgZQiu.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-CsUbuEc8.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker } = await import("../result-Bo1TZu0Q.js").then((n) => n.i);
|
|
164
|
+
const { skipInputAfterConversationStop } = await import("../session-stop-B2Nut40V.js").then((n) => n.a);
|
|
165
165
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
166
|
-
const { processConversationWork } = await import("../worker-
|
|
166
|
+
const { processConversationWork } = await import("../worker-CYO1Q0Js.js").then((n) => n.n);
|
|
167
167
|
let agentRunner;
|
|
168
168
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
169
169
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-BO5zU6Mt.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-BriFLnaJ.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-CD5aJdzg.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-C9urXVfi.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runServiceAccount(argv) {
|
|
31
|
-
return await (await import("../service-account-
|
|
31
|
+
return await (await import("../service-account-r6fl0b-9.js")).runServiceAccount(argv);
|
|
32
32
|
}
|
|
33
33
|
async function runBriefs(argv) {
|
|
34
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-DaXiMWzT.js")).runBriefs(argv);
|
|
35
35
|
}
|
|
36
36
|
function topLevelCommand(argv) {
|
|
37
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { $a as createPluginLogger, $n as validatePlugins, Qn as setPlugins } from "../projection-CL_YWeGf.js";
|
|
2
|
+
import { o as getDb } from "../db-DJ11eZqq.js";
|
|
3
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BCIuBe4d.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-K4pqwoVZ.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,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { t as disconnectStateAdapter } from "../adapter-
|
|
4
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { Pa as SANDBOX_RUNTIME, ki as create } from "../projection-CL_YWeGf.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BCIuBe4d.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-CL-HUKgd.js";
|
|
4
|
+
import { n as resolve } from "../resolve-Bt6GgAiA.js";
|
|
5
5
|
// src/cli/snapshot-create.ts
|
|
6
|
-
const DEFAULT_RUNTIME = "node22";
|
|
7
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
|
8
7
|
function progressMessage(phase) {
|
|
9
8
|
if (phase === "resolve_start") return "Resolving sandbox snapshot profile...";
|
|
@@ -49,7 +48,7 @@ async function runSnapshotCreate(log = console.log) {
|
|
|
49
48
|
log("Skipping sandbox snapshot create (JUNIOR_SKIP_SNAPSHOT=1)");
|
|
50
49
|
return;
|
|
51
50
|
}
|
|
52
|
-
const runtime =
|
|
51
|
+
const runtime = SANDBOX_RUNTIME;
|
|
53
52
|
const timeoutMs = DEFAULT_TIMEOUT_MS;
|
|
54
53
|
try {
|
|
55
54
|
logSnapshotProfile(runtime, log);
|
package/dist/cli/upgrade.d.ts
CHANGED
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-CkHcUMN7.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-BY9TB31g.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-BriFLnaJ.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|