{"_id":"@aiopsv2/sdk","name":"@aiopsv2/sdk","dist-tags":{"latest":"2.2.1"},"versions":{"2.2.1":{"name":"@aiopsv2/sdk","version":"2.2.1","description":"AIOps Platform SDK — Integrate AI content generation, TTS, agent marketplace, and analytics into any Node.js application.","main":"index.js","types":"index.d.ts","publishConfig":{"access":"public"},"keywords":["aiops","ai","content","tts","agent","web3","oxachain"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/sftgroup/aiops-saas.git"},"engines":{"node":">=18"},"_id":"@aiopsv2/sdk@2.2.1","gitHead":"51c3dc920b4c46633cc551f997ef97331bffe383","bugs":{"url":"https://github.com/sftgroup/aiops-saas/issues"},"homepage":"https://github.com/sftgroup/aiops-saas#readme","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-weGVdSKYP6DkoPxLGqEdKdBwHuNhKVWAVE5c19mCpEqlpl6n+ExgLVwGoLa6JL/5laZbtkx0UL5XTZ9l8juPbA==","shasum":"c9a8c59bf840b546293fbd3d67cc7cf4a0562241","tarball":"https://registry.npmjs.org/@aiopsv2/sdk/-/sdk-2.2.1.tgz","fileCount":4,"unpackedSize":10311,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCRGsxTCjqr43Tl4qgAhzrJU2B8BD1lANzWQdUu0o5UXgIgCG0gnnzCv49jgIVu4fN7HwfN3g7m3l6+0CFxnbdURVc="}]},"_npmUser":{"name":"stevenwang000x","email":"apply.wang@hotmail.com"},"directories":{},"maintainers":[{"name":"stevenwang000x","email":"apply.wang@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_2.2.1_1787268914186_0.8995994587385414"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-20T23:35:14.076Z","2.2.1":"2026-08-20T23:35:14.341Z","modified":"2026-08-20T23:35:14.581Z"},"maintainers":[{"name":"stevenwang000x","email":"apply.wang@hotmail.com"}],"description":"AIOps Platform SDK — Integrate AI content generation, TTS, agent marketplace, and analytics into any Node.js application.","homepage":"https://github.com/sftgroup/aiops-saas#readme","keywords":["aiops","ai","content","tts","agent","web3","oxachain"],"repository":{"type":"git","url":"git+https://github.com/sftgroup/aiops-saas.git"},"bugs":{"url":"https://github.com/sftgroup/aiops-saas/issues"},"license":"MIT","readme":"# @aiopsv2/sdk\n\nAIOps 平台官方 SDK —— 用 Node.js 集成 AI 内容生成、TTS 语音合成、运营看板、Agent 市场与社媒账号管理等平台能力。\n\n## 安装\n\n```bash\nnpm install @aiopsv2/sdk\n```\n\n## 快速开始\n\n```js\nconst { AIOps } = require('@aiops/sdk');\n\nconst client = new AIOps({\n  baseUrl: 'https://aiops.0xainet.top', // 平台地址（本地开发可用 http://localhost:5290）\n  apiKey: 'sk-your-api-key',            // 平台签发的 API Key\n});\n\n// 生成社媒文案\nconst post = await client.content.generate('AI trends', 'twitter', 'professional');\nconsole.log(post);\n\n// 语音合成\nconst audio = await client.tts.synthesize('你好，欢迎使用 AIOps', 'zh-CN-XiaoxiaoNeural');\nconsole.log(audio);\n\n// 运营看板\nconst overview = await client.dashboard.overview();\nconsole.log(overview);\n```\n\n## API\n\n### content（内容）\n\n| 方法 | 说明 |\n|------|------|\n| `content.generate(topic, platform?, style?, opts?)` | 生成社媒文案（platform: twitter/instagram/xiaohongshu/linkedin/facebook/tiktok/poster；style: professional/casual/humorous/inspirational/technical/minimal） |\n| `content.list(params?)` | 内容列表（分页） |\n| `content.platforms()` | 支持的平台 |\n| `content.styles()` | 支持的写作风格 |\n| `content.get(id)` | 内容详情 |\n| `content.update(id, data)` | 更新内容 |\n| `content.delete(id)` | 删除内容 |\n\n### tts（语音合成）\n\n| 方法 | 说明 |\n|------|------|\n| `tts.synthesize(text, voice?, opts?)` | 文本转语音（80+ 神经音色） |\n| `tts.voices(language?)` | 音色列表（可按语言过滤） |\n| `tts.history(params?)` | 合成历史 |\n\n### dashboard（运营看板）\n\n| 方法 | 说明 |\n|------|------|\n| `dashboard.overview()` | 当日用量总览 |\n| `dashboard.quota()` | 配额 / 限额 |\n| `dashboard.trend(days?)` | 用量趋势（默认 30 天） |\n\n### agents（Agent 市场）\n\n| 方法 | 说明 |\n|------|------|\n| `agents.marketplace(params?)` | 搜索市场 |\n| `agents.list(params?)` | 我的 Agent 列表 |\n| `agents.get(id)` | Agent 详情 |\n| `agents.run(id, message, skillNames?)` | 运行 Agent |\n| `agents.clone(id)` | 克隆到工作区 |\n\n### accounts（社媒账号）\n\n| 方法 | 说明 |\n|------|------|\n| `accounts.list()` | 账号列表（含近 7 日发布统计） |\n| `accounts.connect(platform, credentials)` | 接入平台账号 |\n\n## 鉴权\n\n所有请求通过 `X-API-Key` 请求头发送。API Key 在平台面板（Operator 侧）生成，支持 scopes 限制（只读等）。\n\n> ⚠️ **只读约束**：只读 scope 的 Key 仅允许 GET 请求，写操作（`content.update` / `content.delete` / `agents.run` 等）会返回 403。请按实际用途申请对应 scopes。\n\n## MCP 接入（AI 助手）\n\n除 REST SDK 外，平台提供标准 MCP Server（stdio + SSE）：\n\n- **SSE（生产）**：`https://aiops.0xainet.top/mcp/sse`，请求头 `X-API-Key`\n- **stdio**：`node agent-bridge/mcp-server.js`（需 `AIOPS_API_URL` / `AIOPS_API_KEY` 环境变量）\n\n详细工具清单与客户端配置见 [docs/MCP_USAGE.md](docs/MCP_USAGE.md)。\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-6865260ca737b06ed29c418f0eaa7d25"}