@sentry/junior 0.196.0 → 0.197.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.
- package/dist/{agent-hooks-IQLRR4RC.js → agent-hooks-CM4EKXL4.js} +11 -11
- package/dist/api.js +24 -24
- package/dist/app.js +38 -76
- package/dist/{catalog-runtime-EM7V2F4I.js → catalog-runtime-V7WGCXUD.js} +4 -4
- package/dist/chat/services/automated-turn-limit.d.ts +13 -34
- package/dist/chat/slack/automated-turn-limit-notice.d.ts +2 -24
- package/dist/{chunk-G6YRPYDC.js → chunk-2K26W3FP.js} +1 -1
- package/dist/{chunk-QAINJHI4.js → chunk-4USCVHQZ.js} +5 -5
- package/dist/{chunk-NE2UQMC7.js → chunk-4UUKQB6I.js} +6 -6
- package/dist/{chunk-XNXKRWWI.js → chunk-5GWV7SXF.js} +3 -10
- package/dist/{chunk-VSOO3Y6M.js → chunk-5MMQLB2B.js} +1 -1
- package/dist/{chunk-PIZJBSGZ.js → chunk-6ZQ3CE6X.js} +1 -1
- package/dist/{chunk-CTS72G4B.js → chunk-7ENMKNEK.js} +1 -1
- package/dist/{chunk-VRHZXY5X.js → chunk-BGSAFVJO.js} +1 -1
- package/dist/{chunk-PI6VXVBK.js → chunk-BQ7UXCUO.js} +1 -1
- package/dist/{chunk-5XSEOJPC.js → chunk-BR5GNDPS.js} +2 -2
- package/dist/{chunk-KZX7LORG.js → chunk-C2SOA3KN.js} +3 -3
- package/dist/{chunk-CNI74T7U.js → chunk-DBTI74IT.js} +5 -5
- package/dist/{chunk-BXIVMNLR.js → chunk-DHWYAHAM.js} +1 -1
- package/dist/{chunk-LSPUMNZK.js → chunk-DLXA2ZXJ.js} +2 -2
- package/dist/{chunk-ES7KCEND.js → chunk-EZKISZ3Q.js} +1 -1
- package/dist/{chunk-VXAQTJSR.js → chunk-FCONFDZ4.js} +1 -1
- package/dist/{chunk-EEUFKVCD.js → chunk-H6QL3FWC.js} +21 -21
- package/dist/{chunk-RAWYH7TW.js → chunk-HDSDOBWN.js} +1 -1
- package/dist/{chunk-S74KAE77.js → chunk-IGSAXSM7.js} +4 -4
- package/dist/{chunk-LCAM2P7H.js → chunk-ITP4OR7R.js} +4 -4
- package/dist/{chunk-RFNMWONZ.js → chunk-LIK4T6CF.js} +6 -6
- package/dist/{chunk-6LQNW2CJ.js → chunk-LMTHFU5D.js} +6 -6
- package/dist/{chunk-LGXI6PWX.js → chunk-MJCJ62RZ.js} +4 -4
- package/dist/{chunk-EFNUCRB5.js → chunk-NANQFFGO.js} +8 -8
- package/dist/{chunk-OVWAO5KY.js → chunk-O2H7JUEQ.js} +51 -174
- package/dist/{chunk-KJGH3KWA.js → chunk-O5RG7SKU.js} +3 -3
- package/dist/{chunk-EQBHN4JK.js → chunk-PF3PEX4Q.js} +1 -1
- package/dist/{chunk-I7GEGEHZ.js → chunk-PM5WSDAD.js} +1 -1
- package/dist/{chunk-J357NJQ5.js → chunk-S3DRTWPX.js} +5 -5
- package/dist/{chunk-VKLQ2M7V.js → chunk-SBCWV4E4.js} +9 -9
- package/dist/{chunk-7TUDDW3Y.js → chunk-T5MK3RUT.js} +3 -3
- package/dist/{chunk-N2MSPOGG.js → chunk-V2IX5Q5L.js} +8 -8
- package/dist/{chunk-GZ336GZ5.js → chunk-VAUPAX3O.js} +4 -4
- package/dist/{chunk-VVU7GHIZ.js → chunk-WOJG25QZ.js} +8 -8
- package/dist/{chunk-P3LE2CSJ.js → chunk-XALIC5SY.js} +2 -2
- package/dist/{chunk-DFWJJOW3.js → chunk-YC5CFKME.js} +1 -1
- package/dist/{chunk-SR5FS2JP.js → chunk-YLBJBBYX.js} +3 -3
- package/dist/{chunk-B5WJBVHY.js → chunk-YZQLXALE.js} +2 -2
- package/dist/cli/chat.js +33 -33
- package/dist/cli/check.js +5 -5
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +6 -6
- package/dist/{db-YTM7ZXPK.js → db-6BD722UD.js} +6 -6
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-OXW4KQLQ.js → oauth-callback-server-P6AIT27Q.js} +29 -29
- package/dist/{runner-RJY5RNJO.js → runner-OKPDZOJC.js} +21 -21
- package/dist/{skills-WZV6NLFY.js → skills-CQFX3V2I.js} +5 -5
- package/dist/spawn-GA5MADGU.js +42 -0
- package/dist/task-runner-7IIYO44C.js +36 -0
- package/dist/{validation-XS5ZHV3W.js → validation-STB4W433.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-LJMSDEY3.js → work-B7N5TEYI.js} +21 -21
- package/dist/{worker-NMFZ7A2N.js → worker-W6PBEHCA.js} +10 -10
- package/package.json +4 -4
- package/dist/spawn-J7SQJLYF.js +0 -42
- 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-
|
|
16
|
+
} from "./chunk-4UUKQB6I.js";
|
|
17
17
|
import "./chunk-3Y47VMHV.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5GWV7SXF.js";
|
|
19
|
+
import "./chunk-6ZQ3CE6X.js";
|
|
20
|
+
import "./chunk-YLBJBBYX.js";
|
|
21
|
+
import "./chunk-PF3PEX4Q.js";
|
|
22
22
|
import "./chunk-7NL7T6VU.js";
|
|
23
23
|
import "./chunk-VFUK3X5B.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-BR5GNDPS.js";
|
|
25
25
|
import "./chunk-NHJU2ZAL.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-EZKISZ3Q.js";
|
|
27
|
+
import "./chunk-2K26W3FP.js";
|
|
28
|
+
import "./chunk-DHWYAHAM.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-
|
|
33
|
+
import "./chunk-7ENMKNEK.js";
|
|
34
34
|
import "./chunk-PEQXYSSE.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-PM5WSDAD.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-
|
|
81
|
+
} from "./chunk-NANQFFGO.js";
|
|
82
82
|
import {
|
|
83
83
|
buildSentryConversationUrl,
|
|
84
84
|
buildSentryEventUrl,
|
|
85
85
|
getWebAuthorization
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-HDSDOBWN.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-
|
|
100
|
+
} from "./chunk-MJCJ62RZ.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-
|
|
124
|
+
} from "./chunk-VAUPAX3O.js";
|
|
125
125
|
import {
|
|
126
126
|
parseSlackThreadId
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-FCONFDZ4.js";
|
|
128
128
|
import {
|
|
129
129
|
cancelHumanFacingPendingMessages,
|
|
130
130
|
getConversation
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-IGSAXSM7.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-
|
|
138
|
+
} from "./chunk-YZQLXALE.js";
|
|
139
139
|
import {
|
|
140
140
|
getCachedSnapshot
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-C2SOA3KN.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-
|
|
167
|
+
} from "./chunk-4UUKQB6I.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-
|
|
176
|
+
} from "./chunk-5GWV7SXF.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-
|
|
188
|
+
} from "./chunk-6ZQ3CE6X.js";
|
|
189
189
|
import {
|
|
190
190
|
create,
|
|
191
191
|
hash
|
|
192
|
-
} from "./chunk-
|
|
193
|
-
import "./chunk-
|
|
192
|
+
} from "./chunk-YLBJBBYX.js";
|
|
193
|
+
import "./chunk-PF3PEX4Q.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-
|
|
200
|
+
import "./chunk-BR5GNDPS.js";
|
|
201
201
|
import "./chunk-NHJU2ZAL.js";
|
|
202
|
-
import "./chunk-
|
|
203
|
-
import "./chunk-
|
|
204
|
-
import "./chunk-
|
|
202
|
+
import "./chunk-EZKISZ3Q.js";
|
|
203
|
+
import "./chunk-2K26W3FP.js";
|
|
204
|
+
import "./chunk-DHWYAHAM.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-
|
|
216
|
+
} from "./chunk-7ENMKNEK.js";
|
|
217
217
|
import "./chunk-PEQXYSSE.js";
|
|
218
|
-
import "./chunk-
|
|
218
|
+
import "./chunk-PM5WSDAD.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-
|
|
5051
|
+
const { getPluginProfileReports } = await import("./agent-hooks-CM4EKXL4.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-
|
|
5885
|
+
const { discoverSkills } = await import("./skills-CQFX3V2I.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-
|
|
5895
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-V7WGCXUD.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-
|
|
5908
|
+
import("./catalog-runtime-V7WGCXUD.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-
|
|
5924
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-CM4EKXL4.js");
|
|
5925
5925
|
return pluginOperationalReportFeedSchema.parse({
|
|
5926
5926
|
source: "plugins",
|
|
5927
5927
|
generatedAt: new Date(nowMs).toISOString(),
|
package/dist/app.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
processConversationWork
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ITP4OR7R.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XALIC5SY.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
resolveAgentInvocationId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SBCWV4E4.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-
|
|
40
|
+
} from "./chunk-H6QL3FWC.js";
|
|
41
41
|
import "./chunk-FA6POGLH.js";
|
|
42
42
|
import {
|
|
43
43
|
AgentRunError,
|
|
44
44
|
executeTurn
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-O5RG7SKU.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-
|
|
56
|
+
} from "./chunk-S3DRTWPX.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-
|
|
76
|
+
} from "./chunk-WOJG25QZ.js";
|
|
77
77
|
import {
|
|
78
78
|
ConversationTurnLifecycleService,
|
|
79
79
|
getTurnLifecycle
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-5MMQLB2B.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-
|
|
89
|
+
} from "./chunk-4USCVHQZ.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-
|
|
104
|
+
} from "./chunk-NANQFFGO.js";
|
|
105
105
|
import {
|
|
106
106
|
createWebAuthorization,
|
|
107
107
|
deleteWebAuthorization
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-HDSDOBWN.js";
|
|
109
109
|
import {
|
|
110
110
|
recordTaskExecution
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-MJCJ62RZ.js";
|
|
112
112
|
import "./chunk-RC745GGZ.js";
|
|
113
113
|
import {
|
|
114
114
|
createVercelPluginTaskCallback,
|
|
115
115
|
queueCallback,
|
|
116
116
|
registerVercelPluginTaskDevConsumer
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-T5MK3RUT.js";
|
|
118
118
|
import {
|
|
119
119
|
validatePluginEgressCredentialHooks,
|
|
120
120
|
validatePluginRegistrations
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-BQ7UXCUO.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-
|
|
163
|
+
} from "./chunk-O2H7JUEQ.js";
|
|
166
164
|
import {
|
|
167
165
|
AuthorizationFlowDisabledError,
|
|
168
166
|
PluginCredentialFailureError
|
|
169
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-DBTI74IT.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-
|
|
175
|
+
} from "./chunk-V2IX5Q5L.js";
|
|
178
176
|
import {
|
|
179
177
|
RetryableDeliveryError,
|
|
180
178
|
createAgentRunner,
|
|
181
179
|
formatProviderLabel,
|
|
182
180
|
postSlackMessage,
|
|
183
181
|
startOAuthFlow
|
|
184
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-LIK4T6CF.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-
|
|
198
|
+
} from "./chunk-YC5CFKME.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-
|
|
235
|
+
} from "./chunk-LMTHFU5D.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-
|
|
255
|
+
} from "./chunk-VAUPAX3O.js";
|
|
258
256
|
import {
|
|
259
257
|
parseSlackThreadId
|
|
260
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-FCONFDZ4.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-
|
|
273
|
+
} from "./chunk-IGSAXSM7.js";
|
|
276
274
|
import {
|
|
277
275
|
buildDeterministicAssistantMessageId,
|
|
278
276
|
buildDeterministicTurnId
|
|
279
277
|
} from "./chunk-DA2KGZZI.js";
|
|
280
|
-
import "./chunk-
|
|
278
|
+
import "./chunk-YZQLXALE.js";
|
|
281
279
|
import {
|
|
282
280
|
getSandboxResourceConfig,
|
|
283
281
|
setSandboxResourceConfig
|
|
284
|
-
} from "./chunk-
|
|
282
|
+
} from "./chunk-C2SOA3KN.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-
|
|
291
|
+
} from "./chunk-BGSAFVJO.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-
|
|
327
|
+
} from "./chunk-4UUKQB6I.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-
|
|
339
|
+
} from "./chunk-5GWV7SXF.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-
|
|
350
|
-
import "./chunk-
|
|
347
|
+
} from "./chunk-6ZQ3CE6X.js";
|
|
348
|
+
import "./chunk-YLBJBBYX.js";
|
|
351
349
|
import {
|
|
352
350
|
acquireActiveLock,
|
|
353
351
|
getStateAdapter,
|
|
354
352
|
withActiveLock
|
|
355
|
-
} from "./chunk-
|
|
353
|
+
} from "./chunk-PF3PEX4Q.js";
|
|
356
354
|
import {
|
|
357
355
|
instructionProvenanceFor
|
|
358
356
|
} from "./chunk-7NL7T6VU.js";
|
|
@@ -374,17 +372,17 @@ import {
|
|
|
374
372
|
isProviderRetryError,
|
|
375
373
|
setProfiles,
|
|
376
374
|
setSlackReactionConfig
|
|
377
|
-
} from "./chunk-
|
|
375
|
+
} from "./chunk-BR5GNDPS.js";
|
|
378
376
|
import {
|
|
379
377
|
defaultModelId,
|
|
380
378
|
modelIdForProfile
|
|
381
379
|
} from "./chunk-NHJU2ZAL.js";
|
|
382
|
-
import "./chunk-
|
|
383
|
-
import "./chunk-
|
|
380
|
+
import "./chunk-EZKISZ3Q.js";
|
|
381
|
+
import "./chunk-DLXA2ZXJ.js";
|
|
384
382
|
import {
|
|
385
383
|
pluginCatalogRuntime
|
|
386
|
-
} from "./chunk-
|
|
387
|
-
import "./chunk-
|
|
384
|
+
} from "./chunk-2K26W3FP.js";
|
|
385
|
+
import "./chunk-DHWYAHAM.js";
|
|
388
386
|
import {
|
|
389
387
|
credentialContextForActor
|
|
390
388
|
} from "./chunk-CEMMLV5L.js";
|
|
@@ -420,13 +418,13 @@ import {
|
|
|
420
418
|
withContext,
|
|
421
419
|
withLogContext,
|
|
422
420
|
withSpan
|
|
423
|
-
} from "./chunk-
|
|
421
|
+
} from "./chunk-7ENMKNEK.js";
|
|
424
422
|
import {
|
|
425
423
|
continueTrace
|
|
426
424
|
} from "./chunk-PEQXYSSE.js";
|
|
427
425
|
import {
|
|
428
426
|
JUNIOR_VERSION
|
|
429
|
-
} from "./chunk-
|
|
427
|
+
} from "./chunk-PM5WSDAD.js";
|
|
430
428
|
|
|
431
429
|
// src/app.ts
|
|
432
430
|
import { createRequire } from "module";
|
|
@@ -7290,14 +7288,12 @@ function createSlackTurn(deps) {
|
|
|
7290
7288
|
const automatedTurnLimit = await recordFinishedTurnForAutomatedLimit(
|
|
7291
7289
|
{
|
|
7292
7290
|
conversationId,
|
|
7293
|
-
destination,
|
|
7294
7291
|
maxTurns: botConfig.maxConsecutiveAutomatedTurns,
|
|
7295
7292
|
source
|
|
7296
7293
|
}
|
|
7297
7294
|
);
|
|
7298
7295
|
await maybePostAutomatedTurnLimitNotice({
|
|
7299
7296
|
conversationId,
|
|
7300
|
-
destination,
|
|
7301
7297
|
maxTurns: botConfig.maxConsecutiveAutomatedTurns,
|
|
7302
7298
|
threadTs,
|
|
7303
7299
|
update: automatedTurnLimit
|
|
@@ -9194,13 +9190,11 @@ function createConversationTurnWorker(agentRunner, deliverMessage) {
|
|
|
9194
9190
|
}
|
|
9195
9191
|
const automatedTurnLimit = await recordFinishedTurnForAutomatedLimit({
|
|
9196
9192
|
conversationId: context.conversationId,
|
|
9197
|
-
destination,
|
|
9198
9193
|
maxTurns: botConfig.maxConsecutiveAutomatedTurns,
|
|
9199
9194
|
source
|
|
9200
9195
|
});
|
|
9201
9196
|
await maybePostAutomatedTurnLimitNotice({
|
|
9202
9197
|
conversationId: context.conversationId,
|
|
9203
|
-
destination,
|
|
9204
9198
|
maxTurns: botConfig.maxConsecutiveAutomatedTurns,
|
|
9205
9199
|
threadTs: conversationLocation?.provider === "slack" ? conversationLocation.threadTs : void 0,
|
|
9206
9200
|
update: automatedTurnLimit
|
|
@@ -9587,40 +9581,8 @@ async function ingestEventTasks(input, options) {
|
|
|
9587
9581
|
const tasks = await findMatchingEventTasks(db, event, options.teamId);
|
|
9588
9582
|
let dispatched = 0;
|
|
9589
9583
|
const errors = [];
|
|
9590
|
-
const maxTurns = botConfig.maxConsecutiveAutomatedTurns;
|
|
9591
|
-
const noticedDestinations = /* @__PURE__ */ new Set();
|
|
9592
9584
|
for (const task of tasks) {
|
|
9593
9585
|
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
9586
|
const idempotencyKey = eventTaskDispatchKey(
|
|
9625
9587
|
task.id,
|
|
9626
9588
|
event.namespace,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-2K26W3FP.js";
|
|
4
|
+
import "./chunk-DHWYAHAM.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-
|
|
9
|
+
import "./chunk-7ENMKNEK.js";
|
|
10
10
|
import "./chunk-PEQXYSSE.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-PM5WSDAD.js";
|
|
12
12
|
export {
|
|
13
13
|
pluginCatalogRuntime
|
|
14
14
|
};
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Stops event wakes after too many automated Turns with no user Turn.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* every scope that Turn can name.
|
|
4
|
+
* Counts on the Conversation only. A finished user Turn clears the count so
|
|
5
|
+
* later automated wakes can run again.
|
|
7
6
|
*/
|
|
8
|
-
import type {
|
|
7
|
+
import type { Source } from "@sentry/junior-plugin-api";
|
|
9
8
|
import type { StateAdapter } from "chat";
|
|
10
9
|
import { z } from "zod";
|
|
11
|
-
/** Stored consecutive-turn
|
|
10
|
+
/** Stored consecutive automated-turn count for one Conversation. */
|
|
12
11
|
declare const automatedTurnLimitStateSchema: z.ZodObject<{
|
|
13
12
|
consecutiveAutomatedTurns: z.ZodNumber;
|
|
14
13
|
noticePostedAtMs: z.ZodOptional<z.ZodNumber>;
|
|
@@ -16,13 +15,6 @@ declare const automatedTurnLimitStateSchema: z.ZodObject<{
|
|
|
16
15
|
updatedAtMs: z.ZodNumber;
|
|
17
16
|
}, z.core.$strict>;
|
|
18
17
|
export type AutomatedTurnLimitState = z.output<typeof automatedTurnLimitStateSchema>;
|
|
19
|
-
export type AutomatedTurnLimitScope = {
|
|
20
|
-
kind: "conversation";
|
|
21
|
-
conversationId: string;
|
|
22
|
-
} | {
|
|
23
|
-
kind: "destination";
|
|
24
|
-
destination: Destination;
|
|
25
|
-
};
|
|
26
18
|
export type AutomatedTurnLimitDecision = {
|
|
27
19
|
status: "allow";
|
|
28
20
|
consecutiveAutomatedTurns: number;
|
|
@@ -35,29 +27,17 @@ export type AutomatedTurnLimitUpdate = {
|
|
|
35
27
|
consecutiveAutomatedTurns: number;
|
|
36
28
|
paused: boolean;
|
|
37
29
|
shouldPostNotice: boolean;
|
|
38
|
-
/** Where the pause notice should tell the user to reply. */
|
|
39
|
-
resumeIn: "thread" | "channel";
|
|
40
30
|
};
|
|
41
31
|
/** True when this Source starts an automated Turn rather than a user Turn. */
|
|
42
32
|
export declare function isAutomatedTurnSource(source: Source | undefined): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Scope that counts automated Turns for this Source.
|
|
45
|
-
* Resource-event watches stay on the Conversation. Dispatches use Destination.
|
|
46
|
-
*/
|
|
47
|
-
export declare function automatedTurnLimitScopeForSource(args: {
|
|
48
|
-
conversationId: string;
|
|
49
|
-
destination?: Destination;
|
|
50
|
-
source?: Source;
|
|
51
|
-
}): AutomatedTurnLimitScope | undefined;
|
|
52
33
|
/** Plain notice when automatic updates stop until the user replies. */
|
|
53
34
|
export declare function buildAutomatedTurnLimitResponse(args: {
|
|
54
35
|
maxTurns: number;
|
|
55
|
-
resumeIn?: "thread" | "channel";
|
|
56
36
|
}): string;
|
|
57
|
-
/** Read the
|
|
37
|
+
/** Read the consecutive automated-turn count for one Conversation. */
|
|
58
38
|
export declare function getAutomatedTurnLimitState(args: {
|
|
39
|
+
conversationId: string;
|
|
59
40
|
nowMs?: number;
|
|
60
|
-
scope: AutomatedTurnLimitScope;
|
|
61
41
|
state?: StateAdapter;
|
|
62
42
|
}): Promise<AutomatedTurnLimitState>;
|
|
63
43
|
/**
|
|
@@ -66,16 +46,16 @@ export declare function getAutomatedTurnLimitState(args: {
|
|
|
66
46
|
* posts it. Clear the claim if that post fails or is skipped.
|
|
67
47
|
*/
|
|
68
48
|
export declare function admitAutomatedTurn(args: {
|
|
49
|
+
conversationId: string;
|
|
69
50
|
maxTurns: number;
|
|
70
51
|
nowMs?: number;
|
|
71
|
-
scope: AutomatedTurnLimitScope;
|
|
72
52
|
state?: StateAdapter;
|
|
73
53
|
}): Promise<AutomatedTurnLimitDecision>;
|
|
74
54
|
/** Count one finished automated Turn toward the consecutive-turn limit. */
|
|
75
55
|
export declare function countAutomatedTurn(args: {
|
|
56
|
+
conversationId: string;
|
|
76
57
|
maxTurns: number;
|
|
77
58
|
nowMs?: number;
|
|
78
|
-
scope: AutomatedTurnLimitScope;
|
|
79
59
|
state?: StateAdapter;
|
|
80
60
|
}): Promise<AutomatedTurnLimitUpdate>;
|
|
81
61
|
/**
|
|
@@ -83,25 +63,24 @@ export declare function countAutomatedTurn(args: {
|
|
|
83
63
|
* Keeps the pause and consecutive count.
|
|
84
64
|
*/
|
|
85
65
|
export declare function clearAutomatedTurnLimitNoticeClaim(args: {
|
|
66
|
+
conversationId: string;
|
|
86
67
|
nowMs?: number;
|
|
87
|
-
scope: AutomatedTurnLimitScope;
|
|
88
68
|
state?: StateAdapter;
|
|
89
69
|
}): Promise<void>;
|
|
90
70
|
/** Clear the consecutive automated-turn count after a user-owned Turn. */
|
|
91
71
|
export declare function resetAutomatedTurnLimit(args: {
|
|
72
|
+
conversationId: string;
|
|
92
73
|
nowMs?: number;
|
|
93
|
-
scope: AutomatedTurnLimitScope;
|
|
94
74
|
state?: StateAdapter;
|
|
95
75
|
}): Promise<void>;
|
|
96
76
|
/**
|
|
97
|
-
* Update consecutive automated-turn
|
|
77
|
+
* Update consecutive automated-turn counts after one finished Turn.
|
|
98
78
|
*
|
|
99
|
-
* Automated Turns count
|
|
100
|
-
*
|
|
79
|
+
* Automated Turns count on the Conversation. User Turns clear that count so
|
|
80
|
+
* later event wakes can run again.
|
|
101
81
|
*/
|
|
102
82
|
export declare function recordFinishedTurnForAutomatedLimit(args: {
|
|
103
83
|
conversationId: string;
|
|
104
|
-
destination?: Destination;
|
|
105
84
|
maxTurns: number;
|
|
106
85
|
nowMs?: number;
|
|
107
86
|
source?: Source;
|