@sentry/junior 0.139.0 → 0.140.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-MJXMD7JP.js → agent-hooks-BFTDRFUO.js} +10 -10
- package/dist/api/schema/task.d.ts +4 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +19 -19
- package/dist/app.js +116 -35
- package/dist/{catalog-runtime-GCCFYPIK.js → catalog-runtime-RK664S5T.js} +5 -5
- package/dist/chat/scheduled-tasks/telemetry.d.ts +7 -0
- package/dist/chat/scheduled-tasks/tool-support.d.ts +10 -2
- package/dist/chat/scheduled-tasks/tools/create.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/delete.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/list.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/run-now.d.ts +4 -2
- package/dist/chat/scheduled-tasks/tools/update.d.ts +4 -2
- package/dist/chat/scheduled-tasks/types.d.ts +1 -1
- package/dist/chat/slack/dashboard-link.d.ts +2 -0
- package/dist/chat/state/turn-session-keys.d.ts +2 -2
- package/dist/chat/state/turn-session.d.ts +15 -9
- package/dist/{chunk-GI52BW74.js → chunk-3B7O3GNU.js} +3 -3
- package/dist/{chunk-ZQCGQMF2.js → chunk-3CUBAGA3.js} +7 -7
- package/dist/{chunk-IIESAYDL.js → chunk-4PIT6O7A.js} +17 -8
- package/dist/{chunk-UDBUS533.js → chunk-557HLSNH.js} +1 -1
- package/dist/{chunk-U27DSXKB.js → chunk-5KAZMR5U.js} +6 -6
- package/dist/{chunk-AEQISMMU.js → chunk-5YAWB2AX.js} +5 -5
- package/dist/{chunk-5GSZWRE2.js → chunk-A6BI25J3.js} +8 -8
- package/dist/{chunk-MQ5RYATN.js → chunk-AA2EPMUF.js} +4 -4
- package/dist/{chunk-PJW6U46K.js → chunk-BMFRFSTM.js} +60 -68
- package/dist/{chunk-U7CMWQ7Z.js → chunk-CPPTBHQN.js} +1 -1
- package/dist/{chunk-GWQSZT4C.js → chunk-D3X2PI3D.js} +2 -2
- package/dist/{chunk-WZH4JV7R.js → chunk-DMDOKRPC.js} +5 -5
- package/dist/{chunk-6SU2DT27.js → chunk-HEFBGCCU.js} +2 -2
- package/dist/{chunk-CXH25EL4.js → chunk-I3OZR3HG.js} +1 -1
- package/dist/{chunk-MXTVUV3I.js → chunk-J5H65GY2.js} +1 -1
- package/dist/{chunk-ZYQSPQYR.js → chunk-MYVCHWDG.js} +31 -18
- package/dist/{chunk-6OHTDR4F.js → chunk-N2I7W2VS.js} +1 -1
- package/dist/{chunk-2ECYPYKP.js → chunk-NPL66ZWL.js} +1 -1
- package/dist/{chunk-G52UXKGO.js → chunk-OGNL2QY7.js} +4 -4
- package/dist/{chunk-75I3UBIL.js → chunk-S3FAOKQU.js} +2 -2
- package/dist/{chunk-3T2JAGRH.js → chunk-TGIKZJ3Y.js} +2 -2
- package/dist/{chunk-J3S57AXY.js → chunk-TKTZ4L4Z.js} +1 -1
- package/dist/{chunk-YGZ2OLXL.js → chunk-UXMRN2ZX.js} +1 -1
- package/dist/{chunk-WQRX57EA.js → chunk-VRDHAITB.js} +3 -3
- package/dist/{chunk-QTBKPZDA.js → chunk-WSWM6A3R.js} +3 -3
- package/dist/{chunk-MXVD2BDS.js → chunk-WTGLUX4K.js} +1 -1
- package/dist/{chunk-4V4QIYJH.js → chunk-XROWZSOY.js} +1 -1
- package/dist/{chunk-DW4PMHNW.js → chunk-XX2QNQN4.js} +147 -86
- package/dist/{chunk-C2N6MNO4.js → chunk-YB363QGA.js} +1 -1
- package/dist/{chunk-YCTDA7BD.js → chunk-YWM6MJT4.js} +1 -1
- package/dist/{chunk-J6EJQCHY.js → chunk-Z2A7BDHT.js} +15 -15
- package/dist/cli/chat.js +30 -30
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +13 -13
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-UXPPGHDF.js → db-QOGYDDQM.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-4ZYMD5UA.js → oauth-callback-server-CT4RMGCP.js} +21 -21
- package/dist/{runner-MZSEONRZ.js → runner-PHMLHNLX.js} +13 -13
- package/dist/{skills-IMVPXSQ7.js → skills-AYRM4QGF.js} +6 -6
- package/dist/{spawn-S5LSVOCE.js → spawn-OGRQFUNK.js} +17 -17
- package/dist/{validation-ZKCY2BVR.js → validation-M5JNGRGL.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-GG3XDYRX.js → work-LZWE6HK4.js} +16 -16
- package/dist/{worker-23AUELCJ.js → worker-KOGPXFYK.js} +10 -10
- package/package.json +4 -4
|
@@ -11,21 +11,21 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-4PIT6O7A.js";
|
|
15
|
+
import "./chunk-HEFBGCCU.js";
|
|
16
|
+
import "./chunk-WSWM6A3R.js";
|
|
17
|
+
import "./chunk-557HLSNH.js";
|
|
18
18
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-J5H65GY2.js";
|
|
20
|
+
import "./chunk-S3FAOKQU.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-UXMRN2ZX.js";
|
|
23
23
|
import "./chunk-HZF5P5UN.js";
|
|
24
24
|
import "./chunk-F3B2YJ76.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-NPL66ZWL.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-YB363QGA.js";
|
|
28
|
+
import "./chunk-CPPTBHQN.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
|
@@ -23,6 +23,7 @@ export declare const scheduledTaskSummarySchema: z.ZodObject<{
|
|
|
23
23
|
nextRunAt: z.ZodOptional<z.ZodString>;
|
|
24
24
|
schedule: z.ZodString;
|
|
25
25
|
status: z.ZodEnum<{
|
|
26
|
+
completed: "completed";
|
|
26
27
|
blocked: "blocked";
|
|
27
28
|
active: "active";
|
|
28
29
|
}>;
|
|
@@ -77,6 +78,7 @@ export declare const taskSummarySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
77
78
|
nextRunAt: z.ZodOptional<z.ZodString>;
|
|
78
79
|
schedule: z.ZodString;
|
|
79
80
|
status: z.ZodEnum<{
|
|
81
|
+
completed: "completed";
|
|
80
82
|
blocked: "blocked";
|
|
81
83
|
active: "active";
|
|
82
84
|
}>;
|
|
@@ -142,6 +144,7 @@ export declare const taskListSchema: z.ZodObject<{
|
|
|
142
144
|
nextRunAt: z.ZodOptional<z.ZodString>;
|
|
143
145
|
schedule: z.ZodString;
|
|
144
146
|
status: z.ZodEnum<{
|
|
147
|
+
completed: "completed";
|
|
145
148
|
blocked: "blocked";
|
|
146
149
|
active: "active";
|
|
147
150
|
}>;
|
|
@@ -245,6 +248,7 @@ export declare const taskExecutionListSchema: z.ZodObject<{
|
|
|
245
248
|
nextRunAt: z.ZodOptional<z.ZodString>;
|
|
246
249
|
schedule: z.ZodString;
|
|
247
250
|
status: z.ZodEnum<{
|
|
251
|
+
completed: "completed";
|
|
248
252
|
blocked: "blocked";
|
|
249
253
|
active: "active";
|
|
250
254
|
}>;
|
package/dist/api/schema.js
CHANGED
package/dist/api.js
CHANGED
|
@@ -28,12 +28,12 @@ import {
|
|
|
28
28
|
taskExecutionListSchema,
|
|
29
29
|
taskListSchema,
|
|
30
30
|
taskParamsSchema
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YWM6MJT4.js";
|
|
32
32
|
import {
|
|
33
33
|
formatSlackConversationRedactedLabel,
|
|
34
34
|
readHealthReport,
|
|
35
35
|
resolveSlackConversationContextFromThreadId
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TGIKZJ3Y.js";
|
|
37
37
|
import {
|
|
38
38
|
buildSentryConversationUrl
|
|
39
39
|
} from "./chunk-4CODA7P5.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
readTaskExecutionStatusDays,
|
|
43
43
|
readTaskExecutionSummaries,
|
|
44
44
|
readTaskExecutions
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3B7O3GNU.js";
|
|
46
46
|
import {
|
|
47
47
|
healthReportSchema,
|
|
48
48
|
pluginOperationalReportFeedSchema,
|
|
@@ -61,10 +61,10 @@ import {
|
|
|
61
61
|
listPublicEventTasksForTeams,
|
|
62
62
|
listPublicScheduledTasksForTeams,
|
|
63
63
|
readStats
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-XX2QNQN4.js";
|
|
65
65
|
import {
|
|
66
66
|
parseSlackThreadId
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-WTGLUX4K.js";
|
|
68
68
|
import {
|
|
69
69
|
agentTurnUsageSchema,
|
|
70
70
|
hasAgentTurnUsage,
|
|
@@ -77,44 +77,44 @@ import {
|
|
|
77
77
|
listConversationAnnotations,
|
|
78
78
|
renderPluginConversationEvent,
|
|
79
79
|
resolveViewerUser
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-4PIT6O7A.js";
|
|
81
81
|
import {
|
|
82
82
|
getSlackClient,
|
|
83
83
|
withSlackRetries
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-HEFBGCCU.js";
|
|
85
85
|
import {
|
|
86
86
|
decodeStoredConversationEvent,
|
|
87
87
|
getDb,
|
|
88
88
|
getSqlExecutor,
|
|
89
89
|
locationFromRow,
|
|
90
90
|
parseSessionSource
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-WSWM6A3R.js";
|
|
92
92
|
import {
|
|
93
93
|
juniorApiTokens,
|
|
94
94
|
juniorConversationEvents,
|
|
95
95
|
juniorConversations,
|
|
96
96
|
juniorIdentities,
|
|
97
97
|
juniorUsers
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-557HLSNH.js";
|
|
99
99
|
import "./chunk-EM225ITJ.js";
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-
|
|
100
|
+
import "./chunk-J5H65GY2.js";
|
|
101
|
+
import "./chunk-S3FAOKQU.js";
|
|
102
102
|
import {
|
|
103
103
|
juniorDestinations
|
|
104
104
|
} from "./chunk-VFUK3X5B.js";
|
|
105
105
|
import {
|
|
106
106
|
canExposeConversationPayload
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-UXMRN2ZX.js";
|
|
108
108
|
import "./chunk-HZF5P5UN.js";
|
|
109
109
|
import {
|
|
110
110
|
parseSlackChannelId,
|
|
111
111
|
parseSlackMessageTs,
|
|
112
112
|
parseSlackTeamId
|
|
113
113
|
} from "./chunk-F3B2YJ76.js";
|
|
114
|
-
import "./chunk-
|
|
114
|
+
import "./chunk-NPL66ZWL.js";
|
|
115
115
|
import "./chunk-6GWA276C.js";
|
|
116
|
-
import "./chunk-
|
|
117
|
-
import "./chunk-
|
|
116
|
+
import "./chunk-YB363QGA.js";
|
|
117
|
+
import "./chunk-CPPTBHQN.js";
|
|
118
118
|
import "./chunk-MLKGABMK.js";
|
|
119
119
|
|
|
120
120
|
// src/api.ts
|
|
@@ -2175,7 +2175,7 @@ function readDescriptionText(home) {
|
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
2177
|
async function readSkillReports() {
|
|
2178
|
-
const { discoverSkills } = await import("./skills-
|
|
2178
|
+
const { discoverSkills } = await import("./skills-AYRM4QGF.js");
|
|
2179
2179
|
const skills = await discoverSkills();
|
|
2180
2180
|
return skillReportsSchema.parse(
|
|
2181
2181
|
skills.map((skill) => ({
|
|
@@ -2185,7 +2185,7 @@ async function readSkillReports() {
|
|
|
2185
2185
|
);
|
|
2186
2186
|
}
|
|
2187
2187
|
async function readPlugins() {
|
|
2188
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
2188
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-RK664S5T.js");
|
|
2189
2189
|
return pluginsSchema.parse(
|
|
2190
2190
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
2191
2191
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -2198,7 +2198,7 @@ async function readPlugins() {
|
|
|
2198
2198
|
async function readRuntimeInfoReport() {
|
|
2199
2199
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
2200
2200
|
import("./discovery-GUFTFBTL.js"),
|
|
2201
|
-
import("./catalog-runtime-
|
|
2201
|
+
import("./catalog-runtime-RK664S5T.js"),
|
|
2202
2202
|
readPlugins(),
|
|
2203
2203
|
readSkillReports()
|
|
2204
2204
|
]);
|
|
@@ -2214,7 +2214,7 @@ async function readRuntimeInfoReport() {
|
|
|
2214
2214
|
}
|
|
2215
2215
|
async function readPluginOperationalReportFeed() {
|
|
2216
2216
|
const nowMs = Date.now();
|
|
2217
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
2217
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-BFTDRFUO.js");
|
|
2218
2218
|
return pluginOperationalReportFeedSchema.parse({
|
|
2219
2219
|
source: "plugins",
|
|
2220
2220
|
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-VRDHAITB.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XROWZSOY.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5YAWB2AX.js";
|
|
13
13
|
import {
|
|
14
14
|
GET as GET2,
|
|
15
15
|
GET2 as GET3,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
splitSlackReplyText,
|
|
40
40
|
startSlackProcessingReaction,
|
|
41
41
|
stripLeadingBotMention
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Z2A7BDHT.js";
|
|
43
43
|
import "./chunk-FA6POGLH.js";
|
|
44
44
|
import {
|
|
45
45
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
isInvalidConversationRecordError,
|
|
52
52
|
listActiveConversationIds,
|
|
53
53
|
removeActiveConversation
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-AA2EPMUF.js";
|
|
55
55
|
import {
|
|
56
56
|
buildDeliveredTurnStatePatch,
|
|
57
57
|
claimDispatchMailboxAppend,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
requireTurnFailureEventId,
|
|
82
82
|
resolveTurnSessionRouting,
|
|
83
83
|
scheduleSessionCompletedPluginTasks
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-A6BI25J3.js";
|
|
85
85
|
import {
|
|
86
86
|
ConversationTurnLifecycleService
|
|
87
87
|
} from "./chunk-Q6QZTTLS.js";
|
|
@@ -90,11 +90,11 @@ import {
|
|
|
90
90
|
conversationVisibilityFromSlackChannelType,
|
|
91
91
|
resolveSlackChannelTypeFromMessage,
|
|
92
92
|
resolveSlackConversationContext
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-TGIKZJ3Y.js";
|
|
94
94
|
import "./chunk-4CODA7P5.js";
|
|
95
95
|
import {
|
|
96
96
|
recordTaskExecution
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-3B7O3GNU.js";
|
|
98
98
|
import "./chunk-UTL3MHPC.js";
|
|
99
99
|
import {
|
|
100
100
|
getVercelConversationWorkQueue,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
import {
|
|
114
114
|
validatePluginEgressCredentialHooks,
|
|
115
115
|
validatePluginRegistrations
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-TKTZ4L4Z.js";
|
|
117
117
|
import {
|
|
118
118
|
defineJuniorPlugins,
|
|
119
119
|
pluginCatalogConfigFromEnv,
|
|
@@ -146,18 +146,18 @@ import {
|
|
|
146
146
|
setConfigDefaults,
|
|
147
147
|
shouldEmitDevAgentTrace,
|
|
148
148
|
shouldPropagateSandboxEgressTrace
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-MYVCHWDG.js";
|
|
150
150
|
import {
|
|
151
151
|
AuthorizationFlowDisabledError,
|
|
152
152
|
PluginCredentialFailureError
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-DMDOKRPC.js";
|
|
154
154
|
import "./chunk-DIB4GX3G.js";
|
|
155
155
|
import {
|
|
156
156
|
createUserTokenStore,
|
|
157
157
|
deleteMcpAuthSessionsForUserProvider,
|
|
158
158
|
deleteMcpServerSessionId,
|
|
159
159
|
deleteMcpStoredOAuthCredentials
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-3CUBAGA3.js";
|
|
161
161
|
import {
|
|
162
162
|
RetryableDeliveryError
|
|
163
163
|
} from "./chunk-R776HKPK.js";
|
|
@@ -165,7 +165,7 @@ import {
|
|
|
165
165
|
formatProviderLabel,
|
|
166
166
|
postSlackMessage,
|
|
167
167
|
startOAuthFlow
|
|
168
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-5KAZMR5U.js";
|
|
169
169
|
import {
|
|
170
170
|
ConversationTurnBoundaryError,
|
|
171
171
|
CooperativeTurnYieldError,
|
|
@@ -221,7 +221,7 @@ import {
|
|
|
221
221
|
trimTrailingAssistantMessages,
|
|
222
222
|
updateConversationStats,
|
|
223
223
|
upsertConversationMessage
|
|
224
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-BMFRFSTM.js";
|
|
225
225
|
import "./chunk-3Y47VMHV.js";
|
|
226
226
|
import "./chunk-HUO3UTAQ.js";
|
|
227
227
|
import {
|
|
@@ -231,14 +231,16 @@ import {
|
|
|
231
231
|
import {
|
|
232
232
|
getSandboxResourceConfig,
|
|
233
233
|
setSandboxResourceConfig
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-OGNL2QY7.js";
|
|
235
235
|
import {
|
|
236
236
|
createSchedulerSqlStore,
|
|
237
|
-
findMatchingEventTasks
|
|
238
|
-
|
|
237
|
+
findMatchingEventTasks,
|
|
238
|
+
logScheduledTaskRunSkipped,
|
|
239
|
+
scheduledTaskRunAttributes
|
|
240
|
+
} from "./chunk-XX2QNQN4.js";
|
|
239
241
|
import {
|
|
240
242
|
parseSlackThreadId
|
|
241
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-WTGLUX4K.js";
|
|
242
244
|
import "./chunk-CDQ4YIZM.js";
|
|
243
245
|
import "./chunk-PDO5BLNM.js";
|
|
244
246
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -258,7 +260,7 @@ import {
|
|
|
258
260
|
verifyEventTaskCredentialSubject,
|
|
259
261
|
verifyScheduledTaskCredentialSubject,
|
|
260
262
|
verifySlackDirectCredentialSubject
|
|
261
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-4PIT6O7A.js";
|
|
262
264
|
import {
|
|
263
265
|
SlackActionError,
|
|
264
266
|
downloadPrivateSlackFile,
|
|
@@ -268,7 +270,7 @@ import {
|
|
|
268
270
|
normalizeSlackConversationId,
|
|
269
271
|
runWithSlackInstallationToken,
|
|
270
272
|
runWithWorkspaceTeamId
|
|
271
|
-
} from "./chunk-
|
|
273
|
+
} from "./chunk-HEFBGCCU.js";
|
|
272
274
|
import {
|
|
273
275
|
contextProvenance,
|
|
274
276
|
createSlackDestination,
|
|
@@ -280,20 +282,20 @@ import {
|
|
|
280
282
|
requireSlackDestination,
|
|
281
283
|
withConversationEventLock,
|
|
282
284
|
withConversationMutationLock
|
|
283
|
-
} from "./chunk-
|
|
285
|
+
} from "./chunk-WSWM6A3R.js";
|
|
284
286
|
import {
|
|
285
287
|
juniorAgentBindings,
|
|
286
288
|
juniorAgentInvocations,
|
|
287
289
|
juniorConversationEvents,
|
|
288
290
|
juniorConversations
|
|
289
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-557HLSNH.js";
|
|
290
292
|
import {
|
|
291
293
|
sleep
|
|
292
294
|
} from "./chunk-EM225ITJ.js";
|
|
293
295
|
import {
|
|
294
296
|
acquireActiveLock,
|
|
295
297
|
getStateAdapter
|
|
296
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-J5H65GY2.js";
|
|
297
299
|
import {
|
|
298
300
|
STANDARD_MODEL_PROFILE,
|
|
299
301
|
botConfig,
|
|
@@ -311,16 +313,16 @@ import {
|
|
|
311
313
|
modelIdForProfile,
|
|
312
314
|
setSlackReactionConfig,
|
|
313
315
|
standardModelId
|
|
314
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-S3FAOKQU.js";
|
|
315
317
|
import {
|
|
316
318
|
juniorDestinations
|
|
317
319
|
} from "./chunk-VFUK3X5B.js";
|
|
318
|
-
import "./chunk-
|
|
319
|
-
import "./chunk-
|
|
320
|
+
import "./chunk-UXMRN2ZX.js";
|
|
321
|
+
import "./chunk-D3X2PI3D.js";
|
|
320
322
|
import {
|
|
321
323
|
pluginCatalogRuntime
|
|
322
|
-
} from "./chunk-
|
|
323
|
-
import "./chunk-
|
|
324
|
+
} from "./chunk-N2I7W2VS.js";
|
|
325
|
+
import "./chunk-I3OZR3HG.js";
|
|
324
326
|
import {
|
|
325
327
|
credentialContextForActor
|
|
326
328
|
} from "./chunk-RUIXF3YQ.js";
|
|
@@ -352,7 +354,7 @@ import {
|
|
|
352
354
|
withContext,
|
|
353
355
|
withLogContext,
|
|
354
356
|
withSpan
|
|
355
|
-
} from "./chunk-
|
|
357
|
+
} from "./chunk-NPL66ZWL.js";
|
|
356
358
|
import {
|
|
357
359
|
continueTrace
|
|
358
360
|
} from "./chunk-6GWA276C.js";
|
|
@@ -360,10 +362,10 @@ import "./chunk-OOUNJNMR.js";
|
|
|
360
362
|
import "./chunk-H4HBKISO.js";
|
|
361
363
|
import {
|
|
362
364
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
363
|
-
} from "./chunk-
|
|
365
|
+
} from "./chunk-YB363QGA.js";
|
|
364
366
|
import {
|
|
365
367
|
JUNIOR_VERSION
|
|
366
|
-
} from "./chunk-
|
|
368
|
+
} from "./chunk-CPPTBHQN.js";
|
|
367
369
|
import "./chunk-MLKGABMK.js";
|
|
368
370
|
|
|
369
371
|
// src/app.ts
|
|
@@ -1268,6 +1270,28 @@ async function recordScheduledExecution(args) {
|
|
|
1268
1270
|
status: args.status
|
|
1269
1271
|
});
|
|
1270
1272
|
}
|
|
1273
|
+
async function logRunOutcome(args) {
|
|
1274
|
+
const task = args.task ?? await args.store.getTask(args.run.taskId) ?? void 0;
|
|
1275
|
+
if (!task) {
|
|
1276
|
+
logInfo(args.eventName, {
|
|
1277
|
+
"app.task.id": args.run.taskId,
|
|
1278
|
+
"app.task.type": "scheduled",
|
|
1279
|
+
"app.task.run.id": args.run.id,
|
|
1280
|
+
"app.task.run.status": args.run.status,
|
|
1281
|
+
"app.task.run.scheduled_for": new Date(
|
|
1282
|
+
args.run.scheduledForMs
|
|
1283
|
+
).toISOString(),
|
|
1284
|
+
...args.run.dispatchId ? { "app.dispatch.id": args.run.dispatchId } : {},
|
|
1285
|
+
...args.run.resultMessageTs ? { "app.task.result_message_ts": args.run.resultMessageTs } : {},
|
|
1286
|
+
...args.extras
|
|
1287
|
+
});
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
logInfo(
|
|
1291
|
+
args.eventName,
|
|
1292
|
+
scheduledTaskRunAttributes(task, args.run, args.extras)
|
|
1293
|
+
);
|
|
1294
|
+
}
|
|
1271
1295
|
async function applyDispatchResult(args) {
|
|
1272
1296
|
if (args.dispatch.status === "completed") {
|
|
1273
1297
|
const completed = await args.store.markRunCompleted({
|
|
@@ -1287,6 +1311,11 @@ async function applyDispatchResult(args) {
|
|
|
1287
1311
|
run: args.run,
|
|
1288
1312
|
status: "completed"
|
|
1289
1313
|
});
|
|
1314
|
+
await logRunOutcome({
|
|
1315
|
+
eventName: "scheduled_task.run.completed",
|
|
1316
|
+
run: completed,
|
|
1317
|
+
store: args.store
|
|
1318
|
+
});
|
|
1290
1319
|
return true;
|
|
1291
1320
|
}
|
|
1292
1321
|
if (args.dispatch.status === "blocked") {
|
|
@@ -1308,6 +1337,12 @@ async function applyDispatchResult(args) {
|
|
|
1308
1337
|
run: args.run,
|
|
1309
1338
|
status: "blocked"
|
|
1310
1339
|
});
|
|
1340
|
+
await logRunOutcome({
|
|
1341
|
+
eventName: "scheduled_task.run.blocked",
|
|
1342
|
+
run: blocked,
|
|
1343
|
+
store: args.store,
|
|
1344
|
+
extras: blocked.errorMessage ? { "app.task.run.error": blocked.errorMessage } : void 0
|
|
1345
|
+
});
|
|
1311
1346
|
return true;
|
|
1312
1347
|
}
|
|
1313
1348
|
if (args.dispatch.status === "failed") {
|
|
@@ -1329,6 +1364,12 @@ async function applyDispatchResult(args) {
|
|
|
1329
1364
|
run: args.run,
|
|
1330
1365
|
status: "failed"
|
|
1331
1366
|
});
|
|
1367
|
+
await logRunOutcome({
|
|
1368
|
+
eventName: "scheduled_task.run.failed",
|
|
1369
|
+
run: failed,
|
|
1370
|
+
store: args.store,
|
|
1371
|
+
extras: failed.errorMessage ? { "app.task.run.error": failed.errorMessage } : void 0
|
|
1372
|
+
});
|
|
1332
1373
|
return true;
|
|
1333
1374
|
}
|
|
1334
1375
|
return false;
|
|
@@ -1356,6 +1397,12 @@ async function finishClaimedRun(args) {
|
|
|
1356
1397
|
run: args.run,
|
|
1357
1398
|
status: args.status
|
|
1358
1399
|
});
|
|
1400
|
+
await logRunOutcome({
|
|
1401
|
+
eventName: args.status === "blocked" ? "scheduled_task.run.blocked" : "scheduled_task.run.failed",
|
|
1402
|
+
run: finished,
|
|
1403
|
+
store: args.store,
|
|
1404
|
+
extras: { "app.task.run.error": args.errorMessage }
|
|
1405
|
+
});
|
|
1359
1406
|
}
|
|
1360
1407
|
async function runScheduledTaskHeartbeat(args) {
|
|
1361
1408
|
const store = createSchedulerSqlStore(getDb());
|
|
@@ -1374,7 +1421,12 @@ async function runScheduledTaskHeartbeat(args) {
|
|
|
1374
1421
|
});
|
|
1375
1422
|
continue;
|
|
1376
1423
|
}
|
|
1377
|
-
if (await applyDispatchResult({
|
|
1424
|
+
if (await applyDispatchResult({
|
|
1425
|
+
dispatch: dispatch2,
|
|
1426
|
+
nowMs: args.nowMs,
|
|
1427
|
+
run,
|
|
1428
|
+
store
|
|
1429
|
+
})) {
|
|
1378
1430
|
processedCount += 1;
|
|
1379
1431
|
}
|
|
1380
1432
|
}
|
|
@@ -1383,20 +1435,39 @@ async function runScheduledTaskHeartbeat(args) {
|
|
|
1383
1435
|
if (!run) break;
|
|
1384
1436
|
const task = await store.getTask(run.taskId);
|
|
1385
1437
|
if (!task) {
|
|
1386
|
-
await store.markRunFailed({
|
|
1438
|
+
const failed = await store.markRunFailed({
|
|
1387
1439
|
completedAtMs: args.nowMs,
|
|
1388
1440
|
errorMessage: `Scheduled task ${run.taskId} was not found`,
|
|
1389
1441
|
runId: run.id
|
|
1390
1442
|
});
|
|
1443
|
+
if (failed) {
|
|
1444
|
+
await logRunOutcome({
|
|
1445
|
+
eventName: "scheduled_task.run.failed",
|
|
1446
|
+
run: failed,
|
|
1447
|
+
store,
|
|
1448
|
+
extras: {
|
|
1449
|
+
"app.task.run.error": `Scheduled task ${run.taskId} was not found`
|
|
1450
|
+
}
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1391
1453
|
continue;
|
|
1392
1454
|
}
|
|
1455
|
+
logInfo(
|
|
1456
|
+
"scheduled_task.run.claimed",
|
|
1457
|
+
scheduledTaskRunAttributes(task, run)
|
|
1458
|
+
);
|
|
1393
1459
|
const skippedReason = shouldSkipRun(task, run);
|
|
1394
1460
|
if (skippedReason) {
|
|
1395
|
-
await store.markRunSkipped({
|
|
1461
|
+
const skipped = await store.markRunSkipped({
|
|
1396
1462
|
completedAtMs: args.nowMs,
|
|
1397
1463
|
errorMessage: skippedReason,
|
|
1398
1464
|
runId: run.id
|
|
1399
1465
|
});
|
|
1466
|
+
if (skipped) {
|
|
1467
|
+
logScheduledTaskRunSkipped(task, skipped, {
|
|
1468
|
+
"app.task.run.error": skippedReason
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1400
1471
|
continue;
|
|
1401
1472
|
}
|
|
1402
1473
|
let metadata;
|
|
@@ -1445,12 +1516,22 @@ async function runScheduledTaskHeartbeat(args) {
|
|
|
1445
1516
|
});
|
|
1446
1517
|
continue;
|
|
1447
1518
|
}
|
|
1448
|
-
await store.markRunDispatched({
|
|
1519
|
+
const dispatched = await store.markRunDispatched({
|
|
1449
1520
|
claimedAtMs: run.claimedAtMs,
|
|
1450
1521
|
dispatchId: dispatch2.id,
|
|
1451
1522
|
nowMs: args.nowMs,
|
|
1452
1523
|
runId: run.id
|
|
1453
1524
|
});
|
|
1525
|
+
logInfo(
|
|
1526
|
+
"scheduled_task.run.dispatched",
|
|
1527
|
+
scheduledTaskRunAttributes(
|
|
1528
|
+
task,
|
|
1529
|
+
dispatched ?? { ...run, dispatchId: dispatch2.id },
|
|
1530
|
+
{
|
|
1531
|
+
"app.dispatch.id": dispatch2.id
|
|
1532
|
+
}
|
|
1533
|
+
)
|
|
1534
|
+
);
|
|
1454
1535
|
dispatchCount += 1;
|
|
1455
1536
|
}
|
|
1456
1537
|
return dispatchCount;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-N2I7W2VS.js";
|
|
4
|
+
import "./chunk-I3OZR3HG.js";
|
|
5
5
|
import "./chunk-RUIXF3YQ.js";
|
|
6
6
|
import "./chunk-HZF5P5UN.js";
|
|
7
7
|
import "./chunk-F3B2YJ76.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-NPL66ZWL.js";
|
|
9
9
|
import "./chunk-6GWA276C.js";
|
|
10
10
|
import "./chunk-OOUNJNMR.js";
|
|
11
11
|
import "./chunk-H4HBKISO.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-YB363QGA.js";
|
|
13
|
+
import "./chunk-CPPTBHQN.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
export {
|
|
16
16
|
pluginCatalogRuntime
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ScheduledRun, ScheduledTask } from "./types";
|
|
2
|
+
/** Correlation attributes shared by scheduled-task create and run events. */
|
|
3
|
+
export declare function scheduledTaskAttributes(task: Pick<ScheduledTask, "id" | "conversationAccess" | "credentialMode" | "destination" | "nextRunAtMs" | "schedule" | "status">, extras?: Record<string, unknown>): Record<string, unknown>;
|
|
4
|
+
/** Correlation attributes for one scheduled-task run transition. */
|
|
5
|
+
export declare function scheduledTaskRunAttributes(task: Pick<ScheduledTask, "id" | "conversationAccess" | "credentialMode" | "destination" | "nextRunAtMs" | "schedule" | "status">, run: Pick<ScheduledRun, "id" | "dispatchId" | "scheduledForMs" | "resultMessageTs" | "status">, extras?: Record<string, unknown>): Record<string, unknown>;
|
|
6
|
+
/** Emit the lifecycle event for one skipped scheduled-task run. */
|
|
7
|
+
export declare function logScheduledTaskRunSkipped(task: Pick<ScheduledTask, "id" | "conversationAccess" | "credentialMode" | "destination" | "nextRunAtMs" | "schedule" | "status">, run: Pick<ScheduledRun, "id" | "dispatchId" | "scheduledForMs" | "resultMessageTs" | "status">, extras?: Record<string, unknown>): void;
|
|
@@ -19,6 +19,7 @@ export declare const MAX_LISTED_TASKS = 50;
|
|
|
19
19
|
declare const compactTaskResultSchema: z.ZodObject<{
|
|
20
20
|
id: z.ZodString;
|
|
21
21
|
status: z.ZodEnum<{
|
|
22
|
+
completed: "completed";
|
|
22
23
|
blocked: "blocked";
|
|
23
24
|
active: "active";
|
|
24
25
|
deleted: "deleted";
|
|
@@ -43,6 +44,7 @@ declare const compactTaskResultSchema: z.ZodObject<{
|
|
|
43
44
|
system: "system";
|
|
44
45
|
creator: "creator";
|
|
45
46
|
}>;
|
|
47
|
+
dashboard_url: z.ZodNullable<z.ZodString>;
|
|
46
48
|
last_run_at: z.ZodNullable<z.ZodString>;
|
|
47
49
|
run_now_at: z.ZodNullable<z.ZodString>;
|
|
48
50
|
}, z.core.$strict>;
|
|
@@ -56,6 +58,7 @@ export declare const scheduleTaskToolResultSchema: z.ZodObject<{
|
|
|
56
58
|
task: z.ZodObject<{
|
|
57
59
|
id: z.ZodString;
|
|
58
60
|
status: z.ZodEnum<{
|
|
61
|
+
completed: "completed";
|
|
59
62
|
blocked: "blocked";
|
|
60
63
|
active: "active";
|
|
61
64
|
deleted: "deleted";
|
|
@@ -80,6 +83,7 @@ export declare const scheduleTaskToolResultSchema: z.ZodObject<{
|
|
|
80
83
|
system: "system";
|
|
81
84
|
creator: "creator";
|
|
82
85
|
}>;
|
|
86
|
+
dashboard_url: z.ZodNullable<z.ZodString>;
|
|
83
87
|
last_run_at: z.ZodNullable<z.ZodString>;
|
|
84
88
|
run_now_at: z.ZodNullable<z.ZodString>;
|
|
85
89
|
}, z.core.$strict>;
|
|
@@ -93,6 +97,7 @@ export declare const scheduleListToolResultSchema: z.ZodObject<{
|
|
|
93
97
|
tasks: z.ZodArray<z.ZodObject<{
|
|
94
98
|
id: z.ZodString;
|
|
95
99
|
status: z.ZodEnum<{
|
|
100
|
+
completed: "completed";
|
|
96
101
|
blocked: "blocked";
|
|
97
102
|
active: "active";
|
|
98
103
|
deleted: "deleted";
|
|
@@ -117,6 +122,7 @@ export declare const scheduleListToolResultSchema: z.ZodObject<{
|
|
|
117
122
|
system: "system";
|
|
118
123
|
creator: "creator";
|
|
119
124
|
}>;
|
|
125
|
+
dashboard_url: z.ZodNullable<z.ZodString>;
|
|
120
126
|
last_run_at: z.ZodNullable<z.ZodString>;
|
|
121
127
|
run_now_at: z.ZodNullable<z.ZodString>;
|
|
122
128
|
}, z.core.$strict>>;
|
|
@@ -145,7 +151,7 @@ export declare function scheduleTaskToolResult(target: string, task: CompactTask
|
|
|
145
151
|
readonly target: string;
|
|
146
152
|
readonly task: {
|
|
147
153
|
id: string;
|
|
148
|
-
status: "blocked" | "active" | "deleted";
|
|
154
|
+
status: "completed" | "blocked" | "active" | "deleted";
|
|
149
155
|
task: string;
|
|
150
156
|
schedule: string;
|
|
151
157
|
timezone: string;
|
|
@@ -156,6 +162,7 @@ export declare function scheduleTaskToolResult(target: string, task: CompactTask
|
|
|
156
162
|
visibility: "public" | "private";
|
|
157
163
|
};
|
|
158
164
|
credential_mode: "system" | "creator";
|
|
165
|
+
dashboard_url: string | null;
|
|
159
166
|
last_run_at: string | null;
|
|
160
167
|
run_now_at: string | null;
|
|
161
168
|
};
|
|
@@ -169,7 +176,7 @@ export declare function scheduleListToolResult(args: {
|
|
|
169
176
|
readonly target: string;
|
|
170
177
|
readonly tasks: {
|
|
171
178
|
id: string;
|
|
172
|
-
status: "blocked" | "active" | "deleted";
|
|
179
|
+
status: "completed" | "blocked" | "active" | "deleted";
|
|
173
180
|
task: string;
|
|
174
181
|
schedule: string;
|
|
175
182
|
timezone: string;
|
|
@@ -180,6 +187,7 @@ export declare function scheduleListToolResult(args: {
|
|
|
180
187
|
visibility: "public" | "private";
|
|
181
188
|
};
|
|
182
189
|
credential_mode: "system" | "creator";
|
|
190
|
+
dashboard_url: string | null;
|
|
183
191
|
last_run_at: string | null;
|
|
184
192
|
run_now_at: string | null;
|
|
185
193
|
}[];
|