{"_id":"@azhi-ss/feishu-remote","name":"@azhi-ss/feishu-remote","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@azhi-ss/feishu-remote","version":"0.1.0","description":"Feishu Remote Bridge transport for Pi-compatible agents","type":"module","license":"MIT","keywords":["pi-package","pi-extension","feishu","lark"],"repository":{"type":"git","url":"git+https://github.com/Azhi-ss/feishu-agent.git","directory":"packages/feishu-remote"},"publishConfig":{"access":"public"},"pi":{"extensions":["./index.ts"]},"dependencies":{"@larksuiteoapi/node-sdk":"1.73.3"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"engines":{"node":">=22.19.0"},"gitHead":"a5addf70fed229e104af58ef21a3456b542a3562","_id":"@azhi-ss/feishu-remote@0.1.0","bugs":{"url":"https://github.com/Azhi-ss/feishu-agent/issues"},"homepage":"https://github.com/Azhi-ss/feishu-agent#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-jwj1M5M/ND1Vg0cjFdbWwotf2Bgr72i7dO/lJVz3JGyBl2WGnPNY6Tp83zcLVcQSMJv8I556EMq/Yl1Rh1tU+Q==","shasum":"147511662066c8798e19ece6942748a60a4e1167","tarball":"https://registry.npmjs.org/@azhi-ss/feishu-remote/-/feishu-remote-0.1.0.tgz","fileCount":7,"unpackedSize":56693,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCZvGJKrOXI+Yo9VYxyUfRfOACXrSJK6TXTRWWMkbkSKQIgHTHeSBkvl01NmbT57q6TJaG3YhgWnY2qgdFg/CiQpPg="}]},"_npmUser":{"name":"zorya156","email":"zengyu4815@gmail.com"},"directories":{},"maintainers":[{"name":"zorya156","email":"zengyu4815@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/feishu-remote_0.1.0_1788977079589_0.3522279545062863"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-09T18:04:39.432Z","0.1.0":"2026-09-09T18:04:39.724Z","modified":"2026-09-09T18:04:39.901Z"},"maintainers":[{"name":"zorya156","email":"zengyu4815@gmail.com"}],"description":"Feishu Remote Bridge transport for Pi-compatible agents","homepage":"https://github.com/Azhi-ss/feishu-agent#readme","keywords":["pi-package","pi-extension","feishu","lark"],"repository":{"type":"git","url":"git+https://github.com/Azhi-ss/feishu-agent.git","directory":"packages/feishu-remote"},"bugs":{"url":"https://github.com/Azhi-ss/feishu-agent/issues"},"license":"MIT","readme":"# @azhi-ss/feishu-remote\n\nA transport-only [Pi](https://www.npmjs.com/package/@earendil-works/pi-coding-agent)\nextension that lets the owner drive the active Pi session from a one-to-one\nFeishu/Lark bot chat. Replies stream back through a Card Kit card.\n\nIt provides `/remote`, the outbound WebSocket transport, owner-only inbound\nmessage filtering, turn queuing, and streaming-card delivery. It does not\ninclude Feishu Agent Skills, Mem0, or high-risk action policy.\n\n## Requirements\n\n- Node.js 22.19 or later\n- A self-built Feishu/Lark bot app with WebSocket event delivery enabled\n- The bot's App Secret in `FEISHU_REMOTE_APP_SECRET`\n- The App ID and owner `open_id`, resolved in one of these ways:\n  - an existing `lark-cli` config under `~/.lark-cli/config.json` or the XDG\n    config path; or\n  - `FEISHU_REMOTE_APP_ID` and `FEISHU_REMOTE_OWNER_OPEN_ID` when no\n    `lark-cli` config exists\n\nA present but invalid `lark-cli` config is treated as an error and does not\nfall back to environment identity.\n\n## Install\n\n```bash\npi install npm:@azhi-ss/feishu-remote\n```\n\nExport the secret for the Pi process. It is kept in memory and is never written\nto Pi settings or session files.\n\n```bash\nexport FEISHU_REMOTE_APP_SECRET=<app-secret>\npi\n```\n\nThen run:\n\n```text\n/remote start\n/remote switch\n/remote status\n/remote stop\n```\n\nSet `FEISHU_REMOTE=1` to opt into autostart for each interactive session.\nNormal Pi startup stays offline when this variable is unset.\n\n## Constraints\n\n- Only the configured owner's one-to-one chat can drive the session. Group\n  messages and other senders are ignored.\n- Do not run `lark-cli event consume` for the same app while the extension is\n  connected. Feishu load-balances events across concurrent consumers.\n- Two local sessions cannot share one bot app. The active window holds a\n  per-App-ID lock (JSON metadata: pid, start time, cwd) under\n  `$HOME/.cache/feishu-remote/`.\n- Switching which window answers the phone: in the new window run\n  `/remote switch`. It asks the holding window (via a short-lived yield file,\n  not signals) to stop, waits for the lock, then connects. A window that starts\n  while another holds the lock can either fail (`/remote start`) or, with\n  `FEISHU_REMOTE=1`, sit in `standby` and show the holder in its status line.\n- Session replacement (`/new`, resume, fork, or reload) closes the old bridge.\n  Start it again in the replacement session, or use `FEISHU_REMOTE=1`.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-2ffca35d37ef5e2fd03379e702237434"}