@sentry/junior 0.79.0 → 0.80.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.
- package/dist/{agent-hooks-OFDNZJB2.js → agent-hooks-ZGTDOXQY.js} +11 -10
- package/dist/app.js +39 -41
- package/dist/catalog-runtime-IVWRAPSI.js +12 -0
- package/dist/chat/conversation-privacy.d.ts +4 -0
- package/dist/chat/plugins/catalog-runtime.d.ts +1 -0
- package/dist/chat/plugins/registry.d.ts +27 -26
- package/dist/chat/sentry-payload-filter.d.ts +14 -0
- package/dist/chat/sentry.d.ts +1 -1
- package/dist/chat/tools/definition.d.ts +6 -0
- package/dist/{chunk-LUNMJQ7D.js → chunk-2AJ4TEKE.js} +6 -6
- package/dist/{chunk-ST6YNAXG.js → chunk-3DA7X2U3.js} +6 -3
- package/dist/{chunk-PNGAJ75P.js → chunk-3JKTVW4R.js} +7 -8
- package/dist/{chunk-Q6XFTRV5.js → chunk-4XHCVBXH.js} +2 -2
- package/dist/{chunk-Z4CIQ3EB.js → chunk-66NX7MNW.js} +1 -1
- package/dist/{chunk-Q3XNY442.js → chunk-6APU57E6.js} +1 -3
- package/dist/{chunk-T77LUIX3.js → chunk-ABRNFE3N.js} +7 -211
- package/dist/chunk-DR75T7J3.js +225 -0
- package/dist/{chunk-KIDP757T.js → chunk-FAGWUF44.js} +17 -7
- package/dist/{chunk-OJ53FYVG.js → chunk-FTMXFBDC.js} +14 -0
- package/dist/{chunk-RARSKPVT.js → chunk-GUO4EE7L.js} +2 -2
- package/dist/{chunk-2ECJXSVQ.js → chunk-IOBSRZK5.js} +1 -1
- package/dist/{chunk-EJN6G5A2.js → chunk-KF7522P3.js} +5 -19
- package/dist/{chunk-C2YBH4S6.js → chunk-LX5GBMEP.js} +6 -6
- package/dist/{chunk-237T7XAN.js → chunk-PQ2U2AO3.js} +3 -3
- package/dist/{chunk-YLVJRYTD.js → chunk-TW23AT22.js} +190 -196
- package/dist/{chunk-NNM7YQLL.js → chunk-W2QGQCKG.js} +66 -54
- package/dist/{chunk-Y3EG7S7P.js → chunk-WCXVEQPI.js} +7 -8
- package/dist/{chunk-LXTPBU4K.js → chunk-X2FL5ZH5.js} +1 -1
- package/dist/{chunk-SSWBYEFH.js → chunk-Y3YUOEAZ.js} +13 -7
- package/dist/{chunk-R5T7QY3P.js → chunk-YA2JCC7G.js} +10 -8
- package/dist/{chunk-VALUBQ7R.js → chunk-ZPCGQRFJ.js} +1 -1
- package/dist/cli/chat.js +12 -10
- package/dist/cli/check.js +7 -7
- package/dist/cli/main.js +1 -1
- package/dist/cli/plugins.js +17 -16
- package/dist/cli/snapshot-warmup.js +14 -15
- package/dist/cli/upgrade.js +20 -22
- package/dist/db-GQJKBX5W.js +18 -0
- package/dist/instrumentation.js +76 -3
- package/dist/nitro.js +8 -7
- package/dist/reporting.js +19 -19
- package/dist/{runner-GEZ5FN4R.js → runner-JOVPVMIH.js} +18 -17
- package/dist/{sentry-4CP5NNQ5.js → sentry-EGFOV3DH.js} +5 -3
- package/dist/validation-TN6HMZAD.js +15 -0
- package/package.json +5 -5
- package/dist/db-NGQ3JCMF.js +0 -17
- package/dist/registry-RRIDPJBT.js +0 -46
- package/dist/validation-MDMYBRFB.js +0 -15
|
@@ -11,17 +11,18 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-Y3YUOEAZ.js";
|
|
15
|
+
import "./chunk-GUO4EE7L.js";
|
|
16
|
+
import "./chunk-PQ2U2AO3.js";
|
|
17
17
|
import "./chunk-G3E7SCME.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-X2FL5ZH5.js";
|
|
19
|
+
import "./chunk-4XHCVBXH.js";
|
|
20
|
+
import "./chunk-ABRNFE3N.js";
|
|
21
|
+
import "./chunk-DR75T7J3.js";
|
|
22
|
+
import "./chunk-ZPCGQRFJ.js";
|
|
23
|
+
import "./chunk-KF7522P3.js";
|
|
24
|
+
import "./chunk-FTMXFBDC.js";
|
|
25
|
+
import "./chunk-3DA7X2U3.js";
|
|
25
26
|
import "./chunk-MLKGABMK.js";
|
|
26
27
|
export {
|
|
27
28
|
PluginHookDeniedError,
|
package/dist/app.js
CHANGED
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
updateConversationStats,
|
|
72
72
|
uploadFilesToThread,
|
|
73
73
|
upsertConversationMessage
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-W2QGQCKG.js";
|
|
75
75
|
import {
|
|
76
76
|
CONVERSATION_WORK_CHECK_IN_INTERVAL_MS,
|
|
77
77
|
CONVERSATION_WORK_STALE_ENQUEUE_MS,
|
|
@@ -90,17 +90,17 @@ import {
|
|
|
90
90
|
requestConversationContinuation,
|
|
91
91
|
requestConversationWork,
|
|
92
92
|
startConversationWork
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-2AJ4TEKE.js";
|
|
94
94
|
import {
|
|
95
95
|
JUNIOR_THREAD_STATE_TTL_MS,
|
|
96
96
|
coerceThreadConversationState
|
|
97
|
-
} from "./chunk-
|
|
98
|
-
import "./chunk-
|
|
97
|
+
} from "./chunk-66NX7MNW.js";
|
|
98
|
+
import "./chunk-3JKTVW4R.js";
|
|
99
99
|
import {
|
|
100
100
|
getVercelConversationWorkQueue,
|
|
101
101
|
resolveConversationWorkQueueTopic,
|
|
102
102
|
verifyConversationQueueMessage
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-IOBSRZK5.js";
|
|
104
104
|
import {
|
|
105
105
|
PLUGIN_TASK_QUEUE_TOPIC,
|
|
106
106
|
createVercelQueueClient,
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
resolveSlackChannelTypeFromMessage,
|
|
114
114
|
resolveSlackConversationContext,
|
|
115
115
|
setConversationTitle
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-LX5GBMEP.js";
|
|
117
117
|
import {
|
|
118
118
|
abandonAgentTurnSessionRecord,
|
|
119
119
|
buildSlackOutputMessage,
|
|
@@ -129,11 +129,11 @@ import {
|
|
|
129
129
|
recordAuthorizationCompleted,
|
|
130
130
|
splitSlackReplyText,
|
|
131
131
|
truncateStatusText
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-YA2JCC7G.js";
|
|
133
133
|
import {
|
|
134
134
|
validatePluginEgressCredentialHooks,
|
|
135
135
|
validatePluginRegistrations
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-FAGWUF44.js";
|
|
137
137
|
import {
|
|
138
138
|
defineJuniorPlugins,
|
|
139
139
|
pluginCatalogConfigFromEnv,
|
|
@@ -149,20 +149,20 @@ import {
|
|
|
149
149
|
setPlugins,
|
|
150
150
|
validatePlugins,
|
|
151
151
|
verifySlackDirectCredentialSubject
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-Y3YUOEAZ.js";
|
|
153
153
|
import {
|
|
154
154
|
createPluginLogger,
|
|
155
155
|
createPluginState
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-GUO4EE7L.js";
|
|
157
157
|
import {
|
|
158
158
|
getConversationStore,
|
|
159
159
|
getDb
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-PQ2U2AO3.js";
|
|
161
161
|
import "./chunk-G3E7SCME.js";
|
|
162
162
|
import {
|
|
163
163
|
acquireActiveLock,
|
|
164
164
|
getStateAdapter
|
|
165
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-X2FL5ZH5.js";
|
|
166
166
|
import {
|
|
167
167
|
createSlackDestination,
|
|
168
168
|
destinationKey,
|
|
@@ -174,7 +174,7 @@ import {
|
|
|
174
174
|
parseDestination,
|
|
175
175
|
requireSlackDestination,
|
|
176
176
|
sameDestination
|
|
177
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-4XHCVBXH.js";
|
|
178
178
|
import {
|
|
179
179
|
FUNCTION_TIMEOUT_BUFFER_SECONDS,
|
|
180
180
|
GEN_AI_PROVIDER_NAME,
|
|
@@ -190,27 +190,25 @@ import {
|
|
|
190
190
|
getSlackSigningSecret,
|
|
191
191
|
isProviderRetryError,
|
|
192
192
|
normalizeSlackEmojiName,
|
|
193
|
-
parseSlackThreadId,
|
|
194
|
-
resolveSlackChannelIdFromMessage,
|
|
195
|
-
resolveSlackChannelIdFromThreadId,
|
|
196
193
|
setSlackReactionConfig,
|
|
197
194
|
stripRuntimeTurnContext,
|
|
198
195
|
trimTrailingAssistantMessages
|
|
199
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-ABRNFE3N.js";
|
|
197
|
+
import {
|
|
198
|
+
parseSlackThreadId,
|
|
199
|
+
resolveSlackChannelIdFromMessage,
|
|
200
|
+
resolveSlackChannelIdFromThreadId
|
|
201
|
+
} from "./chunk-DR75T7J3.js";
|
|
200
202
|
import {
|
|
201
203
|
discoverSkills
|
|
202
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-WCXVEQPI.js";
|
|
203
205
|
import {
|
|
204
206
|
CredentialUnavailableError,
|
|
205
207
|
buildOAuthTokenRequest,
|
|
206
|
-
getPluginCatalogSignature,
|
|
207
|
-
getPluginOAuthConfig,
|
|
208
|
-
getPluginProviders,
|
|
209
208
|
hasRequiredOAuthScope,
|
|
210
|
-
isPluginProvider,
|
|
211
209
|
parseOAuthTokenResponse,
|
|
212
|
-
|
|
213
|
-
} from "./chunk-
|
|
210
|
+
pluginCatalogRuntime
|
|
211
|
+
} from "./chunk-TW23AT22.js";
|
|
214
212
|
import {
|
|
215
213
|
createRequester,
|
|
216
214
|
createSlackRequester,
|
|
@@ -218,10 +216,10 @@ import {
|
|
|
218
216
|
isActorUserId,
|
|
219
217
|
parseActorUserId,
|
|
220
218
|
toStoredSlackRequester
|
|
221
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-ZPCGQRFJ.js";
|
|
222
220
|
import {
|
|
223
221
|
homeDir
|
|
224
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-6APU57E6.js";
|
|
225
223
|
import {
|
|
226
224
|
buildTurnFailureResponse,
|
|
227
225
|
createChatSdkLogger,
|
|
@@ -235,16 +233,16 @@ import {
|
|
|
235
233
|
setSpanAttributes,
|
|
236
234
|
setSpanStatus,
|
|
237
235
|
setTags,
|
|
238
|
-
toOptionalString,
|
|
239
236
|
withContext,
|
|
240
237
|
withSpan
|
|
241
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-KF7522P3.js";
|
|
242
239
|
import {
|
|
243
|
-
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
244
|
-
|
|
240
|
+
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE,
|
|
241
|
+
toOptionalString
|
|
242
|
+
} from "./chunk-FTMXFBDC.js";
|
|
245
243
|
import {
|
|
246
244
|
continueTrace
|
|
247
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-3DA7X2U3.js";
|
|
248
246
|
import "./chunk-MLKGABMK.js";
|
|
249
247
|
|
|
250
248
|
// src/app.ts
|
|
@@ -3806,7 +3804,7 @@ async function buildHomeView(userId, userTokenStore) {
|
|
|
3806
3804
|
const runtimeMetadata = getRuntimeMetadata();
|
|
3807
3805
|
const descriptionText = loadDescriptionText();
|
|
3808
3806
|
const skillsSummaryText = await buildSkillsSummaryText();
|
|
3809
|
-
const providers =
|
|
3807
|
+
const providers = pluginCatalogRuntime.getProviders();
|
|
3810
3808
|
const connectedSections = [];
|
|
3811
3809
|
for (const plugin of providers) {
|
|
3812
3810
|
const tokens = await connectedOAuthTokens(userId, plugin, userTokenStore);
|
|
@@ -4364,7 +4362,7 @@ async function resumePendingOAuthMessage(stored, options) {
|
|
|
4364
4362
|
});
|
|
4365
4363
|
}
|
|
4366
4364
|
async function GET4(request, provider, waitUntil, options = {}) {
|
|
4367
|
-
const providerConfig =
|
|
4365
|
+
const providerConfig = pluginCatalogRuntime.getOAuthConfig(provider);
|
|
4368
4366
|
if (!providerConfig) {
|
|
4369
4367
|
return htmlErrorResponse(
|
|
4370
4368
|
"Unknown provider",
|
|
@@ -4586,7 +4584,7 @@ function defaultGrantForProvider(input) {
|
|
|
4586
4584
|
};
|
|
4587
4585
|
}
|
|
4588
4586
|
function oauthAuthorizationForProvider(provider) {
|
|
4589
|
-
const oauth =
|
|
4587
|
+
const oauth = pluginCatalogRuntime.getOAuthConfig(provider);
|
|
4590
4588
|
return oauth ? {
|
|
4591
4589
|
type: "oauth",
|
|
4592
4590
|
provider,
|
|
@@ -6190,11 +6188,11 @@ function getCommandName() {
|
|
|
6190
6188
|
return getChatConfig().slack.slashCommand;
|
|
6191
6189
|
}
|
|
6192
6190
|
async function handleLink(event, requesterId, provider) {
|
|
6193
|
-
if (!
|
|
6191
|
+
if (!pluginCatalogRuntime.isProvider(provider)) {
|
|
6194
6192
|
await postEphemeral(event, `Unknown provider: \`${provider}\``);
|
|
6195
6193
|
return;
|
|
6196
6194
|
}
|
|
6197
|
-
if (!
|
|
6195
|
+
if (!pluginCatalogRuntime.getOAuthConfig(provider)) {
|
|
6198
6196
|
await postEphemeral(
|
|
6199
6197
|
event,
|
|
6200
6198
|
`${formatProviderLabel(provider)} doesn't support account linking.`
|
|
@@ -6223,11 +6221,11 @@ async function handleLink(event, requesterId, provider) {
|
|
|
6223
6221
|
}
|
|
6224
6222
|
}
|
|
6225
6223
|
async function handleUnlink(event, requesterId, provider) {
|
|
6226
|
-
if (!
|
|
6224
|
+
if (!pluginCatalogRuntime.isProvider(provider)) {
|
|
6227
6225
|
await postEphemeral(event, `Unknown provider: \`${provider}\``);
|
|
6228
6226
|
return;
|
|
6229
6227
|
}
|
|
6230
|
-
if (!
|
|
6228
|
+
if (!pluginCatalogRuntime.getOAuthConfig(provider)) {
|
|
6231
6229
|
await postEphemeral(
|
|
6232
6230
|
event,
|
|
6233
6231
|
`${formatProviderLabel(provider)} doesn't support account unlinking.`
|
|
@@ -11475,7 +11473,7 @@ async function createApp(options) {
|
|
|
11475
11473
|
validatePlugins(plugins);
|
|
11476
11474
|
getDb();
|
|
11477
11475
|
const shouldValidatePluginCatalog = hasConfiguredPluginCatalog(pluginConfig) || Boolean(configuredPlugins?.registrations.length) || Boolean(Object.keys(options?.configDefaults ?? {}).length);
|
|
11478
|
-
const previousPluginCatalogConfig =
|
|
11476
|
+
const previousPluginCatalogConfig = pluginCatalogRuntime.setConfig(pluginConfig);
|
|
11479
11477
|
const previousPlugins = setPlugins(plugins);
|
|
11480
11478
|
const previousConfigDefaults = getConfigDefaults();
|
|
11481
11479
|
const previousSlackReactionConfig = getSlackReactionConfig();
|
|
@@ -11492,7 +11490,7 @@ async function createApp(options) {
|
|
|
11492
11490
|
setSlackReactionConfig(options.slack);
|
|
11493
11491
|
}
|
|
11494
11492
|
if (shouldValidatePluginCatalog) {
|
|
11495
|
-
|
|
11493
|
+
pluginCatalogRuntime.getSignature();
|
|
11496
11494
|
validatePluginRegistrations(configuredPlugins?.registrations ?? []);
|
|
11497
11495
|
validatePluginEgressCredentialHooks(
|
|
11498
11496
|
configuredPlugins?.registrations ?? []
|
|
@@ -11504,7 +11502,7 @@ async function createApp(options) {
|
|
|
11504
11502
|
pluginDashboardRoutes = getPluginDashboardRoutes();
|
|
11505
11503
|
}
|
|
11506
11504
|
} catch (error) {
|
|
11507
|
-
|
|
11505
|
+
pluginCatalogRuntime.setConfig(previousPluginCatalogConfig);
|
|
11508
11506
|
setPlugins(previousPlugins);
|
|
11509
11507
|
setConfigDefaults(previousConfigDefaults);
|
|
11510
11508
|
setSlackReactionConfig(previousSlackReactionConfig);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pluginCatalogRuntime
|
|
3
|
+
} from "./chunk-TW23AT22.js";
|
|
4
|
+
import "./chunk-ZPCGQRFJ.js";
|
|
5
|
+
import "./chunk-6APU57E6.js";
|
|
6
|
+
import "./chunk-KF7522P3.js";
|
|
7
|
+
import "./chunk-FTMXFBDC.js";
|
|
8
|
+
import "./chunk-3DA7X2U3.js";
|
|
9
|
+
import "./chunk-MLKGABMK.js";
|
|
10
|
+
export {
|
|
11
|
+
pluginCatalogRuntime
|
|
12
|
+
};
|
|
@@ -10,6 +10,10 @@ export declare function canExposeConversationPayload(input: {
|
|
|
10
10
|
channelId?: string;
|
|
11
11
|
conversationId?: string;
|
|
12
12
|
}): boolean;
|
|
13
|
+
/** Return the privacy mode bound to the current agent turn. */
|
|
14
|
+
export declare function getCurrentConversationPrivacy(): ConversationPrivacy | undefined;
|
|
15
|
+
/** Bind one conversation privacy mode to all async work in a turn. */
|
|
16
|
+
export declare function runWithConversationPrivacy<T>(privacy: ConversationPrivacy, callback: () => T): T;
|
|
13
17
|
/** Convert a GenAI message into safe metadata for private trace contexts. */
|
|
14
18
|
export declare function toGenAiMessageMetadata(message: unknown): Record<string, unknown>;
|
|
15
19
|
/** Convert raw text into size-only metadata for private trace contexts. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pluginCatalogRuntime: import("@/chat/plugins/registry").PluginCatalogRuntime;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import type { CapabilityProviderDefinition } from "@/chat/capabilities/catalog";
|
|
2
2
|
import type { CredentialBroker } from "@/chat/credentials/broker";
|
|
3
3
|
import { type InstalledPluginPackageContent } from "./package-discovery";
|
|
4
|
-
import type { PluginBrokerDeps, PluginCatalogConfig, PluginDefinition, OAuthProviderConfig, PluginRuntimeDependency, PluginRuntimePostinstallCommand } from "./types";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
4
|
+
import type { InlinePluginManifestDefinition, PluginBrokerDeps, PluginCatalogConfig, PluginDefinition, OAuthProviderConfig, PluginRuntimeDependency, PluginRuntimePostinstallCommand } from "./types";
|
|
5
|
+
export interface PluginCatalogRuntime {
|
|
6
|
+
createBroker(provider: string, deps: PluginBrokerDeps): CredentialBroker;
|
|
7
|
+
getCapabilityProviders(): CapabilityProviderDefinition[];
|
|
8
|
+
getDefinition(provider: string): PluginDefinition | undefined;
|
|
9
|
+
getDisplayName(provider: string): string | undefined;
|
|
10
|
+
getForSkillPath(skillPath: string): PluginDefinition | undefined;
|
|
11
|
+
getMcpProviders(): PluginDefinition[];
|
|
12
|
+
getMigrationRoots(): {
|
|
13
|
+
dir: string;
|
|
14
|
+
pluginName: string;
|
|
15
|
+
}[];
|
|
16
|
+
getOAuthConfig(provider: string): OAuthProviderConfig | undefined;
|
|
17
|
+
getPackageContent(): InstalledPluginPackageContent;
|
|
18
|
+
getProviders(): PluginDefinition[];
|
|
19
|
+
getRuntimeDependencies(): PluginRuntimeDependency[];
|
|
20
|
+
getRuntimePostinstall(): PluginRuntimePostinstallCommand[];
|
|
21
|
+
getSignature(): string;
|
|
22
|
+
getSkillRoots(): string[];
|
|
23
|
+
isCapability(capability: string): boolean;
|
|
24
|
+
isConfigKey(key: string): boolean;
|
|
25
|
+
isProvider(provider: string): boolean;
|
|
26
|
+
parseConfiguredInlineManifest(manifest: InlinePluginManifestDefinition["manifest"], dir: string): PluginDefinition["manifest"];
|
|
27
|
+
setConfig(config: PluginCatalogConfig | undefined): PluginCatalogConfig | undefined;
|
|
28
|
+
}
|
|
29
|
+
/** Create an isolated plugin catalog runtime for explicit app wiring. */
|
|
30
|
+
export declare function createPluginCatalogRuntime(): PluginCatalogRuntime;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type * as Sentry from "@/chat/sentry";
|
|
2
|
+
type SentryErrorEvent = Parameters<NonNullable<Sentry.NodeOptions["beforeSend"]>>[0];
|
|
3
|
+
type SentryTransactionEvent = Parameters<NonNullable<Sentry.NodeOptions["beforeSendTransaction"]>>[0];
|
|
4
|
+
type SentrySpan = Parameters<Parameters<typeof Sentry.withStreamedSpan>[0]>[0];
|
|
5
|
+
type SentryLog = Parameters<NonNullable<Sentry.NodeOptions["beforeSendLog"]>>[0];
|
|
6
|
+
/** Remove raw private conversation payloads from Sentry error events. */
|
|
7
|
+
export declare function scrubPrivateSentryEvent(event: SentryErrorEvent): SentryErrorEvent | null;
|
|
8
|
+
/** Remove raw private conversation payloads from Sentry transaction events. */
|
|
9
|
+
export declare function scrubPrivateSentryTransaction(event: SentryTransactionEvent): SentryTransactionEvent | null;
|
|
10
|
+
/** Remove raw private conversation payloads from streamed Sentry spans. */
|
|
11
|
+
export declare function scrubPrivateSentrySpan(span: SentrySpan): SentrySpan;
|
|
12
|
+
/** Remove raw private conversation payloads from Sentry structured logs. */
|
|
13
|
+
export declare function scrubPrivateSentryLog(log: SentryLog): SentryLog | null;
|
|
14
|
+
export {};
|
package/dist/chat/sentry.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Sentry SDK re-export. Isolates the concrete package to a single file. */
|
|
2
|
-
export { captureException, continueTrace, flush, getClient, getGlobalScope, init, setTag, setUser, startInactiveSpan, startSpan, vercelAIIntegration, withActiveSpan, withScope, } from "@sentry/node";
|
|
2
|
+
export { captureException, continueTrace, flush, getClient, getGlobalScope, init, setTag, setUser, startInactiveSpan, startSpan, vercelAIIntegration, withActiveSpan, withScope, withStreamedSpan, } from "@sentry/node";
|
|
3
3
|
export * from "@sentry/node";
|
|
@@ -3,6 +3,12 @@ import type { Static, TSchema } from "@sinclair/typebox";
|
|
|
3
3
|
import type { ToolExecutionMode } from "@earendil-works/pi-agent-core";
|
|
4
4
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
5
5
|
export interface ToolDefinition<TInputSchema extends TSchema = TSchema> {
|
|
6
|
+
/** Stable internal owner-qualified identity for plugin-contributed tools. */
|
|
7
|
+
identity?: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
plugin: string;
|
|
11
|
+
};
|
|
6
12
|
description: string;
|
|
7
13
|
inputSchema: TInputSchema;
|
|
8
14
|
annotations?: ToolAnnotations;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-66NX7MNW.js";
|
|
4
4
|
import {
|
|
5
5
|
getDefaultRedisStateAdapterFor,
|
|
6
6
|
getStateAdapter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X2FL5ZH5.js";
|
|
8
8
|
import {
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4XHCVBXH.js";
|
|
12
12
|
import {
|
|
13
13
|
getChatConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ABRNFE3N.js";
|
|
15
15
|
import {
|
|
16
16
|
parseStoredSlackRequester
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZPCGQRFJ.js";
|
|
18
18
|
import {
|
|
19
19
|
isRecord,
|
|
20
20
|
toOptionalNumber,
|
|
21
21
|
toOptionalString
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FTMXFBDC.js";
|
|
23
23
|
|
|
24
24
|
// src/chat/task-execution/state.ts
|
|
25
25
|
import { randomUUID } from "crypto";
|
|
@@ -17,7 +17,8 @@ __export(sentry_exports, {
|
|
|
17
17
|
startSpan: () => startSpan,
|
|
18
18
|
vercelAIIntegration: () => vercelAIIntegration,
|
|
19
19
|
withActiveSpan: () => withActiveSpan,
|
|
20
|
-
withScope: () => withScope
|
|
20
|
+
withScope: () => withScope,
|
|
21
|
+
withStreamedSpan: () => withStreamedSpan
|
|
21
22
|
});
|
|
22
23
|
import {
|
|
23
24
|
captureException,
|
|
@@ -32,7 +33,8 @@ import {
|
|
|
32
33
|
startSpan,
|
|
33
34
|
vercelAIIntegration,
|
|
34
35
|
withActiveSpan,
|
|
35
|
-
withScope
|
|
36
|
+
withScope,
|
|
37
|
+
withStreamedSpan
|
|
36
38
|
} from "@sentry/node";
|
|
37
39
|
export * from "@sentry/node";
|
|
38
40
|
|
|
@@ -50,5 +52,6 @@ export {
|
|
|
50
52
|
startSpan,
|
|
51
53
|
vercelAIIntegration,
|
|
52
54
|
withActiveSpan,
|
|
53
|
-
withScope
|
|
55
|
+
withScope,
|
|
56
|
+
withStreamedSpan
|
|
54
57
|
};
|
|
@@ -3,17 +3,16 @@ import {
|
|
|
3
3
|
} from "./chunk-G3E7SCME.js";
|
|
4
4
|
import {
|
|
5
5
|
getStateAdapter
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X2FL5ZH5.js";
|
|
7
7
|
import {
|
|
8
8
|
toOptionalTrimmed
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ABRNFE3N.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "./chunk-YLVJRYTD.js";
|
|
11
|
+
pluginCatalogRuntime
|
|
12
|
+
} from "./chunk-TW23AT22.js";
|
|
14
13
|
import {
|
|
15
14
|
withSpan
|
|
16
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KF7522P3.js";
|
|
17
16
|
|
|
18
17
|
// src/chat/sandbox/runtime-dependency-snapshots.ts
|
|
19
18
|
import { createHash } from "crypto";
|
|
@@ -172,8 +171,8 @@ function parseFloatingDepMaxAgeMs() {
|
|
|
172
171
|
return parsed;
|
|
173
172
|
}
|
|
174
173
|
function buildDependencyProfile(runtime) {
|
|
175
|
-
const dependencies =
|
|
176
|
-
const postinstall =
|
|
174
|
+
const dependencies = pluginCatalogRuntime.getRuntimeDependencies();
|
|
175
|
+
const postinstall = pluginCatalogRuntime.getRuntimePostinstall();
|
|
177
176
|
if (dependencies.length === 0 && postinstall.length === 0) {
|
|
178
177
|
return null;
|
|
179
178
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSlackBotToken
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ABRNFE3N.js";
|
|
4
4
|
import {
|
|
5
5
|
isSlackConversationId,
|
|
6
6
|
isSlackTeamId,
|
|
7
7
|
logWarn
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KF7522P3.js";
|
|
9
9
|
|
|
10
10
|
// src/chat/slack/client.ts
|
|
11
11
|
import { WebClient } from "@slack/web-api";
|
|
@@ -217,9 +217,6 @@ function listReferenceFiles() {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
// src/chat/plugins/package-discovery.ts
|
|
221
|
-
import path3 from "path";
|
|
222
|
-
|
|
223
220
|
// src/package-resolution.ts
|
|
224
221
|
import { statSync as statSync2 } from "fs";
|
|
225
222
|
import { createRequire } from "module";
|
|
@@ -357,6 +354,7 @@ function resolvePackageDir(cwd, packageName) {
|
|
|
357
354
|
}
|
|
358
355
|
|
|
359
356
|
// src/chat/plugins/package-discovery.ts
|
|
357
|
+
import path3 from "path";
|
|
360
358
|
function normalizeForGlob(targetPath) {
|
|
361
359
|
return targetPath.split(path3.sep).join("/");
|
|
362
360
|
}
|