@tonyclaw/agent-inspector 2.0.0
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 +1611 -0
- package/.output/nitro.json +17 -0
- package/.output/public/assets/CompareDrawer-CU5ZrWcL.js +1 -0
- package/.output/public/assets/ProxyViewerContainer-pEBqVp1d.js +101 -0
- package/.output/public/assets/ReplayDialog-F58yNg5j.js +1 -0
- package/.output/public/assets/RequestAnatomy-C9lT0qE_.js +1 -0
- package/.output/public/assets/ResponseView-DHJq6bnz.js +1 -0
- package/.output/public/assets/StreamingChunkSequence-BTgfpFUT.js +1 -0
- package/.output/public/assets/_sessionId-DsNRbnNm.js +1 -0
- package/.output/public/assets/alibaba-TTwafVwX.svg +1 -0
- package/.output/public/assets/index-CpWG2hFn.css +1 -0
- package/.output/public/assets/index-DmBV8Gve.js +1 -0
- package/.output/public/assets/json-viewer-CZVYLR8j.js +14 -0
- package/.output/public/assets/main-DHs7FBK3.js +18 -0
- package/.output/public/assets/minimax-BPMzvuL-.jpeg +0 -0
- package/.output/public/assets/qwen-CONDcHqt.png +0 -0
- package/.output/public/assets/zhipuai-BPNAnxo-.svg +219 -0
- package/.output/server/_chunks/ssr-renderer.mjs +22 -0
- package/.output/server/_libs/@radix-ui/react-accessible-icon+[...].mjs +1 -0
- package/.output/server/_libs/@radix-ui/react-dismissable-layer+[...].mjs +210 -0
- package/.output/server/_libs/@radix-ui/react-navigation-menu+[...].mjs +2 -0
- package/.output/server/_libs/@radix-ui/react-one-time-password-field+[...].mjs +2 -0
- package/.output/server/_libs/@radix-ui/react-password-toggle-field+[...].mjs +2 -0
- package/.output/server/_libs/@radix-ui/react-use-callback-ref+[...].mjs +11 -0
- package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +69 -0
- package/.output/server/_libs/@radix-ui/react-use-effect-event+[...].mjs +1 -0
- package/.output/server/_libs/@radix-ui/react-use-escape-keydown+[...].mjs +17 -0
- package/.output/server/_libs/@radix-ui/react-use-is-hydrated+[...].mjs +1 -0
- package/.output/server/_libs/@radix-ui/react-use-layout-effect+[...].mjs +6 -0
- package/.output/server/_libs/@radix-ui/react-visually-hidden+[...].mjs +34 -0
- package/.output/server/_libs/ajv-formats.mjs +330 -0
- package/.output/server/_libs/ajv.mjs +11444 -0
- package/.output/server/_libs/aria-hidden.mjs +122 -0
- package/.output/server/_libs/atomically.mjs +152 -0
- package/.output/server/_libs/bail.mjs +8 -0
- package/.output/server/_libs/cfworker__json-schema.mjs +1 -0
- package/.output/server/_libs/character-entities.mjs +2130 -0
- package/.output/server/_libs/class-variance-authority.mjs +44 -0
- package/.output/server/_libs/clsx.mjs +16 -0
- package/.output/server/_libs/comma-separated-tokens.mjs +10 -0
- package/.output/server/_libs/conf.mjs +635 -0
- package/.output/server/_libs/cookie-es.mjs +58 -0
- package/.output/server/_libs/core-util-is.mjs +75 -0
- package/.output/server/_libs/croner.mjs +1 -0
- package/.output/server/_libs/crossws.mjs +1 -0
- package/.output/server/_libs/debounce-fn.mjs +69 -0
- package/.output/server/_libs/decode-named-character-reference+[...].mjs +8 -0
- package/.output/server/_libs/dequal.mjs +27 -0
- package/.output/server/_libs/detect-node-es.mjs +1 -0
- package/.output/server/_libs/devlop.mjs +8 -0
- package/.output/server/_libs/diff.mjs +320 -0
- package/.output/server/_libs/dot-prop.mjs +265 -0
- package/.output/server/_libs/env-paths.mjs +57 -0
- package/.output/server/_libs/estree-util-is-identifier-name.mjs +11 -0
- package/.output/server/_libs/extend.mjs +97 -0
- package/.output/server/_libs/fast-deep-equal.mjs +38 -0
- package/.output/server/_libs/fast-uri.mjs +812 -0
- package/.output/server/_libs/floating-ui__core.mjs +725 -0
- package/.output/server/_libs/floating-ui__dom.mjs +622 -0
- package/.output/server/_libs/floating-ui__react-dom.mjs +292 -0
- package/.output/server/_libs/floating-ui__utils.mjs +320 -0
- package/.output/server/_libs/get-nonce.mjs +9 -0
- package/.output/server/_libs/h3-v2.mjs +276 -0
- package/.output/server/_libs/h3.mjs +408 -0
- package/.output/server/_libs/hast-util-to-jsx-runtime.mjs +388 -0
- package/.output/server/_libs/hast-util-whitespace.mjs +10 -0
- package/.output/server/_libs/hookable.mjs +1 -0
- package/.output/server/_libs/html-url-attributes.mjs +26 -0
- package/.output/server/_libs/immediate.mjs +74 -0
- package/.output/server/_libs/inherits.mjs +50 -0
- package/.output/server/_libs/inline-style-parser.mjs +142 -0
- package/.output/server/_libs/is-plain-obj.mjs +10 -0
- package/.output/server/_libs/isarray.mjs +14 -0
- package/.output/server/_libs/isbot.mjs +20 -0
- package/.output/server/_libs/json-schema-traverse.mjs +180 -0
- package/.output/server/_libs/jszip.mjs +3051 -0
- package/.output/server/_libs/lie.mjs +273 -0
- package/.output/server/_libs/lucide-react.mjs +492 -0
- package/.output/server/_libs/mdast-util-from-markdown.mjs +717 -0
- package/.output/server/_libs/mdast-util-to-hast.mjs +710 -0
- package/.output/server/_libs/mdast-util-to-string.mjs +38 -0
- package/.output/server/_libs/micromark-core-commonmark.mjs +2259 -0
- package/.output/server/_libs/micromark-factory-destination.mjs +94 -0
- package/.output/server/_libs/micromark-factory-label.mjs +63 -0
- package/.output/server/_libs/micromark-factory-space.mjs +24 -0
- package/.output/server/_libs/micromark-factory-title.mjs +65 -0
- package/.output/server/_libs/micromark-factory-whitespace.mjs +22 -0
- package/.output/server/_libs/micromark-util-character.mjs +44 -0
- package/.output/server/_libs/micromark-util-chunked.mjs +36 -0
- package/.output/server/_libs/micromark-util-classify-character+[...].mjs +12 -0
- package/.output/server/_libs/micromark-util-combine-extensions+[...].mjs +41 -0
- package/.output/server/_libs/micromark-util-decode-numeric-character-reference+[...].mjs +19 -0
- package/.output/server/_libs/micromark-util-decode-string.mjs +21 -0
- package/.output/server/_libs/micromark-util-encode.mjs +1 -0
- package/.output/server/_libs/micromark-util-html-tag-name.mjs +69 -0
- package/.output/server/_libs/micromark-util-normalize-identifier+[...].mjs +6 -0
- package/.output/server/_libs/micromark-util-resolve-all.mjs +15 -0
- package/.output/server/_libs/micromark-util-sanitize-uri.mjs +41 -0
- package/.output/server/_libs/micromark-util-subtokenize.mjs +346 -0
- package/.output/server/_libs/micromark.mjs +906 -0
- package/.output/server/_libs/mimic-function.mjs +47 -0
- package/.output/server/_libs/modelcontextprotocol__server.mjs +9738 -0
- package/.output/server/_libs/ocache.mjs +1 -0
- package/.output/server/_libs/ohash.mjs +1 -0
- package/.output/server/_libs/pako.mjs +4223 -0
- package/.output/server/_libs/process-nextick-args.mjs +48 -0
- package/.output/server/_libs/property-information.mjs +1209 -0
- package/.output/server/_libs/radix-ui.mjs +1 -0
- package/.output/server/_libs/radix-ui__number.mjs +6 -0
- package/.output/server/_libs/radix-ui__primitive.mjs +11 -0
- package/.output/server/_libs/radix-ui__react-accordion.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-alert-dialog.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-arrow.mjs +23 -0
- package/.output/server/_libs/radix-ui__react-aspect-ratio.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-avatar.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-checkbox.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-collapsible.mjs +144 -0
- package/.output/server/_libs/radix-ui__react-collection.mjs +69 -0
- package/.output/server/_libs/radix-ui__react-compose-refs.mjs +39 -0
- package/.output/server/_libs/radix-ui__react-context-menu.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-context.mjs +78 -0
- package/.output/server/_libs/radix-ui__react-dialog.mjs +325 -0
- package/.output/server/_libs/radix-ui__react-direction.mjs +9 -0
- package/.output/server/_libs/radix-ui__react-dropdown-menu.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-focus-guards.mjs +29 -0
- package/.output/server/_libs/radix-ui__react-focus-scope.mjs +206 -0
- package/.output/server/_libs/radix-ui__react-form.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-hover-card.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-id.mjs +14 -0
- package/.output/server/_libs/radix-ui__react-label.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-menu.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-menubar.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-popover.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-popper.mjs +286 -0
- package/.output/server/_libs/radix-ui__react-portal.mjs +16 -0
- package/.output/server/_libs/radix-ui__react-presence.mjs +128 -0
- package/.output/server/_libs/radix-ui__react-primitive.mjs +42 -0
- package/.output/server/_libs/radix-ui__react-progress.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-radio-group.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-roving-focus.mjs +224 -0
- package/.output/server/_libs/radix-ui__react-scroll-area.mjs +721 -0
- package/.output/server/_libs/radix-ui__react-select.mjs +1163 -0
- package/.output/server/_libs/radix-ui__react-separator.mjs +28 -0
- package/.output/server/_libs/radix-ui__react-slider.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-slot.mjs +99 -0
- package/.output/server/_libs/radix-ui__react-switch.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-tabs.mjs +189 -0
- package/.output/server/_libs/radix-ui__react-toast.mjs +2 -0
- package/.output/server/_libs/radix-ui__react-toggle-group.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-toggle.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-toolbar.mjs +1 -0
- package/.output/server/_libs/radix-ui__react-tooltip.mjs +495 -0
- package/.output/server/_libs/radix-ui__react-use-previous.mjs +14 -0
- package/.output/server/_libs/radix-ui__react-use-size.mjs +39 -0
- package/.output/server/_libs/react-dom.mjs +10781 -0
- package/.output/server/_libs/react-markdown.mjs +147 -0
- package/.output/server/_libs/react-remove-scroll-bar.mjs +82 -0
- package/.output/server/_libs/react-remove-scroll.mjs +328 -0
- package/.output/server/_libs/react-style-singleton.mjs +69 -0
- package/.output/server/_libs/react.mjs +515 -0
- package/.output/server/_libs/readable-stream.mjs +1518 -0
- package/.output/server/_libs/remark-parse.mjs +19 -0
- package/.output/server/_libs/remark-rehype.mjs +21 -0
- package/.output/server/_libs/rou3.mjs +14 -0
- package/.output/server/_libs/safe-buffer.mjs +64 -0
- package/.output/server/_libs/semver.mjs +1938 -0
- package/.output/server/_libs/seroval-plugins.mjs +58 -0
- package/.output/server/_libs/seroval.mjs +1765 -0
- package/.output/server/_libs/setimmediate.mjs +152 -0
- package/.output/server/_libs/space-separated-tokens.mjs +6 -0
- package/.output/server/_libs/srvx.mjs +1029 -0
- package/.output/server/_libs/stubborn-fs.mjs +91 -0
- package/.output/server/_libs/stubborn-utils.mjs +66 -0
- package/.output/server/_libs/style-to-js.mjs +72 -0
- package/.output/server/_libs/style-to-object.mjs +38 -0
- package/.output/server/_libs/swr.mjs +939 -0
- package/.output/server/_libs/tailwind-merge.mjs +3010 -0
- package/.output/server/_libs/tanstack__history.mjs +217 -0
- package/.output/server/_libs/tanstack__react-router.mjs +1480 -0
- package/.output/server/_libs/tanstack__react-store.mjs +1 -0
- package/.output/server/_libs/tanstack__react-virtual.mjs +44 -0
- package/.output/server/_libs/tanstack__router-core.mjs +4827 -0
- package/.output/server/_libs/tanstack__store.mjs +1 -0
- package/.output/server/_libs/tanstack__virtual-core.mjs +1225 -0
- package/.output/server/_libs/tiny-invariant.mjs +12 -0
- package/.output/server/_libs/tiny-warning.mjs +5 -0
- package/.output/server/_libs/trim-lines.mjs +41 -0
- package/.output/server/_libs/trough.mjs +85 -0
- package/.output/server/_libs/tslib.mjs +1 -0
- package/.output/server/_libs/ufo.mjs +54 -0
- package/.output/server/_libs/uint8array-extras.mjs +69 -0
- package/.output/server/_libs/ungap__structured-clone.mjs +212 -0
- package/.output/server/_libs/unified.mjs +661 -0
- package/.output/server/_libs/unist-util-is.mjs +100 -0
- package/.output/server/_libs/unist-util-position.mjs +27 -0
- package/.output/server/_libs/unist-util-stringify-position.mjs +27 -0
- package/.output/server/_libs/unist-util-visit-parents.mjs +82 -0
- package/.output/server/_libs/unist-util-visit.mjs +24 -0
- package/.output/server/_libs/unstorage.mjs +1 -0
- package/.output/server/_libs/use-callback-ref.mjs +66 -0
- package/.output/server/_libs/use-sidecar.mjs +106 -0
- package/.output/server/_libs/use-sync-external-store.mjs +64 -0
- package/.output/server/_libs/util-deprecate.mjs +12 -0
- package/.output/server/_libs/vfile-message.mjs +138 -0
- package/.output/server/_libs/vfile.mjs +467 -0
- package/.output/server/_libs/when-exit.mjs +53 -0
- package/.output/server/_libs/zod.mjs +4524 -0
- package/.output/server/_sessionId-wMLPvC5g.mjs +123 -0
- package/.output/server/_ssr/CompareDrawer-BU4V0uVf.mjs +1041 -0
- package/.output/server/_ssr/ProxyViewerContainer-BnRwFEnn.mjs +5972 -0
- package/.output/server/_ssr/ReplayDialog-C7dn9pd_.mjs +322 -0
- package/.output/server/_ssr/RequestAnatomy-C1rWpe9-.mjs +353 -0
- package/.output/server/_ssr/ResponseView-hGpPaYsf.mjs +602 -0
- package/.output/server/_ssr/StreamingChunkSequence-BRWI1r_G.mjs +302 -0
- package/.output/server/_ssr/index-BKURLVPz.mjs +118 -0
- package/.output/server/_ssr/index.mjs +1184 -0
- package/.output/server/_ssr/json-viewer-BBd2DtQP.mjs +515 -0
- package/.output/server/_ssr/router-BcZ0D6AB.mjs +6317 -0
- package/.output/server/_ssr/start-HYkvq4Ni.mjs +4 -0
- package/.output/server/_tanstack-start-manifest_v-1y8ZVxRI.mjs +4 -0
- package/.output/server/index.mjs +436 -0
- package/.output/server/node_modules/tslib/modules/index.js +70 -0
- package/.output/server/node_modules/tslib/modules/package.json +3 -0
- package/.output/server/node_modules/tslib/package.json +47 -0
- package/.output/server/node_modules/tslib/tslib.js +484 -0
- package/.output/server/package.json +9 -0
- package/LICENSE +21 -0
- package/README.md +52 -0
- package/package.json +110 -0
- package/src/assets/favicon.svg +31 -0
- package/src/assets/logos/alibaba.svg +1 -0
- package/src/assets/logos/anthropic.svg +1 -0
- package/src/assets/logos/claude-code.svg +4 -0
- package/src/assets/logos/deepseek.svg +1 -0
- package/src/assets/logos/mcp.png +0 -0
- package/src/assets/logos/minimax.jpeg +0 -0
- package/src/assets/logos/openai.svg +1 -0
- package/src/assets/logos/opencode.svg +4 -0
- package/src/assets/logos/qwen.png +0 -0
- package/src/assets/logos/zhipuai.svg +219 -0
- package/src/cli/detect-tools.ts +147 -0
- package/src/cli/doctor.ts +521 -0
- package/src/cli/onboard.ts +224 -0
- package/src/cli/templates/command-onboard.ts +17 -0
- package/src/cli/templates/skill-onboard.ts +547 -0
- package/src/cli.ts +345 -0
- package/src/components/OnboardingBanner.tsx +67 -0
- package/src/components/ProxyViewer.tsx +545 -0
- package/src/components/ProxyViewerContainer.tsx +363 -0
- package/src/components/providers/ImportWizardDialog.tsx +349 -0
- package/src/components/providers/ProviderCard.tsx +474 -0
- package/src/components/providers/ProviderForm.tsx +494 -0
- package/src/components/providers/ProviderLogo.tsx +117 -0
- package/src/components/providers/ProvidersPanel.tsx +619 -0
- package/src/components/providers/SettingsDialog.tsx +202 -0
- package/src/components/proxy-viewer/CompareDrawer.tsx +893 -0
- package/src/components/proxy-viewer/ConversationGroup.tsx +107 -0
- package/src/components/proxy-viewer/ConversationHeader.tsx +300 -0
- package/src/components/proxy-viewer/LogEntry.tsx +543 -0
- package/src/components/proxy-viewer/LogEntryHeader.tsx +501 -0
- package/src/components/proxy-viewer/ReplayDialog.tsx +218 -0
- package/src/components/proxy-viewer/ResponseView.tsx +171 -0
- package/src/components/proxy-viewer/StreamingChunkSequence.tsx +188 -0
- package/src/components/proxy-viewer/ThreadConnector.tsx +136 -0
- package/src/components/proxy-viewer/TurnGroup.tsx +337 -0
- package/src/components/proxy-viewer/anatomy/RequestAnatomy.tsx +98 -0
- package/src/components/proxy-viewer/anatomy/SegmentBar.tsx +196 -0
- package/src/components/proxy-viewer/anatomy/tokenEstimate.ts +53 -0
- package/src/components/proxy-viewer/anatomy/types.ts +39 -0
- package/src/components/proxy-viewer/anatomy/useAnatomyJump.ts +114 -0
- package/src/components/proxy-viewer/cacheTrend.ts +50 -0
- package/src/components/proxy-viewer/diff/DiffView.tsx +321 -0
- package/src/components/proxy-viewer/diff/computeDiff.ts +178 -0
- package/src/components/proxy-viewer/diff/index.ts +3 -0
- package/src/components/proxy-viewer/formats/anthropic/ContentBlocks.tsx +157 -0
- package/src/components/proxy-viewer/formats/anthropic/ResponseView.tsx +66 -0
- package/src/components/proxy-viewer/formats/anthropic/thinkingExtract.ts +21 -0
- package/src/components/proxy-viewer/formats/index.tsx +33 -0
- package/src/components/proxy-viewer/formats/openai/ResponseView.tsx +170 -0
- package/src/components/proxy-viewer/index.ts +9 -0
- package/src/components/proxy-viewer/lazy.ts +37 -0
- package/src/components/proxy-viewer/log-formats/anthropic.ts +194 -0
- package/src/components/proxy-viewer/log-formats/index.ts +23 -0
- package/src/components/proxy-viewer/log-formats/openai.ts +167 -0
- package/src/components/proxy-viewer/log-formats/types.ts +40 -0
- package/src/components/proxy-viewer/log-formats/unknown.ts +18 -0
- package/src/components/proxy-viewer/logEntryVisibility.ts +39 -0
- package/src/components/proxy-viewer/requestDiff.ts +277 -0
- package/src/components/proxy-viewer/useCopyFeedback.ts +36 -0
- package/src/components/proxy-viewer/useKeyboardNavigation.ts +190 -0
- package/src/components/proxy-viewer/viewerState.ts +66 -0
- package/src/components/ui/badge.tsx +47 -0
- package/src/components/ui/button.tsx +47 -0
- package/src/components/ui/collapsible.tsx +21 -0
- package/src/components/ui/confirm-dialog.tsx +51 -0
- package/src/components/ui/crab-logo.tsx +95 -0
- package/src/components/ui/crab-variants.tsx +467 -0
- package/src/components/ui/dialog.tsx +129 -0
- package/src/components/ui/json-expansion-button.tsx +56 -0
- package/src/components/ui/json-viewer-bulk.ts +97 -0
- package/src/components/ui/json-viewer.tsx +494 -0
- package/src/components/ui/mcp-logo.tsx +20 -0
- package/src/components/ui/scroll-area.tsx +54 -0
- package/src/components/ui/select.tsx +178 -0
- package/src/components/ui/separator.tsx +28 -0
- package/src/components/ui/tabs.tsx +88 -0
- package/src/components/ui/tooltip.tsx +51 -0
- package/src/index.css +11 -0
- package/src/knowledge/candidateStore.ts +63 -0
- package/src/knowledge/distiller.ts +98 -0
- package/src/knowledge/openclawClient.ts +118 -0
- package/src/knowledge/redactor.ts +80 -0
- package/src/knowledge/types.ts +84 -0
- package/src/lib/apiClient.ts +49 -0
- package/src/lib/export-logs.ts +51 -0
- package/src/lib/mask.ts +4 -0
- package/src/lib/objectUtils.ts +22 -0
- package/src/lib/providerContract.ts +26 -0
- package/src/lib/providerTestContract.ts +107 -0
- package/src/lib/runtimeConfig.ts +25 -0
- package/src/lib/serverPort.ts +41 -0
- package/src/lib/sessionUrl.ts +44 -0
- package/src/lib/stopReason.ts +58 -0
- package/src/lib/useOnboarding.ts +80 -0
- package/src/lib/useProviders.ts +30 -0
- package/src/lib/useStripConfig.ts +108 -0
- package/src/lib/utils.ts +21 -0
- package/src/mcp/loopback.ts +76 -0
- package/src/mcp/previewExtractor.ts +166 -0
- package/src/mcp/server.ts +396 -0
- package/src/mcp/toolHandlers.ts +341 -0
- package/src/proxy/chunkStorage.ts +112 -0
- package/src/proxy/claudeCodeStrip.ts +99 -0
- package/src/proxy/config.ts +172 -0
- package/src/proxy/constants.ts +47 -0
- package/src/proxy/dataDir.ts +86 -0
- package/src/proxy/formats/anthropic/anthropicProvider.ts +75 -0
- package/src/proxy/formats/anthropic/handler.ts +71 -0
- package/src/proxy/formats/anthropic/index.ts +14 -0
- package/src/proxy/formats/anthropic/register.ts +4 -0
- package/src/proxy/formats/anthropic/schemas.ts +237 -0
- package/src/proxy/formats/anthropic/stream.ts +205 -0
- package/src/proxy/formats/handler.ts +46 -0
- package/src/proxy/formats/index.ts +12 -0
- package/src/proxy/formats/jsonSchema.ts +36 -0
- package/src/proxy/formats/openai/alibabaProvider.ts +38 -0
- package/src/proxy/formats/openai/handler.ts +96 -0
- package/src/proxy/formats/openai/index.ts +25 -0
- package/src/proxy/formats/openai/provider.ts +50 -0
- package/src/proxy/formats/openai/register.ts +4 -0
- package/src/proxy/formats/openai/schemas.ts +187 -0
- package/src/proxy/formats/openai/stream.ts +206 -0
- package/src/proxy/formats/protocol.ts +50 -0
- package/src/proxy/formats/providerRegistry.ts +51 -0
- package/src/proxy/formats/providers/index.ts +3 -0
- package/src/proxy/formats/registry.ts +66 -0
- package/src/proxy/handler.ts +334 -0
- package/src/proxy/logFinalizer.ts +305 -0
- package/src/proxy/logFinalizer.worker.ts +24 -0
- package/src/proxy/logIndex.ts +268 -0
- package/src/proxy/logger.ts +179 -0
- package/src/proxy/openaiOrphanToolStrip.ts +142 -0
- package/src/proxy/providerImporters.ts +491 -0
- package/src/proxy/providers.ts +613 -0
- package/src/proxy/schemas.ts +209 -0
- package/src/proxy/sessionProcess.ts +140 -0
- package/src/proxy/sessionRuntime.ts +85 -0
- package/src/proxy/sessionSupervisor.ts +283 -0
- package/src/proxy/sessionWorkerEntry.ts +26 -0
- package/src/proxy/socketTracker.ts +255 -0
- package/src/proxy/store.ts +412 -0
- package/src/proxy/upstream.ts +90 -0
- package/src/router.tsx +16 -0
- package/src/routes/__root.tsx +45 -0
- package/src/routes/api/config.paths.ts +14 -0
- package/src/routes/api/config.ts +53 -0
- package/src/routes/api/health.ts +15 -0
- package/src/routes/api/knowledge.candidates.$candidateId.promote.ts +32 -0
- package/src/routes/api/knowledge.candidates.ts +10 -0
- package/src/routes/api/knowledge.project-context.ts +18 -0
- package/src/routes/api/knowledge.search.ts +31 -0
- package/src/routes/api/knowledge.sessions.$sessionId.candidates.ts +16 -0
- package/src/routes/api/logs.$id.chunks.ts +36 -0
- package/src/routes/api/logs.$id.replay.ts +191 -0
- package/src/routes/api/logs.$id.ts +22 -0
- package/src/routes/api/logs.stream.ts +74 -0
- package/src/routes/api/logs.ts +59 -0
- package/src/routes/api/mcp.ts +25 -0
- package/src/routes/api/models.ts +10 -0
- package/src/routes/api/providers.$providerId.test.log.ts +293 -0
- package/src/routes/api/providers.$providerId.ts +50 -0
- package/src/routes/api/providers.export.ts +26 -0
- package/src/routes/api/providers.import.ts +47 -0
- package/src/routes/api/providers.scan.ts +23 -0
- package/src/routes/api/providers.ts +45 -0
- package/src/routes/api/sessions.ts +17 -0
- package/src/routes/index.tsx +6 -0
- package/src/routes/proxy/$.ts +15 -0
- package/src/routes/session/$sessionId.tsx +23 -0
- package/styles/globals.css +188 -0
|
@@ -0,0 +1,484 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */
|
|
16
|
+
var __extends;
|
|
17
|
+
var __assign;
|
|
18
|
+
var __rest;
|
|
19
|
+
var __decorate;
|
|
20
|
+
var __param;
|
|
21
|
+
var __esDecorate;
|
|
22
|
+
var __runInitializers;
|
|
23
|
+
var __propKey;
|
|
24
|
+
var __setFunctionName;
|
|
25
|
+
var __metadata;
|
|
26
|
+
var __awaiter;
|
|
27
|
+
var __generator;
|
|
28
|
+
var __exportStar;
|
|
29
|
+
var __values;
|
|
30
|
+
var __read;
|
|
31
|
+
var __spread;
|
|
32
|
+
var __spreadArrays;
|
|
33
|
+
var __spreadArray;
|
|
34
|
+
var __await;
|
|
35
|
+
var __asyncGenerator;
|
|
36
|
+
var __asyncDelegator;
|
|
37
|
+
var __asyncValues;
|
|
38
|
+
var __makeTemplateObject;
|
|
39
|
+
var __importStar;
|
|
40
|
+
var __importDefault;
|
|
41
|
+
var __classPrivateFieldGet;
|
|
42
|
+
var __classPrivateFieldSet;
|
|
43
|
+
var __classPrivateFieldIn;
|
|
44
|
+
var __createBinding;
|
|
45
|
+
var __addDisposableResource;
|
|
46
|
+
var __disposeResources;
|
|
47
|
+
var __rewriteRelativeImportExtension;
|
|
48
|
+
(function (factory) {
|
|
49
|
+
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
|
50
|
+
if (typeof define === "function" && define.amd) {
|
|
51
|
+
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
|
|
52
|
+
}
|
|
53
|
+
else if (typeof module === "object" && typeof module.exports === "object") {
|
|
54
|
+
factory(createExporter(root, createExporter(module.exports)));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
factory(createExporter(root));
|
|
58
|
+
}
|
|
59
|
+
function createExporter(exports, previous) {
|
|
60
|
+
if (exports !== root) {
|
|
61
|
+
if (typeof Object.create === "function") {
|
|
62
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
exports.__esModule = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
(function (exporter) {
|
|
72
|
+
var extendStatics = Object.setPrototypeOf ||
|
|
73
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
74
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
75
|
+
|
|
76
|
+
__extends = function (d, b) {
|
|
77
|
+
if (typeof b !== "function" && b !== null)
|
|
78
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
79
|
+
extendStatics(d, b);
|
|
80
|
+
function __() { this.constructor = d; }
|
|
81
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
__assign = Object.assign || function (t) {
|
|
85
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
86
|
+
s = arguments[i];
|
|
87
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
88
|
+
}
|
|
89
|
+
return t;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
__rest = function (s, e) {
|
|
93
|
+
var t = {};
|
|
94
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
95
|
+
t[p] = s[p];
|
|
96
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
97
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
98
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
99
|
+
t[p[i]] = s[p[i]];
|
|
100
|
+
}
|
|
101
|
+
return t;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
__decorate = function (decorators, target, key, desc) {
|
|
105
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
106
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
107
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
108
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
__param = function (paramIndex, decorator) {
|
|
112
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
__esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
116
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
117
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
118
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
119
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
120
|
+
var _, done = false;
|
|
121
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
122
|
+
var context = {};
|
|
123
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
124
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
125
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
126
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
127
|
+
if (kind === "accessor") {
|
|
128
|
+
if (result === void 0) continue;
|
|
129
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
130
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
131
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
132
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
133
|
+
}
|
|
134
|
+
else if (_ = accept(result)) {
|
|
135
|
+
if (kind === "field") initializers.unshift(_);
|
|
136
|
+
else descriptor[key] = _;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
140
|
+
done = true;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
__runInitializers = function (thisArg, initializers, value) {
|
|
144
|
+
var useValue = arguments.length > 2;
|
|
145
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
146
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
147
|
+
}
|
|
148
|
+
return useValue ? value : void 0;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
__propKey = function (x) {
|
|
152
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
__setFunctionName = function (f, name, prefix) {
|
|
156
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
157
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
__metadata = function (metadataKey, metadataValue) {
|
|
161
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
__awaiter = function (thisArg, _arguments, P, generator) {
|
|
165
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
166
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
167
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
168
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
169
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
170
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
__generator = function (thisArg, body) {
|
|
175
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
176
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
177
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
178
|
+
function step(op) {
|
|
179
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
180
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
181
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
182
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
183
|
+
switch (op[0]) {
|
|
184
|
+
case 0: case 1: t = op; break;
|
|
185
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
186
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
187
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
188
|
+
default:
|
|
189
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
190
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
191
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
192
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
193
|
+
if (t[2]) _.ops.pop();
|
|
194
|
+
_.trys.pop(); continue;
|
|
195
|
+
}
|
|
196
|
+
op = body.call(thisArg, _);
|
|
197
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
198
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
__exportStar = function(m, o) {
|
|
203
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
__createBinding = Object.create ? (function(o, m, k, k2) {
|
|
207
|
+
if (k2 === undefined) k2 = k;
|
|
208
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
209
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
210
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
211
|
+
}
|
|
212
|
+
Object.defineProperty(o, k2, desc);
|
|
213
|
+
}) : (function(o, m, k, k2) {
|
|
214
|
+
if (k2 === undefined) k2 = k;
|
|
215
|
+
o[k2] = m[k];
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
__values = function (o) {
|
|
219
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
220
|
+
if (m) return m.call(o);
|
|
221
|
+
if (o && typeof o.length === "number") return {
|
|
222
|
+
next: function () {
|
|
223
|
+
if (o && i >= o.length) o = void 0;
|
|
224
|
+
return { value: o && o[i++], done: !o };
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
__read = function (o, n) {
|
|
231
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
232
|
+
if (!m) return o;
|
|
233
|
+
var i = m.call(o), r, ar = [], e;
|
|
234
|
+
try {
|
|
235
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
236
|
+
}
|
|
237
|
+
catch (error) { e = { error: error }; }
|
|
238
|
+
finally {
|
|
239
|
+
try {
|
|
240
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
241
|
+
}
|
|
242
|
+
finally { if (e) throw e.error; }
|
|
243
|
+
}
|
|
244
|
+
return ar;
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/** @deprecated */
|
|
248
|
+
__spread = function () {
|
|
249
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
250
|
+
ar = ar.concat(__read(arguments[i]));
|
|
251
|
+
return ar;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/** @deprecated */
|
|
255
|
+
__spreadArrays = function () {
|
|
256
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
257
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
258
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
259
|
+
r[k] = a[j];
|
|
260
|
+
return r;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
__spreadArray = function (to, from, pack) {
|
|
264
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
265
|
+
if (ar || !(i in from)) {
|
|
266
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
267
|
+
ar[i] = from[i];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
__await = function (v) {
|
|
274
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
__asyncGenerator = function (thisArg, _arguments, generator) {
|
|
278
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
279
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
280
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
281
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
282
|
+
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
283
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
284
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
285
|
+
function fulfill(value) { resume("next", value); }
|
|
286
|
+
function reject(value) { resume("throw", value); }
|
|
287
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
__asyncDelegator = function (o) {
|
|
291
|
+
var i, p;
|
|
292
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
293
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
__asyncValues = function (o) {
|
|
297
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
298
|
+
var m = o[Symbol.asyncIterator], i;
|
|
299
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
300
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
301
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
__makeTemplateObject = function (cooked, raw) {
|
|
305
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
306
|
+
return cooked;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
310
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
311
|
+
}) : function(o, v) {
|
|
312
|
+
o["default"] = v;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
var ownKeys = function(o) {
|
|
316
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
317
|
+
var ar = [];
|
|
318
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
319
|
+
return ar;
|
|
320
|
+
};
|
|
321
|
+
return ownKeys(o);
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
__importStar = function (mod) {
|
|
325
|
+
if (mod && mod.__esModule) return mod;
|
|
326
|
+
var result = {};
|
|
327
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
328
|
+
__setModuleDefault(result, mod);
|
|
329
|
+
return result;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
__importDefault = function (mod) {
|
|
333
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
__classPrivateFieldGet = function (receiver, state, kind, f) {
|
|
337
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
338
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
339
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
|
|
343
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
344
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
345
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
346
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
__classPrivateFieldIn = function (state, receiver) {
|
|
350
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
|
351
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
__addDisposableResource = function (env, value, async) {
|
|
355
|
+
if (value !== null && value !== void 0) {
|
|
356
|
+
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
357
|
+
var dispose, inner;
|
|
358
|
+
if (async) {
|
|
359
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
360
|
+
dispose = value[Symbol.asyncDispose];
|
|
361
|
+
}
|
|
362
|
+
if (dispose === void 0) {
|
|
363
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
364
|
+
dispose = value[Symbol.dispose];
|
|
365
|
+
if (async) inner = dispose;
|
|
366
|
+
}
|
|
367
|
+
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
368
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
369
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
370
|
+
}
|
|
371
|
+
else if (async) {
|
|
372
|
+
env.stack.push({ async: true });
|
|
373
|
+
}
|
|
374
|
+
return value;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
378
|
+
var e = new Error(message);
|
|
379
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
__disposeResources = function (env) {
|
|
383
|
+
function fail(e) {
|
|
384
|
+
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
385
|
+
env.hasError = true;
|
|
386
|
+
}
|
|
387
|
+
var r, s = 0;
|
|
388
|
+
function next() {
|
|
389
|
+
while (r = env.stack.pop()) {
|
|
390
|
+
try {
|
|
391
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
392
|
+
if (r.dispose) {
|
|
393
|
+
var result = r.dispose.call(r.value);
|
|
394
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
395
|
+
}
|
|
396
|
+
else s |= 1;
|
|
397
|
+
}
|
|
398
|
+
catch (e) {
|
|
399
|
+
fail(e);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
403
|
+
if (env.hasError) throw env.error;
|
|
404
|
+
}
|
|
405
|
+
return next();
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
__rewriteRelativeImportExtension = function (path, preserveJsx) {
|
|
409
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
410
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
411
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
return path;
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
exporter("__extends", __extends);
|
|
418
|
+
exporter("__assign", __assign);
|
|
419
|
+
exporter("__rest", __rest);
|
|
420
|
+
exporter("__decorate", __decorate);
|
|
421
|
+
exporter("__param", __param);
|
|
422
|
+
exporter("__esDecorate", __esDecorate);
|
|
423
|
+
exporter("__runInitializers", __runInitializers);
|
|
424
|
+
exporter("__propKey", __propKey);
|
|
425
|
+
exporter("__setFunctionName", __setFunctionName);
|
|
426
|
+
exporter("__metadata", __metadata);
|
|
427
|
+
exporter("__awaiter", __awaiter);
|
|
428
|
+
exporter("__generator", __generator);
|
|
429
|
+
exporter("__exportStar", __exportStar);
|
|
430
|
+
exporter("__createBinding", __createBinding);
|
|
431
|
+
exporter("__values", __values);
|
|
432
|
+
exporter("__read", __read);
|
|
433
|
+
exporter("__spread", __spread);
|
|
434
|
+
exporter("__spreadArrays", __spreadArrays);
|
|
435
|
+
exporter("__spreadArray", __spreadArray);
|
|
436
|
+
exporter("__await", __await);
|
|
437
|
+
exporter("__asyncGenerator", __asyncGenerator);
|
|
438
|
+
exporter("__asyncDelegator", __asyncDelegator);
|
|
439
|
+
exporter("__asyncValues", __asyncValues);
|
|
440
|
+
exporter("__makeTemplateObject", __makeTemplateObject);
|
|
441
|
+
exporter("__importStar", __importStar);
|
|
442
|
+
exporter("__importDefault", __importDefault);
|
|
443
|
+
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
|
444
|
+
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
|
445
|
+
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
|
|
446
|
+
exporter("__addDisposableResource", __addDisposableResource);
|
|
447
|
+
exporter("__disposeResources", __disposeResources);
|
|
448
|
+
exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
0 && (module.exports = {
|
|
452
|
+
__extends: __extends,
|
|
453
|
+
__assign: __assign,
|
|
454
|
+
__rest: __rest,
|
|
455
|
+
__decorate: __decorate,
|
|
456
|
+
__param: __param,
|
|
457
|
+
__esDecorate: __esDecorate,
|
|
458
|
+
__runInitializers: __runInitializers,
|
|
459
|
+
__propKey: __propKey,
|
|
460
|
+
__setFunctionName: __setFunctionName,
|
|
461
|
+
__metadata: __metadata,
|
|
462
|
+
__awaiter: __awaiter,
|
|
463
|
+
__generator: __generator,
|
|
464
|
+
__exportStar: __exportStar,
|
|
465
|
+
__createBinding: __createBinding,
|
|
466
|
+
__values: __values,
|
|
467
|
+
__read: __read,
|
|
468
|
+
__spread: __spread,
|
|
469
|
+
__spreadArrays: __spreadArrays,
|
|
470
|
+
__spreadArray: __spreadArray,
|
|
471
|
+
__await: __await,
|
|
472
|
+
__asyncGenerator: __asyncGenerator,
|
|
473
|
+
__asyncDelegator: __asyncDelegator,
|
|
474
|
+
__asyncValues: __asyncValues,
|
|
475
|
+
__makeTemplateObject: __makeTemplateObject,
|
|
476
|
+
__importStar: __importStar,
|
|
477
|
+
__importDefault: __importDefault,
|
|
478
|
+
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
479
|
+
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
480
|
+
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
481
|
+
__addDisposableResource: __addDisposableResource,
|
|
482
|
+
__disposeResources: __disposeResources,
|
|
483
|
+
__rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
|
|
484
|
+
});
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TonyClaw
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Agent Inspector
|
|
2
|
+
|
|
3
|
+
Agent Inspector is an agent observability and knowledge-capture platform for AI coding tools. It keeps the local proxy, log capture, MCP, and Chrome companion foundation, and evolves it toward agent interaction analysis, knowledge extraction, and memory-ready workflows for systems such as OpenClaw.
|
|
4
|
+
|
|
5
|
+
The npm package and CLI remain `agent-inspector`; the platform name is Agent Inspector.
|
|
6
|
+
|
|
7
|
+
## What It Does
|
|
8
|
+
|
|
9
|
+
- Runs a local transparent proxy for Anthropic and OpenAI-compatible APIs.
|
|
10
|
+
- Captures model requests, responses, streaming chunks, tool definitions, token usage, and errors.
|
|
11
|
+
- Provides a web UI for browsing sessions and logs in real time.
|
|
12
|
+
- Includes a Chrome companion extension for quick capture status and log navigation.
|
|
13
|
+
- Generates reviewable knowledge candidates from agent sessions.
|
|
14
|
+
- Bridges approved knowledge to OpenClaw while keeping OpenClaw hidden behind the Inspector surface.
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
Install the published CLI:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -g @tonyclaw/agent-inspector
|
|
22
|
+
agent-inspector
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Optional guided setup:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
agent-inspector onboard
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
For local development from source:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bun install
|
|
35
|
+
bun run dev
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then point an AI coding tool at the proxy:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
ANTHROPIC_BASE_URL=http://localhost:25947/proxy <tool>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The web UI runs at http://localhost:25947.
|
|
45
|
+
|
|
46
|
+
## Project Direction
|
|
47
|
+
|
|
48
|
+
Agent Inspector should stay close to the proven inspector codebase while growing into an agent knowledge layer. The core product direction has three layers:
|
|
49
|
+
|
|
50
|
+
1. Observe: normalize agent and model traffic into stable interaction events.
|
|
51
|
+
2. Analyze: identify reusable facts, decisions, tool patterns, failures, and user preferences.
|
|
52
|
+
3. Remember: publish curated memory candidates into an external memory system while keeping user control and auditability.
|
package/package.json
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tonyclaw/agent-inspector",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Agent observability and knowledge capture layer for AI coding tools.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "TonyClaw",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://gitcode.com/TonyClaw/agent-inspector.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://gitcode.com/TonyClaw/agent-inspector#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://gitcode.com/TonyClaw/agent-inspector/issues"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"claude",
|
|
21
|
+
"anthropic",
|
|
22
|
+
"openai",
|
|
23
|
+
"proxy",
|
|
24
|
+
"api-inspector",
|
|
25
|
+
"agent-observability",
|
|
26
|
+
"agent-memory",
|
|
27
|
+
"debugging",
|
|
28
|
+
"llm",
|
|
29
|
+
"ai-coding-tools"
|
|
30
|
+
],
|
|
31
|
+
"bin": {
|
|
32
|
+
"agent-inspector": ".output/cli.js"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"src",
|
|
36
|
+
"!src/**/*.test.ts",
|
|
37
|
+
"!src/**/*.stories.tsx",
|
|
38
|
+
"!src/**/__fixtures__",
|
|
39
|
+
"!src/routeTree.gen.ts",
|
|
40
|
+
"styles",
|
|
41
|
+
".output"
|
|
42
|
+
],
|
|
43
|
+
"scripts": {
|
|
44
|
+
"dev": "vite dev",
|
|
45
|
+
"start": "node .output/cli.js",
|
|
46
|
+
"build": "vite build && bun build:cli",
|
|
47
|
+
"build:cli": "npx esbuild src/cli.ts --bundle --platform=node --target=node18 --format=esm --outfile=.output/cli.js",
|
|
48
|
+
"prepublishOnly": "npm run build",
|
|
49
|
+
"typecheck": "tsc --noEmit",
|
|
50
|
+
"lint": "eslint .",
|
|
51
|
+
"format": "biome format --write .",
|
|
52
|
+
"format:check": "biome format .",
|
|
53
|
+
"extension:zip": "node scripts/pack-chrome-extension.mjs",
|
|
54
|
+
"extension:release": "node scripts/release-chrome-extension.mjs",
|
|
55
|
+
"knip": "knip",
|
|
56
|
+
"check": "bun format && bun typecheck && bun lint",
|
|
57
|
+
"prepare": "husky",
|
|
58
|
+
"ladle": "ladle serve",
|
|
59
|
+
"ladle:build": "ladle build"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@modelcontextprotocol/server": "^2.0.0-alpha.2",
|
|
63
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
64
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
65
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
66
|
+
"@tanstack/react-router": "^1.160.2",
|
|
67
|
+
"@tanstack/react-start": "^1.161.0",
|
|
68
|
+
"@tanstack/react-virtual": "^3.13.26",
|
|
69
|
+
"class-variance-authority": "^0.7.1",
|
|
70
|
+
"clsx": "^2.1.1",
|
|
71
|
+
"conf": "^15.1.0",
|
|
72
|
+
"diff": "^9.0.0",
|
|
73
|
+
"jszip": "^3.10.1",
|
|
74
|
+
"lucide-react": "^0.563.0",
|
|
75
|
+
"radix-ui": "^1.4.3",
|
|
76
|
+
"react": "^19",
|
|
77
|
+
"react-dom": "^19",
|
|
78
|
+
"react-markdown": "^10.1.0",
|
|
79
|
+
"swr": "^2.4.1",
|
|
80
|
+
"tailwind-merge": "^3.4.0",
|
|
81
|
+
"tw-animate-css": "^1.4.0",
|
|
82
|
+
"zod": "^4.3.6"
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@biomejs/biome": "^2.3.14",
|
|
86
|
+
"@cfworker/json-schema": "^4.1.1",
|
|
87
|
+
"@eslint/js": "^10.0.1",
|
|
88
|
+
"@ladle/react": "^5.1.1",
|
|
89
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
90
|
+
"@types/bun": "latest",
|
|
91
|
+
"@types/react": "^19",
|
|
92
|
+
"@types/react-dom": "^19",
|
|
93
|
+
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
94
|
+
"@typescript-eslint/parser": "^8.55.0",
|
|
95
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
96
|
+
"esbuild": "^0.25.0",
|
|
97
|
+
"eslint": "^9.32.0",
|
|
98
|
+
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
99
|
+
"eslint-plugin-functional": "^9.0.2",
|
|
100
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
101
|
+
"husky": "^9.1.7",
|
|
102
|
+
"knip": "^5.83.1",
|
|
103
|
+
"nitro": "^3.0.260603-beta",
|
|
104
|
+
"playwright": "^1.60.0",
|
|
105
|
+
"tailwindcss": "^4.1.11",
|
|
106
|
+
"typescript": "^5.9.3",
|
|
107
|
+
"vite": "^7.3.1",
|
|
108
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
109
|
+
}
|
|
110
|
+
}
|