@sentry/junior 0.302.0 → 0.303.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 (93) hide show
  1. package/dist/{adapter-context-Cx9fn9B3.js → adapter-context-BdVnSuY5.js} +2 -2
  2. package/dist/{admin-_poE5NKL.js → admin-AfeAdS3J.js} +2 -2
  3. package/dist/{agent-runner-CY9RvsTX.js → agent-runner-BP8_DLUv.js} +2987 -2948
  4. package/dist/api/schema.d.ts +2 -2
  5. package/dist/api/schema.js +6 -6
  6. package/dist/api.d.ts +13 -12
  7. package/dist/api.js +207 -80
  8. package/dist/{app-BpY3wtRP.d.ts → app-Dd9v1mNx.d.ts} +15 -15
  9. package/dist/app.d.ts +1 -1
  10. package/dist/app.js +63 -64
  11. package/dist/{automation-Cva5ZOwW.js → automation-D9MvhOWY.js} +3 -1
  12. package/dist/{background-compaction-queue-CXFq1_Cz.js → background-compaction-queue-xaE05jxH.js} +6 -6
  13. package/dist/{briefs-B3NG-pid.js → briefs-D8i-dKTp.js} +4 -4
  14. package/dist/{catalog-runtime-Dss0lSV6.js → catalog-runtime-d1EM6Z0V.js} +2 -2
  15. package/dist/cli/chat.d.ts +1 -1
  16. package/dist/cli/chat.js +21 -21
  17. package/dist/cli/check.js +8 -8
  18. package/dist/cli/env.d.ts +1 -0
  19. package/dist/cli/env.js +8 -7
  20. package/dist/cli/init.js +13 -4
  21. package/dist/cli/main.js +4 -4
  22. package/dist/cli/plugins.js +6 -6
  23. package/dist/cli/snapshot-create.js +7 -5
  24. package/dist/cli/upgrade.d.ts +2 -2
  25. package/dist/cli/upgrade.js +5 -5
  26. package/dist/{config-CzeZiMKs.js → config-oGM7KA9M.js} +44 -63
  27. package/dist/{connections-CDYhMfrs.js → connections-BlikzEJv.js} +6 -6
  28. package/dist/{continue-in-slack-7Uf05ndC.js → continue-in-slack-BZnYifiG.js} +5 -5
  29. package/dist/{conversation-BNXfq6Lb.js → conversation-CY1jnBiC.js} +1 -1
  30. package/dist/{conversation-feed-Clf_cv0n.js → conversation-feed-BZJRk6UV.js} +1 -1
  31. package/dist/{conversation-privacy-D9xnM5mK.js → conversation-privacy-Cx515ddM.js} +7 -7
  32. package/dist/{conversation-turn-D7SEZgTG.js → conversation-turn-DAhRdX4m.js} +20 -23
  33. package/dist/{credential-sync-DoD0gW-j.js → credential-sync-DfhmWFeo.js} +18 -18
  34. package/dist/{db-B-gtnNjr.js → db-C-2tFxk3.js} +15 -15
  35. package/dist/{db-BdsCzytP.d.ts → db-DPqcEM9_.d.ts} +25 -25
  36. package/dist/{executor-DZg20EqU.js → executor-NVfS8aQ2.js} +14 -8
  37. package/dist/{history-IjdmO_r6.js → history-UZ3M2M9r.js} +13 -10
  38. package/dist/{install-t1KQyTUs.js → install-CHLrpRZc.js} +3 -3
  39. package/dist/instrumentation.d.ts +4 -4
  40. package/dist/instrumentation.js +10 -10
  41. package/dist/{lineage-C79GjoQr.js → lineage-HGLhd_-N.js} +2 -2
  42. package/dist/{logging-C9oDAg4M.js → logging-DiyqRLBx.js} +19 -19
  43. package/dist/{message-BLUCzJXN.js → message-CkCOcbFH.js} +9 -9
  44. package/dist/{model-input-5jwNC45G.js → model-input-DmoPPtPE.js} +4 -9
  45. package/dist/nitro.d.ts +1 -1
  46. package/dist/nitro.js +7 -7
  47. package/dist/{oauth-callback-server-BBl66vCb.js → oauth-callback-server-CIf_6YmA.js} +5 -4
  48. package/dist/{oauth-relay-DRzq73b6.js → oauth-relay-DAmfVmJu.js} +3 -6
  49. package/dist/{package-discovery-DJhGdS4c.js → package-discovery-x4AvVhMj.js} +1 -1
  50. package/dist/{plugin-module-Cf5gVPWP.js → plugin-module-Cv2ETe8Y.js} +1 -1
  51. package/dist/{plugins-BBX07Jzt.js → plugins-Bkk0XRo2.js} +3 -3
  52. package/dist/{projection-CIBwgD3s.js → projection-DBq8tsA5.js} +221 -173
  53. package/dist/{prompt-CRQbzp5e.js → prompt-D2KlJopL.js} +4 -4
  54. package/dist/{queue-CZyYgPF0.d.ts → queue-CbEHUO0l.d.ts} +1 -1
  55. package/dist/{queue-DtCDaIct.js → queue-DFaOscp5.js} +4 -4
  56. package/dist/{registry-DdFQHZ_d.js → registry-Bu0Z9BEO.js} +37 -37
  57. package/dist/{resolve-CdW4BdrK.js → resolve-DXuA3G0g.js} +3 -3
  58. package/dist/{result-oOMv1t4O.js → result-DpiNseDA.js} +10 -15
  59. package/dist/rolldown-runtime-BKpuH2hG.js +26 -0
  60. package/dist/{runner-DqitLtm-.js → runner-iu1heRFv.js} +10 -10
  61. package/dist/{sandbox-egress-signals-Bw9I0yfJ.js → sandbox-egress-signals-2HFYDcQf.js} +1 -1
  62. package/dist/{schema-BIFM-U1a.d.ts → schema-DHMOaRzC.d.ts} +520 -13
  63. package/dist/{schema-DnVQepWP.js → schema-DvfX3Gq_.js} +77 -13
  64. package/dist/{secrets-DebYU866.js → secrets-DHaJ5TTn.js} +4 -4
  65. package/dist/{sentry-BRTJqumy.js → sentry-CPbZjomA.js} +3 -28
  66. package/dist/{sentry-route-name-BhwWnfqj.js → sentry-route-name-C6EIzAGP.js} +1 -1
  67. package/dist/{service-account-CrZftRTb.js → service-account-BcT5LR7V.js} +47 -47
  68. package/dist/{service-account-B6mKAPVo.js → service-account-xYkaQTrw.js} +3 -3
  69. package/dist/{session-stop-DW63Z3kj.js → session-stop-BLLp1IP_.js} +28 -35
  70. package/dist/{skills-C16fz60Z.js → skills-CNAGH4ju.js} +6 -9
  71. package/dist/{slack-conversation-unfurl-BHhefEb7.js → slack-conversation-unfurl-DYnqe5ci.js} +10 -15
  72. package/dist/{spawn-D_RnFYfy.js → spawn-cGasWW33.js} +7 -7
  73. package/dist/{legacy-web-actor-id-C-cEeWqL.js → state-CDS6h_Wv.js} +32 -32
  74. package/dist/{stop-7p1i08CY.js → stop-DMMA67yT.js} +221 -139
  75. package/dist/{store-C28I0CVW.js → store-Dgs7Oe44.js} +5 -5
  76. package/dist/{task-queue-BVUJbQ28.js → task-queue-DcF0nhhz.js} +3 -3
  77. package/dist/{task-runner-CWi8j7Z6.js → task-runner-BGXF7Fo7.js} +15 -18
  78. package/dist/{thread-context-D3-yYUd0.js → thread-context-BPky1KBe.js} +12 -12
  79. package/dist/{turn-session-routing-BFMS9ATF.js → turn-session-routing-DGvn9MSl.js} +32 -32
  80. package/dist/{turn-user-message-C3-O8Omt.js → turn-user-message-19CkuUvM.js} +3 -3
  81. package/dist/{validation-BSFKUIb4.js → validation-lu1DgjNQ.js} +2 -2
  82. package/dist/vercel.js +1 -1
  83. package/dist/{version-BHHXNi-0.js → version-Uo3c94Dx.js} +1 -1
  84. package/dist/version.js +1 -1
  85. package/dist/{viewer-B1SO21Qa.js → viewer-BPQHMx3-.js} +3 -3
  86. package/dist/{warmup-Bz9bzkzN.js → warmup-H8uLvW9e.js} +149 -130
  87. package/dist/{worker-BspReIIK.js → worker-B-pM_-3K.js} +9 -12
  88. package/migrations/0109_user_preferences.sql +1 -0
  89. package/migrations/0110_code_change_repository_state_index.sql +1 -0
  90. package/migrations/meta/0109_snapshot.json +4925 -0
  91. package/migrations/meta/0110_snapshot.json +4952 -0
  92. package/migrations/meta/_journal.json +15 -1
  93. package/package.json +16 -19
@@ -1,20 +1,20 @@
1
- import { $n as resolvePluginOAuthAccount, Da as postSlackMessage, Xo as getSlackClient, Z as getConversationPendingAuth, Zn as createUserTokenStore, ca as formatProviderLabel, d as recordAuthorizationCompleted, la as parseOAuthStatePayload, st as getTurnRecord, u as recordAuthenticationLinked, ua as resolveBaseUrl } from "./projection-CIBwgD3s.js";
2
- import { R as escapeXml, a as getRuntimeMetadata, n as botConfig } from "./config-CzeZiMKs.js";
3
- import { W as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-C9oDAg4M.js";
1
+ import { $n as resolvePluginOAuthAccount, Qo as getSlackClient, Z as getConversationPendingAuth, Zn as createUserTokenStore, d as recordAuthorizationCompleted, da as parseOAuthStatePayload, fa as resolveBaseUrl, ka as postSlackMessage, st as getTurnRecord, u as recordAuthenticationLinked, ua as formatProviderLabel } from "./projection-DBq8tsA5.js";
2
+ import { R as escapeXml, a as getRuntimeMetadata, n as botConfig } from "./config-oGM7KA9M.js";
3
+ import { W as isNativeIdentityProvider, _ as runBestEffort, h as logWarn, p as logException } from "./logging-DiyqRLBx.js";
4
4
  import { p as parseSlackUserId } from "./actor-D2iXzvlN.js";
5
- import { H as upsertLinkedIdentity, J as getStateAdapter, P as resolveActorIdentityId, Q as acquireActiveLock, R as findUserByVerifiedEmails, s as getSqlExecutor } from "./db-B-gtnNjr.js";
6
- import { i as homeDir } from "./package-discovery-DJhGdS4c.js";
7
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-DdFQHZ_d.js";
8
- import { n as pluginCatalogRuntime } from "./catalog-runtime-Dss0lSV6.js";
9
- import { t as discoverSkills } from "./skills-C16fz60Z.js";
10
- import { o as finalizeMcpAuthorization } from "./agent-runner-CY9RvsTX.js";
11
- import { o as readIdentityById } from "./viewer-B1SO21Qa.js";
12
- import { t as readJuniorSecret } from "./secrets-DebYU866.js";
13
- import { Fn as wakePausedTurn, Hn as deleteWebAuthorization, I as lookupSlackUserProfile, Pn as wakeAuthorizedTurn } from "./warmup-Bz9bzkzN.js";
14
- import { a as getPersistedThreadState, c as coerceThreadConversationState } from "./turn-session-routing-BFMS9ATF.js";
15
- import { O as getMcpProviderErrorAttributes, S as putMcpStoredOAuthCredentials, f as deleteMcpAuthSession, g as getMcpAuthSession, v as getMcpStoredOAuthCredentials } from "./service-account-CrZftRTb.js";
16
- import { i as readConnectedOAuthTokens, s as htmlCallbackResponse } from "./connections-CDYhMfrs.js";
17
- import { n as relayLocalOAuthCallback } from "./oauth-relay-DRzq73b6.js";
5
+ import { H as upsertLinkedIdentity, J as getStateAdapter, P as resolveActorIdentityId, Q as acquireActiveLock, R as findUserByVerifiedEmails, s as getSqlExecutor } from "./db-C-2tFxk3.js";
6
+ import { i as homeDir } from "./package-discovery-x4AvVhMj.js";
7
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-Bu0Z9BEO.js";
8
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-d1EM6Z0V.js";
9
+ import { t as discoverSkills } from "./skills-CNAGH4ju.js";
10
+ import { o as finalizeMcpAuthorization } from "./agent-runner-BP8_DLUv.js";
11
+ import { O as getMcpProviderErrorAttributes, S as putMcpStoredOAuthCredentials, f as deleteMcpAuthSession, g as getMcpAuthSession, v as getMcpStoredOAuthCredentials } from "./service-account-BcT5LR7V.js";
12
+ import { o as readIdentityById } from "./viewer-BPQHMx3-.js";
13
+ import { t as readJuniorSecret } from "./secrets-DHaJ5TTn.js";
14
+ import { Fn as wakeAuthorizedTurn, In as wakePausedTurn, L as lookupSlackUserProfile, Un as deleteWebAuthorization } from "./warmup-H8uLvW9e.js";
15
+ import { a as getPersistedThreadState, c as coerceThreadConversationState } from "./turn-session-routing-DGvn9MSl.js";
16
+ import { i as readConnectedOAuthTokens, s as htmlCallbackResponse } from "./connections-BlikzEJv.js";
17
+ import { n as relayLocalOAuthCallback } from "./oauth-relay-DAmfVmJu.js";
18
18
  import * as z from "zod";
19
19
  import path from "node:path";
20
20
  import { createHmac, createSecretKey, timingSafeEqual } from "node:crypto";
@@ -661,7 +661,7 @@ async function syncLocalOAuthCredential(provider, tokens) {
661
661
  provider,
662
662
  tokens
663
663
  });
664
- const port = process.env.PORT?.trim() || "3000";
664
+ const port = process.env["PORT"]?.trim() || "3000";
665
665
  const response = await fetch(`http://127.0.0.1:${port}/api/internal/local-oauth-credentials`, {
666
666
  method: "POST",
667
667
  headers: {
@@ -675,7 +675,7 @@ async function syncLocalOAuthCredential(provider, tokens) {
675
675
  /** Verify and store one credential sent by the local CLI over loopback. */
676
676
  async function receiveLocalOAuthCredential(request) {
677
677
  const hostname = new URL(request.url).hostname;
678
- if (process.env.NODE_ENV !== "development" || hostname !== "127.0.0.1" && hostname !== "localhost") return new Response(null, { status: 404 });
678
+ if (process.env["NODE_ENV"] !== "development" || hostname !== "127.0.0.1" && hostname !== "localhost") return new Response(null, { status: 404 });
679
679
  const body = await request.text();
680
680
  const actualSignature = request.headers.get("x-junior-local-credential-signature");
681
681
  if (!actualSignature || !signaturesMatch(signature(body), actualSignature)) return Response.json({ error: "Unauthorized" }, { status: 401 });
@@ -1,9 +1,9 @@
1
- import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { i as getChatConfig } from "./config-CzeZiMKs.js";
3
- import { G as normalizeIdentityEmail, U as GOOGLE_IDENTITY_PROVIDER, h as logWarn } from "./logging-C9oDAg4M.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
+ import { i as getChatConfig } from "./config-oGM7KA9M.js";
4
3
  import { a as isSlackUserId, d as parseSlackChannelReferenceId, f as parseSlackTeamId, s as parseActorUserId } from "./actor-D2iXzvlN.js";
5
- import { C as juniorConversationMetrics, D as juniorConversationAnnotations, F as juniorDestinations, M as juniorConversations, N as juniorIdentities, P as juniorUsers, S as CONVERSATION_METRICS, T as juniorConversationEvents, t as createJuniorSqlExecutor, v as juniorConversationParticipants, w as isUserInstruction, y as juniorConversationBindings } from "./executor-DZg20EqU.js";
6
- import { c as newConversationEventSchema, h as usageSchema, l as encodeHistoryPayload, o as decodeStoredConversationEvent, r as conversationEventDataSchema, s as historyReplacementSchema } from "./history-IjdmO_r6.js";
4
+ import { C as juniorConversationMetrics, D as juniorConversationAnnotations, F as juniorDestinations, M as juniorConversations, N as juniorIdentities, P as juniorUsers, S as CONVERSATION_METRICS, T as juniorConversationEvents, t as createJuniorSqlExecutor, v as juniorConversationParticipants, w as isUserInstruction, y as juniorConversationBindings } from "./executor-NVfS8aQ2.js";
5
+ import { c as newConversationEventSchema, h as usageSchema, l as encodeHistoryPayload, o as decodeStoredConversationEvent, r as conversationEventDataSchema, s as historyReplacementSchema } from "./history-UZ3M2M9r.js";
6
+ import { G as normalizeIdentityEmail, U as GOOGLE_IDENTITY_PROVIDER, h as logWarn } from "./logging-DiyqRLBx.js";
7
7
  import * as z from "zod";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { and, asc, desc, eq, gt, gte, inArray, isNull, lt, lte, ne, or, sql } from "drizzle-orm";
@@ -1937,14 +1937,14 @@ function isRecord(value) {
1937
1937
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
1938
1938
  }
1939
1939
  function readAuthor(meta) {
1940
- if (!isRecord(meta) || !isRecord(meta.author)) return {};
1941
- const author = meta.author;
1940
+ if (!isRecord(meta) || !isRecord(meta["author"])) return {};
1941
+ const author = meta["author"];
1942
1942
  return {
1943
- ...typeof author.email === "string" ? { email: author.email } : void 0,
1944
- ...typeof author.fullName === "string" ? { fullName: author.fullName } : void 0,
1945
- ...typeof author.isBot === "boolean" ? { isBot: author.isBot } : void 0,
1946
- ...typeof author.userId === "string" ? { userId: author.userId } : void 0,
1947
- ...typeof author.userName === "string" ? { userName: author.userName } : void 0
1943
+ ...typeof author["email"] === "string" ? { email: author["email"] } : void 0,
1944
+ ...typeof author["fullName"] === "string" ? { fullName: author["fullName"] } : void 0,
1945
+ ...typeof author["isBot"] === "boolean" ? { isBot: author["isBot"] } : void 0,
1946
+ ...typeof author["userId"] === "string" ? { userId: author["userId"] } : void 0,
1947
+ ...typeof author["userName"] === "string" ? { userName: author["userName"] } : void 0
1948
1948
  };
1949
1949
  }
1950
1950
  /** Read the Slack workspace that owns a conversation, when it has one. */
@@ -2155,7 +2155,7 @@ const HUMAN_INSTRUCTION_PLATFORMS = /* @__PURE__ */ new Set([
2155
2155
  * mentions and DMs, always address Junior.
2156
2156
  */
2157
2157
  function eventAddressesJunior(data) {
2158
- return data.type === "message" && data.meta?.explicitMention !== false;
2158
+ return data.type === "message" && data.meta?.["explicitMention"] !== false;
2159
2159
  }
2160
2160
  /**
2161
2161
  * Whether one event should restore an archived conversation to the feed.
@@ -2175,8 +2175,8 @@ function eventUnarchivesConversation(data) {
2175
2175
  if (data.role !== "user") return false;
2176
2176
  const meta = data.meta;
2177
2177
  if (!meta) return true;
2178
- if (typeof meta.eventType === "string" && meta.eventType.length > 0) return false;
2179
- const author = meta.author;
2178
+ if (typeof meta["eventType"] === "string" && meta["eventType"].length > 0) return false;
2179
+ const author = meta["author"];
2180
2180
  if (author && typeof author === "object" && !Array.isArray(author) && author.isBot === true) return false;
2181
2181
  return true;
2182
2182
  }
@@ -1,4 +1,4 @@
1
- import "./schema-BIFM-U1a.js";
1
+ import "./schema-DHMOaRzC.js";
2
2
  import * as z from "zod";
3
3
  import "drizzle-orm";
4
4
  import { Destination, Source, locationSchema } from "@sentry/junior-plugin-api";
@@ -67,11 +67,11 @@ interface ConversationRunMetrics {
67
67
  usage?: AgentTurnUsage;
68
68
  }
69
69
  interface ConversationExecution {
70
- lastCheckpointAtMs?: number;
71
- lastEnqueuedAtMs?: number;
72
- runId?: string;
70
+ lastCheckpointAtMs?: number | undefined;
71
+ lastEnqueuedAtMs?: number | undefined;
72
+ runId?: string | undefined;
73
73
  status: ConversationStatus;
74
- updatedAtMs?: number;
74
+ updatedAtMs?: number | undefined;
75
75
  }
76
76
  /**
77
77
  * Durable Conversation owned by Junior.
@@ -86,10 +86,10 @@ interface ConversationExecution {
86
86
  * Their field TODOs state when each legacy copy can be removed.
87
87
  */
88
88
  interface Conversation {
89
- channelName?: string;
89
+ channelName?: string | undefined;
90
90
  conversationId: string;
91
91
  createdAtMs: number;
92
- destination?: Destination;
92
+ destination?: Destination | undefined;
93
93
  execution: ConversationExecution;
94
94
  /** Metrics of the latest Run that wrote metrics. */
95
95
  executionMetrics?: ConversationRunMetrics & {
@@ -107,27 +107,27 @@ interface Conversation {
107
107
  archivedAtMs?: number;
108
108
  /** Optional provider coordinates associated with this Conversation. */
109
109
  location?: Location;
110
- actor?: StoredSlackActor;
110
+ actor?: StoredSlackActor | undefined;
111
111
  schemaVersion: 1;
112
- source?: ConversationSource;
112
+ source?: ConversationSource | undefined;
113
113
  /**
114
114
  * Structured inbound Source locator for this conversation session.
115
115
  * Session-stable (threaded Slack keeps threadTs; channel-level turns omit
116
116
  * it; never stores per-message ts). Set-once.
117
117
  */
118
118
  sessionSource?: SessionSource;
119
- title?: string;
119
+ title?: string | undefined;
120
120
  updatedAtMs: number;
121
121
  /**
122
122
  * When retention purged this conversation's content. Set means messages and
123
123
  * events were deleted wholesale; reporting presents the transcript as expired
124
124
  * rather than privacy-redacted (`../../../../../policies/data-redaction.md`).
125
125
  */
126
- transcriptPurgedAtMs?: number;
126
+ transcriptPurgedAtMs?: number | undefined;
127
127
  /** When a person stopped this Conversation. Unset when it is not stopped. */
128
- stoppedAtMs?: number;
128
+ stoppedAtMs?: number | undefined;
129
129
  /** Set while a root's Event Turn replies stay out of its Location. */
130
- deliveryPausedAtMs?: number;
130
+ deliveryPausedAtMs?: number | undefined;
131
131
  /** Confirmed Conversation visibility. Undefined means no confirmation exists. */
132
132
  visibility?: ConversationPrivacy;
133
133
  }
@@ -212,12 +212,12 @@ interface ConversationStore {
212
212
  } | undefined>;
213
213
  recordActivity(args: {
214
214
  activityAtMs?: number;
215
- channelName?: string;
215
+ channelName?: string | undefined;
216
216
  conversationId: string;
217
- destination?: Destination;
217
+ destination?: Destination | undefined;
218
218
  nowMs?: number;
219
- actor?: StoredSlackActor;
220
- source?: ConversationSource;
219
+ actor?: StoredSlackActor | undefined;
220
+ source?: ConversationSource | undefined;
221
221
  /** Source normalized to a stable session locator; set-once when absent. */
222
222
  sessionSource?: Source;
223
223
  title?: string;
@@ -231,7 +231,7 @@ interface ConversationStore {
231
231
  * replaces the visibility of the shared Destination row. Omit it for saved
232
232
  * values, such as visibility captured when an Automation was created.
233
233
  */
234
- visibility?: ConversationPrivacy;
234
+ visibility?: ConversationPrivacy | undefined;
235
235
  }): Promise<void>;
236
236
  /**
237
237
  * Store execution state and one Run's metrics.
@@ -239,25 +239,25 @@ interface ConversationStore {
239
239
  */
240
240
  recordExecution(args: {
241
241
  /** Identity of the Turn Actor. Its metric rows record it. */
242
- actorIdentityId?: string;
243
- channelName?: string;
242
+ actorIdentityId?: string | undefined;
243
+ channelName?: string | undefined;
244
244
  conversationId: string;
245
245
  /** When this Run started. */
246
246
  createdAtMs: number;
247
- destination?: Destination;
247
+ destination?: Destination | undefined;
248
248
  execution: ConversationExecution;
249
249
  lastActivityAtMs: number;
250
250
  metrics: ConversationRunMetrics | null;
251
- actor?: StoredSlackActor;
252
- source?: ConversationSource;
253
- title?: string;
251
+ actor?: StoredSlackActor | undefined;
252
+ source?: ConversationSource | undefined;
253
+ title?: string | undefined;
254
254
  updatedAtMs: number;
255
255
  /**
256
256
  * Current visibility from its owner, such as a Slack event channel type. It
257
257
  * replaces the visibility of the shared Destination row. Omit it for saved
258
258
  * values, such as visibility captured when an Automation was created.
259
259
  */
260
- visibility?: ConversationPrivacy;
260
+ visibility?: ConversationPrivacy | undefined;
261
261
  }): Promise<void>;
262
262
  listByActivity(args?: {
263
263
  limit?: number;
@@ -1,10 +1,10 @@
1
- import { _ as withScope } from "./sentry-BRTJqumy.js";
2
- import "./config-CzeZiMKs.js";
3
- import { h as logWarn, p as logException } from "./logging-C9oDAg4M.js";
1
+ import { h as logWarn, p as logException } from "./logging-DiyqRLBx.js";
2
+ import { _ as withScope } from "./sentry-CPbZjomA.js";
3
+ import "./config-oGM7KA9M.js";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { sql } from "drizzle-orm";
6
6
  import { bigint, boolean, check, customType, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
7
- import { Pool, neon } from "@neondatabase/serverless";
7
+ import { Pool as Pool$1, neon } from "@neondatabase/serverless";
8
8
  import { drizzle } from "drizzle-orm/neon-serverless";
9
9
  import { Agent } from "undici";
10
10
  import { readMigrationFiles } from "drizzle-orm/migrator";
@@ -62,6 +62,11 @@ const juniorUsers = pgTable("junior_users", {
62
62
  autoArchiveDefault: boolean("auto_archive_default").notNull().default(false),
63
63
  /** Hours done work and the conversation stay quiet before auto-archive. */
64
64
  autoArchiveGraceHours: integer("auto_archive_grace_hours").notNull().default(24),
65
+ /**
66
+ * Small per-user choices, such as an experiment opt-in, that can come
67
+ * and go without a migration. `api/user-settings.ts` owns the keys.
68
+ */
69
+ preferences: jsonb("preferences").$type().notNull().default({}),
65
70
  createdAt: timestamptz("created_at").notNull(),
66
71
  updatedAt: timestamptz("updated_at").notNull()
67
72
  }, (table) => [uniqueIndex("junior_users_primary_email_normalized_uidx").on(table.primaryEmailNormalized)]);
@@ -241,6 +246,7 @@ const juniorCodeChanges = pgTable("junior_code_changes", {
241
246
  index("junior_code_changes_opened_at_idx").on(table.openedAt),
242
247
  index("junior_code_changes_merged_at_idx").on(table.mergedAt),
243
248
  index("junior_code_changes_closed_at_idx").on(table.closedAt),
249
+ index("junior_code_changes_repository_state_idx").on(table.repositoryId, table.state, table.updatedAt.desc()),
244
250
  index("junior_code_changes_open_idx").on(table.id).where(sql`${table.state} = 'open'`)
245
251
  ]);
246
252
  // src/db/schema/conversation-annotations.ts
@@ -988,7 +994,7 @@ function warnWebSocketFailure(name, error, failure) {
988
994
  * proxy's cached backend connection, so the batch skips that handshake. The
989
995
  * warm path stays on WebSocket. `connect()` and transactions are unchanged.
990
996
  */
991
- var OverflowPool = class extends Pool {
997
+ var OverflowPool = class extends Pool$1 {
992
998
  pendingAcquires = 0;
993
999
  webSocketOnly = new AsyncLocalStorage();
994
1000
  sql;
@@ -1060,7 +1066,7 @@ var OverflowPool = class extends Pool {
1060
1066
  this.connect((error, client) => {
1061
1067
  this.pendingAcquires--;
1062
1068
  if (client) resolve(client);
1063
- else reject(error);
1069
+ else reject(error ?? /* @__PURE__ */ new Error("pg pool returned no client"));
1064
1070
  });
1065
1071
  });
1066
1072
  }
@@ -1200,7 +1206,7 @@ function createNeonJuniorSqlExecutor(args) {
1200
1206
  return new NeonExecutor(pool, dispatcher);
1201
1207
  }
1202
1208
  // src/db/postgres.ts
1203
- const { Pool: Pool$1 } = pg;
1209
+ const { Pool } = pg;
1204
1210
  var PostgresExecutor = class {
1205
1211
  transactionClient = new AsyncLocalStorage();
1206
1212
  savepointId = 0;
@@ -1307,7 +1313,7 @@ var PostgresExecutor = class {
1307
1313
  };
1308
1314
  /** Create the shared Node Postgres-backed Junior SQL executor. */
1309
1315
  function createPostgresJuniorSqlExecutor(args) {
1310
- const pool = new Pool$1({
1316
+ const pool = new Pool({
1311
1317
  application_name: args.applicationName,
1312
1318
  connectionString: args.connectionString,
1313
1319
  max: 3,
@@ -97,10 +97,10 @@ function encodeHistoryPayload(data) {
97
97
  payload: {
98
98
  message: JSON.stringify(message),
99
99
  provenance,
100
- model: message.model,
101
- provider: message.provider,
102
- usage: message.usage,
103
- toolCallId: message.toolCallId
100
+ model: message["model"],
101
+ provider: message["provider"],
102
+ usage: message["usage"],
103
+ toolCallId: message["toolCallId"]
104
104
  }
105
105
  };
106
106
  }
@@ -109,13 +109,16 @@ function decodeHistoryPayload(type, payload) {
109
109
  const fields = messageFieldsSchema.parse(payload);
110
110
  if (type === "handoff" || type === "compaction") return {
111
111
  ...fields,
112
- replacementHistory: z.array(replacementEntrySchema).parse(fields.replacementHistory).map(({ item, ...entry }) => ({
113
- ...entry,
114
- item: JSON.parse(item)
115
- }))
112
+ replacementHistory: z.array(replacementEntrySchema).parse(fields["replacementHistory"]).map(({ item, ...entry }) => {
113
+ const parsedItem = JSON.parse(item);
114
+ return {
115
+ ...entry,
116
+ item: parsedItem
117
+ };
118
+ })
116
119
  };
117
- const message = messageFieldsSchema.parse(JSON.parse(z.string().parse(fields.message)));
118
- if (fields.provenance !== void 0) message.provenance = fields.provenance;
120
+ const message = messageFieldsSchema.parse(JSON.parse(z.string().parse(fields["message"])));
121
+ if (fields["provenance"] !== void 0) message["provenance"] = fields["provenance"];
119
122
  return message;
120
123
  }
121
124
  // src/chat/conversations/history.ts
@@ -1,9 +1,9 @@
1
- import { ao as SANDBOX_COMMAND_PATH, ho as runNonInteractiveCommand, lo as SANDBOX_WORKSPACE_ROOT } from "./projection-CIBwgD3s.js";
2
- import { E as withSpan, b as setSpanAttributes } from "./logging-C9oDAg4M.js";
1
+ import { _o as runNonInteractiveCommand, do as SANDBOX_WORKSPACE_ROOT, so as SANDBOX_COMMAND_PATH } from "./projection-DBq8tsA5.js";
2
+ import { E as withSpan, b as setSpanAttributes } from "./logging-DiyqRLBx.js";
3
3
  // src/chat/sandbox/resources.ts
4
4
  let configuredResources;
5
5
  function resourcesFromEnv() {
6
- const value = process.env.SANDBOX_VCPUS?.trim();
6
+ const value = process.env["SANDBOX_VCPUS"]?.trim();
7
7
  if (!value || !/^\d+$/.test(value)) return;
8
8
  const vcpus = Number(value);
9
9
  if (!Number.isSafeInteger(vcpus) || vcpus <= 0) return;
@@ -12,11 +12,11 @@ export declare function nameRequestRoute(method: string, route: string): void;
12
12
  export declare function routeNameMiddleware(): MiddlewareHandler;
13
13
  /** Browser SDK settings and the current request's trace, for an HTML page. */
14
14
  export interface BrowserSentryConfig {
15
- baggage?: string;
15
+ baggage?: string | undefined;
16
16
  dsn: string;
17
- environment?: string;
18
- release?: string;
19
- sentryTrace?: string;
17
+ environment?: string | undefined;
18
+ release?: string | undefined;
19
+ sentryTrace?: string | undefined;
20
20
  tracesSampleRate: number;
21
21
  }
22
22
  /**
@@ -1,10 +1,10 @@
1
- import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-BRTJqumy.js";
2
- import { B as getDeploymentServiceVersion, V as getDeploymentTelemetryAttributes } from "./logging-C9oDAg4M.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-D9xnM5mK.js";
1
+ import { a as getClient, c as init, i as getActiveSpan, o as getGlobalScope, p as spanToJSON, s as getTraceData } from "./sentry-CPbZjomA.js";
2
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-Cx515ddM.js";
3
+ import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
4
4
  import { n as redactSandboxEgressProxyPath } from "./proxy-path-BHYoKZdq.js";
5
+ import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-C6EIzAGP.js";
5
6
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-CE7_lEdq.js";
6
- import { n as promoteHttpRouteName, r as routeNameMiddleware, t as nameRequestRoute } from "./sentry-route-name-BhwWnfqj.js";
7
- import { n as isPushServiceHost } from "./push-endpoint-CO-nomUd.js";
7
+ import { B as getDeploymentServiceVersion, V as getDeploymentTelemetryAttributes } from "./logging-DiyqRLBx.js";
8
8
  import { performance } from "node:perf_hooks";
9
9
  import { subscribe, unsubscribe } from "node:diagnostics_channel";
10
10
  // src/chat/pi/gateway-request-timing.ts
@@ -330,17 +330,17 @@ function getBoolean(value, fallback) {
330
330
  return fallback;
331
331
  }
332
332
  function getEnvironment() {
333
- return process.env.SENTRY_ENVIRONMENT ?? process.env.VERCEL_ENV ?? process.env.NODE_ENV;
333
+ return process.env["SENTRY_ENVIRONMENT"] ?? process.env["VERCEL_ENV"] ?? process.env["NODE_ENV"];
334
334
  }
335
335
  function getTracesSampleRate() {
336
- return getSampleRate(process.env.SENTRY_TRACES_SAMPLE_RATE, 1);
336
+ return getSampleRate(process.env["SENTRY_TRACES_SAMPLE_RATE"], 1);
337
337
  }
338
338
  /**
339
339
  * Read the settings a served page needs to send browser spans to the same
340
340
  * project, continuing the trace of the request that rendered it.
341
341
  */
342
342
  function getBrowserSentryConfig() {
343
- const dsn = process.env.SENTRY_DSN?.trim();
343
+ const dsn = process.env["SENTRY_DSN"]?.trim();
344
344
  if (!dsn) return void 0;
345
345
  const trace = getTraceData();
346
346
  return {
@@ -355,8 +355,8 @@ function getBrowserSentryConfig() {
355
355
  /** Initialize Sentry for the Junior runtime. Call at the top of your entry point. */
356
356
  function initSentry() {
357
357
  if (getClient()) return;
358
- const dsn = process.env.SENTRY_DSN;
359
- const enableLogs = getBoolean(process.env.SENTRY_ENABLE_LOGS, Boolean(dsn));
358
+ const dsn = process.env["SENTRY_DSN"];
359
+ const enableLogs = getBoolean(process.env["SENTRY_ENABLE_LOGS"], Boolean(dsn));
360
360
  const serviceVersion = getDeploymentServiceVersion();
361
361
  const deploymentSpanAttributes = getDeploymentTelemetryAttributes();
362
362
  init({
@@ -1,5 +1,5 @@
1
- import { O as conversationKindFromRow, o as getDb } from "./db-B-gtnNjr.js";
2
- import { M as juniorConversations } from "./executor-DZg20EqU.js";
1
+ import { O as conversationKindFromRow, o as getDb } from "./db-C-2tFxk3.js";
2
+ import { M as juniorConversations } from "./executor-NVfS8aQ2.js";
3
3
  import { desc, eq, sql } from "drizzle-orm";
4
4
  // src/chat/conversations/lineage.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-BRTJqumy.js";
2
- import { t as JUNIOR_VERSION } from "./version-BHHXNi-0.js";
1
+ import { _ as withScope, d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException } from "./sentry-CPbZjomA.js";
2
+ import { t as JUNIOR_VERSION } from "./version-Uo3c94Dx.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -127,21 +127,21 @@ function toOptionalTrimmed(value) {
127
127
  }
128
128
  /** Resolve the deployment version used for release and telemetry correlation. */
129
129
  function getDeploymentServiceVersion() {
130
- const configuredRelease = toOptionalTrimmed(process.env.SENTRY_RELEASE);
130
+ const configuredRelease = toOptionalTrimmed(process.env["SENTRY_RELEASE"]);
131
131
  if (configuredRelease) return configuredRelease;
132
- const deploymentRevision = toOptionalTrimmed(process.env.VERCEL_GIT_COMMIT_SHA);
132
+ const deploymentRevision = toOptionalTrimmed(process.env["VERCEL_GIT_COMMIT_SHA"]);
133
133
  return deploymentRevision ? `${JUNIOR_VERSION}+${deploymentRevision}` : void 0;
134
134
  }
135
135
  /** Vercel deployment that runs this process. Unset outside Vercel. */
136
136
  function getDeploymentId() {
137
- return toOptionalTrimmed(process.env.VERCEL_DEPLOYMENT_ID);
137
+ return toOptionalTrimmed(process.env["VERCEL_DEPLOYMENT_ID"]);
138
138
  }
139
139
  /** Resolve deployment-scoped telemetry attributes from host environment. */
140
140
  function getDeploymentTelemetryAttributes() {
141
141
  const attributes = {};
142
142
  const serviceVersion = getDeploymentServiceVersion();
143
143
  const deploymentId = getDeploymentId();
144
- const region = toOptionalTrimmed(process.env.VERCEL_REGION);
144
+ const region = toOptionalTrimmed(process.env["VERCEL_REGION"]);
145
145
  attributes["app.junior.version"] = JUNIOR_VERSION;
146
146
  attributes["service.instance.id"] = SERVICE_INSTANCE_ID;
147
147
  if (region) attributes["cloud.region"] = region;
@@ -280,7 +280,7 @@ const SENTRY_TAG_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
280
280
  "url.path"
281
281
  ]);
282
282
  function getSentryEnvironment() {
283
- return (process.env.SENTRY_ENVIRONMENT ?? process.env.VERCEL_ENV ?? process.env.NODE_ENV ?? "").trim().toLowerCase();
283
+ return (process.env["SENTRY_ENVIRONMENT"] ?? process.env["VERCEL_ENV"] ?? process.env["NODE_ENV"] ?? "").trim().toLowerCase();
284
284
  }
285
285
  /** Marks an audit event. Sentry keeps it in production. */
286
286
  const AUDIT_LOG_ATTRIBUTE = "app.log.audit";
@@ -288,17 +288,17 @@ function shouldSuppressInfoLog(level, attributes) {
288
288
  return getSentryEnvironment() === "production" && level === "info" && attributes[AUDIT_LOG_ATTRIBUTE] !== true;
289
289
  }
290
290
  function shouldEmitConsole(level) {
291
- if (process.env.NODE_ENV === "test") return level === "error";
291
+ if (process.env["NODE_ENV"] === "test") return level === "error";
292
292
  return true;
293
293
  }
294
294
  function isDevelopmentLoggingMode() {
295
- if (process.env.NODE_ENV !== "development") return false;
296
- if (process.env.CI) return false;
295
+ if (process.env["NODE_ENV"] !== "development") return false;
296
+ if (process.env["CI"]) return false;
297
297
  return true;
298
298
  }
299
299
  function shouldUseDevelopmentConsoleFormat() {
300
300
  if (!isDevelopmentLoggingMode()) return false;
301
- return process.env.JUNIOR_LOG_FORMAT?.trim().toLowerCase() !== "structured";
301
+ return process.env["JUNIOR_LOG_FORMAT"]?.trim().toLowerCase() !== "structured";
302
302
  }
303
303
  function shouldUsePrettyConsole(level) {
304
304
  if (level === "warn" || level === "error") return false;
@@ -306,8 +306,8 @@ function shouldUsePrettyConsole(level) {
306
306
  }
307
307
  function shouldUseConsoleColor() {
308
308
  if (!shouldUseDevelopmentConsoleFormat()) return false;
309
- if (process.env.NO_COLOR) return false;
310
- return process.env.FORCE_COLOR?.trim() === "1" || Boolean(process.stdout?.isTTY) || Boolean(process.stderr?.isTTY);
309
+ if (process.env["NO_COLOR"]) return false;
310
+ return process.env["FORCE_COLOR"]?.trim() === "1" || Boolean(process.stdout?.isTTY) || Boolean(process.stderr?.isTTY);
311
311
  }
312
312
  function formatConsoleTimestamp(timestamp) {
313
313
  if (shouldUseDevelopmentConsoleFormat()) return timestamp.toTimeString().slice(0, 8);
@@ -386,7 +386,7 @@ function toSnakeCase(value) {
386
386
  function normalizeEventName(value) {
387
387
  const segments = value.trim().split(".").map(toSnakeCase).filter(Boolean);
388
388
  const normalized = segments.length === 0 ? "log.record.emitted" : segments.length === 1 ? `app.${segments[0]}` : segments.join(".");
389
- if (process.env.NODE_ENV !== "production" && (!EVENT_NAME_PATTERN.test(value) || value !== normalized)) throw new Error(`Invalid log event name "${value}"; use lowercase dot-delimited namespaces`);
389
+ if (process.env["NODE_ENV"] !== "production" && (!EVENT_NAME_PATTERN.test(value) || value !== normalized)) throw new Error(`Invalid log event name "${value}"; use lowercase dot-delimited namespaces`);
390
390
  return normalized;
391
391
  }
392
392
  function isSemanticKey(key) {
@@ -439,8 +439,8 @@ function getTraceCorrelationAttributes() {
439
439
  if (!span) return {};
440
440
  const json = spanToJSON(span);
441
441
  const attrs = {};
442
- if (json.trace_id) attrs.trace_id = json.trace_id;
443
- if (json.span_id) attrs.span_id = json.span_id;
442
+ if (json.trace_id) attrs["trace_id"] = json.trace_id;
443
+ if (json.span_id) attrs["span_id"] = json.span_id;
444
444
  return attrs;
445
445
  } catch {
446
446
  return {};
@@ -638,7 +638,7 @@ function booleanConsoleToken(label, value) {
638
638
  return typeof value === "boolean" ? `${label}=${value ? "yes" : "no"}` : void 0;
639
639
  }
640
640
  function shouldShowPrettyCorrelation(eventName) {
641
- return !(eventName === "plugin.loaded" || eventName === "startup.discovery.completed" || eventName.endsWith(".loaded"));
641
+ return !(eventName === "startup.discovery.completed" || eventName.endsWith(".loaded"));
642
642
  }
643
643
  function getPrettyConsoleSummaryTokens(level, eventName, attributes) {
644
644
  const tokens = [];
@@ -1185,13 +1185,13 @@ const PI_COST_FIELDS = [
1185
1185
  function readPiUsage(source) {
1186
1186
  const record = asRecord(source);
1187
1187
  if (!record) return {};
1188
- const usage = asRecord(record.usage) ?? record;
1188
+ const usage = asRecord(record["usage"]) ?? record;
1189
1189
  const summary = {};
1190
1190
  for (const [piKey, ourKey] of PI_USAGE_FIELDS) {
1191
1191
  const value = toFiniteTokenCount(usage[piKey]) ?? toFiniteTokenCount(usage[ourKey]);
1192
1192
  if (value !== void 0) summary[ourKey] = value;
1193
1193
  }
1194
- const piCost = asRecord(usage.cost);
1194
+ const piCost = asRecord(usage["cost"]);
1195
1195
  if (piCost) {
1196
1196
  const cost = {};
1197
1197
  for (const field of PI_COST_FIELDS) {
@@ -1,12 +1,12 @@
1
- import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { Jn as renderUntrustedTag, vo as canAccessConversation, xo as readConversationAccessFromSql } from "./projection-CIBwgD3s.js";
3
- import { n as botConfig } from "./config-CzeZiMKs.js";
4
- import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-B-gtnNjr.js";
5
- import { A as actorFromRun, j as toolInvocationDestination } from "./agent-runner-CY9RvsTX.js";
6
- import { H as admitAutomatedTurn, L as postAutomatedTurnLimitNoticeForConversation, k as EVENT_WAIT_MS } from "./session-stop-DW63Z3kj.js";
7
- import { Dn as findChildAgentConversationId, En as AgentMessageTargetError, Sn as createAgentInvocationForMessage, Tn as AgentMessagePausedError, Wt as getActiveAgentInvocationForConversation, kn as PARENT_AGENT_TARGET, mn as enqueueAgentInvocation, qt as getLatestAgentInvocationForConversation, rn as readChildConversationSender } from "./warmup-Bz9bzkzN.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-C28I0CVW.js";
9
- import { a as enqueueAgentMessageToParent } from "./result-oOMv1t4O.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
+ import { A as actorFromRun, j as toolInvocationDestination } from "./agent-runner-BP8_DLUv.js";
3
+ import { An as PARENT_AGENT_TARGET, Cn as createAgentInvocationForMessage, Dn as AgentMessageTargetError, En as AgentMessagePausedError, Gt as getActiveAgentInvocationForConversation, Jt as getLatestAgentInvocationForConversation, On as findChildAgentConversationId, hn as enqueueAgentInvocation, in as readChildConversationSender } from "./warmup-H8uLvW9e.js";
4
+ import { a as enqueueAgentMessageToParent } from "./result-DpiNseDA.js";
5
+ import { Co as readConversationAccessFromSql, Jn as renderUntrustedTag, bo as canAccessConversation } from "./projection-DBq8tsA5.js";
6
+ import { n as botConfig } from "./config-oGM7KA9M.js";
7
+ import { M as SYSTEM_IDENTITY_ID, a as getConversationStore, o as getDb } from "./db-C-2tFxk3.js";
8
+ import { H as admitAutomatedTurn, L as postAutomatedTurnLimitNoticeForConversation, k as EVENT_WAIT_MS } from "./session-stop-BLLp1IP_.js";
9
+ import { r as appendAndEnqueueInboundMessage } from "./store-Dgs7Oe44.js";
10
10
  // src/chat/agent-invocations/top-level-message.ts
11
11
  const AGENT_MESSAGE_EVENT_NAMESPACE = "junior";
12
12
  /** Event type of a message from another top-level agent. */
@@ -1,14 +1,9 @@
1
- import { v as __exportAll } from "./sentry-BRTJqumy.js";
2
- import { s as getSqlExecutor } from "./db-B-gtnNjr.js";
3
- import { Mt as readLiveAttachment } from "./warmup-Bz9bzkzN.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
+ import { s as getSqlExecutor } from "./db-C-2tFxk3.js";
4
3
  import { h as isVisionImageMediaType, m as detectImageMediaType } from "./web-message-id-lNodcCOI.js";
4
+ import { Nt as readLiveAttachment } from "./warmup-H8uLvW9e.js";
5
5
  // src/chat/attachments/model-input.ts
6
- var model_input_exports = /* @__PURE__ */ __exportAll({
7
- MAX_MODEL_ATTACHMENTS: () => 3,
8
- MAX_MODEL_ATTACHMENT_BYTES: () => MAX_MODEL_ATTACHMENT_BYTES,
9
- buildStoredAttachmentPromptText: () => buildStoredAttachmentPromptText,
10
- loadInputAttachments: () => loadInputAttachments
11
- });
6
+ var model_input_exports = /* @__PURE__ */ __exportAll({ loadInputAttachments: () => loadInputAttachments });
12
7
  /** Largest file that Slack and web send to the model in the prompt. */
13
8
  const MAX_MODEL_ATTACHMENT_BYTES = 5242880;
14
9
  /** Tell the model how to read a stored file that the prompt does not carry. */
package/dist/nitro.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as JuniorDashboardOptions } from "./app-BpY3wtRP.js";
2
1
  import { n as JuniorPluginSet } from "./plugins-B_0Cr0MO.js";
2
+ import { i as JuniorDashboardOptions } from "./app-Dd9v1mNx.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
5
5
  type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;