{
  "llm": {
    "conf": 0,
    "error": "",
    "grade": "benign",
    "interpretation": "legitimate chat adapter package",
    "model": "Qwen/Qwen3.8-27B",
    "outcome": "suspicious"
  },
  "ml": {
    "analyzed_at": "2026-11-20T09:26:13Z",
    "files": [
      {
        "lvl": 1,
        "prob": 0.10877895,
        "id": 0
      },
      {
        "lvl": -1,
        "id": 1
      },
      {
        "lvl": -1,
        "id": 2
      },
      {
        "lvl": -1,
        "id": 3
      },
      {
        "lvl": -1,
        "id": 4
      },
      {
        "lvl": -1,
        "id": 5
      },
      {
        "lvl": -1,
        "id": 6
      },
      {
        "lvl": -1,
        "id": 7
      },
      {
        "lvl": -1,
        "id": 8
      },
      {
        "lvl": -1,
        "id": 9
      },
      {
        "lvl": -1,
        "id": 10
      },
      {
        "lvl": -1,
        "id": 11
      },
      {
        "lvl": -1,
        "id": 12
      }
    ],
    "lvl": 1,
    "mods": [
      {
        "cls": 0
      }
    ],
    "prob": 0.10877895,
    "v": "7",
    "version": "v20.20"
  },
  "path": "web-4.45.0.tgz",
  "raw": {
    "files": [
      {
        "depth": 0,
        "facts": {
          "metrics": {
            "archive": {
              "directory_count": 0,
              "double_extension_count": 0,
              "executable_count": 0,
              "file_count": 13,
              "format.regular_count": 13,
              "hidden_file_count": 0,
              "homoglyph_filename_count": 0,
              "max_filename_length": 37,
              "member_count": 13,
              "misplaced_executable_count": 0,
              "nested_archive_count": 0,
              "path_traversal_count": 0,
              "rtlo_filename_count": 0,
              "script_count": 4,
              "security.setgid_count": 0,
              "security.setuid_count": 0,
              "security.sticky_count": 0,
              "security.symlink_count": 0,
              "security.world_writable_count": 0,
              "symlink_escape_count": 0,
              "timing.mtime_spread_seconds": 0,
              "timing.mtime_unique_count": 1,
              "uncompressed_size": 59022,
              "unicode_filename_count": 0
            },
            "binary": {
              "peak_region_bytes": 17293,
              "peak_region_entropy": 7.85
            },
            "consistency": {
              "missing_author": 1,
              "self_dependency": 0,
              "unused_runtime_deps": 0
            },
            "file": {
              "entropy": 7.99,
              "size": 17293
            }
          }
        },
        "id": 0,
        "ident": {
          "name": {
            "value": "@chat-adapter/web",
            "source": "npm.name",
            "verified": false
          },
          "urls": [
            {
              "url": "git+https://github.com/vercel/chat.git",
              "kind": "repository",
              "source": "npm.repository.url"
            },
            {
              "url": "https://chat-sdk.dev/adapters/official/web",
              "kind": "homepage",
              "source": "npm.homepage"
            }
          ],
          "trust": "unsigned",
          "version": {
            "value": "4.45.0",
            "source": "npm.version",
            "verified": false
          },
          "identifier": {
            "value": "@chat-adapter/web",
            "source": "npm.name",
            "verified": false
          },
          "description": {
            "value": "Web adapter for Chat SDK — browser chat UI over the AI SDK or AG-UI (TanStack AI) stream protocols",
            "source": "npm.description",
            "verified": false
          }
        },
        "mol": "O(Eu)H₄(Cm₆Db₅Os₂U)Md₄(Ne₂Pa₁₄Pt₆)",
        "path": "web-4.45.0.tgz",
        "refs": [
          {
            "kind": "repository",
            "to": "pkg:github/vercel/chat"
          }
        ],
        "risk": 25,
        "sha": "d3ea986cf557f79a758411a3e09e5b9ba2fe6c009e209d44751f04b147fdcfa2",
        "size": 17293,
        "traits": [
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Archive contains at least ten members",
            "id": "metadata/archive/layout::archive-at-least-10-members"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Archive ships a README beside HTML or JavaScript files",
            "id": "metadata/archive/layout::archive-readme-with-web-members",
            "uses": [
              2,
              58
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Archive member named with JavaScript extension",
            "id": "metadata/archive/member/extension::archive-js-member"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Filename is package.json",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/filename/identity::package-json-basename"
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Claude agent identity reference",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/natural/vocabulary/ai-assistant::agent-identity-claude"
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "References the generic term \"coding agent\"",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/natural/vocabulary/ai-assistant::agent-identity-coding-agent"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Multiple AI assistant or agent references",
            "from": [
              {
                "file": 1,
                "line": 420,
                "off": 16493
              }
            ],
            "id": "metadata/lang/natural/vocabulary/ai-assistant::agent-identity-set",
            "uses": [
              4,
              5
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Source has 6+ code-like string candidates",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/source/literal/embedded-source::embedded-code-candidates-6"
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "References a userName object member",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/source/naming/person::js-user-name-member"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Identifier += assignment expression",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/source/syntax/assignment/value::js-addition-assignment-identifier"
          },
          {
            "conf": 0.97,
            "crit": 3,
            "desc": "At least four Markdown-style heading lines",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/source/syntax/markup/markdown::at-least-four-markdown-style-headings"
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Markdown-style heading precedes a code fence",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/source/syntax/markup/markdown::markdown-heading-before-fenced-block"
          },
          {
            "conf": 0.94,
            "crit": 3,
            "desc": "Object pairs chat role and message fields",
            "from": [
              {
                "file": 3,
                "line": 64,
                "off": 1781
              },
              {
                "file": 1,
                "line": 109,
                "off": 3768
              },
              {
                "file": 2,
                "line": 125,
                "off": 4573
              },
              {
                "file": 8,
                "line": 55,
                "off": 2059
              }
            ],
            "id": "metadata/lang/source/syntax/object::chat-role-message-record",
            "uses": [
              97,
              98
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Published npm manifest omits author metadata",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/author/presence::published-npm-manifest-omits-author"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Declares runtime dependencies object",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/dependencies/declaration::npm-runtime-dependencies-object"
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Declares TypeScript development dependency",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/dependencies/development::npm-typescript-development-dependency"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package declares a runtime dependency",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/dependencies/presence::has-runtime-deps"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Uses version ranges for peer dependencies",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/dependencies/range::peer-range"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package has multiple entry declaration fields",
            "from": [
              {
                "file": 12,
                "line": 9,
                "off": 238
              }
            ],
            "id": "metadata/package/entrypoint/module::multiple-entry-declaration-fields",
            "uses": [
              20,
              79,
              83,
              84
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Declares npm ESM module type",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::npm-esm-package-type"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Package declares TypeScript types entry",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::pkg-types-field"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "npm publish root manifest declares runtime-tree entrypoint",
            "from": [
              {
                "file": 12,
                "line": 9,
                "off": 238
              }
            ],
            "id": "metadata/package/entrypoint/module::publish-root-runtime-tree-entrypoint",
            "uses": [
              81,
              86
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Package.json declares a files allowlist",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/files/package-json::files-array-present"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "JavaScript/TypeScript file under dist",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/package/files/runtime::javascript-dist-tree-artifact"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "npm archive member under package dist tree",
            "id": "metadata/package/files/runtime::npm-archive-member-dist-runtime-path"
          },
          {
            "conf": 0.99,
            "crit": 3,
            "desc": "Has dist/index.js path",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/package/files/runtime::npm-dist-index-entry"
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "License text starts MIT/ISC/Apache/BSD",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/license::npm-license-mit-isc-apache-bsd-prefix"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "npm package is configured for public publishing",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/publishing::npm-public-publish-access"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "npm manifest declares a repository subdirectory",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/repository::npm-repository-directory-field"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Repository identifies major Git host",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/repository::repo-url-git-host"
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "Package declares build script",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/scripts/build::has-build-script-build"
          },
          {
            "conf": 0.6,
            "crit": 3,
            "desc": "Package declares a build script",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/scripts/build::pkg-build-script-field"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package script runs a bundler or compiler",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/scripts/build::script-runs-bundler-cli"
          },
          {
            "conf": 0.6,
            "crit": 3,
            "desc": "package.json declares a development script",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/scripts/develop::pkg-dev-script-field"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package script declares directory removal",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/scripts/reference::npm-script-directory-delete-command"
          },
          {
            "conf": 0.99,
            "crit": 3,
            "desc": "Names an HTTP request parser test",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/package/testing/http-fixtures::http-duplicate-length-parser-test-name"
          },
          {
            "conf": 0.65,
            "crit": 3,
            "desc": "References the application/json media type",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/communications/http/header/content-type::application-json"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "References HTTP Content-Type application/json",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/communications/http/header/content-type::json-header"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Calls JSON method on HTTP-style object",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/communications/http/message::http-message-json-call"
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "HTTP 401 unauthorized response text",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/communications/http/response::http-401-unauthorized"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Calls a SendMessage/sendMessage method",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/communications/messaging/send::send-message-call",
            "mbc": "C0029"
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "Contains a hardcoded remote HTTP(S) URL",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/communications/url/host/domain-http::js-remote-host-url"
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Root API chat or generate URL path",
            "from": [
              {
                "file": 5
              }
            ],
            "id": "micro-behaviors/communications/url/resource-path/automation::api-chat-or-generate-path-reference"
          },
          {
            "conf": 0.86,
            "crit": 3,
            "desc": "Repeated computed-property calls (3+)",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/data/control-flow/dispatch/computed::js-computed-call-cluster"
          },
          {
            "conf": 0.94,
            "crit": 3,
            "desc": "AI coding agent reference",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/data/llm/agent::coding-agent-reference"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "References an LLM tool-result marker",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/data/llm/agent::tool-result-marker"
          },
          {
            "conf": 0.72,
            "crit": 3,
            "desc": "LLM developer or assistant terminology reference",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/data/llm/wire-marker::non-system-role-term-reference"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Assigns a user identity property",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/data/property/assign::user-identity-field-assignment"
          },
          {
            "conf": 0.5,
            "crit": 3,
            "desc": "Calls JSON.stringify()",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/data/serialize/json::json-stringify-call"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Serializes an identifier as JSON",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/data/serialize/json::json-stringify-identifier"
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Serializes a payload object as JSON",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/data/serialize/json::json-stringify-payload-call"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Serializes value with JSON.stringify",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/data/serialize/json::json-stringify-text-call"
          },
          {
            "conf": 0.84,
            "crit": 3,
            "desc": "JSON.stringify beside a variable-valued field",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/data/serialize/json::json-stringify-variable-value"
          },
          {
            "conf": 0.6,
            "crit": 3,
            "desc": "References the nginx web server",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/os/application/target/server::nginx-name-reference"
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "npx package run command text",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/os/package-manager/run::npx-package-command-text"
          },
          {
            "conf": 0.72,
            "crit": 3,
            "desc": "Generates UUID with Web Crypto",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "micro-behaviors/os/random/crypto::webcrypto-random-uuid"
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "String literal embeds HTML script tag",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "micro-behaviors/ui/window/dom/render::literal-script-element-tag"
          },
          {
            "atk": "T1041",
            "conf": 0.98,
            "crit": 3,
            "desc": "Serializes payload with JSON.stringify",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "objectives/exfiltration/stealer/directory-listing::node-json-stringify-payload",
            "mbc": "E1041"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "Archive member is a README document",
            "id": "metadata/archive/member/filename/role::archive-readme-member"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "JavaScript or TypeScript source filename",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/file/extension/source::js-ts-source-basename"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @ai-sdk/react",
            "from": [
              {
                "file": 5
              }
            ],
            "id": "metadata/import/npm/ai-sdk/react::ai-sdk/react"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @ai-sdk/svelte",
            "from": [
              {
                "file": 7
              }
            ],
            "id": "metadata/import/npm/ai-sdk/svelte::ai-sdk/svelte"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @ai-sdk/vue",
            "from": [
              {
                "file": 11
              }
            ],
            "id": "metadata/import/npm/ai-sdk/vue::ai-sdk/vue"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports ai",
            "from": [
              {
                "file": 5
              }
            ],
            "id": "metadata/import/npm/ai::ai"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports async_hooks",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/npm/async_hooks::async_hooks"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @chat-adapter/shared",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/npm/chat-adapter/shared::chat-adapter/shared"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @chat-adapter/state-memory",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/import/npm/chat-adapter/state-memory::chat-adapter/state-memory"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @chat-adapter/web",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/import/npm/chat-adapter/web::chat-adapter/web"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports chat",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/import/npm/chat::chat"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports react",
            "from": [
              {
                "file": 5
              }
            ],
            "id": "metadata/import/npm/react::react"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports ./types-BZb_SQPK.js",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/import/npm/relative/1/types-bzb_sqpk/js::relative/1/types-bzb_sqpk/js"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports ../types-BZb_SQPK.js",
            "from": [
              {
                "file": 4
              }
            ],
            "id": "metadata/import/npm/relative/2/types-bzb_sqpk/js::relative/2/types-bzb_sqpk/js"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES6 arrow function syntax",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/javascript-features::arrow-function"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES2017 async/await syntax",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/javascript-features::async-await"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES6 const/let declarations",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/javascript-features::const-let"
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES6 destructuring assignment",
            "from": [
              {
                "file": 1
              }
            ],
            "id": "metadata/lang/javascript-features::destructuring"
          },
          {
            "conf": 0.99,
            "crit": 2,
            "desc": "TypeScript declaration file",
            "from": [
              {
                "file": 2
              }
            ],
            "id": "metadata/lang/scripted::dts-declaration-file"
          },
          {
            "conf": 0.98,
            "crit": 2,
            "desc": "Payload/data member-name reference",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/source/syntax/member::message-payload-data-member-name"
          },
          {
            "conf": 0.98,
            "crit": 2,
            "desc": "Type member-name reference",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/source/syntax/member::message-type-member-name"
          },
          {
            "conf": 0.85,
            "crit": 2,
            "desc": "package.json declares an exports map",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::has-exports-field"
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package main targets dist output",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::main-dist-entrypoint"
          },
          {
            "conf": 0.85,
            "crit": 2,
            "desc": "Package main targets runtime tree",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::main-runtime-tree-entrypoint"
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package module targets dist output",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::module-dist-entrypoint"
          },
          {
            "conf": 0.6,
            "crit": 2,
            "desc": "package.json declares a main entry point",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::pkg-main-field"
          },
          {
            "conf": 0.6,
            "crit": 2,
            "desc": "\"module\": field in package.json",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::pkg-module-field"
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package types targets dist output",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/entrypoint/module::types-dist-entrypoint"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "Manifest sits at npm publish root",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/files/included::npm-publish-root-manifest"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "npm archive ships runtime JavaScript",
            "id": "metadata/package/files/included::npm-runtime-code-member"
          },
          {
            "conf": 0.85,
            "crit": 2,
            "desc": "Package files list includes the dist directory",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/files/package-json::files-dist-ref"
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "package.json declares a test script",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/scripts/develop::has-test-script"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"that\"",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-3"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"have\"",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-4"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6"
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"this\"",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-7"
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Chat object defines message or content key",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/source/syntax/object::chat-message-content-field"
          },
          {
            "conf": 0.92,
            "crit": 1,
            "desc": "Chat role field names user or assistant",
            "from": [
              {
                "file": 3
              }
            ],
            "id": "metadata/lang/source/syntax/object::chat-role-field-literal"
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "npm manifest omits Ethers client",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/dependencies/presence::npm-manifest-omits-ethers-client"
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "npm manifest omits Web3 client",
            "from": [
              {
                "file": 12
              }
            ],
            "id": "metadata/package/dependencies/presence::npm-manifest-omits-web3-client"
          }
        ],
        "type": "npm"
      },
      {
        "analysis_gaps": [
          "flow-graph-limited",
          "flow-call-unavailable",
          "flow-query-incomplete"
        ],
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "[![Web adapter for Chat SDK](https://chat-sdk.dev/en/adapters/official/web/og)](https://chat-sdk.dev/adapters/official/web)\n\n# @chat-adapter/web\n\n\u003e npm package: [`@chat-adapter/web`](https://www.npmjs.com/package/@chat-adapter/web)\n\n[![Agent Stack](https://img.shields.io/badge/Agent%20Stack-000?style=flat-square\u0026logo=vercel\u0026logoColor=FFF\u0026labelColor=000\u0026color=000)](https://vercel.com/kb/agent-stack)\n[![MIT License](https://img.shields.io/badge/License-MIT-000?style=flat-square\u0026logo=opensourceinitiative\u0026logoColor=white\u0026labelColor=000\u0026color=000)](../../LICENSE)\n\nWeb adapter for [Chat SDK](https://chat-sdk.dev). Lets a chat-sdk bot serve a browser chat UI alongside Slack, Teams, Discord, etc. â the same `bot.onDirectMessage(...)` handler fires for every platform.\n\nThe adapter speaks the [AI SDK UI message stream protocol](https://ai-sdk.dev/docs/ai-sdk-ui/stream-protocol) by default, so React, Vue, and Svelte AI SDK clients work against the server endpoint. Set `protocol: \"ag-ui\"` to speak [AG-UI](https://docs.ag-ui.com/concepts/events) instead, for [TanStack AI](#tanstack-ai) and other AG-UI clients. The server has no runtime dependency on either client SDK.\n\nDocumentation: [chat-sdk.dev/"
          },
          {
            "col": 102,
            "line": 14,
            "ln": 1278,
            "s": "ides: [vercel.com/kb/chat-sdk](https://vercel.com/kb/chat-sdk)\n\n## Installation\n\n```bash\npnpm add @chat-adapter/web\n```\n\nThen install the client packages that match your UI:\n\n| Client | Packages | Import from | `protocol` |\n|--------|----------|---------"
          },
          {
            "col": 55,
            "line": 29,
            "ln": 1913,
            "s": "ack AI framework package) | `@tanstack/ai-react` | `\"ag-ui\"` |\n\n## Scaffold with the CLI\n\nTo scaffold a new browser chat bot with the Web adapter preselected:\n\n```bash\nnpx create-chat-sdk@latest my-bot --adapter web memory\n```\n\nVisit the [adapters directory](https://chat-sdk.dev/adapters) to see other available official and vendor-official adapters.\n\n## Quick start\n\n### Server\n\n```typescript\n// lib/bot.ts\nimport { Chat } from \"chat\";\nimport { createWebAdapter } from \"@chat-adapter/web\";\nimport { createMemoryState } from \"@chat-adapter/state-memory\";\n\nexport const bot = new Chat({\n  userName: \"mybot\",\n  adapters: {\n    web: createWebAdapter({\n      userName: \"mybot\",\n      getUser: (req) =\u003e ({ id: getUserIdFromCookie(req) }),\n    }),\n  },\n  state: createMemoryState(),\n});\n\nbot.onDirectMessage(async (thread, message) =\u003e {\n  await thread.post(`You said: ${message.text}`);\n});\n```\n\n```typescript\n// app/api/chat/route.ts\nimport"
          },
          {
            "col": 25,
            "line": 70,
            "ln": 2904,
            "s": "ib/bot\";\n\nexport async function POST(request: Request): Promise\u003cResponse\u003e {\n  return bot.webhooks.web(request, {\n    waitUntil: (task) =\u003e after(() =\u003e task),\n  });\n}\n```\n\n### Client\n\n#### React\n\n```tsx\n// app/chat/page.tsx\n\"use client\";\nimport { useChat } from \"@chat-adapter/web/react\";\n\nexport default function ChatPage() {\n  const { messages, sendMessage, status, stop } = useChat();\n  // Render with `ai-elements` (\u003cConversation\u003e, \u003cMessage\u003e, \u003cPromptInput\u003e)\n  // or your own components â `messa"
          },
          {
            "col": 55,
            "line": 91,
            "ln": 3418,
            "s": "ge`, `status` are the\n  // standard `@ai-sdk/react` API.\n}\n```\n\n#### Vue\n\n```vue\n\u003c!-- components/Chat.vue --\u003e\n\u003cscript setup lang=\"ts\"\u003e\nimport { useChat } from \"@chat-adapter/web/vue\";\n\nconst chat = useChat({ api: \"/api/chat\" });\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv v-for=\"msg in chat.messages\" :key=\"msg.id\"\u003e\n    \u003ctemplat"
          },
          {
            "col": 3,
            "line": 109,
            "ln": 3736,
            "s": "    v-for=\"(part, index) in msg.parts\"\n      :key=\"`${msg.id}-${part.type}-${index}`\"\n    \u003e\n      \u003cp v-if=\"part.type === 'text'\"\u003e{{ part.text }}\u003c/p\u003e\n    \u003c/template\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n#### Svelte\n\n```svelte\n\u003c!-- Chat.svelte --\u003e\n\u003cscript lang=\"ts\"\u003e\n  import { useChat } from \"@chat-adapter/web/svelte\";\n\n  const chat = useChat({ a"
          },
          {
            "col": 60,
            "line": 129,
            "ln": 4199,
            "s": "${index}`)}\n    {#if part.type === \"text\"}\u003cp\u003e{part.text}\u003c/p\u003e{/if}\n  {/each}\n{/each}\n```\n\n#### TanStack AI"
          },
          {
            "col": 12,
            "line": 143,
            "ln": 4546,
            "s": " \"ag-ui\",\n});\n```\n\n```tsx\n// app/chat/page.tsx\n\"use client\";\nimport { fetchServerSentEvents, useChat } from \"@tanstack/ai-react\";\n\nexport default function ChatPage() {\n  const { messages, sendMessage, isLoading, stop } = useChat({\n    connection: fetchServerSentEvents(\"/api/chat\"),\n    threadId: \"support-1\",\n  });\n  // Text parts carry their text in `part.content`.\n}\n```\n\n`threadId` becomes the conversation id in the chat-sdk thread id. Each `thread.post` call arrives as its own assistant message, and handler errors end the run with a `RUN_ERROR` event.\n\n## Authentication\n\n`getUser` is the **security boundary** for the Web adapter. Unlike Slack/Teams where the platform signs every webhook, web req"
          },
          {
            "col": 36,
            "line": 167,
            "ln": 5448,
            "s": "ses:\n\n```typescript\n// NextAuth\ncreateWebAdapter({\n  userName: \"mybot\",\n  getUser: async (req) =\u003e {\n    const session = await getServerSession(authOptions);\n    if (!session?.user) return null;\n    return { id: session.user.id, name: session.user.name };\n  },\n});\n\n// Clerk\ncreateWebAdapter({\n  userName: \"mybot\",\n  getUser: async (req) =\u003e {\n    const { userId, sessionClaims } = await auth();\n    if (!userId) return null;\n    return { id: userId, name: sessionClaims?.name as string | undefined };\n  },\n});\n\n// Custom session cookie\ncreateWebAdapter({\n  userName: \"mybot\",\n  getUser: async (req) =\u003e {\n    const sessionId = req.headers.get(\"cookie\")?.match(/session=([^;]+)/)?.[1];\n    if (!sessionId) return null;\n    const user = await db.users.findBySession(sessionId);\n    return user ? { id: user.id, name: user.name } : null;\n  },\n});\n```\n\nIf `getUser` throws, the adapter returns 401 and logs the error. Don't include sensitive data in the error message â it's not surfaced to the client, but it is logged.\n\n\u003e The resolved `user.id` is embe"
          },
          {
            "col": 299,
            "line": 204,
            "ln": 6764,
            "s": "lize them inside `getUser` â for example by base64-encoding.\n\n## Threading\n\nBy default, each `useChat` conversation maps to one chat-sdk thread:\n\n```\nweb:{user.id}:{conversationId}\n```\n\n`conversationId`"
          },
          {
            "col": 53,
            "line": 216,
            "ln": 7362,
            "s": "ent on web â the channel id is the thread id. This avoids cross-conversation bleed when `persistMessageHistory` is enabled and the same user has m"
          },
          {
            "col": 12,
            "line": 230,
            "ln": 7838,
            "s": "pt\nadapter.encodeThreadId({ userId: \"u1\", conversationId: \"abc\" });\n// â \"web:u1:abc\"\nadapter.decodeThreadId(\"web:u1:abc\");\n// â { userId: \"u1\", conversationId: \"abc\" }\n```\n\n## Streaming\n\n`thread.post` accepts an `AsyncIterable\u003cstring | StreamChunk\u003e` and pumps deltas straight onto the SSE response body â no edit loop, no rate limiting. Handlers can use any mod"
          },
          {
            "col": 26,
            "line": 246,
            "ln": 8447,
            "s": " (thread, message) =\u003e {\n  const result = streamText({\n    model: myModel,\n    prompt: message.text,\n  })"
          },
          {
            "col": 260,
            "line": 257,
            "ln": 8978,
            "s": "STOM` events named `task` and `plan`. See the [Web adapter docs](https://chat-sdk.dev/adapters/official/web#task-and-plan-updates).\n\n## Message persistence\n\n`persistMessageHistory` defaults to **`true`**. Web has no platform-side history API, so the only way for chat-sdk handlers to see prior turns via `thread.messages` / `channel.messages` is through the configured state adapter's message history cache. Set it to `false` only if your handler doesn't need prior turns:\n\n```typescript\ncreateWebAdapter({\n  userName: \"mybot\",\n  getUser: (req) =\u003e /* ... */,\n  persistMessageHistory: false,\n});\n```\n\nThe client resends the whole conversation on every request, but the adapter doesn't read history from it. A browser controls the request body's `messages[]` array, so the adapter consumes only the latest user message and strips tool parts from it. The last entry must be a user message; a body ending in an assistant or tool message, such as a client-side tool result, is rejected with HTTP 400. Sending the same user message again (`regenerate()` or a reload) runs the handler again rather than being dropped as a duplicate, and history keeps the earlier reply and stores the repeated message a second time."
          },
          {
            "col": 130,
            "line": 273,
            "ln": 10317,
            "s": "IMessage`, so you can cast it with `message.raw as UIMessage`.\n\n## Framework helpers\n\n`@chat-adapter/web/react` exports a thin wrapper around `@ai-sdk/react`'s `useChat` preconfigured with `DefaultChatTransport`:"
          },
          {
            "col": 29,
            "line": 290,
            "ln": 10866,
            "s": "he Web adapter route. Defaults to `/api/chat`. |\n| `threadId` | chat-sdk thread id â surfaces in the request body's `id` so the server can derive the chat-sdk thread id. Strongly recommended. Falls back to `id` from `ChatInit`. |\n| `experimental_throttle` | Throttle wait in ms for chat messages and data updates. |\n| `resume` | Whether to resume an ongoing chat generation stream. |\n| ...rest | All other options pass through to `@ai-sdk/react`'s `useChat`. |\n\nFor advanced configuration (custom transport, response interceptors, etc.) use `@ai-sdk/react`'s `useChat` directly â there's nothing magical in the wrapper.\n\n`@chat-adapter/web/vue` exports"
          },
          {
            "col": 39,
            "line": 335,
            "ln": 12551,
            "s": "e return the `Chat` instance directly. Access `chat.messages`, `chat.sendMessage()`, `chat.status`, and `chat.stop()` on that object instead of destructuring.\n\n## Configuration\n\n| Option | Required | Description |\n|--------|----------|-----"
          },
          {
            "col": 45,
            "line": 355,
            "ln": 13774,
            "s": " a fresh streamed response) |\n| Delete message | No |\n| File uploads | No (deferred to v2) |\n| Streami"
          },
          {
            "col": 25,
            "line": 374,
            "ln": 14248,
            "s": "web message routes as a DM) |\n| Add reactions | No |\n| Remove reactions | No |\n| Typing indicator | N/A (useChat derives a `s"
          },
          {
            "col": 54,
            "line": 395,
            "ln": 15024,
            "s": "ons, modals, file uploads, edit/delete, multi-tab proactive push.\n\n## Troubleshooting\n\n### Every reque"
          },
          {
            "col": 103,
            "line": 402,
            "ln": 15373,
            "s": " (or that your transport passes credentials).\n\n### Every request returns 400 \"Invalid user id\"\n\n- The id re"
          },
          {
            "col": 107,
            "line": 406,
            "ln": 15575,
            "s": "malize the id inside `getUser` (for example, `id.replace(/:/g, \"_\")` or base64-encode it).\n\n### `useChat` recreates state on every render\n\n- Don't pass `"
          },
          {
            "col": 69,
            "line": 416,
            "ln": 16259,
            "s": "essage\"\n\n- The adapter only handles new user turns. Client-side tool results and automatic resubmits (for example, `useChat`'s `sendAutomaticallyWhen`) send a body ending in an assistant or tool message, which isn't supported.\n\n## AI Coding Agents\n\nIf you use an AI coding agent such as OpenAI Codex, Claude Code, or Cursor, install the Chat SDK skill so it knows the SDK APIs, adapter patterns, and project conventions before writing code."
          },
          {
            "col": 90,
            "line": 428,
            "ln": 16830,
            "s": "es and starter templates in the published package.\n\nYou can also install the [Vercel Plugin](https://vercel.com/docs/agent-resources/vercel-plugin) for a broader agent toolkit â it includes the Chat SDK skill alongside specialist agents, agent slash commands, and more:\n\n```bash\nnpx plugins add vercel/vercel-plugin\n```\n\nT"
          }
        ],
        "depth": 1,
        "facts": {
          "funcs": [
            [
              "anonymous",
              7688
            ],
            [
              "anonymous",
              7723
            ],
            [
              "anonymous",
              8442
            ],
            [
              "anonymous",
              9517
            ]
          ],
          "imp": [
            [
              "",
              "endpoint.Set"
            ],
            [
              "",
              "Installation"
            ],
            [
              "",
              "Installation"
            ],
            [
              "",
              "Installation"
            ],
            [
              "",
              "Server"
            ],
            [
              "",
              "Server"
            ],
            [
              "",
              "elements"
            ],
            [
              "",
              "elements"
            ],
            [
              "",
              "elements"
            ],
            [
              "",
              "elements"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "Svelte"
            ],
            [
              "",
              "Svelte"
            ],
            [
              "",
              "Set"
            ],
            [
              "",
              "sdk.Each"
            ],
            [
              "",
              "event.Authentication"
            ],
            [
              "",
              "yourself.Returning"
            ],
            [
              "",
              "whatever"
            ],
            [
              "",
              "whatever"
            ],
            [
              "",
              "whatever"
            ],
            [
              "",
              "whatever"
            ],
            [
              "",
              "resolved"
            ],
            [
              "",
              "through"
            ],
            [
              "",
              "colons"
            ],
            [
              "",
              "normalize"
            ],
            [
              "",
              "each"
            ],
            [
              "",
              "sdk"
            ],
            [
              "",
              "sdk"
            ],
            [
              "",
              "sdk"
            ],
            [
              "",
              "sdk"
            ],
            [
              "",
              "sdk"
            ],
            [
              "",
              "channel.messages"
            ],
            [
              "",
              "thread.messages"
            ],
            [
              "",
              "persistMessageHistory"
            ],
            [
              "",
              "persistMessageHistory"
            ],
            [
              "",
              "createWebAdapter"
            ],
            [
              "",
              "adapter.encodeThreadId"
            ],
            [
              "",
              "adapter.decodeThreadId"
            ],
            [
              "",
              "bot.onDirectMessage"
            ],
            [
              "",
              "streamText"
            ],
            [
              "",
              "thread.post"
            ],
            [
              "",
              "task"
            ],
            [
              "",
              "plan"
            ],
            [
              "",
              "plan"
            ],
            [
              "",
              "regenerate"
            ],
            [
              "",
              "regenerate"
            ],
            [
              "",
              "message.raw"
            ],
            [
              "",
              "WebMessage"
            ],
            [
              "",
              "type"
            ],
            [
              "",
              "unknown"
            ],
            [
              "",
              "UIMessage"
            ],
            [
              "",
              "UIMessage"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "useChat"
            ],
            [
              "",
              "api"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "vue"
            ],
            [
              "",
              "vue"
            ],
            [
              "",
              "vue"
            ],
            [
              "",
              "vue"
            ],
            [
              "",
              "vue"
            ],
            [
              "",
              "svelte"
            ],
            [
              "",
              "svelte"
            ],
            [
              "",
              "svelte"
            ],
            [
              "",
              "svelte"
            ],
            [
              "",
              "svelte"
            ],
            [
              "",
              "index"
            ],
            [
              "",
              "Chat"
            ],
            [
              "",
              "chat.messages"
            ],
            [
              "",
              "chat.sendMessage"
            ],
            [
              "",
              "chat.sendMessage"
            ],
            [
              "",
              "chat.status"
            ],
            [
              "",
              "chat.stop"
            ],
            [
              "",
              "chat.stop"
            ],
            [
              "",
              "userName"
            ],
            [
              "",
              "username"
            ],
            [
              "",
              "getUser"
            ],
            [
              "",
              "getUser"
            ],
            [
              "",
              "persistMessageHistory"
            ],
            [
              "",
              "threadIdFor"
            ],
            [
              "",
              "logger"
            ],
            [
              "",
              "ConsoleLogger"
            ],
            [
              "",
              "ConsoleLogger"
            ],
            [
              "",
              "ConsoleLogger"
            ],
            [
              "",
              "ConsoleLogger"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "getUser"
            ],
            [
              "",
              "id.replace"
            ],
            [
              "",
              "id.replace"
            ],
            [
              "",
              "useChat"
            ],
            [
              "",
              "useChat"
            ],
            [
              "",
              "react.messages"
            ],
            [
              "",
              "react.messages"
            ],
            [
              "",
              "react.messages"
            ],
            [
              "",
              "react.messages"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "react"
            ],
            [
              "",
              "useChat"
            ],
            [
              "",
              "sendAutomaticallyWhen"
            ],
            [
              "",
              "sendAutomaticallyWhen"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "chat"
            ],
            [
              "",
              "docs"
            ],
            [
              "",
              "docs"
            ],
            [
              "",
              "plugin"
            ]
          ],
          "mbr": [
            "Next.js",
            "SDK.Documentation",
            "SDK.For",
            "Server.text",
            "Svelte.id",
            "adapter.Unlike",
            "adapter.decodeThreadId",
            "adapter.encodeThreadId",
            "adapters.Quick",
            "bot.onDirectMessage",
            "channel.messages",
            "chat.messages",
            "chat.sendMessage",
            "chat.status",
            "chat.stop",
            "clients.The",
            "e.g",
            "encoding.Threading",
            "endpoint.Set",
            "error.Don",
            "event.Authentication",
            "full.txt",
            "https.ag",
            "https.shields",
            "https.shields.io",
            "id.replace",
            "llms.txt",
            "message.raw",
            "message.text",
            "msg.id",
            "part.text",
            "part.type",
            "react.id",
            "react.messages",
            "result.textStream",
            "runs.Plug",
            "sdk.Each",
            "sdk.dev",
            "thread.messages",
            "thread.post",
            "through.If",
            "ui.com",
            "user.id",
            "vercel.com",
            "yourself.Returning"
          ],
          "metrics": {
            "ast": {
              "call_count": 213,
              "max_array_length": 2,
              "max_depth": 27,
              "max_member_depth": 3,
              "member_count": 45,
              "node_count": 3312,
              "op.add": 3,
              "op.band": 8,
              "op.bor": 25,
              "op.div": 56,
              "op.gt": 8,
              "op.lnot": 1,
              "op.lt": 4,
              "op.mod": 1,
              "op.mul": 2,
              "op.pow": 2,
              "op.sub": 51,
              "op_density.add": 0,
              "op_density.band": 0,
              "op_density.bor": 0.01,
              "op_density.div": 0.02,
              "op_density.gt": 0,
              "op_density.lnot": 0,
              "op_density.lt": 0,
              "op_density.mod": 0,
              "op_density.mul": 0,
              "op_density.pow": 0,
              "op_density.sub": 0.02,
              "sequence_count": 1
            },
            "binary": {
              "peak_region_bytes": 15360,
              "peak_region_entropy": 5.19
            },
            "binds": {
              "count": 13
            },
            "comments": {
              "chars": 470,
              "count": 11,
              "high_entropy": 1,
              "lines": 11,
              "to_code_ratio": 0.03
            },
            "consistency": {
              "extension_content_mismatch": 1,
              "extension_content_mismatch.scripts_as_documents": 1
            },
            "file": {
              "entropy": 5.04,
              "size": 17432
            },
            "functions": {
              "anonymous": 4,
              "avg_length_lines": 2.5,
              "avg_param_name_length": 5.4,
              "avg_params": 1.25,
              "code_ratio": 0.02,
              "density": 0.9,
              "length_stddev": 2.6,
              "max_length_lines": 7,
              "max_params": 2,
              "min_length_lines": 1,
              "one_liners": 3
            },
            "identifiers": {
              "all_lowercase_ratio": 0.73,
              "all_uppercase_ratio": 0.04,
              "avg_entropy": 2.14,
              "avg_length": 5.92,
              "count": 776,
              "has_digit_ratio": 0,
              "high_entropy_count": 4,
              "high_entropy_ratio": 0.01,
              "length_stddev": 3.33,
              "max_length": 21,
              "min_length": 1,
              "numeric_suffix_count": 1,
              "repeated_char_names": 2,
              "reuse_ratio": 0.42,
              "sequential_names": 6,
              "single_char_count": 7,
              "single_char_ratio": 0.02,
              "unique": 329
            },
            "strings": {
              "avg_entropy": 3.05,
              "avg_length": 44.36,
              "bytes": 10513,
              "count": 237,
              "email_count": 3,
              "embedded_code_candidates": 6,
              "empty_count": 39,
              "entropy_stddev": 1.17,
              "max_length": 833,
              "path_count": 3,
              "shell": 2,
              "sql": 8
            },
            "text": {
              "anonymous_function_ratio": 1,
              "ascii_art_lines": 7,
              "avg_line_length": 38.44,
              "char_entropy": 5.04,
              "digit_ratio": 0.01,
              "empty_line_ratio": 0.26,
              "identifier_density": 1.76,
              "identifiers_to_functions_ratio": 82.25,
              "last_line_length": 3,
              "line_length_stddev": 65.93,
              "lines": 442,
              "lines_over_200": 13,
              "lines_over_500": 1,
              "long_token_count": 2,
              "max_line_length": 608,
              "max_whitespace_run": 8,
              "non_ascii_ratio": 0,
              "normalized_function_count": 0.19,
              "normalized_string_count": 11.27,
              "normalized_unique_identifiers": 37.44,
              "repeated_char_sequences": 10,
              "space_count": 2245,
              "string_density": 0.54,
              "strings_to_functions_ratio": 59.25,
              "suspicious_comment_ratio": 0.09,
              "suspicious_identifier_ratio": 0.02,
              "suspicious_string_ratio": 0.07,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.09,
              "unique_chars": 96,
              "whitespace_ratio": 0.15
            }
          },
          "tgt": [
            "Chat",
            "ConsoleLogger",
            "Installation",
            "Server",
            "Set",
            "Svelte",
            "UIMessage",
            "WebMessage",
            "a",
            "adapter.decodeThreadId",
            "adapter.encodeThreadId",
            "api",
            "bot.onDirectMessage",
            "channel.messages",
            "chat",
            "chat.messages",
            "chat.sendMessage",
            "chat.status",
            "chat.stop",
            "colons",
            "createWebAdapter",
            "docs",
            "each",
            "elements",
            "endpoint.Set",
            "event.Authentication",
            "getUser",
            "id.replace",
            "index",
            "logger",
            "message.raw",
            "normalize",
            "persistMessageHistory",
            "plan",
            "plugin",
            "react",
            "react.messages",
            "regenerate",
            "resolved",
            "sdk",
            "sdk.Each",
            "sendAutomaticallyWhen",
            "streamText",
            "svelte",
            "task",
            "thread.messages",
            "thread.post",
            "threadIdFor",
            "through",
            "type",
            "unknown",
            "useChat",
            "userName",
            "username",
            "vue",
            "whatever",
            "yourself.Returning"
          ]
        },
        "id": 1,
        "mol": "H₄(Cm₃Db₃OsU)Md(Pt₃)",
        "path": "web-4.45.0.tgz!!package/README.md",
        "pid": 0,
        "risk": 8,
        "sha": "4f83741994a1f37a1e78e39f967547cd233860c5adfae79d2c706abe8823295b",
        "sid": 10792000627,
        "size": 17432,
        "supp": [
          {
            "by": [
              {
                "id": "metadata/filename/name-form::readme-requirements-install-basename"
              }
            ],
            "crit": "notable",
            "id": "metadata/filename/name-form::delimited-readme-basename",
            "kind": "unless"
          }
        ],
        "traits": [
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Claude agent identity reference",
            "id": "metadata/lang/natural/vocabulary/ai-assistant::agent-identity-claude",
            "spans": [
              [
                16560,
                11
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "References the generic term \"coding agent\"",
            "id": "metadata/lang/natural/vocabulary/ai-assistant::agent-identity-coding-agent",
            "spans": [
              [
                16493,
                12
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Multiple AI assistant or agent references",
            "id": "metadata/lang/natural/vocabulary/ai-assistant::agent-identity-set",
            "spans": [
              [
                16493,
                12
              ],
              [
                16560,
                11
              ]
            ],
            "uses": [
              0,
              1
            ]
          },
          {
            "conf": 0.8,
            "crit": 3,
            "desc": "Source has 6+ code-like string candidates",
            "id": "metadata/lang/source/literal/embedded-source::embedded-code-candidates-6"
          },
          {
            "conf": 0.97,
            "crit": 3,
            "desc": "At least four Markdown-style heading lines",
            "id": "metadata/lang/source/syntax/markup/markdown::at-least-four-markdown-style-headings",
            "spans": [
              [
                1342,
                15
              ],
              [
                1977,
                24
              ],
              [
                2266,
                14
              ],
              [
                5107,
                17
              ],
              [
                6828,
                12
              ],
              [
                8016,
                12
              ],
              [
                9111,
                22
              ],
              [
                10381,
                20
              ]
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Markdown-style heading precedes a code fence",
            "id": "metadata/lang/source/syntax/markup/markdown::markdown-heading-before-fenced-block",
            "spans": [
              [
                1342,
                20
              ],
              [
                2282,
                15
              ],
              [
                3086,
                15
              ],
              [
                3482,
                13
              ],
              [
                3927,
                16
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Calls a SendMessage/sendMessage method",
            "id": "micro-behaviors/communications/messaging/send::send-message-call",
            "mbc": "C0029",
            "spans": [
              [
                12615,
                16
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "Contains a hardcoded remote HTTP(S) URL",
            "id": "micro-behaviors/communications/url/host/domain-http::js-remote-host-url",
            "spans": [
              [
                9042,
                21
              ],
              [
                16922,
                19
              ]
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Root API chat or generate URL path",
            "id": "micro-behaviors/communications/url/resource-path/automation::api-chat-or-generate-path-reference",
            "spans": [
              [
                4815,
                10
              ]
            ]
          },
          {
            "conf": 0.86,
            "crit": 3,
            "desc": "Repeated computed-property calls (3+)",
            "id": "micro-behaviors/data/control-flow/dispatch/computed::js-computed-call-cluster",
            "spans": [
              [
                0,
                29
              ],
              [
                161,
                22
              ],
              [
                233,
                16
              ],
              [
                402,
                16
              ],
              [
                582,
                11
              ],
              [
                796,
                36
              ],
              [
                1003,
                8
              ],
              [
                1064,
                14
              ]
            ]
          },
          {
            "conf": 0.94,
            "crit": 3,
            "desc": "AI coding agent reference",
            "id": "micro-behaviors/data/llm/agent::coding-agent-reference",
            "spans": [
              [
                16522,
                15
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "References an LLM tool-result marker",
            "id": "micro-behaviors/data/llm/agent::tool-result-marker",
            "spans": [
              [
                9934,
                11
              ],
              [
                16323,
                12
              ]
            ]
          },
          {
            "conf": 0.72,
            "crit": 3,
            "desc": "LLM developer or assistant terminology reference",
            "id": "micro-behaviors/data/llm/wire-marker::non-system-role-term-reference",
            "spans": [
              [
                5030,
                17
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "npx package run command text",
            "id": "micro-behaviors/os/package-manager/run::npx-package-command-text",
            "spans": [
              [
                2081,
                19
              ]
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "String literal embeds HTML script tag",
            "id": "micro-behaviors/ui/window/dom/render::literal-script-element-tag",
            "spans": [
              [
                3528,
                8
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @chat-adapter/state-memory",
            "id": "metadata/import/npm/chat-adapter/state-memory::chat-adapter/state-memory",
            "spans": [
              [
                2439,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @chat-adapter/web",
            "id": "metadata/import/npm/chat-adapter/web::chat-adapter/web",
            "spans": [
              [
                2384,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports chat",
            "id": "metadata/import/npm/chat::chat",
            "spans": [
              [
                2343,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES6 arrow function syntax",
            "id": "metadata/lang/javascript-features::arrow-function",
            "spans": [
              [
                2609,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES2017 async/await syntax",
            "id": "metadata/lang/javascript-features::async-await",
            "spans": [
              [
                2747,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES6 const/let declarations",
            "id": "metadata/lang/javascript-features::const-let",
            "spans": [
              [
                2477,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "ES6 destructuring assignment",
            "id": "metadata/lang/javascript-features::destructuring",
            "spans": [
              [
                3231,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1",
            "spans": [
              [
                702,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                910,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"that\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-3",
            "spans": [
              [
                1432,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                15,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                3302,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"this\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-7",
            "spans": [
              [
                7410,
                0
              ]
            ]
          }
        ],
        "type": "javascript"
      },
      {
        "ctx": [
          {
            "col": 36,
            "line": 1,
            "ln": 35,
            "s": " Adapter, ChatInstance, Logger, Message, FormattedContent, AdapterPostableMessage, RawMessage, StreamCh"
          },
          {
            "col": 178,
            "line": 1,
            "ln": 177,
            "s": "tions, FetchResult, ThreadInfo, UserInfo } from 'chat';\nexport { Adapter } from 'chat';\nimport { W as WebTaskData, a as WebPlanData, b as WebMessage, c as WebAdapterConfig, d as WebUser } from './types-BZb_SQPK.js';\nexport { e as WebAdapterOptions, f as WebDataParts, g as WebMessagePart, h as WebProtocolName } from './types-BZb_SQPK.js';\n\n/**\n * Format converter for the Web adapter.\n *\n * The Web \"platform format\" is markdown â the browser renders mdast (or the\n"
          },
          {
            "col": 36,
            "line": 13,
            "ln": 803,
            "s": "tends BaseFormatConverter {\n    toAst(platformText: string): Root;\n    fromAst(ast: Root): string;\n}\n\n/**\n * Wire protocols the Web adapter can speak.\n *\n"
          },
          {
            "col": 3,
            "line": 22,
            "ln": 1037,
            "s": " (conversation id plus the latest user message) and a handful of stream\n * events. Each protocol maps those onto its own request body and SSE frame"
          },
          {
            "col": 7,
            "line": 47,
            "ln": 1637,
            "s": ": string;\n} | {\n    type: \"data-task\";\n    id: string;\n    data: WebTaskData;\n} | {\n    type: \"data-"
          },
          {
            "col": 8,
            "line": 57,
            "ln": 1793,
            "s": "t a protocol extracts from the request body. */\ninterface WebProtocolRequest {\n    /** Client-supplied conversation id, if any. */\n    conversationId?: string;\n    /** Latest user message with only the parts this protocol allows. */\n    message: WebMessage;\n    /** Client-supplied run id, if any. */\n    runId?: string;\n}\n/** Why a request body was r"
          },
          {
            "col": 9,
            "line": 71,
            "ln": 2293,
            "s": "e WebRunContext {\n    conversationId: string;\n    /** Id of the assistant message the response builds on the client. */\n    messageId: string;\n    runId: string;\n}\ninterface WebProtocol {\n    /** Payloads to send when the response starts. */\n    begin(run: WebRunContext): unk"
          },
          {
            "col": 32,
            "line": 86,
            "ln": 2950,
            "s": "ring, string\u003e;\n    parseRequest(body: unknown): WebProtocolRequest | WebProtocolError;\n}\n\n/**\n * Web adapter "
          },
          {
            "col": 18,
            "line": 106,
            "ln": 3611,
            "s": "Name: string;\n    readonly persistMessageHistory: boolean;\n    readonly lockScope: \"thread\";\n    readonly supportsReasoningChunks = true;\n    protected chat: ChatInstance | null;\n    protected readonly logger: Logger;\n    protected r"
          },
          {
            "col": 28,
            "line": 116,
            "ln": 4109,
            "s": "apterConfig);\n    initialize(chat: ChatInstance): Promise\u003cvoid\u003e;\n    handleWebhook(request: Request): Promise\u003cResponse\u003e;\n    parseMessage(raw: WebMessage): Message\u003cWebMessage\u003e;\n    encodeThreadId(data: WebThreadIdDa"
          },
          {
            "col": 27,
            "line": 123,
            "ln": 4471,
            "s": "): boolean;\n    renderFormatted(content: FormattedContent): string;\n    postMessage(threadId: string, message: AdapterPostableMessage): Promise\u003cRawMessage\u003cWebMessage\u003e\u003e;\n    /**\n     * Native streaming path. Pumps text chunks straight onto the per-request SSE\n    "
          },
          {
            "col": 16,
            "line": 141,
            "ln": 5711,
            "s": "HistoryCache` backfills `thread.messages` / `channel.messages`\n     * from state after this method returns.\n     */\n    fetchMessages(_threadId: string, _options?: FetchOptions): Promise\u003cFetchResult\u003cWebMessage\u003e\u003e;\n    fetchThread(threadId: string): Promise\u003cThreadInfo\u003e;\n    getUser(_userId: string): Promise\u003cUserInfo | null\u003e;\n    protected buildMessageFromUI(uiMessage: WebMessage, threadId: string, user: WebUser): Message\u003cWebMessage\u003e;\n}\n\ndeclare function createWebAdapter(opts: WebAdapterConfig): WebAdapter;\n\nexport { WebAdapter, WebAdapterConfig, WebFormatConverter, WebMessage, WebPlanData, WebTaskData, type WebThreadIdData, WebUser, createWebAdapter };\n"
          }
        ],
        "depth": 1,
        "facts": {
          "imp": [
            [
              "",
              "./types-BZb_SQPK.js"
            ],
            [
              "",
              "chat"
            ]
          ],
          "metrics": {
            "ast": {
              "call_count": 0,
              "max_depth": 14,
              "node_count": 1297
            },
            "binary": {
              "peak_region_bytes": 6370,
              "peak_region_entropy": 4.89
            },
            "comments": {
              "base64": 2,
              "chars": 2147,
              "count": 18,
              "high_entropy": 2,
              "lines": 48,
              "to_code_ratio": 0.46
            },
            "file": {
              "entropy": 4.86,
              "size": 6370
            },
            "functions": {
              "count": 7
            },
            "identifiers": {
              "all_lowercase_ratio": 0.33,
              "all_uppercase_ratio": 0.01,
              "avg_entropy": 2.54,
              "avg_length": 9.24,
              "count": 231,
              "high_entropy_count": 10,
              "high_entropy_ratio": 0.08,
              "keyboard_pattern_names": 1,
              "length_stddev": 5,
              "max_length": 23,
              "min_length": 1,
              "reuse_ratio": 0.52,
              "sequential_names": 9,
              "single_char_count": 9,
              "single_char_ratio": 0.08,
              "underscore_prefix_count": 7,
              "unique": 119
            },
            "imports": {
              "count": 2,
              "relative": 1,
              "relative_ratio": 0.5,
              "third_party_count": 2,
              "third_party_ratio": 1
            },
            "source": {
              "class_count": 7
            },
            "strings": {
              "avg_entropy": 2.63,
              "avg_length": 7,
              "bytes": 462,
              "count": 66,
              "entropy_stddev": 0.34,
              "max_length": 19,
              "path_count": 2
            },
            "text": {
              "avg_line_length": 40.91,
              "char_entropy": 4.86,
              "digit_ratio": 0,
              "empty_line_ratio": 0.05,
              "identifier_density": 1.52,
              "import_density": 1.32,
              "last_line_length": 147,
              "line_length_stddev": 35.82,
              "lines": 152,
              "lines_over_200": 1,
              "max_line_length": 232,
              "max_whitespace_run": 1,
              "non_ascii_ratio": 0,
              "normalized_import_count": 0.16,
              "normalized_string_count": 5.35,
              "normalized_unique_identifiers": 16.42,
              "space_count": 978,
              "string_density": 0.43,
              "suspicious_comment_ratio": 0.22,
              "suspicious_identifier_ratio": 0.08,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.1,
              "unique_chars": 78,
              "whitespace_ratio": 0.18
            }
          }
        },
        "id": 2,
        "mol": "H(Db)Md(Pa)",
        "path": "web-4.45.0.tgz!!package/dist/index.d.ts",
        "pid": 0,
        "refs": [
          {
            "kind": "local",
            "off": 371,
            "to": "./types-BZb_SQPK.js"
          }
        ],
        "risk": 2,
        "sha": "4a542fd2019b2d1bbb74633d24fb487820eb71039e29ca1d3bdf7bbad09f0217",
        "sid": 10792000626,
        "size": 6370,
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "JavaScript/TypeScript file under dist",
            "id": "metadata/package/files/runtime::javascript-dist-tree-artifact"
          },
          {
            "conf": 0.72,
            "crit": 3,
            "desc": "LLM developer or assistant terminology reference",
            "id": "micro-behaviors/data/llm/wire-marker::non-system-role-term-reference",
            "spans": [
              [
                2357,
                17
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports chat",
            "id": "metadata/import/npm/chat::chat",
            "spans": [
              [
                225,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports ./types-BZb_SQPK.js",
            "id": "metadata/import/npm/relative/1/types-bzb_sqpk/js::relative/1/types-bzb_sqpk/js",
            "spans": [
              [
                370,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1",
            "spans": [
              [
                546,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                1085,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                542,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                1981,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"this\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-7",
            "spans": [
              [
                2001,
                0
              ]
            ]
          }
        ],
        "type": "javascript"
      },
      {
        "analysis_gaps": [
          "flow-graph-limited",
          "flow-call-unavailable",
          "flow-query-incomplete"
        ],
        "ctx": [
          {
            "col": 3,
            "line": 1,
            "ln": 2,
            "s": " src/adapter.ts\nimport { ValidationError } from \"@chat-adapter/shared\";\nimport {\n  ConsoleLogger,\n  Message,\n  NotImplementedError\n} from \"chat\";\n\n// src/als.ts\nimport { AsyncLocalStorage } from \"async_hooks\";\nvar webRequestContext = new AsyncLocalStorage();\nfunction requireWebRequestContext() {\n  const ctx = webRequestContext.getStore();\n  if (!ctx) {\n    throw new Error(\n      \"Web adapter operation invoked outside of an active request \\u2014 ensure your handler is called via Chat.processMessage during handleWebhook.\"\n    );\n  "
          },
          {
            "col": 32,
            "line": 28,
            "ln": 698,
            "s": "extends BaseFormatConverter {\n  toAst(platformText) {\n    return parseMarkdown(platformText);\n  }\n  f"
          },
          {
            "col": 9,
            "line": 40,
            "ln": 942,
            "s": "-control\": \"no-cache\",\n  connection: \"keep-alive\",\n  // Disable nginx buffering so deltas reach the browser immediately.\n  \"x-accel-buffering\": \"no\"\n};\nvar aiSdkProtocol = {\n  headers: { ...SSE_HEADERS, \"x-vercel-ai-ui-message-stream\": \"v1\" },\n  doneFrame: \"data: [DONE]\\n\\n\",\n  parseReques"
          },
          {
            "col": 68,
            "line": 59,
            "ln": 1626,
            "s": "ol-call or\n      // approval state. Text, file, and custom data parts pass through.\n      message: {\n        ...last,\n        id: messageId(last),\n        role: \"user\",\n        parts: partsOf(last.parts).filter(\n          (part) =\u003e part.type === \"text\" || part.type === \"file\" || part.type.startsWith(\"data-\")\n        )\n      }\n    };\n  },\n  begin: (run) =\u003e [\n    { type: \"start\", messageId: run."
          },
          {
            "col": 9,
            "line": 95,
            "ln": 2599,
            "s": "turn request;\n    }\n    const { body: record, last } = request;\n    if (!(\"content\" in last) \u0026\u0026 Array.isArra"
          },
          {
            "col": 3,
            "line": 103,
            "ln": 2848,
            "s": "    runId: typeof record.runId === \"string\" ? record.runId : void 0,\n      message: {\n        id: messageId(last),\n        role: \"user\",\n        parts: agUiContentToParts(last.content)\n      }\n    };\n  },\n  begin: (run) =\u003e [\n    { type: \"RUN_STARTED\", threadId: run.conversationId,"
          },
          {
            "col": 64,
            "line": 112,
            "ln": 3136,
            "s": " run.runId }\n  ],\n  encode(event) {\n    switch (event.type) {\n      case \"text-start\":\n        return [\n          {\n            type: \"TEXT_MESSAGE_START\",\n            messageId: event.id,\n            role: \"assistant\"\n          }\n        ];\n      case \"text-delta\":\n        return [\n          {\n            type: \"TEXT_MESSAGE_CONTENT\",\n        "
          },
          {
            "col": 56,
            "line": 154,
            "ln": 4261,
            "s": "}\n        ];\n      // AG-UI has no message part for these, so they travel as CUSTOM events\n      // (TanStack AI surfaces them through `onCustomEve"
          },
          {
            "col": 64,
            "line": 157,
            "ln": 4415,
            "s": "he payload\n      // carries the task id, so clients can replace a task's earlier state.\n      case \"data-task\":\n        return [{ type: \"CUSTOM\", name: \"task\", value: event.data }];\n      case \"data-plan\":\n        return [{ type: \"CUSTOM\", name: \"plan\", value: event.data }];\n      default: {\n        const unhandled = event;\n        throw new Error(\n          `Unhandled web stream event: ${JSON.stringify(unhandled)}`\n        );\n      }\n    }\n  },\n  // RUN_ERROR is terminal in AG-UI, so it replaces RUN_FINISHED.\n  end: (run, errorTe"
          },
          {
            "col": 30,
            "line": 175,
            "ln": 5046,
            "s": "ionId,\n      runId: run.runId\n    }\n  ] : [{ type: \"RUN_ERROR\", message: errorText }]\n};\nvar webProtocols = {\n  \"ai-sdk\": aiSdkProtocol,\n  \"ag-ui\": agUiProtocol\n};\nfunction createSseResponse(protocol, r"
          },
          {
            "col": 32,
            "line": 190,
            "ln": 5431,
            "s": "coder.encode(frame));\n        } catch {\n        }\n      };\n      run((payload) =\u003e enqueue(`data: ${JSON.stringify(payload)}\n\n`)).then(\n        () =\u003e {\n          if (protocol.doneFrame) {\n            enqueue(protocol.doneFrame);\n          }\n          "
          },
          {
            "col": 13,
            "line": 202,
            "ln": 5699,
            "s": "controller.close();\n          } catch {\n          }\n        },\n        (error) =\u003e {\n          try {\n            con"
          },
          {
            "col": 19,
            "line": 217,
            "ln": 5979,
            "s": "value) {\n  return typeof value === \"object\" \u0026\u0026 value !== null \u0026\u0026 !Array.isArray(value);\n}\nfunction isNonEmp"
          },
          {
            "col": 24,
            "line": 220,
            "ln": 6092,
            "s": "y(value) {\n  return Array.isArray(value) \u0026\u0026 value.length \u003e 0;\n}\nfunction readRequestBody(body, idField) {\n  if (!(isRecord(body) \u0026\u0026 isNonEmptyArray(body.messages))) {\n    return { error: \"Request body must include a messages array\" };\n  }\n  const id = body[idField];\n  if (id !== void 0 \u0026\u0026 typeof id !== \"string\") {\n    return { error: `Request body field \"${id"
          },
          {
            "col": 6,
            "line": 232,
            "ln": 6528,
            "s": "(!(isRecord(last) \u0026\u0026 last.role === \"user\")) {\n    return { error: \"The last entry in messages must be a u"
          },
          {
            "col": 92,
            "line": 242,
            "ln": 6882,
            "s": "ocol option to \"${expected}\" or send a matching client request.`;\n}\nfunction messageId(message) {\n  "
          },
          {
            "col": 39,
            "line": 257,
            "ln": 7333,
            "s": "text: content }] : [];\n  }\n  const parts = [];\n  for (const part of partsOf(content)) {\n    if (part.type === \"text\" \u0026\u0026 typeof part.text === \"string\") {\n      parts.push({ type: \"text\", text: part.text });\n    } else if (AG_UI_CONTEN"
          },
          {
            "col": 14,
            "line": 269,
            "ln": 7657,
            "s": "rateId() {\n  if (typeof crypto !== \"undefined\" \u0026\u0026 \"randomUUID\" in crypto) {\n    return crypto.randomUUID();\n  }\n  return `web-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;\n}\n\n// src/adapter.ts\nvar ADAPTER_NAME = \"web\";\nvar defaultThreadIdFor = (args) =\u003e `"
          },
          {
            "col": 10,
            "line": 288,
            "ln": 8214,
            "s": "l;\n  resolveUser;\n  threadIdFor;\n  constructor(opts) {\n    if (!opts.userName) {\n      throw new ValidationError(ADAPTER_NAME, \"userName is required\");\n    }\n    if (typeof opts.getUser !== \"function\") {\n      throw new ValidationError(\n        ADAPTER_NAME,\n        \"getUser is required \\u2014 supply a function that resolves the user from the inbound Request\"\n      );\n    }\n    this.userName = opts.userName;\n    const protocolName = opts.protocol ?? \"ai-sdk\";\n    if (!Object.hasOwn(webProtocols, protocolName)) {\n      "
          },
          {
            "col": 64,
            "line": 306,
            "ln": 8850,
            "s": "g-ui\".`\n      );\n    }\n    this.protocol = webProtocols[protocolName];\n    this.resolveUser = opts.getUser;\n    this.threadIdFor = op"
          },
          {
            "col": 46,
            "line": 321,
            "ln": 9351,
            "s": "initialized\");\n    }\n    let body;\n    try {\n      body = await request.json();\n    } catch {\n      return jsonError(400, \"Invalid JSON body\");\n    }\n    let user;\n    try {\n      user = await this.resolv"
          },
          {
            "col": 18,
            "line": 333,
            "ln": 9608,
            "s": ".error(\"getUser threw\", { error: err });\n      return jsonError(401, \"Unauthorized\");\n    }\n    if (!user) {\n      return jsonError(401, \"Unauthorized\");\n    }\n    if (user.id.includes(\":\")) {\n      this.logger.error(\"getUser returned id with reserved ':' character\", {\n        userId: user.id\n      });\n      return jsonError(400, \"Inval"
          },
          {
            "col": 21,
            "line": 365,
            "ln": 10731,
            "s": "Response(this.protocol, async (send) =\u003e {\n      for (const payload of this.protocol.begin(run)) {\n        send(payload);\n      }\n      let errorText;\n      try {\n   "
          },
          {
            "col": 12,
            "line": 392,
            "ln": 11691,
            "s": "ch (error) {\n        errorText = error instanceof Error ? error.message : \"Internal error\";\n      }\n      for (const payload of this.protocol.end(run, errorText)) {\n        send(payload);\n      }\n    });"
          },
          {
            "col": 11,
            "line": 422,
            "ln": 12462,
            "s": "or,\n      metadata: { dateSent: /* @__PURE__ */ new Date(), edited: false },\n      attachments: []\n    });\n  }\n  encodeThreadId(data) {\n    return `${AD"
          },
          {
            "col": 4,
            "line": 429,
            "ln": 12669,
            "s": "\n  decodeThreadId(threadId) {\n    const parts = threadId.split(\":\");\n    if (parts.length \u003c 3 || parts[0] !== ADAPTER_NAME) {\n      throw new ValidationError("
          },
          {
            "col": 33,
            "line": 438,
            "ln": 12942,
            "s": "parts;\n    return { userId, conversationId: rest.join(\":\") };\n  }\n  channelIdFromThreadId(threadId) {\n    return threadId;\n  }\n  isDM(_threadId) {\n    ret"
          },
          {
            "col": 7,
            "line": 490,
            "ln": 14447,
            "s": "  return open;\n      }\n      closePart();\n      const index = started[kind]++;\n      let partId = `${id}-reasoning-${index}`;\n      if (kind === \"text\") {\n        partId ="
          },
          {
            "col": 4,
            "line": 506,
            "ln": 14940,
            "s": "     return;\n      }\n      const target = openPart(kind);\n      target.part.text += delta;\n      ctx.write({ type: `${kind}-delta`, id: target.id, delta });\n    };\n    try {\n      for await (const chunk of iterable) {"
          },
          {
            "col": 32,
            "line": 518,
            "ln": 15291,
            "s": "unk);\n          continue;\n        }\n        if (chunk.type === \"markdown_text\") {\n          writeDelta(\"text\", chunk.text);\n          continue;\n        }\n        if (chunk.type === \"reasoning\") {\n          writeDelta(\"reasoning\", chunk.text);\n          con"
          },
          {
            "col": 13,
            "line": 530,
            "ln": 15644,
            "s": "!event) {\n          continue;\n        }\n        const key = `${event.type}:${event.id}`;\n        if (!ctx.dataParts.has(key)) {\n          ctx.dataParts.add(key);\n          closePart();\n        }\n        ctx.write(event)"
          },
          {
            "col": 74,
            "line": 560,
            "ln": 16405,
            "s": "-------\n  // Required-by-interface methods that have no native concept on web (v1 stubs)\n  // ------------------------------------------------------"
          },
          {
            "col": 43,
            "line": 563,
            "ln": 16617,
            "s": "age) {\n    throw new NotImplementedError(\n      \"WebAdapter.editMessage is not supported in v1 \\u2014 every assistant turn is a fresh streamed response.\"\n    );\n  }\n  deleteMessage(_threadId, _messageI"
          },
          {
            "col": 20,
            "line": 590,
            "ln": 17545,
            "s": "er this method returns.\n   */\n  fetchMessages(_threadId, _options) {\n    return Promise.resolve({ mes"
          },
          {
            "col": 4,
            "line": 627,
            "ln": 18614,
            "s": "\n};\nfunction jsonError(status, message) {\n  return new Response(JSON.stringify({ error: message }), {\n    status,\n    headers: { \"Content-Type\": \"application/json\" }\n  });\n}\nfunction extractText(message) {\n  const texts = [];\n  for (const part of message.parts) {\n    if (part.type === \"tex"
          },
          {
            "col": 6,
            "line": 639,
            "ln": 18948,
            "s": " texts.push(part.text);\n    }\n  }\n  return texts.join(\"\\n\");\n}\nfunction streamChunkToDataEvent(chunk, messageId2) {\n  switch (chunk.type) {\n    case \"task_"
          },
          {
            "col": 29,
            "line": 677,
            "ln": 19942,
            "s": "mText(id, text) {\n  return {\n    id,\n    role: \"assistant\",\n    parts: [{ type: \"text\", text }]\n  };\n}\n\n// src/index.ts\nfunction createWebAdapter(opts) {\n  return new WebAdapter(opts);\n}\nexport {\n  WebAdapter,\n  WebFormatConverter,\n  createWebAdapter\n};\n"
          }
        ],
        "depth": 1,
        "facts": {
          "funcs": [
            [
              "requireWebRequestContext",
              261
            ],
            [
              "toAst",
              730
            ],
            [
              "fromAst",
              798
            ],
            [
              "parseRequest",
              1221
            ],
            [
              "anonymous",
              1848
            ],
            [
              "anonymous",
              1975
            ],
            [
              "anonymous",
              2148
            ],
            [
              "anonymous",
              2175
            ],
            [
              "parseRequest",
              2485
            ],
            [
              "anonymous",
              3062
            ],
            [
              "encode",
              3156
            ],
            [
              "anonymous",
              4938
            ],
            [
              "createSseResponse",
              5210
            ],
            [
              "start",
              5331
            ],
            [
              "anonymous",
              5373
            ],
            [
              "anonymous",
              5500
            ],
            [
              "anonymous",
              5574
            ],
            [
              "anonymous",
              5770
            ],
            [
              "isRecord",
              5961
            ],
            [
              "isNonEmptyArray",
              6069
            ],
            [
              "readRequestBody",
              6156
            ],
            [
              "protocolMismatchError",
              6748
            ],
            [
              "messageId",
              6950
            ],
            [
              "partsOf",
              7051
            ],
            [
              "anonymous",
              7154
            ],
            [
              "agUiContentToParts",
              7219
            ],
            [
              "generateId",
              7644
            ],
            [
              "anonymous",
              7923
            ],
            [
              "constructor",
              8249
            ],
            [
              "initialize",
              9176
            ],
            [
              "handleWebhook",
              9253
            ],
            [
              "anonymous",
              10755
            ],
            [
              "anonymous",
              10961
            ],
            [
              "anonymous",
              11572
            ],
            [
              "parseMessage",
              11901
            ],
            [
              "encodeThreadId",
              12575
            ],
            [
              "decodeThreadId",
              12672
            ],
            [
              "channelIdFromThreadId",
              13010
            ],
            [
              "isDM",
              13071
            ],
            [
              "renderFormatted",
              13112
            ],
            [
              "postMessage",
              13195
            ],
            [
              "stream",
              14021
            ],
            [
              "anonymous",
              14251
            ],
            [
              "anonymous",
              14396
            ],
            [
              "anonymous",
              14898
            ],
            [
              "anonymous",
              15917
            ],
            [
              "editMessage",
              16577
            ],
            [
              "deleteMessage",
              16784
            ],
            [
              "addReaction",
              16928
            ],
            [
              "removeReaction",
              17076
            ],
            [
              "startTyping",
              17230
            ],
            [
              "fetchMessages",
              17577
            ],
            [
              "fetchThread",
              17666
            ],
            [
              "getUser",
              17845
            ],
            [
              "buildMessageFromUI",
              18079
            ],
            [
              "jsonError",
              18618
            ],
            [
              "extractText",
              18788
            ],
            [
              "streamChunkToDataEvent",
              19011
            ],
            [
              "adapterPostableToText",
              19437
            ],
            [
              "assistantMessageFromText",
              19914
            ],
            [
              "createWebAdapter",
              20062
            ]
          ],
          "imp": [
            [
              "",
              "AsyncLocalStorage"
            ],
            [
              "",
              "webRequestContext.getStore"
            ],
            [
              "",
              "Error"
            ],
            [
              "",
              "parseMarkdown"
            ],
            [
              "",
              "stringifyMarkdown"
            ],
            [
              "",
              "readRequestBody"
            ],
            [
              "",
              "Array.isArray"
            ],
            [
              "",
              "protocolMismatchError"
            ],
            [
              "",
              "messageId"
            ],
            [
              "",
              "partsOf.filter"
            ],
            [
              "",
              "partsOf"
            ],
            [
              "",
              "part.type.startsWith"
            ],
            [
              "",
              "Set"
            ],
            [
              "",
              "readRequestBody"
            ],
            [
              "",
              "Array.isArray"
            ],
            [
              "",
              "protocolMismatchError"
            ],
            [
              "",
              "messageId"
            ],
            [
              "",
              "agUiContentToParts"
            ],
            [
              "",
              "Error"
            ],
            [
              "",
              "JSON.stringify"
            ],
            [
              "",
              "TextEncoder"
            ],
            [
              "",
              "ReadableStream"
            ],
            [
              "",
              "controller.enqueue"
            ],
            [
              "",
              "encoder.encode"
            ],
            [
              "",
              "run.then"
            ],
            [
              "",
              "run"
            ],
            [
              "",
              "enqueue"
            ],
            [
              "",
              "JSON.stringify"
            ],
            [
              "",
              "enqueue"
            ],
            [
              "",
              "controller.close"
            ],
            [
              "",
              "controller.error"
            ],
            [
              "",
              "Response"
            ],
            [
              "",
              "Array.isArray"
            ],
            [
              "",
              "Array.isArray"
            ],
            [
              "",
              "isRecord"
            ],
            [
              "",
              "isNonEmptyArray"
            ],
            [
              "",
              "body.messages.at"
            ],
            [
              "",
              "isRecord"
            ],
            [
              "",
              "generateId"
            ],
            [
              "",
              "Array.isArray"
            ],
            [
              "",
              "value.filter"
            ],
            [
              "",
              "isRecord"
            ],
            [
              "",
              "partsOf"
            ],
            [
              "",
              "parts.push"
            ],
            [
              "",
              "AG_UI_CONTENT_TYPES.has"
            ],
            [
              "",
              "parts.push"
            ],
            [
              "",
              "crypto.randomUUID"
            ],
            [
              "",
              "Date.now.toString"
            ],
            [
              "",
              "Date.now"
            ],
            [
              "",
              "Math.random.toString.slice"
            ],
            [
              "",
              "Math.random.toString"
            ],
            [
              "",
              "Math.random"
            ],
            [
              "",
              "WebFormatConverter"
            ],
            [
              "",
              "ValidationError"
            ],
            [
              "",
              "ValidationError"
            ],
            [
              "",
              "Object.hasOwn"
            ],
            [
              "",
              "ValidationError"
            ],
            [
              "",
              "ConsoleLogger"
            ],
            [
              "",
              "Promise.resolve"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "request.json"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "user.id.includes"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "generateId"
            ],
            [
              "",
              "conversationId.includes"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "jsonError"
            ],
            [
              "",
              "generateId"
            ],
            [
              "",
              "generateId"
            ],
            [
              "",
              "createSseResponse"
            ],
            [
              "",
              "send"
            ],
            [
              "",
              "webRequestContext.run"
            ],
            [
              "",
              "send"
            ],
            [
              "",
              "Set"
            ],
            [
              "",
              "chat.processMessage"
            ],
            [
              "",
              "send"
            ],
            [
              "",
              "extractText"
            ],
            [
              "",
              "Message"
            ],
            [
              "",
              "Date"
            ],
            [
              "",
              "threadId.split"
            ],
            [
              "",
              "ValidationError"
            ],
            [
              "",
              "rest.join"
            ],
            [
              "",
              "requireWebRequestContext"
            ],
            [
              "",
              "adapterPostableToText"
            ],
            [
              "",
              "generateId"
            ],
            [
              "",
              "assistantMessageFromText"
            ],
            [
              "",
              "ctx.write"
            ],
            [
              "",
              "ctx.write"
            ],
            [
              "",
              "ctx.write"
            ],
            [
              "",
              "assistantMessageFromText"
            ],
            [
              "",
              "requireWebRequestContext"
            ],
            [
              "",
              "generateId"
            ],
            [
              "",
              "ctx.write"
            ],
            [
              "",
              "closePart"
            ],
            [
              "",
              "parts.push"
            ],
            [
              "",
              "ctx.write"
            ],
            [
              "",
              "openPart"
            ],
            [
              "",
              "ctx.write"
            ],
            [
              "",
              "writeDelta"
            ],
            [
              "",
              "writeDelta"
            ],
            [
              "",
              "writeDelta"
            ],
            [
              "",
              "streamChunkToDataEvent"
            ],
            [
              "",
              "ctx.dataParts.has"
            ],
            [
              "",
              "ctx.dataParts.add"
            ],
            [
              "",
              "closePart"
            ],
            [
              "",
              "ctx.write"
            ],
            [
              "",
              "parts.findIndex"
            ],
            [
              "",
              "parts.push"
            ],
            [
              "",
              "openPart"
            ],
            [
              "",
              "closePart"
            ],
            [
              "",
              "NotImplementedError"
            ],
            [
              "",
              "NotImplementedError"
            ],
            [
              "",
              "NotImplementedError"
            ],
            [
              "",
              "NotImplementedError"
            ],
            [
              "",
              "Promise.resolve"
            ],
            [
              "",
              "Promise.resolve"
            ],
            [
              "",
              "Promise.resolve"
            ],
            [
              "",
              "Promise.resolve"
            ],
            [
              "",
              "extractText"
            ],
            [
              "",
              "Message"
            ],
            [
              "",
              "Date"
            ],
            [
              "",
              "Response"
            ],
            [
              "",
              "JSON.stringify"
            ],
            [
              "",
              "texts.push"
            ],
            [
              "",
              "texts.join"
            ],
            [
              "",
              "formatConverter.fromAst"
            ],
            [
              "",
              "WebAdapter"
            ],
            [
              "",
              "@chat-adapter/shared"
            ],
            [
              "",
              "async_hooks"
            ],
            [
              "",
              "chat"
            ]
          ],
          "mbr": [
            "AG_UI_CONTENT_TYPES.has",
            "Array.isArray",
            "Date.now",
            "Date.now.toString",
            "JSON.stringify",
            "Math.random",
            "Math.random.toString",
            "Math.random.toString.slice",
            "Object.hasOwn",
            "Promise.resolve",
            "args.conversationId",
            "args.user",
            "args.user.id",
            "body.messages",
            "body.messages.at",
            "chat.processMessage",
            "chunk.text",
            "chunk.type",
            "controller.close",
            "controller.enqueue",
            "controller.error",
            "conversationId.includes",
            "crypto.randomUUID",
            "ctx.dataParts",
            "ctx.dataParts.add",
            "ctx.dataParts.has",
            "ctx.messageId",
            "ctx.signal",
            "ctx.signal.aborted",
            "ctx.write",
            "data.conversationId",
            "data.id",
            "data.userId",
            "encoder.encode",
            "error.message",
            "event.data",
            "event.delta",
            "event.id",
            "event.type",
            "formatConverter.fromAst",
            "last.content",
            "last.parts",
            "last.role",
            "message.ast",
            "message.fallbackText",
            "message.id",
            "message.markdown",
            "message.parts",
            "message.raw",
            "open.id",
            "open.kind",
            "opened.part",
            "opts.getUser",
            "opts.logger",
            "opts.persistMessageHistory",
            "opts.protocol",
            "opts.threadIdFor",
            "opts.userName",
            "parsed.conversationId",
            "parsed.error",
            "parsed.message",
            "parsed.runId",
            "part.id",
            "part.text",
            "part.type",
            "part.type.startsWith",
            "parts.findIndex",
            "parts.length",
            "parts.push",
            "partsOf.filter",
            "protocol.doneFrame",
            "protocol.headers",
            "raw.id",
            "raw.role",
            "record.runId",
            "request.conversationId",
            "request.json",
            "request.signal",
            "rest.join",
            "run.conversationId",
            "run.messageId",
            "run.runId",
            "run.then",
            "target.id",
            "target.part",
            "target.part.text",
            "texts.join",
            "texts.push",
            "threadId.split",
            "uiMessage.id",
            "user.id",
            "user.id.includes",
            "user.name",
            "userMessage.parts",
            "userMessage.parts.length",
            "value.filter",
            "value.length",
            "webRequestContext.getStore",
            "webRequestContext.run"
          ],
          "metrics": {
            "ast": {
              "call_count": 144,
              "identity_function_count": 1,
              "max_array_length": 5,
              "max_depth": 27,
              "max_member_depth": 4,
              "member_count": 99,
              "node_count": 5730,
              "op.add": 1,
              "op.coalesce": 9,
              "op.eq": 30,
              "op.gt": 1,
              "op.land": 15,
              "op.lnot": 15,
              "op.lor": 3,
              "op.lt": 1,
              "op.ne": 7,
              "op.sub": 2,
              "op_density.add": 0,
              "op_density.coalesce": 0,
              "op_density.eq": 0.01,
              "op_density.gt": 0,
              "op_density.land": 0,
              "op_density.lnot": 0,
              "op_density.lor": 0,
              "op_density.lt": 0,
              "op_density.ne": 0,
              "op_density.sub": 0
            },
            "binary": {
              "peak_region_bytes": 10980,
              "peak_region_entropy": 5.06
            },
            "binds": {
              "count": 58
            },
            "comments": {
              "base64": 2,
              "chars": 1812,
              "count": 30,
              "high_entropy": 3,
              "lines": 40,
              "to_code_ratio": 0.06
            },
            "file": {
              "entropy": 4.77,
              "size": 20196
            },
            "functions": {
              "anonymous": 19,
              "avg_length_lines": 11.95,
              "avg_name_length": 12.71,
              "avg_nesting_depth": 0.33,
              "avg_param_name_length": 6.49,
              "avg_params": 1.3,
              "code_ratio": 0.87,
              "count": 41,
              "density": 8.8,
              "high_entropy_names": 7,
              "length_stddev": 16.49,
              "max_length_lines": 84,
              "max_nesting_depth": 2,
              "max_params": 3,
              "min_length_lines": 1,
              "nested": 7,
              "no_params_count": 5,
              "one_liners": 5
            },
            "identifiers": {
              "all_lowercase_ratio": 0.47,
              "all_uppercase_ratio": 0.02,
              "avg_entropy": 2.57,
              "avg_length": 8.74,
              "base64_like_names": 1,
              "count": 992,
              "has_digit_ratio": 0,
              "high_entropy_count": 14,
              "high_entropy_ratio": 0.07,
              "length_stddev": 4.8,
              "max_length": 24,
              "min_length": 1,
              "numeric_suffix_count": 1,
              "reuse_ratio": 0.21,
              "single_char_count": 1,
              "single_char_ratio": 0,
              "underscore_prefix_count": 9,
              "unique": 204
            },
            "imports": {
              "count": 3,
              "stdlib_count": 1,
              "stdlib_ratio": 0.33,
              "third_party_count": 2,
              "third_party_ratio": 0.67
            },
            "references": {
              "declared_count": 3,
              "security_hold_count": 0,
              "unavailable_browser_script_count": 0,
              "unavailable_command_count": 0,
              "unavailable_vsix_url_count": 0,
              "unresolved_count": 0,
              "unresolved_extension_count": 0,
              "unresolved_required_extension_count": 0
            },
            "source": {
              "function_count": 41
            },
            "strings": {
              "avg_entropy": 2.69,
              "avg_length": 15.07,
              "bytes": 2456,
              "count": 163,
              "embedded_code_candidates": 1,
              "empty_count": 5,
              "entropy_stddev": 0.96,
              "max_length": 144
            },
            "text": {
              "anonymous_function_ratio": 0.31,
              "ascii_art_lines": 4,
              "avg_line_length": 28.14,
              "char_entropy": 4.77,
              "digit_ratio": 0.01,
              "empty_line_ratio": 0.01,
              "escape_density": 0.01,
              "identifier_density": 1.43,
              "identifiers_to_functions_ratio": 3.34,
              "import_density": 0.43,
              "imports_to_functions_ratio": 0.05,
              "last_line_length": 2,
              "line_length_stddev": 22.77,
              "lines": 693,
              "max_line_length": 156,
              "max_whitespace_run": 1,
              "non_ascii_ratio": 0,
              "normalized_function_count": 2.32,
              "normalized_import_count": 0.11,
              "normalized_string_count": 6.19,
              "normalized_unique_identifiers": 21.62,
              "repeated_char_sequences": 73,
              "space_count": 4762,
              "string_density": 0.24,
              "strings_to_functions_ratio": 2.67,
              "suspicious_comment_ratio": 0.17,
              "suspicious_identifier_ratio": 0,
              "suspicious_string_ratio": 0.01,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.07,
              "unicode_escape_count": 3,
              "unique_chars": 90,
              "whitespace_ratio": 0.27
            }
          },
          "tgt": [
            "AG_UI_CONTENT_TYPES.has",
            "Array.isArray",
            "AsyncLocalStorage",
            "ConsoleLogger",
            "Date",
            "Date.now",
            "Date.now.toString",
            "Error",
            "JSON.stringify",
            "Math.random",
            "Math.random.toString",
            "Math.random.toString.slice",
            "Message",
            "NotImplementedError",
            "Object.hasOwn",
            "Promise.resolve",
            "ReadableStream",
            "Response",
            "Set",
            "TextEncoder",
            "ValidationError",
            "WebAdapter",
            "WebFormatConverter",
            "adapterPostableToText",
            "agUiContentToParts",
            "assistantMessageFromText",
            "body.messages.at",
            "chat.processMessage",
            "closePart",
            "controller.close",
            "controller.enqueue",
            "controller.error",
            "conversationId.includes",
            "createSseResponse",
            "crypto.randomUUID",
            "ctx.dataParts.add",
            "ctx.dataParts.has",
            "ctx.write",
            "encoder.encode",
            "enqueue",
            "extractText",
            "formatConverter.fromAst",
            "generateId",
            "isNonEmptyArray",
            "isRecord",
            "jsonError",
            "messageId",
            "openPart",
            "parseMarkdown",
            "part.type.startsWith",
            "parts.findIndex",
            "parts.push",
            "partsOf",
            "partsOf.filter",
            "protocolMismatchError",
            "readRequestBody",
            "request.json",
            "requireWebRequestContext",
            "rest.join",
            "run",
            "run.then",
            "send",
            "streamChunkToDataEvent",
            "stringifyMarkdown",
            "texts.join",
            "texts.push",
            "threadId.split",
            "user.id.includes",
            "value.filter",
            "webRequestContext.getStore",
            "webRequestContext.run",
            "writeDelta"
          ]
        },
        "id": 3,
        "mol": "O(Eu)H₃(Cm₃Db₂Os)Md₂(Pa₂Pt₃)",
        "path": "web-4.45.0.tgz!!package/dist/index.js",
        "pid": 0,
        "risk": 9,
        "sha": "ea1c3f8963e1abfbe5393228cef2cc8945b1fea92684672d612e818025e1e67e",
        "sid": 10792000636,
        "size": 20196,
        "traits": [
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "References a userName object member",
            "id": "metadata/lang/source/naming/person::js-user-name-member",
            "spans": [
              [
                8278,
                13
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Identifier += assignment expression",
            "id": "metadata/lang/source/syntax/assignment/value::js-addition-assignment-identifier",
            "spans": [
              [
                15004,
                25
              ]
            ]
          },
          {
            "conf": 0.94,
            "crit": 3,
            "desc": "Object pairs chat role and message fields",
            "id": "metadata/lang/source/syntax/object::chat-role-message-record",
            "spans": [
              [
                1716,
                10
              ],
              [
                1781,
                12
              ]
            ],
            "uses": [
              38,
              39
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "JavaScript/TypeScript file under dist",
            "id": "metadata/package/files/runtime::javascript-dist-tree-artifact"
          },
          {
            "conf": 0.99,
            "crit": 3,
            "desc": "Has dist/index.js path",
            "id": "metadata/package/files/runtime::npm-dist-index-entry"
          },
          {
            "conf": 0.99,
            "crit": 3,
            "desc": "Names an HTTP request parser test",
            "id": "metadata/package/testing/http-fixtures::http-duplicate-length-parser-test-name",
            "spans": [
              [
                6156,
                20
              ]
            ]
          },
          {
            "conf": 0.65,
            "crit": 3,
            "desc": "References the application/json media type",
            "id": "micro-behaviors/communications/http/header/content-type::application-json",
            "spans": [
              [
                18760,
                16
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "References HTTP Content-Type application/json",
            "id": "micro-behaviors/communications/http/header/content-type::json-header",
            "spans": [
              [
                18744,
                32
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Calls JSON method on HTTP-style object",
            "id": "micro-behaviors/communications/http/message::http-message-json-call",
            "spans": [
              [
                9415,
                12
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 3,
            "desc": "HTTP 401 unauthorized response text",
            "id": "micro-behaviors/communications/http/response::http-401-unauthorized",
            "spans": [
              [
                9672,
                18
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Assigns a user identity property",
            "id": "micro-behaviors/data/property/assign::user-identity-field-assignment",
            "spans": [
              [
                8595,
                15
              ]
            ]
          },
          {
            "conf": 0.5,
            "crit": 3,
            "desc": "Calls JSON.stringify()",
            "id": "micro-behaviors/data/serialize/json::json-stringify-call",
            "spans": [
              [
                4807,
                14
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Serializes an identifier as JSON",
            "id": "micro-behaviors/data/serialize/json::json-stringify-identifier",
            "spans": [
              [
                4807,
                14
              ]
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Serializes a payload object as JSON",
            "id": "micro-behaviors/data/serialize/json::json-stringify-payload-call",
            "spans": [
              [
                5530,
                14
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Serializes value with JSON.stringify",
            "id": "micro-behaviors/data/serialize/json::json-stringify-text-call",
            "spans": [
              [
                4807,
                16
              ],
              [
                5530,
                16
              ],
              [
                18678,
                16
              ]
            ]
          },
          {
            "conf": 0.84,
            "crit": 3,
            "desc": "JSON.stringify beside a variable-valued field",
            "id": "micro-behaviors/data/serialize/json::json-stringify-variable-value",
            "spans": [
              [
                18678,
                33
              ]
            ]
          },
          {
            "conf": 0.6,
            "crit": 3,
            "desc": "References the nginx web server",
            "id": "micro-behaviors/os/application/target/server::nginx-name-reference",
            "spans": [
              [
                1006,
                5
              ]
            ]
          },
          {
            "conf": 0.72,
            "crit": 3,
            "desc": "Generates UUID with Web Crypto",
            "id": "micro-behaviors/os/random/crypto::webcrypto-random-uuid",
            "spans": [
              [
                7744,
                17
              ]
            ]
          },
          {
            "atk": "T1041",
            "conf": 0.98,
            "crit": 3,
            "desc": "Serializes payload with JSON.stringify",
            "id": "objectives/exfiltration/stealer/directory-listing::node-json-stringify-payload",
            "mbc": "E1041",
            "spans": [
              [
                5530,
                23
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "JavaScript or TypeScript source filename",
            "id": "metadata/file/extension/source::js-ts-source-basename"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports async_hooks",
            "id": "metadata/import/npm/async_hooks::async_hooks",
            "spans": [
              [
                197,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @chat-adapter/shared",
            "id": "metadata/import/npm/chat-adapter/shared::chat-adapter/shared",
            "spans": [
              [
                50,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports chat",
            "id": "metadata/import/npm/chat::chat",
            "spans": [
              [
                140,
                0
              ]
            ]
          },
          {
            "conf": 0.3,
            "crit": 2,
            "desc": "Source contains for-loop syntax",
            "id": "metadata/lang/source/syntax/control-flow::for-loop-content",
            "spans": [
              [
                7381,
                0
              ]
            ]
          },
          {
            "conf": 0.98,
            "crit": 2,
            "desc": "Payload/data member-name reference",
            "id": "metadata/lang/source/syntax/member::message-payload-data-member-name",
            "spans": [
              [
                4582,
                0
              ]
            ]
          },
          {
            "conf": 0.98,
            "crit": 2,
            "desc": "Type member-name reference",
            "id": "metadata/lang/source/syntax/member::message-type-member-name",
            "spans": [
              [
                15339,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Control-action verb followed by alphabetic text",
            "id": "metadata/lang/natural/vocabulary/content-word::control-action-prose-fragment",
            "spans": [
              [
                998,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Data-transfer verb token",
            "id": "metadata/lang/natural/vocabulary/content-word::data-transfer-verb-token",
            "spans": [
              [
                6914,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Directive or message vocabulary token",
            "id": "metadata/lang/natural/vocabulary/content-word::directive-or-message-word-token",
            "spans": [
              [
                102,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "English edit-action verb token",
            "id": "metadata/lang/natural/vocabulary/content-word::english-edit-verb-token",
            "spans": [
              [
                15796,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1",
            "spans": [
              [
                1038,
                0
              ],
              [
                8538,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                1674,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"that\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-3",
            "spans": [
              [
                8524,
                0
              ],
              [
                8527,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"have\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-4",
            "spans": [
              [
                16453,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                4309,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                9846,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"this\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-7",
            "spans": [
              [
                8595,
                0
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 1,
            "desc": "JavaScript source contains request token",
            "id": "metadata/lang/source/naming/interface/network::request-word-text",
            "spans": [
              [
                436,
                0
              ]
            ]
          },
          {
            "conf": 0.88,
            "crit": 1,
            "desc": "Chat object defines message or content key",
            "id": "metadata/lang/source/syntax/object::chat-message-content-field",
            "spans": [
              [
                20006,
                0
              ]
            ]
          },
          {
            "conf": 0.92,
            "crit": 1,
            "desc": "Chat role field names user or assistant",
            "id": "metadata/lang/source/syntax/object::chat-role-field-literal",
            "spans": [
              [
                1781,
                0
              ]
            ]
          },
          {
            "conf": 0.72,
            "crit": 1,
            "desc": "References an LLM message role field",
            "id": "micro-behaviors/data/llm/wire-marker::role-field-marker",
            "spans": [
              [
                3337,
                0
              ]
            ]
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "User or personal-name member references",
            "id": "metadata/lang/source/naming/person::identity-name-member-references",
            "spans": [
              [
                8278,
                13
              ]
            ],
            "uses": [
              0
            ]
          },
          {
            "conf": 0.72,
            "crit": 1,
            "desc": "LLM role terminology or label",
            "id": "micro-behaviors/data/llm/wire-marker::role-marker",
            "spans": [
              [
                3337,
                0
              ]
            ],
            "uses": [
              40
            ]
          }
        ],
        "type": "javascript"
      },
      {
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "import { UseChatHelpers } from '@ai-sdk/react';\nexport { UseChatHelpers } from '@ai-sdk/react';\nimport { UIMessage, ChatInit } from 'ai';\nexport { UIMessage } from 'ai';\nexport { W as WebUIMessage } from '../ui-message-BoLzScMl.js';\nimport '../types-BZb_SQPK.js';\nimport 'chat';\n\ninterface WebUseChatOptions\u003cUI_MESSAGE extends UIMessage = UIMessage\u003e extends Omit\u003cChatInit\u003cUI_MESSAGE\u003e, \"transport\"\u003e {\n    /** API endpoint for the Web adapter route. Defaults to \"/api/chat\". */\n    api?: string;\n    /** Custom throttle wait in ms for chat messages and data updates. */\n    experimental_throttle?: number;\n    /** Whether to resume an ongoing chat generation stream. */\n    resume?: boolean;\n    /**\n     * chat-sdk thread id â becomes useChat's conversation `id` and surfaces\n     * in the request body so the server can derive the chat-sdk thread id.\n     * Strongly recommended; falls back to `id` from `ChatInit`.\n     */\n    threadId?: string;\n}\n/**\n * `useChat` preconfigured for `@chat-adapter/web`.\n *\n * Wraps `@ai-sdk/react`'s `useChat` with a `DefaultChatTransport` pointed at\n * `/api/chat` (or whatever you pass as `api`). Everything else passes through\n * unchanged â `messages`, `sendMessage`, `status`, `stop`, `regenerate`, etc.\n *\n * For advanced configuration (custom transport, response interceptors, etc.)\n * use `@ai-sdk/react`'s `useChat` directly.\n */\ndeclare function useChat\u003cUI_MESSAGE extends UIMessage = UIMessage\u003e(opts?: WebUseChatOptions\u003cUI_MESSAGE\u003e): UseChatHelpers\u003cUI_MESSAGE\u003e;\n\nexport { type WebUseChatOptions, useChat };\n"
          }
        ],
        "depth": 1,
        "facts": {
          "imp": [
            [
              "",
              "../types-BZb_SQPK.js"
            ],
            [
              "",
              "@ai-sdk/react"
            ],
            [
              "",
              "ai"
            ],
            [
              "",
              "chat"
            ]
          ],
          "metrics": {
            "ast": {
              "call_count": 0,
              "max_depth": 8,
              "node_count": 211
            },
            "binary": {
              "peak_region_bytes": 1557,
              "peak_region_entropy": 4.97
            },
            "comments": {
              "base64": 1,
              "chars": 836,
              "count": 5,
              "high_entropy": 1,
              "lines": 18,
              "to_code_ratio": 1.06
            },
            "file": {
              "entropy": 5,
              "size": 1557
            },
            "functions": {
              "count": 1
            },
            "identifiers": {
              "all_lowercase_ratio": 0.29,
              "all_uppercase_ratio": 0.14,
              "avg_entropy": 2.52,
              "avg_length": 8.86,
              "count": 29,
              "high_entropy_count": 1,
              "high_entropy_ratio": 0.07,
              "length_stddev": 5.4,
              "max_length": 21,
              "min_length": 1,
              "reuse_ratio": 0.48,
              "sequential_names": 1,
              "single_char_count": 1,
              "single_char_ratio": 0.07,
              "unique": 14
            },
            "imports": {
              "count": 4,
              "relative": 1,
              "relative_ratio": 0.25,
              "third_party_count": 4,
              "third_party_ratio": 1
            },
            "source": {
              "class_count": 1
            },
            "strings": {
              "avg_entropy": 2.71,
              "avg_length": 10,
              "bytes": 100,
              "count": 10,
              "entropy_stddev": 1.07,
              "max_length": 25,
              "path_count": 2
            },
            "text": {
              "avg_line_length": 43.49,
              "char_entropy": 5,
              "empty_line_ratio": 0.06,
              "identifier_density": 0.83,
              "import_density": 11.43,
              "last_line_length": 43,
              "line_length_stddev": 34.51,
              "lines": 35,
              "max_line_length": 133,
              "max_whitespace_run": 1,
              "non_ascii_ratio": 0,
              "normalized_import_count": 0.68,
              "normalized_string_count": 1.69,
              "normalized_unique_identifiers": 2.73,
              "space_count": 223,
              "string_density": 0.29,
              "suspicious_comment_ratio": 0.4,
              "suspicious_identifier_ratio": 0.07,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.09,
              "unique_chars": 71,
              "whitespace_ratio": 0.17
            }
          }
        },
        "id": 4,
        "mol": "H(Cm)Md(Pa)",
        "path": "web-4.45.0.tgz!!package/dist/react/index.d.ts",
        "pid": 0,
        "refs": [
          {
            "kind": "local",
            "off": 205,
            "to": "../ui-message-BoLzScMl.js"
          },
          {
            "kind": "local",
            "off": 241,
            "to": "../types-BZb_SQPK.js"
          }
        ],
        "risk": 3,
        "sha": "cedcaf47ed6fb4e640dbf086ce5eca4457a96c3de53cc4754cb551d01db6a392",
        "sid": 10792000632,
        "size": 1557,
        "supp": [
          {
            "by": [
              {
                "id": "metadata/lang/scripted::dts-declaration-file"
              }
            ],
            "crit": "notable",
            "id": "micro-behaviors/os/module/require::esm-side-effect-local-import",
            "kind": "unless"
          },
          {
            "by": [
              {
                "id": "metadata/lang/scripted::dts-declaration-file"
              }
            ],
            "crit": "notable",
            "id": "micro-behaviors/os/module/require::esm-side-effect-package-import",
            "kind": "unless"
          }
        ],
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "JavaScript/TypeScript file under dist",
            "id": "metadata/package/files/runtime::javascript-dist-tree-artifact"
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Root API chat or generate URL path",
            "id": "micro-behaviors/communications/url/resource-path/automation::api-chat-or-generate-path-reference",
            "spans": [
              [
                460,
                10
              ],
              [
                1091,
                10
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @ai-sdk/react",
            "id": "metadata/import/npm/ai-sdk/react::ai-sdk/react",
            "spans": [
              [
                31,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports ai",
            "id": "metadata/import/npm/ai::ai",
            "spans": [
              [
                132,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports chat",
            "id": "metadata/import/npm/chat::chat",
            "spans": [
              [
                271,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports ../types-BZb_SQPK.js",
            "id": "metadata/import/npm/relative/2/types-bzb_sqpk/js::relative/2/types-bzb_sqpk/js",
            "spans": [
              [
                240,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1",
            "spans": [
              [
                425,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                547,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                421,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                1047,
                0
              ]
            ]
          }
        ],
        "type": "javascript"
      },
      {
        "analysis_gaps": [
          "flow-graph-limited",
          "flow-call-unavailable",
          "flow-query-incomplete"
        ],
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "\"use client\";\n\n// src/react/index.ts\nimport { useChat as useChatRaw } from \"@ai-sdk/react\";\nimport { DefaultChatTransport } from \"ai\";\nimport { useMemo } from \"react\";\nfunction useChat(opts = {}) {\n  const { api = \"/api/chat\", threadId, ...rest } = opts;\n  const transport = useMemo(\n    () =\u003e new DefaultChatTransport({ api }),\n    [api]\n  );\n  const id = threadId ?? rest.id;\n  return useChatRaw({\n    ...rest,\n    transport,\n    ...id !== void 0 ? { id } : {}\n  });\n}\nexport {\n  useChat\n};\n"
          }
        ],
        "depth": 1,
        "facts": {
          "funcs": [
            [
              "useChat",
              168
            ],
            [
              "anonymous",
              288
            ]
          ],
          "imp": [
            [
              "",
              "useMemo"
            ],
            [
              "",
              "DefaultChatTransport"
            ],
            [
              "",
              "useChatRaw"
            ],
            [
              "",
              "@ai-sdk/react"
            ],
            [
              "",
              "ai"
            ],
            [
              "",
              "react"
            ]
          ],
          "mbr": [
            "rest.id"
          ],
          "metrics": {
            "ast": {
              "call_count": 3,
              "max_array_length": 1,
              "max_depth": 11,
              "max_member_depth": 2,
              "member_count": 1,
              "node_count": 176,
              "op.coalesce": 1,
              "op.ne": 1,
              "op_density.coalesce": 0.01,
              "op_density.ne": 0.01
            },
            "binary": {
              "peak_region_bytes": 493,
              "peak_region_entropy": 4.68
            },
            "binds": {
              "count": 2
            },
            "comments": {
              "chars": 19,
              "count": 1,
              "lines": 1,
              "to_code_ratio": 0.05
            },
            "file": {
              "entropy": 4.68,
              "size": 493
            },
            "functions": {
              "anonymous": 1,
              "avg_length_lines": 7,
              "avg_name_length": 7,
              "avg_nesting_depth": 0.5,
              "avg_param_name_length": 4,
              "avg_params": 0.5,
              "code_ratio": 0.59,
              "count": 1,
              "density": 9.09,
              "length_stddev": 6,
              "max_length_lines": 13,
              "max_nesting_depth": 1,
              "max_params": 1,
              "min_length_lines": 1,
              "nested": 1,
              "no_params_count": 1,
              "one_liners": 1
            },
            "identifiers": {
              "all_lowercase_ratio": 0.5,
              "avg_entropy": 2.43,
              "avg_length": 7.4,
              "count": 23,
              "high_entropy_count": 1,
              "high_entropy_ratio": 0.1,
              "length_stddev": 4.9,
              "max_length": 20,
              "min_length": 2,
              "reuse_ratio": 0.43,
              "unique": 10
            },
            "imports": {
              "count": 3,
              "third_party_count": 3,
              "third_party_ratio": 1
            },
            "references": {
              "declared_count": 3,
              "security_hold_count": 0,
              "unavailable_browser_script_count": 0,
              "unavailable_command_count": 0,
              "unavailable_vsix_url_count": 0,
              "unresolved_count": 0,
              "unresolved_extension_count": 0,
              "unresolved_required_extension_count": 0
            },
            "source": {
              "function_count": 1
            },
            "strings": {
              "avg_entropy": 2.54,
              "avg_length": 7.8,
              "bytes": 39,
              "count": 5,
              "entropy_stddev": 0.87,
              "max_length": 13,
              "path_count": 1
            },
            "text": {
              "anonymous_function_ratio": 0.5,
              "avg_line_length": 21.41,
              "char_entropy": 4.68,
              "digit_ratio": 0,
              "empty_line_ratio": 0.05,
              "identifier_density": 1.05,
              "identifiers_to_functions_ratio": 5,
              "import_density": 13.64,
              "imports_to_functions_ratio": 1.5,
              "last_line_length": 2,
              "line_length_stddev": 16.82,
              "lines": 22,
              "max_line_length": 56,
              "max_whitespace_run": 1,
              "normalized_function_count": 0.43,
              "normalized_import_count": 0.64,
              "normalized_string_count": 1.07,
              "normalized_unique_identifiers": 2.24,
              "space_count": 90,
              "string_density": 0.23,
              "strings_to_functions_ratio": 2.5,
              "top_char": 116,
              "top_char_null": 0,
              "top_char_ratio": 0.08,
              "unique_chars": 47,
              "whitespace_ratio": 0.23
            }
          },
          "tgt": [
            "DefaultChatTransport",
            "useChatRaw",
            "useMemo"
          ]
        },
        "id": 5,
        "mol": "H(Cm)Md(Pa)",
        "path": "web-4.45.0.tgz!!package/dist/react/index.js",
        "pid": 0,
        "risk": 3,
        "sha": "cd01e02ccae9391f253475997e81737bea04da6c0a447c520827695225c57aee",
        "sid": 4240895778,
        "size": 493,
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "JavaScript/TypeScript file under dist",
            "id": "metadata/package/files/runtime::javascript-dist-tree-artifact"
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Root API chat or generate URL path",
            "id": "micro-behaviors/communications/url/resource-path/automation::api-chat-or-generate-path-reference",
            "spans": [
              [
                214,
                10
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "JavaScript or TypeScript source filename",
            "id": "metadata/file/extension/source::js-ts-source-basename"
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports @ai-sdk/react",
            "id": "metadata/import/npm/ai-sdk/react::ai-sdk/react",
            "spans": [
              [
                75,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports ai",
            "id": "metadata/import/npm/ai::ai",
            "spans": [
              [
                129,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports react",
            "id": "metadata/import/npm/react::react",
            "spans": [
              [
                159,
                0
              ]
            ]
          }
        ],
        "type": "javascript"
      },
      {
        "depth": 1,
        "id": 6,
        "path": "web-4.45.0.tgz!!package/dist/svelte/index.d.ts",
        "pid": 0,
        "risk": 0,
        "sha": "8e077220a1f3880b061f84f5e03adb36942718eee34da2929c765439f50bddd3",
        "sid": 10792000629,
        "size": 1780,
        "type": "javascript"
      },
      {
        "depth": 1,
        "id": 7,
        "path": "web-4.45.0.tgz!!package/dist/svelte/index.js",
        "pid": 0,
        "risk": 0,
        "sha": "99c9c83a547d9e8fd2b944cb443d75979e1889b4a62095e8fc03a1338dcf2929",
        "sid": 4240895570,
        "size": 395,
        "type": "javascript"
      },
      {
        "ctx": [
          {
            "col": 10,
            "line": 1,
            "ln": 9,
            "s": "TaskUpdateChunk, PlanUpdateChunk, Logger } from 'chat';\n\n/**\n * Payload of a `data-task` part: a `task_update` chunk without its `type`.\n * The part's `id` is the task id, so each update replaces the previous one.\n */\ntype WebTaskData = Omit\u003cTaskUpda"
          },
          {
            "col": 39,
            "line": 9,
            "ln": 319,
            "s": "lan_update` chunk without its `type`.\n * The part's `id` is the assistant message id the client holds, so each\n * update in a response replaces the previous one.\n */\ntype WebPlanData = Omit\u003cPlanUpdateChunk, \"type\"\u003e;\n/**\n * Data parts the Web adapter streams for structured `StreamChunk`s, keyed by\n * the part name after `data-`. Pass it as the data-parts t"
          },
          {
            "col": 7,
            "line": 23,
            "ln": 849,
            "s": "entity resolved from an inbound web request. */\ninterface WebUser {\n    /** Stable user identifier. Used to scope thread IDs and as the message author id. */\n    id: string;\n    /** Optional display name. Falls back to `id` when omitted. */\n    name?: string;\n}\n/**\n * Wire protocol the adapter speaks with the browser.\n *\n * - `\"ai-sdk\"`: AI SDK UI message stream, for `useChat` from `@ai-sdk/react`,\n"
          },
          {
            "col": 18,
            "line": 35,
            "ln": 1345,
            "s": "G-UI events, for TanStack AI's `fetchServerSentEvents`\n *   connection and other AG-UI clients.\n */\nt"
          },
          {
            "col": 56,
            "line": 45,
            "ln": 1702,
            "s": "ssage.raw`.\n *\n * Incoming user messages keep the parts the client sent, minus anything the\n * protocol "
          },
          {
            "col": 13,
            "line": 53,
            "ln": 2027,
            "s": "ng;\n    metadata?: unknown;\n    parts: WebMessagePart[];\n    role: \"user\" | \"assistant\" | \"system\";\n}\ninterface WebAdapterConfig {\n    /*"
          },
          {
            "col": 35,
            "line": 60,
            "ln": 2200,
            "s": "nbound HTTP request.\n     *\n     * Required â this is the security boundary for the Web adapter. Returning\n     * `null` causes the adapter to res"
          },
          {
            "col": 1,
            "line": 64,
            "ln": 2391,
            "s": "     * (NextAuth, Clerk, custom session cookie, etc.) here.\n     */\n    getUser: (request: Request) =\u003e WebUser"
          },
          {
            "col": 11,
            "line": 77,
            "ln": 3112,
            "s": "rent message.\n     */\n    persistMessageHistory?: boolean;\n    /**\n     * Wire protocol for requests and streamed responses.\n     *\n     * Default: `\"ai-"
          },
          {
            "col": 65,
            "line": 91,
            "ln": 3684,
            "s": ", one thread per user).\n     */\n    threadIdFor?: (args: {\n        user: WebUser;\n        conversationId: string;\n    }) =\u003e string;\n    /**\n     * Bot username. Required by chat-sdk for mention detection (`@username`).\n     * "
          },
          {
            "col": 3,
            "line": 106,
            "ln": 4179,
            "s": " compatibility with the previous name.\n */\ntype WebAdapterOptions = WebAdapterConfig;\n\nexport type { WebTaskData as W, WebPlanData as a, WebMessage as b, WebAdapterConfig as c, WebUser as d, WebAdapterOptions as e, WebDataParts as f, WebMessagePart as g, WebProtocolName as h };\n"
          }
        ],
        "depth": 1,
        "facts": {
          "imp": [
            [
              "",
              "chat"
            ]
          ],
          "metrics": {
            "ast": {
              "call_count": 0,
              "max_depth": 13,
              "node_count": 365
            },
            "binary": {
              "peak_region_bytes": 4458,
              "peak_region_entropy": 4.83
            },
            "comments": {
              "base64": 1,
              "chars": 3241,
              "count": 16,
              "high_entropy": 3,
              "lines": 73,
              "to_code_ratio": 1.97
            },
            "file": {
              "entropy": 4.76,
              "size": 4458
            },
            "functions": {
              "count": 4
            },
            "identifiers": {
              "all_lowercase_ratio": 0.51,
              "all_uppercase_ratio": 0.02,
              "avg_entropy": 2.07,
              "avg_length": 7.07,
              "count": 65,
              "high_entropy_count": 5,
              "high_entropy_ratio": 0.12,
              "length_stddev": 5.27,
              "max_length": 21,
              "min_length": 1,
              "reuse_ratio": 0.66,
              "sequential_names": 9,
              "single_char_count": 9,
              "single_char_ratio": 0.21,
              "unique": 43
            },
            "imports": {
              "count": 1,
              "third_party_count": 1,
              "third_party_ratio": 1
            },
            "source": {
              "class_count": 4
            },
            "strings": {
              "avg_entropy": 2.38,
              "avg_length": 5.63,
              "bytes": 90,
              "count": 16,
              "entropy_stddev": 0.25,
              "max_length": 9
            },
            "text": {
              "avg_line_length": 39.53,
              "char_entropy": 4.76,
              "digit_ratio": 0,
              "empty_line_ratio": 0.02,
              "identifier_density": 0.59,
              "import_density": 0.91,
              "last_line_length": 191,
              "line_length_stddev": 34.15,
              "lines": 110,
              "max_line_length": 191,
              "max_whitespace_run": 3,
              "non_ascii_ratio": 0,
              "normalized_import_count": 0.1,
              "normalized_string_count": 1.53,
              "normalized_unique_identifiers": 6.34,
              "space_count": 838,
              "string_density": 0.15,
              "suspicious_comment_ratio": 0.25,
              "suspicious_identifier_ratio": 0.21,
              "top_char": 101,
              "top_char_null": 0,
              "top_char_ratio": 0.09,
              "unique_chars": 76,
              "whitespace_ratio": 0.21
            }
          }
        },
        "id": 8,
        "mol": "H(Db)Md(Pa)",
        "path": "web-4.45.0.tgz!!package/dist/types-BZb_SQPK.d.ts",
        "pid": 0,
        "risk": 2,
        "sha": "21cb90260bfd00922db53ea944a158f2dde75bdbffa088d1dde52d8826ad6424",
        "sid": 10792000625,
        "size": 4458,
        "supp": [
          {
            "by": [
              {
                "id": "metadata/lang/scripted::dts-declaration-file"
              }
            ],
            "crit": "notable",
            "id": "metadata/lang/source/syntax/object::chat-role-message-record",
            "kind": "unless"
          }
        ],
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "JavaScript/TypeScript file under dist",
            "id": "metadata/package/files/runtime::javascript-dist-tree-artifact"
          },
          {
            "conf": 0.72,
            "crit": 3,
            "desc": "LLM developer or assistant terminology reference",
            "id": "micro-behaviors/data/llm/wire-marker::non-system-role-term-reference",
            "spans": [
              [
                383,
                17
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "imports chat",
            "id": "metadata/import/npm/chat::chat",
            "spans": [
              [
                57,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"the\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-1",
            "spans": [
              [
                149,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"and\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-2",
            "spans": [
              [
                974,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"for\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-5",
            "spans": [
              [
                577,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"with\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-6",
            "spans": [
              [
                1151,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 1,
            "desc": "English function-word token \"this\"",
            "id": "metadata/lang/natural/vocabulary/function-word::lang-english--atom-7",
            "spans": [
              [
                2248,
                0
              ]
            ]
          }
        ],
        "type": "javascript"
      },
      {
        "depth": 1,
        "id": 9,
        "path": "web-4.45.0.tgz!!package/dist/ui-message-BoLzScMl.d.ts",
        "pid": 0,
        "risk": 0,
        "sha": "d069a07a3021ee3a6766d060e834206c212e375752bcd69fc3e42955d59b6ea8",
        "sid": 10792000633,
        "size": 341,
        "type": "javascript"
      },
      {
        "depth": 1,
        "id": 10,
        "path": "web-4.45.0.tgz!!package/dist/vue/index.d.ts",
        "pid": 0,
        "risk": 0,
        "sha": "d8bab0444bb893d8be0fb9977c4324fab049deff77267f76eaa489bc3a8c9387",
        "sid": 10792000635,
        "size": 1883,
        "type": "javascript"
      },
      {
        "depth": 1,
        "id": 11,
        "path": "web-4.45.0.tgz!!package/dist/vue/index.js",
        "pid": 0,
        "risk": 0,
        "sha": "5da7093e9062b7c1d67da813ff16e68bbea720bd66f7697e101e1e42e5802212",
        "sid": 4240895272,
        "size": 389,
        "type": "javascript"
      },
      {
        "ctx": [
          {
            "col": 1,
            "line": 1,
            "ln": 0,
            "s": "{\n  \"name\": \"@chat-adapter/web\",\n  \"version\": \"4.45.0\",\n  \"description\": \"Web adapter for Chat SDK â browser chat UI over the AI SDK or AG-UI (TanStack AI) stream protocols\",\n  \"type\": \"module\",\n  \"engines\": {\n    \"node\": \"\u003e=20\"\n  },\n  \"main\": \"./dist/index.js\",\n  \"module\": \"./dist/index.js\",\n  \"types\": \"./dist/index.d.ts\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/index.d.ts\",\n      \"import\": \"./dist/index.js\"\n    },\n    \"./react\": {\n      \"types\": \"./dist/react/index.d.ts\",\n      \"import\": \"./dist/react/index.js\"\n    },\n    \"./vue\": {\n      \"types\": \"./dist/vue/index.d.ts\",\n      \"import\": \"./dist/vue/index.js\"\n    },\n    \"./svelte\": {\n   "
          },
          {
            "col": 34,
            "line": 26,
            "ln": 688,
            "s": "ex.d.ts\",\n      \"import\": \"./dist/svelte/index.js\"\n    }\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"dependencies\": {\n    \"@chat-adapter/shared\": \"4.45.0\",\n    \"chat\": \"4.45.0\"\n  },\n  \"peerDependencies\": {\n    \"@ai-sdk/react\": \"^3 || ^4\",\n    \"@ai-sdk/svelte\": \"^4 || ^5\",\n    \"@ai-sdk/vue\": \"^3 || ^4\",\n    \"ai\": \"^6 || ^7\",\n    \"react\": \"^19\",\n    \"svelte\": \"^5\",\n    \"vue\": \"^3\"\n  },\n  \"peerDependenciesMeta\": {\n    \"ai\": {\n      \"optional\":"
          },
          {
            "col": 2,
            "line": 65,
            "ln": 1388,
            "s": "   \"vue\": {\n      \"optional\": true\n    }\n  },\n  \"devDependencies\": {\n    \"@ai-sdk/react\": \"^4.0.0\",\n    \"@ai-sdk/svelte\": \"^5.0.0\",\n    \"@ai-sdk/vue\": \"^4.0.0\",\n    \"@types/node\": \"^25.3.2\",\n    \"@types/react\": \"^19.0.1\",\n    \"@vitest/coverage-v8\": \"^5.0.3\",\n    \"ai\": \"^7.0.0\",\n    \"react\": \"^19.0.0\",\n    \"svelte\": \"^5.55.7\",\n    \"tsup\": \"^8.3.5\",\n    \"typescript\": \"^5.7.2\",\n    \"vitest\": \"^5.0.3\",\n    \"vue\": \"^3.5.13\",\n    \"@chat-adapter/state-memory\": \"4.45.0\",\n    \"@chat-adapter/tests\": \"4.45.0\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/vercel/chat.git\",\n    \"directory\": \"packages/adapter-web\"\n  },\n  \"homepage\": \"https://chat-sdk.dev/adapters/official/web\",\n  \"bugs\": {\n    \"url\": \"https://github.com/vercel/chat/issues\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"keywords\": [\n    \"chat\",\n    \"chat-sdk\",\n    \"chatbot\",\n    \"web\",\n    \"react\",\n    \"vue\",\n    \"svelte\",\n    \"useChat\",\n    \"ai-sdk\",\n    \"ag-ui\",\n    \"tanstack-ai\",\n    \"ai-agent\",\n    \"bot\",\n    \"adapter\",\n    \"vercel\"\n  ],\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"tsup\",\n    \"dev\": \"tsup --watch\",\n    \"test\": \"vitest run --coverage\",\n    \"test:watch\": \"vitest\",\n    \"typecheck\": \"tsc --noEmit\",\n    \"clean\": \"rm -rf di"
          }
        ],
        "depth": 1,
        "facts": {
          "imp": [
            [
              "4.45.0",
              "@chat-adapter/shared"
            ],
            [
              "4.45.0",
              "chat"
            ],
            [
              "^4.0.0",
              "@ai-sdk/react"
            ],
            [
              "^5.0.0",
              "@ai-sdk/svelte"
            ],
            [
              "^4.0.0",
              "@ai-sdk/vue"
            ],
            [
              "^25.3.2",
              "@types/node"
            ],
            [
              "^19.0.1",
              "@types/react"
            ],
            [
              "^5.0.3",
              "@vitest/coverage-v8"
            ],
            [
              "^7.0.0",
              "ai"
            ],
            [
              "^19.0.0",
              "react"
            ],
            [
              "^5.55.7",
              "svelte"
            ],
            [
              "^8.3.5",
              "tsup"
            ],
            [
              "^5.7.2",
              "typescript"
            ],
            [
              "^5.0.3",
              "vitest"
            ],
            [
              "^3.5.13",
              "vue"
            ],
            [
              "4.45.0",
              "@chat-adapter/state-memory"
            ],
            [
              "4.45.0",
              "@chat-adapter/tests"
            ],
            [
              "^3 || ^4",
              "@ai-sdk/react"
            ],
            [
              "^4 || ^5",
              "@ai-sdk/svelte"
            ],
            [
              "^3 || ^4",
              "@ai-sdk/vue"
            ],
            [
              "^6 || ^7",
              "ai"
            ],
            [
              "^19",
              "react"
            ],
            [
              "^5",
              "svelte"
            ],
            [
              "^3",
              "vue"
            ]
          ],
          "metrics": {
            "binary": {
              "peak_region_bytes": 2651,
              "peak_region_entropy": 4.62
            },
            "consistency": {
              "missing_author": 1,
              "self_dependency": 0
            },
            "file": {
              "entropy": 4.59,
              "size": 2651
            },
            "imports": {
              "count": 24
            },
            "references": {
              "declared_count": 9,
              "security_hold_count": 0,
              "unavailable_browser_script_count": 0,
              "unavailable_command_count": 0,
              "unavailable_vsix_url_count": 0,
              "unresolved_count": 0,
              "unresolved_extension_count": 0,
              "unresolved_required_extension_count": 0
            }
          }
        },
        "id": 12,
        "mol": "Md₂(Pa₁₂)",
        "path": "web-4.45.0.tgz!!package/package.json",
        "pid": 0,
        "refs": [
          {
            "kind": "repository",
            "off": 1946,
            "to": "pkg:github/vercel/chat"
          },
          {
            "kind": "dependency",
            "off": 804,
            "to": "pkg:npm/%40chat-adapter/shared@4.45.0"
          },
          {
            "kind": "dependency",
            "off": 14,
            "to": "pkg:npm/chat@4.45.0"
          },
          {
            "kind": "dependency",
            "to": "pkg:npm/%40ai-sdk/react?version_requirement=%5E3%20%7C%7C%20%5E4"
          },
          {
            "kind": "dependency",
            "to": "pkg:npm/%40ai-sdk/svelte?version_requirement=%5E4%20%7C%7C%20%5E5"
          },
          {
            "kind": "dependency",
            "to": "pkg:npm/%40ai-sdk/vue?version_requirement=%5E3%20%7C%7C%20%5E4"
          },
          {
            "kind": "dependency",
            "to": "pkg:npm/ai?version_requirement=%5E6%20%7C%7C%20%5E7"
          },
          {
            "kind": "dependency",
            "to": "pkg:npm/react?version_requirement=%5E19"
          },
          {
            "kind": "dependency",
            "to": "pkg:npm/svelte?version_requirement=%5E5"
          },
          {
            "kind": "dependency",
            "to": "pkg:npm/vue?version_requirement=%5E3"
          },
          {
            "kind": "local",
            "off": 247,
            "sha256": "ea1c3f8963e1abfbe5393228cef2cc8945b1fea92684672d612e818025e1e67e",
            "to": "./dist/index.js"
          },
          {
            "kind": "local",
            "off": 308,
            "sha256": "4a542fd2019b2d1bbb74633d24fb487820eb71039e29ca1d3bdf7bbad09f0217",
            "to": "./dist/index.d.ts"
          },
          {
            "kind": "local",
            "off": 464,
            "sha256": "cedcaf47ed6fb4e640dbf086ce5eca4457a96c3de53cc4754cb551d01db6a392",
            "to": "./dist/react/index.d.ts"
          },
          {
            "kind": "local",
            "off": 507,
            "sha256": "cd01e02ccae9391f253475997e81737bea04da6c0a447c520827695225c57aee",
            "to": "./dist/react/index.js"
          },
          {
            "kind": "local",
            "off": 568,
            "sha256": "d8bab0444bb893d8be0fb9977c4324fab049deff77267f76eaa489bc3a8c9387",
            "to": "./dist/vue/index.d.ts"
          },
          {
            "kind": "local",
            "off": 609,
            "sha256": "5da7093e9062b7c1d67da813ff16e68bbea720bd66f7697e101e1e42e5802212",
            "to": "./dist/vue/index.js"
          },
          {
            "kind": "local",
            "off": 671,
            "sha256": "8e077220a1f3880b061f84f5e03adb36942718eee34da2929c765439f50bddd3",
            "to": "./dist/svelte/index.d.ts"
          },
          {
            "kind": "local",
            "off": 715,
            "sha256": "99c9c83a547d9e8fd2b944cb443d75979e1889b4a62095e8fc03a1338dcf2929",
            "to": "./dist/svelte/index.js"
          }
        ],
        "risk": 10,
        "sha": "07eeec67983ace94155087a57b5d71d7d179f8b528da27b2da802e276a03c4f2",
        "sid": 10792000624,
        "size": 2651,
        "supp": [
          {
            "by": [
              {
                "id": "value",
                "spans": [
                  [
                    1436,
                    200
                  ]
                ]
              }
            ],
            "crit": "notable",
            "id": "metadata/package/files/package-json::has-files-field",
            "kind": "unless"
          },
          {
            "by": [
              {
                "id": "value",
                "spans": [
                  [
                    1436,
                    200
                  ]
                ]
              }
            ],
            "crit": "notable",
            "id": "metadata/package/publishing::has-publish-config",
            "kind": "unless"
          },
          {
            "by": [
              {
                "id": "value",
                "spans": [
                  [
                    1938,
                    38
                  ]
                ]
              }
            ],
            "crit": "notable",
            "id": "metadata/package/repository::repository-object-without-url",
            "kind": "unless"
          },
          {
            "by": [
              {
                "id": "value",
                "spans": [
                  [
                    1436,
                    200
                  ]
                ]
              }
            ],
            "crit": "notable",
            "id": "metadata/package/testing/presence/manifest::pkg-test-script-field",
            "kind": "unless"
          }
        ],
        "traits": [
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Filename is package.json",
            "id": "metadata/filename/identity::package-json-basename"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Published npm manifest omits author metadata",
            "id": "metadata/package/author/presence::published-npm-manifest-omits-author"
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "Declares runtime dependencies object",
            "id": "metadata/package/dependencies/declaration::npm-runtime-dependencies-object",
            "spans": [
              [
                781,
                17
              ]
            ]
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "Declares TypeScript development dependency",
            "id": "metadata/package/dependencies/development::npm-typescript-development-dependency",
            "spans": [
              [
                1742,
                6
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package declares a runtime dependency",
            "id": "metadata/package/dependencies/presence::has-runtime-deps",
            "spans": [
              [
                781,
                23
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Uses version ranges for peer dependencies",
            "id": "metadata/package/dependencies/range::peer-range",
            "spans": [
              [
                865,
                132
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package has multiple entry declaration fields",
            "id": "metadata/package/entrypoint/module::multiple-entry-declaration-fields",
            "spans": [
              [
                238,
                15
              ],
              [
                267,
                9
              ],
              [
                298,
                17
              ],
              [
                330,
                200
              ]
            ],
            "uses": [
              8,
              21,
              25,
              26
            ]
          },
          {
            "conf": 0.98,
            "crit": 3,
            "desc": "Declares npm ESM module type",
            "id": "metadata/package/entrypoint/module::npm-esm-package-type",
            "spans": [
              [
                179,
                6
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Package declares TypeScript types entry",
            "id": "metadata/package/entrypoint/module::pkg-types-field",
            "spans": [
              [
                298,
                17
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 3,
            "desc": "npm publish root manifest declares runtime-tree entrypoint",
            "id": "metadata/package/entrypoint/module::publish-root-runtime-tree-entrypoint",
            "spans": [
              [
                238,
                15
              ]
            ],
            "uses": [
              23,
              28
            ]
          },
          {
            "conf": 0.92,
            "crit": 3,
            "desc": "Package.json declares a files allowlist",
            "id": "metadata/package/files/package-json::files-array-present",
            "spans": [
              [
                752,
                6
              ]
            ]
          },
          {
            "conf": 1.0,
            "crit": 3,
            "desc": "License text starts MIT/ISC/Apache/BSD",
            "id": "metadata/package/license::npm-license-mit-isc-apache-bsd-prefix",
            "spans": [
              [
                2440,
                15
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "npm package is configured for public publishing",
            "id": "metadata/package/publishing::npm-public-publish-access",
            "spans": [
              [
                2185,
                6
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "npm manifest declares a repository subdirectory",
            "id": "metadata/package/repository::npm-repository-directory-field",
            "spans": [
              [
                1991,
                20
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Repository identifies major Git host",
            "id": "metadata/package/repository::repo-url-git-host",
            "spans": [
              [
                1938,
                38
              ]
            ]
          },
          {
            "conf": 0.7,
            "crit": 3,
            "desc": "Package declares build script",
            "id": "metadata/package/scripts/build::has-build-script-build",
            "spans": [
              [
                2477,
                4
              ]
            ]
          },
          {
            "conf": 0.6,
            "crit": 3,
            "desc": "Package declares a build script",
            "id": "metadata/package/scripts/build::pkg-build-script-field",
            "spans": [
              [
                2477,
                4
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package script runs a bundler or compiler",
            "id": "metadata/package/scripts/build::script-runs-bundler-cli",
            "spans": [
              [
                2460,
                4
              ]
            ]
          },
          {
            "conf": 0.6,
            "crit": 3,
            "desc": "package.json declares a development script",
            "id": "metadata/package/scripts/develop::pkg-dev-script-field",
            "spans": [
              [
                2498,
                12
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 3,
            "desc": "Package script declares directory removal",
            "id": "metadata/package/scripts/reference::npm-script-directory-delete-command",
            "spans": [
              [
                2460,
                11
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package declares development dependencies",
            "id": "metadata/package/dependencies/presence::has-dev-deps",
            "spans": [
              [
                1436,
                0
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 2,
            "desc": "package.json declares an exports map",
            "id": "metadata/package/entrypoint/module::has-exports-field",
            "spans": [
              [
                330,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package main targets dist output",
            "id": "metadata/package/entrypoint/module::main-dist-entrypoint",
            "spans": [
              [
                238,
                0
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 2,
            "desc": "Package main targets runtime tree",
            "id": "metadata/package/entrypoint/module::main-runtime-tree-entrypoint",
            "spans": [
              [
                238,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package module targets dist output",
            "id": "metadata/package/entrypoint/module::module-dist-entrypoint",
            "spans": [
              [
                267,
                0
              ]
            ]
          },
          {
            "conf": 0.6,
            "crit": 2,
            "desc": "package.json declares a main entry point",
            "id": "metadata/package/entrypoint/module::pkg-main-field",
            "spans": [
              [
                238,
                0
              ]
            ]
          },
          {
            "conf": 0.6,
            "crit": 2,
            "desc": "\"module\": field in package.json",
            "id": "metadata/package/entrypoint/module::pkg-module-field",
            "spans": [
              [
                267,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package types targets dist output",
            "id": "metadata/package/entrypoint/module::types-dist-entrypoint",
            "spans": [
              [
                298,
                0
              ]
            ]
          },
          {
            "conf": 0.95,
            "crit": 2,
            "desc": "Manifest sits at npm publish root",
            "id": "metadata/package/files/included::npm-publish-root-manifest"
          },
          {
            "conf": 0.85,
            "crit": 2,
            "desc": "Package files list includes the dist directory",
            "id": "metadata/package/files/package-json::files-dist-ref",
            "spans": [
              [
                752,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package has homepage URL",
            "id": "metadata/package/homepage::has-homepage-field",
            "spans": [
              [
                2034,
                0
              ]
            ]
          },
          {
            "conf": 0.75,
            "crit": 2,
            "desc": "Package declares keywords",
            "id": "metadata/package/keywords/identity::has-keywords",
            "spans": [
              [
                2211,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 2,
            "desc": "package.json declares repository metadata",
            "id": "metadata/package/repository::has-repository-field",
            "spans": [
              [
                1899,
                0
              ]
            ]
          },
          {
            "conf": 0.85,
            "crit": 2,
            "desc": "package.json declares a repository URL",
            "id": "metadata/package/repository::has-repository-url",
            "spans": [
              [
                1938,
                0
              ]
            ]
          },
          {
            "conf": 0.8,
            "crit": 2,
            "desc": "Package specifies Node.js engine version",
            "id": "metadata/package/runtime::has-engines",
            "spans": [
              [
                216,
                0
              ]
            ]
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "package.json declares a test script",
            "id": "metadata/package/scripts/develop::has-test-script",
            "spans": [
              [
                2525,
                0
              ]
            ]
          },
          {
            "conf": 1.0,
            "crit": 2,
            "desc": "Package version uses numeric SemVer format",
            "id": "metadata/package/versioning/scheme::conventional-version-base",
            "spans": [
              [
                35,
                0
              ]
            ]
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "npm manifest omits Ethers client",
            "id": "metadata/package/dependencies/presence::npm-manifest-omits-ethers-client"
          },
          {
            "conf": 0.9,
            "crit": 1,
            "desc": "npm manifest omits Web3 client",
            "id": "metadata/package/dependencies/presence::npm-manifest-omits-web3-client"
          },
          {
            "conf": 0.9,
            "crit": 3,
            "desc": "Package has identifiable repository provenance",
            "id": "metadata/package/repository::repository-provenance",
            "spans": [
              [
                1938,
                38
              ]
            ],
            "uses": [
              14
            ]
          }
        ],
        "type": "package.json"
      }
    ],
    "v": 8
  }
}