@sentry/junior 0.163.0 → 0.165.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-GSNL33UA.js} +9 -9
- package/dist/api/schema/workspace.d.ts +51 -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 +171 -27
- package/dist/app.js +36 -34
- package/dist/{catalog-runtime-NEPZNTOM.js → catalog-runtime-4ERDVI7V.js} +5 -5
- package/dist/chat/repository-instructions.d.ts +12 -1
- package/dist/chat/sandbox/sandbox.d.ts +1 -1
- package/dist/chat/sandbox/snapshot/resolve.d.ts +12 -0
- package/dist/chat/sandbox/snapshot/runtime.d.ts +2 -0
- package/dist/chat/workspaces/store.d.ts +27 -0
- package/dist/chat/workspaces/types.d.ts +0 -1
- package/dist/chat/workspaces/validation.d.ts +20 -0
- package/dist/{chunk-TPT6EF7K.js → chunk-32CCG4WP.js} +1 -1
- package/dist/{chunk-ICJ3KCA2.js → chunk-3V2EIQLT.js} +1 -1
- package/dist/{chunk-ZDKTZG3G.js → chunk-5T6WPPEI.js} +1 -1
- package/dist/{chunk-ZF6IC27P.js → chunk-5WDDWMQ7.js} +260 -8
- package/dist/{chunk-TPDNZCZU.js → chunk-65B3PDY7.js} +1 -1
- package/dist/{chunk-2FBPN2Y4.js → chunk-6OWVPXNO.js} +2 -1
- package/dist/{chunk-2HBJQEBE.js → chunk-6RZ6MMEK.js} +1 -1
- package/dist/{chunk-IIT23D3M.js → chunk-6YXCG2XL.js} +4 -4
- package/dist/{chunk-XY2IVIAY.js → chunk-7J26TW64.js} +5 -5
- package/dist/{chunk-RK7KPI6G.js → chunk-7S2JVUWS.js} +1 -1
- package/dist/{chunk-NL53P7PS.js → chunk-AEBF6AO2.js} +1 -1
- package/dist/{chunk-O5ZZL7IR.js → chunk-AQEBOQUC.js} +9 -9
- package/dist/{chunk-SA6BEEAB.js → chunk-BEC542E6.js} +111 -74
- package/dist/{chunk-THS4CKN4.js → chunk-BEHPIDVZ.js} +5 -4
- package/dist/{chunk-BLZUFHM7.js → chunk-DKO4RRGJ.js} +1 -1
- package/dist/{chunk-MXFL7LNZ.js → chunk-EA4UL5H2.js} +73 -14
- package/dist/{chunk-YAUQXZVT.js → chunk-FMOFCEAA.js} +2 -2
- package/dist/{chunk-SR6WRBJW.js → chunk-FNNQCHOL.js} +4 -4
- package/dist/{chunk-3OZNFCPR.js → chunk-FXX4NHOM.js} +6 -6
- package/dist/{chunk-GCLHNRMU.js → chunk-G72LBEMZ.js} +1 -1
- package/dist/{chunk-IX4XI42N.js → chunk-HPWZ4BJJ.js} +72 -120
- package/dist/{chunk-FEIHINKR.js → chunk-HZDLOFO4.js} +9 -5
- package/dist/{chunk-ATWHPSMF.js → chunk-IZHR2OES.js} +4 -13
- package/dist/{chunk-O4IK4O7C.js → chunk-N2BRRIQZ.js} +1 -1
- package/dist/{chunk-MWVQ35U6.js → chunk-NPW6LM2X.js} +12 -12
- package/dist/{chunk-JI5EPI3O.js → chunk-RQQTOF3H.js} +3 -3
- package/dist/{chunk-WPGYWDJR.js → chunk-SA5FVUWJ.js} +6 -6
- package/dist/{chunk-KD3ROG6P.js → chunk-T6BAHCT6.js} +17 -17
- package/dist/{chunk-4P2XNVTO.js → chunk-TCWPG5VL.js} +2 -2
- package/dist/{chunk-EKGJVUVS.js → chunk-VDNNVTX2.js} +5 -5
- package/dist/{chunk-RTPJRLOP.js → chunk-XOINKFDJ.js} +7 -7
- package/dist/{chunk-3T7RJVDJ.js → chunk-ZUKU2Y3J.js} +1 -1
- 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/schema/workspaces.d.ts +0 -17
- package/dist/db/schema.d.ts +0 -17
- package/dist/{db-6VBMHVW2.js → db-5TTEPMTY.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-IVFC5YHY.js} +22 -22
- package/dist/{runner-6ONEB6TQ.js → runner-G76TSHWO.js} +31 -33
- package/dist/{skills-Y5R36UH4.js → skills-F6PSLVSG.js} +6 -6
- package/dist/spawn-WMJPIAZL.js +37 -0
- package/dist/{validation-HLHEQDEK.js → validation-56EJI6UQ.js} +6 -6
- package/dist/version.js +1 -1
- package/dist/{work-VIEFYTFG.js → work-RNRQCP3Y.js} +17 -17
- package/dist/worker-FBR2WUI4.js +24 -0
- package/migrations/0030_drop_workspace_repo_primary.sql +2 -0
- package/migrations/meta/0030_snapshot.json +2799 -0
- package/migrations/meta/_journal.json +8 -1
- package/package.json +6 -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-RQQTOF3H.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-IZHR2OES.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-65B3PDY7.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-FMOFCEAA.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-32CCG4WP.js";
|
|
42
45
|
|
|
43
46
|
// src/chat/plugins/agent-hooks.ts
|
|
44
47
|
import {
|
|
@@ -1214,6 +1217,243 @@ 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
|
+
};
|
|
1282
|
+
});
|
|
1283
|
+
const identities = /* @__PURE__ */ new Set();
|
|
1284
|
+
for (const repo of repos) {
|
|
1285
|
+
const identity = `${repo.provider}:${repo.repo.toLowerCase()}`;
|
|
1286
|
+
if (identities.has(identity)) {
|
|
1287
|
+
throw new WorkspaceValidationError(
|
|
1288
|
+
`Duplicate repository in Workspace: ${repo.provider}:${repo.repo}`
|
|
1289
|
+
);
|
|
1290
|
+
}
|
|
1291
|
+
identities.add(identity);
|
|
1292
|
+
}
|
|
1293
|
+
const checkoutPaths = /* @__PURE__ */ new Set();
|
|
1294
|
+
for (const repo of repos) {
|
|
1295
|
+
const path = tryWorkspaceRepoCheckoutPath(repo.repo);
|
|
1296
|
+
const key = path.toLowerCase();
|
|
1297
|
+
if (checkoutPaths.has(key)) {
|
|
1298
|
+
throw new WorkspaceValidationError(
|
|
1299
|
+
`Workspace checkout path collision: ${path}`
|
|
1300
|
+
);
|
|
1301
|
+
}
|
|
1302
|
+
checkoutPaths.add(key);
|
|
1303
|
+
}
|
|
1304
|
+
return { name, setupScript, repos };
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
// src/chat/workspaces/store.ts
|
|
1308
|
+
function workspaceFromRows(row, repos) {
|
|
1309
|
+
return {
|
|
1310
|
+
id: row.id,
|
|
1311
|
+
name: row.name,
|
|
1312
|
+
setupScript: row.setupScript,
|
|
1313
|
+
repos: repos.map((repo) => ({
|
|
1314
|
+
provider: repo.provider,
|
|
1315
|
+
repo: repo.repo
|
|
1316
|
+
}))
|
|
1317
|
+
};
|
|
1318
|
+
}
|
|
1319
|
+
async function loadWorkspaceRepos(db, workspaceId) {
|
|
1320
|
+
return await db.select().from(juniorWorkspaceRepos).where(eq4(juniorWorkspaceRepos.workspaceId, workspaceId)).orderBy(
|
|
1321
|
+
asc2(juniorWorkspaceRepos.provider),
|
|
1322
|
+
asc2(juniorWorkspaceRepos.repo)
|
|
1323
|
+
);
|
|
1324
|
+
}
|
|
1325
|
+
async function replaceWorkspaceRepos(db, workspaceId, repos) {
|
|
1326
|
+
await db.delete(juniorWorkspaceRepos).where(eq4(juniorWorkspaceRepos.workspaceId, workspaceId));
|
|
1327
|
+
if (repos.length === 0) return;
|
|
1328
|
+
await db.insert(juniorWorkspaceRepos).values(
|
|
1329
|
+
repos.map((repo) => ({
|
|
1330
|
+
workspaceId,
|
|
1331
|
+
provider: repo.provider,
|
|
1332
|
+
repo: repo.repo
|
|
1333
|
+
}))
|
|
1334
|
+
);
|
|
1335
|
+
}
|
|
1336
|
+
function isUniqueViolation(error) {
|
|
1337
|
+
let current = error;
|
|
1338
|
+
for (let depth = 0; current && depth < 6; depth += 1) {
|
|
1339
|
+
if (typeof current === "object" && current !== null && "code" in current && current.code === "23505") {
|
|
1340
|
+
return true;
|
|
1341
|
+
}
|
|
1342
|
+
current = typeof current === "object" && current !== null && "cause" in current ? current.cause : void 0;
|
|
1343
|
+
}
|
|
1344
|
+
return false;
|
|
1345
|
+
}
|
|
1346
|
+
async function listWorkspaces(db) {
|
|
1347
|
+
const [workspaces, repos] = await Promise.all([
|
|
1348
|
+
db.select().from(juniorWorkspaces).orderBy(asc2(juniorWorkspaces.name)),
|
|
1349
|
+
db.select().from(juniorWorkspaceRepos).orderBy(
|
|
1350
|
+
asc2(juniorWorkspaceRepos.workspaceId),
|
|
1351
|
+
asc2(juniorWorkspaceRepos.provider),
|
|
1352
|
+
asc2(juniorWorkspaceRepos.repo)
|
|
1353
|
+
)
|
|
1354
|
+
]);
|
|
1355
|
+
return workspaces.map(
|
|
1356
|
+
(workspace) => workspaceFromRows(
|
|
1357
|
+
workspace,
|
|
1358
|
+
repos.filter((repo) => repo.workspaceId === workspace.id)
|
|
1359
|
+
)
|
|
1360
|
+
);
|
|
1361
|
+
}
|
|
1362
|
+
async function listWorkspaceNamesByRepository(db, input) {
|
|
1363
|
+
const provider = input.provider.trim().toLowerCase();
|
|
1364
|
+
const repo = input.repo.trim();
|
|
1365
|
+
const rows = await db.select({ name: juniorWorkspaces.name }).from(juniorWorkspaceRepos).innerJoin(
|
|
1366
|
+
juniorWorkspaces,
|
|
1367
|
+
eq4(juniorWorkspaces.id, juniorWorkspaceRepos.workspaceId)
|
|
1368
|
+
).where(
|
|
1369
|
+
and4(
|
|
1370
|
+
eq4(juniorWorkspaceRepos.provider, provider),
|
|
1371
|
+
// Recipes store the provided repo casing; identity is case-insensitive.
|
|
1372
|
+
sql2`lower(${juniorWorkspaceRepos.repo}) = lower(${repo})`
|
|
1373
|
+
)
|
|
1374
|
+
).orderBy(asc2(juniorWorkspaces.name));
|
|
1375
|
+
return rows.map((row) => row.name);
|
|
1376
|
+
}
|
|
1377
|
+
async function getWorkspaceByName(db, name) {
|
|
1378
|
+
const rows = await db.select().from(juniorWorkspaces).where(eq4(juniorWorkspaces.name, name)).limit(1);
|
|
1379
|
+
const workspace = rows[0];
|
|
1380
|
+
if (!workspace) return void 0;
|
|
1381
|
+
return workspaceFromRows(
|
|
1382
|
+
workspace,
|
|
1383
|
+
await loadWorkspaceRepos(db, workspace.id)
|
|
1384
|
+
);
|
|
1385
|
+
}
|
|
1386
|
+
async function getWorkspace(db, id) {
|
|
1387
|
+
const rows = await db.select().from(juniorWorkspaces).where(eq4(juniorWorkspaces.id, id)).limit(1);
|
|
1388
|
+
const workspace = rows[0];
|
|
1389
|
+
if (!workspace) return void 0;
|
|
1390
|
+
return workspaceFromRows(
|
|
1391
|
+
workspace,
|
|
1392
|
+
await loadWorkspaceRepos(db, workspace.id)
|
|
1393
|
+
);
|
|
1394
|
+
}
|
|
1395
|
+
async function createWorkspace(input) {
|
|
1396
|
+
const recipe = normalizeWorkspaceRecipe(input);
|
|
1397
|
+
const executor = getSqlExecutor();
|
|
1398
|
+
const now = /* @__PURE__ */ new Date();
|
|
1399
|
+
const id = randomUUID2();
|
|
1400
|
+
try {
|
|
1401
|
+
await executor.transaction(async () => {
|
|
1402
|
+
const db = executor.db();
|
|
1403
|
+
await db.insert(juniorWorkspaces).values({
|
|
1404
|
+
id,
|
|
1405
|
+
name: recipe.name,
|
|
1406
|
+
setupScript: recipe.setupScript,
|
|
1407
|
+
createdAt: now,
|
|
1408
|
+
updatedAt: now
|
|
1409
|
+
});
|
|
1410
|
+
await replaceWorkspaceRepos(db, id, recipe.repos);
|
|
1411
|
+
});
|
|
1412
|
+
} catch (error) {
|
|
1413
|
+
if (isUniqueViolation(error)) {
|
|
1414
|
+
throw new WorkspaceValidationError(
|
|
1415
|
+
`Workspace name already exists: ${recipe.name}`
|
|
1416
|
+
);
|
|
1417
|
+
}
|
|
1418
|
+
throw error;
|
|
1419
|
+
}
|
|
1420
|
+
return await getWorkspace(executor.db(), id);
|
|
1421
|
+
}
|
|
1422
|
+
async function updateWorkspace(id, input) {
|
|
1423
|
+
const recipe = normalizeWorkspaceRecipe(input);
|
|
1424
|
+
const executor = getSqlExecutor();
|
|
1425
|
+
const now = /* @__PURE__ */ new Date();
|
|
1426
|
+
try {
|
|
1427
|
+
const updated = await executor.transaction(async () => {
|
|
1428
|
+
const db = executor.db();
|
|
1429
|
+
const rows = await db.update(juniorWorkspaces).set({
|
|
1430
|
+
name: recipe.name,
|
|
1431
|
+
setupScript: recipe.setupScript,
|
|
1432
|
+
updatedAt: now
|
|
1433
|
+
}).where(eq4(juniorWorkspaces.id, id)).returning();
|
|
1434
|
+
if (!rows[0]) return void 0;
|
|
1435
|
+
await replaceWorkspaceRepos(db, id, recipe.repos);
|
|
1436
|
+
return rows[0];
|
|
1437
|
+
});
|
|
1438
|
+
if (!updated) return void 0;
|
|
1439
|
+
} catch (error) {
|
|
1440
|
+
if (isUniqueViolation(error)) {
|
|
1441
|
+
throw new WorkspaceValidationError(
|
|
1442
|
+
`Workspace name already exists: ${recipe.name}`
|
|
1443
|
+
);
|
|
1444
|
+
}
|
|
1445
|
+
throw error;
|
|
1446
|
+
}
|
|
1447
|
+
return await getWorkspace(executor.db(), id);
|
|
1448
|
+
}
|
|
1449
|
+
async function deleteWorkspace(id) {
|
|
1450
|
+
const executor = getSqlExecutor();
|
|
1451
|
+
return await executor.transaction(async () => {
|
|
1452
|
+
const rows = await executor.db().delete(juniorWorkspaces).where(eq4(juniorWorkspaces.id, id)).returning({ id: juniorWorkspaces.id });
|
|
1453
|
+
return rows.length > 0;
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1217
1457
|
// src/chat/plugins/agent-hooks.ts
|
|
1218
1458
|
var PluginHookDeniedError = class extends Error {
|
|
1219
1459
|
constructor(message) {
|
|
@@ -1640,7 +1880,12 @@ function getPluginTools(context, sandbox = createSandboxCapability(context.works
|
|
|
1640
1880
|
resourceEvents,
|
|
1641
1881
|
sandbox,
|
|
1642
1882
|
state: createPluginState(pluginName),
|
|
1643
|
-
users: { resolveActor }
|
|
1883
|
+
users: { resolveActor },
|
|
1884
|
+
workspaces: {
|
|
1885
|
+
async findByRepository(input) {
|
|
1886
|
+
return await listWorkspaceNamesByRepository(getDb(), input);
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1644
1889
|
};
|
|
1645
1890
|
let pluginContext;
|
|
1646
1891
|
switch (context.source.platform) {
|
|
@@ -2433,6 +2678,13 @@ export {
|
|
|
2433
2678
|
resolveChannelCapabilities,
|
|
2434
2679
|
tryWorkspaceRepoCheckoutPath,
|
|
2435
2680
|
workspaceRepoCheckoutPath,
|
|
2681
|
+
WorkspaceValidationError,
|
|
2682
|
+
listWorkspaces,
|
|
2683
|
+
getWorkspaceByName,
|
|
2684
|
+
getWorkspace,
|
|
2685
|
+
createWorkspace,
|
|
2686
|
+
updateWorkspace,
|
|
2687
|
+
deleteWorkspace,
|
|
2436
2688
|
PluginHookDeniedError,
|
|
2437
2689
|
validatePlugins,
|
|
2438
2690
|
setPlugins,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@sentry/junior",
|
|
4
|
-
version: "0.
|
|
4
|
+
version: "0.165.0",
|
|
5
5
|
private: false,
|
|
6
6
|
publishConfig: {
|
|
7
7
|
access: "public"
|
|
@@ -65,6 +65,7 @@ var package_default = {
|
|
|
65
65
|
typecheck: "tsc --noEmit",
|
|
66
66
|
"skills:check": "node --test scripts/check-skills.test.mjs && node scripts/check-skills.mjs",
|
|
67
67
|
"tool-annotations:check": "node --test scripts/check-tool-annotations.test.mjs && node scripts/check-tool-annotations.mjs",
|
|
68
|
+
"tool-error-classification:check": "node --test scripts/check-tool-error-classification.test.mjs && node scripts/check-tool-error-classification.mjs",
|
|
68
69
|
"test:coverage": "vitest run --maxWorkers=4 --coverage --reporter=default --reporter=junit --outputFile.junit=coverage/results.junit.xml"
|
|
69
70
|
},
|
|
70
71
|
dependencies: {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getConversationStore,
|
|
9
9
|
parseDestination,
|
|
10
10
|
sameDestination
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RQQTOF3H.js";
|
|
12
12
|
import {
|
|
13
13
|
getDefaultRedisStateAdapterFor,
|
|
14
14
|
getStateAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-65B3PDY7.js";
|
|
16
16
|
import {
|
|
17
17
|
getChatConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-FMOFCEAA.js";
|
|
19
19
|
import {
|
|
20
20
|
parseStoredSlackActor
|
|
21
21
|
} from "./chunk-V7YE4WCP.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isRecord,
|
|
24
24
|
toOptionalNumber,
|
|
25
25
|
toOptionalString
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-32CCG4WP.js";
|
|
27
27
|
|
|
28
28
|
// src/chat/task-execution/state.ts
|
|
29
29
|
import { randomUUID } from "crypto";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
formatProviderLabel,
|
|
6
6
|
startOAuthFlow
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FXX4NHOM.js";
|
|
8
8
|
import {
|
|
9
9
|
parseSandboxEgressAuthRequiredSignal
|
|
10
10
|
} from "./chunk-7MA4HV4W.js";
|
|
@@ -12,16 +12,16 @@ import {
|
|
|
12
12
|
abandonReplacedPendingAuth,
|
|
13
13
|
canReusePendingAuthLink,
|
|
14
14
|
recordAuthorizationRequested
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EA4UL5H2.js";
|
|
16
16
|
import {
|
|
17
17
|
AGENT_INVOCATION_MAILBOX_STATUSES
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-IZHR2OES.js";
|
|
19
19
|
import {
|
|
20
20
|
TURN_REASONING_LEVELS
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FMOFCEAA.js";
|
|
22
22
|
import {
|
|
23
23
|
pluginCatalogRuntime
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7S2JVUWS.js";
|
|
25
25
|
import {
|
|
26
26
|
credentialContextSchema
|
|
27
27
|
} from "./chunk-BDUENQD3.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
coerceThreadConversationState,
|
|
3
3
|
getPersistedThreadState,
|
|
4
4
|
persistThreadStateById
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VDNNVTX2.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-EA4UL5H2.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-5WDDWMQ7.js";
|
|
37
37
|
import {
|
|
38
38
|
getConversationStore,
|
|
39
39
|
getDb,
|
|
40
40
|
sameActorIdentity
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-RQQTOF3H.js";
|
|
42
42
|
import {
|
|
43
43
|
juniorConversations,
|
|
44
44
|
juniorTaskExecutions
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IZHR2OES.js";
|
|
46
46
|
import {
|
|
47
47
|
getStateAdapter
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-65B3PDY7.js";
|
|
49
49
|
import {
|
|
50
50
|
ProviderError,
|
|
51
51
|
findProviderError,
|
|
52
52
|
getProviderErrorAttributes,
|
|
53
53
|
getProviderErrorUserMessage
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-FMOFCEAA.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-32CCG4WP.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-5TTEPMTY.js")).getConversationStore();
|
|
91
91
|
const conversation = await conversationStore.get({
|
|
92
92
|
conversationId: args.conversationId
|
|
93
93
|
});
|