@sentry/junior 0.240.0 → 0.241.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{admin-D6fRPRgC.js → admin-CJkjl-aN.js} +1 -1
- package/dist/{agent-hooks-JFbgedMZ.js → agent-hooks-C5zYOaJk.js} +1952 -1952
- package/dist/{agent-runner-0IjJxsL1.js → agent-runner-CMZ6lFQe.js} +336 -1125
- package/dist/api/schema.d.ts +9 -0
- package/dist/api/schema.js +2 -2
- package/dist/api.js +21 -21
- package/dist/app.js +104 -31
- package/dist/{automation-B5_c8hEb.js → automation-gznOMaQ2.js} +11 -2
- package/dist/{briefs-BGWTp-nz.js → briefs-CsQbFjRi.js} +2 -2
- package/dist/{catalog-runtime-DdigNl7s.js → catalog-runtime-Tz0O2MZe.js} +1 -1
- package/dist/cli/chat.js +12 -12
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-Cn73E7br.js → client-CRZ-i1tH.js} +2 -2
- package/dist/{config-B0S86yw9.js → config-CCI82OTD.js} +2 -2
- package/dist/{conversation-privacy-BKlX7D_R.js → conversation-privacy-D5Byl5eC.js} +1 -1
- package/dist/{credential-sync-DeNQm7st.js → credential-sync-DUpSxUum.js} +14 -14
- package/dist/{executor-BQ-A5nov.js → executor-CewKi7EG.js} +4 -2
- package/dist/{images-C7OKd6uy.js → images-DY6Pxq4w.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-DgXLqoeB.js → job-queue-C6o2aJQ6.js} +1 -1
- package/dist/{logging-BSNF167N.js → logging-LQnLlPf8.js} +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-BM7g61od.js → oauth-authorization-Clzkm-Ts.js} +1 -1
- package/dist/{oauth-callback-server-Dw-BwI6x.js → oauth-callback-server-DcYAJSEz.js} +2 -2
- package/dist/{pending-auth-Chn_EA1_.js → pending-auth-CT3ojhKe.js} +2 -2
- package/dist/{profile-3t9H_IwL.js → profile-mWuVZ8ht.js} +4 -4
- package/dist/{registry-DLZlAhdP.js → registry-DPDH6s5G.js} +1 -1
- package/dist/{resolve-9_cIPQsq.js → resolve-BAN8BSGy.js} +2 -2
- package/dist/{runner-C_eUbFyp.js → runner-CqXZJfzk.js} +9 -9
- package/dist/{sandbox-egress-signals-C1ycxTNA.js → sandbox-egress-signals-DFUUokws.js} +1 -1
- package/dist/{schema-C4XwHTY4.js → schema-Cabm4jcj.js} +1 -1
- package/dist/{skills-Dqgjr_Tl.js → skills-BtHhSATy.js} +2 -2
- package/dist/{spawn-BfEr3t7b.js → spawn-BszkFJKJ.js} +2 -2
- package/dist/{task-queue-CuFZDOXn.js → task-queue-1LP6benz.js} +3 -3
- package/dist/{task-runner-c7gwV8dj.js → task-runner-kLN3HC-_.js} +54 -12
- package/dist/{checkpoint-C1ZnSz7r.js → tasks-CO52vLkI.js} +1056 -14
- package/dist/{thread-state-exTu-G1w.js → thread-state-CaFRG5Mh.js} +6 -6
- package/dist/{turn-failure-response-DFp99ziF.js → turn-failure-response-Dmovuiq1.js} +9 -8
- package/dist/{turn-lifecycle-C4TjuOzG.js → turn-lifecycle-DGqZgU6J.js} +1 -1
- package/dist/{turn-session-routing-Vpg8jUD1.js → turn-session-routing-B_v8Wbn4.js} +1 -1
- package/dist/{validation-D2lULEG9.js → validation-B4L2Rmiw.js} +1 -1
- package/dist/{version-BjBMCc2o.js → version-DiR36OaN.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-XE3nFqKM.js → viewer-D6stAU7h.js} +3 -3
- package/dist/{web-authorization-8E8IrWOj.js → web-authorization-DLMBx2nL.js} +6 -6
- package/dist/{web-input-DF4GGJrf.js → web-input---xuox1t.js} +135 -129
- package/dist/{work-Dt_JjfbX.js → work-G-HdoOSF.js} +7 -7
- package/dist/{worker-BrbnLmD3.js → worker-CDUDfL9P.js} +5 -5
- package/migrations/0049_event_automation_status_reason.sql +1 -0
- package/migrations/meta/0049_snapshot.json +3581 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +4 -4
package/dist/api/schema.d.ts
CHANGED
|
@@ -3417,8 +3417,10 @@ export declare const eventAutomationSummarySchema: z.ZodObject<{
|
|
|
3417
3417
|
resource: z.ZodString;
|
|
3418
3418
|
source: z.ZodString;
|
|
3419
3419
|
triggerAvailable: z.ZodBoolean;
|
|
3420
|
+
statusReason: z.ZodOptional<z.ZodString>;
|
|
3420
3421
|
status: z.ZodEnum<{
|
|
3421
3422
|
paused: "paused";
|
|
3423
|
+
blocked: "blocked";
|
|
3422
3424
|
active: "active";
|
|
3423
3425
|
}>;
|
|
3424
3426
|
}, z.core.$strict>;
|
|
@@ -3529,8 +3531,10 @@ export declare const automationSummarySchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
3529
3531
|
resource: z.ZodString;
|
|
3530
3532
|
source: z.ZodString;
|
|
3531
3533
|
triggerAvailable: z.ZodBoolean;
|
|
3534
|
+
statusReason: z.ZodOptional<z.ZodString>;
|
|
3532
3535
|
status: z.ZodEnum<{
|
|
3533
3536
|
paused: "paused";
|
|
3537
|
+
blocked: "blocked";
|
|
3534
3538
|
active: "active";
|
|
3535
3539
|
}>;
|
|
3536
3540
|
}, z.core.$strict>], "kind">;
|
|
@@ -3698,8 +3702,10 @@ export declare const automationListSchema: z.ZodObject<{
|
|
|
3698
3702
|
resource: z.ZodString;
|
|
3699
3703
|
source: z.ZodString;
|
|
3700
3704
|
triggerAvailable: z.ZodBoolean;
|
|
3705
|
+
statusReason: z.ZodOptional<z.ZodString>;
|
|
3701
3706
|
status: z.ZodEnum<{
|
|
3702
3707
|
paused: "paused";
|
|
3708
|
+
blocked: "blocked";
|
|
3703
3709
|
active: "active";
|
|
3704
3710
|
}>;
|
|
3705
3711
|
}, z.core.$strict>], "kind">>;
|
|
@@ -3894,8 +3900,10 @@ export declare const automationExecutionListSchema: z.ZodObject<{
|
|
|
3894
3900
|
resource: z.ZodString;
|
|
3895
3901
|
source: z.ZodString;
|
|
3896
3902
|
triggerAvailable: z.ZodBoolean;
|
|
3903
|
+
statusReason: z.ZodOptional<z.ZodString>;
|
|
3897
3904
|
status: z.ZodEnum<{
|
|
3898
3905
|
paused: "paused";
|
|
3906
|
+
blocked: "blocked";
|
|
3899
3907
|
active: "active";
|
|
3900
3908
|
}>;
|
|
3901
3909
|
}, z.core.$strict>], "kind">;
|
|
@@ -4266,6 +4274,7 @@ export declare const automationEditSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
4266
4274
|
triggerAvailable: z.ZodBoolean;
|
|
4267
4275
|
status: z.ZodEnum<{
|
|
4268
4276
|
paused: "paused";
|
|
4277
|
+
blocked: "blocked";
|
|
4269
4278
|
active: "active";
|
|
4270
4279
|
}>;
|
|
4271
4280
|
}, z.core.$strict>], "kind">;
|
package/dist/api/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureCodeSchema } from "../history-BLTUgFYO.js";
|
|
2
2
|
import { A as forkConversationResponseSchema, C as conversationReportEventSchema, D as createConversationBodySchema, E as conversationSummaryReportSchema, K as resolveMessageCards, M as MAX_INPUT_IMAGE_BYTES, O as createConversationMessageBodySchema, P as INPUT_IMAGE_TYPES, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, U as messageCardText, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, b as conversationPendingMessageSchema, d as conversationDetailReportSchema, f as conversationEventHistorySchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as MAX_INPUT_IMAGES, k as forkConversationBodySchema, l as conversationAuxiliaryCostsSchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, s as conversationActivityPreviewSchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, v as conversationPendingAuthorizationSchema, x as conversationPendingMessagesReportSchema, y as conversationPendingMessageDeliverySchema } from "../conversation-DwD-vquD.js";
|
|
3
|
-
import { C as eventAutomationSummarySchema, S as automationVersionSchema, _ as automationSummarySchema, a as automationExecutionSchema, b as automationVersionListSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, m as automationRunWindowsSchema, n as automationEditSchema, o as automationExecutionStatusDaySchema, p as automationRunSchema, r as automationEventCatalogSchema, s as automationExecutionStatusSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, w as scheduledAutomationSummarySchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "../automation-
|
|
3
|
+
import { C as eventAutomationSummarySchema, S as automationVersionSchema, _ as automationSummarySchema, a as automationExecutionSchema, b as automationVersionListSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, l as automationListQuerySchema, m as automationRunWindowsSchema, n as automationEditSchema, o as automationExecutionStatusDaySchema, p as automationRunSchema, r as automationEventCatalogSchema, s as automationExecutionStatusSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, w as scheduledAutomationSummarySchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "../automation-gznOMaQ2.js";
|
|
4
4
|
import { C as skillReportsSchema, S as skillReportSchema, _ as pluginPackageContentItemReportSchema, b as pluginsSchema, g as pluginOperationalReportSchema, h as pluginOperationalReportFeedSchema, m as healthReportSchema, t as webMessageId, v as pluginPackageContentReportSchema, x as runtimeInfoReportSchema, y as pluginSchema } from "../web-message-id-xPI_EFSC.js";
|
|
5
|
-
import { A as codeChangeSummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeRepositorySummarySchema, I as apiErrorSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, O as codeActivityDaySchema, P as codeRepositoryReportSchema, S as locationDirectoryReportSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, b as locationActivityDayReportSchema, c as workspaceRepoSchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, k as codeChangeSummaryReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as personalTokenMetadataSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, x as locationDetailReportSchema, y as personalSpendReportSchema } from "../schema-
|
|
5
|
+
import { A as codeChangeSummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeRepositorySummarySchema, I as apiErrorSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, O as codeActivityDaySchema, P as codeRepositoryReportSchema, S as locationDirectoryReportSchema, _ as actorProfileReportSchema, a as workspaceBodySchema, b as locationActivityDayReportSchema, c as workspaceRepoSchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, k as codeChangeSummaryReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, p as personalTokenMetadataSchema, r as baselineSnapshotSchema, s as workspaceParamsSchema, t as statSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, x as locationDetailReportSchema, y as personalSpendReportSchema } from "../schema-Cabm4jcj.js";
|
|
6
6
|
export { INPUT_IMAGE_TYPES, MAX_INPUT_IMAGES, MAX_INPUT_IMAGE_BYTES, acceptedConversationMessageSchema, actorDirectoryReportSchema, actorProfileReportSchema, apiErrorSchema, archiveConversationBodySchema, archiveConversationResponseSchema, automationEditErrorSchema, automationEditSchema, automationEventCatalogSchema, automationExecutionListSchema, automationExecutionSchema, automationExecutionStatusDaySchema, automationExecutionStatusSchema, automationListQuerySchema, automationListSchema, automationParamsSchema, automationRunListSchema, automationRunSchema, automationRunWindowsSchema, automationScheduleIntentSchema, automationSchedulePreviewSchema, automationSummarySchema, automationUpdateSchema, automationVersionActivateSchema, automationVersionListSchema, automationVersionParamsSchema, automationVersionSchema, baselineSnapshotSchema, cancelConversationPendingMessagesBodySchema, cancelConversationPendingMessagesResponseSchema, codeActivityDaySchema, codeChangeSummaryReportSchema, codeChangeSummarySchema, codeOverviewReportSchema, codePersonReportSchema, codeRepositoryParamsSchema, codeRepositoryReportSchema, codeRepositorySummarySchema, conversationActivityPreviewSchema, conversationAuxiliaryCostsSchema, conversationDetailQuerySchema, conversationDetailReportSchema, conversationEventHistorySchema, conversationEventPageSchema, conversationEventsQuerySchema, conversationFeedQuerySchema, conversationFeedSchema, conversationParamsSchema, conversationPendingAuthorizationSchema, conversationPendingMessageDeliverySchema, conversationPendingMessageSchema, conversationPendingMessagesReportSchema, conversationReportEventDataSchema, conversationReportEventSchema, conversationStatsReportSchema, conversationSummaryReportSchema, conversationTurnFailureCodeSchema, conversationTurnFailureReasonSchema, createConversationBodySchema, createConversationMessageBodySchema, createPersonalTokenBodySchema, createdPersonalTokenSchema, dailyConversationActivitySchema, deleteWorkspaceResponseSchema, eventAutomationSummarySchema, forkConversationBodySchema, forkConversationResponseSchema, healthReportSchema, locationActivityDayReportSchema, locationDetailReportSchema, locationDirectoryReportSchema, locationParamsSchema, messageCardText, personParamsSchema, personalSpendReportSchema, personalTokenListSchema, personalTokenMetadataSchema, personalTokenParamsSchema, pluginOperationalReportFeedSchema, pluginOperationalReportSchema, pluginPackageContentItemReportSchema, pluginPackageContentReportSchema, pluginSchema, pluginsSchema, resolveMessageCards, revokePersonalTokenResponseSchema, runtimeInfoReportSchema, scheduledAutomationSummarySchema, skillReportSchema, skillReportsSchema, statSchema, statsReportSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|
package/dist/api.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as logException, p as logWarn } from "./logging-
|
|
1
|
+
import { $ as getEventCatalog, L as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, R as AutomationEditError, T as readLiveAttachment, V as resolveTaskOutcomes, g as readStats, gt as getConversation, ot as cancelHumanFacingPendingMessages, tt as pluginEventCatalog, z as eventAutomationTriggerAvailable } from "./agent-runner-CMZ6lFQe.js";
|
|
2
|
+
import { d as logException, p as logWarn } from "./logging-LQnLlPf8.js";
|
|
3
3
|
import { d as parseSlackTeamId, g as parseSlackMessageTs, l as parseSlackChannelId } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { E as resolveRootConversationId, T as hasAgentTurnUsage, _ as locationFromRow, b as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, w as agentTurnUsageSchema } from "./viewer-
|
|
4
|
+
import { E as resolveRootConversationId, T as hasAgentTurnUsage, _ as locationFromRow, b as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, w as agentTurnUsageSchema } from "./viewer-D6stAU7h.js";
|
|
5
5
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
6
|
-
import { C as juniorCodeChanges, D as juniorConversations, E as conversationReadColumns, O as juniorIdentities, _ as juniorConversationBriefs, b as juniorConversationEvents, h as juniorConversationParticipants, k as juniorUsers, w as juniorCodeRepositories, x as juniorApiTokens, y as juniorConversationMetrics } from "./executor-
|
|
6
|
+
import { C as juniorCodeChanges, D as juniorConversations, E as conversationReadColumns, O as juniorIdentities, _ as juniorConversationBriefs, b as juniorConversationEvents, h as juniorConversationParticipants, k as juniorUsers, w as juniorCodeRepositories, x as juniorApiTokens, y as juniorConversationMetrics } from "./executor-CewKi7EG.js";
|
|
7
7
|
import { u as contextProvenance } from "./history-BLTUgFYO.js";
|
|
8
|
-
import {
|
|
9
|
-
import { At as
|
|
8
|
+
import { D as automationRevision, E as AutomationConflictError, O as requireAutomationRevision, S as automationDefinition, T as sameDefinitionValue, Tt as loadTurnProjection, a as readScheduledAutomation, b as saveEventAutomation, cn as piMessageFromHistoryItem, g as getEventAutomation, m as eventAutomationBelongsToUser, o as saveScheduledAutomation, w as readAutomationVersion, x as setEventAutomationStatus } from "./tasks-CO52vLkI.js";
|
|
9
|
+
import { At as listConversationAnnotations, C as WorkspaceValidationError, M as workspaceRepoCheckoutPath, O as SANDBOX_RUNTIME, Pt as lookupSlackUser, S as updateWorkspace, St as buildSentryConversationUrl, Wt as withSlackRetries, _ as deleteWorkspace, _t as conversationNotArchivedForUser, b as listWorkspaces, bt as readLatestConversationBrief, dt as conversationArchiveTimes, ft as conversationArchivedForEmail, g as createWorkspace, gt as conversationNotArchivedForEmail, ht as conversationHasParticipantUser, jt as listConversationAnnotationsById, lt as createPluginLogger, mt as conversationHasParticipantEmail, pt as conversationArchivedForUser, u as getPlugins, ut as readConversationAccessFromSql, v as getWorkspace, vt as viewerConversationMembership, x as listWorkspacesByRepository, xt as readConversationEventPage, zt as getSlackClient } from "./agent-hooks-C5zYOaJk.js";
|
|
10
10
|
import { A as forkConversationResponseSchema, D as createConversationBodySchema, N as readMessageAttachments, O as createConversationMessageBodySchema, P as INPUT_IMAGE_TYPES, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, k as forkConversationBodySchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-DwD-vquD.js";
|
|
11
|
-
import { n as hash, t as create } from "./profile-
|
|
11
|
+
import { n as hash, t as create } from "./profile-mWuVZ8ht.js";
|
|
12
12
|
import { t as getFirstRunAtMs } from "./cadence-D00SCzT1.js";
|
|
13
|
-
import { t as getCachedSnapshot } from "./resolve-
|
|
14
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
15
|
-
import { M as compileScheduleIntent, P as weekdaySchema, _ as automationSummarySchema, b as automationVersionListSchema, c as automationLifecycleSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, j as ScheduleIntentError, l as automationListQuerySchema, n as automationEditSchema, r as automationEventCatalogSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "./automation-
|
|
13
|
+
import { t as getCachedSnapshot } from "./resolve-BAN8BSGy.js";
|
|
14
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-C6o2aJQ6.js";
|
|
15
|
+
import { M as compileScheduleIntent, P as weekdaySchema, _ as automationSummarySchema, b as automationVersionListSchema, c as automationLifecycleSchema, d as automationParamsSchema, f as automationRunListSchema, g as automationSchedulePreviewSchema, h as automationScheduleIntentSchema, i as automationExecutionListSchema, j as ScheduleIntentError, l as automationListQuerySchema, n as automationEditSchema, r as automationEventCatalogSchema, t as automationEditErrorSchema, u as automationListSchema, v as automationUpdateSchema, x as automationVersionParamsSchema, y as automationVersionActivateSchema } from "./automation-gznOMaQ2.js";
|
|
16
16
|
import { C as skillReportsSchema, a as fillUtcHours, b as pluginsSchema, c as sumUtcHoursIntoSixHours, d as trailingUtcSixHourWindow, f as utcDayKey, h as pluginOperationalReportFeedSchema, i as fillUtcDays, l as trailingUtcDayWindow, m as healthReportSchema, n as DAY_MS$1, o as fillUtcSixHours, p as utcHourKey, r as HOUR_MS$1, s as startOfUtcHour, u as trailingUtcHourWindow, x as runtimeInfoReportSchema } from "./web-message-id-xPI_EFSC.js";
|
|
17
|
-
import {
|
|
18
|
-
import { A as
|
|
19
|
-
import { r as getWebAuthorization } from "./web-authorization-
|
|
20
|
-
import { t as decodeInputImages } from "./images-
|
|
21
|
-
import { C as locationParamsSchema, E as activitySixHours$1, I as apiErrorSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, P as codeRepositoryReportSchema, S as locationDirectoryReportSchema, T as activityHours$1, _ as actorProfileReportSchema, a as workspaceBodySchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, s as workspaceParamsSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, w as activityDays$1, x as locationDetailReportSchema, y as personalSpendReportSchema } from "./schema-
|
|
17
|
+
import { L as createVercelAttachmentStorage, M as legacyWebMailboxMetadataSchema, V as readHealthReport, _ as readViewerAutomationRuns, a as recordWebConversationActivity, b as readViewerAutomations, d as resolveSlackConversationContextFromThreadId, g as readViewerAutomationExecutions, h as readConversationSourceTask, i as createConversationId, l as getProductionSlackAdapter, m as deleteViewerTask, o as webActorFromEmail, p as ViewerTaskNotFoundError, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as formatSlackConversationRedactedLabel, v as readViewerAutomationSummary, w as clearSlackPendingReactions, x as resolveViewerTaskCandidate, y as readViewerAutomationVersions } from "./web-input---xuox1t.js";
|
|
18
|
+
import { A as conversationActiveDaysColumn, M as conversationRangeColumns, j as conversationAggregateColumns } from "./task-runner-kLN3HC-_.js";
|
|
19
|
+
import { r as getWebAuthorization } from "./web-authorization-DLMBx2nL.js";
|
|
20
|
+
import { t as decodeInputImages } from "./images-DY6Pxq4w.js";
|
|
21
|
+
import { C as locationParamsSchema, E as activitySixHours$1, I as apiErrorSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, P as codeRepositoryReportSchema, S as locationDirectoryReportSchema, T as activityHours$1, _ as actorProfileReportSchema, a as workspaceBodySchema, d as createdPersonalTokenSchema, f as personalTokenListSchema, g as actorDirectoryReportSchema, h as revokePersonalTokenResponseSchema, i as deleteWorkspaceResponseSchema, j as codeOverviewReportSchema, l as workspaceSchema, m as personalTokenParamsSchema, n as statsReportSchema, o as workspaceListSchema, s as workspaceParamsSchema, u as createPersonalTokenBodySchema, v as personParamsSchema, w as activityDays$1, x as locationDetailReportSchema, y as personalSpendReportSchema } from "./schema-Cabm4jcj.js";
|
|
22
22
|
import { Hono } from "hono";
|
|
23
23
|
import path from "node:path";
|
|
24
24
|
import { z } from "zod";
|
|
@@ -3357,7 +3357,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3357
3357
|
reports: [],
|
|
3358
3358
|
source: "plugins"
|
|
3359
3359
|
});
|
|
3360
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
3360
|
+
const { getPluginProfileReports } = await import("./agent-hooks-C5zYOaJk.js").then((n) => n.t);
|
|
3361
3361
|
return pluginOperationalReportFeedSchema.parse({
|
|
3362
3362
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3363
3363
|
reports: await getPluginProfileReports({
|
|
@@ -3874,7 +3874,7 @@ function editView(automation, ownedByViewer) {
|
|
|
3874
3874
|
return {
|
|
3875
3875
|
...common,
|
|
3876
3876
|
kind: "event",
|
|
3877
|
-
status: automation.task.status === "
|
|
3877
|
+
status: automation.task.status === "deleted" ? "active" : automation.task.status,
|
|
3878
3878
|
trigger: automation.task.trigger,
|
|
3879
3879
|
triggerAvailable: eventAutomationTriggerAvailable(automation.task, getEventCatalog())
|
|
3880
3880
|
};
|
|
@@ -4325,7 +4325,7 @@ function readDescriptionText(home) {
|
|
|
4325
4325
|
}
|
|
4326
4326
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
4327
4327
|
async function readSkillReports() {
|
|
4328
|
-
const { discoverSkills } = await import("./skills-
|
|
4328
|
+
const { discoverSkills } = await import("./skills-BtHhSATy.js").then((n) => n.o);
|
|
4329
4329
|
const skills = await discoverSkills();
|
|
4330
4330
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
4331
4331
|
name: skill.name,
|
|
@@ -4334,7 +4334,7 @@ async function readSkillReports() {
|
|
|
4334
4334
|
}
|
|
4335
4335
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
4336
4336
|
async function readPlugins() {
|
|
4337
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4337
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-Tz0O2MZe.js").then((n) => n.t);
|
|
4338
4338
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4339
4339
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
4340
4340
|
description: plugin.manifest.description,
|
|
@@ -4346,7 +4346,7 @@ async function readPlugins() {
|
|
|
4346
4346
|
async function readRuntimeInfoReport() {
|
|
4347
4347
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4348
4348
|
import("./package-discovery-BVvSnQBB.js").then((n) => n.r),
|
|
4349
|
-
import("./catalog-runtime-
|
|
4349
|
+
import("./catalog-runtime-Tz0O2MZe.js").then((n) => n.t),
|
|
4350
4350
|
readPlugins(),
|
|
4351
4351
|
readSkillReports()
|
|
4352
4352
|
]);
|
|
@@ -4363,7 +4363,7 @@ async function readRuntimeInfoReport() {
|
|
|
4363
4363
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
4364
4364
|
async function readPluginOperationalReportFeed() {
|
|
4365
4365
|
const nowMs = Date.now();
|
|
4366
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4366
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-C5zYOaJk.js").then((n) => n.t);
|
|
4367
4367
|
return pluginOperationalReportFeedSchema.parse({
|
|
4368
4368
|
source: "plugins",
|
|
4369
4369
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { C as withLogContext, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, S as withContext, d as logException, f as logInfo, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, p as logWarn, r as createRequestContext, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-
|
|
1
|
+
import { $ as getEventCatalog, B as effectiveTaskOutcomes, Bt as SANDBOX_EGRESS_PROXY_PATH, Ct as removeActiveConversation, Dt as stopConversationWork, E as requestAttachmentDeletion, F as logScheduledAutomationRunSkipped, Ht as consumeSandboxEgressAuthRequiredSignal, I as scheduledAutomationRunAttributes, J as processWorkspaceSnapshotJob, Kt as formatProviderLabel, Lt as resolveSandboxEgressProviderForHost, Nt as isInvalidConversationRecordError, O as parseSlackThreadId, Pt as renderTaskInput, Rt as normalizeSandboxEgressTracePropagationDomains, Tt as requestConversationWork, Ut as consumeSandboxEgressPermissionDeniedSignal, Vt as clearSandboxEgressSignals, Wt as parseSandboxEgressCredentialToken, Xt as createUserTokenStore, Y as ingestEvent, Yt as startOAuthFlow, _t as getConversationWorkState, b as unpublishedArtifactHeaders, c as deleteMcpAuthSessionsForUserProvider, et as eventGuidance, gt as getConversation, ht as ensureConversationWake, i as executeCredentialedEgressRequest, it as appendAndEnqueueInboundMessage, jt as hasRunnableConversationWork$1, kt as CONVERSATION_WORK_STALE_ENQUEUE_MS, l as deleteMcpServerSessionId, lt as clearExpiredConversationLease, n as executeAgentRun, on as getConfigDefaults, sn as setConfigDefaults, t as createAgentRunner, u as deleteMcpStoredOAuthCredentials, v as publicArtifactHeaders, vt as hasRunnableConversationWork, w as collectAttachmentGarbage, x as lookupSlackUserProfile, y as readPublicArtifact, yt as listActiveConversationIds, zt as shouldPropagateSandboxEgressTrace } from "./agent-runner-CMZ6lFQe.js";
|
|
2
|
+
import { C as withLogContext, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, S as withContext, d as logException, f as logInfo, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, p as logWarn, r as createRequestContext, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-LQnLlPf8.js";
|
|
3
3
|
import { r as continueTrace } from "./sentry-CgWZM_kV.js";
|
|
4
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
5
|
-
import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-
|
|
4
|
+
import { t as JUNIOR_VERSION } from "./version-DiR36OaN.js";
|
|
5
|
+
import { _ as snapshotRuntimeConfig, d as restoreRuntimeConfig, f as setBotModelConfig, g as setSlackReactionConfig, h as setRuntimeLimits, i as getChatConfig, m as setProfiles, n as botConfig, o as getSlackBotToken, p as setCrossActorMidRunMode, u as resetRuntimeConfig } from "./config-CCI82OTD.js";
|
|
6
6
|
import { _ as slackMessageTsSchema, d as parseSlackTeamId, f as parseSlackUserId, h as slackUserIdSchema, m as slackTeamIdSchema, o as parseActorUserId, p as slackChannelIdSchema } from "./actor-BTtLaeWy.js";
|
|
7
|
-
import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, d as getDb, f as getSqlExecutor, g as withConversationMutationLock, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-
|
|
7
|
+
import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, d as getDb, f as getSqlExecutor, g as withConversationMutationLock, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-D6stAU7h.js";
|
|
8
8
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
9
|
-
import { D as juniorConversations, _ as juniorConversationBriefs, a as juniorSchedulerRuns, b as juniorConversationEvents, m as juniorAgentInvocations, o as juniorSchedulerTasks, p as juniorAgentBindings } from "./executor-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
import {
|
|
12
|
-
import { $ as verifySlackDirectCredentialSubject, G as findMatchingWatches,
|
|
9
|
+
import { D as juniorConversations, _ as juniorConversationBriefs, a as juniorSchedulerRuns, b as juniorConversationEvents, m as juniorAgentInvocations, o as juniorSchedulerTasks, p as juniorAgentBindings } from "./executor-CewKi7EG.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Tz0O2MZe.js";
|
|
11
|
+
import { H as slackEntitySchema, N as slackMention, Rt as appendConversationMessages, U as slackExternalRefIdSchema, Vt as projectConversationMessages, Wt as settleConversationTitleWork, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock } from "./tasks-CO52vLkI.js";
|
|
12
|
+
import { $ as verifySlackDirectCredentialSubject, At as listConversationAnnotations, Dt as resolveRootVisibility, G as findMatchingWatches, Gt as getWorkspaceTeamId, J as bindEventAutomationCredentialSubject, Kt as runWithWorkspaceTeamId, Q as verifyScheduledAutomationCredentialSubject, V as collectEventMatchKeys, Vt as isDmChannel, X as bindSlackDirectCredentialSubject, Y as bindScheduledAutomationCredentialSubject, Z as verifyEventAutomationCredentialSubject, a as getPluginRoutes, at as setDashboardConversationLinkOptions, d as setPlugins, f as validatePlugins, h as setBriefsConfig, i as getPluginApiRoutes, it as getDashboardTaskLink, lt as createPluginLogger, nt as getDashboardConversationLink, ot as createPluginState, q as takeDueTimerWatches, u as getPlugins, ut as readConversationAccessFromSql, z as cancelSubscriptions, zt as getSlackClient } from "./agent-hooks-C5zYOaJk.js";
|
|
13
13
|
import { V as annotationCard } from "./conversation-DwD-vquD.js";
|
|
14
|
-
import { O as withLock$1, w as getStateAdapter } from "./profile-
|
|
15
|
-
import { c as getThreadStopDecision } from "./pending-auth-
|
|
14
|
+
import { O as withLock$1, w as getStateAdapter } from "./profile-mWuVZ8ht.js";
|
|
15
|
+
import { c as getThreadStopDecision } from "./pending-auth-CT3ojhKe.js";
|
|
16
16
|
import { n as getNextRunAtMs } from "./cadence-D00SCzT1.js";
|
|
17
|
-
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-
|
|
18
|
-
import { a as getVercelConversationWorkQueue, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyWorkspaceSnapshotJobMessage, o as resolveConversationWorkQueueTopic, s as verifyConversationQueueMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
19
|
-
import { D as scheduledRunSchema } from "./automation-
|
|
17
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-BAN8BSGy.js";
|
|
18
|
+
import { a as getVercelConversationWorkQueue, g as isConversationQueueMessageRejectedError, h as conversationQueueMessageSchema, i as verifyWorkspaceSnapshotJobMessage, o as resolveConversationWorkQueueTopic, s as verifyConversationQueueMessage, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-C6o2aJQ6.js";
|
|
19
|
+
import { D as scheduledRunSchema } from "./automation-gznOMaQ2.js";
|
|
20
20
|
import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
|
|
21
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
21
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-B4L2Rmiw.js";
|
|
22
22
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
|
|
23
|
-
import { A as
|
|
24
|
-
import {
|
|
25
|
-
import { c as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation } from "./work-
|
|
26
|
-
import { s as coerceThreadConversationState } from "./thread-state-
|
|
27
|
-
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
28
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
29
|
-
import { t as processConversationWork } from "./worker-
|
|
30
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
23
|
+
import { A as withNormalizedThreadId, B as GET$3, C as buildSlackInboundMessage, D as isSlackMessageStopped, E as verifySlackSignature, F as parseContent, I as renderSlackObjectCard, L as createVercelAttachmentStorage, N as THREAD_OPTOUT_ACK, O as stopSlackThread, P as startProcessingReaction, S as recordSkippedConversationMessage, T as runWithSlackInstallation, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as getAuthPausedConversationTurnId, k as normalizeIncomingSlackThreadId, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, v as readViewerAutomationSummary, w as clearSlackPendingReactions, z as enqueueAgentDispatch } from "./web-input---xuox1t.js";
|
|
24
|
+
import { _ as markDispatchFailed, a as confirmDispatchMailboxAppend, d as getPluginDispatchProjection, f as isTerminalDispatchStatus, k as recordAutomationExecution, l as getDispatchRecord, o as createOrGetDispatch, p as listPendingDispatchMailboxAppends, s as getDispatchConversationId, t as processPluginTask, y as notifyAutomationBlocked } from "./task-runner-kLN3HC-_.js";
|
|
25
|
+
import { c as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation } from "./work-G-HdoOSF.js";
|
|
26
|
+
import { s as coerceThreadConversationState } from "./thread-state-CaFRG5Mh.js";
|
|
27
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-DUpSxUum.js";
|
|
28
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-1LP6benz.js";
|
|
29
|
+
import { t as processConversationWork } from "./worker-CDUDfL9P.js";
|
|
30
|
+
import { t as bindSpawnAgent } from "./spawn-BszkFJKJ.js";
|
|
31
31
|
import { createRequire } from "node:module";
|
|
32
32
|
import { Hono } from "hono";
|
|
33
33
|
import { z } from "zod";
|
|
@@ -575,11 +575,16 @@ async function markScheduledRunSkipped(db, args) {
|
|
|
575
575
|
status: "skipped"
|
|
576
576
|
} : void 0);
|
|
577
577
|
}
|
|
578
|
-
/**
|
|
578
|
+
/**
|
|
579
|
+
* Advance a scheduled automation after a terminal run under its task lock.
|
|
580
|
+
* Returns true only when this call set the automation to blocked, so the
|
|
581
|
+
* caller can tell the creator once and only when the dashboard agrees. A
|
|
582
|
+
* paused automation keeps the reason and stays paused.
|
|
583
|
+
*/
|
|
579
584
|
async function advanceScheduledAutomationAfterRun(db, args) {
|
|
580
|
-
await withScheduledAutomationLock(db, args.run.taskId, async (tx) => {
|
|
585
|
+
return await withScheduledAutomationLock(db, args.run.taskId, async (tx) => {
|
|
581
586
|
const current = await readScheduledAutomation(tx, args.run.taskId);
|
|
582
|
-
if (!current || current.status === "deleted" || current.status === "completed") return;
|
|
587
|
+
if (!current || current.status === "deleted" || current.status === "completed") return false;
|
|
583
588
|
if (current.status === "paused") {
|
|
584
589
|
await saveScheduledAutomationInLock(tx, {
|
|
585
590
|
...current,
|
|
@@ -587,7 +592,7 @@ async function advanceScheduledAutomationAfterRun(db, args) {
|
|
|
587
592
|
statusReason: args.status === "blocked" ? args.errorMessage : current.statusReason,
|
|
588
593
|
updatedAtMs: args.nowMs
|
|
589
594
|
}, current);
|
|
590
|
-
return;
|
|
595
|
+
return false;
|
|
591
596
|
}
|
|
592
597
|
if (current.runNowAtMs === args.run.scheduledForMs) {
|
|
593
598
|
let nextRunAtMs = current.nextRunAtMs;
|
|
@@ -605,7 +610,7 @@ async function advanceScheduledAutomationAfterRun(db, args) {
|
|
|
605
610
|
statusReason: args.status === "blocked" ? args.errorMessage : void 0,
|
|
606
611
|
updatedAtMs: args.nowMs
|
|
607
612
|
}, current);
|
|
608
|
-
return;
|
|
613
|
+
return args.status === "blocked";
|
|
609
614
|
}
|
|
610
615
|
if (current.status !== "active" || current.nextRunAtMs !== args.run.scheduledForMs) {
|
|
611
616
|
await saveScheduledAutomationInLock(tx, {
|
|
@@ -613,7 +618,7 @@ async function advanceScheduledAutomationAfterRun(db, args) {
|
|
|
613
618
|
lastRunAtMs: args.run.scheduledForMs,
|
|
614
619
|
updatedAtMs: args.nowMs
|
|
615
620
|
}, current);
|
|
616
|
-
return;
|
|
621
|
+
return false;
|
|
617
622
|
}
|
|
618
623
|
const nextRunAtMs = args.status === "blocked" ? void 0 : getNextRunAtMs(current, args.run.scheduledForMs, args.nowMs);
|
|
619
624
|
await saveScheduledAutomationInLock(tx, {
|
|
@@ -627,6 +632,7 @@ async function advanceScheduledAutomationAfterRun(db, args) {
|
|
|
627
632
|
statusReason: args.status === "blocked" ? args.errorMessage : void 0,
|
|
628
633
|
updatedAtMs: args.nowMs
|
|
629
634
|
}, current);
|
|
635
|
+
return args.status === "blocked";
|
|
630
636
|
});
|
|
631
637
|
}
|
|
632
638
|
//#endregion
|
|
@@ -762,11 +768,16 @@ async function applyDispatchResult(args) {
|
|
|
762
768
|
startedAtMs: args.run.startedAtMs
|
|
763
769
|
});
|
|
764
770
|
if (!blocked) return false;
|
|
765
|
-
await advanceScheduledAutomationAfterRun(args.db, {
|
|
771
|
+
if (await advanceScheduledAutomationAfterRun(args.db, {
|
|
766
772
|
errorMessage: blocked.errorMessage,
|
|
767
773
|
nowMs: args.nowMs,
|
|
768
774
|
run: args.run,
|
|
769
775
|
status: "blocked"
|
|
776
|
+
})) await notifyAutomationBlocked({
|
|
777
|
+
automationId: args.run.taskId,
|
|
778
|
+
dispatchId: args.dispatch.id,
|
|
779
|
+
kind: "scheduled",
|
|
780
|
+
reason: blocked.errorMessage ?? "Dispatch blocked."
|
|
770
781
|
});
|
|
771
782
|
await recordScheduledExecution({
|
|
772
783
|
nowMs: args.nowMs,
|
|
@@ -822,11 +833,15 @@ async function finishClaimedRun(args) {
|
|
|
822
833
|
startedAtMs: args.run.startedAtMs
|
|
823
834
|
});
|
|
824
835
|
if (!finished) return;
|
|
825
|
-
await advanceScheduledAutomationAfterRun(args.db, {
|
|
836
|
+
if (await advanceScheduledAutomationAfterRun(args.db, {
|
|
826
837
|
errorMessage: args.errorMessage,
|
|
827
838
|
nowMs: args.nowMs,
|
|
828
839
|
run: args.run,
|
|
829
840
|
status: args.status
|
|
841
|
+
})) await notifyAutomationBlocked({
|
|
842
|
+
automationId: args.run.taskId,
|
|
843
|
+
kind: "scheduled",
|
|
844
|
+
reason: args.errorMessage
|
|
830
845
|
});
|
|
831
846
|
await recordScheduledExecution({
|
|
832
847
|
nowMs: args.nowMs,
|
|
@@ -2448,6 +2463,46 @@ async function handleSlackThreadStop(args) {
|
|
|
2448
2463
|
});
|
|
2449
2464
|
await thread.post(THREAD_OPTOUT_ACK);
|
|
2450
2465
|
}
|
|
2466
|
+
/** Acknowledge a native Slack stop that interrupted active work. */
|
|
2467
|
+
const SLACK_SESSION_STOP_ACK = "Stopped.";
|
|
2468
|
+
/**
|
|
2469
|
+
* Stop the active Turn when a user clicks Slack's native agent stop button.
|
|
2470
|
+
*
|
|
2471
|
+
* Unlike the `stop` keyword, this only interrupts current work. The thread
|
|
2472
|
+
* stays subscribed and resource watches stay active. Slack does not leave the
|
|
2473
|
+
* `processing` status by itself, so clear the status even when no work runs.
|
|
2474
|
+
* https://docs.slack.dev/reference/events/agent_session_stopped
|
|
2475
|
+
*/
|
|
2476
|
+
async function handleSlackSessionStop(args) {
|
|
2477
|
+
const canonicalThreadId = `slack:${args.channelId}:${args.threadTs}`;
|
|
2478
|
+
const stopped = await stopConversationTurn({
|
|
2479
|
+
conversationId: await resolveSlackConversationId({
|
|
2480
|
+
canonicalThreadId,
|
|
2481
|
+
conversationStore: args.conversationStore,
|
|
2482
|
+
installation: args.installation
|
|
2483
|
+
}),
|
|
2484
|
+
conversationStore: args.conversationStore,
|
|
2485
|
+
queue: args.queue,
|
|
2486
|
+
state: args.state
|
|
2487
|
+
});
|
|
2488
|
+
await createSlackWebApiStatusSender({
|
|
2489
|
+
channelId: args.channelId,
|
|
2490
|
+
threadTs: args.threadTs
|
|
2491
|
+
})("");
|
|
2492
|
+
if (stopped.status !== "requested") return;
|
|
2493
|
+
await clearSlackPendingReactions({
|
|
2494
|
+
getSlackAdapter: () => args.adapter,
|
|
2495
|
+
messages: stopped.pendingMessages,
|
|
2496
|
+
state: args.state
|
|
2497
|
+
});
|
|
2498
|
+
await new ThreadImpl({
|
|
2499
|
+
adapter: args.adapter,
|
|
2500
|
+
stateAdapter: args.state,
|
|
2501
|
+
id: canonicalThreadId,
|
|
2502
|
+
channelId: args.adapter.channelIdFromThreadId(canonicalThreadId),
|
|
2503
|
+
isDM: args.adapter.isDM(canonicalThreadId)
|
|
2504
|
+
}).post(SLACK_SESSION_STOP_ACK);
|
|
2505
|
+
}
|
|
2451
2506
|
async function routeParsedMessage(args) {
|
|
2452
2507
|
if (shouldIgnoreMessage(args.message)) return;
|
|
2453
2508
|
const normalized = normalizeMessageThreadId(args.message);
|
|
@@ -2565,6 +2620,24 @@ async function handleSlackEvent(args) {
|
|
|
2565
2620
|
await publishAppHomeViewBestEffort(event.user);
|
|
2566
2621
|
return;
|
|
2567
2622
|
}
|
|
2623
|
+
if (event.type === "agent_session_stopped" && event.channel && event.thread_ts) {
|
|
2624
|
+
if (!await isSlackWorkspaceMember(event, state)) return;
|
|
2625
|
+
const channelId = event.channel;
|
|
2626
|
+
const threadTs = event.thread_ts;
|
|
2627
|
+
if (!(await withLock$1(state, `slack:ingress:slack:${channelId}:${threadTs}`, () => handleSlackSessionStop({
|
|
2628
|
+
adapter,
|
|
2629
|
+
channelId,
|
|
2630
|
+
conversationStore: args.services.conversationStore,
|
|
2631
|
+
installation,
|
|
2632
|
+
queue: args.services.queue,
|
|
2633
|
+
state,
|
|
2634
|
+
threadTs
|
|
2635
|
+
}), {
|
|
2636
|
+
keepAlive: true,
|
|
2637
|
+
waitMs: 1e4
|
|
2638
|
+
})).acquired) throw new Error("Could not acquire Slack ingress lock");
|
|
2639
|
+
return;
|
|
2640
|
+
}
|
|
2568
2641
|
if ((event.type === "message" || event.type === "app_mention") && !shouldIgnoreMessageSubtype(event) && event.channel && event.ts) {
|
|
2569
2642
|
const member = await isSlackWorkspaceMember(event, state);
|
|
2570
2643
|
setSpanAttributes({ "app.slack.membership": member ? "verified" : "unverified" });
|
|
@@ -431,7 +431,12 @@ const eventAutomationSummarySchema = automationSummaryBaseSchema.extend({
|
|
|
431
431
|
resource: z.string().min(1),
|
|
432
432
|
source: z.string().min(1),
|
|
433
433
|
triggerAvailable: z.boolean(),
|
|
434
|
-
|
|
434
|
+
statusReason: z.string().optional(),
|
|
435
|
+
status: z.enum([
|
|
436
|
+
"active",
|
|
437
|
+
"blocked",
|
|
438
|
+
"paused"
|
|
439
|
+
])
|
|
435
440
|
}).strict();
|
|
436
441
|
const automationSummarySchema = z.discriminatedUnion("kind", [scheduledAutomationSummarySchema, eventAutomationSummarySchema]);
|
|
437
442
|
/** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) execution bucket key. */
|
|
@@ -615,7 +620,11 @@ const automationEditSchema = z.discriminatedUnion("kind", [automationEditBaseSch
|
|
|
615
620
|
kind: z.literal("event"),
|
|
616
621
|
trigger: eventAutomationTriggerSchema,
|
|
617
622
|
triggerAvailable: z.boolean(),
|
|
618
|
-
status: z.enum([
|
|
623
|
+
status: z.enum([
|
|
624
|
+
"active",
|
|
625
|
+
"blocked",
|
|
626
|
+
"paused"
|
|
627
|
+
])
|
|
619
628
|
}).strict()]);
|
|
620
629
|
/** Partial edits require the revision returned by the edit read. */
|
|
621
630
|
const automationUpdateSchema = z.discriminatedUnion("kind", [scheduledAutomationEditSchema.omit({ status: true }).extend({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as completeObject } from "./client-
|
|
1
|
+
import { r as completeObject } from "./client-CRZ-i1tH.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
3
3
|
import { B as parseBriefInput, I as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-DwD-vquD.js";
|
|
4
4
|
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-CMU-B4FA.js";
|
|
@@ -269,7 +269,7 @@ async function parseRunOptions(argv) {
|
|
|
269
269
|
* `DATABASE_URL` at import, and `briefs pull` must work with only a token.
|
|
270
270
|
*/
|
|
271
271
|
async function configuredDefaultModelId() {
|
|
272
|
-
const { botConfig } = await import("./config-
|
|
272
|
+
const { botConfig } = await import("./config-CCI82OTD.js").then((n) => n.r);
|
|
273
273
|
return defaultModelId(botConfig);
|
|
274
274
|
}
|
|
275
275
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-DPDH6s5G.js";
|
|
3
3
|
//#region src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-CMZ6lFQe.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -100,10 +100,10 @@ async function loadLocalPluginSet() {
|
|
|
100
100
|
async function configureLocalChatPlugins(pluginSet) {
|
|
101
101
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
102
102
|
import("../plugins-egKWjgue.js").then((n) => n.o),
|
|
103
|
-
import("../agent-hooks-
|
|
104
|
-
import("../catalog-runtime-
|
|
105
|
-
import("../validation-
|
|
106
|
-
import("../viewer-
|
|
103
|
+
import("../agent-hooks-C5zYOaJk.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-Tz0O2MZe.js").then((n) => n.t),
|
|
105
|
+
import("../validation-B4L2Rmiw.js").then((n) => n.r),
|
|
106
|
+
import("../viewer-D6stAU7h.js").then((n) => n.s)
|
|
107
107
|
]);
|
|
108
108
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
109
109
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -155,16 +155,16 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
155
155
|
await configureLocalChatPlugins(pluginSet);
|
|
156
156
|
const { setExperimentalFeatures } = await import("../experimental-Qn9rKLgx.js").then((n) => n.t);
|
|
157
157
|
setExperimentalFeatures({ subagents: true });
|
|
158
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
158
|
+
const { setBriefsConfig } = await import("../agent-hooks-C5zYOaJk.js").then((n) => n.m);
|
|
159
159
|
setBriefsConfig({ enabled: true });
|
|
160
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
161
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
160
|
+
const { runLocalAgentTurn } = await import("../runner-CqXZJfzk.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DcYAJSEz.js");
|
|
162
162
|
const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
|
|
163
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
164
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
165
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
163
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DFUUokws.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-BszkFJKJ.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-G-HdoOSF.js").then((n) => n.a);
|
|
166
166
|
const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
|
|
167
|
-
const { processConversationWork } = await import("../worker-
|
|
167
|
+
const { processConversationWork } = await import("../worker-CDUDfL9P.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 { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-
|
|
2
|
-
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-LQnLlPf8.js";
|
|
2
|
+
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-DPDH6s5G.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-BtHhSATy.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,10 +25,10 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runAdmin(argv) {
|
|
28
|
-
return await (await import("../admin-
|
|
28
|
+
return await (await import("../admin-CJkjl-aN.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runBriefs(argv) {
|
|
31
|
-
return await (await import("../briefs-
|
|
31
|
+
return await (await import("../briefs-CsQbFjRi.js")).runBriefs(argv);
|
|
32
32
|
}
|
|
33
33
|
function topLevelCommand(argv) {
|
|
34
34
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as getDb } from "../viewer-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { d as setPlugins, f as validatePlugins,
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { d as getDb } from "../viewer-D6stAU7h.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-Tz0O2MZe.js";
|
|
3
|
+
import { d as setPlugins, f as validatePlugins, lt as createPluginLogger } from "../agent-hooks-C5zYOaJk.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-B4L2Rmiw.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { S as disconnectStateAdapter, t as create } from "../profile-
|
|
3
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-Tz0O2MZe.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-mWuVZ8ht.js";
|
|
3
|
+
import { r as resolve } from "../resolve-BAN8BSGy.js";
|
|
4
4
|
//#region src/cli/snapshot-create.ts
|
|
5
5
|
const DEFAULT_RUNTIME = "node22";
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { i as getChatConfig } from "../config-CCI82OTD.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-CewKi7EG.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-DPDH6s5G.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-LQnLlPf8.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-D5Byl5eC.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-
|
|
3
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-CRZ-i1tH.js";
|
|
3
|
+
import { p as logWarn } from "./logging-LQnLlPf8.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
|
|
5
5
|
//#region src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|