{"_id":"@alemonjs/milky","_rev":"2-1d8b0f8e0562ac73a7634b60b01be283","name":"@alemonjs/milky","dist-tags":{"latest":"2.1.0-rc.1"},"versions":{"2.1.0-rc.0":{"name":"@alemonjs/milky","version":"2.1.0-rc.0","keywords":["alemonjs","milky"],"author":{"name":"lemonade"},"license":"MIT","_id":"@alemonjs/milky@2.1.0-rc.0","maintainers":[{"name":"ningmengchongshui","email":"ningmengchongshui@gmail.com"},{"name":"ts-yf","email":"liangzy1212@qq.com"},{"name":"smallv","email":"2330660495@qq.com"}],"homepage":"https://github.com/lemonade-lab/alemonjs#readme","bugs":{"url":"https://github.com/lemonade-lab/alemonjs/issues"},"dist":{"shasum":"98961e328bd564ca2eadfef4162180d1cd84aaef","tarball":"https://registry.npmjs.org/@alemonjs/milky/-/milky-2.1.0-rc.0.tgz","fileCount":25,"integrity":"sha512-JMbvLtf1SAdyumVJW76KwuJXRROa8WeXna+wtD6zXZphwyt8dhuXSLk1t490SWT7cRtyqM1aYfuFt+ulgFCGwg==","signatures":[{"sig":"MEUCIQC3pd4+N7UCYHfuZSaFFAIsOjdYbsyvCHlI2tPPNSttxAIgSGU56OyfcXObNEmwU3LdwCK0nhsJrUauNivV+ofexSo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":109145},"main":"lib/index.js","type":"module","types":"lib","exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js","require":"./lib/index.js"},"./desktop":"./lib/desktop.js","./package":"./package.json"},"gitHead":"ac49fc3e5dd6e218a8436c3e2644888f7dbcc1c4","scripts":{"build":"lvy build"},"_npmUser":{"name":"ningmengchongshui","email":"ningmengchongshui@gmail.com"},"alemonjs":{"config":[{"name":"host","type":"string","default":"127.0.0.1","required":false,"description":"Milky 协议端地址，可带 http:// 或 https://"},{"name":"port","type":"number","rules":[{"message":"端口必须为数字","pattern":"^[0-9]+$"},{"message":"端口范围必须在0~65535之间","pattern":"^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)$"}],"default":8080,"required":false,"description":"协议端 HTTP 端口"},{"name":"prefix","type":"string","default":"","required":false,"description":"路径前缀"},{"name":"connection","type":"string","rules":[{"message":"连接方式必须为 ws、sse 或 webhook","pattern":"^(ws|sse|webhook)$"}],"default":"ws","required":false,"description":"事件推送方式：ws / sse / webhook"},{"name":"access_token","type":"string","required":false,"description":"access_token"},{"name":"http_timeout","type":"number","default":15,"required":false,"description":"HTTP API 超时时间（秒）"},{"name":"heartbeat","type":"number","default":30,"required":false,"description":"WebSocket 心跳间隔（秒）"},{"name":"reconnect_interval","type":"number","default":10,"required":false,"description":"断线重连基础间隔（秒）"},{"name":"webhook_path","type":"string","default":"/milky","required":false,"description":"WebHook 接收路径"},{"name":"webhook_port","type":"number","rules":[{"message":"端口必须为数字","pattern":"^[0-9]+$"},{"message":"端口范围必须在0~65535之间","pattern":"^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)$"}],"default":17159,"required":false,"description":"WebHook 服务监听端口"}],"desktop":{"logo":"antd.RobotOutlined","command":[{"icon":"antd.RobotOutlined","name":"milky","command":"open.milky"}],"platform":[{"name":"milky"}],"sidebars":[{"icon":"antd.RobotOutlined","name":"milky","command":"open.milky"}]},"config-source":{"readme":"https://raw.githubusercontent.com/lemonade-lab/alemonjs/main/packages/milky/README.md","official":"https://milky.ntqqrev.org/","platform":"https://milky.ntqqrev.org/"}},"repository":{"url":"git+https://github.com/lemonade-lab/alemonjs.git","type":"git"},"_npmVersion":"lerna/10.0.0/node@v22.22.2+arm64 (darwin)","description":"milky","directories":{},"_nodeVersion":"22.22.2","dependencies":{"ws":"^8.18.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"peerDependencies":{"alemonjs":"^2.1.14"},"_npmOperationalInternal":{"tmp":"tmp/milky_2.1.0-rc.0_1786848075775_0.5444074624630784","host":"s3://npm-registry-packages-npm-production"}},"2.1.0-rc.1":{"_id":"@alemonjs/milky@2.1.0-rc.1","bugs":{"url":"https://github.com/lemonade-lab/alemonjs/issues"},"dist":{"shasum":"553462f3527b380cf500d91b0d6e75f40b1e5ad1","tarball":"https://registry.npmjs.org/@alemonjs/milky/-/milky-2.1.0-rc.1.tgz","fileCount":25,"integrity":"sha512-d1W+XzYHQ7vpnHSD1sWyv2H2nM6S5wjxPbIESyBY53Vx+S3ikpgobLk6BUhNEsarIvBEExNsTVFP9ijdl84g1w==","signatures":[{"sig":"MEUCIE6x2Kl9kGUcN4w16zNfJ5QHVusFpKDjXJCToUvujGO9AiEAtq82LpQih3s9vtWfKRpLUNU6mZjefB8ZuGNGk93MMHA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFYociax0YTq3/tn5DpB6OQlUcBHQFm+DffGEOZa4aOtAiBcLlAyw2tBlc9Xcyo5+A/qtxSZakFqy8SvYAOX+344Zw=="}],"unpackedSize":90652},"main":"lib/index.js","name":"@alemonjs/milky","type":"module","types":"lib","author":{"name":"lemonade"},"exports":{".":{"types":"./lib/index.d.ts","import":"./lib/index.js","require":"./lib/index.js"},"./desktop":"./lib/desktop.js","./package":"./package.json"},"gitHead":"a4d4fded0874b070e356e6a83b06bd3e474f9133","license":"MIT","scripts":{"build":"lvy build"},"version":"2.1.0-rc.1","_npmUser":{"name":"ningmengchongshui","email":"ningmengchongshui@gmail.com"},"alemonjs":{"config":[{"name":"host","type":"string","default":"127.0.0.1","required":false,"description":"Milky 协议端地址，可带 http:// 或 https://"},{"name":"port","type":"number","rules":[{"message":"端口必须为数字","pattern":"^[0-9]+$"},{"message":"端口范围必须在0~65535之间","pattern":"^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)$"}],"default":8080,"required":false,"description":"协议端 HTTP 端口"},{"name":"prefix","type":"string","default":"","required":false,"description":"路径前缀"},{"name":"connection","type":"string","rules":[{"message":"连接方式必须为 ws、sse 或 webhook","pattern":"^(ws|sse|webhook)$"}],"default":"ws","required":false,"description":"事件推送方式：ws / sse / webhook"},{"name":"access_token","type":"string","required":false,"description":"access_token"},{"name":"http_timeout","type":"number","default":15,"required":false,"description":"HTTP API 超时时间（秒）"},{"name":"heartbeat","type":"number","default":30,"required":false,"description":"WebSocket 心跳间隔（秒）"},{"name":"reconnect_interval","type":"number","default":10,"required":false,"description":"断线重连基础间隔（秒）"},{"name":"webhook_path","type":"string","default":"/milky","required":false,"description":"WebHook 接收路径"},{"name":"webhook_port","type":"number","rules":[{"message":"端口必须为数字","pattern":"^[0-9]+$"},{"message":"端口范围必须在0~65535之间","pattern":"^(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0)$"}],"default":17159,"required":false,"description":"WebHook 服务监听端口"}],"desktop":{"logo":"antd.RobotOutlined","command":[{"icon":"antd.RobotOutlined","name":"milky","command":"open.milky"}],"platform":[{"name":"milky"}],"sidebars":[{"icon":"antd.RobotOutlined","name":"milky","command":"open.milky"}]},"config-source":{"readme":"https://raw.githubusercontent.com/lemonade-lab/alemonjs/main/packages/milky/README.md","official":"https://milky.ntqqrev.org/","platform":"https://milky.ntqqrev.org/"}},"homepage":"https://github.com/lemonade-lab/alemonjs#readme","keywords":["alemonjs","milky"],"repository":{"url":"git+https://github.com/lemonade-lab/alemonjs.git","type":"git"},"_npmVersion":"lerna/10.0.0/node@v22.22.3+arm64 (darwin)","description":"milky","directories":{},"maintainers":[{"name":"ningmengchongshui","email":"ningmengchongshui@gmail.com"},{"name":"ts-yf","email":"liangzy1212@qq.com"},{"name":"smallv","email":"2330660495@qq.com"}],"_nodeVersion":"22.22.3","dependencies":{"ws":"^8.18.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"peerDependencies":{"alemonjs":"^2.1.108"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/milky_2.1.0-rc.1_1789787401845_0.7662117684333614"}}},"time":{"created":"2026-08-16T02:41:15.587Z","modified":"2026-09-19T03:10:02.134Z","2.1.0-rc.0":"2026-08-16T02:41:15.933Z","2.1.0-rc.1":"2026-09-19T03:10:01.933Z"},"bugs":{"url":"https://github.com/lemonade-lab/alemonjs/issues"},"author":{"name":"lemonade"},"license":"MIT","homepage":"https://github.com/lemonade-lab/alemonjs#readme","keywords":["alemonjs","milky"],"repository":{"url":"git+https://github.com/lemonade-lab/alemonjs.git","type":"git"},"description":"milky","maintainers":[{"name":"ningmengchongshui","email":"ningmengchongshui@gmail.com"},{"name":"ts-yf","email":"liangzy1212@qq.com"},{"name":"smallv","email":"2330660495@qq.com"}],"readme":"# @alemonjs/milky\n\nMilky 是新时代 QQ 机器人应用接口标准（HTTP / WebSocket / SSE / WebHook）。\n\n该适配器以官方 Milky IR（`@saltify/milky-protocol`）为准，事件与 API 字段请以 https://milky.ntqqrev.org/ 为准。\n\n## 配置示例\n\n```yaml\nmilky:\n  # 协议端地址，可带 http:// 或 https://\n  host: '127.0.0.1'\n  # 协议端 HTTP 端口\n  port: 8080\n  # 路径前缀\n  prefix: ''\n  # 事件推送方式：ws / sse / webhook\n  connection: 'ws'\n  # access_token\n  access_token: ''\n  # HTTP API 超时时间（秒）\n  http_timeout: 15\n  # WebSocket 心跳间隔（秒）\n  heartbeat: 30\n  # 断线重连基础间隔（秒）\n  reconnect_interval: 10\n  # WebHook 接收路径\n  webhook_path: '/milky'\n  # WebHook 服务监听端口\n  webhook_port: 17159\n  # 使用 user_key\n  master_key:\n    - 'xxx'\n  # 使用 user_id\n  master_id:\n    - 'yyy'\n```\n\n## 说明\n\n- 事件连接：`ws` 连接 `/event` 的 WebSocket；`sse` 连接 `/event` 的 SSE；`webhook` 在本地监听 `webhook_path`。\n- API 调用：统一 `POST /api/<action>`，`Authorization: Bearer <access_token>`。\n- 消息段转换以官方 Milky IR 的 `IncomingSegment` / `OutgoingSegment` 为准。\n","readmeFilename":"README.md"}