@sentry/junior 0.250.0 → 0.252.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/{admin-DMKyXi83.js → admin-C_-XEdym.js} +1 -1
- package/dist/{agent-hooks-CtZuJPTU.js → agent-hooks-DcoKnnxn.js} +36 -13
- package/dist/{agent-runner-CNiTpIpb.js → agent-runner-B-7S_DCS.js} +357 -99
- package/dist/api/schema.d.ts +46 -32
- package/dist/api/schema.js +2 -2
- package/dist/api.js +50 -65
- package/dist/app.js +52 -81
- package/dist/{assistant-reply-K5r1pcgJ.js → assistant-reply-DbPLvsnL.js} +1 -1
- package/dist/{briefs-8xyS3oeV.js → briefs-D4SMqc-r.js} +4 -4
- package/dist/{catalog-runtime-BQ3g3OX_.js → catalog-runtime-BQQiwwA7.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/main.js +2 -2
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-Q27hki0Y.js → client-ROZeVjq0.js} +2 -2
- package/dist/{config-Cb--Qs-g.js → config-DNNkxfGS.js} +2 -2
- package/dist/{connections-DZ70JeSN.js → connections-DJV6mLrH.js} +9 -9
- package/dist/{conversation-NutPJ8S8.js → conversation-T18Xlkx9.js} +9 -1
- package/dist/{conversation-privacy-BIDN1sW3.js → conversation-privacy-B19umzIL.js} +1 -1
- package/dist/{credential-sync-CyAN-Gos.js → credential-sync-CEd2F5PS.js} +14 -14
- package/dist/{executor-D8y7v95s.js → executor-_4bdoCxe.js} +59 -19
- package/dist/{images-BkGhqKIK.js → images-BAN7DHuO.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-uGq6Grnt.js → job-queue-DSQx1qFY.js} +1 -1
- package/dist/{logging-C22RdmU8.js → logging-COUsTFIL.js} +1 -1
- package/dist/{message-D0RPetp-.js → message-CtDDEwwV.js} +3 -3
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-DF_Odkvh.js → oauth-callback-server-CCiKrS0s.js} +2 -2
- package/dist/{pending-auth-Bg3A1-pE.js → pending-auth-DDx3EU4M.js} +2 -2
- package/dist/{profile-DK9umvav.js → profile-DP4LKL6V.js} +4 -4
- package/dist/{prompt-kYP1FAX_.js → prompt-C04mP1hu.js} +1 -1
- package/dist/{registry-BvsLuoLK.js → registry-CeEpPna6.js} +1 -1
- package/dist/{resolve-C9btOXju.js → resolve-B5ma3igH.js} +2 -2
- package/dist/{result-CcdQ2iau.js → result-Da0RVuWG.js} +7 -7
- package/dist/{runner-Bem4DUHN.js → runner-se1W_jGZ.js} +10 -10
- package/dist/{sandbox-egress-signals-Bl-4cF7E.js → sandbox-egress-signals-CS959-wm.js} +1 -1
- package/dist/{schema-DELmAdjR.js → schema-C9Vnyb_f.js} +1 -1
- package/dist/{session-stop-DteRDRCi.js → session-stop-DlRDisF5.js} +11 -11
- package/dist/{skills-CVwSL6Gc.js → skills-CSzgs0EC.js} +2 -2
- package/dist/{spawn-CA0YYtzr.js → spawn-DT9fMjtd.js} +2 -2
- package/dist/{store-Dw3eBN9S.js → store-Dx1U69mm.js} +6 -6
- package/dist/{task-queue-C7cyjcVj.js → task-queue-BX9YrIsw.js} +3 -3
- package/dist/{task-runner-BbSyWmOq.js → task-runner-CO55Olal.js} +46 -13
- package/dist/{tasks-B8nH3ND_.js → tasks-DwGlFX9i.js} +166 -212
- package/dist/{thread-state-BTOLzCM-.js → thread-state-Ces6tXmB.js} +6 -6
- package/dist/{turn-failure-response-BwNfO8Xt.js → turn-failure-response-B4VCvEQf.js} +8 -8
- package/dist/{turn-lifecycle-DSN0xGW7.js → turn-lifecycle-B1VV58Yo.js} +1 -1
- package/dist/{turn-session-routing-BRKYIn6n.js → turn-session-routing-Dw2Kamg9.js} +1 -1
- package/dist/{validation-CBkyzKCP.js → validation-yJF9LKOv.js} +1 -1
- package/dist/{version-CkwwLVLb.js → version-CZYqvIFh.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DdzigZQh.js → viewer-D96vo_42.js} +3 -3
- package/dist/{web-input-BjdnnpuN.js → web-input-5mls-41-.js} +105 -104
- package/dist/{work-qQEjtmlv.js → work-D2M2-zCO.js} +9 -9
- package/dist/{worker-C-CSZMy_.js → worker-BwCpf8tB.js} +5 -5
- package/migrations/0055_automations.sql +125 -0
- package/migrations/meta/0055_snapshot.json +3948 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-
|
|
3
|
-
import { f as getSqlExecutor } from "./viewer-
|
|
4
|
-
import { L as detectImageMediaType } from "./conversation-
|
|
2
|
+
import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-B-7S_DCS.js";
|
|
3
|
+
import { f as getSqlExecutor } from "./viewer-D96vo_42.js";
|
|
4
|
+
import { L as detectImageMediaType } from "./conversation-T18Xlkx9.js";
|
|
5
5
|
//#region 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 { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-
|
|
1
|
+
import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-COUsTFIL.js";
|
|
2
2
|
import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-
|
|
3
|
+
import { n as getCurrentConversationPrivacy } from "./conversation-privacy-B19umzIL.js";
|
|
4
4
|
import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
|
|
5
5
|
//#region src/chat/sentry-payload-filter.ts
|
|
6
6
|
const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { i as getChatConfig } from "./config-DNNkxfGS.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { 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, y as withScope } from "./sentry-CgWZM_kV.js";
|
|
2
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
2
|
+
import { t as JUNIOR_VERSION } from "./version-CZYqvIFh.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,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as enqueueAgentMessageToParent } from "./result-
|
|
4
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Ht as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Vt as actorFromRun, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET } from "./agent-runner-B-7S_DCS.js";
|
|
3
|
+
import { n as enqueueAgentMessageToParent } from "./result-Da0RVuWG.js";
|
|
4
|
+
import { r as enqueueAgentInvocation } from "./work-D2M2-zCO.js";
|
|
5
5
|
//#region src/chat/agent-invocations/message.ts
|
|
6
6
|
var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
|
|
7
7
|
/**
|
package/dist/nitro.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-
|
|
1
|
+
import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-COUsTFIL.js";
|
|
2
2
|
import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-BVvSnQBB.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-DSQx1qFY.js";
|
|
4
4
|
import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
|
|
5
|
-
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-
|
|
5
|
+
import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BX9YrIsw.js";
|
|
6
6
|
import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-CVvEUSMH.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 {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { Lt as createUserTokenStore } from "./agent-runner-B-7S_DCS.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CEd2F5PS.js";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
//#region src/chat/local/oauth-callback-server.ts
|
|
5
5
|
const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as isProviderRetryError } from "./client-
|
|
2
|
-
import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-
|
|
1
|
+
import { v as isProviderRetryError } from "./client-ROZeVjq0.js";
|
|
2
|
+
import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-DwGlFX9i.js";
|
|
3
3
|
import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/chat/state/turn-id.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as toOptionalTrimmed } from "./client-
|
|
2
|
-
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-
|
|
3
|
-
import { i as getChatConfig } from "./config-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
1
|
+
import { S as toOptionalTrimmed } from "./client-ROZeVjq0.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-COUsTFIL.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-DNNkxfGS.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BQQiwwA7.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { createMemoryState } from "@chat-adapter/state-memory";
|
|
7
7
|
import { createRedisState } from "@chat-adapter/state-redis";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-
|
|
1
|
+
import { H as conversationBriefSchema, U as parseBriefInput, V as briefOutcomeStatusSchema } from "./conversation-T18Xlkx9.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/chat/briefs/generate.ts
|
|
4
4
|
const MAX_INPUT_CHARS = 6e4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-
|
|
1
|
+
import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-COUsTFIL.js";
|
|
2
2
|
import { o as parseActorUserId } from "./actor-BTtLaeWy.js";
|
|
3
3
|
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.js";
|
|
4
4
|
import path from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as setSpanAttributes, w as withSpan } from "./logging-
|
|
2
|
-
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-
|
|
1
|
+
import { v as setSpanAttributes, w as withSpan } from "./logging-COUsTFIL.js";
|
|
2
|
+
import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-DP4LKL6V.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-
|
|
2
|
+
import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-B-7S_DCS.js";
|
|
3
3
|
import { t as createActor } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { d as credentialContextForActor } from "./registry-
|
|
5
|
-
import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-
|
|
6
|
-
import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-
|
|
7
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
8
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
9
|
-
import { r as enqueueAgentInvocation } from "./work-
|
|
4
|
+
import { d as credentialContextForActor } from "./registry-CeEpPna6.js";
|
|
5
|
+
import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DwGlFX9i.js";
|
|
6
|
+
import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-DlRDisF5.js";
|
|
7
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-C04mP1hu.js";
|
|
8
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-Dx1U69mm.js";
|
|
9
|
+
import { r as enqueueAgentInvocation } from "./work-D2M2-zCO.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
|
|
12
12
|
//#region src/chat/task-execution/mailbox-input.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
2
|
-
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-
|
|
3
|
-
import { d as credentialContextForActor } from "./registry-
|
|
4
|
-
import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-
|
|
5
|
-
import { K as messageCardText } from "./conversation-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-COUsTFIL.js";
|
|
2
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-D96vo_42.js";
|
|
3
|
+
import { d as credentialContextForActor } from "./registry-CeEpPna6.js";
|
|
4
|
+
import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-DwGlFX9i.js";
|
|
5
|
+
import { K as messageCardText } from "./conversation-T18Xlkx9.js";
|
|
6
6
|
import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
|
|
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-
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-DbPLvsnL.js";
|
|
8
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CO55Olal.js";
|
|
9
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-B1VV58Yo.js";
|
|
10
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-Ces6tXmB.js";
|
|
11
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-B4VCvEQf.js";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
14
14
|
//#region src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-B-7S_DCS.js";
|
|
2
2
|
//#region 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,5 +1,5 @@
|
|
|
1
1
|
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-D_YoNnAn.js";
|
|
2
|
-
import { D as conversationUsageSchema, E as conversationSummaryReportSchema, M as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-
|
|
2
|
+
import { D as conversationUsageSchema, E as conversationSummaryReportSchema, M as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-T18Xlkx9.js";
|
|
3
3
|
import "./automation-gznOMaQ2.js";
|
|
4
4
|
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { d as logException, f as logInfo, p as logWarn } from "./logging-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-
|
|
2
|
+
import { d as logException, f as logInfo, p as logWarn } from "./logging-COUsTFIL.js";
|
|
3
|
+
import { n as botConfig } from "./config-DNNkxfGS.js";
|
|
4
|
+
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-D96vo_42.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
6
|
-
import "./executor-
|
|
7
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
8
|
-
import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-
|
|
9
|
-
import {
|
|
10
|
-
import { w as getStateAdapter } from "./profile-
|
|
11
|
-
import { r as sanitizeAssistantText } from "./assistant-reply-
|
|
12
|
-
import { r as EVENT_AUTHOR_ID } from "./prompt-
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
6
|
+
import "./executor-_4bdoCxe.js";
|
|
7
|
+
import { p as credentialSubjectSchema } from "./registry-CeEpPna6.js";
|
|
8
|
+
import { V as postSlackMessage, _t as isToolResultError, ht as isAssistantMessage, vt as isToolResultMessage, wt as ToolInputError, yt as normalizeToolNameFromResult } from "./tasks-DwGlFX9i.js";
|
|
9
|
+
import { it as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-DcoKnnxn.js";
|
|
10
|
+
import { w as getStateAdapter } from "./profile-DP4LKL6V.js";
|
|
11
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-DbPLvsnL.js";
|
|
12
|
+
import { r as EVENT_AUTHOR_ID } from "./prompt-C04mP1hu.js";
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-Dx1U69mm.js";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import { eq, inArray } from "drizzle-orm";
|
|
16
16
|
import { eventMatchSchema, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { p as logWarn } from "./logging-
|
|
2
|
+
import { p as logWarn } from "./logging-COUsTFIL.js";
|
|
3
3
|
import { s as skillRoots } from "./package-discovery-BVvSnQBB.js";
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-BQQiwwA7.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-B4FMCO8f.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Ht as toolInvocationDestination, Vt as actorFromRun } from "./agent-runner-B-7S_DCS.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-D2M2-zCO.js";
|
|
4
4
|
//#region 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,10 +1,10 @@
|
|
|
1
|
-
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-COUsTFIL.js";
|
|
2
|
+
import { i as getChatConfig } from "./config-DNNkxfGS.js";
|
|
3
3
|
import { s as parseStoredSlackActor } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-
|
|
5
|
-
import {
|
|
6
|
-
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-
|
|
7
|
-
import "./job-queue-
|
|
4
|
+
import { F as sameDestination, N as parseDestination, u as getConversationStore } from "./viewer-D96vo_42.js";
|
|
5
|
+
import { it as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-DcoKnnxn.js";
|
|
6
|
+
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-DP4LKL6V.js";
|
|
7
|
+
import "./job-queue-DSQx1qFY.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 { p as logWarn } from "./logging-
|
|
2
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-
|
|
1
|
+
import { p as logWarn } from "./logging-COUsTFIL.js";
|
|
2
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as createVercelQueueClient, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-DSQx1qFY.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -115,7 +115,7 @@ function pluginTaskCallback() {
|
|
|
115
115
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
116
116
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
117
117
|
run: async (message) => {
|
|
118
|
-
const { processPluginTask } = await import("./task-runner-
|
|
118
|
+
const { processPluginTask } = await import("./task-runner-CO55Olal.js").then((n) => n.r);
|
|
119
119
|
await processPluginTask(message);
|
|
120
120
|
},
|
|
121
121
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { h as runBestEffort, p as logWarn } from "./logging-
|
|
2
|
+
import { h as runBestEffort, p as logWarn } from "./logging-COUsTFIL.js";
|
|
3
3
|
import { g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { C as agentTurnTotalTokens, S as agentTurnCostUsd, d as getDb, r as readActorIdentity, u as getConversationStore } from "./viewer-
|
|
4
|
+
import { C as agentTurnTotalTokens, S as agentTurnCostUsd, d as getDb, r as readActorIdentity, u as getConversationStore } from "./viewer-D96vo_42.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
|
|
6
|
-
import { c as juniorAutomationExecutions } from "./executor-
|
|
6
|
+
import { c as juniorAutomationExecutions, s as juniorAutomations } from "./executor-_4bdoCxe.js";
|
|
7
7
|
import { m as sameActorIdentity } from "./history-9pO1Zd4Y.js";
|
|
8
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import { Gt as hydrateConversationMessages, M as formatSlackLink, Q as getTurnRecord, V as postSlackMessage, Zt as fallbackShortTitle, _t as isToolResultError, a as readScheduledAutomation, g as getEventAutomation, j as escapeSlackMrkdwnText, mt as instructionTextForProjection, u as blockEventAutomation, ut as getPiMessageRole, vt as isToolResultMessage, xt as stripRuntimeTurnContext, yt as normalizeToolNameFromResult, z as openSlackDirectMessage } from "./tasks-
|
|
10
|
-
import {
|
|
11
|
-
import { w as getStateAdapter } from "./profile-
|
|
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-
|
|
8
|
+
import { p as credentialSubjectSchema } from "./registry-CeEpPna6.js";
|
|
9
|
+
import { Gt as hydrateConversationMessages, M as formatSlackLink, Q as getTurnRecord, V as postSlackMessage, Zt as fallbackShortTitle, _t as isToolResultError, a as readScheduledAutomation, g as getEventAutomation, j as escapeSlackMrkdwnText, mt as instructionTextForProjection, u as blockEventAutomation, ut as getPiMessageRole, vt as isToolResultMessage, xt as stripRuntimeTurnContext, yt as normalizeToolNameFromResult, z as openSlackDirectMessage } from "./tasks-DwGlFX9i.js";
|
|
10
|
+
import { St as createPluginConversationEvents, dt as createPluginModel, ft as createPluginLogger, it as JUNIOR_THREAD_STATE_TTL_MS, lt as createPluginState, p as coreTaskRegistrations, st as getDashboardTaskLink, u as getPlugins, ut as createPluginEmbedder } from "./agent-hooks-DcoKnnxn.js";
|
|
11
|
+
import { w as getStateAdapter } from "./profile-DP4LKL6V.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-Ces6tXmB.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-Dw2Kamg9.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-BX9YrIsw.js";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
|
|
@@ -275,6 +275,30 @@ async function readAutomationExecutionByConversationId(args) {
|
|
|
275
275
|
automationId: row.automationId
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
+
/**
|
|
279
|
+
* Load the display name of the Automation linked to each untitled
|
|
280
|
+
* conversation. The newest execution wins. Like the Automation list, the name
|
|
281
|
+
* falls back to the first line of the instruction. Titled conversations and
|
|
282
|
+
* conversations without a linked Automation are absent from the result.
|
|
283
|
+
*/
|
|
284
|
+
async function readAutomationTitlesByConversationId(conversations) {
|
|
285
|
+
const titles = /* @__PURE__ */ new Map();
|
|
286
|
+
const untitledIds = conversations.flatMap((conversation) => conversation.title ? [] : [conversation.conversationId]);
|
|
287
|
+
if (untitledIds.length === 0) return titles;
|
|
288
|
+
const rows = await getDb().select({
|
|
289
|
+
conversationId: juniorAutomationExecutions.conversationId,
|
|
290
|
+
instruction: juniorAutomations.instruction,
|
|
291
|
+
title: juniorAutomations.title
|
|
292
|
+
}).from(juniorAutomationExecutions).innerJoin(juniorAutomations, eq(juniorAutomations.id, juniorAutomationExecutions.automationId)).where(and(inArray(juniorAutomationExecutions.conversationId, untitledIds), eq(juniorAutomationExecutions.namespace, "junior"))).orderBy(desc(juniorAutomationExecutions.executedAtMs), desc(juniorAutomationExecutions.executionId));
|
|
293
|
+
const seen = /* @__PURE__ */ new Set();
|
|
294
|
+
for (const row of rows) {
|
|
295
|
+
if (!row.conversationId || seen.has(row.conversationId)) continue;
|
|
296
|
+
seen.add(row.conversationId);
|
|
297
|
+
const title = row.title?.trim() || fallbackShortTitle(row.instruction, "");
|
|
298
|
+
if (title) titles.set(row.conversationId, title);
|
|
299
|
+
}
|
|
300
|
+
return titles;
|
|
301
|
+
}
|
|
278
302
|
/** Load newest-first executions for one automation, with conversation titles when present. */
|
|
279
303
|
async function readAutomationExecutions(args) {
|
|
280
304
|
const namespace = args.namespace ?? "junior";
|
|
@@ -512,6 +536,7 @@ function normalizeMetadata(metadata) {
|
|
|
512
536
|
const entries = Object.entries(metadata).filter((entry) => typeof entry[0] === "string" && typeof entry[1] === "string");
|
|
513
537
|
return entries.length > 0 ? Object.fromEntries(entries) : void 0;
|
|
514
538
|
}
|
|
539
|
+
const DISPATCH_ID_PREFIX = "agent-dispatch:";
|
|
515
540
|
function buildDispatchId(plugin, idempotencyKey) {
|
|
516
541
|
return `dispatch_${createHash("sha256").update(plugin).update("\0").update(idempotencyKey).digest("hex").slice(0, 32)}`;
|
|
517
542
|
}
|
|
@@ -522,11 +547,19 @@ function parseDispatchRecord(value) {
|
|
|
522
547
|
}
|
|
523
548
|
/** Return the isolated durable conversation id for one dispatch. */
|
|
524
549
|
function getDispatchConversationId(dispatch) {
|
|
525
|
-
return
|
|
550
|
+
return `${DISPATCH_ID_PREFIX}${dispatch.id}`;
|
|
526
551
|
}
|
|
527
552
|
/** Return the stable synthetic input message id for one dispatch turn. */
|
|
528
553
|
function getDispatchInputMessageId(dispatchId) {
|
|
529
|
-
return
|
|
554
|
+
return `${DISPATCH_ID_PREFIX}${dispatchId}`;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Return the dispatch id of a dispatch Conversation, such as an Automation
|
|
558
|
+
* run. Other Conversations have no dispatch.
|
|
559
|
+
*/
|
|
560
|
+
function getDispatchIdForConversation(conversationId) {
|
|
561
|
+
if (!conversationId.startsWith(DISPATCH_ID_PREFIX)) return void 0;
|
|
562
|
+
return conversationId.slice(15) || void 0;
|
|
530
563
|
}
|
|
531
564
|
/** Return the stable turn id used by every run of one dispatch. */
|
|
532
565
|
function getDispatchTurnId(dispatchId) {
|
|
@@ -986,4 +1019,4 @@ async function processPluginTask(message, options = {}) {
|
|
|
986
1019
|
});
|
|
987
1020
|
}
|
|
988
1021
|
//#endregion
|
|
989
|
-
export {
|
|
1022
|
+
export { readAutomationTitlesByConversationId as A, readAutomationExecutionDays as C, readAutomationExecutionSummaries as D, readAutomationExecutionStatusHours as E, conversationActiveDaysColumn as M, conversationAggregateColumns as N, readAutomationExecutions as O, conversationRangeColumns as P, readAutomationExecutionByConversationId as S, readAutomationExecutionStatusDays as T, markDispatchCompleted as _, confirmDispatchMailboxAppend as a, notifyAutomationBlocked as b, getDispatchIdForConversation as c, getDispatchTurnId as d, getPluginDispatchProjection as f, markDispatchBlocked as g, markDispatchAwaitingResume as h, claimDispatchMailboxAppend as i, recordAutomationExecution as j, readAutomationRuns as k, getDispatchInputMessageId as l, listPendingDispatchMailboxAppends as m, scheduleSessionCompletedPluginTasks as n, createOrGetDispatch as o, isTerminalDispatchStatus as p, task_runner_exports as r, getDispatchConversationId as s, processPluginTask as t, getDispatchRecord as u, markDispatchFailed as v, readAutomationExecutionHours as w, emptyAutomationRunWindows as x, markDispatchRunning as y };
|