@tonyclaw/agent-inspector 2.0.32 → 2.0.34

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.
Files changed (52) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/{CompareDrawer-Dgi0hhg5.js → CompareDrawer-s5T7W5_w.js} +1 -1
  3. package/.output/public/assets/{ProxyViewerContainer-4dG0nLRp.js → ProxyViewerContainer-DfGfP9VH.js} +22 -22
  4. package/.output/public/assets/{ReplayDialog-BL6BwDuI.js → ReplayDialog-DIxp-ccL.js} +1 -1
  5. package/.output/public/assets/{RequestAnatomy-DZMmiIiD.js → RequestAnatomy-tfdpiRgw.js} +1 -1
  6. package/.output/public/assets/{ResponseView-DJLOiTYq.js → ResponseView-DMZp3aLW.js} +1 -1
  7. package/.output/public/assets/{StreamingChunkSequence--SxZ5cxc.js → StreamingChunkSequence-xXzLVw7m.js} +1 -1
  8. package/.output/public/assets/_sessionId-Dfxcty_X.js +1 -0
  9. package/.output/public/assets/index-C_8PFAm2.css +1 -0
  10. package/.output/public/assets/index-DztLtWHr.js +1 -0
  11. package/.output/public/assets/{main-CbRIHhJ5.js → main-DHq8ZD95.js} +2 -2
  12. package/.output/server/_libs/ajv.mjs +827 -6191
  13. package/.output/server/_libs/cookie-es.mjs +7 -21
  14. package/.output/server/_libs/h3-v2.mjs +18 -7
  15. package/.output/server/_libs/json-schema-traverse.mjs +1 -90
  16. package/.output/server/_libs/seroval-plugins.mjs +5 -5
  17. package/.output/server/_libs/seroval.mjs +606 -596
  18. package/.output/server/_libs/srvx.mjs +10 -5
  19. package/.output/server/_libs/tanstack__history.mjs +55 -38
  20. package/.output/server/_libs/tanstack__router-core.mjs +4366 -4075
  21. package/.output/server/{_sessionId-DNfumR8F.mjs → _sessionId-Bow47H8m.mjs} +4 -4
  22. package/.output/server/_ssr/{CompareDrawer-CzgjhnUa.mjs → CompareDrawer-Ctn56NJX.mjs} +4 -4
  23. package/.output/server/_ssr/{ProxyViewerContainer-BqOcZ7en.mjs → ProxyViewerContainer-DgPsLI2Q.mjs} +131 -122
  24. package/.output/server/_ssr/{ReplayDialog-DmEknIL8.mjs → ReplayDialog-BD9_rksD.mjs} +5 -5
  25. package/.output/server/_ssr/{RequestAnatomy-DNoiMudY.mjs → RequestAnatomy-BJyzD8pO.mjs} +4 -4
  26. package/.output/server/_ssr/{ResponseView-C_cRrleT.mjs → ResponseView-lebGC0QX.mjs} +4 -4
  27. package/.output/server/_ssr/{StreamingChunkSequence-DHZ9Q_dL.mjs → StreamingChunkSequence-BcOLywzn.mjs} +4 -4
  28. package/.output/server/_ssr/{index-coYS9XyS.mjs → index-CgJOsItz.mjs} +4 -4
  29. package/.output/server/_ssr/index.mjs +20 -11
  30. package/.output/server/_ssr/{router-DUb5lKw1.mjs → router-BMv4lGQi.mjs} +5193 -5269
  31. package/.output/server/{_tanstack-start-manifest_v-xcG1o8Vt.mjs → _tanstack-start-manifest_v-D2LyT1-l.mjs} +1 -1
  32. package/.output/server/index.mjs +68 -68
  33. package/README.md +23 -0
  34. package/package.json +6 -2
  35. package/src/components/groups/GroupsDialog.tsx +132 -121
  36. package/src/lib/groupContract.ts +0 -2
  37. package/src/lib/runContract.ts +0 -3
  38. package/src/mcp/server.ts +101 -164
  39. package/src/mcp/toolHandlers.ts +80 -177
  40. package/src/routes/api/groups.$groupId.evidence.ts +14 -33
  41. package/src/routes/api/groups.$groupId.sessions.ts +9 -9
  42. package/src/routes/api/groups.$groupId.ts +19 -13
  43. package/src/routes/api/groups.ts +3 -3
  44. package/src/routes/api/runs.$runId.evidence.ts +14 -21
  45. package/src/routes/api/runs.$runId.ts +9 -9
  46. package/src/routes/api/runs.ts +9 -5
  47. package/src/services/groups.ts +110 -0
  48. package/src/services/result.ts +17 -0
  49. package/src/services/runs.ts +76 -0
  50. package/.output/public/assets/_sessionId-C4z6gu9i.js +0 -1
  51. package/.output/public/assets/index-Drpb2qR5.js +0 -1
  52. package/.output/public/assets/index-fUUi8iQF.css +0 -1
@@ -30,7 +30,7 @@ function lazyInherit$1(target, source, sourceKey) {
30
30
  if (modified) Object.defineProperty(target, key, desc);
31
31
  }
32
32
  }
33
- const _needsNormRE = /(?:(?:^|\/)(?:\.|\.\.|%2e|%2e\.|\.%2e|%2e%2e)(?:\/|$))|[\\^\x80-\uffff]/i;
33
+ const _needsNormRE$1 = /(?:(?:^|\/)(?:\.|\.\.|%2e|%2e\.|\.%2e|%2e%2e)(?:\/|$))|[\\^\x80-\uffff]/i;
34
34
  const FastURL$1 = /* @__PURE__ */ (() => {
35
35
  const NativeURL = globalThis.URL;
36
36
  const FastURL2 = class URL {
@@ -45,7 +45,7 @@ const FastURL$1 = /* @__PURE__ */ (() => {
45
45
  constructor(url) {
46
46
  if (typeof url === "string") if (url[0] === "/") this.#href = url;
47
47
  else this.#url = new NativeURL(url);
48
- else if (_needsNormRE.test(url.pathname)) this.#url = new NativeURL(`${url.protocol || "http:"}//${url.host || "localhost"}${url.pathname}${url.search || ""}`);
48
+ else if (_needsNormRE$1.test(url.pathname)) this.#url = new NativeURL(`${url.protocol || "http:"}//${url.host || "localhost"}${url.pathname}${url.search || ""}`);
49
49
  else {
50
50
  this.#protocol = url.protocol;
51
51
  this.#host = url.host;
@@ -814,6 +814,7 @@ function lazyInherit(target, source, sourceKey) {
814
814
  if (modified) Object.defineProperty(target, key, desc);
815
815
  }
816
816
  }
817
+ const _needsNormRE = /(?:(?:^|\/)(?:\.|\.\.|%2e|%2e\.|\.%2e|%2e%2e)(?:\/|$))|[\\^\x80-\uffff]/i;
817
818
  const FastURL = /* @__PURE__ */ (() => {
818
819
  const NativeURL = globalThis.URL;
819
820
  const FastURL2 = class URL {
@@ -826,7 +827,9 @@ const FastURL = /* @__PURE__ */ (() => {
826
827
  #searchParams;
827
828
  #pos;
828
829
  constructor(url) {
829
- if (typeof url === "string") this.#href = url;
830
+ if (typeof url === "string") if (url[0] === "/") this.#href = url;
831
+ else this.#url = new NativeURL(url);
832
+ else if (_needsNormRE.test(url.pathname)) this.#url = new NativeURL(`${url.protocol || "http:"}//${url.host || "localhost"}${url.pathname}${url.search || ""}`);
830
833
  else {
831
834
  this.#protocol = url.protocol;
832
835
  this.#host = url.host;
@@ -859,10 +862,11 @@ const FastURL = /* @__PURE__ */ (() => {
859
862
  const url = this.href;
860
863
  const protoIndex = url.indexOf("://");
861
864
  const pathnameIndex = protoIndex === -1 ? -1 : url.indexOf("/", protoIndex + 4);
865
+ const qIndex = pathnameIndex === -1 ? -1 : url.indexOf("?", pathnameIndex);
862
866
  this.#pos = [
863
867
  protoIndex,
864
868
  pathnameIndex,
865
- pathnameIndex === -1 ? -1 : url.indexOf("?", pathnameIndex)
869
+ qIndex
866
870
  ];
867
871
  }
868
872
  return this.#pos;
@@ -896,7 +900,8 @@ const FastURL = /* @__PURE__ */ (() => {
896
900
  if (this.#protocol === void 0) {
897
901
  const [protocolIndex] = this.#getPos();
898
902
  if (protocolIndex === -1) return this._url.protocol;
899
- this.#protocol = this.href.slice(0, protocolIndex + 1);
903
+ const url = this.href;
904
+ this.#protocol = url.slice(0, protocolIndex + 1);
900
905
  }
901
906
  return this.#protocol;
902
907
  }
@@ -1,39 +1,34 @@
1
- const stateIndexKey = "__TSR_index";
1
+ var stateIndexKey$1 = "__TSR_index";
2
2
  function createHistory(opts) {
3
3
  let location = opts.getLocation();
4
4
  const subscribers = /* @__PURE__ */ new Set();
5
5
  const notify = (action) => {
6
6
  location = opts.getLocation();
7
- subscribers.forEach((subscriber) => subscriber({ location, action }));
7
+ subscribers.forEach((subscriber) => subscriber({
8
+ location,
9
+ action
10
+ }));
8
11
  };
9
12
  const handleIndexChange = (action) => {
10
13
  if (opts.notifyOnIndexChange ?? true) notify(action);
11
14
  else location = opts.getLocation();
12
15
  };
13
- const tryNavigation = async ({
14
- task,
15
- navigateOpts,
16
- ...actionInfo
17
- }) => {
18
- const ignoreBlocker = navigateOpts?.ignoreBlocker ?? false;
19
- if (ignoreBlocker) {
16
+ const tryNavigation = async ({ task, navigateOpts, ...actionInfo }) => {
17
+ if (navigateOpts?.ignoreBlocker ?? false) {
20
18
  task();
21
19
  return;
22
20
  }
23
21
  const blockers = opts.getBlockers?.() ?? [];
24
22
  const isPushOrReplace = actionInfo.type === "PUSH" || actionInfo.type === "REPLACE";
25
- if (typeof document !== "undefined" && blockers.length && isPushOrReplace) {
26
- for (const blocker of blockers) {
27
- const nextLocation = parseHref(actionInfo.path, actionInfo.state);
28
- const isBlocked = await blocker.blockerFn({
29
- currentLocation: location,
30
- nextLocation,
31
- action: actionInfo.type
32
- });
33
- if (isBlocked) {
34
- opts.onBlocked?.();
35
- return;
36
- }
23
+ if (typeof document !== "undefined" && blockers.length && isPushOrReplace) for (const blocker of blockers) {
24
+ const nextLocation = parseHref$1(actionInfo.path, actionInfo.state);
25
+ if (await blocker.blockerFn({
26
+ currentLocation: location,
27
+ nextLocation,
28
+ action: actionInfo.type
29
+ })) {
30
+ opts.onBlocked?.();
31
+ return;
37
32
  }
38
33
  }
39
34
  task();
@@ -53,7 +48,7 @@ function createHistory(opts) {
53
48
  };
54
49
  },
55
50
  push: (path, state, navigateOpts) => {
56
- const currentIndex = location.state[stateIndexKey];
51
+ const currentIndex = location.state[stateIndexKey$1];
57
52
  state = assignKeyAndIndex(currentIndex + 1, state);
58
53
  tryNavigation({
59
54
  task: () => {
@@ -67,7 +62,7 @@ function createHistory(opts) {
67
62
  });
68
63
  },
69
64
  replace: (path, state, navigateOpts) => {
70
- const currentIndex = location.state[stateIndexKey];
65
+ const currentIndex = location.state[stateIndexKey$1];
71
66
  state = assignKeyAndIndex(currentIndex, state);
72
67
  tryNavigation({
73
68
  task: () => {
@@ -84,7 +79,10 @@ function createHistory(opts) {
84
79
  tryNavigation({
85
80
  task: () => {
86
81
  opts.go(index);
87
- handleIndexChange({ type: "GO", index });
82
+ handleIndexChange({
83
+ type: "GO",
84
+ index
85
+ });
88
86
  },
89
87
  navigateOpts,
90
88
  type: "GO"
@@ -110,7 +108,7 @@ function createHistory(opts) {
110
108
  type: "FORWARD"
111
109
  });
112
110
  },
113
- canGoBack: () => location.state[stateIndexKey] !== 0,
111
+ canGoBack: () => location.state[stateIndexKey$1] !== 0,
114
112
  createHref: (str) => opts.createHref(str),
115
113
  block: (blocker) => {
116
114
  if (!opts.setBlockers) return () => {
@@ -128,27 +126,20 @@ function createHistory(opts) {
128
126
  };
129
127
  }
130
128
  function assignKeyAndIndex(index, state) {
131
- if (!state) {
132
- state = {};
133
- }
134
- const key = createRandomKey();
129
+ if (!state) state = {};
130
+ const key = createRandomKey$1();
135
131
  return {
136
132
  ...state,
137
133
  key,
138
- // TODO: Remove in v2 - use __TSR_key instead
139
134
  __TSR_key: key,
140
- [stateIndexKey]: index
135
+ [stateIndexKey$1]: index
141
136
  };
142
137
  }
143
- function createMemoryHistory(opts = {
144
- initialEntries: ["/"]
145
- }) {
138
+ function createMemoryHistory(opts = { initialEntries: ["/"] }) {
146
139
  const entries = opts.initialEntries;
147
140
  let index = opts.initialIndex ? Math.min(Math.max(opts.initialIndex, 0), entries.length - 1) : entries.length - 1;
148
- const states = entries.map(
149
- (_entry, index2) => assignKeyAndIndex(index2, void 0)
150
- );
151
- const getLocation = () => parseHref(entries[index], states[index]);
141
+ const states = entries.map((_entry, index2) => assignKeyAndIndex(index2, void 0));
142
+ const getLocation = () => parseHref$1(entries[index], states[index]);
152
143
  let blockers = [];
153
144
  const _getBlockers = () => blockers;
154
145
  const _setBlockers = (newBlockers) => blockers = newBlockers;
@@ -182,6 +173,32 @@ function createMemoryHistory(opts = {
182
173
  setBlockers: _setBlockers
183
174
  });
184
175
  }
176
+ function sanitizePath$1(path) {
177
+ let sanitized = path.replace(/[\x00-\x1f\x7f]/g, "");
178
+ if (sanitized.startsWith("//")) sanitized = "/" + sanitized.replace(/^\/+/, "");
179
+ return sanitized;
180
+ }
181
+ function parseHref$1(href, state) {
182
+ const sanitizedHref = sanitizePath$1(href);
183
+ const hashIndex = sanitizedHref.indexOf("#");
184
+ const searchIndex = sanitizedHref.indexOf("?");
185
+ const addedKey = createRandomKey$1();
186
+ return {
187
+ href: sanitizedHref,
188
+ pathname: sanitizedHref.substring(0, hashIndex > 0 ? searchIndex > 0 ? Math.min(hashIndex, searchIndex) : hashIndex : searchIndex > 0 ? searchIndex : sanitizedHref.length),
189
+ hash: hashIndex > -1 ? sanitizedHref.substring(hashIndex) : "",
190
+ search: searchIndex > -1 ? sanitizedHref.slice(searchIndex, hashIndex === -1 ? void 0 : hashIndex) : "",
191
+ state: state || {
192
+ [stateIndexKey$1]: 0,
193
+ key: addedKey,
194
+ __TSR_key: addedKey
195
+ }
196
+ };
197
+ }
198
+ function createRandomKey$1() {
199
+ return (Math.random() + 1).toString(36).substring(7);
200
+ }
201
+ const stateIndexKey = "__TSR_index";
185
202
  function sanitizePath(path) {
186
203
  let sanitized = path.replace(/[\x00-\x1f\x7f]/g, "");
187
204
  if (sanitized.startsWith("//")) {