@sentry/junior 0.139.0 → 0.141.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-HIRVKUQJ.js} +10 -10
- package/dist/api/conversations/detail.d.ts +1 -0
- package/dist/api/conversations/event-list.d.ts +1 -0
- package/dist/api/schema/conversation.d.ts +4 -0
- package/dist/api/schema/task.d.ts +4 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +20 -20
- package/dist/app.js +117 -36
- package/dist/{catalog-runtime-GCCFYPIK.js → catalog-runtime-XVLED5UH.js} +5 -5
- package/dist/chat/agent/repository-context.d.ts +1 -0
- package/dist/chat/conversations/history.d.ts +2 -0
- package/dist/chat/conversations/projection.d.ts +8 -0
- package/dist/chat/conversations/store.d.ts +5 -0
- package/dist/chat/conversations/structured-events.d.ts +11 -0
- package/dist/chat/runtime/thread-state.d.ts +3 -1
- 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/services/guardian-action-policy.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 +18 -13
- package/dist/{chunk-GI52BW74.js → chunk-2DOVDDZJ.js} +3 -3
- package/dist/{chunk-UDBUS533.js → chunk-3H42HMA2.js} +1 -1
- package/dist/{chunk-U7CMWQ7Z.js → chunk-43OPSFUY.js} +1 -1
- package/dist/{chunk-J3S57AXY.js → chunk-44NWPKY3.js} +1 -1
- package/dist/{chunk-DW4PMHNW.js → chunk-5LPWHC7Q.js} +148 -87
- package/dist/{chunk-QTBKPZDA.js → chunk-5MFCEKR6.js} +19 -3
- package/dist/{chunk-GWQSZT4C.js → chunk-6FRAWWGR.js} +2 -2
- package/dist/{chunk-MXTVUV3I.js → chunk-6U44QGXL.js} +1 -1
- package/dist/{chunk-IIESAYDL.js → chunk-7ULXCNOZ.js} +17 -8
- package/dist/{chunk-AEQISMMU.js → chunk-A2O7SGK5.js} +15 -17
- package/dist/{chunk-75I3UBIL.js → chunk-BBLO66XT.js} +29 -29
- package/dist/{chunk-WQRX57EA.js → chunk-DBKS7JR2.js} +3 -3
- package/dist/{chunk-U27DSXKB.js → chunk-DK3GQWJK.js} +6 -6
- package/dist/{chunk-5GSZWRE2.js → chunk-DKH4WGZU.js} +8 -8
- package/dist/{chunk-6SU2DT27.js → chunk-DVIJ6DP6.js} +2 -2
- package/dist/{chunk-6OHTDR4F.js → chunk-EYD523BV.js} +1 -1
- package/dist/{chunk-4V4QIYJH.js → chunk-FWXSPJRN.js} +1 -1
- package/dist/{chunk-G52UXKGO.js → chunk-FZFJZZR3.js} +4 -4
- package/dist/{chunk-WZH4JV7R.js → chunk-H4WNQFBH.js} +5 -5
- package/dist/{chunk-CDQ4YIZM.js → chunk-HLXXQI5Q.js} +55 -1
- package/dist/{chunk-3T2JAGRH.js → chunk-HN4UZTG7.js} +2 -2
- package/dist/{chunk-MXVD2BDS.js → chunk-HQAFIN6O.js} +1 -1
- package/dist/{chunk-J6EJQCHY.js → chunk-LIVSCWI5.js} +15 -15
- package/dist/{chunk-CXH25EL4.js → chunk-LMGKSDO4.js} +1 -1
- package/dist/{chunk-MQ5RYATN.js → chunk-NFL4FRIU.js} +4 -4
- package/dist/{chunk-C2N6MNO4.js → chunk-OFQBDHVG.js} +1 -1
- package/dist/{chunk-ZYQSPQYR.js → chunk-OHO46E7F.js} +50 -19
- package/dist/{chunk-YGZ2OLXL.js → chunk-PGJUJCOQ.js} +1 -1
- package/dist/{chunk-PJW6U46K.js → chunk-PIQKV7IR.js} +212 -149
- package/dist/{chunk-2ECYPYKP.js → chunk-UFEU4UX6.js} +1 -1
- package/dist/{chunk-ZQCGQMF2.js → chunk-UONUDOJP.js} +7 -7
- package/dist/{chunk-YCTDA7BD.js → chunk-YWM6MJT4.js} +1 -1
- package/dist/cli/chat.js +31 -31
- 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-PSMQZR4P.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-XZUK2AT6.js} +22 -22
- package/dist/{runner-MZSEONRZ.js → runner-5EKJCQWP.js} +14 -14
- package/dist/{skills-IMVPXSQ7.js → skills-2PRM42SE.js} +6 -6
- package/dist/spawn-UGTLRTFP.js +38 -0
- package/dist/{validation-ZKCY2BVR.js → validation-XLXAIRTR.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-GG3XDYRX.js → work-CNTNEQ2Q.js} +17 -17
- package/dist/{worker-23AUELCJ.js → worker-BGW7CKZ7.js} +10 -10
- package/package.json +5 -5
- package/dist/spawn-S5LSVOCE.js +0 -38
|
@@ -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-7ULXCNOZ.js";
|
|
15
|
+
import "./chunk-DVIJ6DP6.js";
|
|
16
|
+
import "./chunk-5MFCEKR6.js";
|
|
17
|
+
import "./chunk-3H42HMA2.js";
|
|
18
18
|
import "./chunk-EM225ITJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-6U44QGXL.js";
|
|
20
|
+
import "./chunk-BBLO66XT.js";
|
|
21
21
|
import "./chunk-VFUK3X5B.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-PGJUJCOQ.js";
|
|
23
23
|
import "./chunk-HZF5P5UN.js";
|
|
24
24
|
import "./chunk-F3B2YJ76.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-UFEU4UX6.js";
|
|
26
26
|
import "./chunk-6GWA276C.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-OFQBDHVG.js";
|
|
28
|
+
import "./chunk-43OPSFUY.js";
|
|
29
29
|
import "./chunk-MLKGABMK.js";
|
|
30
30
|
export {
|
|
31
31
|
PluginHookDeniedError,
|
|
@@ -184,6 +184,7 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
|
184
184
|
turnId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
185
|
presentation: import("zod").ZodObject<{
|
|
186
186
|
details: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
187
|
+
content: import("zod").ZodOptional<import("zod").ZodString>;
|
|
187
188
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
188
189
|
metadata: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
189
190
|
title: import("zod").ZodString;
|
|
@@ -91,6 +91,7 @@ declare const _default: import("../route").ApiRoute<import("zod").ZodObject<{
|
|
|
91
91
|
turnId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
92
92
|
presentation: import("zod").ZodObject<{
|
|
93
93
|
details: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
94
|
+
content: import("zod").ZodOptional<import("zod").ZodString>;
|
|
94
95
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
95
96
|
metadata: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
96
97
|
title: import("zod").ZodString;
|
|
@@ -209,6 +209,7 @@ export declare const conversationReportEventDataSchema: z.ZodDiscriminatedUnion<
|
|
|
209
209
|
turnId: z.ZodOptional<z.ZodString>;
|
|
210
210
|
presentation: z.ZodObject<{
|
|
211
211
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
212
|
+
content: z.ZodOptional<z.ZodString>;
|
|
212
213
|
description: z.ZodOptional<z.ZodString>;
|
|
213
214
|
metadata: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
215
|
title: z.ZodString;
|
|
@@ -385,6 +386,7 @@ export declare const conversationReportEventSchema: z.ZodObject<{
|
|
|
385
386
|
turnId: z.ZodOptional<z.ZodString>;
|
|
386
387
|
presentation: z.ZodObject<{
|
|
387
388
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
389
|
+
content: z.ZodOptional<z.ZodString>;
|
|
388
390
|
description: z.ZodOptional<z.ZodString>;
|
|
389
391
|
metadata: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
390
392
|
title: z.ZodString;
|
|
@@ -682,6 +684,7 @@ export declare const conversationDetailReportSchema: z.ZodObject<{
|
|
|
682
684
|
turnId: z.ZodOptional<z.ZodString>;
|
|
683
685
|
presentation: z.ZodObject<{
|
|
684
686
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
687
|
+
content: z.ZodOptional<z.ZodString>;
|
|
685
688
|
description: z.ZodOptional<z.ZodString>;
|
|
686
689
|
metadata: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
687
690
|
title: z.ZodString;
|
|
@@ -872,6 +875,7 @@ export declare const conversationEventPageSchema: z.ZodObject<{
|
|
|
872
875
|
turnId: z.ZodOptional<z.ZodString>;
|
|
873
876
|
presentation: z.ZodObject<{
|
|
874
877
|
details: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
878
|
+
content: z.ZodOptional<z.ZodString>;
|
|
875
879
|
description: z.ZodOptional<z.ZodString>;
|
|
876
880
|
metadata: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
877
881
|
title: z.ZodString;
|
|
@@ -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-HN4UZTG7.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-2DOVDDZJ.js";
|
|
46
46
|
import {
|
|
47
47
|
healthReportSchema,
|
|
48
48
|
pluginOperationalReportFeedSchema,
|
|
@@ -61,15 +61,15 @@ import {
|
|
|
61
61
|
listPublicEventTasksForTeams,
|
|
62
62
|
listPublicScheduledTasksForTeams,
|
|
63
63
|
readStats
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-5LPWHC7Q.js";
|
|
65
65
|
import {
|
|
66
66
|
parseSlackThreadId
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-HQAFIN6O.js";
|
|
68
68
|
import {
|
|
69
69
|
agentTurnUsageSchema,
|
|
70
70
|
hasAgentTurnUsage,
|
|
71
71
|
renderJuniorNativeConversationEvent
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-HLXXQI5Q.js";
|
|
73
73
|
import "./chunk-PDO5BLNM.js";
|
|
74
74
|
import {
|
|
75
75
|
createPluginLogger,
|
|
@@ -77,44 +77,44 @@ import {
|
|
|
77
77
|
listConversationAnnotations,
|
|
78
78
|
renderPluginConversationEvent,
|
|
79
79
|
resolveViewerUser
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-7ULXCNOZ.js";
|
|
81
81
|
import {
|
|
82
82
|
getSlackClient,
|
|
83
83
|
withSlackRetries
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-DVIJ6DP6.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-5MFCEKR6.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-3H42HMA2.js";
|
|
99
99
|
import "./chunk-EM225ITJ.js";
|
|
100
|
-
import "./chunk-
|
|
101
|
-
import "./chunk-
|
|
100
|
+
import "./chunk-6U44QGXL.js";
|
|
101
|
+
import "./chunk-BBLO66XT.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-PGJUJCOQ.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-UFEU4UX6.js";
|
|
115
115
|
import "./chunk-6GWA276C.js";
|
|
116
|
-
import "./chunk-
|
|
117
|
-
import "./chunk-
|
|
116
|
+
import "./chunk-OFQBDHVG.js";
|
|
117
|
+
import "./chunk-43OPSFUY.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-2PRM42SE.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-XVLED5UH.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-XVLED5UH.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-HIRVKUQJ.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-DBKS7JR2.js";
|
|
4
4
|
import {
|
|
5
5
|
bindSpawnAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FWXSPJRN.js";
|
|
7
7
|
import {
|
|
8
8
|
createAgentInvocationWorker,
|
|
9
9
|
enqueueAgentInvocation,
|
|
10
10
|
listPendingAgentInvocationMailboxAppends,
|
|
11
11
|
routeAgentInvocationWork
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-A2O7SGK5.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-LIVSCWI5.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-NFL4FRIU.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-DKH4WGZU.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-HN4UZTG7.js";
|
|
94
94
|
import "./chunk-4CODA7P5.js";
|
|
95
95
|
import {
|
|
96
96
|
recordTaskExecution
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-2DOVDDZJ.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-44NWPKY3.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-OHO46E7F.js";
|
|
150
150
|
import {
|
|
151
151
|
AuthorizationFlowDisabledError,
|
|
152
152
|
PluginCredentialFailureError
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-H4WNQFBH.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-UONUDOJP.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-DK3GQWJK.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-PIQKV7IR.js";
|
|
225
225
|
import "./chunk-3Y47VMHV.js";
|
|
226
226
|
import "./chunk-HUO3UTAQ.js";
|
|
227
227
|
import {
|
|
@@ -231,15 +231,17 @@ import {
|
|
|
231
231
|
import {
|
|
232
232
|
getSandboxResourceConfig,
|
|
233
233
|
setSandboxResourceConfig
|
|
234
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-FZFJZZR3.js";
|
|
235
235
|
import {
|
|
236
236
|
createSchedulerSqlStore,
|
|
237
|
-
findMatchingEventTasks
|
|
238
|
-
|
|
237
|
+
findMatchingEventTasks,
|
|
238
|
+
logScheduledTaskRunSkipped,
|
|
239
|
+
scheduledTaskRunAttributes
|
|
240
|
+
} from "./chunk-5LPWHC7Q.js";
|
|
239
241
|
import {
|
|
240
242
|
parseSlackThreadId
|
|
241
|
-
} from "./chunk-
|
|
242
|
-
import "./chunk-
|
|
243
|
+
} from "./chunk-HQAFIN6O.js";
|
|
244
|
+
import "./chunk-HLXXQI5Q.js";
|
|
243
245
|
import "./chunk-PDO5BLNM.js";
|
|
244
246
|
import "./chunk-UIE3R5XU.js";
|
|
245
247
|
import {
|
|
@@ -258,7 +260,7 @@ import {
|
|
|
258
260
|
verifyEventTaskCredentialSubject,
|
|
259
261
|
verifyScheduledTaskCredentialSubject,
|
|
260
262
|
verifySlackDirectCredentialSubject
|
|
261
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-7ULXCNOZ.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-DVIJ6DP6.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-5MFCEKR6.js";
|
|
284
286
|
import {
|
|
285
287
|
juniorAgentBindings,
|
|
286
288
|
juniorAgentInvocations,
|
|
287
289
|
juniorConversationEvents,
|
|
288
290
|
juniorConversations
|
|
289
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-3H42HMA2.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-6U44QGXL.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-BBLO66XT.js";
|
|
315
317
|
import {
|
|
316
318
|
juniorDestinations
|
|
317
319
|
} from "./chunk-VFUK3X5B.js";
|
|
318
|
-
import "./chunk-
|
|
319
|
-
import "./chunk-
|
|
320
|
+
import "./chunk-PGJUJCOQ.js";
|
|
321
|
+
import "./chunk-6FRAWWGR.js";
|
|
320
322
|
import {
|
|
321
323
|
pluginCatalogRuntime
|
|
322
|
-
} from "./chunk-
|
|
323
|
-
import "./chunk-
|
|
324
|
+
} from "./chunk-EYD523BV.js";
|
|
325
|
+
import "./chunk-LMGKSDO4.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-UFEU4UX6.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-OFQBDHVG.js";
|
|
364
366
|
import {
|
|
365
367
|
JUNIOR_VERSION
|
|
366
|
-
} from "./chunk-
|
|
368
|
+
} from "./chunk-43OPSFUY.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-EYD523BV.js";
|
|
4
|
+
import "./chunk-LMGKSDO4.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-UFEU4UX6.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-OFQBDHVG.js";
|
|
13
|
+
import "./chunk-43OPSFUY.js";
|
|
14
14
|
import "./chunk-MLKGABMK.js";
|
|
15
15
|
export {
|
|
16
16
|
pluginCatalogRuntime
|
|
@@ -7,6 +7,7 @@ type RepositoryInstructionsContextOptions = {
|
|
|
7
7
|
capture(): Promise<RepositoryInstructions | undefined>;
|
|
8
8
|
hasSandbox(): boolean;
|
|
9
9
|
initialInstructions?: RepositoryInstructions;
|
|
10
|
+
onTransition?: (instructions: RepositoryInstructions | undefined) => void | Promise<void>;
|
|
10
11
|
restoredMessages?: PiMessage[];
|
|
11
12
|
restoredProvenance?: ConversationMessageProvenance[];
|
|
12
13
|
promptContextContentParts: UserContentPart[];
|
|
@@ -952,6 +952,8 @@ export interface ConversationEventStore {
|
|
|
952
952
|
replaceHistory(conversationId: string, replacement: HistoryReplacement): Promise<void>;
|
|
953
953
|
/** One event selected by its retry-stable key across history versions. */
|
|
954
954
|
loadByIdempotencyKey(conversationId: string, idempotencyKey: string): Promise<ConversationEvent | undefined>;
|
|
955
|
+
/** Latest matching structured event across history versions. */
|
|
956
|
+
loadLatestStructuredEvent(conversationId: string, namespace: string, name: string): Promise<ConversationEvent | undefined>;
|
|
955
957
|
/** Latest durable instruction across history versions. */
|
|
956
958
|
loadLatestInstruction(conversationId: string): Promise<ConversationEvent | undefined>;
|
|
957
959
|
/** Events of the current history version in `seq` order. */
|