@sentry/junior 0.254.0 → 0.255.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-D7kYbu5l.js → admin-CeJh4SuR.js} +1 -1
- package/dist/{agent-hooks-DfPubHYm.js → agent-hooks-CDVx26Uu.js} +8 -8
- package/dist/{agent-runner-BWmnJ0dD.js → agent-runner-Caiof09f.js} +24 -21
- package/dist/api/schema.d.ts +0 -8
- package/dist/api/schema.js +2 -2
- package/dist/api.js +60 -70
- package/dist/app.js +36 -36
- package/dist/{assistant-reply-B3J6ogAM.js → assistant-reply-BddmM66R.js} +1 -1
- package/dist/{automation-gznOMaQ2.js → automation-CHdlHVZP.js} +3 -4
- package/dist/{briefs-B_fgUFD2.js → briefs-iVq_8-ft.js} +2 -2
- package/dist/{catalog-runtime-TG5WF66H.js → catalog-runtime-hKmI-iZa.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-oBgOmQV6.js → client-Clj7onnT.js} +2 -2
- package/dist/{config-CRlLncIj.js → config-BDAfLTI9.js} +2 -2
- package/dist/{connections-BZAuDnYm.js → connections-BC0RTejT.js} +9 -9
- package/dist/{conversation-privacy-Dui3hTO-.js → conversation-privacy-1ERtieuM.js} +1 -1
- package/dist/{credential-sync-9HiSpphh.js → credential-sync-BZuqqIHk.js} +14 -14
- package/dist/{executor-B88oEqok.js → executor-Dh4Ofsnx.js} +5 -6
- package/dist/{images-k8HewSp_.js → images-C-WOnTc_.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-B6KaQXY6.js → job-queue-BaCL36FY.js} +1 -1
- package/dist/{logging-B3nJLXT7.js → logging-D3aYP0aG.js} +1 -1
- package/dist/{message-C9Wx3Rxx.js → message-B9xqD2BP.js} +3 -3
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CetsCZng.js → oauth-callback-server-i5qdAou6.js} +2 -2
- package/dist/{pending-auth-m8aJlwP_.js → pending-auth-D2t1Moxf.js} +2 -2
- package/dist/{profile-Dh73O6lZ.js → profile-DnkX3e2S.js} +4 -4
- package/dist/{registry-C-jns0Be.js → registry-CmKmKHpp.js} +1 -1
- package/dist/{resolve-CDYCpS_U.js → resolve-jfNHtEBx.js} +2 -2
- package/dist/{result-sih-x_yN.js → result-Df5nEDX2.js} +6 -6
- package/dist/{runner-CA43p74t.js → runner-CmzoXEI4.js} +9 -9
- package/dist/{sandbox-egress-signals-CxHHTu8e.js → sandbox-egress-signals-DjMNKLZz.js} +1 -1
- package/dist/{schema-C-a9U34c.js → schema-BBgv0MNf.js} +1 -1
- package/dist/{session-stop-DenN1GuJ.js → session-stop-BEBfE97J.js} +10 -10
- package/dist/{skills-D_XDFkSx.js → skills-Dc-AMYi4.js} +2 -2
- package/dist/{spawn-CcWYt3Tl.js → spawn-OgTwBUj0.js} +2 -2
- package/dist/{store-CIs0Tr31.js → store-BashBewg.js} +6 -6
- package/dist/{task-queue-DAY-aQLX.js → task-queue-VvIKqlQ4.js} +3 -3
- package/dist/{task-runner-BE6Jgt2u.js → task-runner-D2CpD6GN.js} +10 -10
- package/dist/{tasks-DO9VM9cu.js → tasks-dJooqiip.js} +16 -26
- package/dist/{thread-state-FreaCOZD.js → thread-state-CsMC-ob0.js} +6 -6
- package/dist/{turn-failure-response-CJSt2ZSf.js → turn-failure-response-zB364t7_.js} +7 -7
- package/dist/{turn-lifecycle-BXclEcfZ.js → turn-lifecycle-BfodfmiY.js} +1 -1
- package/dist/{turn-session-routing-CItfUsjQ.js → turn-session-routing-BAh_qsBJ.js} +1 -1
- package/dist/{validation-MW8dmhF9.js → validation-LzIilOb6.js} +1 -1
- package/dist/{version-DcWD8xpq.js → version-CDM8Rq6E.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CGZiUVMU.js → viewer-Rnim7alE.js} +3 -3
- package/dist/{web-input-Dpqh0oBt.js → web-input-Dc1VwcT4.js} +74 -75
- package/dist/{work-DbA9xNO1.js → work-BAn43SsN.js} +9 -9
- package/dist/{worker-DuCs9-3G.js → worker-mBXq4_zg.js} +5 -5
- package/migrations/0058_automation_creator_identity.sql +45 -0
- package/migrations/meta/0058_snapshot.json +3598 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-BY60iNw-.js";
|
|
2
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
|
-
import "./automation-
|
|
3
|
+
import "./automation-CHdlHVZP.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";
|
|
6
6
|
import { codeChangeStateSchema } from "@sentry/junior-plugin-api";
|
|
@@ -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-D3aYP0aG.js";
|
|
3
|
+
import { n as botConfig } from "./config-BDAfLTI9.js";
|
|
4
|
+
import { f as getSqlExecutor, u as getConversationStore } from "./viewer-Rnim7alE.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-BY60iNw-.js";
|
|
6
|
-
import "./executor-
|
|
7
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
8
|
-
import {
|
|
9
|
-
import { it as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-
|
|
10
|
-
import { w as getStateAdapter } from "./profile-
|
|
11
|
-
import { r as sanitizeAssistantText } from "./assistant-reply-
|
|
6
|
+
import "./executor-Dh4Ofsnx.js";
|
|
7
|
+
import { p as credentialSubjectSchema } from "./registry-CmKmKHpp.js";
|
|
8
|
+
import { St as ToolInputError, _t as normalizeToolNameFromResult, gt as isToolResultMessage, ht as isToolResultError, pt as isAssistantMessage, z as postSlackMessage } from "./tasks-dJooqiip.js";
|
|
9
|
+
import { it as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-CDVx26Uu.js";
|
|
10
|
+
import { w as getStateAdapter } from "./profile-DnkX3e2S.js";
|
|
11
|
+
import { r as sanitizeAssistantText } from "./assistant-reply-BddmM66R.js";
|
|
12
12
|
import { r as EVENT_AUTHOR_ID } from "./prompt-C04mP1hu.js";
|
|
13
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
13
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-BashBewg.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-D3aYP0aG.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-hKmI-iZa.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 { Ht as toolInvocationDestination, Vt as actorFromRun } from "./agent-runner-
|
|
3
|
-
import { n as createAndEnqueueAgentInvocation } from "./work-
|
|
2
|
+
import { Ht as toolInvocationDestination, Vt as actorFromRun } from "./agent-runner-Caiof09f.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-BAn43SsN.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-D3aYP0aG.js";
|
|
2
|
+
import { i as getChatConfig } from "./config-BDAfLTI9.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 { it as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
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-Rnim7alE.js";
|
|
5
|
+
import { it as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CDVx26Uu.js";
|
|
6
|
+
import { C as getDefaultRedisStateAdapterFor, w as getStateAdapter } from "./profile-DnkX3e2S.js";
|
|
7
|
+
import "./job-queue-BaCL36FY.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-D3aYP0aG.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-BaCL36FY.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-D2CpD6GN.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-D3aYP0aG.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-Rnim7alE.js";
|
|
5
5
|
import { s as juniorConversations } from "./agent-invocations-BY60iNw-.js";
|
|
6
|
-
import { o as juniorAutomationRuns, s as juniorAutomations } from "./executor-
|
|
6
|
+
import { o as juniorAutomationRuns, s as juniorAutomations } from "./executor-Dh4Ofsnx.js";
|
|
7
7
|
import { m as sameActorIdentity } from "./history-9pO1Zd4Y.js";
|
|
8
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
9
|
-
import {
|
|
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-
|
|
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-CmKmKHpp.js";
|
|
9
|
+
import { A as formatSlackLink, L as openSlackDirectMessage, Ut as hydrateConversationMessages, X as getTurnRecord, Yt as fallbackShortTitle, _t as normalizeToolNameFromResult, ct as getPiMessageRole, ft as instructionTextForProjection, gt as isToolResultMessage, ht as isToolResultError, i as readScheduledAutomation, k as escapeSlackMrkdwnText, l as blockEventAutomation, m as getEventAutomation, yt as stripRuntimeTurnContext, z as postSlackMessage } from "./tasks-dJooqiip.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-CDVx26Uu.js";
|
|
11
|
+
import { w as getStateAdapter } from "./profile-DnkX3e2S.js";
|
|
12
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CsMC-ob0.js";
|
|
13
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-BAh_qsBJ.js";
|
|
14
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-VvIKqlQ4.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,16 +1,16 @@
|
|
|
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-Clj7onnT.js";
|
|
2
|
+
import { d as logException, o as getActiveTraceId, p as logWarn, s as getLogContextAttributes, t as buildTurnFailureResponse, v as setSpanAttributes } from "./logging-D3aYP0aG.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-BDAfLTI9.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 juniorAutomationVersions, o as juniorAutomationRuns, s as juniorAutomations } 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-Rnim7alE.js";
|
|
7
|
+
import { a as juniorAutomationVersions, o as juniorAutomationRuns, s as juniorAutomations } from "./executor-Dh4Ofsnx.js";
|
|
8
8
|
import { d as contextProvenance, f as instructionActors, n as agentHistoryItemSchema, p as instructionProvenanceFor } from "./history-9pO1Zd4Y.js";
|
|
9
|
-
import { p as credentialSubjectSchema } from "./registry-
|
|
10
|
-
import { $t as authenticationUnlinkedEvent, Gt as normalizeSlackConversationId, Ht as getSlackClient, Qt as authenticationLinkedEvent, Rt as SlackActionError, Xt as JUNIOR_NATIVE_EVENT_NAMESPACE, Zt as agentsInstructionsUpdatedEvent, n as applyPluginFormatMarkdown, qt as withSlackRetries } from "./agent-hooks-
|
|
9
|
+
import { p as credentialSubjectSchema } from "./registry-CmKmKHpp.js";
|
|
10
|
+
import { $t as authenticationUnlinkedEvent, Gt as normalizeSlackConversationId, Ht as getSlackClient, Qt as authenticationLinkedEvent, Rt as SlackActionError, Xt as JUNIOR_NATIVE_EVENT_NAMESPACE, Zt as agentsInstructionsUpdatedEvent, n as applyPluginFormatMarkdown, qt as withSlackRetries } from "./agent-hooks-CDVx26Uu.js";
|
|
11
11
|
import { G as messageCardRef } from "./conversation-T18Xlkx9.js";
|
|
12
|
-
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { A as eventAutomationSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-
|
|
12
|
+
import { D as fenceLock, O as withLock, T as MUTATION_LOCK_TTL_MS, k as sleep, w as getStateAdapter } from "./profile-DnkX3e2S.js";
|
|
13
|
+
import { A as eventAutomationSchema, E as scheduledAutomationSchema, S as automationVersionSchema } from "./automation-CHdlHVZP.js";
|
|
14
14
|
import { isDeepStrictEqual } from "node:util";
|
|
15
15
|
import { z } from "zod";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
@@ -2971,9 +2971,10 @@ async function clearEventAutomationRuns(automationId, state = getStateAdapter())
|
|
|
2971
2971
|
*/
|
|
2972
2972
|
function eventAutomationColumns(task) {
|
|
2973
2973
|
const { status: _status, statusReason: _statusReason, title, ...definition } = task;
|
|
2974
|
-
const { createdAtMs: _createdAtMs, id: _id, ...record } = eventAutomationSchema.parse(definition);
|
|
2974
|
+
const { createdAtMs: _createdAtMs, creatorIdentityId, id: _id, ...record } = eventAutomationSchema.parse(definition);
|
|
2975
2975
|
return {
|
|
2976
2976
|
channelId: record.destination.channelId,
|
|
2977
|
+
creatorIdentityId,
|
|
2977
2978
|
creatorSlackUserId: record.createdBy.slackUserId,
|
|
2978
2979
|
identifier: record.trigger.identifier,
|
|
2979
2980
|
instruction: record.task.text,
|
|
@@ -2988,6 +2989,7 @@ function parseEventAutomationRow(row) {
|
|
|
2988
2989
|
const task = eventAutomationSchema.parse({
|
|
2989
2990
|
...row.record,
|
|
2990
2991
|
createdAtMs: row.createdAtMs,
|
|
2992
|
+
creatorIdentityId: row.creatorIdentityId,
|
|
2991
2993
|
id: row.id
|
|
2992
2994
|
});
|
|
2993
2995
|
const title = row.title?.trim();
|
|
@@ -3065,22 +3067,14 @@ async function deleteEventAutomation(db, id) {
|
|
|
3065
3067
|
async function listEventAutomationsForTeam(db, teamId) {
|
|
3066
3068
|
return (await db.select().from(juniorAutomations).where(and(eq(juniorAutomations.teamId, teamId), activeEventAutomationWhere())).orderBy(asc(juniorAutomations.createdAtMs), asc(juniorAutomations.id))).map(parseEventAutomationRow);
|
|
3067
3069
|
}
|
|
3068
|
-
function viewerSlackIdentities(user) {
|
|
3069
|
-
return user.identities.filter((identity) => identity.provider === "slack" && Boolean(identity.providerTenantId) && Boolean(identity.providerSubjectId));
|
|
3070
|
-
}
|
|
3071
|
-
/** Return whether one event automation was created by a viewer-linked Slack identity. */
|
|
3072
|
-
function eventAutomationBelongsToUser(task, user) {
|
|
3073
|
-
return viewerSlackIdentities(user).some((identity) => identity.providerTenantId === task.destination.teamId && identity.providerSubjectId === task.createdBy.slackUserId);
|
|
3074
|
-
}
|
|
3075
3070
|
/**
|
|
3076
3071
|
* List deleted event automations created by one user, newest first.
|
|
3077
3072
|
* Used only to keep historical runs after the live automation list drops the row.
|
|
3078
3073
|
*/
|
|
3079
3074
|
async function listDeletedEventAutomationsCreatedBy(db, user, limit) {
|
|
3080
|
-
const
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
return (await db.select().from(juniorAutomations).where(and(ownership, eq(juniorAutomations.kind, "event"), eq(juniorAutomations.status, "deleted"))).orderBy(desc(juniorAutomations.createdAtMs), desc(juniorAutomations.id)).limit(limit)).map(parseEventAutomationRow);
|
|
3075
|
+
const identityIds = user.identities.map((identity) => identity.id);
|
|
3076
|
+
if (identityIds.length === 0) return [];
|
|
3077
|
+
return (await db.select().from(juniorAutomations).where(and(inArray(juniorAutomations.creatorIdentityId, identityIds), eq(juniorAutomations.kind, "event"), eq(juniorAutomations.status, "deleted"))).orderBy(desc(juniorAutomations.createdAtMs), desc(juniorAutomations.id)).limit(limit)).map(parseEventAutomationRow);
|
|
3084
3078
|
}
|
|
3085
3079
|
/**
|
|
3086
3080
|
* Collect match keys from live event automations for these identifiers and event types.
|
|
@@ -3231,10 +3225,6 @@ async function readScheduledAutomation(db, taskId) {
|
|
|
3231
3225
|
async function readListedScheduledAutomations(db, teamId) {
|
|
3232
3226
|
return (await db.select().from(juniorAutomations).where(and(eq(juniorAutomations.kind, "scheduled"), ne(juniorAutomations.status, "deleted"), teamId === void 0 ? void 0 : eq(juniorAutomations.teamId, teamId))).orderBy(asc(juniorAutomations.createdAtMs), asc(juniorAutomations.id))).map(parseScheduledAutomationRow).filter(isListedScheduledAutomation);
|
|
3233
3227
|
}
|
|
3234
|
-
/** List decoded scheduled automations in stable creation order. */
|
|
3235
|
-
async function listScheduledAutomations(db) {
|
|
3236
|
-
return await readListedScheduledAutomations(db);
|
|
3237
|
-
}
|
|
3238
3228
|
/** List decoded scheduled automations for one team in stable creation order. */
|
|
3239
3229
|
async function listScheduledAutomationsForTeam(db, teamId) {
|
|
3240
3230
|
return await readListedScheduledAutomations(db, teamId);
|
|
@@ -3280,4 +3270,4 @@ async function saveScheduledAutomationInLock(db, task, current) {
|
|
|
3280
3270
|
await writeScheduledAutomation(db, requireStoredTask(task), current);
|
|
3281
3271
|
}
|
|
3282
3272
|
//#endregion
|
|
3283
|
-
export {
|
|
3273
|
+
export { persistWithRetry as $, createConversationMemoryService as $t, formatSlackLink as A, loadTurnRoute as At, removeReactionFromMessage as B, recordToolExecutionStarted as Bt, listAutomationVersions as C, commitAcceptedReply as Ct, automationRevision as D, loadLastModelProfile as Dt, AutomationConflictError as E, loadConversationProjection as Et, addReactionToMessage as F, recordAuthorizationCompleted as Ft, loadTurnCheckpoint as G, projectConversationMessages as Gt, slackEntitySchema as H, appendConversationMessages as Ht, getSlackMessagePermalink as I, recordAuthorizationRequested as It, completeTurnRecord as J, settleConversationTitleWork as Jt, saveTurnCheckpoint as K, persistConversationMessageSummaries as Kt, openSlackDirectMessage as L, recordGuardianActionReviewed as Lt, normalizeSlackStatusText as M, recordAgentsInstructionsUpdated as Mt, slackMention as N, recordAttachmentsDelivered as Nt, requireAutomationRevision as O, loadProjection as Ot, truncateStatusText as P, recordAuthenticationLinked as Pt, recordTurnSummary as Q, buildConversationContext as Qt, postSlackEphemeralMessage as R, recordMcpProviderConnected as Rt, automationDefinition as S, ToolInputError as St, sameDefinitionValue as T, loadConnectedMcpProviders as Tt, slackExternalRefIdSchema as U, hydrateConversationMessages as Ut, uploadFilesToConversation as V, recordTurnRoute as Vt, continuableMessages as W, persistConversationMessages as Wt, getTurnRecord as X, resolveTaskTitle as Xt, failTurnRecord as Y, fallbackShortTitle as Yt, listTurnSummaries as Z, appendThreadContextMessages as Zt, parseEventAutomationRow as _, normalizeToolNameFromResult as _t, saveScheduledAutomation as a, recordDeliveredAssistantMessage as an, createTurnLimitGate as at, admitEventAutomationRun as b, trimTrailingAssistantMessages as bt, withScheduledAutomationLock as c, estimateTextTokens as cn, getPiMessageRole as ct, createEventAutomation as d, historyItemFromPiMessage as dn, hasRuntimeTurnContext as dt, estimateConversationContextTokens as en, TURN_LIMIT_DISABLED_REASON as et, deleteEventAutomation as f, piMessageFromHistoryItem as fn, instructionTextForProjection as ft, listEventAutomationsForTeam as g, isToolResultMessage as gt, listDeletedEventAutomationsCreatedBy as h, isToolResultError as ht, readScheduledAutomation as i, normalizeConversationText as in, buildTurnErrorResponse as it, normalizeSlackReplyMarkdown as j, openConversationProjection as jt, escapeSlackMrkdwnText as k, loadTurnProjection as kt, blockEventAutomation as l, getAgentContextCompactionTriggerTokens as ln, getTerminalAssistantMessages as lt, getEventAutomation as m, isContinuablePiBoundary as mt, listScheduledAutomationsForTeam as n, isHumanConversationMessage as nn, TurnSliceLimitExceededError as nt, saveScheduledAutomationInLock as o, turnHasReply as on, isTurnExecutionLimitExceededError as ot, findMatchingEventAutomations as p, isAssistantMessage as pt, abandonTurnRecord as q, resolveConversationTitle as qt, parseScheduledAutomationRow as r, markConversationMessage as rn, TurnToolCallLimitExceededError as rt, scheduledRunId as s, upsertConversationMessage as sn, extractAssistantText as st, createScheduledAutomation as t, getConversationMessageSlackTs as tn, TurnBudgetExceededError as tt, collectEventAutomationMatchKeys as u, getAgentContextInputLimitTokens as un, getUserMessageInstructionText as ut, saveEventAutomation as v, retainRuntimeTurnContext as vt, readAutomationVersion as w, commitMessages as wt, eventAutomationRunLimitReason as x, TURN_CONTEXT_TAG as xt, setEventAutomationStatus as y, stripRuntimeTurnContext as yt, postSlackMessage as z, recordSubscribedReplyRoute 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-D3aYP0aG.js";
|
|
2
|
+
import { d as getDb } from "./viewer-Rnim7alE.js";
|
|
3
3
|
import { d as juniorDestinations } from "./agent-invocations-BY60iNw-.js";
|
|
4
|
-
import { l as juniorLocationConfigurations } from "./executor-
|
|
5
|
-
import {
|
|
6
|
-
import { it as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-
|
|
7
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { l as juniorLocationConfigurations } from "./executor-Dh4Ofsnx.js";
|
|
5
|
+
import { Wt as persistConversationMessages } from "./tasks-dJooqiip.js";
|
|
6
|
+
import { it as JUNIOR_THREAD_STATE_TTL_MS } from "./agent-hooks-CDVx26Uu.js";
|
|
7
|
+
import { w as getStateAdapter } from "./profile-DnkX3e2S.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-Clj7onnT.js";
|
|
2
|
+
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-D3aYP0aG.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 { Nt as listConversationAnnotations } from "./agent-hooks-
|
|
4
|
+
import { c as getConversationEventStore, d as getDb } from "./viewer-Rnim7alE.js";
|
|
5
|
+
import { Ut as hydrateConversationMessages, rn as markConversationMessage } from "./tasks-dJooqiip.js";
|
|
6
|
+
import { Nt as listConversationAnnotations } from "./agent-hooks-CDVx26Uu.js";
|
|
7
7
|
import { J as removedCardSchema, Y as resolveMessageCards, q as readMessageCardRefs } from "./conversation-T18Xlkx9.js";
|
|
8
|
-
import { r as clearPendingAuth, u as buildDeterministicTurnId } from "./pending-auth-
|
|
8
|
+
import { r as clearPendingAuth, u as buildDeterministicTurnId } from "./pending-auth-D2t1Moxf.js";
|
|
9
9
|
import { d as markTurnCompleted, u as markTurnClosed } from "./oauth-authorization-BA4Dt6a7.js";
|
|
10
|
-
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
+
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-CsMC-ob0.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-Rnim7alE.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-Rnim7alE.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-hKmI-iZa.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-CDM8Rq6E.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-D3aYP0aG.js";
|
|
3
|
+
import { i as getChatConfig } from "./config-BDAfLTI9.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-BY60iNw-.js";
|
|
6
|
-
import { _ as juniorConversationAnnotations, d as juniorConversationBindings, h as juniorConversationEvents, m as juniorConversationMetrics, p as CONVERSATION_METRICS, t as createJuniorSqlExecutor, u as juniorConversationParticipants } from "./executor-
|
|
6
|
+
import { _ as juniorConversationAnnotations, d as juniorConversationBindings, h as juniorConversationEvents, m as juniorConversationMetrics, p as CONVERSATION_METRICS, t as createJuniorSqlExecutor, u as juniorConversationParticipants } from "./executor-Dh4Ofsnx.js";
|
|
7
7
|
import { c as newConversationEventSchema, h as usageSchema, l as encodeHistoryPayload, o as decodeStoredConversationEvent, r as conversationEventDataSchema, s as historyReplacementSchema } from "./history-9pO1Zd4Y.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";
|