@sentry/junior 0.228.0 → 0.230.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/{agent-hooks-DUQ3ASdp.js → agent-hooks-Im1UUKhZ.js} +10 -10
- package/dist/{agent-runner-CIesujf5.js → agent-runner-B9dvsdM8.js} +52 -37
- package/dist/api/schema.d.ts +20 -269
- package/dist/api/schema.js +3 -3
- package/dist/api.js +18 -18
- package/dist/{app-BRZB3MuD.d.ts → app-xk2-Id1T.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +22 -21
- package/dist/{briefs-BTrVMqUg.js → briefs-BC3DPfsh.js} +4 -4
- package/dist/{catalog-runtime-NOBDOyJi.js → catalog-runtime-Blx7IGY9.js} +1 -1
- package/dist/{checkpoint-CzN3gXoB.js → checkpoint-BDaS7x3C.js} +7 -9
- package/dist/cli/chat.js +13 -13
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +3 -3
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-C6VUBzL_.js → client-DucHsb6b.js} +3 -5
- package/dist/{config-BLPaWN1Q.js → config-HqsfInxG.js} +2 -2
- package/dist/{conversation-DOI6Y60M.js → conversation-DsuDtoYR.js} +96 -74
- package/dist/{conversation-privacy-DJ88ECSq.js → conversation-privacy-k2Ucs1Lg.js} +1 -1
- package/dist/{credential-sync-OKs419AB.js → credential-sync-DEF6P_Qr.js} +13 -13
- package/dist/{executor-DZVZBfmX.js → executor-C-LEhjeD.js} +1 -1
- package/dist/history-DvqWZlYX.d.ts +86 -0
- package/dist/{images-D3x6EemU.js → images-owPAu3eq.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-BuSPM0cX.js → job-queue-CpNnv-n1.js} +1 -1
- package/dist/{logging-Blgn76r3.js → logging-BO1fVUQe.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-t-NPqTNB.js → oauth-authorization-DPPpHxSI.js} +1 -1
- package/dist/{oauth-callback-server-BP7SgTcu.js → oauth-callback-server-BvVXBrQt.js} +2 -2
- package/dist/{pending-auth-CXLwmDaG.js → pending-auth-BWgfMCZE.js} +1 -1
- package/dist/{profile-a5xmeUHf.js → profile-DpHUuqjR.js} +4 -4
- package/dist/{prompt-9C-wUwwx.js → prompt-D5RPLy92.js} +1 -1
- package/dist/{registry-BUbczT2k.js → registry-CIi9NkkR.js} +1 -1
- package/dist/{resolve-3PhWSiEF.js → resolve-SohTTVYa.js} +2 -2
- package/dist/{runner-CsnuKcsq.js → runner-JhOJ60On.js} +9 -9
- package/dist/{sandbox-egress-signals-D34sI4J6.js → sandbox-egress-signals-DyO-LeUT.js} +1 -1
- package/dist/{schema-CXmCvVLn.js → schema-B-Taar1W.js} +1 -1
- package/dist/{skills-CLgyYrgF.js → skills-DElnSC0r.js} +2 -2
- package/dist/{spawn-CS56i7Nm.js → spawn-DrH6CP9W.js} +2 -2
- package/dist/{task-queue-C2sTDXqQ.js → task-queue-BEzJHMbQ.js} +3 -3
- package/dist/{task-runner-uSodiP4v.js → task-runner-DrC1UgCK.js} +9 -9
- package/dist/{thread-state-BurqeqMv.js → thread-state-BIXM2uhZ.js} +5 -5
- package/dist/{turn-failure-response-Bshcqa0a.js → turn-failure-response-9Ql2NYKh.js} +17 -15
- package/dist/{turn-lifecycle-foKlVl_T.js → turn-lifecycle-_YDXUFqj.js} +1 -1
- package/dist/{turn-session-routing-DDUMJ2GY.js → turn-session-routing-DYxwlqQl.js} +1 -1
- package/dist/{validation-DZc56dXw.js → validation-_gPdrVG7.js} +1 -1
- package/dist/{version-y4cRp5Y2.js → version-Y7rGnMXG.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-BfVYx0t1.js → web-authorization-COF8MUa5.js} +6 -6
- package/dist/{web-input-B6FZlrgg.js → web-input-BmLFoSUw.js} +49 -31
- package/dist/{work-Dy8sW9MZ.js → work-CP3L3bNf.js} +7 -7
- package/dist/{worker-BH0RP7Hj.js → worker-DlZMqtCm.js} +5 -5
- package/package.json +5 -5
- package/dist/history-H-SI5Dej.d.ts +0 -128
package/dist/api.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { Ct as cancelHumanFacingPendingMessages, M as parseSlackThreadId, Nt as getConversation, b as readStats, k as readLiveAttachment } from "./agent-runner-
|
|
2
|
-
import { d as logException, p as logWarn } from "./logging-
|
|
1
|
+
import { Ct as cancelHumanFacingPendingMessages, M as parseSlackThreadId, Nt as getConversation, b as readStats, k as readLiveAttachment } from "./agent-runner-B9dvsdM8.js";
|
|
2
|
+
import { d as logException, p as logWarn } from "./logging-BO1fVUQe.js";
|
|
3
3
|
import { b as parseSlackMessageTs, h as parseSlackTeamId, p as parseSlackChannelId } from "./context-0Et9iVSB.js";
|
|
4
|
-
import { $ as resolveViewerUser, $t as getConversationStore, At as conversationNotArchivedForEmail, Ct as createPluginLogger, D as SANDBOX_RUNTIME, Dt as conversationArchivedForUser, Et as conversationArchivedForEmail, Ft as readConversationEventPage, Gt as listConversationAnnotationsById, It as buildSentryConversationUrl, J as withSlackRetries, Mt as viewerConversationMembership, Ot as conversationHasParticipantEmail, Pt as readLatestConversationBrief, S as WorkspaceValidationError, Tt as conversationArchiveTimes, U as getSlackClient, Wt as listConversationAnnotations, Z as findUserByEmail, _ as deleteWorkspace, an as locationFromRow, b as listWorkspaces, dn as agentTurnUsageSchema, en as getDb, et as updateViewerDisplayName, fn as hasAgentTurnUsage, g as createWorkspace, j as workspaceRepoCheckoutPath, jt as conversationNotArchivedForUser, kt as conversationHasParticipantUser, pn as resolveRootConversationId, sn as parseSessionSource, tn as getSqlExecutor, u as getPlugins, v as getWorkspace, wt as readConversationAccessFromSql, x as updateWorkspace } from "./agent-hooks-
|
|
4
|
+
import { $ as resolveViewerUser, $t as getConversationStore, At as conversationNotArchivedForEmail, Ct as createPluginLogger, D as SANDBOX_RUNTIME, Dt as conversationArchivedForUser, Et as conversationArchivedForEmail, Ft as readConversationEventPage, Gt as listConversationAnnotationsById, It as buildSentryConversationUrl, J as withSlackRetries, Mt as viewerConversationMembership, Ot as conversationHasParticipantEmail, Pt as readLatestConversationBrief, S as WorkspaceValidationError, Tt as conversationArchiveTimes, U as getSlackClient, Wt as listConversationAnnotations, Z as findUserByEmail, _ as deleteWorkspace, an as locationFromRow, b as listWorkspaces, dn as agentTurnUsageSchema, en as getDb, et as updateViewerDisplayName, fn as hasAgentTurnUsage, g as createWorkspace, j as workspaceRepoCheckoutPath, jt as conversationNotArchivedForUser, kt as conversationHasParticipantUser, pn as resolveRootConversationId, sn as parseSessionSource, tn as getSqlExecutor, u as getPlugins, v as getWorkspace, wt as readConversationAccessFromSql, x as updateWorkspace } from "./agent-hooks-Im1UUKhZ.js";
|
|
5
5
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
6
|
-
import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, b as juniorApiTokens, g as juniorConversationBriefs, m as juniorConversationParticipants, v as juniorConversationMetrics, y as juniorConversationEvents } from "./executor-
|
|
7
|
-
import { D as createConversationBodySchema,
|
|
8
|
-
import { n as hash, t as create } from "./profile-
|
|
9
|
-
import { t as getCachedSnapshot } from "./resolve-
|
|
10
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
6
|
+
import { C as juniorCodeRepositories, D as juniorIdentities, E as juniorConversations, O as juniorUsers, S as juniorCodeChanges, T as conversationReadColumns, b as juniorApiTokens, g as juniorConversationBriefs, m as juniorConversationParticipants, v as juniorConversationMetrics, y as juniorConversationEvents } from "./executor-C-LEhjeD.js";
|
|
7
|
+
import { D as createConversationBodySchema, M as INPUT_IMAGE_TYPES, O as createConversationMessageBodySchema, 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 readMessageAttachments, m as conversationEventsQuerySchema, o as cancelConversationPendingMessagesResponseSchema, p as conversationEventPageSchema, r as archiveConversationBodySchema, t as acceptedConversationMessageSchema, u as conversationDetailQuerySchema, x as conversationPendingMessagesReportSchema } from "./conversation-DsuDtoYR.js";
|
|
8
|
+
import { n as hash, t as create } from "./profile-DpHUuqjR.js";
|
|
9
|
+
import { t as getCachedSnapshot } from "./resolve-SohTTVYa.js";
|
|
10
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-CpNnv-n1.js";
|
|
11
11
|
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";
|
|
12
|
-
import { F as createVercelAttachmentStorage, _ as readViewerAutomations, a as webActorFromEmail, b as clearSlackPendingReactions, c as getProductionSlackAdapter, d as ViewerTaskNotFoundError, f as deleteViewerTask, h as readViewerAutomationRuns, k as legacyWebMailboxMetadataSchema, l as formatSlackConversationRedactedLabel, m as readViewerAutomationExecutions, p as readConversationSourceTask, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as resolveSlackConversationContextFromThreadId, x as lookupSlackUser, z as readHealthReport } from "./web-input-
|
|
13
|
-
import { A as conversationAggregateColumns, j as conversationRangeColumns, k as conversationActiveDaysColumn } from "./task-runner-
|
|
14
|
-
import { r as getWebAuthorization } from "./web-authorization-
|
|
15
|
-
import { t as decodeInputImages } from "./images-
|
|
16
|
-
import { A as actorProfileReportSchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, I as locationParamsSchema, L as activityDays$1, M as personalSpendReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, R as activityHours$1, T as personalTokenListSchema, W as codeOverviewReportSchema, _ as automationRunListSchema, a as workspaceBodySchema, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, o as workspaceListSchema, q as apiErrorSchema, s as workspaceParamsSchema, u as automationExecutionListSchema, w as createdPersonalTokenSchema, z as activitySixHours$1 } from "./schema-
|
|
12
|
+
import { F as createVercelAttachmentStorage, _ as readViewerAutomations, a as webActorFromEmail, b as clearSlackPendingReactions, c as getProductionSlackAdapter, d as ViewerTaskNotFoundError, f as deleteViewerTask, h as readViewerAutomationRuns, k as legacyWebMailboxMetadataSchema, l as formatSlackConversationRedactedLabel, m as readViewerAutomationExecutions, p as readConversationSourceTask, r as createAndEnqueueConversation, t as appendAndEnqueueWebMessage, u as resolveSlackConversationContextFromThreadId, x as lookupSlackUser, z as readHealthReport } from "./web-input-BmLFoSUw.js";
|
|
13
|
+
import { A as conversationAggregateColumns, j as conversationRangeColumns, k as conversationActiveDaysColumn } from "./task-runner-DrC1UgCK.js";
|
|
14
|
+
import { r as getWebAuthorization } from "./web-authorization-COF8MUa5.js";
|
|
15
|
+
import { t as decodeInputImages } from "./images-owPAu3eq.js";
|
|
16
|
+
import { A as actorProfileReportSchema, C as createPersonalTokenBodySchema, D as personalTokenParamsSchema, F as locationDirectoryReportSchema, G as codePersonReportSchema, I as locationParamsSchema, L as activityDays$1, M as personalSpendReportSchema, O as revokePersonalTokenResponseSchema, P as locationDetailReportSchema, R as activityHours$1, T as personalTokenListSchema, W as codeOverviewReportSchema, _ as automationRunListSchema, a as workspaceBodySchema, g as automationParamsSchema, h as automationListSchema, i as deleteWorkspaceResponseSchema, j as personParamsSchema, k as actorDirectoryReportSchema, l as workspaceSchema, m as automationListQuerySchema, n as statsReportSchema, o as workspaceListSchema, q as apiErrorSchema, s as workspaceParamsSchema, u as automationExecutionListSchema, w as createdPersonalTokenSchema, z as activitySixHours$1 } from "./schema-B-Taar1W.js";
|
|
17
17
|
import { Hono } from "hono";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -3059,7 +3059,7 @@ async function readPeoplePluginReports(args) {
|
|
|
3059
3059
|
reports: [],
|
|
3060
3060
|
source: "plugins"
|
|
3061
3061
|
});
|
|
3062
|
-
const { getPluginProfileReports } = await import("./agent-hooks-
|
|
3062
|
+
const { getPluginProfileReports } = await import("./agent-hooks-Im1UUKhZ.js").then((n) => n.t);
|
|
3063
3063
|
return pluginOperationalReportFeedSchema.parse({
|
|
3064
3064
|
generatedAt: new Date(nowMs).toISOString(),
|
|
3065
3065
|
reports: await getPluginProfileReports({
|
|
@@ -3668,7 +3668,7 @@ function readDescriptionText(home) {
|
|
|
3668
3668
|
}
|
|
3669
3669
|
/** Read discovered skill names for authenticated runtime diagnostics. */
|
|
3670
3670
|
async function readSkillReports() {
|
|
3671
|
-
const { discoverSkills } = await import("./skills-
|
|
3671
|
+
const { discoverSkills } = await import("./skills-DElnSC0r.js").then((n) => n.o);
|
|
3672
3672
|
const skills = await discoverSkills();
|
|
3673
3673
|
return skillReportsSchema.parse(skills.map((skill) => ({
|
|
3674
3674
|
name: skill.name,
|
|
@@ -3677,7 +3677,7 @@ async function readSkillReports() {
|
|
|
3677
3677
|
}
|
|
3678
3678
|
/** Read safe configured plugin metadata for authenticated runtime diagnostics. */
|
|
3679
3679
|
async function readPlugins() {
|
|
3680
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
3680
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-Blx7IGY9.js").then((n) => n.t);
|
|
3681
3681
|
return pluginsSchema.parse(pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
3682
3682
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
3683
3683
|
description: plugin.manifest.description,
|
|
@@ -3689,7 +3689,7 @@ async function readPlugins() {
|
|
|
3689
3689
|
async function readRuntimeInfoReport() {
|
|
3690
3690
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
3691
3691
|
import("./package-discovery-7a9YqLhE.js").then((n) => n.r),
|
|
3692
|
-
import("./catalog-runtime-
|
|
3692
|
+
import("./catalog-runtime-Blx7IGY9.js").then((n) => n.t),
|
|
3693
3693
|
readPlugins(),
|
|
3694
3694
|
readSkillReports()
|
|
3695
3695
|
]);
|
|
@@ -3706,7 +3706,7 @@ async function readRuntimeInfoReport() {
|
|
|
3706
3706
|
/** Read sanitized operational summaries contributed by plugins. */
|
|
3707
3707
|
async function readPluginOperationalReportFeed() {
|
|
3708
3708
|
const nowMs = Date.now();
|
|
3709
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
3709
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-Im1UUKhZ.js").then((n) => n.t);
|
|
3710
3710
|
return pluginOperationalReportFeedSchema.parse({
|
|
3711
3711
|
source: "plugins",
|
|
3712
3712
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as ConversationStore } from "./store-DoewL5mG.js";
|
|
2
|
-
import "./history-
|
|
2
|
+
import "./history-DvqWZlYX.js";
|
|
3
3
|
import { n as JuniorPluginSet } from "./plugins-BT2l4We3.js";
|
|
4
4
|
import { Hono } from "hono";
|
|
5
5
|
import "@earendil-works/pi-ai/compat";
|
|
6
6
|
import "@earendil-works/pi-ai/api/anthropic-messages";
|
|
7
7
|
import { z } from "zod";
|
|
8
|
-
import { Destination, Source, User } from "@sentry/junior-plugin-api";
|
|
8
|
+
import { Destination, OwnedObjectAnnotation, Source, User } from "@sentry/junior-plugin-api";
|
|
9
9
|
import "@earendil-works/pi-agent-core";
|
|
10
10
|
import "@earendil-works/pi-ai";
|
|
11
11
|
import { Sandbox } from "@vercel/sandbox";
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ModelProfileInput, n as JuniorDashboardOptions, r as createApp, t as JuniorAppOptions } from "./app-
|
|
1
|
+
import { i as ModelProfileInput, n as JuniorDashboardOptions, r as createApp, t as JuniorAppOptions } from "./app-xk2-Id1T.js";
|
|
2
2
|
import { i as defineJuniorPlugins, n as JuniorPluginSet, r as JuniorPluginSetOptions, t as JuniorPluginInput } from "./plugins-BT2l4We3.js";
|
|
3
3
|
import { t as JUNIOR_VERSION } from "./version-CnXZ614E.js";
|
|
4
4
|
export { JUNIOR_VERSION, JuniorAppOptions, JuniorDashboardOptions, type JuniorPluginInput, type JuniorPluginSet, type JuniorPluginSetOptions, type ModelProfileInput, createApp, defineJuniorPlugins };
|
package/dist/app.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { $ as collectEventAutomationMatchKeys, A as requestAttachmentDeletion, An as getConfigDefaults, Bt as removeActiveConversation, C as readPublicArtifact, Cn as createUserTokenStore, Et as clearExpiredConversationLease, Ft as hasRunnableConversationWork, G as readScheduledAutomation, H as listScheduledAutomations, Ht as requestConversationWork, It as listActiveConversationIds, J as scheduledRunId, Jt as hasRunnableConversationWork$1, Kt as CONVERSATION_WORK_STALE_ENQUEUE_MS, L as logScheduledAutomationRunSkipped, M as parseSlackThreadId, Mt as ensureConversationWake, Nt as getConversation, O as collectAttachmentGarbage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, R as scheduledAutomationRunAttributes, S as publicArtifactHeaders, Sn as slackExternalRefIdSchema, T as lookupSlackUserProfile, U as listScheduledAutomationsForTeam, Wt as stopConversationWork, X as scheduledRunSchema, Xt as isInvalidConversationRecordError, Y as withScheduledAutomationLock, Zt as renderTaskInput, _t as getEventCatalog, a as isExperimentalFeatureEnabled, an as consumeSandboxEgressAuthRequiredSignal, en as resolveSandboxEgressProviderForHost, f as deleteMcpAuthSessionsForUserProvider, fn as startOAuthFlow, i as getExperimentalFeatures, in as clearSandboxEgressSignals, jn as setConfigDefaults, l as executeCredentialedEgressRequest, ln as formatProviderLabel, m as deleteMcpStoredOAuthCredentials, mt as ingestEvent, nn as shouldPropagateSandboxEgressTrace, nt as findMatchingEventAutomations, o as setExperimentalFeatures, on as consumeSandboxEgressPermissionDeniedSignal, p as deleteMcpServerSessionId, pt as processWorkspaceSnapshotJob, q as saveScheduledAutomationInLock, rn as SANDBOX_EGRESS_PROXY_PATH, s as executeAgentRun, sn as parseSandboxEgressCredentialToken, t as createAgentRunner, tn as normalizeSandboxEgressTracePropagationDomains, vt as eventGuidance, w as unpublishedArtifactHeaders, xn as slackEntitySchema, xt as appendAndEnqueueInboundMessage, z as getNextRunAtMs } from "./agent-runner-
|
|
2
|
-
import { C as withLogContext, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, S as withContext, d as logException, f as logInfo, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, p as logWarn, r as createRequestContext, v as setSpanAttributes, w as withSpan, y as setSpanStatus } from "./logging-
|
|
1
|
+
import { $ as collectEventAutomationMatchKeys, A as requestAttachmentDeletion, An as getConfigDefaults, Bt as removeActiveConversation, C as readPublicArtifact, Cn as createUserTokenStore, Et as clearExpiredConversationLease, Ft as hasRunnableConversationWork, G as readScheduledAutomation, H as listScheduledAutomations, Ht as requestConversationWork, It as listActiveConversationIds, J as scheduledRunId, Jt as hasRunnableConversationWork$1, Kt as CONVERSATION_WORK_STALE_ENQUEUE_MS, L as logScheduledAutomationRunSkipped, M as parseSlackThreadId, Mt as ensureConversationWake, Nt as getConversation, O as collectAttachmentGarbage, Pt as getConversationWorkState, Q as effectiveTaskOutcomes, R as scheduledAutomationRunAttributes, S as publicArtifactHeaders, Sn as slackExternalRefIdSchema, T as lookupSlackUserProfile, U as listScheduledAutomationsForTeam, Wt as stopConversationWork, X as scheduledRunSchema, Xt as isInvalidConversationRecordError, Y as withScheduledAutomationLock, Zt as renderTaskInput, _t as getEventCatalog, a as isExperimentalFeatureEnabled, an as consumeSandboxEgressAuthRequiredSignal, en as resolveSandboxEgressProviderForHost, f as deleteMcpAuthSessionsForUserProvider, fn as startOAuthFlow, i as getExperimentalFeatures, in as clearSandboxEgressSignals, jn as setConfigDefaults, l as executeCredentialedEgressRequest, ln as formatProviderLabel, m as deleteMcpStoredOAuthCredentials, mt as ingestEvent, nn as shouldPropagateSandboxEgressTrace, nt as findMatchingEventAutomations, o as setExperimentalFeatures, on as consumeSandboxEgressPermissionDeniedSignal, p as deleteMcpServerSessionId, pt as processWorkspaceSnapshotJob, q as saveScheduledAutomationInLock, rn as SANDBOX_EGRESS_PROXY_PATH, s as executeAgentRun, sn as parseSandboxEgressCredentialToken, t as createAgentRunner, tn as normalizeSandboxEgressTracePropagationDomains, vt as eventGuidance, w as unpublishedArtifactHeaders, xn as slackEntitySchema, xt as appendAndEnqueueInboundMessage, z as getNextRunAtMs } from "./agent-runner-B9dvsdM8.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-BO1fVUQe.js";
|
|
3
3
|
import { r as continueTrace } from "./sentry-CgWZM_kV.js";
|
|
4
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
5
|
-
import { a as getChatConfig, f as setBotModelConfig, i as configureFunctionMaxDurationSeconds, m as setSlackReactionConfig, n as botConfig, p as setProfiles, s as getSlackBotToken, u as getSlackReactionConfig } from "./config-
|
|
4
|
+
import { t as JUNIOR_VERSION } from "./version-Y7rGnMXG.js";
|
|
5
|
+
import { a as getChatConfig, f as setBotModelConfig, i as configureFunctionMaxDurationSeconds, m as setSlackReactionConfig, n as botConfig, p as setProfiles, s as getSlackBotToken, u as getSlackReactionConfig } from "./config-HqsfInxG.js";
|
|
6
6
|
import { _ as slackChannelIdSchema, g as parseSlackUserId, h as parseSlackTeamId, u as parseActorUserId, v as slackTeamIdSchema, x as slackMessageTsSchema, y as slackUserIdSchema } from "./context-0Et9iVSB.js";
|
|
7
|
-
import { $t as getConversationStore, Ct as createPluginLogger, F as bindSlackDirectCredentialSubject, G as isDmChannel, I as verifyEventAutomationCredentialSubject, L as verifyScheduledAutomationCredentialSubject, N as bindEventAutomationCredentialSubject, P as bindScheduledAutomationCredentialSubject, Q as readActorIdentity, R as verifySlackDirectCredentialSubject, U as getSlackClient, Vt as resolveRootVisibility, Wt as listConversationAnnotations, X as runWithWorkspaceTeamId, Y as getWorkspaceTeamId, Zt as getConversationEventStore, a as getPluginRoutes, bt as createPluginState, ct as collectEventMatchKeys, d as setPlugins, en as getDb, f as validatePlugins, ft as findMatchingWatches, gt as getDashboardConversationLink, h as setBriefsConfig, i as getPluginApiRoutes, in as withConversationMutationLock, mn as deleteProviderIdentityForSlackUser, mt as takeDueTimerWatches, ot as cancelSubscriptions, rn as withConversationEventLock, tn as getSqlExecutor, u as getPlugins, vt as getDashboardTaskLink, wt as readConversationAccessFromSql, yt as setDashboardConversationLinkOptions } from "./agent-hooks-
|
|
7
|
+
import { $t as getConversationStore, Ct as createPluginLogger, F as bindSlackDirectCredentialSubject, G as isDmChannel, I as verifyEventAutomationCredentialSubject, L as verifyScheduledAutomationCredentialSubject, N as bindEventAutomationCredentialSubject, P as bindScheduledAutomationCredentialSubject, Q as readActorIdentity, R as verifySlackDirectCredentialSubject, U as getSlackClient, Vt as resolveRootVisibility, Wt as listConversationAnnotations, X as runWithWorkspaceTeamId, Y as getWorkspaceTeamId, Zt as getConversationEventStore, a as getPluginRoutes, bt as createPluginState, ct as collectEventMatchKeys, d as setPlugins, en as getDb, f as validatePlugins, ft as findMatchingWatches, gt as getDashboardConversationLink, h as setBriefsConfig, i as getPluginApiRoutes, in as withConversationMutationLock, mn as deleteProviderIdentityForSlackUser, mt as takeDueTimerWatches, ot as cancelSubscriptions, rn as withConversationEventLock, tn as getSqlExecutor, u as getPlugins, vt as getDashboardTaskLink, wt as readConversationAccessFromSql, yt as setDashboardConversationLinkOptions } from "./agent-hooks-Im1UUKhZ.js";
|
|
8
8
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
9
|
-
import { E as juniorConversations, a as juniorSchedulerRuns, f as juniorAgentBindings, g as juniorConversationBriefs, o as juniorSchedulerTasks, p as juniorAgentInvocations, y as juniorConversationEvents } from "./executor-
|
|
10
|
-
import {
|
|
11
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
12
|
-
import { X as projectConversationMessages, q as appendConversationMessages } from "./checkpoint-
|
|
13
|
-
import { O as withLock$1, w as getStateAdapter } from "./profile-
|
|
14
|
-
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-
|
|
15
|
-
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-
|
|
16
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-
|
|
9
|
+
import { E as juniorConversations, a as juniorSchedulerRuns, f as juniorAgentBindings, g as juniorConversationBriefs, o as juniorSchedulerTasks, p as juniorAgentInvocations, y as juniorConversationEvents } from "./executor-C-LEhjeD.js";
|
|
10
|
+
import { z as annotationCard } from "./conversation-DsuDtoYR.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Blx7IGY9.js";
|
|
12
|
+
import { X as projectConversationMessages, q as appendConversationMessages } from "./checkpoint-BDaS7x3C.js";
|
|
13
|
+
import { O as withLock$1, w as getStateAdapter } from "./profile-DpHUuqjR.js";
|
|
14
|
+
import { f as setSandboxResourceConfig, u as getSandboxResourceConfig } from "./resolve-SohTTVYa.js";
|
|
15
|
+
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-CpNnv-n1.js";
|
|
16
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "./validation-_gPdrVG7.js";
|
|
17
17
|
import { a as pluginRuntimeRegistrationsFromPluginSet, n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "./plugins-egKWjgue.js";
|
|
18
|
-
import { A as THREAD_OPTOUT_ACK, C as verifySlackSignature, D as withNormalizedThreadId, E as normalizeIncomingSlackThreadId, F as createVercelAttachmentStorage, L as enqueueAgentDispatch, M as parseContent, N as getThreadStopDecision, O as getAuthPausedConversationTurnId, P as renderSlackObjectCard, R as GET$3, S as runWithSlackInstallation, T as stopSlackThread, a as webActorFromEmail, b as clearSlackPendingReactions, c as getProductionSlackAdapter, g as readViewerAutomationSummary, i as recordWebConversationActivity, j as startProcessingReaction, n as conversationTurnIdForMessage, o as createProductionConversationWorkOptions, s as createProductionSlackWebhookServices, t as appendAndEnqueueWebMessage, v as recordSkippedConversationMessage, w as isSlackMessageStopped, y as buildSlackInboundMessage } from "./web-input-
|
|
19
|
-
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 } from "./task-runner-
|
|
20
|
-
import { c as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation } from "./work-
|
|
21
|
-
import { s as coerceThreadConversationState } from "./thread-state-
|
|
22
|
-
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-
|
|
23
|
-
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-
|
|
24
|
-
import { t as processConversationWork } from "./worker-
|
|
25
|
-
import { t as bindSpawnAgent } from "./spawn-
|
|
18
|
+
import { A as THREAD_OPTOUT_ACK, C as verifySlackSignature, D as withNormalizedThreadId, E as normalizeIncomingSlackThreadId, F as createVercelAttachmentStorage, L as enqueueAgentDispatch, M as parseContent, N as getThreadStopDecision, O as getAuthPausedConversationTurnId, P as renderSlackObjectCard, R as GET$3, S as runWithSlackInstallation, T as stopSlackThread, a as webActorFromEmail, b as clearSlackPendingReactions, c as getProductionSlackAdapter, g as readViewerAutomationSummary, i as recordWebConversationActivity, j as startProcessingReaction, n as conversationTurnIdForMessage, o as createProductionConversationWorkOptions, s as createProductionSlackWebhookServices, t as appendAndEnqueueWebMessage, v as recordSkippedConversationMessage, w as isSlackMessageStopped, y as buildSlackInboundMessage } from "./web-input-BmLFoSUw.js";
|
|
19
|
+
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 } from "./task-runner-DrC1UgCK.js";
|
|
20
|
+
import { c as listPendingAgentInvocationMailboxAppends, r as enqueueAgentInvocation } from "./work-CP3L3bNf.js";
|
|
21
|
+
import { s as coerceThreadConversationState } from "./thread-state-BIXM2uhZ.js";
|
|
22
|
+
import { a as GET$4, i as publishAppHomeView, r as GET$5, t as receiveLocalOAuthCredential } from "./credential-sync-DEF6P_Qr.js";
|
|
23
|
+
import { a as registerVercelPluginTaskDevConsumer, n as createVercelPluginTaskCallback, s as queueCallback } from "./task-queue-BEzJHMbQ.js";
|
|
24
|
+
import { t as processConversationWork } from "./worker-DlZMqtCm.js";
|
|
25
|
+
import { t as bindSpawnAgent } from "./spawn-DrH6CP9W.js";
|
|
26
26
|
import { createRequire } from "node:module";
|
|
27
27
|
import { pathToFileURL } from "node:url";
|
|
28
28
|
import { Hono } from "hono";
|
|
@@ -4937,6 +4937,7 @@ function dashboardHostRoutePaths(dashboard, authenticatedRoutes = []) {
|
|
|
4937
4937
|
"/_junior/dashboard/avatar.png",
|
|
4938
4938
|
"/_junior/dashboard/object-icons/*",
|
|
4939
4939
|
"/_junior/dashboard/client.js",
|
|
4940
|
+
"/_junior/dashboard/chunks/*",
|
|
4940
4941
|
"/_junior/dashboard/icon-512.png",
|
|
4941
4942
|
"/_junior/dashboard/manifest.webmanifest",
|
|
4942
4943
|
loginPath,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as completeObject } from "./client-
|
|
1
|
+
import { r as completeObject } from "./client-DucHsb6b.js";
|
|
2
2
|
import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
3
|
-
import {
|
|
4
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
3
|
+
import { P as briefCodeChangeSchema, R as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-DsuDtoYR.js";
|
|
4
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-D5RPLy92.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-HqsfInxG.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-CIi9NkkR.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,10 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
1
|
+
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-DucHsb6b.js";
|
|
2
|
+
import { d as logException, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-BO1fVUQe.js";
|
|
3
|
+
import { n as botConfig } from "./config-HqsfInxG.js";
|
|
4
4
|
import { b as parseSlackMessageTs, f as toStoredSlackActor } from "./context-0Et9iVSB.js";
|
|
5
|
-
import { $t as getConversationStore, Jt as authenticationLinkedEvent, Kt as JUNIOR_NATIVE_EVENT_NAMESPACE, Yt as authenticationUnlinkedEvent, Zt as getConversationEventStore, cn as addAgentTurnUsage, nn as createSqlConversationEventStore, on as bindProviderConversation, qt as agentsInstructionsUpdatedEvent, rn as withConversationEventLock, tn as getSqlExecutor } from "./agent-hooks-
|
|
6
|
-
import {
|
|
7
|
-
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-
|
|
5
|
+
import { $t as getConversationStore, Jt as authenticationLinkedEvent, Kt as JUNIOR_NATIVE_EVENT_NAMESPACE, Yt as authenticationUnlinkedEvent, Zt as getConversationEventStore, cn as addAgentTurnUsage, nn as createSqlConversationEventStore, on as bindProviderConversation, qt as agentsInstructionsUpdatedEvent, rn as withConversationEventLock, tn as getSqlExecutor } from "./agent-hooks-Im1UUKhZ.js";
|
|
6
|
+
import { B as messageCardRef, K as agentHistoryItemSchema, et as contextProvenance, nt as instructionProvenanceFor, tt as instructionActors } from "./conversation-DsuDtoYR.js";
|
|
7
|
+
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-DpHUuqjR.js";
|
|
8
8
|
import { isDeepStrictEqual } from "node:util";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
@@ -236,8 +236,7 @@ function recordDeliveredAssistantMessage(args) {
|
|
|
236
236
|
replied: true,
|
|
237
237
|
skippedReason: void 0
|
|
238
238
|
});
|
|
239
|
-
const
|
|
240
|
-
const objectCards = args.cards?.filter((card) => card.kind === "object");
|
|
239
|
+
const objectCards = args.cards?.map(messageCardRef);
|
|
241
240
|
upsertConversationMessage(args.conversation, {
|
|
242
241
|
id: messageId,
|
|
243
242
|
role: "assistant",
|
|
@@ -248,7 +247,6 @@ function recordDeliveredAssistantMessage(args) {
|
|
|
248
247
|
isBot: true
|
|
249
248
|
},
|
|
250
249
|
meta: {
|
|
251
|
-
...cards?.length ? { cards } : void 0,
|
|
252
250
|
...objectCards?.length ? { objectCards } : void 0,
|
|
253
251
|
replied: true,
|
|
254
252
|
...args.source ? { source: args.source } : void 0
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as executeAgentRun, t as createAgentRunner } from "../agent-runner-
|
|
1
|
+
import { s as executeAgentRun, t as createAgentRunner } from "../agent-runner-B9dvsdM8.js";
|
|
2
2
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.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("../agent-hooks-
|
|
103
|
+
import("../agent-hooks-Im1UUKhZ.js").then((n) => n.t),
|
|
104
|
+
import("../catalog-runtime-Blx7IGY9.js").then((n) => n.t),
|
|
105
|
+
import("../validation-_gPdrVG7.js").then((n) => n.r),
|
|
106
|
+
import("../agent-hooks-Im1UUKhZ.js").then((n) => n.Xt)
|
|
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("../agent-runner-
|
|
156
|
+
const { setExperimentalFeatures } = await import("../agent-runner-B9dvsdM8.js").then((n) => n.r);
|
|
157
157
|
setExperimentalFeatures({ subagents: true });
|
|
158
|
-
const { setBriefsConfig } = await import("../agent-hooks-
|
|
158
|
+
const { setBriefsConfig } = await import("../agent-hooks-Im1UUKhZ.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-JhOJ60On.js");
|
|
161
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BvVXBrQt.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-DyO-LeUT.js");
|
|
164
|
+
const { bindSpawnAgent } = await import("../spawn-DrH6CP9W.js").then((n) => n.n);
|
|
165
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-CP3L3bNf.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-DlZMqtCm.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 { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-
|
|
3
|
-
import { i as parseSkillFile } from "../skills-
|
|
1
|
+
import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-BO1fVUQe.js";
|
|
2
|
+
import { f as parseInlinePluginManifest, p as parsePluginManifest } from "../registry-CIi9NkkR.js";
|
|
3
|
+
import { i as parseSkillFile } from "../skills-DElnSC0r.js";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import fs from "node:fs/promises";
|
package/dist/cli/main.js
CHANGED
|
@@ -25,7 +25,7 @@ async function runChat(argv, pluginSet) {
|
|
|
25
25
|
return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
|
|
26
26
|
}
|
|
27
27
|
async function runBriefs(argv) {
|
|
28
|
-
return await (await import("../briefs-
|
|
28
|
+
return await (await import("../briefs-BC3DPfsh.js")).runBriefs(argv);
|
|
29
29
|
}
|
|
30
30
|
function topLevelCommand(argv) {
|
|
31
31
|
return (argv[0] === "--" ? argv.slice(1) : argv)[0];
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ct as createPluginLogger, d as setPlugins, en as getDb, f as validatePlugins } from "../agent-hooks-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
3
|
-
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-
|
|
1
|
+
import { Ct as createPluginLogger, d as setPlugins, en as getDb, f as validatePlugins } from "../agent-hooks-Im1UUKhZ.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-Blx7IGY9.js";
|
|
3
|
+
import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-_gPdrVG7.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
6
6
|
import { stderr, stdout } from "node:process";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "../catalog-runtime-
|
|
2
|
-
import { S as disconnectStateAdapter, t as create } from "../profile-
|
|
3
|
-
import { r as resolve } from "../resolve-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "../catalog-runtime-Blx7IGY9.js";
|
|
2
|
+
import { S as disconnectStateAdapter, t as create } from "../profile-DpHUuqjR.js";
|
|
3
|
+
import { r as resolve } from "../resolve-SohTTVYa.js";
|
|
4
4
|
//#region src/cli/snapshot-create.ts
|
|
5
5
|
const DEFAULT_RUNTIME = "node22";
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 6e5;
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as getChatConfig } from "../config-
|
|
2
|
-
import { t as createJuniorSqlExecutor } from "../executor-
|
|
3
|
-
import { t as createPluginCatalogRuntime } from "../registry-
|
|
1
|
+
import { a as getChatConfig } from "../config-HqsfInxG.js";
|
|
2
|
+
import { t as createJuniorSqlExecutor } from "../executor-C-LEhjeD.js";
|
|
3
|
+
import { t as createPluginCatalogRuntime } from "../registry-CIi9NkkR.js";
|
|
4
4
|
import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
|
|
5
5
|
import { t as loadAppPluginSet } from "../plugin-module-BKGOXca2.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-BO1fVUQe.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-k2Ucs1Lg.js";
|
|
3
3
|
import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
|
|
4
4
|
import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
|
|
5
5
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
@@ -278,8 +278,6 @@ function unwrapCurrentInstruction(text) {
|
|
|
278
278
|
//#endregion
|
|
279
279
|
//#region src/chat/services/context-compaction-marker.ts
|
|
280
280
|
const COMPACTION_SUMMARY_PREFIX = "Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:";
|
|
281
|
-
const ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX = COMPACTION_SUMMARY_PREFIX;
|
|
282
|
-
const MODEL_HANDOFF_SUMMARY_PREFIX = COMPACTION_SUMMARY_PREFIX;
|
|
283
281
|
/** Return whether text is one of Junior's durable compacted-context markers. */
|
|
284
282
|
function isCompactionSummaryText(text) {
|
|
285
283
|
const normalized = (unwrapCurrentInstruction(text) ?? text).trimStart();
|
|
@@ -673,4 +671,4 @@ async function embedTexts(params) {
|
|
|
673
671
|
}
|
|
674
672
|
}
|
|
675
673
|
//#endregion
|
|
676
|
-
export {
|
|
674
|
+
export { toOptionalTrimmed as S, getProviderErrorUserMessage as _, embedTexts as a, getGatewayApiKey as b, hasCompactedConversationContext as c, unwrapCurrentInstruction as d, escapeXml as f, getProviderErrorAttributes as g, findProviderError as h, completeText as i, isCompactionSummaryText as l, createProviderError as m, GEN_AI_SERVER_ADDRESS as n, resolveGatewayModel as o, ProviderError as p, completeObject as r, COMPACTION_SUMMARY_PREFIX as s, GEN_AI_PROVIDER_NAME as t, renderCurrentInstruction as u, isProviderRetryError as v, resolveGatewayCredential as x, MISSING_GATEWAY_CREDENTIALS_ERROR as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import {
|
|
3
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-DucHsb6b.js";
|
|
3
|
+
import { p as logWarn } from "./logging-BO1fVUQe.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
|
|
5
5
|
//#region src/chat/slack/emoji.ts
|
|
6
6
|
const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-BwU8mqwD.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema
|
|
3
|
+
import { actorSchema, codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
4
4
|
//#region src/usage-schema.ts
|
|
5
5
|
const usageCostSchema = z.object({
|
|
6
6
|
input: z.number().finite().nonnegative().optional(),
|
|
@@ -515,6 +515,99 @@ const newConversationEventSchema = z.object({
|
|
|
515
515
|
createdAtMs: z.number().finite()
|
|
516
516
|
}).strict();
|
|
517
517
|
//#endregion
|
|
518
|
+
//#region src/chat/automations/card.ts
|
|
519
|
+
/** Saved automation facts shown with a Message, not a live status view. */
|
|
520
|
+
const automationCardSchema = z.object({
|
|
521
|
+
kind: z.literal("automation"),
|
|
522
|
+
id: z.string().min(1),
|
|
523
|
+
title: z.string().min(1).max(160),
|
|
524
|
+
url: z.string().url().nullable(),
|
|
525
|
+
instruction: z.string().max(4e3),
|
|
526
|
+
trigger: z.string().min(1),
|
|
527
|
+
warning: z.string().nullable()
|
|
528
|
+
}).strict();
|
|
529
|
+
/** Render saved card facts for text-only delivery and accessible fallbacks. */
|
|
530
|
+
function automationCardText(card) {
|
|
531
|
+
return [
|
|
532
|
+
card.title,
|
|
533
|
+
card.warning,
|
|
534
|
+
card.trigger,
|
|
535
|
+
card.instruction,
|
|
536
|
+
card.url,
|
|
537
|
+
`Automation ID: ${card.id}`
|
|
538
|
+
].filter(Boolean).join("\n");
|
|
539
|
+
}
|
|
540
|
+
//#endregion
|
|
541
|
+
//#region src/chat/conversations/cards.ts
|
|
542
|
+
const storedCardSchema = automationCardSchema.extend({ operation: z.enum([
|
|
543
|
+
"created",
|
|
544
|
+
"updated",
|
|
545
|
+
"deleted"
|
|
546
|
+
]).optional() });
|
|
547
|
+
/** Render each built-in card with its own text format. */
|
|
548
|
+
function messageCardText(card) {
|
|
549
|
+
switch (card.kind) {
|
|
550
|
+
case "object": return [
|
|
551
|
+
card.title,
|
|
552
|
+
card.label !== card.title ? card.label : void 0,
|
|
553
|
+
card.description,
|
|
554
|
+
card.status,
|
|
555
|
+
...objectFactFields(card.facts).map((field) => `${field.label}: ${field.value}`),
|
|
556
|
+
card.trigger,
|
|
557
|
+
card.warning,
|
|
558
|
+
card.url
|
|
559
|
+
].filter(Boolean).join("\n");
|
|
560
|
+
case "automation": return automationCardText(card);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
/** Identify a deleted object whose pending card must be omitted. */
|
|
564
|
+
const removedCardSchema = z.object({
|
|
565
|
+
plugin: z.string().min(1),
|
|
566
|
+
key: z.string().min(1)
|
|
567
|
+
}).strict();
|
|
568
|
+
/** Store only the annotation identity with a Message. */
|
|
569
|
+
const messageCardRefSchema = removedCardSchema.extend({ kind: z.literal("object") });
|
|
570
|
+
/** Remove display facts before saving or reporting a Message card. */
|
|
571
|
+
function messageCardRef(card) {
|
|
572
|
+
return card.kind === "object" ? {
|
|
573
|
+
kind: "object",
|
|
574
|
+
plugin: card.plugin,
|
|
575
|
+
key: card.key
|
|
576
|
+
} : {
|
|
577
|
+
kind: "object",
|
|
578
|
+
plugin: "junior",
|
|
579
|
+
key: card.id
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
/** Read references, including identities from older saved card snapshots. */
|
|
583
|
+
function readMessageCardRefs(value) {
|
|
584
|
+
return [...storedCardSchema.array().parse(value.cards ?? []).flatMap(({ operation, ...card }) => operation === "deleted" ? [] : [messageCardRef(card)]), ...messageCardRefSchema.strip().array().parse(value.objectCards ?? [])];
|
|
585
|
+
}
|
|
586
|
+
/** Resolve current saved facts without fetching providers or changing history. */
|
|
587
|
+
function resolveMessageCards(refs, annotations) {
|
|
588
|
+
return refs.map((ref) => {
|
|
589
|
+
const annotation = annotations.find((item) => item.kind === ref.kind && item.plugin === ref.plugin && item.key === ref.key);
|
|
590
|
+
return annotation ? annotationCard(annotation) : {
|
|
591
|
+
...ref,
|
|
592
|
+
objectType: "item",
|
|
593
|
+
title: ref.key,
|
|
594
|
+
label: ref.key,
|
|
595
|
+
url: null,
|
|
596
|
+
warning: "Saved annotation is unavailable."
|
|
597
|
+
};
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
/** Copy saved annotation facts without storage timestamps for Message delivery. */
|
|
601
|
+
function annotationCard(annotation) {
|
|
602
|
+
const { createdAt: _createdAt, updatedAt: _updatedAt, ...value } = annotation;
|
|
603
|
+
return value.kind === "object" ? value : {
|
|
604
|
+
...value,
|
|
605
|
+
kind: "object",
|
|
606
|
+
objectType: value.objectType ?? "item",
|
|
607
|
+
title: value.label
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
//#endregion
|
|
518
611
|
//#region src/chat/briefs/schema.ts
|
|
519
612
|
/**
|
|
520
613
|
* Runtime schemas for the Brief record and the generator input. Both cross a
|
|
@@ -668,77 +761,6 @@ function readMessageAttachments(value) {
|
|
|
668
761
|
return messageAttachmentSchema.array().parse(value ?? []);
|
|
669
762
|
}
|
|
670
763
|
//#endregion
|
|
671
|
-
//#region src/chat/automations/card.ts
|
|
672
|
-
/** Saved automation facts shown with a Message, not a live status view. */
|
|
673
|
-
const automationCardSchema = z.object({
|
|
674
|
-
kind: z.literal("automation"),
|
|
675
|
-
id: z.string().min(1),
|
|
676
|
-
title: z.string().min(1).max(160),
|
|
677
|
-
url: z.string().url().nullable(),
|
|
678
|
-
instruction: z.string().max(4e3),
|
|
679
|
-
trigger: z.string().min(1),
|
|
680
|
-
warning: z.string().nullable()
|
|
681
|
-
}).strict();
|
|
682
|
-
/** Render saved card facts for text-only delivery and accessible fallbacks. */
|
|
683
|
-
function automationCardText(card) {
|
|
684
|
-
return [
|
|
685
|
-
card.title,
|
|
686
|
-
card.warning,
|
|
687
|
-
card.trigger,
|
|
688
|
-
card.instruction,
|
|
689
|
-
card.url,
|
|
690
|
-
`Automation ID: ${card.id}`
|
|
691
|
-
].filter(Boolean).join("\n");
|
|
692
|
-
}
|
|
693
|
-
//#endregion
|
|
694
|
-
//#region src/chat/conversations/cards.ts
|
|
695
|
-
/** Built-in response types accepted by Message storage and delivery. */
|
|
696
|
-
const messageCardSchema = z.discriminatedUnion("kind", [automationCardSchema, ownedObjectAnnotationSchema]);
|
|
697
|
-
const storedCardSchema = automationCardSchema.extend({ operation: z.enum([
|
|
698
|
-
"created",
|
|
699
|
-
"updated",
|
|
700
|
-
"deleted"
|
|
701
|
-
]).optional() });
|
|
702
|
-
/** Read both stored formats while keeping new objects out of the legacy field. */
|
|
703
|
-
function readMessageCards(value) {
|
|
704
|
-
return [...storedCardSchema.array().parse(value.cards ?? []).flatMap(({ operation, ...card }) => operation === "deleted" ? [] : [card]), ...ownedObjectAnnotationSchema.array().parse(value.objectCards ?? [])];
|
|
705
|
-
}
|
|
706
|
-
/** Render each built-in card with its own text format. */
|
|
707
|
-
function messageCardText(card) {
|
|
708
|
-
switch (card.kind) {
|
|
709
|
-
case "object": return [
|
|
710
|
-
card.title,
|
|
711
|
-
card.label !== card.title ? card.label : void 0,
|
|
712
|
-
card.description,
|
|
713
|
-
card.status,
|
|
714
|
-
...objectFactFields(card.facts).map((field) => `${field.label}: ${field.value}`),
|
|
715
|
-
card.trigger,
|
|
716
|
-
card.warning,
|
|
717
|
-
card.url
|
|
718
|
-
].filter(Boolean).join("\n");
|
|
719
|
-
case "automation": return automationCardText(card);
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
/** Deduplicate object cards across successful tool results. */
|
|
723
|
-
function messageCardKey(card) {
|
|
724
|
-
return card.kind === "object" ? JSON.stringify([card.plugin, card.key]) : JSON.stringify(["junior", card.id]);
|
|
725
|
-
}
|
|
726
|
-
/** Identify a deleted object whose pending card must be omitted. */
|
|
727
|
-
const messageCardRefSchema = z.object({
|
|
728
|
-
plugin: z.string().min(1),
|
|
729
|
-
key: z.string().min(1)
|
|
730
|
-
}).strict();
|
|
731
|
-
/** Copy saved annotation facts without storage timestamps for Message delivery. */
|
|
732
|
-
function annotationCard(annotation) {
|
|
733
|
-
const { createdAt: _createdAt, updatedAt: _updatedAt, ...value } = annotation;
|
|
734
|
-
return value.kind === "object" ? value : {
|
|
735
|
-
...value,
|
|
736
|
-
kind: "object",
|
|
737
|
-
objectType: value.objectType ?? "item",
|
|
738
|
-
title: value.label
|
|
739
|
-
};
|
|
740
|
-
}
|
|
741
|
-
//#endregion
|
|
742
764
|
//#region src/api/schema/conversation.ts
|
|
743
765
|
const conversationReportStatusSchema = z.enum([
|
|
744
766
|
"active",
|
|
@@ -931,7 +953,7 @@ const conversationReportMessageEventDataSchema = z.object({
|
|
|
931
953
|
eventObjectType: objectTypeSchema.optional(),
|
|
932
954
|
explicitMention: z.boolean().optional(),
|
|
933
955
|
trustedSummary: z.string().min(1).optional(),
|
|
934
|
-
cards: z.array(
|
|
956
|
+
cards: z.array(messageCardRefSchema).optional(),
|
|
935
957
|
text: z.string().optional(),
|
|
936
958
|
attachments: z.array(messageAttachmentSchema).optional(),
|
|
937
959
|
redacted: z.literal(true).optional()
|
|
@@ -1322,4 +1344,4 @@ const conversationStatsReportSchema = z.object({
|
|
|
1322
1344
|
windowStart: z.string()
|
|
1323
1345
|
}).strict();
|
|
1324
1346
|
//#endregion
|
|
1325
|
-
export {
|
|
1347
|
+
export { encodeHistoryPayload as $, MAX_INPUT_IMAGE_BYTES as A, messageCardRef as B, conversationReportEventSchema as C, createConversationBodySchema as D, conversationSummaryReportSchema as E, briefLinkSchema as F, KNOWN_CONVERSATION_EVENT_TYPES as G, readMessageCardRefs as H, briefOutcomeStatusSchema as I, conversationTurnFailureCodeSchema as J, agentHistoryItemSchema as K, conversationBriefSchema as L, INPUT_IMAGE_TYPES as M, isVisionImageMediaType as N, createConversationMessageBodySchema as O, briefCodeChangeSchema as P, newConversationEventSchema as Q, parseBriefInput as R, conversationReportEventDataSchema as S, conversationStatsReportSchema as T, removedCardSchema as U, messageCardText as V, resolveMessageCards as W, decodeStoredConversationEvent as X, conversationTurnFailureReasonSchema as Y, historyReplacementSchema as Z, conversationParamsSchema as _, cancelConversationPendingMessagesBodySchema as a, conversationPendingMessageSchema as b, conversationAttachmentParamsSchema as c, conversationDetailReportSchema as d, contextProvenance as et, conversationEventHistorySchema as f, conversationFeedSchema as g, conversationFeedQuerySchema as h, archiveConversationResponseSchema as i, usageSchema as it, readMessageAttachments as j, MAX_INPUT_IMAGES as k, conversationAuxiliaryCostsSchema as l, conversationEventsQuerySchema as m, actorIdentitySchema as n, instructionProvenanceFor as nt, cancelConversationPendingMessagesResponseSchema as o, conversationEventPageSchema as p, conversationEventDataSchema as q, archiveConversationBodySchema as r, sameActorIdentity as rt, conversationActivityPreviewSchema as s, acceptedConversationMessageSchema as t, instructionActors as tt, conversationDetailQuerySchema as u, conversationPendingAuthorizationSchema as v, conversationStatsItemSchema as w, conversationPendingMessagesReportSchema as x, conversationPendingMessageDeliverySchema as y, annotationCard as z };
|