@sentry/junior 0.302.0 → 0.303.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-context-Cx9fn9B3.js → adapter-context-BdVnSuY5.js} +2 -2
- package/dist/{admin-_poE5NKL.js → admin-AfeAdS3J.js} +2 -2
- package/dist/{agent-runner-CY9RvsTX.js → agent-runner-BP8_DLUv.js} +2987 -2948
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +6 -6
- package/dist/api.d.ts +13 -12
- package/dist/api.js +207 -80
- package/dist/{app-BpY3wtRP.d.ts → app-Dd9v1mNx.d.ts} +15 -15
- package/dist/app.d.ts +1 -1
- package/dist/app.js +63 -64
- package/dist/{automation-Cva5ZOwW.js → automation-D9MvhOWY.js} +3 -1
- package/dist/{background-compaction-queue-CXFq1_Cz.js → background-compaction-queue-xaE05jxH.js} +6 -6
- package/dist/{briefs-B3NG-pid.js → briefs-D8i-dKTp.js} +4 -4
- package/dist/{catalog-runtime-Dss0lSV6.js → catalog-runtime-d1EM6Z0V.js} +2 -2
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +21 -21
- package/dist/cli/check.js +8 -8
- package/dist/cli/env.d.ts +1 -0
- package/dist/cli/env.js +8 -7
- package/dist/cli/init.js +13 -4
- package/dist/cli/main.js +4 -4
- package/dist/cli/plugins.js +6 -6
- package/dist/cli/snapshot-create.js +7 -5
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +5 -5
- package/dist/{config-CzeZiMKs.js → config-oGM7KA9M.js} +44 -63
- package/dist/{connections-CDYhMfrs.js → connections-BlikzEJv.js} +6 -6
- package/dist/{continue-in-slack-7Uf05ndC.js → continue-in-slack-BZnYifiG.js} +5 -5
- package/dist/{conversation-BNXfq6Lb.js → conversation-CY1jnBiC.js} +1 -1
- package/dist/{conversation-feed-Clf_cv0n.js → conversation-feed-BZJRk6UV.js} +1 -1
- package/dist/{conversation-privacy-D9xnM5mK.js → conversation-privacy-Cx515ddM.js} +7 -7
- package/dist/{conversation-turn-D7SEZgTG.js → conversation-turn-DAhRdX4m.js} +20 -23
- package/dist/{credential-sync-DoD0gW-j.js → credential-sync-DfhmWFeo.js} +18 -18
- package/dist/{db-B-gtnNjr.js → db-C-2tFxk3.js} +15 -15
- package/dist/{db-BdsCzytP.d.ts → db-DPqcEM9_.d.ts} +25 -25
- package/dist/{executor-DZg20EqU.js → executor-NVfS8aQ2.js} +14 -8
- package/dist/{history-IjdmO_r6.js → history-UZ3M2M9r.js} +13 -10
- package/dist/{install-t1KQyTUs.js → install-CHLrpRZc.js} +3 -3
- package/dist/instrumentation.d.ts +4 -4
- package/dist/instrumentation.js +10 -10
- package/dist/{lineage-C79GjoQr.js → lineage-HGLhd_-N.js} +2 -2
- package/dist/{logging-C9oDAg4M.js → logging-DiyqRLBx.js} +19 -19
- package/dist/{message-BLUCzJXN.js → message-CkCOcbFH.js} +9 -9
- package/dist/{model-input-5jwNC45G.js → model-input-DmoPPtPE.js} +4 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +7 -7
- package/dist/{oauth-callback-server-BBl66vCb.js → oauth-callback-server-CIf_6YmA.js} +5 -4
- package/dist/{oauth-relay-DRzq73b6.js → oauth-relay-DAmfVmJu.js} +3 -6
- package/dist/{package-discovery-DJhGdS4c.js → package-discovery-x4AvVhMj.js} +1 -1
- package/dist/{plugin-module-Cf5gVPWP.js → plugin-module-Cv2ETe8Y.js} +1 -1
- package/dist/{plugins-BBX07Jzt.js → plugins-Bkk0XRo2.js} +3 -3
- package/dist/{projection-CIBwgD3s.js → projection-DBq8tsA5.js} +221 -173
- package/dist/{prompt-CRQbzp5e.js → prompt-D2KlJopL.js} +4 -4
- package/dist/{queue-CZyYgPF0.d.ts → queue-CbEHUO0l.d.ts} +1 -1
- package/dist/{queue-DtCDaIct.js → queue-DFaOscp5.js} +4 -4
- package/dist/{registry-DdFQHZ_d.js → registry-Bu0Z9BEO.js} +37 -37
- package/dist/{resolve-CdW4BdrK.js → resolve-DXuA3G0g.js} +3 -3
- package/dist/{result-oOMv1t4O.js → result-DpiNseDA.js} +10 -15
- package/dist/rolldown-runtime-BKpuH2hG.js +26 -0
- package/dist/{runner-DqitLtm-.js → runner-iu1heRFv.js} +10 -10
- package/dist/{sandbox-egress-signals-Bw9I0yfJ.js → sandbox-egress-signals-2HFYDcQf.js} +1 -1
- package/dist/{schema-BIFM-U1a.d.ts → schema-DHMOaRzC.d.ts} +520 -13
- package/dist/{schema-DnVQepWP.js → schema-DvfX3Gq_.js} +77 -13
- package/dist/{secrets-DebYU866.js → secrets-DHaJ5TTn.js} +4 -4
- package/dist/{sentry-BRTJqumy.js → sentry-CPbZjomA.js} +3 -28
- package/dist/{sentry-route-name-BhwWnfqj.js → sentry-route-name-C6EIzAGP.js} +1 -1
- package/dist/{service-account-CrZftRTb.js → service-account-BcT5LR7V.js} +47 -47
- package/dist/{service-account-B6mKAPVo.js → service-account-xYkaQTrw.js} +3 -3
- package/dist/{session-stop-DW63Z3kj.js → session-stop-BLLp1IP_.js} +28 -35
- package/dist/{skills-C16fz60Z.js → skills-CNAGH4ju.js} +6 -9
- package/dist/{slack-conversation-unfurl-BHhefEb7.js → slack-conversation-unfurl-DYnqe5ci.js} +10 -15
- package/dist/{spawn-D_RnFYfy.js → spawn-cGasWW33.js} +7 -7
- package/dist/{legacy-web-actor-id-C-cEeWqL.js → state-CDS6h_Wv.js} +32 -32
- package/dist/{stop-7p1i08CY.js → stop-DMMA67yT.js} +221 -139
- package/dist/{store-C28I0CVW.js → store-Dgs7Oe44.js} +5 -5
- package/dist/{task-queue-BVUJbQ28.js → task-queue-DcF0nhhz.js} +3 -3
- package/dist/{task-runner-CWi8j7Z6.js → task-runner-BGXF7Fo7.js} +15 -18
- package/dist/{thread-context-D3-yYUd0.js → thread-context-BPky1KBe.js} +12 -12
- package/dist/{turn-session-routing-BFMS9ATF.js → turn-session-routing-DGvn9MSl.js} +32 -32
- package/dist/{turn-user-message-C3-O8Omt.js → turn-user-message-19CkuUvM.js} +3 -3
- package/dist/{validation-BSFKUIb4.js → validation-lu1DgjNQ.js} +2 -2
- package/dist/vercel.js +1 -1
- package/dist/{version-BHHXNi-0.js → version-Uo3c94Dx.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-B1SO21Qa.js → viewer-BPQHMx3-.js} +3 -3
- package/dist/{warmup-Bz9bzkzN.js → warmup-H8uLvW9e.js} +149 -130
- package/dist/{worker-BspReIIK.js → worker-B-pM_-3K.js} +9 -12
- package/migrations/0109_user_preferences.sql +1 -0
- package/migrations/0110_code_change_repository_state_index.sql +1 -0
- package/migrations/meta/0109_snapshot.json +4925 -0
- package/migrations/meta/0110_snapshot.json +4952 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +16 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-CZyYgPF0.js";
|
|
2
|
-
import { t as ConversationStore } from "./db-BdsCzytP.js";
|
|
3
|
-
import "./schema-BIFM-U1a.js";
|
|
4
1
|
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
2
|
+
import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-CbEHUO0l.js";
|
|
3
|
+
import "./schema-DHMOaRzC.js";
|
|
4
|
+
import { t as ConversationStore } from "./db-DPqcEM9_.js";
|
|
5
5
|
import "./sentry-DrKC2NeM.js";
|
|
6
6
|
import { Hono } from "hono";
|
|
7
7
|
import * as z from "zod";
|
|
@@ -9,12 +9,12 @@ import "@earendil-works/pi-ai/compat";
|
|
|
9
9
|
import "@earendil-works/pi-ai/api/anthropic-messages";
|
|
10
10
|
import "ai";
|
|
11
11
|
import "drizzle-orm";
|
|
12
|
-
import { Destination
|
|
12
|
+
import { Destination } from "@sentry/junior-plugin-api";
|
|
13
13
|
import "@earendil-works/pi-agent-core";
|
|
14
|
-
import { Message, StateAdapter } from "chat";
|
|
15
|
-
import "@earendil-works/pi-ai";
|
|
16
14
|
import "@modelcontextprotocol/sdk/client/auth.js";
|
|
17
|
-
import
|
|
15
|
+
import "@modelcontextprotocol/sdk/client";
|
|
16
|
+
import { StateAdapter } from "chat";
|
|
17
|
+
import "@earendil-works/pi-ai";
|
|
18
18
|
import "@sinclair/typebox";
|
|
19
19
|
import { SlackAdapter } from "@chat-adapter/slack";
|
|
20
20
|
interface BotModelConfig {
|
|
@@ -164,7 +164,7 @@ interface ConversationWorkerContext {
|
|
|
164
164
|
attempt: InboxAttempt;
|
|
165
165
|
checkIn(): Promise<boolean>;
|
|
166
166
|
conversationId: string;
|
|
167
|
-
destination?: Destination;
|
|
167
|
+
destination?: Destination | undefined;
|
|
168
168
|
/** True when the current execution slice must stop at its next safe boundary. */
|
|
169
169
|
shouldYield(): boolean;
|
|
170
170
|
/** Return an AbortSignal backed by the durable Conversation stop request. */
|
|
@@ -178,7 +178,7 @@ interface ConversationWorkerContext {
|
|
|
178
178
|
interface InboxAttempt {
|
|
179
179
|
ack(): Promise<void>;
|
|
180
180
|
conversationId: string;
|
|
181
|
-
destination?: Destination;
|
|
181
|
+
destination?: Destination | undefined;
|
|
182
182
|
/**
|
|
183
183
|
* Give pending mailbox messages to the active Turn. By default only
|
|
184
184
|
* `interrupt` messages for this attempt are offered. With `deferred`, every
|
|
@@ -202,18 +202,18 @@ interface ConversationWorkerResult {
|
|
|
202
202
|
delayMs?: number;
|
|
203
203
|
}
|
|
204
204
|
interface ProcessConversationQueueMessageOptions {
|
|
205
|
-
beforeWorkStops?: BeforeWorkStops;
|
|
205
|
+
beforeWorkStops?: BeforeWorkStops | undefined;
|
|
206
206
|
checkInIntervalMs?: number;
|
|
207
207
|
conversationStore?: ConversationStore;
|
|
208
208
|
/** Slack installation lookup for work that runs after the Run ends. */
|
|
209
209
|
getSlackAdapter?: () => SlackAdapter;
|
|
210
|
-
nowMs?: () => number;
|
|
210
|
+
nowMs?: (() => number) | undefined;
|
|
211
211
|
queue?: ConversationWorkQueue;
|
|
212
212
|
run(context: ConversationWorkerContext): Promise<ConversationWorkerResult>;
|
|
213
|
-
softYieldAfterMs?: number;
|
|
214
|
-
state?: StateAdapter;
|
|
213
|
+
softYieldAfterMs?: number | undefined;
|
|
214
|
+
state?: StateAdapter | undefined;
|
|
215
215
|
/** Keep background work started by a turn, such as titles, alive. */
|
|
216
|
-
waitUntil?: (task: Promise<unknown>) => void;
|
|
216
|
+
waitUntil?: ((task: Promise<unknown>) => void) | undefined;
|
|
217
217
|
}
|
|
218
218
|
interface VercelConversationWorkCallbackOptions extends ProcessConversationQueueMessageOptions {
|
|
219
219
|
topic?: string;
|
|
@@ -325,7 +325,7 @@ interface JuniorAppOptions extends BotModelConfig {
|
|
|
325
325
|
* Entries may be exact domains or leading wildcard domains such as
|
|
326
326
|
* `*.sentry.io`; wildcard entries match subdomains, not the apex domain.
|
|
327
327
|
*/
|
|
328
|
-
egressTracePropagationDomains?: string[];
|
|
328
|
+
egressTracePropagationDomains?: string[] | undefined;
|
|
329
329
|
};
|
|
330
330
|
waitUntil?: WaitUntilFn;
|
|
331
331
|
}
|
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-Dd9v1mNx.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,49 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, G as normalizeIdentityEmail, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, U as GOOGLE_IDENTITY_PROVIDER, 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
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
1
|
+
import { $r as reviewItemReaderForUser, As as setConfigDefaults, C as settleConversationTitleWork, Ci as bindEventAutomationCredentialSubject, Co as readConversationAccessFromSql, Cs as createPluginCache, Da as openSlackModal, Di as verifyScheduledAutomationCredentialSubject, Dr as createPluginReviewItems, Ei as verifyEventAutomationCredentialSubject, Er as projectConversationMessages, Fa as slackExternalRefIdSchema, Fi as getDashboardReviewItemLink, Ga as consumeSandboxEgressAuthRequiredSignal, Hi as createPluginState, Io as readConversationLastEventSeq, Ja as parseSandboxEgressCredentialToken, Ka as consumeSandboxEgressPermissionDeniedSignal, Li as getDashboardTaskLink, Lo as readConversationMessageEventSeq, Mr as dismissOpenReviewItems, Mt as hasRunnableConversationWork, No as readConversationEventPage, Oa as postSlackEphemeralMessage, Oi as verifySlackDirectCredentialSubject, Pa as slackEntitySchema, Po as readConversationEventPageAfter, Pt as isInvalidConversationRecordError, Qa as normalizeSandboxEgressTracePropagationDomains, Qo as getSlackClient, Rt as pruneActiveConversation, Si as takeDueTimerWatches, Ti as bindSlackDirectCredentialSubject, Ur as canActOnReviewItem, Vi as setDashboardConversationLinkOptions, Wa as clearSandboxEgressSignals, Zn as createUserTokenStore, _ as appendConversationMessages, ao as createPluginEmbedder, ar as getPluginRoutes, ca as proxyVercelSandboxEgressRequest, cs as runWithWorkspaceTeamId, dt as CONVERSATION_WORK_STALE_ENQUEUE_MS, ei as reviewItemReaderForUserInConversation, es as isDmChannel, fa as resolveBaseUrl, fr as setPlugins, gr as setBriefsConfig, hi as collectEventMatchKeys, hs as listConversationAnnotations, ir as getPluginApiRoutes, ji as getDashboardConversationLink, ks as getConfigDefaults, ms as createPluginAnnotations, nr as createPluginEventPublisher, oi as createCodeChangePublisher, pr as validatePlugins, sa as isVercelSandboxEgressRequest, ss as getWorkspaceTeamId, ur as getPlugins, us as resolveRootVisibility, wi as bindScheduledAutomationCredentialSubject, ya as slackMention, yi as findMatchingWatches, yo as createPluginLogger, zr as searchReviewItems } from "./projection-DBq8tsA5.js";
|
|
2
|
+
import { Z as getAttachmentStorage, d as restoreRuntimeConfig, f as setBotModelConfig, g as snapshotRuntimeConfig, h as setSlackReactionConfig, i as getChatConfig, m as setRuntimeLimits, n as botConfig, o as getSlackBotToken, p as setBotName, u as resetRuntimeConfig } from "./config-oGM7KA9M.js";
|
|
3
|
+
import { $ as fenceLock, B as recordGoogleSignIn, G as createCache, J as getStateAdapter, K as disconnectStateAdapter, P as resolveActorIdentityId, Z as MUTATION_LOCK_TTL_MS, a as getConversationStore, et as withLock, f as withConversationEventLock, mt as createSlackDestination, o as getDb, pt as touchConversationDetail, r as getConversationEventStore, s as getSqlExecutor, t as closeDb, x as withConversationMutationLock } from "./db-C-2tFxk3.js";
|
|
4
|
+
import { A as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, E as withSpan, G as normalizeIdentityEmail, L as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_AUTO_ARCHIVE_ROUTE, P as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as withLogContext, U as GOOGLE_IDENTITY_PROVIDER, 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-DiyqRLBx.js";
|
|
5
|
+
import { D as parseSlackUserInputSubmission, E as parseSlackReviewItemFormTarget, S as findSlackThreadOwnerId, T as parseSlackReviewItemClick, _ as logScheduledAutomationRunSkipped, b as resolveSlackReviewItemCardConversationId, h as unpublishedArtifactHeaders, m as readPublicArtifact, n as executeAgentRun, p as publicArtifactHeaders, r as processBackgroundCompaction, t as createAgentRunner, v as scheduledAutomationRunAttributes, w as buildSlackReviewItemModal, x as syncReviewItemSlackCards, y as createSlackReviewItemShow } from "./agent-runner-BP8_DLUv.js";
|
|
6
|
+
import { $ as slackChannelMessageEvent, F as renderTaskInput, J as isExperimentalFeatureEnabled, V as renderSlackObjectCard, X as getEventCatalog, Y as setExperimentalFeatures, Z as SLACK_EVENT_NAMESPACE, b as getAuthPausedConversationTurnId, et as slackChannelMessageReplyThreadTs, q as getExperimentalFeatures, tt as slackChannelMessageRunsAutomation } from "./session-stop-BLLp1IP_.js";
|
|
7
|
+
import { a as getSandboxResourceConfig, s as setSandboxResourceConfig } from "./install-CHLrpRZc.js";
|
|
8
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-d1EM6Z0V.js";
|
|
9
|
+
import { $ as readObjectLinkTypes, A as isAllowedSignInEmail, B as runAutoArchiveSweep, C as encodeConversationCursor, Ct as getThreadStopDecision, F as actOnReviewItem, I as closeReviewItemsAnsweredByReply, J as backfillCacheWarmingGaps, K as runSavingsRefillSlice, L as readReviewItemForUser, M as resolveAllowedDomains, N as stopConversation, O as assertNoLegacyAllowedDomains, P as ReviewItemActionError, R as reviewItemChange, S as decodeConversationCursor, St as SubscribedReplyReason, T as readConversationPendingMessages, V as setConversationAutoArchive, Y as GET$4, _t as createSlackWebApiStatusSender, at as createProductionConversationWorkOptions, b as createConversationForViewer, bt as stripLeadingBotMention, ct as buildSlackInboundMessage, dt as normalizeIncomingSlackThreadId, ft as withNormalizedThreadId, gt as recordSkippedConversationMessage, ht as failStoppedDispatch, i as readConversationFeed, it as publicAddressLookup, j as readEnvList, k as isAllowedDomain, l as readConversationDetail, lt as clearSlackPendingReactions, mt as enqueueAgentDispatch, n as steerConversationPendingMessagesForViewer, ot as createProductionSlackWebhookServices, rt as isPublicAddress, s as pinConversation, st as getProductionSlackAdapter, t as stopConversationTurnForViewer, ut as slackInboundMessageId, v as readConversationRecordFromSql, vt as bindMessageAuthorIdentityId, w as cancelConversationPendingMessagesForViewer, xt as parseContent, y as appendConversationMessageForViewer, yt as startProcessingReaction, z as archiveViewerDoneConversations } from "./stop-DMMA67yT.js";
|
|
10
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-lu1DgjNQ.js";
|
|
11
|
+
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-Bkk0XRo2.js";
|
|
12
|
+
import { Cr as joinPublicChannel, Di as missingAutomationSkillReason, E as processWorkspaceSnapshotJob, Ei as findAutomationSkill, Jn as setConversationSubscription, L as lookupSlackUserProfile, Mt as collectAttachmentGarbage, Oi as effectiveTaskOutcomes, Ot as collectAttachmentUploadGarbage, Pt as requestAttachmentDeletion, Qt as listPendingAgentInvocationResults, Sn as recordSubagentEnded, Tt as webActorFromUser, Zt as listPendingAgentInvocationMailboxAppends, _t as renderReviewItemMessage, bt as appendAndEnqueueWebMessage, dt as markConversationRead, fi as ViewerTaskNotFoundError, gi as readViewerAutomationSummary, gt as deliverReviewItemChange, hn as enqueueAgentInvocation, k as ingestEvent, lt as archiveConversation, mi as readViewerAutomationExecutions, ur as parseSlackThreadId, vi as readViewerAutomations, vt as reviewItemChangeRecord, wt as recordWebConversationActivity, xt as conversationTurnIdForMessage } from "./warmup-H8uLvW9e.js";
|
|
13
|
+
import { H as automationTaskSchema, N as scheduledRunSchema, U as automationTaskText, l as automationListQuerySchema, s as automationExecutionStatusSchema } from "./automation-D9MvhOWY.js";
|
|
14
|
+
import { E as notifyAutomationBlocked, G as readScheduledAutomation, I as recordAutomationExecution, J as scheduledRunId, O as existingConversationId, U as listScheduledAutomationsForTeam, X as blockEventAutomation, Y as withScheduledAutomationLock, Z as collectEventAutomationMatchKeys, b as listPendingDispatchMailboxAppends, bt as eventGuidance, c as coerceThreadConversationState, d as confirmDispatchMailboxAppend, et as findMatchingEventAutomations, f as createOrGetDispatch, g as getDispatchRecord, l as buildDispatchId, lt as automationVersionOf, ot as admitEventAutomationRun, p as getDispatchConversationId, q as saveScheduledAutomationInLock, st as eventAutomationRunLimitReason, v as getPluginDispatchProjection, w as markDispatchFailed, y as isTerminalDispatchStatus } from "./turn-session-routing-DGvn9MSl.js";
|
|
15
|
+
import { F as juniorDestinations, M as juniorConversations, T as juniorConversationEvents, f as juniorAutomations, g as juniorAgentInvocations, h as juniorAgentBindings, l as juniorReviewItems, u as juniorAutomationRuns, x as juniorConversationBriefs } from "./executor-NVfS8aQ2.js";
|
|
16
|
+
import { i as getActiveSpan, n as captureMessage, u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
17
|
+
import { a as queueCallback, c as verifyConversationQueueMessage, f as getQueueProvider, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyBackgroundCompactionMessage, o as getVercelConversationWorkQueue, r as vercelBackgroundCompactionQueue, s as resolveConversationWorkQueueTopic, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./background-compaction-queue-xaE05jxH.js";
|
|
18
|
+
import { _ as getConversationWorkState, g as getConversation, h as ensureConversationWake, l as clearExpiredConversationLease, r as appendAndEnqueueInboundMessage, y as listActiveConversationIds } from "./store-Dgs7Oe44.js";
|
|
11
19
|
import { a as getNextRunAtMs } from "./schedule-cP0AACm1.js";
|
|
12
|
-
import { i as
|
|
13
|
-
import {
|
|
20
|
+
import { i as enqueueAgentInvocationResult, r as createEndStoppedChildWork } from "./result-DpiNseDA.js";
|
|
21
|
+
import { n as readSchedulerSecret, r as readSignInSecret } from "./secrets-DHaJ5TTn.js";
|
|
22
|
+
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-DfhmWFeo.js";
|
|
23
|
+
import { t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
|
|
14
24
|
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
25
|
+
import { P as conversationTitleSchema, et as conversationBriefSchema, m as conversationFeedQuerySchema, x as conversationSurfaceSchema, y as conversationReportStatusSchema, z as annotationCard } from "./conversation-CY1jnBiC.js";
|
|
26
|
+
import { i as readActorIdentity, l as resolveViewerUser, p as parseAvatarUrl } from "./viewer-BPQHMx3-.js";
|
|
27
|
+
import { b as slackMessageTsSchema, g as slackTeamIdSchema, h as slackChannelIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId, v as parseSlackMessageTs, y as slackMessageTsFromMs } from "./actor-D2iXzvlN.js";
|
|
28
|
+
import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-DYnqe5ci.js";
|
|
29
|
+
import { o as unlinkProvider } from "./connections-BlikzEJv.js";
|
|
20
30
|
import { s as buttonUserInputField } from "./web-message-id-lNodcCOI.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { t as bindSpawnAgent } from "./spawn-D_RnFYfy.js";
|
|
32
|
-
import { a as pluginTaskQueueConsumer, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-BVUJbQ28.js";
|
|
33
|
-
import { t as processPluginTask } from "./task-runner-CWi8j7Z6.js";
|
|
34
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-BSFKUIb4.js";
|
|
35
|
-
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-BBX07Jzt.js";
|
|
36
|
-
import { o as unlinkProvider } from "./connections-CDYhMfrs.js";
|
|
37
|
-
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-DoD0gW-j.js";
|
|
38
|
-
import { t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
|
|
39
|
-
import { a as resolveSlackActingUser, i as unfurlDashboardConversationLinks, n as handleSlackContinueHereClick, o as isSlackWorkspaceMember, s as slackWorkspaceBotId, t as SLACK_CONTINUE_HERE_ACTION_ID } from "./slack-conversation-unfurl-BHhefEb7.js";
|
|
40
|
-
import { t as processConversationWork } from "./worker-BspReIIK.js";
|
|
31
|
+
import { n as verifySlackSignature, t as runWithSlackInstallation } from "./adapter-context-BdVnSuY5.js";
|
|
32
|
+
import { a as resumeConversationDelivery } from "./conversation-turn-DAhRdX4m.js";
|
|
33
|
+
import { t as processConversationWork } from "./worker-B-pM_-3K.js";
|
|
34
|
+
import { t as bindMessageAgent } from "./message-CkCOcbFH.js";
|
|
35
|
+
import { t as bindSpawnAgent } from "./spawn-cGasWW33.js";
|
|
36
|
+
import { a as pluginTaskQueueConsumer, n as createVercelPluginTaskCallback, o as registerVercelPluginTaskDevConsumer } from "./task-queue-DcF0nhhz.js";
|
|
37
|
+
import { t as processPluginTask } from "./task-runner-BGXF7Fo7.js";
|
|
38
|
+
import { i as registerVercelCacheWarmupDevConsumer, l as verifyWorkspaceSnapshotJobMessage, n as cacheWarmupQueueConsumer, o as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, r as createVercelCacheWarmupCallback } from "./queue-DFaOscp5.js";
|
|
39
|
+
import { t as JUNIOR_VERSION } from "./version-Uo3c94Dx.js";
|
|
40
|
+
import { s as conversationPendingMessageDeliverySchema } from "./conversation-feed-BZJRk6UV.js";
|
|
41
41
|
import { createRequire } from "node:module";
|
|
42
42
|
import { Hono } from "hono";
|
|
43
43
|
import * as z from "zod";
|
|
44
44
|
import { createHash, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
45
45
|
import { and, asc, eq, inArray, isNotNull, isNull, lte, ne, or, sql } from "drizzle-orm";
|
|
46
|
-
import { EVENT_SUMMARY_MAX_LENGTH, EVENT_TEXT_MAX_LENGTH, dispatchOptionsSchema, eventSchema, eventTriggerFiltersText, isSlackDestination, userSchema } from "@sentry/junior-plugin-api";
|
|
46
|
+
import { EVENT_SUMMARY_MAX_LENGTH, EVENT_TEXT_MAX_LENGTH, dispatchOptionsSchema, eventSchema as eventSchema$1, eventTriggerFiltersText, isSlackDestination, userSchema } from "@sentry/junior-plugin-api";
|
|
47
47
|
import { pathToFileURL } from "node:url";
|
|
48
48
|
import { Message, ThreadImpl } from "chat";
|
|
49
49
|
import pLimit from "p-limit";
|
|
@@ -365,7 +365,7 @@ function eventInput(task, event, outcomes, catalog) {
|
|
|
365
365
|
* limit both use the event key, so it runs and counts once.
|
|
366
366
|
*/
|
|
367
367
|
async function ingestEventAutomations(input, options) {
|
|
368
|
-
const event = eventSchema.parse(input);
|
|
368
|
+
const event = eventSchema$1.parse(input);
|
|
369
369
|
const db = getDb();
|
|
370
370
|
const nowMs = options.nowMs ?? Date.now();
|
|
371
371
|
const catalog = getEventCatalog();
|
|
@@ -717,7 +717,7 @@ function taskDedupeFingerprint(task) {
|
|
|
717
717
|
month: task.schedule.recurrence.month ?? null,
|
|
718
718
|
startDate: task.schedule.recurrence.startDate,
|
|
719
719
|
time: task.schedule.recurrence.time,
|
|
720
|
-
weekdays: [...task.schedule.recurrence.weekdays ?? []].sort()
|
|
720
|
+
weekdays: [...task.schedule.recurrence.weekdays ?? []].sort((left, right) => left - right)
|
|
721
721
|
} : null,
|
|
722
722
|
timezone: task.schedule.timezone
|
|
723
723
|
},
|
|
@@ -1414,7 +1414,7 @@ async function GET$3(request, waitUntil, options = {}) {
|
|
|
1414
1414
|
nowMs,
|
|
1415
1415
|
showReviewItem: options.showReviewItem
|
|
1416
1416
|
}).catch((error) => {
|
|
1417
|
-
logException(error, "heartbeat.failed", { "app.heartbeat.now_ms": nowMs });
|
|
1417
|
+
logException(error, "heartbeat.run.failed", { "app.heartbeat.now_ms": nowMs });
|
|
1418
1418
|
}));
|
|
1419
1419
|
return new Response("Accepted", { status: 202 });
|
|
1420
1420
|
}
|
|
@@ -1748,7 +1748,7 @@ async function handleSandboxEgressRoute(request, tracePropagationDomains, next)
|
|
|
1748
1748
|
const SANDBOX_EGRESS_TOKEN_HEADER = "x-junior-sandbox-egress-token";
|
|
1749
1749
|
function isLoopbackDevelopmentRequest(request) {
|
|
1750
1750
|
const hostname = new URL(request.url).hostname;
|
|
1751
|
-
return process.env
|
|
1751
|
+
return process.env["NODE_ENV"] === "development" && (hostname === "127.0.0.1" || hostname === "localhost");
|
|
1752
1752
|
}
|
|
1753
1753
|
/** Clear command-scoped sandbox egress signals through the loopback dev server. */
|
|
1754
1754
|
async function DELETE(request) {
|
|
@@ -1770,7 +1770,7 @@ async function GET(request) {
|
|
|
1770
1770
|
});
|
|
1771
1771
|
}
|
|
1772
1772
|
// src/chat/slack/annotation-details.ts
|
|
1773
|
-
const eventSchema
|
|
1773
|
+
const eventSchema = z.object({
|
|
1774
1774
|
trigger_id: z.string().min(1),
|
|
1775
1775
|
user: z.string().min(1),
|
|
1776
1776
|
external_ref: z.object({
|
|
@@ -1785,14 +1785,14 @@ const refSchema = z.tuple([
|
|
|
1785
1785
|
]);
|
|
1786
1786
|
/** Show saved annotation facts only to a viewer who can read their Conversation. */
|
|
1787
1787
|
async function presentSlackAnnotationDetails(event, teamId) {
|
|
1788
|
-
const triggerId = event
|
|
1788
|
+
const triggerId = event["trigger_id"];
|
|
1789
1789
|
if (typeof triggerId !== "string" || !triggerId) return;
|
|
1790
1790
|
const client = getSlackClient();
|
|
1791
1791
|
const missing = () => client.entity.presentDetails({
|
|
1792
1792
|
trigger_id: triggerId,
|
|
1793
1793
|
error: { status: "not_found" }
|
|
1794
1794
|
});
|
|
1795
|
-
const parsed = eventSchema
|
|
1795
|
+
const parsed = eventSchema.safeParse(event);
|
|
1796
1796
|
if (!parsed.success || !teamId) {
|
|
1797
1797
|
await missing();
|
|
1798
1798
|
return;
|
|
@@ -2589,8 +2589,8 @@ function slackMessageAttributes(body) {
|
|
|
2589
2589
|
"app.slack.bot_id": field(event?.bot_id, /^B[A-Z0-9]+$/),
|
|
2590
2590
|
"app.slack.team_id": field(body.team_id, /^T[A-Z0-9]+$/),
|
|
2591
2591
|
"app.slack.enterprise_id": field(body.enterprise_id, /^E[A-Z0-9]+$/),
|
|
2592
|
-
"app.slack.user_team": field(event?.user_team, teamId),
|
|
2593
|
-
"app.slack.source_team": field(event?.source_team, teamId),
|
|
2592
|
+
"app.slack.user_team": field(event?.["user_team"], teamId),
|
|
2593
|
+
"app.slack.source_team": field(event?.["source_team"], teamId),
|
|
2594
2594
|
"app.slack.event_team": field(event?.team, teamId),
|
|
2595
2595
|
"app.slack.context_team_id": field(body.context_team_id, /^T[A-Z0-9]+$/),
|
|
2596
2596
|
"app.slack.context_enterprise_id": body.context_enterprise_id === null ? "none" : field(body.context_enterprise_id, /^E[A-Z0-9]+$/),
|
|
@@ -2691,7 +2691,7 @@ const detailsEventSchema = z.object({
|
|
|
2691
2691
|
async function presentSlackAutomationDetails(event, teamId) {
|
|
2692
2692
|
const parsed = detailsEventSchema.safeParse(event);
|
|
2693
2693
|
const client = getSlackClient();
|
|
2694
|
-
const triggerId = event
|
|
2694
|
+
const triggerId = event["trigger_id"];
|
|
2695
2695
|
if (typeof triggerId !== "string" || !triggerId) return;
|
|
2696
2696
|
if (!parsed.success || !teamId) {
|
|
2697
2697
|
await client.entity.presentDetails({
|
|
@@ -2777,7 +2777,7 @@ async function buildThread(args) {
|
|
|
2777
2777
|
});
|
|
2778
2778
|
}
|
|
2779
2779
|
function shouldIgnoreMessage(message) {
|
|
2780
|
-
return message.author.isMe
|
|
2780
|
+
return message.author.isMe || !parseActorUserId(message.author.userId);
|
|
2781
2781
|
}
|
|
2782
2782
|
/**
|
|
2783
2783
|
* Resolve the Slack author Identity at ingress and bind its id to the message.
|
|
@@ -3039,7 +3039,7 @@ async function handleSlackEvent(args) {
|
|
|
3039
3039
|
state,
|
|
3040
3040
|
task: async () => {
|
|
3041
3041
|
if (event.type === "assistant_thread_started" || event.type === "assistant_thread_context_changed") {
|
|
3042
|
-
const parsed = slackAssistantThreadSchema.safeParse(event
|
|
3042
|
+
const parsed = slackAssistantThreadSchema.safeParse(event["assistant_thread"]);
|
|
3043
3043
|
if (!parsed.success) return;
|
|
3044
3044
|
const thread = parsed.data;
|
|
3045
3045
|
const callback = {
|
|
@@ -3057,7 +3057,7 @@ async function handleSlackEvent(args) {
|
|
|
3057
3057
|
return;
|
|
3058
3058
|
}
|
|
3059
3059
|
if (event.type === "entity_details_requested") {
|
|
3060
|
-
const ref = event
|
|
3060
|
+
const ref = event["external_ref"];
|
|
3061
3061
|
if (ref && typeof ref === "object" && "type" in ref && ref.type === "annotation") await presentSlackAnnotationDetails(event, installation.teamId);
|
|
3062
3062
|
else await presentSlackAutomationDetails(event, installation.teamId);
|
|
3063
3063
|
return;
|
|
@@ -4707,8 +4707,8 @@ function authenticatedAcpUser(connection) {
|
|
|
4707
4707
|
function supportsUrlElicitation(params) {
|
|
4708
4708
|
const parsed = initializeParamsSchema.safeParse(params);
|
|
4709
4709
|
if (!parsed.success) return false;
|
|
4710
|
-
const elicitation = parsed.data.clientCapabilities?.elicitation;
|
|
4711
|
-
return isRecord(elicitation) && isRecord(elicitation
|
|
4710
|
+
const elicitation = parsed.data.clientCapabilities?.["elicitation"];
|
|
4711
|
+
return isRecord(elicitation) && isRecord(elicitation["url"]);
|
|
4712
4712
|
}
|
|
4713
4713
|
function parseParams(schema, params) {
|
|
4714
4714
|
const parsed = schema.safeParse(params);
|
|
@@ -4800,12 +4800,11 @@ function textResponse(body, status) {
|
|
|
4800
4800
|
});
|
|
4801
4801
|
}
|
|
4802
4802
|
function jsonResponse(value, status, headers) {
|
|
4803
|
+
const responseHeaders = new Headers(headers);
|
|
4804
|
+
if (!responseHeaders.has("Content-Type")) responseHeaders.set("Content-Type", ACP_JSON_MIME_TYPE);
|
|
4803
4805
|
return new Response(JSON.stringify(value), {
|
|
4804
4806
|
status,
|
|
4805
|
-
headers:
|
|
4806
|
-
"Content-Type": ACP_JSON_MIME_TYPE,
|
|
4807
|
-
...headers
|
|
4808
|
-
}
|
|
4807
|
+
headers: responseHeaders
|
|
4809
4808
|
});
|
|
4810
4809
|
}
|
|
4811
4810
|
function emptyResponse(status) {
|
|
@@ -7248,8 +7247,8 @@ function createBetterAuth(config) {
|
|
|
7248
7247
|
secret,
|
|
7249
7248
|
trustedOrigins: config.trustedOrigins,
|
|
7250
7249
|
socialProviders: { google: {
|
|
7251
|
-
clientId: required(config.googleClientId ?? process.env
|
|
7252
|
-
clientSecret: required(config.googleClientSecret ?? process.env
|
|
7250
|
+
clientId: required(config.googleClientId ?? process.env["GOOGLE_CLIENT_ID"], "GOOGLE_CLIENT_ID"),
|
|
7251
|
+
clientSecret: required(config.googleClientSecret ?? process.env["GOOGLE_CLIENT_SECRET"], "GOOGLE_CLIENT_SECRET"),
|
|
7253
7252
|
hd: hostedDomain,
|
|
7254
7253
|
prompt: "select_account",
|
|
7255
7254
|
disableIdTokenSignIn: true,
|
|
@@ -7262,7 +7261,7 @@ function createBetterAuth(config) {
|
|
|
7262
7261
|
return {
|
|
7263
7262
|
user: {
|
|
7264
7263
|
email: claims.email,
|
|
7265
|
-
emailVerified: claims.email_verified
|
|
7264
|
+
emailVerified: claims.email_verified,
|
|
7266
7265
|
image: claims.picture ?? null,
|
|
7267
7266
|
name: claims.name
|
|
7268
7267
|
},
|
|
@@ -7354,7 +7353,7 @@ const DASHBOARD_PACKAGE_NAME = "@sentry/junior-dashboard";
|
|
|
7354
7353
|
function dashboardRequiresSignIn(dashboard) {
|
|
7355
7354
|
if (!dashboard || dashboard.disabled) return false;
|
|
7356
7355
|
if (dashboard.authRequired !== void 0) return dashboard.authRequired;
|
|
7357
|
-
return process.env
|
|
7356
|
+
return process.env["JUNIOR_DASHBOARD_AUTH_REQUIRED"]?.trim() !== "false";
|
|
7358
7357
|
}
|
|
7359
7358
|
/** Mount the dashboard app on the dashboard-owned host paths. */
|
|
7360
7359
|
async function createDashboardRouteRegistrations(args) {
|
|
@@ -7552,9 +7551,9 @@ function validateDashboardRouteOwnership(args) {
|
|
|
7552
7551
|
// src/app.ts
|
|
7553
7552
|
/** Resolve the public deployment URL used by ACP and MCP browser authorization. */
|
|
7554
7553
|
function resolvePublicBaseURL(dashboard) {
|
|
7555
|
-
const configured = dashboard?.baseURL?.trim() || process.env
|
|
7554
|
+
const configured = dashboard?.baseURL?.trim() || process.env["JUNIOR_BASE_URL"]?.trim();
|
|
7556
7555
|
if (configured) return configured;
|
|
7557
|
-
const vercelURL = process.env
|
|
7556
|
+
const vercelURL = process.env["VERCEL_PROJECT_PRODUCTION_URL"]?.trim() || process.env["VERCEL_URL"]?.trim();
|
|
7558
7557
|
if (!vercelURL) return void 0;
|
|
7559
7558
|
return vercelURL.startsWith("https://") || vercelURL.startsWith("http://") ? vercelURL : `https://${vercelURL}`;
|
|
7560
7559
|
}
|
|
@@ -7891,7 +7890,7 @@ async function createApp(options) {
|
|
|
7891
7890
|
});
|
|
7892
7891
|
let agentContinuePOST;
|
|
7893
7892
|
let pluginTaskPOST;
|
|
7894
|
-
if (process.env
|
|
7893
|
+
if (process.env["NODE_ENV"] === "development") {
|
|
7895
7894
|
registerVercelConversationWorkDevConsumer(getConversationWorkOptions());
|
|
7896
7895
|
registerVercelPluginTaskDevConsumer();
|
|
7897
7896
|
registerVercelWorkspaceSnapshotJobDevConsumer();
|
|
@@ -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-CY1jnBiC.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
|
|
@@ -568,6 +568,8 @@ const automationListQuerySchema = z.object({
|
|
|
568
568
|
"unavailable"
|
|
569
569
|
]).default("all"),
|
|
570
570
|
creator: z.string().max(300).optional(),
|
|
571
|
+
/** Only the viewer's own Automations, inside any scope. */
|
|
572
|
+
owner: z.literal("me").optional(),
|
|
571
573
|
destination: z.string().max(300).optional(),
|
|
572
574
|
/** Only Automations that run this skill. */
|
|
573
575
|
skill: automationSkillNameSchema.optional(),
|
package/dist/{background-compaction-queue-CXFq1_Cz.js → background-compaction-queue-xaE05jxH.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { E as withSpan, m as logInfo, p as logException } from "./logging-
|
|
3
|
-
import { t as readJuniorSecret } from "./secrets-
|
|
1
|
+
import { i as getChatConfig } from "./config-oGM7KA9M.js";
|
|
2
|
+
import { E as withSpan, m as logInfo, p as logException } from "./logging-DiyqRLBx.js";
|
|
3
|
+
import { t as readJuniorSecret } from "./secrets-DHaJ5TTn.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -172,7 +172,7 @@ const bullmqQueueProvider = {
|
|
|
172
172
|
};
|
|
173
173
|
// src/chat/queue/vercel.ts
|
|
174
174
|
function defaultQueueClientOptions() {
|
|
175
|
-
if (process.env
|
|
175
|
+
if (process.env["VERCEL_DEPLOYMENT_ID"]?.trim()) return {};
|
|
176
176
|
return { deploymentId: null };
|
|
177
177
|
}
|
|
178
178
|
let client;
|
|
@@ -312,7 +312,7 @@ const CONVERSATION_WORK_QUEUE_RETENTION_SECONDS = CONVERSATION_WORK_QUEUE_SIGNAT
|
|
|
312
312
|
let defaultQueue;
|
|
313
313
|
/** Resolve the Vercel Queue topic used for conversation wake-up nudges. */
|
|
314
314
|
function resolveConversationWorkQueueTopic(options = {}) {
|
|
315
|
-
return options.topic?.trim() || process.env
|
|
315
|
+
return options.topic?.trim() || process.env["JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC"]?.trim() || "junior_conversation_work";
|
|
316
316
|
}
|
|
317
317
|
function toDelaySeconds(options) {
|
|
318
318
|
if (!options?.delayMs || options.delayMs <= 0) return;
|
|
@@ -390,7 +390,7 @@ function queueCallback(options) {
|
|
|
390
390
|
consumer,
|
|
391
391
|
create: () => getQueueProvider().createCallback(consumer),
|
|
392
392
|
registerDev: () => {
|
|
393
|
-
if (process.env
|
|
393
|
+
if (process.env["NODE_ENV"] !== "development") return;
|
|
394
394
|
return getQueueProvider().registerDevConsumer?.(consumer);
|
|
395
395
|
}
|
|
396
396
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $ as briefResourceLabel, X as briefCodeChangeSchema, f as conversationEventPageSchema, tt as parseBriefInput, u as conversationDetailReportSchema } from "./conversation-CY1jnBiC.js";
|
|
2
|
+
import { l as completeObject, n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-D2KlJopL.js";
|
|
3
3
|
import { CLI_USAGE } from "./cli/run.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import path from "node:path";
|
|
@@ -202,7 +202,7 @@ function optionValue(argv, index, option) {
|
|
|
202
202
|
function parsePullOptions(argv) {
|
|
203
203
|
const conversationIds = [];
|
|
204
204
|
let baseUrl;
|
|
205
|
-
let token = process.env
|
|
205
|
+
let token = process.env["JUNIOR_API_TOKEN"]?.trim();
|
|
206
206
|
let out;
|
|
207
207
|
for (let index = 0; index < argv.length; index += 1) {
|
|
208
208
|
const argument = argv[index];
|
|
@@ -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-oGM7KA9M.js").then((n) => n.r);
|
|
266
266
|
return botConfig.fastModelId;
|
|
267
267
|
}
|
|
268
268
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-Bu0Z9BEO.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.d.ts
CHANGED
package/dist/cli/chat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
2
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-BP8_DLUv.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { stderr, stdin, stdout } from "node:process";
|
|
@@ -88,8 +88,8 @@ function writeStream(stream, text) {
|
|
|
88
88
|
}
|
|
89
89
|
/** Keep local chat ephemeral by default; Redis is opt-in via an explicit adapter. */
|
|
90
90
|
function defaultStateAdapterForLocalChat() {
|
|
91
|
-
if (process.env
|
|
92
|
-
process.env
|
|
91
|
+
if (process.env["JUNIOR_STATE_ADAPTER"]) return;
|
|
92
|
+
process.env["JUNIOR_STATE_ADAPTER"] = "memory";
|
|
93
93
|
}
|
|
94
94
|
/** Load the app plugin module so source-mode local chat matches server wiring. */
|
|
95
95
|
async function loadLocalPluginSet() {
|
|
@@ -98,11 +98,11 @@ async function loadLocalPluginSet() {
|
|
|
98
98
|
/** Configure plugin hooks after local chat has selected its state adapter. */
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
|
-
import("../plugins-
|
|
102
|
-
import("../projection-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../db-
|
|
101
|
+
import("../plugins-Bkk0XRo2.js").then((n) => n.o),
|
|
102
|
+
import("../projection-DBq8tsA5.js").then((n) => n.er),
|
|
103
|
+
import("../catalog-runtime-d1EM6Z0V.js").then((n) => n.t),
|
|
104
|
+
import("../validation-lu1DgjNQ.js").then((n) => n.r),
|
|
105
|
+
import("../db-C-2tFxk3.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);
|
|
@@ -146,25 +146,25 @@ function newRunConversationId() {
|
|
|
146
146
|
return conversationId;
|
|
147
147
|
}
|
|
148
148
|
function localDevServerUrl() {
|
|
149
|
-
return `http://127.0.0.1:${process.env
|
|
149
|
+
return `http://127.0.0.1:${process.env["PORT"]?.trim() || "3000"}`;
|
|
150
150
|
}
|
|
151
151
|
/** Wire the shared local-turn setup so prompt and interactive runs stay identical. */
|
|
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-DBq8tsA5.js").then((n) => n.hr);
|
|
156
156
|
setBriefsConfig({ enabled: true });
|
|
157
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
158
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
159
|
-
const { createLocalOAuthState } = await import("../oauth-relay-
|
|
160
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
161
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
162
|
-
const { bindMessageAgent } = await import("../message-
|
|
163
|
-
const { createChildConversationWorker, createDeliverToParent } = await import("../result-
|
|
164
|
-
const { createConversationTurnWorker } = await import("../conversation-turn-
|
|
165
|
-
const { skipInputAfterConversationStop } = await import("../session-stop-
|
|
157
|
+
const { runLocalAgentTurn } = await import("../runner-iu1heRFv.js");
|
|
158
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CIf_6YmA.js");
|
|
159
|
+
const { createLocalOAuthState } = await import("../oauth-relay-DAmfVmJu.js").then((n) => n.t);
|
|
160
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-2HFYDcQf.js");
|
|
161
|
+
const { bindSpawnAgent } = await import("../spawn-cGasWW33.js").then((n) => n.n);
|
|
162
|
+
const { bindMessageAgent } = await import("../message-CkCOcbFH.js").then((n) => n.n);
|
|
163
|
+
const { createChildConversationWorker, createDeliverToParent } = await import("../result-DpiNseDA.js").then((n) => n.o);
|
|
164
|
+
const { createConversationTurnWorker } = await import("../conversation-turn-DAhRdX4m.js").then((n) => n.t);
|
|
165
|
+
const { skipInputAfterConversationStop } = await import("../session-stop-BLLp1IP_.js").then((n) => n.a);
|
|
166
166
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
167
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-B-pM_-3K.js").then((n) => n.n);
|
|
168
168
|
let agentRunner;
|
|
169
169
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
170
170
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { i as parseSkillFile } from "../skills-CNAGH4ju.js";
|
|
2
|
+
import { N as JUNIOR_HEARTBEAT_ROUTE, R as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, j as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-DiyqRLBx.js";
|
|
3
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-Bu0Z9BEO.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
@@ -20,8 +20,8 @@ const ANSI = {
|
|
|
20
20
|
cyan: "\x1B[36m"
|
|
21
21
|
};
|
|
22
22
|
function supportsColor(stream) {
|
|
23
|
-
if (process.env
|
|
24
|
-
if (process.env
|
|
23
|
+
if (process.env["NO_COLOR"] !== void 0) return false;
|
|
24
|
+
if (process.env["FORCE_COLOR"] && process.env["FORCE_COLOR"] !== "0") return true;
|
|
25
25
|
return Boolean(stream?.isTTY);
|
|
26
26
|
}
|
|
27
27
|
const COLOR_ENABLED = supportsColor(process.stdout) || supportsColor(process.stderr);
|
|
@@ -207,7 +207,7 @@ function isPluginFactoryExport(name, value) {
|
|
|
207
207
|
return typeof value === "function" && (name === "default" || name.endsWith("Plugin"));
|
|
208
208
|
}
|
|
209
209
|
function isPluginRegistrationLike(value) {
|
|
210
|
-
return isRecord(value) && isRecord(value
|
|
210
|
+
return isRecord(value) && isRecord(value["manifest"]);
|
|
211
211
|
}
|
|
212
212
|
async function collectPackageJsPluginSources(packageDir, packageName) {
|
|
213
213
|
const entryPath = await resolvePackageEntryPath(packageDir);
|
|
@@ -420,7 +420,7 @@ async function validateDeploymentConfig(rootDir, packages) {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
if (hasJuniorMarkers && Array.isArray(vercelConfig.crons)) {
|
|
423
|
-
if (vercelConfig.crons.some((cron) => isRecord(cron) && cron
|
|
423
|
+
if (vercelConfig.crons.some((cron) => isRecord(cron) && cron["path"] === "/api/internal/heartbeat")) {
|
|
424
424
|
checked = true;
|
|
425
425
|
warnings.push(`${vercelConfigPath}: ${JUNIOR_HEARTBEAT_ROUTE} cron is now emitted by juniorNitro() into Nitro's Vercel Build Output config. Remove the root cron entry to avoid deployment drift.`);
|
|
426
426
|
}
|
|
@@ -587,6 +587,6 @@ async function runCheck(rootDir = process.cwd(), io = DEFAULT_IO) {
|
|
|
587
587
|
for (const error of errors) io.error(`${statusIcon("error")} error: ${error}`);
|
|
588
588
|
throw new Error(`Validation failed (${errors.length} error${errors.length === 1 ? "" : "s"}, ${pluginSources.length} plugin manifest${pluginSources.length === 1 ? "" : "s"}, ${skillDirs.length} skill director${skillDirs.length === 1 ? "y" : "ies"} checked).`);
|
|
589
589
|
}
|
|
590
|
-
io.info(
|
|
590
|
+
io.info(formatHeading("ok", `Validation passed (${pluginSources.length} plugin manifest${pluginSources.length === 1 ? "" : "s"}, ${skillDirs.length} skill director${skillDirs.length === 1 ? "y" : "ies"} checked).`));
|
|
591
591
|
}
|
|
592
592
|
export { runCheck };
|