@sentry/junior 0.196.0 → 0.198.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 (66) hide show
  1. package/dist/{agent-hooks-IQLRR4RC.js → agent-hooks-3E7O7ATZ.js} +11 -11
  2. package/dist/api.js +24 -24
  3. package/dist/app.d.ts +2 -1
  4. package/dist/app.js +44 -80
  5. package/dist/{catalog-runtime-EM7V2F4I.js → catalog-runtime-QDUBRXEW.js} +4 -4
  6. package/dist/chat/config.d.ts +16 -0
  7. package/dist/chat/services/automated-turn-limit.d.ts +13 -34
  8. package/dist/chat/slack/automated-turn-limit-notice.d.ts +2 -24
  9. package/dist/{chunk-PIZJBSGZ.js → chunk-2ACXVY6O.js} +1 -1
  10. package/dist/{chunk-VSOO3Y6M.js → chunk-342FVAX5.js} +1 -1
  11. package/dist/{chunk-G6YRPYDC.js → chunk-3J5Y4RWY.js} +1 -1
  12. package/dist/{chunk-CTS72G4B.js → chunk-3TMKXW4H.js} +1 -1
  13. package/dist/{chunk-ES7KCEND.js → chunk-4FHQ6CCO.js} +1 -1
  14. package/dist/{chunk-NE2UQMC7.js → chunk-4UW7BEJZ.js} +6 -6
  15. package/dist/{chunk-BXIVMNLR.js → chunk-7KXZRRMK.js} +1 -1
  16. package/dist/{chunk-S74KAE77.js → chunk-A6KKPVEA.js} +4 -4
  17. package/dist/{chunk-SR5FS2JP.js → chunk-BFIFTKUS.js} +3 -3
  18. package/dist/{chunk-EEUFKVCD.js → chunk-C3SNQB6B.js} +21 -21
  19. package/dist/{chunk-PI6VXVBK.js → chunk-CBHQOGFA.js} +1 -1
  20. package/dist/{chunk-VVU7GHIZ.js → chunk-CGNZXN7B.js} +8 -8
  21. package/dist/{chunk-P3LE2CSJ.js → chunk-CSGQWJIY.js} +2 -2
  22. package/dist/{chunk-RFNMWONZ.js → chunk-CZC6ZEXR.js} +6 -6
  23. package/dist/{chunk-LSPUMNZK.js → chunk-D3SLBCD4.js} +2 -2
  24. package/dist/{chunk-5XSEOJPC.js → chunk-EATO3SKS.js} +54 -2
  25. package/dist/{chunk-7TUDDW3Y.js → chunk-EWPTEQXA.js} +3 -3
  26. package/dist/{chunk-J357NJQ5.js → chunk-F3XUS2T5.js} +5 -5
  27. package/dist/{chunk-B5WJBVHY.js → chunk-FU4OWKCL.js} +2 -2
  28. package/dist/{chunk-QAINJHI4.js → chunk-G2CT2D5U.js} +5 -5
  29. package/dist/{chunk-LGXI6PWX.js → chunk-G6XSYS3Q.js} +4 -4
  30. package/dist/{chunk-VKLQ2M7V.js → chunk-IZ4CIFJY.js} +9 -9
  31. package/dist/{chunk-DFWJJOW3.js → chunk-KVXHBJCH.js} +1 -1
  32. package/dist/{chunk-KJGH3KWA.js → chunk-LXPGGSYD.js} +3 -3
  33. package/dist/{chunk-RAWYH7TW.js → chunk-N3GQY63R.js} +8 -2
  34. package/dist/{chunk-VRHZXY5X.js → chunk-N6LJYW7V.js} +1 -1
  35. package/dist/{chunk-VXAQTJSR.js → chunk-NVDUM2CM.js} +1 -1
  36. package/dist/{chunk-CNI74T7U.js → chunk-OKQMTCHU.js} +5 -5
  37. package/dist/{chunk-GZ336GZ5.js → chunk-QYSJWJLJ.js} +4 -4
  38. package/dist/{chunk-OVWAO5KY.js → chunk-SCVIT6K4.js} +51 -174
  39. package/dist/{chunk-XNXKRWWI.js → chunk-SPEJV3TW.js} +3 -10
  40. package/dist/{chunk-EQBHN4JK.js → chunk-T5KV6DUY.js} +1 -1
  41. package/dist/{chunk-6LQNW2CJ.js → chunk-U67DBSNZ.js} +6 -6
  42. package/dist/{chunk-LCAM2P7H.js → chunk-VYGZPJSM.js} +4 -4
  43. package/dist/{chunk-N2MSPOGG.js → chunk-X2WFY3TM.js} +8 -8
  44. package/dist/{chunk-I7GEGEHZ.js → chunk-XNZAZ57D.js} +1 -1
  45. package/dist/{chunk-EFNUCRB5.js → chunk-ZORFTPFN.js} +8 -8
  46. package/dist/{chunk-KZX7LORG.js → chunk-ZUEUBQWE.js} +3 -3
  47. package/dist/cli/chat.js +33 -33
  48. package/dist/cli/check.js +5 -5
  49. package/dist/cli/plugins.js +12 -12
  50. package/dist/cli/snapshot-create.js +9 -9
  51. package/dist/cli/upgrade.js +6 -6
  52. package/dist/{db-YTM7ZXPK.js → db-OSPYS4WA.js} +6 -6
  53. package/dist/instrumentation.js +3 -3
  54. package/dist/nitro.js +6 -6
  55. package/dist/{oauth-callback-server-OXW4KQLQ.js → oauth-callback-server-VG736DHZ.js} +29 -29
  56. package/dist/{runner-RJY5RNJO.js → runner-3GKIVG6A.js} +21 -21
  57. package/dist/{skills-WZV6NLFY.js → skills-FKMV7HTX.js} +5 -5
  58. package/dist/spawn-5YR3E42B.js +42 -0
  59. package/dist/task-runner-GR2WZNCW.js +36 -0
  60. package/dist/{validation-XS5ZHV3W.js → validation-4XYG33GY.js} +5 -5
  61. package/dist/version.js +1 -1
  62. package/dist/{work-LJMSDEY3.js → work-TJAL6PV3.js} +21 -21
  63. package/dist/{worker-NMFZ7A2N.js → worker-3OYUEME2.js} +10 -10
  64. package/package.json +4 -4
  65. package/dist/spawn-J7SQJLYF.js +0 -42
  66. package/dist/task-runner-SMUQ5464.js +0 -36
@@ -13,26 +13,26 @@ import {
13
13
  getPlugins,
14
14
  setPlugins,
15
15
  validatePlugins
16
- } from "./chunk-NE2UQMC7.js";
16
+ } from "./chunk-4UW7BEJZ.js";
17
17
  import "./chunk-3Y47VMHV.js";
18
- import "./chunk-XNXKRWWI.js";
19
- import "./chunk-PIZJBSGZ.js";
20
- import "./chunk-SR5FS2JP.js";
21
- import "./chunk-EQBHN4JK.js";
18
+ import "./chunk-SPEJV3TW.js";
19
+ import "./chunk-2ACXVY6O.js";
20
+ import "./chunk-BFIFTKUS.js";
21
+ import "./chunk-T5KV6DUY.js";
22
22
  import "./chunk-7NL7T6VU.js";
23
23
  import "./chunk-VFUK3X5B.js";
24
- import "./chunk-5XSEOJPC.js";
24
+ import "./chunk-EATO3SKS.js";
25
25
  import "./chunk-NHJU2ZAL.js";
26
- import "./chunk-ES7KCEND.js";
27
- import "./chunk-G6YRPYDC.js";
28
- import "./chunk-BXIVMNLR.js";
26
+ import "./chunk-4FHQ6CCO.js";
27
+ import "./chunk-3J5Y4RWY.js";
28
+ import "./chunk-7KXZRRMK.js";
29
29
  import "./chunk-CEMMLV5L.js";
30
30
  import "./chunk-N7TMSOZH.js";
31
31
  import "./chunk-DWPN6SCH.js";
32
32
  import "./chunk-TXKUKMVO.js";
33
- import "./chunk-CTS72G4B.js";
33
+ import "./chunk-3TMKXW4H.js";
34
34
  import "./chunk-PEQXYSSE.js";
35
- import "./chunk-I7GEGEHZ.js";
35
+ import "./chunk-XNZAZ57D.js";
36
36
  export {
37
37
  PluginHookDeniedError,
38
38
  applyPluginFormatMarkdown,
package/dist/api.js CHANGED
@@ -78,12 +78,12 @@ import {
78
78
  resolveSlackConversationContextFromThreadId,
79
79
  viewerConversationMembership,
80
80
  webActorFromEmail
81
- } from "./chunk-EFNUCRB5.js";
81
+ } from "./chunk-ZORFTPFN.js";
82
82
  import {
83
83
  buildSentryConversationUrl,
84
84
  buildSentryEventUrl,
85
85
  getWebAuthorization
86
- } from "./chunk-RAWYH7TW.js";
86
+ } from "./chunk-N3GQY63R.js";
87
87
  import {
88
88
  conversationActiveDaysColumn,
89
89
  conversationAggregateColumns,
@@ -97,7 +97,7 @@ import {
97
97
  readTaskExecutionSummaries,
98
98
  readTaskExecutions,
99
99
  readTaskRuns
100
- } from "./chunk-LGXI6PWX.js";
100
+ } from "./chunk-G6XSYS3Q.js";
101
101
  import {
102
102
  healthReportSchema,
103
103
  pluginOperationalReportFeedSchema,
@@ -121,24 +121,24 @@ import {
121
121
  readScheduledTask,
122
122
  readStats,
123
123
  saveScheduledTask
124
- } from "./chunk-GZ336GZ5.js";
124
+ } from "./chunk-QYSJWJLJ.js";
125
125
  import {
126
126
  parseSlackThreadId
127
- } from "./chunk-VXAQTJSR.js";
127
+ } from "./chunk-NVDUM2CM.js";
128
128
  import {
129
129
  cancelHumanFacingPendingMessages,
130
130
  getConversation
131
- } from "./chunk-S74KAE77.js";
131
+ } from "./chunk-A6KKPVEA.js";
132
132
  import "./chunk-DA2KGZZI.js";
133
133
  import {
134
134
  agentTurnUsageSchema,
135
135
  fallbackShortTitle,
136
136
  hasAgentTurnUsage,
137
137
  renderJuniorNativeConversationEvent
138
- } from "./chunk-B5WJBVHY.js";
138
+ } from "./chunk-FU4OWKCL.js";
139
139
  import {
140
140
  getCachedSnapshot
141
- } from "./chunk-KZX7LORG.js";
141
+ } from "./chunk-ZUEUBQWE.js";
142
142
  import "./chunk-PDO5BLNM.js";
143
143
  import {
144
144
  getVercelConversationWorkQueue
@@ -164,7 +164,7 @@ import {
164
164
  updateWorkspace,
165
165
  withSlackRetries,
166
166
  workspaceRepoCheckoutPath
167
- } from "./chunk-NE2UQMC7.js";
167
+ } from "./chunk-4UW7BEJZ.js";
168
168
  import "./chunk-3Y47VMHV.js";
169
169
  import {
170
170
  getConversationStore,
@@ -173,7 +173,7 @@ import {
173
173
  locationFromRow,
174
174
  parseSessionSource,
175
175
  resolveRootConversationId
176
- } from "./chunk-XNXKRWWI.js";
176
+ } from "./chunk-SPEJV3TW.js";
177
177
  import {
178
178
  conversationReadColumns,
179
179
  juniorApiTokens,
@@ -185,23 +185,23 @@ import {
185
185
  juniorIdentities,
186
186
  juniorSchedulerTasks,
187
187
  juniorUsers
188
- } from "./chunk-PIZJBSGZ.js";
188
+ } from "./chunk-2ACXVY6O.js";
189
189
  import {
190
190
  create,
191
191
  hash
192
- } from "./chunk-SR5FS2JP.js";
193
- import "./chunk-EQBHN4JK.js";
192
+ } from "./chunk-BFIFTKUS.js";
193
+ import "./chunk-T5KV6DUY.js";
194
194
  import {
195
195
  decodeStoredConversationEvent
196
196
  } from "./chunk-7NL7T6VU.js";
197
197
  import {
198
198
  juniorDestinations
199
199
  } from "./chunk-VFUK3X5B.js";
200
- import "./chunk-5XSEOJPC.js";
200
+ import "./chunk-EATO3SKS.js";
201
201
  import "./chunk-NHJU2ZAL.js";
202
- import "./chunk-ES7KCEND.js";
203
- import "./chunk-G6YRPYDC.js";
204
- import "./chunk-BXIVMNLR.js";
202
+ import "./chunk-4FHQ6CCO.js";
203
+ import "./chunk-3J5Y4RWY.js";
204
+ import "./chunk-7KXZRRMK.js";
205
205
  import "./chunk-CEMMLV5L.js";
206
206
  import {
207
207
  parseSlackChannelId,
@@ -213,9 +213,9 @@ import "./chunk-TXKUKMVO.js";
213
213
  import {
214
214
  logException,
215
215
  logWarn
216
- } from "./chunk-CTS72G4B.js";
216
+ } from "./chunk-3TMKXW4H.js";
217
217
  import "./chunk-PEQXYSSE.js";
218
- import "./chunk-I7GEGEHZ.js";
218
+ import "./chunk-XNZAZ57D.js";
219
219
 
220
220
  // src/api.ts
221
221
  import { Hono as Hono9 } from "hono";
@@ -5048,7 +5048,7 @@ async function readPeoplePluginReports(args) {
5048
5048
  source: "plugins"
5049
5049
  });
5050
5050
  }
5051
- const { getPluginProfileReports } = await import("./agent-hooks-IQLRR4RC.js");
5051
+ const { getPluginProfileReports } = await import("./agent-hooks-3E7O7ATZ.js");
5052
5052
  return pluginOperationalReportFeedSchema.parse({
5053
5053
  generatedAt: new Date(nowMs).toISOString(),
5054
5054
  reports: await getPluginProfileReports({
@@ -5882,7 +5882,7 @@ function readDescriptionText(home) {
5882
5882
  }
5883
5883
  }
5884
5884
  async function readSkillReports() {
5885
- const { discoverSkills } = await import("./skills-WZV6NLFY.js");
5885
+ const { discoverSkills } = await import("./skills-FKMV7HTX.js");
5886
5886
  const skills = await discoverSkills();
5887
5887
  return skillReportsSchema.parse(
5888
5888
  skills.map((skill) => ({
@@ -5892,7 +5892,7 @@ async function readSkillReports() {
5892
5892
  );
5893
5893
  }
5894
5894
  async function readPlugins() {
5895
- const { pluginCatalogRuntime } = await import("./catalog-runtime-EM7V2F4I.js");
5895
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-QDUBRXEW.js");
5896
5896
  return pluginsSchema.parse(
5897
5897
  pluginCatalogRuntime.getProviders().map((plugin) => ({
5898
5898
  configKeys: plugin.manifest.configKeys ?? [],
@@ -5905,7 +5905,7 @@ async function readPlugins() {
5905
5905
  async function readRuntimeInfoReport() {
5906
5906
  const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
5907
5907
  import("./discovery-DWVDM7UK.js"),
5908
- import("./catalog-runtime-EM7V2F4I.js"),
5908
+ import("./catalog-runtime-QDUBRXEW.js"),
5909
5909
  readPlugins(),
5910
5910
  readSkillReports()
5911
5911
  ]);
@@ -5921,7 +5921,7 @@ async function readRuntimeInfoReport() {
5921
5921
  }
5922
5922
  async function readPluginOperationalReportFeed() {
5923
5923
  const nowMs = Date.now();
5924
- const { getPluginOperationalReports } = await import("./agent-hooks-IQLRR4RC.js");
5924
+ const { getPluginOperationalReports } = await import("./agent-hooks-3E7O7ATZ.js");
5925
5925
  return pluginOperationalReportFeedSchema.parse({
5926
5926
  source: "plugins",
5927
5927
  generatedAt: new Date(nowMs).toISOString(),
package/dist/app.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Hono } from "hono";
2
+ import { type BotModelConfig } from "@/chat/config";
2
3
  import type { ModelProfileInput } from "@/chat/model-profile";
3
4
  import { type ExperimentalFeaturesConfig } from "@/chat/experimental";
4
5
  import { type SandboxResourceConfig } from "@/chat/sandbox/resources";
@@ -10,7 +11,7 @@ export { defineJuniorPlugins } from "./plugins";
10
11
  export { JUNIOR_VERSION };
11
12
  export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "./plugins";
12
13
  export type { ModelProfileInput } from "@/chat/model-profile";
13
- export interface JuniorAppOptions {
14
+ export interface JuniorAppOptions extends BotModelConfig {
14
15
  /** Authenticated dashboard mounted by core when configured. */
15
16
  dashboard?: JuniorDashboardOptions;
16
17
  /**
package/dist/app.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  processConversationWork
3
- } from "./chunk-LCAM2P7H.js";
3
+ } from "./chunk-VYGZPJSM.js";
4
4
  import {
5
5
  bindSpawnAgent
6
- } from "./chunk-P3LE2CSJ.js";
6
+ } from "./chunk-CSGQWJIY.js";
7
7
  import {
8
8
  createAgentInvocationWorker,
9
9
  enqueueAgentInvocation,
10
10
  listPendingAgentInvocationMailboxAppends,
11
11
  resolveAgentInvocationId
12
- } from "./chunk-VKLQ2M7V.js";
12
+ } from "./chunk-IZ4CIFJY.js";
13
13
  import {
14
14
  GET as GET2,
15
15
  GET2 as GET3,
@@ -37,12 +37,12 @@ import {
37
37
  startProcessingReaction,
38
38
  stripLeadingBotMention,
39
39
  wakePausedTurn
40
- } from "./chunk-EEUFKVCD.js";
40
+ } from "./chunk-C3SNQB6B.js";
41
41
  import "./chunk-FA6POGLH.js";
42
42
  import {
43
43
  AgentRunError,
44
44
  executeTurn
45
- } from "./chunk-KJGH3KWA.js";
45
+ } from "./chunk-LXPGGSYD.js";
46
46
  import {
47
47
  buildDeliveredTurnStatePatch,
48
48
  completeAuthPauseTurn,
@@ -53,7 +53,7 @@ import {
53
53
  getTurnUserSlackMessageTs,
54
54
  persistAuthPauseTurnState,
55
55
  requireTurnFailureEventId
56
- } from "./chunk-J357NJQ5.js";
56
+ } from "./chunk-F3XUS2T5.js";
57
57
  import {
58
58
  claimDispatchMailboxAppend,
59
59
  confirmDispatchMailboxAppend,
@@ -73,11 +73,11 @@ import {
73
73
  processPluginTask,
74
74
  resolveTurnSessionRouting,
75
75
  scheduleSessionCompletedPluginTasks
76
- } from "./chunk-VVU7GHIZ.js";
76
+ } from "./chunk-CGNZXN7B.js";
77
77
  import {
78
78
  ConversationTurnLifecycleService,
79
79
  getTurnLifecycle
80
- } from "./chunk-VSOO3Y6M.js";
80
+ } from "./chunk-342FVAX5.js";
81
81
  import {
82
82
  coerceThreadConversationState,
83
83
  getLocationConfigurationService,
@@ -86,7 +86,7 @@ import {
86
86
  persistThreadRuntimeState,
87
87
  persistThreadState,
88
88
  persistThreadStateById
89
- } from "./chunk-QAINJHI4.js";
89
+ } from "./chunk-G2CT2D5U.js";
90
90
  import {
91
91
  GET,
92
92
  appendAndEnqueueWebMessage,
@@ -101,24 +101,24 @@ import {
101
101
  resolveSlackChannelTypeFromMessage,
102
102
  resolveSlackConversationContext,
103
103
  webActorFromEmail
104
- } from "./chunk-EFNUCRB5.js";
104
+ } from "./chunk-ZORFTPFN.js";
105
105
  import {
106
106
  createWebAuthorization,
107
107
  deleteWebAuthorization
108
- } from "./chunk-RAWYH7TW.js";
108
+ } from "./chunk-N3GQY63R.js";
109
109
  import {
110
110
  recordTaskExecution
111
- } from "./chunk-LGXI6PWX.js";
111
+ } from "./chunk-G6XSYS3Q.js";
112
112
  import "./chunk-RC745GGZ.js";
113
113
  import {
114
114
  createVercelPluginTaskCallback,
115
115
  queueCallback,
116
116
  registerVercelPluginTaskDevConsumer
117
- } from "./chunk-7TUDDW3Y.js";
117
+ } from "./chunk-EWPTEQXA.js";
118
118
  import {
119
119
  validatePluginEgressCredentialHooks,
120
120
  validatePluginRegistrations
121
- } from "./chunk-PI6VXVBK.js";
121
+ } from "./chunk-CBHQOGFA.js";
122
122
  import {
123
123
  defineJuniorPlugins,
124
124
  pluginCatalogConfigFromEnv,
@@ -129,7 +129,6 @@ import {
129
129
  RESOURCE_EVENT_MESSAGE_AUTHOR,
130
130
  RESOURCE_EVENT_SYSTEM_ACTOR,
131
131
  SANDBOX_EGRESS_PROXY_PATH,
132
- admitAutomatedTurn,
133
132
  buildSteeringPiMessage,
134
133
  clearSandboxEgressSignals,
135
134
  consumeSandboxEgressAuthRequiredSignal,
@@ -148,7 +147,6 @@ import {
148
147
  maybePostAutomatedTurnLimitNotice,
149
148
  normalizeSandboxEgressTracePropagationDomains,
150
149
  parseSandboxEgressCredentialToken,
151
- postAutomatedTurnLimitNoticeForDestination,
152
150
  processWorkspaceSnapshotJob,
153
151
  publicArtifactHeaders,
154
152
  readPublicArtifact,
@@ -162,11 +160,11 @@ import {
162
160
  shouldEmitDevAgentTrace,
163
161
  shouldPropagateSandboxEgressTrace,
164
162
  unpublishedArtifactHeaders
165
- } from "./chunk-OVWAO5KY.js";
163
+ } from "./chunk-SCVIT6K4.js";
166
164
  import {
167
165
  AuthorizationFlowDisabledError,
168
166
  PluginCredentialFailureError
169
- } from "./chunk-CNI74T7U.js";
167
+ } from "./chunk-OKQMTCHU.js";
170
168
  import "./chunk-6Y5B5PEX.js";
171
169
  import "./chunk-DIB4GX3G.js";
172
170
  import {
@@ -174,14 +172,14 @@ import {
174
172
  deleteMcpAuthSessionsForUserProvider,
175
173
  deleteMcpServerSessionId,
176
174
  deleteMcpStoredOAuthCredentials
177
- } from "./chunk-N2MSPOGG.js";
175
+ } from "./chunk-X2WFY3TM.js";
178
176
  import {
179
177
  RetryableDeliveryError,
180
178
  createAgentRunner,
181
179
  formatProviderLabel,
182
180
  postSlackMessage,
183
181
  startOAuthFlow
184
- } from "./chunk-RFNMWONZ.js";
182
+ } from "./chunk-CZC6ZEXR.js";
185
183
  import {
186
184
  ConversationTurnBoundaryError,
187
185
  CooperativeTurnYieldError,
@@ -197,7 +195,7 @@ import {
197
195
  markTurnCompleted,
198
196
  markTurnFailed,
199
197
  startActiveTurn
200
- } from "./chunk-DFWJJOW3.js";
198
+ } from "./chunk-KVXHBJCH.js";
201
199
  import {
202
200
  abandonTurnRecord,
203
201
  appendThreadContextMessages,
@@ -234,7 +232,7 @@ import {
234
232
  trimTrailingAssistantMessages,
235
233
  turnHasReply,
236
234
  upsertConversationMessage
237
- } from "./chunk-6LQNW2CJ.js";
235
+ } from "./chunk-U67DBSNZ.js";
238
236
  import {
239
237
  getExperimentalFeatures,
240
238
  isExperimentalFeatureEnabled,
@@ -254,10 +252,10 @@ import {
254
252
  scheduledRunId,
255
253
  scheduledRunSchema,
256
254
  withScheduledTaskLock
257
- } from "./chunk-GZ336GZ5.js";
255
+ } from "./chunk-QYSJWJLJ.js";
258
256
  import {
259
257
  parseSlackThreadId
260
- } from "./chunk-VXAQTJSR.js";
258
+ } from "./chunk-NVDUM2CM.js";
261
259
  import {
262
260
  CONVERSATION_WORK_STALE_ENQUEUE_MS,
263
261
  appendAndEnqueueInboundMessage,
@@ -272,16 +270,16 @@ import {
272
270
  removeActiveConversation,
273
271
  requestConversationWork,
274
272
  stopConversationWork
275
- } from "./chunk-S74KAE77.js";
273
+ } from "./chunk-A6KKPVEA.js";
276
274
  import {
277
275
  buildDeterministicAssistantMessageId,
278
276
  buildDeterministicTurnId
279
277
  } from "./chunk-DA2KGZZI.js";
280
- import "./chunk-B5WJBVHY.js";
278
+ import "./chunk-FU4OWKCL.js";
281
279
  import {
282
280
  getSandboxResourceConfig,
283
281
  setSandboxResourceConfig
284
- } from "./chunk-KZX7LORG.js";
282
+ } from "./chunk-ZUEUBQWE.js";
285
283
  import "./chunk-PDO5BLNM.js";
286
284
  import "./chunk-UIE3R5XU.js";
287
285
  import {
@@ -290,7 +288,7 @@ import {
290
288
  } from "./chunk-X6GDDWQH.js";
291
289
  import {
292
290
  getTurnRequestDeadline
293
- } from "./chunk-VRHZXY5X.js";
291
+ } from "./chunk-N6LJYW7V.js";
294
292
  import {
295
293
  getVercelConversationWorkQueue,
296
294
  resolveConversationWorkQueueTopic,
@@ -326,7 +324,7 @@ import {
326
324
  verifyEventTaskCredentialSubject,
327
325
  verifyScheduledTaskCredentialSubject,
328
326
  verifySlackDirectCredentialSubject
329
- } from "./chunk-NE2UQMC7.js";
327
+ } from "./chunk-4UW7BEJZ.js";
330
328
  import "./chunk-3Y47VMHV.js";
331
329
  import {
332
330
  createSlackDestination,
@@ -338,7 +336,7 @@ import {
338
336
  requireSlackDestination,
339
337
  withConversationEventLock,
340
338
  withConversationMutationLock
341
- } from "./chunk-XNXKRWWI.js";
339
+ } from "./chunk-SPEJV3TW.js";
342
340
  import {
343
341
  juniorAgentBindings,
344
342
  juniorAgentInvocations,
@@ -346,13 +344,13 @@ import {
346
344
  juniorConversations,
347
345
  juniorSchedulerRuns,
348
346
  juniorSchedulerTasks
349
- } from "./chunk-PIZJBSGZ.js";
350
- import "./chunk-SR5FS2JP.js";
347
+ } from "./chunk-2ACXVY6O.js";
348
+ import "./chunk-BFIFTKUS.js";
351
349
  import {
352
350
  acquireActiveLock,
353
351
  getStateAdapter,
354
352
  withActiveLock
355
- } from "./chunk-EQBHN4JK.js";
353
+ } from "./chunk-T5KV6DUY.js";
356
354
  import {
357
355
  instructionProvenanceFor
358
356
  } from "./chunk-7NL7T6VU.js";
@@ -372,19 +370,20 @@ import {
372
370
  getSlackReactionConfig,
373
371
  getSlackSigningSecret,
374
372
  isProviderRetryError,
373
+ setBotModelConfig,
375
374
  setProfiles,
376
375
  setSlackReactionConfig
377
- } from "./chunk-5XSEOJPC.js";
376
+ } from "./chunk-EATO3SKS.js";
378
377
  import {
379
378
  defaultModelId,
380
379
  modelIdForProfile
381
380
  } from "./chunk-NHJU2ZAL.js";
382
- import "./chunk-ES7KCEND.js";
383
- import "./chunk-LSPUMNZK.js";
381
+ import "./chunk-4FHQ6CCO.js";
382
+ import "./chunk-D3SLBCD4.js";
384
383
  import {
385
384
  pluginCatalogRuntime
386
- } from "./chunk-G6YRPYDC.js";
387
- import "./chunk-BXIVMNLR.js";
385
+ } from "./chunk-3J5Y4RWY.js";
386
+ import "./chunk-7KXZRRMK.js";
388
387
  import {
389
388
  credentialContextForActor
390
389
  } from "./chunk-CEMMLV5L.js";
@@ -420,13 +419,13 @@ import {
420
419
  withContext,
421
420
  withLogContext,
422
421
  withSpan
423
- } from "./chunk-CTS72G4B.js";
422
+ } from "./chunk-3TMKXW4H.js";
424
423
  import {
425
424
  continueTrace
426
425
  } from "./chunk-PEQXYSSE.js";
427
426
  import {
428
427
  JUNIOR_VERSION
429
- } from "./chunk-I7GEGEHZ.js";
428
+ } from "./chunk-XNZAZ57D.js";
430
429
 
431
430
  // src/app.ts
432
431
  import { createRequire } from "module";
@@ -7290,14 +7289,12 @@ function createSlackTurn(deps) {
7290
7289
  const automatedTurnLimit = await recordFinishedTurnForAutomatedLimit(
7291
7290
  {
7292
7291
  conversationId,
7293
- destination,
7294
7292
  maxTurns: botConfig.maxConsecutiveAutomatedTurns,
7295
7293
  source
7296
7294
  }
7297
7295
  );
7298
7296
  await maybePostAutomatedTurnLimitNotice({
7299
7297
  conversationId,
7300
- destination,
7301
7298
  maxTurns: botConfig.maxConsecutiveAutomatedTurns,
7302
7299
  threadTs,
7303
7300
  update: automatedTurnLimit
@@ -9194,13 +9191,11 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
9194
9191
  }
9195
9192
  const automatedTurnLimit = await recordFinishedTurnForAutomatedLimit({
9196
9193
  conversationId: context.conversationId,
9197
- destination,
9198
9194
  maxTurns: botConfig.maxConsecutiveAutomatedTurns,
9199
9195
  source
9200
9196
  });
9201
9197
  await maybePostAutomatedTurnLimitNotice({
9202
9198
  conversationId: context.conversationId,
9203
- destination,
9204
9199
  maxTurns: botConfig.maxConsecutiveAutomatedTurns,
9205
9200
  threadTs: conversationLocation?.provider === "slack" ? conversationLocation.threadTs : void 0,
9206
9201
  update: automatedTurnLimit
@@ -9587,40 +9582,8 @@ async function ingestEventTasks(input, options) {
9587
9582
  const tasks = await findMatchingEventTasks(db, event, options.teamId);
9588
9583
  let dispatched = 0;
9589
9584
  const errors = [];
9590
- const maxTurns = botConfig.maxConsecutiveAutomatedTurns;
9591
- const noticedDestinations = /* @__PURE__ */ new Set();
9592
9585
  for (const task of tasks) {
9593
9586
  try {
9594
- const decision = await admitAutomatedTurn({
9595
- maxTurns,
9596
- nowMs,
9597
- scope: { kind: "destination", destination: task.destination }
9598
- });
9599
- if (decision.status === "paused") {
9600
- const destinationId = `${task.destination.teamId}:${task.destination.channelId}`;
9601
- logInfo("event_tasks.automated_turn_limit.paused", {
9602
- "app.automated_turn_limit.consecutive": decision.consecutiveAutomatedTurns,
9603
- "app.automated_turn_limit.max": maxTurns,
9604
- "app.event_task.id": task.id,
9605
- "app.resource_event.event_type": event.eventType,
9606
- "app.resource_event.namespace": event.namespace,
9607
- "app.slack.channel_id": task.destination.channelId,
9608
- "app.slack.team_id": task.destination.teamId
9609
- });
9610
- if (decision.shouldPostNotice && !noticedDestinations.has(destinationId)) {
9611
- const posted = await postAutomatedTurnLimitNoticeForDestination({
9612
- destination: task.destination,
9613
- maxTurns,
9614
- nowMs,
9615
- resumeIn: "channel",
9616
- scope: { kind: "destination", destination: task.destination }
9617
- });
9618
- if (posted) {
9619
- noticedDestinations.add(destinationId);
9620
- }
9621
- }
9622
- continue;
9623
- }
9624
9587
  const idempotencyKey = eventTaskDispatchKey(
9625
9588
  task.id,
9626
9589
  event.namespace,
@@ -12202,8 +12165,7 @@ async function createApp(options) {
12202
12165
  validatePlugins(plugins);
12203
12166
  getDb();
12204
12167
  const shouldValidatePluginCatalog = hasConfiguredPluginCatalog(pluginConfig) || Boolean(configuredPlugins?.registrations.length) || Boolean(Object.keys(options?.configDefaults ?? {}).length);
12205
- const previousDefaultProfile = botConfig.defaultProfile;
12206
- const previousModelProfiles = botConfig.profiles;
12168
+ const previousBotConfig = { ...botConfig };
12207
12169
  const previousPluginCatalogConfig = pluginCatalogRuntime.setConfig(pluginConfig);
12208
12170
  const previousPlugins = setPlugins(plugins);
12209
12171
  const previousConfigDefaults = getConfigDefaults();
@@ -12215,8 +12177,7 @@ async function createApp(options) {
12215
12177
  pluginCatalogRuntime.setConfig(previousPluginCatalogConfig);
12216
12178
  setPlugins(previousPlugins);
12217
12179
  setConfigDefaults(previousConfigDefaults);
12218
- botConfig.defaultProfile = previousDefaultProfile;
12219
- botConfig.profiles = previousModelProfiles;
12180
+ Object.assign(botConfig, previousBotConfig);
12220
12181
  setSlackReactionConfig(previousSlackReactionConfig);
12221
12182
  setSandboxResourceConfig(previousSandboxResources);
12222
12183
  setExperimentalFeatures(previousExperimentalFeatures);
@@ -12239,6 +12200,9 @@ async function createApp(options) {
12239
12200
  if (options?.profiles || options?.defaultProfile) {
12240
12201
  setProfiles(options.profiles, options.defaultProfile);
12241
12202
  }
12203
+ if (options) {
12204
+ setBotModelConfig(options);
12205
+ }
12242
12206
  if (options?.slack) {
12243
12207
  setSlackReactionConfig(options.slack);
12244
12208
  }
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-G6YRPYDC.js";
4
- import "./chunk-BXIVMNLR.js";
3
+ } from "./chunk-3J5Y4RWY.js";
4
+ import "./chunk-7KXZRRMK.js";
5
5
  import "./chunk-CEMMLV5L.js";
6
6
  import "./chunk-N7TMSOZH.js";
7
7
  import "./chunk-DWPN6SCH.js";
8
8
  import "./chunk-TXKUKMVO.js";
9
- import "./chunk-CTS72G4B.js";
9
+ import "./chunk-3TMKXW4H.js";
10
10
  import "./chunk-PEQXYSSE.js";
11
- import "./chunk-I7GEGEHZ.js";
11
+ import "./chunk-XNZAZ57D.js";
12
12
  export {
13
13
  pluginCatalogRuntime
14
14
  };
@@ -8,6 +8,20 @@ export declare const DEFAULT_SQL_STATEMENT_TIMEOUT_MS = 30000;
8
8
  export declare const FUNCTION_TIMEOUT_BUFFER_SECONDS = 20;
9
9
  /** Additional buffer that makes conversation work yield before the hard request deadline. */
10
10
  export declare const CONVERSATION_WORK_SOFT_YIELD_BUFFER_SECONDS = 40;
11
+ export interface BotModelConfig {
12
+ /** Model used for embeddings. */
13
+ embeddingModelId?: string;
14
+ /** Model used for low-cost structured and utility calls. */
15
+ fastModelId?: string;
16
+ /** Model used to review sensitive tool calls. */
17
+ guardianModelId?: string;
18
+ /** Model used to generate images. */
19
+ imageGenerationModelId?: string;
20
+ /** Model used to analyze images. */
21
+ visionModelId?: string;
22
+ /** Model used for web search. */
23
+ webSearchModelId?: string;
24
+ }
11
25
  export interface BotConfig {
12
26
  contextWindowTokens: number;
13
27
  crossActorMidRunMode: CrossActorMidRunMode;
@@ -76,6 +90,8 @@ export interface SlackReactionConfig {
76
90
  completedReactionEmoji: string;
77
91
  processingReactionEmoji: string;
78
92
  }
93
+ /** Apply model overrides from createApp(). */
94
+ export declare function setBotModelConfig(config: BotModelConfig): void;
79
95
  /** Apply profiles from createApp(). */
80
96
  export declare function setProfiles(profiles: Readonly<Record<string, ModelProfileInput>> | undefined, defaultProfile: string | undefined): void;
81
97
  /** Return the current Slack reaction emoji config. */