@sentry/junior 0.246.0 → 0.247.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-Bh-MYw-j.js → admin-BGwaqDMs.js} +1 -1
- package/dist/{agent-hooks-DpklSWZg.js → agent-hooks-C72ByH0C.js} +11 -11
- package/dist/{agent-invocations-BO6ddZax.js → agent-invocations-D_YoNnAn.js} +8 -2
- package/dist/{agent-runner-DSKpHjHW.js → agent-runner-DsAFAKKs.js} +451 -2412
- package/dist/api/schema.js +2 -2
- package/dist/api.js +24 -21
- package/dist/{app-BYB7szGb.d.ts → app-4t4mPTdS.d.ts} +8 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +30 -27
- package/dist/assistant-reply-ChOzcTBS.js +45 -0
- package/dist/{briefs-cZ5vWqP_.js → briefs-Dc7qZrhc.js} +4 -4
- package/dist/{catalog-runtime-CTaQXYqS.js → catalog-runtime-DS1k7fUG.js} +1 -1
- package/dist/cli/chat.js +22 -16
- 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--xtsAxKP.js → client-BVnfNd3D.js} +2 -2
- package/dist/{config-BK53Ip5C.js → config-CgWvImQL.js} +2 -2
- package/dist/{conversation-CvBG57Io.js → conversation-CYsbVFLx.js} +71 -1
- package/dist/{conversation-privacy-BDBFw6Ws.js → conversation-privacy-D3TdVM9H.js} +1 -1
- package/dist/{credential-sync-BiuhC9Ds.js → credential-sync-DLw3jkv-.js} +14 -14
- package/dist/{executor-bmmuRY-w.js → executor-DQazjeGA.js} +3 -3
- package/dist/{images-DZliDtSH.js → images-C3e5E-p_.js} +4 -21
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-Cz3M7gg4.js → job-queue-BEUqRhjC.js} +1 -1
- package/dist/{logging-DVtMYOdD.js → logging-CZEc8_v4.js} +1 -1
- package/dist/message-BIJa7lKh.js +59 -0
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-By_MVRDC.js → oauth-authorization-BA4Dt6a7.js} +1 -45
- package/dist/{oauth-callback-server-BrUo6w1e.js → oauth-callback-server-R9OSdLP1.js} +2 -2
- package/dist/{pending-auth-BuQLZ6dK.js → pending-auth-Oo5AQhaf.js} +2 -2
- package/dist/{profile-BevMNSlr.js → profile-aVLDAirh.js} +4 -4
- package/dist/{prompt-C9Q9cjD3.js → prompt-ZG1UCxjF.js} +1 -1
- package/dist/{registry-C2rSEio1.js → registry-CtaDOOM5.js} +1 -1
- package/dist/{resolve-qPhrznTf.js → resolve-Bdw4hu7s.js} +2 -2
- package/dist/result-DNgmkASh.js +463 -0
- package/dist/{runner-CNh5eMWx.js → runner-BUSScEu5.js} +11 -10
- package/dist/{sandbox-egress-signals-BnDEKu8d.js → sandbox-egress-signals-E9r8bf9G.js} +1 -1
- package/dist/{schema-BWMRg8JS.js → schema-tyd6hALh.js} +2 -2
- package/dist/session-stop-CAhBfBUT.js +782 -0
- package/dist/{skills-C6zJbudq.js → skills-DQy-mmBC.js} +2 -2
- package/dist/{spawn-C3efZSx3.js → spawn-DQ_MVWZ6.js} +3 -2
- package/dist/store-DjLA8GKs.js +1417 -0
- package/dist/{task-queue-BX4vG6uA.js → task-queue-BT2h_t8I.js} +3 -3
- package/dist/{task-runner-T51kll0U.js → task-runner-CiPepjIB.js} +11 -11
- package/dist/{tasks-B9OIjl2K.js → tasks-DMmRrIVl.js} +9 -9
- package/dist/{thread-state-AGZtVyXp.js → thread-state-ehZYGpX9.js} +7 -7
- package/dist/{turn-failure-response-DJ8KU2bo.js → turn-failure-response-D7J10z7l.js} +9 -9
- package/dist/{turn-lifecycle-DZJkJ95q.js → turn-lifecycle-Buswqs90.js} +1 -1
- package/dist/{turn-session-routing-mRqLbMZW.js → turn-session-routing-Bw-yiSb4.js} +1 -1
- package/dist/{validation-Dg0Ihxzo.js → validation-DTguegIe.js} +1 -1
- package/dist/{version-Deub4try.js → version-BrZSE5du.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-D5hbx6TE.js → viewer-BlAozHer.js} +4 -4
- package/dist/{web-authorization-DCxixz5S.js → web-authorization-DwyTlkAg.js} +6 -6
- package/dist/{web-input-0sorYVLh.js → web-input-DSYxI7Wi.js} +43 -208
- package/dist/{work-rm2X7jj4.js → work-CRBXkJoU.js} +89 -13
- package/dist/{worker-bnGsAOP3.js → worker-BVJKM9Ja.js} +7 -7
- package/migrations/0053_conversation_stopped_at.sql +1 -0
- package/migrations/0054_flowery_rage.sql +1 -0
- package/migrations/meta/0053_snapshot.json +3771 -0
- package/migrations/meta/0054_snapshot.json +3777 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +6 -5
- package/dist/message-BSN-Ma5f.js +0 -317
package/dist/api/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureCodeSchema } from "../history-Nte1oVed.js";
|
|
2
|
-
import { A as forkConversationBodySchema, C as conversationReportEventSchema, E as conversationSummaryReportSchema, F as INPUT_IMAGE_TYPES, M as MAX_INPUT_IMAGES, N as MAX_INPUT_IMAGE_BYTES, O as createConversationBodySchema, S as conversationReportEventDataSchema, T as conversationStatsReportSchema,
|
|
2
|
+
import { A as forkConversationBodySchema, C as conversationReportEventSchema, E as conversationSummaryReportSchema, F as INPUT_IMAGE_TYPES, G as messageCardText, J as resolveMessageCards, M as MAX_INPUT_IMAGES, N as MAX_INPUT_IMAGE_BYTES, O as createConversationBodySchema, S as conversationReportEventDataSchema, T as conversationStatsReportSchema, _ 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 forkConversationResponseSchema, k as createConversationMessageBodySchema, 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-CYsbVFLx.js";
|
|
3
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 conversationChildAgentSchema, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, O as codeActivityDaySchema, P as codeRepositoryReportSchema, R as stopConversationTurnResponseSchema, 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, z as apiErrorSchema } from "../schema-
|
|
5
|
+
import { A as codeChangeSummarySchema, C as locationParamsSchema, D as dailyConversationActivitySchema, F as codeRepositorySummarySchema, I as conversationChildAgentSchema, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, O as codeActivityDaySchema, P as codeRepositoryReportSchema, R as stopConversationTurnResponseSchema, 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, z as apiErrorSchema } from "../schema-tyd6hALh.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, conversationChildAgentSchema, conversationChildAgentsReportSchema, 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, stopConversationTurnResponseSchema, webMessageId, workspaceBodySchema, workspaceListSchema, workspaceParamsSchema, workspaceRepoSchema, workspaceSchema };
|
package/dist/api.js
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as logException, p as logWarn } from "./logging-
|
|
1
|
+
import { K as listChildAgents, L as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, R as AutomationEditError, T as readLiveAttachment, V as resolveTaskOutcomes, g as readStats, ot as getChildAgentLabel, z as eventAutomationTriggerAvailable } from "./agent-runner-DsAFAKKs.js";
|
|
2
|
+
import { d as logException, p as logWarn } from "./logging-CZEc8_v4.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-
|
|
5
|
-
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-
|
|
6
|
-
import { _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, g as juniorConversationMetrics, m as juniorConversationBriefs, v as juniorApiTokens, x as juniorCodeRepositories } from "./executor-
|
|
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-BlAozHer.js";
|
|
5
|
+
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
6
|
+
import { _ as juniorConversationEvents, b as juniorCodeChanges, f as juniorConversationParticipants, g as juniorConversationMetrics, m as juniorConversationBriefs, v as juniorApiTokens, x as juniorCodeRepositories } from "./executor-DQazjeGA.js";
|
|
7
7
|
import { u as contextProvenance } from "./history-Nte1oVed.js";
|
|
8
|
-
import { A as requireAutomationRevision, D as sameDefinitionValue, E as readAutomationVersion, O as AutomationConflictError, Ot as loadTurnProjection, a as readScheduledAutomation, b as saveEventAutomation, dn as piMessageFromHistoryItem, g as getEventAutomation, k as automationRevision, m as eventAutomationBelongsToUser, o as saveScheduledAutomation, w as automationDefinition, x as setEventAutomationStatus } from "./tasks-
|
|
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-
|
|
10
|
-
import { A as forkConversationBodySchema, F as INPUT_IMAGE_TYPES, O as createConversationBodySchema, P as readMessageAttachments, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-
|
|
11
|
-
import { n as hash, t as create } from "./profile-
|
|
8
|
+
import { A as requireAutomationRevision, D as sameDefinitionValue, E as readAutomationVersion, O as AutomationConflictError, Ot as loadTurnProjection, a as readScheduledAutomation, b as saveEventAutomation, dn as piMessageFromHistoryItem, g as getEventAutomation, k as automationRevision, m as eventAutomationBelongsToUser, o as saveScheduledAutomation, w as automationDefinition, x as setEventAutomationStatus } from "./tasks-DMmRrIVl.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-C72ByH0C.js";
|
|
10
|
+
import { A as forkConversationBodySchema, F as INPUT_IMAGE_TYPES, O as createConversationBodySchema, P as readMessageAttachments, T as conversationStatsReportSchema, _ as conversationParamsSchema, a as cancelConversationPendingMessagesBodySchema, c as conversationAttachmentParamsSchema, d as conversationDetailReportSchema, g as conversationFeedSchema, h as conversationFeedQuerySchema, i as archiveConversationResponseSchema, j as forkConversationResponseSchema, k as createConversationMessageBodySchema, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-CYsbVFLx.js";
|
|
11
|
+
import { n as hash, t as create } from "./profile-aVLDAirh.js";
|
|
12
|
+
import { l as getEventCatalog, v as automationEventCatalog } from "./session-stop-CAhBfBUT.js";
|
|
12
13
|
import { t as getFirstRunAtMs } from "./cadence-D00SCzT1.js";
|
|
13
|
-
import { t as getCachedSnapshot } from "./resolve-
|
|
14
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
14
|
+
import { t as getCachedSnapshot } from "./resolve-Bdw4hu7s.js";
|
|
15
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-BEUqRhjC.js";
|
|
16
|
+
import { a as cancelHumanFacingPendingMessages, h as getConversation } from "./store-DjLA8GKs.js";
|
|
15
17
|
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
18
|
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 conversationActiveDaysColumn, M as conversationRangeColumns, j as conversationAggregateColumns } from "./task-runner-
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
19
|
+
import { B as readHealthReport, I as createVercelAttachmentStorage, _ as readViewerAutomationRuns, a as recordWebConversationActivity, b as readViewerAutomations, d as resolveSlackConversationContextFromThreadId, g as readViewerAutomationExecutions, h as readConversationSourceTask, i as createConversationId, j as stopConversationTurn, 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-DSYxI7Wi.js";
|
|
20
|
+
import { A as conversationActiveDaysColumn, M as conversationRangeColumns, j as conversationAggregateColumns } from "./task-runner-CiPepjIB.js";
|
|
21
|
+
import { d as legacyWebMailboxMetadataSchema } from "./result-DNgmkASh.js";
|
|
22
|
+
import { r as getWebAuthorization } from "./web-authorization-DwyTlkAg.js";
|
|
23
|
+
import { t as decodeInputImages } from "./images-C3e5E-p_.js";
|
|
24
|
+
import { C as locationParamsSchema, E as activitySixHours$1, L as conversationChildAgentsReportSchema, M as codePersonReportSchema, N as codeRepositoryParamsSchema, P as codeRepositoryReportSchema, R as stopConversationTurnResponseSchema, 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, z as apiErrorSchema } from "./schema-tyd6hALh.js";
|
|
22
25
|
import { Hono } from "hono";
|
|
23
26
|
import path from "node:path";
|
|
24
27
|
import { z } from "zod";
|
|
@@ -3515,7 +3518,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3515
3518
|
reports: [],
|
|
3516
3519
|
source: "plugins"
|
|
3517
3520
|
});
|
|
3518
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
3521
|
+
const { getPluginProfileReports } = await import("./agent-hooks-C72ByH0C.js").then((n) => n.t);
|
|
3519
3522
|
return pluginOperationalReportFeedSchema.parse({
|
|
3520
3523
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3521
3524
|
reports: await getPluginProfileReports({
|
|
@@ -4483,7 +4486,7 @@ function readDescriptionText(home) {
|
|
|
4483
4486
|
}
|
|
4484
4487
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
4485
4488
|
async function readSkillReports() {
|
|
4486
|
-
const { discoverSkills } = await import("./skills-
|
|
4489
|
+
const { discoverSkills } = await import("./skills-DQy-mmBC.js").then((n) => n.o);
|
|
4487
4490
|
const skills = await discoverSkills();
|
|
4488
4491
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
4489
4492
|
name: skill.name,
|
|
@@ -4492,7 +4495,7 @@ async function readSkillReports() {
|
|
|
4492
4495
|
}
|
|
4493
4496
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
4494
4497
|
async function readPlugins() {
|
|
4495
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4498
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-DS1k7fUG.js").then((n) => n.t);
|
|
4496
4499
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4497
4500
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
4498
4501
|
description: plugin.manifest.description,
|
|
@@ -4504,7 +4507,7 @@ async function readPlugins() {
|
|
|
4504
4507
|
async function readRuntimeInfoReport() {
|
|
4505
4508
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4506
4509
|
import("./package-discovery-BVvSnQBB.js").then((n) => n.r),
|
|
4507
|
-
import("./catalog-runtime-
|
|
4510
|
+
import("./catalog-runtime-DS1k7fUG.js").then((n) => n.t),
|
|
4508
4511
|
readPlugins(),
|
|
4509
4512
|
readSkillReports()
|
|
4510
4513
|
]);
|
|
@@ -4521,7 +4524,7 @@ async function readRuntimeInfoReport() {
|
|
|
4521
4524
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
4522
4525
|
async function readPluginOperationalReportFeed() {
|
|
4523
4526
|
const nowMs = Date.now();
|
|
4524
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4527
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-C72ByH0C.js").then((n) => n.t);
|
|
4525
4528
|
return pluginOperationalReportFeedSchema.parse({
|
|
4526
4529
|
source: "plugins",
|
|
4527
4530
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -155,7 +155,14 @@ interface InboxAttempt {
|
|
|
155
155
|
ack(): Promise<void>;
|
|
156
156
|
conversationId: string;
|
|
157
157
|
destination?: Destination;
|
|
158
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Give pending mailbox messages to the active Turn. By default only
|
|
160
|
+
* `interrupt` messages for this attempt are offered. With `deferred`, every
|
|
161
|
+
* pending message is offered, and the handler owns Actor and Source scoping.
|
|
162
|
+
*/
|
|
163
|
+
drain(handle: (messages: InboundMessage[]) => Promise<readonly string[] | void>, options?: {
|
|
164
|
+
deferred?: boolean;
|
|
165
|
+
}): Promise<InboundMessage[]>;
|
|
159
166
|
isFinalAttempt: boolean;
|
|
160
167
|
messages: InboundMessage[];
|
|
161
168
|
}
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-
|
|
1
|
+
import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-4t4mPTdS.js";
|
|
2
2
|
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-CjfUP5gJ.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-CnXZ614E.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };
|
package/dist/app.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
|
-
import {
|
|
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 { B as effectiveTaskOutcomes, Ct as normalizeSandboxEgressTracePropagationDomains, Dt as consumeSandboxEgressAuthRequiredSignal, E as requestAttachmentDeletion, Et as clearSandboxEgressSignals, F as logScheduledAutomationRunSkipped, Ft as createUserTokenStore, Gt as setConfigDefaults, I as scheduledAutomationRunAttributes, O as parseSlackThreadId, Ot as consumeSandboxEgressPermissionDeniedSignal, Pt as startOAuthFlow, St as resolveSandboxEgressProviderForHost, Tt as SANDBOX_EGRESS_PROXY_PATH, U as stopConversationSession, W as recordSubagentEnded, Wt as getConfigDefaults, b as unpublishedArtifactHeaders, bt as processWorkspaceSnapshotJob, c as deleteMcpAuthSessionsForUserProvider, i as executeCredentialedEgressRequest, jt as formatProviderLabel, kt as parseSandboxEgressCredentialToken, l as deleteMcpServerSessionId, lt as listPendingAgentInvocationMailboxAppends, n as executeAgentRun, t as createAgentRunner, u as deleteMcpStoredOAuthCredentials, ut as listPendingAgentInvocationResults, v as publicArtifactHeaders, w as collectAttachmentGarbage, wt as shouldPropagateSandboxEgressTrace, x as lookupSlackUserProfile, xt as ingestEvent, y as readPublicArtifact } from "./agent-runner-DsAFAKKs.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-CZEc8_v4.js";
|
|
3
3
|
import { n as captureMessage, 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-BrZSE5du.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-CgWvImQL.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-
|
|
8
|
-
import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-
|
|
9
|
-
import { _ as juniorConversationEvents, a as juniorSchedulerRuns, m as juniorConversationBriefs, o as juniorSchedulerTasks } from "./executor-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
import { C as eventAutomationRunLimitReason, F as slackMention, G as slackExternalRefIdSchema, S as admitEventAutomationRun, Vt as appendConversationMessages, W as slackEntitySchema, Wt as projectConversationMessages, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, qt as settleConversationTitleWork, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock, u as blockEventAutomation } from "./tasks-
|
|
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,
|
|
13
|
-
import {
|
|
14
|
-
import { O as withLock$1, w as getStateAdapter } from "./profile-
|
|
15
|
-
import { c as getThreadStopDecision } from "./pending-auth-
|
|
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-BlAozHer.js";
|
|
8
|
+
import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
9
|
+
import { _ as juniorConversationEvents, a as juniorSchedulerRuns, m as juniorConversationBriefs, o as juniorSchedulerTasks } from "./executor-DQazjeGA.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DS1k7fUG.js";
|
|
11
|
+
import { C as eventAutomationRunLimitReason, F as slackMention, G as slackExternalRefIdSchema, S as admitEventAutomationRun, Vt as appendConversationMessages, W as slackEntitySchema, Wt as projectConversationMessages, a as readScheduledAutomation, c as scheduledRunId, d as collectEventAutomationMatchKeys, h as findMatchingEventAutomations, l as withScheduledAutomationLock, n as listScheduledAutomations, qt as settleConversationTitleWork, r as listScheduledAutomationsForTeam, s as saveScheduledAutomationInLock, u as blockEventAutomation } from "./tasks-DMmRrIVl.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, zt as getSlackClient } from "./agent-hooks-C72ByH0C.js";
|
|
13
|
+
import { U as annotationCard } from "./conversation-CYsbVFLx.js";
|
|
14
|
+
import { O as withLock$1, w as getStateAdapter } from "./profile-aVLDAirh.js";
|
|
15
|
+
import { c as getThreadStopDecision } from "./pending-auth-Oo5AQhaf.js";
|
|
16
|
+
import { O as renderTaskInput, f as slackChannelMessageEvent, l as getEventCatalog, p as slackChannelMessageReplyThreadTs, u as SLACK_EVENT_NAMESPACE, y as eventGuidance } from "./session-stop-CAhBfBUT.js";
|
|
16
17
|
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-
|
|
18
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-Bdw4hu7s.js";
|
|
19
|
+
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-BEUqRhjC.js";
|
|
20
|
+
import { A as hasRunnableConversationWork$1, M as isInvalidConversationRecordError, O as CONVERSATION_WORK_STALE_ENQUEUE_MS, S as removeActiveConversation, _ as hasRunnableConversationWork, c as clearExpiredConversationLease, g as getConversationWorkState, h as getConversation, m as ensureConversationWake, r as appendAndEnqueueInboundMessage, v as listActiveConversationIds } from "./store-DjLA8GKs.js";
|
|
19
21
|
import { D as scheduledRunSchema } from "./automation-gznOMaQ2.js";
|
|
20
22
|
import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
|
|
21
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
23
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-DTguegIe.js";
|
|
22
24
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
|
|
23
|
-
import { A as withNormalizedThreadId,
|
|
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-
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
29
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
30
|
-
import { t as processConversationWork } from "./worker-
|
|
31
|
-
import { t as
|
|
25
|
+
import { A as withNormalizedThreadId, C as buildSlackInboundMessage, D as isSlackMessageStopped, E as verifySlackSignature, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as THREAD_OPTOUT_ACK, N as startProcessingReaction, O as stopSlackThread, P as parseContent, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as runWithSlackInstallation, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as stopConversationTurn, 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 GET$3 } from "./web-input-DSYxI7Wi.js";
|
|
26
|
+
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-CiPepjIB.js";
|
|
27
|
+
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-DNgmkASh.js";
|
|
28
|
+
import { r as enqueueAgentInvocation } from "./work-CRBXkJoU.js";
|
|
29
|
+
import { s as coerceThreadConversationState } from "./thread-state-ehZYGpX9.js";
|
|
30
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-DLw3jkv-.js";
|
|
31
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BT2h_t8I.js";
|
|
32
|
+
import { t as processConversationWork } from "./worker-BVJKM9Ja.js";
|
|
33
|
+
import { t as bindMessageAgent } from "./message-BIJa7lKh.js";
|
|
34
|
+
import { t as bindSpawnAgent } from "./spawn-DQ_MVWZ6.js";
|
|
32
35
|
import { createRequire } from "node:module";
|
|
33
36
|
import { Hono } from "hono";
|
|
34
37
|
import { z } from "zod";
|
|
@@ -2514,7 +2517,7 @@ async function persistSlackMessage(args) {
|
|
|
2514
2517
|
});
|
|
2515
2518
|
}
|
|
2516
2519
|
/**
|
|
2517
|
-
* Interrupt the active Run,
|
|
2520
|
+
* Interrupt the active Run, stop the session, unsubscribe, and record
|
|
2518
2521
|
* the stop message in history. Stop input never enters the mailbox, so a
|
|
2519
2522
|
* mention-route stop cannot resubscribe the thread by starting a new Turn.
|
|
2520
2523
|
*
|
|
@@ -2549,7 +2552,7 @@ async function handleSlackThreadStop(args) {
|
|
|
2549
2552
|
messages: work?.execution.pendingMessages ?? [],
|
|
2550
2553
|
state: args.state
|
|
2551
2554
|
});
|
|
2552
|
-
await
|
|
2555
|
+
await stopConversationSession({
|
|
2553
2556
|
conversationId,
|
|
2554
2557
|
state: args.state
|
|
2555
2558
|
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ot as extractAssistantText } from "./tasks-DMmRrIVl.js";
|
|
2
|
+
//#region src/chat/no-reply.ts
|
|
3
|
+
const NO_REPLY_MARKER = "[[NO_REPLY]]";
|
|
4
|
+
/**
|
|
5
|
+
* True when one assistant message ends with the silence marker.
|
|
6
|
+
* Mid-sentence mentions do not match. Detection is per message only.
|
|
7
|
+
*/
|
|
8
|
+
function isNoReplyMarker(text) {
|
|
9
|
+
return text.trimEnd().endsWith(NO_REPLY_MARKER);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/chat/services/assistant-reply.ts
|
|
13
|
+
const THINKING_XML_BLOCK_PATTERN = /[ \t]*<thinking\b[^>]*>[\s\S]*?<\/thinking>[ \t]*(?:\r?\n)?/gi;
|
|
14
|
+
const FENCED_CODE_BLOCK_PATTERN = /```[\s\S]*?```/g;
|
|
15
|
+
/** Remove provider reasoning wrappers while preserving fenced code examples. */
|
|
16
|
+
function sanitizeAssistantText(text) {
|
|
17
|
+
let result = "";
|
|
18
|
+
let cursor = 0;
|
|
19
|
+
for (const match of text.matchAll(FENCED_CODE_BLOCK_PATTERN)) {
|
|
20
|
+
const start = match.index;
|
|
21
|
+
if (start === void 0) continue;
|
|
22
|
+
result += text.slice(cursor, start).replace(THINKING_XML_BLOCK_PATTERN, "");
|
|
23
|
+
result += match[0];
|
|
24
|
+
cursor = start + match[0].length;
|
|
25
|
+
}
|
|
26
|
+
return (result + text.slice(cursor).replace(THINKING_XML_BLOCK_PATTERN, "")).trim();
|
|
27
|
+
}
|
|
28
|
+
/** Decide whether one completed assistant message becomes a reply. */
|
|
29
|
+
function decideReply(message) {
|
|
30
|
+
if (message.content.some((part) => part.type === "toolCall")) return { kind: "suppress" };
|
|
31
|
+
const text = sanitizeAssistantText(extractAssistantText(message));
|
|
32
|
+
if (!text) return { kind: "empty" };
|
|
33
|
+
if (isNoReplyMarker(text)) return { kind: "suppress" };
|
|
34
|
+
return {
|
|
35
|
+
kind: "deliver",
|
|
36
|
+
text
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** Return destination-visible reply text when the message is deliverable. */
|
|
40
|
+
function getAssistantReplyText(message) {
|
|
41
|
+
const decision = decideReply(message);
|
|
42
|
+
return decision.kind === "deliver" ? decision.text : void 0;
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { isNoReplyMarker as a, NO_REPLY_MARKER as i, getAssistantReplyText as n, sanitizeAssistantText as r, decideReply as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as completeObject } from "./client
|
|
1
|
+
import { r as completeObject } from "./client-BVnfNd3D.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
3
|
+
import { H as parseBriefInput, R as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-CYsbVFLx.js";
|
|
4
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-ZG1UCxjF.js";
|
|
5
5
|
import { CLI_USAGE } from "./cli/run.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { z } from "zod";
|
|
@@ -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-CgWvImQL.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-CtaDOOM5.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-DsAFAKKs.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-C72ByH0C.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-DS1k7fUG.js").then((n) => n.t),
|
|
105
|
+
import("../validation-DTguegIe.js").then((n) => n.r),
|
|
106
|
+
import("../viewer-BlAozHer.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,23 +155,29 @@ 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-C72ByH0C.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-BUSScEu5.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-R9OSdLP1.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 { bindMessageAgent } = await import("../message-
|
|
166
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
163
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-E9r8bf9G.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-DQ_MVWZ6.js").then((n) => n.n);
|
|
165
|
+
const { bindMessageAgent } = await import("../message-BIJa7lKh.js").then((n) => n.n);
|
|
166
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-CRBXkJoU.js").then((n) => n.a);
|
|
167
|
+
const { startAgentInvocationsForChildInput } = await import("../result-DNgmkASh.js").then((n) => n.r);
|
|
168
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-CAhBfBUT.js").then((n) => n.r);
|
|
167
169
|
const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
|
|
168
|
-
const { processConversationWork } = await import("../worker-
|
|
170
|
+
const { processConversationWork } = await import("../worker-BVJKM9Ja.js").then((n) => n.n);
|
|
169
171
|
let agentRunner;
|
|
170
172
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
171
173
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
|
172
174
|
const run = routeAgentInvocationWork({
|
|
173
|
-
fallbackWorker: async () => {
|
|
174
|
-
|
|
175
|
+
fallbackWorker: async (context) => {
|
|
176
|
+
const skipped = await skipInputBeforeConversationStop(context);
|
|
177
|
+
if (skipped) return skipped;
|
|
178
|
+
const started = await startAgentInvocationsForChildInput(context, { queue: localConversationWork.queue });
|
|
179
|
+
if (!started) throw new Error("Local child queue received non-invocation work");
|
|
180
|
+
return started;
|
|
175
181
|
},
|
|
176
182
|
invocationWorker: createAgentInvocationWorker(agentRunner)
|
|
177
183
|
});
|
|
@@ -181,7 +187,7 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
181
187
|
});
|
|
182
188
|
});
|
|
183
189
|
agentRunner = createAgentRunner(executeAgentRun, {
|
|
184
|
-
bindMessageAgent: (request) => request.
|
|
190
|
+
bindMessageAgent: (request) => request.parentConversationId ? void 0 : bindMessageAgent(request, { queue: localConversationWork.queue }),
|
|
185
191
|
bindSpawnAgent: (request) => bindSpawnAgent(request, { queue: localConversationWork.queue })
|
|
186
192
|
});
|
|
187
193
|
const oauthCallback = await startLocalOAuthCallbackServer();
|
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-CZEc8_v4.js";
|
|
2
|
+
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-CtaDOOM5.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DQy-mmBC.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-BGwaqDMs.js")).runAdmin(argv);
|
|
29
29
|
}
|
|
30
30
|
async function runBriefs(argv) {
|
|
31
|
-
return await (await import("../briefs-
|
|
31
|
+
return await (await import("../briefs-Dc7qZrhc.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, lt as createPluginLogger } from "../agent-hooks-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { d as getDb } from "../viewer-BlAozHer.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-DS1k7fUG.js";
|
|
3
|
+
import { d as setPlugins, f as validatePlugins, lt as createPluginLogger } from "../agent-hooks-C72ByH0C.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DTguegIe.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-DS1k7fUG.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-aVLDAirh.js";
|
|
3
|
+
import { r as resolve } from "../resolve-Bdw4hu7s.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-CgWvImQL.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-DQazjeGA.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-CtaDOOM5.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-CZEc8_v4.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-D3TdVM9H.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-BVnfNd3D.js";
|
|
3
|
+
import { p as logWarn } from "./logging-CZEc8_v4.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]))?$/;
|
|
@@ -219,6 +219,76 @@ const INPUT_IMAGE_TYPES = [
|
|
|
219
219
|
"image/gif",
|
|
220
220
|
"image/webp"
|
|
221
221
|
];
|
|
222
|
+
/** Leading bytes of each accepted image type. `null` matches any byte. */
|
|
223
|
+
const IMAGE_SIGNATURES = [
|
|
224
|
+
{
|
|
225
|
+
mediaType: "image/png",
|
|
226
|
+
bytes: [
|
|
227
|
+
137,
|
|
228
|
+
80,
|
|
229
|
+
78,
|
|
230
|
+
71,
|
|
231
|
+
13,
|
|
232
|
+
10,
|
|
233
|
+
26,
|
|
234
|
+
10
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
mediaType: "image/jpeg",
|
|
239
|
+
bytes: [
|
|
240
|
+
255,
|
|
241
|
+
216,
|
|
242
|
+
255
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
mediaType: "image/gif",
|
|
247
|
+
bytes: [
|
|
248
|
+
71,
|
|
249
|
+
73,
|
|
250
|
+
70,
|
|
251
|
+
56,
|
|
252
|
+
55,
|
|
253
|
+
97
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
mediaType: "image/gif",
|
|
258
|
+
bytes: [
|
|
259
|
+
71,
|
|
260
|
+
73,
|
|
261
|
+
70,
|
|
262
|
+
56,
|
|
263
|
+
57,
|
|
264
|
+
97
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
mediaType: "image/webp",
|
|
269
|
+
bytes: [
|
|
270
|
+
82,
|
|
271
|
+
73,
|
|
272
|
+
70,
|
|
273
|
+
70,
|
|
274
|
+
null,
|
|
275
|
+
null,
|
|
276
|
+
null,
|
|
277
|
+
null,
|
|
278
|
+
87,
|
|
279
|
+
69,
|
|
280
|
+
66,
|
|
281
|
+
80
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
];
|
|
285
|
+
/**
|
|
286
|
+
* Detect an accepted image type from file bytes. Use this instead of a file
|
|
287
|
+
* name or declared content type, which can be wrong.
|
|
288
|
+
*/
|
|
289
|
+
function detectImageMediaType(data) {
|
|
290
|
+
return IMAGE_SIGNATURES.find(({ bytes }) => data.length >= bytes.length && bytes.every((byte, index) => byte === null || data[index] === byte))?.mediaType;
|
|
291
|
+
}
|
|
222
292
|
/** Report whether a media type is a raster image accepted by vision models. */
|
|
223
293
|
function isVisionImageMediaType(mediaType) {
|
|
224
294
|
const normalized = mediaType.split(";", 1)[0]?.trim().toLowerCase();
|
|
@@ -868,4 +938,4 @@ const conversationStatsReportSchema = z.object({
|
|
|
868
938
|
windowStart: z.string()
|
|
869
939
|
}).strict();
|
|
870
940
|
//#endregion
|
|
871
|
-
export { forkConversationBodySchema as A,
|
|
941
|
+
export { forkConversationBodySchema as A, briefOutcomeStatusSchema as B, conversationReportEventSchema as C, conversationUsageSchema as D, conversationSummaryReportSchema as E, INPUT_IMAGE_TYPES as F, messageCardText as G, parseBriefInput as H, detectImageMediaType as I, resolveMessageCards as J, readMessageCardRefs as K, isVisionImageMediaType as L, MAX_INPUT_IMAGES as M, MAX_INPUT_IMAGE_BYTES as N, createConversationBodySchema as O, readMessageAttachments as P, briefCodeChangeSchema as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, annotationCard as U, conversationBriefSchema as V, messageCardRef as W, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, forkConversationResponseSchema as j, createConversationMessageBodySchema as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, removedCardSchema as q, archiveConversationBodySchema as r, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, briefLinkSchema as z };
|