@sentry/junior 0.163.0 → 0.164.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-6IX5CV7G.js → agent-hooks-WTBPNRTC.js} +9 -9
- package/dist/api/schema/workspace.d.ts +47 -0
- package/dist/api/schema.d.ts +2 -0
- package/dist/api/schema.js +15 -3
- package/dist/api/workspaces/routes.d.ts +4 -0
- package/dist/api.js +139 -27
- package/dist/app.js +33 -31
- package/dist/{catalog-runtime-NEPZNTOM.js → catalog-runtime-CZ2SQINY.js} +5 -5
- package/dist/chat/workspaces/store.d.ts +29 -0
- package/dist/chat/workspaces/validation.d.ts +21 -0
- package/dist/{chunk-ZDKTZG3G.js → chunk-26JYGL2L.js} +1 -1
- package/dist/{chunk-EKGJVUVS.js → chunk-2K25MRZK.js} +5 -5
- package/dist/{chunk-KD3ROG6P.js → chunk-3L23VTY7.js} +17 -17
- package/dist/{chunk-GCLHNRMU.js → chunk-4GTOFUQF.js} +1 -1
- package/dist/{chunk-NL53P7PS.js → chunk-5FWQ73UZ.js} +1 -1
- package/dist/{chunk-2FBPN2Y4.js → chunk-5GLGQHO3.js} +1 -1
- package/dist/{chunk-XY2IVIAY.js → chunk-6BXV63YX.js} +5 -5
- package/dist/{chunk-FEIHINKR.js → chunk-6ENAACWN.js} +5 -5
- package/dist/{chunk-IX4XI42N.js → chunk-7WKWMMYQ.js} +21 -73
- package/dist/{chunk-TPDNZCZU.js → chunk-BXBZDV3C.js} +1 -1
- package/dist/{chunk-SR6WRBJW.js → chunk-CGCNFEAU.js} +4 -4
- package/dist/{chunk-MWVQ35U6.js → chunk-FKDY7NTC.js} +12 -12
- package/dist/{chunk-YAUQXZVT.js → chunk-FX4PX3SA.js} +2 -2
- package/dist/{chunk-RTPJRLOP.js → chunk-H36GJVJV.js} +7 -7
- package/dist/{chunk-MXFL7LNZ.js → chunk-HHW6ZVIZ.js} +4 -4
- package/dist/{chunk-3OZNFCPR.js → chunk-JW23XD4I.js} +6 -6
- package/dist/{chunk-JI5EPI3O.js → chunk-LPLVNMVN.js} +3 -3
- package/dist/{chunk-IIT23D3M.js → chunk-NAGI2XH3.js} +4 -4
- package/dist/{chunk-4P2XNVTO.js → chunk-NLTQRYNP.js} +2 -2
- package/dist/{chunk-SA6BEEAB.js → chunk-PU45BSBS.js} +108 -74
- package/dist/{chunk-3T7RJVDJ.js → chunk-RBV4JHCP.js} +1 -1
- package/dist/{chunk-THS4CKN4.js → chunk-RJHZNPDH.js} +4 -4
- package/dist/{chunk-RK7KPI6G.js → chunk-RULIISEI.js} +1 -1
- package/dist/{chunk-BLZUFHM7.js → chunk-RYYEHWIL.js} +1 -1
- package/dist/{chunk-TPT6EF7K.js → chunk-VHSEMJTS.js} +1 -1
- package/dist/{chunk-O4IK4O7C.js → chunk-VV2DN24T.js} +1 -1
- package/dist/{chunk-ICJ3KCA2.js → chunk-WJUKESU2.js} +1 -1
- package/dist/{chunk-2HBJQEBE.js → chunk-XAIRI54J.js} +1 -1
- package/dist/{chunk-WPGYWDJR.js → chunk-Y2B6AXZQ.js} +6 -6
- package/dist/{chunk-ZF6IC27P.js → chunk-YHCTPDXS.js} +274 -8
- package/dist/{chunk-ATWHPSMF.js → chunk-ZSNABC2E.js} +1 -1
- package/dist/{chunk-O5ZZL7IR.js → chunk-ZUTAGCPH.js} +9 -9
- package/dist/cli/chat.js +29 -29
- package/dist/cli/check.js +6 -6
- package/dist/cli/plugins.js +12 -12
- package/dist/cli/snapshot-create.js +9 -9
- package/dist/cli/upgrade.js +7 -7
- package/dist/{db-6VBMHVW2.js → db-32KRFS6L.js} +7 -7
- package/dist/instrumentation.js +4 -4
- package/dist/nitro.js +2 -2
- package/dist/{oauth-callback-server-5NCCUIM2.js → oauth-callback-server-CGZP2Z6U.js} +22 -22
- package/dist/{runner-6ONEB6TQ.js → runner-S5N4Q2XL.js} +31 -33
- package/dist/{skills-Y5R36UH4.js → skills-KYPSHSQR.js} +6 -6
- package/dist/spawn-EGOB3CLV.js +37 -0
- package/dist/{validation-HLHEQDEK.js → validation-SZBE7JNF.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-VIEFYTFG.js → work-GCZKHEZX.js} +17 -17
- package/dist/worker-6MY5Q4A2.js +24 -0
- package/package.json +5 -5
- package/dist/spawn-RFMBQ6B3.js +0 -37
- package/dist/worker-MRSKPKQZ.js +0 -24
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConversationEventStore,
|
|
3
|
-
getDb
|
|
4
|
-
|
|
3
|
+
getDb,
|
|
4
|
+
getSqlExecutor
|
|
5
|
+
} from "./chunk-LPLVNMVN.js";
|
|
5
6
|
import {
|
|
6
7
|
juniorConversationAnnotations,
|
|
7
8
|
juniorConversationEvents,
|
|
8
9
|
juniorIdentities,
|
|
9
|
-
juniorUsers
|
|
10
|
-
|
|
10
|
+
juniorUsers,
|
|
11
|
+
juniorWorkspaceRepos,
|
|
12
|
+
juniorWorkspaces
|
|
13
|
+
} from "./chunk-ZSNABC2E.js";
|
|
11
14
|
import {
|
|
12
15
|
SANDBOX_WORKSPACE_ROOT,
|
|
13
16
|
runNonInteractiveCommand,
|
|
@@ -15,14 +18,14 @@ import {
|
|
|
15
18
|
} from "./chunk-BVREIWBD.js";
|
|
16
19
|
import {
|
|
17
20
|
getStateAdapter
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BXBZDV3C.js";
|
|
19
22
|
import {
|
|
20
23
|
botConfig,
|
|
21
24
|
completeObject,
|
|
22
25
|
embedTexts,
|
|
23
26
|
getSlackBotToken,
|
|
24
27
|
standardModelId
|
|
25
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-FX4PX3SA.js";
|
|
26
29
|
import {
|
|
27
30
|
isActorUserId,
|
|
28
31
|
parseActorUserId,
|
|
@@ -38,7 +41,7 @@ import {
|
|
|
38
41
|
setSpanAttributes,
|
|
39
42
|
setSpanStatus,
|
|
40
43
|
withSpan
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-VHSEMJTS.js";
|
|
42
45
|
|
|
43
46
|
// src/chat/plugins/agent-hooks.ts
|
|
44
47
|
import {
|
|
@@ -1214,6 +1217,257 @@ function workspaceRepoCheckoutPath(repo) {
|
|
|
1214
1217
|
return path;
|
|
1215
1218
|
}
|
|
1216
1219
|
|
|
1220
|
+
// src/chat/workspaces/store.ts
|
|
1221
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
1222
|
+
import { and as and4, asc as asc2, eq as eq4, sql as sql2 } from "drizzle-orm";
|
|
1223
|
+
|
|
1224
|
+
// src/chat/workspaces/validation.ts
|
|
1225
|
+
var WORKSPACE_NAME_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;
|
|
1226
|
+
var PROVIDER_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;
|
|
1227
|
+
var REPO_PATTERN = /^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/;
|
|
1228
|
+
var MAX_SETUP_SCRIPT_BYTES = 64 * 1024;
|
|
1229
|
+
var MAX_REPOS = 32;
|
|
1230
|
+
var WorkspaceValidationError = class extends Error {
|
|
1231
|
+
constructor(message) {
|
|
1232
|
+
super(message);
|
|
1233
|
+
this.name = "WorkspaceValidationError";
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
function normalizeWorkspaceRecipe(input) {
|
|
1237
|
+
const name = input.name.trim().toLowerCase();
|
|
1238
|
+
if (!WORKSPACE_NAME_PATTERN.test(name)) {
|
|
1239
|
+
throw new WorkspaceValidationError(
|
|
1240
|
+
"Workspace name must start with a letter and use only lowercase letters, digits, underscores, or hyphens."
|
|
1241
|
+
);
|
|
1242
|
+
}
|
|
1243
|
+
const setupScript = input.setupScript ?? "";
|
|
1244
|
+
if (typeof setupScript !== "string") {
|
|
1245
|
+
throw new WorkspaceValidationError("Setup script must be a string.");
|
|
1246
|
+
}
|
|
1247
|
+
if (Buffer.byteLength(setupScript, "utf8") > MAX_SETUP_SCRIPT_BYTES) {
|
|
1248
|
+
throw new WorkspaceValidationError(
|
|
1249
|
+
`Setup script must be at most ${MAX_SETUP_SCRIPT_BYTES} bytes.`
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
if (!Array.isArray(input.repos)) {
|
|
1253
|
+
throw new WorkspaceValidationError("Repositories must be an array.");
|
|
1254
|
+
}
|
|
1255
|
+
if (input.repos.length > MAX_REPOS) {
|
|
1256
|
+
throw new WorkspaceValidationError(
|
|
1257
|
+
`A Workspace can include at most ${MAX_REPOS} repositories.`
|
|
1258
|
+
);
|
|
1259
|
+
}
|
|
1260
|
+
const repos = input.repos.map((entry, index) => {
|
|
1261
|
+
const provider = entry.provider.trim().toLowerCase();
|
|
1262
|
+
if (!PROVIDER_PATTERN.test(provider)) {
|
|
1263
|
+
throw new WorkspaceValidationError(
|
|
1264
|
+
`Repository ${index + 1} provider is invalid.`
|
|
1265
|
+
);
|
|
1266
|
+
}
|
|
1267
|
+
const repo = entry.repo.trim();
|
|
1268
|
+
if (!REPO_PATTERN.test(repo)) {
|
|
1269
|
+
throw new WorkspaceValidationError(
|
|
1270
|
+
`Repository ${index + 1} must use owner/name format.`
|
|
1271
|
+
);
|
|
1272
|
+
}
|
|
1273
|
+
if (!tryWorkspaceRepoCheckoutPath(repo)) {
|
|
1274
|
+
throw new WorkspaceValidationError(
|
|
1275
|
+
`Repository ${index + 1} name cannot be used as a checkout path.`
|
|
1276
|
+
);
|
|
1277
|
+
}
|
|
1278
|
+
return {
|
|
1279
|
+
provider,
|
|
1280
|
+
repo,
|
|
1281
|
+
isPrimary: entry.isPrimary === true
|
|
1282
|
+
};
|
|
1283
|
+
});
|
|
1284
|
+
const identities = /* @__PURE__ */ new Set();
|
|
1285
|
+
for (const repo of repos) {
|
|
1286
|
+
const identity = `${repo.provider}:${repo.repo.toLowerCase()}`;
|
|
1287
|
+
if (identities.has(identity)) {
|
|
1288
|
+
throw new WorkspaceValidationError(
|
|
1289
|
+
`Duplicate repository in Workspace: ${repo.provider}:${repo.repo}`
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
identities.add(identity);
|
|
1293
|
+
}
|
|
1294
|
+
const checkoutPaths = /* @__PURE__ */ new Set();
|
|
1295
|
+
for (const repo of repos) {
|
|
1296
|
+
const path = tryWorkspaceRepoCheckoutPath(repo.repo);
|
|
1297
|
+
const key = path.toLowerCase();
|
|
1298
|
+
if (checkoutPaths.has(key)) {
|
|
1299
|
+
throw new WorkspaceValidationError(
|
|
1300
|
+
`Workspace checkout path collision: ${path}`
|
|
1301
|
+
);
|
|
1302
|
+
}
|
|
1303
|
+
checkoutPaths.add(key);
|
|
1304
|
+
}
|
|
1305
|
+
const primaryCount = repos.filter((repo) => repo.isPrimary).length;
|
|
1306
|
+
if (repos.length > 0 && primaryCount === 0) {
|
|
1307
|
+
throw new WorkspaceValidationError(
|
|
1308
|
+
"Select one primary repository for AGENTS.md instructions."
|
|
1309
|
+
);
|
|
1310
|
+
}
|
|
1311
|
+
if (primaryCount > 1) {
|
|
1312
|
+
throw new WorkspaceValidationError(
|
|
1313
|
+
"A Workspace can have only one primary repository."
|
|
1314
|
+
);
|
|
1315
|
+
}
|
|
1316
|
+
return { name, setupScript, repos };
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
// src/chat/workspaces/store.ts
|
|
1320
|
+
function workspaceFromRows(row, repos) {
|
|
1321
|
+
return {
|
|
1322
|
+
id: row.id,
|
|
1323
|
+
name: row.name,
|
|
1324
|
+
setupScript: row.setupScript,
|
|
1325
|
+
repos: repos.map((repo) => ({
|
|
1326
|
+
provider: repo.provider,
|
|
1327
|
+
repo: repo.repo,
|
|
1328
|
+
isPrimary: repo.isPrimary
|
|
1329
|
+
}))
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
async function loadWorkspaceRepos(db, workspaceId) {
|
|
1333
|
+
return await db.select().from(juniorWorkspaceRepos).where(eq4(juniorWorkspaceRepos.workspaceId, workspaceId)).orderBy(
|
|
1334
|
+
asc2(juniorWorkspaceRepos.provider),
|
|
1335
|
+
asc2(juniorWorkspaceRepos.repo)
|
|
1336
|
+
);
|
|
1337
|
+
}
|
|
1338
|
+
async function replaceWorkspaceRepos(db, workspaceId, repos) {
|
|
1339
|
+
await db.delete(juniorWorkspaceRepos).where(eq4(juniorWorkspaceRepos.workspaceId, workspaceId));
|
|
1340
|
+
if (repos.length === 0) return;
|
|
1341
|
+
await db.insert(juniorWorkspaceRepos).values(
|
|
1342
|
+
repos.map((repo) => ({
|
|
1343
|
+
workspaceId,
|
|
1344
|
+
provider: repo.provider,
|
|
1345
|
+
repo: repo.repo,
|
|
1346
|
+
isPrimary: repo.isPrimary
|
|
1347
|
+
}))
|
|
1348
|
+
);
|
|
1349
|
+
}
|
|
1350
|
+
function isUniqueViolation(error) {
|
|
1351
|
+
let current = error;
|
|
1352
|
+
for (let depth = 0; current && depth < 6; depth += 1) {
|
|
1353
|
+
if (typeof current === "object" && current !== null && "code" in current && current.code === "23505") {
|
|
1354
|
+
return true;
|
|
1355
|
+
}
|
|
1356
|
+
current = typeof current === "object" && current !== null && "cause" in current ? current.cause : void 0;
|
|
1357
|
+
}
|
|
1358
|
+
return false;
|
|
1359
|
+
}
|
|
1360
|
+
async function listWorkspaces(db) {
|
|
1361
|
+
const [workspaces, repos] = await Promise.all([
|
|
1362
|
+
db.select().from(juniorWorkspaces).orderBy(asc2(juniorWorkspaces.name)),
|
|
1363
|
+
db.select().from(juniorWorkspaceRepos).orderBy(
|
|
1364
|
+
asc2(juniorWorkspaceRepos.workspaceId),
|
|
1365
|
+
asc2(juniorWorkspaceRepos.provider),
|
|
1366
|
+
asc2(juniorWorkspaceRepos.repo)
|
|
1367
|
+
)
|
|
1368
|
+
]);
|
|
1369
|
+
return workspaces.map(
|
|
1370
|
+
(workspace) => workspaceFromRows(
|
|
1371
|
+
workspace,
|
|
1372
|
+
repos.filter((repo) => repo.workspaceId === workspace.id)
|
|
1373
|
+
)
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
async function listWorkspaceNamesByRepository(db, input) {
|
|
1377
|
+
const provider = input.provider.trim().toLowerCase();
|
|
1378
|
+
const repo = input.repo.trim();
|
|
1379
|
+
const rows = await db.select({ name: juniorWorkspaces.name }).from(juniorWorkspaceRepos).innerJoin(
|
|
1380
|
+
juniorWorkspaces,
|
|
1381
|
+
eq4(juniorWorkspaces.id, juniorWorkspaceRepos.workspaceId)
|
|
1382
|
+
).where(
|
|
1383
|
+
and4(
|
|
1384
|
+
eq4(juniorWorkspaceRepos.provider, provider),
|
|
1385
|
+
// Recipes store the provided repo casing; identity is case-insensitive.
|
|
1386
|
+
sql2`lower(${juniorWorkspaceRepos.repo}) = lower(${repo})`
|
|
1387
|
+
)
|
|
1388
|
+
).orderBy(asc2(juniorWorkspaces.name));
|
|
1389
|
+
return rows.map((row) => row.name);
|
|
1390
|
+
}
|
|
1391
|
+
async function getWorkspaceByName(db, name) {
|
|
1392
|
+
const rows = await db.select().from(juniorWorkspaces).where(eq4(juniorWorkspaces.name, name)).limit(1);
|
|
1393
|
+
const workspace = rows[0];
|
|
1394
|
+
if (!workspace) return void 0;
|
|
1395
|
+
return workspaceFromRows(
|
|
1396
|
+
workspace,
|
|
1397
|
+
await loadWorkspaceRepos(db, workspace.id)
|
|
1398
|
+
);
|
|
1399
|
+
}
|
|
1400
|
+
async function getWorkspace(db, id) {
|
|
1401
|
+
const rows = await db.select().from(juniorWorkspaces).where(eq4(juniorWorkspaces.id, id)).limit(1);
|
|
1402
|
+
const workspace = rows[0];
|
|
1403
|
+
if (!workspace) return void 0;
|
|
1404
|
+
return workspaceFromRows(
|
|
1405
|
+
workspace,
|
|
1406
|
+
await loadWorkspaceRepos(db, workspace.id)
|
|
1407
|
+
);
|
|
1408
|
+
}
|
|
1409
|
+
async function createWorkspace(input) {
|
|
1410
|
+
const recipe = normalizeWorkspaceRecipe(input);
|
|
1411
|
+
const executor = getSqlExecutor();
|
|
1412
|
+
const now = /* @__PURE__ */ new Date();
|
|
1413
|
+
const id = randomUUID2();
|
|
1414
|
+
try {
|
|
1415
|
+
await executor.transaction(async () => {
|
|
1416
|
+
const db = executor.db();
|
|
1417
|
+
await db.insert(juniorWorkspaces).values({
|
|
1418
|
+
id,
|
|
1419
|
+
name: recipe.name,
|
|
1420
|
+
setupScript: recipe.setupScript,
|
|
1421
|
+
createdAt: now,
|
|
1422
|
+
updatedAt: now
|
|
1423
|
+
});
|
|
1424
|
+
await replaceWorkspaceRepos(db, id, recipe.repos);
|
|
1425
|
+
});
|
|
1426
|
+
} catch (error) {
|
|
1427
|
+
if (isUniqueViolation(error)) {
|
|
1428
|
+
throw new WorkspaceValidationError(
|
|
1429
|
+
`Workspace name already exists: ${recipe.name}`
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
throw error;
|
|
1433
|
+
}
|
|
1434
|
+
return await getWorkspace(executor.db(), id);
|
|
1435
|
+
}
|
|
1436
|
+
async function updateWorkspace(id, input) {
|
|
1437
|
+
const recipe = normalizeWorkspaceRecipe(input);
|
|
1438
|
+
const executor = getSqlExecutor();
|
|
1439
|
+
const now = /* @__PURE__ */ new Date();
|
|
1440
|
+
try {
|
|
1441
|
+
const updated = await executor.transaction(async () => {
|
|
1442
|
+
const db = executor.db();
|
|
1443
|
+
const rows = await db.update(juniorWorkspaces).set({
|
|
1444
|
+
name: recipe.name,
|
|
1445
|
+
setupScript: recipe.setupScript,
|
|
1446
|
+
updatedAt: now
|
|
1447
|
+
}).where(eq4(juniorWorkspaces.id, id)).returning();
|
|
1448
|
+
if (!rows[0]) return void 0;
|
|
1449
|
+
await replaceWorkspaceRepos(db, id, recipe.repos);
|
|
1450
|
+
return rows[0];
|
|
1451
|
+
});
|
|
1452
|
+
if (!updated) return void 0;
|
|
1453
|
+
} catch (error) {
|
|
1454
|
+
if (isUniqueViolation(error)) {
|
|
1455
|
+
throw new WorkspaceValidationError(
|
|
1456
|
+
`Workspace name already exists: ${recipe.name}`
|
|
1457
|
+
);
|
|
1458
|
+
}
|
|
1459
|
+
throw error;
|
|
1460
|
+
}
|
|
1461
|
+
return await getWorkspace(executor.db(), id);
|
|
1462
|
+
}
|
|
1463
|
+
async function deleteWorkspace(id) {
|
|
1464
|
+
const executor = getSqlExecutor();
|
|
1465
|
+
return await executor.transaction(async () => {
|
|
1466
|
+
const rows = await executor.db().delete(juniorWorkspaces).where(eq4(juniorWorkspaces.id, id)).returning({ id: juniorWorkspaces.id });
|
|
1467
|
+
return rows.length > 0;
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1217
1471
|
// src/chat/plugins/agent-hooks.ts
|
|
1218
1472
|
var PluginHookDeniedError = class extends Error {
|
|
1219
1473
|
constructor(message) {
|
|
@@ -1640,7 +1894,12 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
1640
1894
|
resourceEvents,
|
|
1641
1895
|
sandbox,
|
|
1642
1896
|
state: createPluginState(pluginName),
|
|
1643
|
-
users: { resolveActor }
|
|
1897
|
+
users: { resolveActor },
|
|
1898
|
+
workspaces: {
|
|
1899
|
+
async findByRepository(input) {
|
|
1900
|
+
return await listWorkspaceNamesByRepository(getDb(), input);
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1644
1903
|
};
|
|
1645
1904
|
let pluginContext;
|
|
1646
1905
|
switch (context.source.platform) {
|
|
@@ -2433,6 +2692,13 @@ export {
|
|
|
2433
2692
|
resolveChannelCapabilities,
|
|
2434
2693
|
tryWorkspaceRepoCheckoutPath,
|
|
2435
2694
|
workspaceRepoCheckoutPath,
|
|
2695
|
+
WorkspaceValidationError,
|
|
2696
|
+
listWorkspaces,
|
|
2697
|
+
getWorkspaceByName,
|
|
2698
|
+
getWorkspace,
|
|
2699
|
+
createWorkspace,
|
|
2700
|
+
updateWorkspace,
|
|
2701
|
+
deleteWorkspace,
|
|
2436
2702
|
PluginHookDeniedError,
|
|
2437
2703
|
validatePlugins,
|
|
2438
2704
|
setPlugins,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2K25MRZK.js";
|
|
6
6
|
import {
|
|
7
7
|
pluginTaskId,
|
|
8
8
|
pluginTaskParamsSchema,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
markTurnCompleted,
|
|
23
23
|
normalizeToolNameFromResult,
|
|
24
24
|
stripRuntimeTurnContext
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-HHW6ZVIZ.js";
|
|
26
26
|
import {
|
|
27
27
|
JUNIOR_THREAD_STATE_TTL_MS
|
|
28
28
|
} from "./chunk-3Y47VMHV.js";
|
|
@@ -33,25 +33,25 @@ import {
|
|
|
33
33
|
createPluginModel,
|
|
34
34
|
createPluginState,
|
|
35
35
|
getPlugins
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-YHCTPDXS.js";
|
|
37
37
|
import {
|
|
38
38
|
getConversationStore,
|
|
39
39
|
getDb,
|
|
40
40
|
sameActorIdentity
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LPLVNMVN.js";
|
|
42
42
|
import {
|
|
43
43
|
juniorConversations,
|
|
44
44
|
juniorTaskExecutions
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-ZSNABC2E.js";
|
|
46
46
|
import {
|
|
47
47
|
getStateAdapter
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-BXBZDV3C.js";
|
|
49
49
|
import {
|
|
50
50
|
ProviderError,
|
|
51
51
|
findProviderError,
|
|
52
52
|
getProviderErrorAttributes,
|
|
53
53
|
getProviderErrorUserMessage
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-FX4PX3SA.js";
|
|
55
55
|
import {
|
|
56
56
|
credentialSubjectSchema
|
|
57
57
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
import {
|
|
62
62
|
buildTurnFailureResponse,
|
|
63
63
|
logWarn
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-VHSEMJTS.js";
|
|
65
65
|
|
|
66
66
|
// src/chat/runtime/delivered-turn-state.ts
|
|
67
67
|
function buildDeliveredTurnStatePatch(args) {
|
|
@@ -87,7 +87,7 @@ import { pluginRunContextSchema } from "@sentry/junior-plugin-api";
|
|
|
87
87
|
|
|
88
88
|
// src/chat/services/turn-session-routing.ts
|
|
89
89
|
async function resolveTurnSessionRouting(args) {
|
|
90
|
-
const conversationStore = args.conversationStore ?? (await import("./db-
|
|
90
|
+
const conversationStore = args.conversationStore ?? (await import("./db-32KRFS6L.js")).getConversationStore();
|
|
91
91
|
const conversation = await conversationStore.get({
|
|
92
92
|
conversationId: args.conversationId
|
|
93
93
|
});
|
package/dist/cli/chat.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAgentRun
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-7WKWMMYQ.js";
|
|
4
|
+
import "../chunk-6BXV63YX.js";
|
|
5
5
|
import "../chunk-DIB4GX3G.js";
|
|
6
6
|
import {
|
|
7
7
|
createAgentRunner
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-H36GJVJV.js";
|
|
9
9
|
import "../chunk-RF6J3DIO.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-JW23XD4I.js";
|
|
11
11
|
import "../chunk-7MA4HV4W.js";
|
|
12
12
|
import "../chunk-VRS6WDK5.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-RJHZNPDH.js";
|
|
14
|
+
import "../chunk-6ENAACWN.js";
|
|
15
|
+
import "../chunk-WJUKESU2.js";
|
|
16
|
+
import "../chunk-HHW6ZVIZ.js";
|
|
17
17
|
import "../chunk-3Y47VMHV.js";
|
|
18
18
|
import "../chunk-PDO5BLNM.js";
|
|
19
19
|
import "../chunk-UIE3R5XU.js";
|
|
20
20
|
import {
|
|
21
21
|
loadAppPluginSet
|
|
22
22
|
} from "../chunk-Y2CM7HXH.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-YHCTPDXS.js";
|
|
24
|
+
import "../chunk-LPLVNMVN.js";
|
|
25
|
+
import "../chunk-ZSNABC2E.js";
|
|
26
26
|
import "../chunk-BVREIWBD.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-BXBZDV3C.js";
|
|
28
|
+
import "../chunk-FX4PX3SA.js";
|
|
29
29
|
import "../chunk-VFUK3X5B.js";
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-RBV4JHCP.js";
|
|
31
|
+
import "../chunk-NLTQRYNP.js";
|
|
32
|
+
import "../chunk-RULIISEI.js";
|
|
33
|
+
import "../chunk-VV2DN24T.js";
|
|
34
34
|
import "../chunk-BDUENQD3.js";
|
|
35
35
|
import "../chunk-V7YE4WCP.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-VHSEMJTS.js";
|
|
37
37
|
import "../chunk-6GWA276C.js";
|
|
38
38
|
import "../chunk-OOUNJNMR.js";
|
|
39
39
|
import "../chunk-H4HBKISO.js";
|
|
40
|
-
import "../chunk-
|
|
41
|
-
import "../chunk-
|
|
40
|
+
import "../chunk-26JYGL2L.js";
|
|
41
|
+
import "../chunk-5GLGQHO3.js";
|
|
42
42
|
import "../chunk-MLKGABMK.js";
|
|
43
43
|
|
|
44
44
|
// src/cli/chat.ts
|
|
@@ -161,10 +161,10 @@ async function configureLocalChatPlugins(pluginSet) {
|
|
|
161
161
|
databaseModule
|
|
162
162
|
] = await Promise.all([
|
|
163
163
|
import("../plugins-HW4VWW6G.js"),
|
|
164
|
-
import("../agent-hooks-
|
|
165
|
-
import("../catalog-runtime-
|
|
166
|
-
import("../validation-
|
|
167
|
-
import("../db-
|
|
164
|
+
import("../agent-hooks-WTBPNRTC.js"),
|
|
165
|
+
import("../catalog-runtime-CZ2SQINY.js"),
|
|
166
|
+
import("../validation-SZBE7JNF.js"),
|
|
167
|
+
import("../db-32KRFS6L.js")
|
|
168
168
|
]);
|
|
169
169
|
const resolvedPluginSet = pluginSet === void 0 ? await loadLocalPluginSet() : pluginSet ?? void 0;
|
|
170
170
|
const plugins = pluginsModule.pluginRuntimeRegistrationsFromPluginSet(resolvedPluginSet);
|
|
@@ -230,14 +230,14 @@ async function prepareLocalChatRun(io, pluginSet) {
|
|
|
230
230
|
await configureLocalChatPlugins(pluginSet);
|
|
231
231
|
const { setExperimentalFeatures } = await import("../experimental-XVDOSRBS.js");
|
|
232
232
|
setExperimentalFeatures({ subagents: true });
|
|
233
|
-
const { runLocalAgentTurn } = await import("../runner-
|
|
234
|
-
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-
|
|
233
|
+
const { runLocalAgentTurn } = await import("../runner-S5N4Q2XL.js");
|
|
234
|
+
const { startLocalOAuthCallbackServer } = await import("../oauth-callback-server-CGZP2Z6U.js");
|
|
235
235
|
const { createLocalOAuthState } = await import("../oauth-relay-3ZU72UGL.js");
|
|
236
236
|
const { createLocalSandboxEgressSignalTransport } = await import("../sandbox-egress-signals-U3ZX7C5W.js");
|
|
237
|
-
const { bindSpawnAgent } = await import("../spawn-
|
|
238
|
-
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-
|
|
237
|
+
const { bindSpawnAgent } = await import("../spawn-EGOB3CLV.js");
|
|
238
|
+
const { createAgentInvocationWorker, routeAgentInvocationWork } = await import("../work-GCZKHEZX.js");
|
|
239
239
|
const { createLocalConversationWork } = await import("../conversation-work-KATFHLG3.js");
|
|
240
|
-
const { processConversationWork } = await import("../worker-
|
|
240
|
+
const { processConversationWork } = await import("../worker-6MY5Q4A2.js");
|
|
241
241
|
let agentRunner;
|
|
242
242
|
const localConversationWork = createLocalConversationWork(async (message) => {
|
|
243
243
|
if (!agentRunner) {
|
package/dist/cli/check.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseSkillFile
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-NLTQRYNP.js";
|
|
4
|
+
import "../chunk-RULIISEI.js";
|
|
5
5
|
import {
|
|
6
6
|
parseInlinePluginManifest,
|
|
7
7
|
parsePluginManifest
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-VV2DN24T.js";
|
|
9
9
|
import "../chunk-BDUENQD3.js";
|
|
10
10
|
import "../chunk-V7YE4WCP.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-VHSEMJTS.js";
|
|
12
12
|
import "../chunk-6GWA276C.js";
|
|
13
13
|
import "../chunk-OOUNJNMR.js";
|
|
14
14
|
import "../chunk-H4HBKISO.js";
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
JUNIOR_CONVERSATION_WORK_CALLBACK_ROUTE,
|
|
17
17
|
JUNIOR_HEARTBEAT_ROUTE,
|
|
18
18
|
LEGACY_JUNIOR_CONVERSATION_WORK_FUNCTION
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-26JYGL2L.js";
|
|
20
|
+
import "../chunk-5GLGQHO3.js";
|
|
21
21
|
import "../chunk-MLKGABMK.js";
|
|
22
22
|
|
|
23
23
|
// src/cli/check.ts
|
package/dist/cli/plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
validatePluginEgressCredentialHooks,
|
|
3
3
|
validatePluginRegistrations
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4GTOFUQF.js";
|
|
5
5
|
import {
|
|
6
6
|
pluginCatalogConfigFromPluginSet,
|
|
7
7
|
pluginCliRegistrationsFromPluginSet,
|
|
@@ -14,28 +14,28 @@ import {
|
|
|
14
14
|
createPluginLogger,
|
|
15
15
|
setPlugins,
|
|
16
16
|
validatePlugins
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-YHCTPDXS.js";
|
|
18
18
|
import {
|
|
19
19
|
getDb
|
|
20
|
-
} from "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-LPLVNMVN.js";
|
|
21
|
+
import "../chunk-ZSNABC2E.js";
|
|
22
22
|
import "../chunk-BVREIWBD.js";
|
|
23
|
-
import "../chunk-
|
|
24
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-BXBZDV3C.js";
|
|
24
|
+
import "../chunk-FX4PX3SA.js";
|
|
25
25
|
import "../chunk-VFUK3X5B.js";
|
|
26
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-RBV4JHCP.js";
|
|
27
27
|
import {
|
|
28
28
|
pluginCatalogRuntime
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
29
|
+
} from "../chunk-RULIISEI.js";
|
|
30
|
+
import "../chunk-VV2DN24T.js";
|
|
31
31
|
import "../chunk-BDUENQD3.js";
|
|
32
32
|
import "../chunk-V7YE4WCP.js";
|
|
33
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-VHSEMJTS.js";
|
|
34
34
|
import "../chunk-6GWA276C.js";
|
|
35
35
|
import "../chunk-OOUNJNMR.js";
|
|
36
36
|
import "../chunk-H4HBKISO.js";
|
|
37
|
-
import "../chunk-
|
|
38
|
-
import "../chunk-
|
|
37
|
+
import "../chunk-26JYGL2L.js";
|
|
38
|
+
import "../chunk-5GLGQHO3.js";
|
|
39
39
|
import "../chunk-MLKGABMK.js";
|
|
40
40
|
|
|
41
41
|
// src/cli/plugins.ts
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
create,
|
|
3
3
|
resolve
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-RJHZNPDH.js";
|
|
5
5
|
import "../chunk-BVREIWBD.js";
|
|
6
6
|
import {
|
|
7
7
|
disconnectStateAdapter
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-BXBZDV3C.js";
|
|
9
|
+
import "../chunk-FX4PX3SA.js";
|
|
10
|
+
import "../chunk-RBV4JHCP.js";
|
|
11
11
|
import {
|
|
12
12
|
pluginCatalogRuntime
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
} from "../chunk-RULIISEI.js";
|
|
14
|
+
import "../chunk-VV2DN24T.js";
|
|
15
15
|
import "../chunk-BDUENQD3.js";
|
|
16
16
|
import "../chunk-V7YE4WCP.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-VHSEMJTS.js";
|
|
18
18
|
import "../chunk-6GWA276C.js";
|
|
19
19
|
import "../chunk-OOUNJNMR.js";
|
|
20
20
|
import "../chunk-H4HBKISO.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-26JYGL2L.js";
|
|
22
|
+
import "../chunk-5GLGQHO3.js";
|
|
23
23
|
import "../chunk-MLKGABMK.js";
|
|
24
24
|
|
|
25
25
|
// src/cli/snapshot-create.ts
|
package/dist/cli/upgrade.js
CHANGED
|
@@ -8,23 +8,23 @@ import {
|
|
|
8
8
|
} from "../chunk-Y2CM7HXH.js";
|
|
9
9
|
import {
|
|
10
10
|
createJuniorSqlExecutor
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-ZSNABC2E.js";
|
|
12
12
|
import {
|
|
13
13
|
getChatConfig
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-FX4PX3SA.js";
|
|
15
15
|
import "../chunk-VFUK3X5B.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-RBV4JHCP.js";
|
|
17
17
|
import {
|
|
18
18
|
createPluginCatalogRuntime
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-VV2DN24T.js";
|
|
20
20
|
import "../chunk-BDUENQD3.js";
|
|
21
21
|
import "../chunk-V7YE4WCP.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-VHSEMJTS.js";
|
|
23
23
|
import "../chunk-6GWA276C.js";
|
|
24
24
|
import "../chunk-OOUNJNMR.js";
|
|
25
25
|
import "../chunk-H4HBKISO.js";
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-
|
|
26
|
+
import "../chunk-26JYGL2L.js";
|
|
27
|
+
import "../chunk-5GLGQHO3.js";
|
|
28
28
|
import "../chunk-MLKGABMK.js";
|
|
29
29
|
|
|
30
30
|
// src/chat/conversations/sql/migrations.ts
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
getConversationStore,
|
|
6
6
|
getDb,
|
|
7
7
|
getSqlExecutor
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-LPLVNMVN.js";
|
|
9
|
+
import "./chunk-ZSNABC2E.js";
|
|
10
|
+
import "./chunk-FX4PX3SA.js";
|
|
11
11
|
import "./chunk-VFUK3X5B.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-RBV4JHCP.js";
|
|
13
13
|
import "./chunk-V7YE4WCP.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-VHSEMJTS.js";
|
|
15
15
|
import "./chunk-6GWA276C.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-26JYGL2L.js";
|
|
17
|
+
import "./chunk-5GLGQHO3.js";
|
|
18
18
|
import "./chunk-MLKGABMK.js";
|
|
19
19
|
export {
|
|
20
20
|
closeDb,
|