@sentry/junior 0.2.0 → 0.4.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/README.md +8 -1
- package/dist/{bot-T73QBC4J.js → bot-Y6A47LEZ.js} +3 -2
- package/dist/{chunk-TQSDLJVE.js → chunk-DGKNXMK4.js} +2 -2
- package/dist/{chunk-QHDDCUTN.js → chunk-OZFXD5IG.js} +552 -261
- package/dist/{chunk-RXNMJQPY.js → chunk-RFUE5VBK.js} +854 -346
- package/dist/{chunk-JDBWDYGR.js → chunk-TEQ3UIS7.js} +1 -1
- package/dist/chunk-Z5E25LRN.js +445 -0
- package/dist/cli/snapshot-warmup.js +2 -1
- package/dist/handlers/queue-callback.js +4 -3
- package/dist/handlers/router.js +90 -39
- package/dist/handlers/webhooks.js +1 -1
- package/dist/next-config.d.ts +2 -2
- package/dist/next-config.js +82 -77
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { after } from "next/server";
|
|
13
13
|
import * as Sentry from "@sentry/nextjs";
|
|
14
14
|
async function loadBot() {
|
|
15
|
-
const { bot } = await import("./bot-
|
|
15
|
+
const { bot } = await import("./bot-Y6A47LEZ.js");
|
|
16
16
|
return bot;
|
|
17
17
|
}
|
|
18
18
|
async function POST(request, context) {
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
// src/chat/fs-utils.ts
|
|
2
|
+
import { statSync } from "fs";
|
|
3
|
+
function isDirectory(targetPath) {
|
|
4
|
+
try {
|
|
5
|
+
return statSync(targetPath).isDirectory();
|
|
6
|
+
} catch {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function isFile(targetPath) {
|
|
11
|
+
try {
|
|
12
|
+
return statSync(targetPath).isFile();
|
|
13
|
+
} catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// src/chat/discovery-roots.ts
|
|
19
|
+
import { readdirSync } from "fs";
|
|
20
|
+
import path from "path";
|
|
21
|
+
import { fileURLToPath } from "url";
|
|
22
|
+
function normalizePath(targetPath) {
|
|
23
|
+
return path.resolve(targetPath);
|
|
24
|
+
}
|
|
25
|
+
function uniqueResolvedPathsInOrder(values) {
|
|
26
|
+
const seen = /* @__PURE__ */ new Set();
|
|
27
|
+
const resolved = [];
|
|
28
|
+
for (const value of values) {
|
|
29
|
+
const normalized = normalizePath(value);
|
|
30
|
+
if (seen.has(normalized)) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
seen.add(normalized);
|
|
34
|
+
resolved.push(normalized);
|
|
35
|
+
}
|
|
36
|
+
return resolved;
|
|
37
|
+
}
|
|
38
|
+
function isNodeModulesPath(candidatePath) {
|
|
39
|
+
return path.basename(candidatePath) === "node_modules";
|
|
40
|
+
}
|
|
41
|
+
function isInsidePnpmStore(candidatePath) {
|
|
42
|
+
return candidatePath.split(path.sep).includes(".pnpm");
|
|
43
|
+
}
|
|
44
|
+
function runningFromInstalledPackage() {
|
|
45
|
+
const currentFile = fileURLToPath(import.meta.url);
|
|
46
|
+
const marker = `${path.sep}node_modules${path.sep}@sentry${path.sep}junior${path.sep}`;
|
|
47
|
+
return currentFile.includes(marker);
|
|
48
|
+
}
|
|
49
|
+
function listInstalledPackageNodeModulesDirs() {
|
|
50
|
+
if (!runningFromInstalledPackage()) {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
const dirs = [];
|
|
54
|
+
let current = path.resolve(path.dirname(fileURLToPath(import.meta.url)));
|
|
55
|
+
while (true) {
|
|
56
|
+
if (isNodeModulesPath(current) && !isInsidePnpmStore(current) && isDirectory(current)) {
|
|
57
|
+
dirs.push(current);
|
|
58
|
+
}
|
|
59
|
+
const parent = path.dirname(current);
|
|
60
|
+
if (parent === current) {
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
current = parent;
|
|
64
|
+
}
|
|
65
|
+
return dirs;
|
|
66
|
+
}
|
|
67
|
+
function listCwdAncestorNodeModulesDirs(cwd) {
|
|
68
|
+
const resolvedCwd = normalizePath(cwd);
|
|
69
|
+
const dirs = [];
|
|
70
|
+
let current = resolvedCwd;
|
|
71
|
+
while (true) {
|
|
72
|
+
const nodeModulesDir = path.join(current, "node_modules");
|
|
73
|
+
if (isDirectory(nodeModulesDir)) {
|
|
74
|
+
dirs.push(nodeModulesDir);
|
|
75
|
+
}
|
|
76
|
+
if (isFile(path.join(current, "package.json"))) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
const parent = path.dirname(current);
|
|
80
|
+
if (parent === current) {
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
current = parent;
|
|
84
|
+
}
|
|
85
|
+
return dirs;
|
|
86
|
+
}
|
|
87
|
+
function discoverNodeModulesDirs(cwd = process.cwd(), options) {
|
|
88
|
+
const explicit = options?.candidateDirs?.filter((dir) => isDirectory(dir)) ?? [];
|
|
89
|
+
if (explicit.length > 0) {
|
|
90
|
+
return uniqueResolvedPathsInOrder(explicit);
|
|
91
|
+
}
|
|
92
|
+
return uniqueResolvedPathsInOrder([
|
|
93
|
+
...listInstalledPackageNodeModulesDirs(),
|
|
94
|
+
...listCwdAncestorNodeModulesDirs(cwd)
|
|
95
|
+
]);
|
|
96
|
+
}
|
|
97
|
+
function discoverProjectRoots(cwd = process.cwd(), options) {
|
|
98
|
+
const roots = discoverNodeModulesDirs(cwd, options?.nodeModulesDirs ? { candidateDirs: options.nodeModulesDirs } : void 0).map((nodeModulesDir) => path.dirname(nodeModulesDir));
|
|
99
|
+
return uniqueResolvedPathsInOrder([cwd, ...roots]);
|
|
100
|
+
}
|
|
101
|
+
function listTopLevelPackages(nodeModulesDir) {
|
|
102
|
+
const entries = readdirSync(nodeModulesDir, { withFileTypes: true }).filter((entry) => !entry.name.startsWith(".") && entry.name !== ".bin" && entry.name !== ".pnpm").sort((left, right) => left.name.localeCompare(right.name));
|
|
103
|
+
const packages = [];
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
const entryPath = path.join(nodeModulesDir, entry.name);
|
|
106
|
+
if (entry.name.startsWith("@")) {
|
|
107
|
+
if (!isDirectory(entryPath)) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const scopedEntries = readdirSync(entryPath, { withFileTypes: true }).sort(
|
|
111
|
+
(left, right) => left.name.localeCompare(right.name)
|
|
112
|
+
);
|
|
113
|
+
for (const scopedEntry of scopedEntries) {
|
|
114
|
+
const packageName = `${entry.name}/${scopedEntry.name}`;
|
|
115
|
+
const packagePath = path.join(entryPath, scopedEntry.name);
|
|
116
|
+
if (!isDirectory(packagePath)) {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
packages.push({ name: packageName, dir: packagePath });
|
|
120
|
+
}
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (!isDirectory(entryPath)) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
packages.push({ name: entry.name, dir: entryPath });
|
|
127
|
+
}
|
|
128
|
+
return packages;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// src/chat/plugins/package-discovery.ts
|
|
132
|
+
import { readFileSync, readdirSync as readdirSync2 } from "fs";
|
|
133
|
+
import path2 from "path";
|
|
134
|
+
import { parse as parseYaml } from "yaml";
|
|
135
|
+
function normalizeForGlob(targetPath) {
|
|
136
|
+
return targetPath.split(path2.sep).join("/");
|
|
137
|
+
}
|
|
138
|
+
function uniqueStringsInOrder(values) {
|
|
139
|
+
const seen = /* @__PURE__ */ new Set();
|
|
140
|
+
const resolved = [];
|
|
141
|
+
for (const value of values) {
|
|
142
|
+
if (seen.has(value)) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
seen.add(value);
|
|
146
|
+
resolved.push(value);
|
|
147
|
+
}
|
|
148
|
+
return resolved;
|
|
149
|
+
}
|
|
150
|
+
function pathForTracingInclude(cwd, targetPath) {
|
|
151
|
+
const relative = path2.relative(cwd, targetPath);
|
|
152
|
+
if (!relative || path2.isAbsolute(relative)) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
const normalized = normalizeForGlob(relative);
|
|
156
|
+
return normalized.startsWith(".") ? normalized : `./${normalized}`;
|
|
157
|
+
}
|
|
158
|
+
function parseRuntimeConfiguredPackageNames(value) {
|
|
159
|
+
if (!Array.isArray(value)) {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
const parsed = value.filter(
|
|
163
|
+
(entry) => typeof entry === "string" && entry.trim().length > 0
|
|
164
|
+
);
|
|
165
|
+
return uniqueStringsInOrder(parsed.map((entry) => entry.trim()));
|
|
166
|
+
}
|
|
167
|
+
function readNextRuntimeConfiguredPackageNames() {
|
|
168
|
+
const raw = process.env.JUNIOR_PLUGIN_PACKAGES;
|
|
169
|
+
if (raw === void 0) {
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
return parseRuntimeConfiguredPackageNames(JSON.parse(raw)) ?? [];
|
|
174
|
+
} catch {
|
|
175
|
+
return [];
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function findWorkspaceRoot(cwd) {
|
|
179
|
+
let current = path2.resolve(cwd);
|
|
180
|
+
while (true) {
|
|
181
|
+
const candidate = path2.join(current, "pnpm-workspace.yaml");
|
|
182
|
+
if (isFile(candidate)) {
|
|
183
|
+
return current;
|
|
184
|
+
}
|
|
185
|
+
const parent = path2.dirname(current);
|
|
186
|
+
if (parent === current) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
current = parent;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function listWorkspacePackageDirs(cwd) {
|
|
193
|
+
const workspaceRoot = findWorkspaceRoot(cwd);
|
|
194
|
+
if (!workspaceRoot) {
|
|
195
|
+
return [];
|
|
196
|
+
}
|
|
197
|
+
let packagePatterns = [];
|
|
198
|
+
try {
|
|
199
|
+
const raw = readFileSync(
|
|
200
|
+
path2.join(workspaceRoot, "pnpm-workspace.yaml"),
|
|
201
|
+
"utf8"
|
|
202
|
+
);
|
|
203
|
+
const parsed = parseYaml(raw);
|
|
204
|
+
packagePatterns = Array.isArray(parsed.packages) ? parsed.packages.filter(
|
|
205
|
+
(entry) => typeof entry === "string" && entry.trim().length > 0
|
|
206
|
+
) : [];
|
|
207
|
+
} catch {
|
|
208
|
+
return [];
|
|
209
|
+
}
|
|
210
|
+
const discovered = [];
|
|
211
|
+
const seen = /* @__PURE__ */ new Set();
|
|
212
|
+
const addDir = (candidate) => {
|
|
213
|
+
const normalized = path2.resolve(candidate);
|
|
214
|
+
if (seen.has(normalized) || !isDirectory(normalized)) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
seen.add(normalized);
|
|
218
|
+
discovered.push(normalized);
|
|
219
|
+
};
|
|
220
|
+
for (const pattern of packagePatterns) {
|
|
221
|
+
const trimmed = pattern.trim();
|
|
222
|
+
if (!trimmed) {
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (trimmed.endsWith("/*")) {
|
|
226
|
+
const baseDir = path2.join(workspaceRoot, trimmed.slice(0, -2));
|
|
227
|
+
if (!isDirectory(baseDir)) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
for (const entry of readdirSync2(baseDir)) {
|
|
231
|
+
addDir(path2.join(baseDir, entry));
|
|
232
|
+
}
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
addDir(path2.join(workspaceRoot, trimmed));
|
|
236
|
+
}
|
|
237
|
+
return discovered;
|
|
238
|
+
}
|
|
239
|
+
function readPluginPackageFlags(dir) {
|
|
240
|
+
const hasRootPluginManifest = isFile(path2.join(dir, "plugin.yaml"));
|
|
241
|
+
const hasPluginsDir = isDirectory(path2.join(dir, "plugins"));
|
|
242
|
+
const hasSkillsDir = isDirectory(path2.join(dir, "skills"));
|
|
243
|
+
if (!hasRootPluginManifest && !hasPluginsDir && !hasSkillsDir) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
hasRootPluginManifest,
|
|
248
|
+
hasPluginsDir,
|
|
249
|
+
hasSkillsDir
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function discoverWorkspacePluginPackageDirs(cwd, packageNames) {
|
|
253
|
+
if (packageNames !== null) {
|
|
254
|
+
return [];
|
|
255
|
+
}
|
|
256
|
+
return listWorkspacePackageDirs(cwd).filter(
|
|
257
|
+
(candidate) => readPluginPackageFlags(candidate) !== null
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
function readWorkspacePackageName(dir) {
|
|
261
|
+
try {
|
|
262
|
+
const raw = readFileSync(path2.join(dir, "package.json"), "utf8");
|
|
263
|
+
const name = JSON.parse(raw).name;
|
|
264
|
+
return typeof name === "string" && name.trim().length > 0 ? name : null;
|
|
265
|
+
} catch {
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
function resolveWorkspacePackageDirFromName(cwd, packageName) {
|
|
270
|
+
for (const candidate of listWorkspacePackageDirs(cwd)) {
|
|
271
|
+
if (readWorkspacePackageName(candidate) !== packageName) {
|
|
272
|
+
continue;
|
|
273
|
+
}
|
|
274
|
+
return candidate;
|
|
275
|
+
}
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
function resolvePackageDirFromName(packageName, candidateNodeModulesDirs) {
|
|
279
|
+
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
280
|
+
const packageDir = path2.join(nodeModulesDir, ...packageName.split("/"));
|
|
281
|
+
if (isDirectory(packageDir)) {
|
|
282
|
+
return {
|
|
283
|
+
dir: path2.resolve(packageDir),
|
|
284
|
+
nodeModulesDir: path2.resolve(nodeModulesDir)
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return null;
|
|
289
|
+
}
|
|
290
|
+
function discoverDeclaredPackages(cwd, packageNames, candidateNodeModulesDirs) {
|
|
291
|
+
const discovered = [];
|
|
292
|
+
const seenPackageNames = /* @__PURE__ */ new Set();
|
|
293
|
+
const seenPackageDirs = /* @__PURE__ */ new Set();
|
|
294
|
+
for (const packageName of packageNames) {
|
|
295
|
+
const resolved = resolvePackageDirFromName(
|
|
296
|
+
packageName,
|
|
297
|
+
candidateNodeModulesDirs
|
|
298
|
+
);
|
|
299
|
+
const workspaceDir = resolved ? null : resolveWorkspacePackageDirFromName(cwd, packageName);
|
|
300
|
+
if (!resolved && !workspaceDir) {
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
const packageDir = resolved?.dir ?? workspaceDir;
|
|
304
|
+
if (seenPackageNames.has(packageName) || seenPackageDirs.has(packageDir)) {
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
const pluginFlags = readPluginPackageFlags(packageDir);
|
|
308
|
+
if (!pluginFlags) {
|
|
309
|
+
continue;
|
|
310
|
+
}
|
|
311
|
+
seenPackageNames.add(packageName);
|
|
312
|
+
seenPackageDirs.add(packageDir);
|
|
313
|
+
discovered.push({
|
|
314
|
+
name: packageName,
|
|
315
|
+
dir: packageDir,
|
|
316
|
+
nodeModulesDir: resolved?.nodeModulesDir ?? null,
|
|
317
|
+
...pluginFlags
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
return discovered;
|
|
321
|
+
}
|
|
322
|
+
function discoverInstalledJuniorContentPackages(cwd = process.cwd(), nodeModulesDirs, packageNames) {
|
|
323
|
+
const resolvedCwd = path2.resolve(cwd);
|
|
324
|
+
const candidateNodeModulesDirs = nodeModulesDirs ?? discoverNodeModulesDirs(resolvedCwd);
|
|
325
|
+
const configuredPackageNames = packageNames ?? readNextRuntimeConfiguredPackageNames();
|
|
326
|
+
const declaredPackages = discoverDeclaredPackages(
|
|
327
|
+
resolvedCwd,
|
|
328
|
+
configuredPackageNames ?? [],
|
|
329
|
+
candidateNodeModulesDirs
|
|
330
|
+
);
|
|
331
|
+
const useFallbackScan = configuredPackageNames === null;
|
|
332
|
+
const discovered = [...declaredPackages];
|
|
333
|
+
const seenPackageNames = /* @__PURE__ */ new Set();
|
|
334
|
+
const seenPackageDirs = /* @__PURE__ */ new Set();
|
|
335
|
+
for (const pkg of declaredPackages) {
|
|
336
|
+
seenPackageNames.add(pkg.name);
|
|
337
|
+
seenPackageDirs.add(pkg.dir);
|
|
338
|
+
}
|
|
339
|
+
if (!useFallbackScan) {
|
|
340
|
+
return discovered;
|
|
341
|
+
}
|
|
342
|
+
for (const nodeModulesDir of candidateNodeModulesDirs) {
|
|
343
|
+
for (const pkg of listTopLevelPackages(nodeModulesDir)) {
|
|
344
|
+
const resolvedDir = path2.resolve(pkg.dir);
|
|
345
|
+
if (seenPackageNames.has(pkg.name) || seenPackageDirs.has(resolvedDir)) {
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
seenPackageNames.add(pkg.name);
|
|
349
|
+
seenPackageDirs.add(resolvedDir);
|
|
350
|
+
const hasRootPluginManifest = isFile(
|
|
351
|
+
path2.join(resolvedDir, "plugin.yaml")
|
|
352
|
+
);
|
|
353
|
+
const hasPluginsDir = isDirectory(path2.join(resolvedDir, "plugins"));
|
|
354
|
+
const hasSkillsDir = isDirectory(path2.join(resolvedDir, "skills"));
|
|
355
|
+
if (!hasRootPluginManifest && !hasPluginsDir && !hasSkillsDir) {
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
discovered.push({
|
|
359
|
+
name: pkg.name,
|
|
360
|
+
dir: resolvedDir,
|
|
361
|
+
nodeModulesDir: path2.resolve(nodeModulesDir),
|
|
362
|
+
hasRootPluginManifest,
|
|
363
|
+
hasPluginsDir,
|
|
364
|
+
hasSkillsDir
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return discovered;
|
|
369
|
+
}
|
|
370
|
+
function discoverInstalledPluginPackageContent(cwd = process.cwd(), options) {
|
|
371
|
+
const resolvedCwd = path2.resolve(cwd);
|
|
372
|
+
const configuredPackageNames = options?.packageNames ?? readNextRuntimeConfiguredPackageNames();
|
|
373
|
+
const discoveredPackages = discoverInstalledJuniorContentPackages(
|
|
374
|
+
resolvedCwd,
|
|
375
|
+
options?.nodeModulesDirs,
|
|
376
|
+
configuredPackageNames
|
|
377
|
+
);
|
|
378
|
+
const workspacePluginDirs = discoverWorkspacePluginPackageDirs(
|
|
379
|
+
resolvedCwd,
|
|
380
|
+
configuredPackageNames
|
|
381
|
+
);
|
|
382
|
+
const manifestRoots = [];
|
|
383
|
+
const skillRoots = [];
|
|
384
|
+
const tracingIncludes = [];
|
|
385
|
+
for (const pkg of discoveredPackages) {
|
|
386
|
+
const tracingBasePath = pkg.nodeModulesDir ? pathForTracingInclude(
|
|
387
|
+
resolvedCwd,
|
|
388
|
+
path2.join(pkg.nodeModulesDir, ...pkg.name.split("/"))
|
|
389
|
+
) : pathForTracingInclude(resolvedCwd, pkg.dir);
|
|
390
|
+
if (pkg.hasRootPluginManifest) {
|
|
391
|
+
manifestRoots.push(pkg.dir);
|
|
392
|
+
if (tracingBasePath) {
|
|
393
|
+
tracingIncludes.push(`${tracingBasePath}/plugin.yaml`);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (pkg.hasPluginsDir) {
|
|
397
|
+
manifestRoots.push(path2.join(pkg.dir, "plugins"));
|
|
398
|
+
if (tracingBasePath) {
|
|
399
|
+
tracingIncludes.push(`${tracingBasePath}/plugins/**/*`);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
if (pkg.hasSkillsDir) {
|
|
403
|
+
skillRoots.push(path2.join(pkg.dir, "skills"));
|
|
404
|
+
if (tracingBasePath) {
|
|
405
|
+
tracingIncludes.push(`${tracingBasePath}/skills/**/*`);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
for (const pluginDir of workspacePluginDirs) {
|
|
410
|
+
const tracingBasePath = pathForTracingInclude(resolvedCwd, pluginDir);
|
|
411
|
+
if (isFile(path2.join(pluginDir, "plugin.yaml"))) {
|
|
412
|
+
manifestRoots.push(pluginDir);
|
|
413
|
+
if (tracingBasePath) {
|
|
414
|
+
tracingIncludes.push(`${tracingBasePath}/plugin.yaml`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
if (isDirectory(path2.join(pluginDir, "plugins"))) {
|
|
418
|
+
manifestRoots.push(path2.join(pluginDir, "plugins"));
|
|
419
|
+
if (tracingBasePath) {
|
|
420
|
+
tracingIncludes.push(`${tracingBasePath}/plugins/**/*`);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
if (isDirectory(path2.join(pluginDir, "skills"))) {
|
|
424
|
+
skillRoots.push(path2.join(pluginDir, "skills"));
|
|
425
|
+
if (tracingBasePath) {
|
|
426
|
+
tracingIncludes.push(`${tracingBasePath}/skills/**/*`);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return {
|
|
431
|
+
packageNames: uniqueStringsInOrder(
|
|
432
|
+
discoveredPackages.map((pkg) => pkg.name)
|
|
433
|
+
),
|
|
434
|
+
manifestRoots: uniqueStringsInOrder(manifestRoots),
|
|
435
|
+
skillRoots: uniqueStringsInOrder(skillRoots),
|
|
436
|
+
tracingIncludes: uniqueStringsInOrder(tracingIncludes)
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export {
|
|
441
|
+
isDirectory,
|
|
442
|
+
discoverNodeModulesDirs,
|
|
443
|
+
discoverProjectRoots,
|
|
444
|
+
discoverInstalledPluginPackageContent
|
|
445
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
disconnectStateAdapter,
|
|
3
3
|
resolveRuntimeDependencySnapshot
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-OZFXD5IG.js";
|
|
5
5
|
import "../chunk-PY4AI2GZ.js";
|
|
6
|
+
import "../chunk-Z5E25LRN.js";
|
|
6
7
|
|
|
7
8
|
// src/cli/snapshot-warmup.ts
|
|
8
9
|
var DEFAULT_RUNTIME = "node22";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
POST
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DGKNXMK4.js";
|
|
4
|
+
import "../chunk-RFUE5VBK.js";
|
|
5
|
+
import "../chunk-OZFXD5IG.js";
|
|
6
6
|
import "../chunk-PY4AI2GZ.js";
|
|
7
|
+
import "../chunk-Z5E25LRN.js";
|
|
7
8
|
export {
|
|
8
9
|
POST
|
|
9
10
|
};
|