@sentry/junior 0.318.0 → 0.320.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 (94) hide show
  1. package/dist/{context-BKF_5zzI.js → adapter-DlLLoJKj.js} +537 -537
  2. package/dist/{admin-UOHix_5P.js → admin-BzRXDVfh.js} +1 -1
  3. package/dist/{agent-runner-DeYymwh2.js → agent-DxZ7nHfD.js} +19866 -6720
  4. package/dist/{agent-status-BA5x3Xtp.js → agent-status-Bq_AIpyp.js} +105 -1
  5. package/dist/{agent-update-delivery-DH8bx7jU.js → agent-update-delivery-CO4FU5Gg.js} +4 -5
  6. package/dist/api/schema.d.ts +45 -23
  7. package/dist/api/schema.js +4 -4
  8. package/dist/api.js +79 -84
  9. package/dist/{app-DKAOuaoC.d.ts → app-CHCFIIDu.d.ts} +5 -4
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +119 -194
  12. package/dist/{change-record-BzJgLsv7.d.ts → change-record-K-KsqNhT.d.ts} +9 -5
  13. package/dist/{channel-access-A0de5lRv.js → channel-access-BghWqlXx.js} +1 -1
  14. package/dist/{chat-core-engine-D3Wd7f5n.js → chat-core-engine-BgfSLrDu.js} +31 -14
  15. package/dist/cli/chat.d.ts +1 -1
  16. package/dist/cli/chat.js +23 -23
  17. package/dist/cli/check.js +5 -5
  18. package/dist/cli/main.js +2 -2
  19. package/dist/cli/plugins.d.ts +1 -1
  20. package/dist/cli/plugins.js +8 -8
  21. package/dist/cli/snapshot-create.js +5 -5
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -4
  24. package/dist/{continue-in-slack-YxwMQVeR.js → continue-in-slack-DBlQP4PC.js} +3 -3
  25. package/dist/{conversation-feed-Cj7IuBtM.js → conversation-feed-DEUdD7mb.js} +2 -106
  26. package/dist/{conversation-privacy-Cr_dNW1p.js → conversation-privacy-qoh95v90.js} +1 -1
  27. package/dist/{create-Btl1y1rq.js → create-jZSaDrCR.js} +115 -5
  28. package/dist/{credential-sync-DTarZ63K.js → credential-sync-Bj9-UlNE.js} +15 -18
  29. package/dist/{db-of6e3sGt.js → db-BacvswT0.js} +4602 -727
  30. package/dist/{deployment-C0qXa0FD.js → deployment-BoJkRPDt.js} +3 -3
  31. package/dist/{engine-context-C_QL_bMQ.js → engine-context-Bi3Ync5t.js} +521 -150
  32. package/dist/{html-9_pS9SjY.js → html-DW0pw5Pr.js} +6 -8
  33. package/dist/instrumentation.js +7 -23
  34. package/dist/list-Dz3CdP3g.js +5016 -0
  35. package/dist/{logging-BnOG0qz2.js → logging-DsTnMqyi.js} +8 -33
  36. package/dist/{mailbox-turn-Byrry9o1.js → markers-C33gNYNE.js} +1705 -1284
  37. package/dist/nitro.d.ts +2 -2
  38. package/dist/nitro.js +6 -7
  39. package/dist/{oauth-callback-server-CjnnUr4o.js → oauth-callback-server-C-pEhAQK.js} +2 -2
  40. package/dist/{oauth-relay-BvHFH0fV.js → oauth-relay-DIXdH-io.js} +1 -1
  41. package/dist/{plugins-fBrz8PCV.d.ts → plugins-DhGXZjlu.d.ts} +1 -0
  42. package/dist/{profile-iHw1uu32.js → profile-v9vA3RvH.js} +16 -18
  43. package/dist/{prompt-DEkStuxG.js → prompt-C5CW2wKO.js} +1 -1
  44. package/dist/{reports-C1d9azyV.js → reports-eBgrhPXS.js} +2 -2
  45. package/dist/{resolve-DC6zBuDV.js → resolve-HVXmbeCr.js} +5 -5
  46. package/dist/{result-DxewDuXb.js → result-BPNzgeTl.js} +20 -9
  47. package/dist/{runner-99YxVN_r.js → runner-aNSDTST6.js} +7 -8
  48. package/dist/{sandbox-egress-signals-CgoX5CTI.js → sandbox-egress-signals-nzp9Ykf7.js} +1 -1
  49. package/dist/{schema-BTojNBr5.js → schema-BlTO5M1d.js} +16 -8
  50. package/dist/{service-account-YDCPSByj.js → service-account-DWIf1t6p.js} +4 -5
  51. package/dist/{skills-CleC0Hze.js → skills-50izzzdK.js} +9 -9
  52. package/dist/{slack-conversation-unfurl-BNQLC12R.js → slack-conversation-unfurl-C6jXhVYg.js} +7 -7
  53. package/dist/storage-BtCxXiNt.js +273 -0
  54. package/dist/{system-prompt-table-Ci6Ck4gk.js → system-prompt-table-CIR1B44Z.js} +27 -85
  55. package/dist/topic-B2EWKKBT.js +6 -0
  56. package/dist/{package-discovery-DD9vencX.js → topics-DxuKurCX.js} +21 -1
  57. package/dist/{types-DCzTAA63.js → types-BNHkJrOP.js} +25 -11
  58. package/dist/{users-Cb9c1k9q.js → users-DOVo9sdU.js} +1 -1
  59. package/dist/{validation-BiUmWPhy.js → validation-CK0vuEHB.js} +4 -4
  60. package/dist/{version-VEXiEcZu.js → version-BuLVNlxB.js} +1 -1
  61. package/dist/version.js +1 -1
  62. package/dist/{worker-ChWYQdhm.js → worker-C82kHU1R.js} +4 -4
  63. package/migrations/20261127052408_space_name_nullable/migration.sql +5 -0
  64. package/migrations/20261127052408_space_name_nullable/snapshot.json +29 -0
  65. package/migrations/20261127060000_annotation_object_id_index/migration.sql +1 -0
  66. package/migrations/20261127060000_annotation_object_id_index/snapshot.json +69 -0
  67. package/migrations/20261127060001_annotation_subjects/migration.sql +78 -0
  68. package/migrations/20261127060001_annotation_subjects/snapshot.json +104 -0
  69. package/migrations/20261127060002_annotation_subject_index/migration.sql +1 -0
  70. package/migrations/20261127060002_annotation_subject_index/snapshot.json +70 -0
  71. package/migrations/20261127060003_annotation_title_url/migration.sql +84 -0
  72. package/migrations/20261127060003_annotation_title_url/snapshot.json +73 -0
  73. package/migrations/20261127150242_drop_space_members/migration.sql +9 -0
  74. package/migrations/20261127150242_drop_space_members/snapshot.json +53 -0
  75. package/package.json +9 -7
  76. package/dist/auth-pause-state-f9hJM_zO.js +0 -113
  77. package/dist/catalog-runtime-BfdAnztW.js +0 -6
  78. package/dist/child-message-peFWLcCZ.js +0 -15
  79. package/dist/conversation-turn-Bru4w_FD.js +0 -1250
  80. package/dist/job-runner-B2XEvpif.js +0 -1505
  81. package/dist/lineage-nh4z9iQN.js +0 -36
  82. package/dist/list-HRP3TIRl.js +0 -12631
  83. package/dist/markers-CTTtJqYn.js +0 -342
  84. package/dist/message-BRUuLgrY.js +0 -153
  85. package/dist/model-input-CFC62mf-.js +0 -82
  86. package/dist/registry-Cl7Labpe.js +0 -3279
  87. package/dist/run-conversation-Cz2ubZK-.js +0 -337
  88. package/dist/sender-actors-77zTQbSG.js +0 -84
  89. package/dist/spawn-DuZfodPa.js +0 -45
  90. package/dist/task-runner-BJ9Up3bG.js +0 -1529
  91. package/dist/topic-CRYYBYp-.js +0 -7
  92. package/dist/topics-BoCkoPJJ.js +0 -21
  93. package/dist/turn-membership-VT7XZh-L.js +0 -856
  94. package/dist/turn-wake-C7HeLHAM.js +0 -151
package/dist/nitro.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { n as JuniorPluginSet } from "./plugins-fBrz8PCV.js";
2
- import { r as JuniorDashboardOptions } from "./app-DKAOuaoC.js";
1
+ import { n as JuniorPluginSet } from "./plugins-DhGXZjlu.js";
2
+ import { r as JuniorDashboardOptions } from "./app-CHCFIIDu.js";
3
3
  import { withSentryConfig as withSentryConfig$1 } from "@sentry/nitro";
4
4
  type SentryNitroConfig = Parameters<typeof withSentryConfig$1>[0];
5
5
  type SentryNitroOptions = NonNullable<Parameters<typeof withSentryConfig$1>[1]>;
package/dist/nitro.js CHANGED
@@ -1,8 +1,7 @@
1
- import { a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, i as PLUGIN_TASK_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as toOptionalTrimmed, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./topics-BoCkoPJJ.js";
1
+ import { _ as toOptionalTrimmed, a as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, g as resolvePackageDir, h as isValidPackageName, i as PLUGIN_TASK_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as discoverInstalledPluginPackageContent, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./topics-DxuKurCX.js";
2
2
  import { t as startLocalVercelQueueServer } from "./local-server-CpnGhYml.js";
3
- import { n as TURN_STEP_TOPIC, t as DELIVERY_TOPIC } from "./topic-CRYYBYp-.js";
4
- import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_HEARTBEAT_ROUTE, d as JUNIOR_RETENTION_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_DELIVERY_CALLBACK_ROUTE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_CRON_SCHEDULE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_CRON_SCHEDULE } from "./deployment-C0qXa0FD.js";
5
- import { d as resolvePackageDir, t as discoverInstalledPluginPackageContent, u as isValidPackageName } from "./package-discovery-DD9vencX.js";
3
+ import { n as TURN_STEP_TOPIC, t as TURN_ENDED_TOPIC } from "./topic-B2EWKKBT.js";
4
+ import { a as JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE, c as JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE, d as JUNIOR_TURN_ENDED_CALLBACK_ROUTE, f as JUNIOR_TURN_STEP_CALLBACK_ROUTE, g as getDeploymentServiceVersion, i as JUNIOR_CONTEXT_COMPACTION_CALLBACK_ROUTE, l as JUNIOR_RETENTION_CRON_SCHEDULE, n as JUNIOR_AUTO_ARCHIVE_ROUTE, o as JUNIOR_HEARTBEAT_CRON_SCHEDULE, p as JUNIOR_WORKSPACE_SNAPSHOT_JOB_CALLBACK_ROUTE, r as JUNIOR_CACHE_WARMUP_CALLBACK_ROUTE, s as JUNIOR_HEARTBEAT_ROUTE, t as JUNIOR_AUTO_ARCHIVE_CRON_SCHEDULE, u as JUNIOR_RETENTION_ROUTE } from "./deployment-BoJkRPDt.js";
6
5
  import { a as pluginRuntimeRegistrationsFromPluginSet, r as pluginCatalogConfigFromPluginSet } from "./plugins-D_Ru4CWc.js";
7
6
  import { n as loadPluginSetFromModule, r as resolvePluginModule } from "./plugin-module-Cv2ETe8Y.js";
8
7
  import path from "node:path";
@@ -41,8 +40,8 @@ function queueCallbackRoutes() {
41
40
  topic: TURN_STEP_TOPIC
42
41
  },
43
42
  {
44
- route: JUNIOR_DELIVERY_CALLBACK_ROUTE,
45
- topic: DELIVERY_TOPIC
43
+ route: JUNIOR_TURN_ENDED_CALLBACK_ROUTE,
44
+ topic: TURN_ENDED_TOPIC
46
45
  }
47
46
  ];
48
47
  }
@@ -253,7 +252,7 @@ function injectVirtualConfig(nitro, options) {
253
252
  */
254
253
  function injectVirtualSystemPrompts(nitro, options) {
255
254
  nitro.options.virtual["#junior/system-prompts"] = async () => {
256
- const { buildSystemPromptTable } = await import("./system-prompt-table-Ci6Ck4gk.js").then((n) => n.r);
255
+ const { buildSystemPromptTable } = await import("./system-prompt-table-CIR1B44Z.js").then((n) => n.r);
257
256
  const table = await buildSystemPromptTable(await options.loadPlugins(), options.botName);
258
257
  return `export const systemPrompts = ${JSON.stringify(table)};`;
259
258
  };
@@ -1,5 +1,5 @@
1
- import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DTarZ63K.js";
2
- import { A as createUserTokenStore } from "./profile-iHw1uu32.js";
1
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-Bj9-UlNE.js";
2
+ import { A as createUserTokenStore } from "./profile-v9vA3RvH.js";
3
3
  import { createServer } from "node:http";
4
4
  // src/chat/local/oauth-callback-server.ts
5
5
  const LOCAL_OAUTH_TIMEOUT_MS = 6e5;
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { R as getChatConfig } from "./context-BKF_5zzI.js";
2
+ import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
3
3
  import * as z from "zod";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { SignJWT, jwtVerify } from "jose";
@@ -67,6 +67,7 @@ interface PluginManifestConfig {
67
67
  oauthClient?: PluginMcpConfig["oauthClient"];
68
68
  allowedTools?: string[] | null;
69
69
  wrappedTools?: string[] | null;
70
+ viewerTools?: string[] | null;
70
71
  } | null;
71
72
  oauth?: PluginOAuthConfigPatch | null;
72
73
  accounts?: {
@@ -1,9 +1,7 @@
1
- import { C as acquireActiveLock, R as getChatConfig, S as MUTATION_LOCK_TTL_MS, T as withLock, i as credentialLogContext, o as credentialUserSubjectId, r as credentialContextSchema, y as getStateAdapter } from "./context-BKF_5zzI.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BfdAnztW.js";
3
- import { $i as runNonInteractiveCommand, Ct as getPlugins, Vs as sleep, a as getDb, ea as createPluginCache } from "./db-of6e3sGt.js";
4
- import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-DEkStuxG.js";
5
- import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-BnOG0qz2.js";
6
- import { A as createEncryptedState, I as resolvePluginCommandEnv, J as CredentialUnavailableError, M as findLegacyWebActorUserId, P as resolveApiHeaderTransforms, Q as workloadIdentityHeader, Y as ServiceAccountUnavailableError, i as mergeHeaderTransforms, j as readEncryptedState, n as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, q as CredentialMintError, r as resolveAuthTokenPlaceholder } from "./registry-Cl7Labpe.js";
1
+ import { R as getChatConfig, c as acquireActiveLock, g as credentialUserSubjectId, i as getStateAdapter, m as credentialLogContext, p as credentialContextSchema, s as MUTATION_LOCK_TTL_MS, u as withLock } from "./adapter-DlLLoJKj.js";
2
+ import { Af as ServiceAccountUnavailableError, Ld as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, Nf as workloadIdentityHeader, Of as CredentialMintError, Pd as getAppContext, Rd as resolveAuthTokenPlaceholder, Tt as getPlugins, _f as resolvePluginCommandEnv, a as getDb, aa as createPluginCache, ac as sleep, df as createEncryptedState, ff as readEncryptedState, hf as resolveApiHeaderTransforms, ia as runNonInteractiveCommand, kf as CredentialUnavailableError, pf as findLegacyWebActorUserId, zd as mergeHeaderTransforms } from "./db-BacvswT0.js";
3
+ import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-C5CW2wKO.js";
4
+ import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
7
5
  import { n as redactSandboxEgressProxyPath, t as SANDBOX_EGRESS_PROXY_PATH } from "./proxy-path-BHYoKZdq.js";
8
6
  import { r as continueTrace } from "./sentry-CPbZjomA.js";
9
7
  import * as z from "zod";
@@ -403,7 +401,7 @@ function manifestDomains(manifest) {
403
401
  return [.../* @__PURE__ */ new Set([...manifest.credentials?.domains ?? [], ...manifest.domains ?? []])].sort((left, right) => left.localeCompare(right));
404
402
  }
405
403
  function providerEntries() {
406
- return pluginCatalogRuntime.getProviders().map((plugin) => ({
404
+ return getAppContext().catalog.getProviders().map((plugin) => ({
407
405
  provider: plugin.manifest.name,
408
406
  domains: manifestDomains(plugin.manifest)
409
407
  })).filter((entry) => entry.domains.length > 0).sort((left, right) => left.provider.localeCompare(right.provider));
@@ -451,7 +449,7 @@ function buildSandboxEgressNetworkPolicy(input) {
451
449
  */
452
450
  async function resolveSandboxCommandEnvironment() {
453
451
  const env = {};
454
- for (const plugin of pluginCatalogRuntime.getProviders().sort((left, right) => left.manifest.name.localeCompare(right.manifest.name))) {
452
+ for (const plugin of getAppContext().catalog.getProviders().sort((left, right) => left.manifest.name.localeCompare(right.manifest.name))) {
455
453
  Object.assign(env, resolvePluginCommandEnv(plugin.manifest));
456
454
  const credentials = plugin.manifest.credentials;
457
455
  if (credentials?.type === "oauth-bearer" && credentials.authTokenEnv) env[credentials.authTokenEnv] = resolveAuthTokenPlaceholder(credentials);
@@ -582,10 +580,10 @@ function createUserTokenStore() {
582
580
  }
583
581
  function createProviderCredentialRouter(userTokenStore) {
584
582
  const brokersByProvider = {};
585
- for (const plugin of pluginCatalogRuntime.getProviders()) {
583
+ for (const plugin of getAppContext().catalog.getProviders()) {
586
584
  const { name } = plugin.manifest;
587
585
  if (!plugin.manifest.credentials && !plugin.manifest.apiHeaders) continue;
588
- brokersByProvider[name] = pluginCatalogRuntime.createBroker(name, { userTokenStore });
586
+ brokersByProvider[name] = getAppContext().catalog.createBroker(name, { userTokenStore });
589
587
  }
590
588
  return new ProviderCredentialRouter({ brokersByProvider });
591
589
  }
@@ -918,7 +916,7 @@ var SandboxEgressCredentialError = class extends Error {
918
916
  };
919
917
  /** True when the provider's credential is a host-minted workload identity token. */
920
918
  function isWorkloadIdentityProvider(provider) {
921
- return pluginCatalogRuntime.getDefinition(provider)?.manifest.credentials?.type === "workload-identity";
919
+ return getAppContext().catalog.getDefinition(provider)?.manifest.credentials?.type === "workload-identity";
922
920
  }
923
921
  /**
924
922
  * Add a workload identity plugin's static `api-headers` to its lease.
@@ -927,7 +925,7 @@ function isWorkloadIdentityProvider(provider) {
927
925
  * such as an app API key, resolve from env on each request instead.
928
926
  */
929
927
  function withStaticApiHeaders(lease) {
930
- const manifest = pluginCatalogRuntime.getDefinition(lease.provider)?.manifest;
928
+ const manifest = getAppContext().catalog.getDefinition(lease.provider)?.manifest;
931
929
  if (manifest?.credentials?.type !== "workload-identity") return lease;
932
930
  return {
933
931
  ...lease,
@@ -946,11 +944,11 @@ function defaultGrantForProvider(input) {
946
944
  };
947
945
  }
948
946
  function hasGenericCredentials(provider) {
949
- const manifest = pluginCatalogRuntime.getDefinition(provider)?.manifest;
947
+ const manifest = getAppContext().catalog.getDefinition(provider)?.manifest;
950
948
  return Boolean(manifest?.credentials || manifest?.apiHeaders);
951
949
  }
952
950
  function oauthAuthorizationForProvider(provider) {
953
- const oauth = pluginCatalogRuntime.getOAuthConfig(provider);
951
+ const oauth = getAppContext().catalog.getOAuthConfig(provider);
954
952
  return oauth ? {
955
953
  type: "oauth",
956
954
  provider,
@@ -976,7 +974,7 @@ function assertLeaseTransformsOwnedByProvider(provider, lease) {
976
974
  */
977
975
  async function selectSandboxEgressGrant(input) {
978
976
  if (input.userOAuthOnly) {
979
- const manifest = pluginCatalogRuntime.getDefinition(input.provider)?.manifest;
977
+ const manifest = getAppContext().catalog.getDefinition(input.provider)?.manifest;
980
978
  if (!manifest?.credentials || !manifest.oauth) throw new Error(`Plugin "${input.provider}" has no user OAuth for user-only egress`);
981
979
  return defaultGrantForProvider(input);
982
980
  }
@@ -3067,7 +3065,7 @@ function continueSandboxEgressTrace(request, upstreamHost, tracePropagation, cre
3067
3065
  * because it calls a provider domain.
3068
3066
  */
3069
3067
  function credentialRequestInput(provider, request) {
3070
- const manifest = pluginCatalogRuntime.getDefinition(provider)?.manifest;
3068
+ const manifest = getAppContext().catalog.getDefinition(provider)?.manifest;
3071
3069
  if (!manifest) throw new Error(`Plugin "${provider}" has no manifest for sandbox egress`);
3072
3070
  const credentialRequest = classifySandboxCredentialRequest(manifest, request.headers);
3073
3071
  if (credentialRequest === "placeholder" || sandboxRequestGetsCredential(manifest, credentialRequest)) return {};
@@ -4621,8 +4619,8 @@ function workspaceRecipe(workspace) {
4621
4619
  /** Build the complete profile that selects one reusable sandbox snapshot. */
4622
4620
  function create(runtime, workspace) {
4623
4621
  const declared = {
4624
- dependencies: mergeDependencies([...GLOBAL_RUNTIME_DEPENDENCIES, ...pluginCatalogRuntime.getRuntimeDependencies()]),
4625
- postinstall: [...GLOBAL_RUNTIME_POSTINSTALL, ...pluginCatalogRuntime.getRuntimePostinstall()]
4622
+ dependencies: mergeDependencies([...GLOBAL_RUNTIME_DEPENDENCIES, ...getAppContext().catalog.getRuntimeDependencies()]),
4623
+ postinstall: [...GLOBAL_RUNTIME_POSTINSTALL, ...getAppContext().catalog.getRuntimePostinstall()]
4626
4624
  };
4627
4625
  const { dependencies, postinstall } = getSandboxProvider().selectSnapshotRuntime?.(declared) ?? declared;
4628
4626
  const pluginPostinstall = postinstall.filter((command) => !GLOBAL_RUNTIME_POSTINSTALL.includes(command));
@@ -1,4 +1,4 @@
1
- import { f as logException, m as logWarn, p as logInfo } from "./logging-BnOG0qz2.js";
1
+ import { f as logException, m as logWarn, p as logInfo } from "./logging-DsTnMqyi.js";
2
2
  import { escapeClosingTags, escapeTagText, escapeTagTextAndQuotes, findTag, openingTag, readTag, renderTag, startsWithTag, stripTags, unescapeClosingTags, unescapeTagText } from "@sentry/junior-plugin-api";
3
3
  import pLimit from "p-limit";
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { Bi as createPluginState, fr as createPluginConversationEventStats, qi as basePluginContext, wt as getRegistrations } from "./db-of6e3sGt.js";
2
- import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-DEkStuxG.js";
1
+ import { Et as getRegistrations, Gi as createPluginState, Qi as basePluginContext, fr as createPluginConversationEventStats } from "./db-BacvswT0.js";
2
+ import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-C5CW2wKO.js";
3
3
  // src/chat/plugins/hooks/reports.ts
4
4
  const OPERATIONAL_REPORT_MAX_METRICS = 8;
5
5
  const OPERATIONAL_REPORT_MAX_WIDGETS = 12;
@@ -1,8 +1,8 @@
1
- import { R as getChatConfig, y as getStateAdapter } from "./context-BKF_5zzI.js";
2
- import { $i as runNonInteractiveCommand, Vs as sleep } from "./db-of6e3sGt.js";
3
- import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-DEkStuxG.js";
4
- import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-iHw1uu32.js";
5
- import { T as withSpan, y as setSpanAttributes } from "./logging-BnOG0qz2.js";
1
+ import { R as getChatConfig, i as getStateAdapter } from "./adapter-DlLLoJKj.js";
2
+ import { ac as sleep, ia as runNonInteractiveCommand } from "./db-BacvswT0.js";
3
+ import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-C5CW2wKO.js";
4
+ import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-v9vA3RvH.js";
5
+ import { T as withSpan, y as setSpanAttributes } from "./logging-DsTnMqyi.js";
6
6
  import * as z from "zod";
7
7
  // src/chat/sandbox/resources.ts
8
8
  /**
@@ -1,11 +1,22 @@
1
- import { $s as SYSTEM_IDENTITY_ID, Fn as readInboundMessageSender, Hl as EVENT_SYSTEM_ACTOR, Kl as CORE_EVENT_NAMESPACE, Ll as remindsNoReplyForChildStatus, Pl as parentResultActor, an as getConversationWorkState, i as getConversationStore, xo as publishAgentUpdate } from "./db-of6e3sGt.js";
2
- import { H as enqueueAutomatedInput, O as EVENT_WAIT_MS, S as getAgentReplyMessageId, U as getConversationStoppedAtMs, Vt as buildDeterministicTurnId, b as readAgentConfig, i as listActiveMailboxTurns, x as getAgentMessageId } from "./mailbox-turn-Byrry9o1.js";
3
- import { o as listOpenChildAgents, p as readChildConversationSender, s as listUnreportedSiblingAgents, t as recordChildAgentEnded } from "./markers-CTTtJqYn.js";
4
- import { t as resultAuthorId } from "./sender-actors-77zTQbSG.js";
5
- import { t as listChildMessages } from "./child-message-peFWLcCZ.js";
6
- import { H as renderDataTag } from "./prompt-DEkStuxG.js";
7
- import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-Ci6Ck4gk.js";
8
- import { Rn as AGENT_MESSAGE_EVENT_TYPE, zn as AGENT_UPDATE_EVENT_TYPE } from "./types-DCzTAA63.js";
1
+ import { Eo as publishAgentUpdate, Fn as readInboundMessageSender, an as getConversationWorkState, au as remindsNoReplyForChildStatus, i as getConversationStore, mu as CORE_EVENT_NAMESPACE, nu as parentResultActor, uu as EVENT_SYSTEM_ACTOR, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
2
+ import { Jt as buildDeterministicTurnId, L as listActiveMailboxTurns, O as enqueueAutomatedInput, S as getAgentReplyMessageId, b as readAgentConfig, c as resultAuthorId, f as readChildConversationSender, it as EVENT_WAIT_MS, k as getConversationStoppedAtMs, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as getAgentMessageId } from "./markers-C33gNYNE.js";
3
+ import { H as renderDataTag } from "./prompt-C5CW2wKO.js";
4
+ import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-CIR1B44Z.js";
5
+ import { Bn as AGENT_UPDATE_EVENT_TYPE, zn as AGENT_MESSAGE_EVENT_TYPE } from "./types-BNHkJrOP.js";
6
+ // src/chat/child-agents/child-message.ts
7
+ /**
8
+ * List the child replies and results among the ids that reached one
9
+ * mailbox, oldest first, with the sender fields that the mailbox keeps.
10
+ */
11
+ function listChildMessages(inboundMessageIds, messageSenders) {
12
+ return inboundMessageIds.flatMap((inboundMessageId) => {
13
+ const sender = messageSenders[inboundMessageId];
14
+ return sender ? [{
15
+ inboundMessageId,
16
+ sender
17
+ }] : [];
18
+ });
19
+ }
9
20
  // src/chat/child-agents/store.ts
10
21
  /**
11
22
  * Read the name, agent type, fork flag, and title of one child Conversation,
@@ -259,4 +270,4 @@ function createEndStoppedChildWork(options) {
259
270
  });
260
271
  };
261
272
  }
262
- export { getChildAgentLabel as a, renderAgentResult as i, enqueueAgentMessageToParent as n, enqueueStarterUpdate as r, createEndStoppedChildWork as t };
273
+ export { getChildAgentLabel as a, renderAgentResult as i, enqueueAgentMessageToParent as n, listChildMessages as o, enqueueStarterUpdate as r, createEndStoppedChildWork as t };
@@ -1,11 +1,10 @@
1
- import { Ht as messageCardText } from "./types-DCzTAA63.js";
2
- import { i as loadPendingMessageCards, r as buildDeliveredTurnStatePatch, t as completeAuthPauseTurn } from "./auth-pause-state-f9hJM_zO.js";
3
- import { h as getAssistantReplyText } from "./system-prompt-table-Ci6Ck4gk.js";
4
- import { f as logException, w as withLogContext, x as setTags } from "./logging-BnOG0qz2.js";
5
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-BJ9Up3bG.js";
6
- import { En as recordAuthorizationCompleted, Gn as normalizeConversationText, In as persistConversationMessages, Kn as recordDeliveredAssistantMessage, Lr as finalizeFailedTurnReplyWithEvent, Pn as hydrateConversationMessages, Un as latestConversationMessageSeq, Wn as markConversationMessage, Xn as upsertConversationMessage, _n as commitAcceptedReply, bn as loadConversationProjection, ei as persistWithRetry, ft as getPersistedSandboxState, gr as saveTurnCheckpoint, gt as coerceThreadConversationState, ht as persistThreadStateById, ir as authorizationId, lt as markTurnFailed, pt as getPersistedThreadState, ut as startActiveTurn, wr as getTurnLifecycle } from "./mailbox-turn-Byrry9o1.js";
7
- import { n as credentialContextForActor } from "./context-BKF_5zzI.js";
8
- import { $s as SYSTEM_IDENTITY_ID, i as getConversationStore } from "./db-of6e3sGt.js";
1
+ import { Ht as messageCardText } from "./types-BNHkJrOP.js";
2
+ import { St as loadPendingMessageCards, bt as completeAuthPauseTurn, ct as scheduleSessionCompletedPluginTasks, st as processPluginTask, xt as buildDeliveredTurnStatePatch } from "./agent-DxZ7nHfD.js";
3
+ import { h as getAssistantReplyText } from "./system-prompt-table-CIR1B44Z.js";
4
+ import { f as logException, w as withLogContext, x as setTags } from "./logging-DsTnMqyi.js";
5
+ import { $n as normalizeConversationText, Dn as loadConversationProjection, Gt as markTurnFailed, J as getPersistedThreadState, Kr as finalizeFailedTurnReplyWithEvent, Kt as startActiveTurn, Mr as getTurnLifecycle, Nn as recordAuthorizationCompleted, Qn as markConversationMessage, Un as persistConversationMessages, Vn as hydrateConversationMessages, X as persistThreadStateById, Z as coerceThreadConversationState, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, li as persistWithRetry, q as getPersistedSandboxState, wn as commitAcceptedReply, wr as saveTurnCheckpoint } from "./markers-C33gNYNE.js";
6
+ import { f as credentialContextForActor } from "./adapter-DlLLoJKj.js";
7
+ import { i as getConversationStore, vc as SYSTEM_IDENTITY_ID } from "./db-BacvswT0.js";
9
8
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
10
9
  import { randomUUID } from "node:crypto";
11
10
  // src/chat/local/runner.ts
@@ -1,4 +1,4 @@
1
- import { k as sandboxEgressSignalsResponseSchema } from "./profile-iHw1uu32.js";
1
+ import { k as sandboxEgressSignalsResponseSchema } from "./profile-v9vA3RvH.js";
2
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;
@@ -1,7 +1,7 @@
1
1
  import "./user-customization-CvfuY9Eo.js";
2
- import { F as actorIdentitySchema, G as conversationParamsSchema, Jt as inputFileSchema, Lt as conversationTreeStateSchema, Q as conversationUsageSchema, X as conversationSummaryReportSchema, dn as inboxItemNoticeRequestSchema, et as conversationChildAgentTotalsSchema, i as TODO_STATUSES, jn as notificationScheduleSchema, pn as inboxItemRequestSchema, z as conversationAuxiliaryCostsSchema } from "./types-DCzTAA63.js";
3
- import { a as fillUtcDays, l as sumUtcHoursIntoSixHours, m as CHILD_AGENT_RESULTS, o as fillUtcHours, t as AGENT_STATUSES } from "./agent-status-BA5x3Xtp.js";
4
- import { f as conversationTitleSchema } from "./conversation-feed-Cj7IuBtM.js";
2
+ import { F as actorIdentitySchema, G as conversationParamsSchema, Lt as conversationTreeStateSchema, Mn as notificationScheduleSchema, Q as conversationUsageSchema, X as conversationSummaryReportSchema, Yt as inputFileSchema, et as conversationChildAgentTotalsSchema, fn as inboxItemNoticeRequestSchema, i as TODO_STATUSES, mn as inboxItemRequestSchema, z as conversationAuxiliaryCostsSchema } from "./types-BNHkJrOP.js";
3
+ import { l as fillUtcDays, p as sumUtcHoursIntoSixHours, t as AGENT_STATUSES, u as fillUtcHours, v as CHILD_AGENT_RESULTS } from "./agent-status-Bq_AIpyp.js";
4
+ import { f as conversationTitleSchema } from "./conversation-feed-DEUdD7mb.js";
5
5
  import { t as isPushServiceEndpoint } from "./push-endpoint-CO-nomUd.js";
6
6
  import * as z from "zod";
7
7
  import { codeChangeStateSchema, eventMatchSchema, objectTypeSchema, ownedObjectAnnotationSchema } from "@sentry/junior-plugin-api";
@@ -300,7 +300,9 @@ const todoAssigneeSchema = z.discriminatedUnion("kind", [
300
300
  }).strict(),
301
301
  z.object({
302
302
  kind: z.literal("user"),
303
- name: z.string().min(1).optional()
303
+ name: z.string().min(1).optional(),
304
+ /** The To-do is assigned to the person who reads it. */
305
+ viewer: z.literal(true).optional()
304
306
  }).strict()
305
307
  ]);
306
308
  /**
@@ -1174,10 +1176,10 @@ const inboxItemSchema = z.object({
1174
1176
  */
1175
1177
  request: z.union([inboxItemRequestSchema, inboxItemNoticeRequestSchema]).optional(),
1176
1178
  /**
1177
- * The top of the owner Conversation's tree that the viewer can see, at
1178
- * any depth: the owner when it is a root, or when the viewer cannot see
1179
- * its root. The Inbox stacks items by it. Unset when the owner is not a
1180
- * Conversation; then the Inbox stacks items by their owner.
1179
+ * The top of the owner Conversation's tree that the viewer can see. The
1180
+ * Inbox stacks items by it. Unset when the owner is not a Conversation,
1181
+ * or when the viewer cannot see it, such as a person on the item by a
1182
+ * role on the subject; then the payload names no Conversation or Turn.
1181
1183
  */
1182
1184
  rootConversationId: z.string().min(1).optional(),
1183
1185
  status: z.enum([
@@ -1193,6 +1195,12 @@ const inboxItemSchema = z.object({
1193
1195
  subject: z.object({
1194
1196
  id: z.string().min(1),
1195
1197
  kind: z.string().min(1),
1198
+ /**
1199
+ * What else the viewer's Dismiss changes on the provider, such as
1200
+ * `Also removes you from the reviewers on GitHub.` Unset when it
1201
+ * changes nothing there.
1202
+ */
1203
+ dismissNote: z.string().min(1).optional(),
1196
1204
  /** The name of a plugin kind's ask, such as `Review requested`. */
1197
1205
  label: z.string().min(1).optional(),
1198
1206
  /**
@@ -1,6 +1,5 @@
1
- import { a as disconnectServiceAccount, d as startServiceAccountSignIn, o as finishServiceAccountSignIn, s as getServiceAccountStatus, u as serviceAccountPlugins } from "./registry-Cl7Labpe.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BfdAnztW.js";
3
- import { _ as disconnectStateAdapter } from "./context-BKF_5zzI.js";
1
+ import { Bd as disconnectServiceAccount, Gd as serviceAccountPlugins, Hd as getServiceAccountStatus, Kd as startServiceAccountSignIn, Pd as getAppContext, Vd as finishServiceAccountSignIn } from "./db-BacvswT0.js";
2
+ import { n as disconnectStateAdapter } from "./adapter-DlLLoJKj.js";
4
3
  import { CLI_USAGE } from "./cli/run.js";
5
4
  import { createServer } from "node:http";
6
5
  // src/cli/service-account.ts
@@ -55,9 +54,9 @@ async function listenForCallback() {
55
54
  };
56
55
  }
57
56
  function requireServiceAccountPlugin(name) {
58
- const plugin = pluginCatalogRuntime.getDefinition(name);
57
+ const plugin = getAppContext().catalog.getDefinition(name);
59
58
  if (plugin?.manifest.accounts?.serviceAccount) return plugin;
60
- const supported = serviceAccountPlugins(pluginCatalogRuntime.getProviders()).map((candidate) => candidate.manifest.name);
59
+ const supported = serviceAccountPlugins(getAppContext().catalog.getProviders()).map((candidate) => candidate.manifest.name);
61
60
  console.error(`Plugin "${name}" does not support a service account.` + (supported.length ? ` Supported plugins: ${supported.join(", ")}.` : ""));
62
61
  }
63
62
  async function runConnect(plugin) {
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { R as getChatConfig } from "./context-BKF_5zzI.js";
3
- import { s as skillRoots } from "./package-discovery-DD9vencX.js";
4
- import { m as logWarn } from "./logging-BnOG0qz2.js";
5
- import { n as pluginCatalogRuntime } from "./catalog-runtime-BfdAnztW.js";
6
- import { G as mapBounded } from "./prompt-DEkStuxG.js";
2
+ import { R as getChatConfig } from "./adapter-DlLLoJKj.js";
3
+ import { f as skillRoots } from "./topics-DxuKurCX.js";
4
+ import { m as logWarn } from "./logging-DsTnMqyi.js";
5
+ import { Pd as getAppContext } from "./db-BacvswT0.js";
6
+ import { G as mapBounded } from "./prompt-C5CW2wKO.js";
7
7
  import * as z from "zod";
8
8
  import path from "node:path";
9
- import fs from "node:fs/promises";
10
9
  import { parse } from "yaml";
10
+ import fs from "node:fs/promises";
11
11
  // src/chat/skill-references.ts
12
12
  function isCommonEnvironmentVariable(name) {
13
13
  return [
@@ -180,7 +180,7 @@ function resolveSkillRoots(options) {
180
180
  const additionalRoots = options?.additionalRoots ?? [];
181
181
  const envRoots = getChatConfig().skills.dirs;
182
182
  const defaults = skillRoots();
183
- const pluginRoots = pluginCatalogRuntime.getSkillRoots();
183
+ const pluginRoots = getAppContext().catalog.getSkillRoots();
184
184
  const seen = /* @__PURE__ */ new Set();
185
185
  const resolved = [];
186
186
  for (const root of [
@@ -197,7 +197,7 @@ function resolveSkillRoots(options) {
197
197
  return resolved;
198
198
  }
199
199
  function resolveSkillPlugin(meta) {
200
- const plugin = pluginCatalogRuntime.getForSkillPath(meta.skillPath);
200
+ const plugin = getAppContext().catalog.getForSkillPath(meta.skillPath);
201
201
  if (meta.pluginProvider && plugin?.manifest.name !== meta.pluginProvider) throw new Error(`Skill "${meta.name}" metadata names plugin "${meta.pluginProvider}" but is not owned by that plugin`);
202
202
  return plugin;
203
203
  }
@@ -275,7 +275,7 @@ async function readSkillDirectory(skillDir) {
275
275
  }
276
276
  const { name, description, allowedTools } = parsed.skill;
277
277
  const disableModelInvocation = parsed.skill.disableModelInvocation === true || await openAiImplicitInvocationDisabled(skillDir);
278
- const plugin = pluginCatalogRuntime.getForSkillPath(skillDir);
278
+ const plugin = getAppContext().catalog.getForSkillPath(skillDir);
279
279
  const references = skillBodyReferences(parsed.skill.body);
280
280
  return {
281
281
  name,
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { Ci as postSlackEphemeralMessage, Ei as unfurlSlackLinks, Hs as getWorkspaceTeamId, Mi as formatSlackLink, P as getConversationIdByProviderConversation, Ru as createCache, Xr as runWithSlackInstallation, a as getDb, bn as deferConversationMove, i as getConversationStore, ji as escapeSlackMrkdwnText, ll as parseDashboardConversationLink, o as getSqlExecutor, qs as readActorIdentity, wr as readConversationAccessFromSql } from "./db-of6e3sGt.js";
3
- import { A as slackBotIdSchema, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, c as createSlackActor, j as slackChannelIdSchema, k as parseSlackUserId, p as parseActorUserId } from "./context-BKF_5zzI.js";
4
- import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-Cb9c1k9q.js";
5
- import { T as withSpan } from "./logging-BnOG0qz2.js";
6
- import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-YxwMQVeR.js";
7
- import { t as checkSlackChannelReadAccess } from "./channel-access-A0de5lRv.js";
8
- import { G as mapBounded } from "./prompt-DEkStuxG.js";
2
+ import { Al as parseDashboardConversationLink, Ii as escapeSlackMrkdwnText, Li as formatSlackLink, Oi as postSlackEphemeralMessage, P as getConversationIdByProviderConversation, a as getDb, bn as deferConversationMove, dc as readActorIdentity, i as getConversationStore, ji as unfurlSlackLinks, kr as readConversationAccessFromSql, o as getSqlExecutor, oc as getWorkspaceTeamId, od as createCache, ti as runWithSlackInstallation } from "./db-BacvswT0.js";
3
+ import { A as slackBotIdSchema, C as parseActorUserId, E as parseSlackChannelId, I as slackMessageTsSchema, L as botConfig, M as slackTeamIdSchema, N as slackUserIdSchema, O as parseSlackTeamId, j as slackChannelIdSchema, k as parseSlackUserId, v as createSlackActor } from "./adapter-DlLLoJKj.js";
4
+ import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-DOVo9sdU.js";
5
+ import { T as withSpan } from "./logging-DsTnMqyi.js";
6
+ import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-DBlQP4PC.js";
7
+ import { t as checkSlackChannelReadAccess } from "./channel-access-BghWqlXx.js";
8
+ import { G as mapBounded } from "./prompt-C5CW2wKO.js";
9
9
  import * as z from "zod";
10
10
  // src/chat/ingress/workspace-membership.ts
11
11
  const MEMBER_TTL_MS = 3e5;