@sentry/junior 0.79.0 → 0.80.1

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 (48) hide show
  1. package/dist/{agent-hooks-OFDNZJB2.js → agent-hooks-ZGTDOXQY.js} +11 -10
  2. package/dist/app.js +39 -41
  3. package/dist/catalog-runtime-IVWRAPSI.js +12 -0
  4. package/dist/chat/conversation-privacy.d.ts +4 -0
  5. package/dist/chat/plugins/catalog-runtime.d.ts +1 -0
  6. package/dist/chat/plugins/registry.d.ts +27 -26
  7. package/dist/chat/sentry-payload-filter.d.ts +14 -0
  8. package/dist/chat/sentry.d.ts +1 -1
  9. package/dist/chat/tools/definition.d.ts +6 -0
  10. package/dist/{chunk-LUNMJQ7D.js → chunk-2AJ4TEKE.js} +6 -6
  11. package/dist/{chunk-ST6YNAXG.js → chunk-3DA7X2U3.js} +6 -3
  12. package/dist/{chunk-PNGAJ75P.js → chunk-3JKTVW4R.js} +7 -8
  13. package/dist/{chunk-Q6XFTRV5.js → chunk-4XHCVBXH.js} +2 -2
  14. package/dist/{chunk-Z4CIQ3EB.js → chunk-66NX7MNW.js} +1 -1
  15. package/dist/{chunk-Q3XNY442.js → chunk-6APU57E6.js} +1 -3
  16. package/dist/{chunk-T77LUIX3.js → chunk-ABRNFE3N.js} +7 -211
  17. package/dist/chunk-DR75T7J3.js +225 -0
  18. package/dist/{chunk-KIDP757T.js → chunk-FAGWUF44.js} +17 -7
  19. package/dist/{chunk-OJ53FYVG.js → chunk-FTMXFBDC.js} +14 -0
  20. package/dist/{chunk-RARSKPVT.js → chunk-GUO4EE7L.js} +2 -2
  21. package/dist/{chunk-2ECJXSVQ.js → chunk-IOBSRZK5.js} +1 -1
  22. package/dist/{chunk-EJN6G5A2.js → chunk-KF7522P3.js} +5 -19
  23. package/dist/{chunk-C2YBH4S6.js → chunk-LX5GBMEP.js} +6 -6
  24. package/dist/{chunk-237T7XAN.js → chunk-PQ2U2AO3.js} +3 -3
  25. package/dist/{chunk-YLVJRYTD.js → chunk-TW23AT22.js} +190 -196
  26. package/dist/{chunk-NNM7YQLL.js → chunk-W2QGQCKG.js} +66 -54
  27. package/dist/{chunk-Y3EG7S7P.js → chunk-WCXVEQPI.js} +7 -8
  28. package/dist/{chunk-LXTPBU4K.js → chunk-X2FL5ZH5.js} +1 -1
  29. package/dist/{chunk-SSWBYEFH.js → chunk-Y3YUOEAZ.js} +13 -7
  30. package/dist/{chunk-R5T7QY3P.js → chunk-YA2JCC7G.js} +10 -8
  31. package/dist/{chunk-VALUBQ7R.js → chunk-ZPCGQRFJ.js} +1 -1
  32. package/dist/cli/chat.js +12 -10
  33. package/dist/cli/check.js +7 -7
  34. package/dist/cli/main.js +1 -1
  35. package/dist/cli/plugins.js +17 -16
  36. package/dist/cli/snapshot-warmup.js +14 -15
  37. package/dist/cli/upgrade.js +20 -22
  38. package/dist/db-GQJKBX5W.js +18 -0
  39. package/dist/instrumentation.js +76 -3
  40. package/dist/nitro.js +8 -7
  41. package/dist/reporting.js +19 -19
  42. package/dist/{runner-GEZ5FN4R.js → runner-JOVPVMIH.js} +18 -17
  43. package/dist/{sentry-4CP5NNQ5.js → sentry-EGFOV3DH.js} +5 -3
  44. package/dist/validation-TN6HMZAD.js +15 -0
  45. package/package.json +5 -5
  46. package/dist/db-NGQ3JCMF.js +0 -17
  47. package/dist/registry-RRIDPJBT.js +0 -46
  48. package/dist/validation-MDMYBRFB.js +0 -15
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  JUNIOR_THREAD_STATE_TTL_MS,
3
3
  buildConversationStatePatch
4
- } from "./chunk-Z4CIQ3EB.js";
4
+ } from "./chunk-66NX7MNW.js";
5
5
  import {
6
6
  buildNonInteractiveShellScript,
7
7
  createSandboxInstance,
@@ -10,7 +10,7 @@ import {
10
10
  isSnapshotMissingError,
11
11
  resolveRuntimeDependencySnapshot,
12
12
  runNonInteractiveCommand
13
- } from "./chunk-PNGAJ75P.js";
13
+ } from "./chunk-3JKTVW4R.js";
14
14
  import {
15
15
  pluginTaskId,
16
16
  pluginTaskParamsSchema,
@@ -31,7 +31,7 @@ import {
31
31
  recordSubagentStarted,
32
32
  recordToolExecutionStarted,
33
33
  upsertAgentTurnSessionRecord
34
- } from "./chunk-R5T7QY3P.js";
34
+ } from "./chunk-YA2JCC7G.js";
35
35
  import {
36
36
  createPluginEmbedder,
37
37
  createPluginHookRunner,
@@ -42,14 +42,14 @@ import {
42
42
  getPlugins,
43
43
  getSlackToolContext,
44
44
  resolveChannelCapabilities
45
- } from "./chunk-SSWBYEFH.js";
45
+ } from "./chunk-Y3YUOEAZ.js";
46
46
  import {
47
47
  createPluginLogger,
48
48
  createPluginState
49
- } from "./chunk-RARSKPVT.js";
49
+ } from "./chunk-GUO4EE7L.js";
50
50
  import {
51
51
  getDb
52
- } from "./chunk-237T7XAN.js";
52
+ } from "./chunk-PQ2U2AO3.js";
53
53
  import {
54
54
  SANDBOX_DATA_ROOT,
55
55
  SANDBOX_SKILLS_ROOT,
@@ -60,7 +60,7 @@ import {
60
60
  import {
61
61
  acquireActiveLock,
62
62
  getStateAdapter
63
- } from "./chunk-LXTPBU4K.js";
63
+ } from "./chunk-X2FL5ZH5.js";
64
64
  import {
65
65
  SlackActionError,
66
66
  downloadPrivateSlackFile,
@@ -71,7 +71,7 @@ import {
71
71
  normalizeSlackConversationId,
72
72
  parseDestination,
73
73
  withSlackRetries
74
- } from "./chunk-Q6XFTRV5.js";
74
+ } from "./chunk-4XHCVBXH.js";
75
75
  import {
76
76
  GEN_AI_PROVIDER_NAME,
77
77
  GEN_AI_SERVER_ADDRESS,
@@ -98,54 +98,48 @@ import {
98
98
  nextProviderRetry,
99
99
  normalizeSlackEmojiName,
100
100
  normalizeToolNameFromResult,
101
- parseSlackThreadId,
102
- resolveConversationPrivacy,
103
101
  resolveGatewayModel,
104
102
  stripRuntimeTurnContext,
105
103
  summarizeMessageText,
104
+ toObservablePromptPart,
105
+ trimTrailingAssistantMessages,
106
+ upsertActiveSkill
107
+ } from "./chunk-ABRNFE3N.js";
108
+ import {
109
+ parseSlackThreadId,
110
+ resolveConversationPrivacy,
111
+ runWithConversationPrivacy,
106
112
  toGenAiMessageMetadata,
107
113
  toGenAiMessagesTraceAttributes,
108
114
  toGenAiPayloadMetadata,
109
115
  toGenAiPayloadTraceAttributes,
110
- toGenAiTextMetadata,
111
- toObservablePromptPart,
112
- trimTrailingAssistantMessages,
113
- upsertActiveSkill
114
- } from "./chunk-T77LUIX3.js";
116
+ toGenAiTextMetadata
117
+ } from "./chunk-DR75T7J3.js";
115
118
  import {
116
119
  discoverSkills,
117
120
  findSkillByName,
118
121
  loadSkillsByName,
119
122
  parseSkillInvocation
120
- } from "./chunk-Y3EG7S7P.js";
123
+ } from "./chunk-WCXVEQPI.js";
121
124
  import {
122
- createPluginBroker,
123
125
  credentialContextSchema,
124
- getPluginCapabilityProviders,
125
- getPluginCatalogSignature,
126
- getPluginDefinition,
127
- getPluginDisplayName,
128
- getPluginMcpProviders,
129
- getPluginOAuthConfig,
130
- getPluginProviders,
131
- isPluginConfigKey,
126
+ pluginCatalogRuntime,
132
127
  resolveAuthTokenPlaceholder,
133
128
  resolvePluginCommandEnv
134
- } from "./chunk-YLVJRYTD.js";
129
+ } from "./chunk-TW23AT22.js";
135
130
  import {
136
131
  createRequester,
137
132
  parseActorUserId
138
- } from "./chunk-VALUBQ7R.js";
133
+ } from "./chunk-ZPCGQRFJ.js";
139
134
  import {
140
135
  listReferenceFiles
141
- } from "./chunk-Q3XNY442.js";
136
+ } from "./chunk-6APU57E6.js";
142
137
  import {
143
138
  extractGenAiUsageAttributes,
144
139
  extractGenAiUsageSummary,
145
140
  getActiveTraceId,
146
141
  getLogContextAttributes,
147
142
  getTracePropagationHeaders,
148
- isRecord,
149
143
  logError,
150
144
  logException,
151
145
  logInfo,
@@ -155,13 +149,16 @@ import {
155
149
  setSpanAttributes,
156
150
  setSpanStatus,
157
151
  setTags,
158
- toOptionalString,
159
152
  withSpan
160
- } from "./chunk-EJN6G5A2.js";
153
+ } from "./chunk-KF7522P3.js";
154
+ import {
155
+ isRecord,
156
+ toOptionalString
157
+ } from "./chunk-FTMXFBDC.js";
161
158
  import {
162
159
  startInactiveSpan,
163
160
  withActiveSpan
164
- } from "./chunk-ST6YNAXG.js";
161
+ } from "./chunk-3DA7X2U3.js";
165
162
 
166
163
  // src/chat/configuration/defaults.ts
167
164
  var installDefaults = {};
@@ -182,7 +179,7 @@ function setConfigDefaults(defaults) {
182
179
  );
183
180
  }
184
181
  for (const key of Object.keys(defaults)) {
185
- if (!isPluginConfigKey(key)) {
182
+ if (!pluginCatalogRuntime.isConfigKey(key)) {
186
183
  throw new Error(
187
184
  `configDefaults: "${key}" is not a registered plugin config key`
188
185
  );
@@ -686,9 +683,9 @@ import { THREAD_STATE_TTL_MS as THREAD_STATE_TTL_MS4 } from "chat";
686
683
  // src/chat/capabilities/catalog.ts
687
684
  var cachedCatalog;
688
685
  function getCapabilityCatalog() {
689
- const signature = getPluginCatalogSignature();
686
+ const signature = pluginCatalogRuntime.getSignature();
690
687
  if (cachedCatalog?.signature === signature) return cachedCatalog;
691
- const providers = getPluginCapabilityProviders();
688
+ const providers = pluginCatalogRuntime.getCapabilityProviders();
692
689
  const capabilityToProvider = /* @__PURE__ */ new Map();
693
690
  for (const provider of providers) {
694
691
  for (const capability of provider.capabilities) {
@@ -814,12 +811,14 @@ function createUserTokenStore() {
814
811
  function createProviderCredentialRouter(userTokenStore) {
815
812
  logCapabilityCatalogLoadedOnce();
816
813
  const brokersByProvider = {};
817
- for (const plugin of getPluginProviders()) {
814
+ for (const plugin of pluginCatalogRuntime.getProviders()) {
818
815
  const { name } = plugin.manifest;
819
816
  if (!plugin.manifest.credentials && !plugin.manifest.apiHeaders) {
820
817
  continue;
821
818
  }
822
- brokersByProvider[name] = createPluginBroker(name, { userTokenStore });
819
+ brokersByProvider[name] = pluginCatalogRuntime.createBroker(name, {
820
+ userTokenStore
821
+ });
823
822
  }
824
823
  return new ProviderCredentialRouter({ brokersByProvider });
825
824
  }
@@ -1074,7 +1073,7 @@ ${usage}
1074
1073
  exitCode: 2
1075
1074
  });
1076
1075
  }
1077
- const plugins = getPluginProviders().map((plugin) => ({
1076
+ const plugins = pluginCatalogRuntime.getProviders().map((plugin) => ({
1078
1077
  name: plugin.manifest.name,
1079
1078
  displayName: plugin.manifest.displayName,
1080
1079
  description: plugin.manifest.description,
@@ -6992,7 +6991,7 @@ function parseOAuthStatePayload(value) {
6992
6991
  };
6993
6992
  }
6994
6993
  function formatProviderLabel(provider) {
6995
- const displayName = getPluginDisplayName(provider);
6994
+ const displayName = pluginCatalogRuntime.getDisplayName(provider);
6996
6995
  if (!displayName) {
6997
6996
  throw new Error(`Unknown plugin provider display name: "${provider}"`);
6998
6997
  }
@@ -7075,7 +7074,7 @@ async function deliverPrivateMessage(input) {
7075
7074
  }
7076
7075
  }
7077
7076
  async function startOAuthFlow(provider, input) {
7078
- const providerConfig = getPluginOAuthConfig(provider);
7077
+ const providerConfig = pluginCatalogRuntime.getOAuthConfig(provider);
7079
7078
  if (!providerConfig) {
7080
7079
  return {
7081
7080
  ok: false,
@@ -7432,7 +7431,7 @@ function manifestDomains(manifest) {
7432
7431
  return [...domains].sort((left, right) => left.localeCompare(right));
7433
7432
  }
7434
7433
  function providerEntries() {
7435
- return getPluginProviders().map((plugin) => ({
7434
+ return pluginCatalogRuntime.getProviders().map((plugin) => ({
7436
7435
  provider: plugin.manifest.name,
7437
7436
  domains: manifestDomains(plugin.manifest)
7438
7437
  })).filter((entry) => entry.domains.length > 0).sort((left, right) => left.provider.localeCompare(right.provider));
@@ -7498,7 +7497,7 @@ function buildSandboxEgressNetworkPolicy(input) {
7498
7497
  }
7499
7498
  async function resolveSandboxCommandEnvironment() {
7500
7499
  const env = {};
7501
- for (const plugin of getPluginProviders().sort(
7500
+ for (const plugin of pluginCatalogRuntime.getProviders().sort(
7502
7501
  (left, right) => left.manifest.name.localeCompare(right.manifest.name)
7503
7502
  )) {
7504
7503
  Object.assign(env, resolvePluginCommandEnv(plugin.manifest));
@@ -9600,7 +9599,7 @@ function createPluginAuthOrchestration(input) {
9600
9599
  if (pendingPause) {
9601
9600
  throw pendingPause;
9602
9601
  }
9603
- if (!input.requesterId || !getPluginOAuthConfig(provider)) {
9602
+ if (!input.requesterId || !pluginCatalogRuntime.getOAuthConfig(provider)) {
9604
9603
  throw new Error(`Cannot start plugin authorization for ${provider}`);
9605
9604
  }
9606
9605
  if (input.authorizationFlowMode === "disabled") {
@@ -9707,7 +9706,7 @@ function createPluginAuthOrchestration(input) {
9707
9706
  signal.message ?? `${formatProviderLabel(provider)} credentials are required. Please connect your ${formatProviderLabel(provider)} account and try again.`
9708
9707
  );
9709
9708
  }
9710
- if (!getPluginOAuthConfig(authorization.provider)) {
9709
+ if (!pluginCatalogRuntime.getOAuthConfig(authorization.provider)) {
9711
9710
  throw new PluginCredentialFailureError(
9712
9711
  provider,
9713
9712
  signal.message ?? `${formatProviderLabel(provider)} credentials are required but the provider is not configured for OAuth.`
@@ -10967,7 +10966,7 @@ function getMcpOAuthCallbackPath(provider) {
10967
10966
  return `/api/oauth/callback/mcp/${provider}`;
10968
10967
  }
10969
10968
  function requirePluginWithMcp(provider) {
10970
- const plugin = getPluginDefinition(provider);
10969
+ const plugin = pluginCatalogRuntime.getDefinition(provider);
10971
10970
  if (!plugin?.manifest.mcp) {
10972
10971
  throw new Error(`Plugin "${provider}" does not support MCP`);
10973
10972
  }
@@ -11423,6 +11422,20 @@ function withoutTrailingUncheckpointedUserPrompt(messages, userContentParts) {
11423
11422
  return messages.slice(0, -1);
11424
11423
  }
11425
11424
  async function generateAssistantReply(messageText2, context) {
11425
+ const conversationPrivacy = resolveConversationPrivacy({
11426
+ channelId: context.correlation?.channelId,
11427
+ conversationId: context.correlation?.conversationId ?? context.correlation?.threadId ?? context.correlation?.runId
11428
+ });
11429
+ return runWithConversationPrivacy(
11430
+ conversationPrivacy ?? "private",
11431
+ () => generateAssistantReplyInPrivacyContext(
11432
+ messageText2,
11433
+ context,
11434
+ conversationPrivacy
11435
+ )
11436
+ );
11437
+ }
11438
+ async function generateAssistantReplyInPrivacyContext(messageText2, context, conversationPrivacy) {
11426
11439
  if (!context.destination) {
11427
11440
  throw new TypeError("Assistant reply generation requires a destination");
11428
11441
  }
@@ -11460,10 +11473,6 @@ async function generateAssistantReply(messageText2, context) {
11460
11473
  actorType: credentialActor.type,
11461
11474
  actorId: credentialActor.type === "user" ? credentialActor.userId : credentialActor.id
11462
11475
  } : {};
11463
- const conversationPrivacy = resolveConversationPrivacy({
11464
- channelId: context.correlation?.channelId,
11465
- conversationId: context.correlation?.conversationId ?? context.correlation?.threadId ?? context.correlation?.runId
11466
- });
11467
11476
  const sessionRecordLogContext = {
11468
11477
  threadId: context.correlation?.threadId,
11469
11478
  requesterId: context.correlation?.requesterId,
@@ -11516,7 +11525,7 @@ async function generateAssistantReply(messageText2, context) {
11516
11525
  });
11517
11526
  if (!startupDiscoveryLogged) {
11518
11527
  startupDiscoveryLogged = true;
11519
- const plugins = getPluginProviders();
11528
+ const plugins = pluginCatalogRuntime.getProviders();
11520
11529
  const roots = [
11521
11530
  ...new Set(availableSkills.map((skill) => skill.skillPath))
11522
11531
  ].sort();
@@ -11775,10 +11784,13 @@ async function generateAssistantReply(messageText2, context) {
11775
11784
  authorizationFlowMode: context.authorizationFlowMode,
11776
11785
  userTokenStore
11777
11786
  });
11778
- mcpToolManager = new McpToolManager(getPluginMcpProviders(), {
11779
- authProviderFactory: mcpAuth.authProviderFactory,
11780
- onAuthorizationRequired: mcpAuth.onAuthorizationRequired
11781
- });
11787
+ mcpToolManager = new McpToolManager(
11788
+ pluginCatalogRuntime.getMcpProviders(),
11789
+ {
11790
+ authProviderFactory: mcpAuth.authProviderFactory,
11791
+ onAuthorizationRequired: mcpAuth.onAuthorizationRequired
11792
+ }
11793
+ );
11782
11794
  const turnMcpToolManager = mcpToolManager;
11783
11795
  const getPendingAuthPause = () => pluginAuth.getPendingPause() ?? mcpAuth.getPendingPause();
11784
11796
  setTags({
@@ -1,13 +1,12 @@
1
1
  import {
2
- getPluginForSkillPath,
3
- getPluginSkillRoots
4
- } from "./chunk-YLVJRYTD.js";
2
+ pluginCatalogRuntime
3
+ } from "./chunk-TW23AT22.js";
5
4
  import {
6
5
  skillRoots
7
- } from "./chunk-Q3XNY442.js";
6
+ } from "./chunk-6APU57E6.js";
8
7
  import {
9
8
  logWarn
10
- } from "./chunk-EJN6G5A2.js";
9
+ } from "./chunk-KF7522P3.js";
11
10
 
12
11
  // src/chat/skills.ts
13
12
  import fs from "fs/promises";
@@ -162,7 +161,7 @@ function resolveSkillRoots(options) {
162
161
  const additionalRoots = options?.additionalRoots ?? [];
163
162
  const envRoots = process.env.SKILL_DIRS?.split(path.delimiter).filter(Boolean) ?? [];
164
163
  const defaults = skillRoots();
165
- const pluginRoots = getPluginSkillRoots();
164
+ const pluginRoots = pluginCatalogRuntime.getSkillRoots();
166
165
  const seen = /* @__PURE__ */ new Set();
167
166
  const resolved = [];
168
167
  for (const root of [
@@ -181,7 +180,7 @@ function resolveSkillRoots(options) {
181
180
  return resolved;
182
181
  }
183
182
  function resolveSkillPlugin(meta) {
184
- const plugin = getPluginForSkillPath(meta.skillPath);
183
+ const plugin = pluginCatalogRuntime.getForSkillPath(meta.skillPath);
185
184
  if (meta.pluginProvider && plugin?.manifest.name !== meta.pluginProvider) {
186
185
  throw new Error(
187
186
  `Skill "${meta.name}" metadata names plugin "${meta.pluginProvider}" but is not owned by that plugin`
@@ -233,7 +232,7 @@ async function readSkillDirectory(skillDir) {
233
232
  return null;
234
233
  }
235
234
  const { name, description, allowedTools, disableModelInvocation } = parsed.skill;
236
- const plugin = getPluginForSkillPath(skillDir);
235
+ const plugin = pluginCatalogRuntime.getForSkillPath(skillDir);
237
236
  return {
238
237
  name,
239
238
  description,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getChatConfig
3
- } from "./chunk-T77LUIX3.js";
3
+ } from "./chunk-ABRNFE3N.js";
4
4
 
5
5
  // src/chat/state/adapter.ts
6
6
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createPluginLogger,
3
3
  createPluginState
4
- } from "./chunk-RARSKPVT.js";
4
+ } from "./chunk-GUO4EE7L.js";
5
5
  import {
6
6
  getDb
7
- } from "./chunk-237T7XAN.js";
7
+ } from "./chunk-PQ2U2AO3.js";
8
8
  import {
9
9
  SANDBOX_WORKSPACE_ROOT
10
10
  } from "./chunk-G3E7SCME.js";
@@ -13,20 +13,20 @@ import {
13
13
  isConversationScopedChannel,
14
14
  isDmChannel,
15
15
  normalizeSlackConversationId
16
- } from "./chunk-Q6XFTRV5.js";
16
+ } from "./chunk-4XHCVBXH.js";
17
17
  import {
18
18
  botConfig,
19
19
  completeObject,
20
20
  embedTexts
21
- } from "./chunk-T77LUIX3.js";
21
+ } from "./chunk-ABRNFE3N.js";
22
22
  import {
23
23
  isActorUserId,
24
24
  parseActorUserId
25
- } from "./chunk-VALUBQ7R.js";
25
+ } from "./chunk-ZPCGQRFJ.js";
26
26
  import {
27
27
  logInfo,
28
28
  logWarn
29
- } from "./chunk-EJN6G5A2.js";
29
+ } from "./chunk-KF7522P3.js";
30
30
 
31
31
  // src/chat/plugins/agent-hooks.ts
32
32
  import { promptMessageSchema } from "@sentry/junior-plugin-api";
@@ -522,7 +522,13 @@ function getPluginTools(context) {
522
522
  `Duplicate plugin tool "${name}" from plugin "${pluginName}"`
523
523
  );
524
524
  }
525
- tools[name] = tool;
525
+ const definition = tool;
526
+ definition.identity = {
527
+ id: `${pluginName}.${name}`,
528
+ name,
529
+ plugin: pluginName
530
+ };
531
+ tools[name] = definition;
526
532
  }
527
533
  }
528
534
  return tools;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getConversationStore
3
- } from "./chunk-237T7XAN.js";
3
+ } from "./chunk-PQ2U2AO3.js";
4
4
  import {
5
5
  SANDBOX_DATA_ROOT,
6
6
  SANDBOX_WORKSPACE_ROOT,
@@ -9,30 +9,32 @@ import {
9
9
  import {
10
10
  getConnectedStateContext,
11
11
  getStateAdapter
12
- } from "./chunk-LXTPBU4K.js";
12
+ } from "./chunk-X2FL5ZH5.js";
13
13
  import {
14
14
  parseDestination
15
- } from "./chunk-Q6XFTRV5.js";
15
+ } from "./chunk-4XHCVBXH.js";
16
16
  import {
17
17
  TURN_CONTEXT_TAG,
18
18
  botConfig,
19
19
  getChatConfig
20
- } from "./chunk-T77LUIX3.js";
20
+ } from "./chunk-ABRNFE3N.js";
21
21
  import {
22
22
  parseRequester,
23
23
  storedSlackRequesterSchema,
24
24
  toStoredSlackRequester
25
- } from "./chunk-VALUBQ7R.js";
25
+ } from "./chunk-ZPCGQRFJ.js";
26
26
  import {
27
27
  listReferenceFiles,
28
28
  soulPathCandidates,
29
29
  worldPathCandidates
30
- } from "./chunk-Q3XNY442.js";
30
+ } from "./chunk-6APU57E6.js";
31
31
  import {
32
- isRecord,
33
32
  logInfo,
34
33
  logWarn
35
- } from "./chunk-EJN6G5A2.js";
34
+ } from "./chunk-KF7522P3.js";
35
+ import {
36
+ isRecord
37
+ } from "./chunk-FTMXFBDC.js";
36
38
 
37
39
  // src/chat/state/session-log.ts
38
40
  import { isDeepStrictEqual } from "util";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isSlackTeamId
3
- } from "./chunk-EJN6G5A2.js";
3
+ } from "./chunk-KF7522P3.js";
4
4
 
5
5
  // src/chat/requester.ts
6
6
  import { z } from "zod";
package/dist/cli/chat.js CHANGED
@@ -125,25 +125,25 @@ async function configureLocalChatPlugins(pluginSet) {
125
125
  const [
126
126
  pluginsModule,
127
127
  agentHooksModule,
128
- registryModule,
128
+ catalogRuntimeModule,
129
129
  validationModule,
130
130
  databaseModule
131
131
  ] = await Promise.all([
132
132
  import("../plugins-PZMDS7AT.js"),
133
- import("../agent-hooks-OFDNZJB2.js"),
134
- import("../registry-RRIDPJBT.js"),
135
- import("../validation-MDMYBRFB.js"),
136
- import("../db-NGQ3JCMF.js")
133
+ import("../agent-hooks-ZGTDOXQY.js"),
134
+ import("../catalog-runtime-IVWRAPSI.js"),
135
+ import("../validation-TN6HMZAD.js"),
136
+ import("../db-GQJKBX5W.js")
137
137
  ]);
138
138
  const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
139
139
  const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
140
140
  const pluginConfig = resolvedPluginSet ? pluginsModule.pluginCatalogConfigFromPluginSet(resolvedPluginSet) : pluginsModule.pluginCatalogConfigFromEnv();
141
141
  const shouldValidatePluginCatalog = Boolean(pluginConfig) || Boolean(resolvedPluginSet?.registrations.length);
142
142
  agentHooksModule.validatePlugins(plugins);
143
- const previousPluginCatalogConfig = registryModule.setPluginCatalogConfig(pluginConfig);
143
+ const previousPluginCatalogConfig = catalogRuntimeModule.pluginCatalogRuntime.setConfig(pluginConfig);
144
144
  try {
145
145
  if (shouldValidatePluginCatalog) {
146
- registryModule.getPluginCatalogSignature();
146
+ catalogRuntimeModule.pluginCatalogRuntime.getSignature();
147
147
  validationModule.validatePluginRegistrations(
148
148
  resolvedPluginSet?.registrations ?? []
149
149
  );
@@ -154,7 +154,9 @@ async function configureLocalChatPlugins(pluginSet) {
154
154
  databaseModule.getDb();
155
155
  agentHooksModule.setPlugins(plugins);
156
156
  } catch (error) {
157
- registryModule.setPluginCatalogConfig(previousPluginCatalogConfig);
157
+ catalogRuntimeModule.pluginCatalogRuntime.setConfig(
158
+ previousPluginCatalogConfig
159
+ );
158
160
  throw error;
159
161
  }
160
162
  }
@@ -193,7 +195,7 @@ async function runPrompt(options, io, pluginSet) {
193
195
  defaultStateAdapterForLocalChat();
194
196
  await configureLocalChatPlugins(pluginSet);
195
197
  const conversationId = newRunConversationId();
196
- const { runLocalAgentTurn } = await import("../runner-GEZ5FN4R.js");
198
+ const { runLocalAgentTurn } = await import("../runner-JOVPVMIH.js");
197
199
  const result = await runLocalAgentTurn(
198
200
  {
199
201
  conversationId,
@@ -217,7 +219,7 @@ async function runInteractive(io, pluginSet) {
217
219
  defaultStateAdapterForLocalChat();
218
220
  await configureLocalChatPlugins(pluginSet);
219
221
  const conversationId = newRunConversationId();
220
- const { runLocalAgentTurn } = await import("../runner-GEZ5FN4R.js");
222
+ const { runLocalAgentTurn } = await import("../runner-JOVPVMIH.js");
221
223
  const rl = readline.createInterface({
222
224
  input: io.input,
223
225
  output: io.output,
package/dist/cli/check.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  parseSkillFile
3
- } from "../chunk-Y3EG7S7P.js";
3
+ } from "../chunk-WCXVEQPI.js";
4
4
  import {
5
5
  parseInlinePluginManifest,
6
6
  parsePluginManifest
7
- } from "../chunk-YLVJRYTD.js";
8
- import "../chunk-VALUBQ7R.js";
9
- import "../chunk-Q3XNY442.js";
10
- import "../chunk-EJN6G5A2.js";
7
+ } from "../chunk-TW23AT22.js";
8
+ import "../chunk-ZPCGQRFJ.js";
9
+ import "../chunk-6APU57E6.js";
10
+ import "../chunk-KF7522P3.js";
11
11
  import {
12
12
  JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
13
13
  JUNIOR_HEARTBEAT_ROUTE,
14
14
  LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION
15
- } from "../chunk-OJ53FYVG.js";
16
- import "../chunk-ST6YNAXG.js";
15
+ } from "../chunk-FTMXFBDC.js";
16
+ import "../chunk-3DA7X2U3.js";
17
17
  import "../chunk-MLKGABMK.js";
18
18
 
19
19
  // src/cli/check.ts
package/dist/cli/main.js CHANGED
@@ -10,7 +10,7 @@ import "../chunk-MLKGABMK.js";
10
10
  import { pathToFileURL } from "url";
11
11
  var SENTRY_FLUSH_TIMEOUT_MS = 2e3;
12
12
  async function flushSentry() {
13
- const mod = await import("../sentry-4CP5NNQ5.js");
13
+ const mod = await import("../sentry-EGFOV3DH.js");
14
14
  await mod.flush(SENTRY_FLUSH_TIMEOUT_MS);
15
15
  }
16
16
  async function initSentry() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  validatePluginEgressCredentialHooks,
3
3
  validatePluginRegistrations
4
- } from "../chunk-KIDP757T.js";
4
+ } from "../chunk-FAGWUF44.js";
5
5
  import {
6
6
  pluginCatalogConfigFromPluginSet,
7
7
  pluginCliRegistrationsFromPluginSet,
@@ -10,28 +10,29 @@ import {
10
10
  import {
11
11
  setPlugins,
12
12
  validatePlugins
13
- } from "../chunk-SSWBYEFH.js";
13
+ } from "../chunk-Y3YUOEAZ.js";
14
14
  import {
15
15
  createPluginLogger
16
- } from "../chunk-RARSKPVT.js";
16
+ } from "../chunk-GUO4EE7L.js";
17
17
  import {
18
18
  getDb
19
- } from "../chunk-237T7XAN.js";
19
+ } from "../chunk-PQ2U2AO3.js";
20
20
  import "../chunk-G3E7SCME.js";
21
- import "../chunk-LXTPBU4K.js";
22
- import "../chunk-Q6XFTRV5.js";
23
- import "../chunk-T77LUIX3.js";
21
+ import "../chunk-X2FL5ZH5.js";
22
+ import "../chunk-4XHCVBXH.js";
23
+ import "../chunk-ABRNFE3N.js";
24
+ import "../chunk-DR75T7J3.js";
24
25
  import {
25
26
  loadAppPluginSet
26
27
  } from "../chunk-Y2CM7HXH.js";
27
28
  import {
28
- setPluginCatalogConfig
29
- } from "../chunk-YLVJRYTD.js";
30
- import "../chunk-VALUBQ7R.js";
31
- import "../chunk-Q3XNY442.js";
32
- import "../chunk-EJN6G5A2.js";
33
- import "../chunk-OJ53FYVG.js";
34
- import "../chunk-ST6YNAXG.js";
29
+ pluginCatalogRuntime
30
+ } from "../chunk-TW23AT22.js";
31
+ import "../chunk-ZPCGQRFJ.js";
32
+ import "../chunk-6APU57E6.js";
33
+ import "../chunk-KF7522P3.js";
34
+ import "../chunk-FTMXFBDC.js";
35
+ import "../chunk-3DA7X2U3.js";
35
36
  import "../chunk-MLKGABMK.js";
36
37
 
37
38
  // src/cli/plugins.ts
@@ -189,7 +190,7 @@ async function loadPluginRegistrations(args) {
189
190
  const runtimePlugins = pluginRuntimeRegistrationsFromPluginSet(pluginSet);
190
191
  const pluginConfig = pluginCatalogConfigFromPluginSet(pluginSet);
191
192
  validatePlugins(runtimePlugins);
192
- const previousPluginCatalogConfig = setPluginCatalogConfig(pluginConfig);
193
+ const previousPluginCatalogConfig = pluginCatalogRuntime.setConfig(pluginConfig);
193
194
  try {
194
195
  validatePluginRegistrations(pluginSet.registrations);
195
196
  validatePluginEgressCredentialHooks(pluginSet.registrations);
@@ -197,7 +198,7 @@ async function loadPluginRegistrations(args) {
197
198
  setPlugins(runtimePlugins);
198
199
  return { cliPlugins, runtimePlugins };
199
200
  } catch (error) {
200
- setPluginCatalogConfig(previousPluginCatalogConfig);
201
+ pluginCatalogRuntime.setConfig(previousPluginCatalogConfig);
201
202
  throw error;
202
203
  }
203
204
  }