@tonyclaw/agent-inspector 2.0.31 → 2.0.32
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-tIUf2EJm.js → CompareDrawer-Dgi0hhg5.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer-BxRaXhKR.js → ProxyViewerContainer-4dG0nLRp.js} +28 -28
- package/.output/public/assets/{ReplayDialog-D6v1xcuC.js → ReplayDialog-BL6BwDuI.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-D6PniTlx.js → RequestAnatomy-DZMmiIiD.js} +1 -1
- package/.output/public/assets/{ResponseView-Sx8PjuvU.js → ResponseView-DJLOiTYq.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-D-Rbfnxh.js → StreamingChunkSequence--SxZ5cxc.js} +1 -1
- package/.output/public/assets/_sessionId-C4z6gu9i.js +1 -0
- package/.output/public/assets/index-Drpb2qR5.js +1 -0
- package/.output/public/assets/{index-Byk60-jA.css → index-fUUi8iQF.css} +1 -1
- package/.output/public/assets/{main-B1kdhY98.js → main-CbRIHhJ5.js} +2 -2
- package/.output/server/_libs/lucide-react.mjs +9 -9
- package/.output/server/{_sessionId-BceHFKf4.mjs → _sessionId-DNfumR8F.mjs} +2 -2
- package/.output/server/_ssr/{CompareDrawer-uSxK5Ei5.mjs → CompareDrawer-CzgjhnUa.mjs} +3 -3
- package/.output/server/_ssr/{ProxyViewerContainer-_npQ_f2i.mjs → ProxyViewerContainer-BqOcZ7en.mjs} +258 -87
- package/.output/server/_ssr/{ReplayDialog-BHAzSLCT.mjs → ReplayDialog-DmEknIL8.mjs} +3 -3
- package/.output/server/_ssr/{RequestAnatomy-DjlZLXBd.mjs → RequestAnatomy-DNoiMudY.mjs} +3 -3
- package/.output/server/_ssr/{ResponseView-BuDEJ3fl.mjs → ResponseView-C_cRrleT.mjs} +3 -3
- package/.output/server/_ssr/{StreamingChunkSequence-DFcu0bD8.mjs → StreamingChunkSequence-DHZ9Q_dL.mjs} +3 -3
- package/.output/server/_ssr/{index-Bw6Fw33c.mjs → index-coYS9XyS.mjs} +2 -2
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-D90tMCb3.mjs → router-DUb5lKw1.mjs} +138 -39
- package/.output/server/{_tanstack-start-manifest_v-BVM4AUlx.mjs → _tanstack-start-manifest_v-xcG1o8Vt.mjs} +1 -1
- package/.output/server/index.mjs +67 -67
- package/package.json +1 -1
- package/src/components/groups/GroupsDialog.tsx +291 -78
- package/src/lib/groupContract.ts +13 -0
- package/src/mcp/server.ts +16 -0
- package/src/mcp/toolHandlers.ts +22 -0
- package/src/proxy/groupStore.ts +52 -2
- package/src/routes/api/groups.$groupId.ts +38 -1
- package/.output/public/assets/_sessionId-BhNTuZ31.js +0 -1
- package/.output/public/assets/index-Kxptlkpg.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
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, mkdirSync, writeFileSync, readFileSync, renameSync, copyFileSync, unlinkSync, createReadStream, readdirSync, statSync,
|
|
4
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, renameSync, copyFileSync, unlinkSync, createReadStream, readdirSync, statSync, rmSync, cpSync, createWriteStream } from "node:fs";
|
|
5
5
|
import fs, { mkdir, appendFile, readFile, writeFile, readdir, open, stat, unlink, rename } from "node:fs/promises";
|
|
6
6
|
import { createInterface } from "node:readline";
|
|
7
7
|
import { Buffer } from "node:buffer";
|
|
8
|
-
import path, { join, dirname, isAbsolute } from "node:path";
|
|
8
|
+
import path, { join, dirname, isAbsolute, resolve, relative } from "node:path";
|
|
9
9
|
import { execFile, exec, spawn } from "node:child_process";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
import { C as Conf } from "../_libs/conf.mjs";
|
|
@@ -50,7 +50,7 @@ import "../_libs/mimic-function.mjs";
|
|
|
50
50
|
import "../_libs/semver.mjs";
|
|
51
51
|
import "../_libs/uint8array-extras.mjs";
|
|
52
52
|
const faviconSvg = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20role='img'%20aria-label='Agent%20Inspector'%3e%3crect%20width='64'%20height='64'%20rx='14'%20fill='%23111827'%20/%3e%3cg%20fill='none'%20stroke='%23f59e0b'%20stroke-width='4.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20fill='%23f59e0b'%20d='M15%2036c0-11%207-18%2017-18s17%207%2017%2018c0%208-7%2013-17%2013s-17-5-17-13z'%20/%3e%3cpath%20d='M16%2031c-6-5-12-3-12%204%200%205%206%206%2011%202'%20/%3e%3cpath%20d='M48%2031c6-5%2012-3%2012%204%200%205-6%206-11%202'%20/%3e%3cpath%20d='M27%2019l-3-7'%20/%3e%3cpath%20d='M37%2019l3-7'%20/%3e%3cpath%20d='M19%2045l-6%209'%20/%3e%3cpath%20d='M27%2048l-3%209'%20/%3e%3cpath%20d='M37%2048l3%209'%20/%3e%3cpath%20d='M45%2045l6%209'%20/%3e%3c/g%3e%3cpath%20d='M14%2047l9-8%208%209c-5%203.5-12%203-17-1z'%20fill='%232f6b3f'%20opacity='.95'%20/%3e%3cpath%20d='M18%2046l5-5%205%206c-3%201.6-7%201.4-10-1z'%20fill='%236fb36f'%20opacity='.95'%20/%3e%3cpath%20d='M23%2041v10'%20fill='none'%20stroke='%23d6b45f'%20stroke-width='1.6'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='31'%20cy='48'%20r='1.8'%20fill='%23c2412d'%20/%3e%3cpath%20d='M24%2044l13-11%2014%2013c-8%205.8-18%205.3-27-2z'%20fill='%232f6b3f'%20opacity='.97'%20/%3e%3cpath%20d='M30%2043l7-7%209%209c-5%202.7-11%202.5-16-2z'%20fill='%236fb36f'%20opacity='.95'%20/%3e%3cpath%20d='M37%2036v14'%20fill='none'%20stroke='%23d6b45f'%20stroke-width='2'%20stroke-linecap='round'%20/%3e%3cpath%20d='M30%2043c5-2%2011-1.5%2016%202'%20fill='none'%20stroke='%239fca78'%20stroke-width='1.8'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='51'%20cy='46'%20r='2'%20fill='%23c2412d'%20/%3e%3cpath%20d='M40%2050l8-8%207%208c-4.2%203.2-10%203-15%200z'%20fill='%232f6b3f'%20opacity='.95'%20/%3e%3cpath%20d='M43%2049l5-5%204.5%205.5c-3%201.5-6%201.2-9.5-.5z'%20fill='%236fb36f'%20opacity='.95'%20/%3e%3cpath%20d='M48%2044v9'%20fill='none'%20stroke='%23d6b45f'%20stroke-width='1.5'%20stroke-linecap='round'%20/%3e%3ccircle%20cx='55'%20cy='50'%20r='1.7'%20fill='%23c2412d'%20/%3e%3ccircle%20cx='24'%20cy='11'%20r='3.2'%20fill='%23f59e0b'%20/%3e%3ccircle%20cx='40'%20cy='11'%20r='3.2'%20fill='%23f59e0b'%20/%3e%3ccircle%20cx='25'%20cy='34'%20r='2.1'%20fill='%23111827'%20/%3e%3ccircle%20cx='39'%20cy='34'%20r='2.1'%20fill='%23111827'%20/%3e%3c/svg%3e";
|
|
53
|
-
const appCss = "/assets/index-
|
|
53
|
+
const appCss = "/assets/index-fUUi8iQF.css";
|
|
54
54
|
const Route$z = createRootRoute({
|
|
55
55
|
head: () => ({
|
|
56
56
|
meta: [
|
|
@@ -93,7 +93,7 @@ function RootDocument({ children }) {
|
|
|
93
93
|
] })
|
|
94
94
|
] });
|
|
95
95
|
}
|
|
96
|
-
const $$splitComponentImporter$1 = () => import("./index-
|
|
96
|
+
const $$splitComponentImporter$1 = () => import("./index-coYS9XyS.mjs");
|
|
97
97
|
const Route$y = createFileRoute("/")({
|
|
98
98
|
component: lazyRouteComponent($$splitComponentImporter$1, "component")
|
|
99
99
|
});
|
|
@@ -136,7 +136,7 @@ function decodeSessionIdFromPath(encoded) {
|
|
|
136
136
|
function getSessionPath(sessionId) {
|
|
137
137
|
return `/session/${encodeSessionIdForPath(sessionId)}`;
|
|
138
138
|
}
|
|
139
|
-
const $$splitComponentImporter = () => import("../_sessionId-
|
|
139
|
+
const $$splitComponentImporter = () => import("../_sessionId-DNfumR8F.mjs");
|
|
140
140
|
const Route$x = createFileRoute("/session/$sessionId")({
|
|
141
141
|
component: lazyRouteComponent($$splitComponentImporter, "component"),
|
|
142
142
|
parseParams: (params) => ({
|
|
@@ -279,8 +279,8 @@ async function runWithLogWriteLock(fn) {
|
|
|
279
279
|
const previousLock = logWriteLock;
|
|
280
280
|
let releaseLock2 = () => {
|
|
281
281
|
};
|
|
282
|
-
logWriteLock = new Promise((
|
|
283
|
-
releaseLock2 =
|
|
282
|
+
logWriteLock = new Promise((resolve2) => {
|
|
283
|
+
releaseLock2 = resolve2;
|
|
284
284
|
});
|
|
285
285
|
await previousLock;
|
|
286
286
|
try {
|
|
@@ -996,22 +996,22 @@ let idGenerationPromise = null;
|
|
|
996
996
|
let releaseLock = null;
|
|
997
997
|
async function acquireLock() {
|
|
998
998
|
if (releaseLock === null) {
|
|
999
|
-
idGenerationPromise = new Promise((
|
|
1000
|
-
releaseLock =
|
|
999
|
+
idGenerationPromise = new Promise((resolve2) => {
|
|
1000
|
+
releaseLock = resolve2;
|
|
1001
1001
|
});
|
|
1002
1002
|
} else {
|
|
1003
1003
|
await idGenerationPromise;
|
|
1004
|
-
idGenerationPromise = new Promise((
|
|
1005
|
-
releaseLock =
|
|
1004
|
+
idGenerationPromise = new Promise((resolve2) => {
|
|
1005
|
+
releaseLock = resolve2;
|
|
1006
1006
|
});
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
1009
|
function releaseLockFn() {
|
|
1010
1010
|
if (releaseLock) {
|
|
1011
|
-
const
|
|
1011
|
+
const resolve2 = releaseLock;
|
|
1012
1012
|
releaseLock = null;
|
|
1013
1013
|
idGenerationPromise = null;
|
|
1014
|
-
|
|
1014
|
+
resolve2();
|
|
1015
1015
|
}
|
|
1016
1016
|
}
|
|
1017
1017
|
async function getNextLogId() {
|
|
@@ -1278,10 +1278,10 @@ class SessionProcess {
|
|
|
1278
1278
|
return this.child;
|
|
1279
1279
|
}
|
|
1280
1280
|
enqueue(job) {
|
|
1281
|
-
return new Promise((
|
|
1281
|
+
return new Promise((resolve2, reject) => {
|
|
1282
1282
|
const child = this.ensureRunning();
|
|
1283
1283
|
const id = String(++this.nextId);
|
|
1284
|
-
this.pending.set(id, { resolve, reject });
|
|
1284
|
+
this.pending.set(id, { resolve: resolve2, reject });
|
|
1285
1285
|
child.send({ id, job });
|
|
1286
1286
|
});
|
|
1287
1287
|
}
|
|
@@ -2009,18 +2009,18 @@ async function removeTempFile(filePath) {
|
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
2011
|
function waitForWriterDrain(writer) {
|
|
2012
|
-
return new Promise((
|
|
2012
|
+
return new Promise((resolve2) => {
|
|
2013
2013
|
const cleanup = () => {
|
|
2014
2014
|
writer.off("drain", onDrain);
|
|
2015
2015
|
writer.off("error", onError);
|
|
2016
2016
|
};
|
|
2017
2017
|
const onDrain = () => {
|
|
2018
2018
|
cleanup();
|
|
2019
|
-
|
|
2019
|
+
resolve2(true);
|
|
2020
2020
|
};
|
|
2021
2021
|
const onError = () => {
|
|
2022
2022
|
cleanup();
|
|
2023
|
-
|
|
2023
|
+
resolve2(false);
|
|
2024
2024
|
};
|
|
2025
2025
|
writer.once("drain", onDrain);
|
|
2026
2026
|
writer.once("error", onError);
|
|
@@ -2032,18 +2032,18 @@ async function writeKeptLogLine(writer, line) {
|
|
|
2032
2032
|
return await waitForWriterDrain(writer);
|
|
2033
2033
|
}
|
|
2034
2034
|
function finishWriter(writer) {
|
|
2035
|
-
return new Promise((
|
|
2035
|
+
return new Promise((resolve2) => {
|
|
2036
2036
|
const cleanup = () => {
|
|
2037
2037
|
writer.off("finish", onFinish);
|
|
2038
2038
|
writer.off("error", onError);
|
|
2039
2039
|
};
|
|
2040
2040
|
const onFinish = () => {
|
|
2041
2041
|
cleanup();
|
|
2042
|
-
|
|
2042
|
+
resolve2(true);
|
|
2043
2043
|
};
|
|
2044
2044
|
const onError = () => {
|
|
2045
2045
|
cleanup();
|
|
2046
|
-
|
|
2046
|
+
resolve2(false);
|
|
2047
2047
|
};
|
|
2048
2048
|
writer.once("finish", onFinish);
|
|
2049
2049
|
writer.once("error", onError);
|
|
@@ -4504,10 +4504,10 @@ function getWorkers() {
|
|
|
4504
4504
|
for (let i = 0; i < WORKER_COUNT; i++) {
|
|
4505
4505
|
const w = new Worker(new URL("./logFinalizer.worker.ts", import.meta.url));
|
|
4506
4506
|
w.on("message", (msg) => {
|
|
4507
|
-
const
|
|
4508
|
-
if (
|
|
4507
|
+
const resolve2 = _pending.get(msg.id);
|
|
4508
|
+
if (resolve2 !== void 0) {
|
|
4509
4509
|
_pending.delete(msg.id);
|
|
4510
|
-
|
|
4510
|
+
resolve2(msg.result);
|
|
4511
4511
|
}
|
|
4512
4512
|
});
|
|
4513
4513
|
w.on("error", (err) => {
|
|
@@ -4521,14 +4521,14 @@ function getWorkers() {
|
|
|
4521
4521
|
return _workers;
|
|
4522
4522
|
}
|
|
4523
4523
|
function executeBuildInWorker(job) {
|
|
4524
|
-
return new Promise((
|
|
4524
|
+
return new Promise((resolve2) => {
|
|
4525
4525
|
const list = getWorkers();
|
|
4526
4526
|
const idx = _nextWorker % list.length;
|
|
4527
4527
|
_nextWorker++;
|
|
4528
4528
|
const w = list[idx];
|
|
4529
4529
|
if (w === void 0) return;
|
|
4530
4530
|
const id = String(++_jobSeq);
|
|
4531
|
-
_pending.set(id,
|
|
4531
|
+
_pending.set(id, resolve2);
|
|
4532
4532
|
w.postMessage({ id, job });
|
|
4533
4533
|
});
|
|
4534
4534
|
}
|
|
@@ -5453,7 +5453,7 @@ const Route$s = createFileRoute("/api/models")({
|
|
|
5453
5453
|
}
|
|
5454
5454
|
}
|
|
5455
5455
|
});
|
|
5456
|
-
const version = "2.0.
|
|
5456
|
+
const version = "2.0.32";
|
|
5457
5457
|
const packageJson = {
|
|
5458
5458
|
version
|
|
5459
5459
|
};
|
|
@@ -5533,6 +5533,15 @@ const GroupEvidenceExportOptionsSchema = object({
|
|
|
5533
5533
|
includeHistory: boolean().optional(),
|
|
5534
5534
|
latestLogLimit: number().int().positive().max(50).optional()
|
|
5535
5535
|
}).optional();
|
|
5536
|
+
const DeleteInspectorGroupOptionsSchema = object({
|
|
5537
|
+
deleteEvidence: boolean().optional()
|
|
5538
|
+
});
|
|
5539
|
+
const DeleteInspectorGroupResponseSchema = object({
|
|
5540
|
+
groupId: string(),
|
|
5541
|
+
deleted: boolean(),
|
|
5542
|
+
evidenceDeleted: boolean(),
|
|
5543
|
+
evidencePath: string().nullable()
|
|
5544
|
+
});
|
|
5536
5545
|
const InspectorGroupExportMemberSchema = object({
|
|
5537
5546
|
member: InspectorGroupMemberSchema,
|
|
5538
5547
|
run: InspectorRunSchema.nullable(),
|
|
@@ -6012,6 +6021,18 @@ async function updateGroupImpl(callApi2, args) {
|
|
|
6012
6021
|
}
|
|
6013
6022
|
return textJson(parsed.data);
|
|
6014
6023
|
}
|
|
6024
|
+
async function deleteGroupImpl(callApi2, args) {
|
|
6025
|
+
const query = args.deleteEvidence === true ? "?deleteEvidence=1" : "";
|
|
6026
|
+
const path2 = `/api/groups/${encodeURIComponent(args.groupId)}${query}`;
|
|
6027
|
+
const res = await callApi2(path2, { method: "DELETE" });
|
|
6028
|
+
if (!res.ok) return toolError(`DELETE ${path2} returned ${res.status}`);
|
|
6029
|
+
const rawBody = await res.json();
|
|
6030
|
+
const parsed = DeleteInspectorGroupResponseSchema.safeParse(rawBody);
|
|
6031
|
+
if (!parsed.success) {
|
|
6032
|
+
return toolError("DELETE /api/groups/{groupId} returned an unparseable delete result");
|
|
6033
|
+
}
|
|
6034
|
+
return textJson(parsed.data);
|
|
6035
|
+
}
|
|
6015
6036
|
async function addGroupSessionImpl(callApi2, args) {
|
|
6016
6037
|
const { groupId, ...session } = args;
|
|
6017
6038
|
const path2 = `/api/groups/${encodeURIComponent(groupId)}/sessions`;
|
|
@@ -6599,6 +6620,17 @@ function registerTools(server) {
|
|
|
6599
6620
|
},
|
|
6600
6621
|
(args) => safeCall(() => updateGroupImpl(callApi, args))
|
|
6601
6622
|
);
|
|
6623
|
+
server.registerTool(
|
|
6624
|
+
"inspector_delete_group",
|
|
6625
|
+
{
|
|
6626
|
+
title: "Delete an Inspector group",
|
|
6627
|
+
description: "Deletes one declared Inspector group from <dataDir>/groups.json. By default this keeps exported evidence files; set deleteEvidence=true only when the local evidence pack should also be removed.",
|
|
6628
|
+
inputSchema: DeleteInspectorGroupOptionsSchema.extend({
|
|
6629
|
+
groupId: string().min(1).describe("The Inspector group id.")
|
|
6630
|
+
})
|
|
6631
|
+
},
|
|
6632
|
+
(args) => safeCall(() => deleteGroupImpl(callApi, args))
|
|
6633
|
+
);
|
|
6602
6634
|
server.registerTool(
|
|
6603
6635
|
"inspector_add_group_session",
|
|
6604
6636
|
{
|
|
@@ -7322,6 +7354,25 @@ function writeGroups(groups) {
|
|
|
7322
7354
|
function sortedGroups(groups) {
|
|
7323
7355
|
return [...groups].sort((left, right) => right.updatedAt.localeCompare(left.updatedAt));
|
|
7324
7356
|
}
|
|
7357
|
+
function isPathInside(parentPath, childPath) {
|
|
7358
|
+
const relativePath = relative(parentPath, childPath);
|
|
7359
|
+
return relativePath === "" || relativePath.length > 0 && !relativePath.startsWith("..") && !isAbsolute(relativePath);
|
|
7360
|
+
}
|
|
7361
|
+
function evidenceDirectoryFor(group) {
|
|
7362
|
+
if (group.evidence === null) return null;
|
|
7363
|
+
const root = resolve(getDataDir(), "evidence", "groups");
|
|
7364
|
+
const evidenceDir2 = resolve(dirname(group.evidence.jsonPath));
|
|
7365
|
+
return isPathInside(root, evidenceDir2) ? evidenceDir2 : null;
|
|
7366
|
+
}
|
|
7367
|
+
function removeEvidenceDirectory(evidencePath, deleteEvidence) {
|
|
7368
|
+
if (!deleteEvidence || evidencePath === null || !existsSync(evidencePath)) return false;
|
|
7369
|
+
try {
|
|
7370
|
+
rmSync(evidencePath, { recursive: true, force: true });
|
|
7371
|
+
return !existsSync(evidencePath);
|
|
7372
|
+
} catch {
|
|
7373
|
+
return false;
|
|
7374
|
+
}
|
|
7375
|
+
}
|
|
7325
7376
|
function listGroups() {
|
|
7326
7377
|
return sortedGroups(readGroups());
|
|
7327
7378
|
}
|
|
@@ -7375,6 +7426,20 @@ function updateGroup(groupId, input) {
|
|
|
7375
7426
|
writeGroups(updatedGroups);
|
|
7376
7427
|
return updatedGroup;
|
|
7377
7428
|
}
|
|
7429
|
+
function deleteGroup(groupId, options = {}) {
|
|
7430
|
+
const parsed = DeleteInspectorGroupOptionsSchema.parse(options);
|
|
7431
|
+
const groups = readGroups();
|
|
7432
|
+
const group = groups.find((candidate) => candidate.id === groupId);
|
|
7433
|
+
if (group === void 0) return null;
|
|
7434
|
+
const evidencePath = evidenceDirectoryFor(group);
|
|
7435
|
+
writeGroups(groups.filter((candidate) => candidate.id !== groupId));
|
|
7436
|
+
return {
|
|
7437
|
+
groupId: group.id,
|
|
7438
|
+
deleted: true,
|
|
7439
|
+
evidenceDeleted: removeEvidenceDirectory(evidencePath, parsed.deleteEvidence === true),
|
|
7440
|
+
evidencePath
|
|
7441
|
+
};
|
|
7442
|
+
}
|
|
7378
7443
|
function matchesExistingMember(member, memberId, sessionId, runId) {
|
|
7379
7444
|
if (member.id === memberId) return true;
|
|
7380
7445
|
if (member.sessionId !== sessionId) return false;
|
|
@@ -8574,8 +8639,8 @@ function buildOpenClawMemoryMarkdown(candidate) {
|
|
|
8574
8639
|
function resolveTargetPath(workspaceDir, relativePath) {
|
|
8575
8640
|
const root = path.resolve(workspaceDir);
|
|
8576
8641
|
const target = path.resolve(root, relativePath);
|
|
8577
|
-
const
|
|
8578
|
-
if (
|
|
8642
|
+
const relative2 = path.relative(root, target);
|
|
8643
|
+
if (relative2.startsWith("..") || path.isAbsolute(relative2)) {
|
|
8579
8644
|
return null;
|
|
8580
8645
|
}
|
|
8581
8646
|
return target;
|
|
@@ -8835,6 +8900,25 @@ async function readJsonBody$3(request) {
|
|
|
8835
8900
|
return { ok: false };
|
|
8836
8901
|
}
|
|
8837
8902
|
}
|
|
8903
|
+
function readDeleteEvidenceFlag(request) {
|
|
8904
|
+
try {
|
|
8905
|
+
const value = new URL(request.url).searchParams.get("deleteEvidence");
|
|
8906
|
+
switch (value) {
|
|
8907
|
+
case null:
|
|
8908
|
+
return { ok: true, value: void 0 };
|
|
8909
|
+
case "1":
|
|
8910
|
+
case "true":
|
|
8911
|
+
return { ok: true, value: true };
|
|
8912
|
+
case "0":
|
|
8913
|
+
case "false":
|
|
8914
|
+
return { ok: true, value: false };
|
|
8915
|
+
default:
|
|
8916
|
+
return { ok: false };
|
|
8917
|
+
}
|
|
8918
|
+
} catch {
|
|
8919
|
+
return { ok: false };
|
|
8920
|
+
}
|
|
8921
|
+
}
|
|
8838
8922
|
const Route$c = createFileRoute("/api/groups/$groupId")({
|
|
8839
8923
|
server: {
|
|
8840
8924
|
handlers: {
|
|
@@ -8862,6 +8946,20 @@ const Route$c = createFileRoute("/api/groups/$groupId")({
|
|
|
8862
8946
|
return Response.json({ error: "Group not found" }, { status: 404 });
|
|
8863
8947
|
}
|
|
8864
8948
|
return Response.json(updated);
|
|
8949
|
+
},
|
|
8950
|
+
DELETE: ({ params, request }) => {
|
|
8951
|
+
const deleteEvidence = readDeleteEvidenceFlag(request);
|
|
8952
|
+
if (!deleteEvidence.ok) {
|
|
8953
|
+
return Response.json(
|
|
8954
|
+
{ error: "deleteEvidence must be one of true, false, 1, or 0" },
|
|
8955
|
+
{ status: 400 }
|
|
8956
|
+
);
|
|
8957
|
+
}
|
|
8958
|
+
const deleted = deleteGroup(params.groupId, { deleteEvidence: deleteEvidence.value });
|
|
8959
|
+
if (deleted === null) {
|
|
8960
|
+
return Response.json({ error: "Group not found" }, { status: 404 });
|
|
8961
|
+
}
|
|
8962
|
+
return Response.json(deleted);
|
|
8865
8963
|
}
|
|
8866
8964
|
}
|
|
8867
8965
|
}
|
|
@@ -11699,18 +11797,19 @@ export {
|
|
|
11699
11797
|
stripClaudeCodeBillingHeader as f,
|
|
11700
11798
|
getSessionPath as g,
|
|
11701
11799
|
GroupEvidenceExportResultSchema as h,
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
|
|
11800
|
+
DeleteInspectorGroupResponseSchema as i,
|
|
11801
|
+
providerHasContextMetadata as j,
|
|
11802
|
+
findProviderModelMetadata as k,
|
|
11803
|
+
createPendingProviderTestResults as l,
|
|
11706
11804
|
maskApiKey as m,
|
|
11707
|
-
|
|
11708
|
-
|
|
11805
|
+
ProviderTestResultsSchema as n,
|
|
11806
|
+
createFailedProviderTestResults as o,
|
|
11709
11807
|
parseOpenAIResponse as p,
|
|
11710
|
-
|
|
11808
|
+
MAX_PROVIDER_TEST_TIMEOUT_SECONDS as q,
|
|
11711
11809
|
requestFormatForPath as r,
|
|
11712
11810
|
safeGetOwnProperty as s,
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11811
|
+
resolveProviderContextWindow as t,
|
|
11812
|
+
isPlainRecord as u,
|
|
11813
|
+
packageJson as v,
|
|
11814
|
+
router as w
|
|
11716
11815
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const tsrStartManifest = () => ({ "routes": { "__root__": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/__root.tsx", "children": ["/", "/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/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-CbRIHhJ5.js"], "assets": [] }, "/": { "filePath": "C:/Users/claw/workspace/agent-inspector/src/routes/index.tsx", "assets": [], "preloads": ["/assets/index-Drpb2qR5.js", "/assets/ProxyViewerContainer-4dG0nLRp.js"] }, "/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/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-C4z6gu9i.js", "/assets/ProxyViewerContainer-4dG0nLRp.js"] }, "/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/chunks", "/api/logs/$id/replay"] }, "/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/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-CbRIHhJ5.js" });
|
|
2
2
|
export {
|
|
3
3
|
tsrStartManifest
|
|
4
4
|
};
|
package/.output/server/index.mjs
CHANGED
|
@@ -35,103 +35,103 @@ const headers = ((m) => function headersRouteRule(event) {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
const assets = {
|
|
38
|
-
"/assets/
|
|
38
|
+
"/assets/CompareDrawer-Dgi0hhg5.js": {
|
|
39
39
|
"type": "text/javascript; charset=utf-8",
|
|
40
|
-
"etag": '"
|
|
41
|
-
"mtime": "2026-07-01T02:
|
|
42
|
-
"size":
|
|
43
|
-
"path": "../public/assets/
|
|
40
|
+
"etag": '"49fe-xiEjAxziUBLp2U+4MyMFdcyRLt4"',
|
|
41
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
42
|
+
"size": 18942,
|
|
43
|
+
"path": "../public/assets/CompareDrawer-Dgi0hhg5.js"
|
|
44
44
|
},
|
|
45
|
-
"/assets/
|
|
46
|
-
"type": "
|
|
47
|
-
"etag": '"
|
|
48
|
-
"mtime": "2026-07-01T02:
|
|
49
|
-
"size":
|
|
50
|
-
"path": "../public/assets/
|
|
45
|
+
"/assets/minimax-BPMzvuL-.jpeg": {
|
|
46
|
+
"type": "image/jpeg",
|
|
47
|
+
"etag": '"1b06-IwivU89ko5UTMUM1/t7hn4sQK9A"',
|
|
48
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
49
|
+
"size": 6918,
|
|
50
|
+
"path": "../public/assets/minimax-BPMzvuL-.jpeg"
|
|
51
51
|
},
|
|
52
52
|
"/assets/alibaba-TTwafVwX.svg": {
|
|
53
53
|
"type": "image/svg+xml",
|
|
54
54
|
"etag": '"171b-6dyV5K8QjiaY35sN9qNprh9zDIs"',
|
|
55
|
-
"mtime": "2026-07-01T02:
|
|
55
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
56
56
|
"size": 5915,
|
|
57
57
|
"path": "../public/assets/alibaba-TTwafVwX.svg"
|
|
58
58
|
},
|
|
59
|
-
"/assets/
|
|
59
|
+
"/assets/index-fUUi8iQF.css": {
|
|
60
|
+
"type": "text/css; charset=utf-8",
|
|
61
|
+
"etag": '"1ab50-FHdw0vZwiZuyNgDVyYXJw1ED+1c"',
|
|
62
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
63
|
+
"size": 109392,
|
|
64
|
+
"path": "../public/assets/index-fUUi8iQF.css"
|
|
65
|
+
},
|
|
66
|
+
"/assets/main-CbRIHhJ5.js": {
|
|
60
67
|
"type": "text/javascript; charset=utf-8",
|
|
61
|
-
"etag": '"
|
|
62
|
-
"mtime": "2026-07-01T02:
|
|
63
|
-
"size":
|
|
64
|
-
"path": "../public/assets/
|
|
68
|
+
"etag": '"51726-7iR/7Ba1JaBg7+HBrXquKkAOIK8"',
|
|
69
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
70
|
+
"size": 333606,
|
|
71
|
+
"path": "../public/assets/main-CbRIHhJ5.js"
|
|
65
72
|
},
|
|
66
|
-
"/assets/
|
|
73
|
+
"/assets/RequestAnatomy-DZMmiIiD.js": {
|
|
67
74
|
"type": "text/javascript; charset=utf-8",
|
|
68
|
-
"etag": '"
|
|
69
|
-
"mtime": "2026-07-01T02:
|
|
70
|
-
"size":
|
|
71
|
-
"path": "../public/assets/
|
|
75
|
+
"etag": '"4485-YhW7YY/GYtclcyvf2LJkOCVMHEI"',
|
|
76
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
77
|
+
"size": 17541,
|
|
78
|
+
"path": "../public/assets/RequestAnatomy-DZMmiIiD.js"
|
|
79
|
+
},
|
|
80
|
+
"/assets/qwen-CONDcHqt.png": {
|
|
81
|
+
"type": "image/png",
|
|
82
|
+
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
83
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
84
|
+
"size": 357059,
|
|
85
|
+
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
72
86
|
},
|
|
73
|
-
"/assets/
|
|
87
|
+
"/assets/index-Drpb2qR5.js": {
|
|
74
88
|
"type": "text/javascript; charset=utf-8",
|
|
75
|
-
"etag": '"
|
|
76
|
-
"mtime": "2026-07-01T02:
|
|
77
|
-
"size":
|
|
78
|
-
"path": "../public/assets/
|
|
89
|
+
"etag": '"74-b0BRfTUXud8JbwvLJWUL4DpA/mA"',
|
|
90
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
91
|
+
"size": 116,
|
|
92
|
+
"path": "../public/assets/index-Drpb2qR5.js"
|
|
79
93
|
},
|
|
80
|
-
"/assets/
|
|
81
|
-
"type": "
|
|
82
|
-
"etag": '"
|
|
83
|
-
"mtime": "2026-07-01T02:
|
|
84
|
-
"size":
|
|
85
|
-
"path": "../public/assets/
|
|
94
|
+
"/assets/ReplayDialog-BL6BwDuI.js": {
|
|
95
|
+
"type": "text/javascript; charset=utf-8",
|
|
96
|
+
"etag": '"318c-ZEe9NeGJDOgbwYSp3oEHTWJYqKE"',
|
|
97
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
98
|
+
"size": 12684,
|
|
99
|
+
"path": "../public/assets/ReplayDialog-BL6BwDuI.js"
|
|
86
100
|
},
|
|
87
|
-
"/assets/
|
|
101
|
+
"/assets/ResponseView-DJLOiTYq.js": {
|
|
88
102
|
"type": "text/javascript; charset=utf-8",
|
|
89
|
-
"etag": '"
|
|
90
|
-
"mtime": "2026-07-01T02:
|
|
91
|
-
"size":
|
|
92
|
-
"path": "../public/assets/
|
|
103
|
+
"etag": '"30d0-gq3SdkJtCaVLIPG17VnY6V5cf74"',
|
|
104
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
105
|
+
"size": 12496,
|
|
106
|
+
"path": "../public/assets/ResponseView-DJLOiTYq.js"
|
|
93
107
|
},
|
|
94
|
-
"/assets/StreamingChunkSequence
|
|
108
|
+
"/assets/StreamingChunkSequence--SxZ5cxc.js": {
|
|
95
109
|
"type": "text/javascript; charset=utf-8",
|
|
96
|
-
"etag": '"d57-
|
|
97
|
-
"mtime": "2026-07-01T02:
|
|
110
|
+
"etag": '"d57-yCXAPD9vuMrQKqedPBTP0k197FY"',
|
|
111
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
98
112
|
"size": 3415,
|
|
99
|
-
"path": "../public/assets/StreamingChunkSequence
|
|
113
|
+
"path": "../public/assets/StreamingChunkSequence--SxZ5cxc.js"
|
|
100
114
|
},
|
|
101
|
-
"/assets/
|
|
115
|
+
"/assets/_sessionId-C4z6gu9i.js": {
|
|
102
116
|
"type": "text/javascript; charset=utf-8",
|
|
103
|
-
"etag": '"
|
|
104
|
-
"mtime": "2026-07-01T02:
|
|
105
|
-
"size":
|
|
106
|
-
"path": "../public/assets/
|
|
117
|
+
"etag": '"d2-lJ7/nREjndPn5FFPUWHTPKf9Mjo"',
|
|
118
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
119
|
+
"size": 210,
|
|
120
|
+
"path": "../public/assets/_sessionId-C4z6gu9i.js"
|
|
107
121
|
},
|
|
108
122
|
"/assets/zhipuai-BPNAnxo-.svg": {
|
|
109
123
|
"type": "image/svg+xml",
|
|
110
124
|
"etag": '"2bf8-hNaLCTi89nOFCsIIfWpP/jrfo0s"',
|
|
111
|
-
"mtime": "2026-07-01T02:
|
|
125
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
112
126
|
"size": 11256,
|
|
113
127
|
"path": "../public/assets/zhipuai-BPNAnxo-.svg"
|
|
114
128
|
},
|
|
115
|
-
"/assets/
|
|
116
|
-
"type": "text/javascript; charset=utf-8",
|
|
117
|
-
"etag": '"d2-N3jVPi19Muv+Rgqnids/dlwNuhs"',
|
|
118
|
-
"mtime": "2026-07-01T02:23:48.450Z",
|
|
119
|
-
"size": 210,
|
|
120
|
-
"path": "../public/assets/_sessionId-BhNTuZ31.js"
|
|
121
|
-
},
|
|
122
|
-
"/assets/qwen-CONDcHqt.png": {
|
|
123
|
-
"type": "image/png",
|
|
124
|
-
"etag": '"572c3-cdJAPaHdOvFCGzuaQjagdgOu6XE"',
|
|
125
|
-
"mtime": "2026-07-01T02:23:48.448Z",
|
|
126
|
-
"size": 357059,
|
|
127
|
-
"path": "../public/assets/qwen-CONDcHqt.png"
|
|
128
|
-
},
|
|
129
|
-
"/assets/ProxyViewerContainer-BxRaXhKR.js": {
|
|
129
|
+
"/assets/ProxyViewerContainer-4dG0nLRp.js": {
|
|
130
130
|
"type": "text/javascript; charset=utf-8",
|
|
131
|
-
"etag": '"
|
|
132
|
-
"mtime": "2026-07-01T02:
|
|
133
|
-
"size":
|
|
134
|
-
"path": "../public/assets/ProxyViewerContainer-
|
|
131
|
+
"etag": '"b55a4-FuZ9Fa8f20x/37a1GMLEO+8T0tM"',
|
|
132
|
+
"mtime": "2026-07-01T02:41:45.885Z",
|
|
133
|
+
"size": 742820,
|
|
134
|
+
"path": "../public/assets/ProxyViewerContainer-4dG0nLRp.js"
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
function readAsset(id) {
|