@sentry/junior 0.294.0 → 0.295.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/{admin-vt8aSiCD.js → admin-ifgjyfpF.js} +2 -2
- package/dist/{agent-runner-DJu7w6mI.js → agent-runner-DjMTPWEO.js} +147 -90
- 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 +52 -28
- package/dist/{app--a5RLOrr.d.ts → app-uiTzRbvq.d.ts} +3 -3
- package/dist/app.d.ts +2 -2
- package/dist/app.js +33 -34
- package/dist/{automation-BM-OBsKW.js → automation-yJX3C7i3.js} +3 -3
- package/dist/{background-compaction-queue-D2j-0XkH.js → background-compaction-queue-DUkHZjmL.js} +7 -9
- package/dist/{briefs-JOAoCb6d.js → briefs-CbNYM-q2.js} +3 -3
- package/dist/{catalog-runtime-CLMA9AXd.js → catalog-runtime-DgouZKZm.js} +1 -1
- package/dist/cli/chat.d.ts +1 -1
- package/dist/cli/chat.js +15 -15
- package/dist/cli/check.js +3 -3
- package/dist/cli/init.js +2 -0
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.d.ts +1 -1
- package/dist/cli/plugins.js +4 -4
- package/dist/cli/snapshot-create.js +4 -4
- package/dist/cli/upgrade.d.ts +2 -2
- package/dist/cli/upgrade.js +3 -3
- package/dist/{config-mIZeGEWv.js → config-DvnTPCfp.js} +43 -2
- package/dist/{connections-XhdVg7OR.js → connections-CWaIVl_1.js} +6 -6
- package/dist/{conversation-CDWejM4R.js → conversation-CMkSmi02.js} +2 -11
- package/dist/{conversation-pending-messages-Dh2tfbaw.js → conversation-feed-BVAOga0H.js} +27 -2
- package/dist/{conversation-privacy-C6h-X2cZ.js → conversation-privacy-DPjv4SnA.js} +1 -1
- package/dist/{credential-sync-zigBlXS3.js → credential-sync-BhbaZfmO.js} +16 -15
- package/dist/{db-DV5AbcGM.d.ts → db-CCUqQe0E.d.ts} +6 -1
- package/dist/{db--xuNV7g6.js → db-Dts2XvLu.js} +54 -10
- package/dist/{executor-BItuRqAR.js → executor-Ck73J0wP.js} +8 -3
- package/dist/instrumentation.js +2 -2
- package/dist/{logging-Cb6MGvdt.js → logging-9OAq-fdg.js} +2 -1
- package/dist/{message-BTGgSmaH.js → message-CtaPzC7m.js} +9 -9
- package/dist/nitro.d.ts +2 -2
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-Dvh1aOIi.js → oauth-callback-server-C_LXY1d4.js} +2 -2
- package/dist/{oauth-relay-D6xxVywK.js → oauth-relay-CsfIazeF.js} +2 -1
- package/dist/{plugins-DtmjkTza.d.ts → plugins-B_0Cr0MO.d.ts} +0 -1
- package/dist/{projection-DLQgfO5N.js → projection-BzJQncZV.js} +248 -77
- package/dist/{prompt-qp_LdxLX.js → prompt-Cbq5b4SO.js} +4 -4
- package/dist/{registry-MtwokaqW.js → registry-cbpOxO4M.js} +3 -13
- package/dist/{resolve-BnJA0UNE.js → resolve-t-pmRdwS.js} +3 -3
- package/dist/{result-ChL-1KyW.js → result-DhgjR3nQ.js} +8 -8
- package/dist/{runner-BONN7Dp2.js → runner-CHv9X9TH.js} +8 -8
- package/dist/{sandbox-egress-signals-nmlmI5Ab.js → sandbox-egress-signals-Yy3fSCbg.js} +1 -1
- package/dist/{schema-yr0ccDni.js → schema-BhneuGYv.js} +13 -6
- package/dist/{schema-DgvcyJ1y.d.ts → schema-TSEisVJR.d.ts} +50 -14
- package/dist/secrets-DebYU866.js +18 -0
- package/dist/{service-account-Bd0lBaGr.js → service-account-C4rBP8ne.js} +3 -3
- package/dist/{service-account-kio5nXSD.js → service-account-DjPIwCMj.js} +42 -26
- package/dist/{session-stop-CeCXL3j9.js → session-stop-DkxI5vc3.js} +20 -775
- package/dist/{skills-e3DDNlKO.js → skills-BZE2DP8I.js} +2 -2
- package/dist/{spawn--cRxITWQ.js → spawn-BvULxIiu.js} +5 -5
- package/dist/{adapter-DxLhJEnO.js → state-CO9ETDzk.js} +132 -2
- package/dist/{stop-Iai5N2PU.js → stop-CL-rdtQb.js} +84 -30
- package/dist/{store-C8LsaJwS.js → store-DgD78_NK.js} +3 -3
- package/dist/{task-runner-Dw7exu0-.js → task-runner-CKOj6xla.js} +11 -11
- package/dist/{turn-failure-response-BqTTx3XG.js → turn-failure-response-BTSo6SMJ.js} +8 -8
- package/dist/{validation-BrGahtnv.js → validation-CXeYgBzq.js} +1 -1
- package/dist/{version-Bdqhx8Qh.js → version-AQa7Fr2H.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CjRFHR5U.js → viewer-Bqkb678l.js} +3 -3
- package/dist/warmup-h6u1e9n0.js +1869 -0
- package/dist/{work-BWBG1EGV.js → work-yN_GAuXY.js} +11 -11
- package/dist/{worker-DAnBIVMs.js → worker-Hl7N292I.js} +6 -6
- package/migrations/0098_review_item_plugin_actions.sql +5 -0
- package/migrations/0099_conversation_last_message_at.sql +1 -0
- package/migrations/0100_automation_task_kind_repair.sql +48 -0
- package/migrations/meta/0098_snapshot.json +4490 -0
- package/migrations/meta/0099_snapshot.json +4720 -0
- package/migrations/meta/0100_snapshot.json +4496 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +5 -5
- package/dist/assistant-reply-iTtEdDyc.js +0 -58
- package/dist/warmup-DuxCtzKC.js +0 -1039
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { H as PluginCredentialFailureError, K as AuthorizationFlowDisabledError, Sn as renderTag, Xt as isTurnExecutionLimitExceededError, at as failTurnRecord, et as lostWorkerBeforeFirstSave, go as loadForkHistory, nt as saveTurnCheckpoint, ot as getTurnRecord, rt as abandonTurnRecord, s as openConversationProjection, tn as getTerminalAssistantMessages, tt as pauseLostWorkerTurn, v as hydrateConversationMessages, vn as escapeClosingTags } from "./projection-
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import { g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-
|
|
1
|
+
import { H as PluginCredentialFailureError, K as AuthorizationFlowDisabledError, Sn as renderTag, Xt as isTurnExecutionLimitExceededError, at as failTurnRecord, et as lostWorkerBeforeFirstSave, go as loadForkHistory, nt as saveTurnCheckpoint, ot as getTurnRecord, rt as abandonTurnRecord, s as openConversationProjection, tn as getTerminalAssistantMessages, tt as pauseLostWorkerTurn, v as hydrateConversationMessages, vn as escapeClosingTags } from "./projection-BzJQncZV.js";
|
|
2
|
+
import { n as botConfig } from "./config-DvnTPCfp.js";
|
|
3
|
+
import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore, s as getSqlExecutor } from "./db-Dts2XvLu.js";
|
|
4
|
+
import { g as juniorAgentInvocations, h as juniorAgentBindings } from "./executor-Ck73J0wP.js";
|
|
5
5
|
import { h as contextProvenance, m as agentInstructionProvenance, v as sameActorIdentity } from "./media-BepyEUNm.js";
|
|
6
|
-
import { Dt as stopChildAgentsOf, Gt as finishTurn, Mt as supersedeOpenMailboxTurns, Ot as recordSubagentEnded, Ut as AgentRunError, Wt as executeTurn, an as AgentNameInUseError, kt as recordSubagentStarted, rn as AgentMessageQueueFullError, tn as AgentInvocationLimitError } from "./agent-runner-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { $ as withoutSavedSteeringMessages, B as maybePostAutomatedTurnLimitNotice, K as recordFinishedTurnForAutomatedLimit, X as buildSteeringPiMessage, Z as instructionForInputs,
|
|
11
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
12
|
-
import { ft as getPersistedSandboxState, gt as coerceThreadConversationState, ht as persistThreadStateById, pt as getPersistedThreadState } from "./task-runner-
|
|
6
|
+
import { Dt as stopChildAgentsOf, Gt as finishTurn, Mt as supersedeOpenMailboxTurns, Ot as recordSubagentEnded, Ut as AgentRunError, Wt as executeTurn, an as AgentNameInUseError, kt as recordSubagentStarted, rn as AgentMessageQueueFullError, tn as AgentInvocationLimitError } from "./agent-runner-DjMTPWEO.js";
|
|
7
|
+
import { D as getAssistantReplyText, P as readBlockedReport } from "./warmup-h6u1e9n0.js";
|
|
8
|
+
import { k as getTurnRequestDeadline } from "./background-compaction-queue-DUkHZjmL.js";
|
|
9
|
+
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-BTSo6SMJ.js";
|
|
10
|
+
import { $ as withoutSavedSteeringMessages, B as maybePostAutomatedTurnLimitNotice, K as recordFinishedTurnForAutomatedLimit, X as buildSteeringPiMessage, Z as instructionForInputs, h as parseWebMessages, i as resumeStoppedConversationTree, p as listActiveMailboxTurns, q as resetAutomatedTurnLimit, u as getActiveConversationTurnId } from "./session-stop-DkxI5vc3.js";
|
|
11
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-DgD78_NK.js";
|
|
12
|
+
import { ft as getPersistedSandboxState, gt as coerceThreadConversationState, ht as persistThreadStateById, pt as getPersistedThreadState } from "./task-runner-CKOj6xla.js";
|
|
13
13
|
import { isDeepStrictEqual } from "node:util";
|
|
14
14
|
import * as z from "zod";
|
|
15
15
|
import { and, eq } from "drizzle-orm";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { At as isInvalidConversationRecordError, Dt as hasConversationStop, St as countPendingConversationMessages, kt as isFinalAttempt } from "./projection-
|
|
3
|
-
import { K as isProviderRetryError, i as getChatConfig } from "./config-
|
|
4
|
-
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
5
|
-
import { Ht as selectAttemptMessages, Vt as isAttemptInterrupt } from "./agent-runner-
|
|
6
|
-
import { k as getTurnRequestDeadline, y as ConversationQueueMessageRejectedError } from "./background-compaction-queue-
|
|
7
|
-
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-
|
|
2
|
+
import { At as isInvalidConversationRecordError, Dt as hasConversationStop, St as countPendingConversationMessages, kt as isFinalAttempt } from "./projection-BzJQncZV.js";
|
|
3
|
+
import { K as isProviderRetryError, i as getChatConfig } from "./config-DvnTPCfp.js";
|
|
4
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-9OAq-fdg.js";
|
|
5
|
+
import { Ht as selectAttemptMessages, Vt as isAttemptInterrupt } from "./agent-runner-DjMTPWEO.js";
|
|
6
|
+
import { k as getTurnRequestDeadline, y as ConversationQueueMessageRejectedError } from "./background-compaction-queue-DUkHZjmL.js";
|
|
7
|
+
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-DgD78_NK.js";
|
|
8
8
|
// src/chat/task-execution/worker.ts
|
|
9
9
|
var worker_exports = /* @__PURE__ */ __exportAll({
|
|
10
10
|
CONVERSATION_WORK_DEFER_DELAY_MS: () => CONVERSATION_WORK_DEFER_DELAY_MS,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
ALTER TABLE "junior_review_items" DROP CONSTRAINT "junior_review_items_kind_check";--> statement-breakpoint
|
|
2
|
+
-- The new check only allows more rows than the old one, so every row passes.
|
|
3
|
+
-- NOT VALID skips the scan under lock and still checks every new write. A
|
|
4
|
+
-- later migration validates it.
|
|
5
|
+
ALTER TABLE "junior_review_items" ADD CONSTRAINT "junior_review_items_kind_check" CHECK (("junior_review_items"."kind" = 'notice' and "junior_review_items"."request" is null and "junior_review_items"."answer" is null) or ("junior_review_items"."kind" = 'action' and ("junior_review_items"."request" is not null or ("junior_review_items"."dedupe_key" like 'plugin:%' and "junior_review_items"."answer" is null)))) NOT VALID;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "junior_conversations" ADD COLUMN "last_message_at" timestamp with time zone;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
-- Repeat the `{ text }` task rewrite of 0096_automation_task_kind.
|
|
2
|
+
-- `junior upgrade` runs migrations before the new runtime takes traffic. In
|
|
3
|
+
-- that window the old runtime still created Automations, and it wrote the old
|
|
4
|
+
-- `{ text }` task and an `instruction` version definition after 0096 ran.
|
|
5
|
+
-- The new runtime cannot read those rows. Each statement changes only rows
|
|
6
|
+
-- with the old shape, so this migration is safe to run again.
|
|
7
|
+
-- junior:bounded-backfill: changes only active or paused Automations with an old, blank task, which cannot run, so few rows match.
|
|
8
|
+
UPDATE "junior_automations"
|
|
9
|
+
SET
|
|
10
|
+
"status" = 'blocked',
|
|
11
|
+
"status_reason" = 'This automation has no instruction. Write one or choose a skill, then resume it.'
|
|
12
|
+
WHERE "record"->'task' ? 'text'
|
|
13
|
+
AND btrim("record"->'task'->>'text', E' \t\r\n') = ''
|
|
14
|
+
AND "status" IN ('active', 'paused');--> statement-breakpoint
|
|
15
|
+
-- junior:bounded-backfill: changes only Automations with an old task, which the old runtime wrote during one rollout, so few rows match.
|
|
16
|
+
WITH "old" AS (
|
|
17
|
+
SELECT
|
|
18
|
+
"id",
|
|
19
|
+
coalesce(
|
|
20
|
+
nullif(btrim("record"->'task'->>'text', E' \t\r\n'), ''),
|
|
21
|
+
'No instruction was saved.'
|
|
22
|
+
) AS "instruction"
|
|
23
|
+
FROM "junior_automations"
|
|
24
|
+
WHERE "record"->'task' ? 'text'
|
|
25
|
+
)
|
|
26
|
+
UPDATE "junior_automations"
|
|
27
|
+
SET
|
|
28
|
+
"instruction" = "old"."instruction",
|
|
29
|
+
"record" = jsonb_set(
|
|
30
|
+
"record",
|
|
31
|
+
'{task}',
|
|
32
|
+
jsonb_build_object('kind', 'instruction', 'instruction', "old"."instruction")
|
|
33
|
+
)
|
|
34
|
+
FROM "old"
|
|
35
|
+
WHERE "junior_automations"."id" = "old"."id";--> statement-breakpoint
|
|
36
|
+
-- junior:bounded-backfill: changes only saved versions with an old definition, which the old runtime wrote during one rollout, so few rows match.
|
|
37
|
+
UPDATE "junior_automation_versions"
|
|
38
|
+
SET "definition" = ("definition" - 'instruction') || jsonb_build_object(
|
|
39
|
+
'task',
|
|
40
|
+
jsonb_build_object(
|
|
41
|
+
'kind', 'instruction',
|
|
42
|
+
'instruction', coalesce(
|
|
43
|
+
nullif(btrim("definition"->>'instruction', E' \t\r\n'), ''),
|
|
44
|
+
'No instruction was saved.'
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
WHERE "definition" ? 'instruction';
|