@sentry/junior 0.234.0 → 0.236.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-hooks-BcH6E48y.js → agent-hooks-Da_H0jHv.js} +17 -10
- package/dist/{agent-runner-DUkGlK89.js → agent-runner-uP7QRc4c.js} +484 -162
- package/dist/api/schema.d.ts +288 -2
- package/dist/api/schema.js +5 -4
- package/dist/api.d.ts +8 -2
- package/dist/api.js +524 -83
- package/dist/{app-xk2-Id1T.d.ts → app-MEd7wbF0.d.ts} +83 -49
- package/dist/app.d.ts +3 -3
- package/dist/app.js +164 -119
- package/dist/{types-Du-HbEun.js → automation-B9Kc1gcf.js} +304 -33
- package/dist/{briefs-lyAQbDxJ.js → briefs-DrjBPQFy.js} +4 -4
- package/dist/{catalog-runtime-BSgsPVnr.js → catalog-runtime-C7339Cfm.js} +1 -1
- package/dist/{checkpoint-BNfXlq_1.js → checkpoint-DaD7_Gsb.js} +16 -9
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +4 -4
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +3 -3
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +5 -5
- package/dist/{client-BX5lJRqW.js → client-Ch9Hg9NU.js} +2 -2
- package/dist/{config-DuCzUoCo.js → config-JR9wke1W.js} +57 -17
- package/dist/{conversation-CPjHYOV5.js → conversation-9Fxa1Zbq.js} +14 -1
- package/dist/{conversation-privacy-CSxvdSoV.js → conversation-privacy-au02dyZK.js} +1 -1
- package/dist/{credential-sync-BO4DfH9a.js → credential-sync-BWTA3LnL.js} +14 -14
- package/dist/{executor--jWf-Nnm.js → executor-BW9XWgUQ.js} +70 -6
- package/dist/{images-BaL19wFC.js → images-BdG7zcNf.js} +3 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{job-queue-cwHVOwVZ.js → job-queue-BqXd0ZPV.js} +1 -1
- package/dist/{logging-Cox1Mgcv.js → logging-B4sKwmCG.js} +1 -1
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +5 -5
- package/dist/{oauth-authorization-CC8a1JKP.js → oauth-authorization-BjRN99dc.js} +1 -1
- package/dist/{oauth-callback-server-Z7QSt416.js → oauth-callback-server-B_1p98Mb.js} +2 -2
- package/dist/{pending-auth-DQhC3eSR.js → pending-auth-WqF4Gh8Z.js} +1 -1
- package/dist/{plugins-BT2l4We3.d.ts → plugins-CjfUP5gJ.d.ts} +1 -0
- package/dist/{profile-BdApelHS.js → profile-BamYnmhO.js} +4 -4
- package/dist/{prompt-3D0sSbTC.js → prompt-Ctwy6hSI.js} +1 -1
- package/dist/queue-B5SnqRln.d.ts +25 -0
- package/dist/{registry-DiY6B8CN.js → registry-CXNv9fDX.js} +38 -2
- package/dist/{resolve-VpJoiDpc.js → resolve-C9ETkt4T.js} +2 -2
- package/dist/{runner-BIMegnPE.js → runner-DnBGVRnW.js} +9 -9
- package/dist/{sandbox-egress-signals-Cbtxe492.js → sandbox-egress-signals-DwJ7Boi_.js} +1 -1
- package/dist/{schema-CxwnlTDN.js → schema-CJiqDc5r.js} +26 -3
- package/dist/{skills-WttpPJUy.js → skills-Dd8O9Aav.js} +3 -3
- package/dist/{spawn-DhfMKt4y.js → spawn-DFdRspSD.js} +2 -2
- package/dist/{task-queue-CZqUNJD0.js → task-queue-DGQEOk1A.js} +16 -10
- package/dist/{task-runner-BZaqoUCT.js → task-runner-C5XCIDSF.js} +9 -9
- package/dist/{thread-state-8tXZhu0y.js → thread-state-D3E29wZk.js} +5 -5
- package/dist/{turn-failure-response-DFJ9L9NQ.js → turn-failure-response-TDoj0aZz.js} +8 -8
- package/dist/{turn-lifecycle-WbpTUQ_r.js → turn-lifecycle-DOnU45p7.js} +1 -1
- package/dist/{turn-session-routing--EhI76rH.js → turn-session-routing-DbpZZoin.js} +1 -1
- package/dist/{validation-0F9IgG3b.js → validation-B9lMbisx.js} +1 -1
- package/dist/{version-A7-RRBOE.js → version-CWkIGcLU.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{web-authorization-BJggXofy.js → web-authorization-PPaoj2ns.js} +6 -6
- package/dist/{web-input-B-siN5Dr.js → web-input-CfNxXtHm.js} +86 -34
- package/dist/web-message-id-xPI_EFSC.js +239 -0
- package/dist/{work-CNc0ejGG.js → work-DNaoFrEe.js} +7 -7
- package/dist/{worker-BHbqpUAu.js → worker-xeJLxYwm.js} +5 -5
- package/migrations/0045_conversation_forks.sql +3 -0
- package/migrations/0046_automation_versions.sql +71 -0
- package/migrations/meta/0045_snapshot.json +3503 -0
- package/migrations/meta/0046_snapshot.json +3707 -0
- package/migrations/meta/_journal.json +15 -1
- package/package.json +5 -5
- package/dist/web-message-id-CVVCTWUb.js +0 -464
- package/dist/{package-discovery-7a9YqLhE.js → package-discovery-BVvSnQBB.js} +1 -1
- package/dist/{plugin-module-BKGOXca2.js → plugin-module-CVvEUSMH.js} +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as withLogContext, b as setTags, d as logException } from "./logging-
|
|
1
|
+
import { C as withLogContext, b as setTags, d as logException } from "./logging-B4sKwmCG.js";
|
|
2
2
|
import { t as credentialContextForActor } from "./context-0Et9iVSB.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { A as commitAcceptedReply,
|
|
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-
|
|
3
|
+
import { Qt as getConversationEventStore, en as getConversationStore } from "./agent-hooks-Da_H0jHv.js";
|
|
4
|
+
import { U as messageCardText } from "./conversation-9Fxa1Zbq.js";
|
|
5
|
+
import { A as commitAcceptedReply, P as loadProjection, V as recordAuthorizationCompleted, X as persistConversationMessages, Y as hydrateConversationMessages, dt as recordDeliveredAssistantMessage, it as buildConversationContext, lt as markConversationMessage, pt as upsertConversationMessage, r as saveTurnCheckpoint, u as persistWithRetry, ut as normalizeConversationText } from "./checkpoint-DaD7_Gsb.js";
|
|
6
|
+
import { _ as markTurnFailed, r as getAssistantReplyText, t as authorizationId, v as startActiveTurn } from "./oauth-authorization-BjRN99dc.js";
|
|
7
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-C5XCIDSF.js";
|
|
8
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-DOnU45p7.js";
|
|
9
|
+
import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-D3E29wZk.js";
|
|
10
|
+
import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-TDoj0aZz.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 { vn as sandboxEgressSignalsResponseSchema } from "./agent-runner-uP7QRc4c.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,6 +1,7 @@
|
|
|
1
1
|
import { t as juniorDestinationKindSchema } from "./destinations-BeBiJeEM.js";
|
|
2
|
-
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-
|
|
3
|
-
import
|
|
2
|
+
import { E as conversationSummaryReportSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-9Fxa1Zbq.js";
|
|
3
|
+
import "./automation-B9Kc1gcf.js";
|
|
4
|
+
import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
import { codeChangeStateSchema } from "@sentry/junior-plugin-api";
|
|
6
7
|
//#region src/api/schema/common.ts
|
|
@@ -61,6 +62,28 @@ const codeOverviewReportSchema = z.object({
|
|
|
61
62
|
windowEnd: z.string(),
|
|
62
63
|
windowStart: z.string()
|
|
63
64
|
}).strict();
|
|
65
|
+
const codeRepositoryParamsSchema = z.object({ repositoryId: z.string().uuid() }).strict();
|
|
66
|
+
/** Code activity, recent changes, and Workspaces for one repository. */
|
|
67
|
+
const codeRepositoryReportSchema = z.object({
|
|
68
|
+
activityDays: z.array(codeActivityDaySchema),
|
|
69
|
+
activityHours: z.array(codeActivityDaySchema).optional(),
|
|
70
|
+
activitySixHours: z.array(codeActivityDaySchema).optional(),
|
|
71
|
+
changes: z.array(codeChangeSummaryReportSchema),
|
|
72
|
+
generatedAt: z.string(),
|
|
73
|
+
repository: z.object({
|
|
74
|
+
id: z.string().uuid(),
|
|
75
|
+
name: z.string().min(1),
|
|
76
|
+
provider: z.string().min(1),
|
|
77
|
+
url: z.string().url().optional()
|
|
78
|
+
}).strict(),
|
|
79
|
+
summary: codeChangeSummarySchema,
|
|
80
|
+
windowEnd: z.string(),
|
|
81
|
+
windowStart: z.string(),
|
|
82
|
+
workspaces: z.array(z.object({
|
|
83
|
+
id: z.string().min(1),
|
|
84
|
+
name: z.string().min(1)
|
|
85
|
+
}).strict())
|
|
86
|
+
}).strict();
|
|
64
87
|
/** Person-scoped code activity for one People profile. */
|
|
65
88
|
const codePersonReportSchema = z.object({
|
|
66
89
|
activityDays: z.array(codeActivityDaySchema),
|
|
@@ -320,4 +343,4 @@ const statsReportSchema = z.object({
|
|
|
320
343
|
windowStart: z.string()
|
|
321
344
|
}).strict();
|
|
322
345
|
//#endregion
|
|
323
|
-
export { codeChangeSummarySchema as A, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codePersonReportSchema as M,
|
|
346
|
+
export { codeChangeSummarySchema as A, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codeRepositorySummarySchema as F, apiErrorSchema as I, codePersonReportSchema as M, codeRepositoryParamsSchema as N, codeActivityDaySchema as O, codeRepositoryReportSchema as P, locationDirectoryReportSchema as S, activityHours as T, actorProfileReportSchema as _, workspaceBodySchema as a, locationActivityDayReportSchema as b, workspaceRepoSchema as c, createdPersonalTokenSchema as d, personalTokenListSchema as f, actorDirectoryReportSchema as g, revokePersonalTokenResponseSchema as h, deleteWorkspaceResponseSchema as i, codeOverviewReportSchema as j, codeChangeSummaryReportSchema as k, workspaceSchema as l, personalTokenParamsSchema as m, statsReportSchema as n, workspaceListSchema as o, personalTokenMetadataSchema as p, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, createPersonalTokenBodySchema as u, personParamsSchema as v, activityDays as w, locationDetailReportSchema as x, personalSpendReportSchema as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
-
import { p as logWarn } from "./logging-
|
|
3
|
-
import { s as skillRoots } from "./package-discovery-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { p as logWarn } from "./logging-B4sKwmCG.js";
|
|
3
|
+
import { s as skillRoots } from "./package-discovery-BVvSnQBB.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-C7339Cfm.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 { Ln as actorFromRun, Rn as toolInvocationDestination } from "./agent-runner-uP7QRc4c.js";
|
|
3
|
+
import { n as createAndEnqueueAgentInvocation } from "./work-DNaoFrEe.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-B4sKwmCG.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-BqXd0ZPV.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -7,6 +7,16 @@ import { handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
|
7
7
|
/** Shared Vercel Queue callback wiring for signed messages. */
|
|
8
8
|
/** Build the HTTP callback and local-dev consumer for one signed queue. */
|
|
9
9
|
function queueCallback(options) {
|
|
10
|
+
const consume = async (message, metadata) => {
|
|
11
|
+
if (options.skip?.(metadata)) return;
|
|
12
|
+
try {
|
|
13
|
+
await runWithTurnRequestDeadline(() => options.run(message, metadata));
|
|
14
|
+
} catch (error) {
|
|
15
|
+
const reason = options.permanentError?.(error);
|
|
16
|
+
if (!reason) throw error;
|
|
17
|
+
options.onRejected(reason, metadata, error);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
10
20
|
const handler = async (value, metadata) => {
|
|
11
21
|
if (options.skip?.(metadata)) return;
|
|
12
22
|
const checked = options.verify(value);
|
|
@@ -15,13 +25,7 @@ function queueCallback(options) {
|
|
|
15
25
|
return;
|
|
16
26
|
}
|
|
17
27
|
if (checked.status === "unavailable") throw new Error(`Queue message verification unavailable: ${checked.reason}`);
|
|
18
|
-
|
|
19
|
-
await runWithTurnRequestDeadline(() => options.run(checked.message, metadata));
|
|
20
|
-
} catch (error) {
|
|
21
|
-
const reason = options.permanentError?.(error);
|
|
22
|
-
if (!reason) throw error;
|
|
23
|
-
options.onRejected(reason, metadata, error);
|
|
24
|
-
}
|
|
28
|
+
await consume(checked.message, metadata);
|
|
25
29
|
};
|
|
26
30
|
const retry = (error, metadata) => {
|
|
27
31
|
const reason = options.permanentError?.(error);
|
|
@@ -33,6 +37,8 @@ function queueCallback(options) {
|
|
|
33
37
|
};
|
|
34
38
|
const visibility = options.visibilityTimeoutSeconds === void 0 ? {} : { visibilityTimeoutSeconds: options.visibilityTimeoutSeconds };
|
|
35
39
|
return {
|
|
40
|
+
/** Run a message that an in-process queue already trusts. */
|
|
41
|
+
consume,
|
|
36
42
|
create: () => handleCallback(handler, {
|
|
37
43
|
retry,
|
|
38
44
|
...visibility
|
|
@@ -109,7 +115,7 @@ function pluginTaskCallback() {
|
|
|
109
115
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
110
116
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
111
117
|
run: async (message) => {
|
|
112
|
-
const { processPluginTask } = await import("./task-runner-
|
|
118
|
+
const { processPluginTask } = await import("./task-runner-C5XCIDSF.js").then((n) => n.r);
|
|
113
119
|
await processPluginTask(message);
|
|
114
120
|
},
|
|
115
121
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,14 +1,14 @@
|
|
|
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-B4sKwmCG.js";
|
|
3
3
|
import { b as parseSlackMessageTs, r as credentialSubjectSchema } from "./context-0Et9iVSB.js";
|
|
4
|
-
import { $
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { C as isToolResultError, D as stripRuntimeTurnContext,
|
|
8
|
-
import { w as getStateAdapter } from "./profile-
|
|
9
|
-
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
10
|
-
import { t as resolveConversationRouting } from "./turn-session-routing
|
|
11
|
-
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-
|
|
4
|
+
import { $ as readActorIdentity, Ct as createPluginModel, Pt as createPluginConversationEvents, St as createPluginEmbedder, dn as agentTurnTotalTokens, en as getConversationStore, gt as JUNIOR_THREAD_STATE_TTL_MS, p as coreTaskRegistrations, tn as getDb, u as getPlugins, un as agentTurnCostUsd, wt as createPluginLogger, xt as createPluginState } from "./agent-hooks-Da_H0jHv.js";
|
|
5
|
+
import { D as juniorConversations, c as juniorAutomationExecutions } from "./executor-BW9XWgUQ.js";
|
|
6
|
+
import { at as sameActorIdentity } from "./conversation-9Fxa1Zbq.js";
|
|
7
|
+
import { C as isToolResultError, D as stripRuntimeTurnContext, T as normalizeToolNameFromResult, Y as hydrateConversationMessages, b as instructionTextForProjection, g as getPiMessageRole, s as getTurnRecord, w as isToolResultMessage } from "./checkpoint-DaD7_Gsb.js";
|
|
8
|
+
import { w as getStateAdapter } from "./profile-BamYnmhO.js";
|
|
9
|
+
import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-D3E29wZk.js";
|
|
10
|
+
import { t as resolveConversationRouting } from "./turn-session-routing-DbpZZoin.js";
|
|
11
|
+
import { i as pluginTaskParamsSchema, o as sendVercelPluginTask, r as pluginTaskId } from "./task-queue-DGQEOk1A.js";
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
import { and, asc, count, desc, eq, gte, inArray, lte, max, or, sql } from "drizzle-orm";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-
|
|
2
|
-
import {
|
|
1
|
+
import { I as isRecord, L as toOptionalNumber, R as toOptionalString } from "./logging-B4sKwmCG.js";
|
|
2
|
+
import { gt as JUNIOR_THREAD_STATE_TTL_MS, tn as getDb } from "./agent-hooks-Da_H0jHv.js";
|
|
3
3
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { w as getStateAdapter } from "./profile-
|
|
4
|
+
import { d as juniorLocationConfigurations } from "./executor-BW9XWgUQ.js";
|
|
5
|
+
import { X as persistConversationMessages } from "./checkpoint-DaD7_Gsb.js";
|
|
6
|
+
import { w as getStateAdapter } from "./profile-BamYnmhO.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { and, eq, sql } from "drizzle-orm";
|
|
@@ -1,12 +1,12 @@
|
|
|
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-Ch9Hg9NU.js";
|
|
2
|
+
import { I as isRecord, t as buildTurnFailureResponse } from "./logging-B4sKwmCG.js";
|
|
3
3
|
import { b as parseSlackMessageTs } from "./context-0Et9iVSB.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-
|
|
8
|
-
import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-
|
|
9
|
-
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-
|
|
4
|
+
import { Gt as listConversationAnnotations, Qt as getConversationEventStore, tn as getDb } from "./agent-hooks-Da_H0jHv.js";
|
|
5
|
+
import { G as removedCardSchema, K as resolveMessageCards, W as readMessageCardRefs } from "./conversation-9Fxa1Zbq.js";
|
|
6
|
+
import { Y as hydrateConversationMessages, lt as markConversationMessage } from "./checkpoint-DaD7_Gsb.js";
|
|
7
|
+
import { r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-WqF4Gh8Z.js";
|
|
8
|
+
import { g as markTurnCompleted, h as markTurnClosed } from "./oauth-authorization-BjRN99dc.js";
|
|
9
|
+
import { o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-D3E29wZk.js";
|
|
10
10
|
//#region src/chat/conversations/pending-cards.ts
|
|
11
11
|
/** Select undelivered cards and load their latest saved facts. */
|
|
12
12
|
async function loadPendingMessageCards(conversationId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Qt as getConversationEventStore } from "./agent-hooks-Da_H0jHv.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("./agent-hooks-
|
|
37
|
+
const conversationStore = args.conversationStore ?? (await import("./agent-hooks-Da_H0jHv.js").then((n) => n.Zt)).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-C7339Cfm.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-CWkIGcLU.js";
|
|
2
2
|
export { JUNIOR_VERSION };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as loadTurnCheckpoint, o as failTurnRecord, s as getTurnRecord } from "./checkpoint-
|
|
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 { Ht as ensureConversationWake, Qt as requestConversationWork } from "./agent-runner-uP7QRc4c.js";
|
|
2
|
+
import { Qt as getConversationEventStore } from "./agent-hooks-Da_H0jHv.js";
|
|
3
|
+
import { n as loadTurnCheckpoint, o as failTurnRecord, s as getTurnRecord } from "./checkpoint-DaD7_Gsb.js";
|
|
4
|
+
import { w as getStateAdapter } from "./profile-BamYnmhO.js";
|
|
5
|
+
import { a as getVercelConversationWorkQueue } from "./job-queue-BqXd0ZPV.js";
|
|
6
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DbpZZoin.js";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
//#region src/chat/task-execution/authorized-turn.ts
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } from "./client-
|
|
3
|
-
import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-
|
|
4
|
-
import {
|
|
1
|
+
import { An as postSlackMessage, At as appendAndEnqueueExclusiveInboundMessage, Bn as shouldEmitDevAgentTrace, C as isExperimentalFeatureEnabled, Cn as escapeSlackMrkdwnText, D as renderBlockText, E as renderAttachmentText, En as normalizeSlackStatusText, Et as getEventCatalog, F as resolveSlackChannelIdFromThreadId, Fn as buildSteeringPiMessage, I as getConversationInfo, In as RetryableDeliveryError, J as withScheduledAutomationLock, K as saveScheduledAutomationInLock, L as listThreadReplies, M as parseSlackThreadId, N as readSlackRawMessageContext, On as truncateStatusText, Ot as pluginEventCatalog, P as resolveSlackChannelIdFromMessage, Pn as createUserTokenStore, Q as effectiveTaskOutcomes, Tn as normalizeSlackReplyMarkdown, Tt as isEventMailboxMetadata, U as parseScheduledAutomationRow, W as readScheduledAutomation, Wt as getConversationWorkState, Z as eventAutomationTriggerAvailable, at as listDeletedEventAutomationsCreatedBy, cn as maybePostAutomatedTurnLimitNotice, ft as sameDefinitionValue, h as latestProgressStatus, i as createContextCompactor, it as getEventAutomation, j as storeAttachment, jn as removeReactionFromMessage, jt as appendAndEnqueueInboundMessage, kn as addReactionToMessage, ln as recordFinishedTurnForAutomatedLimit, lt as automationDefinition, m as PluginCredentialFailureError, nt as eventAutomationBelongsToUser, ot as parseEventAutomationRow, r as executeAgentRun, t as createAgentRunner, tt as deleteEventAutomation, ut as listAutomationVersions, wn as formatSlackLink, wt as EVENT_WAIT_MS, zn as AuthorizationFlowDisabledError } from "./agent-runner-uP7QRc4c.js";
|
|
2
|
+
import { f as escapeXml, i as completeText, r as completeObject, v as isProviderRetryError } from "./client-Ch9Hg9NU.js";
|
|
3
|
+
import { C as withLogContext, I as isRecord, L as toOptionalNumber, R as toOptionalString, _ as setSentryUser, b as setTags, d as logException, f as logInfo, n as createChatSdkLogger, o as getActiveTraceId, p as logWarn, t as buildTurnFailureResponse, u as logError, v as setSpanAttributes, w as withSpan } from "./logging-B4sKwmCG.js";
|
|
4
|
+
import { c as getSlackClientSecret, i as getChatConfig, l as getSlackSigningSecret, n as botConfig, o as getSlackBotToken, s as getSlackClientId, v as normalizeSlackEmojiName } from "./config-JR9wke1W.js";
|
|
5
5
|
import { o as modelIdForProfile, r as defaultModelId } from "./model-profile-BwU8mqwD.js";
|
|
6
6
|
import { a as createActor, b as parseSlackMessageTs, c as isActorUserId, l as isUserActor, o as createSlackActor, p as parseSlackChannelId, s as createSlackResumeActor, t as credentialContextForActor, u as parseActorUserId } from "./context-0Et9iVSB.js";
|
|
7
|
-
import {
|
|
7
|
+
import { B as SlackActionError, Bt as readAttachmentVisionSummary, J as runWithSlackInstallationToken, K as isDmChannel, Lt as buildSentryConversationUrl, Qt as getConversationEventStore, Rt as getSlackFileId, U as getHeaderString, V as downloadPrivateSlackFile, Vt as recordSlackAttachment, W as getSlackClient, _t as getDashboardConversationLink, bn as requireSlackDestination, en as getConversationStore, gt as JUNIOR_THREAD_STATE_TTL_MS, nn as getSqlExecutor, o as getPluginSlackConversationLink, q as normalizeSlackConversationId, st as cancelSubscriptions, tn as getDb, vn as createSlackDestination, vt as getDashboardObjectIconLink } from "./agent-hooks-Da_H0jHv.js";
|
|
8
8
|
import { n as juniorDestinations } from "./destinations-BeBiJeEM.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { $ as
|
|
12
|
-
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-
|
|
13
|
-
import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-
|
|
14
|
-
import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-
|
|
15
|
-
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-
|
|
16
|
-
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { i as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { a as
|
|
23
|
-
import { n as
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { r as
|
|
9
|
+
import { O as juniorIdentities, c as juniorAutomationExecutions, k as juniorUsers, o as juniorSchedulerTasks, u as juniorEventAutomations } from "./executor-BW9XWgUQ.js";
|
|
10
|
+
import { F as isVisionImageMediaType, N as readMessageAttachments, it as instructionProvenanceFor } from "./conversation-9Fxa1Zbq.js";
|
|
11
|
+
import { $ as resolveConversationTitle, A as commitAcceptedReply, G as recordSubscribedReplyRoute, N as loadConversationProjection, O as trimTrailingAssistantMessages, P as loadProjection, Q as persistConversationMessageSummaries, V as recordAuthorizationCompleted, X as persistConversationMessages, Y as hydrateConversationMessages, a as completeTurnRecord, at as createConversationMemoryService, c as listTurnSummaries, ct as isHumanConversationMessage, dt as recordDeliveredAssistantMessage, ft as turnHasReply, i as abandonTurnRecord, it as buildConversationContext, j as commitMessages, l as recordTurnSummary, lt as markConversationMessage, mt as estimateTextTokens, n as loadTurnCheckpoint, o as failTurnRecord, ot as estimateConversationContextTokens, p as buildTurnErrorResponse, pt as upsertConversationMessage, r as saveTurnCheckpoint, rt as appendThreadContextMessages, s as getTurnRecord, st as getConversationMessageSlackTs, tt as fallbackShortTitle, u as persistWithRetry, ut as normalizeConversationText } from "./checkpoint-DaD7_Gsb.js";
|
|
12
|
+
import { E as acquireActiveLock, O as withLock, T as MUTATION_LOCK_TTL_MS, w as getStateAdapter } from "./profile-BamYnmhO.js";
|
|
13
|
+
import { a as isPendingAuthLatestRequest, o as buildDeterministicAssistantMessageId, r as clearPendingAuth, s as buildDeterministicTurnId } from "./pending-auth-WqF4Gh8Z.js";
|
|
14
|
+
import { _ as markTurnFailed, c as CooperativeTurnYieldError, d as getConversationTurnBoundaryError, f as isCooperativeTurnYieldError, g as markTurnCompleted, h as markTurnClosed, l as TurnInputCommitLostError, m as isTurnInputDeferredError, p as isTurnInputCommitLostError, r as getAssistantReplyText, s as ConversationTurnBoundaryError, u as TurnInputDeferredError, v as startActiveTurn } from "./oauth-authorization-BjRN99dc.js";
|
|
15
|
+
import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-Ctwy6hSI.js";
|
|
16
|
+
import { a as getVercelConversationWorkQueue, f as getTurnRequestDeadline } from "./job-queue-BqXd0ZPV.js";
|
|
17
|
+
import { l as automationListQuerySchema } from "./automation-B9Kc1gcf.js";
|
|
18
|
+
import { c as sumUtcHoursIntoSixHours, m as healthReportSchema, t as webMessageId } from "./web-message-id-xPI_EFSC.js";
|
|
19
|
+
import { C as readAutomationExecutionStatusDays, D as readAutomationRuns, E as readAutomationExecutions, S as readAutomationExecutionHours, T as readAutomationExecutionSummaries, _ as markDispatchFailed, a as confirmDispatchMailboxAppend, b as readAutomationExecutionByConversationId, c as getDispatchInputMessageId, f as isTerminalDispatchStatus, g as markDispatchCompleted, h as markDispatchBlocked, i as claimDispatchMailboxAppend, l as getDispatchRecord, m as markDispatchAwaitingResume, n as scheduleSessionCompletedPluginTasks, s as getDispatchConversationId, t as processPluginTask, u as getDispatchTurnId, v as markDispatchRunning, w as readAutomationExecutionStatusHours, x as readAutomationExecutionDays, y as emptyAutomationRunWindows } from "./task-runner-C5XCIDSF.js";
|
|
20
|
+
import { i as resolveAgentInvocationId, o as AgentRunError, s as executeTurn, t as createAgentInvocationWorker } from "./work-DNaoFrEe.js";
|
|
21
|
+
import { n as getTurnLifecycle, t as ConversationTurnLifecycleService } from "./turn-lifecycle-DOnU45p7.js";
|
|
22
|
+
import { a as persistThreadState, c as configValueSchema, i as persistThreadRuntimeState, n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState, t as getLocationConfigurationService } from "./thread-state-D3E29wZk.js";
|
|
23
|
+
import { a as getPausedTurnRequest, c as getTurnAuthorization, i as createPausedTurns, n as deleteWebAuthorization, s as wakePausedTurn, t as createWebAuthorization } from "./web-authorization-PPaoj2ns.js";
|
|
24
|
+
import { n as resolveTurnSessionRouting } from "./turn-session-routing-DbpZZoin.js";
|
|
25
|
+
import { t as bindSpawnAgent } from "./spawn-DFdRspSD.js";
|
|
26
|
+
import { a as persistAuthPauseTurnState, c as getTurnUserSlackMessageTs, d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, n as getAgentTurnDiagnosticsAttributes, o as getTurnUserMessage, r as requireTurnFailureEventId, s as getTurnUserReplyAttachmentContext, t as finalizeFailedTurnReplyWithEvent, u as getInterruptionMarker } from "./turn-failure-response-TDoj0aZz.js";
|
|
27
|
+
import { r as storeInputImages } from "./images-BdG7zcNf.js";
|
|
27
28
|
import { z } from "zod";
|
|
28
29
|
import { createHash } from "node:crypto";
|
|
29
30
|
import { and, asc, count, desc, eq, exists, inArray, ne, or, sql } from "drizzle-orm";
|
|
@@ -3376,6 +3377,7 @@ async function deleteViewerScheduledAutomation(db, user, id, nowMs = Date.now())
|
|
|
3376
3377
|
//#endregion
|
|
3377
3378
|
//#region src/chat/automations/read.ts
|
|
3378
3379
|
const TASK_EXECUTION_LIST_LIMIT = 100;
|
|
3380
|
+
const AUTOMATION_VERSION_LIST_LIMIT = 100;
|
|
3379
3381
|
function creatorLabel(creator) {
|
|
3380
3382
|
return creator.fullName?.trim() || (creator.userName?.trim() ? `@${creator.userName.trim()}` : "") || creator.slackUserId;
|
|
3381
3383
|
}
|
|
@@ -3505,6 +3507,7 @@ function eventAutomationSummary(task, ownedByViewer, destination, stats, creator
|
|
|
3505
3507
|
function viewerTeamIds(user) {
|
|
3506
3508
|
return [...new Set(user.identities.filter((identity) => identity.provider === "slack").map((identity) => identity.providerTenantId).filter((teamId) => Boolean(teamId)))];
|
|
3507
3509
|
}
|
|
3510
|
+
/** Resolve an Automation the viewer owns or can read through a public Destination. */
|
|
3508
3511
|
async function resolveViewerTaskCandidate(user, kind, id) {
|
|
3509
3512
|
const db = getDb();
|
|
3510
3513
|
const identityIds = new Set(user.identities.map((identity) => identity.id));
|
|
@@ -3749,6 +3752,19 @@ async function readViewerAutomationExecutions(user, kind, id) {
|
|
|
3749
3752
|
truncated: executions.length > TASK_EXECUTION_LIST_LIMIT
|
|
3750
3753
|
};
|
|
3751
3754
|
}
|
|
3755
|
+
/** Read saved definitions for one viewer-visible Automation, newest first. */
|
|
3756
|
+
async function readViewerAutomationVersions(user, kind, id) {
|
|
3757
|
+
const candidate = await resolveViewerTaskCandidate(user, kind, id);
|
|
3758
|
+
if (!candidate) throw new ViewerTaskNotFoundError();
|
|
3759
|
+
const versions = await listAutomationVersions(getDb(), kind, id, 101);
|
|
3760
|
+
const current = automationDefinition(candidate.task);
|
|
3761
|
+
const listed = versions.slice(0, AUTOMATION_VERSION_LIST_LIMIT);
|
|
3762
|
+
return {
|
|
3763
|
+
versions: listed,
|
|
3764
|
+
activeVersion: listed.find(({ definition }) => sameDefinitionValue(definition, current))?.version ?? null,
|
|
3765
|
+
truncated: versions.length > AUTOMATION_VERSION_LIST_LIMIT
|
|
3766
|
+
};
|
|
3767
|
+
}
|
|
3752
3768
|
/** Resolve the source task for one conversation when a terminal execution links it. */
|
|
3753
3769
|
async function readConversationSourceTask(args) {
|
|
3754
3770
|
const execution = await readAutomationExecutionByConversationId({ conversationId: args.conversationId });
|
|
@@ -4520,13 +4536,23 @@ function toSlackEventChannelType(channelType) {
|
|
|
4520
4536
|
/**
|
|
4521
4537
|
* Map Slack's Events API channel_type to a source-confirmed visibility.
|
|
4522
4538
|
*
|
|
4523
|
-
* Slack's event metadata
|
|
4524
|
-
* classify visibility.
|
|
4539
|
+
* Slack's event metadata and live conversation metadata are the only
|
|
4540
|
+
* visibility authorities; channel IDs never classify visibility.
|
|
4525
4541
|
*/
|
|
4526
4542
|
function conversationVisibilityFromSlackChannelType(channelType) {
|
|
4527
4543
|
if (!channelType) return void 0;
|
|
4528
4544
|
return channelType === "channel" ? "public" : "private";
|
|
4529
4545
|
}
|
|
4546
|
+
/**
|
|
4547
|
+
* Map live `conversations.info` metadata to Slack's Events API channel type,
|
|
4548
|
+
* for events that carry no `channel_type`.
|
|
4549
|
+
*/
|
|
4550
|
+
function slackChannelTypeFromConversationInfo(info) {
|
|
4551
|
+
if (info.isIm) return "im";
|
|
4552
|
+
if (info.isMpim) return "mpim";
|
|
4553
|
+
if (info.isPrivate) return "group";
|
|
4554
|
+
return info.isChannel ? "channel" : void 0;
|
|
4555
|
+
}
|
|
4530
4556
|
/** Resolve Slack's raw event channel type from a Chat SDK message-like object. */
|
|
4531
4557
|
function resolveSlackChannelTypeFromMessage(message) {
|
|
4532
4558
|
const raw = message.raw;
|
|
@@ -4686,6 +4712,26 @@ async function resolveChannelName(thread) {
|
|
|
4686
4712
|
return;
|
|
4687
4713
|
}
|
|
4688
4714
|
}
|
|
4715
|
+
/**
|
|
4716
|
+
* Return the Slack channel type of a message.
|
|
4717
|
+
*
|
|
4718
|
+
* Slack delivers a channel mention as two events with the same `ts`: `message`
|
|
4719
|
+
* has `channel_type`, and `app_mention` does not. Junior stores the event that
|
|
4720
|
+
* arrives first. When that event has no `channel_type`, ask Slack for the
|
|
4721
|
+
* conversation, so the turn does not depend on the order of the two events.
|
|
4722
|
+
*/
|
|
4723
|
+
async function resolveSlackChannelType(message, channelId) {
|
|
4724
|
+
const eventChannelType = resolveSlackChannelTypeFromMessage(message);
|
|
4725
|
+
if (eventChannelType) return eventChannelType;
|
|
4726
|
+
const slackChannelId = parseSlackChannelId(channelId);
|
|
4727
|
+
if (!slackChannelId) return;
|
|
4728
|
+
try {
|
|
4729
|
+
return slackChannelTypeFromConversationInfo(await getConversationInfo(slackChannelId));
|
|
4730
|
+
} catch (error) {
|
|
4731
|
+
if (error instanceof SlackActionError) return;
|
|
4732
|
+
throw error;
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4689
4735
|
/** Collect attachments from the current Slack message and its batch. */
|
|
4690
4736
|
function collectAttachments(message, batchedMessages) {
|
|
4691
4737
|
return [...(batchedMessages ?? []).flatMap((queued) => queued.message.attachments), ...message.attachments];
|
|
@@ -4761,7 +4807,7 @@ function createSlackTurn(deps) {
|
|
|
4761
4807
|
const channelId = getChannelId(thread, message);
|
|
4762
4808
|
const channelName = !options.execution && channelId ? await resolveChannelName(thread) : void 0;
|
|
4763
4809
|
const destination = requireSlackDestination(options.destination, "Slack reply execution");
|
|
4764
|
-
const slackChannelType = resolveSlackChannelTypeFromMessage(message);
|
|
4810
|
+
const slackChannelType = options.execution ? resolveSlackChannelTypeFromMessage(message) : await resolveSlackChannelType(message, channelId);
|
|
4765
4811
|
const slackConversation = resolveSlackConversationContext({
|
|
4766
4812
|
channelId,
|
|
4767
4813
|
channelName,
|
|
@@ -5253,7 +5299,7 @@ function createSlackTurn(deps) {
|
|
|
5253
5299
|
if (newSteeringMessages.length > 0) piMessages = [...piMessages ?? [], ...newSteeringMessages];
|
|
5254
5300
|
}
|
|
5255
5301
|
status.update();
|
|
5256
|
-
resolveConversationTitle({ conversationId }).then(async (title) => {
|
|
5302
|
+
const titleProjection = resolveConversationTitle({ conversationId }).then(async (title) => {
|
|
5257
5303
|
if (!title) return;
|
|
5258
5304
|
await maybeSyncAssistantTitle({
|
|
5259
5305
|
channelId: assistantThreadContext?.channelId,
|
|
@@ -5264,6 +5310,7 @@ function createSlackTurn(deps) {
|
|
|
5264
5310
|
}).catch((error) => {
|
|
5265
5311
|
logException(error, "conversation.title.task.failed");
|
|
5266
5312
|
});
|
|
5313
|
+
deps.waitUntil?.(titleProjection);
|
|
5267
5314
|
const toolChannelId = channelId;
|
|
5268
5315
|
const activeInstructionAuthorId = actor?.userId ?? parseActorUserId(message.author.userId);
|
|
5269
5316
|
const activeInstructionAuthorName = actor?.fullName ?? actor?.userName;
|
|
@@ -5942,7 +5989,8 @@ function createSlackRuntime(options) {
|
|
|
5942
5989
|
pausedTurns: options.pausedTurns ?? createPausedTurns(),
|
|
5943
5990
|
prepareTurnState,
|
|
5944
5991
|
resolveUserAttachments: services.visionContext.resolveUserAttachments,
|
|
5945
|
-
sendPluginTask: options.sendPluginTask
|
|
5992
|
+
sendPluginTask: options.sendPluginTask,
|
|
5993
|
+
waitUntil: options.waitUntil
|
|
5946
5994
|
});
|
|
5947
5995
|
return {
|
|
5948
5996
|
...createSlackTurnRuntime({
|
|
@@ -7593,7 +7641,8 @@ function createConversationWork(options) {
|
|
|
7593
7641
|
services: {
|
|
7594
7642
|
...options.services,
|
|
7595
7643
|
agentRunner: options.agentRunner
|
|
7596
|
-
}
|
|
7644
|
+
},
|
|
7645
|
+
waitUntil: options.waitUntil
|
|
7597
7646
|
});
|
|
7598
7647
|
const runtime = options.wrapRuntime?.(baseRuntime) ?? baseRuntime;
|
|
7599
7648
|
const scheduleCompletedPluginTasks = options.sendPluginTask ? async (params) => await scheduleSessionCompletedPluginTasks(params, { send: options.sendPluginTask }) : void 0;
|
|
@@ -7644,7 +7693,8 @@ function createConversationWork(options) {
|
|
|
7644
7693
|
queue: options.queue,
|
|
7645
7694
|
run,
|
|
7646
7695
|
runtime,
|
|
7647
|
-
state: options.state
|
|
7696
|
+
state: options.state,
|
|
7697
|
+
waitUntil: options.waitUntil
|
|
7648
7698
|
};
|
|
7649
7699
|
}
|
|
7650
7700
|
//#endregion
|
|
@@ -7684,7 +7734,7 @@ function createProductionSlackWebhookServices(options) {
|
|
|
7684
7734
|
getSlackAdapter: getProductionSlackAdapter,
|
|
7685
7735
|
getUserTokenStore: createUserTokenStore,
|
|
7686
7736
|
conversationStore,
|
|
7687
|
-
queue:
|
|
7737
|
+
queue: options.queue,
|
|
7688
7738
|
runtime
|
|
7689
7739
|
};
|
|
7690
7740
|
}
|
|
@@ -7695,8 +7745,10 @@ function createProductionConversationWorkOptions(options) {
|
|
|
7695
7745
|
agentRunner: options.agentRunner,
|
|
7696
7746
|
conversationStore,
|
|
7697
7747
|
getSlackAdapter: getProductionSlackAdapter,
|
|
7698
|
-
queue:
|
|
7699
|
-
|
|
7748
|
+
queue: options.queue,
|
|
7749
|
+
sendPluginTask: options.sendPluginTask,
|
|
7750
|
+
services: options.services,
|
|
7751
|
+
waitUntil: options.waitUntil
|
|
7700
7752
|
});
|
|
7701
7753
|
}
|
|
7702
7754
|
//#endregion
|
|
@@ -7862,4 +7914,4 @@ async function appendAndEnqueueWebMessage(input, options) {
|
|
|
7862
7914
|
};
|
|
7863
7915
|
}
|
|
7864
7916
|
//#endregion
|
|
7865
|
-
export {
|
|
7917
|
+
export { withNormalizedThreadId as A, enqueueAgentDispatch as B, clearSlackPendingReactions as C, isSlackMessageStopped as D, verifySlackSignature as E, parseContent as F, readHealthReport as H, getThreadStopDecision as I, renderSlackObjectCard as L, legacyWebMailboxMetadataSchema as M, THREAD_OPTOUT_ACK as N, stopSlackThread as O, startProcessingReaction as P, createVercelAttachmentStorage as R, buildSlackInboundMessage as S, runWithSlackInstallation as T, GET as V, readViewerAutomationSummary as _, recordWebConversationActivity as a, resolveViewerTaskCandidate as b, createProductionSlackWebhookServices as c, resolveSlackConversationContextFromThreadId as d, ViewerTaskNotFoundError as f, readViewerAutomationRuns as g, readViewerAutomationExecutions as h, createConversationId as i, getAuthPausedConversationTurnId as j, normalizeIncomingSlackThreadId as k, getProductionSlackAdapter as l, readConversationSourceTask as m, conversationTurnIdForMessage as n, webActorFromEmail as o, deleteViewerTask as p, createAndEnqueueConversation as r, createProductionConversationWorkOptions as s, appendAndEnqueueWebMessage as t, formatSlackConversationRedactedLabel as u, readViewerAutomationVersions as v, lookupSlackUser as w, recordSkippedConversationMessage as x, readViewerAutomations as y, AGENT_DISPATCH_MAX_AGE_MS as z };
|