{"_id":"@aaronhan717/agent-rtb-client","name":"@aaronhan717/agent-rtb-client","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aaronhan717/agent-rtb-client","version":"0.1.0","description":"React + Tailwind component for agent-rtb: decisions, tasks, standups, business memory","type":"module","main":"./dist/AgentRTB.js","types":"./dist/AgentRTB.d.ts","exports":{".":{"types":"./dist/AgentRTB.d.ts","import":"./dist/AgentRTB.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json","test":"tsx --test test/*.test.ts test/*.test.tsx","prepublishOnly":"npm run build"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0"},"devDependencies":{"@types/node":"^22.0.0","@types/react":"^18.3.0","@types/react-dom":"^18.3.0","react":"^18.3.0","react-dom":"^18.3.0","tsx":"^4.19.0","typescript":"^5.6.0"},"_id":"@aaronhan717/agent-rtb-client@0.1.0","gitHead":"a64ea83a623c4d192bdbdcae9ebfcfe107b7b5be","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-HR32slLOFTzTQCdf5KRdyuRW9zuhS2+/kVGFjWfN4u8t5vIO8PWWFPoA5UbwkIwf4np1AhV2MX04EPqNQHu2Eg==","shasum":"c9f52ac2b4be281367e24dd33206ed09788456c2","tarball":"https://registry.npmjs.org/@aaronhan717/agent-rtb-client/-/agent-rtb-client-0.1.0.tgz","fileCount":122,"unpackedSize":513947,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDCxhaxWhBIBSvde4gsWYcrCpLaFtq1qw/4vJz9E8lrMwIgAzOMMxAs05wpBKvYlNolr49p65pgbgMr2uW3d/WCTLs="}]},"_npmUser":{"name":"aaronhan717","email":"aaronhan717@gmail.com"},"directories":{},"maintainers":[{"name":"aaronhan717","email":"aaronhan717@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-rtb-client_0.1.0_1788592431231_0.21409138225966684"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-05T07:13:51.069Z","0.1.0":"2026-09-05T07:13:51.389Z","modified":"2026-09-05T07:13:51.595Z"},"maintainers":[{"name":"aaronhan717","email":"aaronhan717@gmail.com"}],"description":"React + Tailwind component for agent-rtb: decisions, tasks, standups, business memory","readme":"# @aaronhan717/agent-rtb-client\n\nReact component for agent-rtb — the cofounders' brief, decision/task timeline, proposal review, insights, meeting journal, and search. Design: `docs/superpowers/specs/2026-08-29-agent-rtb-design.md`; server: `packages/rtb-server`.\n\n## Mount\n\n```tsx\nimport { AgentRTB } from '@aaronhan717/agent-rtb-client';\n\n<AgentRTB baseUrl=\"/api/rtb\" />             // theme follows prefers-color-scheme\n<AgentRTB baseUrl=\"/api/rtb\" theme=\"dark\" /> // forced\n```\n\n| Prop | Default | Meaning |\n|---|---|---|\n| `baseUrl` | — | the console's proxy to the agent-rtb service (`/api/rtb` → `https://agent-rtb-….run.app`) |\n| `headers` | — | extra headers on every request; the proxy normally adds `Authorization: Bearer …` and `X-Actor: encodeURIComponent(displayName)` itself |\n| `theme` | `system` | `light` / `dark` / `system` |\n| `pollMs` | `30000` | brief polling interval while a standup is open (paused while the tab is hidden) |\n\nThe proxy must forward `Authorization` and `X-Actor` (percent-encoded — header values cannot carry Chinese raw) and strip the `/api/rtb` prefix; the service has no path prefix.\n\nStyling is Tailwind utility classes: add the package's `dist` to the host's Tailwind sources (`@source \"../node_modules/@aaronhan717/agent-rtb-client/dist\";` in v4, or the content glob in v3). Verified against Tailwind 4 (the playground's version); v3.1+ should compile the same arbitrary-value classes but is unverified. Colors are CSS variables the component injects itself (`--rtb-*`), so no host configuration beyond the source line. No web fonts are loaded; the component uses the system CJK stack.\n\n## Develop\n\n`npm run dev:rtb-stack` from the repo root starts mongod, a fake LLM, the server against the seeded `agent-rtb-e2e` database, and the playground at `http://localhost:5182/rtb.html` (`?actor=阿伟` to act as another cofounder, `?theme=dark`). `FAKE_LLM_DELAY_MS=4000` slows extraction to see the progress state; `FAKE_LLM_FAIL=1` exercises the failure path.\n\n## Test\n\n    npm test           # node:test via tsx — pure modules, the API client against a stub fetch, every panel rendered to static markup\n    npm run typecheck\n    npm run build      # tsc → dist/ (ESM + d.ts)\n\nThe browser pass is agentic: `packages/skill/rtb-test-e2e/SKILL.md` (Playwright MCP + MongoDB MCP) over open → dispose → close → upload → extract → accept.\n\n## Layout\n\n`src/AgentRTB.tsx` (root: context, top bar, drawer stack, toasts, brief polling) · `api.ts` (typed client, `ApiError`) · `types.ts` (server mirrors) · `zh.ts` (every string; `errorText(code)`) · `dates.ts` (business-tz calendar) · `theme.ts` · `transitions.ts` (client mirror of allowed task transitions) · `hooks/usePagedList.ts` (the paged-list container hook shared by 审核/洞察/日志) · `ui/` (atoms, `TaskRow`) · `forms/` · `drawers/` · `views/` — each view is a fetching `XView` around a pure `XPanel`.\n","readmeFilename":"README.md","_rev":"1-369a9cefbccb6daaeeef4628e36e13b7"}