@sentry/junior 0.277.0 → 0.279.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 (91) hide show
  1. package/dist/{adapter-BtfBHVM5.js → adapter-phTTgw7H.js} +1 -1
  2. package/dist/{admin-DzAKbZsm.js → admin-PcpJDugZ.js} +1 -1
  3. package/dist/{agent-invocations-Crs3XHhg.js → agent-invocations-CUg_SODU.js} +0 -1
  4. package/dist/{agent-runner-BsYAbniN.js → agent-runner-DwvT1BY0.js} +321 -847
  5. package/dist/api/schema.d.ts +2 -2
  6. package/dist/api/schema.js +6 -6
  7. package/dist/api.d.ts +1 -1
  8. package/dist/api.js +46 -414
  9. package/dist/{app-BjEQwNVP.d.ts → app-DVs6noo7.d.ts} +6 -27
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +460 -78
  12. package/dist/{assistant-reply-NebRGG4G.js → assistant-reply-BXfxczd7.js} +28 -6
  13. package/dist/{automation-Cql9h2vO.js → automation-BehArCcq.js} +1 -1
  14. package/dist/{background-compaction-queue-hh18yCeU.js → background-compaction-queue-CcbuLJrZ.js} +2 -2
  15. package/dist/{briefs-BBo0Eimi.js → briefs-Dd_ezwED.js} +10 -10
  16. package/dist/{catalog-runtime-DE-F4Awo.js → catalog-runtime-BWVMeZhW.js} +2 -2
  17. package/dist/cli/chat.js +16 -16
  18. package/dist/cli/check.js +3 -3
  19. package/dist/cli/init.js +0 -2
  20. package/dist/cli/main.js +4 -4
  21. package/dist/cli/plugins.js +5 -5
  22. package/dist/cli/snapshot-create.js +4 -4
  23. package/dist/cli/upgrade.d.ts +1 -1
  24. package/dist/cli/upgrade.js +4 -4
  25. package/dist/{client-DZ8HTnYH.js → client-Bpxe4vKa.js} +8 -4
  26. package/dist/{config-D5uUtrCP.js → config-C_bmRhrJ.js} +25 -100
  27. package/dist/{connections-Do24CGP5.js → connections-B2rHe5W5.js} +10 -10
  28. package/dist/{conversation-SsASlWL7.js → conversation-CIiJtx5q.js} +56 -104
  29. package/dist/conversation-pending-messages-CnBvE6-6.js +173 -0
  30. package/dist/{conversation-privacy-VuylvlKr.js → conversation-privacy-CzOfcz0U.js} +1 -1
  31. package/dist/{credential-sync-BGQK3pOa.js → credential-sync-Dal_unpv.js} +15 -15
  32. package/dist/{db-DEiwO5Sh.d.ts → db-CyLrV9C7.d.ts} +1 -1
  33. package/dist/{executor-hPfFTH0C.js → executor-BfYH-Wws.js} +6 -4
  34. package/dist/instrumentation.d.ts +12 -0
  35. package/dist/instrumentation.js +56 -23
  36. package/dist/{logging-cI3T1dNc.js → logging-CkT3_Xxp.js} +2 -2
  37. package/dist/{media-DstkkoNP.js → media-DTAA8Qs_.js} +21 -23
  38. package/dist/{message-DBwsAl7O.js → message-Q5dkgaJ5.js} +23 -29
  39. package/dist/nitro.d.ts +1 -1
  40. package/dist/nitro.js +18 -6
  41. package/dist/{oauth-callback-server-DXrnbplb.js → oauth-callback-server-BDRaqe8O.js} +2 -2
  42. package/dist/{oauth-relay-C6ZAyJgf.js → oauth-relay-D0G3T16m.js} +1 -1
  43. package/dist/{package-discovery-DJBompdd.js → package-discovery-DJhGdS4c.js} +1 -1
  44. package/dist/{plugins-DOm9Y6qI.js → plugins-HYh_JOdw.js} +1 -1
  45. package/dist/{projection-7EFIqzuj.js → projection-DWxX7pb1.js} +214 -138
  46. package/dist/{prompt-oRfGsxd3.js → prompt--dwus7Y-.js} +1 -1
  47. package/dist/proxy-path-BHYoKZdq.js +15 -0
  48. package/dist/{registry-Bzefs7kT.js → registry-DnrdeO4s.js} +2 -2
  49. package/dist/{resolve-CuiEY_2u.js → resolve-C_QXfqD_.js} +3 -3
  50. package/dist/{result-DrcUtFaD.js → result-DNmOxT-N.js} +10 -10
  51. package/dist/{runner-CDE4CZ52.js → runner-zd_noJ1l.js} +11 -11
  52. package/dist/{sandbox-egress-signals-0tcmGd13.js → sandbox-egress-signals-DQjv-nbG.js} +1 -1
  53. package/dist/{schema-Dzi3lkdP.js → schema-CNJNzvr8.js} +4 -4
  54. package/dist/{schema-B6N2nc6v.d.ts → schema-e90H5FIN.d.ts} +2176 -967
  55. package/dist/sentry-BRTJqumy.js +51 -0
  56. package/dist/sentry-DrKC2NeM.d.ts +1 -0
  57. package/dist/sentry-route-name-BhwWnfqj.js +51 -0
  58. package/dist/{service-account-BOz9pqOE.js → service-account-BK26XlHo.js} +3 -3
  59. package/dist/{service-account-DIyz_9Uh.js → service-account-CCH2Hv4h.js} +3 -3
  60. package/dist/{session-stop-0juF_BP0.js → session-stop-6Tf--T7G.js} +23 -16
  61. package/dist/{skills-CU5Is147.js → skills-BNrk8gi4.js} +4 -4
  62. package/dist/{spawn-6C9jHH4b.js → spawn-C75hAB9l.js} +3 -4
  63. package/dist/{stop-6FVG1c-r.js → stop-RYbf7PWi.js} +742 -207
  64. package/dist/{store-DtHZviJ1.js → store-CO5vGjwD.js} +9 -16
  65. package/dist/{store-DKs1WwdB.js → store-G3h2djJU.js} +3 -3
  66. package/dist/{task-queue-CcvFQE_p.js → task-queue-DlN58XeM.js} +3 -3
  67. package/dist/{task-runner-DBkNejLl.js → task-runner-B-Bdm23d.js} +22 -10
  68. package/dist/{thread-state-4hjEIkIq.js → thread-state-Cj_7Slru.js} +4 -4
  69. package/dist/{turn-failure-response-BZNLydC3.js → turn-failure-response-CE7gaoC7.js} +7 -7
  70. package/dist/{turn-lifecycle-BhqYjaa4.js → turn-lifecycle-7sXwXLJ6.js} +1 -1
  71. package/dist/{turn-session-routing-jnLOfBHJ.js → turn-session-routing-FBdaH1zf.js} +10 -10
  72. package/dist/{validation-BUFmsnKs.js → validation-DLWxEzWW.js} +2 -2
  73. package/dist/{version-DJTk0ZCE.js → version-DtQ8WFIZ.js} +1 -1
  74. package/dist/version.js +1 -1
  75. package/dist/{viewer-WY0RYE4E.js → viewer-vsM8_90o.js} +53 -22
  76. package/dist/{work-C5AKvXJV.js → work-DsoFRO_0.js} +12 -17
  77. package/dist/{worker-BcYVDVUy.js → worker-6kZEsCXs.js} +7 -7
  78. package/migrations/0077_drop_agent_invocation_model_profile.sql +1 -0
  79. package/migrations/0078_plugin_conversation_index.sql +20 -0
  80. package/migrations/0079_conversation_event_author_index.sql +20 -0
  81. package/migrations/meta/0075_snapshot.json +98 -314
  82. package/migrations/meta/0076_snapshot.json +98 -314
  83. package/migrations/meta/0077_snapshot.json +4141 -0
  84. package/migrations/meta/0078_snapshot.json +4175 -0
  85. package/migrations/meta/0079_snapshot.json +4203 -0
  86. package/migrations/meta/_journal.json +22 -1
  87. package/package.json +5 -5
  88. package/dist/common-Eu6sx09c.js +0 -107
  89. package/dist/model-profile-B998sjVd.js +0 -67
  90. package/dist/rolldown-runtime-nwUcYXjP.js +0 -27
  91. package/dist/sentry-MDkYAVPV.js +0 -23
@@ -1,12 +1,28 @@
1
- import { qt as extractAssistantText } from "./projection-7EFIqzuj.js";
1
+ import { Wt as extractAssistantText } from "./projection-DWxX7pb1.js";
2
2
  // src/chat/no-reply.ts
3
3
  const NO_REPLY_MARKER = "[[NO_REPLY]]";
4
4
  /**
5
- * True when one assistant message ends with the silence marker.
6
- * Mid-sentence mentions do not match. Detection is per message only.
5
+ * Trailing marker for a Quiet message: an Event Turn reply that Junior stores
6
+ * but does not deliver to the Location.
7
+ */
8
+ const QUIET_MARKER = "[[QUIET]]";
9
+ /**
10
+ * True when one assistant message ends with the silence marker, or is only
11
+ * the quiet marker. Mid-sentence mentions do not match. Detection is per
12
+ * message only.
7
13
  */
8
14
  function isNoReplyMarker(text) {
9
- return text.trimEnd().endsWith(NO_REPLY_MARKER);
15
+ const trimmed = text.trim();
16
+ return trimmed.endsWith("[[NO_REPLY]]") || trimmed === "[[QUIET]]";
17
+ }
18
+ /**
19
+ * Return the text before a trailing quiet marker, or undefined when the text
20
+ * does not end with one. Mid-sentence mentions do not match.
21
+ */
22
+ function stripQuietMarker(text) {
23
+ const trimmed = text.trimEnd();
24
+ if (!trimmed.endsWith("[[QUIET]]")) return void 0;
25
+ return trimmed.slice(0, -9).trimEnd();
10
26
  }
11
27
  // src/chat/services/assistant-reply.ts
12
28
  const THINKING_XML_BLOCK_PATTERN = /[ \t]*<thinking\b[^>]*>[\s\S]*?<\/thinking>[ \t]*(?:\r?\n)?/gi;
@@ -30,14 +46,20 @@ function decideReply(message) {
30
46
  const text = sanitizeAssistantText(extractAssistantText(message));
31
47
  if (!text) return { kind: "empty" };
32
48
  if (isNoReplyMarker(text)) return { kind: "suppress" };
33
- return {
49
+ const quietText = stripQuietMarker(text);
50
+ if (quietText === void 0) return {
34
51
  kind: "deliver",
35
52
  text
36
53
  };
54
+ return {
55
+ kind: "deliver",
56
+ text: quietText,
57
+ quiet: true
58
+ };
37
59
  }
38
60
  /** Return destination-visible reply text when the message is deliverable. */
39
61
  function getAssistantReplyText(message) {
40
62
  const decision = decideReply(message);
41
63
  return decision.kind === "deliver" ? decision.text : void 0;
42
64
  }
43
- export { isNoReplyMarker as a, NO_REPLY_MARKER as i, getAssistantReplyText as n, sanitizeAssistantText as r, decideReply as t };
65
+ export { QUIET_MARKER as a, NO_REPLY_MARKER as i, getAssistantReplyText as n, isNoReplyMarker as o, sanitizeAssistantText as r, decideReply as t };
@@ -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-SsASlWL7.js";
2
+ import { r as actorIdentitySchema } from "./conversation-CIiJtx5q.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,5 +1,5 @@
1
- import { i as getChatConfig } from "./config-D5uUtrCP.js";
2
- import { E as withSpan, m as logInfo, p as logException } from "./logging-cI3T1dNc.js";
1
+ import { i as getChatConfig } from "./config-C_bmRhrJ.js";
2
+ import { E as withSpan, m as logInfo, p as logException } from "./logging-CkT3_Xxp.js";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
5
5
  import { z } from "zod";
@@ -1,7 +1,6 @@
1
- import { i as completeObject } from "./client-DZ8HTnYH.js";
2
- import { i as defaultModelId } from "./model-profile-B998sjVd.js";
3
- import { G as briefCodeChangeSchema, Y as parseBriefInput, d as conversationEventPageSchema, l as conversationDetailReportSchema } from "./conversation-SsASlWL7.js";
4
- import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-oRfGsxd3.js";
1
+ import { i as completeObject } from "./client-Bpxe4vKa.js";
2
+ import { U as parseBriefInput, c as conversationDetailReportSchema, u as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-CIiJtx5q.js";
3
+ import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt--dwus7Y-.js";
5
4
  import { CLI_USAGE } from "./cli/run.js";
6
5
  import path from "node:path";
7
6
  import { z } from "zod";
@@ -255,7 +254,7 @@ async function parseRunOptions(argv) {
255
254
  }
256
255
  if (snapshots.length === 0) throw new Error(CLI_USAGE);
257
256
  return {
258
- model: model ?? await configuredDefaultModelId(),
257
+ model: model ?? await configuredBriefModelId(),
259
258
  out,
260
259
  promptFile,
261
260
  snapshots,
@@ -263,12 +262,13 @@ async function parseRunOptions(argv) {
263
262
  };
264
263
  }
265
264
  /**
266
- * Read the app default model only when a run needs it. `chat/config` reads
267
- * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
265
+ * Read the production Brief model only when a run needs it. `chat/config`
266
+ * reads `DATABASE_URL` at import, and `briefs pull` must work with only a
267
+ * token.
268
268
  */
269
- async function configuredDefaultModelId() {
270
- const { botConfig } = await import("./config-D5uUtrCP.js").then((n) => n.r);
271
- return defaultModelId(botConfig);
269
+ async function configuredBriefModelId() {
270
+ const { botConfig } = await import("./config-C_bmRhrJ.js").then((n) => n.r);
271
+ return botConfig.fastModelId;
272
272
  }
273
273
  function apiUrl(baseUrl, pathname) {
274
274
  const base = new URL(baseUrl);
@@ -1,5 +1,5 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-Bzefs7kT.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-DnrdeO4s.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-BsYAbniN.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-DwvT1BY0.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";
@@ -98,11 +98,11 @@ async function loadLocalPluginSet() {
98
98
  /** Configure plugin hooks after local chat has selected its state adapter. */
99
99
  async function configureLocalChatPlugins(pluginSet) {
100
100
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
101
- import("../plugins-DOm9Y6qI.js").then((n) => n.o),
102
- import("../projection-7EFIqzuj.js").then((n) => n.Mn),
103
- import("../catalog-runtime-DE-F4Awo.js").then((n) => n.t),
104
- import("../validation-BUFmsnKs.js").then((n) => n.r),
105
- import("../viewer-WY0RYE4E.js").then((n) => n.v)
101
+ import("../plugins-HYh_JOdw.js").then((n) => n.o),
102
+ import("../projection-DWxX7pb1.js").then((n) => n.kn),
103
+ import("../catalog-runtime-BWVMeZhW.js").then((n) => n.t),
104
+ import("../validation-DLWxEzWW.js").then((n) => n.r),
105
+ import("../viewer-vsM8_90o.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("../projection-7EFIqzuj.js").then((n) => n.Wn);
155
+ const { setBriefsConfig } = await import("../projection-DWxX7pb1.js").then((n) => n.Vn);
156
156
  setBriefsConfig({ enabled: true });
157
- const { runLocalAgentTurn } = await import("../runner-CDE4CZ52.js");
158
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-DXrnbplb.js");
159
- const { createLocalOAuthState } = await import("../oauth-relay-C6ZAyJgf.js").then((n) => n.t);
160
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-0tcmGd13.js");
161
- const { bindSpawnAgent } = await import("../spawn-6C9jHH4b.js").then((n) => n.n);
162
- const { bindMessageAgent } = await import("../message-DBwsAl7O.js").then((n) => n.n);
163
- const { createChildConversationWorker } = await import("../result-DrcUtFaD.js").then((n) => n.i);
164
- const { skipInputBeforeConversationStop } = await import("../session-stop-0juF_BP0.js").then((n) => n.r);
157
+ const { runLocalAgentTurn } = await import("../runner-zd_noJ1l.js");
158
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-BDRaqe8O.js");
159
+ const { createLocalOAuthState } = await import("../oauth-relay-D0G3T16m.js").then((n) => n.t);
160
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-DQjv-nbG.js");
161
+ const { bindSpawnAgent } = await import("../spawn-C75hAB9l.js").then((n) => n.n);
162
+ const { bindMessageAgent } = await import("../message-Q5dkgaJ5.js").then((n) => n.n);
163
+ const { createChildConversationWorker } = await import("../result-DNmOxT-N.js").then((n) => n.i);
164
+ const { skipInputBeforeConversationStop } = await import("../session-stop-6Tf--T7G.js").then((n) => n.r);
165
165
  const { createLocalConversationWork } = await import("../conversation-work-BaT_T6EB.js");
166
- const { processConversationWork } = await import("../worker-BcYVDVUy.js").then((n) => n.n);
166
+ const { processConversationWork } = await import("../worker-6kZEsCXs.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 { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-cI3T1dNc.js";
2
- import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-Bzefs7kT.js";
3
- import { i as parseSkillFile } from "../skills-CU5Is147.js";
1
+ import { A as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, L as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, M as JUNIOR_HEARTBEAT_ROUTE } from "../logging-CkT3_Xxp.js";
2
+ import { v as parseInlinePluginManifest, y as parsePluginManifest } from "../registry-DnrdeO4s.js";
3
+ import { i as parseSkillFile } from "../skills-BNrk8gi4.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
@@ -159,8 +159,6 @@ JUNIOR_BOT_NAME=
159
159
  AI_MODEL=
160
160
  AI_FAST_MODEL=
161
161
  AI_GUARDIAN_MODEL=
162
- AI_HANDOFF_MODEL=
163
- AI_MODEL_PROFILES=
164
162
  AI_MEMORY_MODEL=
165
163
  AI_EMBEDDING_MODEL=
166
164
  AI_RERANKING_MODEL=
package/dist/cli/main.js CHANGED
@@ -4,7 +4,7 @@ import { pathToFileURL } from "node:url";
4
4
  // src/cli/main.ts
5
5
  const SENTRY_FLUSH_TIMEOUT_MS = 2e3;
6
6
  async function flushSentry() {
7
- await (await import("../sentry-MDkYAVPV.js").then((n) => n.u)).flush(SENTRY_FLUSH_TIMEOUT_MS);
7
+ await (await import("../sentry-BRTJqumy.js").then((n) => n.u)).flush(SENTRY_FLUSH_TIMEOUT_MS);
8
8
  }
9
9
  async function initSentry() {
10
10
  (await import("../instrumentation.js")).initSentry();
@@ -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-DzAKbZsm.js")).runAdmin(argv);
28
+ return await (await import("../admin-PcpJDugZ.js")).runAdmin(argv);
29
29
  }
30
30
  async function runServiceAccount(argv) {
31
- return await (await import("../service-account-BOz9pqOE.js")).runServiceAccount(argv);
31
+ return await (await import("../service-account-BK26XlHo.js")).runServiceAccount(argv);
32
32
  }
33
33
  async function runBriefs(argv) {
34
- return await (await import("../briefs-BBo0Eimi.js")).runBriefs(argv);
34
+ return await (await import("../briefs-Dd_ezwED.js")).runBriefs(argv);
35
35
  }
36
36
  function topLevelCommand(argv) {
37
37
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,8 +1,8 @@
1
- import { Hn as validatePlugins, Ma as createPluginLogger, Vn as setPlugins } from "../projection-7EFIqzuj.js";
2
- import { S as getDb } from "../viewer-WY0RYE4E.js";
3
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DE-F4Awo.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-BUFmsnKs.js";
5
- import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-DOm9Y6qI.js";
1
+ import { Aa as createPluginLogger, Rn as setPlugins, zn as validatePlugins } from "../projection-DWxX7pb1.js";
2
+ import { S as getDb } from "../viewer-vsM8_90o.js";
3
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-BWVMeZhW.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-DLWxEzWW.js";
5
+ import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-HYh_JOdw.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
7
7
  import { stderr, stdout } from "node:process";
8
8
  import { createJiti } from "jiti";
@@ -1,7 +1,7 @@
1
- import { ci as create } from "../projection-7EFIqzuj.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-DE-F4Awo.js";
3
- import { t as disconnectStateAdapter } from "../adapter-BtfBHVM5.js";
4
- import { n as resolve } from "../resolve-CuiEY_2u.js";
1
+ import { ai as create } from "../projection-DWxX7pb1.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-BWVMeZhW.js";
3
+ import { t as disconnectStateAdapter } from "../adapter-phTTgw7H.js";
4
+ import { n as resolve } from "../resolve-C_QXfqD_.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-DEiwO5Sh.js";
1
+ import "../db-CyLrV9C7.js";
2
2
  import { n as JuniorPluginSet } from "../plugins-DtmjkTza.js";
3
3
  interface UpgradeIo {
4
4
  info: (line: string) => void;
@@ -1,7 +1,7 @@
1
- import { i as getChatConfig } from "../config-D5uUtrCP.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-hPfFTH0C.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-Bzefs7kT.js";
4
- import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-DOm9Y6qI.js";
1
+ import { i as getChatConfig } from "../config-C_bmRhrJ.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-BfYH-Wws.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-DnrdeO4s.js";
4
+ import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-HYh_JOdw.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-Cf5gVPWP.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
7
7
  import { createHash } from "node:crypto";
@@ -1,5 +1,5 @@
1
- import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-cI3T1dNc.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-VuylvlKr.js";
1
+ import { E as withSpan, g as normalizeGenAiFinishReason, h as logWarn, i as extractGenAiUsageAttributes, p as logException, v as serializeGenAiAttribute } from "./logging-CkT3_Xxp.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-CzOfcz0U.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";
@@ -231,6 +231,10 @@ function getProviderErrorAttributes(error) {
231
231
  };
232
232
  }
233
233
  // src/chat/xml.ts
234
+ /** Escape untrusted body text for a prompt tag. Quotes stay as written. */
235
+ function escapeXmlText(value) {
236
+ return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
237
+ }
234
238
  function escapeXml(value) {
235
239
  return value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&apos;");
236
240
  }
@@ -281,7 +285,7 @@ const COMPACTION_SUMMARY_PREFIX = "Another language model started to solve this
281
285
  /** Return whether text is one of Junior's durable compacted-context markers. */
282
286
  function isCompactionSummaryText(text) {
283
287
  const normalized = (unwrapCurrentInstruction(text) ?? text).trimStart();
284
- return normalized.startsWith("Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:") || normalized.startsWith("Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:") || normalized.startsWith("Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:");
288
+ return normalized.startsWith("Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:") || normalized.startsWith("Another language model started to solve this problem and produced a summary of its thinking process. You also have access to the state of the tools that were used by that language model. Use this to build on the work that has already been done and avoid duplicating work. Here is the summary produced by the other language model, use the information in this summary to assist with your own analysis:");
285
289
  }
286
290
  /** Return whether model-visible history contains a durable compacted context marker. */
287
291
  function hasCompactedConversationContext(messages) {
@@ -786,4 +790,4 @@ async function rerankTexts(params) {
786
790
  throw providerError;
787
791
  }
788
792
  }
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 };
793
+ export { resolveGatewayCredential as C, getGatewayApiKey as S, createProviderError as _, completeText as a, getProviderErrorUserMessage as b, resolveGatewayModel as c, isCompactionSummaryText as d, renderCurrentInstruction as f, ProviderError as g, escapeXmlText 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, findProviderError as v, toOptionalTrimmed as w, isProviderRetryError as x, getProviderErrorAttributes as y };
@@ -1,8 +1,7 @@
1
- import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
- import { C as toOptionalTrimmed, c as resolveGatewayModel } from "./client-DZ8HTnYH.js";
3
- import { h as logWarn } from "./logging-cI3T1dNc.js";
4
- import { c as modelProfileSchema, d as parseTurnReasoningLevel, t as DEFAULT_MODEL_PROFILES, u as TURN_REASONING_LEVELS } from "./model-profile-B998sjVd.js";
1
+ import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
+ import { c as resolveGatewayModel, w as toOptionalTrimmed } from "./client-Bpxe4vKa.js";
5
3
  import { AwsClient } from "aws4fetch";
4
+ import { z } from "zod";
6
5
  // src/chat/attachments/s3.ts
7
6
  function readRequiredSetting(env, name) {
8
7
  const value = toOptionalTrimmed(env[name]);
@@ -133,6 +132,22 @@ function normalizeSlackEmojiName(value) {
133
132
  const normalized = trimmed.startsWith(":") && trimmed.endsWith(":") ? trimmed.slice(1, -1) : trimmed;
134
133
  return SLACK_EMOJI_NAME_RE.test(normalized) ? normalized : null;
135
134
  }
135
+ // src/chat/reasoning-level.ts
136
+ const TURN_REASONING_LEVELS = [
137
+ "none",
138
+ "low",
139
+ "medium",
140
+ "high",
141
+ "xhigh"
142
+ ];
143
+ /** Validate a configured main-agent reasoning level. */
144
+ function parseTurnReasoningLevel(value) {
145
+ return z.enum(TURN_REASONING_LEVELS).parse(value);
146
+ }
147
+ /** Convert a reasoning level into the Pi Agent setting for a main Turn. */
148
+ function toPiReasoningLevel(level) {
149
+ return level === "none" ? "off" : level;
150
+ }
136
151
  // src/chat/config.ts
137
152
  var config_exports = /* @__PURE__ */ __exportAll({
138
153
  CONVERSATION_WORK_SOFT_YIELD_BUFFER_SECONDS: () => 40,
@@ -149,7 +164,6 @@ var config_exports = /* @__PURE__ */ __exportAll({
149
164
  resetRuntimeConfig: () => resetRuntimeConfig,
150
165
  restoreRuntimeConfig: () => restoreRuntimeConfig,
151
166
  setBotModelConfig: () => setBotModelConfig,
152
- setProfiles: () => setProfiles,
153
167
  setRuntimeLimits: () => setRuntimeLimits,
154
168
  setSlackReactionConfig: () => setSlackReactionConfig,
155
169
  snapshotRuntimeConfig: () => snapshotRuntimeConfig
@@ -251,10 +265,10 @@ function parseConversationWorkEnabled(rawValue) {
251
265
  if (value === "false") return false;
252
266
  throw new Error("JUNIOR_CONVERSATION_WORK_ENABLED must be true or false");
253
267
  }
254
- const DEFAULT_MODEL_ID = resolveGatewayModel(DEFAULT_MODEL_PROFILES.standard.modelId).id;
268
+ const DEFAULT_MODEL_ID = resolveGatewayModel("anthropic/claude-opus-5.5").id;
269
+ const DEFAULT_REASONING_LEVEL = "high";
255
270
  const DEFAULT_FAST_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
256
271
  const DEFAULT_GUARDIAN_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
257
- const DEFAULT_HANDOFF_MODEL_ID = resolveGatewayModel(DEFAULT_MODEL_PROFILES.handoff.modelId).id;
258
272
  const DEFAULT_WEB_SEARCH_MODEL_ID = resolveGatewayModel("openai/gpt-6-luna").id;
259
273
  const DEFAULT_DECISION_MODEL_ID = "typesafe-ai/jev";
260
274
  const DEFAULT_EMBEDDING_MODEL_ID = "openai/text-embedding-3-small";
@@ -275,73 +289,6 @@ function requireModelId(configName, raw, validate) {
275
289
  if (!modelId) throw new Error(`${configName} must not be empty`);
276
290
  return modelId;
277
291
  }
278
- function parseOptionalProfileDescription(rawDescription, configName, profile) {
279
- if (rawDescription === void 0) return;
280
- if (typeof rawDescription !== "string") throw new Error(`${configName}.${profile}.description must be a string when set`);
281
- const description = toOptionalTrimmed(rawDescription);
282
- if (!description) throw new Error(`${configName}.${profile}.description must not be empty when set`);
283
- return description;
284
- }
285
- function parseOptionalProfileReasoningLevel(rawReasoningLevel, configName, profile) {
286
- if (rawReasoningLevel === void 0) return;
287
- try {
288
- return parseTurnReasoningLevel(rawReasoningLevel);
289
- } catch {
290
- throw new Error(`${configName}.${profile}.reasoningLevel must be one of ${TURN_REASONING_LEVELS.join(", ")}`);
291
- }
292
- }
293
- function parseProfileConfig(rawProfile, configName, profile) {
294
- if (typeof rawProfile === "string") {
295
- const modelId = validateGatewayModelId(rawProfile);
296
- if (!modelId) throw new Error(`${configName}.${profile} must not be empty`);
297
- return { modelId };
298
- }
299
- if (!rawProfile || typeof rawProfile !== "object" || Array.isArray(rawProfile)) throw new Error(`${configName}.${profile} must be a model id string or an object with modelId`);
300
- const rawModelId = rawProfile.modelId;
301
- if (typeof rawModelId !== "string") throw new Error(`${configName}.${profile}.modelId must be a model id string`);
302
- const modelId = validateGatewayModelId(rawModelId);
303
- if (!modelId) throw new Error(`${configName}.${profile}.modelId must not be empty`);
304
- const description = parseOptionalProfileDescription(rawProfile.description, configName, profile);
305
- const reasoningLevel = parseOptionalProfileReasoningLevel(rawProfile.reasoningLevel, configName, profile);
306
- return {
307
- modelId,
308
- ...description ? { description } : void 0,
309
- ...reasoningLevel ? { reasoningLevel } : void 0
310
- };
311
- }
312
- function parseProfileMap(rawProfiles, configName) {
313
- if (!rawProfiles || typeof rawProfiles !== "object" || Array.isArray(rawProfiles)) throw new Error(`${configName} must be ${configName === "AI_MODEL_PROFILES" ? "a JSON object" : "an object"}`);
314
- const profiles = {};
315
- for (const [profile, rawProfile] of Object.entries(rawProfiles)) {
316
- if (!modelProfileSchema.safeParse(profile).success) throw new Error(`${configName} profile "${profile}" must match ^[a-z][a-z0-9_-]*$`);
317
- profiles[profile] = parseProfileConfig(rawProfile, configName, profile);
318
- }
319
- return profiles;
320
- }
321
- function parseProfiles(rawValue, standardModelId, handoffModelId) {
322
- const profiles = {
323
- standard: {
324
- ...DEFAULT_MODEL_PROFILES.standard,
325
- modelId: standardModelId
326
- },
327
- handoff: {
328
- ...DEFAULT_MODEL_PROFILES.handoff,
329
- modelId: handoffModelId
330
- }
331
- };
332
- const trimmed = toOptionalTrimmed(rawValue);
333
- if (trimmed === void 0) return profiles;
334
- let parsed;
335
- try {
336
- parsed = JSON.parse(trimmed);
337
- } catch {
338
- throw new Error("AI_MODEL_PROFILES must be a JSON object");
339
- }
340
- return {
341
- ...profiles,
342
- ...parseProfileMap(parsed, "AI_MODEL_PROFILES")
343
- };
344
- }
345
292
  function parseReactionEmoji(envName, rawValue, defaultEmoji) {
346
293
  const trimmed = toOptionalTrimmed(rawValue);
347
294
  if (trimmed === void 0) return defaultEmoji;
@@ -349,29 +296,17 @@ function parseReactionEmoji(envName, rawValue, defaultEmoji) {
349
296
  if (!normalized) throw new Error(`${envName} must be a valid Slack emoji name (for example "eyes" or ":white_check_mark:")`);
350
297
  return normalized;
351
298
  }
352
- function warnDeprecatedProfileEnv(env) {
353
- for (const envName of [
354
- "AI_MODEL",
355
- "AI_HANDOFF_MODEL",
356
- "AI_MODEL_PROFILES"
357
- ]) if (toOptionalTrimmed(env[envName]) !== void 0) logWarn("config.profile_env.deprecated", {
358
- "app.config.env_name": envName,
359
- "app.config.replacement": "createApp({ defaultProfile, profiles })"
360
- });
361
- }
362
299
  function readBotConfig(env, functionMaxDurationSeconds) {
363
300
  const maxTurnTimeoutMs = resolveMaxTurnTimeoutMs(functionMaxDurationSeconds);
364
301
  const modelId = validateGatewayModelId(env.AI_MODEL) ?? DEFAULT_MODEL_ID;
365
302
  const reasoningLevel = toOptionalTrimmed(env.AI_REASONING_LEVEL);
366
303
  const fastModelId = validateGatewayModelId(env.AI_FAST_MODEL ?? env.AI_MODEL) ?? DEFAULT_FAST_MODEL_ID;
367
304
  const guardianModelId = validateGatewayModelId(env.AI_GUARDIAN_MODEL) ?? DEFAULT_GUARDIAN_MODEL_ID;
368
- const handoffModelId = validateGatewayModelId(env.AI_HANDOFF_MODEL) ?? DEFAULT_HANDOFF_MODEL_ID;
369
305
  return {
370
306
  userName: toOptionalTrimmed(env.JUNIOR_BOT_NAME) ?? "junior",
371
- defaultProfile: "standard",
372
- profiles: parseProfiles(env.AI_MODEL_PROFILES, modelId, handoffModelId),
307
+ modelId,
373
308
  contextWindowTokens: parseOptionalPositiveInteger("AI_MODEL_CONTEXT_WINDOW_TOKENS", env.AI_MODEL_CONTEXT_WINDOW_TOKENS) ?? DEFAULT_MODEL_CONTEXT_WINDOW_TOKENS,
374
- reasoningLevel: reasoningLevel === void 0 ? void 0 : parseTurnReasoningLevel(reasoningLevel),
309
+ reasoningLevel: reasoningLevel === void 0 ? DEFAULT_REASONING_LEVEL : parseTurnReasoningLevel(reasoningLevel),
375
310
  decisionModelId: toOptionalTrimmed(env.AI_DECISION_MODEL) ?? DEFAULT_DECISION_MODEL_ID,
376
311
  fastModelId,
377
312
  guardianModelId,
@@ -423,7 +358,6 @@ function readSqlStatementTimeoutMs(env) {
423
358
  /** Parse all chat configuration from environment variables. */
424
359
  function readChatConfig(env = process.env, functionMaxDurationSeconds = DEFAULT_FUNCTION_MAX_DURATION_SECONDS) {
425
360
  const databaseUrl = readDatabaseUrl(env);
426
- warnDeprecatedProfileEnv(env);
427
361
  const resolvedFunctionMaxDurationSeconds = resolveFunctionMaxDurationSeconds(functionMaxDurationSeconds);
428
362
  return {
429
363
  attachmentStorage: readAttachmentStorageConfig(env),
@@ -534,6 +468,7 @@ function getRuntimeMetadata() {
534
468
  }
535
469
  /** Apply model overrides from createApp(). */
536
470
  function setBotModelConfig(config) {
471
+ if (config.modelId !== void 0) botConfig.modelId = requireModelId("modelId", config.modelId, validateGatewayModelId);
537
472
  if (config.decisionModelId !== void 0) botConfig.decisionModelId = requireModelId("decisionModelId", config.decisionModelId, toOptionalTrimmed);
538
473
  if (config.embeddingModelId !== void 0) botConfig.embeddingModelId = requireModelId("embeddingModelId", config.embeddingModelId, validateEmbeddingModelId);
539
474
  if (config.fastModelId !== void 0) botConfig.fastModelId = requireModelId("fastModelId", config.fastModelId, validateGatewayModelId);
@@ -543,19 +478,9 @@ function setBotModelConfig(config) {
543
478
  if (config.visionModelId !== void 0) botConfig.visionModelId = requireModelId("visionModelId", config.visionModelId, validateGatewayModelId);
544
479
  if (config.webSearchModelId !== void 0) botConfig.webSearchModelId = requireModelId("webSearchModelId", config.webSearchModelId, validateGatewayModelId);
545
480
  }
546
- /** Apply profiles from createApp(). */
547
- function setProfiles(profiles, defaultProfile) {
548
- if (!profiles || !defaultProfile) throw new Error("profiles and defaultProfile must be configured together");
549
- const configuredProfiles = parseProfileMap(profiles, "profiles");
550
- const selectedDefault = defaultProfile;
551
- if (!modelProfileSchema.safeParse(selectedDefault).success) throw new Error(`defaultProfile "${selectedDefault}" must match ^[a-z][a-z0-9_-]*$`);
552
- if (!Object.hasOwn(configuredProfiles, selectedDefault)) throw new Error(`defaultProfile "${selectedDefault}" is not configured`);
553
- botConfig.profiles = configuredProfiles;
554
- botConfig.defaultProfile = selectedDefault;
555
- }
556
481
  /** Apply Slack reaction emoji overrides from createApp() options, validating names. */
557
482
  function setSlackReactionConfig(overrides) {
558
483
  if (overrides.processingReactionEmoji !== void 0) chatConfig.slack.processingReactionEmoji = parseReactionEmoji("processingReactionEmoji", overrides.processingReactionEmoji, chatConfig.slack.processingReactionEmoji);
559
484
  if (overrides.completedReactionEmoji !== void 0) chatConfig.slack.completedReactionEmoji = parseReactionEmoji("completedReactionEmoji", overrides.completedReactionEmoji, chatConfig.slack.completedReactionEmoji);
560
485
  }
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 };
486
+ export { toPiReasoningLevel as _, getRuntimeMetadata as a, getSlackClientSecret as c, restoreRuntimeConfig as d, setBotModelConfig as f, TURN_REASONING_LEVELS as g, snapshotRuntimeConfig as h, getChatConfig as i, getSlackSigningSecret as l, setSlackReactionConfig as m, botConfig as n, getSlackBotToken as o, setRuntimeLimits 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 };
@@ -1,13 +1,13 @@
1
- import { $ as loadTurnCheckpoint, it as getTurnRecord, rt as failTurnRecord, yi as startOAuthFlow } from "./projection-7EFIqzuj.js";
2
- import { n as botConfig } from "./config-D5uUtrCP.js";
3
- import { C as getSqlExecutor, F as deleteProviderIdentityForSlackUser, I as deleteProviderIdentityForUser, y as getConversationEventStore } from "./viewer-WY0RYE4E.js";
4
- import { u as hasRequiredOAuthScope } from "./registry-Bzefs7kT.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DE-F4Awo.js";
6
- import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-BsYAbniN.js";
7
- import { r as getStateAdapter } from "./adapter-BtfBHVM5.js";
8
- import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-hh18yCeU.js";
9
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-DKs1WwdB.js";
10
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-jnLOfBHJ.js";
1
+ import { X as loadTurnCheckpoint, et as failTurnRecord, gi as startOAuthFlow, tt as getTurnRecord } from "./projection-DWxX7pb1.js";
2
+ import { n as botConfig } from "./config-C_bmRhrJ.js";
3
+ import { C as getSqlExecutor, R as deleteProviderIdentityForSlackUser, y as getConversationEventStore, z as deleteProviderIdentityForUser } from "./viewer-vsM8_90o.js";
4
+ import { u as hasRequiredOAuthScope } from "./registry-DnrdeO4s.js";
5
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-BWVMeZhW.js";
6
+ import { c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-DwvT1BY0.js";
7
+ import { r as getStateAdapter } from "./adapter-phTTgw7H.js";
8
+ import { l as getVercelConversationWorkQueue } from "./background-compaction-queue-CcbuLJrZ.js";
9
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-G3h2djJU.js";
10
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-FBdaH1zf.js";
11
11
  import { randomBytes, randomUUID } from "node:crypto";
12
12
  import { z } from "zod";
13
13
  // src/chat/task-execution/authorized-turn.ts