@sentry/junior 0.308.0 → 0.309.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/{actor-D2iXzvlN.js → actor-BsBdxDXQ.js} +0 -1
- package/dist/{adapter-context-BO432242.js → adapter-context-1YUbMpD3.js} +2 -2
- package/dist/{admin-vSmheo3Z.js → admin-u30A8TcD.js} +2 -2
- package/dist/{agent-runner-BnOofGFG.js → agent-runner-sJLhgPQV.js} +93 -90
- package/dist/api/schema.d.ts +1 -1
- package/dist/api/schema.js +4 -4
- package/dist/api.d.ts +4 -2
- package/dist/api.js +416 -272
- package/dist/{app-CqYqy541.d.ts → app-B_7Wn0en.d.ts} +4 -6
- package/dist/app.d.ts +1 -1
- package/dist/app.js +73 -193
- package/dist/{background-compaction-queue-BpmDEQf6.js → background-compaction-queue-CUJXVKG3.js} +4 -4
- package/dist/{briefs-Dbh94cRp.js → briefs-BHi70IR5.js} +3 -3
- package/dist/{catalog-runtime-q9AJjuUN.js → catalog-runtime-Chc_IP2o.js} +1 -1
- package/dist/cli/chat.js +16 -16
- package/dist/cli/check.js +10 -10
- package/dist/cli/main.js +3 -3
- package/dist/cli/plugins.js +4 -4
- 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-Cx8H0MRw.js → config-BIyIdTtA.js} +51 -92
- package/dist/{continue-in-slack-CtTv1tkn.js → continue-in-slack-BQJBfiQh.js} +6 -6
- package/dist/{conversation--f85g4zL.js → conversation-CzrLhdHG.js} +6 -1
- package/dist/{conversation-feed-BNs9KiqC.js → conversation-feed-B9e3_gxz.js} +1 -1
- package/dist/{conversation-privacy-CivmFlWP.js → conversation-privacy-CkTW29hd.js} +1 -1
- package/dist/{conversation-turn-C9-Nfnsy.js → conversation-turn-CZaYQUum.js} +19 -20
- package/dist/{credential-sync-CWIORwD9.js → credential-sync-58m_CyIJ.js} +31 -23
- package/dist/{db-C41UgdBj.d.ts → db-B4Hjxr-u.d.ts} +2 -2
- package/dist/{db-CO6Y10eM.js → db-CFUpEZi9.js} +11 -9
- package/dist/{executor-Doo-N6Yn.js → executor-DXL0O0MV.js} +4 -3
- package/dist/fan-out-Cod-yEHG.js +10 -0
- package/dist/{connections-DUylBPiR.js → html-CaBu2VbT.js} +146 -11
- package/dist/{install-Y2s9ZPvk.js → install-DhTBUUov.js} +2 -2
- package/dist/instrumentation.js +2 -2
- package/dist/{lineage-BcqyhMyp.js → lineage-CxtOI2_p.js} +2 -2
- package/dist/{logging-DnBYBM8z.js → logging-BNUovdcX.js} +1 -1
- package/dist/{message-fSnXIqvl.js → message-DcUsS2vg.js} +8 -8
- package/dist/{model-input-DRChpXJ7.js → model-input-o3rEqgwM.js} +15 -10
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +4 -4
- package/dist/{oauth-callback-server-BUU6zd_T.js → oauth-callback-server-1Fizd1EM.js} +2 -2
- package/dist/{oauth-relay-gO_Ynmpb.js → oauth-relay-DOwngqdM.js} +1 -1
- package/dist/{package-discovery-x4AvVhMj.js → package-discovery-DD9vencX.js} +0 -1
- package/dist/{projection-Bqn6zdVT.js → projection-Ce4pmhKP.js} +98 -122
- package/dist/{prompt-DAjjk5fm.js → prompt-DEqjDVMs.js} +25 -14
- package/dist/{registry-tHJLCtKS.js → registry-CNE4ZBnG.js} +3 -3
- package/dist/{resolve-z2sKt8xM.js → resolve-qbPg-aC-.js} +3 -3
- package/dist/{result-D2wshngt.js → result-ZGnDzcsb.js} +12 -13
- package/dist/{runner-BvNPWLAy.js → runner-eGIxpAMf.js} +10 -10
- package/dist/{sandbox-egress-signals-CmHD-6vr.js → sandbox-egress-signals-DMFB1kCp.js} +1 -1
- package/dist/{schedule-BG1tEbRF.js → schedule-Cire6NU7.js} +1 -1
- package/dist/{schema-D4jdesIu.js → schema-CfIey9Ao.js} +65 -28
- package/dist/{schema-CRXcj4fj.d.ts → schema-DriSvB40.d.ts} +43 -43
- package/dist/{service-account-B2d1Er_r.js → service-account-B1VXCTqg.js} +3 -3
- package/dist/{service-account-CddxU-yC.js → service-account-Cw_LWZ4-.js} +7 -8
- package/dist/{session-stop-BQ0J0Fph.js → session-stop-P2XdTiwr.js} +159 -182
- package/dist/{skills-Dm2-5nn5.js → skills-Zg8-vrje.js} +25 -29
- package/dist/{slack-conversation-unfurl-CLH0tTLk.js → slack-conversation-unfurl-DA51qH0c.js} +18 -15
- package/dist/{spawn-PwAuSN59.js → spawn-DBi4-zD8.js} +6 -6
- package/dist/{state-rXH58smZ.js → state-C-Ftk23K.js} +4 -4
- package/dist/{stop-CcHPEcFE.js → stop-D9xideLM.js} +175 -134
- package/dist/{store-7QA00oK6.js → store-BjIXA0Al.js} +5 -5
- package/dist/{task-queue-DvQZH5rG.js → task-queue-D0_qbnpo.js} +7 -4
- package/dist/{task-runner-CyZMcuZy.js → task-runner-DQMq4XY0.js} +10 -11
- package/dist/{thread-context-C-hLTQST.js → thread-context-D0i1e-5O.js} +13 -11
- package/dist/{turn-session-routing-Cqjj1B3i.js → turn-session-routing-C0l68I_O.js} +4 -4
- package/dist/{turn-user-message-DbU7MNd9.js → turn-user-message-nBVvOXjs.js} +14 -5
- package/dist/{queue-CbEHUO0l.d.ts → types-fnU7Xs__.d.ts} +3 -1
- package/dist/{users-B-UpCmw9.js → users-DdjMjbmM.js} +1 -1
- package/dist/{validation-BEUlev32.js → validation-CRbvRPvu.js} +1 -1
- package/dist/{version-BE1OyrXV.js → version-BYdVs12p.js} +1 -1
- package/dist/version.js +1 -1
- package/dist/{viewer-CqOkWizK.js → viewer-DudYrQGj.js} +7 -5
- package/dist/{warmup-HFgFZFwS.js → warmup-DN9OHN1-.js} +136 -78
- package/dist/{worker-CCEDWbsY.js → worker-C9ZfJXmV.js} +8 -8
- package/migrations/0121_people_list_metric_index.sql +1 -0
- package/migrations/0122_automation_rollout_repair.sql +56 -0
- package/migrations/0123_cache_warming_history_reset.sql +10 -0
- package/migrations/meta/0121_snapshot.json +5481 -0
- package/migrations/meta/0122_snapshot.json +5481 -0
- package/migrations/meta/0123_snapshot.json +5481 -0
- package/migrations/meta/_journal.json +21 -0
- package/package.json +7 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as withSpan, _ as runBestEffort, a as extractGenAiUsageSummary, i as extractGenAiUsageAttributes, p as logException } from "./logging-
|
|
3
|
-
import {
|
|
4
|
-
import { I as conversationBriefSchema, L as parseBriefInput, P as briefOutcomeStatusSchema } from "./conversation
|
|
1
|
+
import { A as searchWeb$1, C as completeObject$1, D as generateImages$1, E as gatewayCostUsd, S as completeDecision$1, T as embedTexts$1, Y as ProviderError, Z as createProviderError, b as GEN_AI_PROVIDER_NAME, it as resolveGatewayCredential, nt as isProviderRetryError, w as completeText$1, x as GEN_AI_SERVER_ADDRESS } from "./config-BIyIdTtA.js";
|
|
2
|
+
import { E as withSpan, _ as runBestEffort, a as extractGenAiUsageSummary, i as extractGenAiUsageAttributes, p as logException } from "./logging-BNUovdcX.js";
|
|
3
|
+
import { r as getConversationEventStore, vt as agentTurnCostUsd } from "./db-CFUpEZi9.js";
|
|
4
|
+
import { I as conversationBriefSchema, L as parseBriefInput, P as briefOutcomeStatusSchema } from "./conversation-CzrLhdHG.js";
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { createGatewayProvider } from "@ai-sdk/gateway";
|
|
7
7
|
import { transcribe } from "ai";
|
|
8
|
-
import { conversationEventPresentationSchema, defineConversationEvent } from "@sentry/junior-plugin-api";
|
|
8
|
+
import { conversationEventPresentationSchema, defineConversationEvent, mentionsTag, renderTag } from "@sentry/junior-plugin-api";
|
|
9
9
|
// src/chat/conversations/structured-events.ts
|
|
10
10
|
/** Reserved namespace for Junior-owned conversation metadata events. */
|
|
11
11
|
const JUNIOR_NATIVE_EVENT_NAMESPACE = "junior";
|
|
@@ -426,9 +426,25 @@ function uniqueStrings(values, limit) {
|
|
|
426
426
|
}
|
|
427
427
|
return [...unique];
|
|
428
428
|
}
|
|
429
|
-
const
|
|
429
|
+
const RUNTIME_MARKER_TAGS = [
|
|
430
|
+
"active-asks",
|
|
431
|
+
"analysis-error",
|
|
432
|
+
"available-skills",
|
|
433
|
+
"brief-input",
|
|
434
|
+
"compaction",
|
|
435
|
+
"current-instruction",
|
|
436
|
+
"image-attachment",
|
|
437
|
+
"omitted-image-attachments",
|
|
438
|
+
"pi-history",
|
|
439
|
+
"plugin-contribution",
|
|
440
|
+
"resolved-or-replaced-asks",
|
|
441
|
+
"runtime-turn-context",
|
|
442
|
+
"thread-compactions",
|
|
443
|
+
"thread-context",
|
|
444
|
+
"turn-context"
|
|
445
|
+
];
|
|
430
446
|
function hasRuntimeMarker(value) {
|
|
431
|
-
return
|
|
447
|
+
return value.includes("[[NO_REPLY]]") || mentionsTag(value, RUNTIME_MARKER_TAGS);
|
|
432
448
|
}
|
|
433
449
|
const ASSISTANT_ATTRIBUTION = "assistant";
|
|
434
450
|
function normalizeModelBrief(args) {
|
|
@@ -575,12 +591,7 @@ function promptInput(args) {
|
|
|
575
591
|
if (candidate.length <= MAX_INPUT_CHARS) text = candidate;
|
|
576
592
|
else keptTools.pop();
|
|
577
593
|
}
|
|
578
|
-
return [
|
|
579
|
-
"<brief-input>",
|
|
580
|
-
text,
|
|
581
|
-
"</brief-input>",
|
|
582
|
-
"Return the next Brief as structured data."
|
|
583
|
-
].join("\n");
|
|
594
|
+
return [renderTag("brief-input", {}, [text]), "Return the next Brief as structured data."].join("\n");
|
|
584
595
|
}
|
|
585
596
|
function deterministicLinks(input) {
|
|
586
597
|
return [...input.codeChanges.map((change) => ({
|
|
@@ -896,4 +907,4 @@ Rules:
|
|
|
896
907
|
- Cite a URL only when its exact full string occurs in an entry, evidence, or the previous Brief. Return cited URLs in \`urls\`. Core adds code changes and resources separately.
|
|
897
908
|
- Keep the summary under 600 characters, intent under 400 characters, outcome text under 600 characters, and each other string under 400 characters.
|
|
898
909
|
`;
|
|
899
|
-
export {
|
|
910
|
+
export { JUNIOR_NATIVE_EVENT_NAMESPACE as _, EVENT_SYSTEM_ACTOR as a, conversationNoteEvent as b, generateBrief as c, completeText as d, embedTexts as f, NoAudioError as g, transcribeFromUrl as h, EVENT_MESSAGE_AUTHOR as i, completeDecision as l, searchWeb as m, briefEntriesFromReportEvents as n, eventBotAuthorId as o, generateImages as p, EVENT_AUTHOR_ID as r, isEventConversationMessage as s, BRIEF_PROMPT as t, completeObject as u, agentsInstructionsUpdatedEvent as v, renderJuniorNativeConversationEvent as x, authenticationLinkedEvent as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-
|
|
2
|
-
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-
|
|
3
|
-
import { o as isUserActor, s as parseActorUserId } from "./actor-
|
|
1
|
+
import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DD9vencX.js";
|
|
2
|
+
import { b as setSpanAttributes, h as logWarn, m as logInfo } from "./logging-BNUovdcX.js";
|
|
3
|
+
import { o as isUserActor, s as parseActorUserId } from "./actor-BsBdxDXQ.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as trace, n as postinstall, o as getSandboxResources, t as dependencies } from "./install-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { i as trace, n as postinstall, o as getSandboxResources, t as dependencies } from "./install-DhTBUUov.js";
|
|
2
|
+
import { Ns as sleep, Yi as isStale, Zi as getSandboxProvider, qi as create } from "./projection-Ce4pmhKP.js";
|
|
3
|
+
import { et as getStateAdapter } from "./db-CFUpEZi9.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
// src/chat/sandbox/snapshot/resolve.ts
|
|
6
6
|
const SNAPSHOT_CACHE_PREFIX = "junior:sandbox_snapshot_profile:v2";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
3
|
+
import { P as SYSTEM_IDENTITY_ID, a as getConversationStore, k as turnBehavior } from "./db-CFUpEZi9.js";
|
|
4
|
+
import { A as parseEventMessages, B as renderEventBatchInputs, D as getEventBatchDelayMs, F as EVENT_WAIT_MS, R as eventBatchMessageMeta, V as timerWatchCredentialSubject, j as resolveMailboxTurnWork, k as listActiveMailboxTurns, s as eventReviewItemInputs, t as getConversationStoppedAtMs } from "./session-stop-P2XdTiwr.js";
|
|
5
|
+
import { a as EVENT_SYSTEM_ACTOR } from "./prompt-DEqjDVMs.js";
|
|
6
|
+
import { p as credentialContextForActor } from "./registry-CNE4ZBnG.js";
|
|
7
|
+
import { C as ownAgentInvocation, D as getAgentInvocationIdForEvents, I as getTurnReplyKey, M as getAgentInvocationTurnId, N as getAgentReplyMessageId, O as getAgentInvocationIdForMessage, S as listChildMessages, b as hasAgentInvocationReply, j as getAgentInvocationResultMessageId, k as getAgentInvocationIdForResult, y as childMessageSenderMetadata, z as buildDeterministicTurnId } from "./turn-user-message-nBVvOXjs.js";
|
|
8
|
+
import { _ as getConversationWorkState, r as appendAndEnqueueInboundMessage } from "./store-BjIXA0Al.js";
|
|
9
|
+
import { $t as getChildAgentInputSender, Bt as TERMINAL_AGENT_INVOCATION_STATUSES, Gt as isTerminalAgentInvocation, Kt as listAgentInvocationsForConversation, Qt as childAgentInput, Rt as listUnreportedSiblingAgents, Wt as getLatestAgentInvocationForConversation, Xt as reportReplacedWithoutOpenWork, Yt as markAgentInvocationParentMailboxAppended, Zt as sendsResultToParent, an as parentMessageText, bn as createAgentInvocationFromLatest, dn as enqueueAgentInvocation, en as readChildConversationSender, fn as resolveAgentInvocationId, in as logDroppedParentMessage, ln as endActiveAgentInvocations, on as readParentMessage, sn as createAgentInvocationWorker, tn as routeChildInput, un as endAgentInvocationsOfStoppedWork, zt as NON_TERMINAL_AGENT_INVOCATION_STATUSES } from "./warmup-DN9OHN1-.js";
|
|
10
|
+
import { J as renderUntrustedTag } from "./config-BIyIdTtA.js";
|
|
10
11
|
import { C as AGENT_MESSAGE_EVENT_TYPE, E as agentInvocationResultEventType, S as AGENT_INVOCATION_EVENT_NAMESPACE, T as AGENT_REPLY_EVENT_TYPE } from "./web-message-id-BT8Mg8LL.js";
|
|
11
|
-
import pLimit from "p-limit";
|
|
12
12
|
import { actorSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
// src/chat/agent-invocations/result.ts
|
|
14
14
|
var result_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -356,7 +356,7 @@ async function startAgentInvocationsForChildInput(context, options) {
|
|
|
356
356
|
const latest = await getLatestAgentInvocationForConversation(context.conversationId);
|
|
357
357
|
if (messages.length === 0 || !latest) return;
|
|
358
358
|
const stoppedAtMs = await getConversationStoppedAtMs(context.conversationId);
|
|
359
|
-
const routes = await
|
|
359
|
+
const routes = await mapBounded(messages, (message) => routeChildInput(message, latest, stoppedAtMs));
|
|
360
360
|
if (!routes.includes("agent invocation")) return;
|
|
361
361
|
const inputs = messages.map(childAgentInput);
|
|
362
362
|
const isAgentInput = messages.every((message, index) => inputs[index] !== void 0 || readParentMessage(message) !== void 0);
|
|
@@ -501,8 +501,7 @@ async function withAgentInvocationResultActors(work) {
|
|
|
501
501
|
if (work.kind !== "mailbox") return work;
|
|
502
502
|
const conversationId = work.batch[0]?.message.conversationId;
|
|
503
503
|
const [latest, stoppedAtMs] = conversationId ? await Promise.all([getLatestAgentInvocationForConversation(conversationId), getConversationStoppedAtMs(conversationId)]) : [void 0, void 0];
|
|
504
|
-
const
|
|
505
|
-
const kept = (await Promise.all(work.batch.map((entry) => limit(async () => {
|
|
504
|
+
const kept = (await mapBounded(work.batch, async (entry) => {
|
|
506
505
|
const parentMessage = readParentMessage(entry.message);
|
|
507
506
|
if (parentMessage) {
|
|
508
507
|
if (await routeChildInput(entry.message, latest, stoppedAtMs) === "dropped") {
|
|
@@ -540,7 +539,7 @@ async function withAgentInvocationResultActors(work) {
|
|
|
540
539
|
...entry,
|
|
541
540
|
actor
|
|
542
541
|
};
|
|
543
|
-
}))
|
|
542
|
+
})).filter((entry) => entry !== void 0);
|
|
544
543
|
return kept.length > 0 ? {
|
|
545
544
|
kind: "mailbox",
|
|
546
545
|
batch: kept
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { q as messageCardText } from "./conversation
|
|
2
|
-
import { a as buildDeliveredTurnStatePatch, o as loadPendingMessageCards, r as completeAuthPauseTurn, t as buildTurnThreadContext } from "./thread-context-
|
|
3
|
-
import { A as normalizeConversationText, H as authorizationId, O as latestConversationMessageSeq, P as upsertConversationMessage, a as loadProjection, b as persistConversationMessages, cn as getAssistantReplyText, d as recordAuthorizationCompleted, et as saveTurnCheckpoint, j as recordDeliveredAssistantMessage, k as markConversationMessage, t as commitAcceptedReply, v as hydrateConversationMessages, vn as persistWithRetry } from "./projection-
|
|
4
|
-
import { S as setTags, T as withLogContext, p as logException } from "./logging-
|
|
5
|
-
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-
|
|
6
|
-
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-
|
|
7
|
-
import { _ as ConversationTurnLifecycleService, g as startActiveTurn, h as markTurnFailed } from "./turn-user-message-
|
|
8
|
-
import { L as finalizeFailedTurnReplyWithEvent } from "./agent-runner-
|
|
9
|
-
import { p as credentialContextForActor } from "./registry-
|
|
10
|
-
import { P as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-
|
|
1
|
+
import { q as messageCardText } from "./conversation-CzrLhdHG.js";
|
|
2
|
+
import { a as buildDeliveredTurnStatePatch, o as loadPendingMessageCards, r as completeAuthPauseTurn, t as buildTurnThreadContext } from "./thread-context-D0i1e-5O.js";
|
|
3
|
+
import { A as normalizeConversationText, H as authorizationId, O as latestConversationMessageSeq, P as upsertConversationMessage, a as loadProjection, b as persistConversationMessages, cn as getAssistantReplyText, d as recordAuthorizationCompleted, et as saveTurnCheckpoint, j as recordDeliveredAssistantMessage, k as markConversationMessage, t as commitAcceptedReply, v as hydrateConversationMessages, vn as persistWithRetry } from "./projection-Ce4pmhKP.js";
|
|
4
|
+
import { S as setTags, T as withLogContext, p as logException } from "./logging-BNUovdcX.js";
|
|
5
|
+
import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DQMq4XY0.js";
|
|
6
|
+
import { a as getPersistedThreadState, c as coerceThreadConversationState, i as getPersistedSandboxState, s as persistThreadStateById } from "./turn-session-routing-C0l68I_O.js";
|
|
7
|
+
import { _ as ConversationTurnLifecycleService, g as startActiveTurn, h as markTurnFailed } from "./turn-user-message-nBVvOXjs.js";
|
|
8
|
+
import { L as finalizeFailedTurnReplyWithEvent } from "./agent-runner-sJLhgPQV.js";
|
|
9
|
+
import { p as credentialContextForActor } from "./registry-CNE4ZBnG.js";
|
|
10
|
+
import { P as SYSTEM_IDENTITY_ID, a as getConversationStore, r as getConversationEventStore } from "./db-CFUpEZi9.js";
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
|
|
13
13
|
// src/chat/local/runner.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { xa as sandboxEgressSignalsResponseSchema } from "./projection-Ce4pmhKP.js";
|
|
2
2
|
// src/chat/local/sandbox-egress-signals.ts
|
|
3
3
|
const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
|
|
4
4
|
const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as actorIdentitySchema } from "./conversation
|
|
1
|
+
import { i as actorIdentitySchema } from "./conversation-CzrLhdHG.js";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
|
|
4
4
|
// src/chat/automations/task.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { F as sumUtcHoursIntoSixHours, M as fillUtcHours, d as userInputRequestSchema, i as AGENT_INVOCATION_STATUSES, j as fillUtcDays, y as PLAN_ITEM_STATUSES } from "./web-message-id-BT8Mg8LL.js";
|
|
2
|
-
import { $ as inputFileSchema, D as conversationChildAgentTotalsSchema, E as idempotencyKeySchema, c as conversationAuxiliaryCostsSchema, i as actorIdentitySchema, m as conversationParamsSchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation
|
|
3
|
-
import "./conversation-feed-
|
|
2
|
+
import { $ as inputFileSchema, D as conversationChildAgentTotalsSchema, E as idempotencyKeySchema, c as conversationAuxiliaryCostsSchema, i as actorIdentitySchema, m as conversationParamsSchema, x as conversationUsageSchema, y as conversationSummaryReportSchema } from "./conversation-CzrLhdHG.js";
|
|
3
|
+
import "./conversation-feed-B9e3_gxz.js";
|
|
4
4
|
import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
|
|
5
|
-
import { r as notificationScheduleSchema } from "./schedule-
|
|
5
|
+
import { r as notificationScheduleSchema } from "./schedule-Cire6NU7.js";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import { codeChangeStateSchema, eventMatchSchema, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
|
|
8
8
|
// src/api/schema/conversation-attachment-upload.ts
|
|
@@ -162,23 +162,12 @@ const guardianStatsSchema = z.object({
|
|
|
162
162
|
requests: z.number()
|
|
163
163
|
}).strict();
|
|
164
164
|
const conversationStatsReportSchema = z.object({
|
|
165
|
-
active: z.number(),
|
|
166
|
-
cachedInputTokens: z.number().optional(),
|
|
167
|
-
cacheCreationTokens: z.number().optional(),
|
|
168
|
-
conversations: z.number(),
|
|
169
|
-
durationMs: z.number(),
|
|
170
|
-
failed: z.number(),
|
|
171
165
|
generatedAt: z.string(),
|
|
172
166
|
guardian: guardianStatsSchema,
|
|
173
167
|
metricDays: z.array(conversationMetricDaySchema),
|
|
174
168
|
metricHours: z.array(conversationMetricDaySchema).optional(),
|
|
175
169
|
metricSixHours: z.array(conversationMetricDaySchema).optional(),
|
|
176
|
-
locations: z.array(conversationStatsItemSchema),
|
|
177
|
-
actors: z.array(conversationStatsItemSchema),
|
|
178
170
|
source: z.literal("conversation_index"),
|
|
179
|
-
costUsd: z.number().optional(),
|
|
180
|
-
inputTokens: z.number().optional(),
|
|
181
|
-
tokens: z.number().optional(),
|
|
182
171
|
windowEnd: z.string(),
|
|
183
172
|
windowStart: z.string()
|
|
184
173
|
}).strict();
|
|
@@ -662,7 +651,11 @@ const actorDirectoryWindowsSchema = z.object({
|
|
|
662
651
|
90: actorWindowMetricsSchema
|
|
663
652
|
}).strict();
|
|
664
653
|
const identifiedActorSchema = actorIdentitySchema.extend({ email: z.string().min(1) }).strict();
|
|
665
|
-
|
|
654
|
+
/**
|
|
655
|
+
* One person in the People list. Counts and spend are per range; the Turn
|
|
656
|
+
* range is all-time. Profile totals live on the profile read.
|
|
657
|
+
*/
|
|
658
|
+
const actorSummaryReportSchema = z.object({
|
|
666
659
|
firstSeenAt: z.string(),
|
|
667
660
|
lastSeenAt: z.string(),
|
|
668
661
|
actor: identifiedActorSchema,
|
|
@@ -771,24 +764,22 @@ const cacheWarmingSavingsSchema = z.object({
|
|
|
771
764
|
const cacheWarmingSavingsReportSchema = z.object({
|
|
772
765
|
days: z.array(cacheWarmingSavingsSchema.extend({
|
|
773
766
|
date: z.string(),
|
|
767
|
+
/** Saved less warmup cost. */
|
|
768
|
+
netSavingsUsd: z.number(),
|
|
774
769
|
/**
|
|
775
|
-
*
|
|
776
|
-
*
|
|
770
|
+
* Filled from history: hits count only when a recorded warmup call
|
|
771
|
+
* reached the return, and the warm state split is unknown.
|
|
777
772
|
*/
|
|
778
|
-
|
|
773
|
+
history: z.boolean()
|
|
779
774
|
})),
|
|
780
775
|
totals: cacheWarmingSavingsSchema.extend({
|
|
781
|
-
/** Net savings of the days with known warmup cost. */
|
|
782
776
|
netSavingsUsd: z.number(),
|
|
783
|
-
/** Oracle savings of the days with
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
* Net savings over oracle savings of the days with known warmup cost.
|
|
787
|
-
* Null with no oracle savings on those days.
|
|
788
|
-
*/
|
|
777
|
+
/** Oracle savings of the days with live counters. */
|
|
778
|
+
liveOracleSavingsUsd: z.number().nonnegative(),
|
|
779
|
+
/** Net savings over oracle savings. Null with no oracle savings. */
|
|
789
780
|
effectiveness: z.number().nullable(),
|
|
790
|
-
/** Days filled from history
|
|
791
|
-
|
|
781
|
+
/** Days filled from history. The totals include them. */
|
|
782
|
+
historyDays: z.number().int().nonnegative()
|
|
792
783
|
})
|
|
793
784
|
}).strict();
|
|
794
785
|
const cacheWarmingSavingsRefillSchema = z.object({
|
|
@@ -806,6 +797,25 @@ const cacheWarmingSavingsRefillSchema = z.object({
|
|
|
806
797
|
totalConversations: z.number().int().nonnegative().optional()
|
|
807
798
|
}).strict();
|
|
808
799
|
const cacheWarmingSavingsRefillResponseSchema = z.object({ refill: cacheWarmingSavingsRefillSchema }).strict();
|
|
800
|
+
// src/chat/review-items/evidence.ts
|
|
801
|
+
/**
|
|
802
|
+
* One source that an agent cites for a Review item: a link or a
|
|
803
|
+
* Conversation, with a short label and an optional one-line note. A link
|
|
804
|
+
* points outside Junior; a Conversation reference points to work in Junior.
|
|
805
|
+
* The question stores the list, and the dashboard shows it beside the
|
|
806
|
+
* answer choices.
|
|
807
|
+
*/
|
|
808
|
+
const reviewItemEvidenceSchema = z.object({
|
|
809
|
+
conversationId: z.string().min(1).max(500).optional(),
|
|
810
|
+
label: z.string().min(1).max(120),
|
|
811
|
+
note: z.string().min(1).max(200).optional(),
|
|
812
|
+
url: z.string().min(1).max(2e3).optional()
|
|
813
|
+
}).strict().refine((entry) => entry.url === void 0 !== (entry.conversationId === void 0), "Evidence has a `url` or a `conversationId`, not both.");
|
|
814
|
+
/**
|
|
815
|
+
* The question of a Review item with the evidence for its answer. Evidence
|
|
816
|
+
* is part of the question, so it is stored in the `request` column.
|
|
817
|
+
*/
|
|
818
|
+
const reviewItemRequestSchema = userInputRequestSchema.safeExtend({ evidence: z.array(reviewItemEvidenceSchema).optional() });
|
|
809
819
|
// src/api/schema/review-item.ts
|
|
810
820
|
const answerSchema = z.object({
|
|
811
821
|
other: z.string().max(4e3).optional(),
|
|
@@ -820,6 +830,11 @@ const personSchema = z.object({
|
|
|
820
830
|
/** One Review item as the viewer sees it. */
|
|
821
831
|
const reviewItemSchema = z.object({
|
|
822
832
|
addedByConversationId: z.string().min(1),
|
|
833
|
+
/**
|
|
834
|
+
* Names the Conversation that added the item when it is not
|
|
835
|
+
* `rootConversationId`, such as a child agent's Thread title.
|
|
836
|
+
*/
|
|
837
|
+
addedByLabel: z.string().min(1).optional(),
|
|
823
838
|
/** Turn that added the item. Unset for a plugin item. */
|
|
824
839
|
addedByTurnId: z.string().min(1).optional(),
|
|
825
840
|
answer: answerSchema.optional(),
|
|
@@ -839,7 +854,29 @@ const reviewItemSchema = z.object({
|
|
|
839
854
|
createdAt: z.string().datetime(),
|
|
840
855
|
id: z.string().min(1),
|
|
841
856
|
kind: z.enum(["notice", "action"]),
|
|
842
|
-
|
|
857
|
+
/**
|
|
858
|
+
* Other open work that the viewer can see on the same subject or linked
|
|
859
|
+
* work. Only an open item has it.
|
|
860
|
+
*/
|
|
861
|
+
related: z.object({
|
|
862
|
+
/** Linked Conversations other than the one that added the item. */
|
|
863
|
+
conversationIds: z.array(z.string().min(1)),
|
|
864
|
+
/**
|
|
865
|
+
* Open items with the same subject id or URL, or linked to one of
|
|
866
|
+
* those Conversations, newest first.
|
|
867
|
+
*/
|
|
868
|
+
items: z.array(z.object({
|
|
869
|
+
id: z.string().min(1),
|
|
870
|
+
title: z.string().min(1)
|
|
871
|
+
}).strict())
|
|
872
|
+
}).strict().optional(),
|
|
873
|
+
request: reviewItemRequestSchema.optional(),
|
|
874
|
+
/**
|
|
875
|
+
* The top of the item's Conversation tree that the viewer can see, at
|
|
876
|
+
* any depth: the Conversation that added the item when it is a root, or
|
|
877
|
+
* when the viewer cannot see its root. The Inbox stacks items by it.
|
|
878
|
+
*/
|
|
879
|
+
rootConversationId: z.string().min(1),
|
|
843
880
|
status: z.enum([
|
|
844
881
|
"open",
|
|
845
882
|
"done",
|
|
@@ -243,7 +243,8 @@ declare const conversationDetailQuerySchema: z.ZodObject<{
|
|
|
243
243
|
/**
|
|
244
244
|
* Page toward the start with `before`, toward the latest with `after`, or
|
|
245
245
|
* both ways from one event with `around`. A link target asks for the page
|
|
246
|
-
* around one event by its `event` seq,
|
|
246
|
+
* around one event by its `event` seq, around one `message` by its id, or
|
|
247
|
+
* around the start of a `turn`.
|
|
247
248
|
*/
|
|
248
249
|
declare const conversationEventsQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
249
250
|
before: z.ZodString;
|
|
@@ -260,6 +261,9 @@ declare const conversationEventsQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
260
261
|
}, z.core.$strict>, z.ZodObject<{
|
|
261
262
|
turn: z.ZodString;
|
|
262
263
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
264
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
265
|
+
message: z.ZodString;
|
|
266
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
263
267
|
}, z.core.$strict>]>;
|
|
264
268
|
declare const createConversationMessageBodySchema: z.ZodObject<{
|
|
265
269
|
idempotencyKey: z.ZodString;
|
|
@@ -5211,12 +5215,6 @@ declare const guardianStatsSchema: z.ZodObject<{
|
|
|
5211
5215
|
requests: z.ZodNumber;
|
|
5212
5216
|
}, z.core.$strict>;
|
|
5213
5217
|
declare const conversationStatsReportSchema: z.ZodObject<{
|
|
5214
|
-
active: z.ZodNumber;
|
|
5215
|
-
cachedInputTokens: z.ZodOptional<z.ZodNumber>;
|
|
5216
|
-
cacheCreationTokens: z.ZodOptional<z.ZodNumber>;
|
|
5217
|
-
conversations: z.ZodNumber;
|
|
5218
|
-
durationMs: z.ZodNumber;
|
|
5219
|
-
failed: z.ZodNumber;
|
|
5220
5218
|
generatedAt: z.ZodString;
|
|
5221
5219
|
guardian: z.ZodObject<{
|
|
5222
5220
|
allow: z.ZodNumber;
|
|
@@ -5291,28 +5289,7 @@ declare const conversationStatsReportSchema: z.ZodObject<{
|
|
|
5291
5289
|
outcomes: z.ZodOptional<z.ZodNumber>;
|
|
5292
5290
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
5293
5291
|
}, z.core.$strict>>>;
|
|
5294
|
-
locations: z.ZodArray<z.ZodObject<{
|
|
5295
|
-
active: z.ZodNumber;
|
|
5296
|
-
conversations: z.ZodNumber;
|
|
5297
|
-
durationMs: z.ZodNumber;
|
|
5298
|
-
failed: z.ZodNumber;
|
|
5299
|
-
label: z.ZodString;
|
|
5300
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
5301
|
-
tokens: z.ZodOptional<z.ZodNumber>;
|
|
5302
|
-
}, z.core.$strict>>;
|
|
5303
|
-
actors: z.ZodArray<z.ZodObject<{
|
|
5304
|
-
active: z.ZodNumber;
|
|
5305
|
-
conversations: z.ZodNumber;
|
|
5306
|
-
durationMs: z.ZodNumber;
|
|
5307
|
-
failed: z.ZodNumber;
|
|
5308
|
-
label: z.ZodString;
|
|
5309
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
5310
|
-
tokens: z.ZodOptional<z.ZodNumber>;
|
|
5311
|
-
}, z.core.$strict>>;
|
|
5312
5292
|
source: z.ZodLiteral<"conversation_index">;
|
|
5313
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
5314
|
-
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
5315
|
-
tokens: z.ZodOptional<z.ZodNumber>;
|
|
5316
5293
|
windowEnd: z.ZodString;
|
|
5317
5294
|
windowStart: z.ZodString;
|
|
5318
5295
|
}, z.core.$strict>;
|
|
@@ -5796,13 +5773,11 @@ declare const actorDirectoryWindowsSchema: z.ZodObject<{
|
|
|
5796
5773
|
priorCostUsd: z.ZodNumber;
|
|
5797
5774
|
}, z.core.$strict>;
|
|
5798
5775
|
}, z.core.$strict>;
|
|
5776
|
+
/**
|
|
5777
|
+
* One person in the People list. Counts and spend are per range; the Turn
|
|
5778
|
+
* range is all-time. Profile totals live on the profile read.
|
|
5779
|
+
*/
|
|
5799
5780
|
declare const actorSummaryReportSchema: z.ZodObject<{
|
|
5800
|
-
active: z.ZodNumber;
|
|
5801
|
-
activeDays: z.ZodNumber;
|
|
5802
|
-
conversations: z.ZodNumber;
|
|
5803
|
-
durationMs: z.ZodNumber;
|
|
5804
|
-
failed: z.ZodNumber;
|
|
5805
|
-
tokens: z.ZodOptional<z.ZodNumber>;
|
|
5806
5781
|
firstSeenAt: z.ZodString;
|
|
5807
5782
|
lastSeenAt: z.ZodString;
|
|
5808
5783
|
actor: z.ZodObject<{
|
|
@@ -5857,12 +5832,6 @@ declare const actorDirectoryReportSchema: z.ZodObject<{
|
|
|
5857
5832
|
}, z.core.$strict>>>;
|
|
5858
5833
|
generatedAt: z.ZodString;
|
|
5859
5834
|
people: z.ZodArray<z.ZodObject<{
|
|
5860
|
-
active: z.ZodNumber;
|
|
5861
|
-
activeDays: z.ZodNumber;
|
|
5862
|
-
conversations: z.ZodNumber;
|
|
5863
|
-
durationMs: z.ZodNumber;
|
|
5864
|
-
failed: z.ZodNumber;
|
|
5865
|
-
tokens: z.ZodOptional<z.ZodNumber>;
|
|
5866
5835
|
firstSeenAt: z.ZodString;
|
|
5867
5836
|
lastSeenAt: z.ZodString;
|
|
5868
5837
|
actor: z.ZodObject<{
|
|
@@ -7094,7 +7063,8 @@ declare const cacheWarmingSavingsReportSchema: z.ZodObject<{
|
|
|
7094
7063
|
unwarmedIdlePeriods: z.ZodNumber;
|
|
7095
7064
|
unwarmedOracleSavingsUsd: z.ZodNumber;
|
|
7096
7065
|
date: z.ZodString;
|
|
7097
|
-
netSavingsUsd: z.
|
|
7066
|
+
netSavingsUsd: z.ZodNumber;
|
|
7067
|
+
history: z.ZodBoolean;
|
|
7098
7068
|
}, z.core.$strict>>;
|
|
7099
7069
|
totals: z.ZodObject<{
|
|
7100
7070
|
idlePeriods: z.ZodNumber;
|
|
@@ -7105,9 +7075,9 @@ declare const cacheWarmingSavingsReportSchema: z.ZodObject<{
|
|
|
7105
7075
|
unwarmedIdlePeriods: z.ZodNumber;
|
|
7106
7076
|
unwarmedOracleSavingsUsd: z.ZodNumber;
|
|
7107
7077
|
netSavingsUsd: z.ZodNumber;
|
|
7108
|
-
|
|
7078
|
+
liveOracleSavingsUsd: z.ZodNumber;
|
|
7109
7079
|
effectiveness: z.ZodNullable<z.ZodNumber>;
|
|
7110
|
-
|
|
7080
|
+
historyDays: z.ZodNumber;
|
|
7111
7081
|
}, z.core.$strict>;
|
|
7112
7082
|
}, z.core.$strict>;
|
|
7113
7083
|
type CacheWarmingSavingsReport = z.output<typeof cacheWarmingSavingsReportSchema>;
|
|
@@ -9299,6 +9269,7 @@ type ReviewItemChangeRecord = z.output<typeof reviewItemChangeRecordSchema>;
|
|
|
9299
9269
|
/** One Review item as the viewer sees it. */
|
|
9300
9270
|
declare const reviewItemSchema: z.ZodObject<{
|
|
9301
9271
|
addedByConversationId: z.ZodString;
|
|
9272
|
+
addedByLabel: z.ZodOptional<z.ZodString>;
|
|
9302
9273
|
addedByTurnId: z.ZodOptional<z.ZodString>;
|
|
9303
9274
|
answer: z.ZodOptional<z.ZodObject<{
|
|
9304
9275
|
other: z.ZodOptional<z.ZodString>;
|
|
@@ -9329,6 +9300,13 @@ declare const reviewItemSchema: z.ZodObject<{
|
|
|
9329
9300
|
action: "action";
|
|
9330
9301
|
notice: "notice";
|
|
9331
9302
|
}>;
|
|
9303
|
+
related: z.ZodOptional<z.ZodObject<{
|
|
9304
|
+
conversationIds: z.ZodArray<z.ZodString>;
|
|
9305
|
+
items: z.ZodArray<z.ZodObject<{
|
|
9306
|
+
id: z.ZodString;
|
|
9307
|
+
title: z.ZodString;
|
|
9308
|
+
}, z.core.$strict>>;
|
|
9309
|
+
}, z.core.$strict>>;
|
|
9332
9310
|
request: z.ZodOptional<z.ZodObject<{
|
|
9333
9311
|
question: z.ZodString;
|
|
9334
9312
|
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -9357,7 +9335,14 @@ declare const reviewItemSchema: z.ZodObject<{
|
|
|
9357
9335
|
description: z.ZodOptional<z.ZodString>;
|
|
9358
9336
|
kind: z.ZodLiteral<"text">;
|
|
9359
9337
|
}, z.core.$strip>], "kind">>;
|
|
9338
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9339
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
9340
|
+
label: z.ZodString;
|
|
9341
|
+
note: z.ZodOptional<z.ZodString>;
|
|
9342
|
+
url: z.ZodOptional<z.ZodString>;
|
|
9343
|
+
}, z.core.$strict>>>;
|
|
9360
9344
|
}, z.core.$strip>>;
|
|
9345
|
+
rootConversationId: z.ZodString;
|
|
9361
9346
|
status: z.ZodEnum<{
|
|
9362
9347
|
dismissed: "dismissed";
|
|
9363
9348
|
done: "done";
|
|
@@ -9404,6 +9389,7 @@ type ReviewItemPayload = z.output<typeof reviewItemSchema>;
|
|
|
9404
9389
|
declare const reviewItemListSchema: z.ZodObject<{
|
|
9405
9390
|
items: z.ZodArray<z.ZodObject<{
|
|
9406
9391
|
addedByConversationId: z.ZodString;
|
|
9392
|
+
addedByLabel: z.ZodOptional<z.ZodString>;
|
|
9407
9393
|
addedByTurnId: z.ZodOptional<z.ZodString>;
|
|
9408
9394
|
answer: z.ZodOptional<z.ZodObject<{
|
|
9409
9395
|
other: z.ZodOptional<z.ZodString>;
|
|
@@ -9434,6 +9420,13 @@ declare const reviewItemListSchema: z.ZodObject<{
|
|
|
9434
9420
|
action: "action";
|
|
9435
9421
|
notice: "notice";
|
|
9436
9422
|
}>;
|
|
9423
|
+
related: z.ZodOptional<z.ZodObject<{
|
|
9424
|
+
conversationIds: z.ZodArray<z.ZodString>;
|
|
9425
|
+
items: z.ZodArray<z.ZodObject<{
|
|
9426
|
+
id: z.ZodString;
|
|
9427
|
+
title: z.ZodString;
|
|
9428
|
+
}, z.core.$strict>>;
|
|
9429
|
+
}, z.core.$strict>>;
|
|
9437
9430
|
request: z.ZodOptional<z.ZodObject<{
|
|
9438
9431
|
question: z.ZodString;
|
|
9439
9432
|
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -9462,7 +9455,14 @@ declare const reviewItemListSchema: z.ZodObject<{
|
|
|
9462
9455
|
description: z.ZodOptional<z.ZodString>;
|
|
9463
9456
|
kind: z.ZodLiteral<"text">;
|
|
9464
9457
|
}, z.core.$strip>], "kind">>;
|
|
9458
|
+
evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
9459
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
9460
|
+
label: z.ZodString;
|
|
9461
|
+
note: z.ZodOptional<z.ZodString>;
|
|
9462
|
+
url: z.ZodOptional<z.ZodString>;
|
|
9463
|
+
}, z.core.$strict>>>;
|
|
9465
9464
|
}, z.core.$strip>>;
|
|
9465
|
+
rootConversationId: z.ZodString;
|
|
9466
9466
|
status: z.ZodEnum<{
|
|
9467
9467
|
dismissed: "dismissed";
|
|
9468
9468
|
done: "done";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
3
|
-
import {
|
|
1
|
+
import { n as finishServiceAccountSignIn, o as serviceAccountPlugins, r as getServiceAccountStatus, s as startServiceAccountSignIn, t as disconnectServiceAccount } from "./service-account-Cw_LWZ4-.js";
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Chc_IP2o.js";
|
|
3
|
+
import { Q as disconnectStateAdapter } from "./db-CFUpEZi9.js";
|
|
4
4
|
import { CLI_USAGE } from "./cli/run.js";
|
|
5
5
|
import { createServer } from "node:http";
|
|
6
6
|
// src/cli/service-account.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { K as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-
|
|
2
|
-
import { i as resolvePluginHeaderEnvRefs, l as fetchWithBoundedOAuthErrorBodies } from "./registry-
|
|
3
|
-
import {
|
|
4
|
-
import { n as readEncryptedState, r as findLegacyWebActorUserId, t as createEncryptedState } from "./state-
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import { K as isRecord, b as setSpanAttributes, h as logWarn } from "./logging-BNUovdcX.js";
|
|
2
|
+
import { i as resolvePluginHeaderEnvRefs, l as fetchWithBoundedOAuthErrorBodies } from "./registry-CNE4ZBnG.js";
|
|
3
|
+
import { Ot as parseDestination, at as fenceLock, et as getStateAdapter, ot as withLock, rt as MUTATION_LOCK_TTL_MS } from "./db-CFUpEZi9.js";
|
|
4
|
+
import { n as readEncryptedState, r as findLegacyWebActorUserId, t as createEncryptedState } from "./state-C-Ftk23K.js";
|
|
5
|
+
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
6
|
+
import { n as botConfig } from "./config-BIyIdTtA.js";
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
import { sourceSchema } from "@sentry/junior-plugin-api";
|
|
@@ -235,8 +235,7 @@ async function deleteMcpAuthSessionsForUserProvider(userId, provider) {
|
|
|
235
235
|
const stateAdapter = await getConnectedStateAdapter();
|
|
236
236
|
const indexKey = sessionIndexKey(userId, provider);
|
|
237
237
|
const authSessionIds = parseSessionIndex(await stateAdapter.get(indexKey));
|
|
238
|
-
|
|
239
|
-
await Promise.all(authSessionIds.map((authSessionId) => limit(() => stateAdapter.delete(sessionKey(authSessionId)))));
|
|
238
|
+
await mapBounded(authSessionIds, (authSessionId) => stateAdapter.delete(sessionKey(authSessionId)));
|
|
240
239
|
await stateAdapter.delete(indexKey);
|
|
241
240
|
}
|
|
242
241
|
async function getMcpStoredOAuthCredentials(userId, provider) {
|