{"_id":"@appx-org/agent-client","_rev":"6-6832d3eb66b17001a3e96cacab7866a8","name":"@appx-org/agent-client","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.5":{"name":"@appx-org/agent-client","version":"0.1.5","license":"MIT","_id":"@appx-org/agent-client@0.1.5","maintainers":[{"name":"neuromaxer","email":"neuromaxed@gmail.com"}],"homepage":"https://github.com/appx-org/appx-agent#readme","bugs":{"url":"https://github.com/appx-org/appx-agent/issues"},"dist":{"shasum":"942c75734a94c7f0a8a6d8ffabdd5586316fffbb","tarball":"https://registry.npmjs.org/@appx-org/agent-client/-/agent-client-0.1.5.tgz","fileCount":105,"integrity":"sha512-i37LxmQnfIGNzE9JZ7UABD9YtpTjrQtgflaLd/r5U9zxjJJLHEJXE855tyOdaW1WmSsz8BlAsvym6LhSauB7Pw==","signatures":[{"sig":"MEUCIQDqsVtg4ZSf/skXmn/MhhWu7X57R2GVMPfKNCNROw/QigIgfl2o3pZSFp2WB5t0JxIcu/0lvZzO0D/8xDaC0waGepo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":526669},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles.css":"./src/styles.css"},"gitHead":"6ca515a7cba03460559bb9b160399aa073759440","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build -w @appx-org/agent-protocol && npm run build","prebuild":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"neuromaxer","email":"neuromaxed@gmail.com"},"repository":{"url":"git+https://github.com/appx-org/appx-agent.git","type":"git","directory":"packages/agent-client"},"_npmVersion":"11.9.0","description":"Customizable React UI for the appx agent-server (chat, sessions, tool calls, model/thinking controls). Transport-agnostic and themeable.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"24.14.0","dependencies":{"marked":"^18.0.0","dompurify":"^3.3.3","openapi-fetch":"^0.17.0","react-virtuoso":"^4.18.7","@appx-org/agent-protocol":"0.1.5"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^25.0.1","react":"^19.2.4","vitest":"^2.1.9","react-dom":"^19.2.4","typescript":"~5.9.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/agent-client_0.1.5_1786017973886_0.7708066972463714","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@appx-org/agent-client","version":"0.1.6","license":"MIT","_id":"@appx-org/agent-client@0.1.6","maintainers":[{"name":"neuromaxer","email":"neuromaxed@gmail.com"}],"homepage":"https://github.com/appx-org/appx-agent#readme","bugs":{"url":"https://github.com/appx-org/appx-agent/issues"},"dist":{"shasum":"306220baa53cf694fe48fa82cd6e735a22fb311f","tarball":"https://registry.npmjs.org/@appx-org/agent-client/-/agent-client-0.1.6.tgz","fileCount":105,"integrity":"sha512-6s6y3V4Sa5A1cPbdOmhbgRGHKls0I4pddvf3lCOLs8+/017aeHbGnJ4Co3flfkXAOIATiY0zfoArguh6poQFSQ==","signatures":[{"sig":"MEYCIQDINFSWwpeSCOkF8vhgFCyWiwsCnIikm49Ty3X+NlOTZAIhAOOM+gMz6+3Xb6P3tvKeRP2llwsexYkKnevEyEHqntIC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@appx-org%2fagent-client@0.1.6","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":526669},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles.css":"./src/styles.css"},"gitHead":"4d3427ea40571eba9e9f623af7c37e5cdd7f4813","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build -w @appx-org/agent-protocol && npm run build","prebuild":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58e087ec-88f3-425b-92b9-274867c0f9ac"}},"repository":{"url":"git+https://github.com/appx-org/appx-agent.git","type":"git","directory":"packages/agent-client"},"_npmVersion":"11.16.0","description":"Customizable React UI for the appx agent-server (chat, sessions, tool calls, model/thinking controls). Transport-agnostic and themeable.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"24.18.0","dependencies":{"marked":"^18.0.0","dompurify":"^3.3.3","openapi-fetch":"^0.17.0","react-virtuoso":"^4.18.7","@appx-org/agent-protocol":"0.1.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^25.0.1","react":"^19.2.4","vitest":"^2.1.9","react-dom":"^19.2.4","typescript":"~5.9.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/agent-client_0.1.6_1786019524800_0.962354052162024","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@appx-org/agent-client","version":"0.1.7","license":"MIT","_id":"@appx-org/agent-client@0.1.7","maintainers":[{"name":"neuromaxer","email":"neuromaxed@gmail.com"}],"homepage":"https://github.com/appx-org/appx-agent#readme","bugs":{"url":"https://github.com/appx-org/appx-agent/issues"},"dist":{"shasum":"7ea5fd5b5cc70df46c0b11f2e5716c4842da020d","tarball":"https://registry.npmjs.org/@appx-org/agent-client/-/agent-client-0.1.7.tgz","fileCount":105,"integrity":"sha512-/jX/VPu/eVSXavQwPpZQIlLdUcNn4ua8U2JQUICy9XVirMM/Xaw0qjAQ2MgrgAtb7vsylTSn2geS1BBHGV21TA==","signatures":[{"sig":"MEQCIEzRfGbeE6PxCLOfUtmyX8lq3LtUCRMeVf0MJk3Qc1A7AiBnDaza9pf9YNu9Se+6xlUVYQ+7rsu8tzmHkL1kXMU5Xg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@appx-org%2fagent-client@0.1.7","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":526669},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles.css":"./src/styles.css"},"gitHead":"3add2469e79f42f4dbb7f71bae6994d017a402a9","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build -w @appx-org/agent-protocol && npm run build","prebuild":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58e087ec-88f3-425b-92b9-274867c0f9ac"}},"repository":{"url":"git+https://github.com/appx-org/appx-agent.git","type":"git","directory":"packages/agent-client"},"_npmVersion":"11.16.0","description":"Customizable React UI for the appx agent-server (chat, sessions, tool calls, model/thinking controls). Transport-agnostic and themeable.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"24.18.0","dependencies":{"marked":"^18.0.0","dompurify":"^3.3.3","openapi-fetch":"^0.17.0","react-virtuoso":"^4.18.7","@appx-org/agent-protocol":"0.1.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^25.0.1","react":"^19.2.4","vitest":"^2.1.9","react-dom":"^19.2.4","typescript":"~5.9.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/agent-client_0.1.7_1786104631146_0.7116756944896849","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@appx-org/agent-client","version":"0.2.0","license":"MIT","_id":"@appx-org/agent-client@0.2.0","maintainers":[{"name":"neuromaxer","email":"neuromaxed@gmail.com"}],"homepage":"https://github.com/appx-org/appx-agent#readme","bugs":{"url":"https://github.com/appx-org/appx-agent/issues"},"dist":{"shasum":"c61847ff5136c144c1b7bb5b0535cc8b92ba3561","tarball":"https://registry.npmjs.org/@appx-org/agent-client/-/agent-client-0.2.0.tgz","fileCount":105,"integrity":"sha512-/ahdgdlTWnrgq0TvWlw3xqElRySiFBt/nK9cR5Nupoo0aa27uen9HwPfj0oVQy5jEUOgzjVEC7rpnzytfpV1VQ==","signatures":[{"sig":"MEUCIQC3Gj953pVN+vE+WnAqTECNSypiDOjLGZ/POUU9Ip8YNQIgbduR3Uyy3ZTt9XgJMd4Z5HPTY1If5RB94Tyt8/3upmI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@appx-org%2fagent-client@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":526669},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles.css":"./src/styles.css"},"gitHead":"ba565bfad6f49b75d16cfb05c12b347bde80728a","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build -w @appx-org/agent-protocol && npm run build","prebuild":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58e087ec-88f3-425b-92b9-274867c0f9ac"}},"repository":{"url":"git+https://github.com/appx-org/appx-agent.git","type":"git","directory":"packages/agent-client"},"_npmVersion":"11.16.0","description":"Customizable React UI for the appx agent-server (chat, sessions, tool calls, model/thinking controls). Transport-agnostic and themeable.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"24.18.0","dependencies":{"marked":"^18.0.0","dompurify":"^3.3.3","openapi-fetch":"^0.17.0","react-virtuoso":"^4.18.7","@appx-org/agent-protocol":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^25.0.1","react":"^19.2.4","vitest":"^2.1.9","react-dom":"^19.2.4","typescript":"~5.9.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/agent-client_0.2.0_1786114263788_0.7416895734790321","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@appx-org/agent-client","version":"0.2.1","license":"MIT","_id":"@appx-org/agent-client@0.2.1","maintainers":[{"name":"neuromaxer","email":"neuromaxed@gmail.com"}],"homepage":"https://github.com/appx-org/appx-agent#readme","bugs":{"url":"https://github.com/appx-org/appx-agent/issues"},"dist":{"shasum":"6abb033dbd7fcccc061df8ccfbd59c22b12015e2","tarball":"https://registry.npmjs.org/@appx-org/agent-client/-/agent-client-0.2.1.tgz","fileCount":105,"integrity":"sha512-E8EYfeyvGsd141eUNgTvDTXh+h2xeiropCf8r5j2dAgUhZw7uqchQTHy9GUyS25/689zw+LD8egm8G2nghLrbw==","signatures":[{"sig":"MEYCIQCPNBG7Xc25dhB7IeN2lgpupzKpd/PnOJQKrJTTFW6r4QIhAOQLrPg0o93Tgm8xg3FzMI+EialwJbLFR4Eb5UtlNDKI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@appx-org%2fagent-client@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":526669},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles.css":"./src/styles.css"},"gitHead":"f47ba8516ceb98f57df69b0c90404d4003982933","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","prepack":"npm run build -w @appx-org/agent-protocol && npm run build","prebuild":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58e087ec-88f3-425b-92b9-274867c0f9ac"}},"repository":{"url":"git+https://github.com/appx-org/appx-agent.git","type":"git","directory":"packages/agent-client"},"_npmVersion":"11.16.0","description":"Customizable React UI for the appx agent-server (chat, sessions, tool calls, model/thinking controls). Transport-agnostic and themeable.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"24.18.0","dependencies":{"marked":"^18.0.0","dompurify":"^3.3.3","openapi-fetch":"^0.17.0","react-virtuoso":"^4.18.7","@appx-org/agent-protocol":"0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^25.0.1","react":"^19.2.4","vitest":"^2.1.9","react-dom":"^19.2.4","typescript":"~5.9.3","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2"},"peerDependencies":{"react":">=18","react-dom":">=18"},"_npmOperationalInternal":{"tmp":"tmp/agent-client_0.2.1_1786125224401_0.7490954842955404","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@appx-org/agent-client","version":"0.3.0","description":"Customizable React UI for the appx agent-server (chat, sessions, tool calls, model/thinking controls). Transport-agnostic and themeable.","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/appx-org/appx-agent.git","directory":"packages/agent-client"},"publishConfig":{"access":"public"},"sideEffects":["*.css"],"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./styles.css":"./src/styles.css"},"scripts":{"prebuild":"node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"","build":"tsc -p tsconfig.json","prepack":"npm run build -w @appx-org/agent-protocol && npm run build","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json --noEmit","test":"vitest run","test:watch":"vitest"},"peerDependencies":{"react":">=18","react-dom":">=18"},"dependencies":{"@appx-org/agent-protocol":"0.3.0","dompurify":"^3.3.3","marked":"^18.0.0","openapi-fetch":"^0.17.0","react-virtuoso":"^4.18.7"},"devDependencies":{"@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/react":"^19.2.14","@types/react-dom":"^19.2.3","jsdom":"^25.0.1","react":"^19.2.4","react-dom":"^19.2.4","typescript":"~5.9.3","vitest":"^2.1.9"},"gitHead":"9c4769eaaeff8e5dbe047bc235981d56a64e55e5","_id":"@appx-org/agent-client@0.3.0","bugs":{"url":"https://github.com/appx-org/appx-agent/issues"},"homepage":"https://github.com/appx-org/appx-agent#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-sNMidu+YH3hbSZ2s1S5fFVQ3wzELnTe2xD2c63tJvrmWQdNK2Cg5x2sz2/Q+idEEICWNYpg7W/DyPkugTIGrig==","shasum":"cee87879e0e94fd4cff85a920f8fcdd707905d6b","tarball":"https://registry.npmjs.org/@appx-org/agent-client/-/agent-client-0.3.0.tgz","fileCount":111,"unpackedSize":553493,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@appx-org%2fagent-client@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDN0F6QscTEb8Fke0fBKqkjXVGnkcA4ivnsEqhRhxODvAIgTb01JQA3MbymCF/f5Cxfsgn4qY6uKXxaNjdOgabBXlo="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:58e087ec-88f3-425b-92b9-274867c0f9ac"}},"directories":{},"maintainers":[{"name":"neuromaxer","email":"neuromaxed@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-client_0.3.0_1787250304493_0.6506777283096612"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T12:06:13.649Z","modified":"2026-08-20T18:25:04.997Z","0.1.5":"2026-08-06T12:06:14.203Z","0.1.6":"2026-08-06T12:32:04.945Z","0.1.7":"2026-08-07T12:10:31.472Z","0.2.0":"2026-08-07T14:51:03.925Z","0.2.1":"2026-08-07T17:53:44.555Z","0.3.0":"2026-08-20T18:25:04.662Z"},"bugs":{"url":"https://github.com/appx-org/appx-agent/issues"},"license":"MIT","homepage":"https://github.com/appx-org/appx-agent#readme","repository":{"type":"git","url":"git+https://github.com/appx-org/appx-agent.git","directory":"packages/agent-client"},"description":"Customizable React UI for the appx agent-server (chat, sessions, tool calls, model/thinking controls). Transport-agnostic and themeable.","maintainers":[{"name":"neuromaxer","email":"neuromaxed@gmail.com"}],"readme":"# @appx-org/agent-client\n\n> **Do not use `0.1.0`.** That tarball shipped without `dist/`, so every import\n> fails to resolve. Install `0.1.1` or later.\n\nA customizable React UI for the [appx **agent-server**](../agent-server)\n— streaming chat, session management, tool-call cards, extension-UI prompts, and\nmodel/thinking controls. Transport-agnostic and themeable, so the same package\npowers different apps (lanquest, quest, appx, …) with project-specific styling\nand layout.\n\nLives in the **appx-agent monorepo** next to [agent-server](../agent-server)\nand [@appx-org/agent-protocol](../agent-protocol) (the published contract this\npackage's types come from). Consumers depend on it by version from the\nregistry (CI/prod), and link it locally for live editing during development\n(see **Local development across repos** below).\n\n## Install\n\n```\nnpm i @appx-org/agent-client\n```\n\nPublished to the public npm registry — no `.npmrc` scope mapping and no auth\ntoken. Peer deps: `react >=18`, `react-dom >=18`.\n\n> Versions up to and including `0.1.4` were published to GitHub Packages, which\n> required a token even though the package is public. From `0.1.5` onward the\n> packages come from `registry.npmjs.org`; if you still carry an\n> `@appx-org:registry=https://npm.pkg.github.com` line, delete it.\n\n## Local development across repos\n\nThe package builds to `dist/` (`exports` → `dist`, types included) but still\nships `src/` in the tarball for source maps and IDE navigation. To edit it live\nfrom a sibling app (e.g. lanquest) without publishing, point the app at this\ncheckout with a `file:` dependency (run `npm run build` here after edits, or\n`tsc -w`):\n\n```jsonc\n// consumer app package.json (path relative to that package.json)\n\"@appx-org/agent-client\": \"file:../../../../appx-dir/appx-agent/packages/agent-client\"\n```\n\nBecause `react`/`react-dom` are **peer** deps, the consumer must dedupe React so\nthe symlink doesn't pull a second copy (which breaks hooks). In Vite:\n\n```ts\nresolve: { dedupe: ['react', 'react-dom'] }\n```\n\nEdits to `src/` are then picked up on the consumer's next build/HMR — no\nrepublish, no reinstall. For CI/prod, swap the `file:` spec back to a semver\nrange (`^0.1.0`).\n\n## Quick start\n\n```tsx\nimport { AgentChatProvider, AgentChat } from 'agent-client';\nimport 'agent-client/styles.css';\n\nexport function App() {\n  return (\n    <AgentChatProvider config={{ baseUrl: '/agent', pathPrefix: '/v1' }}>\n      <AgentChat projectId=\"my-project\" />\n    </AgentChatProvider>\n  );\n}\n```\n\n`baseUrl` + `pathPrefix` point at the agent-server `/v1` contract. Use the\nagent-server origin directly (`baseUrl: 'http://127.0.0.1:4001'`) or, recommended,\na same-origin reverse proxy that mirrors `/v1` (so the bearer token and cookies\nstay server-side — see lanquest's backend).\n\n## Architecture\n\nTwo layers:\n\n- **`core/`** (framework-agnostic) — `AgentClient` (configurable transport,\n  backed by [`openapi-fetch`](https://openapi-ts.dev/openapi-fetch/) so request\n  bodies, path params, and response types are inferred from the contract),\n  `SessionStore` (shared SSE pool + reducer dispatch), and the pure\n  `sessionReducer` that turns SSE events / REST history into `UiMessage[]`.\n  Contract types come from\n  [`@appx-org/agent-protocol`](../agent-protocol) — **generated** from\n  agent-server's `openapi.json`, never hand-written — and are re-exported via\n  `core/types.ts` alongside the UI-derived types.\n- **`react/`** — `AgentChatProvider` (DI for client + store + theme),\n  `useAgentSession` / `useAgentSessions` hooks, and components: `AgentChat`, `ChatPanel`,\n  `SessionList`, `ToolCallCard`, `ExtensionRequestPanel`, `Markdown`.\n\n## Regenerating the agent-server types\n\nThe REST DTOs and the SSE event/message types (`WireEvent`, `ToolCall`,\n`AssistantMessage`, …) come from `@appx-org/agent-protocol`, codegen'd from\nagent-server's `openapi.json`, so they stay in sync with the contract and\nthere's no field-name guessing in the reducer. After an agent-server contract\nchange, regenerate from the repo root:\n\n```bash\nnpm run gen:contract   # typia event schema → openapi.json → openapi-typescript types\n```\n\nIf a committed contract field changed, the generated types shift and\n`core/types.ts`, the reducer, or the `AgentClient` REST calls fail to compile —\nthe intended drift signal. Because the REST methods are typed against the\ngenerated `paths` via `openapi-fetch`, a changed response/param/body shape\nsurfaces directly at the call site (no hand-written return types to keep in\nsync). Run `npm run typecheck` to surface it. Every route also carries an\n`operationId`, so the generated `operations` map and any future SDK codegen get\nstable, human-readable names.\n\n## Customization\n\n1. **CSS variables** — every value resolves to an `--ac-*` custom property.\n   Re-theme by redefining them on a wrapper:\n   ```css\n   .agent-client-root { --ac-accent: #c084fc; --ac-bg: #1a1226; }\n   ```\n2. **`classNames` / `labels`** — pass per-slot class names and string overrides\n   to `AgentChatProvider`.\n3. **Render slots** — `ChatPanel` accepts `renderMessage`, `renderEmpty`,\n   `headerStart`, `showHeader`, `showModelControls`.\n4. **Composition** — for fully bespoke layouts, drop `AgentChat` and compose\n   `SessionList` + `ChatPanel`, or build directly on `useAgentSession` and\n   `useAgentSessions`.\n\n### Session workspace state\n\n`AgentChat` keeps selection and session-list visibility uncontrolled by default.\nThe list starts open and can be folded from the chat header. Hosts that need to\nremember workspace state can control it and persist it in their own preferred\nstore:\n\n```tsx\n<AgentChat\n  projectId=\"my-project\"\n  activeSessionId={activeSessionId}\n  onActiveSessionChange={setActiveSessionId}\n  sessionListOpen={sessionListOpen}\n  onSessionListOpenChange={setSessionListOpen}\n  onTurnComplete={refreshPreview}\n/>\n```\n\nThe package intentionally does not write `localStorage`: account scoping,\ncross-device persistence, and storage policy belong to the host application.\n\n## Client config\n\n```ts\ncreateAgentClient({\n  baseUrl?: string;        // default '' (same origin)\n  pathPrefix?: string;     // default '/v1'\n  headers?: HeadersInit | (() => HeadersInit | Promise<HeadersInit>);\n  fetch?: typeof fetch;\n  eventSourceFactory?: (url: string) => EventSourceLike;\n  onUnauthorized?: () => void;\n});\n```\n","readmeFilename":"README.md"}