@sentry/junior 0.252.0 → 0.254.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 (61) hide show
  1. package/dist/{admin-C_-XEdym.js → admin-D7kYbu5l.js} +1 -1
  2. package/dist/{agent-hooks-DcoKnnxn.js → agent-hooks-DfPubHYm.js} +9 -9
  3. package/dist/{agent-invocations-D_YoNnAn.js → agent-invocations-BY60iNw-.js} +0 -4
  4. package/dist/{agent-runner-B-7S_DCS.js → agent-runner-BWmnJ0dD.js} +21 -21
  5. package/dist/api/schema.js +1 -1
  6. package/dist/api.js +23 -23
  7. package/dist/app.js +113 -83
  8. package/dist/{assistant-reply-DbPLvsnL.js → assistant-reply-B3J6ogAM.js} +1 -1
  9. package/dist/{briefs-D4SMqc-r.js → briefs-B_fgUFD2.js} +2 -2
  10. package/dist/{catalog-runtime-BQQiwwA7.js → catalog-runtime-TG5WF66H.js} +1 -1
  11. package/dist/cli/chat.js +15 -15
  12. package/dist/cli/check.js +3 -3
  13. package/dist/cli/main.js +2 -2
  14. package/dist/cli/plugins.js +4 -4
  15. package/dist/cli/snapshot-create.js +3 -3
  16. package/dist/cli/upgrade.js +3 -3
  17. package/dist/{client-ROZeVjq0.js → client-oBgOmQV6.js} +2 -2
  18. package/dist/{config-DNNkxfGS.js → config-CRlLncIj.js} +2 -2
  19. package/dist/{connections-DJV6mLrH.js → connections-BZAuDnYm.js} +9 -9
  20. package/dist/{conversation-privacy-B19umzIL.js → conversation-privacy-Dui3hTO-.js} +1 -1
  21. package/dist/{credential-sync-CEd2F5PS.js → credential-sync-9HiSpphh.js} +14 -14
  22. package/dist/{executor-_4bdoCxe.js → executor-B88oEqok.js} +41 -92
  23. package/dist/{images-BAN7DHuO.js → images-k8HewSp_.js} +2 -2
  24. package/dist/instrumentation.js +2 -2
  25. package/dist/{job-queue-DSQx1qFY.js → job-queue-B6KaQXY6.js} +1 -1
  26. package/dist/{logging-COUsTFIL.js → logging-B3nJLXT7.js} +1 -1
  27. package/dist/{message-CtDDEwwV.js → message-C9Wx3Rxx.js} +3 -3
  28. package/dist/nitro.js +3 -3
  29. package/dist/{oauth-callback-server-CCiKrS0s.js → oauth-callback-server-CetsCZng.js} +2 -2
  30. package/dist/{pending-auth-DDx3EU4M.js → pending-auth-m8aJlwP_.js} +2 -2
  31. package/dist/{profile-DP4LKL6V.js → profile-Dh73O6lZ.js} +4 -4
  32. package/dist/{registry-CeEpPna6.js → registry-C-jns0Be.js} +1 -1
  33. package/dist/{resolve-B5ma3igH.js → resolve-CDYCpS_U.js} +2 -2
  34. package/dist/{result-Da0RVuWG.js → result-sih-x_yN.js} +6 -6
  35. package/dist/{runner-se1W_jGZ.js → runner-CA43p74t.js} +9 -9
  36. package/dist/{sandbox-egress-signals-CS959-wm.js → sandbox-egress-signals-CxHHTu8e.js} +1 -1
  37. package/dist/{schema-C9Vnyb_f.js → schema-C-a9U34c.js} +1 -1
  38. package/dist/{session-stop-DlRDisF5.js → session-stop-DenN1GuJ.js} +11 -11
  39. package/dist/{skills-CSzgs0EC.js → skills-D_XDFkSx.js} +2 -2
  40. package/dist/{spawn-DT9fMjtd.js → spawn-CcWYt3Tl.js} +2 -2
  41. package/dist/{store-Dx1U69mm.js → store-CIs0Tr31.js} +6 -6
  42. package/dist/{task-queue-BX9YrIsw.js → task-queue-DAY-aQLX.js} +3 -3
  43. package/dist/{task-runner-CO55Olal.js → task-runner-BE6Jgt2u.js} +145 -127
  44. package/dist/{tasks-DwGlFX9i.js → tasks-DO9VM9cu.js} +15 -26
  45. package/dist/{thread-state-Ces6tXmB.js → thread-state-FreaCOZD.js} +7 -7
  46. package/dist/{turn-failure-response-B4VCvEQf.js → turn-failure-response-CJSt2ZSf.js} +7 -7
  47. package/dist/{turn-lifecycle-B1VV58Yo.js → turn-lifecycle-BXclEcfZ.js} +1 -1
  48. package/dist/{turn-session-routing-Dw2Kamg9.js → turn-session-routing-CItfUsjQ.js} +1 -1
  49. package/dist/{validation-yJF9LKOv.js → validation-MW8dmhF9.js} +1 -1
  50. package/dist/{version-CZYqvIFh.js → version-DcWD8xpq.js} +1 -1
  51. package/dist/version.js +1 -1
  52. package/dist/{viewer-D96vo_42.js → viewer-CGZiUVMU.js} +4 -13
  53. package/dist/{web-input-5mls-41-.js → web-input-Dpqh0oBt.js} +44 -52
  54. package/dist/{work-D2M2-zCO.js → work-DbA9xNO1.js} +9 -9
  55. package/dist/{worker-BwCpf8tB.js → worker-DuCs9-3G.js} +5 -5
  56. package/migrations/0056_automation_runs.sql +69 -0
  57. package/migrations/0057_drop_legacy_automation_tables.sql +10 -0
  58. package/migrations/meta/0056_snapshot.json +4280 -0
  59. package/migrations/meta/0057_snapshot.json +3618 -0
  60. package/migrations/meta/_journal.json +15 -1
  61. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import { r as completeObject } from "./client-ROZeVjq0.js";
1
+ import { r as completeObject } from "./client-oBgOmQV6.js";
2
2
  import { r as defaultModelId } from "./model-profile-BwU8mqwD.js";
3
3
  import { U as parseBriefInput, d as conversationDetailReportSchema, p as conversationEventPageSchema, z as briefCodeChangeSchema } from "./conversation-T18Xlkx9.js";
4
4
  import { n as briefEntriesFromReportEvents, s as generateBrief, t as BRIEF_PROMPT } from "./prompt-C04mP1hu.js";
@@ -269,7 +269,7 @@ async function parseRunOptions(argv) {
269
269
  * `DATABASE_URL` at import, and `briefs pull` must work with only a token.
270
270
  */
271
271
  async function configuredDefaultModelId() {
272
- const { botConfig } = await import("./config-DNNkxfGS.js").then((n) => n.r);
272
+ const { botConfig } = await import("./config-CRlLncIj.js").then((n) => n.r);
273
273
  return defaultModelId(botConfig);
274
274
  }
275
275
  function apiUrl(baseUrl, pathname) {
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { t as createPluginCatalogRuntime } from "./registry-CeEpPna6.js";
2
+ import { t as createPluginCatalogRuntime } from "./registry-C-jns0Be.js";
3
3
  //#region src/chat/plugins/catalog-runtime.ts
4
4
  var catalog_runtime_exports = /* @__PURE__ */ __exportAll({ pluginCatalogRuntime: () => pluginCatalogRuntime });
5
5
  const pluginCatalogRuntime = createPluginCatalogRuntime();
package/dist/cli/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-B-7S_DCS.js";
1
+ import { n as executeAgentRun, t as createAgentRunner } from "../agent-runner-BWmnJ0dD.js";
2
2
  import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
3
3
  import path from "node:path";
4
4
  import { createHash, randomUUID } from "node:crypto";
@@ -100,10 +100,10 @@ async function loadLocalPluginSet() {
100
100
  async function configureLocalChatPlugins(pluginSet) {
101
101
  const [pluginsModule, agentHooksModule, catalogRuntimeModule, validationModule, databaseModule] = await Promise.all([
102
102
  import("../plugins-egKWjgue.js").then((n) => n.o),
103
- import("../agent-hooks-DcoKnnxn.js").then((n) => n.t),
104
- import("../catalog-runtime-BQQiwwA7.js").then((n) => n.t),
105
- import("../validation-yJF9LKOv.js").then((n) => n.r),
106
- import("../viewer-D96vo_42.js").then((n) => n.s)
103
+ import("../agent-hooks-DfPubHYm.js").then((n) => n.t),
104
+ import("../catalog-runtime-TG5WF66H.js").then((n) => n.t),
105
+ import("../validation-MW8dmhF9.js").then((n) => n.r),
106
+ import("../viewer-CGZiUVMU.js").then((n) => n.s)
107
107
  ]);
108
108
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
109
109
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
@@ -155,19 +155,19 @@ async function prepareLocalChatRun(io, pluginSet) {
155
155
  await configureLocalChatPlugins(pluginSet);
156
156
  const { setExperimentalFeatures } = await import("../experimental-Qn9rKLgx.js").then((n) => n.t);
157
157
  setExperimentalFeatures({ subagents: true });
158
- const { setBriefsConfig } = await import("../agent-hooks-DcoKnnxn.js").then((n) => n.m);
158
+ const { setBriefsConfig } = await import("../agent-hooks-DfPubHYm.js").then((n) => n.m);
159
159
  setBriefsConfig({ enabled: true });
160
- const { runLocalAgentTurn } = await import("../runner-se1W_jGZ.js");
161
- const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CCiKrS0s.js");
160
+ const { runLocalAgentTurn } = await import("../runner-CA43p74t.js");
161
+ const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CetsCZng.js");
162
162
  const { createLocalOAuthState } = await import("../oauth-relay-CdCnu80W.js").then((n) => n.t);
163
- const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CS959-wm.js");
164
- const { bindSpawnAgent } = await import("../spawn-DT9fMjtd.js").then((n) => n.n);
165
- const { bindMessageAgent } = await import("../message-CtDDEwwV.js").then((n) => n.n);
166
- const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-D2M2-zCO.js").then((n) => n.a);
167
- const { startAgentInvocationsForChildInput } = await import("../result-Da0RVuWG.js").then((n) => n.r);
168
- const { skipInputBeforeConversationStop } = await import("../session-stop-DlRDisF5.js").then((n) => n.r);
163
+ const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-CxHHTu8e.js");
164
+ const { bindSpawnAgent } = await import("../spawn-CcWYt3Tl.js").then((n) => n.n);
165
+ const { bindMessageAgent } = await import("../message-C9Wx3Rxx.js").then((n) => n.n);
166
+ const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-DbA9xNO1.js").then((n) => n.a);
167
+ const { startAgentInvocationsForChildInput } = await import("../result-sih-x_yN.js").then((n) => n.r);
168
+ const { skipInputBeforeConversationStop } = await import("../session-stop-DenN1GuJ.js").then((n) => n.r);
169
169
  const { createLocalConversationWork } = await import("../conversation-work-C6y3T5Hx.js");
170
- const { processConversationWork } = await import("../worker-BwCpf8tB.js").then((n) => n.n);
170
+ const { processConversationWork } = await import("../worker-DuCs9-3G.js").then((n) => n.n);
171
171
  let agentRunner;
172
172
  const localConversationWork = createLocalConversationWork(async (message) => {
173
173
  if (!agentRunner) throw new Error("Local agent runner is not ready");
package/dist/cli/check.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-COUsTFIL.js";
2
- import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-CeEpPna6.js";
3
- import { i as parseSkillFile } from "../skills-CSzgs0EC.js";
1
+ import { D as JUNIOR_HEARTBEAT_ROUTE, M as LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE } from "../logging-B3nJLXT7.js";
2
+ import { _ as parsePluginManifest, g as parseInlinePluginManifest } from "../registry-C-jns0Be.js";
3
+ import { i as parseSkillFile } from "../skills-D_XDFkSx.js";
4
4
  import path from "node:path";
5
5
  import fs from "node:fs/promises";
6
6
  import { pathToFileURL } from "node:url";
package/dist/cli/main.js CHANGED
@@ -25,10 +25,10 @@ async function runChat(argv, pluginSet) {
25
25
  return await (await import("./chat.js")).runChat(argv, void 0, { pluginSet });
26
26
  }
27
27
  async function runAdmin(argv) {
28
- return await (await import("../admin-C_-XEdym.js")).runAdmin(argv);
28
+ return await (await import("../admin-D7kYbu5l.js")).runAdmin(argv);
29
29
  }
30
30
  async function runBriefs(argv) {
31
- return await (await import("../briefs-D4SMqc-r.js")).runBriefs(argv);
31
+ return await (await import("../briefs-B_fgUFD2.js")).runBriefs(argv);
32
32
  }
33
33
  function topLevelCommand(argv) {
34
34
  return (argv[0] === "--" ? argv.slice(1) : argv)[0];
@@ -1,7 +1,7 @@
1
- import { d as getDb } from "../viewer-D96vo_42.js";
2
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BQQiwwA7.js";
3
- import { d as setPlugins, f as validatePlugins, ft as createPluginLogger } from "../agent-hooks-DcoKnnxn.js";
4
- import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-yJF9LKOv.js";
1
+ import { d as getDb } from "../viewer-CGZiUVMU.js";
2
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-TG5WF66H.js";
3
+ import { d as setPlugins, f as validatePlugins, ft as createPluginLogger } from "../agent-hooks-DfPubHYm.js";
4
+ import { n as validatePluginRegistrations, t as validatePluginEgressCredentialHooks } from "../validation-MW8dmhF9.js";
5
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, i as pluginCliRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "../plugins-egKWjgue.js";
6
6
  import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
7
7
  import { stderr, stdout } from "node:process";
@@ -1,6 +1,6 @@
1
- import { n as pluginCatalogRuntime } from "../catalog-runtime-BQQiwwA7.js";
2
- import { S as disconnectStateAdapter, t as create } from "../profile-DP4LKL6V.js";
3
- import { r as resolve } from "../resolve-B5ma3igH.js";
1
+ import { n as pluginCatalogRuntime } from "../catalog-runtime-TG5WF66H.js";
2
+ import { S as disconnectStateAdapter, t as create } from "../profile-Dh73O6lZ.js";
3
+ import { r as resolve } from "../resolve-CDYCpS_U.js";
4
4
  //#region src/cli/snapshot-create.ts
5
5
  const DEFAULT_RUNTIME = "node22";
6
6
  const DEFAULT_TIMEOUT_MS = 6e5;
@@ -1,6 +1,6 @@
1
- import { i as getChatConfig } from "../config-DNNkxfGS.js";
2
- import { t as createJuniorSqlExecutor } from "../executor-_4bdoCxe.js";
3
- import { t as createPluginCatalogRuntime } from "../registry-CeEpPna6.js";
1
+ import { i as getChatConfig } from "../config-CRlLncIj.js";
2
+ import { t as createJuniorSqlExecutor } from "../executor-B88oEqok.js";
3
+ import { t as createPluginCatalogRuntime } from "../registry-C-jns0Be.js";
4
4
  import { n as pluginCatalogConfigFromEnv, r as pluginCatalogConfigFromPluginSet, t as defineJuniorPlugins } from "../plugins-egKWjgue.js";
5
5
  import { t as loadAppPluginSet } from "../plugin-module-CVvEUSMH.js";
6
6
  import { basename, dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
- import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-COUsTFIL.js";
2
- import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-B19umzIL.js";
1
+ import { d as logException, g as serializeGenAiAttribute, i as extractGenAiUsageAttributes, m as normalizeGenAiFinishReason, p as logWarn, w as withSpan } from "./logging-B3nJLXT7.js";
2
+ import { a as toCanonicalInputMessage, n as getCurrentConversationPrivacy, o as toCanonicalOutputMessage, s as toGenAiMessagesTraceAttributes } from "./conversation-privacy-Dui3hTO-.js";
3
3
  import { calculateCost, completeSimple, getEnvApiKey, getModels, registerApiProvider } from "@earendil-works/pi-ai/compat";
4
4
  import { stream as streamAnthropic, streamSimple as streamSimpleAnthropic } from "@earendil-works/pi-ai/api/anthropic-messages";
5
5
  import { createGatewayProvider } from "@ai-sdk/gateway";
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-ROZeVjq0.js";
3
- import { p as logWarn } from "./logging-COUsTFIL.js";
2
+ import { S as toOptionalTrimmed, o as resolveGatewayModel } from "./client-oBgOmQV6.js";
3
+ import { p as logWarn } from "./logging-B3nJLXT7.js";
4
4
  import { l as TURN_REASONING_LEVELS, s as modelProfileSchema, t as DEFAULT_MODEL_PROFILES, u as parseTurnReasoningLevel } from "./model-profile-BwU8mqwD.js";
5
5
  //#region src/chat/slack/emoji.ts
6
6
  const SLACK_EMOJI_NAME_RE = /^(?:[a-z0-9_+-]+)(?:::(?:skin-tone-[2-6]))?$/;
@@ -1,12 +1,12 @@
1
- import { It as startOAuthFlow, c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-B-7S_DCS.js";
2
- import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, f as getSqlExecutor } from "./viewer-D96vo_42.js";
3
- import { u as hasRequiredOAuthScope } from "./registry-CeEpPna6.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BQQiwwA7.js";
5
- import { Q as getTurnRecord, Z as failTurnRecord, q as loadTurnCheckpoint } from "./tasks-DwGlFX9i.js";
6
- import { w as getStateAdapter } from "./profile-DP4LKL6V.js";
7
- import { a as getVercelConversationWorkQueue } from "./job-queue-DSQx1qFY.js";
8
- import { m as ensureConversationWake, w as requestConversationWork } from "./store-Dx1U69mm.js";
9
- import { n as resolveTurnSessionRouting } from "./turn-session-routing-Dw2Kamg9.js";
1
+ import { It as startOAuthFlow, c as deleteMcpAuthSessionsForUserProvider, l as deleteMcpServerSessionId, u as deleteMcpStoredOAuthCredentials } from "./agent-runner-BWmnJ0dD.js";
2
+ import { D as deleteProviderIdentityForSlackUser, c as getConversationEventStore, f as getSqlExecutor } from "./viewer-CGZiUVMU.js";
3
+ import { u as hasRequiredOAuthScope } from "./registry-C-jns0Be.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-TG5WF66H.js";
5
+ import { Q as getTurnRecord, Z as failTurnRecord, q as loadTurnCheckpoint } from "./tasks-DO9VM9cu.js";
6
+ import { w as getStateAdapter } from "./profile-Dh73O6lZ.js";
7
+ import { a as getVercelConversationWorkQueue } from "./job-queue-B6KaQXY6.js";
8
+ import { m as ensureConversationWake, w as requestConversationWork } from "./store-CIs0Tr31.js";
9
+ import { n as resolveTurnSessionRouting } from "./turn-session-routing-CItfUsjQ.js";
10
10
  import { z } from "zod";
11
11
  import { randomBytes, randomUUID } from "node:crypto";
12
12
  //#region src/chat/task-execution/authorized-turn.ts
@@ -1,4 +1,4 @@
1
- import { p as logWarn } from "./logging-COUsTFIL.js";
1
+ import { p as logWarn } from "./logging-B3nJLXT7.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/chat/conversation-privacy.ts
4
4
  const SAFE_METADATA_KEY_LIMIT = 20;
@@ -1,19 +1,19 @@
1
- import { Ft as resolveBaseUrl, Lt as createUserTokenStore, Nt as formatProviderLabel, Pt as parseOAuthStatePayload, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, xt as getMcpProviderErrorAttributes } from "./agent-runner-B-7S_DCS.js";
2
- import { f as escapeXml } from "./client-ROZeVjq0.js";
3
- import { d as logException, h as runBestEffort, p as logWarn } from "./logging-COUsTFIL.js";
4
- import { a as getRuntimeMetadata, n as botConfig } from "./config-DNNkxfGS.js";
1
+ import { Ft as resolveBaseUrl, Lt as createUserTokenStore, Nt as formatProviderLabel, Pt as parseOAuthStatePayload, _ as resolvePluginOAuthAccount, d as getMcpAuthSession, f as getMcpStoredOAuthCredentials, o as finalizeMcpAuthorization, p as putMcpStoredOAuthCredentials, s as deleteMcpAuthSession, x as lookupSlackUserProfile, xt as getMcpProviderErrorAttributes } from "./agent-runner-BWmnJ0dD.js";
2
+ import { f as escapeXml } from "./client-oBgOmQV6.js";
3
+ import { d as logException, h as runBestEffort, p as logWarn } from "./logging-B3nJLXT7.js";
4
+ import { a as getRuntimeMetadata, n as botConfig } from "./config-CRlLncIj.js";
5
5
  import { f as parseSlackUserId } from "./actor-BTtLaeWy.js";
6
- import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-D96vo_42.js";
6
+ import { A as upsertIdentity, f as getSqlExecutor, j as upsertLinkedIdentity } from "./viewer-CGZiUVMU.js";
7
7
  import { i as homeDir } from "./package-discovery-BVvSnQBB.js";
8
- import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-CeEpPna6.js";
9
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BQQiwwA7.js";
10
- import { t as discoverSkills } from "./skills-CSzgs0EC.js";
11
- import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-DwGlFX9i.js";
12
- import { Ht as getSlackClient } from "./agent-hooks-DcoKnnxn.js";
13
- import { E as acquireActiveLock, w as getStateAdapter } from "./profile-DP4LKL6V.js";
14
- import { i as getConversationPendingAuth } from "./pending-auth-DDx3EU4M.js";
15
- import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-Ces6tXmB.js";
16
- import { c as deleteWebAuthorization, f as wakeAuthorizedTurn, i as readConnectedOAuthTokens, p as wakePausedTurn } from "./connections-DJV6mLrH.js";
8
+ import { n as buildOAuthTokenRequest, r as parseOAuthTokenResponse, u as hasRequiredOAuthScope } from "./registry-C-jns0Be.js";
9
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-TG5WF66H.js";
10
+ import { t as discoverSkills } from "./skills-D_XDFkSx.js";
11
+ import { It as recordAuthenticationLinked, Lt as recordAuthorizationCompleted, Q as getTurnRecord, V as postSlackMessage } from "./tasks-DO9VM9cu.js";
12
+ import { Ht as getSlackClient } from "./agent-hooks-DfPubHYm.js";
13
+ import { E as acquireActiveLock, w as getStateAdapter } from "./profile-Dh73O6lZ.js";
14
+ import { i as getConversationPendingAuth } from "./pending-auth-m8aJlwP_.js";
15
+ import { r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-FreaCOZD.js";
16
+ import { c as deleteWebAuthorization, f as wakeAuthorizedTurn, i as readConnectedOAuthTokens, p as wakePausedTurn } from "./connections-BZAuDnYm.js";
17
17
  import { n as relayLocalOAuthCallback } from "./oauth-relay-CdCnu80W.js";
18
18
  import path from "node:path";
19
19
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
- import { d as logException } from "./logging-COUsTFIL.js";
1
+ import { d as logException } from "./logging-B3nJLXT7.js";
2
2
  import { g as startSpanManual } from "./sentry-CgWZM_kV.js";
3
- import "./config-DNNkxfGS.js";
4
- import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-D_YoNnAn.js";
3
+ import "./config-CRlLncIj.js";
4
+ import { a as juniorAgentInvocations, c as juniorIdentities, d as juniorDestinations, f as timestamptz, i as juniorAgentBindings, l as juniorUsers, s as juniorConversations } from "./agent-invocations-BY60iNw-.js";
5
5
  import { AsyncLocalStorage } from "node:async_hooks";
6
6
  import { sql } from "drizzle-orm";
7
7
  import { bigint, boolean, check, date, doublePrecision, foreignKey, index, integer, jsonb, pgTable, primaryKey, text, uniqueIndex, uuid } from "drizzle-orm/pg-core";
@@ -278,19 +278,6 @@ const juniorLocationConfigurations = pgTable("junior_location_configurations", {
278
278
  expiresAt: text("expires_at")
279
279
  }, (table) => [primaryKey({ columns: [table.locationId, table.key] })]);
280
280
  //#endregion
281
- //#region src/db/schema/event-automations.ts
282
- const juniorEventAutomations = pgTable("junior_event_tasks", {
283
- id: text("id").primaryKey(),
284
- teamId: text("team_id").notNull(),
285
- namespace: text("namespace").notNull(),
286
- identifier: text("identifier").notNull(),
287
- createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
288
- status: text("status").notNull().default("active"),
289
- statusReason: text("status_reason"),
290
- title: text("title"),
291
- task: jsonb("task_json").notNull()
292
- }, (table) => [index("junior_event_tasks_team_idx").on(table.teamId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`), index("junior_event_tasks_match_idx").on(table.namespace, table.identifier, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`)]);
293
- //#endregion
294
281
  //#region src/db/schema/stats.ts
295
282
  /**
296
283
  * Daily named counters used by Junior and loaded plugins.
@@ -313,37 +300,6 @@ const juniorStats = pgTable("junior_stats", {
313
300
  ]
314
301
  })]);
315
302
  //#endregion
316
- //#region src/db/schema/automation-executions.ts
317
- /** One terminal automation execution linked to its durable conversation when present. */
318
- const juniorAutomationExecutions = pgTable("junior_task_executions", {
319
- executionId: text("execution_id").notNull(),
320
- kind: text("kind").notNull(),
321
- namespace: text("namespace").notNull(),
322
- automationId: text("task_id").notNull(),
323
- conversationId: text("conversation_id"),
324
- executedAtMs: bigint("executed_at_ms", { mode: "number" }).notNull(),
325
- status: text("status").$type().notNull()
326
- }, (table) => [
327
- check("junior_task_executions_kind_check", sql`${table.kind} in ('scheduled', 'event')`),
328
- check("junior_task_executions_status_check", sql`${table.status} in ('blocked', 'completed', 'failed')`),
329
- primaryKey({
330
- name: "junior_task_executions_kind_namespace_execution_id_pk",
331
- columns: [
332
- table.kind,
333
- table.namespace,
334
- table.executionId
335
- ]
336
- }),
337
- foreignKey({
338
- name: "junior_task_executions_conversation_id_junior_conversations_conversation_id_fk",
339
- columns: [table.conversationId],
340
- foreignColumns: [juniorConversations.conversationId]
341
- }),
342
- index("junior_task_executions_task_time_idx").on(table.kind, table.namespace, table.automationId, table.executedAtMs),
343
- index("junior_task_executions_time_kind_idx").on(table.executedAtMs, table.kind),
344
- index("junior_task_executions_conversation_time_idx").on(table.conversationId, table.executedAtMs)
345
- ]);
346
- //#endregion
347
303
  //#region src/db/schema/automations.ts
348
304
  /**
349
305
  * One row per Automation of either kind. `record` holds the fields that have
@@ -383,10 +339,37 @@ const juniorAutomations = pgTable("junior_automations", {
383
339
  index("junior_automations_match_idx").on(table.namespace, table.identifier, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`)
384
340
  ]);
385
341
  //#endregion
342
+ //#region src/db/schema/automation-runs.ts
343
+ /**
344
+ * One dispatch of an Automation, from claim or dispatch to its outcome. A
345
+ * Scheduled automation run id is `<automation id>:<scheduled time>`. An event
346
+ * automation run id is its dispatch id. Automation code sets
347
+ * `conversation_id` when it dispatches the run. A run that was skipped, or
348
+ * that failed before dispatch, has no Conversation.
349
+ */
350
+ const juniorAutomationRuns = pgTable("junior_automation_runs", {
351
+ id: text("id").primaryKey(),
352
+ automationId: text("automation_id").notNull().references(() => juniorAutomations.id, { onDelete: "cascade" }),
353
+ conversationId: text("conversation_id").unique().references(() => juniorConversations.conversationId),
354
+ status: text("status").$type().notNull(),
355
+ scheduledForMs: bigint("scheduled_for_ms", { mode: "number" }),
356
+ attempt: integer("attempt"),
357
+ claimedAtMs: bigint("claimed_at_ms", { mode: "number" }),
358
+ dispatchId: text("dispatch_id"),
359
+ startedAtMs: bigint("started_at_ms", { mode: "number" }),
360
+ completedAtMs: bigint("completed_at_ms", { mode: "number" }),
361
+ errorMessage: text("error_message"),
362
+ resultMessageTs: text("result_message_ts")
363
+ }, (table) => [
364
+ check("junior_automation_runs_status_check", sql`${table.status} in ('pending', 'running', 'completed', 'failed', 'blocked', 'skipped')`),
365
+ index("junior_automation_runs_automation_idx").on(table.automationId, table.completedAtMs),
366
+ index("junior_automation_runs_completed_idx").on(table.completedAtMs),
367
+ index("junior_automation_runs_incomplete_idx").on(table.automationId, table.scheduledForMs).where(sql`${table.status} in ('pending', 'running')`)
368
+ ]);
369
+ //#endregion
386
370
  //#region src/db/schema/automation-versions.ts
387
371
  /** One saved Automation definition. Lifecycle and scheduler state are not versioned. */
388
372
  const juniorAutomationVersions = pgTable("junior_automation_versions", {
389
- kind: text("kind").$type(),
390
373
  automationId: text("automation_id").notNull(),
391
374
  /** Starts at 1 and increases by 1 for each saved definition change. */
392
375
  version: integer("version").notNull(),
@@ -394,45 +377,14 @@ const juniorAutomationVersions = pgTable("junior_automation_versions", {
394
377
  /** Slack principal that saved this definition. Null when unknown. */
395
378
  editedBy: jsonb("edited_by"),
396
379
  definition: jsonb("definition").notNull()
397
- }, (table) => [
398
- check("junior_automation_versions_kind_check", sql`${table.kind} in ('scheduled', 'event')`),
399
- primaryKey({
400
- name: "junior_automation_versions_pk",
401
- columns: [table.automationId, table.version]
402
- }),
403
- foreignKey({
404
- name: "junior_automation_versions_automation_id_fk",
405
- columns: [table.automationId],
406
- foreignColumns: [juniorAutomations.id]
407
- }).onDelete("cascade")
408
- ]);
409
- //#endregion
410
- //#region src/db/schema/scheduled-automations.ts
411
- const juniorSchedulerTasks = pgTable("junior_scheduler_tasks", {
412
- id: text("id").primaryKey(),
413
- teamId: text("team_id").notNull(),
414
- creatorSlackUserId: text("creator_slack_user_id"),
415
- creatorIdentityId: text("creator_identity_id"),
416
- status: text("status").notNull(),
417
- nextRunAtMs: bigint("next_run_at_ms", { mode: "number" }),
418
- runNowAtMs: bigint("run_now_at_ms", { mode: "number" }),
419
- createdAtMs: bigint("created_at_ms", { mode: "number" }).notNull(),
420
- title: text("title"),
421
- record: jsonb("record").notNull()
422
- }, (table) => [
423
- index("junior_scheduler_tasks_creator_idx").on(table.teamId, table.creatorSlackUserId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`),
424
- index("junior_scheduler_tasks_creator_identity_idx").on(table.creatorIdentityId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted' AND ${table.creatorIdentityId} IS NOT NULL`),
425
- index("junior_scheduler_tasks_team_status_idx").on(table.teamId, table.createdAtMs, table.id).where(sql`${table.status} <> 'deleted'`),
426
- index("junior_scheduler_tasks_run_now_due_idx").on(table.runNowAtMs, table.createdAtMs, table.id).where(sql`${table.status} = 'active' AND ${table.runNowAtMs} IS NOT NULL`),
427
- index("junior_scheduler_tasks_next_run_due_idx").on(table.nextRunAtMs, table.createdAtMs, table.id).where(sql`${table.status} = 'active' AND ${table.nextRunAtMs} IS NOT NULL`)
428
- ]);
429
- const juniorSchedulerRuns = pgTable("junior_scheduler_runs", {
430
- id: text("id").primaryKey(),
431
- taskId: text("task_id").notNull(),
432
- status: text("status").notNull(),
433
- scheduledForMs: bigint("scheduled_for_ms", { mode: "number" }).notNull(),
434
- record: jsonb("record").$type().notNull()
435
- }, (table) => [index("junior_scheduler_runs_task_status_idx").on(table.taskId, table.status, table.scheduledForMs), index("junior_scheduler_runs_status_idx").on(table.status, table.scheduledForMs)]);
380
+ }, (table) => [primaryKey({
381
+ name: "junior_automation_versions_pk",
382
+ columns: [table.automationId, table.version]
383
+ }), foreignKey({
384
+ name: "junior_automation_versions_automation_id_fk",
385
+ columns: [table.automationId],
386
+ foreignColumns: [juniorAutomations.id]
387
+ }).onDelete("cascade")]);
436
388
  //#endregion
437
389
  //#region src/db/schema/workspaces.ts
438
390
  /** Named recipe used to prepare a reusable Sandbox. */
@@ -507,15 +459,12 @@ const juniorSqlSchema = {
507
459
  juniorConversations,
508
460
  juniorLocationConfigurations,
509
461
  juniorDestinations,
510
- juniorEventAutomations,
511
462
  juniorIdentities,
512
463
  juniorSnapshots,
513
464
  juniorStats,
514
- juniorAutomationExecutions,
465
+ juniorAutomationRuns,
515
466
  juniorAutomationVersions,
516
467
  juniorAutomations,
517
- juniorSchedulerRuns,
518
- juniorSchedulerTasks,
519
468
  juniorUsers,
520
469
  juniorWorkspaceRepos,
521
470
  juniorWorkspaces
@@ -1058,4 +1007,4 @@ function createJuniorSqlExecutor(args) {
1058
1007
  });
1059
1008
  }
1060
1009
  //#endregion
1061
- export { juniorArtifacts as S, juniorApiTokens as _, juniorSchedulerRuns as a, juniorCodeRepositories as b, juniorAutomationExecutions as c, juniorConversationParticipants as d, juniorConversationBindings as f, juniorConversationEvents as g, juniorConversationMetrics as h, juniorWorkspaces as i, juniorStats as l, CONVERSATION_METRICS as m, juniorSnapshots as n, juniorAutomationVersions as o, juniorConversationBriefs as p, juniorWorkspaceRepos as r, juniorAutomations as s, createJuniorSqlExecutor as t, juniorLocationConfigurations as u, juniorConversationAnnotations as v, juniorAttachments as x, juniorCodeChanges as y };
1010
+ export { juniorConversationAnnotations as _, juniorAutomationVersions as a, juniorAttachments as b, juniorStats as c, juniorConversationBindings as d, juniorConversationBriefs as f, juniorApiTokens as g, juniorConversationEvents as h, juniorWorkspaces as i, juniorLocationConfigurations as l, juniorConversationMetrics as m, juniorSnapshots as n, juniorAutomationRuns as o, CONVERSATION_METRICS as p, juniorWorkspaceRepos as r, juniorAutomations as s, createJuniorSqlExecutor as t, juniorConversationParticipants as u, juniorCodeChanges as v, juniorArtifacts as x, juniorCodeRepositories as y };
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-B-7S_DCS.js";
3
- import { f as getSqlExecutor } from "./viewer-D96vo_42.js";
2
+ import { D as storeAttachment, T as readLiveAttachment } from "./agent-runner-BWmnJ0dD.js";
3
+ import { f as getSqlExecutor } from "./viewer-CGZiUVMU.js";
4
4
  import { L as detectImageMediaType } from "./conversation-T18Xlkx9.js";
5
5
  //#region src/chat/attachments/images.ts
6
6
  var images_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
- import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-COUsTFIL.js";
1
+ import { N as getDeploymentServiceVersion, P as getDeploymentTelemetryAttributes } from "./logging-B3nJLXT7.js";
2
2
  import { _ as vercelAIIntegration, a as getClient, b as withStreamedSpan, c as init, o as getGlobalScope } from "./sentry-CgWZM_kV.js";
3
- import { n as getCurrentConversationPrivacy } from "./conversation-privacy-B19umzIL.js";
3
+ import { n as getCurrentConversationPrivacy } from "./conversation-privacy-Dui3hTO-.js";
4
4
  import { t as consumePrivateTraceResultMarker } from "./private-trace-result-BLvBjy_e.js";
5
5
  //#region src/chat/sentry-payload-filter.ts
6
6
  const PAYLOAD_ATTRIBUTE_KEYS = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { i as getChatConfig } from "./config-DNNkxfGS.js";
1
+ import { i as getChatConfig } from "./config-CRlLncIj.js";
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  import { z } from "zod";
4
4
  import { createHash, createHmac, timingSafeEqual } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  import { d as setTag, f as setUser, h as startSpan, i as getActiveSpan, l as logger, n as captureMessage, p as spanToJSON, s as getTraceData, t as captureException, y as withScope } from "./sentry-CgWZM_kV.js";
2
- import { t as JUNIOR_VERSION } from "./version-CZYqvIFh.js";
2
+ import { t as JUNIOR_VERSION } from "./version-DcWD8xpq.js";
3
3
  import path from "node:path";
4
4
  import { styleText } from "node:util";
5
5
  import { ConfigError, configureSync, getConfig, getLogger } from "@logtape/logtape";
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
2
- import { Ht as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Vt as actorFromRun, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET } from "./agent-runner-B-7S_DCS.js";
3
- import { n as enqueueAgentMessageToParent } from "./result-Da0RVuWG.js";
4
- import { r as enqueueAgentInvocation } from "./work-D2M2-zCO.js";
2
+ import { Ht as toolInvocationDestination, Q as getActiveAgentInvocationForConversation, Vt as actorFromRun, Y as createAgentInvocationForMessage, Z as findChildAgentConversationId, _t as AgentMessageTargetError, vt as PARENT_AGENT_TARGET } from "./agent-runner-BWmnJ0dD.js";
3
+ import { n as enqueueAgentMessageToParent } from "./result-sih-x_yN.js";
4
+ import { r as enqueueAgentInvocation } from "./work-DbA9xNO1.js";
5
5
  //#region src/chat/agent-invocations/message.ts
6
6
  var message_exports = /* @__PURE__ */ __exportAll({ bindMessageAgent: () => bindMessageAgent });
7
7
  /**
package/dist/nitro.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-COUsTFIL.js";
1
+ import { A as JUNIOR_RETENTION_ROUTE, D as JUNIOR_HEARTBEAT_ROUTE, E as JUNIOR_HEARTBEAT_CRON_SCHEDULE, O as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, T as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, j as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, k as JUNIOR_RETENTION_CRON_SCHEDULE } from "./logging-B3nJLXT7.js";
2
2
  import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-BVvSnQBB.js";
3
- import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-DSQx1qFY.js";
3
+ import { o as resolveConversationWorkQueueTopic, t as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC } from "./job-queue-B6KaQXY6.js";
4
4
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-egKWjgue.js";
5
- import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-BX9YrIsw.js";
5
+ import { t as PLUGIN_TASK_QUEUE_TOPIC } from "./task-queue-DAY-aQLX.js";
6
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-CVvEUSMH.js";
7
7
  import path from "node:path";
8
8
  import { cpSync, existsSync, mkdirSync, readdirSync, statSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { Lt as createUserTokenStore } from "./agent-runner-B-7S_DCS.js";
2
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-CEd2F5PS.js";
1
+ import { Lt as createUserTokenStore } from "./agent-runner-BWmnJ0dD.js";
2
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-9HiSpphh.js";
3
3
  import { createServer } from "node:http";
4
4
  //#region src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
- import { v as isProviderRetryError } from "./client-ROZeVjq0.js";
2
- import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-DwGlFX9i.js";
1
+ import { v as isProviderRetryError } from "./client-oBgOmQV6.js";
2
+ import { Y as abandonTurnRecord, un as estimateTextTokens } from "./tasks-DO9VM9cu.js";
3
3
  import { r as isExperimentalFeatureEnabled } from "./experimental-Qn9rKLgx.js";
4
4
  import { z } from "zod";
5
5
  //#region src/chat/state/turn-id.ts
@@ -1,7 +1,7 @@
1
- import { S as toOptionalTrimmed } from "./client-ROZeVjq0.js";
2
- import { v as setSpanAttributes, y as setSpanStatus } from "./logging-COUsTFIL.js";
3
- import { i as getChatConfig } from "./config-DNNkxfGS.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BQQiwwA7.js";
1
+ import { S as toOptionalTrimmed } from "./client-oBgOmQV6.js";
2
+ import { v as setSpanAttributes, y as setSpanStatus } from "./logging-B3nJLXT7.js";
3
+ import { i as getChatConfig } from "./config-CRlLncIj.js";
4
+ import { n as pluginCatalogRuntime } from "./catalog-runtime-TG5WF66H.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
7
7
  import { createRedisState } from "@chat-adapter/state-redis";
@@ -1,4 +1,4 @@
1
- import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-COUsTFIL.js";
1
+ import { f as logInfo, p as logWarn, v as setSpanAttributes } from "./logging-B3nJLXT7.js";
2
2
  import { o as parseActorUserId } from "./actor-BTtLaeWy.js";
3
3
  import { n as normalizePluginPackageNames, o as pluginRoots, t as discoverInstalledPluginPackageContent } from "./package-discovery-BVvSnQBB.js";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
- import { v as setSpanAttributes, w as withSpan } from "./logging-COUsTFIL.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-DP4LKL6V.js";
1
+ import { v as setSpanAttributes, w as withSpan } from "./logging-B3nJLXT7.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-Dh73O6lZ.js";
3
3
  import { z } from "zod";
4
4
  import { FileSystem, Sandbox } from "@vercel/sandbox";
5
5
  //#region src/chat/sandbox/resources.ts
@@ -1,12 +1,12 @@
1
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-B-7S_DCS.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-BWmnJ0dD.js";
3
3
  import { t as createActor } from "./actor-BTtLaeWy.js";
4
- import { d as credentialContextForActor } from "./registry-CeEpPna6.js";
5
- import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DwGlFX9i.js";
6
- import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-DlRDisF5.js";
4
+ import { d as credentialContextForActor } from "./registry-C-jns0Be.js";
5
+ import { $ as listTurnSummaries, Q as getTurnRecord } from "./tasks-DO9VM9cu.js";
6
+ import { a as EVENT_WAIT_MS, c as timerWatchCredentialSubject, s as isEventMailboxMetadata } from "./session-stop-DenN1GuJ.js";
7
7
  import { a as EVENT_SYSTEM_ACTOR, i as EVENT_MESSAGE_AUTHOR, o as isEventConversationMessage } from "./prompt-C04mP1hu.js";
8
- import { r as appendAndEnqueueInboundMessage } from "./store-Dx1U69mm.js";
9
- import { r as enqueueAgentInvocation } from "./work-D2M2-zCO.js";
8
+ import { r as appendAndEnqueueInboundMessage } from "./store-CIs0Tr31.js";
9
+ import { r as enqueueAgentInvocation } from "./work-DbA9xNO1.js";
10
10
  import { z } from "zod";
11
11
  import { createEventSource, createLocalSource, createWebSource } from "@sentry/junior-plugin-api";
12
12
  //#region src/chat/task-execution/mailbox-input.ts
@@ -1,14 +1,14 @@
1
- import { C as withLogContext, b as setTags, d as logException } from "./logging-COUsTFIL.js";
2
- import { c as getConversationEventStore, u as getConversationStore } from "./viewer-D96vo_42.js";
3
- import { d as credentialContextForActor } from "./registry-CeEpPna6.js";
4
- import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-DwGlFX9i.js";
1
+ import { C as withLogContext, b as setTags, d as logException } from "./logging-B3nJLXT7.js";
2
+ import { c as getConversationEventStore, u as getConversationStore } from "./viewer-CGZiUVMU.js";
3
+ import { d as credentialContextForActor } from "./registry-C-jns0Be.js";
4
+ import { At as loadProjection, Gt as hydrateConversationMessages, J as saveTurnCheckpoint, Kt as persistConversationMessages, Lt as recordAuthorizationCompleted, Tt as commitAcceptedReply, an as markConversationMessage, en as buildConversationContext, ln as upsertConversationMessage, on as normalizeConversationText, sn as recordDeliveredAssistantMessage, tt as persistWithRetry } from "./tasks-DO9VM9cu.js";
5
5
  import { K as messageCardText } from "./conversation-T18Xlkx9.js";
6
6
  import { f as markTurnFailed, p as startActiveTurn, t as authorizationId } from "./oauth-authorization-BA4Dt6a7.js";
7
- import { n as getAssistantReplyText } from "./assistant-reply-DbPLvsnL.js";
8
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-CO55Olal.js";
9
- import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-B1VV58Yo.js";
10
- import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-Ces6tXmB.js";
11
- import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-B4VCvEQf.js";
7
+ import { n as getAssistantReplyText } from "./assistant-reply-B3J6ogAM.js";
8
+ import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BE6Jgt2u.js";
9
+ import { t as ConversationTurnLifecycleService } from "./turn-lifecycle-BXclEcfZ.js";
10
+ import { n as getPersistedSandboxState, o as persistThreadStateById, r as getPersistedThreadState, s as coerceThreadConversationState } from "./thread-state-FreaCOZD.js";
11
+ import { d as loadPendingMessageCards, i as completeAuthPauseTurn, l as buildDeliveredTurnStatePatch, t as finalizeFailedTurnReplyWithEvent } from "./turn-failure-response-CJSt2ZSf.js";
12
12
  import { randomUUID } from "node:crypto";
13
13
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
14
14
  //#region src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-B-7S_DCS.js";
1
+ import { Mt as sandboxEgressSignalsResponseSchema } from "./agent-runner-BWmnJ0dD.js";
2
2
  //#region 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;
@@ -1,4 +1,4 @@
1
- import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-D_YoNnAn.js";
1
+ import { r as AGENT_INVOCATION_STATUSES, u as juniorDestinationKindSchema } from "./agent-invocations-BY60iNw-.js";
2
2
  import { D as conversationUsageSchema, E as conversationSummaryReportSchema, M as conversationChildAgentTotalsSchema, l as conversationAuxiliaryCostsSchema, n as actorIdentitySchema, w as conversationStatsItemSchema } from "./conversation-T18Xlkx9.js";
3
3
  import "./automation-gznOMaQ2.js";
4
4
  import { a as fillUtcHours, c as sumUtcHoursIntoSixHours, i as fillUtcDays } from "./web-message-id-xPI_EFSC.js";