@sentry/junior 0.258.0 → 0.259.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter-Bn0gFVSF.js +270 -0
- package/dist/{admin-My1SLGVO.js → admin-C8xz2f10.js} +1 -1
- package/dist/{agent-hooks-BJ_5mlRH.js → agent-hooks-B00FaKdP.js} +9 -8
- package/dist/{agent-runner-DGsFQw72.js → agent-runner-CPSd7rKm.js} +87 -308
- package/dist/api/schema.d.ts +29 -0
- package/dist/api/schema.js +2 -2
- package/dist/api.js +93 -22
- package/dist/{app-PX2H1PxU.d.ts → app-Bbxrehjf.d.ts} +5 -2
- package/dist/app.d.ts +2 -2
- package/dist/app.js +30 -28
- package/dist/{assistant-reply-H1M-91oF.js → assistant-reply-CqthTerd.js} +1 -1
- package/dist/{briefs-vYoK85rJ.js → briefs-DNYbQ9cD.js} +2 -2
- package/dist/{catalog-runtime-BN4DVxco.js → catalog-runtime-B8SuFPGb.js} +1 -1
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +6 -2
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/run.d.ts +2 -1
- package/dist/cli/run.js +2 -1
- package/dist/cli/snapshot-create.js +4 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DbyHuMFU.js → client-BZdxgKyL.js} +57 -4
- package/dist/{config-_WO_AjCB.js → config-Deqpfpg9.js} +5 -2
- package/dist/{connections-ag_1JOhB.js → connections-9gJkfS85.js} +174 -10
- package/dist/{conversation-privacy-DHP_xnVj.js → conversation-privacy-CFhNKxp-.js} +1 -1
- package/dist/{credential-sync-B-CPX_ag.js → credential-sync-BABGymK3.js} +15 -177
- package/dist/{executor-RvG6kVe1.js → executor-Bb3eQb8q.js} +2 -2
- package/dist/{images-C2J_bj2g.js → images-BbSdVHC6.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-DVe37it2.js → job-queue-vdGU-5ge.js} +1 -1
- package/dist/{logging-DsHONhVm.js → logging-BStXN56b.js} +1 -1
- package/dist/{message-DyitL8no.js → message-DRf6m4uO.js} +3 -3
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CDby-pCn.js → oauth-callback-server-JmOgLcGl.js} +2 -2
- package/dist/{pending-auth-D8J1uJUS.js → pending-auth-rG5U_QS1.js} +62 -62
- package/dist/{plugins-B11Mfkmv.d.ts → plugins-B_0Cr0MO.d.ts} +5 -1
- package/dist/{profile-DpYjfKke.js → profile-qBM6B_-V.js} +4 -273
- package/dist/{registry-Du566MtJ.js → registry-B_M_x_iS.js} +41 -2
- package/dist/{resolve-ClCIgh8E.js → resolve-BzpuLh8c.js} +3 -2
- package/dist/{result-BBbKA61B.js → result-DEZH_AnZ.js} +6 -6
- package/dist/{runner-CCuqFSqx.js → runner-BqQlG10t.js} +9 -9
- package/dist/{sandbox-egress-signals-DY1mbKF4.js → sandbox-egress-signals-DCq3WLs5.js} +1 -1
- package/dist/{schema-DrMh3NtR.js → schema-CF9HqNRY.js} +15 -1
- package/dist/service-account-BqTBkyD7.js +120 -0
- package/dist/service-account-BzhW7kXu.js +661 -0
- package/dist/{session-stop-CIoFiwwe.js → session-stop-CV65ZlU3.js} +10 -10
- package/dist/{skills-DyQBLIrK.js → skills-CiWS5_Ub.js} +2 -2
- package/dist/{spawn-Dqfeo7XP.js → spawn-BSAQ7UQZ.js} +2 -2
- package/dist/{store-DJLwq4x8.js → store-B1GES4gC.js} +6 -6
- package/dist/{task-queue-BzW4MaWU.js → task-queue-BAeGEMjJ.js} +3 -3
- package/dist/{task-runner-D3qJh4fK.js → task-runner-BlGhcQPi.js} +10 -10
- package/dist/{tasks-CEXKTASS.js → tasks-DieKX3d4.js} +9 -8
- package/dist/{thread-state-W3f6kAtz.js → thread-state-DpSWS4Rr.js} +6 -6
- package/dist/{turn-failure-response-CWx7aNIh.js → turn-failure-response-DQljogGJ.js} +7 -7
- package/dist/{turn-lifecycle-C9JFst7-.js → turn-lifecycle-BLgrkV_L.js} +1 -1
- package/dist/{turn-session-routing-CUxtfpr7.js → turn-session-routing-BlajheOU.js} +1 -1
- package/dist/{validation-BHRxa5G4.js → validation-23d7K9tX.js} +1 -1
- package/dist/{version-C0U6rHg0.js → version-B_XumRx-.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CGvvRqKp.js → viewer-B2_ABsYi.js} +3 -3
- package/dist/{web-input-Keb5GRWj.js → web-input-BZDyxpzR.js} +29 -29
- package/dist/{work-DRcsJ3hV.js → work-D3QKiV0O.js} +9 -9
- package/dist/{worker-Cjo-QqPq.js → worker-C8mUjYf9.js} +5 -5
- package/package.json +7 -7
package/dist/api.js
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { It as createUserTokenStore, K as listChildAgents, L as editEventAutomation, O as parseSlackThreadId, P as editScheduledAutomation, R as AutomationEditError, T as readLiveAttachment, V as resolveTaskOutcomes, bt as conversationSubtreeColumns, g as readStats, ot as getChildAgentLabel, yt as conversationSubtree, z as eventAutomationTriggerAvailable } from "./agent-runner-CPSd7rKm.js";
|
|
2
|
+
import { p as escapeXml } from "./client-BZdxgKyL.js";
|
|
3
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-BStXN56b.js";
|
|
3
4
|
import { d as parseSlackTeamId, g as parseSlackMessageTs, l as parseSlackChannelId } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { C as addAgentTurnUsage, D as hasAgentTurnUsage, E as agentTurnUsageSchema, O as resolveRootConversationId, S as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as loadConversationSlackTenantId, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, v as locationFromRow } from "./viewer-
|
|
5
|
+
import { C as addAgentTurnUsage, D as hasAgentTurnUsage, E as agentTurnUsageSchema, O as resolveRootConversationId, S as parseSessionSource, c as getConversationEventStore, d as getDb, f as getSqlExecutor, h as loadConversationSlackTenantId, i as resolveViewerUser, m as withConversationEventLock, o as updateViewerDisplayName, t as findUserByEmail, u as getConversationStore, v as locationFromRow } from "./viewer-B2_ABsYi.js";
|
|
5
6
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
|
|
6
|
-
import { f as juniorConversationBriefs, g as juniorApiTokens, h as juniorConversationEvents, m as juniorConversationMetrics, u as juniorConversationParticipants, v as juniorCodeChanges, y as juniorCodeRepositories } from "./executor-
|
|
7
|
+
import { f as juniorConversationBriefs, g as juniorApiTokens, h as juniorConversationEvents, m as juniorConversationMetrics, u as juniorConversationParticipants, v as juniorCodeChanges, y as juniorCodeRepositories } from "./executor-Bb3eQb8q.js";
|
|
7
8
|
import { d as contextProvenance } from "./history-AY8rs-FR.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B8SuFPGb.js";
|
|
10
|
+
import { At as loadTurnProjection, D as AutomationConflictError, E as sameDefinitionValue, O as automationRevision, S as automationDefinition, T as readAutomationVersion, a as saveScheduledAutomation, k as requireAutomationRevision, pn as piMessageFromHistoryItem, v as saveEventAutomation, y as setEventAutomationStatus } from "./tasks-DieKX3d4.js";
|
|
11
|
+
import { C as WorkspaceValidationError, Ct as readLatestConversationBrief, Ht as getSlackClient, Lt as lookupSlackUser, M as workspaceRepoCheckoutPath, Nt as listConversationAnnotations, O as SANDBOX_RUNTIME, Pt as listConversationAnnotationsById, S as updateWorkspace, Tt as buildSentryConversationUrl, _ as deleteWorkspace, _t as conversationHasParticipantEmail, b as listWorkspaces, bt as conversationNotArchivedForUser, ft as createPluginLogger, g as createWorkspace, gt as conversationArchivedForUser, ht as conversationArchivedForEmail, mt as conversationArchiveTimes, pt as readConversationAccessFromSql, qt as withSlackRetries, u as getPlugins, v as getWorkspace, vt as conversationHasParticipantUser, wt as readConversationEventPage, x as listWorkspacesByRepository, xt as viewerConversationMembership, yt as conversationNotArchivedForEmail } from "./agent-hooks-B00FaKdP.js";
|
|
10
12
|
import { A as forkConversationBodySchema, F as readMessageAttachments, I as INPUT_IMAGE_TYPES, O as createConversationBodySchema, 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-DjN3mlog.js";
|
|
11
|
-
import { n as hash, t as create } from "./profile-
|
|
12
|
-
import { l as getEventCatalog, y as automationEventCatalog } from "./session-stop-
|
|
13
|
+
import { n as hash, t as create } from "./profile-qBM6B_-V.js";
|
|
14
|
+
import { l as getEventCatalog, y as automationEventCatalog } from "./session-stop-CV65ZlU3.js";
|
|
13
15
|
import { t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
|
|
14
|
-
import { t as getCachedSnapshot } from "./resolve-
|
|
15
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
16
|
-
import { a as cancelHumanFacingPendingMessages, h as getConversation } from "./store-
|
|
16
|
+
import { t as getCachedSnapshot } from "./resolve-BzpuLh8c.js";
|
|
17
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-vdGU-5ge.js";
|
|
18
|
+
import { a as cancelHumanFacingPendingMessages, h as getConversation } from "./store-B1GES4gC.js";
|
|
19
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-BzhW7kXu.js";
|
|
17
20
|
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-DWBFBenG.js";
|
|
18
21
|
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-CJSUiksE.js";
|
|
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, k 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-
|
|
20
|
-
import { F as conversationAggregateColumns, I as conversationRangeColumns, M as readAutomationTitlesByConversationId, P as conversationActiveDaysColumn } from "./task-runner-
|
|
21
|
-
import { d as legacyWebMailboxMetadataSchema } from "./result-
|
|
22
|
-
import { a as startConnection, l as getWebAuthorization, n as isConnectableProvider, r as listConnections, t as disconnectConnection } from "./connections-
|
|
23
|
-
import { t as decodeInputImages } from "./images-
|
|
24
|
-
import { C as
|
|
22
|
+
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, k 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-BZDyxpzR.js";
|
|
23
|
+
import { F as conversationAggregateColumns, I as conversationRangeColumns, M as readAutomationTitlesByConversationId, P as conversationActiveDaysColumn } from "./task-runner-BlGhcQPi.js";
|
|
24
|
+
import { d as legacyWebMailboxMetadataSchema } from "./result-DEZH_AnZ.js";
|
|
25
|
+
import { a as startConnection, l as getWebAuthorization, n as isConnectableProvider, r as listConnections, t as disconnectConnection, u as htmlCallbackResponse } from "./connections-9gJkfS85.js";
|
|
26
|
+
import { t as decodeInputImages } from "./images-BbSdVHC6.js";
|
|
27
|
+
import { A as activityHours$1, C as personParamsSchema, D as locationDirectoryReportSchema, E as locationDetailReportSchema, H as codePersonReportSchema, I as disconnectConnectionResponseSchema, J as stopConversationTurnResponseSchema, L as startConnectionResponseSchema, N as connectionListSchema, O as locationParamsSchema, P as connectionParamsSchema, S as actorProfileReportSchema, U as codeRepositoryParamsSchema, V as codeOverviewReportSchema, W as codeRepositoryReportSchema, Y as apiErrorSchema, _ as personalTokenListSchema, a as workspaceBodySchema, b as revokePersonalTokenResponseSchema, d as serviceAccountListSchema, f as serviceAccountParamsSchema, g as createdPersonalTokenSchema, h as createPersonalTokenBodySchema, i as deleteWorkspaceResponseSchema, j as activitySixHours$1, k as activityDays$1, l as workspaceSchema, m as startServiceAccountSignInResponseSchema, n as statsReportSchema, o as workspaceListSchema, q as conversationChildAgentsReportSchema, s as workspaceParamsSchema, u as disconnectServiceAccountResponseSchema, w as personalSpendReportSchema, x as actorDirectoryReportSchema, y as personalTokenParamsSchema } from "./schema-CF9HqNRY.js";
|
|
25
28
|
import { Hono } from "hono";
|
|
26
29
|
import path from "node:path";
|
|
27
30
|
import { z } from "zod";
|
|
@@ -75,6 +78,13 @@ const requireViewer = createMiddleware(async (context, next) => {
|
|
|
75
78
|
if (!context.get("viewer")) throwApiError(401, "Authentication required.");
|
|
76
79
|
await next();
|
|
77
80
|
});
|
|
81
|
+
/** Require a Junior admin viewer. */
|
|
82
|
+
const requireAdmin = createMiddleware(async (context, next) => {
|
|
83
|
+
const viewer = context.get("viewer");
|
|
84
|
+
if (!viewer) throwApiError(401, "Authentication required.");
|
|
85
|
+
if (viewer.isAdmin !== true) throwApiError(403, "Only Junior admins can do this.");
|
|
86
|
+
await next();
|
|
87
|
+
});
|
|
78
88
|
// src/api/conversations/archive.ts
|
|
79
89
|
async function setViewerArchive(args) {
|
|
80
90
|
const executor = getSqlExecutor();
|
|
@@ -3633,7 +3643,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3633
3643
|
reports: [],
|
|
3634
3644
|
source: "plugins"
|
|
3635
3645
|
});
|
|
3636
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
3646
|
+
const { getPluginProfileReports } = await import("./agent-hooks-B00FaKdP.js").then((n) => n.t);
|
|
3637
3647
|
return pluginOperationalReportFeedSchema.parse({
|
|
3638
3648
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3639
3649
|
reports: await getPluginProfileReports({
|
|
@@ -4011,6 +4021,66 @@ function createPersonalTokenRoutes() {
|
|
|
4011
4021
|
});
|
|
4012
4022
|
return app;
|
|
4013
4023
|
}
|
|
4024
|
+
// src/api/service-accounts/routes.ts
|
|
4025
|
+
/**
|
|
4026
|
+
* Public URL of the OAuth callback for one plugin's service account.
|
|
4027
|
+
*
|
|
4028
|
+
* It uses the request origin unless `JUNIOR_BASE_URL` is set, so the
|
|
4029
|
+
* provider sends the Admin back to the dashboard session that started it.
|
|
4030
|
+
*/
|
|
4031
|
+
function callbackUrl(request, provider) {
|
|
4032
|
+
const base = process.env.JUNIOR_BASE_URL?.trim() || new URL(request.url).origin;
|
|
4033
|
+
return new URL(`api/service-accounts/${encodeURIComponent(provider)}/callback`, base.endsWith("/") ? base : `${base}/`).toString();
|
|
4034
|
+
}
|
|
4035
|
+
function requirePlugin(provider) {
|
|
4036
|
+
const plugin = pluginCatalogRuntime.getDefinition(provider);
|
|
4037
|
+
if (!plugin?.manifest.accounts?.serviceAccount) throwApiError(404, "Service account not found.");
|
|
4038
|
+
return plugin;
|
|
4039
|
+
}
|
|
4040
|
+
function callbackPage(title, message, status) {
|
|
4041
|
+
return htmlCallbackResponse(escapeXml(title), escapeXml(message), status, { footerMessage: "You can close this tab and return to the dashboard." });
|
|
4042
|
+
}
|
|
4043
|
+
/**
|
|
4044
|
+
* Create admin-only routes that list, connect, and disconnect plugin service
|
|
4045
|
+
* accounts.
|
|
4046
|
+
*
|
|
4047
|
+
* Whoever signs in decides which account everyone falls back to, so every
|
|
4048
|
+
* route, including the OAuth callback, requires a Junior admin. The callback
|
|
4049
|
+
* also accepts only a sign-in that the same Admin started.
|
|
4050
|
+
*/
|
|
4051
|
+
function createServiceAccountRoutes() {
|
|
4052
|
+
const app = new Hono();
|
|
4053
|
+
app.get("/", requireAdmin, async () => jsonResponse(serviceAccountListSchema, { serviceAccounts: await Promise.all(serviceAccountPlugins(pluginCatalogRuntime.getProviders()).map(getServiceAccountStatus)) }));
|
|
4054
|
+
app.post("/:provider", requireAdmin, validateRequest("param", serviceAccountParamsSchema, "Invalid provider."), async (context) => {
|
|
4055
|
+
const { provider } = context.req.valid("param");
|
|
4056
|
+
const { authorizationUrl } = await startServiceAccountSignIn({
|
|
4057
|
+
plugin: requirePlugin(provider),
|
|
4058
|
+
redirectUrl: callbackUrl(context.req.raw, provider),
|
|
4059
|
+
startedBy: context.get("viewer").email
|
|
4060
|
+
});
|
|
4061
|
+
return jsonResponse(startServiceAccountSignInResponseSchema, { authorizationUrl: authorizationUrl.toString() });
|
|
4062
|
+
});
|
|
4063
|
+
app.get("/:provider/callback", requireAdmin, validateRequest("param", serviceAccountParamsSchema, "Invalid provider."), async (context) => {
|
|
4064
|
+
const { provider } = context.req.valid("param");
|
|
4065
|
+
const plugin = requirePlugin(provider);
|
|
4066
|
+
const viewer = context.get("viewer");
|
|
4067
|
+
const result = await finishServiceAccountSignIn({
|
|
4068
|
+
callback: new URL(context.req.url).searchParams,
|
|
4069
|
+
connectedBy: viewer.email,
|
|
4070
|
+
plugin
|
|
4071
|
+
});
|
|
4072
|
+
if (!result.ok) return callbackPage("Connection failed", result.message, 400);
|
|
4073
|
+
logInfo("dashboard.service_account.connected", { "app.credential.provider": provider });
|
|
4074
|
+
return callbackPage(`${plugin.manifest.displayName} service account connected`, `People who have not connected ${plugin.manifest.displayName} now use this account for what its policy allows.`, 200);
|
|
4075
|
+
});
|
|
4076
|
+
app.delete("/:provider", requireAdmin, validateRequest("param", serviceAccountParamsSchema, "Invalid provider."), async (context) => {
|
|
4077
|
+
const { provider } = context.req.valid("param");
|
|
4078
|
+
await disconnectServiceAccount(requirePlugin(provider));
|
|
4079
|
+
logInfo("dashboard.service_account.disconnected", { "app.credential.provider": provider });
|
|
4080
|
+
return jsonResponse(disconnectServiceAccountResponseSchema, { disconnected: true });
|
|
4081
|
+
});
|
|
4082
|
+
return app;
|
|
4083
|
+
}
|
|
4014
4084
|
// src/chat/plugins/user-pages.ts
|
|
4015
4085
|
/**
|
|
4016
4086
|
* Runtime ownership for plugin user pages.
|
|
@@ -4581,7 +4651,7 @@ function readDescriptionText(home) {
|
|
|
4581
4651
|
}
|
|
4582
4652
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
4583
4653
|
async function readSkillReports() {
|
|
4584
|
-
const { discoverSkills } = await import("./skills-
|
|
4654
|
+
const { discoverSkills } = await import("./skills-CiWS5_Ub.js").then((n) => n.o);
|
|
4585
4655
|
const skills = await discoverSkills();
|
|
4586
4656
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
4587
4657
|
name: skill.name,
|
|
@@ -4590,7 +4660,7 @@ async function readSkillReports() {
|
|
|
4590
4660
|
}
|
|
4591
4661
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
4592
4662
|
async function readPlugins() {
|
|
4593
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
4663
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-B8SuFPGb.js").then((n) => n.t);
|
|
4594
4664
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
4595
4665
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
4596
4666
|
description: plugin.manifest.description,
|
|
@@ -4602,7 +4672,7 @@ async function readPlugins() {
|
|
|
4602
4672
|
async function readRuntimeInfoReport() {
|
|
4603
4673
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
4604
4674
|
import("./package-discovery-DJBompdd.js").then((n) => n.r),
|
|
4605
|
-
import("./catalog-runtime-
|
|
4675
|
+
import("./catalog-runtime-B8SuFPGb.js").then((n) => n.t),
|
|
4606
4676
|
readPlugins(),
|
|
4607
4677
|
readSkillReports()
|
|
4608
4678
|
]);
|
|
@@ -4619,7 +4689,7 @@ async function readRuntimeInfoReport() {
|
|
|
4619
4689
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
4620
4690
|
async function readPluginOperationalReportFeed() {
|
|
4621
4691
|
const nowMs = Date.now();
|
|
4622
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
4692
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-B00FaKdP.js").then((n) => n.t);
|
|
4623
4693
|
return pluginOperationalReportFeedSchema.parse({
|
|
4624
4694
|
source: "plugins",
|
|
4625
4695
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -4643,6 +4713,7 @@ function createJuniorApi(options = {}) {
|
|
|
4643
4713
|
app.route("/api/code", createCodeRoutes());
|
|
4644
4714
|
app.route("/api/connections", createConnectionRoutes());
|
|
4645
4715
|
app.route("/api/personal-tokens", createPersonalTokenRoutes());
|
|
4716
|
+
app.route("/api/service-accounts", createServiceAccountRoutes());
|
|
4646
4717
|
app.route("/api/people", createPeopleRoutes());
|
|
4647
4718
|
app.route("/api/locations", createLocationRoutes());
|
|
4648
4719
|
app.route("/api/user-pages", createUserPageRoutes());
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { n as ConversationWorkQueue, t as ConversationQueueMessage } from "./queue-C37RbDVc.js";
|
|
2
2
|
import { t as ConversationStore } from "./store-CG0VJyye.js";
|
|
3
3
|
import "./history-BgI33Kie.js";
|
|
4
|
-
import { n as JuniorPluginSet } from "./plugins-
|
|
4
|
+
import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
6
|
import "@earendil-works/pi-ai/compat";
|
|
7
7
|
import "@earendil-works/pi-ai/api/anthropic-messages";
|
|
8
|
+
import "ai";
|
|
8
9
|
import { z } from "zod";
|
|
9
10
|
import { Destination, OwnedObjectAnnotation, PluginRegistration, Source, User } from "@sentry/junior-plugin-api";
|
|
10
11
|
import "@earendil-works/pi-agent-core";
|
|
11
12
|
import "@earendil-works/pi-ai";
|
|
12
13
|
import "@sinclair/typebox";
|
|
13
14
|
import { Sandbox } from "@vercel/sandbox";
|
|
14
|
-
import { Client } from "@modelcontextprotocol/sdk/client";
|
|
15
15
|
import "@modelcontextprotocol/sdk/client/auth.js";
|
|
16
|
+
import { Client } from "@modelcontextprotocol/sdk/client";
|
|
16
17
|
import { Message, StateAdapter } from "chat";
|
|
17
18
|
import "@chat-adapter/slack";
|
|
18
19
|
declare const TURN_REASONING_LEVELS: readonly ["none", "low", "medium", "high", "xhigh"];
|
|
@@ -31,6 +32,8 @@ interface ModelProfileConfig {
|
|
|
31
32
|
/** App-level profile input: a model id string or a full profile config. */
|
|
32
33
|
type ModelProfileInput = string | ModelProfileConfig;
|
|
33
34
|
interface BotModelConfig {
|
|
35
|
+
/** Decision model used by the passive reply router. */
|
|
36
|
+
decisionModelId?: string;
|
|
34
37
|
/** Model used for embeddings. */
|
|
35
38
|
embeddingModelId?: string;
|
|
36
39
|
/** Model used for low-cost structured and utility calls. */
|
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-
|
|
2
|
-
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-
|
|
1
|
+
import { i as ModelProfileInput, n as createApp, r as JuniorDashboardOptions, t as JuniorAppOptions } from "./app-Bbxrehjf.js";
|
|
2
|
+
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-B_0Cr0MO.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-Cc2OFd9G.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorAppOptions, type JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };
|
package/dist/app.js
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { At as
|
|
2
|
-
import { C as withContext, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, R as normalizeIdentityEmail, T as withSpan, b as setSpanStatus, f as logException, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, m as logWarn, p as logInfo, r as createRequestContext, v as setSentryUser, w as withLogContext, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { At as parseSandboxEgressCredentialToken, B as effectiveTaskOutcomes, Ct as resolveSandboxEgressProviderForHost, Dt as clearSandboxEgressSignals, E as requestAttachmentDeletion, Et as SANDBOX_EGRESS_PROXY_PATH, F as logScheduledAutomationRunSkipped, Ft as startOAuthFlow, Gt as getConfigDefaults, I as scheduledAutomationRunAttributes, It as createUserTokenStore, Kt as setConfigDefaults, Mt as formatProviderLabel, O as parseSlackThreadId, Ot as consumeSandboxEgressAuthRequiredSignal, Pt as resolveBaseUrl, St as ingestEvent, Tt as shouldPropagateSandboxEgressTrace, U as stopConversationSession, W as recordSubagentEnded, b as unpublishedArtifactHeaders, i as executeCredentialedEgressRequest, kt as consumeSandboxEgressPermissionDeniedSignal, lt as listPendingAgentInvocationMailboxAppends, n as executeAgentRun, t as createAgentRunner, ut as listPendingAgentInvocationResults, v as publicArtifactHeaders, w as collectAttachmentGarbage, wt as normalizeSandboxEgressTracePropagationDomains, x as lookupSlackUserProfile, xt as processWorkspaceSnapshotJob, y as readPublicArtifact } from "./agent-runner-CPSd7rKm.js";
|
|
2
|
+
import { C as withContext, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, R as normalizeIdentityEmail, T as withSpan, b as setSpanStatus, f as logException, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, m as logWarn, p as logInfo, r as createRequestContext, v as setSentryUser, w as withLogContext, y as setSpanAttributes } from "./logging-BStXN56b.js";
|
|
3
3
|
import { n as captureMessage, r as continueTrace } from "./sentry-BBUlHih9.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-B_XumRx-.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-Deqpfpg9.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-tlxzqaRe.js";
|
|
7
|
-
import { N as recordGoogleSignIn, _ as withConversationMutationLock, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-
|
|
7
|
+
import { N as recordGoogleSignIn, _ as withConversationMutationLock, c as getConversationEventStore, d as getDb, f as getSqlExecutor, m as withConversationEventLock, r as readActorIdentity, u as getConversationStore } from "./viewer-B2_ABsYi.js";
|
|
8
8
|
import { a as juniorAgentInvocations, d as juniorDestinations, i as juniorAgentBindings, s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
|
|
9
|
-
import { a as juniorAutomationRuns, f as juniorConversationBriefs, h as juniorConversationEvents, s as juniorAutomations } from "./executor-
|
|
10
|
-
import { m as credentialLogContext } from "./registry-
|
|
11
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
12
|
-
import { C as automationVersionOf, Kt as projectConversationMessages, P as slackMention, U as slackEntitySchema, Ut as appendConversationMessages, W as slackExternalRefIdSchema, Yt as settleConversationTitleWork, b as admitEventAutomationRun, c as withScheduledAutomationLock, i as readScheduledAutomation, l as blockEventAutomation, n as listScheduledAutomationsForTeam, o as saveScheduledAutomationInLock, p as findMatchingEventAutomations, s as scheduledRunId, u as collectEventAutomationMatchKeys, x as eventAutomationRunLimitReason } from "./tasks-
|
|
13
|
-
import { $ as bindSlackDirectCredentialSubject, At as resolveRootVisibility, Ht as getSlackClient, Jt as getWorkspaceTeamId, Nt as listConversationAnnotations, Q as bindScheduledAutomationCredentialSubject, U as collectEventMatchKeys, Wt as isDmChannel, X as takeDueTimerWatches, Yt as runWithWorkspaceTeamId, Z as bindEventAutomationCredentialSubject, a as getPluginRoutes, at as getDashboardConversationLink, ct as setDashboardConversationLinkOptions, d as setPlugins, et as verifyEventAutomationCredentialSubject, f as validatePlugins, ft as createPluginLogger, h as setBriefsConfig, i as getPluginApiRoutes, lt as createPluginState, nt as verifySlackDirectCredentialSubject, pt as readConversationAccessFromSql, q as findMatchingWatches, st as getDashboardTaskLink, tt as verifyScheduledAutomationCredentialSubject, u as getPlugins } from "./agent-hooks-
|
|
9
|
+
import { a as juniorAutomationRuns, f as juniorConversationBriefs, h as juniorConversationEvents, s as juniorAutomations } from "./executor-Bb3eQb8q.js";
|
|
10
|
+
import { m as credentialLogContext } from "./registry-B_M_x_iS.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-B8SuFPGb.js";
|
|
12
|
+
import { C as automationVersionOf, Kt as projectConversationMessages, P as slackMention, U as slackEntitySchema, Ut as appendConversationMessages, W as slackExternalRefIdSchema, Yt as settleConversationTitleWork, b as admitEventAutomationRun, c as withScheduledAutomationLock, i as readScheduledAutomation, l as blockEventAutomation, n as listScheduledAutomationsForTeam, o as saveScheduledAutomationInLock, p as findMatchingEventAutomations, s as scheduledRunId, u as collectEventAutomationMatchKeys, x as eventAutomationRunLimitReason } from "./tasks-DieKX3d4.js";
|
|
13
|
+
import { $ as bindSlackDirectCredentialSubject, At as resolveRootVisibility, Ht as getSlackClient, Jt as getWorkspaceTeamId, Nt as listConversationAnnotations, Q as bindScheduledAutomationCredentialSubject, U as collectEventMatchKeys, Wt as isDmChannel, X as takeDueTimerWatches, Yt as runWithWorkspaceTeamId, Z as bindEventAutomationCredentialSubject, a as getPluginRoutes, at as getDashboardConversationLink, ct as setDashboardConversationLinkOptions, d as setPlugins, et as verifyEventAutomationCredentialSubject, f as validatePlugins, ft as createPluginLogger, h as setBriefsConfig, i as getPluginApiRoutes, lt as createPluginState, nt as verifySlackDirectCredentialSubject, pt as readConversationAccessFromSql, q as findMatchingWatches, st as getDashboardTaskLink, tt as verifyScheduledAutomationCredentialSubject, u as getPlugins } from "./agent-hooks-B00FaKdP.js";
|
|
14
14
|
import { W as annotationCard } from "./conversation-DjN3mlog.js";
|
|
15
|
-
import {
|
|
16
|
-
import { l as
|
|
17
|
-
import {
|
|
15
|
+
import { l as getThreadStopDecision, o as SubscribedReplyReason } from "./pending-auth-rG5U_QS1.js";
|
|
16
|
+
import { b as eventGuidance, f as slackChannelMessageEvent, k as renderTaskInput, l as getEventCatalog, m as slackChannelMessageRunsAutomation, p as slackChannelMessageReplyThreadTs, u as SLACK_EVENT_NAMESPACE } from "./session-stop-CV65ZlU3.js";
|
|
17
|
+
import { r as getStateAdapter, s as withLock$1 } from "./adapter-Bn0gFVSF.js";
|
|
18
18
|
import { n as getNextRunAtMs } from "./cadence-R7Em4RjE.js";
|
|
19
|
-
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-
|
|
20
|
-
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-
|
|
21
|
-
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-
|
|
19
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-BzpuLh8c.js";
|
|
20
|
+
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-vdGU-5ge.js";
|
|
21
|
+
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-B1GES4gC.js";
|
|
22
22
|
import { D as scheduledRunSchema } from "./automation-DWBFBenG.js";
|
|
23
23
|
import { i as setExperimentalFeatures, n as getExperimentalFeatures, r as isExperimentalFeatureEnabled } from "./experimental-BNK1l1jv.js";
|
|
24
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
24
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-23d7K9tX.js";
|
|
25
25
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-DOm9Y6qI.js";
|
|
26
|
-
import { A as THREAD_OPTOUT_ACK, C as buildSlackInboundMessage, D as normalizeIncomingSlackThreadId, E as stopSlackThread, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as parseContent, N as runWithSlackInstallation, O as withNormalizedThreadId, P as verifySlackSignature, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as isSlackMessageStopped, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as startProcessingReaction, k as stopConversationTurn, 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-
|
|
27
|
-
import { C as existingConversationId, N as recordAutomationExecution, c as getDispatchConversationId, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-
|
|
28
|
-
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-
|
|
29
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
30
|
-
import { s as coerceThreadConversationState } from "./thread-state-
|
|
31
|
-
import { o as unlinkProvider } from "./connections-
|
|
32
|
-
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
33
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
34
|
-
import { t as processConversationWork } from "./worker-
|
|
35
|
-
import { t as bindMessageAgent } from "./message-
|
|
36
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
26
|
+
import { A as THREAD_OPTOUT_ACK, C as buildSlackInboundMessage, D as normalizeIncomingSlackThreadId, E as stopSlackThread, F as renderSlackObjectCard, I as createVercelAttachmentStorage, M as parseContent, N as runWithSlackInstallation, O as withNormalizedThreadId, P as verifySlackSignature, R as enqueueAgentDispatch, S as recordSkippedConversationMessage, T as isSlackMessageStopped, a as recordWebConversationActivity, c as createProductionSlackWebhookServices, f as createSlackWebApiStatusSender, j as startProcessingReaction, k as stopConversationTurn, 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-BZDyxpzR.js";
|
|
27
|
+
import { C as existingConversationId, N as recordAutomationExecution, c as getDispatchConversationId, d as getDispatchRecord, h as listPendingDispatchMailboxAppends, i as buildDispatchId, m as isTerminalDispatchStatus, o as confirmDispatchMailboxAppend, p as getPluginDispatchProjection, s as createOrGetDispatch, t as processPluginTask, x as notifyAutomationBlocked, y as markDispatchFailed } from "./task-runner-BlGhcQPi.js";
|
|
28
|
+
import { o as getAuthPausedConversationTurnId, t as enqueueAgentInvocationResult } from "./result-DEZH_AnZ.js";
|
|
29
|
+
import { r as enqueueAgentInvocation } from "./work-D3QKiV0O.js";
|
|
30
|
+
import { s as coerceThreadConversationState } from "./thread-state-DpSWS4Rr.js";
|
|
31
|
+
import { o as unlinkProvider } from "./connections-9gJkfS85.js";
|
|
32
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-BABGymK3.js";
|
|
33
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BAeGEMjJ.js";
|
|
34
|
+
import { t as processConversationWork } from "./worker-C8mUjYf9.js";
|
|
35
|
+
import { t as bindMessageAgent } from "./message-DRf6m4uO.js";
|
|
36
|
+
import { t as bindSpawnAgent } from "./spawn-BSAQ7UQZ.js";
|
|
37
37
|
import { createRequire } from "node:module";
|
|
38
38
|
import { Hono } from "hono";
|
|
39
39
|
import { z } from "zod";
|
|
@@ -5297,6 +5297,8 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
5297
5297
|
"/api/people/*",
|
|
5298
5298
|
"/api/personal-tokens",
|
|
5299
5299
|
"/api/personal-tokens/*",
|
|
5300
|
+
"/api/service-accounts",
|
|
5301
|
+
"/api/service-accounts/*",
|
|
5300
5302
|
"/api/workspaces",
|
|
5301
5303
|
"/api/workspaces/*",
|
|
5302
5304
|
"/api/config",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as completeObject } from "./client-BZdxgKyL.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
|
|
3
3
|
import { U as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-DjN3mlog.js";
|
|
4
4
|
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-xgpyMtg7.js";
|
|
@@ -267,7 +267,7 @@ async function parseRunOptions(argv) {
|
|
|
267
267
|
* `DATABASE_URL` at import, and `briefs pull` must work with only a token.
|
|
268
268
|
*/
|
|
269
269
|
async function configuredDefaultModelId() {
|
|
270
|
-
const { botConfig } = await import("./config-
|
|
270
|
+
const { botConfig } = await import("./config-Deqpfpg9.js").then((n) => n.r);
|
|
271
271
|
return defaultModelId(botConfig);
|
|
272
272
|
}
|
|
273
273
|
function apiUrl(baseUrl, pathname) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { t as createPluginCatalogRuntime } from "./registry-
|
|
2
|
+
import { t as createPluginCatalogRuntime } from "./registry-B_M_x_iS.js";
|
|
3
3
|
// src/chat/plugins/catalog-runtime.ts
|
|
4
4
|
var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
|
|
5
5
|
const pluginCatalogRuntime = createPluginCatalogRuntime();
|
package/dist/cli/chat.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "../plugins-
|
|
1
|
+
import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
|
|
2
2
|
export declare const CHAT_USAGE = "usage: junior chat\n junior chat -p <message>";
|
|
3
3
|
export type ChatCommandOptions = {
|
|
4
4
|
mode: "interactive";
|
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-CPSd7rKm.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
|
|
|
99
99
|
async function configureLocalChatPlugins(pluginSet) {
|
|
100
100
|
const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
|
|
101
101
|
import("../plugins-DOm9Y6qI.js").then((n) => n.o),
|
|
102
|
-
import("../agent-hooks-
|
|
103
|
-
import("../catalog-runtime-
|
|
104
|
-
import("../validation-
|
|
105
|
-
import("../viewer-
|
|
102
|
+
import("../agent-hooks-B00FaKdP.js").then((n) => n.t),
|
|
103
|
+
import("../catalog-runtime-B8SuFPGb.js").then((n) => n.t),
|
|
104
|
+
import("../validation-23d7K9tX.js").then((n) => n.r),
|
|
105
|
+
import("../viewer-B2_ABsYi.js").then((n) => n.s)
|
|
106
106
|
]);
|
|
107
107
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
108
108
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -154,19 +154,19 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
154
154
|
await configureLocalChatPlugins(pluginSet);
|
|
155
155
|
const { setExperimentalFeatures } = await import("../experimental-BNK1l1jv.js").then((n) => n.t);
|
|
156
156
|
setExperimentalFeatures({ subagents: true });
|
|
157
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
157
|
+
const { setBriefsConfig } = await import("../agent-hooks-B00FaKdP.js").then((n) => n.m);
|
|
158
158
|
setBriefsConfig({ enabled: true });
|
|
159
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
160
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
159
|
+
const { runLocalAgentTurn } = await import("../runner-BqQlG10t.js");
|
|
160
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-JmOgLcGl.js");
|
|
161
161
|
const { createLocalOAuthState } = await import("../oauth-relay-CTygMkNx.js").then((n) => n.t);
|
|
162
|
-
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-
|
|
163
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
164
|
-
const { bindMessageAgent } = await import("../message-
|
|
165
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
166
|
-
const { startAgentInvocationsForChildInput } = await import("../result-
|
|
167
|
-
const { skipInputBeforeConversationStop } = await import("../session-stop-
|
|
162
|
+
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DCq3WLs5.js");
|
|
163
|
+
const { bindSpawnAgent } = await import("../spawn-BSAQ7UQZ.js").then((n) => n.n);
|
|
164
|
+
const { bindMessageAgent } = await import("../message-DRf6m4uO.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-D3QKiV0O.js").then((n) => n.a);
|
|
166
|
+
const { startAgentInvocationsForChildInput } = await import("../result-DEZH_AnZ.js").then((n) => n.r);
|
|
167
|
+
const { skipInputBeforeConversationStop } = await import("../session-stop-CV65ZlU3.js").then((n) => n.r);
|
|
168
168
|
const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
|
|
169
|
-
const { processConversationWork } = await import("../worker-
|
|
169
|
+
const { processConversationWork } = await import("../worker-C8mUjYf9.js").then((n) => n.n);
|
|
170
170
|
let agentRunner;
|
|
171
171
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
172
172
|
if (!agentRunner) throw new Error("Local agent runner is not ready");
|
package/dist/cli/check.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-
|
|
2
|
-
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, N as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, O as JUNIOR_HEARTBEAT_ROUTE } from "../logging-BStXN56b.js";
|
|
2
|
+
import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-B_M_x_iS.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-CiWS5_Ub.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,13 @@ 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-C8xz2f10.js")).runAdmin(argv);
|
|
29
|
+
}
|
|
30
|
+
async function runServiceAccount(argv) {
|
|
31
|
+
return await (await import("../service-account-BqTBkyD7.js")).runServiceAccount(argv);
|
|
29
32
|
}
|
|
30
33
|
async function runBriefs(argv) {
|
|
31
|
-
return await (await import("../briefs-
|
|
34
|
+
return await (await import("../briefs-DNYbQ9cD.js")).runBriefs(argv);
|
|
32
35
|
}
|
|
33
36
|
function topLevelCommand(argv) {
|
|
34
37
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
|
@@ -45,6 +48,7 @@ async function runMain(argv, options = {}) {
|
|
|
45
48
|
const exitCode = await runCli(argv, {
|
|
46
49
|
runAdmin,
|
|
47
50
|
runBriefs,
|
|
51
|
+
runServiceAccount,
|
|
48
52
|
runChat: async (chatArgv) => await runChat(chatArgv, pluginSet),
|
|
49
53
|
runInit,
|
|
50
54
|
runSnapshotCreate,
|
package/dist/cli/plugins.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as JuniorPluginSet } from "../plugins-
|
|
1
|
+
import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
|
|
2
2
|
import { PluginCliIo } from "@sentry/junior-plugin-api";
|
|
3
3
|
export type PluginCommandIo = PluginCliIo;
|
|
4
4
|
export interface CliPluginCommandDispatcher {
|
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, ft as createPluginLogger } from "../agent-hooks-
|
|
4
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { d as getDb } from "../viewer-B2_ABsYi.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-B8SuFPGb.js";
|
|
3
|
+
import { d as setPlugins, f as validatePlugins, ft as createPluginLogger } from "../agent-hooks-B00FaKdP.js";
|
|
4
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-23d7K9tX.js";
|
|
5
5
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
|
|
6
6
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import { stderr, stdout } from "node:process";
|
package/dist/cli/run.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
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>]";
|
|
1
|
+
export declare const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior service-account connect|status|disconnect <plugin>\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
2
|
interface CliHandlers {
|
|
3
3
|
runAdmin: (argv: string[]) => Promise<number>;
|
|
4
4
|
runBriefs: (argv: string[]) => Promise<number>;
|
|
5
|
+
runServiceAccount: (argv: string[]) => Promise<number>;
|
|
5
6
|
runChat: (argv: string[]) => Promise<number>;
|
|
6
7
|
runInit: (dir: string) => Promise<void>;
|
|
7
8
|
runSnapshotCreate: () => Promise<void>;
|
package/dist/cli/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/cli/run.ts
|
|
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>]";
|
|
2
|
+
const CLI_USAGE = "usage: junior init <dir>\n junior admin list|grant <email>|revoke <email>\n junior service-account connect|status|disconnect <plugin>\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) {
|
|
@@ -10,6 +10,7 @@ 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
12
|
if (command === "admin") return await handlers.runAdmin(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
13
|
+
if (command === "service-account") return await handlers.runServiceAccount(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
13
14
|
if (command === "briefs") return await handlers.runBriefs(subcommand === void 0 ? [] : [subcommand, ...rest]);
|
|
14
15
|
if (command === "init") {
|
|
15
16
|
if (!subcommand || rest.length > 0) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-B8SuFPGb.js";
|
|
2
|
+
import { t as create } from "../profile-qBM6B_-V.js";
|
|
3
|
+
import { t as disconnectStateAdapter } from "../adapter-Bn0gFVSF.js";
|
|
4
|
+
import { r as resolve } from "../resolve-BzpuLh8c.js";
|
|
4
5
|
// src/cli/snapshot-create.ts
|
|
5
6
|
const DEFAULT_RUNTIME = "node22";
|
|
6
7
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.d.ts
CHANGED
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-Deqpfpg9.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-Bb3eQb8q.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-B_M_x_iS.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|