@tonyclaw/agent-inspector 2.0.38 → 2.0.40

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 (35) hide show
  1. package/.output/cli.js +528 -24
  2. package/.output/nitro.json +1 -1
  3. package/.output/public/assets/{CompareDrawer-hc5OoAls.js → CompareDrawer-p0uYxW7_.js} +1 -1
  4. package/.output/public/assets/{ProxyViewerContainer-BMKBs8Qz.js → ProxyViewerContainer-BGqeiYKD.js} +26 -26
  5. package/.output/public/assets/{ReplayDialog-CN-KM2nu.js → ReplayDialog-TTTVCMe9.js} +1 -1
  6. package/.output/public/assets/{RequestAnatomy-B1kTlAUk.js → RequestAnatomy-c8ru0pS-.js} +1 -1
  7. package/.output/public/assets/{ResponseView-BchUjKjt.js → ResponseView-D59jTMy4.js} +1 -1
  8. package/.output/public/assets/{StreamingChunkSequence-BQOxI9Hi.js → StreamingChunkSequence-UlAMVF9j.js} +1 -1
  9. package/.output/public/assets/_sessionId-EHPexdPl.js +1 -0
  10. package/.output/public/assets/index-CZP-XfpB.js +1 -0
  11. package/.output/public/assets/{main-Blykwzsn.js → main-CKYe6UUv.js} +2 -2
  12. package/.output/server/{_sessionId-BUNZz2zZ.mjs → _sessionId-CkwhOzdS.mjs} +2 -2
  13. package/.output/server/_ssr/{CompareDrawer-VaDYPM5G.mjs → CompareDrawer-BHDiuYMw.mjs} +2 -2
  14. package/.output/server/_ssr/{ProxyViewerContainer-CpdWs7Pk.mjs → ProxyViewerContainer-0c2_DBMX.mjs} +57 -6
  15. package/.output/server/_ssr/{ReplayDialog-DbfIjJhb.mjs → ReplayDialog-CTjwzDDH.mjs} +3 -3
  16. package/.output/server/_ssr/{RequestAnatomy-CrD8h6As.mjs → RequestAnatomy-D36oujv2.mjs} +2 -2
  17. package/.output/server/_ssr/{ResponseView-BalvDwtU.mjs → ResponseView-ClZ3oODE.mjs} +2 -2
  18. package/.output/server/_ssr/{StreamingChunkSequence-RxatDbPV.mjs → StreamingChunkSequence-Ck5l4p1m.mjs} +2 -2
  19. package/.output/server/_ssr/{index-11qAtV9d.mjs → index-DKBYH0TC.mjs} +2 -2
  20. package/.output/server/_ssr/index.mjs +2 -2
  21. package/.output/server/_ssr/{router-C4OdRnqX.mjs → router-D4I3ZyVS.mjs} +434 -6
  22. package/.output/server/{_tanstack-start-manifest_v-F6bwcl33.mjs → _tanstack-start-manifest_v-D4vSn_wD.mjs} +1 -1
  23. package/.output/server/index.mjs +54 -54
  24. package/README.md +7 -0
  25. package/package.json +1 -1
  26. package/src/cli/onboard.ts +629 -21
  27. package/src/components/providers/SettingsDialog.tsx +30 -0
  28. package/src/components/proxy-viewer/LogEntry.tsx +15 -1
  29. package/src/components/proxy-viewer/LogEntryHeader.tsx +20 -0
  30. package/src/contracts/log.ts +1 -0
  31. package/src/proxy/logFinalizer.ts +58 -0
  32. package/src/proxy/logSearch.ts +1 -0
  33. package/src/proxy/toolSchemaWarnings.ts +515 -0
  34. package/.output/public/assets/_sessionId-CVw5e8TK.js +0 -1
  35. package/.output/public/assets/index-BdUTMQL6.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports, a as React } from "../_libs/react.mjs";
2
- import { C as CapturedLogSchema, D as DEFAULT_CAPTURE_MODE, a as DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS, b as DEFAULT_PROVIDER_TEST_TIMEOUT_SECONDS, c as DEFAULT_TIME_DISPLAY_FORMAT, v as packageJson, i as GroupEvidenceExportResultSchema, j as DeleteInspectorGroupResponseSchema, d as RuntimeConfigSchema, P as ProviderConfigSchema, f as apiFormatForPath, n as createPendingProviderTestResults, o as ProviderTestResultsSchema, q as createFailedProviderTestResults, M as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, r as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, T as TimeDisplayFormatSchema, m as maskApiKey, k as providerHasContextMetadata, l as findProviderModelMetadata, g as getSessionPath, p as parseOpenAIResponse, O as OpenAIRequestSchema, A as AnthropicResponseSchema$1, e as AnthropicRequestSchema, s as safeGetOwnProperty, t as resolveProviderContextWindow, K as KnowledgeCandidateSchema, h as stripClaudeCodeBillingHeader, u as isPlainRecord, G as GroupEvidenceReadResponseSchema, I as InspectorGroupsListResponseSchema } from "./router-C4OdRnqX.mjs";
2
+ import { C as CapturedLogSchema, D as DEFAULT_CAPTURE_MODE, a as DEFAULT_SLOW_RESPONSE_THRESHOLD_SECONDS, b as DEFAULT_PROVIDER_TEST_TIMEOUT_SECONDS, c as DEFAULT_TIME_DISPLAY_FORMAT, v as packageJson, i as GroupEvidenceExportResultSchema, j as DeleteInspectorGroupResponseSchema, d as RuntimeConfigSchema, P as ProviderConfigSchema, f as apiFormatForPath, n as createPendingProviderTestResults, o as ProviderTestResultsSchema, q as createFailedProviderTestResults, M as MAX_SLOW_RESPONSE_THRESHOLD_SECONDS, r as MAX_PROVIDER_TEST_TIMEOUT_SECONDS, T as TimeDisplayFormatSchema, m as maskApiKey, k as providerHasContextMetadata, l as findProviderModelMetadata, g as getSessionPath, p as parseOpenAIResponse, O as OpenAIRequestSchema, A as AnthropicResponseSchema$1, e as AnthropicRequestSchema, s as safeGetOwnProperty, t as resolveProviderContextWindow, K as KnowledgeCandidateSchema, h as stripClaudeCodeBillingHeader, u as isPlainRecord, G as GroupEvidenceReadResponseSchema, I as InspectorGroupsListResponseSchema } from "./router-D4I3ZyVS.mjs";
3
3
  import { u as useSWR, a as useSWRConfig } from "../_libs/swr.mjs";
4
4
  import { J as JSZip } from "../_libs/jszip.mjs";
5
5
  import { c as clsx } from "../_libs/clsx.mjs";
@@ -1881,19 +1881,19 @@ function useCopyFeedback(text) {
1881
1881
  return { copied, copy };
1882
1882
  }
1883
1883
  const LazyCompareDrawer = reactExports.lazy(
1884
- () => import("./CompareDrawer-VaDYPM5G.mjs").then((m) => ({ default: m.CompareDrawer }))
1884
+ () => import("./CompareDrawer-BHDiuYMw.mjs").then((m) => ({ default: m.CompareDrawer }))
1885
1885
  );
1886
1886
  const LazyReplayDialog = reactExports.lazy(
1887
- () => import("./ReplayDialog-DbfIjJhb.mjs").then((m) => ({ default: m.ReplayDialog }))
1887
+ () => import("./ReplayDialog-CTjwzDDH.mjs").then((m) => ({ default: m.ReplayDialog }))
1888
1888
  );
1889
1889
  const LazyRequestAnatomy = reactExports.lazy(
1890
- () => import("./RequestAnatomy-CrD8h6As.mjs").then((m) => ({ default: m.RequestAnatomy }))
1890
+ () => import("./RequestAnatomy-D36oujv2.mjs").then((m) => ({ default: m.RequestAnatomy }))
1891
1891
  );
1892
1892
  const LazyResponseView = reactExports.lazy(
1893
- () => import("./ResponseView-BalvDwtU.mjs").then((m) => ({ default: m.ResponseView }))
1893
+ () => import("./ResponseView-ClZ3oODE.mjs").then((m) => ({ default: m.ResponseView }))
1894
1894
  );
1895
1895
  const LazyStreamingChunkSequence = reactExports.lazy(
1896
- () => import("./StreamingChunkSequence-RxatDbPV.mjs").then((m) => ({
1896
+ () => import("./StreamingChunkSequence-Ck5l4p1m.mjs").then((m) => ({
1897
1897
  default: m.StreamingChunkSequence
1898
1898
  }))
1899
1899
  );
@@ -2336,6 +2336,7 @@ const LogEntryHeader = reactExports.memo(function({
2336
2336
  const tokensPerSecond = log.tokensPerSecond ?? null;
2337
2337
  const firstChunkLabel = firstChunkMs === null ? null : formatElapsed$3(firstChunkMs);
2338
2338
  const tokenRateLabel = tokensPerSecond === null || tokensPerSecond <= 0 ? null : formatTokenRate$1(tokensPerSecond);
2339
+ const warningCount = log.warnings?.length ?? 0;
2339
2340
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
2340
2341
  "div",
2341
2342
  {
@@ -2384,6 +2385,20 @@ const LogEntryHeader = reactExports.memo(function({
2384
2385
  ]
2385
2386
  }
2386
2387
  ),
2388
+ warningCount > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
2389
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
2390
+ Badge,
2391
+ {
2392
+ variant: "outline",
2393
+ className: "text-[10px] px-1.5 py-0 h-5 font-mono tabular-nums gap-1 bg-amber-500/15 text-amber-400 border-amber-500/25",
2394
+ children: [
2395
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-3", "aria-label": "Tool schema warnings" }),
2396
+ warningCount
2397
+ ]
2398
+ }
2399
+ ) }),
2400
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: warningCount === 1 ? "1 tool schema warning" : `${warningCount} tool schema warnings` })
2401
+ ] }),
2387
2402
  log.elapsedMs !== null && /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
2388
2403
  /* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
2389
2404
  "span",
@@ -3612,6 +3627,7 @@ const LogEntry = reactExports.memo(function({
3612
3627
  () => parseRequestTools(requestExpansion.parsedData),
3613
3628
  [requestExpansion.parsedData]
3614
3629
  );
3630
+ const warnings = log.warnings ?? [];
3615
3631
  const anatomyPaths = reactExports.useMemo(() => {
3616
3632
  if (anatomySegments === null) return void 0;
3617
3633
  return new Set(anatomySegments.map((s) => s.path));
@@ -3679,6 +3695,13 @@ const LogEntry = reactExports.memo(function({
3679
3695
  }
3680
3696
  ) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { className: "font-mono text-xs whitespace-pre-wrap break-words", children: log.rawRequestBody }) }) }),
3681
3697
  /* @__PURE__ */ jsxRuntimeExports.jsx(TabsContent, { value: "request", children: activeTab === "request" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 pt-1 pb-3", children: [
3698
+ warnings.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-3 rounded border border-amber-500/30 bg-amber-500/10 p-3 text-xs", children: [
3699
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 font-semibold text-amber-300", children: [
3700
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TriangleAlert, { className: "size-3.5" }),
3701
+ "Tool schema warnings"
3702
+ ] }),
3703
+ /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "mt-2 space-y-1 text-muted-foreground", children: warnings.map((warning) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: warning }, warning)) })
3704
+ ] }),
3682
3705
  /* @__PURE__ */ jsxRuntimeExports.jsx(
3683
3706
  RequestTools,
3684
3707
  {
@@ -8547,6 +8570,18 @@ function OnboardingSettingsTab() {
8547
8570
  label: "Codex prompt",
8548
8571
  value: "Use the agent-inspector-onboard skill"
8549
8572
  },
8573
+ {
8574
+ id: "opencode-config",
8575
+ label: "OpenCode config",
8576
+ value: "agent-inspector onboard --opencode-only"
8577
+ },
8578
+ {
8579
+ id: "opencode-status",
8580
+ label: "OpenCode status",
8581
+ value: "agent-inspector onboard --status --opencode-only"
8582
+ },
8583
+ { id: "opencode-verify", label: "OpenCode verify", value: "opencode mcp list" },
8584
+ { id: "opencode-proxy", label: "OpenCode proxy", value: `LLM_BASE_URL=${origin}/proxy` },
8550
8585
  { id: "mcp", label: "MCP URL", value: `${origin}/api/mcp` },
8551
8586
  { id: "proxy", label: "Proxy URL", value: `${origin}/proxy` },
8552
8587
  { id: "anthropic", label: "Anthropic base", value: `ANTHROPIC_BASE_URL=${origin}/proxy` },
@@ -8593,6 +8628,22 @@ function OnboardingSettingsTab() {
8593
8628
  "instead. Configure only one entry for the same Inspector."
8594
8629
  ] })
8595
8630
  ] }),
8631
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-2", children: [
8632
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "mt-0.5 size-3.5 text-emerald-500" }),
8633
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
8634
+ "OpenCode onboarding safely merges",
8635
+ " ",
8636
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "rounded bg-muted px-1 py-0.5 font-mono text-[11px] text-foreground", children: "mcp.agent-inspector" }),
8637
+ " ",
8638
+ "into",
8639
+ " ",
8640
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "rounded bg-muted px-1 py-0.5 font-mono text-[11px] text-foreground", children: "opencode.json" }),
8641
+ ", then verify with",
8642
+ " ",
8643
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "rounded bg-muted px-1 py-0.5 font-mono text-[11px] text-foreground", children: "opencode mcp list" }),
8644
+ "."
8645
+ ] })
8646
+ ] }),
8596
8647
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-2", children: [
8597
8648
  /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "mt-0.5 size-3.5 text-emerald-500" }),
8598
8649
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "If your AI tool runs in another container or host, replace localhost with an address reachable from that tool and verify the network/firewall path." })
@@ -1,7 +1,7 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { u as useProviders, D as Dialog, b as DialogContent, d as DialogHeader, e as DialogTitle, T as Tabs, h as TabsList, i as TabsTrigger, j as TabsContent, k as Button, l as TooltipProvider, m as Tooltip, n as TooltipTrigger, o as TooltipContent, p as dispatchLogFocusRequest } from "./ProxyViewerContainer-CpdWs7Pk.mjs";
3
- import { ResponseView } from "./ResponseView-BalvDwtU.mjs";
4
- import { C as CapturedLogSchema } from "./router-C4OdRnqX.mjs";
2
+ import { u as useProviders, D as Dialog, b as DialogContent, d as DialogHeader, e as DialogTitle, T as Tabs, h as TabsList, i as TabsTrigger, j as TabsContent, k as Button, l as TooltipProvider, m as Tooltip, n as TooltipTrigger, o as TooltipContent, p as dispatchLogFocusRequest } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
+ import { ResponseView } from "./ResponseView-ClZ3oODE.mjs";
4
+ import { C as CapturedLogSchema } from "./router-D4I3ZyVS.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import "../_libs/modelcontextprotocol__server.mjs";
7
7
  import { V as RotateCcw, ae as Braces, af as Minimize2 } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { u as useProviders, q as analyzeContextIntelligence, f as formatTokens, l as TooltipProvider, c as cn, m as Tooltip, n as TooltipTrigger, o as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, s as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-CpdWs7Pk.mjs";
3
- import "./router-C4OdRnqX.mjs";
2
+ import { u as useProviders, q as analyzeContextIntelligence, f as formatTokens, l as TooltipProvider, c as cn, m as Tooltip, n as TooltipTrigger, o as TooltipContent, S as SegmentBar, R as ROLE_COLOR_CLASSES, A as ANATOMY_ROLE_LABELS, s as formatContextWindowTokens, C as CONTEXT_USAGE_THRESHOLDS } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
+ import "./router-D4I3ZyVS.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { ag as Info, c as ChevronDown, l as ChevronRight } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { g as getLogFormatAdapter, f as formatTokens, c as cn, t as getStatusCategory, B as Badge, v as Collapsible, w as CollapsibleTrigger, x as CollapsibleContent, y as ScrollArea, z as JsonViewer, E as safeJsonValue } from "./ProxyViewerContainer-CpdWs7Pk.mjs";
3
- import "./router-C4OdRnqX.mjs";
2
+ import { g as getLogFormatAdapter, f as formatTokens, c as cn, t as getStatusCategory, B as Badge, v as Collapsible, w as CollapsibleTrigger, x as CollapsibleContent, y as ScrollArea, z as JsonViewer, E as safeJsonValue } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
+ import "./router-D4I3ZyVS.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { Z as Zap, q as TriangleAlert, ah as CircleStop, B as Brain, c as ChevronDown, l as ChevronRight, f as Terminal } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
1
  import { r as reactExports, j as jsxRuntimeExports } from "../_libs/react.mjs";
2
- import { l as TooltipProvider, m as Tooltip, n as TooltipTrigger, B as Badge, o as TooltipContent, z as JsonViewer } from "./ProxyViewerContainer-CpdWs7Pk.mjs";
3
- import "./router-C4OdRnqX.mjs";
2
+ import { l as TooltipProvider, m as Tooltip, n as TooltipTrigger, B as Badge, o as TooltipContent, z as JsonViewer } from "./ProxyViewerContainer-0c2_DBMX.mjs";
3
+ import "./router-D4I3ZyVS.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import { c as ChevronDown, l as ChevronRight, a as LoaderCircle } from "../_libs/lucide-react.mjs";
@@ -1,6 +1,6 @@
1
- import { P as ProxyViewerContainer } from "./ProxyViewerContainer-CpdWs7Pk.mjs";
1
+ import { P as ProxyViewerContainer } from "./ProxyViewerContainer-0c2_DBMX.mjs";
2
2
  import "../_libs/react.mjs";
3
- import "./router-C4OdRnqX.mjs";
3
+ import "./router-D4I3ZyVS.mjs";
4
4
  import "../_libs/modelcontextprotocol__server.mjs";
5
5
  import "../_libs/jszip.mjs";
6
6
  import "../_libs/swr.mjs";
@@ -198,7 +198,7 @@ function getResponse() {
198
198
  return event.res;
199
199
  }
200
200
  async function getStartManifest(matchedRoutes) {
201
- const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-F6bwcl33.mjs");
201
+ const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-D4vSn_wD.mjs");
202
202
  const startManifest = tsrStartManifest();
203
203
  const rootRoute = startManifest.routes[rootRouteId] = startManifest.routes[rootRouteId] || {};
204
204
  rootRoute.assets = rootRoute.assets || [];
@@ -776,7 +776,7 @@ let entriesPromise;
776
776
  let baseManifestPromise;
777
777
  let cachedFinalManifestPromise;
778
778
  async function loadEntries() {
779
- const routerEntry = await import("./router-C4OdRnqX.mjs").then((n) => n.w);
779
+ const routerEntry = await import("./router-D4I3ZyVS.mjs").then((n) => n.w);
780
780
  const startEntry = await import("./start-HYkvq4Ni.mjs");
781
781
  return { startEntry, routerEntry };
782
782
  }