@sentry/junior 0.271.0 → 0.273.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-Bqbtr1RV.js → adapter-umap1cth.js} +1 -1
- package/dist/{admin-CWBjzyN0.js → admin-0o6E_3lo.js} +1 -1
- package/dist/{agent-runner-BiHsH8O_.js → agent-runner-D7Qz-lGO.js} +899 -631
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +5 -5
- package/dist/api.d.ts +1 -1
- package/dist/api.js +62 -537
- package/dist/{app-C81xfpNa.d.ts → app-BcyhJq8x.d.ts} +4 -9
- package/dist/app.d.ts +1 -1
- package/dist/app.js +673 -134
- package/dist/{assistant-reply-DgtX9DaJ.js → assistant-reply-wZ7i4OFa.js} +1 -1
- package/dist/{automation-Dwh_xcqM.js → automation-yffXcZt9.js} +1 -1
- package/dist/{briefs-0FeSJHQ3.js → briefs-CgMnlpIp.js} +4 -4
- package/dist/{catalog-runtime-Bw9kjGVu.js → catalog-runtime-TygDsPOU.js} +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +1 -1
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +1 -1
- package/dist/cli/upgrade.js +3 -3
- package/dist/{client-B0jlQSgO.js → client-DhqbV0Fe.js} +63 -5
- package/dist/{reporting-schema-CZREhYc-.js → common-Eu6sx09c.js} +4 -1
- package/dist/{config-DrAeD8sr.js → config-C6FTd7PX.js} +7 -15
- package/dist/{connections-BzN2K0G9.js → connections-Dq72KajR.js} +11 -11
- package/dist/{conversation-AhOVzN_k.js → conversation-T4oabbBi.js} +22 -1
- package/dist/{conversation-privacy-D1NhUxyo.js → conversation-privacy-BeRgrsph.js} +1 -1
- package/dist/{credential-sync-DpNWl4yy.js → credential-sync-BmCbHAp4.js} +15 -16
- package/dist/{db-DSabI7jJ.d.ts → db-DOzBGLn5.d.ts} +11 -1
- package/dist/{executor-C2cRw0hZ.js → executor-BafgvQcc.js} +25 -7
- package/dist/instrumentation.js +114 -3
- package/dist/{job-queue-CEeLYkSj.js → job-queue-C4lphW9Y.js} +3 -3
- package/dist/{logging-DuwXUuIY.js → logging-CNs1e04n.js} +6 -1
- package/dist/message-CETC5lsl.js +186 -0
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-oM5TJt34.js → oauth-callback-server-DcQZsKMm.js} +2 -2
- package/dist/{credentialed-mh7HBqey.js → projection-BOpi891B.js} +4576 -49
- package/dist/{prompt-BPSdXYXV.js → prompt-B1ySjUyf.js} +1 -1
- package/dist/{registry-BPtbAVFo.js → registry-B-yUrv3h.js} +2 -2
- package/dist/{resolve-D44G1jJm.js → resolve-DqVtd4Q9.js} +3 -3
- package/dist/{result-CvP8c5bb.js → result-DQwTiLTw.js} +16 -12
- package/dist/{runner-FIGIKvk2.js → runner-Dco5qMq6.js} +11 -11
- package/dist/{sandbox-egress-signals-C_JzucwP.js → sandbox-egress-signals-DFc_9Mcv.js} +1 -1
- package/dist/{schema-DKZgO-xf.js → schema-5xHDGlBW.js} +10 -9
- package/dist/{schema-DPCvePop.d.ts → schema-9OGdsaxF.d.ts} +28 -3
- package/dist/{service-account-1mJGRAvx.js → service-account-CWfk9Cs-.js} +3 -3
- package/dist/{service-account-CHO3YXpt.js → service-account-smdPFWNy.js} +3 -3
- package/dist/{session-stop-DuUB1rwQ.js → session-stop-DaT_7tYa.js} +50 -24
- package/dist/{skills-DHK7L9Eo.js → skills-BbtJSF2-.js} +2 -2
- package/dist/{spawn-CKl_ySIq.js → spawn-Ceikdjkp.js} +2 -2
- package/dist/{list-DjJJ5K0x.js → stop-dKUc-x2K.js} +1017 -469
- package/dist/{store-Di0E4EvU.js → store-C1xuZcLd.js} +48 -31
- package/dist/{store-BF2XEeQz.js → store-DaxUuOmD.js} +3 -3
- package/dist/{task-queue-CC7IFtbT.js → task-queue-ymAh_-P1.js} +4 -4
- package/dist/{task-runner-DKZtMFwa.js → task-runner-vlH6pEm3.js} +6 -6
- package/dist/{thread-state-BQ1T3eeF.js → thread-state-BkUpE9Ae.js} +4 -5
- package/dist/{turn-failure-response-B5eSFoHn.js → turn-failure-response-DIsD7ip_.js} +7 -8
- package/dist/{turn-lifecycle-CTLEIEOn.js → turn-lifecycle-BdPKdPS8.js} +1 -1
- package/dist/turn-session-routing-BdCTDq9m.js +1625 -0
- package/dist/{validation-Cjo-3yt3.js → validation-BQjCfh84.js} +1 -1
- package/dist/{version-D30MBLLw.js → version-BpiFGZZW.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-D3jhuP66.js → viewer-C6Y1aXjZ.js} +49 -21
- package/dist/{work-CL9QwQcl.js → work-ChPh_YEh.js} +27 -39
- package/dist/{worker-S2P7IJDI.js → worker-Be_sK_ou.js} +6 -6
- package/migrations/0072_conversation_read_positions.sql +10 -0
- package/migrations/meta/0072_snapshot.json +4064 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +4 -4
- package/dist/message-CRe3WBKc.js +0 -59
- package/dist/turn-session-routing-BFVp8TbU.js +0 -6072
- package/migrations/AGENTS.md +0 -8
- package/dist/{oauth-relay-CTygMkNx.js → oauth-relay-C6ZAyJgf.js} +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as modelProfileSchema, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
|
|
2
|
-
import { C as getSqlExecutor, x as getConversationStore } from "./viewer-
|
|
2
|
+
import { C as getSqlExecutor, x as getConversationStore } from "./viewer-C6Y1aXjZ.js";
|
|
3
3
|
import { a as juniorAgentInvocations, i as juniorAgentBindings, n as AGENT_INVOCATION_PARENT_MAILBOX_STATUSES, t as AGENT_INVOCATION_MAILBOX_STATUSES } from "./agent-invocations-C1RNOCs8.js";
|
|
4
|
-
import "./executor-
|
|
5
|
-
import { p as credentialContextSchema } from "./registry-
|
|
6
|
-
import { z } from "zod";
|
|
4
|
+
import "./executor-BafgvQcc.js";
|
|
5
|
+
import { p as credentialContextSchema } from "./registry-B-yUrv3h.js";
|
|
7
6
|
import { createHash } from "node:crypto";
|
|
7
|
+
import { z } from "zod";
|
|
8
8
|
import { and, asc, count, countDistinct, desc, eq, inArray, lt, ne, or, sql } from "drizzle-orm";
|
|
9
9
|
import { actorSchema, destinationSchema, sourceSchema } from "@sentry/junior-plugin-api";
|
|
10
10
|
// src/chat/runtime/turn.ts
|
|
@@ -228,6 +228,28 @@ const CHILD_AGENT_RESULTS = [
|
|
|
228
228
|
"blocked",
|
|
229
229
|
"failed"
|
|
230
230
|
];
|
|
231
|
+
// src/chat/agent-invocations/bindings.ts
|
|
232
|
+
function bindingFromRow(row) {
|
|
233
|
+
return agentBindingSchema.parse({
|
|
234
|
+
childConversationId: row.childConversationId,
|
|
235
|
+
name: row.name,
|
|
236
|
+
parentConversationId: row.parentConversationId
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/** Read one named child binding in its parent-agent scope. */
|
|
240
|
+
async function getAgentBinding(args) {
|
|
241
|
+
const rows = await getSqlExecutor().db().select().from(juniorAgentBindings).where(and(eq(juniorAgentBindings.parentConversationId, args.parentConversationId), eq(juniorAgentBindings.name, args.name)));
|
|
242
|
+
return rows[0] ? bindingFromRow(rows[0]) : void 0;
|
|
243
|
+
}
|
|
244
|
+
/** Find a direct child agent of one parent by name or child Conversation id. */
|
|
245
|
+
async function findChildAgentConversationId(args) {
|
|
246
|
+
const binding = await getAgentBinding({
|
|
247
|
+
name: args.target,
|
|
248
|
+
parentConversationId: args.parentConversationId
|
|
249
|
+
});
|
|
250
|
+
if (binding) return binding.childConversationId;
|
|
251
|
+
return (await getSqlExecutor().db().select({ childConversationId: juniorAgentInvocations.childConversationId }).from(juniorAgentInvocations).where(and(eq(juniorAgentInvocations.parentConversationId, args.parentConversationId), eq(juniorAgentInvocations.childConversationId, args.target))).limit(1))[0]?.childConversationId;
|
|
252
|
+
}
|
|
231
253
|
// src/chat/agent-invocations/errors.ts
|
|
232
254
|
/** A child agent already uses this name in the parent Conversation. */
|
|
233
255
|
var AgentNameInUseError = class extends Error {
|
|
@@ -250,13 +272,23 @@ var AgentMessageQueueFullError = class extends Error {
|
|
|
250
272
|
this.name = "AgentMessageQueueFullError";
|
|
251
273
|
}
|
|
252
274
|
};
|
|
253
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* A messageAgent target is not the parent, a child, or a top-level agent that
|
|
277
|
+
* the sender can message.
|
|
278
|
+
*/
|
|
254
279
|
var AgentMessageTargetError = class extends Error {
|
|
255
280
|
constructor(message) {
|
|
256
281
|
super(message);
|
|
257
282
|
this.name = "AgentMessageTargetError";
|
|
258
283
|
}
|
|
259
284
|
};
|
|
285
|
+
/** A top-level agent paused automated Turns, so it takes no agent message. */
|
|
286
|
+
var AgentMessagePausedError = class extends Error {
|
|
287
|
+
constructor(conversationId) {
|
|
288
|
+
super(`${conversationId} paused automated work until a person replies there`);
|
|
289
|
+
this.name = "AgentMessagePausedError";
|
|
290
|
+
}
|
|
291
|
+
};
|
|
260
292
|
// src/chat/agent-invocations/store.ts
|
|
261
293
|
const CREATE_LOCK_PREFIX = "junior:agent_invocation:create";
|
|
262
294
|
/**
|
|
@@ -334,13 +366,6 @@ function parseAgentInvocationResultMessageId(messageId) {
|
|
|
334
366
|
if (!messageId.startsWith(RESULT_MESSAGE_PREFIX) || !messageId.endsWith(RESULT_MESSAGE_SUFFIX)) return;
|
|
335
367
|
return messageId.slice(17, -7) || void 0;
|
|
336
368
|
}
|
|
337
|
-
function bindingFromRow(row) {
|
|
338
|
-
return agentBindingSchema.parse({
|
|
339
|
-
childConversationId: row.childConversationId,
|
|
340
|
-
name: row.name,
|
|
341
|
-
parentConversationId: row.parentConversationId
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
369
|
/** Parse one agent invocation row. */
|
|
345
370
|
function invocationFromRow(row) {
|
|
346
371
|
return agentInvocationSchema.parse({
|
|
@@ -376,21 +401,20 @@ function invocationFromRow(row) {
|
|
|
376
401
|
function sameCreateInput(invocation, input) {
|
|
377
402
|
return invocation.parentConversationId === input.parentConversationId && invocation.agentName === input.agentName && invocation.input === input.input && invocation.agentType === input.agentType && invocation.modelProfile === input.modelProfile && invocation.reasoningLevel === input.reasoningLevel && JSON.stringify(invocation.actor) === JSON.stringify(input.actor) && JSON.stringify(invocation.credentialContext) === JSON.stringify(input.credentialContext) && JSON.stringify(invocation.destination) === JSON.stringify(input.destination);
|
|
378
403
|
}
|
|
379
|
-
/** Read one named child binding in its parent-agent scope. */
|
|
380
|
-
async function getAgentBinding(args) {
|
|
381
|
-
const rows = await getSqlExecutor().db().select().from(juniorAgentBindings).where(and(eq(juniorAgentBindings.parentConversationId, args.parentConversationId), eq(juniorAgentBindings.name, args.name)));
|
|
382
|
-
return rows[0] ? bindingFromRow(rows[0]) : void 0;
|
|
383
|
-
}
|
|
384
404
|
/** Read one durable agent invocation. */
|
|
385
405
|
async function getAgentInvocation(invocationId) {
|
|
386
406
|
const rows = await getSqlExecutor().db().select().from(juniorAgentInvocations).where(eq(juniorAgentInvocations.invocationId, invocationId));
|
|
387
407
|
return rows[0] ? invocationFromRow(rows[0]) : void 0;
|
|
388
408
|
}
|
|
409
|
+
/** List the running and paused agent invocations of one child Conversation. */
|
|
410
|
+
async function listActiveAgentInvocationsForConversation(childConversationId) {
|
|
411
|
+
return (await getSqlExecutor().db().select().from(juniorAgentInvocations).where(and(eq(juniorAgentInvocations.childConversationId, childConversationId), inArray(juniorAgentInvocations.status, ["running", "paused"]))).orderBy(asc(juniorAgentInvocations.createdAt))).map(invocationFromRow);
|
|
412
|
+
}
|
|
389
413
|
/** Resolve the single invocation that may resume for one child conversation. */
|
|
390
414
|
async function getActiveAgentInvocationForConversation(childConversationId) {
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
393
|
-
return
|
|
415
|
+
const active = await listActiveAgentInvocationsForConversation(childConversationId);
|
|
416
|
+
if (active.length > 1) throw new Error(`Child conversation ${childConversationId} has multiple active agent invocations`);
|
|
417
|
+
return active[0];
|
|
394
418
|
}
|
|
395
419
|
/** Read the newest agent invocation of one child Conversation. */
|
|
396
420
|
async function getLatestAgentInvocationForConversation(childConversationId) {
|
|
@@ -524,15 +548,6 @@ async function createAgentInvocationFromLatest(args, nowMs = Date.now()) {
|
|
|
524
548
|
if (!invocation || invocation.childConversationId !== args.latest.childConversationId) throw new Error(`Agent invocation creation raced for ${invocationId}`);
|
|
525
549
|
return invocation;
|
|
526
550
|
}
|
|
527
|
-
/** Find a direct child agent of one parent by name or child Conversation id. */
|
|
528
|
-
async function findChildAgentConversationId(args) {
|
|
529
|
-
const binding = await getAgentBinding({
|
|
530
|
-
name: args.target,
|
|
531
|
-
parentConversationId: args.parentConversationId
|
|
532
|
-
});
|
|
533
|
-
if (binding) return binding.childConversationId;
|
|
534
|
-
return (await getSqlExecutor().db().select({ childConversationId: juniorAgentInvocations.childConversationId }).from(juniorAgentInvocations).where(and(eq(juniorAgentInvocations.parentConversationId, args.parentConversationId), eq(juniorAgentInvocations.childConversationId, args.target))).limit(1))[0]?.childConversationId;
|
|
535
|
-
}
|
|
536
551
|
/**
|
|
537
552
|
* Return whether a pending agent invocation still waits for older open work
|
|
538
553
|
* on its child.
|
|
@@ -659,12 +674,14 @@ async function markAgentInvocationPaused(invocationId, nowMs = Date.now()) {
|
|
|
659
674
|
* result. The same write marks the result for the parent mailbox. If the
|
|
660
675
|
* child still has open work, the result is `replaced`: the parent gets one
|
|
661
676
|
* report, from the agent invocation that finishes the child's work.
|
|
677
|
+
* `reportNow` sends the result even then, when that open work does not
|
|
678
|
+
* continue this task.
|
|
662
679
|
*/
|
|
663
680
|
async function completeAgentInvocation(args) {
|
|
664
681
|
const nowMs = args.nowMs ?? Date.now();
|
|
665
682
|
const current = await getAgentInvocation(args.invocationId);
|
|
666
683
|
if (!current || isTerminalAgentInvocation(current)) return current;
|
|
667
|
-
const parentMailboxStatus = args.status !== "stopped" && await hasOpenChildWork(current) ? "replaced" : "pending";
|
|
684
|
+
const parentMailboxStatus = !args.reportNow && args.status !== "stopped" && await hasOpenChildWork(current) ? "replaced" : "pending";
|
|
668
685
|
await getSqlExecutor().db().update(juniorAgentInvocations).set({
|
|
669
686
|
status: args.status,
|
|
670
687
|
result: args.status === "completed" ? args.result : null,
|
|
@@ -694,4 +711,4 @@ async function markAgentInvocationSteered(invocationId, nowMs = Date.now()) {
|
|
|
694
711
|
function isTerminalAgentInvocation(invocation) {
|
|
695
712
|
return TERMINAL_AGENT_INVOCATION_STATUSES.includes(invocation.status);
|
|
696
713
|
}
|
|
697
|
-
export {
|
|
714
|
+
export { startActiveTurn as $, AgentMessagePausedError as A, agentTypeStartsWithParentHistory as B, markAgentInvocationParentMailboxAppended as C, parseAgentInvocationResultMessageId as D, markAgentInvocationSteered as E, CHILD_AGENT_RESULTS as F, TurnInputDeferredError as G, ConversationTurnBoundaryError as H, PARENT_AGENT_TARGET as I, isTurnInputCommitLostError as J, getConversationTurnBoundaryError as K, agentNameSchema as L, AgentMessageTargetError as M, AgentNameInUseError as N, reportReplacedAgentInvocation as O, findChildAgentConversationId as P, markTurnFailed as Q, AGENT_TYPES as R, markAgentInvocationMailboxAppended as S, markAgentInvocationRunning as T, CooperativeTurnYieldError as U, formatAgentTypes as V, TurnInputCommitLostError as W, markTurnClosed as X, isTurnInputDeferredError as Y, markTurnCompleted as Z, invocationFromRow as _, createAgentInvocationFromLatest as a, listPendingAgentInvocationMailboxAppends as b, getAgentInvocationIdForEvents as c, getAgentInvocationMessageId as d, getAgentInvocationResultMessageId as f, getLatestAgentInvocationForConversation as g, getChildAgentLockName as h, createAgentInvocationForMessage as i, AgentMessageQueueFullError as j, AgentInvocationLimitError as k, getAgentInvocationIdForMessage as l, getChildAgentLabel as m, completeAgentInvocation as n, getActiveAgentInvocationForConversation as o, getAgentInvocationTurnId as p, isCooperativeTurnYieldError as q, createAgentInvocation as r, getAgentInvocation as s, NON_TERMINAL_AGENT_INVOCATION_STATUSES as t, getAgentInvocationIdForResult as u, isTerminalAgentInvocation as v, markAgentInvocationPaused as w, listPendingAgentInvocationResults as x, listActiveAgentInvocationsForConversation as y, agentTypeInstructions as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { x as getConversationStore } from "./viewer-
|
|
3
|
-
import "./job-queue-
|
|
1
|
+
import { At as recordConversationRetry$1, Dt as listActiveConversationIds$1, Ft as startConversationWork$1, It as steerWebPendingMessages$1, Lt as stopConversationWork$1, Mt as removeActiveConversation$1, Nt as requestAnotherSlice$1, Ot as markConversationWorkEnqueued$1, Pt as requestConversationWork$1, St as getConversationWorkState$1, _t as completeConversationStop$1, bt as drainConversationMailbox$1, dt as appendInboundMessage, ft as beginConversationResume$1, gt as clearExpiredConversationLease$1, ht as clearConsumedConversationWake$1, jt as releaseConversationWork$1, kt as recordAttemptFailure$1, lt as ackMessages$1, mt as checkInConversationWork$1, pt as cancelHumanFacingPendingMessages$1, ut as appendExclusiveInboundMessage, vt as completeConversationWork$1, xt as getConversation$1, yt as deadLetterAttempt$1 } from "./projection-BOpi891B.js";
|
|
2
|
+
import { x as getConversationStore } from "./viewer-C6Y1aXjZ.js";
|
|
3
|
+
import "./job-queue-C4lphW9Y.js";
|
|
4
4
|
// src/chat/task-execution/store.ts
|
|
5
5
|
function metadataStore(options) {
|
|
6
6
|
return options.conversationStore ?? getConversationStore();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as logWarn } from "./logging-
|
|
2
|
-
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-
|
|
3
|
-
import { z } from "zod";
|
|
1
|
+
import { h as logWarn } from "./logging-CNs1e04n.js";
|
|
2
|
+
import { c as QUEUE_SIGNATURE_MAX_AGE_MS, d as getQueueProvider, l as signQueueMessage, p as runWithTurnRequestDeadline, u as verifyQueueMessage } from "./job-queue-C4lphW9Y.js";
|
|
4
3
|
import { createHash } from "node:crypto";
|
|
4
|
+
import { z } from "zod";
|
|
5
5
|
// src/chat/queue/callback.ts
|
|
6
6
|
/** Shared queue callback wiring for signed messages. */
|
|
7
7
|
/** Build the HTTP callback and local-dev consumer for one signed queue. */
|
|
@@ -110,7 +110,7 @@ function pluginTaskCallback() {
|
|
|
110
110
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
111
111
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
112
112
|
run: async (message) => {
|
|
113
|
-
const { processPluginTask } = await import("./task-runner-
|
|
113
|
+
const { processPluginTask } = await import("./task-runner-vlH6pEm3.js").then((n) => n.r);
|
|
114
114
|
await processPluginTask(message);
|
|
115
115
|
},
|
|
116
116
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Ca as createPluginLogger, In as coreTaskRegistrations, Jt as getPiMessageRole, Na as createPluginConversationEvents, Nn as getPlugins, Qt as instructionTextForProjection, Sa as createPluginModel, Za as createPluginCache, an as stripRuntimeTurnContext, ba as createPluginState, it as getTurnRecord, nn as isToolResultMessage, rn as normalizeToolNameFromResult, tn as isToolResultError, x as hydrateConversationMessages, xa as createPluginEmbedder } from "./projection-BOpi891B.js";
|
|
3
3
|
import { h as parseSlackMessageTs } from "./actor-B4DYygOB.js";
|
|
4
|
-
import { S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-
|
|
4
|
+
import { S as getDb, i as readActorIdentity, x as getConversationStore } from "./viewer-C6Y1aXjZ.js";
|
|
5
5
|
import { _ as sameActorIdentity } from "./media-U6Tuz6Mi.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
9
|
-
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-
|
|
6
|
+
import { r as getStateAdapter } from "./adapter-umap1cth.js";
|
|
7
|
+
import { t as resolveConversationRouting, u as getDispatchRecord } from "./turn-session-routing-BdCTDq9m.js";
|
|
8
|
+
import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BkUpE9Ae.js";
|
|
9
|
+
import { i as pluginTaskParamsSchema, r as pluginTaskId, s as sendVercelPluginTask } from "./task-queue-ymAh_-P1.js";
|
|
10
10
|
import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
11
11
|
// src/chat/plugins/task-runner.ts
|
|
12
12
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { B as isRecord, H as toOptionalString, V as toOptionalNumber } from "./logging-
|
|
3
|
-
import { S as getDb } from "./viewer-
|
|
4
|
-
import {
|
|
5
|
-
import { r as getStateAdapter } from "./adapter-Bqbtr1RV.js";
|
|
1
|
+
import { Qa as createDurableLocationConfigurationService, S as persistConversationMessages, ea as JUNIOR_THREAD_STATE_TTL_MS } from "./projection-BOpi891B.js";
|
|
2
|
+
import { B as isRecord, H as toOptionalString, V as toOptionalNumber } from "./logging-CNs1e04n.js";
|
|
3
|
+
import { S as getDb } from "./viewer-C6Y1aXjZ.js";
|
|
4
|
+
import { r as getStateAdapter } from "./adapter-umap1cth.js";
|
|
6
5
|
// src/chat/state/conversation.ts
|
|
7
6
|
function defaultConversationState() {
|
|
8
7
|
return {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as
|
|
3
|
-
import { B as isRecord, t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { F as markConversationMessage, Ka as listConversationAnnotations, Y as clearPendingAuth, dn as buildDeterministicTurnId, x as hydrateConversationMessages } from "./projection-BOpi891B.js";
|
|
2
|
+
import { _ as findProviderError, h as ProviderError, v as getProviderErrorAttributes, y as getProviderErrorUserMessage } from "./client-DhqbV0Fe.js";
|
|
3
|
+
import { B as isRecord, t as buildTurnFailureResponse } from "./logging-CNs1e04n.js";
|
|
4
4
|
import { h as parseSlackMessageTs } from "./actor-B4DYygOB.js";
|
|
5
|
-
import { S as getDb, y as getConversationEventStore } from "./viewer-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BQ1T3eeF.js";
|
|
5
|
+
import { S as getDb, y as getConversationEventStore } from "./viewer-C6Y1aXjZ.js";
|
|
6
|
+
import { B as readMessageCardRefs, H as resolveMessageCards, V as removedCardSchema } from "./conversation-T4oabbBi.js";
|
|
7
|
+
import { D as parseAgentInvocationResultMessageId, X as markTurnClosed, Z as markTurnCompleted, p as getAgentInvocationTurnId, s as getAgentInvocation } from "./store-C1xuZcLd.js";
|
|
8
|
+
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BkUpE9Ae.js";
|
|
10
9
|
// src/chat/conversations/pending-cards.ts
|
|
11
10
|
/**
|
|
12
11
|
* Add the cards that tool results selected since the last visible assistant
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as getConversationEventStore } from "./viewer-
|
|
1
|
+
import { y as getConversationEventStore } from "./viewer-C6Y1aXjZ.js";
|
|
2
2
|
// src/chat/conversations/turn-lifecycle.ts
|
|
3
3
|
/** Persist correlated turn lifecycle facts with retry-safe terminal exclusion. */
|
|
4
4
|
var ConversationTurnLifecycleService = class {
|