@sentry/junior 0.236.0 → 0.238.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/{context-0Et9iVSB.js → actor-BTtLaeWy.js} +1 -96
- package/dist/admin-ZGlZ8lY6.js +33 -0
- package/dist/{agent-hooks-Da_H0jHv.js → agent-hooks-CxdSqU2u.js} +1426 -2965
- package/dist/{agent-runner-uP7QRc4c.js → agent-runner-ZS1LHtSR.js} +275 -143
- package/dist/api/schema.d.ts +4 -0
- package/dist/api/schema.js +4 -3
- package/dist/api.d.ts +1 -1
- package/dist/api.js +32 -25
- package/dist/{app-MEd7wbF0.d.ts → app-FB2hmHpZ.d.ts} +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/app.js +27 -23
- package/dist/{automation-B9Kc1gcf.js → automation-CrQGQ2MT.js} +3 -2
- package/dist/{briefs-DrjBPQFy.js → briefs-B6IhUAgK.js} +4 -4
- package/dist/{catalog-runtime-C7339Cfm.js → catalog-runtime-BzNg07bb.js} +1 -1
- package/dist/{checkpoint-DaD7_Gsb.js → checkpoint-DWGyJg4c.js} +19 -10
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +6 -2
- package/dist/cli/plugins.js +5 -3
- package/dist/cli/run.d.ts +2 -1
- package/dist/cli/run.js +2 -1
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-Ch9Hg9NU.js → client-CKs0rj3A.js} +2 -2
- package/dist/{config-JR9wke1W.js → config-DRw358bB.js} +2 -2
- package/dist/{conversation-9Fxa1Zbq.js → conversation-DwD-vquD.js} +3 -517
- package/dist/{conversation-privacy-au02dyZK.js → conversation-privacy-DAYxHp74.js} +1 -1
- package/dist/{credential-sync-BWTA3LnL.js → credential-sync-DmRbuyE4.js} +15 -14
- package/dist/{db-Ca9Nt5ci.d.ts → db-CWZP77Ex.d.ts} +1 -1
- package/dist/{executor-BW9XWgUQ.js → executor-DgPk8Lsx.js} +5 -2
- package/dist/experimental-Qn9rKLgx.js +50 -0
- package/dist/history-BLTUgFYO.js +518 -0
- package/dist/{images-BdG7zcNf.js → images-puyEuXoY.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-BqXd0ZPV.js → job-queue-BL9stv_E.js} +1 -1
- package/dist/{logging-B4sKwmCG.js → logging-BNi_jyHb.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-BjRN99dc.js → oauth-authorization-Zv1oLB1J.js} +1 -1
- package/dist/{oauth-callback-server-B_1p98Mb.js → oauth-callback-server-BHtVbKvO.js} +2 -2
- package/dist/pending-auth-DulDjfwL.js +433 -0
- package/dist/{profile-BamYnmhO.js → profile-C2TScny6.js} +5 -7
- package/dist/{prompt-Ctwy6hSI.js → prompt-CMU-B4FA.js} +1 -1
- package/dist/{registry-CXNv9fDX.js → registry-D1RsbgDb.js} +111 -3
- package/dist/{resolve-C9ETkt4T.js → resolve-CuY3dhxy.js} +2 -2
- package/dist/{runner-DnBGVRnW.js → runner-BUkReLln.js} +10 -10
- package/dist/{sandbox-egress-signals-DwJ7Boi_.js → sandbox-egress-signals-etjG6qQX.js} +1 -1
- package/dist/{schema-CJiqDc5r.js → schema-CxWAN2zq.js} +2 -2
- package/dist/{skills-Dd8O9Aav.js → skills-BGhThSGR.js} +2 -2
- package/dist/{spawn-DFdRspSD.js → spawn-PtyOnoXt.js} +2 -2
- package/dist/{store-DoewL5mG.d.ts → store-BxxbxBlm.d.ts} +7 -0
- package/dist/{task-queue-DGQEOk1A.js → task-queue-Bi2uNATu.js} +3 -3
- package/dist/{task-runner-C5XCIDSF.js → task-runner-CDoZCo8g.js} +20 -10
- package/dist/{thread-state-D3E29wZk.js → thread-state-B-t88gH0.js} +6 -5
- package/dist/{turn-failure-response-TDoj0aZz.js → turn-failure-response-di4Jx90o.js} +10 -9
- package/dist/{turn-lifecycle-DOnU45p7.js → turn-lifecycle-ByhUHYjD.js} +1 -1
- package/dist/{turn-session-routing-DbpZZoin.js → turn-session-routing-QjNvsevm.js} +1 -1
- package/dist/{validation-B9lMbisx.js → validation-D3li76Ti.js} +2 -3
- package/dist/{version-CWkIGcLU.js → version-Chc6bVG5.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/viewer-DsyM9kb9.js +1636 -0
- package/dist/{web-authorization-PPaoj2ns.js → web-authorization-Enb5lVYt.js} +6 -6
- package/dist/{web-input-CfNxXtHm.js → web-input-efQlcCis.js} +64 -502
- package/dist/{work-DNaoFrEe.js → work-CeiA_ZxD.js} +9 -10
- package/dist/{worker-xeJLxYwm.js → worker-BJb2hsUB.js} +5 -5
- package/migrations/0047_user_timezone.sql +1 -0
- package/migrations/0048_user_admin.sql +1 -0
- package/migrations/meta/0047_snapshot.json +3713 -0
- package/migrations/meta/0048_snapshot.json +3720 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +4 -4
- package/dist/pending-auth-WqF4Gh8Z.js +0 -59
package/dist/api/schema.d.ts
CHANGED
|
@@ -4344,6 +4344,10 @@ type AutomationUpdate = z.output<typeof automationUpdateSchema>;
|
|
|
4344
4344
|
/** Catalog metadata only; callbacks and provider connections stay on the server. */
|
|
4345
4345
|
export declare const automationEventCatalogSchema: z.ZodArray<z.ZodObject<{
|
|
4346
4346
|
type: z.ZodString;
|
|
4347
|
+
identifier: z.ZodOptional<z.ZodObject<{
|
|
4348
|
+
format: z.ZodString;
|
|
4349
|
+
pattern: z.ZodCustom<RegExp, RegExp>;
|
|
4350
|
+
}, z.core.$strict>>;
|
|
4347
4351
|
supportedEvents: z.ZodArray<z.ZodString>;
|
|
4348
4352
|
suggestedEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4349
4353
|
matchFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
package/dist/api/schema.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as
|
|
1
|
+
import { a as conversationTurnFailureReasonSchema, i as conversationTurnFailureCodeSchema } from "../history-BLTUgFYO.js";
|
|
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-CrQGQ2MT.js";
|
|
3
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";
|
|
4
|
-
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-CxWAN2zq.js";
|
|
5
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.d.ts
CHANGED
package/dist/api.js
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { d as logException, p as logWarn } from "./logging-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { $ as eventAutomationBelongsToUser, Et as pluginEventCatalog, F as lookupSlackUser, H as saveScheduledAutomation, J as eventAutomationTriggerAvailable, K as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, T as readLiveAttachment, V as readScheduledAutomation, Vt as getConversation, X as resolveTaskOutcomes, at as setEventAutomationStatus, ct as readAutomationVersion, dt as automationRevision, ft as requireAutomationRevision, g as readStats, it as saveEventAutomation, jt as cancelHumanFacingPendingMessages, lt as sameDefinitionValue, ot as automationDefinition, q as AutomationEditError, tt as getEventAutomation, ut as AutomationConflictError, wt as getEventCatalog } from "./agent-runner-ZS1LHtSR.js";
|
|
2
|
+
import { d as logException, p as logWarn } from "./logging-BNi_jyHb.js";
|
|
3
|
+
import { d as parseSlackTeamId, g as parseSlackMessageTs, l as parseSlackChannelId } from "./actor-BTtLaeWy.js";
|
|
4
|
+
import { C as agentTurnUsageSchema, T as resolveRootConversationId, _ as locationFromRow, 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 hasAgentTurnUsage, y as parseSessionSource } from "./viewer-DsyM9kb9.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-
|
|
7
|
-
import {
|
|
8
|
-
import { F as loadTurnProjection, vt as piMessageFromHistoryItem } from "./checkpoint-
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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-DgPk8Lsx.js";
|
|
7
|
+
import { u as contextProvenance } from "./history-BLTUgFYO.js";
|
|
8
|
+
import { F as loadTurnProjection, vt as piMessageFromHistoryItem } from "./checkpoint-DWGyJg4c.js";
|
|
9
|
+
import { At as viewerConversationMembership, C as WorkspaceValidationError, Ct as conversationArchiveTimes, Dt as conversationHasParticipantUser, Et as conversationHasParticipantEmail, Ht as listConversationAnnotations, M as workspaceRepoCheckoutPath, Mt as readLatestConversationBrief, Nt as readConversationEventPage, O as SANDBOX_RUNTIME, Ot as conversationNotArchivedForEmail, Pt as buildSentryConversationUrl, S as updateWorkspace, St as readConversationAccessFromSql, Tt as conversationArchivedForUser, Ut as listConversationAnnotationsById, _ as deleteWorkspace, at as getSlackClient, b as listWorkspaces, g as createWorkspace, kt as conversationNotArchivedForUser, u as getPlugins, ut as withSlackRetries, v as getWorkspace, wt as conversationArchivedForEmail, x as listWorkspacesByRepository, xt as createPluginLogger } from "./agent-hooks-CxdSqU2u.js";
|
|
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-C2TScny6.js";
|
|
12
|
+
import { t as getCachedSnapshot } from "./resolve-CuY3dhxy.js";
|
|
13
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-BL9stv_E.js";
|
|
14
|
+
import { F as weekdaySchema, I as getFirstRunAtMs, M as compileScheduleIntent, _ 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-CrQGQ2MT.js";
|
|
13
15
|
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";
|
|
14
|
-
import {
|
|
15
|
-
import { A as conversationAggregateColumns, j as conversationRangeColumns, k as conversationActiveDaysColumn } from "./task-runner-
|
|
16
|
-
import { r as getWebAuthorization } from "./web-authorization-
|
|
17
|
-
import { t as decodeInputImages } from "./images-
|
|
18
|
-
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-
|
|
16
|
+
import { B as readHealthReport, C as clearSlackPendingReactions, I as createVercelAttachmentStorage, _ as readViewerAutomationSummary, a as recordWebConversationActivity, b as resolveViewerTaskCandidate, d as resolveSlackConversationContextFromThreadId, f as ViewerTaskNotFoundError, g as readViewerAutomationRuns, h as readViewerAutomationExecutions, i as createConversationId, j as legacyWebMailboxMetadataSchema, l as getProductionSlackAdapter, m as readConversationSourceTask, o as webActorFromEmail, p as deleteViewerTask, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as formatSlackConversationRedactedLabel, v as readViewerAutomationVersions, y as readViewerAutomations } from "./web-input-efQlcCis.js";
|
|
17
|
+
import { A as conversationAggregateColumns, j as conversationRangeColumns, k as conversationActiveDaysColumn } from "./task-runner-CDoZCo8g.js";
|
|
18
|
+
import { r as getWebAuthorization } from "./web-authorization-Enb5lVYt.js";
|
|
19
|
+
import { t as decodeInputImages } from "./images-puyEuXoY.js";
|
|
20
|
+
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-CxWAN2zq.js";
|
|
19
21
|
import { Hono } from "hono";
|
|
20
22
|
import path from "node:path";
|
|
21
23
|
import { z } from "zod";
|
|
@@ -3354,7 +3356,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3354
3356
|
reports: [],
|
|
3355
3357
|
source: "plugins"
|
|
3356
3358
|
});
|
|
3357
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
3359
|
+
const { getPluginProfileReports } = await import("./agent-hooks-CxdSqU2u.js").then((n) => n.t);
|
|
3358
3360
|
return pluginOperationalReportFeedSchema.parse({
|
|
3359
3361
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3360
3362
|
reports: await getPluginProfileReports({
|
|
@@ -3742,9 +3744,13 @@ function createPersonalTokenRoutes() {
|
|
|
3742
3744
|
* This module joins registered readers with the authenticated viewer and
|
|
3743
3745
|
* validates every plugin response before it reaches the dashboard.
|
|
3744
3746
|
*/
|
|
3745
|
-
/**
|
|
3746
|
-
function
|
|
3747
|
-
return
|
|
3747
|
+
/** Admin pages are hidden from everyone except Junior admins. */
|
|
3748
|
+
function viewerCanSeePage(page, viewer) {
|
|
3749
|
+
return page.navigation !== "admin" || viewer?.isAdmin === true;
|
|
3750
|
+
}
|
|
3751
|
+
/** List safe navigation metadata for the plugin user pages one viewer can see. */
|
|
3752
|
+
function readPluginUserPageLinks(viewer) {
|
|
3753
|
+
return pluginUserPageLinksSchema.parse(getPlugins().flatMap((plugin) => (plugin.userPages ?? []).filter((page) => viewerCanSeePage(page, viewer)).map((page) => ({
|
|
3748
3754
|
description: page.description,
|
|
3749
3755
|
id: page.id,
|
|
3750
3756
|
label: page.label,
|
|
@@ -3764,6 +3770,7 @@ async function readPluginUserPage(input) {
|
|
|
3764
3770
|
if (!plugin || !page) return void 0;
|
|
3765
3771
|
const viewer = await resolveViewerUser(input.email);
|
|
3766
3772
|
if (!viewer) throw new Error("Authenticated viewer user could not be resolved");
|
|
3773
|
+
if (!viewerCanSeePage(page, viewer)) return void 0;
|
|
3767
3774
|
const content = pluginUserPageContentSchema.parse(await page.read({
|
|
3768
3775
|
db: getDb(),
|
|
3769
3776
|
log: createPluginLogger(plugin.manifest.name),
|
|
@@ -3784,7 +3791,7 @@ const userPageQuerySchema = z.object({
|
|
|
3784
3791
|
/** Create authenticated discovery and read routes for plugin user pages. */
|
|
3785
3792
|
function createUserPageRoutes() {
|
|
3786
3793
|
const app = new Hono();
|
|
3787
|
-
app.get("/", () => jsonResponse(pluginUserPageLinksSchema, readPluginUserPageLinks()));
|
|
3794
|
+
app.get("/", (context) => jsonResponse(pluginUserPageLinksSchema, readPluginUserPageLinks(context.get("viewer"))));
|
|
3788
3795
|
app.get("/:pluginName/:pageId", requireViewer, validateRequest("query", userPageQuerySchema, "Invalid user page query."), async (context) => {
|
|
3789
3796
|
const viewer = context.get("viewer");
|
|
3790
3797
|
const { q, ...query } = context.req.valid("query");
|
|
@@ -4317,7 +4324,7 @@ function readDescriptionText(home) {
|
|
|
4317
4324
|
}
|
|
4318
4325
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
4319
4326
|
async function readSkillReports() {
|
|
4320
|
-
const { discoverSkills } = await import("./skills-
|
|
4327
|
+
const { discoverSkills } = await import("./skills-BGhThSGR.js").then((n) => n.o);
|
|
4321
4328
|
const skills = await discoverSkills();
|
|
4322
4329
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
4323
4330
|
name: skill.name,
|
|
@@ -4326,7 +4333,7 @@ async function readSkillReports() {
|
|
|
4326
4333
|
}
|
|
4327
4334
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
4328
4335
|
async function readPlugins() {
|
|
4329
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4336
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-BzNg07bb.js").then((n) => n.t);
|
|
4330
4337
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4331
4338
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
4332
4339
|
description: plugin.manifest.description,
|
|
@@ -4338,7 +4345,7 @@ async function readPlugins() {
|
|
|
4338
4345
|
async function readRuntimeInfoReport() {
|
|
4339
4346
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4340
4347
|
import("./package-discovery-BVvSnQBB.js").then((n) => n.r),
|
|
4341
|
-
import("./catalog-runtime-
|
|
4348
|
+
import("./catalog-runtime-BzNg07bb.js").then((n) => n.t),
|
|
4342
4349
|
readPlugins(),
|
|
4343
4350
|
readSkillReports()
|
|
4344
4351
|
]);
|
|
@@ -4355,7 +4362,7 @@ async function readRuntimeInfoReport() {
|
|
|
4355
4362
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
4356
4363
|
async function readPluginOperationalReportFeed() {
|
|
4357
4364
|
const nowMs = Date.now();
|
|
4358
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4365
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-CxdSqU2u.js").then((n) => n.t);
|
|
4359
4366
|
return pluginOperationalReportFeedSchema.parse({
|
|
4360
4367
|
source: "plugins",
|
|
4361
4368
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-B5SnqRln.js";
|
|
2
|
-
import { t as ConversationStore } from "./store-
|
|
2
|
+
import { t as ConversationStore } from "./store-BxxbxBlm.js";
|
|
3
3
|
import "./history-DvqWZlYX.js";
|
|
4
4
|
import { n as JuniorPluginSet } from "./plugins-CjfUP5gJ.js";
|
|
5
5
|
import { Hono } from "hono";
|
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-FB2hmHpZ.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,29 +1,32 @@
|
|
|
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 { An as slackEntitySchema, Bn as setConfigDefaults, Bt as ensureConversationWake, E as requestAttachmentDeletion, G as withScheduledAutomationLock, Ht as getConversationWorkState, I as logScheduledAutomationRunSkipped, Jt as removeActiveConversation, L as scheduledAutomationRunAttributes, Mn as createUserTokenStore, O as parseSlackThreadId, Pt as clearExpiredConversationLease, Qt as stopConversationWork, R as listScheduledAutomations, Tn as slackMention, Tt as eventGuidance, U as saveScheduledAutomationInLock, Ut as hasRunnableConversationWork, V as readScheduledAutomation, Vt as getConversation, W as scheduledRunId, Wt as listActiveConversationIds, Xt as requestConversationWork, Y as effectiveTaskOutcomes, Z as collectEventAutomationMatchKeys, _n as formatProviderLabel, an as renderTaskInput, b as unpublishedArtifactHeaders, bn as startOAuthFlow, bt as ingestEvent, c as deleteMcpAuthSessionsForUserProvider, cn as resolveSandboxEgressProviderForHost, dn as SANDBOX_EGRESS_PROXY_PATH, en as CONVERSATION_WORK_STALE_ENQUEUE_MS, et as findMatchingEventAutomations, fn as clearSandboxEgressSignals, hn as parseSandboxEgressCredentialToken, i as executeCredentialedEgressRequest, in as isInvalidConversationRecordError, jn as slackExternalRefIdSchema, kt as appendAndEnqueueInboundMessage, l as deleteMcpServerSessionId, ln as normalizeSandboxEgressTracePropagationDomains, mn as consumeSandboxEgressPermissionDeniedSignal, n as executeAgentRun, nn as hasRunnableConversationWork$1, pn as consumeSandboxEgressAuthRequiredSignal, t as createAgentRunner, u as deleteMcpStoredOAuthCredentials, un as shouldPropagateSandboxEgressTrace, v as publicArtifactHeaders, w as collectAttachmentGarbage, wt as getEventCatalog, x as lookupSlackUserProfile, y as readPublicArtifact, yt as processWorkspaceSnapshotJob, z as listScheduledAutomationsForTeam, zn as getConfigDefaults } from "./agent-runner-ZS1LHtSR.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-BNi_jyHb.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-
|
|
6
|
-
import { _ as
|
|
7
|
-
import {
|
|
4
|
+
import { t as JUNIOR_VERSION } from "./version-Chc6bVG5.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-DRw358bB.js";
|
|
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 { E 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-DsyM9kb9.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 {
|
|
11
|
-
import {
|
|
12
|
-
import { J as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
9
|
+
import { D as juniorConversations, _ as juniorConversationBriefs, a as juniorSchedulerRuns, b as juniorConversationEvents, m as juniorAgentInvocations, o as juniorSchedulerTasks, p as juniorAgentBindings } from "./executor-DgPk8Lsx.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BzNg07bb.js";
|
|
11
|
+
import { J as appendConversationMessages, Z as projectConversationMessages, et as settleConversationTitleWork } from "./checkpoint-DWGyJg4c.js";
|
|
12
|
+
import { $ as verifySlackDirectCredentialSubject, G as findMatchingWatches, Ht as listConversationAnnotations, J as bindEventAutomationCredentialSubject, Q as verifyScheduledAutomationCredentialSubject, St as readConversationAccessFromSql, V as collectEventMatchKeys, X as bindSlackDirectCredentialSubject, Y as bindScheduledAutomationCredentialSubject, Z as verifyEventAutomationCredentialSubject, _t as setDashboardConversationLinkOptions, a as getPluginRoutes, at as getSlackClient, d as setPlugins, dt as getWorkspaceTeamId, f as validatePlugins, ft as runWithWorkspaceTeamId, gt as getDashboardTaskLink, h as setBriefsConfig, i as getPluginApiRoutes, mt as getDashboardConversationLink, q as takeDueTimerWatches, st as isDmChannel, u as getPlugins, vt as createPluginState, xt as createPluginLogger, z as cancelSubscriptions, zt as resolveRootVisibility } from "./agent-hooks-CxdSqU2u.js";
|
|
13
|
+
import { V as annotationCard } from "./conversation-DwD-vquD.js";
|
|
14
|
+
import { O as withLock$1, w as getStateAdapter } from "./profile-C2TScny6.js";
|
|
15
|
+
import { c as getThreadStopDecision } from "./pending-auth-DulDjfwL.js";
|
|
16
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-CuY3dhxy.js";
|
|
17
|
+
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-BL9stv_E.js";
|
|
18
|
+
import { D as scheduledRunSchema, L as getNextRunAtMs } from "./automation-CrQGQ2MT.js";
|
|
19
|
+
import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
|
|
20
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-D3li76Ti.js";
|
|
18
21
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
|
|
19
|
-
import { A as
|
|
20
|
-
import { O as recordAutomationExecution, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, d as getPluginDispatchProjection, f as isTerminalDispatchStatus, l as getDispatchRecord, o as createOrGetDispatch, p as listPendingDispatchMailboxAppends, s as getDispatchConversationId, t as processPluginTask } from "./task-runner-
|
|
21
|
-
import { c as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation } from "./work-
|
|
22
|
-
import { s as coerceThreadConversationState } from "./thread-state-
|
|
23
|
-
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
24
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
25
|
-
import { t as processConversationWork } from "./worker-
|
|
26
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
22
|
+
import { A as getAuthPausedConversationTurnId, C as clearSlackPendingReactions, D as stopSlackThread, E as isSlackMessageStopped, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as THREAD_OPTOUT_ACK, N as startProcessingReaction, O as normalizeIncomingSlackThreadId, P as parseContent, R as enqueueAgentDispatch, S as buildSlackInboundMessage, T as verifySlackSignature, _ as readViewerAutomationSummary, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, k as withNormalizedThreadId, l as getProductionSlackAdapter, n as conversationTurnIdForMessage, o as webActorFromEmail, s as createProductionConversationWorkOptions, t as appendAndEnqueueWebMessage, w as runWithSlackInstallation, x as recordSkippedConversationMessage, z as GET$3 } from "./web-input-efQlcCis.js";
|
|
23
|
+
import { O as recordAutomationExecution, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, d as getPluginDispatchProjection, f as isTerminalDispatchStatus, l as getDispatchRecord, o as createOrGetDispatch, p as listPendingDispatchMailboxAppends, s as getDispatchConversationId, t as processPluginTask } from "./task-runner-CDoZCo8g.js";
|
|
24
|
+
import { c as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation } from "./work-CeiA_ZxD.js";
|
|
25
|
+
import { s as coerceThreadConversationState } from "./thread-state-B-t88gH0.js";
|
|
26
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-DmRbuyE4.js";
|
|
27
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-Bi2uNATu.js";
|
|
28
|
+
import { t as processConversationWork } from "./worker-BJb2hsUB.js";
|
|
29
|
+
import { t as bindSpawnAgent } from "./spawn-PtyOnoXt.js";
|
|
27
30
|
import { createRequire } from "node:module";
|
|
28
31
|
import { Hono } from "hono";
|
|
29
32
|
import { z } from "zod";
|
|
@@ -4875,6 +4878,7 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
4875
4878
|
const peoplePath = pagePath("people");
|
|
4876
4879
|
const pagePaths = [
|
|
4877
4880
|
basePath,
|
|
4881
|
+
pagePath("admin"),
|
|
4878
4882
|
pagePath("code"),
|
|
4879
4883
|
`${pagePath("code")}/*`,
|
|
4880
4884
|
conversationsPath,
|
|
@@ -258,7 +258,7 @@ function getNextRunAtMs(task, scheduledForMs, afterMs = scheduledForMs) {
|
|
|
258
258
|
*/
|
|
259
259
|
const localDateSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "Use a local date in YYYY-MM-DD format.");
|
|
260
260
|
const localTimeSchema = z.string().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "Use local time in HH:MM format.");
|
|
261
|
-
const timezoneSchema = z.string().min(1).max(80).describe("IANA timezone, for example America/
|
|
261
|
+
const timezoneSchema = z.string().min(1).max(80).describe("IANA timezone the user asked for, for example America/New_York. Omit or use null to use the creator's timezone on create, or to keep the saved timezone on update. Do not guess it from office locations.").nullable().optional();
|
|
262
262
|
/** Weekday names in `Date#getDay` order. */
|
|
263
263
|
const weekdaySchema = z.enum([
|
|
264
264
|
"sunday",
|
|
@@ -367,6 +367,7 @@ function localDateAt(timestampMs, timezone) {
|
|
|
367
367
|
parts.day
|
|
368
368
|
].map((value, index) => index === 0 ? String(value).padStart(4, "0") : String(value).padStart(2, "0")).join("-");
|
|
369
369
|
}
|
|
370
|
+
/** Whether the runtime accepts this IANA timezone name. */
|
|
370
371
|
function isValidTimeZone(timezone) {
|
|
371
372
|
try {
|
|
372
373
|
new Intl.DateTimeFormat("en-US", { timeZone: timezone }).format();
|
|
@@ -889,4 +890,4 @@ const automationEventCatalogSchema = z.array(pluginEventTypeSchema.safeExtend({
|
|
|
889
890
|
const automationScheduleIntentSchema = scheduleIntentSchema;
|
|
890
891
|
const automationSchedulePreviewSchema = scheduledAutomationSchema.pick({ schedule: true }).extend({ nextRunAtMs: z.number() }).strict();
|
|
891
892
|
//#endregion
|
|
892
|
-
export { eventAutomationSchema as A, eventAutomationSummarySchema as C, scheduledRunSchema as D, scheduledAutomationSchema as E,
|
|
893
|
+
export { eventAutomationSchema as A, eventAutomationSummarySchema as C, scheduledRunSchema as D, scheduledAutomationSchema as E, weekdaySchema as F, getFirstRunAtMs as I, getNextRunAtMs as L, compileScheduleIntent as M, isValidTimeZone as N, automationInstructionToolSchema as O, scheduleIntentSchema as P, getZonedDateTimeParts as R, automationVersionSchema as S, SCHEDULED_AUTOMATION_SYSTEM_ACTOR as T, automationSummarySchema as _, automationExecutionSchema as a, automationVersionListSchema as b, automationLifecycleSchema as c, automationParamsSchema as d, automationRunListSchema as f, automationSchedulePreviewSchema as g, automationScheduleIntentSchema as h, automationExecutionListSchema as i, ScheduleIntentError as j, automationTitleSchema as k, automationListQuerySchema as l, automationRunWindowsSchema as m, automationEditSchema as n, automationExecutionStatusDaySchema as o, automationRunSchema as p, automationEventCatalogSchema as r, automationExecutionStatusSchema as s, automationEditErrorSchema as t, automationListSchema as u, automationUpdateSchema as v, scheduledAutomationSummarySchema as w, automationVersionParamsSchema as x, automationVersionActivateSchema as y, taskOutcomeInputSchema as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as completeObject } from "./client-
|
|
1
|
+
import { r as completeObject } from "./client-CKs0rj3A.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
3
|
-
import { B as parseBriefInput, I as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-
|
|
4
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
3
|
+
import { B as parseBriefInput, I as briefCodeChangeSchema, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-DwD-vquD.js";
|
|
4
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-CMU-B4FA.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-DRw358bB.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-D1RsbgDb.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();
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-
|
|
2
|
-
import { d as logException, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-CKs0rj3A.js";
|
|
2
|
+
import { d as logException, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-BNi_jyHb.js";
|
|
3
|
+
import { n as botConfig } from "./config-DRw358bB.js";
|
|
4
|
+
import { c as toStoredSlackActor, g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
5
|
+
import { b as addAgentTurnUsage, c as getConversationEventStore, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, v as bindProviderConversation } from "./viewer-DsyM9kb9.js";
|
|
6
|
+
import { d as instructionActors, f as instructionProvenanceFor, n as agentHistoryItemSchema, u as contextProvenance } from "./history-BLTUgFYO.js";
|
|
7
|
+
import { p as credentialSubjectSchema } from "./registry-D1RsbgDb.js";
|
|
8
|
+
import { Gt as agentsInstructionsUpdatedEvent, Kt as authenticationLinkedEvent, Wt as JUNIOR_NATIVE_EVENT_NAMESPACE, qt as authenticationUnlinkedEvent } from "./agent-hooks-CxdSqU2u.js";
|
|
9
|
+
import { H as messageCardRef } from "./conversation-DwD-vquD.js";
|
|
10
|
+
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-C2TScny6.js";
|
|
8
11
|
import { isDeepStrictEqual } from "node:util";
|
|
9
12
|
import { z } from "zod";
|
|
10
13
|
import { createHash } from "node:crypto";
|
|
@@ -24,7 +27,7 @@ function authorizationObservationMessage(data, createdAtMs) {
|
|
|
24
27
|
role: "user",
|
|
25
28
|
content: [{
|
|
26
29
|
type: "text",
|
|
27
|
-
text: `${label} completed for provider "${data.provider}". Continue the
|
|
30
|
+
text: `${label} completed for provider "${data.provider}". Continue the request that waited for it and retry the provider operation. If the person dropped that request since, do not continue it; say only that ${data.provider} is connected.`
|
|
28
31
|
}],
|
|
29
32
|
timestamp: createdAtMs
|
|
30
33
|
});
|
|
@@ -1528,6 +1531,7 @@ const storedTurnRecordSchema = z.object({
|
|
|
1528
1531
|
schemaVersion: z.literal(TURN_CURSOR_SCHEMA_VERSION),
|
|
1529
1532
|
version: z.number().int().nonnegative(),
|
|
1530
1533
|
conversationId: z.string().min(1),
|
|
1534
|
+
credentialSubject: credentialSubjectSchema.optional(),
|
|
1531
1535
|
dispatchId: z.string().min(1).optional(),
|
|
1532
1536
|
dispatchOutcome: z.enum([
|
|
1533
1537
|
"blocked",
|
|
@@ -1645,6 +1649,7 @@ function materializeTurnRecord(stored, piProjection, turnStartMessageIndex, runt
|
|
|
1645
1649
|
cumulativeDurationMs: runtimeMetrics?.cumulativeDurationMs ?? 0,
|
|
1646
1650
|
...definedProps$1({
|
|
1647
1651
|
channelName: runtimeMetrics?.channelName,
|
|
1652
|
+
credentialSubject: stored.credentialSubject,
|
|
1648
1653
|
cumulativeToolCallCount: stored.cumulativeToolCallCount,
|
|
1649
1654
|
cumulativeUsage: runtimeMetrics?.cumulativeUsage,
|
|
1650
1655
|
dispatchId: stored.dispatchId,
|
|
@@ -1714,6 +1719,7 @@ function buildStoredRecord(args) {
|
|
|
1714
1719
|
committedSeq: args.committedSeq,
|
|
1715
1720
|
...definedProps$1({
|
|
1716
1721
|
actor: args.actor,
|
|
1722
|
+
credentialSubject: args.credentialSubject,
|
|
1717
1723
|
cumulativeToolCallCount: args.cumulativeToolCallCount,
|
|
1718
1724
|
dispatchId: args.dispatchId,
|
|
1719
1725
|
dispatchOutcome: args.dispatchOutcome,
|
|
@@ -1789,6 +1795,7 @@ async function updateTurnState(args) {
|
|
|
1789
1795
|
lastProgressAtMs: parsed.lastProgressAtMs,
|
|
1790
1796
|
previousVersion: parsed.version,
|
|
1791
1797
|
...definedProps$1({
|
|
1798
|
+
credentialSubject: args.existing.credentialSubject,
|
|
1792
1799
|
cumulativeToolCallCount: args.existing.cumulativeToolCallCount,
|
|
1793
1800
|
dispatchId: args.existing.dispatchId,
|
|
1794
1801
|
dispatchOutcome: args.existing.dispatchOutcome,
|
|
@@ -1862,6 +1869,7 @@ async function upsertTurnRecordLocked(args, fence) {
|
|
|
1862
1869
|
historyVersion: commit.historyVersion,
|
|
1863
1870
|
previousVersion: existingRecord?.version,
|
|
1864
1871
|
...definedProps$1({
|
|
1872
|
+
credentialSubject: existingRecord?.credentialSubject ?? args.credentialSubject,
|
|
1865
1873
|
cumulativeToolCallCount: args.cumulativeToolCallCount ?? existingRecord?.cumulativeToolCallCount,
|
|
1866
1874
|
dispatchId,
|
|
1867
1875
|
dispatchOutcome: args.dispatchOutcome ?? existingRecord?.dispatchOutcome,
|
|
@@ -2038,6 +2046,7 @@ function sharedWrite(args, latest) {
|
|
|
2038
2046
|
...definedProps({
|
|
2039
2047
|
actor: args.actor,
|
|
2040
2048
|
channelName: args.channelName ?? latest?.channelName,
|
|
2049
|
+
credentialSubject: args.credentialSubject,
|
|
2041
2050
|
destination: args.destination,
|
|
2042
2051
|
destinationVisibility: args.destinationVisibility,
|
|
2043
2052
|
dispatchId: args.dispatchId ?? latest?.dispatchId,
|
|
@@ -2079,9 +2088,9 @@ async function savePaused(args) {
|
|
|
2079
2088
|
const nextSliceId = keepSlice ? args.sliceId : args.sliceId + 1;
|
|
2080
2089
|
try {
|
|
2081
2090
|
const latest = await getTurnRecord(args.conversationId, args.turnId);
|
|
2082
|
-
const messages = args.reason === "yield" ? [...args.messages] : continuableMessages(args.messages, latest?.piMessages);
|
|
2091
|
+
const messages = args.reason === "yield" || args.beforePrompt ? [...args.messages] : continuableMessages(args.messages, latest?.piMessages);
|
|
2083
2092
|
if (args.reason === "auth") {
|
|
2084
|
-
if (messages.length > 0 && !isContinuablePiBoundary(messages)) return;
|
|
2093
|
+
if (!args.beforePrompt && messages.length > 0 && !isContinuablePiBoundary(messages)) return;
|
|
2085
2094
|
} else if (messages.length === 0 || !isContinuablePiBoundary(messages)) return;
|
|
2086
2095
|
const base = {
|
|
2087
2096
|
...sharedWrite(args, latest),
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-ZS1LHtSR.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("../
|
|
103
|
+
import("../agent-hooks-CxdSqU2u.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-BzNg07bb.js").then((n) => n.t),
|
|
105
|
+
import("../validation-D3li76Ti.js").then((n) => n.r),
|
|
106
|
+
import("../viewer-DsyM9kb9.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);
|
|
@@ -153,18 +153,18 @@ function localDevServerUrl() {
|
|
|
153
153
|
async function prepareLocalChatRun(io, pluginSet) {
|
|
154
154
|
defaultStateAdapterForLocalChat();
|
|
155
155
|
await configureLocalChatPlugins(pluginSet);
|
|
156
|
-
const { setExperimentalFeatures } = await import("../
|
|
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-CxdSqU2u.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-BUkReLln.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BHtVbKvO.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-etjG6qQX.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-PtyOnoXt.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-CeiA_ZxD.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-BJb2hsUB.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 {
|
|
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-BNi_jyHb.js";
|
|
2
|
+
import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-D1RsbgDb.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-BGhThSGR.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
|
@@ -24,8 +24,11 @@ async function runUpgrade(pluginSet) {
|
|
|
24
24
|
async function runChat(argv, pluginSet) {
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
|
+
async function runAdmin(argv) {
|
|
28
|
+
return await (await import("../admin-ZGlZ8lY6.js")).runAdmin(argv);
|
|
29
|
+
}
|
|
27
30
|
async function runBriefs(argv) {
|
|
28
|
-
return await (await import("../briefs-
|
|
31
|
+
return await (await import("../briefs-B6IhUAgK.js")).runBriefs(argv);
|
|
29
32
|
}
|
|
30
33
|
function topLevelCommand(argv) {
|
|
31
34
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
|
@@ -36,10 +39,11 @@ async function runMain(argv, options = {}) {
|
|
|
36
39
|
const instrument = options.instrument ?? true;
|
|
37
40
|
if (instrument) await initSentry();
|
|
38
41
|
const command = topLevelCommand(argv);
|
|
39
|
-
const cliPluginsModule = command && command !== "init" && command !== "briefs" ? await import("./plugins.js") : void 0;
|
|
42
|
+
const cliPluginsModule = command && command !== "init" && command !== "briefs" && command !== "admin" ? await import("./plugins.js") : void 0;
|
|
40
43
|
const pluginSet = cliPluginsModule ? await cliPluginsModule.loadCliPluginSet() ?? null : void 0;
|
|
41
44
|
const pluginCommands = cliPluginsModule ? await cliPluginsModule.loadCliPluginCommands(pluginSet) : void 0;
|
|
42
45
|
const exitCode = await runCli(argv, {
|
|
46
|
+
runAdmin,
|
|
43
47
|
runBriefs,
|
|
44
48
|
runChat: async (chatArgv) => await runChat(chatArgv, pluginSet),
|
|
45
49
|
runInit,
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import {
|
|
1
|
+
import { d as getDb } from "../viewer-DsyM9kb9.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-BzNg07bb.js";
|
|
3
|
+
import { d as setPlugins, f as validatePlugins, xt as createPluginLogger } from "../agent-hooks-CxdSqU2u.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-D3li76Ti.js";
|
|
4
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
|
|
5
6
|
import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
|
|
6
7
|
import { stderr, stdout } from "node:process";
|
|
@@ -14,6 +15,7 @@ import { Command, CommanderError } from "commander";
|
|
|
14
15
|
*/
|
|
15
16
|
const pluginCliLoader = createJiti(import.meta.url, { moduleCache: false });
|
|
16
17
|
const CORE_COMMAND_NAMES = /* @__PURE__ */ new Set([
|
|
18
|
+
"admin",
|
|
17
19
|
"chat",
|
|
18
20
|
"check",
|
|
19
21
|
"init",
|
package/dist/cli/run.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/cli/run.d.ts
|
|
2
|
-
export declare const CLI_USAGE = "usage: junior init <dir>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
|
|
2
|
+
export declare const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
|
|
3
3
|
interface CliHandlers {
|
|
4
|
+
runAdmin: (argv: string[]) => Promise<number>;
|
|
4
5
|
runBriefs: (argv: string[]) => Promise<number>;
|
|
5
6
|
runChat: (argv: string[]) => Promise<number>;
|
|
6
7
|
runInit: (dir: string) => Promise<void>;
|
package/dist/cli/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/cli/run.ts
|
|
2
|
-
const CLI_USAGE = "usage: junior init <dir>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
|
|
2
|
+
const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior snapshot create\n junior check [dir]\n junior upgrade\n junior chat\n junior chat -p <message>\n junior briefs pull <conversationId...> --base-url <url> [--token <token>] --out <dir>\n junior briefs run <snapshot...> [--model <id>] [--prompt <file>] [--turn-by-turn] [--out <dir>]";
|
|
3
3
|
const DEFAULT_IO = { error: console.error };
|
|
4
4
|
/** Strip Node's leading argv separator while preserving command-level flags. */
|
|
5
5
|
function normalizeCliArgv(argv) {
|
|
@@ -9,6 +9,7 @@ function normalizeCliArgv(argv) {
|
|
|
9
9
|
async function runCli(argv, handlers, io = DEFAULT_IO) {
|
|
10
10
|
const [command, subcommand, ...rest] = normalizeCliArgv(argv);
|
|
11
11
|
if (command === "chat") return await handlers.runChat(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
12
|
+
if (command === "admin") return await handlers.runAdmin(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
12
13
|
if (command === "briefs") return await handlers.runBriefs(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
13
14
|
if (command === "init") {
|
|
14
15
|
if (!subcommand || rest.length > 0) {
|
|
@@ -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-BzNg07bb.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-C2TScny6.js";
|
|
3
|
+
import { r as resolve } from "../resolve-CuY3dhxy.js";
|
|
4
4
|
//#region src/cli/snapshot-create.ts
|
|
5
5
|
const DEFAULT_RUNTIME = "node22";
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|