@sentry/junior 0.71.3 → 0.73.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/bin/junior.mjs +22 -10
- package/dist/api-reference.d.ts +2 -0
- package/dist/app.d.ts +12 -3
- package/dist/app.js +2522 -15560
- package/dist/chat/agent-dispatch/heartbeat.d.ts +0 -6
- package/dist/chat/agent-dispatch/runner.d.ts +2 -0
- package/dist/chat/agent-dispatch/store.d.ts +2 -2
- package/dist/chat/agent-dispatch/types.d.ts +6 -3
- package/dist/chat/agent-dispatch/validation.d.ts +2 -3
- package/dist/chat/app/production.d.ts +8 -1
- package/dist/chat/app/services.d.ts +7 -0
- package/dist/chat/destination.d.ts +3 -1
- package/dist/chat/logging.d.ts +3 -0
- package/dist/chat/mcp/errors.d.ts +3 -0
- package/dist/chat/mcp/tool-manager.d.ts +5 -1
- package/dist/chat/oauth-flow.d.ts +1 -1
- package/dist/chat/plugins/agent-hooks.d.ts +3 -2
- package/dist/chat/plugins/registry.d.ts +2 -0
- package/dist/chat/plugins/types.d.ts +2 -0
- package/dist/chat/prompt.d.ts +4 -1
- package/dist/chat/requester.d.ts +67 -0
- package/dist/chat/respond.d.ts +8 -8
- package/dist/chat/runtime/agent-continue-runner.d.ts +25 -0
- package/dist/chat/runtime/reply-executor.d.ts +7 -5
- package/dist/chat/runtime/slack-resume.d.ts +3 -3
- package/dist/chat/runtime/slack-runtime.d.ts +13 -3
- package/dist/chat/runtime/turn.d.ts +17 -3
- package/dist/chat/sandbox/egress-credentials.d.ts +5 -2
- package/dist/chat/sandbox/egress-policy.d.ts +5 -1
- package/dist/chat/sandbox/egress-proxy.d.ts +2 -0
- package/dist/chat/sandbox/egress-schemas.d.ts +4 -0
- package/dist/chat/sandbox/egress-session.d.ts +3 -1
- package/dist/chat/sandbox/egress-tracing.d.ts +7 -0
- package/dist/chat/sandbox/sandbox.d.ts +2 -0
- package/dist/chat/sandbox/session.d.ts +3 -2
- package/dist/chat/services/agent-continue.d.ts +27 -0
- package/dist/chat/services/auth-pause-response.d.ts +1 -1
- package/dist/chat/services/auth-pause.d.ts +2 -1
- package/dist/chat/services/mcp-auth-orchestration.d.ts +1 -1
- package/dist/chat/services/message-actor-identity.d.ts +12 -4
- package/dist/chat/services/plugin-auth-orchestration.d.ts +9 -8
- package/dist/chat/services/turn-result.d.ts +3 -0
- package/dist/chat/services/turn-session-record.d.ts +10 -7
- package/dist/chat/slack/user.d.ts +4 -4
- package/dist/chat/state/adapter.d.ts +2 -0
- package/dist/chat/state/conversation-details.d.ts +4 -3
- package/dist/chat/state/session-log.d.ts +43 -0
- package/dist/chat/state/turn-session.d.ts +7 -10
- package/dist/chat/task-execution/slack-work.d.ts +5 -5
- package/dist/chat/task-execution/store.d.ts +83 -48
- package/dist/chat/task-execution/worker.d.ts +3 -3
- package/dist/chat/tools/definition.d.ts +3 -0
- package/dist/chat/tools/execution/tool-error-handler.d.ts +2 -1
- package/dist/chat/tools/slack/canvas-tools.d.ts +3 -2
- package/dist/chat/tools/slack/channel-list-messages.d.ts +2 -2
- package/dist/chat/tools/slack/channel-post-message.d.ts +3 -2
- package/dist/chat/tools/slack/context.d.ts +15 -2
- package/dist/chat/tools/slack/message-add-reaction.d.ts +3 -2
- package/dist/chat/tools/slack/thread-read.d.ts +2 -2
- package/dist/chat/tools/types.d.ts +20 -23
- package/dist/{chunk-BBXYXOJW.js → chunk-3BYAPS6B.js} +48 -529
- package/dist/{chunk-UXG6TU2U.js → chunk-7Q5YOUUT.js} +16 -93
- package/dist/chunk-AL5T52ZD.js +1119 -0
- package/dist/chunk-CYUI7JU5.js +195 -0
- package/dist/{chunk-R62YWUNO.js → chunk-DIMX5F3T.js} +10 -28
- package/dist/chunk-G3E7SCME.js +28 -0
- package/dist/chunk-KVZL5NZS.js +519 -0
- package/dist/chunk-M4FLLXXD.js +212 -0
- package/dist/chunk-OQSYYOLM.js +12787 -0
- package/dist/{chunk-GT67ZWZQ.js → chunk-OR6NQJ5E.js} +5 -3
- package/dist/{chunk-B5HKWWQB.js → chunk-RY6AL5C7.js} +8 -6
- package/dist/chunk-SJHUF3DP.js +43 -0
- package/dist/{chunk-XE2VFQQN.js → chunk-UOTZ3EEQ.js} +1 -1
- package/dist/{chunk-HOGQL2H6.js → chunk-UZVHXZ7V.js} +1357 -1486
- package/dist/{chunk-76YMBKW7.js → chunk-V4VYUY4A.js} +27 -14
- package/dist/{chunk-JS4HURDT.js → chunk-WS2EG3GW.js} +224 -224
- package/dist/chunk-ZDA2HYX5.js +275 -0
- package/dist/cli/chat.js +205 -0
- package/dist/cli/check.js +6 -5
- package/dist/cli/run.js +18 -2
- package/dist/cli/snapshot-warmup.js +11 -8
- package/dist/cli/upgrade.js +599 -0
- package/dist/deployment.d.ts +4 -0
- package/dist/handlers/agent-dispatch.d.ts +6 -1
- package/dist/handlers/mcp-oauth-callback.d.ts +6 -1
- package/dist/handlers/oauth-callback.d.ts +6 -1
- package/dist/handlers/sandbox-egress-proxy.d.ts +2 -0
- package/dist/handlers/webhooks.d.ts +4 -2
- package/dist/instrumentation.js +17 -2
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +10 -10
- package/dist/plugins.d.ts +1 -1
- package/dist/reporting/conversations.d.ts +116 -0
- package/dist/reporting.d.ts +24 -129
- package/dist/reporting.js +320 -166
- package/dist/runner-LMAM4OGD.js +259 -0
- package/package.json +3 -3
- package/dist/chat/runtime/timeout-resume-runner.d.ts +0 -19
- package/dist/chat/services/requester-identity.d.ts +0 -19
- package/dist/chat/services/timeout-resume.d.ts +0 -23
- package/dist/chunk-6YY4Q3D4.js +0 -12
- package/dist/chunk-Z3YD6NHK.js +0 -12
- package/dist/handlers/turn-resume.d.ts +0 -4
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
discoverInstalledPluginPackageContent,
|
|
3
|
+
normalizePluginPackageNames,
|
|
4
|
+
pluginRoots
|
|
5
|
+
} from "./chunk-KVZL5NZS.js";
|
|
6
|
+
import {
|
|
7
|
+
parseActorUserId
|
|
8
|
+
} from "./chunk-CYUI7JU5.js";
|
|
9
|
+
import {
|
|
3
10
|
logInfo,
|
|
4
11
|
logWarn,
|
|
5
|
-
normalizePluginPackageNames,
|
|
6
|
-
pluginRoots,
|
|
7
12
|
setSpanAttributes
|
|
8
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3BYAPS6B.js";
|
|
9
14
|
|
|
10
15
|
// src/chat/plugins/manifest.ts
|
|
11
16
|
import { z } from "zod";
|
|
@@ -96,6 +101,7 @@ function inlineTargetSource(name, target) {
|
|
|
96
101
|
function inlineManifestSource(manifest) {
|
|
97
102
|
const result = {};
|
|
98
103
|
setDefined(result, "name", manifest.name);
|
|
104
|
+
setDefined(result, "display-name", manifest.displayName);
|
|
99
105
|
setDefined(result, "description", manifest.description);
|
|
100
106
|
setDefined(
|
|
101
107
|
result,
|
|
@@ -311,6 +317,7 @@ var manifestSourceSchema = z.object({
|
|
|
311
317
|
name: z.string().refine((value) => PLUGIN_NAME_RE.test(value), {
|
|
312
318
|
error: "invalid"
|
|
313
319
|
}),
|
|
320
|
+
"display-name": nonEmptyTrimmedString,
|
|
314
321
|
description: nonEmptyTrimmedString,
|
|
315
322
|
capabilities: z.array(z.string(), {
|
|
316
323
|
error: "must be an array when provided"
|
|
@@ -350,6 +357,7 @@ function setDefined2(target, key, value) {
|
|
|
350
357
|
}
|
|
351
358
|
function manifestConfigPatch(config) {
|
|
352
359
|
const result = {};
|
|
360
|
+
setDefined2(result, "display-name", config.displayName);
|
|
353
361
|
setDefined2(result, "description", config.description);
|
|
354
362
|
setDefined2(result, "capabilities", config.capabilities);
|
|
355
363
|
setDefined2(result, "config-keys", config.configKeys);
|
|
@@ -947,6 +955,7 @@ function parseManifestSource(parsedSource, dir, config, options) {
|
|
|
947
955
|
const mcp = data.mcp ? normalizeMcp(data.mcp, envVars, data.name) : void 0;
|
|
948
956
|
const manifest = {
|
|
949
957
|
name: data.name,
|
|
958
|
+
displayName: data["display-name"],
|
|
950
959
|
description: data.description,
|
|
951
960
|
capabilities,
|
|
952
961
|
configKeys,
|
|
@@ -1074,92 +1083,6 @@ var CredentialUnavailableError = class extends Error {
|
|
|
1074
1083
|
|
|
1075
1084
|
// src/chat/credentials/context.ts
|
|
1076
1085
|
import { z as z2 } from "zod";
|
|
1077
|
-
|
|
1078
|
-
// src/chat/services/requester-identity.ts
|
|
1079
|
-
var SLACK_USER_ID_PATTERN = /^[UW][A-Z0-9]{5,}$/;
|
|
1080
|
-
var EMAIL_PATTERN = /^[^\s@<>]+@[^\s@<>]+\.[^\s@<>]+$/;
|
|
1081
|
-
function clean(value) {
|
|
1082
|
-
const trimmed = value?.trim();
|
|
1083
|
-
return trimmed ? trimmed : void 0;
|
|
1084
|
-
}
|
|
1085
|
-
function isSyntheticActorUserId(value) {
|
|
1086
|
-
return value.toLowerCase() === "unknown";
|
|
1087
|
-
}
|
|
1088
|
-
function parseActorUserId(value) {
|
|
1089
|
-
if (typeof value !== "string" || value.length === 0) {
|
|
1090
|
-
return void 0;
|
|
1091
|
-
}
|
|
1092
|
-
if (value !== value.trim() || isSyntheticActorUserId(value)) {
|
|
1093
|
-
return void 0;
|
|
1094
|
-
}
|
|
1095
|
-
return value;
|
|
1096
|
-
}
|
|
1097
|
-
function isActorUserId(value) {
|
|
1098
|
-
return parseActorUserId(value) === value;
|
|
1099
|
-
}
|
|
1100
|
-
function isSlackUserId(value) {
|
|
1101
|
-
return SLACK_USER_ID_PATTERN.test(value);
|
|
1102
|
-
}
|
|
1103
|
-
function cleanActorDisplayName(value, userId) {
|
|
1104
|
-
const displayName = clean(value);
|
|
1105
|
-
if (!displayName) {
|
|
1106
|
-
return void 0;
|
|
1107
|
-
}
|
|
1108
|
-
if (displayName.toLowerCase() === "unknown") {
|
|
1109
|
-
return void 0;
|
|
1110
|
-
}
|
|
1111
|
-
if (userId && displayName === userId) {
|
|
1112
|
-
return void 0;
|
|
1113
|
-
}
|
|
1114
|
-
return isSlackUserId(displayName) ? void 0 : displayName;
|
|
1115
|
-
}
|
|
1116
|
-
function cleanActorEmail(value) {
|
|
1117
|
-
const email = clean(value);
|
|
1118
|
-
return email && EMAIL_PATTERN.test(email) ? email : void 0;
|
|
1119
|
-
}
|
|
1120
|
-
function buildActorIdentity(requester, requesterId) {
|
|
1121
|
-
const contextUserId = parseActorUserId(requesterId);
|
|
1122
|
-
if (requesterId !== void 0 && !contextUserId) {
|
|
1123
|
-
return void 0;
|
|
1124
|
-
}
|
|
1125
|
-
const requesterUserId = parseActorUserId(requester?.userId);
|
|
1126
|
-
if (requester?.userId !== void 0 && !requesterUserId) {
|
|
1127
|
-
return void 0;
|
|
1128
|
-
}
|
|
1129
|
-
const userId = contextUserId ?? requesterUserId;
|
|
1130
|
-
const canUseRequesterIdentity = !contextUserId || !requesterUserId || contextUserId === requesterUserId;
|
|
1131
|
-
const email = canUseRequesterIdentity ? cleanActorEmail(requester?.email) : void 0;
|
|
1132
|
-
const fullName = canUseRequesterIdentity ? cleanActorDisplayName(requester?.fullName, userId) : void 0;
|
|
1133
|
-
const userName = canUseRequesterIdentity ? cleanActorDisplayName(requester?.userName, userId) : void 0;
|
|
1134
|
-
const identity = {
|
|
1135
|
-
...email ? { email } : {},
|
|
1136
|
-
...fullName ? { fullName } : {},
|
|
1137
|
-
...userId ? { userId } : {},
|
|
1138
|
-
...userName ? { userName } : {}
|
|
1139
|
-
};
|
|
1140
|
-
return Object.keys(identity).length > 0 ? identity : void 0;
|
|
1141
|
-
}
|
|
1142
|
-
function slackActorIdentity(userId, profile) {
|
|
1143
|
-
const actorUserId = parseActorUserId(userId);
|
|
1144
|
-
if (!actorUserId) {
|
|
1145
|
-
throw new Error("Slack actor identity requires a user id");
|
|
1146
|
-
}
|
|
1147
|
-
const identity = buildActorIdentity(
|
|
1148
|
-
{
|
|
1149
|
-
email: profile?.email,
|
|
1150
|
-
fullName: profile?.fullName,
|
|
1151
|
-
userId: actorUserId,
|
|
1152
|
-
userName: profile?.userName
|
|
1153
|
-
},
|
|
1154
|
-
actorUserId
|
|
1155
|
-
);
|
|
1156
|
-
if (!identity?.userId) {
|
|
1157
|
-
throw new Error("Slack actor identity requires a user id");
|
|
1158
|
-
}
|
|
1159
|
-
return identity;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
// src/chat/credentials/context.ts
|
|
1163
1086
|
var exactActorIdSchema = z2.string().refine((value) => parseActorUserId(value) === value);
|
|
1164
1087
|
var credentialSubjectBindingSchema = z2.object({
|
|
1165
1088
|
type: z2.literal("slack-direct-conversation"),
|
|
@@ -1968,6 +1891,9 @@ function getPluginForSkillPath(skillPath) {
|
|
|
1968
1891
|
function getPluginDefinition(provider) {
|
|
1969
1892
|
return ensurePluginsLoaded().pluginsByName.get(provider);
|
|
1970
1893
|
}
|
|
1894
|
+
function getPluginDisplayName(provider) {
|
|
1895
|
+
return ensurePluginsLoaded().pluginsByName.get(provider)?.manifest.displayName;
|
|
1896
|
+
}
|
|
1971
1897
|
function isPluginProvider(provider) {
|
|
1972
1898
|
return ensurePluginsLoaded().pluginsByName.has(provider);
|
|
1973
1899
|
}
|
|
@@ -2003,10 +1929,6 @@ export {
|
|
|
2003
1929
|
parsePluginManifest,
|
|
2004
1930
|
parseInlinePluginManifest,
|
|
2005
1931
|
CredentialUnavailableError,
|
|
2006
|
-
parseActorUserId,
|
|
2007
|
-
isActorUserId,
|
|
2008
|
-
buildActorIdentity,
|
|
2009
|
-
slackActorIdentity,
|
|
2010
1932
|
credentialContextSchema,
|
|
2011
1933
|
hasRequiredOAuthScope,
|
|
2012
1934
|
resolvePluginCommandEnv,
|
|
@@ -2025,6 +1947,7 @@ export {
|
|
|
2025
1947
|
getPluginSkillRoots,
|
|
2026
1948
|
getPluginForSkillPath,
|
|
2027
1949
|
getPluginDefinition,
|
|
1950
|
+
getPluginDisplayName,
|
|
2028
1951
|
isPluginProvider,
|
|
2029
1952
|
isPluginConfigKey,
|
|
2030
1953
|
createPluginBroker
|