@sentry/junior 0.257.0 → 0.258.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 (101) hide show
  1. package/dist/{actor-BTtLaeWy.js → actor-tlxzqaRe.js} +3 -6
  2. package/dist/{admin-DgIkm6Vy.js → admin-My1SLGVO.js} +2 -3
  3. package/dist/{agent-hooks-BjtTzvru.js → agent-hooks-BJ_5mlRH.js} +69 -109
  4. package/dist/{agent-invocations-Bdu3ROfo.js → agent-invocations-Qfz7dWgU.js} +6 -12
  5. package/dist/{agent-runner-D7OboVb3.js → agent-runner-DGsFQw72.js} +261 -458
  6. package/dist/api/schema.d.ts +414 -448
  7. package/dist/api/schema.js +5 -5
  8. package/dist/api.d.ts +2 -12
  9. package/dist/api.js +94 -158
  10. package/dist/{app-BsU5QNBd.d.ts → app-PX2H1PxU.d.ts} +21 -44
  11. package/dist/app.d.ts +3 -3
  12. package/dist/app.js +204 -321
  13. package/dist/{assistant-reply-CbTPebzL.js → assistant-reply-H1M-91oF.js} +3 -5
  14. package/dist/{automation-CHdlHVZP.js → automation-DWBFBenG.js} +6 -11
  15. package/dist/{briefs-oLOldnDM.js → briefs-vYoK85rJ.js} +8 -11
  16. package/dist/{cadence-D00SCzT1.js → cadence-R7Em4RjE.js} +1 -2
  17. package/dist/{catalog-runtime-CZzhGQ7F.js → catalog-runtime-BN4DVxco.js} +3 -4
  18. package/dist/cli/chat.d.ts +2 -4
  19. package/dist/cli/chat.js +22 -24
  20. package/dist/cli/check.d.ts +1 -3
  21. package/dist/cli/check.js +4 -5
  22. package/dist/cli/env.d.ts +1 -3
  23. package/dist/cli/env.js +1 -2
  24. package/dist/cli/init.d.ts +1 -3
  25. package/dist/cli/init.js +3 -3
  26. package/dist/cli/main.d.ts +1 -3
  27. package/dist/cli/main.js +4 -5
  28. package/dist/cli/plugins.d.ts +2 -4
  29. package/dist/cli/plugins.js +7 -8
  30. package/dist/cli/run.d.ts +1 -2
  31. package/dist/cli/run.js +1 -2
  32. package/dist/cli/snapshot-create.d.ts +1 -3
  33. package/dist/cli/snapshot-create.js +4 -5
  34. package/dist/cli/upgrade.d.ts +3 -6
  35. package/dist/cli/upgrade.js +11 -17
  36. package/dist/{client-D8HnkOQX.js → client-DbyHuMFU.js} +9 -16
  37. package/dist/{config-CJRnWK9H.js → config-_WO_AjCB.js} +18 -15
  38. package/dist/{connections-ClYrKzpX.js → connections-ag_1JOhB.js} +14 -19
  39. package/dist/{conversation-CKNLYBJt.js → conversation-DjN3mlog.js} +8 -15
  40. package/dist/{conversation-privacy-C8b1nphZ.js → conversation-privacy-DHP_xnVj.js} +2 -3
  41. package/dist/{conversation-work-C6y3T5Hx.js → conversation-work-BaT_T6EB.js} +1 -2
  42. package/dist/{credential-sync-BXfohNmJ.js → credential-sync-B-CPX_ag.js} +23 -28
  43. package/dist/{db-Ca9Nt5ci.d.ts → db-BnRqQ7G5.d.ts} +1 -1
  44. package/dist/{executor-Do0THDRR.js → executor-RvG6kVe1.js} +30 -52
  45. package/dist/{experimental-CQIvMUO7.js → experimental-BNK1l1jv.js} +2 -4
  46. package/dist/{history-9pO1Zd4Y.js → history-AY8rs-FR.js} +5 -9
  47. package/dist/{history-DvqWZlYX.d.ts → history-BgI33Kie.d.ts} +12 -20
  48. package/dist/{images-BN_BiBXF.js → images-C2J_bj2g.js} +5 -6
  49. package/dist/instrumentation.d.ts +1 -3
  50. package/dist/instrumentation.js +6 -8
  51. package/dist/{job-queue-B6SV9uVa.js → job-queue-DVe37it2.js} +6 -12
  52. package/dist/{logging-CWxiIuCF.js → logging-DsHONhVm.js} +7 -12
  53. package/dist/{message-TUOdbSBW.js → message-DyitL8no.js} +5 -6
  54. package/dist/{model-profile-BwU8mqwD.js → model-profile-Bg8EoCKD.js} +2 -4
  55. package/dist/nitro.d.ts +3 -5
  56. package/dist/nitro.js +12 -17
  57. package/dist/{oauth-authorization-BA4Dt6a7.js → oauth-authorization-djQn5Nhy.js} +2 -4
  58. package/dist/{oauth-callback-server-Dj5UJODo.js → oauth-callback-server-CDby-pCn.js} +3 -4
  59. package/dist/{oauth-relay-CdCnu80W.js → oauth-relay-CTygMkNx.js} +2 -3
  60. package/dist/{package-discovery-BVvSnQBB.js → package-discovery-DJBompdd.js} +17 -21
  61. package/dist/{pending-auth-s_QFribU.js → pending-auth-D8J1uJUS.js} +37 -28
  62. package/dist/{plugin-module-CVvEUSMH.js → plugin-module-Cf5gVPWP.js} +1 -2
  63. package/dist/{plugins-CjfUP5gJ.d.ts → plugins-B11Mfkmv.d.ts} +0 -4
  64. package/dist/{plugins-egKWjgue.js → plugins-DOm9Y6qI.js} +2 -3
  65. package/dist/{private-trace-result-BLvBjy_e.js → private-trace-result-CE7_lEdq.js} +1 -2
  66. package/dist/{profile-h-72wM78.js → profile-DpYjfKke.js} +16 -28
  67. package/dist/{prompt-DyoEj9c2.js → prompt-xgpyMtg7.js} +5 -9
  68. package/dist/{queue-B5SnqRln.d.ts → queue-C37RbDVc.d.ts} +0 -2
  69. package/dist/{registry-sLTr-sV9.js → registry-Du566MtJ.js} +16 -29
  70. package/dist/{resolve-ncQPZROQ.js → resolve-ClCIgh8E.js} +7 -12
  71. package/dist/{result-C883vngT.js → result-BBbKA61B.js} +13 -17
  72. package/dist/{rolldown-runtime-B4FMCO8f.js → rolldown-runtime-nwUcYXjP.js} +1 -2
  73. package/dist/{runner-CzYImdOF.js → runner-CCuqFSqx.js} +12 -13
  74. package/dist/{sandbox-egress-signals-CZbMINHI.js → sandbox-egress-signals-DY1mbKF4.js} +2 -3
  75. package/dist/{schema-Dy69D4Ge.js → schema-DrMh3NtR.js} +15 -26
  76. package/dist/{sentry-CgWZM_kV.js → sentry-BBUlHih9.js} +2 -3
  77. package/dist/{session-stop-CQjKd4a2.js → session-stop-CIoFiwwe.js} +23 -33
  78. package/dist/{skills-C22SLruK.js → skills-DyQBLIrK.js} +9 -9
  79. package/dist/{spawn-DY9CLXDL.js → spawn-Dqfeo7XP.js} +4 -5
  80. package/dist/{store-DoewL5mG.d.ts → store-CG0VJyye.d.ts} +0 -14
  81. package/dist/{store-DXFIQy-G.js → store-DJLwq4x8.js} +13 -15
  82. package/dist/{task-queue-B17vV0La.js → task-queue-BzW4MaWU.js} +5 -7
  83. package/dist/{task-runner-DUjvzYXj.js → task-runner-D3qJh4fK.js} +22 -26
  84. package/dist/{tasks-D_WIJtvO.js → tasks-CEXKTASS.js} +62 -78
  85. package/dist/{thread-state-Ch4yuCqG.js → thread-state-W3f6kAtz.js} +13 -19
  86. package/dist/{turn-failure-response-C5nBKC4S.js → turn-failure-response-CWx7aNIh.js} +16 -22
  87. package/dist/{turn-lifecycle-CO-ylUmV.js → turn-lifecycle-C9JFst7-.js} +2 -3
  88. package/dist/{turn-session-routing-B3LWooK5.js → turn-session-routing-CUxtfpr7.js} +2 -3
  89. package/dist/{validation-CXYxaNYx.js → validation-BHRxa5G4.js} +3 -4
  90. package/dist/vercel.d.ts +1 -3
  91. package/dist/vercel.js +1 -2
  92. package/dist/{version-BcdZy2zg.js → version-C0U6rHg0.js} +3 -5
  93. package/dist/{version-CnXZ614E.d.ts → version-Cc2OFd9G.d.ts} +0 -2
  94. package/dist/version.d.ts +1 -1
  95. package/dist/version.js +1 -2
  96. package/dist/{viewer-DSZXygMU.js → viewer-CGvvRqKp.js} +26 -57
  97. package/dist/{web-input-B9Bv0_lR.js → web-input-Keb5GRWj.js} +98 -155
  98. package/dist/{web-message-id-xPI_EFSC.js → web-message-id-CJSUiksE.js} +3 -6
  99. package/dist/{work-nAfDSUFP.js → work-DRcsJ3hV.js} +14 -16
  100. package/dist/{worker-vGXZ6XFT.js → worker-Cjo-QqPq.js} +7 -8
  101. package/package.json +7 -6
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- //#region src/chat/task-execution/queue.d.ts
3
2
  /** Validate the v2 conversation work hint sent through Vercel Queue. */
4
3
  declare const conversationQueueMessageSchema: z.ZodObject<{
5
4
  schemaVersion: z.ZodLiteral<2>;
@@ -21,5 +20,4 @@ interface ConversationQueueSendResult {
21
20
  interface ConversationWorkQueue {
22
21
  send(message: ConversationQueueMessage, options?: ConversationQueueSendOptions): Promise<ConversationQueueSendResult | void>;
23
22
  }
24
- //#endregion
25
23
  export { ConversationWorkQueue as n, ConversationQueueMessage as t };
@@ -1,12 +1,12 @@
1
- import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-CWxiIuCF.js";
2
- import { a as isUserActor, o as parseActorUserId } from "./actor-BTtLaeWy.js";
3
- import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.js";
1
+ import { m as logWarn, p as logInfo, y as setSpanAttributes } from "./logging-DsHONhVm.js";
2
+ import { a as isUserActor, o as parseActorUserId } from "./actor-tlxzqaRe.js";
3
+ import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-DJBompdd.js";
4
4
  import path from "node:path";
5
5
  import { z } from "zod";
6
6
  import { randomUUID } from "node:crypto";
7
7
  import { parse } from "yaml";
8
8
  import { readFileSync, readdirSync, statSync } from "node:fs";
9
- //#region src/chat/plugins/inline-manifest-source.ts
9
+ // src/chat/plugins/inline-manifest-source.ts
10
10
  function setDefined$1(target, key, value) {
11
11
  if (value !== void 0) target[key] = value;
12
12
  }
@@ -102,8 +102,7 @@ function inlineManifestSource(manifest) {
102
102
  setDefined$1(result, "target", inlineTargetSource(manifest.name, manifest.target));
103
103
  return result;
104
104
  }
105
- //#endregion
106
- //#region src/chat/plugins/manifest.ts
105
+ // src/chat/plugins/manifest.ts
107
106
  const PLUGIN_NAME_RE = /^[a-z][a-z0-9-]*$/;
108
107
  const SHORT_CONFIG_KEY_RE = /^[a-z0-9]+(\.[a-z0-9-]+)*$/;
109
108
  const TARGET_FLAG_RE = /^-{1,2}[A-Za-z0-9][A-Za-z0-9-]*$/;
@@ -727,8 +726,7 @@ function parsePluginManifest(raw, dir, config) {
727
726
  function parseInlinePluginManifest(manifest, dir, config) {
728
727
  return parseManifestSource(inlineManifestSource(manifest), dir, config, { allowHookManagedEgress: true });
729
728
  }
730
- //#endregion
731
- //#region src/chat/credentials/broker.ts
729
+ // src/chat/credentials/broker.ts
732
730
  var CredentialUnavailableError = class extends Error {
733
731
  provider;
734
732
  constructor(provider, message) {
@@ -737,8 +735,7 @@ var CredentialUnavailableError = class extends Error {
737
735
  this.provider = provider;
738
736
  }
739
737
  };
740
- //#endregion
741
- //#region src/chat/credentials/context.ts
738
+ // src/chat/credentials/context.ts
742
739
  const exactActorIdSchema = z.string().refine((value) => parseActorUserId(value) === value);
743
740
  const exactNonBlankStringSchema = z.string().min(1).refine((value) => value === value.trim());
744
741
  const slackDirectCredentialSubjectBindingSchema = z.object({
@@ -885,8 +882,7 @@ function credentialUserSubjectId(context) {
885
882
  if ("type" in context.actor) return context.actor.userId;
886
883
  return "subject" in context ? context.subject?.userId : void 0;
887
884
  }
888
- //#endregion
889
- //#region src/chat/credentials/header-transforms.ts
885
+ // src/chat/credentials/header-transforms.ts
890
886
  /** Merge transforms by domain so later transforms override earlier headers. */
891
887
  function mergeHeaderTransforms(transforms) {
892
888
  const byDomain = /* @__PURE__ */ new Map();
@@ -899,8 +895,7 @@ function mergeHeaderTransforms(transforms) {
899
895
  headers
900
896
  }));
901
897
  }
902
- //#endregion
903
- //#region src/chat/credentials/oauth-scope.ts
898
+ // src/chat/credentials/oauth-scope.ts
904
899
  function parseScope(scope) {
905
900
  if (!scope) return [];
906
901
  return [...new Set(scope.split(/\s+/).filter(Boolean))].sort();
@@ -918,8 +913,7 @@ function hasRequiredOAuthScope(storedScope, requiredScope) {
918
913
  if (stored.size === 0) return false;
919
914
  return required.every((scope) => stored.has(scope));
920
915
  }
921
- //#endregion
922
- //#region src/chat/oauth-response.ts
916
+ // src/chat/oauth-response.ts
923
917
  const MAX_OAUTH_ERROR_BODY_BYTES = 16384;
924
918
  const MAX_OAUTH_ERROR_BODY_READS = MAX_OAUTH_ERROR_BODY_BYTES;
925
919
  const MAX_OAUTH_ERROR_BODY_READ_MS = 5e3;
@@ -1013,8 +1007,7 @@ function fetchWithBoundedOAuthErrorBodies(fetchFn = globalThis.fetch, onErrorRes
1013
1007
  });
1014
1008
  });
1015
1009
  }
1016
- //#endregion
1017
- //#region src/chat/plugins/command-env.ts
1010
+ // src/chat/plugins/command-env.ts
1018
1011
  const ENV_PLACEHOLDER_RE$1 = /\$\{([A-Z_][A-Z0-9_]*)\}/g;
1019
1012
  function resolveValue(manifest, value) {
1020
1013
  let missing = false;
@@ -1041,15 +1034,13 @@ function resolvePluginCommandEnv(manifest) {
1041
1034
  }
1042
1035
  return env;
1043
1036
  }
1044
- //#endregion
1045
- //#region src/chat/plugins/auth/auth-token-placeholder.ts
1037
+ // src/chat/plugins/auth/auth-token-placeholder.ts
1046
1038
  const DEFAULT_PLACEHOLDERS = { "oauth-bearer": "host_managed_credential" };
1047
1039
  /** Resolve the non-secret sandbox token placeholder for token-backed credentials. */
1048
1040
  function resolveAuthTokenPlaceholder(credentials) {
1049
1041
  return credentials.authTokenPlaceholder?.trim() || DEFAULT_PLACEHOLDERS[credentials.type];
1050
1042
  }
1051
- //#endregion
1052
- //#region src/chat/plugins/auth/api-headers-broker.ts
1043
+ // src/chat/plugins/auth/api-headers-broker.ts
1053
1044
  const MAX_LEASE_MS$1 = 36e5;
1054
1045
  const ENV_PLACEHOLDER_RE = /\$\{([A-Z_][A-Z0-9_]*)\}/g;
1055
1046
  /**
@@ -1094,8 +1085,7 @@ function createApiHeadersBroker(manifest) {
1094
1085
  };
1095
1086
  } };
1096
1087
  }
1097
- //#endregion
1098
- //#region src/chat/plugins/auth/oauth-request.ts
1088
+ // src/chat/plugins/auth/oauth-request.ts
1099
1089
  const DEFAULT_TOKEN_CONTENT_TYPE = "application/x-www-form-urlencoded";
1100
1090
  function requireNonEmptyTokenField(data, field) {
1101
1091
  const value = data[field];
@@ -1171,8 +1161,7 @@ function parseOAuthTokenResponse(data, requestedScope, options) {
1171
1161
  }
1172
1162
  return parsedOAuthTokenResponseSchema.parse(result);
1173
1163
  }
1174
- //#endregion
1175
- //#region src/chat/plugins/auth/oauth-bearer-broker.ts
1164
+ // src/chat/plugins/auth/oauth-bearer-broker.ts
1176
1165
  const MAX_LEASE_MS = 36e5;
1177
1166
  const REFRESH_BUFFER_MS = 3e5;
1178
1167
  const TOKEN_REFRESH_TIMEOUT_MS = 2e4;
@@ -1321,8 +1310,7 @@ function createOAuthBearerBroker(manifest, credentials, deps) {
1321
1310
  throw new CredentialUnavailableError(provider, `No ${provider} credentials available.`);
1322
1311
  } };
1323
1312
  }
1324
- //#endregion
1325
- //#region src/chat/plugins/registry.ts
1313
+ // src/chat/plugins/registry.ts
1326
1314
  function getLoggedPluginNames() {
1327
1315
  const globalState = globalThis;
1328
1316
  globalState.__juniorLoggedPluginNames ??= /* @__PURE__ */ new Set();
@@ -1643,5 +1631,4 @@ function createPluginCatalogRuntime() {
1643
1631
  }
1644
1632
  };
1645
1633
  }
1646
- //#endregion
1647
1634
  export { CredentialUnavailableError as _, resolveAuthTokenPlaceholder as a, fetchWithBoundedOAuthErrorBodies as c, actorLogContext as d, credentialContextForActor as f, credentialUserSubjectId as g, credentialSubjectSchema as h, resolvePluginHeaderEnvRefs as i, getOAuthProviderErrorAttributes as l, credentialLogContext as m, buildOAuthTokenRequest as n, resolvePluginCommandEnv as o, credentialContextSchema as p, parseOAuthTokenResponse as r, OAuthProviderError as s, createPluginCatalogRuntime as t, hasRequiredOAuthScope as u, parseInlinePluginManifest as v, parsePluginManifest as y };
@@ -1,8 +1,8 @@
1
- import { T as withSpan, y as setSpanAttributes } from "./logging-CWxiIuCF.js";
2
- import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-h-72wM78.js";
1
+ import { T as withSpan, y as setSpanAttributes } from "./logging-DsHONhVm.js";
2
+ import { N as SANDBOX_WORKSPACE_ROOT, k as sleep, r as isStale, t as create, u as isSandboxUnavailableError, v as getVercelSandboxCredentials, w as getStateAdapter, x as runNonInteractiveCommand } from "./profile-DpYjfKke.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
- //#region src/chat/sandbox/resources.ts
5
+ // src/chat/sandbox/resources.ts
6
6
  let configuredResources;
7
7
  function resourcesFromEnv() {
8
8
  const value = process.env.SANDBOX_VCPUS?.trim();
@@ -30,8 +30,7 @@ function setSandboxResourceConfig(config) {
30
30
  function getSandboxResources() {
31
31
  return configuredResources ?? resourcesFromEnv();
32
32
  }
33
- //#endregion
34
- //#region src/chat/sandbox/snapshot/span.ts
33
+ // src/chat/sandbox/snapshot/span.ts
35
34
  /** Record the reusable snapshot selected for a new Sandbox. */
36
35
  function setSnapshotSpanAttributes(snapshot) {
37
36
  setSpanAttributes({
@@ -47,8 +46,7 @@ function setSnapshotSpanAttributes(snapshot) {
47
46
  async function trace(name, op, attributes, callback) {
48
47
  return await withSpan(name, op, {}, callback, attributes);
49
48
  }
50
- //#endregion
51
- //#region src/chat/sandbox/snapshot/install.ts
49
+ // src/chat/sandbox/snapshot/install.ts
52
50
  async function runOrThrow(sandbox, params, label) {
53
51
  const result = await runNonInteractiveCommand(sandbox, params);
54
52
  if (result.exitCode === 0) return;
@@ -225,8 +223,7 @@ async function postinstall(sandbox, commands, signal, timeoutMs) {
225
223
  }
226
224
  });
227
225
  }
228
- //#endregion
229
- //#region src/chat/sandbox/workspace.ts
226
+ // src/chat/sandbox/workspace.ts
230
227
  /** Bind one tool call's cancellation to every sandbox filesystem operation. */
231
228
  function bindSandboxFileSystem(fs, signal) {
232
229
  if (!signal) return fs;
@@ -317,8 +314,7 @@ async function stopSession(session) {
317
314
  await session.stop();
318
315
  } catch {}
319
316
  }
320
- //#endregion
321
- //#region src/chat/sandbox/snapshot/resolve.ts
317
+ // src/chat/sandbox/snapshot/resolve.ts
322
318
  const SNAPSHOT_CACHE_PREFIX = "junior:sandbox_snapshot_profile:v2";
323
319
  const SNAPSHOT_LOCK_PREFIX = "junior:sandbox_snapshot_lock";
324
320
  const SNAPSHOT_CACHE_TTL_MS = 2592e6;
@@ -542,5 +538,4 @@ function isMissingError(error) {
542
538
  const searchable = error instanceof Error ? error.message.toLowerCase() : String(error).toLowerCase();
543
539
  return searchable.includes("snapshot") && (searchable.includes("not found") || searchable.includes("unknown") || searchable.includes("404"));
544
540
  }
545
- //#endregion
546
541
  export { createSandboxSession as a, postinstall as c, getSandboxResources as d, setSandboxResourceConfig as f, bindSandboxFileSystem as i, setSnapshotSpanAttributes as l, isMissingError as n, stopSession as o, resolve as r, dependencies as s, getCachedSnapshot as t, getSandboxResourceConfig as u };
@@ -1,21 +1,20 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-D7OboVb3.js";
3
- import { t as createActor } from "./actor-BTtLaeWy.js";
4
- import { f as credentialContextForActor } from "./registry-sLTr-sV9.js";
5
- import { Q as listTurnSummaries, Z as getTurnRecord } from "./tasks-D_WIJtvO.js";
6
- import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-CQjKd4a2.js";
7
- import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-DyoEj9c2.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-DXFIQy-G.js";
9
- import { r as enqueueAgentInvocation } from "./work-nAfDSUFP.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
+ import { $ as getAgentInvocation, X as createAgentInvocationFromLatest, ct as isTerminalAgentInvocation, et as getAgentInvocationIdForEvents, ft as markAgentInvocationParentMailboxAppended, it as getAgentInvocationResultMessageId, nt as getAgentInvocationIdForResult, st as getLatestAgentInvocationForConversation, tt as getAgentInvocationIdForMessage } from "./agent-runner-DGsFQw72.js";
3
+ import { t as createActor } from "./actor-tlxzqaRe.js";
4
+ import { f as credentialContextForActor } from "./registry-Du566MtJ.js";
5
+ import { Q as listTurnSummaries, Z as getTurnRecord } from "./tasks-CEXKTASS.js";
6
+ import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-CIoFiwwe.js";
7
+ import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-xgpyMtg7.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-DJLwq4x8.js";
9
+ import { r as enqueueAgentInvocation } from "./work-DRcsJ3hV.js";
10
10
  import { z } from "zod";
11
11
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
12
- //#region src/chat/task-execution/mailbox-input.ts
12
+ // src/chat/task-execution/mailbox-input.ts
13
13
  /** Join non-empty mailbox Message text for one Turn. */
14
14
  function joinMailboxText(messages) {
15
15
  return messages.map((message) => message.input.text.trim()).filter(Boolean).join("\n\n");
16
16
  }
17
- //#endregion
18
- //#region src/chat/conversations/web-mailbox.ts
17
+ // src/chat/conversations/web-mailbox.ts
19
18
  /** Parse web mailbox metadata written before Source and Actor were complete. */
20
19
  const legacyWebMailboxMetadataSchema = z.object({
21
20
  authorEmail: z.string().email(),
@@ -25,8 +24,7 @@ const legacyWebMailboxMetadataSchema = z.object({
25
24
  kind: z.literal("api_turn"),
26
25
  messageId: z.string().min(1)
27
26
  }).strict();
28
- //#endregion
29
- //#region src/chat/task-execution/mailbox-turn.ts
27
+ // src/chat/task-execution/mailbox-turn.ts
30
28
  /**
31
29
  * Restore Turn input facts, with saved Message fallback for legacy cursors.
32
30
  *
@@ -171,8 +169,7 @@ async function resolveMailboxTurnWork(context) {
171
169
  turnId
172
170
  } : void 0;
173
171
  }
174
- //#endregion
175
- //#region src/chat/agent-invocations/result.ts
172
+ // src/chat/agent-invocations/result.ts
176
173
  var result_exports = /* @__PURE__ */ __exportAll({
177
174
  enqueueAgentInvocationResult: () => enqueueAgentInvocationResult,
178
175
  enqueueAgentMessageToParent: () => enqueueAgentMessageToParent,
@@ -459,5 +456,4 @@ async function withAgentInvocationResultActors(work) {
459
456
  }))
460
457
  };
461
458
  }
462
- //#endregion
463
459
  export { withAgentInvocationResultActors as a, resolveMailboxTurnWork as c, legacyWebMailboxMetadataSchema as d, joinMailboxText as f, startAgentInvocationsForChildInput as i, sourceFromTurnInput as l, enqueueAgentMessageToParent as n, getAuthPausedConversationTurnId as o, result_exports as r, getEventBatchDelayMs as s, enqueueAgentInvocationResult as t, turnInputFactsFromConversationMessage as u };
@@ -1,5 +1,5 @@
1
1
  import "node:module";
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -24,5 +24,4 @@ var __copyProps = (to, from, except, desc) => {
24
24
  return to;
25
25
  };
26
26
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
27
- //#endregion
28
27
  export { __reExport as n, __exportAll as t };
@@ -1,17 +1,17 @@
1
- import { f as logException, w as withLogContext, x as setTags } from "./logging-CWxiIuCF.js";
2
- import { d as getConversationStore, l as getConversationEventStore } from "./viewer-DSZXygMU.js";
3
- import { f as credentialContextForActor } from "./registry-sLTr-sV9.js";
4
- import { $t as buildConversationContext, Gt as persistConversationMessages, It as recordAuthorizationCompleted, Wt as hydrateConversationMessages, an as normalizeConversationText, cn as upsertConversationMessage, et as persistWithRetry, in as markConversationMessage, kt as loadProjection, on as recordDeliveredAssistantMessage, q as saveTurnCheckpoint, wt as commitAcceptedReply } from "./tasks-D_WIJtvO.js";
5
- import { K as messageCardText } from "./conversation-CKNLYBJt.js";
6
- import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-CbTPebzL.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-DUjvzYXj.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-CO-ylUmV.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-Ch4yuCqG.js";
11
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-C5nBKC4S.js";
1
+ import { f as logException, w as withLogContext, x as setTags } from "./logging-DsHONhVm.js";
2
+ import { c as getConversationEventStore, u as getConversationStore } from "./viewer-CGvvRqKp.js";
3
+ import { f as credentialContextForActor } from "./registry-Du566MtJ.js";
4
+ import { $t as buildConversationContext, Gt as persistConversationMessages, It as recordAuthorizationCompleted, Wt as hydrateConversationMessages, an as normalizeConversationText, cn as upsertConversationMessage, et as persistWithRetry, in as markConversationMessage, kt as loadProjection, on as recordDeliveredAssistantMessage, q as saveTurnCheckpoint, wt as commitAcceptedReply } from "./tasks-CEXKTASS.js";
5
+ import { K as messageCardText } from "./conversation-DjN3mlog.js";
6
+ import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-djQn5Nhy.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-H1M-91oF.js";
8
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-D3qJh4fK.js";
9
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-C9JFst7-.js";
10
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-W3f6kAtz.js";
11
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-CWx7aNIh.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
- //#region src/chat/local/runner.ts
14
+ // src/chat/local/runner.ts
15
15
  /**
16
16
  * Local agent turn runtime.
17
17
  *
@@ -399,5 +399,4 @@ async function runLocalAgentTurnInContext(input, deps) {
399
399
  outcome: reply.diagnostics.outcome
400
400
  };
401
401
  }
402
- //#endregion
403
402
  export { runLocalAgentTurn };
@@ -1,5 +1,5 @@
1
- import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-D7OboVb3.js";
2
- //#region src/chat/local/sandbox-egress-signals.ts
1
+ import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-DGsFQw72.js";
2
+ // src/chat/local/sandbox-egress-signals.ts
3
3
  const SANDBOX_EGRESS_SIGNALS_PATH = "/api/internal/sandbox-egress/signals";
4
4
  const LOCAL_DEV_SERVER_TIMEOUT_MS = 1e3;
5
5
  function signalRequest(baseUrl, credentialToken) {
@@ -42,5 +42,4 @@ function createLocalSandboxEgressSignalTransport(baseUrl) {
42
42
  }
43
43
  };
44
44
  }
45
- //#endregion
46
45
  export { createLocalSandboxEgressSignalTransport };
@@ -1,14 +1,13 @@
1
- import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-Bdu3ROfo.js";
2
- import { D as conversationUsageSchema, E as conversationSummaryReportSchema, M as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-CKNLYBJt.js";
3
- import "./automation-CHdlHVZP.js";
4
- import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";
1
+ import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-Qfz7dWgU.js";
2
+ import { D as conversationUsageSchema, E as conversationSummaryReportSchema, M as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-DjN3mlog.js";
3
+ import "./automation-DWBFBenG.js";
4
+ import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-CJSUiksE.js";
5
5
  import { z } from "zod";
6
6
  import { codeChangeStateSchema } from "@sentry/junior-plugin-api";
7
- //#region src/api/schema/common.ts
7
+ // src/api/schema/common.ts
8
8
  /** Stable error body returned by Junior-owned REST endpoints. */
9
9
  const apiErrorSchema = z.object({ error: z.string().min(1) }).strict();
10
- //#endregion
11
- //#region src/api/schema/conversation-stop.ts
10
+ // src/api/schema/conversation-stop.ts
12
11
  /** One queued web message from the viewer that a stop removed. */
13
12
  const stoppedConversationMessageSchema = z.object({
14
13
  inboundMessageId: z.string().min(1),
@@ -27,8 +26,7 @@ const stopConversationTurnResponseSchema = z.object({
27
26
  stoppedInboundMessageIds: z.array(z.string().min(1)),
28
27
  stoppedMessages: z.array(stoppedConversationMessageSchema)
29
28
  }).strict();
30
- //#endregion
31
- //#region src/api/schema/child-agent.ts
29
+ // src/api/schema/child-agent.ts
32
30
  /**
33
31
  * One direct child agent of a Conversation, from agent invocation records.
34
32
  *
@@ -64,8 +62,7 @@ const conversationChildAgentsReportSchema = z.object({
64
62
  agents: z.array(conversationChildAgentSchema),
65
63
  conversationId: z.string().min(1)
66
64
  }).strict();
67
- //#endregion
68
- //#region src/api/schema/code.ts
65
+ // src/api/schema/code.ts
69
66
  const codeChangeSummarySchema = z.object({
70
67
  closed: z.number().int().nonnegative(),
71
68
  costUsd: z.number().nonnegative().optional(),
@@ -152,8 +149,7 @@ const codePersonReportSchema = z.object({
152
149
  windowEnd: z.string(),
153
150
  windowStart: z.string()
154
151
  }).strict();
155
- //#endregion
156
- //#region src/api/schema/connection.ts
152
+ // src/api/schema/connection.ts
157
153
  const connectionSchema = z.object({
158
154
  provider: z.string(),
159
155
  displayName: z.string(),
@@ -168,8 +164,7 @@ const connectionListSchema = z.object({ connections: z.array(connectionSchema) }
168
164
  const connectionParamsSchema = z.object({ provider: z.string().regex(/^[a-z][a-z0-9-]*$/).max(64) }).strict();
169
165
  const startConnectionResponseSchema = z.object({ authorizationUrl: z.string().url() }).strict();
170
166
  const disconnectConnectionResponseSchema = z.object({ disconnected: z.literal(true) }).strict();
171
- //#endregion
172
- //#region src/api/activity.ts
167
+ // src/api/activity.ts
173
168
  const dailyConversationActivitySchema = z.object({
174
169
  active: z.number(),
175
170
  conversations: z.number(),
@@ -221,8 +216,7 @@ function activitySixHours(hours, nowMs) {
221
216
  nowMs
222
217
  });
223
218
  }
224
- //#endregion
225
- //#region src/api/schema/location.ts
219
+ // src/api/schema/location.ts
226
220
  const locationParamsSchema = z.object({ locationId: z.string().min(1) }).strict();
227
221
  const locationSummaryReportSchema = conversationStatsItemSchema.extend({
228
222
  id: z.string(),
@@ -263,8 +257,7 @@ const locationDetailReportSchema = locationSummaryReportSchema.extend({
263
257
  windowEnd: z.string(),
264
258
  windowStart: z.string()
265
259
  }).strict();
266
- //#endregion
267
- //#region src/api/schema/person.ts
260
+ // src/api/schema/person.ts
268
261
  const personParamsSchema = z.object({ email: z.string().trim().min(1) }).strict();
269
262
  const peopleConversationStatsItemSchema = conversationStatsItemSchema.omit({ costUsd: true });
270
263
  /** UTC day (`YYYY-MM-DD`) or hour (`YYYY-MM-DDTHH`) activity bucket key. */
@@ -344,8 +337,7 @@ const personalSpendReportSchema = z.object({
344
337
  windowEnd: z.string(),
345
338
  windowStart: z.string()
346
339
  }).strict();
347
- //#endregion
348
- //#region src/api/schema/personal-token.ts
340
+ // src/api/schema/personal-token.ts
349
341
  const personalTokenMetadataSchema = z.object({
350
342
  id: z.string().uuid(),
351
343
  name: z.string(),
@@ -359,8 +351,7 @@ const createPersonalTokenBodySchema = z.object({ name: z.string().trim().min(1).
359
351
  const createdPersonalTokenSchema = personalTokenMetadataSchema.extend({ token: z.string().startsWith("jr_pat_") }).strict();
360
352
  const personalTokenParamsSchema = z.object({ id: z.string().uuid() }).strict();
361
353
  const revokePersonalTokenResponseSchema = z.object({ revoked: z.literal(true) }).strict();
362
- //#endregion
363
- //#region src/api/schema/workspace.ts
354
+ // src/api/schema/workspace.ts
364
355
  const workspaceRepoInputSchema = z.object({
365
356
  provider: z.string(),
366
357
  repo: z.string()
@@ -401,8 +392,7 @@ const workspaceBodySchema = z.object({
401
392
  }).strict();
402
393
  const workspaceParamsSchema = z.object({ id: z.string().uuid() }).strict();
403
394
  const deleteWorkspaceResponseSchema = z.object({ deleted: z.literal(true) }).strict();
404
- //#endregion
405
- //#region src/api/schema/stats.ts
395
+ // src/api/schema/stats.ts
406
396
  const statSchema = z.object({
407
397
  count: z.number().int().nonnegative(),
408
398
  date: z.string(),
@@ -416,5 +406,4 @@ const statsReportSchema = z.object({
416
406
  windowEnd: z.string(),
417
407
  windowStart: z.string()
418
408
  }).strict();
419
- //#endregion
420
409
  export { connectionSchema as A, codeRepositorySummarySchema as B, locationParamsSchema as C, dailyConversationActivitySchema as D, activitySixHours as E, codeChangeSummarySchema as F, conversationChildAgentsReportSchema as H, codeOverviewReportSchema as I, codePersonReportSchema as L, startConnectionResponseSchema as M, codeActivityDaySchema as N, connectionListSchema as O, codeChangeSummaryReportSchema as P, codeRepositoryParamsSchema as R, locationDirectoryReportSchema as S, activityHours as T, stopConversationTurnResponseSchema as U, conversationChildAgentSchema as V, apiErrorSchema as W, actorProfileReportSchema as _, workspaceBodySchema as a, locationActivityDayReportSchema as b, workspaceRepoSchema as c, createdPersonalTokenSchema as d, personalTokenListSchema as f, actorDirectoryReportSchema as g, revokePersonalTokenResponseSchema as h, deleteWorkspaceResponseSchema as i, disconnectConnectionResponseSchema as j, connectionParamsSchema as k, workspaceSchema as l, personalTokenParamsSchema as m, statsReportSchema as n, workspaceListSchema as o, personalTokenMetadataSchema as p, baselineSnapshotSchema as r, workspaceParamsSchema as s, statSchema as t, createPersonalTokenBodySchema as u, personParamsSchema as v, activityDays as w, locationDetailReportSchema as x, personalSpendReportSchema as y, codeRepositoryReportSchema as z };
@@ -1,6 +1,6 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
2
  import { captureException, captureMessage, continueTrace, flush, getActiveSpan, getClient, getGlobalScope, getTraceData, init, logger, setTag, setUser, spanToJSON, startInactiveSpan, startSpan, startSpanManual, vercelAIIntegration, withActiveSpan, withScope, withStreamedSpan } from "@sentry/node";
3
- //#region src/chat/sentry.ts
3
+ // src/chat/sentry.ts
4
4
  var sentry_exports = /* @__PURE__ */ __exportAll({
5
5
  captureException: () => captureException,
6
6
  captureMessage: () => captureMessage,
@@ -23,5 +23,4 @@ var sentry_exports = /* @__PURE__ */ __exportAll({
23
23
  withScope: () => withScope,
24
24
  withStreamedSpan: () => withStreamedSpan
25
25
  });
26
- //#endregion
27
26
  export { vercelAIIntegration as _, getClient as a, withStreamedSpan as b, init as c, setTag as d, setUser as f, startSpanManual as g, startSpan as h, getActiveSpan as i, logger as l, startInactiveSpan as m, captureMessage as n, getGlobalScope as o, spanToJSON as p, continueTrace as r, getTraceData as s, captureException as t, sentry_exports as u, withActiveSpan as v, withScope as y };
@@ -1,20 +1,20 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { f as logException, m as logWarn, p as logInfo } from "./logging-CWxiIuCF.js";
3
- import { n as botConfig } from "./config-CJRnWK9H.js";
4
- import { d as getConversationStore, p as getSqlExecutor } from "./viewer-DSZXygMU.js";
5
- import { s as juniorConversations } from "./agent-invocations-Bdu3ROfo.js";
6
- import "./executor-Do0THDRR.js";
7
- import { h as credentialSubjectSchema } from "./registry-sLTr-sV9.js";
8
- import { B as postSlackMessage, Ct as ToolInputError, _t as isToolResultMessage, gt as isToolResultError, mt as isAssistantMessage, vt as normalizeToolNameFromResult } from "./tasks-D_WIJtvO.js";
9
- import { it as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-BjtTzvru.js";
10
- import { w as getStateAdapter } from "./profile-h-72wM78.js";
11
- import { r as sanitizeAssistantText } from "./assistant-reply-CbTPebzL.js";
12
- import { r as EVENT_AUTHOR_ID } from "./prompt-DyoEj9c2.js";
13
- import { r as appendAndEnqueueInboundMessage } from "./store-DXFIQy-G.js";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.js";
2
+ import { f as logException, m as logWarn, p as logInfo } from "./logging-DsHONhVm.js";
3
+ import { n as botConfig } from "./config-_WO_AjCB.js";
4
+ import { f as getSqlExecutor, u as getConversationStore } from "./viewer-CGvvRqKp.js";
5
+ import { s as juniorConversations } from "./agent-invocations-Qfz7dWgU.js";
6
+ import "./executor-RvG6kVe1.js";
7
+ import { h as credentialSubjectSchema } from "./registry-Du566MtJ.js";
8
+ import { B as postSlackMessage, Ct as ToolInputError, _t as isToolResultMessage, gt as isToolResultError, mt as isAssistantMessage, vt as normalizeToolNameFromResult } from "./tasks-CEXKTASS.js";
9
+ import { it as JUNIOR_THREAD_STATE_TTL_MS, rt as verifyTimerWatchCredentialSubject, u as getPlugins } from "./agent-hooks-BJ_5mlRH.js";
10
+ import { w as getStateAdapter } from "./profile-DpYjfKke.js";
11
+ import { r as sanitizeAssistantText } from "./assistant-reply-H1M-91oF.js";
12
+ import { r as EVENT_AUTHOR_ID } from "./prompt-xgpyMtg7.js";
13
+ import { r as appendAndEnqueueInboundMessage } from "./store-DJLwq4x8.js";
14
14
  import { z } from "zod";
15
15
  import { eq, inArray } from "drizzle-orm";
16
16
  import { eventMatchFieldsSchema, eventMatchSchema, normalizeEventIdentifier, objectTypeSchema } from "@sentry/junior-plugin-api";
17
- //#region src/chat/automation-result.ts
17
+ // src/chat/automation-result.ts
18
18
  /**
19
19
  * Automation run result.
20
20
  *
@@ -104,8 +104,7 @@ function remindMissingAutomationResult(messages) {
104
104
  timestamp: Date.now()
105
105
  }];
106
106
  }
107
- //#endregion
108
- //#region src/chat/services/automated-turn-limit.ts
107
+ // src/chat/services/automated-turn-limit.ts
109
108
  const AUTOMATED_TURN_LIMIT_PREFIX = "junior:automated_turn_limit:v1";
110
109
  const AUTOMATED_TURN_LIMIT_LOCK_TTL_MS = 5e3;
111
110
  const AUTOMATED_TURN_LIMIT_LOCK_WAIT_MS = 2e3;
@@ -272,8 +271,7 @@ async function recordFinishedTurnForAutomatedLimit(args) {
272
271
  state: args.state
273
272
  });
274
273
  }
275
- //#endregion
276
- //#region src/chat/slack/automated-turn-limit-notice.ts
274
+ // src/chat/slack/automated-turn-limit-notice.ts
277
275
  /**
278
276
  * Pause notice for the consecutive automated-turn limit.
279
277
  *
@@ -328,8 +326,7 @@ async function maybePostAutomatedTurnLimitNotice(args) {
328
326
  threadTs: args.threadTs
329
327
  });
330
328
  }
331
- //#endregion
332
- //#region src/chat/task-input.ts
329
+ // src/chat/task-input.ts
333
330
  /**
334
331
  * Shared closing lines. Automations pass outcomes and end with a declared
335
332
  * result. Watches pass no outcomes and reply in the Conversation.
@@ -376,8 +373,7 @@ function renderTaskInput(args) {
376
373
  lines.push("", ...replyContractLines(args.outcomes));
377
374
  return lines.join("\n");
378
375
  }
379
- //#endregion
380
- //#region src/chat/events/catalog.ts
376
+ // src/chat/events/catalog.ts
381
377
  /** Core-owned event namespace. Not a plugin publisher. */
382
378
  const CORE_EVENT_NAMESPACE = "junior";
383
379
  /** True when the catalog has any enabled registration. */
@@ -468,8 +464,7 @@ function requireEventIdentifier(catalog, input) {
468
464
  const fitting = resourceTypes.filter(fits).map((candidate) => candidate.type);
469
465
  throw new ToolInputError([`Identifier "${identifier}" does not fit resourceType "${input.resourceType}" in namespace "${input.namespace}". Expected format: "${resourceType.identifier.format}".`, ...fitting.length > 0 ? [`If the identifier is correct, use one of these resourceType values: ${fitting.map((type) => `"${type}"`).join(", ")}.`] : []].join(" "));
470
466
  }
471
- //#endregion
472
- //#region src/chat/sandbox/snapshot/events.ts
467
+ // src/chat/sandbox/snapshot/events.ts
473
468
  const WORKSPACE_SNAPSHOT_NAMESPACE = CORE_EVENT_NAMESPACE;
474
469
  const WORKSPACE_SNAPSHOT_RESOURCE_TYPE = "workspace_snapshot";
475
470
  const WORKSPACE_SNAPSHOT_READY_EVENT = "workspace_snapshot.ready";
@@ -523,8 +518,7 @@ function workspaceSnapshotFinishedEvent(input) {
523
518
  if (input.status === "failed" && input.error) event.untrustedText = input.error;
524
519
  return event;
525
520
  }
526
- //#endregion
527
- //#region src/chat/slack/channel-message-events.ts
521
+ // src/chat/slack/channel-message-events.ts
528
522
  /**
529
523
  * Slack channel-message Events for Event automations.
530
524
  *
@@ -622,8 +616,7 @@ function slackChannelMessageReplyThreadTs(event) {
622
616
  const messageTs = event.data?.messageTs;
623
617
  return typeof messageTs === "string" ? messageTs : void 0;
624
618
  }
625
- //#endregion
626
- //#region src/chat/events/runtime-catalog.ts
619
+ // src/chat/events/runtime-catalog.ts
627
620
  /**
628
621
  * Enabled event registrations for search, guidance, and tool schemas.
629
622
  *
@@ -648,8 +641,7 @@ function getEventCatalog() {
648
641
  }
649
642
  return catalog;
650
643
  }
651
- //#endregion
652
- //#region src/chat/events/notification.ts
644
+ // src/chat/events/notification.ts
653
645
  const EVENT_WAIT_MS = 3e4;
654
646
  /**
655
647
  * Render the runtime-owned conversation message for a subscribed event.
@@ -773,8 +765,7 @@ async function enqueueEventNotification(args) {
773
765
  state: args.state
774
766
  });
775
767
  }
776
- //#endregion
777
- //#region src/chat/conversations/session-stop.ts
768
+ // src/chat/conversations/session-stop.ts
778
769
  var session_stop_exports = /* @__PURE__ */ __exportAll({
779
770
  getConversationStoppedAtMs: () => getConversationStoppedAtMs,
780
771
  markConversationsStopped: () => markConversationsStopped,
@@ -807,5 +798,4 @@ async function skipInputBeforeConversationStop(context) {
807
798
  await context.attempt.ack();
808
799
  return { status: "completed" };
809
800
  }
810
- //#endregion
811
801
  export { maybePostAutomatedTurnLimitNotice as A, pluginSupportsEvent as C, requireEventIdentifier as D, registeredResourceTypeSchema as E, deliversFinalText as F, finishedRunReply as I, readAutomationResult as L, resetAutomatedTurnLimit as M, FINISH_AUTOMATION_RUN_TOOL_NAME as N, requireSupportedEventMatch as O, automationResultSchema as P, remindMissingAutomationResult as R, hasEventCatalogEntries as S, registeredEventTypeSchema as T, workspaceSnapshotFinishedEvent as _, EVENT_WAIT_MS as a, eventGuidance as b, timerWatchCredentialSubject as c, requireSlackChannelMessageScope as d, slackChannelMessageEvent as f, WORKSPACE_SNAPSHOT_READY_EVENT as g, WORKSPACE_SNAPSHOT_FAILED_EVENT as h, skipInputBeforeConversationStop as i, recordFinishedTurnForAutomatedLimit as j, renderTaskInput as k, getEventCatalog as l, slackChannelMessageRunsAutomation as m, markConversationsStopped as n, enqueueEventNotification as o, slackChannelMessageReplyThreadTs as p, session_stop_exports as r, isEventMailboxMetadata as s, getConversationStoppedAtMs as t, SLACK_EVENT_NAMESPACE as u, workspaceSnapshotWatch as v, registeredEventMatchSchema as w, eventNamespaceSchema as x, automationEventCatalog as y, runDispatchOutcome as z };