@sentry/junior 0.173.0 → 0.175.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-TKE6PDE3.js → agent-hooks-DOXAOEHI.js} +13 -12
- package/dist/api/conversations/list.d.ts +3 -1
- package/dist/api/schema/conversation.d.ts +4 -0
- package/dist/api/schema.js +1 -1
- package/dist/api.js +34 -32
- package/dist/app.js +50 -36
- package/dist/{catalog-runtime-247LR4L4.js → catalog-runtime-OTFZT3R2.js} +5 -5
- package/dist/chat/resource-events/catalog.d.ts +2 -0
- package/dist/chat/resource-events/notification.d.ts +1 -1
- package/dist/chat/resource-events/tool-support.d.ts +4 -0
- package/dist/{chunk-54LKZSAW.js → chunk-2AEUOTQL.js} +1 -1
- package/dist/{chunk-HWLN37DJ.js → chunk-2WCXOLNX.js} +2 -2
- package/dist/{chunk-YY3XHPFQ.js → chunk-2XWTVTLS.js} +1 -1
- package/dist/{chunk-UDSVV7MC.js → chunk-46BUAC7H.js} +3 -3
- package/dist/{chunk-SZ6HE45O.js → chunk-4CVWSS6Q.js} +1 -1
- package/dist/{chunk-VKBONIMW.js → chunk-6KKCC7CG.js} +4 -4
- package/dist/{chunk-TZIZCB6V.js → chunk-CSV5XEQN.js} +1 -1
- package/dist/{chunk-KUZQEAZB.js → chunk-DSZNZ7AW.js} +472 -903
- package/dist/{chunk-GBPGKJZF.js → chunk-DVWHUWTB.js} +12 -12
- package/dist/{chunk-UTMP45YM.js → chunk-ELEAIRTG.js} +2 -1
- package/dist/{chunk-MAE6RNYQ.js → chunk-GBDCHVNI.js} +5 -5
- package/dist/{chunk-NDJ5XLSR.js → chunk-GLYH4OBP.js} +1 -1
- package/dist/{chunk-FAMC3HC7.js → chunk-HHAR5IDU.js} +6 -6
- package/dist/{chunk-2XUT3VLE.js → chunk-HVI3ZLMV.js} +1 -1
- package/dist/{chunk-VEZ4VIJX.js → chunk-I7F7WVUW.js} +98 -96
- package/dist/{chunk-VQTMPROS.js → chunk-JLHYNMXZ.js} +6 -6
- package/dist/{chunk-D3XNZ5GJ.js → chunk-K4SGLRWX.js} +505 -11
- package/dist/{chunk-EHE45OBY.js → chunk-KGKKBFOI.js} +1 -1
- package/dist/{chunk-KSQ2BFUK.js → chunk-NBE6DME6.js} +1 -1
- package/dist/{chunk-33SJGQG6.js → chunk-PQV33DEV.js} +4 -4
- package/dist/{chunk-FWM663LY.js → chunk-RAV6B2TQ.js} +2 -2
- package/dist/{chunk-C4I6OV7U.js → chunk-RG6JSBDJ.js} +1 -1
- package/dist/{chunk-3J7WUHKY.js → chunk-RMANRIHC.js} +5 -5
- package/dist/{chunk-OWJJB5DQ.js → chunk-T3RN2B3T.js} +12 -12
- package/dist/{chunk-NMUEJHPW.js → chunk-TYSWSX3M.js} +8 -8
- package/dist/{chunk-A3U4JTWA.js → chunk-UQURHDWJ.js} +4 -4
- package/dist/{chunk-YJOBW6ON.js → chunk-V7QS3Z53.js} +17 -17
- package/dist/{chunk-A7TBEENH.js → chunk-VMVTHLJM.js} +1 -1
- package/dist/{chunk-Q2457VTU.js → chunk-WHKREAVX.js} +1 -1
- package/dist/{chunk-6PHOLDQI.js → chunk-WNQBHYAQ.js} +1 -1
- package/dist/{chunk-7PNMY4NE.js → chunk-XL24YNNO.js} +1 -1
- package/dist/{chunk-FMM3B64Q.js → chunk-YMBCD6FB.js} +8 -16
- package/dist/{chunk-WVFTUTAK.js → chunk-YUUMDYLN.js} +1 -1
- package/dist/cli/chat.js +31 -31
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +14 -13
- package/dist/cli/snapshot-create.js +10 -10
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-DN7KYTNR.js → db-B7NVPW7Y.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-5HSUJNR4.js → oauth-callback-server-TMTQK74Z.js} +24 -24
- package/dist/{runner-62H3GPAH.js → runner-HROVFS4C.js} +16 -16
- package/dist/{skills-76ZK6SH7.js → skills-77LC6PFU.js} +6 -6
- package/dist/spawn-JBWVVXIL.js +37 -0
- package/dist/{validation-6HZIOXZG.js → validation-EL4J4FYB.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-ZWH4KG3U.js → work-5UQRXUOD.js} +19 -19
- package/dist/worker-3FBM4GWV.js +24 -0
- package/package.json +5 -5
- package/dist/spawn-UOEYRXD7.js +0 -37
- package/dist/worker-LB7JCNA5.js +0 -24
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWebAuthorization,
|
|
3
3
|
deleteWebAuthorization
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GLYH4OBP.js";
|
|
5
5
|
import {
|
|
6
6
|
appendAndEnqueueInboundMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PQV33DEV.js";
|
|
8
8
|
import {
|
|
9
9
|
buildDeliveredTurnStatePatch,
|
|
10
10
|
completeAuthPauseTurn,
|
|
@@ -12,20 +12,20 @@ import {
|
|
|
12
12
|
getTurnUserMessage,
|
|
13
13
|
processPluginTask,
|
|
14
14
|
scheduleSessionCompletedPluginTasks
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-T3RN2B3T.js";
|
|
16
16
|
import {
|
|
17
17
|
ConversationTurnLifecycleService,
|
|
18
18
|
coerceThreadConversationState,
|
|
19
19
|
getPersistedSandboxState,
|
|
20
20
|
getPersistedThreadState,
|
|
21
21
|
persistThreadStateById
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RMANRIHC.js";
|
|
23
23
|
import {
|
|
24
24
|
healthReportSchema
|
|
25
25
|
} from "./chunk-UTL3MHPC.js";
|
|
26
26
|
import {
|
|
27
27
|
parseSlackThreadId
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-WNQBHYAQ.js";
|
|
29
29
|
import {
|
|
30
30
|
TurnInputCommitLostError,
|
|
31
31
|
abandonTurnRecord,
|
|
@@ -49,31 +49,31 @@ import {
|
|
|
49
49
|
saveTurnCheckpoint,
|
|
50
50
|
startActiveTurn,
|
|
51
51
|
upsertConversationMessage
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-YMBCD6FB.js";
|
|
53
53
|
import {
|
|
54
54
|
normalizeSlackConversationId
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-K4SGLRWX.js";
|
|
56
56
|
import {
|
|
57
57
|
getConversationEventStore,
|
|
58
58
|
getConversationStore,
|
|
59
59
|
getDb
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-46BUAC7H.js";
|
|
61
61
|
import {
|
|
62
62
|
juniorApiTokens,
|
|
63
63
|
juniorConversationParticipants,
|
|
64
64
|
juniorConversations,
|
|
65
65
|
juniorIdentities,
|
|
66
66
|
juniorUsers
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-RG6JSBDJ.js";
|
|
68
68
|
import {
|
|
69
69
|
getSlackBotToken
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-RAV6B2TQ.js";
|
|
71
71
|
import {
|
|
72
72
|
juniorDestinations
|
|
73
73
|
} from "./chunk-VFUK3X5B.js";
|
|
74
74
|
import {
|
|
75
75
|
canExposeConversationPayload
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-NBE6DME6.js";
|
|
77
77
|
import {
|
|
78
78
|
credentialContextForActor
|
|
79
79
|
} from "./chunk-CGA4ERJ5.js";
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
logWarn,
|
|
83
83
|
setTags,
|
|
84
84
|
withLogContext
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-VMVTHLJM.js";
|
|
86
86
|
|
|
87
87
|
// src/handlers/health.ts
|
|
88
88
|
function readHealthReport() {
|
|
@@ -69,7 +69,8 @@ var conversationEventsQuerySchema = z2.object({
|
|
|
69
69
|
limit: z2.coerce.number().int().min(1).max(1e3).default(500)
|
|
70
70
|
}).strict();
|
|
71
71
|
var conversationFeedQuerySchema = z2.object({
|
|
72
|
-
actorEmail: z2.string().trim().email().transform((value) => value.toLowerCase()).optional()
|
|
72
|
+
actorEmail: z2.string().trim().email().transform((value) => value.toLowerCase()).optional(),
|
|
73
|
+
status: z2.enum(["active", "archived"]).default("active")
|
|
73
74
|
}).strict();
|
|
74
75
|
var archiveConversationBodySchema = z2.object({ archived: z2.boolean(), lastSeenAt: z2.string().datetime() }).strict();
|
|
75
76
|
var archiveConversationResponseSchema = z2.object({ archived: z2.boolean() }).strict();
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
formatProviderLabel,
|
|
6
6
|
startOAuthFlow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HHAR5IDU.js";
|
|
8
8
|
import {
|
|
9
9
|
parseSandboxEgressAuthRequiredSignal
|
|
10
10
|
} from "./chunk-6ZWRNC4D.js";
|
|
@@ -12,16 +12,16 @@ import {
|
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink,
|
|
14
14
|
recordAuthorizationRequested
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-YMBCD6FB.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RG6JSBDJ.js";
|
|
19
19
|
import {
|
|
20
20
|
TURN_REASONING_LEVELS
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RAV6B2TQ.js";
|
|
22
22
|
import {
|
|
23
23
|
pluginCatalogRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XL24YNNO.js";
|
|
25
25
|
import {
|
|
26
26
|
credentialContextSchema
|
|
27
27
|
} from "./chunk-CGA4ERJ5.js";
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
isDmChannel,
|
|
6
6
|
normalizeSlackConversationId,
|
|
7
7
|
withSlackRetries
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-K4SGLRWX.js";
|
|
9
9
|
import {
|
|
10
10
|
parseDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-46BUAC7H.js";
|
|
12
12
|
import {
|
|
13
13
|
getStateAdapter
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CSV5XEQN.js";
|
|
15
15
|
import {
|
|
16
16
|
normalizeSlackEmojiName
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RAV6B2TQ.js";
|
|
18
18
|
import {
|
|
19
19
|
pluginCatalogRuntime
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XL24YNNO.js";
|
|
21
21
|
import {
|
|
22
22
|
parseSlackMessageTs,
|
|
23
23
|
parseSlackUserId
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
isRecord,
|
|
27
27
|
logInfo,
|
|
28
28
|
logWarn
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-VMVTHLJM.js";
|
|
30
30
|
|
|
31
31
|
// src/chat/slack/outbound.ts
|
|
32
32
|
var MAX_SLACK_MESSAGE_TEXT_CHARS = 4e4;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ToolInputError
|
|
3
|
-
} from "./chunk-FMM3B64Q.js";
|
|
4
|
-
import {
|
|
2
|
+
ToolInputError,
|
|
5
3
|
canRouteResourceEvents,
|
|
6
4
|
getPlugins
|
|
7
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-K4SGLRWX.js";
|
|
8
6
|
import {
|
|
9
7
|
getDb
|
|
10
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-46BUAC7H.js";
|
|
11
9
|
import {
|
|
12
10
|
juniorAttachments,
|
|
13
11
|
juniorConversations,
|
|
@@ -15,13 +13,81 @@ import {
|
|
|
15
13
|
juniorSchedulerRuns,
|
|
16
14
|
juniorSchedulerTasks,
|
|
17
15
|
juniorStats
|
|
18
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RG6JSBDJ.js";
|
|
19
17
|
import {
|
|
20
18
|
juniorDestinations
|
|
21
19
|
} from "./chunk-VFUK3X5B.js";
|
|
22
20
|
import {
|
|
23
21
|
logInfo
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VMVTHLJM.js";
|
|
23
|
+
|
|
24
|
+
// src/chat/resource-events/catalog.ts
|
|
25
|
+
import {
|
|
26
|
+
normalizeResourceEventIdentifier
|
|
27
|
+
} from "@sentry/junior-plugin-api";
|
|
28
|
+
import { z } from "zod";
|
|
29
|
+
function enumSchema(values, unavailableMessage) {
|
|
30
|
+
if (values.length === 0) {
|
|
31
|
+
return z.string().refine(() => false, unavailableMessage);
|
|
32
|
+
}
|
|
33
|
+
return z.enum(values);
|
|
34
|
+
}
|
|
35
|
+
function eventNamespaceSchema(catalog) {
|
|
36
|
+
return enumSchema(
|
|
37
|
+
Object.keys(catalog).sort(),
|
|
38
|
+
"No resource event namespaces are enabled."
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function registeredEventTypeSchema(catalog) {
|
|
42
|
+
return enumSchema(
|
|
43
|
+
[
|
|
44
|
+
...new Set(
|
|
45
|
+
Object.values(catalog).flatMap(
|
|
46
|
+
(registration) => registration.resourceTypes.flatMap(
|
|
47
|
+
(resourceType) => resourceType.supportedEvents
|
|
48
|
+
)
|
|
49
|
+
)
|
|
50
|
+
)
|
|
51
|
+
].sort(),
|
|
52
|
+
"No resource event types are enabled."
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
function registeredResourceTypeSchema(catalog) {
|
|
56
|
+
return enumSchema(
|
|
57
|
+
[
|
|
58
|
+
...new Set(
|
|
59
|
+
Object.values(catalog).flatMap(
|
|
60
|
+
(registration) => registration.resourceTypes.map((resourceType) => resourceType.type)
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
].sort(),
|
|
64
|
+
"No resource types are enabled."
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
function pluginSupportsEvent(catalog, namespace, resourceType, eventType) {
|
|
68
|
+
return catalog[namespace]?.resourceTypes.find((candidate) => candidate.type === resourceType)?.supportedEvents.includes(eventType) ?? false;
|
|
69
|
+
}
|
|
70
|
+
function resourceEventGuidance(catalog, namespace, eventType) {
|
|
71
|
+
return catalog[namespace]?.resourceTypes.find(
|
|
72
|
+
(resourceType) => resourceType.supportedEvents.includes(eventType)
|
|
73
|
+
)?.guidance?.[eventType];
|
|
74
|
+
}
|
|
75
|
+
function normalizeEventIdentifier(catalog, namespace, identifier) {
|
|
76
|
+
return normalizeResourceEventIdentifier(catalog[namespace], identifier);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// src/chat/resource-events/runtime-catalog.ts
|
|
80
|
+
function getResourceEventCatalog() {
|
|
81
|
+
return Object.fromEntries(
|
|
82
|
+
canRouteResourceEvents() ? getPlugins().flatMap((plugin) => {
|
|
83
|
+
const registration = plugin.resourceEvents;
|
|
84
|
+
if (!registration || registration.isEnabled?.() === false) {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
return [[plugin.manifest.name, registration]];
|
|
88
|
+
}) : []
|
|
89
|
+
);
|
|
90
|
+
}
|
|
25
91
|
|
|
26
92
|
// src/chat/event-tasks/store.ts
|
|
27
93
|
import { and, asc, desc, eq, inArray, or, sql } from "drizzle-orm";
|
|
@@ -33,28 +99,28 @@ import {
|
|
|
33
99
|
slackActorSchema,
|
|
34
100
|
slackDestinationSchema
|
|
35
101
|
} from "@sentry/junior-plugin-api";
|
|
36
|
-
import { z } from "zod";
|
|
102
|
+
import { z as z2 } from "zod";
|
|
37
103
|
var EVENT_TASK_IDENTIFIER_MAX_LENGTH = 300;
|
|
38
|
-
var eventTaskPrincipalSchema =
|
|
104
|
+
var eventTaskPrincipalSchema = z2.object({
|
|
39
105
|
slackUserId: slackActorSchema.shape.userId,
|
|
40
|
-
fullName:
|
|
41
|
-
userName:
|
|
106
|
+
fullName: z2.string().optional(),
|
|
107
|
+
userName: z2.string().optional()
|
|
42
108
|
}).strict();
|
|
43
|
-
var eventTaskTriggerSchema =
|
|
44
|
-
events:
|
|
45
|
-
label:
|
|
46
|
-
namespace:
|
|
47
|
-
identifier:
|
|
48
|
-
resourceType:
|
|
109
|
+
var eventTaskTriggerSchema = z2.object({
|
|
110
|
+
events: z2.array(resourceEventTypeSchema).min(1),
|
|
111
|
+
label: z2.string().min(1),
|
|
112
|
+
namespace: z2.string().min(1),
|
|
113
|
+
identifier: z2.string().min(1).max(EVENT_TASK_IDENTIFIER_MAX_LENGTH),
|
|
114
|
+
resourceType: z2.string().min(1)
|
|
49
115
|
}).strict();
|
|
50
|
-
var eventTaskSchema =
|
|
51
|
-
id:
|
|
52
|
-
createdAtMs:
|
|
116
|
+
var eventTaskSchema = z2.object({
|
|
117
|
+
id: z2.string().min(1),
|
|
118
|
+
createdAtMs: z2.number().finite(),
|
|
53
119
|
createdBy: eventTaskPrincipalSchema,
|
|
54
|
-
credentialMode:
|
|
120
|
+
credentialMode: z2.enum(["system", "creator"]),
|
|
55
121
|
destination: slackDestinationSchema,
|
|
56
122
|
destinationVisibility: destinationVisibilitySchema,
|
|
57
|
-
task:
|
|
123
|
+
task: z2.object({ text: z2.string().min(1) }).strict(),
|
|
58
124
|
trigger: eventTaskTriggerSchema
|
|
59
125
|
}).strict();
|
|
60
126
|
|
|
@@ -188,19 +254,19 @@ async function readStats(start, end) {
|
|
|
188
254
|
}
|
|
189
255
|
|
|
190
256
|
// src/chat/tool-support/structured-result.ts
|
|
191
|
-
import { z as
|
|
192
|
-
var juniorToolContinuationSchema =
|
|
193
|
-
arguments:
|
|
194
|
-
reason:
|
|
257
|
+
import { z as z3 } from "zod";
|
|
258
|
+
var juniorToolContinuationSchema = z3.object({
|
|
259
|
+
arguments: z3.record(z3.string(), z3.unknown()),
|
|
260
|
+
reason: z3.string().min(1).optional()
|
|
195
261
|
}).strict();
|
|
196
262
|
var juniorToolBoundContinuationSchema = juniorToolContinuationSchema.extend({
|
|
197
|
-
tool_name:
|
|
263
|
+
tool_name: z3.string().min(1)
|
|
198
264
|
});
|
|
199
|
-
var juniorToolOutputSchema =
|
|
200
|
-
target:
|
|
201
|
-
truncated:
|
|
265
|
+
var juniorToolOutputSchema = z3.object({
|
|
266
|
+
target: z3.string().min(1).optional(),
|
|
267
|
+
truncated: z3.boolean().optional(),
|
|
202
268
|
/** True when this attempt did not finish before its time budget. */
|
|
203
|
-
timed_out:
|
|
269
|
+
timed_out: z3.boolean().optional(),
|
|
204
270
|
continuation: juniorToolContinuationSchema.optional()
|
|
205
271
|
}).passthrough();
|
|
206
272
|
function sortJsonValue(value) {
|
|
@@ -242,73 +308,8 @@ function makeStructuredToolOutput(details, options = {}) {
|
|
|
242
308
|
};
|
|
243
309
|
}
|
|
244
310
|
|
|
245
|
-
// src/chat/resource-events/runtime-catalog.ts
|
|
246
|
-
function getResourceEventCatalog() {
|
|
247
|
-
return Object.fromEntries(
|
|
248
|
-
canRouteResourceEvents() ? getPlugins().flatMap((plugin) => {
|
|
249
|
-
const registration = plugin.resourceEvents;
|
|
250
|
-
if (!registration || registration.isEnabled?.() === false) {
|
|
251
|
-
return [];
|
|
252
|
-
}
|
|
253
|
-
return [[plugin.manifest.name, registration]];
|
|
254
|
-
}) : []
|
|
255
|
-
);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
311
|
// src/chat/event-tasks/tool-support.ts
|
|
259
312
|
import { z as z4 } from "zod";
|
|
260
|
-
|
|
261
|
-
// src/chat/resource-events/catalog.ts
|
|
262
|
-
import {
|
|
263
|
-
normalizeResourceEventIdentifier
|
|
264
|
-
} from "@sentry/junior-plugin-api";
|
|
265
|
-
import { z as z3 } from "zod";
|
|
266
|
-
function enumSchema(values, unavailableMessage) {
|
|
267
|
-
if (values.length === 0) {
|
|
268
|
-
return z3.string().refine(() => false, unavailableMessage);
|
|
269
|
-
}
|
|
270
|
-
return z3.enum(values);
|
|
271
|
-
}
|
|
272
|
-
function eventNamespaceSchema(catalog) {
|
|
273
|
-
return enumSchema(
|
|
274
|
-
Object.keys(catalog).sort(),
|
|
275
|
-
"No resource event namespaces are enabled."
|
|
276
|
-
);
|
|
277
|
-
}
|
|
278
|
-
function registeredEventTypeSchema(catalog) {
|
|
279
|
-
return enumSchema(
|
|
280
|
-
[
|
|
281
|
-
...new Set(
|
|
282
|
-
Object.values(catalog).flatMap(
|
|
283
|
-
(registration) => registration.resourceTypes.flatMap(
|
|
284
|
-
(resourceType) => resourceType.supportedEvents
|
|
285
|
-
)
|
|
286
|
-
)
|
|
287
|
-
)
|
|
288
|
-
].sort(),
|
|
289
|
-
"No resource event types are enabled."
|
|
290
|
-
);
|
|
291
|
-
}
|
|
292
|
-
function registeredResourceTypeSchema(catalog) {
|
|
293
|
-
return enumSchema(
|
|
294
|
-
[
|
|
295
|
-
...new Set(
|
|
296
|
-
Object.values(catalog).flatMap(
|
|
297
|
-
(registration) => registration.resourceTypes.map((resourceType) => resourceType.type)
|
|
298
|
-
)
|
|
299
|
-
)
|
|
300
|
-
].sort(),
|
|
301
|
-
"No resource types are enabled."
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
function pluginSupportsEvent(catalog, namespace, resourceType, eventType) {
|
|
305
|
-
return catalog[namespace]?.resourceTypes.find((candidate) => candidate.type === resourceType)?.supportedEvents.includes(eventType) ?? false;
|
|
306
|
-
}
|
|
307
|
-
function normalizeEventIdentifier(catalog, namespace, identifier) {
|
|
308
|
-
return normalizeResourceEventIdentifier(catalog[namespace], identifier);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// src/chat/event-tasks/tool-support.ts
|
|
312
313
|
var compactEventTaskResultSchema = z4.object({
|
|
313
314
|
id: z4.string().min(1),
|
|
314
315
|
task: z4.string().min(1),
|
|
@@ -1903,6 +1904,7 @@ export {
|
|
|
1903
1904
|
registeredEventTypeSchema,
|
|
1904
1905
|
registeredResourceTypeSchema,
|
|
1905
1906
|
pluginSupportsEvent,
|
|
1907
|
+
resourceEventGuidance,
|
|
1906
1908
|
normalizeEventIdentifier,
|
|
1907
1909
|
getResourceEventCatalog,
|
|
1908
1910
|
getEventTask,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
appendAndEnqueueInboundMessage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PQV33DEV.js";
|
|
4
4
|
import {
|
|
5
5
|
ConversationTurnLifecycleService,
|
|
6
6
|
getPersistedSandboxState,
|
|
7
7
|
getPersistedThreadState,
|
|
8
8
|
persistThreadStateById
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RMANRIHC.js";
|
|
10
10
|
import {
|
|
11
11
|
AgentInvocationBusyError,
|
|
12
12
|
AgentInvocationLimitError,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
agentBindingSchema,
|
|
16
16
|
agentInvocationSchema,
|
|
17
17
|
createAgentInvocationSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GBDCHVNI.js";
|
|
19
19
|
import {
|
|
20
20
|
TurnInputCommitLostError,
|
|
21
21
|
failTurnRecord,
|
|
@@ -26,16 +26,16 @@ import {
|
|
|
26
26
|
isTurnInputCommitLostError,
|
|
27
27
|
openConversationProjection,
|
|
28
28
|
saveTurnCheckpoint
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YMBCD6FB.js";
|
|
30
30
|
import {
|
|
31
31
|
getConversationEventStore,
|
|
32
32
|
getConversationStore,
|
|
33
33
|
getSqlExecutor
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-46BUAC7H.js";
|
|
35
35
|
import {
|
|
36
36
|
juniorAgentBindings,
|
|
37
37
|
juniorAgentInvocations
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-RG6JSBDJ.js";
|
|
39
39
|
|
|
40
40
|
// src/chat/agent-invocations/work.ts
|
|
41
41
|
import { z } from "zod";
|