@sentry/junior 0.272.0 → 0.273.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.
Files changed (70) hide show
  1. package/dist/{adapter-BDYDi1F9.js → adapter-umap1cth.js} +1 -1
  2. package/dist/{admin-Dj7EFycG.js → admin-0o6E_3lo.js} +1 -1
  3. package/dist/{agent-runner-Cl6Usx2Y.js → agent-runner-D7Qz-lGO.js} +517 -298
  4. package/dist/api/schema.d.ts +1 -1
  5. package/dist/api/schema.js +4 -4
  6. package/dist/api.d.ts +1 -1
  7. package/dist/api.js +56 -573
  8. package/dist/{app-DjZblE2J.d.ts → app-BcyhJq8x.d.ts} +4 -9
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +673 -127
  11. package/dist/{assistant-reply-DN2w6JL_.js → assistant-reply-wZ7i4OFa.js} +1 -1
  12. package/dist/{automation-CV7g5h3A.js → automation-yffXcZt9.js} +1 -1
  13. package/dist/{briefs-PysAqnjV.js → briefs-CgMnlpIp.js} +4 -4
  14. package/dist/{catalog-runtime-BNeCWIaF.js → catalog-runtime-TygDsPOU.js} +1 -1
  15. package/dist/cli/chat.js +15 -15
  16. package/dist/cli/check.js +3 -3
  17. package/dist/cli/init.js +1 -1
  18. package/dist/cli/main.js +3 -3
  19. package/dist/cli/plugins.js +4 -4
  20. package/dist/cli/snapshot-create.js +4 -4
  21. package/dist/cli/upgrade.d.ts +1 -1
  22. package/dist/cli/upgrade.js +3 -3
  23. package/dist/{client-FRphcDWW.js → client-DhqbV0Fe.js} +63 -5
  24. package/dist/{reporting-schema-CZREhYc-.js → common-Eu6sx09c.js} +4 -1
  25. package/dist/{config-BUP9wjiR.js → config-C6FTd7PX.js} +6 -14
  26. package/dist/{connections-CesHau9u.js → connections-Dq72KajR.js} +11 -11
  27. package/dist/{conversation-BtQzLoK8.js → conversation-T4oabbBi.js} +10 -0
  28. package/dist/{conversation-privacy-DiGvA9a3.js → conversation-privacy-BeRgrsph.js} +1 -1
  29. package/dist/{credential-sync-D2odJC30.js → credential-sync-BmCbHAp4.js} +15 -16
  30. package/dist/{db-BPLmOwXf.d.ts → db-DOzBGLn5.d.ts} +1 -1
  31. package/dist/{executor-DGDpyegI.js → executor-BafgvQcc.js} +2 -2
  32. package/dist/instrumentation.js +114 -3
  33. package/dist/{job-queue-CjB97sii.js → job-queue-C4lphW9Y.js} +3 -3
  34. package/dist/{logging-CjkDr-jP.js → logging-CNs1e04n.js} +6 -1
  35. package/dist/{message-D9y8PKA1.js → message-CETC5lsl.js} +9 -9
  36. package/dist/nitro.d.ts +1 -1
  37. package/dist/nitro.js +3 -3
  38. package/dist/{oauth-callback-server-02Pej6hj.js → oauth-callback-server-DcQZsKMm.js} +2 -2
  39. package/dist/{credentialed-CgTulRDH.js → projection-BOpi891B.js} +4576 -49
  40. package/dist/{prompt-vfceH0c-.js → prompt-B1ySjUyf.js} +1 -1
  41. package/dist/{registry-7XgwNgQe.js → registry-B-yUrv3h.js} +2 -2
  42. package/dist/{resolve-CuuxNfWG.js → resolve-DqVtd4Q9.js} +3 -3
  43. package/dist/{result-BRhb6iN1.js → result-DQwTiLTw.js} +9 -9
  44. package/dist/{runner-DaWCofuS.js → runner-Dco5qMq6.js} +11 -11
  45. package/dist/{sandbox-egress-signals-Bn6FA1UC.js → sandbox-egress-signals-DFc_9Mcv.js} +1 -1
  46. package/dist/{schema-D5VLF4NT.js → schema-5xHDGlBW.js} +9 -7
  47. package/dist/{schema-CNjAzYOw.d.ts → schema-9OGdsaxF.d.ts} +13 -0
  48. package/dist/{service-account-D9vrsi8d.js → service-account-CWfk9Cs-.js} +3 -3
  49. package/dist/{service-account-H45LIAG2.js → service-account-smdPFWNy.js} +3 -3
  50. package/dist/{session-stop-HKl0ECX0.js → session-stop-DaT_7tYa.js} +11 -11
  51. package/dist/{skills-CsiKu3-g.js → skills-BbtJSF2-.js} +2 -2
  52. package/dist/{spawn-DqjBxqWh.js → spawn-Ceikdjkp.js} +2 -2
  53. package/dist/{list-JZUP1yog.js → stop-dKUc-x2K.js} +996 -432
  54. package/dist/{store-DyVKH0QB.js → store-C1xuZcLd.js} +4 -4
  55. package/dist/{store-CPF2kzbu.js → store-DaxUuOmD.js} +3 -3
  56. package/dist/{task-queue-BbQXCcNX.js → task-queue-ymAh_-P1.js} +4 -4
  57. package/dist/{task-runner-ChzW5E7R.js → task-runner-vlH6pEm3.js} +6 -6
  58. package/dist/{thread-state-Ds8JTsX6.js → thread-state-BkUpE9Ae.js} +4 -5
  59. package/dist/{turn-failure-response-DCMvjsA0.js → turn-failure-response-DIsD7ip_.js} +7 -8
  60. package/dist/{turn-lifecycle-DM_77q33.js → turn-lifecycle-BdPKdPS8.js} +1 -1
  61. package/dist/turn-session-routing-BdCTDq9m.js +1625 -0
  62. package/dist/{validation-DcGelbBi.js → validation-BQjCfh84.js} +1 -1
  63. package/dist/{version-C48azPKq.js → version-BpiFGZZW.js} +1 -1
  64. package/dist/version.js +1 -1
  65. package/dist/{viewer-BCRuO8Wg.js → viewer-C6Y1aXjZ.js} +27 -15
  66. package/dist/{work-zxkmbJAp.js → work-ChPh_YEh.js} +10 -38
  67. package/dist/{worker-CNNxHF1V.js → worker-Be_sK_ou.js} +6 -6
  68. package/package.json +4 -4
  69. package/dist/turn-session-routing-BV_gX7n3.js +0 -6072
  70. package/dist/{oauth-relay-CTygMkNx.js → oauth-relay-C6ZAyJgf.js} +1 -1
@@ -1,4 +1,4 @@
1
- import { _r as extractAssistantText } from "./turn-session-routing-BV_gX7n3.js";
1
+ import { qt as extractAssistantText } from "./projection-BOpi891B.js";
2
2
  // src/chat/no-reply.ts
3
3
  const NO_REPLY_MARKER = "[[NO_REPLY]]";
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { a as resolveLocalScheduleAtMs, i as isValidTimeZone, r as getZonedDateTimeParts, t as getFirstRunAtMs } from "./cadence-R7Em4RjE.js";
2
- import { n as actorIdentitySchema } from "./conversation-BtQzLoK8.js";
2
+ import { n as actorIdentitySchema } from "./conversation-T4oabbBi.js";
3
3
  import { z } from "zod";
4
4
  import { actorUserIdSchema, destinationVisibilitySchema, eventMatchFieldsSchema, eventMatchSchema, eventReachSchema, eventTypeSchema, pluginEventTypeSchema, slackDestinationSchema, taskOutcomeSchema } from "@sentry/junior-plugin-api";
5
5
  // src/chat/scheduled-automations/schedule-intent.ts
@@ -1,7 +1,7 @@
1
- import { i as completeObject } from "./client-FRphcDWW.js";
1
+ import { i as completeObject } from "./client-DhqbV0Fe.js";
2
2
  import { i as defaultModelId } from "./model-profile-B998sjVd.js";
3
- import { K as briefCodeChangeSchema, X as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-BtQzLoK8.js";
4
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-vfceH0c-.js";
3
+ import { K as briefCodeChangeSchema, X as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema } from "./conversation-T4oabbBi.js";
4
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-B1ySjUyf.js";
5
5
  import { CLI_USAGE } from "./cli/run.js";
6
6
  import path from "node:path";
7
7
  import { z } from "zod";
@@ -267,7 +267,7 @@ async function parseRunOptions(argv) {
267
267
  * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
268
268
  */
269
269
  async function configuredDefaultModelId() {
270
- const { botConfig } = await import("./config-BUP9wjiR.js").then((n) => n.r);
270
+ const { botConfig } = await import("./config-C6FTd7PX.js").then((n) => n.r);
271
271
  return defaultModelId(botConfig);
272
272
  }
273
273
  function apiUrl(baseUrl, pathname) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-7XgwNgQe.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-B-yUrv3h.js";
3
3
  // src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
package/dist/cli/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-Cl6Usx2Y.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-D7Qz-lGO.js";
2
2
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -99,10 +99,10 @@ async function loadLocalPluginSet() {
99
99
  async function configureLocalChatPlugins(pluginSet) {
100
100
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
101
101
  import("../plugins-DOm9Y6qI.js").then((n) => n.o),
102
- import("../credentialed-CgTulRDH.js").then((n) => n.a),
103
- import("../catalog-runtime-BNeCWIaF.js").then((n) => n.t),
104
- import("../validation-DcGelbBi.js").then((n) => n.r),
105
- import("../viewer-BCRuO8Wg.js").then((n) => n.v)
102
+ import("../projection-BOpi891B.js").then((n) => n.Tn),
103
+ import("../catalog-runtime-TygDsPOU.js").then((n) => n.t),
104
+ import("../validation-BQjCfh84.js").then((n) => n.r),
105
+ import("../viewer-C6Y1aXjZ.js").then((n) => n.v)
106
106
  ]);
107
107
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
108
108
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -152,18 +152,18 @@ function localDevServerUrl() {
152
152
  async function prepareLocalChatRun(io, pluginSet) {
153
153
  defaultStateAdapterForLocalChat();
154
154
  await configureLocalChatPlugins(pluginSet);
155
- const { setBriefsConfig } = await import("../credentialed-CgTulRDH.js").then((n) => n._);
155
+ const { setBriefsConfig } = await import("../projection-BOpi891B.js").then((n) => n.Ln);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-DaWCofuS.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-02Pej6hj.js");
159
- const { createLocalOAuthState } = await import("../oauth-relay-CTygMkNx.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-Bn6FA1UC.js");
161
- const { bindSpawnAgent } = await import("../spawn-DqjBxqWh.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-D9y8PKA1.js").then((n) => n.n);
163
- const { createChildConversationWorker } = await import("../result-BRhb6iN1.js").then((n) => n.i);
164
- const { skipInputBeforeConversationStop } = await import("../session-stop-HKl0ECX0.js").then((n) => n.r);
157
+ const { runLocalAgentTurn } = await import("../runner-Dco5qMq6.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DcQZsKMm.js");
159
+ const { createLocalOAuthState } = await import("../oauth-relay-C6ZAyJgf.js").then((n) => n.t);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DFc_9Mcv.js");
161
+ const { bindSpawnAgent } = await import("../spawn-Ceikdjkp.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-CETC5lsl.js").then((n) => n.n);
163
+ const { createChildConversationWorker } = await import("../result-DQwTiLTw.js").then((n) => n.i);
164
+ const { skipInputBeforeConversationStop } = await import("../session-stop-DaT_7tYa.js").then((n) => n.r);
165
165
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
166
- const { processConversationWork } = await import("../worker-CNNxHF1V.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-Be_sK_ou.js").then((n) => n.n);
167
167
  let agentRunner;
168
168
  const localConversationWork = createLocalConversationWork(async (message) => {
169
169
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, k as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CjkDr-jP.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-7XgwNgQe.js";
3
- import { i as parseSkillFile } from "../skills-CsiKu3-g.js";
1
+ import { D as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, P as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, k as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CNs1e04n.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-B-yUrv3h.js";
3
+ import { i as parseSkillFile } from "../skills-BbtJSF2-.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
package/dist/cli/init.js CHANGED
@@ -156,7 +156,6 @@ async function runInit(dir, log = console.log) {
156
156
  SLACK_SIGNING_SECRET=
157
157
  JUNIOR_SECRET=
158
158
  JUNIOR_BOT_NAME=
159
- JUNIOR_CROSS_ACTOR_MID_RUN_MODE=
160
159
  AI_MODEL=
161
160
  AI_FAST_MODEL=
162
161
  AI_GUARDIAN_MODEL=
@@ -164,6 +163,7 @@ AI_HANDOFF_MODEL=
164
163
  AI_MODEL_PROFILES=
165
164
  AI_MEMORY_MODEL=
166
165
  AI_EMBEDDING_MODEL=
166
+ AI_RERANKING_MODEL=
167
167
  AI_VISION_MODEL=
168
168
  AI_WEB_SEARCH_MODEL=
169
169
  DATABASE_URL=
package/dist/cli/main.js CHANGED
@@ -25,13 +25,13 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-Dj7EFycG.js")).runAdmin(argv);
28
+ return await (await import("../admin-0o6E_3lo.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-D9vrsi8d.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-CWfk9Cs-.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-PysAqnjV.js")).runBriefs(argv);
34
+ return await (await import("../briefs-CgMnlpIp.js")).runBriefs(argv);
35
35
  }
36
36
  function topLevelCommand(argv) {
37
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,7 +1,7 @@
1
- import { S as getDb } from "../viewer-BCRuO8Wg.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BNeCWIaF.js";
3
- import { ar as createPluginLogger, h as validatePlugins, m as setPlugins } from "../credentialed-CgTulRDH.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DcGelbBi.js";
1
+ import { Ca as createPluginLogger, Fn as validatePlugins, Pn as setPlugins } from "../projection-BOpi891B.js";
2
+ import { S as getDb } from "../viewer-C6Y1aXjZ.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-TygDsPOU.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BQjCfh84.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
@@ -1,7 +1,7 @@
1
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BNeCWIaF.js";
2
- import { nt as create } from "../credentialed-CgTulRDH.js";
3
- import { t as disconnectStateAdapter } from "../adapter-BDYDi1F9.js";
4
- import { n as resolve } from "../resolve-CuuxNfWG.js";
1
+ import { Sr as create } from "../projection-BOpi891B.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-TygDsPOU.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-umap1cth.js";
4
+ import { n as resolve } from "../resolve-DqVtd4Q9.js";
5
5
  // src/cli/snapshot-create.ts
6
6
  const DEFAULT_RUNTIME = "node22";
7
7
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,4 +1,4 @@
1
- import "../db-BPLmOwXf.js";
1
+ import "../db-DOzBGLn5.js";
2
2
  import { n as JuniorPluginSet } from "../plugins-B_0Cr0MO.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-BUP9wjiR.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-DGDpyegI.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-7XgwNgQe.js";
1
+ import { i as getChatConfig } from "../config-C6FTd7PX.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-BafgvQcc.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-B-yUrv3h.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,10 +1,10 @@
1
- import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CjkDr-jP.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-DiGvA9a3.js";
1
+ import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CNs1e04n.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-BeRgrsph.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
6
6
  import { getVercelOidcToken } from "@vercel/oidc";
7
- import { Experimental_DecisionRefusalError, NoObjectGeneratedError, embedMany, experimental_decide, generateObject } from "ai";
7
+ import { Experimental_DecisionRefusalError, NoObjectGeneratedError, embedMany, experimental_decide, generateObject, rerank } from "ai";
8
8
  // src/chat/optional-string.ts
9
9
  /**
10
10
  * Normalize optional env-style strings so blank values do not masquerade as
@@ -405,6 +405,7 @@ const GEN_AI_PROVIDER_NAME = GATEWAY_PROVIDER;
405
405
  const GEN_AI_SERVER_ADDRESS = "ai-gateway.vercel.sh";
406
406
  const GEN_AI_OPERATION_CHAT = "chat";
407
407
  const GEN_AI_OPERATION_EMBEDDINGS = "embeddings";
408
+ const GEN_AI_OPERATION_RERANK = "rerank";
408
409
  const GEN_AI_OPERATION_DECIDE = "decide";
409
410
  const EMBEDDING_INPUT_COST_USD_PER_MILLION_TOKENS = {
410
411
  "cohere/embed-v4.0": .12,
@@ -439,7 +440,13 @@ function extractText(message) {
439
440
  function resolveGatewayModel(modelId) {
440
441
  const matched = GATEWAY_MODEL_OVERRIDES[modelId] ?? getModels(GATEWAY_PROVIDER).find((model) => model.id === modelId);
441
442
  if (!matched) throw new Error(`Unknown AI Gateway model id: ${modelId}`);
442
- return matched;
443
+ return {
444
+ ...matched,
445
+ compat: {
446
+ ...matched.compat,
447
+ sendSessionAffinityHeaders: true
448
+ }
449
+ };
443
450
  }
444
451
  /** Execute a direct chat completion inside a dedicated `gen_ai.chat` span. */
445
452
  async function completeText(params) {
@@ -728,4 +735,55 @@ async function embedTexts(params) {
728
735
  throw providerError;
729
736
  }
730
737
  }
731
- export { toOptionalTrimmed as S, getProviderErrorAttributes as _, completeText as a, getGatewayApiKey as b, COMPACTION_SUMMARY_PREFIX as c, renderCurrentInstruction as d, unwrapCurrentInstruction as f, findProviderError as g, createProviderError as h, completeObject as i, hasCompactedConversationContext as l, ProviderError as m, GEN_AI_SERVER_ADDRESS as n, embedTexts as o, escapeXml as p, completeDecision as r, resolveGatewayModel as s, GEN_AI_PROVIDER_NAME as t, isCompactionSummaryText as u, getProviderErrorUserMessage as v, resolveGatewayCredential as x, isProviderRetryError as y };
738
+ /** Read the billed cost that AI Gateway reports in provider metadata. */
739
+ function gatewayCostUsd(providerMetadata) {
740
+ const cost = providerMetadata?.gateway?.cost;
741
+ const value = typeof cost === "string" ? Number(cost) : cost;
742
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
743
+ }
744
+ /** Score documents against one query through the host-owned AI Gateway provider. */
745
+ async function rerankTexts(params) {
746
+ const query = params.query.trim();
747
+ if (!query || params.documents.length === 0) throw new Error("Reranking query and documents are required.");
748
+ const credential = await resolveGatewayCredential();
749
+ const provider = createGatewayProvider({ apiKey: credential.token });
750
+ try {
751
+ return await withSpan(`${GEN_AI_OPERATION_RERANK} ${params.modelId}`, "gen_ai.rerank", logContextFromMetadata(params.modelId, params.metadata), async (setSpanAttributes) => {
752
+ const result = await rerank({
753
+ model: provider.rerankingModel(params.modelId),
754
+ query,
755
+ documents: params.documents
756
+ });
757
+ const scores = params.documents.map(() => NaN);
758
+ for (const { originalIndex, score } of result.ranking) scores[originalIndex] = score;
759
+ if (result.ranking.length !== params.documents.length || !scores.every(Number.isFinite)) throw createProviderError("Reranking provider returned invalid scores.", {
760
+ kind: "invalid_response",
761
+ modelId: params.modelId
762
+ });
763
+ const costUsd = gatewayCostUsd(result.providerMetadata);
764
+ if (costUsd !== void 0) setSpanAttributes(extractGenAiUsageAttributes({ cost: { total: costUsd } }));
765
+ return {
766
+ ...costUsd !== void 0 ? { costUsd } : void 0,
767
+ scores
768
+ };
769
+ }, {
770
+ "gen_ai.provider.name": GEN_AI_PROVIDER_NAME,
771
+ "gen_ai.operation.name": GEN_AI_OPERATION_RERANK,
772
+ "gen_ai.request.model": params.modelId,
773
+ "server.address": GEN_AI_SERVER_ADDRESS,
774
+ "server.port": 443,
775
+ "gen_ai.provider.auth_mode": credential.mode,
776
+ "app.rerank.document.count": params.documents.length
777
+ });
778
+ } catch (error) {
779
+ const providerError = createProviderError(error, { modelId: params.modelId });
780
+ if (isProviderRetryError(providerError)) throw providerError;
781
+ logException(providerError, "ai.rerank.failed", {
782
+ "gen_ai.provider.name": GEN_AI_PROVIDER_NAME,
783
+ "gen_ai.operation.name": GEN_AI_OPERATION_RERANK,
784
+ "gen_ai.request.model": params.modelId
785
+ });
786
+ throw providerError;
787
+ }
788
+ }
789
+ export { toOptionalTrimmed as C, resolveGatewayCredential as S, findProviderError as _, completeText as a, isProviderRetryError as b, resolveGatewayModel as c, isCompactionSummaryText as d, renderCurrentInstruction as f, createProviderError as g, ProviderError as h, completeObject as i, COMPACTION_SUMMARY_PREFIX as l, escapeXml as m, GEN_AI_SERVER_ADDRESS as n, embedTexts as o, unwrapCurrentInstruction as p, completeDecision as r, rerankTexts as s, GEN_AI_PROVIDER_NAME as t, hasCompactedConversationContext as u, getProviderErrorAttributes as v, getGatewayApiKey as x, getProviderErrorUserMessage as y };
@@ -101,4 +101,7 @@ const pluginOperationalReportFeedSchema = z.object({
101
101
  reports: z.array(pluginOperationalReportSchema),
102
102
  source: z.literal("plugins")
103
103
  }).strict();
104
- export { pluginPackageContentReportSchema as a, runtimeInfoReportSchema as c, pluginPackageContentItemReportSchema as i, skillReportSchema as l, pluginOperationalReportFeedSchema as n, pluginSchema as o, pluginOperationalReportSchema as r, pluginsSchema as s, healthReportSchema as t, skillReportsSchema as u };
104
+ // src/api/schema/common.ts
105
+ /** Stable error body returned by Junior-owned REST endpoints. */
106
+ const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
107
+ export { pluginPackageContentItemReportSchema as a, pluginsSchema as c, skillReportsSchema as d, pluginOperationalReportSchema as i, runtimeInfoReportSchema as l, healthReportSchema as n, pluginPackageContentReportSchema as o, pluginOperationalReportFeedSchema as r, pluginSchema as s, apiErrorSchema as t, skillReportSchema as u };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { S as toOptionalTrimmed, s as resolveGatewayModel } from "./client-FRphcDWW.js";
3
- import { h as logWarn } from "./logging-CjkDr-jP.js";
2
+ import { C as toOptionalTrimmed, c as resolveGatewayModel } from "./client-DhqbV0Fe.js";
3
+ import { h as logWarn } from "./logging-CNs1e04n.js";
4
4
  import { c as modelProfileSchema, d as parseTurnReasoningLevel, t as DEFAULT_MODEL_PROFILES, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
5
5
  import { AwsClient } from "aws4fetch";
6
6
  // src/chat/attachments/s3.ts
@@ -149,7 +149,6 @@ var config_exports = /* @__PURE__ */ __exportAll({
149
149
  resetRuntimeConfig: () => resetRuntimeConfig,
150
150
  restoreRuntimeConfig: () => restoreRuntimeConfig,
151
151
  setBotModelConfig: () => setBotModelConfig,
152
- setCrossActorMidRunMode: () => setCrossActorMidRunMode,
153
152
  setProfiles: () => setProfiles,
154
153
  setRuntimeLimits: () => setRuntimeLimits,
155
154
  setSlackReactionConfig: () => setSlackReactionConfig,
@@ -252,11 +251,6 @@ function parseConversationWorkEnabled(rawValue) {
252
251
  if (value === "false") return false;
253
252
  throw new Error("JUNIOR_CONVERSATION_WORK_ENABLED must be true or false");
254
253
  }
255
- function parseCrossActorMidRunMode(rawValue) {
256
- const value = toOptionalTrimmed(rawValue) ?? "follow_up";
257
- if (value === "follow_up" || value === "steer") return value;
258
- throw new Error("JUNIOR_CROSS_ACTOR_MID_RUN_MODE must be follow_up or steer");
259
- }
260
254
  const DEFAULT_MODEL_ID = resolveGatewayModel(DEFAULT_MODEL_PROFILES.standard.modelId).id;
261
255
  const DEFAULT_FAST_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
262
256
  const DEFAULT_GUARDIAN_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
@@ -264,6 +258,7 @@ const DEFAULT_HANDOFF_MODEL_ID = resolveGatewayModel(DEFAULT_MODEL_PROFILES.hand
264
258
  const DEFAULT_WEB_SEARCH_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
265
259
  const DEFAULT_DECISION_MODEL_ID = "typesafe-ai/jev";
266
260
  const DEFAULT_EMBEDDING_MODEL_ID = "openai/text-embedding-3-small";
261
+ const DEFAULT_RERANKING_MODEL_ID = "voyage/rerank-2.5-lite";
267
262
  const DEFAULT_IMAGE_GENERATION_MODEL_ID = "openai/gpt-image-2";
268
263
  const DEFAULT_VISION_MODEL_ID = resolveGatewayModel("openai/gpt-5.6-sol").id;
269
264
  function validateGatewayModelId(raw) {
@@ -374,7 +369,6 @@ function readBotConfig(env, functionMaxDurationSeconds) {
374
369
  return {
375
370
  userName: toOptionalTrimmed(env.JUNIOR_BOT_NAME) ?? "junior",
376
371
  defaultProfile: "standard",
377
- crossActorMidRunMode: parseCrossActorMidRunMode(env.JUNIOR_CROSS_ACTOR_MID_RUN_MODE),
378
372
  profiles: parseProfiles(env.AI_MODEL_PROFILES, modelId, handoffModelId),
379
373
  contextWindowTokens: parseOptionalPositiveInteger("AI_MODEL_CONTEXT_WINDOW_TOKENS", env.AI_MODEL_CONTEXT_WINDOW_TOKENS) ?? DEFAULT_MODEL_CONTEXT_WINDOW_TOKENS,
380
374
  reasoningLevel: reasoningLevel === void 0 ? void 0 : parseTurnReasoningLevel(reasoningLevel),
@@ -383,6 +377,7 @@ function readBotConfig(env, functionMaxDurationSeconds) {
383
377
  guardianModelId,
384
378
  imageGenerationModelId: toOptionalTrimmed(env.AI_IMAGE_MODEL) ?? DEFAULT_IMAGE_GENERATION_MODEL_ID,
385
379
  embeddingModelId: validateEmbeddingModelId(env.AI_EMBEDDING_MODEL) ?? DEFAULT_EMBEDDING_MODEL_ID,
380
+ rerankingModelId: toOptionalTrimmed(env.AI_RERANKING_MODEL) ?? DEFAULT_RERANKING_MODEL_ID,
386
381
  loadingMessages: parseLoadingMessages(env.JUNIOR_LOADING_MESSAGES),
387
382
  visionModelId: env.AI_VISION_MODEL === void 0 ? DEFAULT_VISION_MODEL_ID : validateGatewayModelId(env.AI_VISION_MODEL),
388
383
  maxAgentDepth: 0,
@@ -515,10 +510,6 @@ function setRuntimeLimits(limits) {
515
510
  if (limits?.maxTurnCostUsd !== void 0) bot.maxTurnCostUsd = requirePositiveLimit("maxTurnCostUsd", limits.maxTurnCostUsd);
516
511
  if (limits?.turnTimeoutMs !== void 0) bot.turnTimeoutMs = Math.min(requirePositiveLimit("turnTimeoutMs", limits.turnTimeoutMs), resolveMaxTurnTimeoutMs(chatConfig.functionMaxDurationSeconds));
517
512
  }
518
- /** Apply the Slack cross-actor steering mode from createApp(). */
519
- function setCrossActorMidRunMode(mode) {
520
- chatConfig.bot.crossActorMidRunMode = parseCrossActorMidRunMode(mode);
521
- }
522
513
  /** Return the chat configuration (parsed once at startup). */
523
514
  function getChatConfig() {
524
515
  return chatConfig;
@@ -547,6 +538,7 @@ function setBotModelConfig(config) {
547
538
  if (config.embeddingModelId !== void 0) botConfig.embeddingModelId = requireModelId("embeddingModelId", config.embeddingModelId, validateEmbeddingModelId);
548
539
  if (config.fastModelId !== void 0) botConfig.fastModelId = requireModelId("fastModelId", config.fastModelId, validateGatewayModelId);
549
540
  if (config.guardianModelId !== void 0) botConfig.guardianModelId = requireModelId("guardianModelId", config.guardianModelId, validateGatewayModelId);
541
+ if (config.rerankingModelId !== void 0) botConfig.rerankingModelId = requireModelId("rerankingModelId", config.rerankingModelId, toOptionalTrimmed);
550
542
  if (config.imageGenerationModelId !== void 0) botConfig.imageGenerationModelId = requireModelId("imageGenerationModelId", config.imageGenerationModelId, validateEmbeddingModelId);
551
543
  if (config.visionModelId !== void 0) botConfig.visionModelId = requireModelId("visionModelId", config.visionModelId, validateGatewayModelId);
552
544
  if (config.webSearchModelId !== void 0) botConfig.webSearchModelId = requireModelId("webSearchModelId", config.webSearchModelId, validateGatewayModelId);
@@ -566,4 +558,4 @@ function setSlackReactionConfig(overrides) {
566
558
  if (overrides.processingReactionEmoji !== void 0) chatConfig.slack.processingReactionEmoji = parseReactionEmoji("processingReactionEmoji", overrides.processingReactionEmoji, chatConfig.slack.processingReactionEmoji);
567
559
  if (overrides.completedReactionEmoji !== void 0) chatConfig.slack.completedReactionEmoji = parseReactionEmoji("completedReactionEmoji", overrides.completedReactionEmoji, chatConfig.slack.completedReactionEmoji);
568
560
  }
569
- export { snapshotRuntimeConfig as _, getRuntimeMetadata as a, getSlackClientSecret as c, restoreRuntimeConfig as d, setBotModelConfig as f, setSlackReactionConfig as g, setRuntimeLimits as h, getChatConfig as i, getSlackSigningSecret as l, setProfiles as m, botConfig as n, getSlackBotToken as o, setCrossActorMidRunMode as p, config_exports as r, getSlackClientId as s, DEFAULT_SQL_STATEMENT_TIMEOUT_MS as t, resetRuntimeConfig as u, normalizeSlackEmojiName as v, createS3AttachmentStorage as y };
561
+ export { normalizeSlackEmojiName as _, getRuntimeMetadata as a, getSlackClientSecret as c, restoreRuntimeConfig as d, setBotModelConfig as f, snapshotRuntimeConfig as g, setSlackReactionConfig as h, getChatConfig as i, getSlackSigningSecret as l, setRuntimeLimits as m, botConfig as n, getSlackBotToken as o, setProfiles as p, config_exports as r, getSlackClientId as s, DEFAULT_SQL_STATEMENT_TIMEOUT_MS as t, resetRuntimeConfig as u, createS3AttachmentStorage as v };
@@ -1,15 +1,15 @@
1
- import { Cn as loadTurnCheckpoint, Dn as failTurnRecord, On as getTurnRecord, n as resolveTurnSessionRouting } from "./turn-session-routing-BV_gX7n3.js";
2
- import { n as botConfig } from "./config-BUP9wjiR.js";
3
- import { C as getSqlExecutor, F as deleteProviderIdentityForUser, P as deleteProviderIdentityForSlackUser, y as getConversationEventStore } from "./viewer-BCRuO8Wg.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-7XgwNgQe.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BNeCWIaF.js";
6
- import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-Cl6Usx2Y.js";
7
- import { pt as startOAuthFlow } from "./credentialed-CgTulRDH.js";
8
- import { r as getStateAdapter } from "./adapter-BDYDi1F9.js";
9
- import { a as getVercelConversationWorkQueue } from "./job-queue-CjB97sii.js";
10
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-CPF2kzbu.js";
11
- import { z } from "zod";
1
+ import { $ as loadTurnCheckpoint, Nr as startOAuthFlow, it as getTurnRecord, rt as failTurnRecord } from "./projection-BOpi891B.js";
2
+ import { n as botConfig } from "./config-C6FTd7PX.js";
3
+ import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } from "./viewer-C6Y1aXjZ.js";
4
+ import { u as hasRequiredOAuthScope } from "./registry-B-yUrv3h.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-TygDsPOU.js";
6
+ import { c as deleteMcpServerSessionId, l as deleteMcpStoredOAuthCredentials, s as deleteMcpAuthSessionsForUserProvider } from "./agent-runner-D7Qz-lGO.js";
7
+ import { r as getStateAdapter } from "./adapter-umap1cth.js";
8
+ import { a as getVercelConversationWorkQueue } from "./job-queue-C4lphW9Y.js";
9
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-DaxUuOmD.js";
10
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-BdCTDq9m.js";
12
11
  import { randomBytes, randomUUID } from "node:crypto";
12
+ import { z } from "zod";
13
13
  // src/chat/task-execution/authorized-turn.ts
14
14
  /**
15
15
  * OAuth callbacks save readiness, not agent history. The conversation worker
@@ -314,6 +314,8 @@ const conversationPendingMessageDeliverySchema = z.enum(["defer", "interrupt"]);
314
314
  /** One accepted mailbox message that has not reached durable history yet. */
315
315
  const conversationPendingMessageSchema = z.object({
316
316
  actorIdentity: actorIdentitySchema.optional(),
317
+ /** Identity id of the author. Detail `authors` maps it to the person. */
318
+ actorIdentityId: z.string().min(1).optional(),
317
319
  createdAt: z.string().datetime(),
318
320
  delivery: conversationPendingMessageDeliverySchema,
319
321
  inboundMessageId: z.string().min(1),
@@ -471,6 +473,8 @@ const conversationReportMessageEventDataSchema = z.object({
471
473
  ]),
472
474
  source: z.enum(["slack", "web"]).optional(),
473
475
  actorIdentity: actorIdentitySchema.optional(),
476
+ /** Identity id of the author. Detail `authors` maps it to the person. */
477
+ actorIdentityId: z.string().min(1).optional(),
474
478
  /** Agent invocation whose input this is. An agent wrote it, not a person. */
475
479
  agentInvocationId: z.string().min(1).optional(),
476
480
  eventType: z.string().min(1).optional(),
@@ -838,6 +842,12 @@ const conversationDetailReportSchema = conversationSummaryReportSchema.extend({
838
842
  version: z.number().int().positive()
839
843
  }).strict().optional(),
840
844
  modelUsage: z.array(conversationModelUsageSchema).optional(),
845
+ /**
846
+ * Each person who wrote in the Conversation, by each of their Identity
847
+ * ids. Messages and pending messages name their author with
848
+ * `actorIdentityId`.
849
+ */
850
+ authors: z.record(z.string(), actorIdentitySchema).optional(),
841
851
  events: z.array(conversationReportEventSchema),
842
852
  eventHistory: conversationEventHistorySchema,
843
853
  previousCursor: z.string().min(1).optional(),
@@ -1,4 +1,4 @@
1
- import { h as logWarn } from "./logging-CjkDr-jP.js";
1
+ import { h as logWarn } from "./logging-CNs1e04n.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  // src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,24 +1,23 @@
1
- import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, On as getTurnRecord, bn as getConversationPendingAuth } from "./turn-session-routing-BV_gX7n3.js";
2
- import { p as escapeXml } from "./client-FRphcDWW.js";
3
- import { a as getRuntimeMetadata, n as botConfig } from "./config-BUP9wjiR.js";
4
- import { R as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CjkDr-jP.js";
1
+ import { Ar as formatProviderLabel, Gi as getSlackClient, Kr as postSlackMessage, Mr as resolveBaseUrl, Sn as createUserTokenStore, X as getConversationPendingAuth, f as recordAuthenticationLinked, it as getTurnRecord, jr as parseOAuthStatePayload, p as recordAuthorizationCompleted, wn as resolvePluginOAuthAccount } from "./projection-BOpi891B.js";
2
+ import { m as escapeXml } from "./client-DhqbV0Fe.js";
3
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-C6FTd7PX.js";
4
+ import { R as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-CNs1e04n.js";
5
5
  import { p as parseSlackUserId } from "./actor-B4DYygOB.js";
6
- import { B as upsertLinkedIdentity, C as getSqlExecutor, I as findUserByVerifiedEmails, M as resolveActorIdentityId, o as readIdentityById } from "./viewer-BCRuO8Wg.js";
6
+ import { C as getSqlExecutor, L as findUserByVerifiedEmails, N as resolveActorIdentityId, V as upsertLinkedIdentity, o as readIdentityById } from "./viewer-C6Y1aXjZ.js";
7
7
  import { i as homeDir } from "./package-discovery-DJBompdd.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-7XgwNgQe.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BNeCWIaF.js";
10
- import { t as discoverSkills } from "./skills-CsiKu3-g.js";
11
- import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-Cl6Usx2Y.js";
12
- import { Dn as getSlackClient, Et as postSlackMessage, dt as parseOAuthStatePayload, ft as resolveBaseUrl, i as resolvePluginOAuthAccount, n as createUserTokenStore, ut as formatProviderLabel } from "./credentialed-CgTulRDH.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-B-yUrv3h.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-TygDsPOU.js";
10
+ import { t as discoverSkills } from "./skills-BbtJSF2-.js";
11
+ import { a as finalizeMcpAuthorization, d as getMcpStoredOAuthCredentials, f as putMcpStoredOAuthCredentials, o as deleteMcpAuthSession, u as getMcpAuthSession, v as lookupSlackUserProfile } from "./agent-runner-D7Qz-lGO.js";
13
12
  import { r as acquireActiveLock } from "./locks-D-0h111u.js";
14
- import { r as getStateAdapter } from "./adapter-BDYDi1F9.js";
15
- import { _ as getMcpProviderErrorAttributes } from "./service-account-H45LIAG2.js";
16
- import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-Ds8JTsX6.js";
17
- import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-CesHau9u.js";
18
- import { n as relayLocalOAuthCallback } from "./oauth-relay-CTygMkNx.js";
13
+ import { r as getStateAdapter } from "./adapter-umap1cth.js";
14
+ import { _ as getMcpProviderErrorAttributes } from "./service-account-smdPFWNy.js";
15
+ import { o as coerceThreadConversationState, r as getPersistedThreadState } from "./thread-state-BkUpE9Ae.js";
16
+ import { c as deleteWebAuthorization, i as readConnectedOAuthTokens, m as wakePausedTurn, p as wakeAuthorizedTurn, u as htmlCallbackResponse } from "./connections-Dq72KajR.js";
17
+ import { n as relayLocalOAuthCallback } from "./oauth-relay-C6ZAyJgf.js";
19
18
  import path from "node:path";
20
- import { z } from "zod";
21
19
  import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
20
+ import { z } from "zod";
22
21
  import { pluginStoredTokensSchema } from "@sentry/junior-plugin-api";
23
22
  import fs from "node:fs";
24
23
  // src/handlers/mcp-oauth-callback.ts
@@ -1,4 +1,4 @@
1
- import "./schema-CNjAzYOw.js";
1
+ import "./schema-9OGdsaxF.js";
2
2
  import { z } from "zod";
3
3
  import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
4
4
  import "drizzle-orm/pg-core";
@@ -1,5 +1,5 @@
1
- import "./config-BUP9wjiR.js";
2
- import { p as logException } from "./logging-CjkDr-jP.js";
1
+ import "./config-C6FTd7PX.js";
2
+ import { p as logException } from "./logging-CNs1e04n.js";
3
3
  import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-C1RNOCs8.js";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { sql } from "drizzle-orm";