@tonyclaw/agent-inspector 2.1.19 → 2.1.20
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/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-CHXN5HYU.js → CompareDrawer-BRCSDHn3.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-TZJV7HhE.js → ProxyViewerContainer-v5Lmx35X.js} +28 -28
- package/.output/public/assets/{ReplayDialog-DQ7nS5Rr.js → ReplayDialog-Dkez3vxu.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-DXWweH_2.js → RequestAnatomy-CHBODGDF.js} +1 -1
- package/.output/public/assets/{ResponseView-3PimPfiD.js → ResponseView-Dk2dJY-B.js} +2 -2
- package/.output/public/assets/{StreamingChunkSequence-4v52v-7a.js → StreamingChunkSequence-gZpqWwKK.js} +1 -1
- package/.output/public/assets/_sessionId-DziA4ZD4.js +1 -0
- package/.output/public/assets/{index-BuhFRImh.js → index-B1-V3HCD.js} +1 -1
- package/.output/public/assets/index-DkHcxpXi.js +1 -0
- package/.output/public/assets/{json-viewer-d2gWBDLO.js → json-viewer-CtvzeDPb.js} +1 -1
- package/.output/public/assets/{main-Do-E-46G.js → main-CgmDEMGA.js} +2 -2
- package/.output/server/{_sessionId-B82aMW2A.mjs → _sessionId-CbsSRLSa.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-Bud_yIrM.mjs → CompareDrawer-BiSslksi.mjs} +2 -2
- package/.output/server/_ssr/{ProxyViewerContainer-DqgVb0So.mjs → ProxyViewerContainer-DIN2AjhM.mjs} +145 -95
- package/.output/server/_ssr/{ReplayDialog-DKbV5fnW.mjs → ReplayDialog-DzoWpTis.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-MStxp1Wp.mjs → RequestAnatomy-D2tbgAPn.mjs} +2 -2
- package/.output/server/_ssr/{ResponseView-HLTCpJcF.mjs → ResponseView-BFP7zo8Z.mjs} +2 -2
- package/.output/server/_ssr/{StreamingChunkSequence-DEiyiUs_.mjs → StreamingChunkSequence-BfiRZW_k.mjs} +2 -2
- package/.output/server/_ssr/{index-DamOPFDI.mjs → index-OlcgE4Tl.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{json-viewer-MmTWKxqh.mjs → json-viewer-DmhEr-jg.mjs} +2 -2
- package/.output/server/_ssr/{router-50BIB6ED.mjs → router-BMdwHLHh.mjs} +79 -20
- package/.output/server/{_tanstack-start-manifest_v-TSwb1vFc.mjs → _tanstack-start-manifest_v-CL4qjwkQ.mjs} +1 -1
- package/.output/server/index.mjs +64 -64
- package/package.json +1 -1
- package/src/components/groups/GroupsDialog.tsx +71 -10
- package/src/lib/groupContract.ts +6 -0
- package/src/proxy/groupStore.ts +24 -0
- package/src/routes/api/groups.ts +41 -1
- package/src/services/groups.ts +8 -0
- package/.output/public/assets/_sessionId-DfkBPvCC.js +0 -1
- package/.output/public/assets/index-Uf87L52J.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createRouter, a as createRootRoute, b as createFileRoute, l as lazyRouteComponent, O as Outlet, H as HeadContent, S as Scripts } from "../_libs/tanstack__react-router.mjs";
|
|
2
2
|
import { j as jsxRuntimeExports } from "../_libs/react.mjs";
|
|
3
3
|
import { S as SWRConfig } from "../_libs/swr.mjs";
|
|
4
|
-
import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync, copyFileSync, unlinkSync, createReadStream, readdirSync, statSync,
|
|
4
|
+
import { existsSync, readFileSync, mkdirSync, writeFileSync, renameSync, copyFileSync, unlinkSync, createReadStream, readdirSync, statSync, rmSync, cpSync, createWriteStream } from "node:fs";
|
|
5
5
|
import fs, { mkdir, appendFile, readFile, writeFile, readdir, open, stat, unlink, rm, rename } from "node:fs/promises";
|
|
6
6
|
import { createInterface } from "node:readline";
|
|
7
7
|
import { Buffer } from "node:buffer";
|
|
@@ -108,7 +108,7 @@ function RootDocument({ children }) {
|
|
|
108
108
|
] })
|
|
109
109
|
] });
|
|
110
110
|
}
|
|
111
|
-
const $$splitComponentImporter$1 = () => import("./index-
|
|
111
|
+
const $$splitComponentImporter$1 = () => import("./index-OlcgE4Tl.mjs");
|
|
112
112
|
const Route$C = createFileRoute("/")({
|
|
113
113
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
114
114
|
});
|
|
@@ -151,7 +151,7 @@ function decodeSessionIdFromPath(encoded) {
|
|
|
151
151
|
function getSessionPath(sessionId) {
|
|
152
152
|
return `/session/${encodeSessionIdForPath(sessionId)}`;
|
|
153
153
|
}
|
|
154
|
-
const $$splitComponentImporter = () => import("../_sessionId-
|
|
154
|
+
const $$splitComponentImporter = () => import("../_sessionId-CbsSRLSa.mjs");
|
|
155
155
|
const Route$B = createFileRoute("/session/$sessionId")({
|
|
156
156
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
157
157
|
parseParams: (params) => ({
|
|
@@ -8303,6 +8303,10 @@ const DeleteInspectorGroupResponseSchema = object({
|
|
|
8303
8303
|
evidenceDeleted: boolean(),
|
|
8304
8304
|
evidencePath: string().nullable()
|
|
8305
8305
|
});
|
|
8306
|
+
const DeleteInspectorGroupsResponseSchema = object({
|
|
8307
|
+
deleted: number().int().nonnegative(),
|
|
8308
|
+
groups: array(DeleteInspectorGroupResponseSchema)
|
|
8309
|
+
});
|
|
8306
8310
|
const InspectorGroupExportMemberSchema = object({
|
|
8307
8311
|
member: InspectorGroupMemberSchema,
|
|
8308
8312
|
run: InspectorRunSchema.nullable(),
|
|
@@ -8481,6 +8485,24 @@ function deleteGroup(groupId, options = {}) {
|
|
|
8481
8485
|
evidencePath
|
|
8482
8486
|
};
|
|
8483
8487
|
}
|
|
8488
|
+
function deleteGroups(options = {}) {
|
|
8489
|
+
const parsed = DeleteInspectorGroupOptionsSchema.parse(options);
|
|
8490
|
+
const groups = readGroups();
|
|
8491
|
+
const deletedGroups = groups.map((group) => {
|
|
8492
|
+
const evidencePath = evidenceDirectoryFor(group);
|
|
8493
|
+
return {
|
|
8494
|
+
groupId: group.id,
|
|
8495
|
+
deleted: true,
|
|
8496
|
+
evidenceDeleted: removeEvidenceDirectory(evidencePath, parsed.deleteEvidence === true),
|
|
8497
|
+
evidencePath
|
|
8498
|
+
};
|
|
8499
|
+
});
|
|
8500
|
+
writeGroups([]);
|
|
8501
|
+
return {
|
|
8502
|
+
deleted: deletedGroups.length,
|
|
8503
|
+
groups: deletedGroups
|
|
8504
|
+
};
|
|
8505
|
+
}
|
|
8484
8506
|
function matchesExistingMember(member, memberId, sessionId, runId) {
|
|
8485
8507
|
if (member.id === memberId) return true;
|
|
8486
8508
|
if (member.sessionId !== sessionId) return false;
|
|
@@ -9094,7 +9116,7 @@ const Route$w = createFileRoute("/api/models")({
|
|
|
9094
9116
|
}
|
|
9095
9117
|
}
|
|
9096
9118
|
});
|
|
9097
|
-
const version = "2.1.
|
|
9119
|
+
const version = "2.1.20";
|
|
9098
9120
|
const packageJson = {
|
|
9099
9121
|
version
|
|
9100
9122
|
};
|
|
@@ -9494,6 +9516,9 @@ function deleteInspectorGroup(groupId, options) {
|
|
|
9494
9516
|
if (result === null) return serviceError("not-found", 404, "Group not found");
|
|
9495
9517
|
return serviceOk(result);
|
|
9496
9518
|
}
|
|
9519
|
+
function deleteInspectorGroups(options) {
|
|
9520
|
+
return deleteGroups(options);
|
|
9521
|
+
}
|
|
9497
9522
|
function readInspectorGroupSessions(groupId) {
|
|
9498
9523
|
const group = getGroup(groupId);
|
|
9499
9524
|
if (group === null) return serviceError("not-found", 404, "Group not found");
|
|
@@ -12438,6 +12463,25 @@ async function readJsonBody$5(request) {
|
|
|
12438
12463
|
return { ok: false };
|
|
12439
12464
|
}
|
|
12440
12465
|
}
|
|
12466
|
+
function readDeleteEvidenceFlag$1(request) {
|
|
12467
|
+
try {
|
|
12468
|
+
const value = new URL(request.url).searchParams.get("deleteEvidence");
|
|
12469
|
+
switch (value) {
|
|
12470
|
+
case null:
|
|
12471
|
+
return { ok: true, value: void 0 };
|
|
12472
|
+
case "1":
|
|
12473
|
+
case "true":
|
|
12474
|
+
return { ok: true, value: true };
|
|
12475
|
+
case "0":
|
|
12476
|
+
case "false":
|
|
12477
|
+
return { ok: true, value: false };
|
|
12478
|
+
default:
|
|
12479
|
+
return { ok: false };
|
|
12480
|
+
}
|
|
12481
|
+
} catch {
|
|
12482
|
+
return { ok: false };
|
|
12483
|
+
}
|
|
12484
|
+
}
|
|
12441
12485
|
const Route$s = createFileRoute("/api/groups")({
|
|
12442
12486
|
server: {
|
|
12443
12487
|
handlers: {
|
|
@@ -12455,6 +12499,20 @@ const Route$s = createFileRoute("/api/groups")({
|
|
|
12455
12499
|
);
|
|
12456
12500
|
}
|
|
12457
12501
|
return Response.json(createInspectorGroup(parsed.data), { status: 201 });
|
|
12502
|
+
},
|
|
12503
|
+
DELETE: ({ request }) => {
|
|
12504
|
+
const deleteEvidence = readDeleteEvidenceFlag$1(request);
|
|
12505
|
+
if (!deleteEvidence.ok) {
|
|
12506
|
+
return Response.json(
|
|
12507
|
+
{ error: "deleteEvidence must be one of true, false, 1, or 0" },
|
|
12508
|
+
{ status: 400 }
|
|
12509
|
+
);
|
|
12510
|
+
}
|
|
12511
|
+
return Response.json(
|
|
12512
|
+
deleteInspectorGroups({
|
|
12513
|
+
deleteEvidence: deleteEvidence.value
|
|
12514
|
+
})
|
|
12515
|
+
);
|
|
12458
12516
|
}
|
|
12459
12517
|
}
|
|
12460
12518
|
}
|
|
@@ -17209,18 +17267,19 @@ const router = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
17209
17267
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
17210
17268
|
export {
|
|
17211
17269
|
AnthropicResponseSchema$1 as A,
|
|
17212
|
-
|
|
17270
|
+
ProviderTestResultsSchema as B,
|
|
17213
17271
|
CapturedLogSchema as C,
|
|
17214
17272
|
DEFAULT_CAPTURE_MODE as D,
|
|
17215
|
-
|
|
17216
|
-
|
|
17273
|
+
createFailedProviderTestResults as E,
|
|
17274
|
+
MAX_PROVIDER_TEST_TIMEOUT_SECONDS as F,
|
|
17217
17275
|
GroupEvidenceReadResponseSchema as G,
|
|
17218
|
-
|
|
17276
|
+
resolveProviderContextWindow as H,
|
|
17219
17277
|
InspectorGroupsListResponseSchema as I,
|
|
17220
|
-
|
|
17278
|
+
isPlainRecord as J,
|
|
17221
17279
|
KnowledgeCandidateSchema as K,
|
|
17222
17280
|
LogBodyChunkSchema as L,
|
|
17223
17281
|
MAX_SLOW_RESPONSE_THRESHOLD_SECONDS as M,
|
|
17282
|
+
router as N,
|
|
17224
17283
|
OpenAIRequestSchema as O,
|
|
17225
17284
|
ProviderConfigSchema as P,
|
|
17226
17285
|
Route$B as R,
|
|
@@ -17238,17 +17297,17 @@ export {
|
|
|
17238
17297
|
stripClaudeCodeBillingHeader as k,
|
|
17239
17298
|
AlertSummarySchema as l,
|
|
17240
17299
|
AlertListResponseSchema as m,
|
|
17241
|
-
|
|
17242
|
-
|
|
17300
|
+
DeleteInspectorGroupsResponseSchema as n,
|
|
17301
|
+
GroupEvidenceExportResultSchema as o,
|
|
17243
17302
|
packageJson as p,
|
|
17244
|
-
|
|
17245
|
-
|
|
17303
|
+
DeleteInspectorGroupResponseSchema as q,
|
|
17304
|
+
providerHasContextMetadata as r,
|
|
17246
17305
|
safeGetOwnProperty as s,
|
|
17247
|
-
|
|
17248
|
-
|
|
17249
|
-
|
|
17250
|
-
|
|
17251
|
-
|
|
17252
|
-
|
|
17253
|
-
|
|
17306
|
+
findProviderModelMetadata as t,
|
|
17307
|
+
maskApiKey as u,
|
|
17308
|
+
PATH_V1_MESSAGES as v,
|
|
17309
|
+
PATH_V1_CHAT_COMPLETIONS as w,
|
|
17310
|
+
PATH_V1_RESPONSES as x,
|
|
17311
|
+
previewUpstreamUrl as y,
|
|
17312
|
+
createPendingProviderTestResults as z
|
|
17254
17313
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/alerts", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-
|
|
1
|
+
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/api/alerts", "/api/config", "/api/groups", "/api/health", "/api/logs", "/api/mcp", "/api/models", "/api/providers", "/api/runs", "/api/sessions", "/proxy/$", "/session/$sessionId", "/api/knowledge/candidates", "/api/knowledge/project-context", "/api/knowledge/search", "/api/knowledge/sessions/$sessionId/candidates"], "preloads": ["/assets/main-CgmDEMGA.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-DkHcxpXi.js", "/assets/ProxyViewerContainer-v5Lmx35X.js"] }, "/api/alerts": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/alerts.ts", "children": ["/api/alerts/summary"] }, "/api/config": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.ts", "children": ["/api/config/paths"] }, "/api/groups": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.ts", "children": ["/api/groups/$groupId"] }, "/api/health": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/health.ts" }, "/api/logs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.ts", "children": ["/api/logs/$id", "/api/logs/import", "/api/logs/stream"] }, "/api/mcp": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/mcp.ts" }, "/api/models": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/models.ts" }, "/api/providers": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.ts", "children": ["/api/providers/$providerId", "/api/providers/export", "/api/providers/import", "/api/providers/scan"] }, "/api/runs": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.ts", "children": ["/api/runs/$runId"] }, "/api/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/sessions.ts" }, "/proxy/$": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/proxy/$.ts" }, "/session/$sessionId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/session/$sessionId.tsx", "assets": [], "preloads": ["/assets/_sessionId-DziA4ZD4.js", "/assets/ProxyViewerContainer-v5Lmx35X.js"] }, "/api/alerts/summary": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/alerts.summary.ts" }, "/api/config/paths": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/config.paths.ts" }, "/api/groups/$groupId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.ts", "children": ["/api/groups/$groupId/evidence", "/api/groups/$groupId/sessions"] }, "/api/knowledge/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.ts", "children": ["/api/knowledge/candidates/$candidateId"] }, "/api/knowledge/project-context": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.project-context.ts" }, "/api/knowledge/search": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.search.ts" }, "/api/logs/$id": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.ts", "children": ["/api/logs/$id/body", "/api/logs/$id/chunks", "/api/logs/$id/replay"] }, "/api/logs/import": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.import.ts" }, "/api/logs/stream": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.stream.ts" }, "/api/providers/$providerId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.ts", "children": ["/api/providers/$providerId/model-metadata", "/api/providers/$providerId/test"] }, "/api/providers/export": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.export.ts" }, "/api/providers/import": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.import.ts" }, "/api/providers/scan": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.scan.ts" }, "/api/runs/$runId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.ts", "children": ["/api/runs/$runId/evidence"] }, "/api/groups/$groupId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.evidence.ts" }, "/api/groups/$groupId/sessions": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/groups.$groupId.sessions.ts" }, "/api/knowledge/candidates/$candidateId": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.ts", "children": ["/api/knowledge/candidates/$candidateId/promote"] }, "/api/logs/$id/body": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.body.ts" }, "/api/logs/$id/chunks": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.chunks.ts" }, "/api/logs/$id/replay": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/logs.$id.replay.ts" }, "/api/providers/$providerId/model-metadata": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.model-metadata.ts" }, "/api/providers/$providerId/test": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.ts", "children": ["/api/providers/$providerId/test/log"] }, "/api/runs/$runId/evidence": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/runs.$runId.evidence.ts" }, "/api/knowledge/candidates/$candidateId/promote": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.candidates.$candidateId.promote.ts" }, "/api/knowledge/sessions/$sessionId/candidates": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/knowledge.sessions.$sessionId.candidates.ts" }, "/api/providers/$providerId/test/log": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/api/providers.$providerId.test.log.ts" } }, "clientEntry": "/assets/main-CgmDEMGA.js" });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -38,114 +38,114 @@ const assets = {
|
|
|
38
38
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
39
39
|
"type": "image/svg+xml",
|
|
40
40
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
41
|
-
"mtime": "2026-07-06T03:
|
|
41
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
42
42
|
"size": 5915,
|
|
43
43
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
44
44
|
},
|
|
45
|
-
"/assets/
|
|
45
|
+
"/assets/json-viewer-CtvzeDPb.js": {
|
|
46
46
|
"type": "text/javascript; charset=utf-8",
|
|
47
|
-
"etag": '"
|
|
48
|
-
"mtime": "2026-07-06T03:
|
|
49
|
-
"size":
|
|
50
|
-
"path": "../public/assets/
|
|
47
|
+
"etag": '"1ae6-bbvT41UcoSu8MQ3zSi3/DzMj/Xo"',
|
|
48
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
49
|
+
"size": 6886,
|
|
50
|
+
"path": "../public/assets/json-viewer-CtvzeDPb.js"
|
|
51
51
|
},
|
|
52
|
-
"/assets/index-
|
|
52
|
+
"/assets/index-DkHcxpXi.js": {
|
|
53
53
|
"type": "text/javascript; charset=utf-8",
|
|
54
|
-
"etag": '"74-
|
|
55
|
-
"mtime": "2026-07-06T03:
|
|
54
|
+
"etag": '"74-X6xp31nh4dZkyQGwRXnHNIYrEqo"',
|
|
55
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
56
56
|
"size": 116,
|
|
57
|
-
"path": "../public/assets/index-
|
|
57
|
+
"path": "../public/assets/index-DkHcxpXi.js"
|
|
58
58
|
},
|
|
59
|
-
"/assets/
|
|
59
|
+
"/assets/CompareDrawer-BRCSDHn3.js": {
|
|
60
60
|
"type": "text/javascript; charset=utf-8",
|
|
61
|
-
"etag": '"
|
|
62
|
-
"mtime": "2026-07-06T03:
|
|
61
|
+
"etag": '"4bbf-8c6mdlj2RQ47taoxuucIDo8mFQ8"',
|
|
62
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
63
|
+
"size": 19391,
|
|
64
|
+
"path": "../public/assets/CompareDrawer-BRCSDHn3.js"
|
|
65
|
+
},
|
|
66
|
+
"/assets/index-B1-V3HCD.js": {
|
|
67
|
+
"type": "text/javascript; charset=utf-8",
|
|
68
|
+
"etag": '"1cd2c-htrNk+OJhSya0rbaR5sIwzkp3UM"',
|
|
69
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
63
70
|
"size": 118060,
|
|
64
|
-
"path": "../public/assets/index-
|
|
71
|
+
"path": "../public/assets/index-B1-V3HCD.js"
|
|
65
72
|
},
|
|
66
73
|
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
67
74
|
"type": "image/jpeg",
|
|
68
75
|
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
69
|
-
"mtime": "2026-07-06T03:
|
|
76
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
70
77
|
"size": 6918,
|
|
71
78
|
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
72
79
|
},
|
|
73
80
|
"/assets/index-ChgjUix0.css": {
|
|
74
81
|
"type": "text/css; charset=utf-8",
|
|
75
82
|
"etag": '"212a0-Dw5mR7yd82+ILdqMgXoMBMt6hq4"',
|
|
76
|
-
"mtime": "2026-07-06T03:
|
|
83
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
77
84
|
"size": 135840,
|
|
78
85
|
"path": "../public/assets/index-ChgjUix0.css"
|
|
79
86
|
},
|
|
80
|
-
"/assets/
|
|
81
|
-
"type": "text/javascript; charset=utf-8",
|
|
82
|
-
"etag": '"512fd-qhc7UtTka1FdeWrjR9Vm3rygk08"',
|
|
83
|
-
"mtime": "2026-07-06T03:30:01.375Z",
|
|
84
|
-
"size": 332541,
|
|
85
|
-
"path": "../public/assets/main-Do-E-46G.js"
|
|
86
|
-
},
|
|
87
|
-
"/assets/ReplayDialog-DQ7nS5Rr.js": {
|
|
87
|
+
"/assets/ReplayDialog-Dkez3vxu.js": {
|
|
88
88
|
"type": "text/javascript; charset=utf-8",
|
|
89
|
-
"etag": '"31d6-
|
|
90
|
-
"mtime": "2026-07-06T03:
|
|
89
|
+
"etag": '"31d6-dVfEJR60cWAXP0HlCExJxLhEzGQ"',
|
|
90
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
91
91
|
"size": 12758,
|
|
92
|
-
"path": "../public/assets/ReplayDialog-
|
|
92
|
+
"path": "../public/assets/ReplayDialog-Dkez3vxu.js"
|
|
93
93
|
},
|
|
94
|
-
"/assets/ResponseView-
|
|
94
|
+
"/assets/ResponseView-Dk2dJY-B.js": {
|
|
95
95
|
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"3fbb-
|
|
97
|
-
"mtime": "2026-07-06T03:
|
|
96
|
+
"etag": '"3fbb-6UX4A+JtyjnePCf1z1VZuEdQ0C8"',
|
|
97
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
98
98
|
"size": 16315,
|
|
99
|
-
"path": "../public/assets/ResponseView-
|
|
100
|
-
},
|
|
101
|
-
"/assets/json-viewer-d2gWBDLO.js": {
|
|
102
|
-
"type": "text/javascript; charset=utf-8",
|
|
103
|
-
"etag": '"1ae6-AnYe4aIjraM/V4UE/CT06YKIWV4"',
|
|
104
|
-
"mtime": "2026-07-06T03:30:01.375Z",
|
|
105
|
-
"size": 6886,
|
|
106
|
-
"path": "../public/assets/json-viewer-d2gWBDLO.js"
|
|
99
|
+
"path": "../public/assets/ResponseView-Dk2dJY-B.js"
|
|
107
100
|
},
|
|
108
|
-
"/assets/RequestAnatomy-
|
|
101
|
+
"/assets/RequestAnatomy-CHBODGDF.js": {
|
|
109
102
|
"type": "text/javascript; charset=utf-8",
|
|
110
|
-
"etag": '"43f2-
|
|
111
|
-
"mtime": "2026-07-06T03:
|
|
103
|
+
"etag": '"43f2-xKKEN4NCpqOXJI4uXmr59dBkdv4"',
|
|
104
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
112
105
|
"size": 17394,
|
|
113
|
-
"path": "../public/assets/RequestAnatomy-
|
|
106
|
+
"path": "../public/assets/RequestAnatomy-CHBODGDF.js"
|
|
114
107
|
},
|
|
115
|
-
"/assets/
|
|
108
|
+
"/assets/main-CgmDEMGA.js": {
|
|
116
109
|
"type": "text/javascript; charset=utf-8",
|
|
117
|
-
"etag": '"
|
|
118
|
-
"mtime": "2026-07-06T03:
|
|
119
|
-
"size":
|
|
120
|
-
"path": "../public/assets/
|
|
110
|
+
"etag": '"512fd-MY9A8NqvB/UwL688OrlT4bCrRNg"',
|
|
111
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
112
|
+
"size": 332541,
|
|
113
|
+
"path": "../public/assets/main-CgmDEMGA.js"
|
|
121
114
|
},
|
|
122
|
-
"/assets/
|
|
123
|
-
"type": "
|
|
124
|
-
"etag": '"
|
|
125
|
-
"mtime": "2026-07-06T03:
|
|
126
|
-
"size":
|
|
127
|
-
"path": "../public/assets/
|
|
115
|
+
"/assets/_sessionId-DziA4ZD4.js": {
|
|
116
|
+
"type": "text/javascript; charset=utf-8",
|
|
117
|
+
"etag": '"d2-wlyaZDHIbsvwnEDFot6MtHoOilY"',
|
|
118
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
119
|
+
"size": 210,
|
|
120
|
+
"path": "../public/assets/_sessionId-DziA4ZD4.js"
|
|
128
121
|
},
|
|
129
122
|
"/assets/qwen-CONDcHqt.png": {
|
|
130
123
|
"type": "image/png",
|
|
131
124
|
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
132
|
-
"mtime": "2026-07-06T03:
|
|
125
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
133
126
|
"size": 357059,
|
|
134
127
|
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
135
128
|
},
|
|
136
|
-
"/assets/
|
|
129
|
+
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
130
|
+
"type": "image/svg+xml",
|
|
131
|
+
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
132
|
+
"mtime": "2026-07-06T03:43:22.271Z",
|
|
133
|
+
"size": 11256,
|
|
134
|
+
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
135
|
+
},
|
|
136
|
+
"/assets/StreamingChunkSequence-gZpqWwKK.js": {
|
|
137
137
|
"type": "text/javascript; charset=utf-8",
|
|
138
|
-
"etag": '"
|
|
139
|
-
"mtime": "2026-07-06T03:
|
|
140
|
-
"size":
|
|
141
|
-
"path": "../public/assets/
|
|
138
|
+
"etag": '"dd6-4TByjpofN6+LEoXCJarpy4Gq3EI"',
|
|
139
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
140
|
+
"size": 3542,
|
|
141
|
+
"path": "../public/assets/StreamingChunkSequence-gZpqWwKK.js"
|
|
142
142
|
},
|
|
143
|
-
"/assets/ProxyViewerContainer-
|
|
143
|
+
"/assets/ProxyViewerContainer-v5Lmx35X.js": {
|
|
144
144
|
"type": "text/javascript; charset=utf-8",
|
|
145
|
-
"etag": '"
|
|
146
|
-
"mtime": "2026-07-06T03:
|
|
147
|
-
"size":
|
|
148
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
145
|
+
"etag": '"ae027-e8sH3cKk1w5M2T32Xlncxf3nGrE"',
|
|
146
|
+
"mtime": "2026-07-06T03:43:22.272Z",
|
|
147
|
+
"size": 712743,
|
|
148
|
+
"path": "../public/assets/ProxyViewerContainer-v5Lmx35X.js"
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
function readAsset(id) {
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ import { cn } from "../../lib/utils";
|
|
|
19
19
|
import { parseJsonResponse, readApiError } from "../../lib/apiClient";
|
|
20
20
|
import {
|
|
21
21
|
DeleteInspectorGroupResponseSchema,
|
|
22
|
+
DeleteInspectorGroupsResponseSchema,
|
|
22
23
|
GroupEvidenceExportResultSchema,
|
|
23
24
|
type GroupEvidenceReadResponse,
|
|
24
25
|
type GroupEvidenceExportResult,
|
|
@@ -34,6 +35,7 @@ import { ClientLogo, clientAppLabel, detectClientApp } from "../clients/ClientLo
|
|
|
34
35
|
import { useGroupEvidence } from "../../lib/useGroupEvidence";
|
|
35
36
|
import { useGroups } from "../../lib/useGroups";
|
|
36
37
|
import { useCopyFeedback } from "../proxy-viewer/useCopyFeedback";
|
|
38
|
+
import { TransientToast, useTransientToast } from "../ui/transient-toast";
|
|
37
39
|
|
|
38
40
|
type MemberStatus = InspectorGroupMember["status"];
|
|
39
41
|
|
|
@@ -56,6 +58,10 @@ export function groupDeletePath(groupId: string, deleteEvidence: boolean): strin
|
|
|
56
58
|
return deleteEvidence ? `${path}?deleteEvidence=1` : path;
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
export function groupsClearPath(deleteEvidence: boolean): string {
|
|
62
|
+
return deleteEvidence ? "/api/groups?deleteEvidence=1" : "/api/groups";
|
|
63
|
+
}
|
|
64
|
+
|
|
59
65
|
export function summarizeGroup(group: InspectorGroup): GroupSummary {
|
|
60
66
|
let completedMembers = 0;
|
|
61
67
|
let failedMembers = 0;
|
|
@@ -285,6 +291,8 @@ export function GroupsDialog(): JSX.Element {
|
|
|
285
291
|
const [deleteEvidence, setDeleteEvidence] = useState(false);
|
|
286
292
|
const [deletingGroupId, setDeletingGroupId] = useState<string | null>(null);
|
|
287
293
|
const [deleteError, setDeleteError] = useState<string | null>(null);
|
|
294
|
+
const [clearingGroups, setClearingGroups] = useState(false);
|
|
295
|
+
const { notice, showToast, dismissToast } = useTransientToast();
|
|
288
296
|
const { groups, isLoading, error, mutate } = useGroups();
|
|
289
297
|
|
|
290
298
|
const selectedGroup = useMemo(
|
|
@@ -315,6 +323,47 @@ export function GroupsDialog(): JSX.Element {
|
|
|
315
323
|
void mutate();
|
|
316
324
|
}, [mutate]);
|
|
317
325
|
|
|
326
|
+
const handleClearGroups = useCallback(async () => {
|
|
327
|
+
if (groups.length === 0 || clearingGroups) return;
|
|
328
|
+
|
|
329
|
+
setClearingGroups(true);
|
|
330
|
+
setDeleteTarget(null);
|
|
331
|
+
setDeleteEvidence(false);
|
|
332
|
+
setDeleteError(null);
|
|
333
|
+
setExportError(null);
|
|
334
|
+
|
|
335
|
+
try {
|
|
336
|
+
const response = await fetch(groupsClearPath(false), { method: "DELETE" });
|
|
337
|
+
if (!response.ok) {
|
|
338
|
+
showToast({
|
|
339
|
+
message: await readApiError(
|
|
340
|
+
response,
|
|
341
|
+
`Clear failed with status ${String(response.status)}`,
|
|
342
|
+
),
|
|
343
|
+
tone: "error",
|
|
344
|
+
});
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const parsed = await parseJsonResponse(response, DeleteInspectorGroupsResponseSchema);
|
|
349
|
+
setExportResult(null);
|
|
350
|
+
setSelectedGroupId(null);
|
|
351
|
+
await mutate();
|
|
352
|
+
await mutateEvidence();
|
|
353
|
+
showToast({
|
|
354
|
+
message: `Cleared ${formatNumber(parsed.deleted)} group${parsed.deleted === 1 ? "" : "s"}.`,
|
|
355
|
+
tone: "success",
|
|
356
|
+
});
|
|
357
|
+
} catch (err) {
|
|
358
|
+
showToast({
|
|
359
|
+
message: err instanceof Error ? err.message : "Unknown error clearing groups",
|
|
360
|
+
tone: "error",
|
|
361
|
+
});
|
|
362
|
+
} finally {
|
|
363
|
+
setClearingGroups(false);
|
|
364
|
+
}
|
|
365
|
+
}, [clearingGroups, groups.length, mutate, mutateEvidence, showToast]);
|
|
366
|
+
|
|
318
367
|
const handleExport = useCallback(
|
|
319
368
|
async (group: InspectorGroup) => {
|
|
320
369
|
setExportingGroupId(group.id);
|
|
@@ -404,6 +453,7 @@ export function GroupsDialog(): JSX.Element {
|
|
|
404
453
|
|
|
405
454
|
return (
|
|
406
455
|
<Dialog open={open} onOpenChange={setOpen}>
|
|
456
|
+
<TransientToast notice={notice} onDismiss={dismissToast} />
|
|
407
457
|
<DialogTrigger asChild>
|
|
408
458
|
<Button
|
|
409
459
|
type="button"
|
|
@@ -437,16 +487,27 @@ export function GroupsDialog(): JSX.Element {
|
|
|
437
487
|
<p className="text-xs text-muted-foreground">
|
|
438
488
|
Evaluation batches, model runs, and exported evidence packs.
|
|
439
489
|
</p>
|
|
440
|
-
<
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
490
|
+
<div className="flex shrink-0 items-center gap-2">
|
|
491
|
+
<Button
|
|
492
|
+
type="button"
|
|
493
|
+
variant="outline"
|
|
494
|
+
size="sm"
|
|
495
|
+
disabled={groups.length === 0 || clearingGroups}
|
|
496
|
+
onClick={() => void handleClearGroups()}
|
|
497
|
+
title="Clear all groups. Session logs and run records stay intact."
|
|
498
|
+
>
|
|
499
|
+
{clearingGroups ? (
|
|
500
|
+
<Loader2 className="size-3.5 animate-spin" />
|
|
501
|
+
) : (
|
|
502
|
+
<Trash2 className="size-3.5" />
|
|
503
|
+
)}
|
|
504
|
+
Clear
|
|
505
|
+
</Button>
|
|
506
|
+
<Button type="button" variant="outline" size="sm" onClick={handleRefresh}>
|
|
507
|
+
<RefreshCw className="size-3.5" />
|
|
508
|
+
Refresh
|
|
509
|
+
</Button>
|
|
510
|
+
</div>
|
|
450
511
|
</div>
|
|
451
512
|
|
|
452
513
|
<div className="grid min-h-0 flex-1 gap-4 md:grid-cols-[260px_minmax(0,1fr)]">
|
package/src/lib/groupContract.ts
CHANGED
|
@@ -103,6 +103,11 @@ export const DeleteInspectorGroupResponseSchema = z.object({
|
|
|
103
103
|
evidencePath: z.string().nullable(),
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
+
export const DeleteInspectorGroupsResponseSchema = z.object({
|
|
107
|
+
deleted: z.number().int().nonnegative(),
|
|
108
|
+
groups: z.array(DeleteInspectorGroupResponseSchema),
|
|
109
|
+
});
|
|
110
|
+
|
|
106
111
|
export const InspectorGroupExportMemberSchema = z.object({
|
|
107
112
|
member: InspectorGroupMemberSchema,
|
|
108
113
|
run: InspectorRunSchema.nullable(),
|
|
@@ -153,6 +158,7 @@ export type AddInspectorGroupSessionInput = z.infer<typeof AddInspectorGroupSess
|
|
|
153
158
|
export type GroupEvidenceExportOptions = z.infer<typeof GroupEvidenceExportOptionsSchema>;
|
|
154
159
|
export type DeleteInspectorGroupOptions = z.infer<typeof DeleteInspectorGroupOptionsSchema>;
|
|
155
160
|
export type DeleteInspectorGroupResponse = z.infer<typeof DeleteInspectorGroupResponseSchema>;
|
|
161
|
+
export type DeleteInspectorGroupsResponse = z.infer<typeof DeleteInspectorGroupsResponseSchema>;
|
|
156
162
|
export type InspectorGroupExportMember = z.infer<typeof InspectorGroupExportMemberSchema>;
|
|
157
163
|
export type InspectorGroupEvidenceSummary = z.infer<typeof InspectorGroupEvidenceSummarySchema>;
|
|
158
164
|
export type GroupEvidenceReadResponse = z.infer<typeof GroupEvidenceReadResponseSchema>;
|
package/src/proxy/groupStore.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
type CreateInspectorGroupInput,
|
|
13
13
|
type DeleteInspectorGroupOptions,
|
|
14
14
|
type DeleteInspectorGroupResponse,
|
|
15
|
+
type DeleteInspectorGroupsResponse,
|
|
15
16
|
type InspectorGroup,
|
|
16
17
|
type InspectorGroupEvidence,
|
|
17
18
|
type InspectorGroupMember,
|
|
@@ -203,6 +204,29 @@ export function deleteGroup(
|
|
|
203
204
|
};
|
|
204
205
|
}
|
|
205
206
|
|
|
207
|
+
export function deleteGroups(
|
|
208
|
+
options: DeleteInspectorGroupOptions = {},
|
|
209
|
+
): DeleteInspectorGroupsResponse {
|
|
210
|
+
const parsed = DeleteInspectorGroupOptionsSchema.parse(options);
|
|
211
|
+
const groups = readGroups();
|
|
212
|
+
const deletedGroups = groups.map((group) => {
|
|
213
|
+
const evidencePath = evidenceDirectoryFor(group);
|
|
214
|
+
return {
|
|
215
|
+
groupId: group.id,
|
|
216
|
+
deleted: true,
|
|
217
|
+
evidenceDeleted: removeEvidenceDirectory(evidencePath, parsed.deleteEvidence === true),
|
|
218
|
+
evidencePath,
|
|
219
|
+
};
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
writeGroups([]);
|
|
223
|
+
|
|
224
|
+
return {
|
|
225
|
+
deleted: deletedGroups.length,
|
|
226
|
+
groups: deletedGroups,
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
|
|
206
230
|
function matchesExistingMember(
|
|
207
231
|
member: InspectorGroupMember,
|
|
208
232
|
memberId: string,
|