@sentry/junior 0.283.0 → 0.284.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-D8-lqOBF.js → adapter-CW5UW7vL.js} +1 -1
- package/dist/{admin-Dnw5SCXp.js → admin-DUWN8zZX.js} +1 -1
- package/dist/{agent-runner-Bj7GhysW.js → agent-runner-Cqr21pOU.js} +24 -22
- package/dist/api/schema.d.ts +2 -2
- package/dist/api/schema.js +4 -3
- package/dist/api.d.ts +1 -1
- package/dist/api.js +96 -23
- package/dist/{app-CMBP-N43.d.ts → app-CvGalMxi.d.ts} +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/app.js +32 -29
- package/dist/{assistant-reply-CdYsLbXL.js → assistant-reply-CFE-OZMS.js} +1 -1
- package/dist/{automation-MLWOrghe.js → automation-Zvx_I9Z5.js} +1 -1
- package/dist/{background-compaction-queue-Bbsqx8Vm.js → background-compaction-queue-CHFzrQbS.js} +2 -2
- package/dist/{briefs-C4qBY-jb.js → briefs-Cx7mkfSk.js} +2 -2
- package/dist/{catalog-runtime-B7NRB7eH.js → catalog-runtime-dKOVbR7l.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 +30 -4
- package/dist/{client-a3Ib6wxr.js → client-CMyH5rDz.js} +2 -2
- package/dist/{config-DFVlYCeY.js → config-Dt3CpG17.js} +1 -1
- package/dist/{connections-BtnvpBEV.js → connections-CCHPybZP.js} +10 -10
- package/dist/{conversation-privacy-DLq-abjU.js → conversation-privacy-BpHHhEVp.js} +1 -1
- package/dist/{credential-sync-B4XFVcjM.js → credential-sync-BBPw8dam.js} +13 -13
- package/dist/{db-A_WrTY-s.d.ts → db-D7CCwAo8.d.ts} +1 -1
- package/dist/{executor-HPgHGAWK.js → executor-CyIwHz9r.js} +20 -3
- package/dist/instrumentation.js +37 -13
- package/dist/{logging-2BXvW7Mp.js → logging-Qo-7xGp1.js} +1 -1
- package/dist/{message-BG1v1lXX.js → message-DFbtOWqv.js} +9 -9
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +3 -3
- package/dist/{oauth-callback-server-CXNZJymo.js → oauth-callback-server-BB1gixWo.js} +2 -2
- package/dist/{projection-BfKkpOGQ.js → projection-0UcUeuzn.js} +305 -13
- package/dist/push-endpoint-CO-nomUd.js +36 -0
- package/dist/{registry-CLooHPAz.js → registry-DOnPkI8g.js} +1 -1
- package/dist/{resolve-D3MK9oRJ.js → resolve-Di3omymY.js} +3 -3
- package/dist/{result-BPCjUefO.js → result-NvndYzCb.js} +8 -8
- package/dist/{runner-Ds31u3rB.js → runner-CnX_dTKw.js} +10 -10
- package/dist/{sandbox-egress-signals-CLd5RPUw.js → sandbox-egress-signals-CtxLJmmg.js} +1 -1
- package/dist/{cadence-R7Em4RjE.js → schedule-BTp__wrw.js} +81 -1
- package/dist/{schema-jW3ccLjp.d.ts → schema-B017enNE.d.ts} +40 -1
- package/dist/{schema-CHNP0GfH.js → schema-Bn3miEd_.js} +33 -2
- package/dist/{service-account-D6AMahy7.js → service-account-KhZIqXRi.js} +3 -3
- package/dist/{service-account-CWpTsoIM.js → service-account-ewDAx4Mx.js} +3 -3
- package/dist/{session-stop-D8LGC3H6.js → session-stop-D_1SysjC.js} +10 -10
- package/dist/{skills-DuOKByQH.js → skills-CKyotM4g.js} +2 -2
- package/dist/{spawn-CNIQGgAS.js → spawn-D5D2MQdz.js} +2 -2
- package/dist/{stop-DX2oOIgl.js → stop-BSKRTaRS.js} +45 -37
- package/dist/{store-61mD4ZSh.js → store-G3S0kWSD.js} +4 -4
- package/dist/{store-DAJntSEv.js → store-ymkEUWe4.js} +3 -3
- package/dist/{task-queue-BE70Pb9p.js → task-queue-BcOHzXxe.js} +3 -3
- package/dist/{task-runner-CmmfddSZ.js → task-runner-B65cDumh.js} +17 -8
- package/dist/{thread-state-0UfRMWYd.js → thread-state-D6rNGQu9.js} +4 -4
- package/dist/{turn-failure-response-DKdzxJHE.js → turn-failure-response-BlO4nuDJ.js} +6 -6
- package/dist/{turn-lifecycle-24sBZ4Ip.js → turn-lifecycle-BQ8ETk63.js} +1 -1
- package/dist/{turn-session-routing-CzCnNAUO.js → turn-session-routing-D_GXfcAG.js} +9 -9
- package/dist/{validation-Cs_knhR8.js → validation-DJG_wrg2.js} +1 -1
- package/dist/{version-ZMC4cXWN.js → version-i1An1eTS.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CYB9T4rm.js → viewer-BlpnzZZa.js} +3 -3
- package/dist/{work-J1n6RQkY.js → work-BgCW3FDC.js} +10 -10
- package/dist/{worker-s1fCvj1z.js → worker-BJz1mwYt.js} +6 -6
- package/migrations/0082_push_notifications.sql +14 -0
- package/migrations/meta/0082_snapshot.json +4373 -0
- package/migrations/meta/_journal.json +7 -0
- package/package.json +7 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { K as clearPendingAuth, M as markConversationMessage,
|
|
2
|
-
import { b as getProviderErrorUserMessage, g as ProviderError, v as findProviderError, y as getProviderErrorAttributes } from "./client-
|
|
3
|
-
import { W as isRecord, t as buildTurnFailureResponse } from "./logging-
|
|
1
|
+
import { K as clearPendingAuth, M as markConversationMessage, un as buildDeterministicTurnId, v as hydrateConversationMessages, vo as listConversationAnnotations } from "./projection-0UcUeuzn.js";
|
|
2
|
+
import { b as getProviderErrorUserMessage, g as ProviderError, v as findProviderError, y as getProviderErrorAttributes } from "./client-CMyH5rDz.js";
|
|
3
|
+
import { W as isRecord, t as buildTurnFailureResponse } from "./logging-Qo-7xGp1.js";
|
|
4
4
|
import { h as parseSlackMessageTs } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { S as getDb, y as getConversationEventStore } from "./viewer-
|
|
5
|
+
import { S as getDb, y as getConversationEventStore } from "./viewer-BlpnzZZa.js";
|
|
6
6
|
import { M as readMessageCardRefs, N as removedCardSchema, P as resolveMessageCards } from "./conversation-DdT7SNar.js";
|
|
7
|
-
import { O as parseAgentInvocationResultMessageId, Q as markTurnCompleted, Z as markTurnClosed, c as getAgentInvocation, m as getAgentInvocationTurnId } from "./store-
|
|
8
|
-
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-
|
|
7
|
+
import { O as parseAgentInvocationResultMessageId, Q as markTurnCompleted, Z as markTurnClosed, c as getAgentInvocation, m as getAgentInvocationTurnId } from "./store-G3S0kWSD.js";
|
|
8
|
+
import { a as persistThreadStateById, o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-D6rNGQu9.js";
|
|
9
9
|
// src/chat/conversations/pending-cards.ts
|
|
10
10
|
/**
|
|
11
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-BlpnzZZa.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 {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { _ as runBestEffort, h as logWarn } from "./logging-
|
|
4
|
-
import { Q as agentTurnTotalTokens, S as getDb, Z as agentTurnCostUsd } from "./viewer-
|
|
5
|
-
import {
|
|
6
|
-
import { h as credentialSubjectSchema } from "./registry-
|
|
7
|
-
import { r as getStateAdapter } from "./adapter-
|
|
8
|
-
import { O as eventAutomationSchema, S as automationVersionSchema, j as scheduledAutomationSchema } from "./automation-
|
|
1
|
+
import { $r as ToolInputError, Di as formatSlackLink, Ei as escapeSlackMrkdwnText, Fi as openSlackDirectMessage, Kr as JUNIOR_THREAD_STATE_TTL_MS, Ri as postSlackMessage, Zr as getDashboardTaskLink, w as fallbackShortTitle } from "./projection-0UcUeuzn.js";
|
|
2
|
+
import { n as botConfig } from "./config-Dt3CpG17.js";
|
|
3
|
+
import { _ as runBestEffort, h as logWarn } from "./logging-Qo-7xGp1.js";
|
|
4
|
+
import { Q as agentTurnTotalTokens, S as getDb, Z as agentTurnCostUsd } from "./viewer-BlpnzZZa.js";
|
|
5
|
+
import { d as juniorAutomationVersions, f as juniorAutomations, j as juniorConversations, u as juniorAutomationRuns } from "./executor-CyIwHz9r.js";
|
|
6
|
+
import { h as credentialSubjectSchema } from "./registry-DOnPkI8g.js";
|
|
7
|
+
import { r as getStateAdapter } from "./adapter-CW5UW7vL.js";
|
|
8
|
+
import { O as eventAutomationSchema, S as automationVersionSchema, j as scheduledAutomationSchema } from "./automation-Zvx_I9Z5.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
import * as z from "zod";
|
|
11
11
|
import { and, asc, count, desc, eq, gte, inArray, isNotNull, isNull, lte, max, ne, or, sql } from "drizzle-orm";
|
|
@@ -1583,7 +1583,7 @@ function slackSourceForDestination(args) {
|
|
|
1583
1583
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
1584
1584
|
*/
|
|
1585
1585
|
async function resolveConversationRouting(args) {
|
|
1586
|
-
const conversationStore = args.conversationStore ?? (await import("./viewer-
|
|
1586
|
+
const conversationStore = args.conversationStore ?? (await import("./viewer-BlpnzZZa.js").then((n) => n.v)).getConversationStore();
|
|
1587
1587
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
1588
1588
|
let destination;
|
|
1589
1589
|
let source;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-dKOVbR7l.js";
|
|
3
3
|
import { isDeepStrictEqual } from "node:util";
|
|
4
4
|
// src/chat/plugins/validation.ts
|
|
5
5
|
var validation_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "0.
|
|
2
|
+
var version = "0.284.0";
|
|
3
3
|
// src/version.ts
|
|
4
4
|
/** Installed Junior package version, or `unknown` when package metadata is unavailable. */
|
|
5
5
|
const JUNIOR_VERSION = typeof version === "string" && version.trim() ? version : "unknown";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as JUNIOR_VERSION } from "./version-
|
|
1
|
+
export { t as JUNIOR_VERSION } from "./version-i1An1eTS.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
3
|
-
import { U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, h as logWarn } from "./logging-
|
|
2
|
+
import { i as getChatConfig } from "./config-Dt3CpG17.js";
|
|
3
|
+
import { U as normalizeIdentityEmail, V as GOOGLE_IDENTITY_PROVIDER, h as logWarn } from "./logging-Qo-7xGp1.js";
|
|
4
4
|
import { a as isSlackUserId, d as parseSlackChannelReferenceId, f as parseSlackTeamId, s as parseActorUserId } from "./actor-6jsm_v96.js";
|
|
5
|
-
import { A as
|
|
5
|
+
import { A as conversationReadColumns, E as juniorConversationAnnotations, M as juniorIdentities, N as juniorUsers, P as juniorDestinations, S as juniorConversationMetrics, j as juniorConversations, t as createJuniorSqlExecutor, v as juniorConversationParticipants, w as juniorConversationEvents, x as CONVERSATION_METRICS, y as juniorConversationBindings } from "./executor-CyIwHz9r.js";
|
|
6
6
|
import { d as historyReplacementSchema, f as newConversationEventSchema, p as encodeHistoryPayload, r as detectImageMediaType, s as conversationEventDataSchema, u as decodeStoredConversationEvent, y as usageSchema } from "./media-Bu9C6lz0.js";
|
|
7
7
|
import { a as withLock } from "./locks-D-0h111u.js";
|
|
8
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as botConfig } from "./config-
|
|
3
|
-
import { F as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-
|
|
1
|
+
import { H as AuthorizationFlowDisabledError, Kt as getTerminalAssistantMessages, Q as abandonTurnRecord, R as PluginCredentialFailureError, Vt as isTurnExecutionLimitExceededError, Z as saveTurnCheckpoint, co as loadForkHistory, et as failTurnRecord, s as openConversationProjection, tt as getTurnRecord } from "./projection-0UcUeuzn.js";
|
|
2
|
+
import { n as botConfig } from "./config-Dt3CpG17.js";
|
|
3
|
+
import { F as SYSTEM_IDENTITY_ID, x as getConversationStore, y as getConversationEventStore } from "./viewer-BlpnzZZa.js";
|
|
4
4
|
import { m as agentInstructionProvenance, v as sameActorIdentity } from "./media-Bu9C6lz0.js";
|
|
5
|
-
import { At as withoutSavedSteeringMessages, It as readBlockedReport, St as recordSubagentStarted, kt as buildSteeringPiMessage, xt as recordSubagentEnded, yt as stopChildAgentsOf } from "./agent-runner-
|
|
6
|
-
import { B as agentTypeInstructions, C as markAgentInvocationMailboxAppended, D as markAgentInvocationSteered, E as markAgentInvocationRunning, G as TurnInputCommitLostError, T as markAgentInvocationPaused, V as agentTypeStartsWithParentHistory, Y as isTurnInputCommitLostError, _ as getLatestAgentInvocationForConversation, b as listAgentInvocationsForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, i as createAgentInvocation, k as reportReplacedAgentInvocation, m as getAgentInvocationTurnId, n as NON_TERMINAL_AGENT_INVOCATION_STATUSES, q as getConversationTurnBoundaryError, r as completeAgentInvocation, s as getActiveAgentInvocationForConversation, t as ACTIVE_AGENT_INVOCATION_STATUSES, y as isTerminalAgentInvocation } from "./store-
|
|
7
|
-
import { n as getAssistantReplyText } from "./assistant-reply-
|
|
8
|
-
import { E as maybePostAutomatedTurnLimitNotice, M as recordFinishedTurnForAutomatedLimit, N as resetAutomatedTurnLimit } from "./session-stop-
|
|
9
|
-
import { r as appendAndEnqueueInboundMessage } from "./store-
|
|
10
|
-
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-
|
|
11
|
-
import { a as persistThreadStateById, n as getPersistedSandboxState, r as getPersistedThreadState } from "./thread-state-
|
|
5
|
+
import { At as withoutSavedSteeringMessages, It as readBlockedReport, St as recordSubagentStarted, kt as buildSteeringPiMessage, xt as recordSubagentEnded, yt as stopChildAgentsOf } from "./agent-runner-Cqr21pOU.js";
|
|
6
|
+
import { B as agentTypeInstructions, C as markAgentInvocationMailboxAppended, D as markAgentInvocationSteered, E as markAgentInvocationRunning, G as TurnInputCommitLostError, T as markAgentInvocationPaused, V as agentTypeStartsWithParentHistory, Y as isTurnInputCommitLostError, _ as getLatestAgentInvocationForConversation, b as listAgentInvocationsForConversation, c as getAgentInvocation, f as getAgentInvocationMessageId, i as createAgentInvocation, k as reportReplacedAgentInvocation, m as getAgentInvocationTurnId, n as NON_TERMINAL_AGENT_INVOCATION_STATUSES, q as getConversationTurnBoundaryError, r as completeAgentInvocation, s as getActiveAgentInvocationForConversation, t as ACTIVE_AGENT_INVOCATION_STATUSES, y as isTerminalAgentInvocation } from "./store-G3S0kWSD.js";
|
|
7
|
+
import { n as getAssistantReplyText } from "./assistant-reply-CFE-OZMS.js";
|
|
8
|
+
import { E as maybePostAutomatedTurnLimitNotice, M as recordFinishedTurnForAutomatedLimit, N as resetAutomatedTurnLimit } from "./session-stop-D_1SysjC.js";
|
|
9
|
+
import { r as appendAndEnqueueInboundMessage } from "./store-ymkEUWe4.js";
|
|
10
|
+
import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-BQ8ETk63.js";
|
|
11
|
+
import { a as persistThreadStateById, n as getPersistedSandboxState, r as getPersistedThreadState } from "./thread-state-D6rNGQu9.js";
|
|
12
12
|
import { isDeepStrictEqual } from "node:util";
|
|
13
13
|
import * as z from "zod";
|
|
14
14
|
// src/chat/runtime/turn-execution.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { v as __exportAll } from "./sentry-BRTJqumy.js";
|
|
2
|
-
import { Ct as isInvalidConversationRecordError, St as isFinalAttempt, bt as hasConversationStop } from "./projection-
|
|
3
|
-
import { x as isProviderRetryError } from "./client-
|
|
4
|
-
import { i as getChatConfig } from "./config-
|
|
5
|
-
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
6
|
-
import { g as getTurnRequestDeadline, v as ConversationQueueMessageRejectedError } from "./background-compaction-queue-
|
|
7
|
-
import { C as requestAnotherSlice, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-
|
|
2
|
+
import { Ct as isInvalidConversationRecordError, St as isFinalAttempt, bt as hasConversationStop } from "./projection-0UcUeuzn.js";
|
|
3
|
+
import { x as isProviderRetryError } from "./client-CMyH5rDz.js";
|
|
4
|
+
import { i as getChatConfig } from "./config-Dt3CpG17.js";
|
|
5
|
+
import { T as withLogContext, b as setSpanAttributes, h as logWarn, m as logInfo, p as logException } from "./logging-Qo-7xGp1.js";
|
|
6
|
+
import { g as getTurnRequestDeadline, v as ConversationQueueMessageRejectedError } from "./background-compaction-queue-CHFzrQbS.js";
|
|
7
|
+
import { C as requestAnotherSlice, T as startConversationWork, b as recordConversationRetry, d as countPendingConversationMessages, f as deadLetterAttempt, g as getConversationWorkState, i as beginConversationResume, l as completeConversationStop, m as ensureConversationWake, o as checkInConversationWork, p as drainConversationMailbox, s as clearConsumedConversationWake, t as ackMessages, u as completeConversationWork, x as releaseConversationWork, y as recordAttemptFailure } from "./store-ymkEUWe4.js";
|
|
8
8
|
// src/chat/task-execution/attempt-selection.ts
|
|
9
9
|
function selectContiguousTurnBatch(messages) {
|
|
10
10
|
const first = messages[0];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
CREATE TABLE "junior_push_subscriptions" (
|
|
2
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
3
|
+
"user_id" text NOT NULL,
|
|
4
|
+
"endpoint" text NOT NULL,
|
|
5
|
+
"p256dh" text NOT NULL,
|
|
6
|
+
"auth" text NOT NULL,
|
|
7
|
+
"created_at" timestamp with time zone NOT NULL,
|
|
8
|
+
"updated_at" timestamp with time zone NOT NULL
|
|
9
|
+
);
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
ALTER TABLE "junior_users" ADD COLUMN "notification_schedule" jsonb;--> statement-breakpoint
|
|
12
|
+
ALTER TABLE "junior_push_subscriptions" ADD CONSTRAINT "junior_push_subscriptions_user_id_junior_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."junior_users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
13
|
+
CREATE UNIQUE INDEX "junior_push_subscriptions_endpoint_uidx" ON "junior_push_subscriptions" USING btree ("endpoint");--> statement-breakpoint
|
|
14
|
+
CREATE INDEX "junior_push_subscriptions_user_idx" ON "junior_push_subscriptions" USING btree ("user_id");
|