@sentry/junior 0.312.0 → 0.313.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-iIq7ihf7.js → adapter-CYAvJzZS.js} +1 -1
- package/dist/{adapter-context-BRjEWRy1.js → adapter-context-CVsHoVSf.js} +2 -2
- package/dist/{admin-DhInw5K9.js → admin-Cyhb4TwZ.js} +1 -1
- package/dist/{agent-runner-C9iDurwX.js → agent-runner-B5y9MsT-.js} +93 -45
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +1 -1
- package/dist/api.js +40 -40
- package/dist/{app-DRFrC8Mw.d.ts → app-DA8-hCMj.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +31 -33
- package/dist/{background-compaction-queue-DrKi7w3d.js → background-compaction-queue-iZXadLV3.js} +56 -6
- package/dist/{catalog-runtime-D7xapBAX.js → catalog-runtime-kkE3hvCX.js} +1 -1
- package/dist/{channel-access-CJGfNTdn.js → channel-access-mt7K6dPh.js} +2 -2
- package/dist/cli/chat.js +16 -16
- 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 +5 -5
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-kXB2Y5tl.js → config-CWbwKj0j.js} +3 -3
- package/dist/{continue-in-slack-O6pV5004.js → continue-in-slack-CxyFzdlF.js} +6 -6
- package/dist/{conversation-feed-uNOv_x68.js → conversation-feed-BEXLD3Me.js} +13 -2
- package/dist/{conversation-privacy-L4ja1_W6.js → conversation-privacy-BrMiDN61.js} +1 -1
- package/dist/{conversation-turn-CeLbHqdw.js → conversation-turn-B35eu0uz.js} +63 -45
- package/dist/{credential-sync-I8VBGk05.js → credential-sync-DWTOEQrm.js} +15 -16
- package/dist/{credentialed-Cb6E2phL.js → credentialed-Dyv8b-lu.js} +12 -14
- package/dist/{db-BbC5stfa.d.ts → db-DYGcXYl3.d.ts} +1 -1
- package/dist/{db-LAyyX8tk.js → db-PwSRzWWn.js} +17 -19
- package/dist/{executor-SCub-fAq.js → executor-CgWyWfYz.js} +2 -4
- package/dist/{html-BCZ3Xtb_.js → html-DidUcRhI.js} +6 -6
- package/dist/ingest-B0AggUEC.js +7931 -0
- package/dist/{install-DCFJFkC0.js → install-2urLLXNt.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{lineage-B_m-4TJw.js → lineage-BXplQAVH.js} +2 -2
- package/dist/{list-CN2QA2R9.js → list-DyIyReSV.js} +82 -69
- package/dist/{logging-dQ9ZRGQ8.js → logging-DNt-qOIO.js} +1 -1
- package/dist/{media-CYm1QD8T.js → media-B0pZJ0bG.js} +9 -6
- package/dist/{message-DSXGj1hM.js → message-Z5YKC-Af.js} +23 -9
- package/dist/{model-input--TrP9hYV.js → model-input-BhPJYdSV.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +4 -4
- package/dist/{oauth-callback-server-DHCZC6B4.js → oauth-callback-server-ByvDdcdY.js} +2 -2
- package/dist/{oauth-relay-pPMGnDZt.js → oauth-relay-D-kK0yoN.js} +1 -1
- package/dist/{registry-CZOzddwu.js → registry-POH4bZC4.js} +1 -1
- package/dist/{statuses-_cRJHXK7.js → reporting-window-C4dbzDiR.js} +1 -27
- package/dist/request-deadline-BUiRYQYj.js +24 -0
- package/dist/{resolve-cKOQ14Dh.js → resolve-CWtBNSKP.js} +3 -3
- package/dist/{runner-DBfUW44l.js → runner-CsZ_VRxp.js} +8 -8
- package/dist/{sandbox-egress-signals-BVF_xAm1.js → sandbox-egress-signals-FbCk1FkN.js} +1 -1
- package/dist/{schema-BEHKxr4I.d.ts → schema-DBf18QPS.d.ts} +131 -912
- package/dist/{schema-Bk9Nm2E8.js → schema-DojR2uCL.js} +4 -4
- package/dist/{service-account-CVYsFjty.js → service-account-CDYb9hfX.js} +3 -3
- package/dist/{service-account-Ts4ulcrV.js → service-account-o15pZWcJ.js} +5 -5
- package/dist/{skills-VTnhAJWm.js → skills-B0jP4whm.js} +2 -2
- package/dist/{slack-conversation-unfurl-fuLnF1jE.js → slack-conversation-unfurl-D26t9kBC.js} +8 -8
- package/dist/{spawn-vxAarlX5.js → spawn-BjljgExZ.js} +14 -33
- package/dist/{start-conversation-CEn2KH1A.js → start-conversation-DbVujrwO.js} +10 -196
- package/dist/{state-C1P3_Ywk.js → state-BTawTCme.js} +4 -4
- package/dist/{result-event-type-BdIJuZxg.js → statuses-BKwqCPhj.js} +25 -4
- package/dist/{store-DFZaN-Ix.js → store-CjXrp-Up.js} +3 -3
- package/dist/{task-queue-Cx4Lmjyk.js → task-queue-Cwlatjz3.js} +4 -4
- package/dist/{task-runner-CbTwFA6k.js → task-runner--Ke8KSMf.js} +11 -11
- package/dist/{thread-context-BkAZDTX2.js → thread-context-B8exINEe.js} +6 -7
- package/dist/{thread-state-DhPndWi1.js → turn-membership-DTR3SaKD.js} +251 -17
- package/dist/{validation-nIzMtAVJ.js → validation-Ce0qbMlT.js} +1 -1
- package/dist/{vercel-queue-hW90XzbG.js → vercel-queue-q4z8w5QO.js} +2 -2
- package/dist/{version-Brbtz4Qf.js → version-DFh4n9nr.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{warmup-BDA5myRK.js → warmup-D5hzqTcp.js} +44 -2969
- package/dist/{worker-D63RcaVD.js → worker-CDg9Lbpg.js} +6 -6
- package/migrations/0158_keep_legacy_archive_columns.sql +5 -0
- package/migrations/0159_conversation_embeddings_fk_validate.sql +5 -0
- package/migrations/meta/0158_snapshot.json +6515 -0
- package/migrations/meta/0159_snapshot.json +6515 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +5 -5
- package/dist/callback-mFlTUWWx.js +0 -75
- package/dist/child-message-DcsritGf.js +0 -179
- package/dist/ingest-BDf3D50j.js +0 -3836
- package/dist/result-DcvEOe1r.js +0 -574
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Dt as inputFileSchema, Jt as inboxItemRequestSchema, U as conversationAuxiliaryCostsSchema, Y as conversationParamsSchema, at as idempotencyKeySchema, et as conversationSummaryReportSchema, nt as conversationUsageSchema, s as notificationScheduleSchema, st as conversationChildAgentTotalsSchema, z as actorIdentitySchema } from "./media-
|
|
2
|
-
import {
|
|
3
|
-
import "./conversation-feed-
|
|
4
|
-
import {
|
|
1
|
+
import { Dt as inputFileSchema, Jt as inboxItemRequestSchema, U as conversationAuxiliaryCostsSchema, Y as conversationParamsSchema, at as idempotencyKeySchema, et as conversationSummaryReportSchema, nt as conversationUsageSchema, s as notificationScheduleSchema, st as conversationChildAgentTotalsSchema, z as actorIdentitySchema } from "./media-B0pZJ0bG.js";
|
|
2
|
+
import { m as TODO_STATUSES, r as AGENT_INVOCATION_STATUSES } from "./statuses-BKwqCPhj.js";
|
|
3
|
+
import "./conversation-feed-BEXLD3Me.js";
|
|
4
|
+
import { i as fillUtcHours, r as fillUtcDays, s as sumUtcHoursIntoSixHours } from "./reporting-window-C4dbzDiR.js";
|
|
5
5
|
import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import { codeChangeSizeSchema, codeChangeStateSchema, eventMatchSchema, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
3
|
-
import { n as disconnectStateAdapter } from "./adapter-
|
|
1
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-o15pZWcJ.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-kkE3hvCX.js";
|
|
3
|
+
import { n as disconnectStateAdapter } from "./adapter-CYAvJzZS.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
// src/cli/service-account.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as setSpanAttributes, h as logWarn } from "./logging-
|
|
2
|
-
import { i as resolvePluginHeaderEnvRefs, l as fetchWithBoundedOAuthErrorBodies } from "./registry-
|
|
3
|
-
import { i as getStateAdapter } from "./adapter-
|
|
4
|
-
import { I as MUTATION_LOCK_TTL_MS, R as fenceLock, n as botConfig, z as withLock } from "./config-
|
|
5
|
-
import { n as readEncryptedState, r as findLegacyWebActorUserId, t as createEncryptedState } from "./state-
|
|
1
|
+
import { b as setSpanAttributes, h as logWarn } from "./logging-DNt-qOIO.js";
|
|
2
|
+
import { i as resolvePluginHeaderEnvRefs, l as fetchWithBoundedOAuthErrorBodies } from "./registry-POH4bZC4.js";
|
|
3
|
+
import { i as getStateAdapter } from "./adapter-CYAvJzZS.js";
|
|
4
|
+
import { I as MUTATION_LOCK_TTL_MS, R as fenceLock, n as botConfig, z as withLock } from "./config-CWbwKj0j.js";
|
|
5
|
+
import { n as readEncryptedState, r as findLegacyWebActorUserId, t as createEncryptedState } from "./state-BTawTCme.js";
|
|
6
6
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
7
7
|
import * as z from "zod";
|
|
8
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
2
|
import { s as skillRoots } from "./package-discovery-DD9vencX.js";
|
|
3
|
-
import { h as logWarn } from "./logging-
|
|
4
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
3
|
+
import { h as logWarn } from "./logging-DNt-qOIO.js";
|
|
4
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-kkE3hvCX.js";
|
|
5
5
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import path from "node:path";
|
package/dist/{slack-conversation-unfurl-fuLnF1jE.js → slack-conversation-unfurl-D26t9kBC.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
2
|
+
import { It as readActorIdentity, V as getConversationIdByProviderConversation, a as getConversationStore, o as getDb, s as getSqlExecutor, vn as readConversationAccessFromSql } from "./db-PwSRzWWn.js";
|
|
3
3
|
import { _ as slackUserIdSchema, b as slackMessageTsSchema, f as parseSlackTeamId, g as slackTeamIdSchema, h as slackChannelIdSchema, m as slackBotIdSchema, n as createSlackActor, p as parseSlackUserId, s as parseActorUserId, u as parseSlackChannelId } from "./actor-BsBdxDXQ.js";
|
|
4
|
-
import { Bo as getWorkspaceTeamId, Ni as parseDashboardConversationLink, Qr as unfurlSlackLinks, Yr as postSlackEphemeralMessage, ai as escapeSlackMrkdwnText, oi as formatSlackLink, or as lookupSlackBot, sr as lookupSlackUserProfile } from "./credentialed-
|
|
5
|
-
import { P as createCache, n as botConfig } from "./config-
|
|
6
|
-
import { E as withSpan } from "./logging-
|
|
7
|
-
import { t as runWithSlackInstallation } from "./adapter-context-
|
|
8
|
-
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-
|
|
9
|
-
import { t as checkSlackChannelReadAccess } from "./channel-access-
|
|
10
|
-
import {
|
|
4
|
+
import { Bo as getWorkspaceTeamId, Ni as parseDashboardConversationLink, Qr as unfurlSlackLinks, Yr as postSlackEphemeralMessage, ai as escapeSlackMrkdwnText, oi as formatSlackLink, or as lookupSlackBot, sr as lookupSlackUserProfile } from "./credentialed-Dyv8b-lu.js";
|
|
5
|
+
import { P as createCache, n as botConfig } from "./config-CWbwKj0j.js";
|
|
6
|
+
import { E as withSpan } from "./logging-DNt-qOIO.js";
|
|
7
|
+
import { t as runWithSlackInstallation } from "./adapter-context-CVsHoVSf.js";
|
|
8
|
+
import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-CxyFzdlF.js";
|
|
9
|
+
import { t as checkSlackChannelReadAccess } from "./channel-access-mt7K6dPh.js";
|
|
10
|
+
import { ln as deferConversationMove } from "./turn-membership-DTR3SaKD.js";
|
|
11
11
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
12
12
|
import * as z from "zod";
|
|
13
13
|
// src/chat/ingress/workspace-membership.ts
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { A as actorFromRun, j as toolInvocationDestination } from "./agent-runner-
|
|
3
|
-
import { n as botConfig } from "./config-
|
|
4
|
-
import { t as readConversationLineage } from "./lineage-
|
|
5
|
-
import {
|
|
6
|
-
import { Dt as getAgentInvocation, Jt as createAndEnqueueAgentInvocation, in as getAgentBinding, tn as AgentDepthLimitError } from "./warmup-BDA5myRK.js";
|
|
7
|
-
import { c as getAgentInvocationId, f as getAgentInvocationMessageId, y as getUnnamedAgentConversationId } from "./child-message-DcsritGf.js";
|
|
2
|
+
import { A as actorFromRun, j as toolInvocationDestination } from "./agent-runner-B5y9MsT-.js";
|
|
3
|
+
import { n as botConfig } from "./config-CWbwKj0j.js";
|
|
4
|
+
import { t as readConversationLineage } from "./lineage-BXplQAVH.js";
|
|
5
|
+
import { G as AgentDepthLimitError, W as spawnChildAgent, bt as getAgentInvocationId, g as createAndEnqueueAgentInvocation, rt as getAgentInvocation } from "./ingest-B0AggUEC.js";
|
|
8
6
|
// src/chat/agent-invocations/spawn.ts
|
|
9
7
|
var spawn_exports = /* @__PURE__ */ __exportAll({ bindSpawnAgent: () => bindSpawnAgent });
|
|
10
8
|
/**
|
|
@@ -16,24 +14,6 @@ async function assertCanStartChildAgent(conversationId, maxAgentDepth) {
|
|
|
16
14
|
const root = lineage[0];
|
|
17
15
|
if (!root || root.parentConversationId || lineage.length - 1 > maxAgentDepth) throw new AgentDepthLimitError(maxAgentDepth);
|
|
18
16
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Return the child of a spawn that already ran without an agent invocation.
|
|
21
|
-
* Its idempotency key keys the task in the child's mailbox. A spawn with an
|
|
22
|
-
* agent invocation replays through that row instead.
|
|
23
|
-
*/
|
|
24
|
-
async function findSpawnedChildAgent(args) {
|
|
25
|
-
const invocationId = getAgentInvocationId(args.parentConversationId, args.idempotencyKey);
|
|
26
|
-
if (await getAgentInvocation(invocationId)) return;
|
|
27
|
-
const childConversationId = args.agentName ? (await getAgentBinding({
|
|
28
|
-
name: args.agentName,
|
|
29
|
-
parentConversationId: args.parentConversationId
|
|
30
|
-
}))?.childConversationId : getUnnamedAgentConversationId(invocationId);
|
|
31
|
-
if (!childConversationId) return;
|
|
32
|
-
return (await getConversationWorkState({
|
|
33
|
-
conversationId: childConversationId,
|
|
34
|
-
state: args.state
|
|
35
|
-
}))?.execution.inboundMessageIds.includes(getAgentInvocationMessageId(invocationId)) ? childConversationId : void 0;
|
|
36
|
-
}
|
|
37
17
|
/** Bind a Run's Actor and credentials to new Agent invocations. */
|
|
38
18
|
function bindSpawnAgent(run, options) {
|
|
39
19
|
const actor = actorFromRun(run);
|
|
@@ -42,15 +22,8 @@ function bindSpawnAgent(run, options) {
|
|
|
42
22
|
call.signal?.throwIfAborted();
|
|
43
23
|
await assertCanStartChildAgent(run.conversationId, options.maxAgentDepth ?? botConfig.maxAgentDepth);
|
|
44
24
|
const idempotencyKey = `${run.turnId}:${call.toolCallId}`;
|
|
45
|
-
const spawned = await findSpawnedChildAgent({
|
|
46
|
-
...input.name ? { agentName: input.name } : void 0,
|
|
47
|
-
idempotencyKey,
|
|
48
|
-
parentConversationId: run.conversationId,
|
|
49
|
-
state: options.state
|
|
50
|
-
});
|
|
51
|
-
if (spawned) return { childConversationId: spawned };
|
|
52
25
|
const queue = typeof options.queue === "function" ? options.queue() : options.queue;
|
|
53
|
-
|
|
26
|
+
const createInput = {
|
|
54
27
|
actor,
|
|
55
28
|
...input.name ? { agentName: input.name } : void 0,
|
|
56
29
|
...input.agentType ? { agentType: input.agentType } : void 0,
|
|
@@ -64,10 +37,18 @@ function bindSpawnAgent(run, options) {
|
|
|
64
37
|
parentToolCallId: call.toolCallId,
|
|
65
38
|
...input.reasoningLevel ? { reasoningLevel: input.reasoningLevel } : void 0,
|
|
66
39
|
...input.title ? { title: input.title } : void 0
|
|
67
|
-
}
|
|
40
|
+
};
|
|
41
|
+
if (await getAgentInvocation(getAgentInvocationId(run.conversationId, idempotencyKey))) return { childConversationId: (await createAndEnqueueAgentInvocation(createInput, {
|
|
68
42
|
...options,
|
|
69
43
|
queue
|
|
70
44
|
})).childConversationId };
|
|
45
|
+
return await spawnChildAgent({
|
|
46
|
+
...createInput,
|
|
47
|
+
parentTurnId: run.turnId
|
|
48
|
+
}, {
|
|
49
|
+
...options,
|
|
50
|
+
queue
|
|
51
|
+
});
|
|
71
52
|
};
|
|
72
53
|
}
|
|
73
54
|
export { spawn_exports as n, bindSpawnAgent as t };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ht as bufferBody } from "./config-
|
|
1
|
+
import { Eo as SlackActionError, Fo as readPrivateSlackFile, Lo as streamPrivateSlackFile, io as conversationWatch, wi as getDashboardConversationLink } from "./credentialed-Dyv8b-lu.js";
|
|
2
|
+
import { ht as bufferBody } from "./config-CWbwKj0j.js";
|
|
3
3
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
4
|
-
import { o as getActiveTraceContext } from "./logging-
|
|
4
|
+
import { o as getActiveTraceContext } from "./logging-DNt-qOIO.js";
|
|
5
5
|
import "./actor-BsBdxDXQ.js";
|
|
6
|
-
import {
|
|
7
|
-
import { B as juniorAttachments, C as juniorConversationParticipants, H as juniorConversations, K as juniorUsers,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { a as recordUploadedAttachment, i as readLiveAttachment, n as fileFields, u as AttachmentSourceUnavailableError } from "./store-DFZaN-Ix.js";
|
|
6
|
+
import { A as isTopLevelKind, Bn as sameDestination, Pn as conversationDetailTouch, Qt as resolveActorIdentityId, a as getConversationStore, dn as ToolInputError, nt as conversationKindSql, o as getDb, s as getSqlExecutor } from "./db-PwSRzWWn.js";
|
|
7
|
+
import { B as juniorAttachments, C as juniorConversationParticipants, H as juniorConversations, K as juniorUsers, U as juniorIdentities, n as isPostgresErrorCode, z as juniorAttachmentUploads } from "./executor-CgWyWfYz.js";
|
|
8
|
+
import { K as buildDeterministicTurnId, _ as appendAndEnqueueInboundMessage, g as appendAndEnqueueExclusiveInboundMessage } from "./turn-membership-DTR3SaKD.js";
|
|
9
|
+
import { i as isVisionImageMediaType, r as detectImageMediaType } from "./media-B0pZJ0bG.js";
|
|
10
|
+
import { t as getVercelConversationWorkQueue } from "./vercel-queue-q4z8w5QO.js";
|
|
11
|
+
import { a as recordUploadedAttachment, i as readLiveAttachment, n as fileFields, u as AttachmentSourceUnavailableError } from "./store-CjXrp-Up.js";
|
|
13
12
|
import { t as webMessageId } from "./web-message-id-C6P83ans.js";
|
|
14
13
|
import * as z from "zod";
|
|
15
14
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -194,191 +193,6 @@ const readSlackAttachmentSource = async (source) => {
|
|
|
194
193
|
}
|
|
195
194
|
};
|
|
196
195
|
};
|
|
197
|
-
// src/chat/agent-invocations/fork-history.ts
|
|
198
|
-
/** Instructions that a fork child reads with its first task. */
|
|
199
|
-
const FORK_INSTRUCTIONS = "You are a fork of your parent agent. The messages before your first parent task are copied from the parent's conversation so you have its context. They are not your job: your job is the parent task below. Sandbox files, approvals, and credentials of the parent were not copied, and your sandbox is separate. Verify files in your own sandbox before you use them.";
|
|
200
|
-
/**
|
|
201
|
-
* Cut parent history for a fork: everything before the parent's message that
|
|
202
|
-
* started the fork, through the last point where every tool call has its
|
|
203
|
-
* result. A model request with an unanswered tool call fails, and the parent
|
|
204
|
-
* can commit its history in the middle of a tool round.
|
|
205
|
-
*/
|
|
206
|
-
function forkHistoryFrom(messages, parentToolCallId) {
|
|
207
|
-
const spawnIndex = parentToolCallId ? messages.findIndex((message) => message.role === "assistant" && message.content.some((part) => part.type === "toolCall" && part.id === parentToolCallId)) : -1;
|
|
208
|
-
const before = spawnIndex >= 0 ? messages.slice(0, spawnIndex) : messages;
|
|
209
|
-
const pending = /* @__PURE__ */ new Set();
|
|
210
|
-
let end = 0;
|
|
211
|
-
for (const [index, message] of before.entries()) {
|
|
212
|
-
if (message.role === "assistant") {
|
|
213
|
-
for (const part of message.content) if (part.type === "toolCall") pending.add(part.id);
|
|
214
|
-
} else if (message.role === "toolResult") pending.delete(message.toolCallId);
|
|
215
|
-
if (pending.size === 0) end = index + 1;
|
|
216
|
-
}
|
|
217
|
-
return before.slice(0, end);
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Load the start history of a fork child from its parent Conversation.
|
|
221
|
-
*/
|
|
222
|
-
async function loadForkHistory(invocation) {
|
|
223
|
-
return forkHistoryFrom((await openConversationProjection({ conversationId: invocation.parentConversationId })).messages, invocation.parentToolCallId);
|
|
224
|
-
}
|
|
225
|
-
async function hasTurnStarted(conversationId) {
|
|
226
|
-
const [row] = await getSqlExecutor().db().select({ seq: juniorConversationEvents.seq }).from(juniorConversationEvents).where(and(eq(juniorConversationEvents.conversationId, conversationId), eq(juniorConversationEvents.type, "turn_started"))).limit(1);
|
|
227
|
-
return row !== void 0;
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Commit the start history of a fork child before its first Turn starts, so
|
|
231
|
-
* the history is below the Turn start. A child that already has agent
|
|
232
|
-
* history, such as on a retry, commits nothing. A child whose Turn already
|
|
233
|
-
* started commits nothing too: the history would be Turn messages, and a
|
|
234
|
-
* parent `reply` in it would read as the Turn's answer. Only a worker that
|
|
235
|
-
* committed fork history after the Turn start leaves such a child.
|
|
236
|
-
*/
|
|
237
|
-
async function commitForkHistory(args) {
|
|
238
|
-
if ((await openConversationProjection({ conversationId: args.childConversationId })).messages.length > 0 || await hasTurnStarted(args.childConversationId)) return;
|
|
239
|
-
const messages = await loadForkHistory(args);
|
|
240
|
-
if (messages.length === 0) return;
|
|
241
|
-
await commitMessages({
|
|
242
|
-
conversationId: args.childConversationId,
|
|
243
|
-
messages,
|
|
244
|
-
provenance: messages.map(() => contextProvenance)
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
/** True for agent history that a fork child inherited from its parent. */
|
|
248
|
-
function isInheritedForkHistory(event, firstEvent) {
|
|
249
|
-
return firstEvent !== void 0 && event.seq > firstEvent.seq && event.createdAtMs < firstEvent.createdAtMs && (event.data.type === "assistant_message" || event.data.type === "tool_result");
|
|
250
|
-
}
|
|
251
|
-
const firstRow = alias(juniorConversationEvents, "first_event");
|
|
252
|
-
/**
|
|
253
|
-
* SQL filter for event rows that a fork child did not inherit from its
|
|
254
|
-
* parent. Usage reports use it, so inherited model calls count only in the
|
|
255
|
-
* parent. It reads only a lower seq, the Conversation's first event, so a
|
|
256
|
-
* counted row never changes whether it counts.
|
|
257
|
-
*/
|
|
258
|
-
function notInheritedByForkChild() {
|
|
259
|
-
return sql`not coalesce(${juniorConversationEvents.createdAt} < (
|
|
260
|
-
select ${firstRow.createdAt}
|
|
261
|
-
from ${juniorConversationEvents} as ${sql.identifier("first_event")}
|
|
262
|
-
where ${firstRow.conversationId} = ${juniorConversationEvents.conversationId}
|
|
263
|
-
and ${firstRow.seq} < ${juniorConversationEvents.seq}
|
|
264
|
-
order by ${firstRow.seq}
|
|
265
|
-
limit 1
|
|
266
|
-
), false)`;
|
|
267
|
-
}
|
|
268
|
-
// src/chat/services/turn-session-routing.ts
|
|
269
|
-
async function loadConversationChain(conversationId, conversationStore) {
|
|
270
|
-
const chain = [];
|
|
271
|
-
const seen = /* @__PURE__ */ new Set();
|
|
272
|
-
let cursor = conversationId;
|
|
273
|
-
while (cursor && !seen.has(cursor)) {
|
|
274
|
-
seen.add(cursor);
|
|
275
|
-
const conversation = await conversationStore.get({ conversationId: cursor });
|
|
276
|
-
if (!conversation) break;
|
|
277
|
-
chain.push(conversation);
|
|
278
|
-
cursor = conversation.parentConversationId;
|
|
279
|
-
}
|
|
280
|
-
return chain;
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Normalize a stored Slack session source against the conversation destination.
|
|
284
|
-
*
|
|
285
|
-
* Does not create channel or thread values from the conversation id.
|
|
286
|
-
*/
|
|
287
|
-
function slackSourceForDestination(args) {
|
|
288
|
-
if (args.source?.kind !== "slack" || args.source.channelId !== args.destination.channelId) return;
|
|
289
|
-
const threadTs = args.source.threadTs?.trim();
|
|
290
|
-
return {
|
|
291
|
-
kind: "slack",
|
|
292
|
-
visibility: args.source.visibility ?? "public",
|
|
293
|
-
teamId: args.source.teamId?.trim() || args.destination.teamId,
|
|
294
|
-
channelId: args.source.channelId,
|
|
295
|
-
...threadTs ? { threadTs } : void 0
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Resolve the Conversation Location, Destination, and session Source.
|
|
300
|
-
*
|
|
301
|
-
* Reads parent Conversations when this Conversation has no Destination.
|
|
302
|
-
*/
|
|
303
|
-
async function resolveConversationRouting(args) {
|
|
304
|
-
const conversationStore = args.conversationStore ?? (await import("./db-LAyyX8tk.js").then((n) => n.n)).getConversationStore();
|
|
305
|
-
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
306
|
-
let destination;
|
|
307
|
-
let source;
|
|
308
|
-
let location;
|
|
309
|
-
for (const conversation of chain) {
|
|
310
|
-
destination ??= conversation.destination;
|
|
311
|
-
source ??= conversation.sessionSource;
|
|
312
|
-
location ??= conversation.location;
|
|
313
|
-
if (destination && source) break;
|
|
314
|
-
}
|
|
315
|
-
if (!destination) return;
|
|
316
|
-
if (destination.platform === "slack") {
|
|
317
|
-
const slackSource = slackSourceForDestination({
|
|
318
|
-
destination,
|
|
319
|
-
source
|
|
320
|
-
});
|
|
321
|
-
return {
|
|
322
|
-
destination,
|
|
323
|
-
...location ? { location } : void 0,
|
|
324
|
-
...slackSource ? { source: slackSource } : void 0
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
return {
|
|
328
|
-
destination,
|
|
329
|
-
...location ? { location } : void 0,
|
|
330
|
-
...source ? { source } : void 0
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
/** Require the Conversation Destination and Source from SQL. */
|
|
334
|
-
async function resolveTurnSessionRouting(args) {
|
|
335
|
-
const routing = await resolveConversationRouting(args);
|
|
336
|
-
if (!routing?.destination || !routing.source) throw new Error(`Conversation ${args.conversationId} is missing durable routing metadata`);
|
|
337
|
-
return {
|
|
338
|
-
destination: routing.destination,
|
|
339
|
-
...routing.location ? { location: routing.location } : void 0,
|
|
340
|
-
source: routing.source
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Require the Destination and Source to resume a Turn.
|
|
345
|
-
*
|
|
346
|
-
* A dispatch Conversation stores the dispatch Source, which has no session
|
|
347
|
-
* Source. Its dispatch record owns the Destination and Source.
|
|
348
|
-
*/
|
|
349
|
-
async function resolveTurnResumeRouting(args) {
|
|
350
|
-
if (!args.dispatchId) return await resolveTurnSessionRouting(args);
|
|
351
|
-
const dispatch = await getDispatchRecord(args.dispatchId);
|
|
352
|
-
if (!dispatch) throw new Error(`Dispatch record is missing for ${args.dispatchId}`);
|
|
353
|
-
const dispatchConversationId = getDispatchConversationId(dispatch);
|
|
354
|
-
if (dispatchConversationId !== args.conversationId) throw new Error(`Dispatch ${dispatch.id} belongs to ${dispatchConversationId}, not ${args.conversationId}`);
|
|
355
|
-
const location = (await resolveConversationRouting(args))?.location;
|
|
356
|
-
return {
|
|
357
|
-
destination: dispatch.destination,
|
|
358
|
-
...location ? { location } : void 0,
|
|
359
|
-
source: dispatch.source
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
// src/chat/task-execution/turn-membership.ts
|
|
363
|
-
/** True when the committed message at `seq` belongs to the Turn. */
|
|
364
|
-
function isTurnMessage(start, seq, message) {
|
|
365
|
-
return seq > start.seq && message.role !== "system";
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* The messages of a saved Turn with their provenance. Without a
|
|
369
|
-
* `turn_started` event, nothing tells this Turn from earlier history, so it
|
|
370
|
-
* has no messages.
|
|
371
|
-
*/
|
|
372
|
-
function savedTurnMessages(record, start) {
|
|
373
|
-
if (!start) return [];
|
|
374
|
-
return record.piMessages.flatMap((message, index) => {
|
|
375
|
-
const seq = record.piMessageSeqs[index];
|
|
376
|
-
return seq !== void 0 && isTurnMessage(start, seq, message) ? [{
|
|
377
|
-
message,
|
|
378
|
-
provenance: record.piMessageProvenance[index] ?? { authority: "context" }
|
|
379
|
-
}] : [];
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
196
|
// src/chat/attachments/uploads.ts
|
|
383
197
|
const MINUTE_MS = 6e4;
|
|
384
198
|
/** Time that a browser has to write the bytes after it asks to upload. */
|
|
@@ -938,4 +752,4 @@ function createStartConversationTool(context) {
|
|
|
938
752
|
}
|
|
939
753
|
});
|
|
940
754
|
}
|
|
941
|
-
export {
|
|
755
|
+
export { makeStructuredToolOutput as A, recordSlackAttachment as C, zodToolDefinition as D, zodTool as E, injectContinuationToolName as O, readSlackAttachmentSource as S, parseToolInput as T, verifyAttachmentUploads as _, readLeadUser as a, matchSlackAttachments as b, conversationTurnIdForMessage as c, recordWebConversationActivity as d, webActorFromUser as f, createAttachmentUpload as g, collectAttachmentUploadGarbage as h, leadPersonParticipates as i, juniorToolOutputSchema as k, createAndEnqueueConversation as l, AttachmentUploadError as m, startConversationToolDefinition as n, acceptsWebMessages as o, resolveConversationDestination as p, getLeadConversation as r, appendAndEnqueueWebMessage as s, createStartConversationTool as t, createConversationId as u, writeAttachmentUpload as v, slackAttachmentsVersionQuery as w, readAttachmentVisionSummary as x, getSlackFileId as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as getChatConfig } from "./config-
|
|
2
|
-
import { h as logWarn } from "./logging-
|
|
3
|
-
import { o as getDb } from "./db-
|
|
4
|
-
import { K as juniorUsers } from "./executor-
|
|
1
|
+
import { r as getChatConfig } from "./config-CWbwKj0j.js";
|
|
2
|
+
import { h as logWarn } from "./logging-DNt-qOIO.js";
|
|
3
|
+
import { o as getDb } from "./db-PwSRzWWn.js";
|
|
4
|
+
import { K as juniorUsers } from "./executor-CgWyWfYz.js";
|
|
5
5
|
import { createCipheriv, createDecipheriv, createHash, randomBytes } from "node:crypto";
|
|
6
6
|
import { eq } from "drizzle-orm";
|
|
7
7
|
// src/chat/conversations/legacy-web-actor-id.ts
|
|
@@ -40,9 +40,30 @@ function isAgentInvocationResultEventType(eventType) {
|
|
|
40
40
|
const AGENT_REPLY_EVENT_TYPE = "agent.reply";
|
|
41
41
|
/** Event type of a message that a child agent sends to its parent. */
|
|
42
42
|
const AGENT_MESSAGE_EVENT_TYPE = "agent.message";
|
|
43
|
+
// src/chat/agent-invocations/statuses.ts
|
|
44
|
+
const AGENT_INVOCATION_STATUSES = [
|
|
45
|
+
"pending",
|
|
46
|
+
"running",
|
|
47
|
+
"paused",
|
|
48
|
+
"blocked",
|
|
49
|
+
"completed",
|
|
50
|
+
"failed",
|
|
51
|
+
"stopped"
|
|
52
|
+
];
|
|
53
|
+
const AGENT_INVOCATION_MAILBOX_STATUSES = ["pending", "appended"];
|
|
43
54
|
/**
|
|
44
|
-
*
|
|
45
|
-
* invocation
|
|
55
|
+
* Parent mailbox append state. Only terminal invocations have a value.
|
|
56
|
+
* `replaced` means the child still had open work, so a later agent invocation
|
|
57
|
+
* on the same child sends the result instead. `skipped` means a stop ended
|
|
58
|
+
* the work, so the result is never used. `steered` means the agent invocation
|
|
59
|
+
* that was running read the input as a steering message, so its result covers
|
|
60
|
+
* this one.
|
|
46
61
|
*/
|
|
47
|
-
const
|
|
48
|
-
|
|
62
|
+
const AGENT_INVOCATION_PARENT_MAILBOX_STATUSES = [
|
|
63
|
+
"pending",
|
|
64
|
+
"appended",
|
|
65
|
+
"replaced",
|
|
66
|
+
"skipped",
|
|
67
|
+
"steered"
|
|
68
|
+
];
|
|
69
|
+
export { AGENT_MESSAGE_EVENT_TYPE as a, isAgentInvocationResultEventType as c, userCustomizationTextSchema as d, OPEN_TODO_STATUSES as f, isOpenTodoStatus as g, UPDATE_TODOS_TOOL_NAME as h, AGENT_INVOCATION_EVENT_NAMESPACE as i, USER_CUSTOMIZATION_MAX_CHARS as l, TODO_STATUSES as m, AGENT_INVOCATION_PARENT_MAILBOX_STATUSES as n, AGENT_REPLY_EVENT_TYPE as o, SELF_TODO_ASSIGNEE as p, AGENT_INVOCATION_STATUSES as r, agentInvocationResultEventType as s, AGENT_INVOCATION_MAILBOX_STATUSES as t, userCustomizationSchema as u };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as juniorAttachments, H as juniorConversations, V as juniorMessageAttachments } from "./executor-
|
|
2
|
-
import {
|
|
1
|
+
import { B as juniorAttachments, H as juniorConversations, V as juniorMessageAttachments } from "./executor-CgWyWfYz.js";
|
|
2
|
+
import { In as touchConversationDetail, Pn as conversationDetailTouch } from "./db-PwSRzWWn.js";
|
|
3
3
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
4
|
-
import { ht as bufferBody } from "./config-
|
|
4
|
+
import { ht as bufferBody } from "./config-CWbwKj0j.js";
|
|
5
5
|
import { createHash, randomUUID } from "node:crypto";
|
|
6
6
|
import { and, asc, eq, inArray, isNotNull, isNull, lte, notExists, or } from "drizzle-orm";
|
|
7
7
|
// src/chat/attachments/source.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h as logWarn } from "./logging-
|
|
2
|
-
import {
|
|
3
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, u as verifyQueueMessage } from "./vercel-queue-
|
|
1
|
+
import { h as logWarn } from "./logging-DNt-qOIO.js";
|
|
2
|
+
import { u as queueCallback } from "./background-compaction-queue-iZXadLV3.js";
|
|
3
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, u as verifyQueueMessage } from "./vercel-queue-q4z8w5QO.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
// src/chat/plugins/task-queue.ts
|
|
@@ -61,7 +61,7 @@ function pluginTaskCallback() {
|
|
|
61
61
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
62
62
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
63
63
|
run: async (message) => {
|
|
64
|
-
const { processPluginTask } = await import("./task-runner
|
|
64
|
+
const { processPluginTask } = await import("./task-runner--Ke8KSMf.js").then((n) => n.r);
|
|
65
65
|
await processPluginTask(message);
|
|
66
66
|
},
|
|
67
67
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { Bn as readConversationMetadata, Fn as createPluginTurnEventReader, Hn as resolveRootVisibility, In as createPluginConversationEvents, Kn as storeConversationEmbedding, Ln as renderPluginConversationEvent, Mn as createPluginEmbedder, Nn as createPluginModel, Nr as getDispatchRecord, Pn as createPluginModelCostRecorder, Pt as createPluginState, Vn as writeConversationMetadata, Wn as createConversationEmbedder, Yn as listConversationAnnotations, _s as renderJuniorNativeConversationEvent, as as createPluginCache, at as getPiMessageRole, g as getRegistrations, gt as normalizeToolNameFromResult, ht as isToolResultMessage, mt as isToolResultError, ss as completeObject, st as getUserMessageInstructionText, ut as instructionTextForProjection, vt as stripRuntimeTurnContext, wr as createPluginLogger } from "./credentialed-
|
|
3
|
-
import { C as createSqlStore, D as hasConversationMetadata,
|
|
4
|
-
import { E as withSpan, U as buildSentryEventUrl, a as extractGenAiUsageSummary, m as logInfo } from "./logging-
|
|
5
|
-
import {
|
|
6
|
-
import { O as matchSlackAttachments, T as isInheritedForkHistory, b as savedTurnMessages, n as startConversationToolDefinition, x as resolveConversationRouting } from "./start-conversation-CEn2KH1A.js";
|
|
2
|
+
import { Bn as readConversationMetadata, Fn as createPluginTurnEventReader, Hn as resolveRootVisibility, In as createPluginConversationEvents, Kn as storeConversationEmbedding, Ln as renderPluginConversationEvent, Mn as createPluginEmbedder, Nn as createPluginModel, Nr as getDispatchRecord, Pn as createPluginModelCostRecorder, Pt as createPluginState, Vn as writeConversationMetadata, Wn as createConversationEmbedder, Yn as listConversationAnnotations, _s as renderJuniorNativeConversationEvent, as as createPluginCache, at as getPiMessageRole, g as getRegistrations, gt as normalizeToolNameFromResult, ht as isToolResultMessage, mt as isToolResultError, ss as completeObject, st as getUserMessageInstructionText, ut as instructionTextForProjection, vt as stripRuntimeTurnContext, wr as createPluginLogger } from "./credentialed-Dyv8b-lu.js";
|
|
3
|
+
import { C as createSqlStore, D as hasConversationMetadata, It as readActorIdentity, a as getConversationStore, d as eventFromRow, jn as hasAgentTurnUsage, o as getDb, s as getSqlExecutor } from "./db-PwSRzWWn.js";
|
|
4
|
+
import { E as withSpan, U as buildSentryEventUrl, a as extractGenAiUsageSummary, m as logInfo } from "./logging-DNt-qOIO.js";
|
|
5
|
+
import { Tn as loadTurnStart, d as getPersistedThreadState, jt as isEventAuthorId, m as coerceThreadConversationState, n as savedTurnMessages, r as resolveConversationRouting, rn as getTurnRecord, s as isInheritedForkHistory, ut as hydrateConversationMessages } from "./turn-membership-DTR3SaKD.js";
|
|
7
6
|
import { v as parseSlackMessageTs } from "./actor-BsBdxDXQ.js";
|
|
8
7
|
import { m as sameActorIdentity } from "./history-CYstOMKX.js";
|
|
9
|
-
import { H as juniorConversations, L as juniorCodeChanges, M as juniorConversationEvents, R as juniorCodeRepositories } from "./executor-
|
|
10
|
-
import { n as botConfig, z as withLock } from "./config-
|
|
11
|
-
import { i as getStateAdapter } from "./adapter-
|
|
12
|
-
import {
|
|
8
|
+
import { H as juniorConversations, L as juniorCodeChanges, M as juniorConversationEvents, R as juniorCodeRepositories } from "./executor-CgWyWfYz.js";
|
|
9
|
+
import { n as botConfig, z as withLock } from "./config-CWbwKj0j.js";
|
|
10
|
+
import { i as getStateAdapter } from "./adapter-CYAvJzZS.js";
|
|
11
|
+
import { b as matchSlackAttachments, n as startConversationToolDefinition } from "./start-conversation-DbVujrwO.js";
|
|
12
|
+
import { Q as conversationReportMessageEventSchema, St as readMessageCardRefs, Z as conversationReportEventSchema, kt as readMessageAttachments, vt as inboxItemChangeRecordSchema } from "./media-B0pZJ0bG.js";
|
|
13
13
|
import { h as startSpan } from "./sentry-CPbZjomA.js";
|
|
14
|
-
import { i as pluginTaskParamsSchema, r as pluginTaskId } from "./task-queue-
|
|
14
|
+
import { i as pluginTaskParamsSchema, r as pluginTaskId } from "./task-queue-Cwlatjz3.js";
|
|
15
15
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
16
16
|
import * as z from "zod";
|
|
17
17
|
import { objectTypeSchema, pluginRunContextSchema, renderTag, tagJson } from "@sentry/junior-plugin-api";
|
|
@@ -1375,7 +1375,7 @@ function taskPluginContext(plugin, message, options = {}) {
|
|
|
1375
1375
|
};
|
|
1376
1376
|
}
|
|
1377
1377
|
function isConversationMetadataTask(message) {
|
|
1378
|
-
return message.plugin === CONVERSATION_METADATA_TASK.plugin && message.name === CONVERSATION_METADATA_TASK.name
|
|
1378
|
+
return message.plugin === CONVERSATION_METADATA_TASK.plugin && message.name === CONVERSATION_METADATA_TASK.name;
|
|
1379
1379
|
}
|
|
1380
1380
|
function findPluginTask(message) {
|
|
1381
1381
|
const plugin = getRegistrations().find((candidate) => candidate.manifest.name === message.plugin);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Yn as listConversationAnnotations } from "./credentialed-
|
|
1
|
+
import { Yn as listConversationAnnotations } from "./credentialed-Dyv8b-lu.js";
|
|
2
2
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
3
|
-
import { b as setSpanAttributes } from "./logging-
|
|
4
|
-
import { o as getDb, r as getConversationEventStore } from "./db-
|
|
5
|
-
import {
|
|
6
|
-
import { Ct as removedCardSchema, St as readMessageCardRefs, wt as resolveMessageCards } from "./media-
|
|
7
|
-
import {
|
|
8
|
-
import { i as listChildMessages, r as isAgentInvocationResult } from "./child-message-DcsritGf.js";
|
|
3
|
+
import { b as setSpanAttributes } from "./logging-DNt-qOIO.js";
|
|
4
|
+
import { o as getDb, r as getConversationEventStore } from "./db-PwSRzWWn.js";
|
|
5
|
+
import { Kt as clearPendingAuth, N as getConversationWorkState, d as getPersistedThreadState, gt as buildConversationContext, m as coerceThreadConversationState, p as persistThreadStateById, ut as hydrateConversationMessages, xt as markConversationMessage } from "./turn-membership-DTR3SaKD.js";
|
|
6
|
+
import { Ct as removedCardSchema, St as readMessageCardRefs, wt as resolveMessageCards } from "./media-B0pZJ0bG.js";
|
|
7
|
+
import { $t as markTurnCompleted, Qt as markTurnClosed, Vt as getTurnUserMessageId, ht as listChildMessages, mt as isAgentInvocationResult } from "./ingest-B0AggUEC.js";
|
|
9
8
|
// src/chat/conversations/pending-cards.ts
|
|
10
9
|
/**
|
|
11
10
|
* Add the cards that tool results selected since the last visible assistant
|