@sentry/junior 0.119.0 → 0.121.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-NZSV4QQR.js → agent-hooks-CQDGDBCP.js} +7 -7
- package/dist/api.js +58 -79
- package/dist/app.js +21 -21
- package/dist/build/copy-build-content.d.ts +2 -2
- package/dist/{catalog-runtime-TAOYIZIZ.js → catalog-runtime-AD3YNTTM.js} +7 -7
- package/dist/chat/discovery.d.ts +2 -0
- package/dist/chat/mcp/tool-manager.d.ts +14 -1
- package/dist/chat/plugins/types.d.ts +3 -9
- package/dist/chat/plugins/user-pages.d.ts +2 -1
- package/dist/chat/sandbox/noninteractive-command.d.ts +1 -0
- package/dist/chat/sandbox/session.d.ts +2 -2
- package/dist/chat/sandbox/snapshot/install.d.ts +2 -2
- package/dist/chat/sandbox/snapshot/resolve.d.ts +1 -0
- package/dist/chat/sandbox/workspace.d.ts +3 -1
- package/dist/{chunk-D3N4BPSL.js → chunk-254MFDOF.js} +2 -2
- package/dist/{chunk-4UIUDOOV.js → chunk-3DBMANUI.js} +7 -7
- package/dist/{chunk-BLQZACHV.js → chunk-7HYV7KFM.js} +92 -6
- package/dist/{chunk-JLJLZS2N.js → chunk-D2EMOH3N.js} +4 -3
- package/dist/{chunk-R53UT2OI.js → chunk-ET2SDCNV.js} +9 -5
- package/dist/chunk-H4HBKISO.js +417 -0
- package/dist/{chunk-VLTWQQKH.js → chunk-IDXLBKPS.js} +1 -1
- package/dist/{chunk-NUENIPQL.js → chunk-IK4QSS5H.js} +1 -1
- package/dist/{chunk-GKFDU3ZI.js → chunk-ITMEXX5H.js} +44 -23
- package/dist/{chunk-ZFX4M743.js → chunk-JYDIBXFY.js} +6 -6
- package/dist/{chunk-ZJ6IVZVO.js → chunk-JZ47AFSH.js} +1 -1
- package/dist/{chunk-YLYJIQRX.js → chunk-KLUMVJRQ.js} +12 -12
- package/dist/{chunk-TAGV4Z3J.js → chunk-LE77HHF3.js} +1 -1
- package/dist/{chunk-B3IT5END.js → chunk-OOUNJNMR.js} +16 -152
- package/dist/{chunk-QZ7XRJDB.js → chunk-TRECK7RV.js} +3 -3
- package/dist/{chunk-VJTWKJWQ.js → chunk-UURFXX66.js} +1 -1
- package/dist/{chunk-6ZR455DC.js → chunk-UXQ5XSA2.js} +1 -1
- package/dist/{chunk-TGIQN7QW.js → chunk-VWBKDPMQ.js} +242 -69
- package/dist/{chunk-JSTGI7TX.js → chunk-WUP7NWMP.js} +1 -1
- package/dist/{chunk-JXRAOOXQ.js → chunk-XDRGYDED.js} +1 -1
- package/dist/{chunk-BNJEPYTC.js → chunk-Z2XXPUZG.js} +4 -4
- package/dist/cli/chat.js +23 -23
- package/dist/cli/check.js +8 -8
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +10 -10
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-FWGP5CKY.js → db-7HQT2SXQ.js} +5 -5
- package/dist/{discovery-RMHYSRL7.js → discovery-GUFTFBTL.js} +3 -1
- package/dist/instrumentation.js +2 -2
- package/dist/nitro.js +24 -7
- package/dist/{oauth-callback-server-PM3QNXJQ.js → oauth-callback-server-VHTUCNHK.js} +16 -16
- package/dist/{runner-DV55N6ZB.js → runner-3ONPZRED.js} +9 -9
- package/dist/{skills-MANV5ZK6.js → skills-WGAYGGPA.js} +8 -8
- package/dist/{validation-QGB4INTI.js → validation-ZIWNBG4D.js} +8 -8
- package/dist/version.js +1 -1
- package/package.json +8 -7
- package/skills/jr-rpc/SKILL.md +40 -0
- package/dist/chunk-3V7OFJZC.js +0 -264
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
getPlugins,
|
|
12
12
|
setPlugins,
|
|
13
13
|
validatePlugins
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-7HYV7KFM.js";
|
|
15
|
+
import "./chunk-254MFDOF.js";
|
|
16
16
|
import "./chunk-GCGJGSQL.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-UURFXX66.js";
|
|
18
|
+
import "./chunk-IDXLBKPS.js";
|
|
19
19
|
import "./chunk-VFUK3X5B.js";
|
|
20
20
|
import "./chunk-HDFGNU5E.js";
|
|
21
21
|
import "./chunk-HZF5P5UN.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-JZ47AFSH.js";
|
|
23
23
|
import "./chunk-OB42YVAE.js";
|
|
24
24
|
import "./chunk-F3B2YJ76.js";
|
|
25
25
|
import "./chunk-6GWA276C.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-IK4QSS5H.js";
|
|
27
|
+
import "./chunk-D2EMOH3N.js";
|
|
28
28
|
import "./chunk-MLKGABMK.js";
|
|
29
29
|
export {
|
|
30
30
|
PluginHookDeniedError,
|
package/dist/api.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
formatSlackConversationRedactedLabel,
|
|
30
30
|
readHealthReport,
|
|
31
31
|
resolveSlackConversationContextFromThreadId
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UXQ5XSA2.js";
|
|
33
33
|
import {
|
|
34
34
|
buildSentryConversationUrl
|
|
35
35
|
} from "./chunk-4CODA7P5.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
} from "./chunk-PE44LDDQ.js";
|
|
43
43
|
import {
|
|
44
44
|
readStats
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-XDRGYDED.js";
|
|
46
46
|
import {
|
|
47
47
|
agentTurnUsageSchema,
|
|
48
48
|
hasAgentTurnUsage
|
|
@@ -51,13 +51,14 @@ import "./chunk-PDO5BLNM.js";
|
|
|
51
51
|
import {
|
|
52
52
|
createPluginLogger,
|
|
53
53
|
getPlugins,
|
|
54
|
-
listConversationAnnotations
|
|
55
|
-
|
|
54
|
+
listConversationAnnotations,
|
|
55
|
+
readViewerActors
|
|
56
|
+
} from "./chunk-7HYV7KFM.js";
|
|
56
57
|
import {
|
|
57
58
|
decodeStoredConversationEvent,
|
|
58
59
|
getDb,
|
|
59
60
|
getSqlExecutor
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-254MFDOF.js";
|
|
61
62
|
import {
|
|
62
63
|
juniorApiTokens,
|
|
63
64
|
juniorConversationEvents,
|
|
@@ -65,8 +66,8 @@ import {
|
|
|
65
66
|
juniorIdentities,
|
|
66
67
|
juniorUsers
|
|
67
68
|
} from "./chunk-GCGJGSQL.js";
|
|
68
|
-
import "./chunk-
|
|
69
|
-
import "./chunk-
|
|
69
|
+
import "./chunk-UURFXX66.js";
|
|
70
|
+
import "./chunk-IDXLBKPS.js";
|
|
70
71
|
import {
|
|
71
72
|
juniorDestinations
|
|
72
73
|
} from "./chunk-VFUK3X5B.js";
|
|
@@ -75,14 +76,12 @@ import {
|
|
|
75
76
|
parseSlackThreadId
|
|
76
77
|
} from "./chunk-HDFGNU5E.js";
|
|
77
78
|
import "./chunk-HZF5P5UN.js";
|
|
78
|
-
import
|
|
79
|
-
normalizeIdentityEmail
|
|
80
|
-
} from "./chunk-ZJ6IVZVO.js";
|
|
79
|
+
import "./chunk-JZ47AFSH.js";
|
|
81
80
|
import "./chunk-OB42YVAE.js";
|
|
82
81
|
import "./chunk-F3B2YJ76.js";
|
|
83
82
|
import "./chunk-6GWA276C.js";
|
|
84
|
-
import "./chunk-
|
|
85
|
-
import "./chunk-
|
|
83
|
+
import "./chunk-IK4QSS5H.js";
|
|
84
|
+
import "./chunk-D2EMOH3N.js";
|
|
86
85
|
import "./chunk-MLKGABMK.js";
|
|
87
86
|
|
|
88
87
|
// src/api.ts
|
|
@@ -1741,7 +1740,7 @@ function readDescriptionText(home) {
|
|
|
1741
1740
|
}
|
|
1742
1741
|
}
|
|
1743
1742
|
async function readSkillReports() {
|
|
1744
|
-
const { discoverSkills } = await import("./skills-
|
|
1743
|
+
const { discoverSkills } = await import("./skills-WGAYGGPA.js");
|
|
1745
1744
|
const skills = await discoverSkills();
|
|
1746
1745
|
return skillReportsSchema.parse(
|
|
1747
1746
|
skills.map((skill) => ({
|
|
@@ -1751,7 +1750,7 @@ async function readSkillReports() {
|
|
|
1751
1750
|
);
|
|
1752
1751
|
}
|
|
1753
1752
|
async function readPlugins() {
|
|
1754
|
-
const { pluginCatalogRuntime } = await import("./catalog-runtime-
|
|
1753
|
+
const { pluginCatalogRuntime } = await import("./catalog-runtime-AD3YNTTM.js");
|
|
1755
1754
|
return pluginsSchema.parse(
|
|
1756
1755
|
pluginCatalogRuntime.getProviders().map((plugin) => ({
|
|
1757
1756
|
configKeys: plugin.manifest.configKeys ?? [],
|
|
@@ -1763,8 +1762,8 @@ async function readPlugins() {
|
|
|
1763
1762
|
}
|
|
1764
1763
|
async function readRuntimeInfoReport() {
|
|
1765
1764
|
const [{ homeDir }, { pluginCatalogRuntime }, plugins, skills] = await Promise.all([
|
|
1766
|
-
import("./discovery-
|
|
1767
|
-
import("./catalog-runtime-
|
|
1765
|
+
import("./discovery-GUFTFBTL.js"),
|
|
1766
|
+
import("./catalog-runtime-AD3YNTTM.js"),
|
|
1768
1767
|
readPlugins(),
|
|
1769
1768
|
readSkillReports()
|
|
1770
1769
|
]);
|
|
@@ -1780,7 +1779,7 @@ async function readRuntimeInfoReport() {
|
|
|
1780
1779
|
}
|
|
1781
1780
|
async function readPluginOperationalReportFeed() {
|
|
1782
1781
|
const nowMs = Date.now();
|
|
1783
|
-
const { getPluginOperationalReports } = await import("./agent-hooks-
|
|
1782
|
+
const { getPluginOperationalReports } = await import("./agent-hooks-CQDGDBCP.js");
|
|
1784
1783
|
return pluginOperationalReportFeedSchema.parse({
|
|
1785
1784
|
source: "plugins",
|
|
1786
1785
|
generatedAt: new Date(nowMs).toISOString(),
|
|
@@ -2854,6 +2853,7 @@ function createPersonalTokenRoutes() {
|
|
|
2854
2853
|
import { Hono as Hono5 } from "hono";
|
|
2855
2854
|
import {
|
|
2856
2855
|
pluginUserPageContentSchema as pluginUserPageContentSchema2,
|
|
2856
|
+
pluginUserPageInputSchema,
|
|
2857
2857
|
pluginUserPageLinksSchema as pluginUserPageLinksSchema2
|
|
2858
2858
|
} from "@sentry/junior-plugin-api";
|
|
2859
2859
|
|
|
@@ -2862,57 +2862,6 @@ import {
|
|
|
2862
2862
|
pluginUserPageContentSchema,
|
|
2863
2863
|
pluginUserPageLinksSchema
|
|
2864
2864
|
} from "@sentry/junior-plugin-api";
|
|
2865
|
-
|
|
2866
|
-
// src/chat/plugins/viewer-actors.ts
|
|
2867
|
-
import { and as and12, eq as eq13 } from "drizzle-orm";
|
|
2868
|
-
import {
|
|
2869
|
-
actorSchema
|
|
2870
|
-
} from "@sentry/junior-plugin-api";
|
|
2871
|
-
async function readViewerActorsFromSql(db, email) {
|
|
2872
|
-
const normalizedEmail = normalizeIdentityEmail(email);
|
|
2873
|
-
if (!normalizedEmail) return [];
|
|
2874
|
-
const rows = await db.select({
|
|
2875
|
-
displayName: juniorIdentities.displayName,
|
|
2876
|
-
email: juniorUsers.primaryEmail,
|
|
2877
|
-
handle: juniorIdentities.handle,
|
|
2878
|
-
provider: juniorIdentities.provider,
|
|
2879
|
-
providerSubjectId: juniorIdentities.providerSubjectId,
|
|
2880
|
-
providerTenantId: juniorIdentities.providerTenantId
|
|
2881
|
-
}).from(juniorIdentities).innerJoin(juniorUsers, eq13(juniorUsers.id, juniorIdentities.userId)).where(
|
|
2882
|
-
and12(
|
|
2883
|
-
eq13(juniorUsers.primaryEmailNormalized, normalizedEmail),
|
|
2884
|
-
eq13(juniorIdentities.kind, "user")
|
|
2885
|
-
)
|
|
2886
|
-
);
|
|
2887
|
-
const actors = [];
|
|
2888
|
-
for (const row of rows) {
|
|
2889
|
-
const candidate = row.provider === "slack" ? {
|
|
2890
|
-
platform: "slack",
|
|
2891
|
-
teamId: row.providerTenantId,
|
|
2892
|
-
userId: row.providerSubjectId,
|
|
2893
|
-
email: row.email,
|
|
2894
|
-
...row.displayName ? { fullName: row.displayName } : {},
|
|
2895
|
-
...row.handle ? { userName: row.handle } : {}
|
|
2896
|
-
} : row.provider === "local" ? {
|
|
2897
|
-
platform: "local",
|
|
2898
|
-
userId: row.providerSubjectId,
|
|
2899
|
-
email: row.email,
|
|
2900
|
-
...row.displayName ? { fullName: row.displayName } : {},
|
|
2901
|
-
...row.handle ? { userName: row.handle } : {}
|
|
2902
|
-
} : void 0;
|
|
2903
|
-
if (!candidate) continue;
|
|
2904
|
-
const parsed = actorSchema.safeParse(candidate);
|
|
2905
|
-
if (parsed.success && parsed.data.platform !== "system") {
|
|
2906
|
-
actors.push(parsed.data);
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
return actors;
|
|
2910
|
-
}
|
|
2911
|
-
async function readViewerActors(email) {
|
|
2912
|
-
return await readViewerActorsFromSql(getDb(), email);
|
|
2913
|
-
}
|
|
2914
|
-
|
|
2915
|
-
// src/chat/plugins/user-pages.ts
|
|
2916
2865
|
function readPluginUserPageLinks() {
|
|
2917
2866
|
return pluginUserPageLinksSchema.parse(
|
|
2918
2867
|
getPlugins().flatMap(
|
|
@@ -2926,6 +2875,10 @@ function readPluginUserPageLinks() {
|
|
|
2926
2875
|
)
|
|
2927
2876
|
);
|
|
2928
2877
|
}
|
|
2878
|
+
function actionBelongsToPlugin(href, pluginName) {
|
|
2879
|
+
const parsed = new URL(href, "http://junior.local");
|
|
2880
|
+
return parsed.origin === "http://junior.local" && parsed.pathname === href && parsed.pathname.startsWith(`/api/plugins/${pluginName}/`) && !parsed.search && !parsed.hash;
|
|
2881
|
+
}
|
|
2929
2882
|
async function readPluginUserPage(input) {
|
|
2930
2883
|
const plugin = getPlugins().find(
|
|
2931
2884
|
(candidate) => candidate.manifest.name === input.pluginName
|
|
@@ -2934,17 +2887,30 @@ async function readPluginUserPage(input) {
|
|
|
2934
2887
|
(candidate) => candidate.id === input.pageId
|
|
2935
2888
|
);
|
|
2936
2889
|
if (!plugin || !page) return void 0;
|
|
2937
|
-
|
|
2938
|
-
await page.read(
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2890
|
+
const content = pluginUserPageContentSchema.parse(
|
|
2891
|
+
await page.read(
|
|
2892
|
+
{
|
|
2893
|
+
db: getDb(),
|
|
2894
|
+
log: createPluginLogger(plugin.manifest.name),
|
|
2895
|
+
plugin: { name: plugin.manifest.name },
|
|
2896
|
+
viewer: {
|
|
2897
|
+
actors: await readViewerActors(input.email),
|
|
2898
|
+
email: input.email
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
input.query
|
|
2902
|
+
)
|
|
2947
2903
|
);
|
|
2904
|
+
if (content.records.some(
|
|
2905
|
+
(record) => record.actions?.some(
|
|
2906
|
+
(action) => !actionBelongsToPlugin(action.href, plugin.manifest.name)
|
|
2907
|
+
)
|
|
2908
|
+
)) {
|
|
2909
|
+
throw new Error(
|
|
2910
|
+
`Plugin user page "${plugin.manifest.name}/${page.id}" returned an action outside its API namespace.`
|
|
2911
|
+
);
|
|
2912
|
+
}
|
|
2913
|
+
return content;
|
|
2948
2914
|
}
|
|
2949
2915
|
|
|
2950
2916
|
// src/api/user-pages/routes.ts
|
|
@@ -2963,10 +2929,23 @@ function createUserPageRoutes() {
|
|
|
2963
2929
|
{ status: 401 }
|
|
2964
2930
|
);
|
|
2965
2931
|
}
|
|
2932
|
+
const pageInput = pluginUserPageInputSchema.safeParse({
|
|
2933
|
+
cursor: context.req.query("cursor") || void 0,
|
|
2934
|
+
limit: context.req.query("limit") ? Number(context.req.query("limit")) : 20,
|
|
2935
|
+
query: context.req.query("q") || void 0
|
|
2936
|
+
});
|
|
2937
|
+
if (!pageInput.success) {
|
|
2938
|
+
return jsonResponse(
|
|
2939
|
+
apiErrorSchema,
|
|
2940
|
+
{ error: "Invalid user page query." },
|
|
2941
|
+
{ status: 400 }
|
|
2942
|
+
);
|
|
2943
|
+
}
|
|
2966
2944
|
const page = await readPluginUserPage({
|
|
2967
2945
|
email,
|
|
2968
2946
|
pageId: context.req.param("pageId"),
|
|
2969
|
-
pluginName: context.req.param("pluginName")
|
|
2947
|
+
pluginName: context.req.param("pluginName"),
|
|
2948
|
+
query: pageInput.data
|
|
2970
2949
|
});
|
|
2971
2950
|
return page ? jsonResponse(pluginUserPageContentSchema2, page) : jsonResponse(
|
|
2972
2951
|
apiErrorSchema,
|
package/dist/app.js
CHANGED
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
startConversationWork,
|
|
51
51
|
startSlackProcessingReaction,
|
|
52
52
|
stripLeadingBotMention
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-KLUMVJRQ.js";
|
|
54
54
|
import "./chunk-FA6POGLH.js";
|
|
55
55
|
import {
|
|
56
56
|
ConversationTurnLifecycleService,
|
|
@@ -65,13 +65,13 @@ import {
|
|
|
65
65
|
processPluginTask,
|
|
66
66
|
requireTurnFailureEventId,
|
|
67
67
|
scheduleSessionCompletedPluginTasks
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-JYDIBXFY.js";
|
|
69
69
|
import {
|
|
70
70
|
GET,
|
|
71
71
|
conversationVisibilityFromSlackChannelType,
|
|
72
72
|
resolveSlackChannelTypeFromMessage,
|
|
73
73
|
resolveSlackConversationContext
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-UXQ5XSA2.js";
|
|
75
75
|
import "./chunk-4CODA7P5.js";
|
|
76
76
|
import "./chunk-PE44LDDQ.js";
|
|
77
77
|
import {
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
import {
|
|
91
91
|
validatePluginEgressCredentialHooks,
|
|
92
92
|
validatePluginRegistrations
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-LE77HHF3.js";
|
|
94
94
|
import {
|
|
95
95
|
defineJuniorPlugins,
|
|
96
96
|
pluginCatalogConfigFromEnv,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
setConfigDefaults,
|
|
124
124
|
shouldEmitDevAgentTrace,
|
|
125
125
|
shouldPropagateSandboxEgressTrace
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-VWBKDPMQ.js";
|
|
127
127
|
import "./chunk-DIB4GX3G.js";
|
|
128
128
|
import {
|
|
129
129
|
RetryableDeliveryError,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
formatProviderLabel,
|
|
135
135
|
postSlackMessage,
|
|
136
136
|
startOAuthFlow
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-3DBMANUI.js";
|
|
138
138
|
import {
|
|
139
139
|
ConversationTurnBoundaryError,
|
|
140
140
|
CooperativeTurnYieldError,
|
|
@@ -188,10 +188,10 @@ import {
|
|
|
188
188
|
trimTrailingAssistantMessages,
|
|
189
189
|
updateConversationStats,
|
|
190
190
|
upsertConversationMessage
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-Z2XXPUZG.js";
|
|
192
192
|
import "./chunk-HDSDCEPK.js";
|
|
193
|
-
import "./chunk-
|
|
194
|
-
import "./chunk-
|
|
193
|
+
import "./chunk-ITMEXX5H.js";
|
|
194
|
+
import "./chunk-XDRGYDED.js";
|
|
195
195
|
import "./chunk-MU6HHZEN.js";
|
|
196
196
|
import "./chunk-PDO5BLNM.js";
|
|
197
197
|
import "./chunk-UIE3R5XU.js";
|
|
@@ -216,7 +216,7 @@ import {
|
|
|
216
216
|
validatePlugins,
|
|
217
217
|
verifyScheduledTaskCredentialSubject,
|
|
218
218
|
verifySlackDirectCredentialSubject
|
|
219
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-7HYV7KFM.js";
|
|
220
220
|
import {
|
|
221
221
|
contextProvenance,
|
|
222
222
|
createSlackDestination,
|
|
@@ -227,7 +227,7 @@ import {
|
|
|
227
227
|
instructionProvenanceFor,
|
|
228
228
|
requireSlackDestination,
|
|
229
229
|
withConversationEventLock
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-254MFDOF.js";
|
|
231
231
|
import {
|
|
232
232
|
juniorConversationEvents,
|
|
233
233
|
juniorConversations
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
acquireActiveLock,
|
|
237
237
|
getStateAdapter,
|
|
238
238
|
sleep
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-UURFXX66.js";
|
|
240
240
|
import {
|
|
241
241
|
STANDARD_MODEL_PROFILE,
|
|
242
242
|
botConfig,
|
|
@@ -254,18 +254,18 @@ import {
|
|
|
254
254
|
modelIdForProfile,
|
|
255
255
|
setSlackReactionConfig,
|
|
256
256
|
standardModelId
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-IDXLBKPS.js";
|
|
258
258
|
import {
|
|
259
259
|
juniorDestinations
|
|
260
260
|
} from "./chunk-VFUK3X5B.js";
|
|
261
261
|
import {
|
|
262
262
|
parseSlackThreadId
|
|
263
263
|
} from "./chunk-HDFGNU5E.js";
|
|
264
|
-
import "./chunk-
|
|
264
|
+
import "./chunk-TRECK7RV.js";
|
|
265
265
|
import {
|
|
266
266
|
pluginCatalogRuntime
|
|
267
|
-
} from "./chunk-
|
|
268
|
-
import "./chunk-
|
|
267
|
+
} from "./chunk-WUP7NWMP.js";
|
|
268
|
+
import "./chunk-ET2SDCNV.js";
|
|
269
269
|
import {
|
|
270
270
|
credentialSubjectSchema
|
|
271
271
|
} from "./chunk-W3U3YQYI.js";
|
|
@@ -291,7 +291,7 @@ import {
|
|
|
291
291
|
setTags,
|
|
292
292
|
withContext,
|
|
293
293
|
withSpan
|
|
294
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-JZ47AFSH.js";
|
|
295
295
|
import {
|
|
296
296
|
toOptionalString
|
|
297
297
|
} from "./chunk-OB42YVAE.js";
|
|
@@ -302,14 +302,14 @@ import {
|
|
|
302
302
|
import {
|
|
303
303
|
continueTrace
|
|
304
304
|
} from "./chunk-6GWA276C.js";
|
|
305
|
-
import "./chunk-
|
|
306
|
-
import "./chunk-
|
|
305
|
+
import "./chunk-OOUNJNMR.js";
|
|
306
|
+
import "./chunk-H4HBKISO.js";
|
|
307
307
|
import {
|
|
308
308
|
JUNIOR_PLUGIN_TASK_CALLBACK_ROUTE
|
|
309
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-IK4QSS5H.js";
|
|
310
310
|
import {
|
|
311
311
|
JUNIOR_VERSION
|
|
312
|
-
} from "./chunk-
|
|
312
|
+
} from "./chunk-D2EMOH3N.js";
|
|
313
313
|
import "./chunk-MLKGABMK.js";
|
|
314
314
|
|
|
315
315
|
// src/app.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** Copy app and declared plugin
|
|
2
|
-
export declare function
|
|
1
|
+
/** Copy app, built-in skill, and declared plugin content into server output. */
|
|
2
|
+
export declare function copyRuntimeContent(cwd: string, serverRoot: string, packageNames?: unknown): void;
|
|
3
3
|
/** Copy dashboard browser assets when core dashboard routes are enabled. */
|
|
4
4
|
export declare function copyDashboardAssets(cwd: string, serverRoot: string): void;
|
|
5
5
|
/** Copy extra file patterns into server output for files the bundler cannot trace. */
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
pluginCatalogRuntime
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-WUP7NWMP.js";
|
|
4
|
+
import "./chunk-ET2SDCNV.js";
|
|
5
5
|
import "./chunk-W3U3YQYI.js";
|
|
6
6
|
import "./chunk-HZF5P5UN.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-JZ47AFSH.js";
|
|
8
8
|
import "./chunk-OB42YVAE.js";
|
|
9
9
|
import "./chunk-F3B2YJ76.js";
|
|
10
10
|
import "./chunk-6GWA276C.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-OOUNJNMR.js";
|
|
12
|
+
import "./chunk-H4HBKISO.js";
|
|
13
|
+
import "./chunk-IK4QSS5H.js";
|
|
14
|
+
import "./chunk-D2EMOH3N.js";
|
|
15
15
|
import "./chunk-MLKGABMK.js";
|
|
16
16
|
export {
|
|
17
17
|
pluginCatalogRuntime
|
package/dist/chat/discovery.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface ResolveHomeDirOptions {
|
|
|
19
19
|
}
|
|
20
20
|
/** Resolve the app home directory by scoring candidate `app/` directories. */
|
|
21
21
|
export declare function resolveHomeDir(cwd?: string, options?: ResolveHomeDirOptions): string;
|
|
22
|
+
/** Return the built-in skills directory in source and packaged builds. */
|
|
23
|
+
export declare function builtInSkillsDir(): string;
|
|
22
24
|
/** Return the data directory (same as homeDir). */
|
|
23
25
|
export declare function dataDir(): string;
|
|
24
26
|
/** Return the path to the SOUL.md file. */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { ImageContent, TextContent } from "@earendil-works/pi-ai";
|
|
10
10
|
import type { OAuthClientProvider } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
11
|
-
import type { ToolAnnotations } from "@sentry/junior-plugin-api";
|
|
11
|
+
import type { PluginMcpToolResult, ToolAnnotations } from "@sentry/junior-plugin-api";
|
|
12
12
|
import type { ConversationPrivacy } from "@/chat/conversation-privacy";
|
|
13
13
|
import type { SkillMetadata } from "@/chat/skills";
|
|
14
14
|
import type { PluginDefinition } from "@/chat/plugins/types";
|
|
@@ -19,7 +19,15 @@ export interface McpToolManagerOptions {
|
|
|
19
19
|
onAuthorizationRequired?: (provider: string, error: McpAuthorizationRequiredError) => Promise<boolean | void> | boolean | void;
|
|
20
20
|
}
|
|
21
21
|
export interface ManagedMcpToolResult {
|
|
22
|
+
/**
|
|
23
|
+
* Internal bridge for direct model calls, which need placeholder content
|
|
24
|
+
* while the wrapper boundary receives a content-free discriminated result.
|
|
25
|
+
*/
|
|
26
|
+
authorizationPending?: boolean;
|
|
22
27
|
content: Array<TextContent | ImageContent>;
|
|
28
|
+
/** Original provider content before model-visible result normalization. */
|
|
29
|
+
providerContent?: Array<TextContent | ImageContent>;
|
|
30
|
+
structuredContent?: unknown;
|
|
23
31
|
}
|
|
24
32
|
export interface ManagedMcpToolDescriptor {
|
|
25
33
|
name: string;
|
|
@@ -62,6 +70,7 @@ export declare class McpToolManager {
|
|
|
62
70
|
provider?: string;
|
|
63
71
|
}): ManagedMcpToolDescriptor[];
|
|
64
72
|
private filterListedTools;
|
|
73
|
+
private assertWrappedToolsAvailable;
|
|
65
74
|
private getClient;
|
|
66
75
|
private createClient;
|
|
67
76
|
private toManagedTool;
|
|
@@ -70,6 +79,10 @@ export declare class McpToolManager {
|
|
|
70
79
|
getResolvedActiveTools(options?: {
|
|
71
80
|
provider?: string;
|
|
72
81
|
}): ManagedMcpTool[];
|
|
82
|
+
/** Call one active provider tool declared for plugin-owned wrapping. */
|
|
83
|
+
callWrappedTool(provider: string, rawName: string, args: Record<string, unknown>, options?: {
|
|
84
|
+
toolCallId?: string;
|
|
85
|
+
}): Promise<PluginMcpToolResult>;
|
|
73
86
|
private toToolDescriptor;
|
|
74
87
|
}
|
|
75
88
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PluginRuntimeDependency, PluginRuntimePostinstallCommand } from "@sentry/junior-plugin-api";
|
|
1
|
+
import type { PluginMcpConfig, PluginRuntimeDependency, PluginRuntimePostinstallCommand } from "@sentry/junior-plugin-api";
|
|
2
2
|
import type { UserTokenStore } from "@/chat/credentials/user-token-store";
|
|
3
|
-
export type { PluginNpmRuntimeDependency, PluginRuntimeDependency, PluginRuntimePostinstallCommand, PluginSystemRuntimeDependency, PluginSystemRuntimeDependencyFromUrl, } from "@sentry/junior-plugin-api";
|
|
3
|
+
export type { PluginNpmRuntimeDependency, PluginMcpConfig, PluginRuntimeDependency, PluginRuntimePostinstallCommand, PluginSystemRuntimeDependency, PluginSystemRuntimeDependencyFromUrl, } from "@sentry/junior-plugin-api";
|
|
4
4
|
export interface PluginOAuthConfig {
|
|
5
5
|
clientIdEnv: string;
|
|
6
6
|
clientSecretEnv: string;
|
|
@@ -30,13 +30,6 @@ export interface OAuthBearerCredentials {
|
|
|
30
30
|
authTokenPlaceholder?: string;
|
|
31
31
|
}
|
|
32
32
|
export type PluginCredentials = OAuthBearerCredentials;
|
|
33
|
-
export interface PluginMcpHttpConfig {
|
|
34
|
-
transport: "http";
|
|
35
|
-
url: string;
|
|
36
|
-
headers?: Record<string, string>;
|
|
37
|
-
allowedTools?: string[];
|
|
38
|
-
}
|
|
39
|
-
export type PluginMcpConfig = PluginMcpHttpConfig;
|
|
40
33
|
export interface PluginEnvVarDeclaration {
|
|
41
34
|
default?: string;
|
|
42
35
|
exposeToCommandEnv?: boolean;
|
|
@@ -103,6 +96,7 @@ export interface PluginManifestConfig {
|
|
|
103
96
|
url?: string;
|
|
104
97
|
headers?: Record<string, string | null> | null;
|
|
105
98
|
allowedTools?: string[] | null;
|
|
99
|
+
wrappedTools?: string[] | null;
|
|
106
100
|
} | null;
|
|
107
101
|
oauth?: PluginOAuthConfigPatch | null;
|
|
108
102
|
target?: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This module joins registered readers with the authenticated viewer and
|
|
5
5
|
* validates every plugin response before it reaches the dashboard.
|
|
6
6
|
*/
|
|
7
|
-
import { type PluginUserPageContent, type PluginUserPageLink } from "@sentry/junior-plugin-api";
|
|
7
|
+
import { type PluginUserPageContent, type PluginUserPageInput, type PluginUserPageLink } from "@sentry/junior-plugin-api";
|
|
8
8
|
/** List safe navigation metadata for registered plugin user pages. */
|
|
9
9
|
export declare function readPluginUserPageLinks(): PluginUserPageLink[];
|
|
10
10
|
/** Read one registered plugin user page for the authenticated viewer. */
|
|
@@ -12,4 +12,5 @@ export declare function readPluginUserPage(input: {
|
|
|
12
12
|
email: string;
|
|
13
13
|
pageId: string;
|
|
14
14
|
pluginName: string;
|
|
15
|
+
query: PluginUserPageInput;
|
|
15
16
|
}): Promise<PluginUserPageContent | undefined>;
|
|
@@ -24,8 +24,8 @@ interface SandboxToolExecutors {
|
|
|
24
24
|
}
|
|
25
25
|
interface SandboxRuntime {
|
|
26
26
|
sandboxRef(): SandboxRef | undefined;
|
|
27
|
-
acquire(): Promise<SandboxSession>;
|
|
28
|
-
tools(): Promise<SandboxToolExecutors>;
|
|
27
|
+
acquire(signal?: AbortSignal): Promise<SandboxSession>;
|
|
28
|
+
tools(signal?: AbortSignal): Promise<SandboxToolExecutors>;
|
|
29
29
|
refreshNetworkPolicy(traceHeaders?: TracePropagationHeaders): Promise<void>;
|
|
30
30
|
close(): void;
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PluginRuntimeDependency, PluginRuntimePostinstallCommand } from "@/chat/plugins/types";
|
|
2
2
|
import type { SandboxSession } from "@/chat/sandbox/workspace";
|
|
3
3
|
/** Install declared system and npm dependencies into a snapshot sandbox. */
|
|
4
|
-
export declare function dependencies(sandbox: SandboxSession, values: PluginRuntimeDependency[]): Promise<void>;
|
|
4
|
+
export declare function dependencies(sandbox: SandboxSession, values: PluginRuntimeDependency[], signal?: AbortSignal): Promise<void>;
|
|
5
5
|
/** Run declared postinstall commands after dependency binaries are available. */
|
|
6
|
-
export declare function postinstall(sandbox: SandboxSession, commands: PluginRuntimePostinstallCommand[]): Promise<void>;
|
|
6
|
+
export declare function postinstall(sandbox: SandboxSession, commands: PluginRuntimePostinstallCommand[], signal?: AbortSignal): Promise<void>;
|
|
@@ -17,6 +17,7 @@ export declare function resolve(params: {
|
|
|
17
17
|
forceRebuild?: boolean;
|
|
18
18
|
staleSnapshotId?: string;
|
|
19
19
|
onProgress?: (phase: ProgressPhase) => void | Promise<void>;
|
|
20
|
+
signal?: AbortSignal;
|
|
20
21
|
}): Promise<Snapshot>;
|
|
21
22
|
/** Identify provider errors that mean a referenced snapshot no longer exists. */
|
|
22
23
|
export declare function isMissingError(error: unknown): boolean;
|
|
@@ -52,7 +52,9 @@ export interface SandboxSession extends SandboxWorkspace {
|
|
|
52
52
|
readonly fs: SandboxFileSystem;
|
|
53
53
|
extendTimeout(duration: number): Promise<void>;
|
|
54
54
|
mkDir(path: string): Promise<void>;
|
|
55
|
-
snapshot(
|
|
55
|
+
snapshot(options?: {
|
|
56
|
+
signal?: AbortSignal;
|
|
57
|
+
}): Promise<{
|
|
56
58
|
snapshotId: string;
|
|
57
59
|
}>;
|
|
58
60
|
stop(): Promise<unknown>;
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
TURN_REASONING_LEVELS,
|
|
10
10
|
getChatConfig,
|
|
11
11
|
modelProfileSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IDXLBKPS.js";
|
|
13
13
|
import {
|
|
14
14
|
juniorDestinations
|
|
15
15
|
} from "./chunk-VFUK3X5B.js";
|
|
16
16
|
import {
|
|
17
17
|
normalizeIdentityEmail
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JZ47AFSH.js";
|
|
19
19
|
import {
|
|
20
20
|
parseSlackChannelReferenceId,
|
|
21
21
|
parseSlackTeamId
|
|
@@ -6,29 +6,29 @@ import {
|
|
|
6
6
|
isDmChannel,
|
|
7
7
|
normalizeSlackConversationId,
|
|
8
8
|
withSlackRetries
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7HYV7KFM.js";
|
|
10
10
|
import {
|
|
11
11
|
getDb,
|
|
12
12
|
parseDestination
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-254MFDOF.js";
|
|
14
14
|
import {
|
|
15
15
|
acquireActiveLock,
|
|
16
16
|
getStateAdapter,
|
|
17
17
|
sleep
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UURFXX66.js";
|
|
19
19
|
import {
|
|
20
20
|
normalizeSlackEmojiName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IDXLBKPS.js";
|
|
22
22
|
import {
|
|
23
23
|
pluginCatalogRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WUP7NWMP.js";
|
|
25
25
|
import {
|
|
26
26
|
fetchWithBoundedOAuthErrorBodies
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-ET2SDCNV.js";
|
|
28
28
|
import {
|
|
29
29
|
logInfo,
|
|
30
30
|
logWarn
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JZ47AFSH.js";
|
|
32
32
|
import {
|
|
33
33
|
isRecord
|
|
34
34
|
} from "./chunk-OB42YVAE.js";
|