@sentry/junior 0.229.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-BfjhfMIy.js → agent-hooks-Im1UUKhZ.js} +10 -10
- package/dist/{agent-runner-DtrpkWV5.js → agent-runner-B9dvsdM8.js} +20 -20
- 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-B6KfFLRA.js → briefs-BC3DPfsh.js} +4 -4
- package/dist/{catalog-runtime-Byr3trKF.js → catalog-runtime-Blx7IGY9.js} +1 -1
- package/dist/{checkpoint-DEYb3Fqm.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-BN5U3CGw.js → client-DucHsb6b.js} +2 -2
- package/dist/{config-C4xZrx7G.js → config-HqsfInxG.js} +2 -2
- package/dist/{conversation-DOI6Y60M.js → conversation-DsuDtoYR.js} +96 -74
- package/dist/{conversation-privacy-CB7wx_tP.js → conversation-privacy-k2Ucs1Lg.js} +1 -1
- package/dist/{credential-sync-CuEwdxwY.js → credential-sync-DEF6P_Qr.js} +13 -13
- package/dist/{executor-DUqeOd8y.js → executor-C-LEhjeD.js} +1 -1
- package/dist/history-DvqWZlYX.d.ts +86 -0
- package/dist/{images-B5JLFwJR.js → images-owPAu3eq.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-C1AJ5uJt.js → job-queue-CpNnv-n1.js} +1 -1
- package/dist/{logging-Muw6EXro.js → logging-BO1fVUQe.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-CrD-xb8a.js → oauth-authorization-DPPpHxSI.js} +1 -1
- package/dist/{oauth-callback-server-DfQos1K1.js → oauth-callback-server-BvVXBrQt.js} +2 -2
- package/dist/{pending-auth-pYQpJmtu.js → pending-auth-BWgfMCZE.js} +1 -1
- package/dist/{profile-25NkcK4S.js → profile-DpHUuqjR.js} +4 -4
- package/dist/{prompt-9C-wUwwx.js → prompt-D5RPLy92.js} +1 -1
- package/dist/{registry-DrcbAs8o.js → registry-CIi9NkkR.js} +1 -1
- package/dist/{resolve-D9kl_rkl.js → resolve-SohTTVYa.js} +2 -2
- package/dist/{runner-D3rf-_hT.js → runner-JhOJ60On.js} +9 -9
- package/dist/{sandbox-egress-signals-BfQQz6cs.js → sandbox-egress-signals-DyO-LeUT.js} +1 -1
- package/dist/{schema-CXmCvVLn.js → schema-B-Taar1W.js} +1 -1
- package/dist/{skills-rwWf3XjQ.js → skills-DElnSC0r.js} +2 -2
- package/dist/{spawn-z0fRvZH9.js → spawn-DrH6CP9W.js} +2 -2
- package/dist/{task-queue-BGo6K-BX.js → task-queue-BEzJHMbQ.js} +3 -3
- package/dist/{task-runner-DH8M0m7l.js → task-runner-DrC1UgCK.js} +9 -9
- package/dist/{thread-state-CS67FjfN.js → thread-state-BIXM2uhZ.js} +5 -5
- package/dist/{turn-failure-response-DcaALKfm.js → turn-failure-response-9Ql2NYKh.js} +17 -15
- package/dist/{turn-lifecycle-DHcpS20C.js → turn-lifecycle-_YDXUFqj.js} +1 -1
- package/dist/{turn-session-routing-DlaCHHlu.js → turn-session-routing-DYxwlqQl.js} +1 -1
- package/dist/{validation-CNUPIKMW.js → validation-_gPdrVG7.js} +1 -1
- package/dist/{version-B0eXuHqw.js → version-Y7rGnMXG.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-DrXlSd3Y.js → web-authorization-COF8MUa5.js} +6 -6
- package/dist/{web-input-WFoSdz8L.js → web-input-BmLFoSUw.js} +49 -31
- package/dist/{work-B0cAo7nv.js → work-CP3L3bNf.js} +7 -7
- package/dist/{worker-DNklqmhH.js → worker-DlZMqtCm.js} +5 -5
- package/package.json +4 -4
- package/dist/history-H-SI5Dej.d.ts +0 -128
|
@@ -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 { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-
|
|
2
|
-
import { d as logException, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-
|
|
3
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-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 };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-
|
|
2
|
-
import { f as escapeXml } from "./client-
|
|
3
|
-
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-
|
|
4
|
-
import { n as botConfig, o as getRuntimeMetadata } from "./config-
|
|
1
|
+
import { Cn as createUserTokenStore, T as lookupSlackUserProfile, _ as putMcpStoredOAuthCredentials, d as deleteMcpAuthSession, dn as resolveBaseUrl, ft as getMcpProviderErrorAttributes, g as getMcpStoredOAuthCredentials, h as getMcpAuthSession, ln as formatProviderLabel, u as finalizeMcpAuthorization, un as parseOAuthStatePayload, x as resolvePluginOAuthAccount, yn as postSlackMessage } from "./agent-runner-B9dvsdM8.js";
|
|
2
|
+
import { f as escapeXml } from "./client-DucHsb6b.js";
|
|
3
|
+
import { d as logException, h as runBestEffort, p as logWarn } from "./logging-BO1fVUQe.js";
|
|
4
|
+
import { n as botConfig, o as getRuntimeMetadata } from "./config-HqsfInxG.js";
|
|
5
5
|
import { g as parseSlackUserId } from "./context-0Et9iVSB.js";
|
|
6
|
-
import { U as getSlackClient, gn as upsertLinkedIdentity, hn as upsertIdentity, tn as getSqlExecutor } from "./agent-hooks-
|
|
6
|
+
import { U as getSlackClient, gn as upsertLinkedIdentity, hn as upsertIdentity, tn as getSqlExecutor } from "./agent-hooks-Im1UUKhZ.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-7a9YqLhE.js";
|
|
8
|
-
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-
|
|
9
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
10
|
-
import { t as discoverSkills } from "./skills-
|
|
11
|
-
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-
|
|
12
|
-
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { i as getConversationPendingAuth } from "./pending-auth-
|
|
14
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
15
|
-
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-CIi9NkkR.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Blx7IGY9.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-DElnSC0r.js";
|
|
11
|
+
import { B as recordAuthorizationCompleted, s as getTurnRecord, z as recordAuthenticationLinked } from "./checkpoint-BDaS7x3C.js";
|
|
12
|
+
import { E as acquireActiveLock, w as getStateAdapter } from "./profile-DpHUuqjR.js";
|
|
13
|
+
import { i as getConversationPendingAuth } from "./pending-auth-BWgfMCZE.js";
|
|
14
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-BIXM2uhZ.js";
|
|
15
|
+
import { n as deleteWebAuthorization, o as wakeAuthorizedTurn, s as wakePausedTurn } from "./web-authorization-COF8MUa5.js";
|
|
16
16
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
|
|
17
17
|
import path from "node:path";
|
|
18
18
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import "./config-
|
|
2
|
+
import "./config-HqsfInxG.js";
|
|
3
3
|
import { n as juniorDestinations, r as timestamptz } from "./destinations-BeBiJeEM.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { getTableColumns, sql } from "drizzle-orm";
|