@sentry/junior 0.265.0 → 0.266.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-cUkPH3Om.js → adapter-eRFA_naf.js} +1 -1
- package/dist/{admin-Cf0rDmWV.js → admin-tILpP51p.js} +1 -1
- package/dist/{agent-runner-C6MwHJEs.js → agent-runner-BtYK7bht.js} +24 -24
- package/dist/api/schema.d.ts +4 -0
- package/dist/api/schema.js +4 -4
- package/dist/api.js +28 -28
- package/dist/app.js +30 -29
- package/dist/{assistant-reply-UPA8vKlC.js → assistant-reply-UyzAfZQo.js} +1 -1
- package/dist/{automation-2RbKzpMT.js → automation-BKpY9LPa.js} +1 -1
- package/dist/{briefs-DRjx8kQ9.js → briefs-DgfWMU7e.js} +5 -5
- package/dist/{catalog-runtime-D3qbJlYz.js → catalog-runtime-DAJjAbSx.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-DX34VNtH.js → client-B0YZfxNy.js} +2 -2
- package/dist/{config-BayQ9hHH.js → config-C0UwYqDK.js} +2 -2
- package/dist/{connections-mpN5Lsnj.js → connections-Bwu3VORi.js} +11 -11
- package/dist/{conversation-B0baEwoA.js → conversation-DF4rUcjb.js} +6 -2
- package/dist/{conversation-privacy-frjQCJa9.js → conversation-privacy-CY7JVjxn.js} +1 -1
- package/dist/{credential-sync-CZmyDNdR.js → credential-sync-VGAMUTGp.js} +14 -14
- package/dist/{credentialed-C6pKlB1p.js → credentialed-enF5Bf3y.js} +19 -13
- package/dist/{executor-CAr7xQr2.js → executor-TnWbvL09.js} +2 -2
- package/dist/{history-AY8rs-FR.js → history-C84mlAwO.js} +2 -1
- package/dist/{images-B2yA3HWE.js → images-BKQqSi5W.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-Cjo6Yg_b.js → job-queue-DBpHmKnd.js} +2 -2
- package/dist/{logging-D2QBriUo.js → logging-Ce0mXZ8J.js} +1 -1
- package/dist/{message-C9ymnpBS.js → message-VZ3DFpGb.js} +4 -4
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-BtMf3TPZ.js → oauth-callback-server-CpqWLjVY.js} +2 -2
- package/dist/{prompt-CvaDdSX3.js → prompt-BcCGlmg2.js} +1 -1
- package/dist/{registry-COTeZ2cV.js → registry-1BEIPdbT.js} +1 -1
- package/dist/{resolve-g9PKz9pH.js → resolve-BSHHkEGE.js} +3 -3
- package/dist/{result-COnC42GR.js → result-CwOpzqdh.js} +8 -8
- package/dist/{runner-BnTNS7x_.js → runner-CEaX04kz.js} +11 -11
- package/dist/{sandbox-egress-signals-C_IIdLFk.js → sandbox-egress-signals-BwtGHwqa.js} +1 -1
- package/dist/{schema-D5Amlzkp.js → schema-RsaBHxRH.js} +2 -2
- package/dist/{service-account-YdYftwV2.js → service-account-6wC76eBZ.js} +3 -3
- package/dist/{service-account-CwvToidT.js → service-account-Dg4lIbHm.js} +3 -3
- package/dist/{session-stop-CpCUy1ZJ.js → session-stop-tZOw9AJD.js} +11 -11
- package/dist/{skills-Bb2KaJ3m.js → skills-DzyGN7wd.js} +2 -2
- package/dist/{spawn-mbTcrLb3.js → spawn-6rokq7l_.js} +2 -2
- package/dist/{store-CqRnaZSq.js → store-DcKkzrdt.js} +3 -3
- package/dist/{store-DdT74Lvq.js → store-FALy-JQb.js} +6 -6
- package/dist/{task-queue-8XjDIORF.js → task-queue-Bg4RS2Gy.js} +3 -3
- package/dist/{task-runner-6mLmG6g_.js → task-runner-8N5LIkSg.js} +11 -11
- package/dist/{tasks-DGbrur6x.js → tasks-DDT-J3Rf.js} +13 -13
- package/dist/{thread-state-D45lz-oC.js → thread-state-cprEaxgl.js} +5 -5
- package/dist/{turn-failure-response-CaEPLSBn.js → turn-failure-response-C8sMdsdX.js} +8 -8
- package/dist/{turn-lifecycle-C35IyRGp.js → turn-lifecycle-DaBVoz7h.js} +2 -2
- package/dist/{turn-session-routing-BKx6rfVd.js → turn-session-routing-a9CHX-w6.js} +1 -1
- package/dist/{validation-C0X3CX51.js → validation-C2lllinq.js} +1 -1
- package/dist/{version-BPHgJwnm.js → version-oaLfxxnf.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-B2wXNspU.js → viewer-BpE6Z3qf.js} +4 -4
- package/dist/{web-input-Y6aXvmfa.js → web-input-B-bMjD1V.js} +30 -30
- package/dist/{work-DMbqK0kT.js → work-VX1SHWha.js} +52 -51
- package/dist/{worker-B-rDJ3XN.js → worker-hook-y_Y.js} +5 -5
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-
|
|
2
|
-
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-
|
|
1
|
+
import { T as withSpan, _ as serializeGenAiAttribute, f as logException, h as normalizeGenAiFinishReason, i as extractGenAiUsageAttributes, m as logWarn } from "./logging-Ce0mXZ8J.js";
|
|
2
|
+
import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-CY7JVjxn.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-nwUcYXjP.js";
|
|
2
|
-
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-
|
|
3
|
-
import { m as logWarn } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, s as resolveGatewayModel } from "./client-B0YZfxNy.js";
|
|
3
|
+
import { m as logWarn } from "./logging-Ce0mXZ8J.js";
|
|
4
4
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-Bg8EoCKD.js";
|
|
5
5
|
import { AwsClient } from "aws4fetch";
|
|
6
6
|
// src/chat/attachments/s3.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Mt as failTurnRecord, Nt as getTurnRecord, Ot as loadTurnCheckpoint } from "./tasks-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { A as deleteProviderIdentityForSlackUser, j as deleteProviderIdentityForUser, l as getConversationEventStore, p as getSqlExecutor } from "./viewer-
|
|
4
|
-
import { u as hasRequiredOAuthScope } from "./registry-
|
|
5
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
6
|
-
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-
|
|
7
|
-
import { ct as startOAuthFlow } from "./credentialed-
|
|
8
|
-
import { r as getStateAdapter } from "./adapter-
|
|
9
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
10
|
-
import { m as ensureConversationWake, w as requestConversationWork } from "./store-
|
|
11
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { Mt as failTurnRecord, Nt as getTurnRecord, Ot as loadTurnCheckpoint } from "./tasks-DDT-J3Rf.js";
|
|
2
|
+
import { n as botConfig } from "./config-C0UwYqDK.js";
|
|
3
|
+
import { A as deleteProviderIdentityForSlackUser, j as deleteProviderIdentityForUser, l as getConversationEventStore, p as getSqlExecutor } from "./viewer-BpE6Z3qf.js";
|
|
4
|
+
import { u as hasRequiredOAuthScope } from "./registry-1BEIPdbT.js";
|
|
5
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DAJjAbSx.js";
|
|
6
|
+
import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-BtYK7bht.js";
|
|
7
|
+
import { ct as startOAuthFlow } from "./credentialed-enF5Bf3y.js";
|
|
8
|
+
import { r as getStateAdapter } from "./adapter-eRFA_naf.js";
|
|
9
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-DBpHmKnd.js";
|
|
10
|
+
import { m as ensureConversationWake, w as requestConversationWork } from "./store-FALy-JQb.js";
|
|
11
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-a9CHX-w6.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
14
14
|
// src/chat/task-execution/authorized-turn.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as conversationTurnFailureReasonSchema, h as usageSchema, i as conversationTurnFailureCodeSchema } from "./history-
|
|
1
|
+
import { a as conversationTurnFailureReasonSchema, h as usageSchema, i as conversationTurnFailureCodeSchema } from "./history-C84mlAwO.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { codeChangeStateSchema, conversationAnnotationInputSchema, conversationEventPresentationSchema, conversationSidebarAnnotationSchema, objectFactFields, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
4
4
|
// src/chat/briefs/schema.ts
|
|
@@ -616,7 +616,11 @@ const conversationReportTurnLifecycleEventDataSchema = z.discriminatedUnion("sta
|
|
|
616
616
|
z.object({
|
|
617
617
|
type: z.literal("turn_lifecycle"),
|
|
618
618
|
turnId: z.string().min(1),
|
|
619
|
-
state: z.enum([
|
|
619
|
+
state: z.enum([
|
|
620
|
+
"succeeded",
|
|
621
|
+
"no_reply",
|
|
622
|
+
"blocked"
|
|
623
|
+
])
|
|
620
624
|
}).strict(),
|
|
621
625
|
z.object({
|
|
622
626
|
type: z.literal("turn_lifecycle"),
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { H as recordAuthorizationCompleted, Nt as getTurnRecord, Tt as getConversationPendingAuth, V as recordAuthenticationLinked } from "./tasks-
|
|
2
|
-
import { p as escapeXml } from "./client-
|
|
3
|
-
import { a as getRuntimeMetadata, n as botConfig } from "./config-
|
|
4
|
-
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-
|
|
1
|
+
import { H as recordAuthorizationCompleted, Nt as getTurnRecord, Tt as getConversationPendingAuth, V as recordAuthenticationLinked } from "./tasks-DDT-J3Rf.js";
|
|
2
|
+
import { p as escapeXml } from "./client-B0YZfxNy.js";
|
|
3
|
+
import { a as getRuntimeMetadata, n as botConfig } from "./config-C0UwYqDK.js";
|
|
4
|
+
import { L as isNativeIdentityProvider, f as logException, g as runBestEffort, m as logWarn } from "./logging-Ce0mXZ8J.js";
|
|
5
5
|
import { f as parseSlackUserId } from "./actor-tlxzqaRe.js";
|
|
6
|
-
import { I as upsertIdentity, L as upsertLinkedIdentity, M as findUserByVerifiedEmails, p as getSqlExecutor, x as identityFromActor } from "./viewer-
|
|
6
|
+
import { I as upsertIdentity, L as upsertLinkedIdentity, M as findUserByVerifiedEmails, p as getSqlExecutor, x as identityFromActor } from "./viewer-BpE6Z3qf.js";
|
|
7
7
|
import { i as homeDir } from "./package-discovery-DJBompdd.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 { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-
|
|
12
|
-
import { at as formatProviderLabel, en as getSlackClient, i as resolvePluginOAuthAccount, n as createUserTokenStore, ot as parseOAuthStatePayload, st as resolveBaseUrl, vt as postSlackMessage } from "./credentialed-
|
|
13
|
-
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-
|
|
14
|
-
import { _ as getMcpProviderErrorAttributes } from "./service-account-
|
|
15
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
16
|
-
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-
|
|
8
|
+
import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-1BEIPdbT.js";
|
|
9
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DAJjAbSx.js";
|
|
10
|
+
import { t as discoverSkills } from "./skills-DzyGN7wd.js";
|
|
11
|
+
import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-BtYK7bht.js";
|
|
12
|
+
import { at as formatProviderLabel, en as getSlackClient, i as resolvePluginOAuthAccount, n as createUserTokenStore, ot as parseOAuthStatePayload, st as resolveBaseUrl, vt as postSlackMessage } from "./credentialed-enF5Bf3y.js";
|
|
13
|
+
import { a as acquireActiveLock, r as getStateAdapter } from "./adapter-eRFA_naf.js";
|
|
14
|
+
import { _ as getMcpProviderErrorAttributes } from "./service-account-6wC76eBZ.js";
|
|
15
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-cprEaxgl.js";
|
|
16
|
+
import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-Bwu3VORi.js";
|
|
17
17
|
import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
|
|
18
18
|
import path from "node:path";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { C as toOptionalTrimmed, i as completeObject, o as embedTexts } from "./client-
|
|
3
|
-
import { i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
-
import { T as withSpan, a as extractGenAiUsageSummary, f as logException, m as logWarn, p as logInfo, s as getLogContextAttributes, u as logAudit, v as setSentryUser, y as setSpanAttributes, z as isRecord$2 } from "./logging-
|
|
2
|
+
import { C as toOptionalTrimmed, i as completeObject, o as embedTexts } from "./client-B0YZfxNy.js";
|
|
3
|
+
import { i as getChatConfig, n as botConfig, o as getSlackBotToken, v as normalizeSlackEmojiName } from "./config-C0UwYqDK.js";
|
|
4
|
+
import { T as withSpan, a as extractGenAiUsageSummary, f as logException, m as logWarn, p as logInfo, s as getLogContextAttributes, u as logAudit, v as setSentryUser, y as setSpanAttributes, z as isRecord$2 } from "./logging-Ce0mXZ8J.js";
|
|
5
5
|
import { a as getClient$1, n as captureMessage, r as continueTrace } from "./sentry-MDkYAVPV.js";
|
|
6
|
-
import { t as canExposeConversationPayload } from "./conversation-privacy-
|
|
6
|
+
import { t as canExposeConversationPayload } from "./conversation-privacy-CY7JVjxn.js";
|
|
7
7
|
import { r as defaultModelId } from "./model-profile-Bg8EoCKD.js";
|
|
8
8
|
import { d as parseSlackTeamId, f as parseSlackUserId, g as parseSlackMessageTs, i as isActorUserId, o as parseActorUserId, u as parseSlackChannelReferenceId } from "./actor-tlxzqaRe.js";
|
|
9
|
-
import { F as saveUserTimezone, N as readUserTimezone, O as hasAgentTurnUsage, _ as createSqlStore, a as resolveViewerUser, f as getDb, i as readIdentityById, l as getConversationEventStore, p as getSqlExecutor, r as readActorIdentity, z as parseDestination } from "./viewer-
|
|
9
|
+
import { F as saveUserTimezone, N as readUserTimezone, O as hasAgentTurnUsage, _ as createSqlStore, a as resolveViewerUser, f as getDb, i as readIdentityById, l as getConversationEventStore, p as getSqlExecutor, r as readActorIdentity, z as parseDestination } from "./viewer-BpE6Z3qf.js";
|
|
10
10
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
11
|
-
import { _ as juniorConversationAnnotations, b as juniorAttachments, f as juniorConversationBriefs, h as juniorConversationEvents, i as juniorWorkspaces, n as juniorSnapshots, r as juniorWorkspaceRepos, u as juniorConversationParticipants, v as juniorCodeChanges, y as juniorCodeRepositories } from "./executor-
|
|
12
|
-
import { o as decodeStoredConversationEvent } from "./history-
|
|
13
|
-
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-
|
|
14
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
15
|
-
import { a as acquireActiveLock, n as getDefaultRedisStateAdapterFor, r as getStateAdapter, s as withLock } from "./adapter-
|
|
11
|
+
import { _ as juniorConversationAnnotations, b as juniorAttachments, f as juniorConversationBriefs, h as juniorConversationEvents, i as juniorWorkspaces, n as juniorSnapshots, r as juniorWorkspaceRepos, u as juniorConversationParticipants, v as juniorCodeChanges, y as juniorCodeRepositories } from "./executor-TnWbvL09.js";
|
|
12
|
+
import { o as decodeStoredConversationEvent } from "./history-C84mlAwO.js";
|
|
13
|
+
import { _ as CredentialUnavailableError, a as resolveAuthTokenPlaceholder, h as credentialSubjectSchema, m as credentialLogContext, o as resolvePluginCommandEnv, p as credentialContextSchema } from "./registry-1BEIPdbT.js";
|
|
14
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DAJjAbSx.js";
|
|
15
|
+
import { a as acquireActiveLock, n as getDefaultRedisStateAdapterFor, r as getStateAdapter, s as withLock } from "./adapter-eRFA_naf.js";
|
|
16
16
|
import { i as isValidTimeZone } from "./cadence-R7Em4RjE.js";
|
|
17
|
-
import { B as readMessageAttachments, C as conversationReportEventSchema, F as readMessageCardRefs, J as parseBriefInput, q as conversationBriefSchema, w as conversationReportMessageEventSchema } from "./conversation-
|
|
18
|
-
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-
|
|
17
|
+
import { B as readMessageAttachments, C as conversationReportEventSchema, F as readMessageCardRefs, J as parseBriefInput, q as conversationBriefSchema, w as conversationReportMessageEventSchema } from "./conversation-DF4rUcjb.js";
|
|
18
|
+
import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-BcCGlmg2.js";
|
|
19
19
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
20
20
|
import { z } from "zod";
|
|
21
21
|
import { createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -794,6 +794,12 @@ function reportMessageEvents(meta) {
|
|
|
794
794
|
const parsed = storedMessageEventsSchema.safeParse(meta?.events);
|
|
795
795
|
return parsed.success ? { events: parsed.data } : void 0;
|
|
796
796
|
}
|
|
797
|
+
const TURN_COMPLETED_STATES = {
|
|
798
|
+
success: "succeeded",
|
|
799
|
+
no_reply: "no_reply",
|
|
800
|
+
cancelled: "no_reply",
|
|
801
|
+
blocked: "blocked"
|
|
802
|
+
};
|
|
797
803
|
function reportEventData(args) {
|
|
798
804
|
const { data } = args;
|
|
799
805
|
if (data.type === "structured_event") {
|
|
@@ -879,7 +885,7 @@ function reportEventData(args) {
|
|
|
879
885
|
case "turn_completed": return {
|
|
880
886
|
type: "turn_lifecycle",
|
|
881
887
|
turnId: data.turnId,
|
|
882
|
-
state: data.outcome
|
|
888
|
+
state: TURN_COMPLETED_STATES[data.outcome]
|
|
883
889
|
};
|
|
884
890
|
case "turn_failed": {
|
|
885
891
|
const eventId = data.eventId;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./config-
|
|
2
|
-
import { f as logException } from "./logging-
|
|
1
|
+
import "./config-C0UwYqDK.js";
|
|
2
|
+
import { f as logException } from "./logging-Ce0mXZ8J.js";
|
|
3
3
|
import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { sql } from "drizzle-orm";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { p as getSqlExecutor } from "./viewer-
|
|
3
|
-
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-
|
|
4
|
-
import { H as detectImageMediaType } from "./conversation-
|
|
2
|
+
import { p as getSqlExecutor } from "./viewer-BpE6Z3qf.js";
|
|
3
|
+
import { S as readLiveAttachment, w as storeAttachment } from "./agent-runner-BtYK7bht.js";
|
|
4
|
+
import { H as detectImageMediaType } from "./conversation-DF4rUcjb.js";
|
|
5
5
|
// src/chat/attachments/images.ts
|
|
6
6
|
var images_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
decodeInputImages: () => decodeInputImages,
|
package/dist/instrumentation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-
|
|
1
|
+
import { F as getDeploymentTelemetryAttributes, P as getDeploymentServiceVersion } from "./logging-Ce0mXZ8J.js";
|
|
2
2
|
import { a as getClient, c as init, o as getGlobalScope } from "./sentry-MDkYAVPV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-CY7JVjxn.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
|
|
5
5
|
// src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { T as withSpan } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-C0UwYqDK.js";
|
|
2
|
+
import { T as withSpan } from "./logging-Ce0mXZ8J.js";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-MDkYAVPV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-oaLfxxnf.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { styleText } from "node:util";
|
|
5
5
|
import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $ as actorFromRun, et as toolInvocationDestination } from "./agent-runner-
|
|
3
|
-
import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-
|
|
4
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
5
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { $ as actorFromRun, et as toolInvocationDestination } from "./agent-runner-BtYK7bht.js";
|
|
3
|
+
import { P as PARENT_AGENT_TARGET, i as createAgentInvocationForMessage, j as AgentMessageTargetError, o as findChildAgentConversationId, s as getActiveAgentInvocationForConversation } from "./store-DcKkzrdt.js";
|
|
4
|
+
import { n as enqueueAgentMessageToParent } from "./result-CwOpzqdh.js";
|
|
5
|
+
import { r as enqueueAgentInvocation } from "./work-VX1SHWha.js";
|
|
6
6
|
// src/chat/agent-invocations/message.ts
|
|
7
7
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
8
8
|
/**
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, P as getDeploymentServiceVersion, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_CRON_SCHEDULE, D as JUNIOR_HEARTBEAT_CRON_SCHEDULE, E as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, M as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, O as JUNIOR_HEARTBEAT_ROUTE, P as getDeploymentServiceVersion, j as JUNIOR_RETENTION_ROUTE, k as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE } from "./logging-Ce0mXZ8J.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DJBompdd.js";
|
|
3
|
-
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-
|
|
3
|
+
import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DBpHmKnd.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-DOm9Y6qI.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-Bg4RS2Gy.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cf5gVPWP.js";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as createUserTokenStore } from "./credentialed-
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { n as createUserTokenStore } from "./credentialed-enF5Bf3y.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-VGAMUTGp.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
// src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as parseBriefInput, K as briefOutcomeStatusSchema, q as conversationBriefSchema } from "./conversation-
|
|
1
|
+
import { J as parseBriefInput, K as briefOutcomeStatusSchema, q as conversationBriefSchema } from "./conversation-DF4rUcjb.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
// src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-
|
|
1
|
+
import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-Ce0mXZ8J.js";
|
|
2
2
|
import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as withSpan, y as setSpanAttributes } from "./logging-
|
|
2
|
-
import { Cn as SANDBOX_WORKSPACE_ROOT, I as getSandboxProvider, M as create, P as isStale, on as sleep, vn as runNonInteractiveCommand, yn as SANDBOX_COMMAND_PATH } from "./credentialed-
|
|
3
|
-
import { r as getStateAdapter } from "./adapter-
|
|
1
|
+
import { T as withSpan, y as setSpanAttributes } from "./logging-Ce0mXZ8J.js";
|
|
2
|
+
import { Cn as SANDBOX_WORKSPACE_ROOT, I as getSandboxProvider, M as create, P as isStale, on as sleep, vn as runNonInteractiveCommand, yn as SANDBOX_COMMAND_PATH } from "./credentialed-enF5Bf3y.js";
|
|
3
|
+
import { r as getStateAdapter } from "./adapter-eRFA_naf.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/chat/sandbox/resources.ts
|
|
6
6
|
let configuredResources;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { Nt as getTurnRecord, Pt as listTurnSummaries } from "./tasks-
|
|
2
|
+
import { Nt as getTurnRecord, Pt as listTurnSummaries } from "./tasks-DDT-J3Rf.js";
|
|
3
3
|
import { t as createActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { G as listUnreportedSiblingAgents } from "./agent-runner-
|
|
6
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
7
|
-
import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-
|
|
8
|
-
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-
|
|
9
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
10
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-1BEIPdbT.js";
|
|
5
|
+
import { G as listUnreportedSiblingAgents } from "./agent-runner-BtYK7bht.js";
|
|
6
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-BcCGlmg2.js";
|
|
7
|
+
import { C as markAgentInvocationParentMailboxAppended, _ as getLatestAgentInvocationForConversation, a as createAgentInvocationFromLatest, c as getAgentInvocation, d as getAgentInvocationIdForResult, l as getAgentInvocationIdForEvents, p as getAgentInvocationResultMessageId, u as getAgentInvocationIdForMessage, y as isTerminalAgentInvocation } from "./store-DcKkzrdt.js";
|
|
8
|
+
import { a as EVENT_WAIT_MS, c as isEventMailboxMetadata, l as renderEventBatchText, u as timerWatchCredentialSubject } from "./session-stop-tZOw9AJD.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-FALy-JQb.js";
|
|
10
|
+
import { r as enqueueAgentInvocation } from "./work-VX1SHWha.js";
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
13
13
|
// src/chat/conversations/web-mailbox.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { A as commitAcceptedReply, F as loadProjection, H as recordAuthorizationCompleted, Ut as persistWithRetry, X as hydrateConversationMessages, Z as persistConversationMessages, at as buildConversationContext, dt as normalizeConversationText, ft as recordDeliveredAssistantMessage, kt as saveTurnCheckpoint, mt as upsertConversationMessage, ut as markConversationMessage, vt as authorizationId } from "./tasks-
|
|
2
|
-
import { f as logException, w as withLogContext, x as setTags } from "./logging-
|
|
3
|
-
import { d as getConversationStore, l as getConversationEventStore } from "./viewer-
|
|
4
|
-
import { f as credentialContextForActor } from "./registry-
|
|
5
|
-
import { P as messageCardText } from "./conversation-
|
|
6
|
-
import { X as markTurnFailed, Z as startActiveTurn } from "./store-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
9
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
10
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
11
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
1
|
+
import { A as commitAcceptedReply, F as loadProjection, H as recordAuthorizationCompleted, Ut as persistWithRetry, X as hydrateConversationMessages, Z as persistConversationMessages, at as buildConversationContext, dt as normalizeConversationText, ft as recordDeliveredAssistantMessage, kt as saveTurnCheckpoint, mt as upsertConversationMessage, ut as markConversationMessage, vt as authorizationId } from "./tasks-DDT-J3Rf.js";
|
|
2
|
+
import { f as logException, w as withLogContext, x as setTags } from "./logging-Ce0mXZ8J.js";
|
|
3
|
+
import { d as getConversationStore, l as getConversationEventStore } from "./viewer-BpE6Z3qf.js";
|
|
4
|
+
import { f as credentialContextForActor } from "./registry-1BEIPdbT.js";
|
|
5
|
+
import { P as messageCardText } from "./conversation-DF4rUcjb.js";
|
|
6
|
+
import { X as markTurnFailed, Z as startActiveTurn } from "./store-DcKkzrdt.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-UyzAfZQo.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-8N5LIkSg.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DaBVoz7h.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-cprEaxgl.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-C8sMdsdX.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as sandboxEgressSignalsResponseSchema } from "./credentialed-
|
|
1
|
+
import { $ as sandboxEgressSignalsResponseSchema } from "./credentialed-enF5Bf3y.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-CxKldAeB.js";
|
|
2
|
-
import { E as conversationUsageSchema, T as conversationSummaryReportSchema, j as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-
|
|
3
|
-
import "./automation-
|
|
2
|
+
import { E as conversationUsageSchema, T as conversationSummaryReportSchema, j as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema } from "./conversation-DF4rUcjb.js";
|
|
3
|
+
import "./automation-BKpY9LPa.js";
|
|
4
4
|
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-CJSUiksE.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { codeChangeStateSchema, eventMatchSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-
|
|
2
|
-
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-
|
|
3
|
-
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-
|
|
1
|
+
import { m as logWarn, y as setSpanAttributes, z as isRecord } from "./logging-Ce0mXZ8J.js";
|
|
2
|
+
import { c as fetchWithBoundedOAuthErrorBodies, i as resolvePluginHeaderEnvRefs } from "./registry-1BEIPdbT.js";
|
|
3
|
+
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-eRFA_naf.js";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { UnauthorizedError, auth } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
-
import { t as disconnectStateAdapter } from "./adapter-
|
|
3
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
1
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DAJjAbSx.js";
|
|
2
|
+
import { t as disconnectStateAdapter } from "./adapter-eRFA_naf.js";
|
|
3
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-6wC76eBZ.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
// src/cli/service-account.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $t as isToolResultMessage, Qt as isToolResultError, Xt as isAssistantMessage, en as normalizeToolNameFromResult } from "./tasks-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { f as logException, m as logWarn, p as logInfo } from "./logging-
|
|
5
|
-
import { d as getConversationStore, p as getSqlExecutor } from "./viewer-
|
|
2
|
+
import { $t as isToolResultMessage, Qt as isToolResultError, Xt as isAssistantMessage, en as normalizeToolNameFromResult } from "./tasks-DDT-J3Rf.js";
|
|
3
|
+
import { n as botConfig } from "./config-C0UwYqDK.js";
|
|
4
|
+
import { f as logException, m as logWarn, p as logInfo } from "./logging-Ce0mXZ8J.js";
|
|
5
|
+
import { d as getConversationStore, p as getSqlExecutor } from "./viewer-BpE6Z3qf.js";
|
|
6
6
|
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
-
import "./executor-
|
|
8
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import { Yt as verifyTimerWatchCredentialSubject, ln as JUNIOR_THREAD_STATE_TTL_MS, mn as ToolInputError, p as getPlugins, vt as postSlackMessage } from "./credentialed-
|
|
10
|
-
import { r as getStateAdapter } from "./adapter-
|
|
11
|
-
import { r as EVENT_AUTHOR_ID } from "./prompt-
|
|
12
|
-
import { r as sanitizeAssistantText } from "./assistant-reply-
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
7
|
+
import "./executor-TnWbvL09.js";
|
|
8
|
+
import { h as credentialSubjectSchema } from "./registry-1BEIPdbT.js";
|
|
9
|
+
import { Yt as verifyTimerWatchCredentialSubject, ln as JUNIOR_THREAD_STATE_TTL_MS, mn as ToolInputError, p as getPlugins, vt as postSlackMessage } from "./credentialed-enF5Bf3y.js";
|
|
10
|
+
import { r as getStateAdapter } from "./adapter-eRFA_naf.js";
|
|
11
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-BcCGlmg2.js";
|
|
12
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-UyzAfZQo.js";
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-FALy-JQb.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { eq, inArray } from "drizzle-orm";
|
|
16
16
|
import { describeEventTrigger, eventMatchFieldsSchema, eventMatchSchema, eventTriggerProblems, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { m as logWarn } from "./logging-
|
|
2
|
+
import { m as logWarn } from "./logging-Ce0mXZ8J.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-DJBompdd.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DAJjAbSx.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $ as actorFromRun, et as toolInvocationDestination } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { $ as actorFromRun, et as toolInvocationDestination } from "./agent-runner-BtYK7bht.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-VX1SHWha.js";
|
|
4
4
|
// src/chat/agent-invocations/spawn.ts
|
|
5
5
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
6
6
|
/** Bind a Run's Actor and credentials to new Agent invocations. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { l as TURN_REASONING_LEVELS, s as modelProfileSchema } from "./model-profile-Bg8EoCKD.js";
|
|
2
|
-
import { d as getConversationStore, p as getSqlExecutor } from "./viewer-
|
|
2
|
+
import { d as getConversationStore, p as getSqlExecutor } from "./viewer-BpE6Z3qf.js";
|
|
3
3
|
import { a as juniorAgentInvocations, i as juniorAgentBindings, n as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, t as AGENT_INVOCATION_MAILBOX_STATUSES } from "./agent-invocations-CxKldAeB.js";
|
|
4
|
-
import "./executor-
|
|
5
|
-
import { p as credentialContextSchema } from "./registry-
|
|
4
|
+
import "./executor-TnWbvL09.js";
|
|
5
|
+
import { p as credentialContextSchema } from "./registry-1BEIPdbT.js";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { and, asc, count, countDistinct, desc, eq, inArray, lt, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
-
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-
|
|
1
|
+
import { i as getChatConfig } from "./config-C0UwYqDK.js";
|
|
2
|
+
import { B as toOptionalNumber, V as toOptionalString, z as isRecord } from "./logging-Ce0mXZ8J.js";
|
|
3
3
|
import { s as parseStoredSlackActor } from "./actor-tlxzqaRe.js";
|
|
4
|
-
import { V as sameDestination, d as getConversationStore, z as parseDestination } from "./viewer-
|
|
5
|
-
import { ln as JUNIOR_THREAD_STATE_TTL_MS } from "./credentialed-
|
|
6
|
-
import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-
|
|
7
|
-
import "./job-queue-
|
|
4
|
+
import { V as sameDestination, d as getConversationStore, z as parseDestination } from "./viewer-BpE6Z3qf.js";
|
|
5
|
+
import { ln as JUNIOR_THREAD_STATE_TTL_MS } from "./credentialed-enF5Bf3y.js";
|
|
6
|
+
import { n as getDefaultRedisStateAdapterFor, r as getStateAdapter } from "./adapter-eRFA_naf.js";
|
|
7
|
+
import "./job-queue-DBpHmKnd.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { destinationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as logWarn } from "./logging-
|
|
2
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-
|
|
1
|
+
import { m as logWarn } from "./logging-Ce0mXZ8J.js";
|
|
2
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-DBpHmKnd.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
// src/chat/queue/callback.ts
|
|
@@ -109,7 +109,7 @@ function pluginTaskCallback() {
|
|
|
109
109
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
110
110
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
111
111
|
run: async (message) => {
|
|
112
|
-
const { processPluginTask } = await import("./task-runner-
|
|
112
|
+
const { processPluginTask } = await import("./task-runner-8N5LIkSg.js").then((n) => n.r);
|
|
113
113
|
await processPluginTask(message);
|
|
114
114
|
},
|
|
115
115
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import { $t as isToolResultMessage, Gt as getPiMessageRole, Nt as getTurnRecord, Qt as isToolResultError, X as hydrateConversationMessages, Yt as instructionTextForProjection, en as normalizeToolNameFromResult, i as readScheduledAutomation, l as blockEventAutomation, m as getEventAutomation, nn as stripRuntimeTurnContext, nt as fallbackShortTitle } from "./tasks-
|
|
3
|
-
import { g as runBestEffort, m as logWarn } from "./logging-
|
|
2
|
+
import { $t as isToolResultMessage, Gt as getPiMessageRole, Nt as getTurnRecord, Qt as isToolResultError, X as hydrateConversationMessages, Yt as instructionTextForProjection, en as normalizeToolNameFromResult, i as readScheduledAutomation, l as blockEventAutomation, m as getEventAutomation, nn as stripRuntimeTurnContext, nt as fallbackShortTitle } from "./tasks-DDT-J3Rf.js";
|
|
3
|
+
import { g as runBestEffort, m as logWarn } from "./logging-Ce0mXZ8J.js";
|
|
4
4
|
import { g as parseSlackMessageTs } from "./actor-tlxzqaRe.js";
|
|
5
|
-
import { E as agentTurnTotalTokens, T as agentTurnCostUsd, d as getConversationStore, f as getDb, r as readActorIdentity } from "./viewer-
|
|
5
|
+
import { E as agentTurnTotalTokens, T as agentTurnCostUsd, d as getConversationStore, f as getDb, r as readActorIdentity } from "./viewer-BpE6Z3qf.js";
|
|
6
6
|
import { s as juniorConversations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
-
import { a as juniorAutomationRuns, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-
|
|
8
|
-
import { m as sameActorIdentity } from "./history-
|
|
9
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { An as createPluginLogger, Bn as createPluginConversationEvents, Dn as createPluginState, On as createPluginEmbedder, _t as openSlackDirectMessage, fn as getDashboardTaskLink, g as coreTaskRegistrations, kn as createPluginModel, ln as JUNIOR_THREAD_STATE_TTL_MS, lt as escapeSlackMrkdwnText, nr as createPluginCache, p as getPlugins, ut as formatSlackLink, vt as postSlackMessage } from "./credentialed-
|
|
11
|
-
import { r as getStateAdapter } from "./adapter-
|
|
12
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
13
|
-
import { t as resolveConversationRouting } from "./turn-session-routing-
|
|
14
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
7
|
+
import { a as juniorAutomationRuns, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-TnWbvL09.js";
|
|
8
|
+
import { m as sameActorIdentity } from "./history-C84mlAwO.js";
|
|
9
|
+
import { h as credentialSubjectSchema } from "./registry-1BEIPdbT.js";
|
|
10
|
+
import { An as createPluginLogger, Bn as createPluginConversationEvents, Dn as createPluginState, On as createPluginEmbedder, _t as openSlackDirectMessage, fn as getDashboardTaskLink, g as coreTaskRegistrations, kn as createPluginModel, ln as JUNIOR_THREAD_STATE_TTL_MS, lt as escapeSlackMrkdwnText, nr as createPluginCache, p as getPlugins, ut as formatSlackLink, vt as postSlackMessage } from "./credentialed-enF5Bf3y.js";
|
|
11
|
+
import { r as getStateAdapter } from "./adapter-eRFA_naf.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-cprEaxgl.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-a9CHX-w6.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-Bg4RS2Gy.js";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
import { and, asc, count, desc, eq, gte, inArray, isNotNull, lte, max, sql } from "drizzle-orm";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as completeText, f as unwrapCurrentInstruction, p as escapeXml, s as resolveGatewayModel, y as isProviderRetryError } from "./client-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { V as toOptionalString, f as logException, m as logWarn, o as getActiveTraceId, t as buildTurnFailureResponse, y as setSpanAttributes, z as isRecord } from "./logging-
|
|
1
|
+
import { a as completeText, f as unwrapCurrentInstruction, p as escapeXml, s as resolveGatewayModel, y as isProviderRetryError } from "./client-B0YZfxNy.js";
|
|
2
|
+
import { n as botConfig } from "./config-C0UwYqDK.js";
|
|
3
|
+
import { V as toOptionalString, f as logException, m as logWarn, o as getActiveTraceId, t as buildTurnFailureResponse, y as setSpanAttributes, z as isRecord } from "./logging-Ce0mXZ8J.js";
|
|
4
4
|
import { c as toStoredSlackActor, g as parseSlackMessageTs } from "./actor-tlxzqaRe.js";
|
|
5
|
-
import { S as bindProviderConversation, b as startLocationThread, d as getConversationStore, f as getDb, h as withConversationEventLock, l as getConversationEventStore, m as createSqlConversationEventStore, p as getSqlExecutor, w as addAgentTurnUsage } from "./viewer-
|
|
5
|
+
import { S as bindProviderConversation, b as startLocationThread, d as getConversationStore, f as getDb, h as withConversationEventLock, l as getConversationEventStore, m as createSqlConversationEventStore, p as getSqlExecutor, w as addAgentTurnUsage } from "./viewer-BpE6Z3qf.js";
|
|
6
6
|
import { d as juniorDestinations } from "./agent-invocations-CxKldAeB.js";
|
|
7
|
-
import { a as juniorAutomationRuns, l as juniorLocationConfigurations, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-
|
|
8
|
-
import { d as contextProvenance, f as instructionActors, n as agentHistoryItemSchema, p as instructionProvenanceFor } from "./history-
|
|
9
|
-
import { f as credentialContextForActor, h as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
import { An as createPluginLogger, Q as parseSandboxEgressAuthRequiredSignal, ar as agentsInstructionsUpdatedEvent, at as formatProviderLabel, ct as startOAuthFlow, ir as JUNIOR_NATIVE_EVENT_NAMESPACE, mn as ToolInputError, nr as createPluginCache, nt as resolveSandboxEgressProviderForHost, on as sleep, or as authenticationLinkedEvent, p as getPlugins, sr as authenticationUnlinkedEvent, t as executeCredentialedEgressRequest } from "./credentialed-
|
|
12
|
-
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-
|
|
13
|
-
import { N as messageCardRef } from "./conversation-
|
|
14
|
-
import { A as eventAutomationSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-
|
|
7
|
+
import { a as juniorAutomationRuns, l as juniorLocationConfigurations, o as juniorAutomationVersions, s as juniorAutomations } from "./executor-TnWbvL09.js";
|
|
8
|
+
import { d as contextProvenance, f as instructionActors, n as agentHistoryItemSchema, p as instructionProvenanceFor } from "./history-C84mlAwO.js";
|
|
9
|
+
import { f as credentialContextForActor, h as credentialSubjectSchema } from "./registry-1BEIPdbT.js";
|
|
10
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-DAJjAbSx.js";
|
|
11
|
+
import { An as createPluginLogger, Q as parseSandboxEgressAuthRequiredSignal, ar as agentsInstructionsUpdatedEvent, at as formatProviderLabel, ct as startOAuthFlow, ir as JUNIOR_NATIVE_EVENT_NAMESPACE, mn as ToolInputError, nr as createPluginCache, nt as resolveSandboxEgressProviderForHost, on as sleep, or as authenticationLinkedEvent, p as getPlugins, sr as authenticationUnlinkedEvent, t as executeCredentialedEgressRequest } from "./credentialed-enF5Bf3y.js";
|
|
12
|
+
import { i as MUTATION_LOCK_TTL_MS, o as fenceLock, r as getStateAdapter, s as withLock } from "./adapter-eRFA_naf.js";
|
|
13
|
+
import { N as messageCardRef } from "./conversation-DF4rUcjb.js";
|
|
14
|
+
import { A as eventAutomationSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-BKpY9LPa.js";
|
|
15
15
|
import { isDeepStrictEqual } from "node:util";
|
|
16
16
|
import { z } from "zod";
|
|
17
17
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -52,7 +52,7 @@ function authorizationObservationMessage(data, createdAtMs) {
|
|
|
52
52
|
role: "user",
|
|
53
53
|
content: [{
|
|
54
54
|
type: "text",
|
|
55
|
-
text: `${label} completed for provider "${data.provider}". Continue the request that waited for it and retry the provider operation. If the person dropped that request
|
|
55
|
+
text: `${label} completed for provider "${data.provider}". Continue the newest request that waited for it and retry the provider operation. If a later message from the person dropped that request, do not continue it; say only that ${data.provider} is connected.`
|
|
56
56
|
}],
|
|
57
57
|
timestamp: createdAtMs
|
|
58
58
|
});
|