@sentry/junior 0.287.0 → 0.288.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-CL-HUKgd.js → adapter-Cikcqdty.js} +1 -1
- package/dist/{admin-C9urXVfi.js → admin-BcSxHuTB.js} +2 -2
- package/dist/{agent-runner-Bfnw551N.js → agent-runner-9MXyWUL8.js} +173 -89
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +8 -7
- package/dist/api.d.ts +1 -1
- package/dist/api.js +403 -40
- package/dist/{app-DBY5TnfY.d.ts → app-BUklJVBe.d.ts} +4 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +521 -70
- package/dist/{assistant-reply-u_PRYzuz.js → assistant-reply-mj47jMRV.js} +1 -1
- package/dist/{automation-DksGNDRO.js → automation-DDXwHQs5.js} +2 -2
- package/dist/{background-compaction-queue-CYI909P5.js → background-compaction-queue-CjllSPir.js} +161 -90
- package/dist/{briefs-DaXiMWzT.js → briefs-DW9iuolG.js} +4 -3
- package/dist/{catalog-runtime-BCIuBe4d.js → catalog-runtime-B3gfH58M.js} +1 -1
- package/dist/cli/chat.js +14 -14
- package/dist/cli/check.js +3 -3
- 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/{config-CkHcUMN7.js → config-CLJcyYEF.js} +401 -9
- package/dist/{connections-BnIj0wtx.js → connections-BtdJftow.js} +9 -9
- package/dist/{conversation-E7ZPJx2H.js → conversation-DhoqHtQ7.js} +23 -6
- package/dist/{conversation-pending-messages-DVch6YQw.js → conversation-pending-messages-DHV0S4uF.js} +1 -1
- package/dist/{conversation-privacy-DF1hW0ja.js → conversation-privacy-BPirIVlX.js} +1 -1
- package/dist/core-model-BTt5E5b0.js +182 -0
- package/dist/{credential-sync-CzMar9hq.js → credential-sync-Co8Q2xRW.js} +28 -20
- package/dist/{db-DJ11eZqq.js → db-Co7DTYYh.js} +30 -20
- package/dist/{db-YDKKDxlh.d.ts → db-zIs8-Ba3.d.ts} +6 -2
- package/dist/{executor-BY9TB31g.js → executor-m0kIN71Q.js} +93 -12
- package/dist/{media-Cz1ZiV1U.js → history-IjdmO_r6.js} +6 -86
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-BO5zU6Mt.js → logging-DbD-dErY.js} +3 -2
- package/dist/media-BAHvgkok.js +85 -0
- package/dist/{message-CsUbuEc8.js → message-DKTdTYm-.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +19 -41
- package/dist/{oauth-callback-server-hiDKK0_n.js → oauth-callback-server-CpbepSbp.js} +2 -2
- package/dist/{projection-CL_YWeGf.js → projection-BViECfYu.js} +309 -616
- package/dist/{prompt-BHOEQSmf.js → prompt-KT6MaDHN.js} +2 -182
- package/dist/{registry-BriFLnaJ.js → registry-D-Acyjhh.js} +1 -1
- package/dist/{resolve-Bt6GgAiA.js → resolve-gkT2R66z.js} +3 -3
- package/dist/{result-Bo1TZu0Q.js → result-DHmCFEt8.js} +8 -8
- package/dist/{runner-D3YeCQgt.js → runner-DBKjGjH-.js} +8 -8
- package/dist/{sandbox-egress-signals-CcnSPP4S.js → sandbox-egress-signals-9n8hqx29.js} +1 -1
- package/dist/{schedule-BTp__wrw.js → schedule-cP0AACm1.js} +11 -2
- package/dist/{schema-C6fsEwjo.d.ts → schema-B_6aOcx5.d.ts} +114 -3
- package/dist/{schema-BWE3RJEB.js → schema-DxicIQbc.js} +66 -13
- package/dist/{service-account-r6fl0b-9.js → service-account-Bi0HsY6w.js} +3 -3
- package/dist/{service-account-DiQQuuw7.js → service-account-CDlC9ssy.js} +3 -3
- package/dist/{session-stop-B2Nut40V.js → session-stop-BWOsuo8p.js} +56 -14
- package/dist/{skills-CD5aJdzg.js → skills-DO5K68Rq.js} +2 -2
- package/dist/{spawn-CalgZQiu.js → spawn-BBqZDcPa.js} +5 -5
- package/dist/{stop-kujZLbi0.js → stop-WC97cmHz.js} +802 -338
- package/dist/{store-DdIEUL1q.js → store-ByR1Lr7e.js} +4 -16
- package/dist/{task-runner-D_RDr2Hu.js → task-runner-B-Ewf8TX.js} +30 -22
- package/dist/{turn-failure-response-B5nV1Er-.js → turn-failure-response-CpdPoZSl.js} +18 -9
- package/dist/{validation-K4pqwoVZ.js → validation-B4sbIoES.js} +1 -1
- package/dist/{version-DBvhk1X9.js → version-D6lpuAgL.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-DrMmFUul.js → viewer-CeP27tC3.js} +4 -4
- package/dist/warmup-P_GJCL1c.js +767 -0
- package/dist/{work-ljRoODGu.js → work-DI7x1Slm.js} +14 -13
- package/dist/{worker-CYO1Q0Js.js → worker-CYPTOT4j.js} +6 -6
- package/migrations/0089_conversation_paused_status.sql +3 -0
- package/migrations/0090_guardian_review_time_index.sql +20 -0
- package/migrations/meta/0089_snapshot.json +4372 -0
- package/migrations/meta/0090_snapshot.json +4388 -0
- package/migrations/meta/_journal.json +14 -0
- package/package.json +5 -4
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore, s as getSqlExecutor } from "./db-
|
|
4
|
-
import { g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-
|
|
5
|
-
import {
|
|
6
|
-
import { At as recordSubagentStarted, Ft as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
12
|
-
import { _t as getPersistedThreadState, bt as coerceThreadConversationState, gt as getPersistedSandboxState, yt as persistThreadStateById } from "./task-runner-
|
|
1
|
+
import { Cn as renderTag, U as PluginCredentialFailureError, Zt as isTurnExecutionLimitExceededError, fo as loadForkHistory, it as abandonTurnRecord, nn as getTerminalAssistantMessages, nt as pauseLostWorkerTurn, ot as failTurnRecord, q as AuthorizationFlowDisabledError, rt as saveTurnCheckpoint, s as openConversationProjection, st as getTurnRecord, tt as lostWorkerBeforeFirstSave, v as hydrateConversationMessages, yn as escapeClosingTags } from "./projection-BViECfYu.js";
|
|
2
|
+
import { n as botConfig } from "./config-CLJcyYEF.js";
|
|
3
|
+
import { T as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore, s as getSqlExecutor } from "./db-Co7DTYYh.js";
|
|
4
|
+
import { g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-m0kIN71Q.js";
|
|
5
|
+
import { d as contextProvenance, m as sameActorIdentity, u as agentInstructionProvenance } from "./history-IjdmO_r6.js";
|
|
6
|
+
import { At as recordSubagentStarted, Ft as executeTurn, Gt as AgentMessageQueueFullError, It as finishTurn, Nt as supersedeOpenMailboxTurns, Ot as stopChildAgentsOf, Pt as AgentRunError, Ut as AgentInvocationLimitError, kt as recordSubagentEnded, qt as AgentNameInUseError } from "./agent-runner-9MXyWUL8.js";
|
|
7
|
+
import { k as getTurnRequestDeadline } from "./background-compaction-queue-CjllSPir.js";
|
|
8
|
+
import { $ as getUnnamedAgentConversationId, A as markAgentInvocationPaused, C as isTerminalAgentInvocation, H as agentTypeStartsWithParentHistory, J as getAgentInvocationMessageId, L as agentBindingSchema, M as markAgentInvocationSteered, N as reportReplacedAgentInvocation, O as markAgentInvocationMailboxAppended, Q as getNamedAgentConversationId, T as listOpenAgentInvocations, V as agentTypeInstructions, W as getAgentInvocationId, X as getAgentInvocationTurnId, Z as getChildAgentLockName, _ as completeAgentInvocation, at as getConversationTurnBoundaryError, f as ConversationTurnLifecycleService, g as NON_TERMINAL_AGENT_INVOCATION_STATUSES, h as ACTIVE_AGENT_INVOCATION_STATUSES, j as markAgentInvocationRunning, rt as TurnInputCommitLostError, st as isTurnInputCommitLostError, v as getActiveAgentInvocationForConversation, w as listAgentInvocationsForConversation, x as getLatestAgentInvocationForConversation, y as getAgentInvocation, z as createAgentInvocationSchema } from "./turn-failure-response-CpdPoZSl.js";
|
|
9
|
+
import { n as getAssistantReplyText } from "./assistant-reply-mj47jMRV.js";
|
|
10
|
+
import { $ as withoutSavedSteeringMessages, B as maybePostAutomatedTurnLimitNotice, K as recordFinishedTurnForAutomatedLimit, X as buildSteeringPiMessage, Z as instructionForInputs, ct as readBlockedReport, h as parseWebMessages, i as resumeStoppedConversationTree, p as listActiveMailboxTurns, q as resetAutomatedTurnLimit, u as getActiveConversationTurnId } from "./session-stop-BWOsuo8p.js";
|
|
11
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-ByR1Lr7e.js";
|
|
12
|
+
import { _t as getPersistedThreadState, bt as coerceThreadConversationState, gt as getPersistedSandboxState, yt as persistThreadStateById } from "./task-runner-B-Ewf8TX.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
import * as z from "zod";
|
|
15
15
|
import { and, eq } from "drizzle-orm";
|
|
@@ -124,7 +124,8 @@ async function createAgentInvocation(rawInput, nowMs = Date.now()) {
|
|
|
124
124
|
kind: input.kind,
|
|
125
125
|
parentConversationId: input.parentConversationId,
|
|
126
126
|
nowMs,
|
|
127
|
-
source: "internal"
|
|
127
|
+
source: "internal",
|
|
128
|
+
...input.title ? { title: input.title } : void 0
|
|
128
129
|
});
|
|
129
130
|
if (input.agentName) await getSqlExecutor().db().insert(juniorAgentBindings).values({
|
|
130
131
|
childConversationId,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { At as isFinalAttempt, Ct as countPendingConversationMessages, Ot as hasConversationStop, jt as isInvalidConversationRecordError } from "./projection-BViECfYu.js";
|
|
3
|
+
import { G as isProviderRetryError, i as getChatConfig } from "./config-CLJcyYEF.js";
|
|
4
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-DbD-dErY.js";
|
|
5
|
+
import { k as getTurnRequestDeadline, y as ConversationQueueMessageRejectedError } from "./background-compaction-queue-CjllSPir.js";
|
|
6
|
+
import { C as startConversationWork, b as releaseConversationWork, c as clearConsumedConversationWake, d as completeConversationWork, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, t as ackMessages, u as completeConversationStop, v as recordAttemptFailure, x as requestAnotherSlice, y as recordConversationRetry } from "./store-ByR1Lr7e.js";
|
|
7
7
|
// src/chat/task-execution/attempt-selection.ts
|
|
8
8
|
function selectContiguousTurnBatch(messages) {
|
|
9
9
|
const first = messages[0];
|
|
@@ -218,7 +218,7 @@ async function processConversationWorkInContext(message, options) {
|
|
|
218
218
|
}
|
|
219
219
|
const pendingCount = initial ? countPendingConversationMessages(initial) : 0;
|
|
220
220
|
setSpanAttributes({ "app.worker.pending_count": pendingCount });
|
|
221
|
-
if (!initial
|
|
221
|
+
if (!initial?.needsRun) {
|
|
222
222
|
if (initial) await clearConsumedConversationWake({
|
|
223
223
|
conversationId,
|
|
224
224
|
conversationStore: options.conversationStore,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
-- Before this migration runs, junior upgrade builds the marked index with
|
|
2
|
+
-- CREATE INDEX CONCURRENTLY, so the build below does not block writes.
|
|
3
|
+
DO $$
|
|
4
|
+
BEGIN
|
|
5
|
+
-- Even CREATE INDEX IF NOT EXISTS takes a write-blocking table lock.
|
|
6
|
+
IF to_regclass('junior_conversation_events_guardian_review_time_idx') IS NULL THEN
|
|
7
|
+
-- junior:concurrent-index
|
|
8
|
+
CREATE INDEX "junior_conversation_events_guardian_review_time_idx" ON "junior_conversation_events" USING btree ("created_at") WHERE "junior_conversation_events"."type" = 'guardian_action_reviewed';
|
|
9
|
+
END IF;
|
|
10
|
+
|
|
11
|
+
-- A failed concurrent build can leave an index that exists but cannot be used.
|
|
12
|
+
IF NOT EXISTS (
|
|
13
|
+
SELECT 1 FROM pg_index
|
|
14
|
+
WHERE indexrelid = 'junior_conversation_events_guardian_review_time_idx'::regclass
|
|
15
|
+
AND indrelid = 'junior_conversation_events'::regclass
|
|
16
|
+
AND indisvalid AND indisready
|
|
17
|
+
) THEN
|
|
18
|
+
RAISE EXCEPTION 'The Guardian review time index is not valid and ready. Repair the concurrent build before running junior upgrade.';
|
|
19
|
+
END IF;
|
|
20
|
+
END $$;
|