@sentry/junior 0.315.0 → 0.316.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-BlSGE44V.js → adapter-context-Bref7aPI.js} +1 -1
- package/dist/{admin-5jUYY46p.js → admin-QYiDMnsu.js} +1 -1
- package/dist/{agent-runner-C7GNLRB6.js → agent-runner-Cr5Fhjf-.js} +2298 -1866
- package/dist/{agent-update-delivery-BNEYQsAf.js → agent-update-delivery-BY13DPSD.js} +10 -37
- package/dist/api/schema.d.ts +69 -20
- package/dist/api/schema.js +4 -4
- package/dist/api.js +202 -315
- package/dist/{app-D_bAXRDe.d.ts → app-BhvzRD__.d.ts} +18 -14
- package/dist/app.d.ts +1 -1
- package/dist/app.js +34 -34
- package/dist/{chat-core-engine-CxkwRpn9.js → chat-core-engine-3dtlMku3.js} +3 -3
- package/dist/cli/chat.js +17 -17
- package/dist/cli/check.js +4 -4
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +2 -2
- package/dist/cli/upgrade.js +23 -3
- package/dist/{continue-in-slack-BGKjIdFp.js → continue-in-slack-DbQUFe_F.js} +3 -3
- package/dist/{conversation-feed-Sl8lKKmR.js → conversation-feed-B84pMjHo.js} +8 -3
- package/dist/{conversation-turn-BoLK9i6g.js → conversation-turn-DzEpTIaf.js} +16 -109
- package/dist/{create-BOycVH9h.js → create-DUJBXr6E.js} +4 -5
- package/dist/{credential-sync-Mn4OdkEh.js → credential-sync-JH_K9Adg.js} +9 -9
- package/dist/{db-DXTOYRzR.js → db-DhzvUY23.js} +343 -179
- package/dist/{deployment-CG3TchWh.js → deployment-BhvrhQeh.js} +1 -1
- package/dist/{engine-context-dyWlfNdD.js → engine-context-C9Nal48K.js} +9 -12
- package/dist/{html-CfXEwl_h.js → html-B_12WjKT.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-runner-CySgpi9v.js → job-runner-DO8nslyY.js} +17 -9
- package/dist/{lineage-tRTOcrsL.js → lineage-D3AZAJVe.js} +1 -1
- package/dist/{list-DXBz8SYL.js → list-B0zsb5Cp.js} +64 -182
- package/dist/{parent-result-Dg6P6roR.js → list-mkB_GU8R.js} +80 -108
- package/dist/{logging-czs0nqLC.js → logging-B8KEJegM.js} +1 -1
- package/dist/{media-Cr9pGkzr.js → media-BebquhET.js} +15 -3
- package/dist/{message-BTox2Cmb.js → message-B5fKDYzz.js} +8 -8
- package/dist/{model-input-IRGa98V7.js → model-input-CuMWy37l.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-NXK7AlBp.js → oauth-callback-server-B3Vvlydo.js} +2 -2
- package/dist/{oauth-relay-6NBPSpFE.js → oauth-relay-6ERrGPbA.js} +1 -1
- package/dist/{people-Cegp1Iwq.js → people-CUtFApfL.js} +2 -2
- package/dist/{proxy-path-Dc-0jXGi.js → proxy-path-BTmXDjfx.js} +1 -1
- package/dist/{resolve-BUFkmxkT.js → resolve-D5JVvv6A.js} +3 -3
- package/dist/{result-DfATzX77.js → result-CS_7mo8a.js} +30 -14
- package/dist/{runner-CmKP3inb.js → runner-BzAES5W3.js} +7 -7
- package/dist/{sandbox-egress-signals-DYo5BsM7.js → sandbox-egress-signals-Dwhk2Q5F.js} +1 -1
- package/dist/{schema-DrBMdPmv.js → schema-z5-wA6N4.js} +34 -13
- package/dist/{service-account-CxTX7nnR.js → service-account-D6AsAtc1.js} +1 -1
- package/dist/{mailbox-turn-79Nv1JXv.js → session-stop-DponjDUZ.js} +3075 -3092
- package/dist/{skills-BlHUDj7k.js → skills-DgJ9GBPR.js} +3 -3
- package/dist/{slack-conversation-unfurl-Dhe3lB1U.js → slack-conversation-unfurl-Dq71EkhM.js} +6 -6
- package/dist/{spawn-CfvlFdfz.js → spawn-BJWpdwhQ.js} +4 -4
- package/dist/{start-conversation-Uh8Sk1EF.js → start-conversation-B-LIqqNi.js} +2 -2
- package/dist/{system-prompt-table-CDCYVwqN.js → system-prompt-table-iIgpmslr.js} +6 -4
- package/dist/{task-runner-DcdQJd9e.js → task-runner-BJae4JwE.js} +23 -11
- package/dist/{thread-context-DF5uDcWN.js → thread-context-fiMNylbg.js} +5 -5
- package/dist/{transcript-BHhJVY0P.js → transcript-CCi7323k.js} +1 -1
- package/dist/{turn-session-routing-GtetHsdO.js → turn-session-routing-D15orfwy.js} +7 -7
- package/dist/{turn-wake-um5Ubd4m.js → turn-wake-BjDW7x-5.js} +4 -4
- package/dist/{validation-CJyuOPD2.js → validation-D5WmmmhX.js} +1 -1
- package/dist/{version-Bhe7RPIe.js → version-CBQoanXb.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{worker-D8PRgUqr.js → worker-Cyb4kF17.js} +3 -3
- package/migrations/20261125171254_conversation_visibility/migration.sql +4 -0
- package/migrations/20261125171254_conversation_visibility/snapshot.json +67 -0
- package/migrations/20261125171257_conversation_visibility_backfill/migration.sql +25 -0
- package/migrations/20261125171257_conversation_visibility_backfill/snapshot.json +9 -0
- package/migrations/20261125213232_drop_versions_notify/migration.sql +19 -0
- package/migrations/20261125213232_drop_versions_notify/snapshot.json +9 -0
- package/migrations/20261125225138_conversation_kind_root_thread/migration.sql +23 -0
- package/migrations/20261125225138_conversation_kind_root_thread/snapshot.json +55 -0
- package/migrations/20261125225142_conversation_kind_root_thread_backfill/migration.sql +7 -0
- package/migrations/20261125225142_conversation_kind_root_thread_backfill/snapshot.json +9 -0
- package/migrations/20261126000151_conversation_event_message_role_seq_index/migration.sql +1 -0
- package/migrations/20261126000151_conversation_event_message_role_seq_index/snapshot.json +69 -0
- package/migrations/20261126012917_merge_leaves/migration.sql +2 -0
- package/migrations/20261126012917_merge_leaves/snapshot.json +12 -0
- package/package.json +5 -5
- package/skills/jr-rpc/SKILL.md +3 -5
- package/dist/direct-url-BYgYfuIy.js +0 -22
- package/dist/markers-CE0HMXWT.js +0 -67
|
@@ -92,9 +92,9 @@ interface MemoryOptions {
|
|
|
92
92
|
/** Model for extraction and supersession. Defaults to `AI_MEMORY_MODEL`, then the app structured model. */
|
|
93
93
|
modelId?: string;
|
|
94
94
|
}
|
|
95
|
+
type ConversationPrivacy = "public" | "private";
|
|
95
96
|
/** Validated Location associated with a Conversation. */
|
|
96
97
|
type Location = z.output<typeof locationSchema>;
|
|
97
|
-
type ConversationPrivacy = "public" | "private";
|
|
98
98
|
declare const storedSlackActorSchema: z.ZodObject<{
|
|
99
99
|
email: z.ZodOptional<z.ZodString>;
|
|
100
100
|
fullName: z.ZodOptional<z.ZodString>;
|
|
@@ -139,16 +139,15 @@ type Usage = z.output<typeof usageSchema>;
|
|
|
139
139
|
type AgentTurnUsage = Usage;
|
|
140
140
|
type ConversationSource = "api" | "internal" | "local" | "plugin" | "event" | "scheduler" | "slack" | "web";
|
|
141
141
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* kind.
|
|
142
|
+
* What a Conversation is. An Automation run and a Lead have no parent. A Task
|
|
143
|
+
* is a child that only its parent messages. A `thread` is one that people
|
|
144
|
+
* can message, with or without a parent. A Conversation never changes kind.
|
|
146
145
|
*/
|
|
147
|
-
type ConversationKind = "
|
|
146
|
+
type ConversationKind = "thread" | "automation" | "lead" | "task";
|
|
148
147
|
/** The kind of a Conversation that has no parent. */
|
|
149
|
-
type TopLevelConversationKind = Exclude<ConversationKind,
|
|
148
|
+
type TopLevelConversationKind = Exclude<ConversationKind, "task">;
|
|
150
149
|
/** The kind of a Conversation that has a parent. */
|
|
151
|
-
type ChildConversationKind = "thread" | "task"
|
|
150
|
+
type ChildConversationKind = Extract<ConversationKind, "thread" | "task">;
|
|
152
151
|
type ConversationStatus = "paused" | "failed" | "idle" | "pending" | "running";
|
|
153
152
|
/** Cumulative duration and usage that one Run reported. */
|
|
154
153
|
interface ConversationRunMetrics {
|
|
@@ -226,7 +225,10 @@ interface Conversation {
|
|
|
226
225
|
stoppedAtMs?: number | undefined;
|
|
227
226
|
/** Set while a root's Event Turn replies stay out of its Location. */
|
|
228
227
|
deliveryPausedAtMs?: number | undefined;
|
|
229
|
-
/**
|
|
228
|
+
/**
|
|
229
|
+
* Visibility of the root. Undefined is private. As a write input, it is a
|
|
230
|
+
* live signal that replaces the visibility of the Destination row.
|
|
231
|
+
*/
|
|
230
232
|
visibility?: ConversationPrivacy;
|
|
231
233
|
}
|
|
232
234
|
/** Persist and read durable conversation metadata for reporting surfaces. */
|
|
@@ -320,7 +322,7 @@ interface ConversationStore {
|
|
|
320
322
|
sessionSource?: Source;
|
|
321
323
|
title?: string;
|
|
322
324
|
/**
|
|
323
|
-
* Kind of a new Conversation. Default `
|
|
325
|
+
* Kind of a new Conversation. Default `thread`. An existing Conversation
|
|
324
326
|
* keeps its kind.
|
|
325
327
|
*/
|
|
326
328
|
kind?: TopLevelConversationKind;
|
|
@@ -328,8 +330,9 @@ interface ConversationStore {
|
|
|
328
330
|
spaceId?: string | undefined;
|
|
329
331
|
/**
|
|
330
332
|
* Current visibility from its owner, such as a Slack event channel type. It
|
|
331
|
-
* replaces the visibility of the shared Destination row.
|
|
332
|
-
*
|
|
333
|
+
* replaces the visibility of the shared Destination row. A root keeps the
|
|
334
|
+
* first visibility that it gets. Omit it for saved values, such as
|
|
335
|
+
* visibility captured when an Automation was created.
|
|
333
336
|
*/
|
|
334
337
|
visibility?: ConversationPrivacy | undefined;
|
|
335
338
|
}): Promise<void>;
|
|
@@ -354,8 +357,9 @@ interface ConversationStore {
|
|
|
354
357
|
updatedAtMs: number;
|
|
355
358
|
/**
|
|
356
359
|
* Current visibility from its owner, such as a Slack event channel type. It
|
|
357
|
-
* replaces the visibility of the shared Destination row.
|
|
358
|
-
*
|
|
360
|
+
* replaces the visibility of the shared Destination row. A root keeps the
|
|
361
|
+
* first visibility that it gets. Omit it for saved values, such as
|
|
362
|
+
* visibility captured when an Automation was created.
|
|
359
363
|
*/
|
|
360
364
|
visibility?: ConversationPrivacy | undefined;
|
|
361
365
|
}): Promise<void>;
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as MemoryOptions, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-
|
|
1
|
+
import { i as MemoryOptions, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-BhvzRD__.js";
|
|
2
2
|
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-fBrz8PCV.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-Cc2OFd9G.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type MemoryOptions, createApp, defineJuniorPlugins };
|
package/dist/app.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { $i as getVercelConversationWorkQueue, $o as existingConversationId, $t as
|
|
2
|
-
import { E as withSpan, N as normalizeIdentityEmail, T as withLogContext, b as setSpanAttributes, h as logWarn, j as GOOGLE_IDENTITY_PROVIDER, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-
|
|
6
|
-
import { $ as
|
|
7
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
1
|
+
import { $i as getVercelConversationWorkQueue, $n as proxyVercelSandboxEgressRequest, $o as existingConversationId, $t as embedConversationEvents, Ap as getAttachmentStorage, Bn as isPostgresErrorCode, Bs as dismissOpenInboxItems, Cf as parseSlackChannelId, Do as getDashboardTaskLink, Fc as isPluginInboxItem, Fd as getWorkspaceTeamId, Ff as getChatConfig, Gf as setRuntimeLimits, Gl as juniorTurns, Go as automationVersionOf, Ha as isTerminalDispatchStatus, Hf as restoreRuntimeConfig, Hl as touchConversationDetail, Ia as getDispatchConversationId, Id as runWithWorkspaceTeamId, J as getPluginApiRoutes, K as createPluginEventPublisher, Kf as setSlackReactionConfig, Ll as isPublicConversation, Lu as SLACK_EVENT_NAMESPACE, Mf as slackMessageTsFromMs, Mp as setConfigDefaults, Nf as slackMessageTsSchema, Ni as backfillConversationEmbeddings, Ns as syncAutomationAlerts, Nu as juniorDestinations, Oc as inboxItemReaderForUser, Of as slackChannelIdSchema, Pa as confirmDispatchMailboxAppend, Pf as botConfig, Pi as createConversationEmbedder, Qn as isVercelSandboxEgressRequest, Qt as EVENT_INDEX_LOCK_TTL_MS, S as withConversationMutationLock, Td as getSlackClient, Tl as readConversationAccessFromSql, Tt as setMemoryConfig, Tu as juniorConversations, Ua as listPendingDispatchMailboxAppends, Uf as setBotModelConfig, Ul as juniorTurnOutbox, V as slackMention, Vf as resetRuntimeConfig, Wf as setBotName, Wl as juniorTurnInbox, Y as getPluginRoutes, Ya as notifyAutomationBlocked, Ys as searchInboxItems, Zc as resolveViewerUser, _o as saveScheduledAutomationInLock, _r as clearSandboxEgressSignals, a as getDb, an as storeConversationEventLexemes, ap as MUTATION_LOCK_TTL_MS, au as juniorAutomations, bd as readSignInSecret, bn as queueCallback, bo as getDashboardConversationLink, ca as getQueueProvider, cl as resolveActorIdentityId, co as slackEntitySchema, cp as withLock, ct as unpublishedArtifactHeaders, cu as juniorAgentBindings, df as createSlackActor, du as juniorConversationEventLexemes, ea as verifyConversationQueueMessage, en as eventIndexLockKey, eo as openSlackModal, et as getRegistrations, fn as isEventEmbeddingsEnabled, fu as juniorConversationEventEmbeddings, gn as createVercelPluginTaskCallback, hf as parseActorUserId, hl as recordGoogleSignIn, ho as readScheduledAutomation, hu as juniorConversationEvents, i as getConversationStore, it as publicArtifactHeaders, jf as parseSlackMessageTs, jo as setDashboardConversationLinkOptions, jp as getConfigDefaults, jr as pluginCatalogRuntime, kc as inboxItemReaderForUserInConversation, kf as slackTeamIdSchema, ld as takeDueTimerWatches, lo as slackExternalRefIdSchema, ls as refreshAutomationLastRun, m as withConversationEventLock, ms as conversationCostOf, n as getConversationEventStore, na as conversationQueueMessageSchema, nf as getStateAdapter, nl as parseAvatarUrl, nt as setPlugins, nu as juniorInboxItems, o as getSqlExecutor, oc as deleteExpiredInboxSnoozes, ot as readPublicArtifact, ou as juniorAutomationRuns, p as deleteMessageLinks, pn as setEventEmbeddingsConfig, po as listScheduledAutomationsForTeam, pu as juniorConversationEmbeddings, qa as markDispatchFailed, qc as readActorIdentity, qf as snapshotRuntimeConfig, ra as isConversationQueueMessageRejectedError, rr as resolveBaseUrl, rt as validatePlugins, sp as fenceLock, to as postSlackEphemeralMessage, ua as listConversationAnnotations, vi as normalizeSandboxEgressTracePropagationDomains, vo as scheduledRunId, vr as consumeSandboxEgressAuthRequiredSignal, wr as createUserTokenStore, wt as projectConversationMessages, xc as canAnswerInboxItem, xo as getDashboardInboxItemLink, xr as parseSandboxEgressCredentialToken, yc as canActOnInboxItem, yd as readSchedulerSecret, yf as createSlackDestination, yn as sendVercelPluginTask, yo as withScheduledAutomationLock, yr as consumeSandboxEgressPermissionDeniedSignal, za as getDispatchRecord, zu as slackChannelMessageEvent } from "./db-DhzvUY23.js";
|
|
2
|
+
import { E as withSpan, N as normalizeIdentityEmail, T as withLogContext, b as setSpanAttributes, h as logWarn, j as GOOGLE_IDENTITY_PROVIDER, m as logInfo, p as logException, r as createRequestContext, w as withContext } from "./logging-B8KEJegM.js";
|
|
3
|
+
import { $t as missingAutomationSkillReason, D as decodeAnnotationRef, E as annotationKeyDigest, Gt as readViewerAutomationExecutions, Ht as ViewerTaskNotFoundError, J as vercelBackgroundCompactionQueue, Nt as parseSlackThreadId, Qt as findAutomationSkill, S as parseSlackUserInputSubmission, T as renderSlackObjectCard, Xt as automationCardStatus, Y as verifyBackgroundCompactionMessage, Yt as readViewerAutomations, Z as createVercelCacheWarmupCallback, b as parseSlackInboxItemFormTarget, bt as stopConversation, d as logScheduledAutomationRunSkipped, en as effectiveTaskOutcomes, f as scheduledAutomationRunAttributes, ft as deliverInboxItemChange, g as findSlackThreadOwnerId, h as syncInboxItemSlackCards, j as resumeConversationDelivery, m as resolveSlackInboxItemCardConversationId, mt as renderInboxItemMessage, n as executeAgentRun, p as createInboxItemShow, pt as inboxItemChangeRecord, q as processBackgroundCompaction, qt as readViewerAutomationSummary, t as createAgentRunner, ut as markConversationRead, v as buildSlackInboxItemModal, y as parseSlackInboxItemClick } from "./agent-runner-Cr5Fhjf-.js";
|
|
4
|
+
import { Cn as renderTaskInput, Fn as setExperimentalFeatures, Ft as appendAndEnqueueInboundMessage, Ht as clearExpiredConversationLease, Jt as ensureConversationWake, Nn as getExperimentalFeatures, Pn as isExperimentalFeatureEnabled, Qt as listActiveConversationIds, Tt as deleteTodos, Xt as getConversationWorkState, Yt as getConversation, _n as isTrustedSlackAuthor, ai as CONVERSATION_WORK_STALE_ENQUEUE_MS, bn as setTrustConfig, di as isInvalidConversationRecordError, dr as appendConversationMessages, gn as isAllowedDomain, gr as settleConversationTitleWork, hn as findTrustedUser, jt as runInboxItemPushTimers, kt as pushConversationInboxItemsNow, li as hasRunnableConversationWork, ot as coerceThreadConversationState, pi as pruneActiveConversation, u as getAuthPausedConversationTurnId, vn as parseEmail } from "./session-stop-DponjDUZ.js";
|
|
5
|
+
import { c as setSandboxResourceConfig, o as getSandboxResourceConfig } from "./resolve-D5JVvv6A.js";
|
|
6
|
+
import { $ as closeInboxItemsAnsweredByReply, At as createProductionConversationWorkOptions, B as mcpConversationSchema, Bt as failStoppedDispatch, Ct as readObjectLinkTypes, E as conversationOperations, Ft as slackInboundMessageId, G as mcpMessages, Gt as stripLeadingBotMention, H as mcpIdempotencyKeySchema, Ht as createSlackWebApiStatusSender, I as mcpAcceptedMessageSchema, It as normalizeIncomingSlackThreadId, J as readMcpPendingWorkAfterSend, Jt as getThreadStopDecision, K as mcpPendingMessagesSchema, Kt as parseContent, L as mcpAuthorizationSchema$1, Lt as withNormalizedThreadId, Mt as getProductionSlackAdapter, Nt as buildSlackInboundMessage, Ot as isPublicAddress, Pt as clearSlackPendingReactions, Q as actOnInboxItem, R as mcpConversation, S as encodeConversationCursor, U as mcpMessageSchema, Ut as bindMessageAuthorIdentityId, V as mcpCursorSchema, Vt as recordSkippedConversationMessage, W as mcpMessageTextSchema, Wt as startProcessingReaction, Xt as readConversationRecordFromSql, Z as InboxItemActionError, c as readConversationDetail, ct as automationReplyAttribution, dt as dispatchScheduledAutomation, et as readInboxItemForUser, ft as getScheduledAutomationDispatch, gt as runSavingsRefillSlice, it as runAutoArchiveSweep, jt as createProductionSlackWebhookServices, kt as publicAddressLookup, lt as settleEventAutomationRuns, n as readConversationFeed, nt as createEventAppPublisher, pt as runInboxSnoozeTimers, q as readMcpPendingWork, qt as SubscribedReplyReason, rt as ingestEventAutomations, tt as reviewItemChange, ut as createHeartbeatContext, v as appendConversationMessageForViewer, vt as backfillCacheWarmingGaps, x as decodeConversationCursor, y as createConversationForViewer, yt as GET$4, z as mcpConversationIdSchema, zt as enqueueAgentDispatch } from "./list-B0zsb5Cp.js";
|
|
7
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-D5WmmmhX.js";
|
|
8
8
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-BXMdNdyA.js";
|
|
9
|
-
import { n as processWorkspaceSnapshotJob, o as ingestEvent, r as verifyWorkspaceSnapshotJobMessage } from "./job-runner-
|
|
10
|
-
import { $t as scheduledRunSchema, Fn as automationTaskText, It as annotationCard, Pn as automationTaskSchema, b as automationListQuerySchema, g as automationExecutionStatusSchema, on as getNextRunAtMs, xn as buttonUserInputField } from "./media-
|
|
11
|
-
import { n as createEndStoppedChildWork } from "./result-
|
|
12
|
-
import { N as requestAttachmentDeletion, c as spaceTakesMessagesFrom, d as conversationTurnIdForMessage, f as createAndEnqueueConversation, h as webActorFromUser, k as collectAttachmentGarbage, m as recordWebConversationActivity, u as appendAndEnqueueWebMessage, v as collectAttachmentUploadGarbage } from "./turn-session-routing-
|
|
9
|
+
import { n as processWorkspaceSnapshotJob, o as ingestEvent, r as verifyWorkspaceSnapshotJobMessage } from "./job-runner-DO8nslyY.js";
|
|
10
|
+
import { $t as scheduledRunSchema, Fn as automationTaskText, It as annotationCard, Pn as automationTaskSchema, b as automationListQuerySchema, g as automationExecutionStatusSchema, on as getNextRunAtMs, xn as buttonUserInputField } from "./media-BebquhET.js";
|
|
11
|
+
import { n as createEndStoppedChildWork } from "./result-CS_7mo8a.js";
|
|
12
|
+
import { N as requestAttachmentDeletion, c as spaceTakesMessagesFrom, d as conversationTurnIdForMessage, f as createAndEnqueueConversation, h as webActorFromUser, k as collectAttachmentGarbage, m as recordWebConversationActivity, u as appendAndEnqueueWebMessage, v as collectAttachmentUploadGarbage } from "./turn-session-routing-D15orfwy.js";
|
|
13
13
|
import { i as getActiveSpan, u as sentry_exports } from "./sentry-CPbZjomA.js";
|
|
14
|
-
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
14
|
+
import { a as GET$5, i as publishAppHomeView, r as GET$6, t as receiveLocalOAuthCredential } from "./credential-sync-JH_K9Adg.js";
|
|
15
15
|
import { t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
|
|
16
|
-
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-
|
|
17
|
-
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-
|
|
18
|
-
import { l as unlinkProvider, n as renderHtmlPage, r as requestHasSameOrigin, t as escapeHtml } from "./html-
|
|
19
|
-
import { l as joinPublicChannel, n as verifySlackSignature, t as runWithSlackInstallation } from "./adapter-context-
|
|
20
|
-
import { a as
|
|
21
|
-
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_DELIVERY_CALLBACK_ROUTE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE } from "./deployment-CG3TchWh.js";
|
|
16
|
+
import { t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BTmXDjfx.js";
|
|
17
|
+
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-Dq71EkhM.js";
|
|
18
|
+
import { l as unlinkProvider, n as renderHtmlPage, r as requestHasSameOrigin, t as escapeHtml } from "./html-B_12WjKT.js";
|
|
19
|
+
import { l as joinPublicChannel, n as verifySlackSignature, t as runWithSlackInstallation } from "./adapter-context-Bref7aPI.js";
|
|
20
|
+
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_DELIVERY_CALLBACK_ROUTE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE } from "./deployment-BhvrhQeh.js";
|
|
22
21
|
import { g as resolveConversationWorkQueueTopic } from "./package-discovery-BI6T_RkD.js";
|
|
23
|
-
import { t as processConversationWork } from "./worker-
|
|
24
|
-
import { t as bindMessageAgent } from "./message-
|
|
25
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
26
|
-
import { f as readConversationLastEventSeq, l as readConversationEventPage, p as readConversationMessageEventSeq, t as processPluginTask, u as readConversationEventPageAfter } from "./task-runner-
|
|
27
|
-
import { c as replyText, d as publishTurnStep, f as countMetric, i as turnStepConsumer, l as createDeliveryConsumer, n as turnTools, o as findStalledTurns, p as withSpan$1, r as createGatewayModelClient, s as findStalledDeliveries, t as createEngineContext, u as publishDelivery } from "./engine-context-
|
|
28
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
29
|
-
import {
|
|
22
|
+
import { t as processConversationWork } from "./worker-Cyb4kF17.js";
|
|
23
|
+
import { t as bindMessageAgent } from "./message-B5fKDYzz.js";
|
|
24
|
+
import { t as bindSpawnAgent } from "./spawn-BJWpdwhQ.js";
|
|
25
|
+
import { f as readConversationLastEventSeq, l as readConversationEventPage, p as readConversationMessageEventSeq, t as processPluginTask, u as readConversationEventPageAfter } from "./task-runner-BJae4JwE.js";
|
|
26
|
+
import { c as replyText, d as publishTurnStep, f as countMetric, i as turnStepConsumer, l as createDeliveryConsumer, n as turnTools, o as findStalledTurns, p as withSpan$1, r as createGatewayModelClient, s as findStalledDeliveries, t as createEngineContext, u as publishDelivery } from "./engine-context-C9Nal48K.js";
|
|
27
|
+
import { t as JUNIOR_VERSION } from "./version-CBQoanXb.js";
|
|
28
|
+
import { D as conversationPendingMessageDeliverySchema, f as conversationTitleSchema, t as conversationFeedQuerySchema } from "./conversation-feed-B84pMjHo.js";
|
|
30
29
|
import { t as isMissingVirtualModule } from "./virtual-module-BeKA_EII.js";
|
|
31
30
|
import { createRequire } from "node:module";
|
|
32
31
|
import { Hono } from "hono";
|
|
@@ -1200,7 +1199,7 @@ async function discoverConversationTree(executor, root) {
|
|
|
1200
1199
|
async function selectExpiredRoots(executor, args) {
|
|
1201
1200
|
const publicCutoff = new Date(args.nowMs - args.publicWindowMs).toISOString();
|
|
1202
1201
|
const privateCutoff = new Date(args.nowMs - args.privateWindowMs).toISOString();
|
|
1203
|
-
const cutoff = sql`case when ${
|
|
1202
|
+
const cutoff = sql`case when ${isPublicConversation(juniorConversations)} then ${publicCutoff}::timestamptz else ${privateCutoff}::timestamptz end`;
|
|
1204
1203
|
const effectiveLastActivityAt = sql`(
|
|
1205
1204
|
with recursive conversation_tree(conversation_id, last_activity_at) as (
|
|
1206
1205
|
select ${juniorConversations.conversationId}, ${juniorConversations.lastActivityAt}
|
|
@@ -1255,7 +1254,7 @@ async function selectExpiredRoots(executor, args) {
|
|
|
1255
1254
|
where inbox.conversation_id = tree.conversation_id
|
|
1256
1255
|
)
|
|
1257
1256
|
or (
|
|
1258
|
-
${
|
|
1257
|
+
${isPublicConversation(juniorConversations)} is not true
|
|
1259
1258
|
and (
|
|
1260
1259
|
exists (
|
|
1261
1260
|
select 1 from junior_conversation_briefs briefs
|
|
@@ -1294,8 +1293,8 @@ async function selectExpiredRoots(executor, args) {
|
|
|
1294
1293
|
)`;
|
|
1295
1294
|
return (await executor.db().select({
|
|
1296
1295
|
conversationId: juniorConversations.conversationId,
|
|
1297
|
-
visibility:
|
|
1298
|
-
}).from(juniorConversations).
|
|
1296
|
+
visibility: juniorConversations.visibility
|
|
1297
|
+
}).from(juniorConversations).where(and(isNull(juniorConversations.parentConversationId), sql`${effectiveLastActivityAt} < ${cutoff}`, hasTreeWork)).orderBy(asc(effectiveLastActivityAt), asc(juniorConversations.conversationId)).limit(Math.max(0, args.limit))).map((row) => ({
|
|
1299
1298
|
conversationId: row.conversationId,
|
|
1300
1299
|
visibility: row.visibility
|
|
1301
1300
|
}));
|
|
@@ -1326,15 +1325,15 @@ async function purgeConversationTree(executor, args) {
|
|
|
1326
1325
|
for (const conversation of tree.slice(1)) await withConversationEventLock(executor, conversation.conversationId, async () => void 0);
|
|
1327
1326
|
const root = (await executor.db().select({
|
|
1328
1327
|
conversationId: juniorConversations.conversationId,
|
|
1329
|
-
|
|
1330
|
-
|
|
1328
|
+
parentConversationId: juniorConversations.parentConversationId,
|
|
1329
|
+
visibility: juniorConversations.visibility
|
|
1331
1330
|
}).from(juniorConversations).where(eq(juniorConversations.conversationId, args.rootConversationId)).for("update"))[0];
|
|
1332
1331
|
if (!root || args.retention && root.parentConversationId !== null) return {
|
|
1333
1332
|
purged: false,
|
|
1334
1333
|
conversations: 0
|
|
1335
1334
|
};
|
|
1336
|
-
const
|
|
1337
|
-
const
|
|
1335
|
+
const isPublic = root.visibility === "public";
|
|
1336
|
+
const resolvedScrubMetadata = args.scrubMetadataFromRootVisibility ? !isPublic : args.scrubMetadata;
|
|
1338
1337
|
const ids = tree.map((conversation) => conversation.conversationId);
|
|
1339
1338
|
if (args.retention) {
|
|
1340
1339
|
const currentActivity = await executor.db().select({
|
|
@@ -7010,7 +7009,6 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
7010
7009
|
"/api/objects",
|
|
7011
7010
|
"/api/stats",
|
|
7012
7011
|
"/api/versions",
|
|
7013
|
-
"/api/versions/*",
|
|
7014
7012
|
"/api/conversations",
|
|
7015
7013
|
"/api/conversations/*",
|
|
7016
7014
|
"/api/locations",
|
|
@@ -7271,6 +7269,7 @@ async function createApp(options) {
|
|
|
7271
7269
|
const pluginTaskQueue = options?.pluginTaskQueue?.((message, delivery) => processPluginTask(message, {
|
|
7272
7270
|
deliveryCount: delivery?.deliveryCount,
|
|
7273
7271
|
events,
|
|
7272
|
+
sendPluginTask: (task, sendOptions) => sendPluginTask(task, sendOptions),
|
|
7274
7273
|
showInboxItem: createInboxItemShow(getProductionSlackAdapter)
|
|
7275
7274
|
}));
|
|
7276
7275
|
const sendPluginTask = pluginTaskQueue ? (message, sendOptions) => pluginTaskQueue.send(message, sendOptions) : sendVercelPluginTask;
|
|
@@ -7447,6 +7446,7 @@ async function createApp(options) {
|
|
|
7447
7446
|
app.post(JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, (c) => {
|
|
7448
7447
|
pluginTaskPOST ??= createVercelPluginTaskCallback({
|
|
7449
7448
|
events,
|
|
7449
|
+
sendPluginTask,
|
|
7450
7450
|
showInboxItem: createInboxItemShow(getProductionSlackAdapter)
|
|
7451
7451
|
});
|
|
7452
7452
|
return pluginTaskPOST(c.req.raw);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ff as getChatConfig, Gl as juniorTurns, i as getConversationStore, sl as SYSTEM_IDENTITY_ID, u as createSqlConversationEventStore } from "./db-DhzvUY23.js";
|
|
2
2
|
import { t as startLocalVercelQueueServer } from "./local-server-CpnGhYml.js";
|
|
3
|
-
import {
|
|
3
|
+
import { ea as projectConversationEvents } from "./session-stop-DponjDUZ.js";
|
|
4
4
|
import { n as TURN_STEP_TOPIC } from "./topic-CRYYBYp-.js";
|
|
5
|
-
import { a as scheduleInput, i as turnStepConsumer, n as turnTools, r as createGatewayModelClient, t as createEngineContext } from "./engine-context-
|
|
5
|
+
import { a as scheduleInput, i as turnStepConsumer, n as turnTools, r as createGatewayModelClient, t as createEngineContext } from "./engine-context-C9Nal48K.js";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
8
8
|
import { setTimeout } from "node:timers/promises";
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
2
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
2
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-Cr5Fhjf-.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";
|
|
@@ -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-BXMdNdyA.js").then((n) => n.o),
|
|
102
|
-
import("../db-
|
|
103
|
-
import("../db-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../db-
|
|
102
|
+
import("../db-DhzvUY23.js").then((n) => n.W),
|
|
103
|
+
import("../db-DhzvUY23.js").then((n) => n.Ar),
|
|
104
|
+
import("../validation-D5WmmmhX.js").then((n) => n.r),
|
|
105
|
+
import("../db-DhzvUY23.js").then((n) => n.t)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -154,19 +154,19 @@ function localDevServerUrl() {
|
|
|
154
154
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
155
155
|
defaultStateAdapterForLocalChat();
|
|
156
156
|
await configureLocalChatPlugins(pluginSet);
|
|
157
|
-
const { setEventEmbeddingsConfig } = await import("../db-
|
|
157
|
+
const { setEventEmbeddingsConfig } = await import("../db-DhzvUY23.js").then((n) => n.dn);
|
|
158
158
|
setEventEmbeddingsConfig({ enabled: true });
|
|
159
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
160
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
161
|
-
const { createLocalOAuthState } = await import("../oauth-relay-
|
|
162
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
163
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
164
|
-
const { bindMessageAgent } = await import("../message-
|
|
165
|
-
const { createChildConversationWorker } = await import("../result-
|
|
166
|
-
const { createConversationTurnWorker } = await import("../conversation-turn-
|
|
167
|
-
const { resumeForPersonInput } = await import("../
|
|
159
|
+
const { runLocalAgentTurn } = await import("../runner-BzAES5W3.js");
|
|
160
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-B3Vvlydo.js");
|
|
161
|
+
const { createLocalOAuthState } = await import("../oauth-relay-6ERrGPbA.js").then((n) => n.t);
|
|
162
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-Dwhk2Q5F.js");
|
|
163
|
+
const { bindSpawnAgent } = await import("../spawn-BJWpdwhQ.js").then((n) => n.n);
|
|
164
|
+
const { bindMessageAgent } = await import("../message-B5fKDYzz.js").then((n) => n.n);
|
|
165
|
+
const { createChildConversationWorker } = await import("../result-CS_7mo8a.js").then((n) => n.a);
|
|
166
|
+
const { createConversationTurnWorker } = await import("../conversation-turn-DzEpTIaf.js").then((n) => n.t);
|
|
167
|
+
const { resumeForPersonInput } = await import("../session-stop-DponjDUZ.js").then((n) => n.a);
|
|
168
168
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
169
|
-
const { processConversationWork } = await import("../worker-
|
|
169
|
+
const { processConversationWork } = await import("../worker-Cyb4kF17.js").then((n) => n.n);
|
|
170
170
|
let agentRunner;
|
|
171
171
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
172
172
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
|
@@ -233,7 +233,7 @@ async function runPrompt(options, io, pluginSet) {
|
|
|
233
233
|
async function runCorePrompt(options, io, pluginSet) {
|
|
234
234
|
defaultStateAdapterForLocalChat();
|
|
235
235
|
await configureLocalChatPlugins(pluginSet);
|
|
236
|
-
const { runCoreEnginePrompt } = await import("../chat-core-engine-
|
|
236
|
+
const { runCoreEnginePrompt } = await import("../chat-core-engine-3dtlMku3.js");
|
|
237
237
|
const result = await runCoreEnginePrompt({
|
|
238
238
|
conversationId: newRunConversationId(),
|
|
239
239
|
message: options.message
|
package/dist/cli/check.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as mapBounded } from "../transcript-
|
|
2
|
-
import { a as parseSkillFile } from "../skills-
|
|
3
|
-
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_HEARTBEAT_ROUTE, m as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION } from "../deployment-
|
|
4
|
-
import {
|
|
1
|
+
import { G as mapBounded } from "../transcript-CCi7323k.js";
|
|
2
|
+
import { a as parseSkillFile } from "../skills-DgJ9GBPR.js";
|
|
3
|
+
import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_HEARTBEAT_ROUTE, m as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION } from "../deployment-BhvrhQeh.js";
|
|
4
|
+
import { _i as parsePluginManifest, gi as parseInlinePluginManifest } from "../db-DhzvUY23.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import pLimit from "p-limit";
|
|
7
7
|
import path from "node:path";
|
package/dist/cli/main.js
CHANGED
|
@@ -45,10 +45,10 @@ async function runChat(argv, pluginSet) {
|
|
|
45
45
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
46
46
|
}
|
|
47
47
|
async function runAdmin(argv) {
|
|
48
|
-
return await (await import("../admin-
|
|
48
|
+
return await (await import("../admin-QYiDMnsu.js")).runAdmin(argv);
|
|
49
49
|
}
|
|
50
50
|
async function runServiceAccount(argv) {
|
|
51
|
-
return await (await import("../service-account-
|
|
51
|
+
return await (await import("../service-account-D6AsAtc1.js")).runServiceAccount(argv);
|
|
52
52
|
}
|
|
53
53
|
function topLevelCommand(argv) {
|
|
54
54
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { I as createPluginLogger } from "../transcript-
|
|
3
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { a as getDb, jr as pluginCatalogRuntime, nt as setPlugins, rt as validatePlugins, ut as coreRegistrations } from "../db-DhzvUY23.js";
|
|
2
|
+
import { I as createPluginLogger } from "../transcript-CCi7323k.js";
|
|
3
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-D5WmmmhX.js";
|
|
4
4
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-BXMdNdyA.js";
|
|
6
6
|
import { Command, CommanderError } from "commander";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as resolve } from "../resolve-
|
|
1
|
+
import { Ff as getChatConfig, Gn as create, ef as disconnectStateAdapter, jr as pluginCatalogRuntime, yi as SANDBOX_RUNTIME } from "../db-DhzvUY23.js";
|
|
2
|
+
import { n as resolve } from "../resolve-D5JVvv6A.js";
|
|
3
3
|
// src/cli/snapshot-create.ts
|
|
4
4
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
|
5
5
|
function progressMessage(phase) {
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ff as getChatConfig, Mr as createPluginCatalogRuntime, c as pendingMigrations, l as readMigrationRecords, s as createJuniorSqlExecutor } from "../db-DhzvUY23.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cv2ETe8Y.js";
|
|
3
|
-
import { t as readDirectDatabaseUrl } from "../direct-url-BYgYfuIy.js";
|
|
4
3
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-BXMdNdyA.js";
|
|
5
4
|
import { t as isMissingVirtualModule } from "../virtual-module-BeKA_EII.js";
|
|
6
5
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -69,6 +68,27 @@ async function migrateSchema(executor) {
|
|
|
69
68
|
return lockedResult;
|
|
70
69
|
});
|
|
71
70
|
}
|
|
71
|
+
// src/cli/upgrade/database-url.ts
|
|
72
|
+
const NEON_POOLER_SUFFIX = "-pooler";
|
|
73
|
+
/**
|
|
74
|
+
* Pick the database URL for `junior upgrade` migrations.
|
|
75
|
+
*
|
|
76
|
+
* The migration lock is a session advisory lock. A transaction-mode pooler,
|
|
77
|
+
* such as Neon's `-pooler` endpoint, keeps that lock on its server session
|
|
78
|
+
* after the client leaves. The next upgrade on another session then waits,
|
|
79
|
+
* and one on the same session takes the lock again. For Neon, use the
|
|
80
|
+
* `DATABASE_URL` host without the `-pooler` suffix. The direct endpoint takes
|
|
81
|
+
* the same user, password, database, and parameters, so upgrade always
|
|
82
|
+
* migrates the database that `DATABASE_URL` names.
|
|
83
|
+
*/
|
|
84
|
+
function readMigrationDatabaseUrl(databaseUrl) {
|
|
85
|
+
if (!URL.canParse(databaseUrl)) return databaseUrl;
|
|
86
|
+
const url = new URL(databaseUrl);
|
|
87
|
+
const [endpoint, ...domain] = url.hostname.split(".");
|
|
88
|
+
if (!endpoint?.endsWith(NEON_POOLER_SUFFIX) || !url.hostname.endsWith(".neon.tech")) return databaseUrl;
|
|
89
|
+
url.hostname = [endpoint.slice(0, -7), ...domain].join(".");
|
|
90
|
+
return url.toString();
|
|
91
|
+
}
|
|
72
92
|
// src/chat/plugins/migrations.ts
|
|
73
93
|
function migrationTable(pluginName) {
|
|
74
94
|
return `__drizzle_${pluginName.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").slice(0, 32)}_${createHash("sha256").update(pluginName).digest("hex").slice(0, 8)}`;
|
|
@@ -278,7 +298,7 @@ SELECT coalesce(
|
|
|
278
298
|
async function runUpgrade(io = DEFAULT_IO, options = {}) {
|
|
279
299
|
const { sql } = getChatConfig();
|
|
280
300
|
const sqlExecutor = createJuniorSqlExecutor({
|
|
281
|
-
connectionString:
|
|
301
|
+
connectionString: readMigrationDatabaseUrl(sql.databaseUrl),
|
|
282
302
|
driver: sql.driver,
|
|
283
303
|
onInfo: (message) => io.info(` ${message}`),
|
|
284
304
|
statementTimeoutMs: false
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as joinPublicChannelForRead, r as checkSlackChannelReadAccess } from "./adapter-context-
|
|
3
|
-
import {
|
|
1
|
+
import { Cf as parseSlackChannelId, D as claimProviderConversation, I as escapeSlackMrkdwnText, L as formatSlackLink, Nu as juniorDestinations, O as getConversationIdByProviderConversation, Qa as getSlackMessagePermalink, S as withConversationMutationLock, Za as deleteSlackMessage, a as getDb, bo as getDashboardConversationLink, i as getConversationStore, jf as parseSlackMessageTs, nf as getStateAdapter, no as postSlackMessage, o as getSqlExecutor, w as setFirstConversationLocation } from "./db-DhzvUY23.js";
|
|
2
|
+
import { i as joinPublicChannelForRead, r as checkSlackChannelReadAccess } from "./adapter-context-Bref7aPI.js";
|
|
3
|
+
import { fi as moveIdleConversationDestination } from "./session-stop-DponjDUZ.js";
|
|
4
4
|
import { and, eq } from "drizzle-orm";
|
|
5
5
|
// src/chat/slack/continue-in-slack.ts
|
|
6
6
|
/** Refusal for a move that cannot wait for the active Run. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as conversationSummaryReportSchema, Ft as inboxItemChangeRecordSchema, Gt as messageAttachmentSchema, R as actorIdentitySchema, W as conversationDetailReportSchema, kt as spaceRefSchema } from "./media-
|
|
1
|
+
import { $ as conversationSummaryReportSchema, Ft as inboxItemChangeRecordSchema, Gt as messageAttachmentSchema, R as actorIdentitySchema, W as conversationDetailReportSchema, kt as spaceRefSchema } from "./media-BebquhET.js";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
// src/api/objects/cards.ts
|
|
4
4
|
const MAX_LABEL_CHARS = 256;
|
|
@@ -340,7 +340,12 @@ const conversationSubscriptionResponseSchema = z.object({
|
|
|
340
340
|
archivedAt: z.string().datetime().nullable().describe("Set when the conversation is archived for everyone."),
|
|
341
341
|
subscribed: z.boolean()
|
|
342
342
|
}).strict();
|
|
343
|
-
/**
|
|
343
|
+
/**
|
|
344
|
+
* The root after the viewer left it. `archivedAt` is set when the viewer
|
|
345
|
+
* was the last subscriber, so leaving archived it for everyone.
|
|
346
|
+
*/
|
|
347
|
+
const conversationLeaveResponseSchema = z.object({ archivedAt: z.string().datetime().nullable().describe("Set when the conversation is archived for everyone.") }).strict();
|
|
348
|
+
/** Invite one mentioned person, by Slack user id, to a Conversation. */
|
|
344
349
|
const conversationInviteBodySchema = z.object({ slackUserId: z.string().min(1).max(64) }).strict();
|
|
345
350
|
/** `added` is false when the person was already a Participant. */
|
|
346
351
|
const conversationInviteResponseSchema = z.object({ added: z.boolean() }).strict();
|
|
@@ -437,4 +442,4 @@ const conversationFeedSchema = z.object({
|
|
|
437
442
|
*/
|
|
438
443
|
waitingRowsTruncated: z.literal(true).optional()
|
|
439
444
|
}).strict();
|
|
440
|
-
export {
|
|
445
|
+
export { conversationUnchangedDetailWithMailboxSchema as A, runtimeInfoReportSchema as B, cancelConversationPendingMessagesBodySchema as C, conversationPendingMessageDeliverySchema as D, conversationPendingAuthorizationSchema as E, pluginOperationalReportSchema as F, messageObjectCard as G, skillReportSchema as H, pluginPackageContentItemReportSchema as I, personObjectCard as K, pluginPackageContentReportSchema as L, steerConversationPendingMessagesResponseSchema as M, healthReportSchema as N, conversationPendingMessageSchema as O, pluginOperationalReportFeedSchema as P, pluginSchema as R, conversationAutoArchiveSchema as S, conversationDetailWithMailboxReportSchema as T, skillReportsSchema as U, skillDetailReportSchema as V, conversationObjectCard as W, reorderPinnedConversationsBodySchema as _, conversationInviteResponseSchema as a, archiveConversationResponseSchema as b, conversationSubscriptionResponseSchema as c, CONVERSATION_TITLE_MAX_LENGTH as d, conversationTitleSchema as f, pinConversationResponseSchema as g, pinConversationBodySchema as h, conversationInviteBodySchema as i, steerConversationPendingMessagesBodySchema as j, conversationPendingMessagesReportSchema as k, setConversationSpaceBodySchema as l, renameConversationResponseSchema as m, conversationFeedSchema as n, conversationLeaveResponseSchema as o, renameConversationBodySchema as p, webPageObjectCard as q, stopConversationTurnResponseSchema as r, conversationSubscriptionBodySchema as s, conversationFeedQuerySchema as t, setConversationSpaceResponseSchema as u, reorderPinnedConversationsResponseSchema as v, cancelConversationPendingMessagesResponseSchema as w, archiveDoneConversationsResponseSchema as x, archiveConversationBodySchema as y, pluginsSchema as z };
|