@sentry/junior 0.195.0 → 0.196.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 (74) hide show
  1. package/dist/{agent-hooks-VIBTIP5F.js → agent-hooks-IQLRR4RC.js} +13 -13
  2. package/dist/api/schema.js +3 -3
  3. package/dist/api.js +27 -27
  4. package/dist/app.d.ts +8 -2
  5. package/dist/app.js +102 -70
  6. package/dist/{catalog-runtime-6E6SGRZK.js → catalog-runtime-EM7V2F4I.js} +4 -4
  7. package/dist/chat/agent/handoff.d.ts +73 -0
  8. package/dist/chat/config.d.ts +2 -2
  9. package/dist/chat/model-profile.d.ts +12 -0
  10. package/dist/chat/no-reply.d.ts +4 -3
  11. package/dist/chat/services/subscribed-decision.d.ts +8 -0
  12. package/dist/chat/tools/types.d.ts +6 -2
  13. package/dist/{chunk-LMYRF6HX.js → chunk-5XSEOJPC.js} +85 -14
  14. package/dist/{chunk-RZ3PBNDV.js → chunk-6LQNW2CJ.js} +7 -7
  15. package/dist/{chunk-GFBR4S3Q.js → chunk-7NL7T6VU.js} +1 -1
  16. package/dist/{chunk-6GGDBXXP.js → chunk-7TUDDW3Y.js} +3 -3
  17. package/dist/{chunk-R5BGW4WR.js → chunk-B5WJBVHY.js} +2 -2
  18. package/dist/{chunk-X3PBQ4BK.js → chunk-BXIVMNLR.js} +1 -1
  19. package/dist/{chunk-JBSCMOLR.js → chunk-CNI74T7U.js} +6 -6
  20. package/dist/{chunk-HUQOXMDG.js → chunk-CTS72G4B.js} +1 -1
  21. package/dist/{chunk-VYDIA2UL.js → chunk-DFWJJOW3.js} +2 -6
  22. package/dist/{chunk-7UED4D5T.js → chunk-EEUFKVCD.js} +22 -22
  23. package/dist/{chunk-PYTRZZ4V.js → chunk-EFNUCRB5.js} +8 -8
  24. package/dist/{chunk-7MYXH5LA.js → chunk-EQBHN4JK.js} +1 -1
  25. package/dist/{chunk-KBPWC7NU.js → chunk-ES7KCEND.js} +1 -1
  26. package/dist/{chunk-RKA22BQP.js → chunk-G6YRPYDC.js} +1 -1
  27. package/dist/{chunk-DTYOEHUP.js → chunk-GZ336GZ5.js} +4 -4
  28. package/dist/{chunk-C4NY6L7S.js → chunk-I7GEGEHZ.js} +1 -1
  29. package/dist/{chunk-KUQRWV53.js → chunk-J357NJQ5.js} +5 -5
  30. package/dist/{chunk-CE2P6TOV.js → chunk-KJGH3KWA.js} +3 -3
  31. package/dist/{chunk-L62JVQPL.js → chunk-KZX7LORG.js} +3 -3
  32. package/dist/{chunk-QPZL2IYT.js → chunk-LBN67OZR.js} +1 -1
  33. package/dist/{chunk-HE5PZAPS.js → chunk-LCAM2P7H.js} +4 -4
  34. package/dist/{chunk-5NR7N567.js → chunk-LGXI6PWX.js} +4 -4
  35. package/dist/{chunk-RQO67SAO.js → chunk-LSPUMNZK.js} +2 -2
  36. package/dist/{chunk-OQHO62VA.js → chunk-N2MSPOGG.js} +8 -8
  37. package/dist/{chunk-PFQRZ4IB.js → chunk-NE2UQMC7.js} +7 -7
  38. package/dist/{chunk-D4YV5TDV.js → chunk-NHJU2ZAL.js} +11 -0
  39. package/dist/{chunk-FEZIEEOP.js → chunk-OVWAO5KY.js} +260 -182
  40. package/dist/{chunk-QHJZSYKY.js → chunk-P3LE2CSJ.js} +2 -2
  41. package/dist/{chunk-3VWIZVK7.js → chunk-PI6VXVBK.js} +1 -1
  42. package/dist/{chunk-FPQPYJEG.js → chunk-PIZJBSGZ.js} +1 -1
  43. package/dist/{chunk-FE3Y4KES.js → chunk-QAINJHI4.js} +5 -5
  44. package/dist/{chunk-5HNXLP4W.js → chunk-RAWYH7TW.js} +1 -1
  45. package/dist/{chunk-R5OHONYU.js → chunk-RFNMWONZ.js} +6 -6
  46. package/dist/{chunk-QKHZF2LH.js → chunk-S74KAE77.js} +4 -4
  47. package/dist/{chunk-LM7UE523.js → chunk-SR5FS2JP.js} +3 -3
  48. package/dist/{chunk-N67T4VY3.js → chunk-VKLQ2M7V.js} +9 -9
  49. package/dist/{chunk-I4RH3KLJ.js → chunk-VRHZXY5X.js} +1 -1
  50. package/dist/{chunk-7PQMTME5.js → chunk-VSOO3Y6M.js} +1 -1
  51. package/dist/{chunk-BJZML4RT.js → chunk-VVU7GHIZ.js} +9 -9
  52. package/dist/{chunk-6TRQLG3D.js → chunk-VXAQTJSR.js} +1 -1
  53. package/dist/{chunk-KQ3GZGBK.js → chunk-XNXKRWWI.js} +4 -4
  54. package/dist/cli/chat.js +35 -35
  55. package/dist/cli/check.js +5 -5
  56. package/dist/cli/plugins.js +14 -14
  57. package/dist/cli/snapshot-create.js +10 -10
  58. package/dist/cli/upgrade.js +7 -7
  59. package/dist/{db-FVCSDROR.js → db-YTM7ZXPK.js} +8 -8
  60. package/dist/instrumentation.js +3 -3
  61. package/dist/nitro.js +7 -7
  62. package/dist/{oauth-callback-server-Z5PXTDOE.js → oauth-callback-server-OXW4KQLQ.js} +31 -31
  63. package/dist/{runner-RHYU7OGV.js → runner-RJY5RNJO.js} +23 -23
  64. package/dist/{skills-QTN73DN5.js → skills-WZV6NLFY.js} +5 -5
  65. package/dist/spawn-J7SQJLYF.js +42 -0
  66. package/dist/task-runner-SMUQ5464.js +36 -0
  67. package/dist/{validation-2ZK7GA6N.js → validation-XS5ZHV3W.js} +5 -5
  68. package/dist/version.js +1 -1
  69. package/dist/{work-7IBKSZRU.js → work-LJMSDEY3.js} +23 -23
  70. package/dist/worker-NMFZ7A2N.js +24 -0
  71. package/package.json +5 -5
  72. package/dist/spawn-R56OWLUH.js +0 -42
  73. package/dist/task-runner-LLJZTLRP.js +0 -36
  74. package/dist/worker-RNVQVCO7.js +0 -24
@@ -13,26 +13,26 @@ import {
13
13
  getPlugins,
14
14
  setPlugins,
15
15
  validatePlugins
16
- } from "./chunk-PFQRZ4IB.js";
16
+ } from "./chunk-NE2UQMC7.js";
17
17
  import "./chunk-3Y47VMHV.js";
18
- import "./chunk-KQ3GZGBK.js";
19
- import "./chunk-FPQPYJEG.js";
20
- import "./chunk-LM7UE523.js";
21
- import "./chunk-7MYXH5LA.js";
22
- import "./chunk-GFBR4S3Q.js";
18
+ import "./chunk-XNXKRWWI.js";
19
+ import "./chunk-PIZJBSGZ.js";
20
+ import "./chunk-SR5FS2JP.js";
21
+ import "./chunk-EQBHN4JK.js";
22
+ import "./chunk-7NL7T6VU.js";
23
23
  import "./chunk-VFUK3X5B.js";
24
- import "./chunk-LMYRF6HX.js";
25
- import "./chunk-D4YV5TDV.js";
26
- import "./chunk-KBPWC7NU.js";
27
- import "./chunk-RKA22BQP.js";
28
- import "./chunk-X3PBQ4BK.js";
24
+ import "./chunk-5XSEOJPC.js";
25
+ import "./chunk-NHJU2ZAL.js";
26
+ import "./chunk-ES7KCEND.js";
27
+ import "./chunk-G6YRPYDC.js";
28
+ import "./chunk-BXIVMNLR.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-HUQOXMDG.js";
33
+ import "./chunk-CTS72G4B.js";
34
34
  import "./chunk-PEQXYSSE.js";
35
- import "./chunk-C4NY6L7S.js";
35
+ import "./chunk-I7GEGEHZ.js";
36
36
  export {
37
37
  PluginHookDeniedError,
38
38
  applyPluginFormatMarkdown,
@@ -66,7 +66,7 @@ import {
66
66
  workspaceParamsSchema,
67
67
  workspaceRepoSchema,
68
68
  workspaceSchema
69
- } from "../chunk-QPZL2IYT.js";
69
+ } from "../chunk-LBN67OZR.js";
70
70
  import {
71
71
  healthReportSchema,
72
72
  pluginOperationalReportFeedSchema,
@@ -83,9 +83,9 @@ import "../chunk-PDO5BLNM.js";
83
83
  import {
84
84
  conversationTurnFailureCodeSchema,
85
85
  conversationTurnFailureReasonSchema
86
- } from "../chunk-GFBR4S3Q.js";
86
+ } from "../chunk-7NL7T6VU.js";
87
87
  import "../chunk-VFUK3X5B.js";
88
- import "../chunk-D4YV5TDV.js";
88
+ import "../chunk-NHJU2ZAL.js";
89
89
  export {
90
90
  acceptedConversationMessageSchema,
91
91
  actorDirectoryReportSchema,
package/dist/api.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  workspaceListSchema,
59
59
  workspaceParamsSchema,
60
60
  workspaceSchema
61
- } from "./chunk-QPZL2IYT.js";
61
+ } from "./chunk-LBN67OZR.js";
62
62
  import {
63
63
  appendAndEnqueueWebMessage,
64
64
  conversationArchiveTimes,
@@ -78,12 +78,12 @@ import {
78
78
  resolveSlackConversationContextFromThreadId,
79
79
  viewerConversationMembership,
80
80
  webActorFromEmail
81
- } from "./chunk-PYTRZZ4V.js";
81
+ } from "./chunk-EFNUCRB5.js";
82
82
  import {
83
83
  buildSentryConversationUrl,
84
84
  buildSentryEventUrl,
85
85
  getWebAuthorization
86
- } from "./chunk-5HNXLP4W.js";
86
+ } from "./chunk-RAWYH7TW.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-5NR7N567.js";
100
+ } from "./chunk-LGXI6PWX.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-DTYOEHUP.js";
124
+ } from "./chunk-GZ336GZ5.js";
125
125
  import {
126
126
  parseSlackThreadId
127
- } from "./chunk-6TRQLG3D.js";
127
+ } from "./chunk-VXAQTJSR.js";
128
128
  import {
129
129
  cancelHumanFacingPendingMessages,
130
130
  getConversation
131
- } from "./chunk-QKHZF2LH.js";
131
+ } from "./chunk-S74KAE77.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-R5BGW4WR.js";
138
+ } from "./chunk-B5WJBVHY.js";
139
139
  import {
140
140
  getCachedSnapshot
141
- } from "./chunk-L62JVQPL.js";
141
+ } from "./chunk-KZX7LORG.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-PFQRZ4IB.js";
167
+ } from "./chunk-NE2UQMC7.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-KQ3GZGBK.js";
176
+ } from "./chunk-XNXKRWWI.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-FPQPYJEG.js";
188
+ } from "./chunk-PIZJBSGZ.js";
189
189
  import {
190
190
  create,
191
191
  hash
192
- } from "./chunk-LM7UE523.js";
193
- import "./chunk-7MYXH5LA.js";
192
+ } from "./chunk-SR5FS2JP.js";
193
+ import "./chunk-EQBHN4JK.js";
194
194
  import {
195
195
  decodeStoredConversationEvent
196
- } from "./chunk-GFBR4S3Q.js";
196
+ } from "./chunk-7NL7T6VU.js";
197
197
  import {
198
198
  juniorDestinations
199
199
  } from "./chunk-VFUK3X5B.js";
200
- import "./chunk-LMYRF6HX.js";
201
- import "./chunk-D4YV5TDV.js";
202
- import "./chunk-KBPWC7NU.js";
203
- import "./chunk-RKA22BQP.js";
204
- import "./chunk-X3PBQ4BK.js";
200
+ import "./chunk-5XSEOJPC.js";
201
+ import "./chunk-NHJU2ZAL.js";
202
+ import "./chunk-ES7KCEND.js";
203
+ import "./chunk-G6YRPYDC.js";
204
+ import "./chunk-BXIVMNLR.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-HUQOXMDG.js";
216
+ } from "./chunk-CTS72G4B.js";
217
217
  import "./chunk-PEQXYSSE.js";
218
- import "./chunk-C4NY6L7S.js";
218
+ import "./chunk-I7GEGEHZ.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-VIBTIP5F.js");
5051
+ const { getPluginProfileReports } = await import("./agent-hooks-IQLRR4RC.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-QTN73DN5.js");
5885
+ const { discoverSkills } = await import("./skills-WZV6NLFY.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-6E6SGRZK.js");
5895
+ const { pluginCatalogRuntime } = await import("./catalog-runtime-EM7V2F4I.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-6E6SGRZK.js"),
5908
+ import("./catalog-runtime-EM7V2F4I.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-VIBTIP5F.js");
5924
+ const { getPluginOperationalReports } = await import("./agent-hooks-IQLRR4RC.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 { ModelProfileInput } from "@/chat/model-profile";
2
3
  import { type ExperimentalFeaturesConfig } from "@/chat/experimental";
3
4
  import { type SandboxResourceConfig } from "@/chat/sandbox/resources";
4
5
  import { type JuniorPluginSet } from "./plugins";
@@ -8,6 +9,7 @@ import { JUNIOR_VERSION } from "./version";
8
9
  export { defineJuniorPlugins } from "./plugins";
9
10
  export { JUNIOR_VERSION };
10
11
  export type { JuniorPluginInput, JuniorPluginSet, JuniorPluginSetOptions, } from "./plugins";
12
+ export type { ModelProfileInput } from "@/chat/model-profile";
11
13
  export interface JuniorAppOptions {
12
14
  /** Authenticated dashboard mounted by core when configured. */
13
15
  dashboard?: JuniorDashboardOptions;
@@ -19,8 +21,12 @@ export interface JuniorAppOptions {
19
21
  experimental?: ExperimentalFeaturesConfig;
20
22
  /** Profile used for new conversations. Configure with `profiles`. */
21
23
  defaultProfile?: string;
22
- /** Named profiles available to the router and handoff tool. Configure with `defaultProfile`. */
23
- profiles?: Readonly<Record<string, string>>;
24
+ /**
25
+ * Named profiles available to the router and `handoff` tool. Configure with
26
+ * `defaultProfile`. Each value may be a model id string or an object with
27
+ * `modelId` and optional `description` and `reasoningLevel` settings.
28
+ */
29
+ profiles?: Readonly<Record<string, ModelProfileInput>>;
24
30
  /** Slack-specific overrides applied after env parsing. */
25
31
  slack?: {
26
32
  /** Slack emoji shown while Junior is processing. Defaults to `eyes`. */
package/dist/app.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  processConversationWork
3
- } from "./chunk-HE5PZAPS.js";
3
+ } from "./chunk-LCAM2P7H.js";
4
4
  import {
5
5
  bindSpawnAgent
6
- } from "./chunk-QHJZSYKY.js";
6
+ } from "./chunk-P3LE2CSJ.js";
7
7
  import {
8
8
  createAgentInvocationWorker,
9
9
  enqueueAgentInvocation,
10
10
  listPendingAgentInvocationMailboxAppends,
11
11
  resolveAgentInvocationId
12
- } from "./chunk-N67T4VY3.js";
12
+ } from "./chunk-VKLQ2M7V.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-7UED4D5T.js";
40
+ } from "./chunk-EEUFKVCD.js";
41
41
  import "./chunk-FA6POGLH.js";
42
42
  import {
43
43
  AgentRunError,
44
44
  executeTurn
45
- } from "./chunk-CE2P6TOV.js";
45
+ } from "./chunk-KJGH3KWA.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-KUQRWV53.js";
56
+ } from "./chunk-J357NJQ5.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-BJZML4RT.js";
76
+ } from "./chunk-VVU7GHIZ.js";
77
77
  import {
78
78
  ConversationTurnLifecycleService,
79
79
  getTurnLifecycle
80
- } from "./chunk-7PQMTME5.js";
80
+ } from "./chunk-VSOO3Y6M.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-FE3Y4KES.js";
89
+ } from "./chunk-QAINJHI4.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-PYTRZZ4V.js";
104
+ } from "./chunk-EFNUCRB5.js";
105
105
  import {
106
106
  createWebAuthorization,
107
107
  deleteWebAuthorization
108
- } from "./chunk-5HNXLP4W.js";
108
+ } from "./chunk-RAWYH7TW.js";
109
109
  import {
110
110
  recordTaskExecution
111
- } from "./chunk-5NR7N567.js";
111
+ } from "./chunk-LGXI6PWX.js";
112
112
  import "./chunk-RC745GGZ.js";
113
113
  import {
114
114
  createVercelPluginTaskCallback,
115
115
  queueCallback,
116
116
  registerVercelPluginTaskDevConsumer
117
- } from "./chunk-6GGDBXXP.js";
117
+ } from "./chunk-7TUDDW3Y.js";
118
118
  import {
119
119
  validatePluginEgressCredentialHooks,
120
120
  validatePluginRegistrations
121
- } from "./chunk-3VWIZVK7.js";
121
+ } from "./chunk-PI6VXVBK.js";
122
122
  import {
123
123
  defineJuniorPlugins,
124
124
  pluginCatalogConfigFromEnv,
@@ -162,11 +162,11 @@ import {
162
162
  shouldEmitDevAgentTrace,
163
163
  shouldPropagateSandboxEgressTrace,
164
164
  unpublishedArtifactHeaders
165
- } from "./chunk-FEZIEEOP.js";
165
+ } from "./chunk-OVWAO5KY.js";
166
166
  import {
167
167
  AuthorizationFlowDisabledError,
168
168
  PluginCredentialFailureError
169
- } from "./chunk-JBSCMOLR.js";
169
+ } from "./chunk-CNI74T7U.js";
170
170
  import "./chunk-6Y5B5PEX.js";
171
171
  import "./chunk-DIB4GX3G.js";
172
172
  import {
@@ -174,14 +174,14 @@ import {
174
174
  deleteMcpAuthSessionsForUserProvider,
175
175
  deleteMcpServerSessionId,
176
176
  deleteMcpStoredOAuthCredentials
177
- } from "./chunk-OQHO62VA.js";
177
+ } from "./chunk-N2MSPOGG.js";
178
178
  import {
179
179
  RetryableDeliveryError,
180
180
  createAgentRunner,
181
181
  formatProviderLabel,
182
182
  postSlackMessage,
183
183
  startOAuthFlow
184
- } from "./chunk-R5OHONYU.js";
184
+ } from "./chunk-RFNMWONZ.js";
185
185
  import {
186
186
  ConversationTurnBoundaryError,
187
187
  CooperativeTurnYieldError,
@@ -197,7 +197,7 @@ import {
197
197
  markTurnCompleted,
198
198
  markTurnFailed,
199
199
  startActiveTurn
200
- } from "./chunk-VYDIA2UL.js";
200
+ } from "./chunk-DFWJJOW3.js";
201
201
  import {
202
202
  abandonTurnRecord,
203
203
  appendThreadContextMessages,
@@ -234,7 +234,7 @@ import {
234
234
  trimTrailingAssistantMessages,
235
235
  turnHasReply,
236
236
  upsertConversationMessage
237
- } from "./chunk-RZ3PBNDV.js";
237
+ } from "./chunk-6LQNW2CJ.js";
238
238
  import {
239
239
  getExperimentalFeatures,
240
240
  isExperimentalFeatureEnabled,
@@ -254,10 +254,10 @@ import {
254
254
  scheduledRunId,
255
255
  scheduledRunSchema,
256
256
  withScheduledTaskLock
257
- } from "./chunk-DTYOEHUP.js";
257
+ } from "./chunk-GZ336GZ5.js";
258
258
  import {
259
259
  parseSlackThreadId
260
- } from "./chunk-6TRQLG3D.js";
260
+ } from "./chunk-VXAQTJSR.js";
261
261
  import {
262
262
  CONVERSATION_WORK_STALE_ENQUEUE_MS,
263
263
  appendAndEnqueueInboundMessage,
@@ -272,16 +272,16 @@ import {
272
272
  removeActiveConversation,
273
273
  requestConversationWork,
274
274
  stopConversationWork
275
- } from "./chunk-QKHZF2LH.js";
275
+ } from "./chunk-S74KAE77.js";
276
276
  import {
277
277
  buildDeterministicAssistantMessageId,
278
278
  buildDeterministicTurnId
279
279
  } from "./chunk-DA2KGZZI.js";
280
- import "./chunk-R5BGW4WR.js";
280
+ import "./chunk-B5WJBVHY.js";
281
281
  import {
282
282
  getSandboxResourceConfig,
283
283
  setSandboxResourceConfig
284
- } from "./chunk-L62JVQPL.js";
284
+ } from "./chunk-KZX7LORG.js";
285
285
  import "./chunk-PDO5BLNM.js";
286
286
  import "./chunk-UIE3R5XU.js";
287
287
  import {
@@ -290,7 +290,7 @@ import {
290
290
  } from "./chunk-X6GDDWQH.js";
291
291
  import {
292
292
  getTurnRequestDeadline
293
- } from "./chunk-I4RH3KLJ.js";
293
+ } from "./chunk-VRHZXY5X.js";
294
294
  import {
295
295
  getVercelConversationWorkQueue,
296
296
  resolveConversationWorkQueueTopic,
@@ -326,7 +326,7 @@ import {
326
326
  verifyEventTaskCredentialSubject,
327
327
  verifyScheduledTaskCredentialSubject,
328
328
  verifySlackDirectCredentialSubject
329
- } from "./chunk-PFQRZ4IB.js";
329
+ } from "./chunk-NE2UQMC7.js";
330
330
  import "./chunk-3Y47VMHV.js";
331
331
  import {
332
332
  createSlackDestination,
@@ -338,7 +338,7 @@ import {
338
338
  requireSlackDestination,
339
339
  withConversationEventLock,
340
340
  withConversationMutationLock
341
- } from "./chunk-KQ3GZGBK.js";
341
+ } from "./chunk-XNXKRWWI.js";
342
342
  import {
343
343
  juniorAgentBindings,
344
344
  juniorAgentInvocations,
@@ -346,16 +346,16 @@ import {
346
346
  juniorConversations,
347
347
  juniorSchedulerRuns,
348
348
  juniorSchedulerTasks
349
- } from "./chunk-FPQPYJEG.js";
350
- import "./chunk-LM7UE523.js";
349
+ } from "./chunk-PIZJBSGZ.js";
350
+ import "./chunk-SR5FS2JP.js";
351
351
  import {
352
352
  acquireActiveLock,
353
353
  getStateAdapter,
354
354
  withActiveLock
355
- } from "./chunk-7MYXH5LA.js";
355
+ } from "./chunk-EQBHN4JK.js";
356
356
  import {
357
357
  instructionProvenanceFor
358
- } from "./chunk-GFBR4S3Q.js";
358
+ } from "./chunk-7NL7T6VU.js";
359
359
  import {
360
360
  juniorDestinations
361
361
  } from "./chunk-VFUK3X5B.js";
@@ -374,17 +374,17 @@ import {
374
374
  isProviderRetryError,
375
375
  setProfiles,
376
376
  setSlackReactionConfig
377
- } from "./chunk-LMYRF6HX.js";
377
+ } from "./chunk-5XSEOJPC.js";
378
378
  import {
379
379
  defaultModelId,
380
380
  modelIdForProfile
381
- } from "./chunk-D4YV5TDV.js";
382
- import "./chunk-KBPWC7NU.js";
383
- import "./chunk-RQO67SAO.js";
381
+ } from "./chunk-NHJU2ZAL.js";
382
+ import "./chunk-ES7KCEND.js";
383
+ import "./chunk-LSPUMNZK.js";
384
384
  import {
385
385
  pluginCatalogRuntime
386
- } from "./chunk-RKA22BQP.js";
387
- import "./chunk-X3PBQ4BK.js";
386
+ } from "./chunk-G6YRPYDC.js";
387
+ import "./chunk-BXIVMNLR.js";
388
388
  import {
389
389
  credentialContextForActor
390
390
  } from "./chunk-CEMMLV5L.js";
@@ -420,13 +420,13 @@ import {
420
420
  withContext,
421
421
  withLogContext,
422
422
  withSpan
423
- } from "./chunk-HUQOXMDG.js";
423
+ } from "./chunk-CTS72G4B.js";
424
424
  import {
425
425
  continueTrace
426
426
  } from "./chunk-PEQXYSSE.js";
427
427
  import {
428
428
  JUNIOR_VERSION
429
- } from "./chunk-C4NY6L7S.js";
429
+ } from "./chunk-I7GEGEHZ.js";
430
430
 
431
431
  // src/app.ts
432
432
  import { createRequire } from "module";
@@ -4448,7 +4448,7 @@ Assess conversation floor ownership and whether the latest message continues wor
4448
4448
  - should_reply=false when the latest message is plainly human-to-human, even if it discusses the same project.
4449
4449
 
4450
4450
  # Unsubscribe Policy
4451
- - should_unsubscribe=true only when the latest message clearly tells ${assistantName} to stop watching, replying, participating, or to leave the thread.
4451
+ - should_unsubscribe=true when the latest message clearly tells ${assistantName} to stop or leave the thread.
4452
4452
  - If should_unsubscribe=true, should_reply must be false.
4453
4453
  - Ordinary disagreement, correction, or "not yet" is not an unsubscribe.
4454
4454
 
@@ -4476,14 +4476,9 @@ var RECENT_ASSISTANT_ENTRY_LIMIT = 40;
4476
4476
  var LEADING_SLACK_MENTION_RE = /^\s*<@([A-Z0-9]+)(?:\|([^>]+))?>[\s,:-]*/i;
4477
4477
  var LEADING_NAMED_MENTION_RE = /^\s*@([a-z0-9._-]+)\b[\s,:-]*/i;
4478
4478
  var TRANSCRIPT_MESSAGE_LINE_RE = /^\[(assistant|user)\]\s+([^:]+):\s+([\s\S]+)$/i;
4479
- var FORCED_THREAD_OPTOUT_RE = /^!stop(?:\s|$)/i;
4480
- var THREAD_OPTOUT_PATTERNS = [
4481
- /\bstop (?:watching|replying|participating)\b/i,
4482
- /\bstay out\b/i,
4483
- /\bdon['’]t (?:reply|participate|watch)\b/i,
4484
- /\bunsubscribe\b/i,
4485
- /\bleave (?:this )?thread\b/i
4486
- ];
4479
+ var BANG_STOP_RE = /(?:^|\s)!stop(?=\s|$|[.!?,;:])/i;
4480
+ var LEADING_ADDRESS_RE = /^(?:(?:<@[^>]+>|@[\w.-]+)\s*[,:\-–—]?\s*)+/i;
4481
+ var BARE_STOP_RE = /^stop(?:\s*[.!…]+)?$/i;
4487
4482
  var ACKNOWLEDGMENT_ONLY_RE = /^(?:thanks(?: you)?|thank you|thx|ty|got it|sounds good|sgtm|lgtm|ok(?:ay)?|cool|nice|perfect|awesome|great|makes sense|understood|roger|yep|yup|kk|on it|will do)(?:[.!]+)?$/i;
4488
4483
  var DIRECTED_FOLLOW_UP_CUE_RE = /\b(?:you said|you just said|your last response|your last answer|what did you just say|what do you mean|what did you mean|explain(?: that| this| it| more)?|clarify(?: that| this| it)?|expand(?: on)?(?: that| this| it)?|elaborate(?: on)?(?: that| this| it)?|say more)\b/i;
4489
4484
  var TERSE_CLARIFICATION_RE = /^(?:which one|which ones|why|how so|what do you mean|what did you mean|say more|explain that|clarify that|expand on that|elaborate on that)\??$/i;
@@ -4518,13 +4513,35 @@ function detectLeadingOtherPartyAddress(rawText, text, botUserName) {
4518
4513
  }
4519
4514
  return `named_mention:${directedName}`;
4520
4515
  }
4521
- function isForcedThreadOptOutCommand(rawText, text) {
4522
- return FORCED_THREAD_OPTOUT_RE.test(rawText.trim()) || FORCED_THREAD_OPTOUT_RE.test(text.trim());
4516
+ function hasBangStop(rawText, text) {
4517
+ return BANG_STOP_RE.test(rawText.trim()) || BANG_STOP_RE.test(text.trim());
4523
4518
  }
4524
- function isThreadOptOutInstruction(rawText, text) {
4525
- return THREAD_OPTOUT_PATTERNS.some(
4526
- (pattern) => pattern.test(rawText) || pattern.test(text)
4527
- );
4519
+ function isBareStop(rawText, text) {
4520
+ return [rawText, text].some((value) => {
4521
+ const candidate = value.trim().replace(LEADING_ADDRESS_RE, "").trim();
4522
+ return candidate.length > 0 && BARE_STOP_RE.test(candidate);
4523
+ });
4524
+ }
4525
+ function getThreadStopDecision(args) {
4526
+ const text = args.text.trim();
4527
+ const rawText = args.rawText.trim();
4528
+ if (hasBangStop(rawText, text)) {
4529
+ return {
4530
+ shouldReply: false,
4531
+ shouldUnsubscribe: true,
4532
+ reason: "thread_opt_out" /* ThreadOptOut */,
4533
+ reasonDetail: "!stop"
4534
+ };
4535
+ }
4536
+ if (isBareStop(rawText, text)) {
4537
+ return {
4538
+ shouldReply: false,
4539
+ shouldUnsubscribe: true,
4540
+ reason: "thread_opt_out" /* ThreadOptOut */,
4541
+ reasonDetail: "stop"
4542
+ };
4543
+ }
4544
+ return void 0;
4528
4545
  }
4529
4546
  function isAcknowledgmentOnly(text) {
4530
4547
  return ACKNOWLEDGMENT_ONLY_RE.test(text.trim());
@@ -4700,13 +4717,9 @@ function getSubscribedReplyPreflightDecision(args) {
4700
4717
  async function decideSubscribedThreadReply(args) {
4701
4718
  const text = args.input.text.trim();
4702
4719
  const rawText = args.input.rawText.trim();
4703
- if (isForcedThreadOptOutCommand(rawText, text)) {
4704
- return {
4705
- shouldReply: false,
4706
- shouldUnsubscribe: true,
4707
- reason: "thread_opt_out" /* ThreadOptOut */,
4708
- reasonDetail: "forced !stop command"
4709
- };
4720
+ const stopDecision = getThreadStopDecision({ rawText, text });
4721
+ if (stopDecision) {
4722
+ return stopDecision;
4710
4723
  }
4711
4724
  const preflightDecision = getSubscribedReplyPreflightDecision({
4712
4725
  botUserName: args.botUserName,
@@ -4721,14 +4734,6 @@ async function decideSubscribedThreadReply(args) {
4721
4734
  return { shouldReply: false, reason: "empty_message" /* EmptyMessage */ };
4722
4735
  }
4723
4736
  if (args.input.isExplicitMention) {
4724
- if (isThreadOptOutInstruction(rawText, text)) {
4725
- return {
4726
- shouldReply: false,
4727
- shouldUnsubscribe: true,
4728
- reason: "thread_opt_out" /* ThreadOptOut */,
4729
- reasonDetail: "explicit stop instruction"
4730
- };
4731
- }
4732
4737
  return {
4733
4738
  shouldReply: true,
4734
4739
  reason: "explicit_mention" /* ExplicitMention */
@@ -5406,6 +5411,33 @@ function createSlackTurnRuntime(deps) {
5406
5411
  });
5407
5412
  const combinedText = combineTurnText(queuedMessages, currentText);
5408
5413
  const turnIsExplicitMention = Boolean(message.isMention) || queuedMessages.some((queued) => queued.explicitMention);
5414
+ const stopDecision = [...queuedMessages, currentText].map(
5415
+ (entry) => getThreadStopDecision({
5416
+ rawText: entry.rawText,
5417
+ text: entry.userText
5418
+ })
5419
+ ).find((decision2) => decision2?.shouldUnsubscribe);
5420
+ if (stopDecision) {
5421
+ const decision2 = {
5422
+ shouldReply: false,
5423
+ shouldUnsubscribe: true,
5424
+ reason: stopDecision.reasonDetail ? `${stopDecision.reason}:${stopDecision.reasonDetail}` : stopDecision.reason
5425
+ };
5426
+ await maybeHandleThreadOptOutDecision({
5427
+ thread,
5428
+ decision: decision2,
5429
+ beforeFirstResponsePost: hooks.beforeFirstResponsePost
5430
+ });
5431
+ await skipSubscribedMessage({
5432
+ thread,
5433
+ message,
5434
+ decision: decision2,
5435
+ context: threadContext,
5436
+ ack: hooks.ack,
5437
+ text: combinedText
5438
+ });
5439
+ return;
5440
+ }
5409
5441
  const preflightDecision = getSubscribedReplyPreflightDecision({
5410
5442
  botUserName: deps.assistantUserName,
5411
5443
  rawText: combinedText.rawText,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  pluginCatalogRuntime
3
- } from "./chunk-RKA22BQP.js";
4
- import "./chunk-X3PBQ4BK.js";
3
+ } from "./chunk-G6YRPYDC.js";
4
+ import "./chunk-BXIVMNLR.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-HUQOXMDG.js";
9
+ import "./chunk-CTS72G4B.js";
10
10
  import "./chunk-PEQXYSSE.js";
11
- import "./chunk-C4NY6L7S.js";
11
+ import "./chunk-I7GEGEHZ.js";
12
12
  export {
13
13
  pluginCatalogRuntime
14
14
  };