@sentry/junior 0.244.0 → 0.245.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-CF9lQg0M.js → admin-BEbNsG87.js} +1 -1
- package/dist/{agent-hooks-Cj_rSeWd.js → agent-hooks-Caa0Qh_Q.js} +10 -10
- package/dist/{agent-runner-DtEtbaOb.js → agent-runner-BEuPFbbv.js} +170 -52
- package/dist/api/schema.d.ts +64 -3
- package/dist/api/schema.js +2 -2
- package/dist/api.js +314 -245
- package/dist/{app-DRLh-8zs.d.ts → app-BYB7szGb.d.ts} +2 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +171 -104
- package/dist/{briefs-BMzTiGJO.js → briefs-DFAh_jTW.js} +4 -4
- package/dist/{catalog-runtime-CpxhLwZG.js → catalog-runtime-wmq_fqff.js} +1 -1
- package/dist/cli/chat.js +12 -12
- 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-BVaGEb1-.js → client-Bn9SRFCi.js} +2 -2
- package/dist/{config-q9xXVN_5.js → config-_XAINZMN.js} +11 -2
- package/dist/{conversation-BxvgH64Q.js → conversation-CvBG57Io.js} +11 -1
- package/dist/{conversation-privacy-Dyh_63Ee.js → conversation-privacy-BN5SGxsF.js} +1 -1
- package/dist/{credential-sync-Bsn-6m16.js → credential-sync-BvaUm6HQ.js} +14 -14
- package/dist/{executor-DA7eHhmC.js → executor-CFIqoCNJ.js} +2 -2
- package/dist/{images-CvMreau5.js → images-Ci43I3ek.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-mVyF9jgv.js → job-queue-CGicV7x6.js} +1 -1
- package/dist/{logging-z7_w-KN_.js → logging-Bs3dV81s.js} +1 -1
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-authorization-Db1yGVvG.js → oauth-authorization-COzWmMjO.js} +1 -1
- package/dist/{oauth-callback-server-_MfOtSxS.js → oauth-callback-server-17c9_39v.js} +2 -2
- package/dist/{pending-auth-OndKPW4M.js → pending-auth-Bnhg7Q9k.js} +2 -2
- package/dist/{profile-yeKVNECl.js → profile-BA471c-l.js} +4 -4
- package/dist/{prompt-CX36ZlbV.js → prompt-C9Q9cjD3.js} +1 -1
- package/dist/{registry-DvzzL8-v.js → registry-BYNOFO6e.js} +1 -1
- package/dist/{resolve-4u5gEU04.js → resolve-rpz8No2i.js} +2 -2
- package/dist/{runner-Y6A6pww4.js → runner-C8DRk9X6.js} +10 -10
- package/dist/{sandbox-egress-signals-D7AOkuoe.js → sandbox-egress-signals-B8hurjFt.js} +1 -1
- package/dist/{schema-Dyyi9oRc.js → schema-WRgR9EL6.js} +7 -3
- package/dist/{skills-DFduSvuO.js → skills-C4yrD2NR.js} +2 -2
- package/dist/{spawn-DYg7jhhR.js → spawn-CdAaTXrY.js} +2 -2
- package/dist/{task-queue-BQ0vnumm.js → task-queue-BBxHzlIB.js} +3 -3
- package/dist/{task-runner-D4jvUpFV.js → task-runner-BqFapTjs.js} +10 -10
- package/dist/{tasks-DBZAgTx7.js → tasks-Ddd7OAkp.js} +82 -11
- package/dist/{thread-state-hj70P2Cp.js → thread-state-DqErwbA8.js} +6 -6
- package/dist/{turn-failure-response-S2pwtR8b.js → turn-failure-response-DtL1-fOl.js} +9 -9
- package/dist/{turn-lifecycle-CNFOMAJq.js → turn-lifecycle-B5pzyD6W.js} +1 -1
- package/dist/{turn-session-routing-1eTgv6ns.js → turn-session-routing-D6pTU5uF.js} +1 -1
- package/dist/{validation-DcsBjzdi.js → validation-BAzlyNIc.js} +1 -1
- package/dist/{version-DVCHJYcY.js → version-CiXDH3oe.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-BBnCMR1g.js → viewer-wCn8xneI.js} +3 -3
- package/dist/{web-authorization-CTltRLsB.js → web-authorization-d5MtGpfG.js} +6 -6
- package/dist/{web-input-CIsRGF07.js → web-input-BZTiCtvP.js} +69 -46
- package/dist/{work-fje9VXgQ.js → work-4QPqTd5_.js} +6 -6
- package/dist/{worker-Byd2Et9r.js → worker-mc62tybz.js} +5 -5
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as logException } from "./logging-
|
|
1
|
+
import { d as logException } from "./logging-Bs3dV81s.js";
|
|
2
2
|
import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
|
|
3
|
-
import "./config-
|
|
3
|
+
import "./config-_XAINZMN.js";
|
|
4
4
|
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-BO6ddZax.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { sql } from "drizzle-orm";
|
|
@@ -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 "./conversation-
|
|
2
|
+
import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-BEuPFbbv.js";
|
|
3
|
+
import { f as getSqlExecutor } from "./viewer-wCn8xneI.js";
|
|
4
|
+
import "./conversation-CvBG57Io.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-Bs3dV81s.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-BN5SGxsF.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-_XAINZMN.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-CiXDH3oe.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";
|
package/dist/nitro.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as JuniorDashboardOptions } from "./app-
|
|
1
|
+
import { r as JuniorDashboardOptions } from "./app-BYB7szGb.js";
|
|
2
2
|
import { n as JuniorPluginSet } from "./plugins-CjfUP5gJ.js";
|
|
3
3
|
//#region src/nitro.d.ts
|
|
4
4
|
export type JuniorNitroDashboardOptions = JuniorDashboardOptions;
|
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-Bs3dV81s.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-CGicV7x6.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-BBxHzlIB.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ot as extractAssistantText } from "./tasks-Ddd7OAkp.js";
|
|
2
2
|
//#region src/chat/runtime/turn.ts
|
|
3
3
|
/** Classified Slack turn failure carrying the owning Sentry capture outward. */
|
|
4
4
|
var ConversationTurnBoundaryError = class extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-
|
|
1
|
+
import { gn as createUserTokenStore } from "./agent-runner-BEuPFbbv.js";
|
|
2
|
+
import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-BvaUm6HQ.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 {
|
|
1
|
+
import { v as isProviderRetryError } from "./client-Bn9SRFCi.js";
|
|
2
|
+
import { Y as abandonTurnRecord, sn as estimateTextTokens } from "./tasks-Ddd7OAkp.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-Bn9SRFCi.js";
|
|
2
|
+
import { v as setSpanAttributes, y as setSpanStatus } from "./logging-Bs3dV81s.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-_XAINZMN.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-wmq_fqff.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 { B as
|
|
1
|
+
import { B as conversationBriefSchema, V as parseBriefInput, z as briefOutcomeStatusSchema } from "./conversation-CvBG57Io.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-Bs3dV81s.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-Bs3dV81s.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-BA471c-l.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { FileSystem, Sandbox } from "@vercel/sandbox";
|
|
5
5
|
//#region src/chat/sandbox/resources.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-
|
|
7
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
8
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
9
|
-
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
-
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-Bs3dV81s.js";
|
|
2
|
+
import { c as getConversationEventStore, u as getConversationStore } from "./viewer-wCn8xneI.js";
|
|
3
|
+
import { d as credentialContextForActor } from "./registry-BYNOFO6e.js";
|
|
4
|
+
import { Dt as loadProjection, Ht as hydrateConversationMessages, J as saveTurnCheckpoint, Pt as recordAuthorizationCompleted, St as commitAcceptedReply, Ut as persistConversationMessages, Zt as buildConversationContext, in as recordDeliveredAssistantMessage, nn as markConversationMessage, on as upsertConversationMessage, rn as normalizeConversationText, tt as persistWithRetry } from "./tasks-Ddd7OAkp.js";
|
|
5
|
+
import { W as messageCardText } from "./conversation-CvBG57Io.js";
|
|
6
|
+
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-COzWmMjO.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BqFapTjs.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-B5pzyD6W.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DqErwbA8.js";
|
|
10
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-DtL1-fOl.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
//#region src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dn as sandboxEgressSignalsResponseSchema } from "./agent-runner-BEuPFbbv.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-BO6ddZax.js";
|
|
2
|
-
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-
|
|
2
|
+
import { D as conversationUsageSchema, E as conversationSummaryReportSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-CvBG57Io.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";
|
|
@@ -12,11 +12,15 @@ const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
|
|
|
12
12
|
/**
|
|
13
13
|
* One direct child agent of a Conversation, from agent invocation records.
|
|
14
14
|
*
|
|
15
|
-
* Viewers who cannot see private content get the status and
|
|
16
|
-
* name, task, title, or error.
|
|
15
|
+
* Viewers who cannot see private content get the status, time, and usage, but
|
|
16
|
+
* not the name, task, title, or error. Usage covers the child Conversation
|
|
17
|
+
* only, like the detail of that child Conversation.
|
|
17
18
|
*/
|
|
18
19
|
const conversationChildAgentSchema = z.object({
|
|
20
|
+
auxiliaryCosts: conversationAuxiliaryCostsSchema.optional(),
|
|
19
21
|
conversationId: z.string().min(1),
|
|
22
|
+
cumulativeDurationMs: z.number(),
|
|
23
|
+
cumulativeUsage: conversationUsageSchema.optional(),
|
|
20
24
|
error: z.string().min(1).optional(),
|
|
21
25
|
name: z.string().min(1).optional(),
|
|
22
26
|
redacted: z.literal(true).optional(),
|
|
@@ -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-Bs3dV81s.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-wmq_fqff.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 { bn as toolInvocationDestination, yn as actorFromRun } from "./agent-runner-BEuPFbbv.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-4QPqTd5_.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,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-Bs3dV81s.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-CGicV7x6.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-BqFapTjs.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-Bs3dV81s.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-wCn8xneI.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-BO6ddZax.js";
|
|
6
|
-
import { c as juniorAutomationExecutions } from "./executor-
|
|
6
|
+
import { c as juniorAutomationExecutions } from "./executor-CFIqoCNJ.js";
|
|
7
7
|
import { p as sameActorIdentity } from "./history-Nte1oVed.js";
|
|
8
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import {
|
|
10
|
-
import { ct as createPluginModel, it as getDashboardTaskLink, lt as createPluginLogger, ot as createPluginState, p as coreTaskRegistrations, st as createPluginEmbedder, tt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, yt as createPluginConversationEvents } from "./agent-hooks-
|
|
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-BYNOFO6e.js";
|
|
9
|
+
import { Ht as hydrateConversationMessages, Jt as fallbackShortTitle, M as formatSlackLink, Q as getTurnRecord, V as postSlackMessage, a as readScheduledAutomation, dt as instructionTextForProjection, g as getEventAutomation, gt as normalizeToolNameFromResult, ht as isToolResultMessage, j as escapeSlackMrkdwnText, mt as isToolResultError, st as getPiMessageRole, u as blockEventAutomation, vt as stripRuntimeTurnContext, z as openSlackDirectMessage } from "./tasks-Ddd7OAkp.js";
|
|
10
|
+
import { ct as createPluginModel, it as getDashboardTaskLink, lt as createPluginLogger, ot as createPluginState, p as coreTaskRegistrations, st as createPluginEmbedder, tt as JUNIOR_THREAD_STATE_TTL_MS, u as getPlugins, yt as createPluginConversationEvents } from "./agent-hooks-Caa0Qh_Q.js";
|
|
11
|
+
import { w as getStateAdapter } from "./profile-BA471c-l.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DqErwbA8.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-D6pTU5uF.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-BBxHzlIB.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";
|
|
@@ -1,15 +1,15 @@
|
|
|
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, s as getLogContextAttributes, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-
|
|
1
|
+
import { d as unwrapCurrentInstruction, f as escapeXml, i as completeText, o as resolveGatewayModel } from "./client-Bn9SRFCi.js";
|
|
2
|
+
import { d as logException, o as getActiveTraceId, p as logWarn, s as getLogContextAttributes, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-Bs3dV81s.js";
|
|
3
3
|
import { n as captureMessage } from "./sentry-CgWZM_kV.js";
|
|
4
|
-
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-
|
|
4
|
+
import { n as botConfig, v as normalizeSlackEmojiName } from "./config-_XAINZMN.js";
|
|
5
5
|
import { c as toStoredSlackActor, f as parseSlackUserId, g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
6
|
-
import { c as getConversationEventStore, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, v as startLocationThread, x as addAgentTurnUsage, y as bindProviderConversation } from "./viewer-
|
|
7
|
-
import { a as juniorSchedulerRuns, o as juniorSchedulerTasks, s as juniorAutomationVersions, u as juniorEventAutomations } from "./executor-
|
|
6
|
+
import { c as getConversationEventStore, f as getSqlExecutor, m as withConversationEventLock, p as createSqlConversationEventStore, u as getConversationStore, v as startLocationThread, x as addAgentTurnUsage, y as bindProviderConversation } from "./viewer-wCn8xneI.js";
|
|
7
|
+
import { a as juniorSchedulerRuns, o as juniorSchedulerTasks, s as juniorAutomationVersions, u as juniorEventAutomations } from "./executor-CFIqoCNJ.js";
|
|
8
8
|
import { d as instructionActors, f as instructionProvenanceFor, n as agentHistoryItemSchema, u as contextProvenance } from "./history-Nte1oVed.js";
|
|
9
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { Ft as SlackActionError, Ht as normalizeSlackConversationId, Jt as agentsInstructionsUpdatedEvent, Wt as withSlackRetries, Xt as authenticationUnlinkedEvent, Yt as authenticationLinkedEvent, n as applyPluginFormatMarkdown, qt as JUNIOR_NATIVE_EVENT_NAMESPACE, zt as getSlackClient } from "./agent-hooks-
|
|
11
|
-
import {
|
|
12
|
-
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-
|
|
9
|
+
import { p as credentialSubjectSchema } from "./registry-BYNOFO6e.js";
|
|
10
|
+
import { Ft as SlackActionError, Ht as normalizeSlackConversationId, Jt as agentsInstructionsUpdatedEvent, Wt as withSlackRetries, Xt as authenticationUnlinkedEvent, Yt as authenticationLinkedEvent, n as applyPluginFormatMarkdown, qt as JUNIOR_NATIVE_EVENT_NAMESPACE, zt as getSlackClient } from "./agent-hooks-Caa0Qh_Q.js";
|
|
11
|
+
import { U as messageCardRef } from "./conversation-CvBG57Io.js";
|
|
12
|
+
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-BA471c-l.js";
|
|
13
13
|
import { A as eventAutomationSchema, D as scheduledRunSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-gznOMaQ2.js";
|
|
14
14
|
import { isDeepStrictEqual } from "node:util";
|
|
15
15
|
import { z } from "zod";
|
|
@@ -2832,6 +2832,75 @@ async function listAutomationVersions(db, kind, automationId, limit) {
|
|
|
2832
2832
|
return (await db.select().from(juniorAutomationVersions).where(and(eq(juniorAutomationVersions.kind, kind), eq(juniorAutomationVersions.automationId, automationId))).orderBy(desc(juniorAutomationVersions.version)).limit(limit)).map((row) => parseVersionRow(kind, row));
|
|
2833
2833
|
}
|
|
2834
2834
|
//#endregion
|
|
2835
|
+
//#region src/chat/event-automations/run-limit.ts
|
|
2836
|
+
const RUN_LIST_PREFIX = "junior:event_automation_runs:v1";
|
|
2837
|
+
const RUN_LIST_BURST_ROOM = 100;
|
|
2838
|
+
/** Length of the rolling window for the run limit. */
|
|
2839
|
+
const EVENT_AUTOMATION_RUN_WINDOW_MS = 36e5;
|
|
2840
|
+
const runEntrySchema = z.union([z.object({
|
|
2841
|
+
atMs: z.number().finite(),
|
|
2842
|
+
id: z.string().min(1)
|
|
2843
|
+
}).strict(), z.object({ reset: z.literal(true) }).strict()]);
|
|
2844
|
+
function runListKey(automationId) {
|
|
2845
|
+
return `${RUN_LIST_PREFIX}:${automationId}`;
|
|
2846
|
+
}
|
|
2847
|
+
function runListMaxLength() {
|
|
2848
|
+
return botConfig.maxEventAutomationRunsPerHour + RUN_LIST_BURST_ROOM;
|
|
2849
|
+
}
|
|
2850
|
+
async function appendRunEntry(state, automationId, entry) {
|
|
2851
|
+
await state.connect();
|
|
2852
|
+
await state.appendToList(runListKey(automationId), entry, {
|
|
2853
|
+
maxLength: runListMaxLength(),
|
|
2854
|
+
ttlMs: EVENT_AUTOMATION_RUN_WINDOW_MS
|
|
2855
|
+
});
|
|
2856
|
+
}
|
|
2857
|
+
/** Reason stored on an Event automation that the run limit blocked. */
|
|
2858
|
+
function eventAutomationRunLimitReason() {
|
|
2859
|
+
return `This automation reached its limit of ${botConfig.maxEventAutomationRunsPerHour} runs per hour. Check that its trigger is not too broad, then resume it.`;
|
|
2860
|
+
}
|
|
2861
|
+
/**
|
|
2862
|
+
* Count one run of an Event automation, or refuse when its hour is full.
|
|
2863
|
+
*
|
|
2864
|
+
* `runKey` is the dispatch idempotency key, so a provider retry of the same
|
|
2865
|
+
* Event does not count again.
|
|
2866
|
+
*/
|
|
2867
|
+
async function admitEventAutomationRun(args) {
|
|
2868
|
+
const state = args.state ?? getStateAdapter();
|
|
2869
|
+
await appendRunEntry(state, args.automationId, {
|
|
2870
|
+
atMs: args.nowMs,
|
|
2871
|
+
id: args.runKey
|
|
2872
|
+
});
|
|
2873
|
+
const windowStartMs = args.nowMs - EVENT_AUTOMATION_RUN_WINDOW_MS;
|
|
2874
|
+
const values = await state.getList(runListKey(args.automationId));
|
|
2875
|
+
const entries = values.flatMap((value) => {
|
|
2876
|
+
const entry = runEntrySchema.safeParse(value);
|
|
2877
|
+
return entry.success ? [entry.data] : [];
|
|
2878
|
+
});
|
|
2879
|
+
let lastReset = -1;
|
|
2880
|
+
entries.forEach((entry, index) => {
|
|
2881
|
+
if ("reset" in entry) lastReset = index;
|
|
2882
|
+
});
|
|
2883
|
+
const oldest = entries[0];
|
|
2884
|
+
const full = lastReset === -1 && values.length >= runListMaxLength() && oldest !== void 0 && "atMs" in oldest && oldest.atMs > windowStartMs;
|
|
2885
|
+
const runKeys = /* @__PURE__ */ new Set();
|
|
2886
|
+
for (const entry of entries.slice(lastReset + 1)) {
|
|
2887
|
+
if ("reset" in entry) continue;
|
|
2888
|
+
if (entry.atMs > windowStartMs) runKeys.add(entry.id);
|
|
2889
|
+
if (entry.id === args.runKey) return full || runKeys.size > botConfig.maxEventAutomationRunsPerHour ? "limited" : "allowed";
|
|
2890
|
+
}
|
|
2891
|
+
return "limited";
|
|
2892
|
+
}
|
|
2893
|
+
/**
|
|
2894
|
+
* Forget the runs counted for one Event automation.
|
|
2895
|
+
*
|
|
2896
|
+
* Resume and revive call this so the automation starts with a new window.
|
|
2897
|
+
* Call it before the automation becomes active, so an Event cannot see the
|
|
2898
|
+
* old full count and block it again.
|
|
2899
|
+
*/
|
|
2900
|
+
async function clearEventAutomationRuns(automationId, state = getStateAdapter()) {
|
|
2901
|
+
await appendRunEntry(state, automationId, { reset: true });
|
|
2902
|
+
}
|
|
2903
|
+
//#endregion
|
|
2835
2904
|
//#region src/chat/event-automations/store.ts
|
|
2836
2905
|
const retainedEventAutomationSchema = eventAutomationSchema.extend({
|
|
2837
2906
|
destination: slackDestinationSchema,
|
|
@@ -2886,6 +2955,7 @@ async function getEventAutomation(db, id) {
|
|
|
2886
2955
|
async function createEventAutomation(db, task) {
|
|
2887
2956
|
const parsed = eventAutomationSchema.parse(eventAutomationJsonPayload(task));
|
|
2888
2957
|
const title = task.title?.trim() || null;
|
|
2958
|
+
if ((await getEventAutomation(db, parsed.id))?.status === "deleted") await clearEventAutomationRuns(parsed.id);
|
|
2889
2959
|
return db.transaction(async (tx) => {
|
|
2890
2960
|
const inserted = await tx.insert(juniorEventAutomations).values({
|
|
2891
2961
|
id: parsed.id,
|
|
@@ -3001,9 +3071,10 @@ async function findMatchingEventAutomations(db, event, teamId) {
|
|
|
3001
3071
|
* Change lifecycle under the same row lock as edits, without changing
|
|
3002
3072
|
* credentials. A pause keeps an unresolved block reason, so resuming a paused
|
|
3003
3073
|
* blocked automation returns it to blocked. Resume a blocked automation to
|
|
3004
|
-
* clear the reason.
|
|
3074
|
+
* clear the reason. A resume also clears the run-limit count first.
|
|
3005
3075
|
*/
|
|
3006
3076
|
async function setEventAutomationStatus(db, id, status, revision) {
|
|
3077
|
+
if (status === "active" && (await getEventAutomation(db, id))?.status !== "active") await clearEventAutomationRuns(id);
|
|
3007
3078
|
return db.transaction(async (tx) => {
|
|
3008
3079
|
const rows = await tx.select().from(juniorEventAutomations).where(eq(juniorEventAutomations.id, id)).for("update");
|
|
3009
3080
|
const current = rows[0] ? parseEventAutomationRow(rows[0]) : void 0;
|
|
@@ -3233,4 +3304,4 @@ async function saveScheduledAutomationInLock(db, task, current) {
|
|
|
3233
3304
|
await writeScheduledAutomation(db, requireStoredTask(task), current);
|
|
3234
3305
|
}
|
|
3235
3306
|
//#endregion
|
|
3236
|
-
export {
|
|
3307
|
+
export { listTurnSummaries as $, estimateConversationContextTokens as $t, requireAutomationRevision as A, openConversationProjection as At, postSlackEphemeralMessage as B, recordTurnRoute as Bt, eventAutomationRunLimitReason as C, commitMessages as Ct, sameDefinitionValue as D, loadProjection as Dt, readAutomationVersion as E, loadLastModelProfile as Et, slackMention as F, recordAuthorizationRequested as Ft, slackExternalRefIdSchema as G, persistConversationMessageSummaries as Gt, removeReactionFromMessage as H, hydrateConversationMessages as Ht, truncateStatusText as I, recordGuardianActionReviewed as It, saveTurnCheckpoint as J, fallbackShortTitle as Jt, continuableMessages as K, resolveConversationTitle as Kt, addReactionToMessage as L, recordMcpProviderConnected as Lt, formatSlackLink as M, recordAttachmentsDelivered as Mt, normalizeSlackReplyMarkdown as N, recordAuthenticationLinked as Nt, AutomationConflictError as O, loadTurnProjection as Ot, normalizeSlackStatusText as P, recordAuthorizationCompleted as Pt, getTurnRecord as Q, createConversationMemoryService as Qt, getSlackMessagePermalink as R, recordSubscribedReplyRoute as Rt, admitEventAutomationRun as S, commitAcceptedReply as St, listAutomationVersions as T, loadConversationProjection as Tt, uploadFilesToConversation as U, persistConversationMessages as Ut, postSlackMessage as V, appendConversationMessages as Vt, slackEntitySchema as W, projectConversationMessages as Wt, completeTurnRecord as X, appendThreadContextMessages as Xt, abandonTurnRecord as Y, resolveTaskTitle as Yt, failTurnRecord as Z, buildConversationContext as Zt, listDeletedEventAutomationsCreatedBy as _, retainRuntimeTurnContext as _t, readScheduledAutomation as a, turnHasReply as an, isTurnExecutionLimitExceededError as at, saveEventAutomation as b, TURN_CONTEXT_TAG as bt, scheduledRunId as c, getAgentContextCompactionTriggerTokens as cn, getTerminalAssistantMessages as ct, collectEventAutomationMatchKeys as d, piMessageFromHistoryItem as dn, instructionTextForProjection as dt, getConversationMessageSlackTs as en, recordTurnSummary as et, createEventAutomation as f, isAssistantMessage as ft, getEventAutomation as g, normalizeToolNameFromResult as gt, findMatchingEventAutomations as h, isToolResultMessage as ht, parseScheduledAutomationRow as i, recordDeliveredAssistantMessage as in, buildTurnErrorResponse as it, escapeSlackMrkdwnText as j, recordAgentsInstructionsUpdated as jt, automationRevision as k, loadTurnRoute as kt, withScheduledAutomationLock as l, getAgentContextInputLimitTokens as ln, getUserMessageInstructionText as lt, eventAutomationBelongsToUser as m, isToolResultError as mt, listScheduledAutomations as n, markConversationMessage as nn, TurnSliceLimitExceededError as nt, saveScheduledAutomation as o, upsertConversationMessage as on, extractAssistantText as ot, deleteEventAutomation as p, isContinuablePiBoundary as pt, loadTurnCheckpoint as q, settleConversationTitleWork as qt, listScheduledAutomationsForTeam as r, normalizeConversationText as rn, assertTurnToolCallLimit as rt, saveScheduledAutomationInLock as s, estimateTextTokens as sn, getPiMessageRole as st, createScheduledAutomation as t, isHumanConversationMessage as tn, persistWithRetry as tt, blockEventAutomation as u, historyItemFromPiMessage as un, hasRuntimeTurnContext as ut, listEventAutomationsForTeam as v, stripRuntimeTurnContext as vt, automationDefinition as w, loadConnectedMcpProviders as wt, setEventAutomationStatus as x, ToolInputError as xt, parseEventAutomationRow as y, trimTrailingAssistantMessages as yt, openSlackDirectMessage as z, recordToolExecutionStarted as zt };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-
|
|
2
|
-
import { d as getDb } from "./viewer-
|
|
1
|
+
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-Bs3dV81s.js";
|
|
2
|
+
import { d as getDb } from "./viewer-wCn8xneI.js";
|
|
3
3
|
import { d as juniorDestinations } from "./agent-invocations-BO6ddZax.js";
|
|
4
|
-
import { d as juniorLocationConfigurations } from "./executor-
|
|
5
|
-
import {
|
|
6
|
-
import { tt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
7
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { d as juniorLocationConfigurations } from "./executor-CFIqoCNJ.js";
|
|
5
|
+
import { Ut as persistConversationMessages } from "./tasks-Ddd7OAkp.js";
|
|
6
|
+
import { tt as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-Caa0Qh_Q.js";
|
|
7
|
+
import { w as getStateAdapter } from "./profile-BA471c-l.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
10
10
|
import { and, eq, sql } from "drizzle-orm";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-
|
|
2
|
-
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { _ as getProviderErrorUserMessage, g as getProviderErrorAttributes, h as findProviderError, p as ProviderError } from "./client-Bn9SRFCi.js";
|
|
2
|
+
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-Bs3dV81s.js";
|
|
3
3
|
import { g as parseSlackMessageTs } from "./actor-BTtLaeWy.js";
|
|
4
|
-
import { c as getConversationEventStore, d as getDb } from "./viewer-
|
|
5
|
-
import {
|
|
6
|
-
import { At as listConversationAnnotations } from "./agent-hooks-
|
|
7
|
-
import { G as
|
|
8
|
-
import { r as clearPendingAuth, u as buildDeterministicTurnId } from "./pending-auth-
|
|
9
|
-
import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-
|
|
10
|
-
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
4
|
+
import { c as getConversationEventStore, d as getDb } from "./viewer-wCn8xneI.js";
|
|
5
|
+
import { Ht as hydrateConversationMessages, nn as markConversationMessage } from "./tasks-Ddd7OAkp.js";
|
|
6
|
+
import { At as listConversationAnnotations } from "./agent-hooks-Caa0Qh_Q.js";
|
|
7
|
+
import { G as readMessageCardRefs, K as removedCardSchema, q as resolveMessageCards } from "./conversation-CvBG57Io.js";
|
|
8
|
+
import { r as clearPendingAuth, u as buildDeterministicTurnId } from "./pending-auth-Bnhg7Q9k.js";
|
|
9
|
+
import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-COzWmMjO.js";
|
|
10
|
+
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-DqErwbA8.js";
|
|
11
11
|
//#region src/chat/conversations/pending-cards.ts
|
|
12
12
|
/** Select undelivered cards and load their latest saved facts. */
|
|
13
13
|
async function loadPendingMessageCards(conversationId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as getConversationEventStore } from "./viewer-
|
|
1
|
+
import { c as getConversationEventStore } from "./viewer-wCn8xneI.js";
|
|
2
2
|
//#region src/chat/conversations/turn-lifecycle.ts
|
|
3
3
|
/** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
|
|
4
4
|
var ConversationTurnLifecycleService = class {
|
|
@@ -34,7 +34,7 @@ function slackSourceForDestination(args) {
|
|
|
34
34
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
35
35
|
*/
|
|
36
36
|
async function resolveConversationRouting(args) {
|
|
37
|
-
const conversationStore = args.conversationStore ?? (await import("./viewer-
|
|
37
|
+
const conversationStore = args.conversationStore ?? (await import("./viewer-wCn8xneI.js").then((n) => n.s)).getConversationStore();
|
|
38
38
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
39
39
|
let destination;
|
|
40
40
|
let source;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-wmq_fqff.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
//#region src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
import { t as JUNIOR_VERSION } from "./version-CiXDH3oe.js";
|
|
2
2
|
export { JUNIOR_VERSION };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { F as normalizeIdentityEmail } from "./logging-
|
|
3
|
-
import { i as getChatConfig } from "./config-
|
|
2
|
+
import { F as normalizeIdentityEmail } from "./logging-Bs3dV81s.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-_XAINZMN.js";
|
|
4
4
|
import { d as parseSlackTeamId, o as parseActorUserId, u as parseSlackChannelReferenceId } from "./actor-BTtLaeWy.js";
|
|
5
5
|
import { c as juniorIdentities, d as juniorDestinations, l as juniorUsers, o as conversationReadColumns, s as juniorConversations } from "./agent-invocations-BO6ddZax.js";
|
|
6
|
-
import { _ as juniorConversationEvents, f as juniorConversationParticipants, g as juniorConversationMetrics, h as CONVERSATION_METRICS, p as juniorConversationBindings, t as createJuniorSqlExecutor, y as juniorConversationAnnotations } from "./executor-
|
|
6
|
+
import { _ as juniorConversationEvents, f as juniorConversationParticipants, g as juniorConversationMetrics, h as CONVERSATION_METRICS, p as juniorConversationBindings, t as createJuniorSqlExecutor, y as juniorConversationAnnotations } from "./executor-CFIqoCNJ.js";
|
|
7
7
|
import { c as newConversationEventSchema, l as encodeHistoryPayload, m as usageSchema, o as decodeStoredConversationEvent, r as conversationEventDataSchema, s as historyReplacementSchema } from "./history-Nte1oVed.js";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { and, asc, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as getConversationEventStore } from "./viewer-
|
|
3
|
-
import {
|
|
4
|
-
import { w as getStateAdapter } from "./profile-
|
|
5
|
-
import { a as getVercelConversationWorkQueue } from "./job-queue-
|
|
6
|
-
import { n as resolveTurnSessionRouting } from "./turn-session-routing-
|
|
1
|
+
import { Ft as ensureConversationWake, Gt as requestConversationWork } from "./agent-runner-BEuPFbbv.js";
|
|
2
|
+
import { c as getConversationEventStore } from "./viewer-wCn8xneI.js";
|
|
3
|
+
import { Q as getTurnRecord, Z as failTurnRecord, q as loadTurnCheckpoint } from "./tasks-Ddd7OAkp.js";
|
|
4
|
+
import { w as getStateAdapter } from "./profile-BA471c-l.js";
|
|
5
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-CGicV7x6.js";
|
|
6
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-D6pTU5uF.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/chat/task-execution/authorized-turn.ts
|