@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,7 +1,7 @@
|
|
|
1
|
-
import { a as getConversationStore } from "./db-
|
|
2
|
-
import { p as logException } from "./logging-
|
|
3
|
-
import "./background-compaction-queue-
|
|
4
|
-
import { At as hasRunnableConversationWork, Bt as releaseInboundMessage, Dt as getConversationWorkState$1, Et as getConversation$1, Gt as stopConversationWork$1, Ht as requestConversationWork$1, Kt as takeDeferredConversationMove, Lt as recordAttemptFailure$1, Nt as listActiveConversationIds$1, Ot as getConversationWorkStates$1, Pt as markConversationWorkEnqueued$1, Rt as recordConversationRetry$1, St as deadLetterAttempt$1, Tt as dropPendingMessages$1, Ut as startConversationWork$1, Vt as requestAnotherSlice$1, Wt as steerWebPendingMessages$1, _t as clearConsumedConversationWake$1, bt as completeConversationWork$1, dt as appendExclusiveInboundMessage, ft as appendInboundMessage, gt as claimInboundMessage$1, ht as checkInConversationWork$1, mt as cancelHumanFacingPendingMessages$1, pt as beginConversationResume$1, ut as ackMessages$1, vt as clearExpiredConversationLease$1, wt as drainConversationMailbox$1, yt as completeConversationStop$1, zt as releaseConversationWork$1 } from "./projection-
|
|
1
|
+
import { a as getConversationStore } from "./db-CFUpEZi9.js";
|
|
2
|
+
import { p as logException } from "./logging-BNUovdcX.js";
|
|
3
|
+
import "./background-compaction-queue-CUJXVKG3.js";
|
|
4
|
+
import { At as hasRunnableConversationWork, Bt as releaseInboundMessage, Dt as getConversationWorkState$1, Et as getConversation$1, Gt as stopConversationWork$1, Ht as requestConversationWork$1, Kt as takeDeferredConversationMove, Lt as recordAttemptFailure$1, Nt as listActiveConversationIds$1, Ot as getConversationWorkStates$1, Pt as markConversationWorkEnqueued$1, Rt as recordConversationRetry$1, St as deadLetterAttempt$1, Tt as dropPendingMessages$1, Ut as startConversationWork$1, Vt as requestAnotherSlice$1, Wt as steerWebPendingMessages$1, _t as clearConsumedConversationWake$1, bt as completeConversationWork$1, dt as appendExclusiveInboundMessage, ft as appendInboundMessage, gt as claimInboundMessage$1, ht as checkInConversationWork$1, mt as cancelHumanFacingPendingMessages$1, pt as beginConversationResume$1, ut as ackMessages$1, vt as clearExpiredConversationLease$1, wt as drainConversationMailbox$1, yt as completeConversationStop$1, zt as releaseConversationWork$1 } from "./projection-Ce4pmhKP.js";
|
|
5
5
|
// src/chat/task-execution/store.ts
|
|
6
6
|
function metadataStore(options) {
|
|
7
7
|
return options.conversationStore ?? getConversationStore();
|
|
@@ -304,7 +304,7 @@ async function runDeferredMove(args) {
|
|
|
304
304
|
const move = await takeDeferredConversationMove(args);
|
|
305
305
|
if (move === void 0) return;
|
|
306
306
|
try {
|
|
307
|
-
const { continueDeferredSlackClick } = await import("./slack-conversation-unfurl-
|
|
307
|
+
const { continueDeferredSlackClick } = await import("./slack-conversation-unfurl-DA51qH0c.js").then((n) => n.r);
|
|
308
308
|
await continueDeferredSlackClick(move, args.getSlackAdapter);
|
|
309
309
|
} catch (error) {
|
|
310
310
|
logException(error, "slack.continue_here.deferred.failed", { "gen_ai.conversation.id": args.conversationId });
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { h as logWarn, m as logInfo, p as logException } from "./logging-
|
|
2
|
-
import { i as getChatConfig } from "./config-
|
|
1
|
+
import { h as logWarn, m as logInfo, p as logException } from "./logging-BNUovdcX.js";
|
|
2
|
+
import { i as getChatConfig } from "./config-BIyIdTtA.js";
|
|
3
|
+
import "./fan-out-Cod-yEHG.js";
|
|
3
4
|
import * as z from "zod";
|
|
5
|
+
import pLimit from "p-limit";
|
|
4
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
7
|
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
|
|
6
8
|
import { QueueClient, handleCallback, registerDevConsumer } from "@vercel/queue";
|
|
@@ -90,7 +92,8 @@ async function startWorker(consumers) {
|
|
|
90
92
|
});
|
|
91
93
|
return { close: async () => {
|
|
92
94
|
try {
|
|
93
|
-
const
|
|
95
|
+
const limit = pLimit(8);
|
|
96
|
+
const failures = (await Promise.allSettled(workers.map((worker) => limit(() => worker.close())))).flatMap((result) => result.status === "rejected" ? [result.reason] : []);
|
|
94
97
|
if (failures.length > 0) throw new AggregateError(failures, "BullMQ workers did not close");
|
|
95
98
|
} finally {
|
|
96
99
|
await connection.quit();
|
|
@@ -396,7 +399,7 @@ function pluginTaskCallback() {
|
|
|
396
399
|
maxDeliveries: PLUGIN_TASK_MAX_DELIVERIES,
|
|
397
400
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
398
401
|
run: async (message) => {
|
|
399
|
-
const { processPluginTask } = await import("./task-runner-
|
|
402
|
+
const { processPluginTask } = await import("./task-runner-DQMq4XY0.js").then((n) => n.r);
|
|
400
403
|
await processPluginTask(message);
|
|
401
404
|
},
|
|
402
405
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { E as withSpan } from "./logging-
|
|
5
|
-
import { a as getPersistedThreadState, c as coerceThreadConversationState, t as resolveConversationRouting } from "./turn-session-routing-
|
|
6
|
-
import { i as readActorIdentity } from "./viewer-
|
|
7
|
-
import { v as parseSlackMessageTs } from "./actor-
|
|
2
|
+
import { Aa as createPluginModel, Ln as coreTaskRegistrations, Ni as createPluginState, Nn as getPlugins, Qn as getPiMessageRole, Ua as createPluginModelCostRecorder, Wa as createPluginLogger, Xo as getDispatchRecord, at as getTurnRecord, cr as isToolResultMessage, dr as stripRuntimeTurnContext, fl as createPluginCache, ka as createPluginEmbedder, lr as normalizeToolNameFromResult, rr as instructionTextForProjection, sr as isToolResultError, to as createPluginConversationEvents, v as hydrateConversationMessages } from "./projection-Ce4pmhKP.js";
|
|
3
|
+
import { a as getConversationStore, et as getStateAdapter, o as getDb } from "./db-CFUpEZi9.js";
|
|
4
|
+
import { E as withSpan } from "./logging-BNUovdcX.js";
|
|
5
|
+
import { a as getPersistedThreadState, c as coerceThreadConversationState, t as resolveConversationRouting } from "./turn-session-routing-C0l68I_O.js";
|
|
6
|
+
import { i as readActorIdentity } from "./viewer-DudYrQGj.js";
|
|
7
|
+
import { v as parseSlackMessageTs } from "./actor-BsBdxDXQ.js";
|
|
8
8
|
import { m as sameActorIdentity } from "./history-N7IVbUom.js";
|
|
9
|
-
import { i as pluginTaskParamsSchema, r as pluginTaskId } from "./task-queue-
|
|
10
|
-
import
|
|
9
|
+
import { i as pluginTaskParamsSchema, r as pluginTaskId } from "./task-queue-D0_qbnpo.js";
|
|
10
|
+
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
11
11
|
import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
12
12
|
// src/chat/plugins/task-runner.ts
|
|
13
13
|
/**
|
|
@@ -264,10 +264,9 @@ async function scheduleSessionCompletedPluginTasks(params, send) {
|
|
|
264
264
|
params: coreParams,
|
|
265
265
|
plugin: plugin.manifest.name
|
|
266
266
|
}));
|
|
267
|
-
|
|
268
|
-
await Promise.all(messages.map((message) => limit(async () => {
|
|
267
|
+
await mapBounded(messages, async (message) => {
|
|
269
268
|
await send(message);
|
|
270
|
-
})
|
|
269
|
+
}, PLUGIN_MESSAGE_SEND_CONCURRENCY);
|
|
271
270
|
}
|
|
272
271
|
/**
|
|
273
272
|
* Execute one parsed plugin task request in a `plugin.task` span. The span
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Fo as listConversationAnnotations, J as clearPendingAuth, k as markConversationMessage, v as hydrateConversationMessages, w as buildConversationContext } from "./projection-Ce4pmhKP.js";
|
|
2
|
+
import { t as mapBounded } from "./fan-out-Cod-yEHG.js";
|
|
3
|
+
import { K as isRecord, b as setSpanAttributes } from "./logging-BNUovdcX.js";
|
|
4
|
+
import { o as getDb, r as getConversationEventStore } from "./db-CFUpEZi9.js";
|
|
5
|
+
import { J as readMessageCardRefs, X as resolveMessageCards, Y as removedCardSchema } from "./conversation-CzrLhdHG.js";
|
|
6
|
+
import { S as listChildMessages, m as markTurnCompleted, n as getTurnUserMessageId, p as markTurnClosed, x as isAgentInvocationResult } from "./turn-user-message-nBVvOXjs.js";
|
|
7
|
+
import { _ as getConversationWorkState } from "./store-BjIXA0Al.js";
|
|
8
|
+
import { a as getPersistedThreadState, c as coerceThreadConversationState, s as persistThreadStateById } from "./turn-session-routing-C0l68I_O.js";
|
|
8
9
|
// src/chat/conversations/pending-cards.ts
|
|
9
10
|
/**
|
|
10
11
|
* Add the cards that tool results selected since the last visible assistant
|
|
@@ -47,11 +48,12 @@ async function selectChildResultCards(conversationId, inputMessageIds, selection
|
|
|
47
48
|
const events = getConversationEventStore();
|
|
48
49
|
const execution = (await getConversationWorkState({ conversationId }))?.execution;
|
|
49
50
|
const messages = await listChildMessages(inputMessageIds, execution?.messageSenders ?? {});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
messages.reverse();
|
|
52
|
+
const terminals = await mapBounded(messages, ({ sender }) => events.loadByIdempotencyKey(sender.conversationId, `turn:${sender.turnId}:terminal`));
|
|
53
|
+
for (const [index, message] of messages.entries()) {
|
|
54
|
+
const terminal = terminals[index];
|
|
53
55
|
if (!terminal && isAgentInvocationResult(message)) continue;
|
|
54
|
-
await selectTurnCards(
|
|
56
|
+
await selectTurnCards(message.sender.conversationId, selection, terminal?.seq);
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
/** Select undelivered cards and load their latest saved facts. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { J as toOptionalString, K as isRecord, q as toOptionalNumber } from "./logging-
|
|
3
|
-
import {
|
|
1
|
+
import { Xo as getDispatchRecord, b as persistConversationMessages, ll as JUNIOR_THREAD_STATE_TTL_MS, pl as createDurableLocationConfigurationService, qo as getDispatchConversationId } from "./projection-Ce4pmhKP.js";
|
|
2
|
+
import { J as toOptionalString, K as isRecord, q as toOptionalNumber } from "./logging-BNUovdcX.js";
|
|
3
|
+
import { et as getStateAdapter, o as getDb } from "./db-CFUpEZi9.js";
|
|
4
4
|
// src/chat/state/conversation.ts
|
|
5
5
|
function defaultConversationState() {
|
|
6
6
|
return {
|
|
@@ -202,7 +202,7 @@ function slackSourceForDestination(args) {
|
|
|
202
202
|
* Reads parent Conversations when this Conversation has no Destination.
|
|
203
203
|
*/
|
|
204
204
|
async function resolveConversationRouting(args) {
|
|
205
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
205
|
+
const conversationStore = args.conversationStore ?? (await import("./db-CFUpEZi9.js").then((n) => n.n)).getConversationStore();
|
|
206
206
|
const chain = await loadConversationChain(args.conversationId, conversationStore);
|
|
207
207
|
let destination;
|
|
208
208
|
let source;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { qt as readInboundMessageSender } from "./projection-
|
|
2
|
-
import { v as parseSlackMessageTs } from "./actor-
|
|
3
|
-
import { r as getConversationEventStore, s as getSqlExecutor } from "./db-
|
|
4
|
-
import { y as juniorAgentInvocations } from "./executor-
|
|
1
|
+
import { qt as readInboundMessageSender } from "./projection-Ce4pmhKP.js";
|
|
2
|
+
import { v as parseSlackMessageTs } from "./actor-BsBdxDXQ.js";
|
|
3
|
+
import { r as getConversationEventStore, s as getSqlExecutor } from "./db-CFUpEZi9.js";
|
|
4
|
+
import { y as juniorAgentInvocations } from "./executor-DXL0O0MV.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { inArray } from "drizzle-orm";
|
|
7
7
|
// src/chat/state/turn-id.ts
|
|
@@ -97,6 +97,15 @@ async function readChildMessageSender(message) {
|
|
|
97
97
|
return readInboundMessageSender(message) ?? (await readLegacyChildMessageSenders([message.inboundMessageId])).get(message.inboundMessageId);
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
+
* Read who sent each child reply or result, in message order. Messages
|
|
101
|
+
* without stored sender fields share one legacy read.
|
|
102
|
+
*/
|
|
103
|
+
async function readChildMessageSenders(messages) {
|
|
104
|
+
const stored = messages.map((message) => readInboundMessageSender(message));
|
|
105
|
+
const legacy = await readLegacyChildMessageSenders(messages.flatMap((message, index) => stored[index] ? [] : [message.inboundMessageId]));
|
|
106
|
+
return messages.map((message, index) => stored[index] ?? legacy.get(message.inboundMessageId));
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
100
109
|
* List the child replies and results among the ids that reached one
|
|
101
110
|
* mailbox, oldest first, with the sender fields that the mailbox keeps.
|
|
102
111
|
*/
|
|
@@ -352,4 +361,4 @@ function getTurnUserReplyAttachmentContext(message) {
|
|
|
352
361
|
...!imagesHydrated && imageAttachmentCount > 0 ? { omittedImageAttachmentCount: imageAttachmentCount } : void 0
|
|
353
362
|
};
|
|
354
363
|
}
|
|
355
|
-
export {
|
|
364
|
+
export { getAgentInvocationMessageId as A, ownAgentInvocation as C, getAgentInvocationIdForEvents as D, getAgentInvocationId as E, getNamedAgentConversationId as F, getTurnReplyKey as I, getUnnamedAgentConversationId as L, getAgentInvocationTurnId as M, getAgentReplyMessageId as N, getAgentInvocationIdForMessage as O, getChildAgentLockName as P, buildDeterministicAssistantMessageId as R, listChildMessages as S, readChildMessageSenders as T, ConversationTurnLifecycleService as _, ConversationTurnBoundaryError as a, hasAgentInvocationReply as b, TurnInputDeferredError as c, isTurnInputCommitLostError as d, isTurnInputDeferredError as f, startActiveTurn as g, markTurnFailed as h, getTurnUserSlackMessageTs as i, getAgentInvocationResultMessageId as j, getAgentInvocationIdForResult as k, getConversationTurnBoundaryError as l, markTurnCompleted as m, getTurnUserMessageId as n, CooperativeTurnYieldError as o, markTurnClosed as p, getTurnUserReplyAttachmentContext as r, TurnInputCommitLostError as s, getTurnUserMessage as t, isCooperativeTurnYieldError as u, getTurnLifecycle as v, readChildMessageSender as w, isAgentInvocationResult as x, childMessageSenderMetadata as y, buildDeterministicTurnId as z };
|
|
@@ -20,4 +20,6 @@ interface ConversationQueueSendResult {
|
|
|
20
20
|
interface ConversationWorkQueue {
|
|
21
21
|
send(message: ConversationQueueMessage, options?: ConversationQueueSendOptions): Promise<ConversationQueueSendResult | void>;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
/** Callback to schedule background work that must finish before the function exits. */
|
|
24
|
+
type WaitUntilFn = (task: Promise<unknown> | (() => Promise<unknown>)) => void;
|
|
25
|
+
export { ConversationQueueMessage as n, ConversationWorkQueue as r, WaitUntilFn as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ms as withSlackRetries, Ts as getSlackClient, xs as SlackActionError } from "./projection-Ce4pmhKP.js";
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
// src/chat/slack/users.ts
|
|
4
4
|
const profileFieldsSchema = z.object({ fields: z.record(z.string(), z.object({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
|
|
2
|
-
import { n as pluginCatalogRuntime } from "./catalog-runtime-
|
|
2
|
+
import { n as pluginCatalogRuntime } from "./catalog-runtime-Chc_IP2o.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.309.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-BYdVs12p.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { F as findActorIdentityId, J as clearCachedUser, Y as readCachedUserByEmail, o as getDb } from "./db-
|
|
2
|
-
import { B as juniorUsers, z as juniorIdentities } from "./executor-
|
|
3
|
-
import { G as normalizeIdentityEmail, U as GOOGLE_IDENTITY_PROVIDER } from "./logging-
|
|
1
|
+
import { F as findActorIdentityId, J as clearCachedUser, Y as readCachedUserByEmail, o as getDb } from "./db-CFUpEZi9.js";
|
|
2
|
+
import { B as juniorUsers, z as juniorIdentities } from "./executor-DXL0O0MV.js";
|
|
3
|
+
import { G as normalizeIdentityEmail, U as GOOGLE_IDENTITY_PROVIDER } from "./logging-BNUovdcX.js";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
|
-
import { and, asc, eq, inArray, isNotNull } from "drizzle-orm";
|
|
6
5
|
import { identitySchema, userSchema } from "@sentry/junior-plugin-api";
|
|
6
|
+
import { and, asc, eq, inArray, isNotNull } from "drizzle-orm";
|
|
7
7
|
// src/chat/identities/avatar.ts
|
|
8
8
|
/**
|
|
9
9
|
* Profile photos of people, saved on their native Slack and Google
|
|
@@ -180,7 +180,9 @@ async function setUserAdminFromSql(db, email, isAdmin) {
|
|
|
180
180
|
/** List every Junior admin by primary email. */
|
|
181
181
|
async function listAdminUsersFromSql(db) {
|
|
182
182
|
const rows = await db.select().from(juniorUsers).where(eq(juniorUsers.isAdmin, true)).orderBy(asc(juniorUsers.primaryEmailNormalized));
|
|
183
|
-
|
|
183
|
+
if (rows.length === 0) return [];
|
|
184
|
+
const identityRows = await db.select().from(juniorIdentities).where(and(inArray(juniorIdentities.userId, rows.map((row) => row.id)), eq(juniorIdentities.kind, "user"))).orderBy(asc(juniorIdentities.provider), asc(juniorIdentities.providerTenantId), asc(juniorIdentities.providerSubjectId));
|
|
185
|
+
return rows.map((row) => userFromRows(row, identityRows.filter((identity) => identity.userId === row.id)));
|
|
184
186
|
}
|
|
185
187
|
/** Resolve the stored identity and linked user for one runtime actor. */
|
|
186
188
|
async function readActorIdentityFromSql(db, actor) {
|