{"_id":"@54cheriwen/agent-light","name":"@54cheriwen/agent-light","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@54cheriwen/agent-light","version":"0.1.0","description":"Local adapter and configuration station for Agent Status Light.","type":"module","bin":{"agent-light":"bin/agent-light.js"},"publishConfig":{"access":"public"},"scripts":{"start":"node src/server/index.js","test":"node --test","dev":"node src/server/index.js --port 8787"},"engines":{"node":">=20"},"keywords":["agent-status-light","claude-code","hooks","web-serial","esp32"],"author":{"name":"Cheri Wen"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/CheriWen/RGYLight-ClaudeHook.git","directory":"app"},"bugs":{"url":"https://github.com/CheriWen/RGYLight-ClaudeHook/issues"},"homepage":"https://github.com/CheriWen/RGYLight-ClaudeHook#readme","_id":"@54cheriwen/agent-light@0.1.0","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-CcmDQTrKDfWWD8A7kK9lBKvsn6RKDsuMjfbFZtQ4krJc5HBrAkDbC18nfMYJyHELr2DuqrrASj24vxfAg47Kog==","shasum":"8cc95e6c361a5d80b7d2f1d2834321e685bb4a62","tarball":"https://registry.npmjs.org/@54cheriwen/agent-light/-/agent-light-0.1.0.tgz","fileCount":15,"unpackedSize":40114,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA6NtFD/UxZlfiGPLeY69OAqit3yRpjJgKShzHrfPBW0AiEAgzLpVBn+XbMGdgZrNqh9NBQSFcsilBb8OmhLcwll0qI="}]},"_npmUser":{"name":"54cheriwen","email":"cheri8014@163.com"},"directories":{},"maintainers":[{"name":"54cheriwen","email":"cheri8014@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-light_0.1.0_1783674508367_0.12162305165610765"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-10T09:08:28.242Z","0.1.0":"2026-07-10T09:08:28.518Z","modified":"2026-07-10T09:08:28.736Z"},"maintainers":[{"name":"54cheriwen","email":"cheri8014@163.com"}],"description":"Local adapter and configuration station for Agent Status Light.","homepage":"https://github.com/CheriWen/RGYLight-ClaudeHook#readme","keywords":["agent-status-light","claude-code","hooks","web-serial","esp32"],"repository":{"type":"git","url":"git+https://github.com/CheriWen/RGYLight-ClaudeHook.git","directory":"app"},"author":{"name":"Cheri Wen"},"bugs":{"url":"https://github.com/CheriWen/RGYLight-ClaudeHook/issues"},"license":"MIT","readme":"# Agent Status Light\r\n\r\nLocal adapter and browser control station for an Agent Status Light. It receives Claude Code hook events, aggregates the current agent state, maps that state to a light pattern, and exposes both HTTP/SSE APIs and Web Serial controls for an ESP32 light device.\r\n\r\n## Requirements\r\n\r\n- Node.js 20 or newer\r\n- Chrome or Edge for browser Web Serial controls\r\n- A local Agent Status Light firmware device running at 115200 baud\r\n\r\nPhysical LED validation is deferred until GPIO4/GPIO5/GPIO6 have current-limiting resistors installed.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install -g @54cheriwen/agent-light\r\n```\r\n\r\nThis package is currently publish-prepared but still marked private in development until the first release is intentionally published.\r\n\r\n## Start the local adapter\r\n\r\n```bash\r\nagent-light server --host 127.0.0.1 --port 8787\r\n```\r\n\r\nThen open:\r\n\r\n```text\r\nhttp://127.0.0.1:8787\r\n```\r\n\r\nThe browser page shows the current aggregate state, the mapped light preview, Claude Code hook controls, and manual Web Serial `LIGHT ...` command buttons.\r\n\r\n## Check adapter state\r\n\r\n```bash\r\nagent-light state --url http://127.0.0.1:8787\r\n```\r\n\r\nA state response includes both the aggregate state and the canonical light pattern:\r\n\r\n```json\r\n{\r\n  \"state\": \"running\",\r\n  \"light\": {\r\n    \"color\": \"yellow\",\r\n    \"mode\": \"blink\",\r\n    \"intervalMs\": 500\r\n  }\r\n}\r\n```\r\n\r\n## Claude Code hooks\r\n\r\nInstall user-level Claude Code hooks that send lifecycle events to the local adapter:\r\n\r\n```bash\r\nagent-light hooks install --url http://127.0.0.1:8787\r\n```\r\n\r\nCheck status:\r\n\r\n```bash\r\nagent-light hooks status\r\n```\r\n\r\nRemove the managed hooks:\r\n\r\n```bash\r\nagent-light hooks remove\r\n```\r\n\r\nThe managed hook commands are fire-and-forget and exit successfully even when the local adapter is unavailable, so they do not block Claude Code.\r\n\r\n## Manual events\r\n\r\nSend an adapter event manually:\r\n\r\n```bash\r\nagent-light event --source manual --session demo --state running --url http://127.0.0.1:8787\r\n```\r\n\r\nSupported states are:\r\n\r\n```text\r\ndisconnected\r\nidle\r\ndone\r\nrunning\r\nwaiting_user\r\nerror\r\n```\r\n\r\n## Light mapping\r\n\r\nThe adapter maps states to canonical light patterns:\r\n\r\n| State | Light |\r\n| --- | --- |\r\n| `idle` | green solid |\r\n| `done` | green blink 500ms |\r\n| `running` | yellow blink 500ms |\r\n| `waiting_user` | yellow solid |\r\n| `error` | red blink 500ms |\r\n| `disconnected` | red blink 1200ms |\r\n\r\nThe browser Web Serial controls send canonical firmware commands such as:\r\n\r\n```text\r\nLIGHT yellow blink 500\r\nLIGHT green solid\r\nLIGHT red blink 1200\r\n```\r\n","readmeFilename":"README.md","_rev":"1-694a54bc16d29e46b6136531c0d10ad2"}