@tonyclaw/agent-inspector 2.0.33 → 2.0.35
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/cli.js +19 -1
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{CompareDrawer-ClTJxdoU.js → CompareDrawer-Cin0_f71.js} +1 -1
- package/.output/public/assets/{ProxyViewerContainer--Pes01q2.js → ProxyViewerContainer-BVlcRirf.js} +9 -9
- package/.output/public/assets/{ReplayDialog-iuzfh85b.js → ReplayDialog-C6nOMhjx.js} +1 -1
- package/.output/public/assets/{RequestAnatomy-FZnnP9Gx.js → RequestAnatomy-DenWbdqV.js} +1 -1
- package/.output/public/assets/{ResponseView-MZ6ZWvbL.js → ResponseView-BsalZiZ5.js} +1 -1
- package/.output/public/assets/{StreamingChunkSequence-B8mZMdzs.js → StreamingChunkSequence-Cla2X13P.js} +1 -1
- package/.output/public/assets/_sessionId-DkhHqlzB.js +1 -0
- package/.output/public/assets/index-AiQY20d7.js +1 -0
- package/.output/public/assets/index-BfGJEb-2.css +1 -0
- package/.output/public/assets/{main-B797Hnge.js → main-eD8hEOHT.js} +2 -2
- package/.output/server/_libs/ajv.mjs +827 -6191
- package/.output/server/_libs/cookie-es.mjs +7 -21
- package/.output/server/_libs/h3-v2.mjs +18 -7
- package/.output/server/_libs/json-schema-traverse.mjs +1 -90
- package/.output/server/_libs/seroval-plugins.mjs +5 -5
- package/.output/server/_libs/seroval.mjs +606 -596
- package/.output/server/_libs/srvx.mjs +10 -5
- package/.output/server/_libs/tanstack__history.mjs +55 -38
- package/.output/server/_libs/tanstack__router-core.mjs +4366 -4075
- package/.output/server/{_sessionId-DD05qd8d.mjs → _sessionId-URSu2XsA.mjs} +4 -4
- package/.output/server/_ssr/{CompareDrawer-oGOG5-kQ.mjs → CompareDrawer-BbBPKdVc.mjs} +4 -4
- package/.output/server/_ssr/{ProxyViewerContainer-Bbl5tqT1.mjs → ProxyViewerContainer-DtQxtOpi.mjs} +15 -7
- package/.output/server/_ssr/{ReplayDialog-BegfwWIy.mjs → ReplayDialog-BU20cMGd.mjs} +5 -5
- package/.output/server/_ssr/{RequestAnatomy-BW_X2DyZ.mjs → RequestAnatomy-a5ySAAG1.mjs} +4 -4
- package/.output/server/_ssr/{ResponseView-Bx_uJ4RS.mjs → ResponseView-CA_QM1fM.mjs} +4 -4
- package/.output/server/_ssr/{StreamingChunkSequence-CQp5QQnB.mjs → StreamingChunkSequence-DJjITqM7.mjs} +4 -4
- package/.output/server/_ssr/{index-ODSKeDD8.mjs → index-DIFzLUAV.mjs} +4 -4
- package/.output/server/_ssr/index.mjs +20 -11
- package/.output/server/_ssr/{router-QcI4GOvo.mjs → router-aVeuM_1d.mjs} +5193 -5269
- package/.output/server/{_tanstack-start-manifest_v-dEujKJ3-.mjs → _tanstack-start-manifest_v-BNlafGbl.mjs} +1 -1
- package/.output/server/index.mjs +65 -65
- package/README.md +28 -0
- package/package.json +6 -2
- package/src/cli/templates/codex-skill-onboard.ts +19 -1
- package/src/components/providers/SettingsDialog.tsx +10 -0
- package/src/lib/groupContract.ts +0 -2
- package/src/lib/runContract.ts +0 -3
- package/src/mcp/server.ts +101 -164
- package/src/mcp/toolHandlers.ts +80 -177
- package/src/routes/api/groups.$groupId.evidence.ts +14 -33
- package/src/routes/api/groups.$groupId.sessions.ts +9 -9
- package/src/routes/api/groups.$groupId.ts +19 -13
- package/src/routes/api/groups.ts +3 -3
- package/src/routes/api/runs.$runId.evidence.ts +14 -21
- package/src/routes/api/runs.$runId.ts +9 -9
- package/src/routes/api/runs.ts +9 -5
- package/src/services/groups.ts +110 -0
- package/src/services/result.ts +17 -0
- package/src/services/runs.ts +76 -0
- package/.output/public/assets/_sessionId-Bc26Rfxs.js +0 -1
- package/.output/public/assets/index-C6AiRPsJ.js +0 -1
- package/.output/public/assets/index-C_8PFAm2.css +0 -1
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
function splitSetCookieString(cookiesString) {
|
|
2
|
-
if (Array.isArray(cookiesString))
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
if (typeof cookiesString !== "string") {
|
|
6
|
-
return [];
|
|
7
|
-
}
|
|
2
|
+
if (Array.isArray(cookiesString)) return cookiesString.flatMap((c) => splitSetCookieString(c));
|
|
3
|
+
if (typeof cookiesString !== "string") return [];
|
|
8
4
|
const cookiesStrings = [];
|
|
9
5
|
let pos = 0;
|
|
10
6
|
let start;
|
|
@@ -13,9 +9,7 @@ function splitSetCookieString(cookiesString) {
|
|
|
13
9
|
let nextStart;
|
|
14
10
|
let cookiesSeparatorFound;
|
|
15
11
|
const skipWhitespace = () => {
|
|
16
|
-
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos)))
|
|
17
|
-
pos += 1;
|
|
18
|
-
}
|
|
12
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) pos += 1;
|
|
19
13
|
return pos < cookiesString.length;
|
|
20
14
|
};
|
|
21
15
|
const notSpecialChar = () => {
|
|
@@ -32,24 +26,16 @@ function splitSetCookieString(cookiesString) {
|
|
|
32
26
|
pos += 1;
|
|
33
27
|
skipWhitespace();
|
|
34
28
|
nextStart = pos;
|
|
35
|
-
while (pos < cookiesString.length && notSpecialChar())
|
|
36
|
-
pos += 1;
|
|
37
|
-
}
|
|
29
|
+
while (pos < cookiesString.length && notSpecialChar()) pos += 1;
|
|
38
30
|
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
39
31
|
cookiesSeparatorFound = true;
|
|
40
32
|
pos = nextStart;
|
|
41
33
|
cookiesStrings.push(cookiesString.slice(start, lastComma));
|
|
42
34
|
start = pos;
|
|
43
|
-
} else
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
pos += 1;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
51
|
-
cookiesStrings.push(cookiesString.slice(start));
|
|
35
|
+
} else pos = lastComma + 1;
|
|
36
|
+
} else pos += 1;
|
|
52
37
|
}
|
|
38
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) cookiesStrings.push(cookiesString.slice(start));
|
|
53
39
|
}
|
|
54
40
|
return cookiesStrings;
|
|
55
41
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { a as NullProtoObj } from "./rou3.mjs";
|
|
2
2
|
import { a as FastURL, b as NodeResponse } from "./srvx.mjs";
|
|
3
|
+
function decodePathname(pathname) {
|
|
4
|
+
return decodeURI(pathname.includes("%25") ? pathname.replace(/%25/g, "%2525") : pathname);
|
|
5
|
+
}
|
|
3
6
|
const kEventNS = "h3.internal.event.";
|
|
4
7
|
const kEventRes = /* @__PURE__ */ Symbol.for(`${kEventNS}res`);
|
|
5
8
|
const kEventResHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.headers`);
|
|
9
|
+
const kEventResErrHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.err.headers`);
|
|
6
10
|
var H3Event = class {
|
|
7
11
|
app;
|
|
8
12
|
req;
|
|
@@ -14,7 +18,9 @@ var H3Event = class {
|
|
|
14
18
|
this.req = req;
|
|
15
19
|
this.app = app;
|
|
16
20
|
const _url = req._url;
|
|
17
|
-
|
|
21
|
+
const url = _url && _url instanceof URL ? _url : new FastURL(req.url);
|
|
22
|
+
if (url.pathname.includes("%")) url.pathname = decodePathname(url.pathname);
|
|
23
|
+
this.url = url;
|
|
18
24
|
}
|
|
19
25
|
get res() {
|
|
20
26
|
return this[kEventRes] ||= new H3EventResponse();
|
|
@@ -50,6 +56,9 @@ var H3EventResponse = class {
|
|
|
50
56
|
get headers() {
|
|
51
57
|
return this[kEventResHeaders] ||= new Headers();
|
|
52
58
|
}
|
|
59
|
+
get errHeaders() {
|
|
60
|
+
return this[kEventResErrHeaders] ||= new Headers();
|
|
61
|
+
}
|
|
53
62
|
};
|
|
54
63
|
const DISALLOWED_STATUS_CHARS = /[^\u0009\u0020-\u007E]/g;
|
|
55
64
|
function sanitizeStatusMessage(statusMessage = "") {
|
|
@@ -89,8 +98,8 @@ var HTTPError = class HTTPError2 extends Error {
|
|
|
89
98
|
messageInput = arg1;
|
|
90
99
|
details = arg2;
|
|
91
100
|
} else details = arg1;
|
|
92
|
-
const status = sanitizeStatusCode(details?.status || details?.
|
|
93
|
-
const statusText = sanitizeStatusMessage(details?.statusText || details?.
|
|
101
|
+
const status = sanitizeStatusCode(details?.status || details?.statusCode || details?.cause?.status || details?.cause?.statusCode, 500);
|
|
102
|
+
const statusText = sanitizeStatusMessage(details?.statusText || details?.statusMessage || details?.cause?.statusText || details?.cause?.statusMessage);
|
|
94
103
|
const message = messageInput || details?.message || details?.cause?.message || details?.statusText || details?.statusMessage || [
|
|
95
104
|
"HTTPError",
|
|
96
105
|
status,
|
|
@@ -176,7 +185,8 @@ function prepareResponse(val, event, config, nested) {
|
|
|
176
185
|
}
|
|
177
186
|
if (error.unhandled && !config.silent) console.error(error);
|
|
178
187
|
const { onError } = config;
|
|
179
|
-
|
|
188
|
+
const errHeaders = event[kEventRes]?.[kEventResErrHeaders];
|
|
189
|
+
return onError && !nested ? Promise.resolve(onError(error, event)).catch((error2) => error2).then((newVal) => prepareResponse(newVal ?? val, event, config, true)) : errorResponse(error, config.debug, errHeaders);
|
|
180
190
|
}
|
|
181
191
|
const preparedRes = event[kEventRes];
|
|
182
192
|
const preparedHeaders = preparedRes?.[kEventResHeaders];
|
|
@@ -259,17 +269,18 @@ function prepareResponseBody(val, event, config) {
|
|
|
259
269
|
function nullBody(method, status) {
|
|
260
270
|
return method === "HEAD" || status === 100 || status === 101 || status === 102 || status === 204 || status === 205 || status === 304;
|
|
261
271
|
}
|
|
262
|
-
function errorResponse(error, debug) {
|
|
272
|
+
function errorResponse(error, debug, errHeaders) {
|
|
273
|
+
let headers = error.headers ? mergeHeaders$1(jsonHeaders, error.headers) : new Headers(jsonHeaders);
|
|
274
|
+
if (errHeaders) headers = mergeHeaders$1(headers, errHeaders);
|
|
263
275
|
return new NodeResponse(JSON.stringify({
|
|
264
276
|
...error.toJSON(),
|
|
265
277
|
stack: debug && error.stack ? error.stack.split("\n").map((l) => l.trim()) : void 0
|
|
266
278
|
}, void 0, debug ? 2 : void 0), {
|
|
267
279
|
status: error.status,
|
|
268
280
|
statusText: error.statusText,
|
|
269
|
-
headers
|
|
281
|
+
headers
|
|
270
282
|
});
|
|
271
283
|
}
|
|
272
|
-
new TextEncoder();
|
|
273
284
|
export {
|
|
274
285
|
H3Event as H,
|
|
275
286
|
toResponse as t
|
|
@@ -1,91 +1,3 @@
|
|
|
1
|
-
var jsonSchemaTraverse$1 = { exports: {} };
|
|
2
|
-
var hasRequiredJsonSchemaTraverse$1;
|
|
3
|
-
function requireJsonSchemaTraverse$1() {
|
|
4
|
-
if (hasRequiredJsonSchemaTraverse$1) return jsonSchemaTraverse$1.exports;
|
|
5
|
-
hasRequiredJsonSchemaTraverse$1 = 1;
|
|
6
|
-
var traverse = jsonSchemaTraverse$1.exports = function(schema, opts, cb) {
|
|
7
|
-
if (typeof opts == "function") {
|
|
8
|
-
cb = opts;
|
|
9
|
-
opts = {};
|
|
10
|
-
}
|
|
11
|
-
cb = opts.cb || cb;
|
|
12
|
-
var pre = typeof cb == "function" ? cb : cb.pre || function() {
|
|
13
|
-
};
|
|
14
|
-
var post = cb.post || function() {
|
|
15
|
-
};
|
|
16
|
-
_traverse(opts, pre, post, schema, "", schema);
|
|
17
|
-
};
|
|
18
|
-
traverse.keywords = {
|
|
19
|
-
additionalItems: true,
|
|
20
|
-
items: true,
|
|
21
|
-
contains: true,
|
|
22
|
-
additionalProperties: true,
|
|
23
|
-
propertyNames: true,
|
|
24
|
-
not: true,
|
|
25
|
-
if: true,
|
|
26
|
-
then: true,
|
|
27
|
-
else: true
|
|
28
|
-
};
|
|
29
|
-
traverse.arrayKeywords = {
|
|
30
|
-
items: true,
|
|
31
|
-
allOf: true,
|
|
32
|
-
anyOf: true,
|
|
33
|
-
oneOf: true
|
|
34
|
-
};
|
|
35
|
-
traverse.propsKeywords = {
|
|
36
|
-
$defs: true,
|
|
37
|
-
definitions: true,
|
|
38
|
-
properties: true,
|
|
39
|
-
patternProperties: true,
|
|
40
|
-
dependencies: true
|
|
41
|
-
};
|
|
42
|
-
traverse.skipKeywords = {
|
|
43
|
-
default: true,
|
|
44
|
-
enum: true,
|
|
45
|
-
const: true,
|
|
46
|
-
required: true,
|
|
47
|
-
maximum: true,
|
|
48
|
-
minimum: true,
|
|
49
|
-
exclusiveMaximum: true,
|
|
50
|
-
exclusiveMinimum: true,
|
|
51
|
-
multipleOf: true,
|
|
52
|
-
maxLength: true,
|
|
53
|
-
minLength: true,
|
|
54
|
-
pattern: true,
|
|
55
|
-
format: true,
|
|
56
|
-
maxItems: true,
|
|
57
|
-
minItems: true,
|
|
58
|
-
uniqueItems: true,
|
|
59
|
-
maxProperties: true,
|
|
60
|
-
minProperties: true
|
|
61
|
-
};
|
|
62
|
-
function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
|
|
63
|
-
if (schema && typeof schema == "object" && !Array.isArray(schema)) {
|
|
64
|
-
pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
65
|
-
for (var key in schema) {
|
|
66
|
-
var sch = schema[key];
|
|
67
|
-
if (Array.isArray(sch)) {
|
|
68
|
-
if (key in traverse.arrayKeywords) {
|
|
69
|
-
for (var i = 0; i < sch.length; i++)
|
|
70
|
-
_traverse(opts, pre, post, sch[i], jsonPtr + "/" + key + "/" + i, rootSchema, jsonPtr, key, schema, i);
|
|
71
|
-
}
|
|
72
|
-
} else if (key in traverse.propsKeywords) {
|
|
73
|
-
if (sch && typeof sch == "object") {
|
|
74
|
-
for (var prop in sch)
|
|
75
|
-
_traverse(opts, pre, post, sch[prop], jsonPtr + "/" + key + "/" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
|
|
76
|
-
}
|
|
77
|
-
} else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) {
|
|
78
|
-
_traverse(opts, pre, post, sch, jsonPtr + "/" + key, rootSchema, jsonPtr, key, schema);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function escapeJsonPtr(str) {
|
|
85
|
-
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
86
|
-
}
|
|
87
|
-
return jsonSchemaTraverse$1.exports;
|
|
88
|
-
}
|
|
89
1
|
var jsonSchemaTraverse = { exports: {} };
|
|
90
2
|
var hasRequiredJsonSchemaTraverse;
|
|
91
3
|
function requireJsonSchemaTraverse() {
|
|
@@ -175,6 +87,5 @@ function requireJsonSchemaTraverse() {
|
|
|
175
87
|
return jsonSchemaTraverse.exports;
|
|
176
88
|
}
|
|
177
89
|
export {
|
|
178
|
-
requireJsonSchemaTraverse as
|
|
179
|
-
requireJsonSchemaTraverse$1 as r
|
|
90
|
+
requireJsonSchemaTraverse as r
|
|
180
91
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ai, r as re } from "./seroval.mjs";
|
|
2
2
|
var n = {}, P = (e) => new ReadableStream({ start: (r) => {
|
|
3
3
|
e.on({ next: (a) => {
|
|
4
4
|
try {
|
|
@@ -13,7 +13,7 @@ var n = {}, P = (e) => new ReadableStream({ start: (r) => {
|
|
|
13
13
|
} catch (a) {
|
|
14
14
|
}
|
|
15
15
|
} });
|
|
16
|
-
} }), x =
|
|
16
|
+
} }), x = ai({ tag: "seroval-plugins/web/ReadableStreamFactory", test(e) {
|
|
17
17
|
return e === n;
|
|
18
18
|
}, parse: { sync() {
|
|
19
19
|
return n;
|
|
@@ -27,7 +27,7 @@ var n = {}, P = (e) => new ReadableStream({ start: (r) => {
|
|
|
27
27
|
return n;
|
|
28
28
|
} });
|
|
29
29
|
function w(e) {
|
|
30
|
-
let r =
|
|
30
|
+
let r = re(), a = e.getReader();
|
|
31
31
|
async function t() {
|
|
32
32
|
try {
|
|
33
33
|
let s = await a.read();
|
|
@@ -39,10 +39,10 @@ function w(e) {
|
|
|
39
39
|
return t().catch(() => {
|
|
40
40
|
}), r;
|
|
41
41
|
}
|
|
42
|
-
var ee =
|
|
42
|
+
var ee = ai({ tag: "seroval/plugins/web/ReadableStream", extends: [x], test(e) {
|
|
43
43
|
return typeof ReadableStream == "undefined" ? false : e instanceof ReadableStream;
|
|
44
44
|
}, parse: { sync(e, r) {
|
|
45
|
-
return { factory: r.parse(n), stream: r.parse(
|
|
45
|
+
return { factory: r.parse(n), stream: r.parse(re()) };
|
|
46
46
|
}, async async(e, r) {
|
|
47
47
|
return { factory: await r.parse(n), stream: await r.parse(w(e)) };
|
|
48
48
|
}, stream(e, r) {
|