@sentry/junior 0.64.0 → 0.65.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/app.js +5 -5
- package/dist/chat/plugins/command-env.d.ts +1 -1
- package/dist/chat/plugins/types.d.ts +1 -0
- package/dist/{chunk-4CRYMG7M.js → chunk-7KZXQNA6.js} +2 -2
- package/dist/{chunk-WDPWFMCE.js → chunk-EDHJIYHS.js} +26 -6
- package/dist/{chunk-WZFQQ6SP.js → chunk-K3JNVV4Q.js} +2 -2
- package/dist/{chunk-IGVHCX2U.js → chunk-OMQ5X5QH.js} +1 -1
- package/dist/{chunk-D23WCM66.js → chunk-PYU2YB35.js} +1 -1
- package/dist/cli/check.js +2 -2
- package/dist/cli/snapshot-warmup.js +3 -3
- package/dist/reporting.js +4 -4
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
splitSlackReplyText,
|
|
23
23
|
truncateStatusText,
|
|
24
24
|
upsertAgentTurnSessionRecord
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-7KZXQNA6.js";
|
|
26
26
|
import {
|
|
27
27
|
discoverSkills,
|
|
28
28
|
findSkillByName,
|
|
29
29
|
loadSkillsByName,
|
|
30
30
|
parseSkillInvocation
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-PYU2YB35.js";
|
|
32
32
|
import {
|
|
33
33
|
buildNonInteractiveShellScript,
|
|
34
34
|
createSandboxInstance,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
isSnapshotMissingError,
|
|
38
38
|
resolveRuntimeDependencySnapshot,
|
|
39
39
|
runNonInteractiveCommand
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-K3JNVV4Q.js";
|
|
41
41
|
import {
|
|
42
42
|
ACTIVE_LOCK_TTL_MS,
|
|
43
43
|
GEN_AI_PROVIDER_NAME,
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
toGenAiPayloadMetadata,
|
|
71
71
|
toGenAiPayloadTraceAttributes,
|
|
72
72
|
toGenAiTextMetadata
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-OMQ5X5QH.js";
|
|
74
74
|
import {
|
|
75
75
|
CredentialUnavailableError,
|
|
76
76
|
buildOAuthTokenRequest,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
toOptionalString,
|
|
111
111
|
withContext,
|
|
112
112
|
withSpan
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-EDHJIYHS.js";
|
|
114
114
|
import {
|
|
115
115
|
sentry_exports
|
|
116
116
|
} from "./chunk-Z3YD6NHK.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PluginManifest } from "@/chat/plugins/types";
|
|
2
|
-
/** Resolve
|
|
2
|
+
/** Resolve sandbox command env declared by a plugin manifest. */
|
|
3
3
|
export declare function resolvePluginCommandEnv(manifest: PluginManifest): Record<string, string>;
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
getConnectedStateContext,
|
|
7
7
|
getStateAdapter,
|
|
8
8
|
sandboxSkillDir
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OMQ5X5QH.js";
|
|
10
10
|
import {
|
|
11
11
|
isRecord,
|
|
12
12
|
logInfo,
|
|
13
13
|
logWarn
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EDHJIYHS.js";
|
|
15
15
|
import {
|
|
16
16
|
sentry_exports
|
|
17
17
|
} from "./chunk-Z3YD6NHK.js";
|
|
@@ -1913,6 +1913,21 @@ function assertCommandEnvDoesNotExposeHostSecretRefs(commandEnv, apiHeaders, cre
|
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
1915
|
}
|
|
1916
|
+
function assertCommandEnvHostRefsAreExplicitlyExposed(commandEnv, envVars, pluginName) {
|
|
1917
|
+
if (!commandEnv) {
|
|
1918
|
+
return;
|
|
1919
|
+
}
|
|
1920
|
+
for (const [key, value] of Object.entries(commandEnv)) {
|
|
1921
|
+
for (const name of envReferences(value)) {
|
|
1922
|
+
const declaration = envVars[name];
|
|
1923
|
+
if (declaration && declaration.default === void 0 && declaration.exposeToCommandEnv !== true) {
|
|
1924
|
+
throw new Error(
|
|
1925
|
+
`Plugin ${pluginName} command-env.${key} references env var ${name}, but env-vars.${name} must set expose-to-command-env: true before host env can be exposed to sandbox`
|
|
1926
|
+
);
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1916
1931
|
function normalizeCredentials(data, name) {
|
|
1917
1932
|
const schema = data.type === "oauth-bearer" ? oauthBearerCredentialsSchema : data.type === "github-app" ? githubAppCredentialsSchema : void 0;
|
|
1918
1933
|
if (!schema) {
|
|
@@ -2087,7 +2102,9 @@ function normalizeRuntimePostinstall(commands, name) {
|
|
|
2087
2102
|
var envVarDeclarationSchema = z.preprocess(
|
|
2088
2103
|
(value) => value === null || value === void 0 ? {} : value,
|
|
2089
2104
|
z.object({
|
|
2090
|
-
default: z.string().optional()
|
|
2105
|
+
default: z.string().optional(),
|
|
2106
|
+
"expose-to-command-env": z.boolean().optional(),
|
|
2107
|
+
exposeToCommandEnv: z.boolean().optional()
|
|
2091
2108
|
}).strict()
|
|
2092
2109
|
);
|
|
2093
2110
|
function normalizeEnvVars(data, pluginName) {
|
|
@@ -2109,6 +2126,9 @@ function normalizeEnvVars(data, pluginName) {
|
|
|
2109
2126
|
if (parsed.data.default !== void 0) {
|
|
2110
2127
|
decl.default = parsed.data.default;
|
|
2111
2128
|
}
|
|
2129
|
+
if (parsed.data["expose-to-command-env"] === true || parsed.data.exposeToCommandEnv === true) {
|
|
2130
|
+
decl.exposeToCommandEnv = true;
|
|
2131
|
+
}
|
|
2112
2132
|
normalized[name] = decl;
|
|
2113
2133
|
}
|
|
2114
2134
|
return normalized;
|
|
@@ -2267,11 +2287,6 @@ function parseManifestSource(parsedSource, dir, config) {
|
|
|
2267
2287
|
envVars
|
|
2268
2288
|
) : void 0;
|
|
2269
2289
|
const credentials = data.credentials ? normalizeCredentials(data.credentials, data.name) : void 0;
|
|
2270
|
-
if (commandEnv && !credentials && !apiHeaders) {
|
|
2271
|
-
throw new Error(
|
|
2272
|
-
`Plugin ${data.name} command-env requires credentials or api-headers`
|
|
2273
|
-
);
|
|
2274
|
-
}
|
|
2275
2290
|
const runtimeDependencies = data["runtime-dependencies"] ? normalizeRuntimeDependencies(data["runtime-dependencies"], data.name) : void 0;
|
|
2276
2291
|
const runtimePostinstall = data["runtime-postinstall"] ? normalizeRuntimePostinstall(data["runtime-postinstall"], data.name) : void 0;
|
|
2277
2292
|
const mcp = data.mcp ? normalizeMcp(data.mcp, envVars, data.name) : void 0;
|
|
@@ -2334,6 +2349,11 @@ function parseManifestSource(parsedSource, dir, config) {
|
|
|
2334
2349
|
manifest.oauth,
|
|
2335
2350
|
data.name
|
|
2336
2351
|
);
|
|
2352
|
+
assertCommandEnvHostRefsAreExplicitlyExposed(
|
|
2353
|
+
data["command-env"],
|
|
2354
|
+
envVars,
|
|
2355
|
+
data.name
|
|
2356
|
+
);
|
|
2337
2357
|
if (data.target) {
|
|
2338
2358
|
const result = targetSourceSchema.safeParse(data.target);
|
|
2339
2359
|
if (!result.success) {
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
SANDBOX_WORKSPACE_ROOT,
|
|
3
3
|
getStateAdapter,
|
|
4
4
|
toOptionalTrimmed
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OMQ5X5QH.js";
|
|
6
6
|
import {
|
|
7
7
|
getPluginRuntimeDependencies,
|
|
8
8
|
getPluginRuntimePostinstall,
|
|
9
9
|
withSpan
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EDHJIYHS.js";
|
|
11
11
|
|
|
12
12
|
// src/chat/sandbox/runtime-dependency-snapshots.ts
|
|
13
13
|
import { createHash } from "crypto";
|
package/dist/cli/check.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PYU2YB35.js";
|
|
4
4
|
import {
|
|
5
5
|
parsePluginManifest
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-EDHJIYHS.js";
|
|
7
7
|
import "../chunk-Z3YD6NHK.js";
|
|
8
8
|
import "../chunk-KVZL5NZS.js";
|
|
9
9
|
import "../chunk-2KG3PWR4.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveRuntimeDependencySnapshot
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-K3JNVV4Q.js";
|
|
4
4
|
import {
|
|
5
5
|
disconnectStateAdapter
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-OMQ5X5QH.js";
|
|
7
7
|
import {
|
|
8
8
|
getPluginProviders,
|
|
9
9
|
getPluginRuntimeDependencies,
|
|
10
10
|
getPluginRuntimePostinstall
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-EDHJIYHS.js";
|
|
12
12
|
import "../chunk-Z3YD6NHK.js";
|
|
13
13
|
import "../chunk-KVZL5NZS.js";
|
|
14
14
|
import "../chunk-2KG3PWR4.js";
|
package/dist/reporting.js
CHANGED
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
getAgentTurnSessionRecord,
|
|
7
7
|
listAgentTurnSessionSummaries,
|
|
8
8
|
listAgentTurnSessionSummariesForConversation
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7KZXQNA6.js";
|
|
10
10
|
import {
|
|
11
11
|
discoverSkills
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PYU2YB35.js";
|
|
13
13
|
import {
|
|
14
14
|
canExposeConversationPayload,
|
|
15
15
|
parseSlackThreadId,
|
|
16
16
|
resolveConversationPrivacy
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OMQ5X5QH.js";
|
|
18
18
|
import {
|
|
19
19
|
getPluginPackageContent,
|
|
20
20
|
getPluginProviders,
|
|
21
21
|
isRecord
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-EDHJIYHS.js";
|
|
23
23
|
import "./chunk-Z3YD6NHK.js";
|
|
24
24
|
import {
|
|
25
25
|
homeDir
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/junior",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"node-html-markdown": "^2.0.0",
|
|
65
65
|
"yaml": "^2.9.0",
|
|
66
66
|
"zod": "^4.4.3",
|
|
67
|
-
"@sentry/junior-plugin-api": "0.
|
|
67
|
+
"@sentry/junior-plugin-api": "0.65.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/node": "^25.9.1",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"typescript": "^6.0.3",
|
|
77
77
|
"vercel": "^54.4.0",
|
|
78
78
|
"vitest": "^4.1.7",
|
|
79
|
-
"@sentry/junior-scheduler": "0.
|
|
79
|
+
"@sentry/junior-scheduler": "0.65.0"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
|