@sentry/junior 0.317.0 → 0.319.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 (95) hide show
  1. package/dist/adapter-8_S6Birm.js +1833 -0
  2. package/dist/{admin-CAugg87B.js → admin-EsbUON1j.js} +1 -1
  3. package/dist/{agent-runner-AjrEV6Qe.js → agent-CtzMl32d.js} +19953 -6727
  4. package/dist/{agent-status-BA5x3Xtp.js → agent-status-Bq_AIpyp.js} +105 -1
  5. package/dist/{agent-update-delivery-B_YIZcgf.js → agent-update-delivery-pAvsbuGL.js} +4 -5
  6. package/dist/api/schema.d.ts +85 -51
  7. package/dist/api/schema.js +4 -4
  8. package/dist/api.js +81 -94
  9. package/dist/{app-MoNAsVV5.d.ts → app-tACXxJPI.d.ts} +8 -13
  10. package/dist/app.d.ts +2 -2
  11. package/dist/app.js +246 -153
  12. package/dist/{change-record-BzJgLsv7.d.ts → change-record-K-KsqNhT.d.ts} +9 -5
  13. package/dist/{channel-access-j-YAVYK4.js → channel-access-DET5hzZM.js} +1 -1
  14. package/dist/{chat-core-engine-aH85nEHv.js → chat-core-engine-DpM3tMVi.js} +7 -7
  15. package/dist/cli/chat.d.ts +1 -1
  16. package/dist/cli/chat.js +38 -30
  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 -6
  22. package/dist/cli/upgrade.d.ts +1 -1
  23. package/dist/cli/upgrade.js +3 -4
  24. package/dist/{continue-in-slack-D-FZ8Fin.js → continue-in-slack-CFzDyxkH.js} +3 -2
  25. package/dist/{conversation-feed--9S0_PXL.js → conversation-feed-DEUdD7mb.js} +2 -106
  26. package/dist/{conversation-privacy-B1uXn5sf.js → conversation-privacy-C2vYK55O.js} +1 -1
  27. package/dist/{create-DoDIYgtZ.js → create-Ta3SEIB5.js} +124 -16
  28. package/dist/{credential-sync-BJOqGnjV.js → credential-sync-DyRqDmY4.js} +17 -20
  29. package/dist/{db-BFmyYZtJ.js → db-BCaNWl9p.js} +6536 -1920
  30. package/dist/{deployment-DXq9ZLU4.js → deployment-CfOew1Tm.js} +3 -3
  31. package/dist/{engine-context-CgQ7mlHt.js → engine-context-CiExoy1B.js} +181 -155
  32. package/dist/{html-B3VKTGbJ.js → html-Bb2Si1bR.js} +6 -8
  33. package/dist/instrumentation.js +7 -23
  34. package/dist/list-wwDcROh9.js +5007 -0
  35. package/dist/{logging--smS7XRK.js → logging-BRPTXAdf.js} +10 -81
  36. package/dist/{mailbox-turn-uSXhUFc9.js → markers-9QoqW5ov.js} +1875 -1458
  37. package/dist/nitro.d.ts +2 -2
  38. package/dist/nitro.js +7 -8
  39. package/dist/{oauth-callback-server-CE4soEIY.js → oauth-callback-server-vhL9b-PZ.js} +2 -2
  40. package/dist/{oauth-relay-C36gX1gH.js → oauth-relay-CH2v7WiB.js} +1 -1
  41. package/dist/{plugins-fBrz8PCV.d.ts → plugins-DhGXZjlu.d.ts} +1 -0
  42. package/dist/{profile-BQ-iBDsZ.js → profile-D9LdwmZi.js} +17 -19
  43. package/dist/{prompt-Dv7gkpD6.js → prompt-3TqxEOtc.js} +10 -10
  44. package/dist/{reports-WKHfGTsU.js → reports-K-tbtEyx.js} +2 -2
  45. package/dist/{resolve-tony4ibz.js → resolve-BBV2qf8A.js} +5 -5
  46. package/dist/{result-Bta_dlWa.js → result-5IdGJP4M.js} +24 -13
  47. package/dist/{runner-BstDRbD9.js → runner-BK_joPlM.js} +9 -18
  48. package/dist/{sandbox-egress-signals-oSJMJOnn.js → sandbox-egress-signals-DXgWXXmm.js} +1 -1
  49. package/dist/{schema-DfqrHACA.js → schema-zWGG6VC1.js} +13 -7
  50. package/dist/{service-account-CTV_jaNu.js → service-account-CateFyhw.js} +4 -5
  51. package/dist/{skills-BCEU41zM.js → skills-Ccjw8h2P.js} +10 -9
  52. package/dist/{slack-conversation-unfurl-DxVmhbGP.js → slack-conversation-unfurl-ZC_TSpc4.js} +7 -7
  53. package/dist/storage-C9U7R5rM.js +273 -0
  54. package/dist/{system-prompt-table-CiXy0eNR.js → system-prompt-table-YBTHIFlP.js} +26 -84
  55. package/dist/topic-B2EWKKBT.js +6 -0
  56. package/dist/{package-discovery-DD9vencX.js → topics-DxuKurCX.js} +21 -1
  57. package/dist/{types-C4iC-IMC.js → types-BNHkJrOP.js} +79 -59
  58. package/dist/{users-ByG5RCEJ.js → users-CCRAqYb_.js} +1 -1
  59. package/dist/{validation-8gjfR91V.js → validation-BCUpJa8K.js} +4 -4
  60. package/dist/{version-BeZhWWBE.js → version-BNm0JYj3.js} +1 -1
  61. package/dist/version.js +1 -1
  62. package/dist/{worker-BqMQQNRk.js → worker-BhgpZ7_b.js} +5 -5
  63. package/migrations/20261127002500_turn_discarded_usage/migration.sql +2 -0
  64. package/migrations/20261127002500_turn_discarded_usage/snapshot.json +73 -0
  65. package/migrations/20261127052408_space_name_nullable/migration.sql +5 -0
  66. package/migrations/20261127052408_space_name_nullable/snapshot.json +29 -0
  67. package/migrations/20261127060000_annotation_object_id_index/migration.sql +1 -0
  68. package/migrations/20261127060000_annotation_object_id_index/snapshot.json +69 -0
  69. package/migrations/20261127060001_annotation_subjects/migration.sql +78 -0
  70. package/migrations/20261127060001_annotation_subjects/snapshot.json +104 -0
  71. package/migrations/20261127060002_annotation_subject_index/migration.sql +1 -0
  72. package/migrations/20261127060002_annotation_subject_index/snapshot.json +70 -0
  73. package/migrations/20261127060003_annotation_title_url/migration.sql +84 -0
  74. package/migrations/20261127060003_annotation_title_url/snapshot.json +73 -0
  75. package/package.json +9 -7
  76. package/dist/catalog-runtime-DfSpJZdY.js +0 -6
  77. package/dist/child-message-DHjQLEd1.js +0 -19
  78. package/dist/config-CHQ8X251.js +0 -2422
  79. package/dist/conversation-turn-BUE_7xaN.js +0 -1157
  80. package/dist/job-runner-A1lCkybD.js +0 -1506
  81. package/dist/lineage-Bktb0UcV.js +0 -36
  82. package/dist/list-Bxvg5wXf.js +0 -12623
  83. package/dist/message-BNenhsmB.js +0 -154
  84. package/dist/model-input-BReSnwHp.js +0 -82
  85. package/dist/parent-result-Ck1rFYRQ.js +0 -310
  86. package/dist/registry-iXMT5Jmh.js +0 -3279
  87. package/dist/run-conversation-DL6ru7iW.js +0 -336
  88. package/dist/sender-actors-CPglLd5R.js +0 -83
  89. package/dist/spawn-frczVPIr.js +0 -48
  90. package/dist/task-runner-C9Yc2_ae.js +0 -1526
  91. package/dist/thread-context-CqZDKErp.js +0 -166
  92. package/dist/topic-CRYYBYp-.js +0 -7
  93. package/dist/topics-SRN7IVX-.js +0 -24
  94. package/dist/turn-membership-CENFf3kI.js +0 -856
  95. package/dist/turn-wake-BhloiI2h.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-MoNAsVV5.js";
1
+ import { n as JuniorPluginSet } from "./plugins-DhGXZjlu.js";
2
+ import { r as JuniorDashboardOptions } from "./app-tACXxJPI.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 resolveConversationWorkQueueTopic, i as WORKSPACE_SNAPSHOT_JOB_QUEUE_TOPIC, n as CACHE_WARMUP_QUEUE_TOPIC, o as toOptionalTrimmed, r as PLUGIN_TASK_QUEUE_TOPIC, t as BACKGROUND_COMPACTION_QUEUE_TOPIC } from "./topics-SRN7IVX-.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-DXq9ZLU4.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-CfOew1Tm.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";
@@ -18,7 +17,7 @@ function queueCallbackRoutes() {
18
17
  return [
19
18
  {
20
19
  route: JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
21
- topic: resolveConversationWorkQueueTopic()
20
+ topic: process.env["JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC"]?.trim() || "junior_conversation_work"
22
21
  },
23
22
  {
24
23
  route: JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE,
@@ -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-CiXy0eNR.js").then((n) => n.r);
255
+ const { buildSystemPromptTable } = await import("./system-prompt-table-YBTHIFlP.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-BJOqGnjV.js";
2
- import { A as createUserTokenStore } from "./profile-BQ-iBDsZ.js";
1
+ import { a as GET, n as syncLocalOAuthCredential, r as GET$1 } from "./credential-sync-DyRqDmY4.js";
2
+ import { A as createUserTokenStore } from "./profile-D9LdwmZi.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 { n as getChatConfig } from "./config-CHQ8X251.js";
2
+ import { R as getChatConfig } from "./adapter-8_S6Birm.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,15 +1,13 @@
1
- import { M as acquireActiveLock, P as withLock, j as MUTATION_LOCK_TTL_MS, n as getChatConfig } from "./config-CHQ8X251.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DfSpJZdY.js";
3
- import { Ho as credentialLogContext, Ji as createPluginCache, Js as sleep, Ku as getStateAdapter, Vo as credentialContextSchema, Wo as credentialUserSubjectId, a as getDb, qi as runNonInteractiveCommand, xt as getPlugins } from "./db-BFmyYZtJ.js";
4
- import { L as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-Dv7gkpD6.js";
5
- import { E as withSpan, b as setSpanAttributes, d as logAudit, h as logWarn, p as logException, y as setSentryUser } from "./logging--smS7XRK.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-iXMT5Jmh.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-8_S6Birm.js";
2
+ import { Af as CredentialUnavailableError, Bd as mergeHeaderTransforms, Et as getPlugins, Fd as getAppContext, Pf as workloadIdentityHeader, Rd as HOST_MANAGED_CREDENTIAL_PLACEHOLDER, a as getDb, aa as runNonInteractiveCommand, ff as createEncryptedState, gf as resolveApiHeaderTransforms, jf as ServiceAccountUnavailableError, kf as CredentialMintError, mf as findLegacyWebActorUserId, oa as createPluginCache, oc as sleep, pf as readEncryptedState, vf as resolvePluginCommandEnv, zd as resolveAuthTokenPlaceholder } from "./db-BCaNWl9p.js";
3
+ import { G as mapBounded, d as SANDBOX_WORKSPACE_ROOT, h as createPluginLogger } from "./prompt-3TqxEOtc.js";
4
+ import { T as withSpan, f as logException, m as logWarn, u as logAudit, v as setSentryUser, y as setSpanAttributes } from "./logging-BRPTXAdf.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";
10
8
  import path from "node:path";
11
- import { createHash, createHmac, createPrivateKey, createPublicKey, generateKeyPairSync, randomBytes, randomUUID, sign, timingSafeEqual } from "node:crypto";
12
9
  import { EgressAuthRequired, EgressPolicyDenied, pluginAuditAttributesSchema, pluginAuthorizationSchema, pluginCredentialHeaderTransformSchema, pluginCredentialResultSchema, pluginGrantSchema, pluginProviderAccountSchema, pluginStoredTokensSchema } from "@sentry/junior-plugin-api";
10
+ import { createHash, createHmac, createPrivateKey, createPublicKey, generateKeyPairSync, randomBytes, randomUUID, sign, timingSafeEqual } from "node:crypto";
13
11
  import fs from "node:fs/promises";
14
12
  import http from "node:http";
15
13
  import os from "node:os";
@@ -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,6 +1,14 @@
1
- import { h as logWarn, m as logInfo, p as logException } from "./logging--smS7XRK.js";
1
+ import { f as logException, m as logWarn, p as logInfo } from "./logging-BRPTXAdf.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
+ /**
5
+ * Map each item through `fn`, with at most `concurrency` calls at once. The
6
+ * results keep the order of `items`. Use it for independent work over a list
7
+ * whose length the code does not fix.
8
+ */
9
+ async function mapBounded(items, fn, concurrency = 8) {
10
+ return await pLimit(concurrency).map(items, fn);
11
+ }
4
12
  // src/chat/input-tags.ts
5
13
  /**
6
14
  * Tags for Turn inputs that the runtime creates. Each input is its own prompt
@@ -121,14 +129,6 @@ function instructionBlock(text) {
121
129
  const closeStart = block.end - 19 - 3;
122
130
  return text[bodyStart] === "\n" && text[closeStart - 1] === "\n" ? block : void 0;
123
131
  }
124
- /**
125
- * Map each item through `fn`, with at most `concurrency` calls at once. The
126
- * results keep the order of `items`. Use it for independent work over a list
127
- * whose length the code does not fix.
128
- */
129
- async function mapBounded(items, fn, concurrency = 8) {
130
- return await pLimit(concurrency).map(items, fn);
131
- }
132
132
  // src/chat/turn-context-tag.ts
133
133
  /**
134
134
  * Canonical tag name for the runtime turn context block injected into Pi
@@ -401,4 +401,4 @@ function toPromptContributionContext(args) {
401
401
  text: args.message.text
402
402
  };
403
403
  }
404
- export { retainRuntimeTurnContext as A, THREAD_CONTEXT_TAGS as B, instructionTextForProjection as C, isToolResultError as D, isStandaloneRuntimeContextMessage as E, SESSION_CONTEXT_SECTION_TAG as F, renderThreadContext as G, readParentAgentTask as H, TURN_CONTEXT_TAG as I, mapBounded as L, trimTrailingAssistantMessages as M, CAPABILITY_SECTION_TAG as N, isToolResultMessage as O, REQUEST_CONTEXT_SECTION_TAG as P, renderCurrentInstruction as R, hasTurnInput as S, isContinuablePiBoundary as T, renderDataTag as U, authorAttrs as V, renderParentAgentTask as W, extractAssistantText as _, SANDBOX_COMMAND_PATH as a, getUserMessageInstructionText as b, SANDBOX_REPOS_ROOT as c, SANDBOX_WORKSPACE_ROOT as d, sandboxSkillDir as f, RUNTIME_CONTEXT_TEXT_STARTS as g, createPluginLogger as h, ATTACHMENT_DIR as i, stripRuntimeTurnContext as j, normalizeToolNameFromResult as k, SANDBOX_SCRATCH_ROOT as l, sandboxSkillPathResolution as m, toPromptContributionContext as n, SANDBOX_DATA_ROOT as o, sandboxSkillFile as p, runPluginHooksAtOnce as r, SANDBOX_JUNIOR_ROOT as s, PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS as t, SANDBOX_SKILLS_ROOT as u, getPiMessageRole as v, isAssistantMessage as w, hasRuntimeTurnContext as x, getTerminalAssistantMessages as y, unwrapCurrentInstruction as z };
404
+ export { retainRuntimeTurnContext as A, authorAttrs as B, instructionTextForProjection as C, isToolResultError as D, isStandaloneRuntimeContextMessage as E, SESSION_CONTEXT_SECTION_TAG as F, mapBounded as G, renderDataTag as H, TURN_CONTEXT_TAG as I, renderCurrentInstruction as L, trimTrailingAssistantMessages as M, CAPABILITY_SECTION_TAG as N, isToolResultMessage as O, REQUEST_CONTEXT_SECTION_TAG as P, unwrapCurrentInstruction as R, hasTurnInput as S, isContinuablePiBoundary as T, renderParentAgentTask as U, readParentAgentTask as V, renderThreadContext as W, extractAssistantText as _, SANDBOX_COMMAND_PATH as a, getUserMessageInstructionText as b, SANDBOX_REPOS_ROOT as c, SANDBOX_WORKSPACE_ROOT as d, sandboxSkillDir as f, RUNTIME_CONTEXT_TEXT_STARTS as g, createPluginLogger as h, ATTACHMENT_DIR as i, stripRuntimeTurnContext as j, normalizeToolNameFromResult as k, SANDBOX_SCRATCH_ROOT as l, sandboxSkillPathResolution as m, toPromptContributionContext as n, SANDBOX_DATA_ROOT as o, sandboxSkillFile as p, runPluginHooksAtOnce as r, SANDBOX_JUNIOR_ROOT as s, PLUGIN_PROMPT_CONTRIBUTION_TOTAL_MAX_CHARS as t, SANDBOX_SKILLS_ROOT as u, getPiMessageRole as v, isAssistantMessage as w, hasRuntimeTurnContext as x, getTerminalAssistantMessages as y, THREAD_CONTEXT_TAGS as z };
@@ -1,5 +1,5 @@
1
- import { Pi as createPluginState, St as getRegistrations, Vi as basePluginContext, ur as createPluginConversationEventStats } from "./db-BFmyYZtJ.js";
2
- import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-Dv7gkpD6.js";
1
+ import { $i as basePluginContext, Dt as getRegistrations, Ki as createPluginState, pr as createPluginConversationEventStats } from "./db-BCaNWl9p.js";
2
+ import { h as createPluginLogger, r as runPluginHooksAtOnce } from "./prompt-3TqxEOtc.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 { n as getChatConfig } from "./config-CHQ8X251.js";
2
- import { Js as sleep, Ku as getStateAdapter, qi as runNonInteractiveCommand } from "./db-BFmyYZtJ.js";
3
- import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-Dv7gkpD6.js";
4
- import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-BQ-iBDsZ.js";
5
- import { E as withSpan, b as setSpanAttributes } from "./logging--smS7XRK.js";
1
+ import { R as getChatConfig, i as getStateAdapter } from "./adapter-8_S6Birm.js";
2
+ import { aa as runNonInteractiveCommand, oc as sleep } from "./db-BCaNWl9p.js";
3
+ import { a as SANDBOX_COMMAND_PATH, d as SANDBOX_WORKSPACE_ROOT } from "./prompt-3TqxEOtc.js";
4
+ import { i as CURL_DOWNLOAD_ARGS, o as getSandboxProvider, r as isStale, t as create } from "./profile-D9LdwmZi.js";
5
+ import { T as withSpan, y as setSpanAttributes } from "./logging-BRPTXAdf.js";
6
6
  import * as z from "zod";
7
7
  // src/chat/sandbox/resources.ts
8
8
  /**
@@ -1,11 +1,22 @@
1
- import { Nn as readInboundMessageSender, i as getConversationStore, lu as remindsNoReplyForChildStatus, mo as publishAgentUpdate, oc as SYSTEM_IDENTITY_ID, rn as getConversationWorkState } from "./db-BFmyYZtJ.js";
2
- import { O as EVENT_WAIT_MS, Rt as buildDeterministicTurnId, S as getAgentReplyMessageId, U as enqueueAutomatedInput, W as getConversationStoppedAtMs, Xn as EVENT_SYSTEM_ACTOR, b as readAgentConfig, i as listActiveMailboxTurns, x as getAgentMessageId } from "./mailbox-turn-uSXhUFc9.js";
3
- import { c as listUnreportedSiblingAgents, m as readChildConversationSender, n as recordChildAgentEnded, s as listOpenChildAgents, t as parentResultActor } from "./parent-result-Ck1rFYRQ.js";
4
- import { t as resultAuthorId } from "./sender-actors-CPglLd5R.js";
5
- import { n as listChildMessages, t as childMessageSenderMetadata } from "./child-message-DHjQLEd1.js";
6
- import { U as renderDataTag } from "./prompt-Dv7gkpD6.js";
7
- import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-CiXy0eNR.js";
8
- import { En as AGENT_UPDATE_EVENT_TYPE, Tn as AGENT_MESSAGE_EVENT_TYPE, wn as AGENT_EVENT_NAMESPACE } from "./types-C4iC-IMC.js";
1
+ import { Do as publishAgentUpdate, In as readInboundMessageSender, du as EVENT_SYSTEM_ACTOR, hu as CORE_EVENT_NAMESPACE, i as getConversationStore, on as getConversationWorkState, ou as remindsNoReplyForChildStatus, ru as parentResultActor, yc as SYSTEM_IDENTITY_ID } from "./db-BCaNWl9p.js";
2
+ import { A as getConversationStoppedAtMs, C as getAgentReplyMessageId, R as listActiveMailboxTurns, S as getAgentMessageId, Yt as buildDeterministicTurnId, at as EVENT_WAIT_MS, c as resultAuthorId, f as readChildConversationSender, k as enqueueAutomatedInput, o as listOpenChildAgents, s as listUnreportedSiblingAgents, t as recordChildAgentEnded, x as readAgentConfig } from "./markers-9QoqW5ov.js";
3
+ import { H as renderDataTag } from "./prompt-3TqxEOtc.js";
4
+ import { _ as NO_REPLY_TOOL_NAME } from "./system-prompt-table-YBTHIFlP.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,
@@ -139,7 +150,7 @@ async function enqueueAgentMessageToParent(args) {
139
150
  eventKey: inboundMessageId,
140
151
  eventType: AGENT_MESSAGE_EVENT_TYPE,
141
152
  identifier: senderId,
142
- namespace: AGENT_EVENT_NAMESPACE,
153
+ namespace: CORE_EVENT_NAMESPACE,
143
154
  trustedSummary: summary
144
155
  });
145
156
  await enqueueAutomatedInput({
@@ -200,14 +211,14 @@ async function enqueueStarterUpdate(args) {
200
211
  eventKey: inboundMessageId,
201
212
  eventType: AGENT_UPDATE_EVENT_TYPE,
202
213
  identifier: senderId,
203
- namespace: AGENT_EVENT_NAMESPACE,
214
+ namespace: CORE_EVENT_NAMESPACE,
204
215
  ...stillWorks ? void 0 : { status },
205
216
  trustedSummary: `${childAgentLabel(args.sender)} ${stillWorks ? "sent a message." : RESULT_SUMMARIES[status]}`
206
217
  }),
207
- ...childMessageSenderMetadata({
218
+ sender: {
208
219
  conversationId: senderId,
209
220
  turnId: args.turnId
210
- })
221
+ }
211
222
  };
212
223
  await enqueueAutomatedInput({
213
224
  message: {
@@ -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,12 +1,12 @@
1
- import { Ht as messageCardText } from "./types-C4iC-IMC.js";
2
- import { a as buildDeliveredTurnStatePatch, o as loadPendingMessageCards, r as completeAuthPauseTurn, t as buildTurnThreadContext } from "./thread-context-CqZDKErp.js";
3
- import { h as getAssistantReplyText } from "./system-prompt-table-CiXy0eNR.js";
4
- import { S as setTags, T as withLogContext, p as logException } from "./logging--smS7XRK.js";
5
- import { n as scheduleSessionCompletedPluginTasks, t as processPluginTask } from "./task-runner-C9Yc2_ae.js";
6
- import { Er as getTurnLifecycle, Fn as persistConversationMessages, Gn as recordDeliveredAssistantMessage, Hn as latestConversationMessageSeq, Jn as upsertConversationMessage, Nn as hydrateConversationMessages, Rr as finalizeFailedTurnReplyWithEvent, Tn as recordAuthorizationCompleted, Un as markConversationMessage, Wn as normalizeConversationText, _t as coerceThreadConversationState, dt as startActiveTurn, gn as commitAcceptedReply, gt as persistThreadStateById, mt as getPersistedThreadState, or as authorizationId, pt as getPersistedSandboxState, ti as persistWithRetry, ut as markTurnFailed, vr as saveTurnCheckpoint, yn as loadConversationProjection } from "./mailbox-turn-uSXhUFc9.js";
7
- import { Bo as credentialContextForActor, i as getConversationStore, oc as SYSTEM_IDENTITY_ID } from "./db-BFmyYZtJ.js";
8
- import { randomUUID } from "node:crypto";
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-CtzMl32d.js";
3
+ import { h as getAssistantReplyText } from "./system-prompt-table-YBTHIFlP.js";
4
+ import { f as logException, w as withLogContext, x as setTags } from "./logging-BRPTXAdf.js";
5
+ import { $n as normalizeConversationText, Hn as hydrateConversationMessages, J as getPersistedSandboxState, Kt as markTurnFailed, Mr as getTurnLifecycle, On as loadConversationProjection, Pn as recordAuthorizationCompleted, Q as coerceThreadConversationState, Qn as markConversationMessage, Tn as commitAcceptedReply, Wn as persistConversationMessages, Wr as finalizeFailedTurnReplyWithEvent, Y as getPersistedThreadState, Z as persistThreadStateById, Zn as latestConversationMessageSeq, er as recordDeliveredAssistantMessage, fr as authorizationId, ir as upsertConversationMessage, qt as startActiveTurn, si as persistWithRetry, wr as saveTurnCheckpoint } from "./markers-9QoqW5ov.js";
6
+ import { f as credentialContextForActor } from "./adapter-8_S6Birm.js";
7
+ import { i as getConversationStore, yc as SYSTEM_IDENTITY_ID } from "./db-BCaNWl9p.js";
9
8
  import { createLocalSource, localDestinationSchema } from "@sentry/junior-plugin-api";
9
+ import { randomUUID } from "node:crypto";
10
10
  // src/chat/local/runner.ts
11
11
  /**
12
12
  * Local agent turn runtime.
@@ -179,16 +179,7 @@ async function runLocalAgentTurnInContext(input, deps) {
179
179
  conversationId: input.conversationId,
180
180
  turnId,
181
181
  runId: currentRunId,
182
- instruction: {
183
- text,
184
- context: await buildTurnThreadContext({
185
- conversation,
186
- conversationId: input.conversationId,
187
- excludeMessageIds: [userMessageId],
188
- hasHistory: Boolean(history?.messages.length),
189
- turnId
190
- })
191
- },
182
+ instruction: { text },
192
183
  history,
193
184
  actor: localActor,
194
185
  credentialContext: credentialContextForActor(localActor),
@@ -1,4 +1,4 @@
1
- import { k as sandboxEgressSignalsResponseSchema } from "./profile-BQ-iBDsZ.js";
1
+ import { k as sandboxEgressSignalsResponseSchema } from "./profile-D9LdwmZi.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, Rn as notificationScheduleSchema, X as conversationSummaryReportSchema, dn as inboxItemNoticeRequestSchema, et as conversationChildAgentTotalsSchema, i as TODO_STATUSES, pn as inboxItemRequestSchema, z as conversationAuxiliaryCostsSchema } from "./types-C4iC-IMC.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--9S0_PXL.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";
@@ -1174,10 +1174,10 @@ const inboxItemSchema = z.object({
1174
1174
  */
1175
1175
  request: z.union([inboxItemRequestSchema, inboxItemNoticeRequestSchema]).optional(),
1176
1176
  /**
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.
1177
+ * The top of the owner Conversation's tree that the viewer can see. The
1178
+ * Inbox stacks items by it. Unset when the owner is not a Conversation,
1179
+ * or when the viewer cannot see it, such as a person on the item by a
1180
+ * role on the subject; then the payload names no Conversation or Turn.
1181
1181
  */
1182
1182
  rootConversationId: z.string().min(1).optional(),
1183
1183
  status: z.enum([
@@ -1193,6 +1193,12 @@ const inboxItemSchema = z.object({
1193
1193
  subject: z.object({
1194
1194
  id: z.string().min(1),
1195
1195
  kind: z.string().min(1),
1196
+ /**
1197
+ * What else the viewer's Dismiss changes on the provider, such as
1198
+ * `Also removes you from the reviewers on GitHub.` Unset when it
1199
+ * changes nothing there.
1200
+ */
1201
+ dismissNote: z.string().min(1).optional(),
1196
1202
  /** The name of a plugin kind's ask, such as `Review requested`. */
1197
1203
  label: z.string().min(1).optional(),
1198
1204
  /**
@@ -1,6 +1,5 @@
1
- import { a as disconnectServiceAccount, d as startServiceAccountSignIn, o as finishServiceAccountSignIn, s as getServiceAccountStatus, u as serviceAccountPlugins } from "./registry-iXMT5Jmh.js";
2
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DfSpJZdY.js";
3
- import { Gu as disconnectStateAdapter } from "./db-BFmyYZtJ.js";
1
+ import { Fd as getAppContext, Hd as finishServiceAccountSignIn, Kd as serviceAccountPlugins, Ud as getServiceAccountStatus, Vd as disconnectServiceAccount, qd as startServiceAccountSignIn } from "./db-BCaNWl9p.js";
2
+ import { n as disconnectStateAdapter } from "./adapter-8_S6Birm.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,12 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { s as skillRoots } from "./package-discovery-DD9vencX.js";
3
- import { h as logWarn } from "./logging--smS7XRK.js";
4
- import { n as pluginCatalogRuntime } from "./catalog-runtime-DfSpJZdY.js";
5
- import { L as mapBounded } from "./prompt-Dv7gkpD6.js";
2
+ import { R as getChatConfig } from "./adapter-8_S6Birm.js";
3
+ import { f as skillRoots } from "./topics-DxuKurCX.js";
4
+ import { m as logWarn } from "./logging-BRPTXAdf.js";
5
+ import { Fd as getAppContext } from "./db-BCaNWl9p.js";
6
+ import { G as mapBounded } from "./prompt-3TqxEOtc.js";
6
7
  import * as z from "zod";
7
8
  import path from "node:path";
8
- import fs from "node:fs/promises";
9
9
  import { parse } from "yaml";
10
+ import fs from "node:fs/promises";
10
11
  // src/chat/skill-references.ts
11
12
  function isCommonEnvironmentVariable(name) {
12
13
  return [
@@ -177,9 +178,9 @@ const SKILL_CACHE_TTL_MS = 5e3;
177
178
  let skillCache = null;
178
179
  function resolveSkillRoots(options) {
179
180
  const additionalRoots = options?.additionalRoots ?? [];
180
- const envRoots = process.env["SKILL_DIRS"]?.split(path.delimiter).filter(Boolean) ?? [];
181
+ const envRoots = getChatConfig().skills.dirs;
181
182
  const defaults = skillRoots();
182
- const pluginRoots = pluginCatalogRuntime.getSkillRoots();
183
+ const pluginRoots = getAppContext().catalog.getSkillRoots();
183
184
  const seen = /* @__PURE__ */ new Set();
184
185
  const resolved = [];
185
186
  for (const root of [
@@ -196,7 +197,7 @@ function resolveSkillRoots(options) {
196
197
  return resolved;
197
198
  }
198
199
  function resolveSkillPlugin(meta) {
199
- const plugin = pluginCatalogRuntime.getForSkillPath(meta.skillPath);
200
+ const plugin = getAppContext().catalog.getForSkillPath(meta.skillPath);
200
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`);
201
202
  return plugin;
202
203
  }
@@ -274,7 +275,7 @@ async function readSkillDirectory(skillDir) {
274
275
  }
275
276
  const { name, description, allowedTools } = parsed.skill;
276
277
  const disableModelInvocation = parsed.skill.disableModelInvocation === true || await openAiImplicitInvocationDisabled(skillDir);
277
- const plugin = pluginCatalogRuntime.getForSkillPath(skillDir);
278
+ const plugin = getAppContext().catalog.getForSkillPath(skillDir);
278
279
  const references = skillBodyReferences(parsed.skill.body);
279
280
  return {
280
281
  name,
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-BKpuH2hG.js";
2
- import { Cs as createSlackActor, Ds as parseActorUserId, Ei as formatSlackLink, P as getConversationIdByProviderConversation, Sr as readConversationAccessFromSql, Ti as escapeSlackMrkdwnText, Wr as runWithSlackInstallation, Ys as getWorkspaceTeamId, _i as postSlackEphemeralMessage, a as getDb, bi as unfurlSlackLinks, cd as parseSlackChannelId, dd as parseSlackUserId, ec as readActorIdentity, fd as slackBotIdSchema, hd as slackUserIdSchema, i as getConversationStore, jl as parseDashboardConversationLink, md as slackTeamIdSchema, o as getSqlExecutor, pd as slackChannelIdSchema, ud as parseSlackTeamId, vd as slackMessageTsSchema, vn as deferConversationMove } from "./db-BFmyYZtJ.js";
3
- import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-ByG5RCEJ.js";
4
- import { k as createCache, t as botConfig } from "./config-CHQ8X251.js";
5
- import { E as withSpan } from "./logging--smS7XRK.js";
6
- import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-D-FZ8Fin.js";
7
- import { t as checkSlackChannelReadAccess } from "./channel-access-j-YAVYK4.js";
8
- import { L as mapBounded } from "./prompt-Dv7gkpD6.js";
2
+ import { Ar as readConversationAccessFromSql, Li as escapeSlackMrkdwnText, Mi as unfurlSlackLinks, P as getConversationIdByProviderConversation, Ri as formatSlackLink, a as getDb, fc as readActorIdentity, i as getConversationStore, jl as parseDashboardConversationLink, ki as postSlackEphemeralMessage, ni as runWithSlackInstallation, o as getSqlExecutor, sc as getWorkspaceTeamId, sd as createCache, xn as deferConversationMove } from "./db-BCaNWl9p.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-8_S6Birm.js";
4
+ import { i as lookupSlackUserProfile, n as lookupSlackBot } from "./users-CCRAqYb_.js";
5
+ import { T as withSpan } from "./logging-BRPTXAdf.js";
6
+ import { a as isMovableToSlack, i as continueConversationInSlack, n as alreadyContinuesInSlackMessage, t as BUSY } from "./continue-in-slack-CFzDyxkH.js";
7
+ import { t as checkSlackChannelReadAccess } from "./channel-access-DET5hzZM.js";
8
+ import { G as mapBounded } from "./prompt-3TqxEOtc.js";
9
9
  import * as z from "zod";
10
10
  // src/chat/ingress/workspace-membership.ts
11
11
  const MEMBER_TTL_MS = 3e5;