@sentry/junior 0.181.0 → 0.182.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-IQUW6ERD.js → agent-hooks-3S25UIHO.js} +11 -11
- package/dist/api.js +125 -51
- package/dist/app-adapter.d.ts +85 -0
- package/dist/app.d.ts +6 -1
- package/dist/app.js +343 -487
- package/dist/{catalog-runtime-PMQWNIXA.js → catalog-runtime-ESLMBQBV.js} +4 -4
- package/dist/chat/api-turns/adapter-conversations.d.ts +15 -0
- package/dist/chat/api-turns/stop.d.ts +12 -0
- package/dist/chat/api-turns/work.d.ts +9 -1
- package/dist/chat/app/conversation-work.d.ts +1 -1
- package/dist/chat/event-tasks/tool-support.d.ts +7 -1
- package/dist/chat/event-tasks/types.d.ts +1 -0
- package/dist/chat/experimental.d.ts +1 -1
- package/dist/chat/resource-events/catalog.d.ts +11 -1
- package/dist/chat/resource-events/store.d.ts +5 -1
- package/dist/chat/services/subscribed-decision.d.ts +2 -1
- package/dist/chat/tools/create-event-task.d.ts +3 -0
- package/dist/chat/tools/delete-event-task.d.ts +2 -0
- package/dist/chat/tools/list-event-tasks.d.ts +2 -0
- package/dist/chat/tools/list-resource-event-subscriptions.d.ts +2 -0
- package/dist/chat/tools/search-resource-event-types.d.ts +10 -0
- package/dist/chat/tools/update-event-task.d.ts +3 -0
- package/dist/chat/tools/watch-resource-events.d.ts +3 -0
- package/dist/{chunk-D6ZD7VXP.js → chunk-2CEOXDG2.js} +20 -11
- package/dist/{chunk-VRS6WDK5.js → chunk-2LYHWMR4.js} +1 -1
- package/dist/{chunk-IKKETMQC.js → chunk-3ENUMZNG.js} +3 -3
- package/dist/{chunk-IJ6SS4WB.js → chunk-3NFHI2NA.js} +1 -1
- package/dist/{chunk-GREV5PJK.js → chunk-3THPTNN6.js} +4 -4
- package/dist/{chunk-KKSVCHDO.js → chunk-44BQ3TSK.js} +1 -1
- package/dist/{chunk-4IX32NSL.js → chunk-4DZ62L36.js} +1 -1
- package/dist/{chunk-RNMASWLP.js → chunk-6TSWXBTQ.js} +3 -3
- package/dist/{chunk-PBKZQAUA.js → chunk-A7THOQ6N.js} +58 -32
- package/dist/{chunk-DSA6WTRP.js → chunk-BDDWVY32.js} +19 -19
- package/dist/{chunk-TJHSAHQN.js → chunk-BZD4ADQH.js} +3 -2
- package/dist/{chunk-EU7KJDOG.js → chunk-CVBIM4Z3.js} +1 -1
- package/dist/{chunk-LZOQFC5F.js → chunk-D6OHGAIO.js} +5 -5
- package/dist/{chunk-KQZX24QQ.js → chunk-DZR3L74W.js} +3 -3
- package/dist/{chunk-3KCQEG6W.js → chunk-GGYA5NPN.js} +9 -9
- package/dist/{chunk-EM7EECT5.js → chunk-JIOKUIAS.js} +2 -2
- package/dist/{chunk-3X55QRAG.js → chunk-KGMHUDVF.js} +6 -6
- package/dist/{chunk-3KSSALN4.js → chunk-LB4FWMCV.js} +92 -8
- package/dist/{chunk-XYTJUHRZ.js → chunk-LHQK5XCU.js} +2 -2
- package/dist/{chunk-LCNPXLE7.js → chunk-LT4QYGKM.js} +7 -7
- package/dist/{chunk-TDT2R77B.js → chunk-MJISSOWB.js} +1 -1
- package/dist/{chunk-FWILPBVQ.js → chunk-PQES5LB5.js} +5 -5
- package/dist/{chunk-GWFRPQNP.js → chunk-QHALFHZA.js} +9 -9
- package/dist/{chunk-PPYDHUEL.js → chunk-S35OZMSL.js} +130 -200
- package/dist/{chunk-ETJTXYHY.js → chunk-SVFSYQMT.js} +1 -1
- package/dist/{chunk-NQTA72Q3.js → chunk-SXOZIG5X.js} +6 -6
- package/dist/{chunk-Q2KY27IX.js → chunk-TEFNHMO2.js} +63 -7
- package/dist/{chunk-KMBU4PJP.js → chunk-UKIHNBBD.js} +3 -3
- package/dist/{chunk-EBMRB6Z6.js → chunk-UQP54CXZ.js} +1 -1
- package/dist/{chunk-GPA3ZSYY.js → chunk-UUMBHORH.js} +1 -1
- package/dist/{chunk-LG5MYY6U.js → chunk-V5UZCCNW.js} +6 -6
- package/dist/{chunk-HZHUMCNV.js → chunk-VHMAFMHB.js} +1 -1
- package/dist/{chunk-HEBMSITT.js → chunk-WOIALVN2.js} +1 -1
- package/dist/{chunk-HJ27A6YB.js → chunk-YHL2L2ZZ.js} +1 -1
- package/dist/{chunk-PL57B6NC.js → chunk-Z7ALSQS3.js} +1 -1
- package/dist/cli/chat.js +34 -34
- 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-QNPVCQPT.js → db-NYIWZ4L5.js} +6 -6
- package/dist/{experimental-SIJSRDJD.js → experimental-P5FZM4CU.js} +1 -1
- package/dist/instrumentation.js +3 -3
- package/dist/nitro.js +6 -6
- package/dist/{oauth-callback-server-KYMPJOTC.js → oauth-callback-server-A2YTPVVX.js} +26 -26
- package/dist/{runner-3RS2D2ZR.js → runner-VKAEU52J.js} +18 -18
- package/dist/{skills-5B3Y6XX6.js → skills-52GMXUTY.js} +5 -5
- package/dist/spawn-GSS4EBLR.js +37 -0
- package/dist/task-runner-DUGDWF5O.js +32 -0
- package/dist/{validation-Q65QD27B.js → validation-VD2YQX2W.js} +5 -5
- package/dist/version.js +1 -1
- package/dist/{work-DCMQWAAP.js → work-ZWBTGEQP.js} +18 -18
- package/dist/worker-XUWD5WS7.js +22 -0
- package/package.json +6 -5
- package/dist/api/acp/route.d.ts +0 -13
- package/dist/spawn-VYARS3DU.js +0 -37
- package/dist/task-runner-4IXKKZHL.js +0 -32
- package/dist/worker-QL3CHLZL.js +0 -22
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
PluginCredentialFailureError,
|
|
8
8
|
agentNameSchema,
|
|
9
9
|
createPluginAuthOrchestration
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KGMHUDVF.js";
|
|
11
11
|
import {
|
|
12
12
|
parseSandboxEgressAuthRequiredSignal,
|
|
13
13
|
parseSandboxEgressPermissionDeniedSignal,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
searchSlackUsers,
|
|
39
39
|
selectPluginGrant,
|
|
40
40
|
toMcpProviderError
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-GGYA5NPN.js";
|
|
42
42
|
import {
|
|
43
43
|
RetryableDeliveryError,
|
|
44
44
|
actorFromRun,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
getSlackMessagePermalink,
|
|
55
55
|
resolveBaseUrl,
|
|
56
56
|
uploadFilesToConversation
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-V5UZCCNW.js";
|
|
58
58
|
import {
|
|
59
59
|
SCHEDULED_TASK_SYSTEM_ACTOR,
|
|
60
60
|
compactEventTask,
|
|
@@ -80,21 +80,23 @@ import {
|
|
|
80
80
|
readScheduledTask,
|
|
81
81
|
registeredEventTaskTriggerSchema,
|
|
82
82
|
registeredEventTypeSchema,
|
|
83
|
+
registeredResourceEventMatchSchema,
|
|
83
84
|
registeredResourceTypeSchema,
|
|
84
85
|
requireEventTaskSlackContext,
|
|
85
86
|
requireSupportedEventTaskTrigger,
|
|
87
|
+
requireSupportedResourceEventMatch,
|
|
86
88
|
resourceEventGuidance,
|
|
87
89
|
saveEventTask,
|
|
88
90
|
saveScheduledTask,
|
|
89
91
|
storeAttachments,
|
|
90
92
|
writableEventTask
|
|
91
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-LB4FWMCV.js";
|
|
92
94
|
import {
|
|
93
95
|
parseSlackThreadId
|
|
94
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-MJISSOWB.js";
|
|
95
97
|
import {
|
|
96
98
|
appendAndEnqueueInboundMessage
|
|
97
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-TEFNHMO2.js";
|
|
98
100
|
import {
|
|
99
101
|
CooperativeTurnYieldError,
|
|
100
102
|
NO_REPLY_MARKER,
|
|
@@ -109,7 +111,7 @@ import {
|
|
|
109
111
|
isTurnInputCommitLostError,
|
|
110
112
|
isTurnInputDeferredError,
|
|
111
113
|
sanitizeAssistantText
|
|
112
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-YHL2L2ZZ.js";
|
|
113
115
|
import {
|
|
114
116
|
AGENTS_REMOVAL_NOTICE,
|
|
115
117
|
AGENTS_REPLACEMENT_NOTICE,
|
|
@@ -168,7 +170,7 @@ import {
|
|
|
168
170
|
stripRuntimeTurnContext,
|
|
169
171
|
trimTrailingAssistantMessages,
|
|
170
172
|
truncateText
|
|
171
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-SXOZIG5X.js";
|
|
172
174
|
import {
|
|
173
175
|
bindSandboxFileSystem,
|
|
174
176
|
createSandboxSession,
|
|
@@ -179,7 +181,7 @@ import {
|
|
|
179
181
|
resolve,
|
|
180
182
|
setSnapshotSpanAttributes,
|
|
181
183
|
stopSession
|
|
182
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-3ENUMZNG.js";
|
|
183
185
|
import {
|
|
184
186
|
privateTraceResultAttributes
|
|
185
187
|
} from "./chunk-UIE3R5XU.js";
|
|
@@ -192,7 +194,7 @@ import {
|
|
|
192
194
|
} from "./chunk-DKIJ2RP5.js";
|
|
193
195
|
import {
|
|
194
196
|
getTurnRequestDeadline
|
|
195
|
-
} from "./chunk-
|
|
197
|
+
} from "./chunk-UUMBHORH.js";
|
|
196
198
|
import {
|
|
197
199
|
RESOURCE_SUBSCRIPTION_DEFAULT_TTL_MS,
|
|
198
200
|
RESOURCE_SUBSCRIPTION_MAX_TTL_MS,
|
|
@@ -242,7 +244,7 @@ import {
|
|
|
242
244
|
updateWorkspace,
|
|
243
245
|
withSlackRetries,
|
|
244
246
|
workspaceRepoCheckoutPath
|
|
245
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-2CEOXDG2.js";
|
|
246
248
|
import {
|
|
247
249
|
KNOWN_CONVERSATION_EVENT_TYPES,
|
|
248
250
|
contextProvenance,
|
|
@@ -256,12 +258,12 @@ import {
|
|
|
256
258
|
instructionProvenanceFor,
|
|
257
259
|
requireSlackDestination,
|
|
258
260
|
sameActorIdentity
|
|
259
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-6TSWXBTQ.js";
|
|
260
262
|
import {
|
|
261
263
|
juniorArtifacts,
|
|
262
264
|
juniorIdentities,
|
|
263
265
|
juniorSchedulerRuns
|
|
264
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-44BQ3TSK.js";
|
|
265
267
|
import {
|
|
266
268
|
SANDBOX_DATA_ROOT,
|
|
267
269
|
SANDBOX_REPOS_ROOT,
|
|
@@ -288,12 +290,12 @@ import {
|
|
|
288
290
|
sleep,
|
|
289
291
|
throwSandboxOperationError,
|
|
290
292
|
wrapSandboxSetupError
|
|
291
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-UKIHNBBD.js";
|
|
292
294
|
import {
|
|
293
295
|
fenceLock,
|
|
294
296
|
getStateAdapter,
|
|
295
297
|
withLock
|
|
296
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-Z7ALSQS3.js";
|
|
297
299
|
import {
|
|
298
300
|
ACTIVE_TURN_COMPACTION_SUMMARY_PREFIX,
|
|
299
301
|
COMPACTION_SUMMARY_PREFIX,
|
|
@@ -324,7 +326,7 @@ import {
|
|
|
324
326
|
resolveGatewayCredential,
|
|
325
327
|
resolveGatewayModel,
|
|
326
328
|
unwrapCurrentInstruction
|
|
327
|
-
} from "./chunk-
|
|
329
|
+
} from "./chunk-LHQK5XCU.js";
|
|
328
330
|
import {
|
|
329
331
|
canExposeConversationPayload,
|
|
330
332
|
resolveConversationPrivacy,
|
|
@@ -334,16 +336,16 @@ import {
|
|
|
334
336
|
toGenAiMessagesTraceAttributes,
|
|
335
337
|
toGenAiPayloadMetadata,
|
|
336
338
|
toGenAiPayloadTraceAttributes
|
|
337
|
-
} from "./chunk-
|
|
339
|
+
} from "./chunk-SVFSYQMT.js";
|
|
338
340
|
import {
|
|
339
341
|
discoverSkills,
|
|
340
342
|
findSkillByName,
|
|
341
343
|
loadSkillsByName,
|
|
342
344
|
parseSkillInvocation
|
|
343
|
-
} from "./chunk-
|
|
345
|
+
} from "./chunk-JIOKUIAS.js";
|
|
344
346
|
import {
|
|
345
347
|
pluginCatalogRuntime
|
|
346
|
-
} from "./chunk-
|
|
348
|
+
} from "./chunk-WOIALVN2.js";
|
|
347
349
|
import {
|
|
348
350
|
CredentialUnavailableError,
|
|
349
351
|
OAuthProviderError,
|
|
@@ -351,7 +353,7 @@ import {
|
|
|
351
353
|
getOAuthProviderErrorAttributes,
|
|
352
354
|
resolveAuthTokenPlaceholder,
|
|
353
355
|
resolvePluginCommandEnv
|
|
354
|
-
} from "./chunk-
|
|
356
|
+
} from "./chunk-4DZ62L36.js";
|
|
355
357
|
import {
|
|
356
358
|
credentialContextForActor,
|
|
357
359
|
credentialUserSubjectId
|
|
@@ -391,7 +393,7 @@ import {
|
|
|
391
393
|
summarizeMessageText,
|
|
392
394
|
withLogContext,
|
|
393
395
|
withSpan
|
|
394
|
-
} from "./chunk-
|
|
396
|
+
} from "./chunk-UQP54CXZ.js";
|
|
395
397
|
import {
|
|
396
398
|
startInactiveSpan,
|
|
397
399
|
withActiveSpan
|
|
@@ -1366,6 +1368,7 @@ async function ingestResourceEvent(input, options) {
|
|
|
1366
1368
|
const event = resourceEventSchema.parse(input);
|
|
1367
1369
|
const nowMs = options.nowMs ?? Date.now();
|
|
1368
1370
|
const subscriptions = await findMatchingResourceEventSubscriptions({
|
|
1371
|
+
data: event.data,
|
|
1369
1372
|
eventType: event.eventType,
|
|
1370
1373
|
nowMs,
|
|
1371
1374
|
namespace: event.namespace,
|
|
@@ -1379,6 +1382,7 @@ async function ingestResourceEvent(input, options) {
|
|
|
1379
1382
|
for (const subscription of subscriptions) {
|
|
1380
1383
|
try {
|
|
1381
1384
|
const delivered = await deliverResourceEventSubscription({
|
|
1385
|
+
data: event.data,
|
|
1382
1386
|
eventType: event.eventType,
|
|
1383
1387
|
namespace: event.namespace,
|
|
1384
1388
|
identifier: event.identifier,
|
|
@@ -2749,7 +2753,7 @@ function buildOutputSection(platform) {
|
|
|
2749
2753
|
return [
|
|
2750
2754
|
`<output format="markdown">`,
|
|
2751
2755
|
"- Start with the answer or result, not internal process narration.",
|
|
2752
|
-
"- Use concise Markdown suitable for terminal output: short paragraphs, bullets, links,
|
|
2756
|
+
"- Use concise Markdown suitable for terminal and web output: short paragraphs, bullets, links, fenced code blocks, and GFM tables when a grid is clearer than bullets.",
|
|
2753
2757
|
"- End every turn with a final user-facing response.",
|
|
2754
2758
|
"</output>"
|
|
2755
2759
|
].join("\n");
|
|
@@ -9325,6 +9329,7 @@ var listedResourceWatchSchema = z19.object({
|
|
|
9325
9329
|
namespace: z19.string().min(1),
|
|
9326
9330
|
resourceType: z19.string().min(1),
|
|
9327
9331
|
events: z19.array(z19.string().min(1)).min(1),
|
|
9332
|
+
match: z19.record(z19.string(), z19.unknown()).optional(),
|
|
9328
9333
|
intent: z19.string().min(1),
|
|
9329
9334
|
expiresAtMs: z19.number().finite()
|
|
9330
9335
|
}).strict();
|
|
@@ -9356,6 +9361,7 @@ function createListResourceEventSubscriptionsTool(context) {
|
|
|
9356
9361
|
namespace: subscription.namespace,
|
|
9357
9362
|
resourceType: subscription.resourceType,
|
|
9358
9363
|
events: subscription.events,
|
|
9364
|
+
...subscription.match ? { match: subscription.match } : void 0,
|
|
9359
9365
|
intent: subscription.intent,
|
|
9360
9366
|
expiresAtMs: subscription.expiresAtMs
|
|
9361
9367
|
}))
|
|
@@ -9375,7 +9381,15 @@ var searchedResourceTypeSchema = z20.object({
|
|
|
9375
9381
|
namespace: z20.string(),
|
|
9376
9382
|
type: z20.string(),
|
|
9377
9383
|
supportedEvents: z20.array(z20.string()),
|
|
9378
|
-
suggestedEvents: z20.array(z20.string()).optional()
|
|
9384
|
+
suggestedEvents: z20.array(z20.string()).optional(),
|
|
9385
|
+
matchFields: z20.record(
|
|
9386
|
+
z20.string(),
|
|
9387
|
+
z20.object({
|
|
9388
|
+
kind: z20.enum(["boolean", "string", "number"]),
|
|
9389
|
+
description: z20.string(),
|
|
9390
|
+
enum: z20.array(z20.string()).optional()
|
|
9391
|
+
}).strict()
|
|
9392
|
+
).optional()
|
|
9379
9393
|
}).strict();
|
|
9380
9394
|
var outputSchema2 = juniorToolOutputSchema.extend({
|
|
9381
9395
|
query: z20.string().nullable(),
|
|
@@ -9392,7 +9406,8 @@ function searchableResourceTypes(catalog) {
|
|
|
9392
9406
|
namespace,
|
|
9393
9407
|
type: resourceType.type,
|
|
9394
9408
|
supportedEvents: [...resourceType.supportedEvents].sort(),
|
|
9395
|
-
...resourceType.suggestedEvents ? { suggestedEvents: [...resourceType.suggestedEvents].sort() } : void 0
|
|
9409
|
+
...resourceType.suggestedEvents ? { suggestedEvents: [...resourceType.suggestedEvents].sort() } : void 0,
|
|
9410
|
+
...resourceType.matchFields ? { matchFields: resourceType.matchFields } : void 0
|
|
9396
9411
|
}))
|
|
9397
9412
|
).sort(
|
|
9398
9413
|
(left, right) => left.namespace.localeCompare(right.namespace) || left.type.localeCompare(right.type)
|
|
@@ -9426,7 +9441,8 @@ function createSearchResourceEventTypesTool(catalog) {
|
|
|
9426
9441
|
resourceType.namespace,
|
|
9427
9442
|
resourceType.type,
|
|
9428
9443
|
...resourceType.supportedEvents,
|
|
9429
|
-
...resourceType.suggestedEvents ?? []
|
|
9444
|
+
...resourceType.suggestedEvents ?? [],
|
|
9445
|
+
...Object.keys(resourceType.matchFields ?? {})
|
|
9430
9446
|
].join(" ")
|
|
9431
9447
|
);
|
|
9432
9448
|
return terms2.every((term) => text.includes(term));
|
|
@@ -9516,6 +9532,7 @@ function inputSchema(catalog) {
|
|
|
9516
9532
|
events: z22.array(registeredEventTypeSchema(catalog)).min(1).describe(
|
|
9517
9533
|
"High-signal event names to deliver to this conversation when they occur."
|
|
9518
9534
|
),
|
|
9535
|
+
match: registeredResourceEventMatchSchema(),
|
|
9519
9536
|
intent: z22.string().trim().min(1).max(4e3).describe(
|
|
9520
9537
|
"Concise reason this conversation wants these events, used when an event arrives."
|
|
9521
9538
|
),
|
|
@@ -9551,6 +9568,7 @@ var resultDataSchema3 = z22.object({
|
|
|
9551
9568
|
subscription_status: z22.enum(["active", "cancelled", "completed"]),
|
|
9552
9569
|
identifier: z22.string().min(1),
|
|
9553
9570
|
events: z22.array(z22.string().min(1)).min(1),
|
|
9571
|
+
match: z22.record(z22.string(), z22.unknown()).optional(),
|
|
9554
9572
|
expiresAtMs: z22.number().finite(),
|
|
9555
9573
|
stop_watching: stopWatchingActionSchema
|
|
9556
9574
|
}).strict();
|
|
@@ -9596,6 +9614,11 @@ function createWatchResourceEventsTool(context, catalog) {
|
|
|
9596
9614
|
}
|
|
9597
9615
|
const intent = input.intent.trim();
|
|
9598
9616
|
if (!intent) throw new ToolInputError("intent is required");
|
|
9617
|
+
const match = requireSupportedResourceEventMatch(catalog, {
|
|
9618
|
+
match: input.match,
|
|
9619
|
+
namespace: input.namespace,
|
|
9620
|
+
resourceType: input.resourceType
|
|
9621
|
+
});
|
|
9599
9622
|
const nowMs = Date.now();
|
|
9600
9623
|
const subscription = await createResourceEventSubscription({
|
|
9601
9624
|
conversationId,
|
|
@@ -9604,6 +9627,7 @@ function createWatchResourceEventsTool(context, catalog) {
|
|
|
9604
9627
|
expiresAtMs: nowMs + ttlMs(input),
|
|
9605
9628
|
intent,
|
|
9606
9629
|
label: input.label.trim(),
|
|
9630
|
+
...match ? { match } : void 0,
|
|
9607
9631
|
namespace: input.namespace.trim(),
|
|
9608
9632
|
identifier: normalizeEventIdentifier(
|
|
9609
9633
|
catalog,
|
|
@@ -9617,6 +9641,7 @@ function createWatchResourceEventsTool(context, catalog) {
|
|
|
9617
9641
|
subscription_status: subscription.status,
|
|
9618
9642
|
identifier: subscription.identifier,
|
|
9619
9643
|
events: subscription.events,
|
|
9644
|
+
...subscription.match ? { match: subscription.match } : void 0,
|
|
9620
9645
|
expiresAtMs: subscription.expiresAtMs,
|
|
9621
9646
|
stop_watching: {
|
|
9622
9647
|
execution_tool: "executeTool",
|
|
@@ -9706,7 +9731,7 @@ function createEventTaskTool(context, catalog) {
|
|
|
9706
9731
|
outputSchema: eventTaskToolResultSchema,
|
|
9707
9732
|
async execute(input, options) {
|
|
9708
9733
|
const { actor, destination, source } = requireEventTaskSlackContext(context);
|
|
9709
|
-
requireSupportedEventTaskTrigger(catalog, input.trigger);
|
|
9734
|
+
const match = requireSupportedEventTaskTrigger(catalog, input.trigger);
|
|
9710
9735
|
const id = buildEventTaskId({
|
|
9711
9736
|
channelId: destination.channelId,
|
|
9712
9737
|
teamId: destination.teamId,
|
|
@@ -9748,7 +9773,8 @@ function createEventTaskTool(context, catalog) {
|
|
|
9748
9773
|
),
|
|
9749
9774
|
resourceType: input.trigger.resourceType,
|
|
9750
9775
|
label: input.trigger.label,
|
|
9751
|
-
events: [...new Set(input.trigger.events)]
|
|
9776
|
+
events: [...new Set(input.trigger.events)],
|
|
9777
|
+
...match ? { match } : void 0
|
|
9752
9778
|
}
|
|
9753
9779
|
};
|
|
9754
9780
|
return eventTaskSuccess(await createEventTask(db, task), catalog);
|
|
@@ -9811,11 +9837,12 @@ function createListEventTasksTool(context, catalog) {
|
|
|
9811
9837
|
}
|
|
9812
9838
|
|
|
9813
9839
|
// src/chat/tools/update-event-task.ts
|
|
9840
|
+
import { stableResourceEventMatchKey } from "@sentry/junior-plugin-api";
|
|
9814
9841
|
import { z as z26 } from "zod";
|
|
9815
9842
|
function changesEventTaskTrigger(current, next) {
|
|
9816
9843
|
const currentEvents = [...current.events].sort();
|
|
9817
9844
|
const nextEvents = [...next.events].sort();
|
|
9818
|
-
return current.namespace !== next.namespace || current.identifier !== next.identifier || currentEvents.length !== nextEvents.length || currentEvents.some((event, index) => event !== nextEvents[index]);
|
|
9845
|
+
return current.namespace !== next.namespace || current.identifier !== next.identifier || currentEvents.length !== nextEvents.length || currentEvents.some((event, index) => event !== nextEvents[index]) || stableResourceEventMatchKey(current.match) !== stableResourceEventMatchKey(next.match);
|
|
9819
9846
|
}
|
|
9820
9847
|
function createUpdateEventTaskTool(context, catalog) {
|
|
9821
9848
|
return zodTool({
|
|
@@ -9849,9 +9876,7 @@ function createUpdateEventTaskTool(context, catalog) {
|
|
|
9849
9876
|
outputSchema: eventTaskToolResultSchema,
|
|
9850
9877
|
async execute(input) {
|
|
9851
9878
|
const current = await writableEventTask(context, input.taskId);
|
|
9852
|
-
|
|
9853
|
-
requireSupportedEventTaskTrigger(catalog, input.trigger);
|
|
9854
|
-
}
|
|
9879
|
+
const match = input.trigger ? requireSupportedEventTaskTrigger(catalog, input.trigger) : void 0;
|
|
9855
9880
|
const { actor } = requireEventTaskSlackContext(context);
|
|
9856
9881
|
const isCreator = actor.userId === current.createdBy.slackUserId;
|
|
9857
9882
|
if (input.credentialMode === "creator" && !isCreator) {
|
|
@@ -9871,7 +9896,8 @@ function createUpdateEventTaskTool(context, catalog) {
|
|
|
9871
9896
|
),
|
|
9872
9897
|
resourceType: input.trigger.resourceType,
|
|
9873
9898
|
label: input.trigger.label,
|
|
9874
|
-
events: [...new Set(input.trigger.events)]
|
|
9899
|
+
events: [...new Set(input.trigger.events)],
|
|
9900
|
+
...match ? { match } : void 0
|
|
9875
9901
|
} : current.trigger;
|
|
9876
9902
|
const nextInstruction = input.task != null ? input.task : current.task.text;
|
|
9877
9903
|
const instructionChanged = nextInstruction !== current.task.text;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
buildSentryConversationUrl,
|
|
6
6
|
deleteWebAuthorization
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CVBIM4Z3.js";
|
|
8
8
|
import {
|
|
9
9
|
buildDeliveredTurnStatePatch,
|
|
10
10
|
finalizeFailedTurnReplyWithEvent,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
getTurnUserSlackMessageTs,
|
|
16
16
|
persistAuthPauseTurnState,
|
|
17
17
|
requireTurnFailureEventId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-D6OHGAIO.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveTurnSessionRouting,
|
|
21
21
|
scheduleSessionCompletedPluginTasks
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-QHALFHZA.js";
|
|
23
23
|
import {
|
|
24
24
|
ConversationTurnLifecycleService
|
|
25
25
|
} from "./chunk-M3QYTBQ6.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getPersistedSandboxState,
|
|
31
31
|
getPersistedThreadState,
|
|
32
32
|
persistThreadStateById
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PQES5LB5.js";
|
|
34
34
|
import {
|
|
35
35
|
createUserTokenStore,
|
|
36
36
|
deleteMcpAuthSession,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
lookupSlackUserProfile,
|
|
42
42
|
resolvePluginOAuthAccount,
|
|
43
43
|
runAgentWithTimeout
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-GGYA5NPN.js";
|
|
45
45
|
import {
|
|
46
46
|
RetryableDeliveryError
|
|
47
47
|
} from "./chunk-RF6J3DIO.js";
|
|
@@ -57,17 +57,17 @@ import {
|
|
|
57
57
|
removeReactionFromMessage,
|
|
58
58
|
resolveBaseUrl,
|
|
59
59
|
truncateStatusText
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-V5UZCCNW.js";
|
|
61
61
|
import {
|
|
62
62
|
parseSlackThreadId,
|
|
63
63
|
readSlackRawMessageContext,
|
|
64
64
|
resolveSlackChannelIdFromMessage,
|
|
65
65
|
resolveSlackChannelIdFromThreadId
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-MJISSOWB.js";
|
|
67
67
|
import {
|
|
68
68
|
ensureConversationWake,
|
|
69
69
|
requestConversationWork
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-TEFNHMO2.js";
|
|
71
71
|
import {
|
|
72
72
|
CooperativeTurnYieldError,
|
|
73
73
|
clearPendingAuth,
|
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
isCooperativeTurnYieldError,
|
|
77
77
|
isPendingAuthLatestRequest,
|
|
78
78
|
markTurnFailed
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-YHL2L2ZZ.js";
|
|
80
80
|
import {
|
|
81
81
|
TurnSliceLimitExceededError,
|
|
82
82
|
abandonTurnRecord,
|
|
@@ -96,13 +96,13 @@ import {
|
|
|
96
96
|
recordTurnSummary,
|
|
97
97
|
saveTurnCheckpoint,
|
|
98
98
|
turnHasReply
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-SXOZIG5X.js";
|
|
100
100
|
import {
|
|
101
101
|
getVercelConversationWorkQueue
|
|
102
102
|
} from "./chunk-DKIJ2RP5.js";
|
|
103
103
|
import {
|
|
104
104
|
getTurnRequestDeadline
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-UUMBHORH.js";
|
|
106
106
|
import {
|
|
107
107
|
SlackActionError,
|
|
108
108
|
getDashboardConversationLink,
|
|
@@ -111,18 +111,18 @@ import {
|
|
|
111
111
|
getSlackClient,
|
|
112
112
|
isDmChannel,
|
|
113
113
|
normalizeSlackConversationId
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-2CEOXDG2.js";
|
|
115
115
|
import {
|
|
116
116
|
getConversationEventStore,
|
|
117
117
|
getSqlExecutor,
|
|
118
118
|
requireSlackDestination,
|
|
119
119
|
upsertIdentity,
|
|
120
120
|
upsertLinkedIdentity
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-6TSWXBTQ.js";
|
|
122
122
|
import {
|
|
123
123
|
acquireActiveLock,
|
|
124
124
|
getStateAdapter
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-Z7ALSQS3.js";
|
|
126
126
|
import {
|
|
127
127
|
botConfig,
|
|
128
128
|
defaultModelId,
|
|
@@ -130,18 +130,18 @@ import {
|
|
|
130
130
|
getChatConfig,
|
|
131
131
|
getRuntimeMetadata,
|
|
132
132
|
normalizeSlackEmojiName
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-LHQK5XCU.js";
|
|
134
134
|
import {
|
|
135
135
|
discoverSkills
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-JIOKUIAS.js";
|
|
137
137
|
import {
|
|
138
138
|
pluginCatalogRuntime
|
|
139
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-WOIALVN2.js";
|
|
140
140
|
import {
|
|
141
141
|
buildOAuthTokenRequest,
|
|
142
142
|
hasRequiredOAuthScope,
|
|
143
143
|
parseOAuthTokenResponse
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-4DZ62L36.js";
|
|
145
145
|
import {
|
|
146
146
|
createSlackResumeActor,
|
|
147
147
|
isUserActor,
|
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
setTags,
|
|
161
161
|
toOptionalString,
|
|
162
162
|
withLogContext
|
|
163
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-UQP54CXZ.js";
|
|
164
164
|
|
|
165
165
|
// src/chat/slack/assistant-thread/status-render.ts
|
|
166
166
|
var DEFAULT_STATUS_CONTEXTS = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@sentry/junior",
|
|
4
|
-
version: "0.
|
|
4
|
+
version: "0.182.0",
|
|
5
5
|
private: false,
|
|
6
6
|
publishConfig: {
|
|
7
7
|
access: "public"
|
|
@@ -69,7 +69,6 @@ var package_default = {
|
|
|
69
69
|
"test:coverage": "vitest run --maxWorkers=4 --coverage --reporter=default --reporter=junit --outputFile.junit=coverage/results.junit.xml"
|
|
70
70
|
},
|
|
71
71
|
dependencies: {
|
|
72
|
-
"@agentclientprotocol/sdk": "1.3.0",
|
|
73
72
|
"@ai-sdk/gateway": "^3.0.119",
|
|
74
73
|
"@chat-adapter/slack": "4.29.0",
|
|
75
74
|
"@chat-adapter/state-memory": "4.29.0",
|
|
@@ -105,11 +104,13 @@ var package_default = {
|
|
|
105
104
|
zod: "catalog:"
|
|
106
105
|
},
|
|
107
106
|
devDependencies: {
|
|
107
|
+
"@agentclientprotocol/sdk": "1.3.0",
|
|
108
108
|
"@emnapi/core": "^1.10.0",
|
|
109
109
|
"@emnapi/runtime": "^1.10.0",
|
|
110
110
|
"@hono/node-server": "1.19.14",
|
|
111
111
|
"@oxlint/plugins": "1.79.0",
|
|
112
112
|
"@sentry/junior-github": "workspace:*",
|
|
113
|
+
"@sentry/junior-acp": "workspace:*",
|
|
113
114
|
"@sentry/junior-memory": "workspace:*",
|
|
114
115
|
"@sentry/junior-testing": "workspace:*",
|
|
115
116
|
"@types/node": "^25.9.1",
|
|
@@ -2,29 +2,29 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PQES5LB5.js";
|
|
6
6
|
import {
|
|
7
7
|
buildDeterministicTurnId,
|
|
8
8
|
clearPendingAuth,
|
|
9
9
|
markTurnClosed,
|
|
10
10
|
markTurnCompleted
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YHL2L2ZZ.js";
|
|
12
12
|
import {
|
|
13
13
|
hydrateConversationMessages,
|
|
14
14
|
markConversationMessage
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SXOZIG5X.js";
|
|
16
16
|
import {
|
|
17
17
|
ProviderError,
|
|
18
18
|
findProviderError,
|
|
19
19
|
getProviderErrorAttributes,
|
|
20
20
|
getProviderErrorUserMessage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LHQK5XCU.js";
|
|
22
22
|
import {
|
|
23
23
|
parseSlackMessageTs
|
|
24
24
|
} from "./chunk-N7TMSOZH.js";
|
|
25
25
|
import {
|
|
26
26
|
buildTurnFailureResponse
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-UQP54CXZ.js";
|
|
28
28
|
|
|
29
29
|
// src/chat/runtime/delivered-turn-state.ts
|
|
30
30
|
function buildDeliveredTurnStatePatch(args) {
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-7H2VZTWN.js";
|
|
7
7
|
import {
|
|
8
8
|
runWithTurnRequestDeadline
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UUMBHORH.js";
|
|
10
10
|
import {
|
|
11
11
|
logWarn
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UQP54CXZ.js";
|
|
13
13
|
|
|
14
14
|
// src/chat/plugins/task-queue.ts
|
|
15
15
|
import { createHash } from "crypto";
|
|
@@ -129,7 +129,7 @@ function pluginTaskCallback() {
|
|
|
129
129
|
onRejected: logPluginTaskQueueMessageRejected,
|
|
130
130
|
// Load the runner on first use so this module can send without a cycle.
|
|
131
131
|
run: async (message) => {
|
|
132
|
-
const { processPluginTask } = await import("./task-runner-
|
|
132
|
+
const { processPluginTask } = await import("./task-runner-DUGDWF5O.js");
|
|
133
133
|
await processPluginTask(message);
|
|
134
134
|
},
|
|
135
135
|
topic: PLUGIN_TASK_QUEUE_TOPIC,
|
|
@@ -3,36 +3,36 @@ import {
|
|
|
3
3
|
} from "./chunk-RF6J3DIO.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveBaseUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-V5UZCCNW.js";
|
|
7
7
|
import {
|
|
8
8
|
isExperimentalFeatureEnabled
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2LYHWMR4.js";
|
|
10
10
|
import {
|
|
11
11
|
createPluginLogger,
|
|
12
12
|
getPlugins,
|
|
13
13
|
getSlackClient,
|
|
14
14
|
withSlackRetries
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2CEOXDG2.js";
|
|
16
16
|
import {
|
|
17
17
|
getDb,
|
|
18
18
|
parseDestination
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6TSWXBTQ.js";
|
|
20
20
|
import {
|
|
21
21
|
sleep
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UKIHNBBD.js";
|
|
23
23
|
import {
|
|
24
24
|
acquireActiveLock,
|
|
25
25
|
getStateAdapter
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Z7ALSQS3.js";
|
|
27
27
|
import {
|
|
28
28
|
pluginCatalogRuntime
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WOIALVN2.js";
|
|
30
30
|
import {
|
|
31
31
|
fetchWithBoundedOAuthErrorBodies
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4DZ62L36.js";
|
|
33
33
|
import {
|
|
34
34
|
isRecord
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-UQP54CXZ.js";
|
|
36
36
|
|
|
37
37
|
// src/chat/capabilities/router.ts
|
|
38
38
|
var ProviderCredentialRouter = class {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WOIALVN2.js";
|
|
4
4
|
import {
|
|
5
5
|
skillRoots
|
|
6
6
|
} from "./chunk-TXKUKMVO.js";
|
|
7
7
|
import {
|
|
8
8
|
logWarn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UQP54CXZ.js";
|
|
10
10
|
|
|
11
11
|
// src/chat/skills.ts
|
|
12
12
|
import fs from "fs/promises";
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
formatProviderLabel,
|
|
9
9
|
startOAuthFlow
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-V5UZCCNW.js";
|
|
11
11
|
import {
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YHL2L2ZZ.js";
|
|
15
15
|
import {
|
|
16
16
|
recordAuthorizationRequested
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SXOZIG5X.js";
|
|
18
18
|
import {
|
|
19
19
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-44BQ3TSK.js";
|
|
21
21
|
import {
|
|
22
22
|
TURN_REASONING_LEVELS
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LHQK5XCU.js";
|
|
24
24
|
import {
|
|
25
25
|
pluginCatalogRuntime
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WOIALVN2.js";
|
|
27
27
|
import {
|
|
28
28
|
credentialContextSchema
|
|
29
29
|
} from "./chunk-CEMMLV5L.js";
|