@sentry/junior 0.310.0 → 0.312.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-context-BhKpjpGD.js → adapter-context-BRjEWRy1.js} +2 -2
- package/dist/adapter-iIq7ihf7.js +259 -0
- package/dist/{admin-tgZEZAk2.js → admin-DhInw5K9.js} +1 -2
- package/dist/{agent-runner-D9cvNlQl.js → agent-runner-C9iDurwX.js} +6507 -7721
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +7 -6
- package/dist/api.d.ts +21 -3
- package/dist/api.js +1625 -535
- package/dist/{app-B_7Wn0en.d.ts → app-DRFrC8Mw.d.ts} +14 -10
- package/dist/app.d.ts +2 -2
- package/dist/app.js +454 -994
- package/dist/{background-compaction-queue-BGHqkhkY.js → background-compaction-queue-DrKi7w3d.js} +10 -85
- package/dist/callback-mFlTUWWx.js +75 -0
- package/dist/{catalog-runtime-BxwzbLKY.js → catalog-runtime-D7xapBAX.js} +1 -1
- package/dist/channel-access-CJGfNTdn.js +221 -0
- package/dist/child-message-DcsritGf.js +179 -0
- package/dist/cli/chat.js +18 -19
- package/dist/cli/check.js +23 -29
- package/dist/cli/init.js +1 -7
- package/dist/cli/main.js +3 -7
- package/dist/cli/plugins.js +8 -7
- package/dist/cli/run.d.ts +1 -2
- package/dist/cli/run.js +1 -2
- 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-Dkt2Le2b.js → config-kXB2Y5tl.js} +294 -28
- package/dist/{continue-in-slack-BWVwePKD.js → continue-in-slack-O6pV5004.js} +7 -7
- package/dist/{conversation-feed-Ci6YD1N-.js → conversation-feed-uNOv_x68.js} +87 -24
- package/dist/{conversation-privacy-C39g8BY4.js → conversation-privacy-L4ja1_W6.js} +1 -1
- package/dist/{conversation-turn-CBlZIH02.js → conversation-turn-CeLbHqdw.js} +56 -49
- package/dist/{credential-sync-vGnrB0BY.js → credential-sync-I8VBGk05.js} +16 -16
- package/dist/{projection-jZSlEAXG.js → credentialed-Cb6E2phL.js} +16268 -16821
- package/dist/{db-B4Hjxr-u.d.ts → db-BbC5stfa.d.ts} +13 -6
- package/dist/{db-CFZggNoy.js → db-LAyyX8tk.js} +1698 -1046
- package/dist/{executor-BPkZDx5-.js → executor-SCub-fAq.js} +552 -181
- package/dist/{html-2r2KmLwi.js → html-BCZ3Xtb_.js} +6 -6
- package/dist/{session-stop-BfY4rhJs.js → ingest-BDf3D50j.js} +2134 -2553
- package/dist/{install-C-oE6C_u.js → install-DCFJFkC0.js} +2 -2
- package/dist/instrumentation.js +4 -4
- package/dist/{lineage-CsvrEFQe.js → lineage-B_m-4TJw.js} +2 -2
- package/dist/{stop-DYzjRf2U.js → list-CN2QA2R9.js} +1656 -685
- package/dist/{logging-D5gkyvnK.js → logging-dQ9ZRGQ8.js} +47 -9
- package/dist/media-CYm1QD8T.js +2356 -0
- package/dist/{message-DwvJ-I3w.js → message-DSXGj1hM.js} +19 -29
- package/dist/{model-input-MAq2881y.js → model-input--TrP9hYV.js} +3 -3
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +4 -3
- package/dist/{oauth-callback-server-DIF6Li06.js → oauth-callback-server-DHCZC6B4.js} +2 -2
- package/dist/{oauth-relay-DPE-wrwO.js → oauth-relay-pPMGnDZt.js} +1 -1
- package/dist/{registry-BBkWFCl8.js → registry-CZOzddwu.js} +5 -8
- package/dist/{resolve-B38MkHXE.js → resolve-cKOQ14Dh.js} +3 -3
- package/dist/{result-BaqSZcJb.js → result-DcvEOe1r.js} +119 -93
- package/dist/result-event-type-BdIJuZxg.js +48 -0
- package/dist/rule-DAxQY-1h.js +20 -0
- package/dist/{runner-11h8PrHh.js → runner-DBfUW44l.js} +14 -16
- package/dist/{sandbox-egress-signals-CTcACAtJ.js → sandbox-egress-signals-BVF_xAm1.js} +1 -1
- package/dist/{schema-DriSvB40.d.ts → schema-BEHKxr4I.d.ts} +861 -298
- package/dist/{schema-obw5jvR4.js → schema-Bk9Nm2E8.js} +344 -153
- package/dist/{service-account-Bx93N1n1.js → service-account-CVYsFjty.js} +3 -3
- package/dist/{service-account-Zc5bUcIJ.js → service-account-Ts4ulcrV.js} +68 -68
- package/dist/{skills-C8Npu5zO.js → skills-VTnhAJWm.js} +2 -2
- package/dist/{slack-conversation-unfurl-DlRVA02H.js → slack-conversation-unfurl-fuLnF1jE.js} +9 -11
- package/dist/{spawn-CXr58R0x.js → spawn-vxAarlX5.js} +6 -6
- package/dist/start-conversation-CEn2KH1A.js +941 -0
- package/dist/{state-CGrGVeQC.js → state-C1P3_Ywk.js} +4 -4
- package/dist/statuses-_cRJHXK7.js +150 -0
- package/dist/store-DFZaN-Ix.js +492 -0
- package/dist/task-queue-Cx4Lmjyk.js +90 -0
- package/dist/task-runner-CbTwFA6k.js +1432 -0
- package/dist/{thread-context-Dyj1KWaY.js → thread-context-BkAZDTX2.js} +13 -11
- package/dist/thread-state-DhPndWi1.js +5625 -0
- package/dist/{validation-DxVNIxA0.js → validation-nIzMtAVJ.js} +1 -1
- package/dist/{task-queue-CaZffYaH.js → vercel-queue-hW90XzbG.js} +93 -172
- package/dist/{version-Cr7Z71yG.js → version-Brbtz4Qf.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{warmup-C6LOZ2d2.js → warmup-BDA5myRK.js} +5832 -4567
- package/dist/web-message-id-C6P83ans.js +10 -0
- package/dist/{worker-CUBtu1Li.js → worker-D63RcaVD.js} +20 -8
- package/migrations/0126_artifact_drop_public.sql +8 -0
- package/migrations/0127_artifact_path.sql +4 -0
- package/migrations/0128_artifact_path_index.sql +1 -0
- package/migrations/0129_review_item_answered_index.sql +1 -0
- package/migrations/0130_review_item_status_index.sql +1 -0
- package/migrations/0131_brief_outcome_status.sql +1 -0
- package/migrations/0132_brief_outcome_status_backfill.sql +7 -0
- package/migrations/0133_brief_created_at_index.sql +1 -0
- package/migrations/0134_slack_person_search_index.sql +1 -0
- package/migrations/0135_code_change_size.sql +3 -0
- package/migrations/0136_merge_conflict_notice_dismiss.sql +16 -0
- package/migrations/0137_inbox_snoozes.sql +27 -0
- package/migrations/0138_code_change_search_index.sql +2 -0
- package/migrations/0139_review_item_owner.sql +22 -0
- package/migrations/0140_review_item_owner_index.sql +1 -0
- package/migrations/0141_memory_core_adoption.sql +89 -0
- package/migrations/0142_memory_core_indexes.sql +17 -0
- package/migrations/0143_todos.sql +14 -0
- package/migrations/0144_inbox_items.sql +32 -0
- package/migrations/0145_todo_changed_by_agent.sql +1 -0
- package/migrations/0146_inbox_item_subject_title_parts.sql +1 -0
- package/migrations/0147_inbox_snooze_wake_reason.sql +1 -0
- package/migrations/0148_authorization_request_index.sql +1 -0
- package/migrations/0149_conversation_metadata.sql +10 -0
- package/migrations/0150_conversation_metadata_fill.sql +39 -0
- package/migrations/0151_conversation_search_index.sql +1 -0
- package/migrations/0152_inbox_item_legacy_automation_keys.sql +21 -0
- package/migrations/0153_artifact_expiry.sql +1 -0
- package/migrations/0154_artifact_permanent_sha_index.sql +1 -0
- package/migrations/0155_artifact_drop_public_sha_index.sql +3 -0
- package/migrations/0156_conversation_kind_lead.sql +6 -0
- package/migrations/0157_conversation_lead_actor_index.sql +1 -0
- package/migrations/meta/0126_snapshot.json +5488 -0
- package/migrations/meta/0127_snapshot.json +5519 -0
- package/migrations/meta/0128_snapshot.json +5519 -0
- package/migrations/meta/0129_snapshot.json +5547 -0
- package/migrations/meta/0130_snapshot.json +5563 -0
- package/migrations/meta/0131_snapshot.json +5569 -0
- package/migrations/meta/0132_snapshot.json +5569 -0
- package/migrations/meta/0133_snapshot.json +5590 -0
- package/migrations/meta/0134_snapshot.json +5606 -0
- package/migrations/meta/0135_snapshot.json +5624 -0
- package/migrations/meta/0136_snapshot.json +5624 -0
- package/migrations/meta/0137_snapshot.json +5864 -0
- package/migrations/meta/0138_snapshot.json +5894 -0
- package/migrations/meta/0139_snapshot.json +5898 -0
- package/migrations/meta/0140_snapshot.json +5919 -0
- package/migrations/meta/0141_snapshot.json +6429 -0
- package/migrations/meta/0142_snapshot.json +6457 -0
- package/migrations/meta/0143_snapshot.json +6434 -0
- package/migrations/meta/0144_snapshot.json +6434 -0
- package/migrations/meta/0145_snapshot.json +6440 -0
- package/migrations/meta/0146_snapshot.json +6446 -0
- package/migrations/meta/0147_snapshot.json +6452 -0
- package/migrations/meta/0148_snapshot.json +6474 -0
- package/migrations/meta/0149_snapshot.json +6490 -0
- package/migrations/meta/0150_snapshot.json +6490 -0
- package/migrations/meta/0151_snapshot.json +6505 -0
- package/migrations/meta/0152_snapshot.json +6505 -0
- package/migrations/meta/0153_snapshot.json +6511 -0
- package/migrations/meta/0154_snapshot.json +6533 -0
- package/migrations/meta/0155_snapshot.json +6511 -0
- package/migrations/meta/0156_snapshot.json +6511 -0
- package/migrations/meta/0157_snapshot.json +6527 -0
- package/migrations/meta/_journal.json +224 -0
- package/package.json +7 -8
- package/skills/design-automation-skill/SKILL.md +108 -0
- package/dist/briefs-DKxkoruh.js +0 -395
- package/dist/conversation-M9KZ5JxF.js +0 -1024
- package/dist/prompt-CaMyeCpA.js +0 -910
- package/dist/schedule-DWxZ3kja.js +0 -1146
- package/dist/store-D4FQ1Nml.js +0 -335
- package/dist/task-runner-Dm7BHbGp.js +0 -287
- package/dist/turn-session-routing-CD0BRCex.js +0 -263
- package/dist/turn-user-message-9IxeEv5v.js +0 -364
- package/dist/users-CaUAYMb3.js +0 -181
- package/dist/viewer-AHldghAD.js +0 -212
- package/dist/web-message-id-BT8Mg8LL.js +0 -418
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as logWarn } from "./logging-
|
|
1
|
+
import { h as logWarn } from "./logging-dQ9ZRGQ8.js";
|
|
2
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3
3
|
import { renderSystemMessageUpdate } from "@earendil-works/pi-ai";
|
|
4
4
|
// src/chat/conversation-privacy.ts
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import { E as withSpan, S as setTags, h as logWarn, p as logException } from "./logging-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as buildDeliveredTurnStatePatch, o as loadPendingMessageCards, r as completeAuthPauseTurn, t as buildTurnThreadContext } from "./thread-context-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { Ii as blockEventAutomation, To as verifyTimerWatchCredentialSubject, Tr as readConversationAutomationRun, Ur as notifyAutomationBlocked, jr as getDispatchIdForConversation, mi as blockScheduledAutomation } from "./credentialed-Cb6E2phL.js";
|
|
3
|
+
import { A as isTopLevelKind, F as turnBehavior, O as isPersonInput, a as getConversationStore, o as getDb } from "./db-LAyyX8tk.js";
|
|
4
|
+
import { E as withSpan, S as setTags, h as logWarn, p as logException } from "./logging-dQ9ZRGQ8.js";
|
|
5
|
+
import { kt as readMessageAttachments } from "./media-CYm1QD8T.js";
|
|
6
|
+
import { C as isConversationDeliveryPaused } from "./agent-runner-C9iDurwX.js";
|
|
7
|
+
import { a as buildDeliveredTurnStatePatch, o as loadPendingMessageCards, r as completeAuthPauseTurn, t as buildTurnThreadContext } from "./thread-context-BkAZDTX2.js";
|
|
8
|
+
import { $ as eventInboxItemInputs, B as TurnInputCommitLostError, H as getConversationTurnBoundaryError, J as markTurnFailed, N as completeCancelledConversationTurn, P as getTurnUserMessage, W as isTurnInputCommitLostError, X as createWebAuthorization, Y as startActiveTurn, _ as timerWatchCredentialSubject, a as getEventBatchDelayMs, at as instructionActorFor, ct as turnRequestText, d as turnInputFactsFromConversationMessage, et as loadInboxItemInput, f as legacyWebMailboxMetadataSchema, g as renderEventBatchInputs, h as isEventMailboxMetadata, it as buildSteeringPiMessage, lt as withoutSavedSteeringMessages, m as eventBatchMessageMeta, ot as instructionForInputs, u as sourceFromTurnInput } from "./ingest-BDf3D50j.js";
|
|
9
|
+
import { Dn as finalizeFailedTurnReplyWithEvent, Kn as getAssistantReplyText, L as buildDeterministicTurnId, R as commitAcceptedReply, V as loadConversationProjection, Wt as saveTurnCheckpoint, Yt as getTurnRecord, a as persistThreadStateById, ft as latestConversationMessageSeq, hn as getTurnLifecycle, ht as recordDeliveredAssistantMessage, it as persistConversationMessages, mt as normalizeConversationText, n as getPersistedSandboxState, nr as persistWithRetry, nt as hydrateConversationMessages, o as coerceThreadConversationState, pt as markConversationMessage, qt as failTurnRecord, r as getPersistedThreadState, vt as upsertConversationMessage, wt as isEventConversationMessage } from "./thread-state-DhPndWi1.js";
|
|
10
|
+
import { Cn as recordFinishedTurnForAutomatedLimit, Ht as commitParentMessageFork, Kt as readParentMessage, Tn as executeTurn, Ut as isParentMessageMeta, Vt as childAgentTurnOptions, g as measureTurnCompactionWait, mn as stopAtAutomatedTurnLimit, on as supersedeOpenMailboxTurns, wn as AgentRunError } from "./warmup-BDA5myRK.js";
|
|
11
|
+
import { p as credentialContextForActor } from "./registry-CZOzddwu.js";
|
|
11
12
|
import { i as getActiveSpan, r as continueTrace } from "./sentry-CPbZjomA.js";
|
|
12
|
-
import {
|
|
13
|
-
import { n as
|
|
14
|
-
import { $ as maybePostAutomatedTurnLimitNotice, B as renderEventBatchInputs, D as getEventBatchDelayMs, M as sourceFromTurnInput, N as turnInputFactsFromConversationMessage, P as legacyWebMailboxMetadataSchema, R as eventBatchMessageMeta, V as timerWatchCredentialSubject, c as loadReviewItemInput, ct as recordFinishedTurnForAutomatedLimit, f as buildSteeringPiMessage, g as withoutSavedSteeringMessages, m as instructionForInputs, p as instructionActorFor, s as eventReviewItemInputs, z as isEventMailboxMetadata } from "./session-stop-BfY4rhJs.js";
|
|
15
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-Dm7BHbGp.js";
|
|
13
|
+
import { n as botConfig } from "./config-kXB2Y5tl.js";
|
|
14
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CbTwFA6k.js";
|
|
16
15
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
17
16
|
import { p as instructionProvenanceFor } from "./history-CYstOMKX.js";
|
|
18
|
-
import {
|
|
19
|
-
import { t as readConversationLineage } from "./lineage-
|
|
17
|
+
import { p as resolveConversationDestination } from "./start-conversation-CEn2KH1A.js";
|
|
18
|
+
import { t as readConversationLineage } from "./lineage-B_m-4TJw.js";
|
|
20
19
|
import { isDeepStrictEqual } from "node:util";
|
|
21
20
|
import { createHash } from "node:crypto";
|
|
22
21
|
// src/chat/task-execution/turn-telemetry.ts
|
|
@@ -125,16 +124,13 @@ async function commitAssistantMessage(args) {
|
|
|
125
124
|
/**
|
|
126
125
|
* Return the Turn inputs of web Messages, one per non-empty Message, in
|
|
127
126
|
* order. Each one becomes its own prompt content part. A Message that
|
|
128
|
-
* records an answer becomes its
|
|
127
|
+
* records an answer becomes its Inbox item tag. A batch with only
|
|
129
128
|
* attachments keeps one empty input, so the prompt still has an instruction.
|
|
130
129
|
*/
|
|
131
130
|
async function webTurnInputs(messages) {
|
|
132
131
|
const flat = (await mapBounded(messages, async (message) => {
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
kind: "runtime",
|
|
136
|
-
text: reviewItem
|
|
137
|
-
}];
|
|
132
|
+
const inboxItem = await loadInboxItemInput(message.reviewItemChange);
|
|
133
|
+
if (inboxItem) return [inboxItem];
|
|
138
134
|
const text = message.text.trim();
|
|
139
135
|
return text ? [{
|
|
140
136
|
kind: "person",
|
|
@@ -148,7 +144,7 @@ async function webTurnInputs(messages) {
|
|
|
148
144
|
}
|
|
149
145
|
/**
|
|
150
146
|
* Build the transcript Message for one web mailbox Message. Each web Message
|
|
151
|
-
* keeps its own transcript Message and
|
|
147
|
+
* keeps its own transcript Message and Inbox item change record, so the
|
|
152
148
|
* dashboard shows what each Message did even when several share a Turn.
|
|
153
149
|
*/
|
|
154
150
|
function webConversationMessage(message, author) {
|
|
@@ -181,12 +177,12 @@ function savedTurnInputMessages(conversation, turnMessage, inputMessageIds) {
|
|
|
181
177
|
// src/chat/task-execution/web-steering.ts
|
|
182
178
|
async function steeringMessageFromWeb(message, actor) {
|
|
183
179
|
const storedAttachments = readMessageAttachments(message.input.attachments);
|
|
184
|
-
const
|
|
180
|
+
const inboxItemInput = await loadInboxItemInput(message.input.reviewItemChange);
|
|
185
181
|
return {
|
|
186
182
|
actor: instructionActorFor(actor),
|
|
187
|
-
...
|
|
183
|
+
...inboxItemInput ? { kind: "runtime" } : void 0,
|
|
188
184
|
provenance: instructionProvenanceFor(actor),
|
|
189
|
-
text:
|
|
185
|
+
text: inboxItemInput?.text ?? message.input.text.trim(),
|
|
190
186
|
timestampMs: message.createdAtMs,
|
|
191
187
|
...storedAttachments.length ? { storedAttachments } : void 0
|
|
192
188
|
};
|
|
@@ -284,7 +280,7 @@ function createConversationTurnWorker(agentRunner, deliverMessage, deliverToPare
|
|
|
284
280
|
delayMs
|
|
285
281
|
};
|
|
286
282
|
}
|
|
287
|
-
const lifecycle =
|
|
283
|
+
const lifecycle = getTurnLifecycle();
|
|
288
284
|
const isResume = resolved.kind === "resume";
|
|
289
285
|
let turnInputFacts;
|
|
290
286
|
let inputs = [];
|
|
@@ -309,10 +305,13 @@ function createConversationTurnWorker(agentRunner, deliverMessage, deliverToPare
|
|
|
309
305
|
const messages = resolved.batch.map((entry) => entry.message);
|
|
310
306
|
const firstMetadata = first.message.input.metadata;
|
|
311
307
|
if (isEventMailboxMetadata(firstMetadata)) {
|
|
312
|
-
|
|
308
|
+
const rendered = await eventInboxItemInputs(messages);
|
|
309
|
+
for (const { message, requestText } of resolved.batch) if (requestText) rendered.set(message.inboundMessageId, {
|
|
313
310
|
kind: "runtime",
|
|
314
|
-
text
|
|
315
|
-
|
|
311
|
+
text: message.input.text.trim(),
|
|
312
|
+
requestText
|
|
313
|
+
});
|
|
314
|
+
inputs = renderEventBatchInputs(messages, rendered);
|
|
316
315
|
eventMeta = eventBatchMessageMeta(messages);
|
|
317
316
|
} else {
|
|
318
317
|
inputs = await webTurnInputs(messages.map((message) => message.input));
|
|
@@ -351,7 +350,8 @@ function createConversationTurnWorker(agentRunner, deliverMessage, deliverToPare
|
|
|
351
350
|
userMessageId = userMessage.id;
|
|
352
351
|
inputs = savedMessageIsEvent ? [{
|
|
353
352
|
kind: "runtime",
|
|
354
|
-
text: userMessage.text
|
|
353
|
+
text: userMessage.text,
|
|
354
|
+
...userMessage.meta?.requestText ? { requestText: userMessage.meta.requestText } : void 0
|
|
355
355
|
}] : await webTurnInputs(turnInputs.map((message) => ({
|
|
356
356
|
reviewItemChange: message.meta?.reviewItemChanges?.[0],
|
|
357
357
|
text: message.text
|
|
@@ -443,24 +443,32 @@ function createConversationTurnWorker(agentRunner, deliverMessage, deliverToPare
|
|
|
443
443
|
replied: false
|
|
444
444
|
}
|
|
445
445
|
} : message);
|
|
446
|
-
if (webInputMessages.length === 0)
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
...
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
446
|
+
if (webInputMessages.length === 0) {
|
|
447
|
+
const requestText = turnRequestText({ instruction: instructionInputs });
|
|
448
|
+
upsertConversationMessage(conversation, {
|
|
449
|
+
id: userMessageId,
|
|
450
|
+
role: "user",
|
|
451
|
+
text: normalizeConversationText(text),
|
|
452
|
+
createdAtMs: startedAtMs,
|
|
453
|
+
author,
|
|
454
|
+
...authorIdentityId ? { authorIdentityId } : void 0,
|
|
455
|
+
meta: {
|
|
456
|
+
...attachments.length ? { attachments } : void 0,
|
|
457
|
+
explicitMention: true,
|
|
458
|
+
replied: false,
|
|
459
|
+
...requestText ? { requestText } : void 0,
|
|
460
|
+
...eventMeta
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
460
464
|
await persistConversationMessages({
|
|
461
465
|
conversation,
|
|
462
466
|
conversationId: context.conversationId
|
|
463
467
|
});
|
|
468
|
+
await commitParentMessageFork({
|
|
469
|
+
conversationId: context.conversationId,
|
|
470
|
+
inputs: resolved.batch.map((entry) => entry.message)
|
|
471
|
+
});
|
|
464
472
|
await lifecycle.start({
|
|
465
473
|
conversationId: context.conversationId,
|
|
466
474
|
createdAtMs: Date.now(),
|
|
@@ -523,11 +531,10 @@ function createConversationTurnWorker(agentRunner, deliverMessage, deliverToPare
|
|
|
523
531
|
if (stopSignal?.aborted) return await completeCancelledTurn();
|
|
524
532
|
const childTurn = await childAgentTurnOptions({
|
|
525
533
|
conversationId: context.conversationId,
|
|
526
|
-
history: await loadProjection({ conversationId: context.conversationId }),
|
|
527
534
|
inputs: resolved.kind === "mailbox" ? resolved.batch.map((entry) => entry.message) : [],
|
|
528
535
|
savedParentMessage
|
|
529
536
|
});
|
|
530
|
-
const
|
|
537
|
+
const history = await loadConversationProjection({ conversationId: context.conversationId });
|
|
531
538
|
failureCode = "agent_run_failed";
|
|
532
539
|
currentRunId = `conversation-run:${stableHex(turnId, String(startedAtMs))}`;
|
|
533
540
|
setTags({ runId: currentRunId });
|
|
@@ -545,11 +552,11 @@ function createConversationTurnWorker(agentRunner, deliverMessage, deliverToPare
|
|
|
545
552
|
conversation,
|
|
546
553
|
conversationId: context.conversationId,
|
|
547
554
|
excludeMessageIds: inputMessageIds,
|
|
548
|
-
hasHistory:
|
|
555
|
+
hasHistory: history.messages.length > 0,
|
|
549
556
|
turnId
|
|
550
557
|
})
|
|
551
558
|
},
|
|
552
|
-
history
|
|
559
|
+
history,
|
|
553
560
|
...childTurn.run,
|
|
554
561
|
actor,
|
|
555
562
|
credentialContext: credentialContextForActor(actor, credentialSubject),
|
|
@@ -649,7 +656,7 @@ function createConversationTurnWorker(agentRunner, deliverMessage, deliverToPare
|
|
|
649
656
|
maxTurns: botConfig.maxConsecutiveAutomatedTurns,
|
|
650
657
|
source
|
|
651
658
|
});
|
|
652
|
-
await
|
|
659
|
+
await stopAtAutomatedTurnLimit({
|
|
653
660
|
conversationId: context.conversationId,
|
|
654
661
|
maxTurns: botConfig.maxConsecutiveAutomatedTurns,
|
|
655
662
|
source,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Ao as getSlackClient, Xr as postSlackMessage, an as resolveBaseUrl, i as resolvePluginOAuthAccount, in as parseOAuthStatePayload, r as createUserTokenStore, rn as formatProviderLabel, sr as lookupSlackUserProfile } from "./credentialed-Cb6E2phL.js";
|
|
2
|
+
import { L as acquireActiveLock, i as getRuntimeMetadata, n as botConfig } from "./config-kXB2Y5tl.js";
|
|
3
3
|
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
4
|
-
import {
|
|
4
|
+
import { _ as runBestEffort, h as logWarn, p as logException, q as isNativeIdentityProvider } from "./logging-dQ9ZRGQ8.js";
|
|
5
5
|
import { p as parseSlackUserId } from "./actor-BsBdxDXQ.js";
|
|
6
|
-
import {
|
|
6
|
+
import { $t as resolveActorIdentityId, an as findUserByVerifiedEmails, s as getSqlExecutor, un as upsertLinkedIdentity, zt as readIdentityById } from "./db-LAyyX8tk.js";
|
|
7
|
+
import { i as getStateAdapter } from "./adapter-iIq7ihf7.js";
|
|
7
8
|
import { i as homeDir } from "./package-discovery-DD9vencX.js";
|
|
8
|
-
import { t as discoverSkills } from "./skills-
|
|
9
|
-
import { d as hasRequiredOAuthScope, n as buildOAuthTokenRequest, r as parseOAuthTokenResponse } from "./registry-
|
|
10
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
11
|
-
import {
|
|
12
|
-
import { O as getMcpProviderErrorAttributes, S as putMcpStoredOAuthCredentials, f as deleteMcpAuthSession, g as getMcpAuthSession, v as getMcpStoredOAuthCredentials } from "./service-account-
|
|
13
|
-
import { o as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { n as relayLocalOAuthCallback } from "./oauth-relay-DPE-wrwO.js";
|
|
9
|
+
import { t as discoverSkills } from "./skills-VTnhAJWm.js";
|
|
10
|
+
import { d as hasRequiredOAuthScope, n as buildOAuthTokenRequest, r as parseOAuthTokenResponse } from "./registry-CZOzddwu.js";
|
|
11
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-D7xapBAX.js";
|
|
12
|
+
import { i as finalizeMcpAuthorization } from "./agent-runner-C9iDurwX.js";
|
|
13
|
+
import { O as getMcpProviderErrorAttributes, S as putMcpStoredOAuthCredentials, f as deleteMcpAuthSession, g as getMcpAuthSession, v as getMcpStoredOAuthCredentials } from "./service-account-Ts4ulcrV.js";
|
|
14
|
+
import { J as recordAuthorizationCompleted, Mt as authorizationId, Yt as getTurnRecord, o as coerceThreadConversationState, q as recordAuthenticationLinked, r as getPersistedThreadState, zt as getConversationPendingAuth } from "./thread-state-DhPndWi1.js";
|
|
15
|
+
import { f as readJuniorSecret } from "./vercel-queue-hW90XzbG.js";
|
|
16
|
+
import { Z as deleteWebAuthorization } from "./ingest-BDf3D50j.js";
|
|
17
|
+
import { dn as wakeAuthorizedTurn, fn as wakePausedTurn } from "./warmup-BDA5myRK.js";
|
|
18
|
+
import { s as readConnectedOAuthTokens, t as escapeHtml, u as htmlCallbackResponse } from "./html-BCZ3Xtb_.js";
|
|
19
|
+
import { n as relayLocalOAuthCallback } from "./oauth-relay-pPMGnDZt.js";
|
|
20
20
|
import * as z from "zod";
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
|