@sentry/junior 0.179.0 → 0.180.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.
Files changed (126) hide show
  1. package/dist/{agent-hooks-32IDCLMW.js → agent-hooks-DKDDRKZA.js} +16 -18
  2. package/dist/api/schema.js +0 -1
  3. package/dist/api.js +199 -197
  4. package/dist/app.d.ts +4 -0
  5. package/dist/app.js +300 -1259
  6. package/dist/catalog-runtime-WXKGUF3W.js +14 -0
  7. package/dist/chat/agent/sandbox.d.ts +0 -2
  8. package/dist/chat/api-turns/routing.d.ts +4 -0
  9. package/dist/chat/api-turns/work.d.ts +5 -0
  10. package/dist/chat/config.d.ts +5 -2
  11. package/dist/chat/configuration/defaults.d.ts +1 -1
  12. package/dist/chat/conversations/projection.d.ts +6 -4
  13. package/dist/chat/ingress/message-router.d.ts +3 -0
  14. package/dist/chat/model-profile.d.ts +8 -10
  15. package/dist/chat/pi/conversation-events.d.ts +3 -2
  16. package/dist/chat/plugins/task-queue.d.ts +40 -3
  17. package/dist/chat/plugins/task-runner.d.ts +1 -1
  18. package/dist/chat/queue/callback.d.ts +26 -0
  19. package/dist/chat/queue/sign.d.ts +30 -0
  20. package/dist/chat/sandbox/sandbox.d.ts +0 -2
  21. package/dist/chat/sandbox/session.d.ts +0 -2
  22. package/dist/chat/sandbox/skill-sync.d.ts +1 -1
  23. package/dist/chat/sandbox/snapshot/events.d.ts +23 -0
  24. package/dist/chat/sandbox/snapshot/job-callback.d.ts +5 -0
  25. package/dist/chat/sandbox/snapshot/job-queue.d.ts +26 -0
  26. package/dist/chat/sandbox/snapshot/job-runner.d.ts +11 -0
  27. package/dist/chat/sandbox/snapshot/not-ready-error.d.ts +6 -0
  28. package/dist/chat/sandbox/snapshot/workspace.d.ts +9 -3
  29. package/dist/chat/services/turn-router.d.ts +4 -3
  30. package/dist/chat/task-execution/queue-signing.d.ts +10 -21
  31. package/dist/chat/task-execution/state.d.ts +48 -0
  32. package/dist/chat/task-execution/store.d.ts +28 -2
  33. package/dist/chat/task-execution/worker.d.ts +4 -1
  34. package/dist/chat/tools/handoff/tool.d.ts +1 -1
  35. package/dist/{chunk-B6ECUSVX.js → chunk-2AYEVN7K.js} +8 -8
  36. package/dist/{chunk-SLGGOASN.js → chunk-2YIRH4E3.js} +46 -46
  37. package/dist/{chunk-KJLHIHFF.js → chunk-3ILJBWP7.js} +35 -227
  38. package/dist/{chunk-RZRYOLCE.js → chunk-5PUMIMNQ.js} +2292 -1147
  39. package/dist/{chunk-CJLBLELR.js → chunk-5TUR4M3M.js} +8 -61
  40. package/dist/{chunk-6ZWRNC4D.js → chunk-6Y5B5PEX.js} +1 -1
  41. package/dist/{chunk-XSPSCWLH.js → chunk-6YCEWOLO.js} +4 -4
  42. package/dist/chunk-7H2VZTWN.js +103 -0
  43. package/dist/{chunk-FAS6AIMF.js → chunk-CCDXTDSY.js} +8 -8
  44. package/dist/{chunk-CGA4ERJ5.js → chunk-CEMMLV5L.js} +1 -1
  45. package/dist/{chunk-XZY6G5YZ.js → chunk-CK6EINVZ.js} +180 -87
  46. package/dist/{chunk-FIANEE7Z.js → chunk-CM5HNV2W.js} +6 -6
  47. package/dist/{chunk-JT4WMD3C.js → chunk-CP73FKME.js} +144 -218
  48. package/dist/{chunk-3I7XE3PA.js → chunk-DHLOGWYH.js} +36 -36
  49. package/dist/chunk-DKIJ2RP5.js +68 -0
  50. package/dist/{chunk-YFNAMRGE.js → chunk-DRHEGXTZ.js} +1 -1
  51. package/dist/{chunk-OOUNJNMR.js → chunk-DWPN6SCH.js} +1 -1
  52. package/dist/chunk-EWHP2IRG.js +209 -0
  53. package/dist/{chunk-R6U7N4FS.js → chunk-FGC3PHNH.js} +3 -3
  54. package/dist/{chunk-3TM3FYLQ.js → chunk-GA5NS74S.js} +1 -1
  55. package/dist/{chunk-FIDMHAO6.js → chunk-GPXAHUQH.js} +84 -274
  56. package/dist/chunk-GUKXEPMX.js +218 -0
  57. package/dist/{chunk-GENV6KF2.js → chunk-I6IFTAPF.js} +108 -76
  58. package/dist/{chunk-R5NWWYIS.js → chunk-IANUX7HX.js} +5 -5
  59. package/dist/{chunk-G2CAC4CV.js → chunk-KCL6AWYW.js} +74 -68
  60. package/dist/{chunk-5IRROPA5.js → chunk-L7LTGN4Z.js} +129 -31
  61. package/dist/{chunk-Q5B3WTGG.js → chunk-LGVQLNLS.js} +42 -41
  62. package/dist/chunk-M3QYTBQ6.js +55 -0
  63. package/dist/{chunk-FTGD2FBP.js → chunk-MXEUIGHO.js} +2 -2
  64. package/dist/{chunk-M63DETLL.js → chunk-N7TMSOZH.js} +6 -6
  65. package/dist/{chunk-2HIPYNQI.js → chunk-O4QYZTDK.js} +33 -32
  66. package/dist/chunk-PEQXYSSE.js +45 -0
  67. package/dist/{chunk-RTRBYSF3.js → chunk-QSO7B5JO.js} +1 -1
  68. package/dist/{chunk-HQNE5APD.js → chunk-RAZG3YHC.js} +100 -79
  69. package/dist/{chunk-VP4OVRDD.js → chunk-S7YRTOSQ.js} +69 -73
  70. package/dist/{chunk-U4TKB6F6.js → chunk-SDBKZ5LV.js} +108 -5
  71. package/dist/{chunk-GPLAT6H7.js → chunk-TC5DE5KJ.js} +22 -18
  72. package/dist/{chunk-H4HBKISO.js → chunk-TXKUKMVO.js} +1 -1
  73. package/dist/chunk-U5EUCUBH.js +164 -0
  74. package/dist/{chunk-3AFVR5UC.js → chunk-VG722ONZ.js} +18 -16
  75. package/dist/{chunk-ZQMG3CL5.js → chunk-VGPPWWHF.js} +16 -16
  76. package/dist/{chunk-JMJNFEDC.js → chunk-WVAMRKYG.js} +9 -54
  77. package/dist/chunk-X6GDDWQH.js +60 -0
  78. package/dist/{chunk-4GWXAILB.js → chunk-ZE2KOV3G.js} +1 -1
  79. package/dist/{chunk-TIEKUH4Q.js → chunk-ZM7ZURJS.js} +4 -3
  80. package/dist/cli/chat.js +47 -43
  81. package/dist/cli/check.js +13 -15
  82. package/dist/cli/env.js +0 -1
  83. package/dist/cli/init.js +0 -1
  84. package/dist/cli/main.js +2 -3
  85. package/dist/cli/plugins.js +18 -20
  86. package/dist/cli/run.js +0 -1
  87. package/dist/cli/snapshot-create.js +14 -16
  88. package/dist/cli/upgrade.js +16 -18
  89. package/dist/{conversation-work-KATFHLG3.js → conversation-work-VIOQ5ZF3.js} +0 -2
  90. package/dist/{db-EJAV7JL6.js → db-6SBHIAJK.js} +8 -10
  91. package/dist/deployment.d.ts +1 -0
  92. package/dist/{discovery-GUFTFBTL.js → discovery-DWVDM7UK.js} +1 -2
  93. package/dist/{experimental-XVDOSRBS.js → experimental-SIJSRDJD.js} +0 -1
  94. package/dist/instrumentation.js +7 -9
  95. package/dist/nitro.js +39 -13
  96. package/dist/{oauth-callback-server-GAVSUBTQ.js → oauth-callback-server-WSDQPZZS.js} +34 -32
  97. package/dist/{oauth-relay-3ZU72UGL.js → oauth-relay-5XPVRPYB.js} +0 -1
  98. package/dist/{plugins-HW4VWW6G.js → plugins-YTYJMMJF.js} +1 -2
  99. package/dist/{runner-34JL64JF.js → runner-GWTSWESR.js} +39 -33
  100. package/dist/{sandbox-egress-signals-DXOOBSBI.js → sandbox-egress-signals-FIL7EGPR.js} +5 -6
  101. package/dist/{sentry-JMWTS32N.js → sentry-MB3NL3IR.js} +1 -2
  102. package/dist/skills-F32BPFYW.js +27 -0
  103. package/dist/spawn-X5BPP5OE.js +37 -0
  104. package/dist/task-runner-2FPBV5PP.js +32 -0
  105. package/dist/validation-62WO524A.js +17 -0
  106. package/dist/vercel.js +0 -1
  107. package/dist/version.js +1 -2
  108. package/dist/work-3C3CMZ24.js +45 -0
  109. package/dist/worker-MFAI6ZEK.js +22 -0
  110. package/package.json +8 -7
  111. package/dist/catalog-runtime-FBVA6WAQ.js +0 -16
  112. package/dist/chat/plugins/task-callback.d.ts +0 -5
  113. package/dist/chat/plugins/task-message.d.ts +0 -23
  114. package/dist/chat/plugins/task-signing.d.ts +0 -31
  115. package/dist/chat/sandbox/snapshot/waiting-error.d.ts +0 -15
  116. package/dist/chat/services/workspace-snapshot-wait.d.ts +0 -27
  117. package/dist/chunk-5I6ORJUY.js +0 -127
  118. package/dist/chunk-6GWA276C.js +0 -72
  119. package/dist/chunk-MLKGABMK.js +0 -9
  120. package/dist/chunk-UT6X7XN7.js +0 -51
  121. package/dist/chunk-WR76IVA5.js +0 -130
  122. package/dist/skills-U545HALM.js +0 -29
  123. package/dist/spawn-I2S4IDUQ.js +0 -37
  124. package/dist/validation-EVXVGA44.js +0 -19
  125. package/dist/work-QOAUPDBU.js +0 -45
  126. package/dist/worker-5GX2IKLZ.js +0 -24
@@ -1,127 +0,0 @@
1
- // src/chat/vercel-queue-client.ts
2
- import { QueueClient } from "@vercel/queue";
3
- function defaultQueueClientOptions() {
4
- if (process.env.VERCEL_DEPLOYMENT_ID?.trim()) {
5
- return {};
6
- }
7
- return { deploymentId: null };
8
- }
9
- function createVercelQueueClient() {
10
- return new QueueClient(defaultQueueClientOptions());
11
- }
12
-
13
- // src/chat/plugins/task-message.ts
14
- import { createHash } from "crypto";
15
- import { z } from "zod";
16
- var pluginTaskParamsSchema = z.object({
17
- conversationId: z.string().min(1),
18
- sessionId: z.string().min(1)
19
- }).strict();
20
- var pluginTaskQueueMessageSchema = z.object({
21
- name: z.string().min(1),
22
- params: pluginTaskParamsSchema,
23
- plugin: z.string().min(1)
24
- }).strict();
25
- function pluginTaskId(args) {
26
- const digest = createHash("sha256").update(args.plugin).update("\0").update(args.name).update("\0").update(args.params.conversationId).update("\0").update(args.params.sessionId).digest("hex").slice(0, 32);
27
- return `plugin-task_${digest}`;
28
- }
29
-
30
- // src/chat/plugins/task-signing.ts
31
- import { createHmac, timingSafeEqual } from "crypto";
32
- import { z as z2 } from "zod";
33
- var SIGNATURE_CONTEXT = "junior.plugin_task_queue.v1";
34
- var SIGNATURE_VERSION = "v1";
35
- var PLUGIN_TASK_QUEUE_SIGNATURE_MAX_SKEW_MS = 60 * 60 * 1e3;
36
- var signedPluginTaskQueueMessageSchema = pluginTaskQueueMessageSchema.extend({
37
- signature: z2.string().min(1).refine((value) => value.trim().length > 0),
38
- signatureVersion: z2.literal(SIGNATURE_VERSION),
39
- signedAtMs: z2.number().finite()
40
- }).strict();
41
- function queueSecret() {
42
- return process.env.JUNIOR_SECRET?.trim() || void 0;
43
- }
44
- function signingPayload(message, signedAtMs) {
45
- return [
46
- SIGNATURE_CONTEXT,
47
- signedAtMs,
48
- message.plugin,
49
- message.name,
50
- message.params.conversationId,
51
- message.params.sessionId
52
- ].join("\0");
53
- }
54
- function hmac(message, signedAtMs, secret) {
55
- return createHmac("sha256", secret).update(signingPayload(message, signedAtMs)).digest("hex");
56
- }
57
- function parseSignedMessage(value) {
58
- const parsed = signedPluginTaskQueueMessageSchema.safeParse(value);
59
- return parsed.success ? parsed.data : void 0;
60
- }
61
- function signPluginTaskQueueMessage(message, nowMs = Date.now()) {
62
- const secret = queueSecret();
63
- if (!secret) {
64
- throw new Error(
65
- "Cannot sign plugin task queue message without JUNIOR_SECRET"
66
- );
67
- }
68
- return {
69
- ...message,
70
- signedAtMs: nowMs,
71
- signatureVersion: SIGNATURE_VERSION,
72
- signature: hmac(message, nowMs, secret)
73
- };
74
- }
75
- function verifyPluginTaskQueueMessage(value, nowMs = Date.now()) {
76
- const message = parseSignedMessage(value);
77
- if (!message) {
78
- return { status: "rejected", reason: "malformed" };
79
- }
80
- const secret = queueSecret();
81
- if (!secret) {
82
- return { status: "unavailable", reason: "missing_secret" };
83
- }
84
- if (!Number.isFinite(nowMs)) {
85
- return { status: "unavailable", reason: "invalid_clock" };
86
- }
87
- if (Math.abs(nowMs - message.signedAtMs) > PLUGIN_TASK_QUEUE_SIGNATURE_MAX_SKEW_MS) {
88
- return { status: "rejected", reason: "expired" };
89
- }
90
- const expected = Buffer.from(hmac(message, message.signedAtMs, secret));
91
- const actual = Buffer.from(message.signature);
92
- if (expected.length !== actual.length || !timingSafeEqual(expected, actual)) {
93
- return { status: "rejected", reason: "signature_mismatch" };
94
- }
95
- return {
96
- status: "verified",
97
- message: {
98
- name: message.name,
99
- params: message.params,
100
- plugin: message.plugin
101
- }
102
- };
103
- }
104
-
105
- // src/chat/plugins/task-queue.ts
106
- var PLUGIN_TASK_QUEUE_TOPIC = "junior_plugin_tasks";
107
- var PLUGIN_TASK_QUEUE_RETENTION_SECONDS = PLUGIN_TASK_QUEUE_SIGNATURE_MAX_SKEW_MS / 1e3;
108
- async function sendVercelPluginTask(message) {
109
- const client = createVercelQueueClient();
110
- await client.send(
111
- PLUGIN_TASK_QUEUE_TOPIC,
112
- signPluginTaskQueueMessage(message),
113
- {
114
- idempotencyKey: pluginTaskId(message),
115
- retentionSeconds: PLUGIN_TASK_QUEUE_RETENTION_SECONDS
116
- }
117
- );
118
- }
119
-
120
- export {
121
- createVercelQueueClient,
122
- pluginTaskParamsSchema,
123
- pluginTaskId,
124
- verifyPluginTaskQueueMessage,
125
- PLUGIN_TASK_QUEUE_TOPIC,
126
- sendVercelPluginTask
127
- };
@@ -1,72 +0,0 @@
1
- import {
2
- __export
3
- } from "./chunk-MLKGABMK.js";
4
-
5
- // src/chat/sentry.ts
6
- var sentry_exports = {};
7
- __export(sentry_exports, {
8
- captureException: () => captureException,
9
- captureMessage: () => captureMessage,
10
- continueTrace: () => continueTrace,
11
- flush: () => flush,
12
- getActiveSpan: () => getActiveSpan,
13
- getClient: () => getClient,
14
- getGlobalScope: () => getGlobalScope,
15
- getTraceData: () => getTraceData,
16
- init: () => init,
17
- logger: () => logger,
18
- setTag: () => setTag,
19
- setUser: () => setUser,
20
- spanToJSON: () => spanToJSON,
21
- startInactiveSpan: () => startInactiveSpan,
22
- startSpan: () => startSpan,
23
- vercelAIIntegration: () => vercelAIIntegration,
24
- withActiveSpan: () => withActiveSpan,
25
- withScope: () => withScope,
26
- withStreamedSpan: () => withStreamedSpan
27
- });
28
- import {
29
- captureException,
30
- captureMessage,
31
- continueTrace,
32
- flush,
33
- getActiveSpan,
34
- getClient,
35
- getGlobalScope,
36
- getTraceData,
37
- init,
38
- logger,
39
- setTag,
40
- setUser,
41
- spanToJSON,
42
- startInactiveSpan,
43
- startSpan,
44
- vercelAIIntegration,
45
- withActiveSpan,
46
- withScope,
47
- withStreamedSpan
48
- } from "@sentry/node";
49
- export * from "@sentry/node";
50
-
51
- export {
52
- sentry_exports,
53
- captureException,
54
- captureMessage,
55
- continueTrace,
56
- flush,
57
- getActiveSpan,
58
- getClient,
59
- getGlobalScope,
60
- getTraceData,
61
- init,
62
- logger,
63
- setTag,
64
- setUser,
65
- spanToJSON,
66
- startInactiveSpan,
67
- startSpan,
68
- vercelAIIntegration,
69
- withActiveSpan,
70
- withScope,
71
- withStreamedSpan
72
- };
@@ -1,9 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- export {
8
- __export
9
- };
@@ -1,51 +0,0 @@
1
- import {
2
- JUNIOR_VERSION
3
- } from "./chunk-TIEKUH4Q.js";
4
-
5
- // src/deployment.ts
6
- var JUNIOR_HEARTBEAT_ROUTE = "/api/internal/heartbeat";
7
- var JUNIOR_HEARTBEAT_CRON_SCHEDULE = "* * * * *";
8
- var JUNIOR_RETENTION_ROUTE = "/api/internal/retention";
9
- var JUNIOR_RETENTION_CRON_SCHEDULE = "0 4 * * *";
10
- var JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE = "/api/internal/agent/continue";
11
- var JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE = "/api/internal/plugin/tasks";
12
- var LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION = "api/internal/agent/continue.ts";
13
- function toOptionalTrimmed(value) {
14
- const trimmed = value?.trim();
15
- return trimmed ? trimmed : void 0;
16
- }
17
- function getDeploymentServiceVersion() {
18
- const configuredRelease = toOptionalTrimmed(process.env.SENTRY_RELEASE);
19
- if (configuredRelease) {
20
- return configuredRelease;
21
- }
22
- const deploymentRevision = toOptionalTrimmed(
23
- process.env.VERCEL_GIT_COMMIT_SHA
24
- );
25
- return deploymentRevision ? `${JUNIOR_VERSION}+${deploymentRevision}` : void 0;
26
- }
27
- function getDeploymentTelemetryAttributes() {
28
- const attributes = {};
29
- const serviceVersion = getDeploymentServiceVersion();
30
- const deploymentId = toOptionalTrimmed(process.env.VERCEL_DEPLOYMENT_ID);
31
- attributes["app.junior.version"] = JUNIOR_VERSION;
32
- if (serviceVersion) {
33
- attributes["service.version"] = serviceVersion;
34
- }
35
- if (deploymentId) {
36
- attributes["deployment.id"] = deploymentId;
37
- }
38
- return attributes;
39
- }
40
-
41
- export {
42
- JUNIOR_HEARTBEAT_ROUTE,
43
- JUNIOR_HEARTBEAT_CRON_SCHEDULE,
44
- JUNIOR_RETENTION_ROUTE,
45
- JUNIOR_RETENTION_CRON_SCHEDULE,
46
- JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
47
- JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE,
48
- LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION,
49
- getDeploymentServiceVersion,
50
- getDeploymentTelemetryAttributes
51
- };
@@ -1,130 +0,0 @@
1
- import {
2
- conversationQueueMessageSchema
3
- } from "./chunk-JAL3CH4G.js";
4
- import {
5
- createVercelQueueClient
6
- } from "./chunk-5I6ORJUY.js";
7
-
8
- // src/chat/task-execution/queue-signing.ts
9
- import { createHmac, timingSafeEqual } from "crypto";
10
- import { z } from "zod";
11
- var CONVERSATION_WORK_QUEUE_SIGNATURE_CONTEXT = "junior.conversation_work_queue.v2";
12
- var CONVERSATION_WORK_QUEUE_SIGNATURE_VERSION = "v2";
13
- var CONVERSATION_WORK_QUEUE_SIGNATURE_MAX_SKEW_MS = 60 * 60 * 1e3;
14
- var signedConversationQueueMessageSchema = conversationQueueMessageSchema.extend({
15
- signature: z.string().trim().min(1),
16
- signatureVersion: z.literal(CONVERSATION_WORK_QUEUE_SIGNATURE_VERSION),
17
- signedAtMs: z.number().finite()
18
- }).strict();
19
- function getConversationWorkQueueSecret() {
20
- return process.env.JUNIOR_SECRET?.trim() || void 0;
21
- }
22
- function buildSignedPayload(message, signedAtMs) {
23
- return [
24
- CONVERSATION_WORK_QUEUE_SIGNATURE_CONTEXT,
25
- signedAtMs,
26
- message.conversationId
27
- ].join(":");
28
- }
29
- function signPayload(payload, secret) {
30
- return createHmac("sha256", secret).update(payload).digest("hex");
31
- }
32
- function timingSafeMatch(expected, actual) {
33
- const expectedBuffer = Buffer.from(expected);
34
- const actualBuffer = Buffer.from(actual);
35
- if (expectedBuffer.length !== actualBuffer.length) {
36
- return false;
37
- }
38
- return timingSafeEqual(expectedBuffer, actualBuffer);
39
- }
40
- function parseSignedConversationQueueMessage(value) {
41
- const parsed = signedConversationQueueMessageSchema.safeParse(value);
42
- return parsed.success ? parsed.data : void 0;
43
- }
44
- function signConversationQueueMessage(message, nowMs = Date.now()) {
45
- const secret = getConversationWorkQueueSecret();
46
- if (!secret) {
47
- throw new Error(
48
- "Cannot sign conversation queue message without JUNIOR_SECRET"
49
- );
50
- }
51
- return {
52
- ...message,
53
- signedAtMs: nowMs,
54
- signatureVersion: CONVERSATION_WORK_QUEUE_SIGNATURE_VERSION,
55
- signature: signPayload(buildSignedPayload(message, nowMs), secret)
56
- };
57
- }
58
- function verifyConversationQueueMessage(value, nowMs = Date.now()) {
59
- const message = parseSignedConversationQueueMessage(value);
60
- if (!message) {
61
- return { status: "rejected", reason: "malformed" };
62
- }
63
- const secret = getConversationWorkQueueSecret();
64
- if (!secret) {
65
- return { status: "unavailable", reason: "missing_secret" };
66
- }
67
- if (!Number.isFinite(nowMs)) {
68
- return { status: "unavailable", reason: "invalid_clock" };
69
- }
70
- if (Math.abs(nowMs - message.signedAtMs) > CONVERSATION_WORK_QUEUE_SIGNATURE_MAX_SKEW_MS) {
71
- return { status: "rejected", reason: "expired" };
72
- }
73
- const expected = signPayload(
74
- buildSignedPayload(message, message.signedAtMs),
75
- secret
76
- );
77
- if (!timingSafeMatch(expected, message.signature)) {
78
- return { status: "rejected", reason: "signature_mismatch" };
79
- }
80
- return {
81
- status: "verified",
82
- message: {
83
- schemaVersion: message.schemaVersion,
84
- conversationId: message.conversationId
85
- }
86
- };
87
- }
88
-
89
- // src/chat/task-execution/vercel-queue.ts
90
- var DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC = "junior_conversation_work";
91
- var CONVERSATION_WORK_QUEUE_RETENTION_SECONDS = CONVERSATION_WORK_QUEUE_SIGNATURE_MAX_SKEW_MS / 1e3;
92
- var defaultQueue;
93
- function resolveConversationWorkQueueTopic(options = {}) {
94
- const topic = options.topic?.trim();
95
- return topic || process.env.JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC?.trim() || DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC;
96
- }
97
- function toDelaySeconds(options) {
98
- if (!options?.delayMs || options.delayMs <= 0) {
99
- return void 0;
100
- }
101
- return Math.ceil(options.delayMs / 1e3);
102
- }
103
- function createVercelConversationWorkQueue(options = {}) {
104
- const topic = resolveConversationWorkQueueTopic(options);
105
- const client = options.client ?? createVercelQueueClient();
106
- return {
107
- async send(message, sendOptions) {
108
- const result = await client.send(
109
- topic,
110
- signConversationQueueMessage(message),
111
- {
112
- idempotencyKey: sendOptions?.idempotencyKey,
113
- delaySeconds: toDelaySeconds(sendOptions),
114
- retentionSeconds: options.retentionSeconds ?? CONVERSATION_WORK_QUEUE_RETENTION_SECONDS
115
- }
116
- );
117
- return result.messageId ? { messageId: result.messageId } : {};
118
- }
119
- };
120
- }
121
- function getVercelConversationWorkQueue() {
122
- defaultQueue ??= createVercelConversationWorkQueue();
123
- return defaultQueue;
124
- }
125
-
126
- export {
127
- verifyConversationQueueMessage,
128
- resolveConversationWorkQueueTopic,
129
- getVercelConversationWorkQueue
130
- };
@@ -1,29 +0,0 @@
1
- import {
2
- discoverSkills,
3
- findSkillByName,
4
- loadSkillsByName,
5
- parseSkillFile,
6
- parseSkillInvocation,
7
- resetSkillDiscoveryCache,
8
- stripFrontmatter
9
- } from "./chunk-ZQMG3CL5.js";
10
- import "./chunk-YFNAMRGE.js";
11
- import "./chunk-SLGGOASN.js";
12
- import "./chunk-CGA4ERJ5.js";
13
- import "./chunk-M63DETLL.js";
14
- import "./chunk-HQNE5APD.js";
15
- import "./chunk-6GWA276C.js";
16
- import "./chunk-OOUNJNMR.js";
17
- import "./chunk-H4HBKISO.js";
18
- import "./chunk-UT6X7XN7.js";
19
- import "./chunk-TIEKUH4Q.js";
20
- import "./chunk-MLKGABMK.js";
21
- export {
22
- discoverSkills,
23
- findSkillByName,
24
- loadSkillsByName,
25
- parseSkillFile,
26
- parseSkillInvocation,
27
- resetSkillDiscoveryCache,
28
- stripFrontmatter
29
- };
@@ -1,37 +0,0 @@
1
- import {
2
- bindSpawnAgent
3
- } from "./chunk-R5NWWYIS.js";
4
- import "./chunk-GPLAT6H7.js";
5
- import "./chunk-5IRROPA5.js";
6
- import "./chunk-CJLBLELR.js";
7
- import "./chunk-JAL3CH4G.js";
8
- import "./chunk-3AFVR5UC.js";
9
- import "./chunk-DIB4GX3G.js";
10
- import "./chunk-RF6J3DIO.js";
11
- import "./chunk-2HIPYNQI.js";
12
- import "./chunk-6ZWRNC4D.js";
13
- import "./chunk-FIDMHAO6.js";
14
- import "./chunk-PDO5BLNM.js";
15
- import "./chunk-3I7XE3PA.js";
16
- import "./chunk-3Y47VMHV.js";
17
- import "./chunk-VP4OVRDD.js";
18
- import "./chunk-R6U7N4FS.js";
19
- import "./chunk-JMJNFEDC.js";
20
- import "./chunk-3TM3FYLQ.js";
21
- import "./chunk-GENV6KF2.js";
22
- import "./chunk-VFUK3X5B.js";
23
- import "./chunk-XSPSCWLH.js";
24
- import "./chunk-YFNAMRGE.js";
25
- import "./chunk-SLGGOASN.js";
26
- import "./chunk-CGA4ERJ5.js";
27
- import "./chunk-M63DETLL.js";
28
- import "./chunk-HQNE5APD.js";
29
- import "./chunk-6GWA276C.js";
30
- import "./chunk-OOUNJNMR.js";
31
- import "./chunk-H4HBKISO.js";
32
- import "./chunk-UT6X7XN7.js";
33
- import "./chunk-TIEKUH4Q.js";
34
- import "./chunk-MLKGABMK.js";
35
- export {
36
- bindSpawnAgent
37
- };
@@ -1,19 +0,0 @@
1
- import {
2
- validatePluginEgressCredentialHooks,
3
- validatePluginRegistrations
4
- } from "./chunk-RTRBYSF3.js";
5
- import "./chunk-YFNAMRGE.js";
6
- import "./chunk-SLGGOASN.js";
7
- import "./chunk-CGA4ERJ5.js";
8
- import "./chunk-M63DETLL.js";
9
- import "./chunk-HQNE5APD.js";
10
- import "./chunk-6GWA276C.js";
11
- import "./chunk-OOUNJNMR.js";
12
- import "./chunk-H4HBKISO.js";
13
- import "./chunk-UT6X7XN7.js";
14
- import "./chunk-TIEKUH4Q.js";
15
- import "./chunk-MLKGABMK.js";
16
- export {
17
- validatePluginEgressCredentialHooks,
18
- validatePluginRegistrations
19
- };
@@ -1,45 +0,0 @@
1
- import {
2
- buildAgentInvocationInboundMessage,
3
- createAgentInvocationWorker,
4
- createAndEnqueueAgentInvocation,
5
- enqueueAgentInvocation,
6
- resolveAgentInvocationId,
7
- routeAgentInvocationWork
8
- } from "./chunk-GPLAT6H7.js";
9
- import "./chunk-5IRROPA5.js";
10
- import "./chunk-CJLBLELR.js";
11
- import "./chunk-JAL3CH4G.js";
12
- import "./chunk-3AFVR5UC.js";
13
- import "./chunk-DIB4GX3G.js";
14
- import "./chunk-2HIPYNQI.js";
15
- import "./chunk-6ZWRNC4D.js";
16
- import "./chunk-FIDMHAO6.js";
17
- import "./chunk-PDO5BLNM.js";
18
- import "./chunk-3I7XE3PA.js";
19
- import "./chunk-3Y47VMHV.js";
20
- import "./chunk-VP4OVRDD.js";
21
- import "./chunk-R6U7N4FS.js";
22
- import "./chunk-JMJNFEDC.js";
23
- import "./chunk-3TM3FYLQ.js";
24
- import "./chunk-GENV6KF2.js";
25
- import "./chunk-VFUK3X5B.js";
26
- import "./chunk-XSPSCWLH.js";
27
- import "./chunk-YFNAMRGE.js";
28
- import "./chunk-SLGGOASN.js";
29
- import "./chunk-CGA4ERJ5.js";
30
- import "./chunk-M63DETLL.js";
31
- import "./chunk-HQNE5APD.js";
32
- import "./chunk-6GWA276C.js";
33
- import "./chunk-OOUNJNMR.js";
34
- import "./chunk-H4HBKISO.js";
35
- import "./chunk-UT6X7XN7.js";
36
- import "./chunk-TIEKUH4Q.js";
37
- import "./chunk-MLKGABMK.js";
38
- export {
39
- buildAgentInvocationInboundMessage,
40
- createAgentInvocationWorker,
41
- createAndEnqueueAgentInvocation,
42
- enqueueAgentInvocation,
43
- resolveAgentInvocationId,
44
- routeAgentInvocationWork
45
- };
@@ -1,24 +0,0 @@
1
- import {
2
- CONVERSATION_WORK_DEFER_DELAY_MS,
3
- processConversationWork
4
- } from "./chunk-U4TKB6F6.js";
5
- import "./chunk-5IRROPA5.js";
6
- import "./chunk-JAL3CH4G.js";
7
- import "./chunk-4GWXAILB.js";
8
- import "./chunk-3Y47VMHV.js";
9
- import "./chunk-VP4OVRDD.js";
10
- import "./chunk-R6U7N4FS.js";
11
- import "./chunk-3TM3FYLQ.js";
12
- import "./chunk-GENV6KF2.js";
13
- import "./chunk-VFUK3X5B.js";
14
- import "./chunk-XSPSCWLH.js";
15
- import "./chunk-M63DETLL.js";
16
- import "./chunk-HQNE5APD.js";
17
- import "./chunk-6GWA276C.js";
18
- import "./chunk-UT6X7XN7.js";
19
- import "./chunk-TIEKUH4Q.js";
20
- import "./chunk-MLKGABMK.js";
21
- export {
22
- CONVERSATION_WORK_DEFER_DELAY_MS,
23
- processConversationWork
24
- };