{"id":"345f83ed-90e7-4fd0-a45c-6d33a7e1ce49","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis","name":"Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis","generatedAt":"2026-10-10T06:30:35.581Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T15:28:03.353Z","emptyReason":null},"description":"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 Skill: Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能 Owner: smyx-sunjinhui Summary: Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 Tags: latest:1.0.14 Version history: v1.0.14 | 2026-10-04T11:53:27.778Z | auto - Update","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2.4K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-infant-sleep-monitoring-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-infant-sleep-monitoring-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-infant-sleep-monitoring-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":68,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand t"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T15:28:03.353Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T15:28:03.353Z","emptyReason":null},"stars":null,"forks":null,"downloads":2393,"packageName":null,"latestVersion":"1.0.14","tractionLabel":"2.4K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T15:28:03.328Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T15:28:03.353Z","lastCrawledAt":"2026-10-09T15:28:03.328Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T15:28:03.328Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.14","createdAt":"2026-10-04T11:53:27.778Z","changelog":"- Updated version to 1.0.19 in SKILL.md. - Removed skill-card.md from the project. - No changes to core features or interface—only documentation and file cleanup.","fileCount":31,"zipByteSize":38484},{"version":"1.0.13","createdAt":"2026-09-23T08:24:35.484Z","changelog":"- Updated SKILL.md: version bumped from 1.0.17 to 1.0.18 with minor content changes and clarifications. - Updated configuration in skills/smyx_common/scripts/config.yaml. - Removed the legacy documentation file skill-card.md.","fileCount":31,"zipByteSize":38665},{"version":"1.0.12","createdAt":"2026-09-15T08:20:29.689Z","changelog":"- Updated skill version to 1.0.17. - SKILL.md revised with minor text and version updates. - Removed skill-card.md file. - No functional or capability changes detected; documentation and metadata updated.","fileCount":31,"zipByteSize":38573},{"version":"1.0.11","createdAt":"2026-08-29T20:08:34.500Z","changelog":"- Updated version to 1.0.14 in documentation. - Removed the file skill-card.md. - No other functional or behavioral changes documented.","fileCount":31,"zipByteSize":38673},{"version":"1.0.10","createdAt":"2026-08-17T02:30:33.668Z","changelog":"- Version updated from 1.0.11 to 1.0.12. - Documentation updates in SKILL.md, including latest usage guidelines and clarifications. - Internal file skills/smyx_common/scripts/config.yaml modified. - Obsolete file skill-card.md removed.","fileCount":31,"zipByteSize":38635},{"version":"1.0.9","createdAt":"2026-08-10T23:44:33.750Z","changelog":"- Removed the file: skill-card.md. - No changes to features or functionality. - Documentation and usage remain unchanged.","fileCount":31,"zipByteSize":38714},{"version":"1.0.8","createdAt":"2026-08-04T19:20:37.329Z","changelog":"- Updated skill version to 1.0.11 in metadata. - Removed the file skill-card.md. - No user-facing feature or functionality changes.","fileCount":31,"zipByteSize":38607},{"version":"1.0.7","createdAt":"2026-07-28T08:48:32.769Z","changelog":"- Version bumped from 1.0.7 to 1.0.10. - Updated SKILL.md documentation. - Removed skill-card.md file.","fileCount":31,"zipByteSize":38702}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-infant-sleep-monitoring-analysis","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T06:30:35.577Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-infant-sleep-monitoring-analysis/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T15:28:03.353Z","emptyReason":null},"readme":"Skill: Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n\nOwner: smyx-sunjinhui\n\nSummary: Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\n\nTags: latest:1.0.14\n\nVersion history:\n\nv1.0.14 | 2026-10-04T11:53:27.778Z | auto\n\n- Updated version to 1.0.19 in SKILL.md.\n- Removed skill-card.md from the project.\n- No changes to core features or interface—only documentation and file cleanup.\n\nv1.0.13 | 2026-09-23T08:24:35.484Z | auto\n\n- Updated SKILL.md: version bumped from 1.0.17 to 1.0.18 with minor content changes and clarifications.\n- Updated configuration in skills/smyx_common/scripts/config.yaml.\n- Removed the legacy documentation file skill-card.md.\n\nv1.0.12 | 2026-09-15T08:20:29.689Z | auto\n\n- Updated skill version to 1.0.17.\n- SKILL.md revised with minor text and version updates.\n- Removed skill-card.md file.\n- No functional or capability changes detected; documentation and metadata updated.\n\nv1.0.11 | 2026-08-29T20:08:34.500Z | auto\n\n- Updated version to 1.0.14 in documentation.\n- Removed the file skill-card.md.\n- No other functional or behavioral changes documented.\n\nv1.0.10 | 2026-08-17T02:30:33.668Z | auto\n\n- Version updated from 1.0.11 to 1.0.12.\n- Documentation updates in SKILL.md, including latest usage guidelines and clarifications.\n- Internal file skills/smyx_common/scripts/config.yaml modified.\n- Obsolete file skill-card.md removed.\n\nv1.0.9 | 2026-08-10T23:44:33.750Z | auto\n\n- Removed the file: skill-card.md.\n- No changes to features or functionality.\n- Documentation and usage remain unchanged.\n\nv1.0.8 | 2026-08-04T19:20:37.329Z | auto\n\n- Updated skill version to 1.0.11 in metadata.\n- Removed the file skill-card.md.\n- No user-facing feature or functionality changes.\n\nv1.0.7 | 2026-07-28T08:48:32.769Z | auto\n\n- Version bumped from 1.0.7 to 1.0.10.\n- Updated SKILL.md documentation.\n- Removed skill-card.md file.\n\nv1.0.6 | 2026-07-17T11:48:28.793Z | auto\n\ninfant-sleep-monitoring-analysis 1.0.7\n\n- Version incremented from 1.0.6 to 1.0.7.\n- Documentation updated in SKILL.md; version badge and minor content tweaks.\n- The auxiliary file skill-card.md was removed.\n- Internal utilities updated in util.py (details not shown).\n- No changes to core features or user workflow.\n\nv1.0.5 | 2026-07-09T10:48:28.376Z | auto\n\nsmyx-infant-sleep-monitoring-analysis v1.0.5\n\n- Removed the skill-card.md file.\n- Updated the scripts/config.py file.\n- No changes to the core logic or user experience documented.\n\nv1.0.4 | 2026-07-02T14:33:31.308Z | auto\n\n**v1.0.4 changelog:**\n\n- Refined user experience: removed any requirement for users to provide or view open-id/identity information, now handled automatically and internally.\n- Simplified workflow: users only provide video/image input, all identity association happens system-side.\n- Updated documentation to reflect new privacy/security constraints and clearer operation steps.\n- Expanded Markdown formatting including demo links and improved output examples.\n- Removed legacy files (skill-card.md, duplicate api_service.py) for codebase cleanup.\n\nv1.0.3 | 2026-05-27T20:37:42.728Z | auto\n\n- Major refactor: split code base into new module `skills/smyx_analysis` and removed unused `skills/face_analysis` components.\n- Updated and simplified configuration and script structure for better maintainability.\n- Tightened video attachment and open-id handling (now saves attachments locally; open-id collection flow unchanged).\n- Reduced maximum supported video file size in documentation from 100MB to 10MB.\n- Updated SKILL.md usage and process descriptions to reflect new file paths and refined workflows.\n- No core feature changes to sleep monitoring functionality or report output.\n\nv1.0.1 | 2026-05-03T18:11:01.406Z | auto\n\n- Updated internal scripts and configuration files in the skill, including config.py and YAML configuration files.\n- No user-facing feature or behavior changes.\n- Documentation and usage instructions remain unchanged.\n\nv1.0.0 | 2026-04-16T12:41:54.261Z | auto\n\nInitial release of the infant sleep monitoring and analysis skill.\n\n- Identifies sleep states (deep sleep, light sleep, awake, restlessness) from nursery monitoring videos.\n- Generates daily sleep reports and sleep schedule analysis to help parents understand their baby's sleep patterns.\n- Enforces strict rules: all history queries must use the cloud API; reading from any local or long-term memory is strictly forbidden.\n- Includes structured report output with sleep duration stats, state change curves, and parenting recommendations.\n- Implements mandatory user identity (open-id) checks before processing, with clear prompts when missing.\n- Automatically displays historical report lists as Markdown tables with clickable report links.\n\nArchive index:\n\nArchive v1.0.14: 31 files, 38484 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2142b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (157b)\n\nFile v1.0.14:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.19\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.14:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1791114807778\n}\n\nFile v1.0.14:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.14:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.14:scripts/config.yaml\n\n{}\n\nFile v1.0.14:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.14:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.14:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.14:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.14:skill-card.md\n\n## Description:\n\nAnalyzes infant sleep media to identify sleep states and provide sleep reports and routine insights for caregivers.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents and caregivers use this skill to analyze infant sleep recordings, review sleep-state summaries and daily reports, and examine past reports. Results are for parenting reference, not a substitute for pediatric advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Private infant sleep recordings are uploaded to lifeemergence.com services for analysis.\n\nMitigation: Review the service's data handling and use only recordings you are comfortable uploading.\n\nRisk: A persistent local/cloud identity can be created or reused without explicit per-use notice.\n\nMitigation: Confirm which identity is used before processing family media; remove local data or tokens after testing with private recordings.\n\nRisk: History queries can retrieve cloud reports without clear per-use control.\n\nMitigation: Avoid history queries until you understand which account or default identity they access.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis)\n- [Skill API documentation](artifact/references/api_doc.md)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Guidance]\n\n**Output Format:** [Structured report or Markdown table with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save results to a local file; reports are for parenting reference, not medical advice.]\n\n## Skill Version(s):\n\n1.0.14 (source: ClawHub release; bundled SKILL.md says 1.0.19)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.14:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.14:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.13: 31 files, 38665 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2516b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (157b)\n\nFile v1.0.13:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.18\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.13:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.13\",\n  \"publishedAt\": 1790151875484\n}\n\nFile v1.0.13:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.13:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.13:scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.13:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.13:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.13:skill-card.md\n\n## Description:\n\nIdentifies infant sleep states such as deep sleep, light sleep, waking, and restlessness, then generates sleep reports and schedule analysis to help caregivers understand sleep patterns.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, caregivers, and agents use this skill to analyze infant sleep monitoring media, classify sleep states, generate structured daily reports, and retrieve prior sleep analysis reports. It is for parenting insight and does not replace pediatric medical advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Infant room media and derived sleep reports are sent to a configured cloud service.\n\nMitigation: Use only media you are authorized to process, confirm the service's retention and access controls, and avoid real family data unless those controls meet your requirements.\n\nRisk: The skill can silently create or reuse identity records and store tokens locally.\n\nMitigation: Review local data storage, token handling, and report-history isolation before deployment, especially on shared agent workspaces.\n\nRisk: Sleep analysis can be mistaken for medical guidance.\n\nMitigation: Treat outputs as parenting reference material only and consult a pediatric clinician for abnormal sleep behavior or health concerns.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis)\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui)\n- [API documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, files, guidance]\n\n**Output Format:** [Structured text or JSON; historical report lists may be presented as Markdown; optional output files contain the returned report text.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Accepts local video files or public media URLs; documented local formats are mp4, avi, and mov with a 10 MB size limit.]\n\n## Skill Version(s):\n\n1.0.13 (source: server release metadata; artifact frontmatter reports 1.0.18)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.13:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.13:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.12: 31 files, 38573 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2396b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (157b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.17\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1789460429689\n}\n\nFile v1.0.12:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.12:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.12:scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.12:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.12:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nIdentifies infant sleep states from monitoring images or videos and generates structured sleep reports, schedule analysis, recommendations, and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and caregivers can use this skill to analyze infant sleep monitoring footage, classify sleep states such as deep sleep, light sleep, waking, and restlessness, and review generated daily sleep reports. The skill also supports querying prior cloud-hosted sleep analysis reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles infant videos and identity data through cloud APIs.\n\nMitigation: Confirm the publisher documents where child videos and reports are uploaded, retained, and deleted before using sensitive nursery footage.\n\nRisk: The security evidence flags plaintext development endpoints and non-production endpoint configuration.\n\nMitigation: Confirm the release is configured for production HTTPS endpoints before installation or deployment.\n\nRisk: The security evidence flags persistent local token storage.\n\nMitigation: Confirm local token storage has been removed, encrypted, or otherwise secured before use.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis)\n- [API Interface Documentation](references/api_doc.md)\n- [SMYX Analysis API Documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and JSON-like structured text with report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save analysis output to a user-specified file path; local video inputs are limited to mp4, avi, or mov files up to 10 MB.]\n\n## Skill Version(s):\n\n1.0.12 (source: server release metadata; artifact frontmatter reports 1.0.17)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.12:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.12:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.11: 31 files, 38673 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2589b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (157b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1788034114500\n}\n\nFile v1.0.11:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.11:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.11:scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.11:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.11:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nIdentifies infant sleep states such as deep sleep, light sleep, waking, and restlessness, then generates structured sleep reports and routine analysis for caregivers.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nCaregivers and agents assisting caregivers use this skill to analyze infant sleep-monitoring videos or URLs, classify sleep states, summarize sleep timing and wake events, and retrieve prior cloud-hosted reports. Its outputs are for parenting reference and should not replace professional medical advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill sends baby-monitor videos or URLs and report-history requests to lifeemergence.com services.\n\nMitigation: Use only media and URLs intended for this service, and verify the publisher's privacy, retention, and data-handling practices before installation.\n\nRisk: The skill creates or reuses a local identity and stores profile or token data in local files and SQLite-backed records.\n\nMitigation: Run it in an isolated workspace, protect the workspace data directory, and remove local identity or token stores when access is no longer needed.\n\nRisk: Sleep-state analysis may be incomplete, incorrect, or unsuitable for clinical decisions.\n\nMitigation: Treat results as parenting reference only and consult a pediatric professional for abnormal sleep patterns or health concerns.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [Infant sleep monitoring API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, configuration, guidance]\n\n**Output Format:** [Markdown text with structured JSON analysis content and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports local video files or video URLs for analysis, optional output file writing, and cloud report-list retrieval.]\n\n## Skill Version(s):\n\n1.0.11 (source: server release metadata; artifact frontmatter says 1.0.14)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.11:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.11:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.10: 31 files, 38635 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2435b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (472b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (157b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1786933833668\n}\n\nFile v1.0.10:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.10:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.10:scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.10:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.10:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: dev\n\nFile v1.0.10:skill-card.md\n\n## Description:\n\nIdentifies sleep states like deep sleep, light sleep, waking, and restlessness, and generates daily sleep reports and schedule analysis to help parents understand a baby's sleep patterns.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and caregiving workflows use this skill to analyze infant sleep-monitoring videos or video URLs, classify sleep states, retrieve cloud report history, and return structured sleep reports for parenting reference. The output should not be treated as medical advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Baby-monitoring videos or video URLs may be sent to the lifeemergence.com backend.\n\nMitigation: Use the skill only after explicit user confirmation, especially before processing real household or child footage.\n\nRisk: The skill can create or reuse an internal account identity and query cloud report history.\n\nMitigation: Make the account and report-history behavior clear to users and provide a deletion or reset path before production use.\n\nRisk: Reusable authentication tokens may be stored in a local workspace SQLite database.\n\nMitigation: Protect the workspace, restrict access to local data files, and define token deletion or rotation procedures.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API interface documentation](references/api_doc.md)\n- [Analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Files, Guidance]\n\n**Output Format:** [Markdown and JSON text with report links, plus an optional saved result file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Accepts local video files or video URLs; documented formats are mp4, avi, and mov up to 10 MB.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release evidence; artifact frontmatter reports 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.10:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.10:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.9: 31 files, 38714 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2693b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1786405473750\n}\n\nFile v1.0.9:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.9:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.9:scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.9:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.9:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nIdentifies sleep states like deep sleep, light sleep, waking, and restlessness, then generates daily sleep reports and schedule analysis to help parents understand a baby's sleep patterns.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, caregivers, and agents assisting them use this skill to analyze infant sleep-monitoring video or video URLs, classify sleep states, and retrieve structured daily reports or historical report lists. The output is for parenting reference and should not replace professional medical advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill handles highly sensitive infant sleep videos or video URLs through lifeemergence.com cloud services.\n\nMitigation: Use only videos the user is authorized to analyze, avoid unnecessary identifying context, and confirm the provider's retention, deletion, account-linkage, and access-control practices before use.\n\nRisk: The skill silently creates or reuses a locally persisted backend identity and may link report history to that identity.\n\nMitigation: Use separate trusted workspaces for different families or accounts, clear persisted identity data when appropriate, and avoid shared machines unless account-linkage behavior is acceptable.\n\nRisk: Sleep-state analysis can be mistaken for medical assessment.\n\nMitigation: Treat generated reports as parenting reference only and consult a pediatric clinician for sleep abnormalities or health concerns.\n\n## Reference(s):\n\n- [ClawHub skill release page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, guidance]\n\n**Output Format:** [Markdown or JSON text with structured sleep-analysis results, historical report lists, and report export links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include cloud-generated report links; local file inputs are limited to mp4, avi, or mov videos up to 10 MB.]\n\n## Skill Version(s):\n\n1.0.9 (source: ClawHub release metadata; artifact frontmatter reports 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.9:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.9:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.8: 31 files, 38607 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2387b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1785871237329\n}\n\nFile v1.0.8:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.8:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.8:scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.8:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.8:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nIdentifies infant sleep states such as deep sleep, light sleep, waking, and restlessness, then generates daily sleep reports and schedule analysis to help caregivers understand sleep patterns.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents, caregivers, and developers can use this skill to analyze infant sleep-monitoring videos or URLs, classify sleep states, generate structured reports, and query prior cloud reports. Results are for parenting reference and should not replace professional medical advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Infant sleep videos or video URLs may be sent to LifeEmergence cloud services for analysis.\n\nMitigation: Use the skill only with appropriate consent and data-handling approval, and avoid submitting unnecessary or highly sensitive footage.\n\nRisk: Report-history prompts can trigger cloud report queries tied to the current identity.\n\nMitigation: Review prompts before execution and use the skill only in workspaces where automatic cloud history lookup is acceptable.\n\nRisk: The skill can create or reuse a local identity and store session tokens in a workspace SQLite database.\n\nMitigation: Run it in an isolated workspace or account and clear local session data when access should no longer persist.\n\n## Reference(s):\n\n- [API interface documentation](references/api_doc.md)\n- [Analysis API error-code documentation](skills/smyx_analysis/references/api_doc.md)\n- [LifeEmergence skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Analysis, Markdown, JSON, Files]\n\n**Output Format:** [Markdown report or JSON output, with optional saved result file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include sleep-state results, schedule analysis, recommendations, report links, and historical report tables.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; SKILL.md frontmatter reports 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.8:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.8:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.7: 31 files, 38702 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2775b), SKILL.md (9690b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1785228512769\n}\n\nFile v1.0.7:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.7:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.7:scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.7:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.7:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.7:skill-card.md\n\n## Description: <br>\nIdentifies infant sleep states from baby-room monitoring media and generates structured sleep reports, schedule analysis, history listings, and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal caregivers and agents use this skill to analyze infant sleep monitoring images, videos, or URLs for sleep state classification, sleep timing, wake counts, daily reports, and schedule insights. Developers may also use its CLI workflow to query cloud-hosted historical reports. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill sends baby-room media, image or video URLs, and report queries to cloud services. <br>\nMitigation: Install and run it only when the provider is trusted to process infant-monitoring media and sleep-report history. <br>\nRisk: The skill silently creates or reuses an identity and may keep reusable identity or token records in the local workspace. <br>\nMitigation: Review local workspace storage and token handling before use, and clear persisted identity or token records when they are no longer needed. <br>\nRisk: Sleep analysis results are for caregiver reference and may be unsuitable as medical advice. <br>\nMitigation: Treat reports as informational and consult a pediatric clinician for abnormal infant sleep patterns or health concerns. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis) <br>\n- [Publisher Profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n- [Infant Sleep Monitoring API Documentation](artifact/references/api_doc.md) <br>\n- [Shared Analysis API Error Codes](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Files] <br>\n**Output Format:** [Markdown and JSON-like structured text, with optional saved output files] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can return sleep analysis, historical report listings, and report export links; artifact documentation states mp4, avi, and mov inputs up to 10 MB.] <br>\n\n## Skill Version(s): <br>\n1.0.7 (source: server release metadata; artifact frontmatter reports 1.0.10) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.7:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.7:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.6: 31 files, 38618 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2401b), SKILL.md (9689b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28776b), _meta.json (156b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1784288908793\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.6:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.6:scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.6:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.6:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.6:skill-card.md\n\n## Description: <br>\nIdentifies infant sleep states such as deep sleep, light sleep, waking, and restlessness, then generates structured sleep reports and schedule analysis. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and agents use this skill to analyze baby sleep monitoring video or image inputs, classify sleep states, summarize sleep timing and awakenings, and retrieve prior cloud reports. Results are for parenting reference and are not a substitute for professional medical advice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Baby-monitoring media, media URLs, and identifiers are processed by a cloud service. <br>\nMitigation: Use only when the publisher's privacy and retention practices are acceptable, and avoid submitting unrelated or highly sensitive media. <br>\nRisk: The skill may automatically create or reuse account identity and store authentication tokens in the workspace data directory. <br>\nMitigation: Run in a controlled workspace, protect or clear stored tokens according to local policy, and avoid sharing the workspace with untrusted users. <br>\nRisk: Cloud report history can be queried by the skill. <br>\nMitigation: Use history retrieval only when the user expects prior report access and the account context is appropriate. <br>\n\n\n## Reference(s): <br>\n- [API Interface Documentation](references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands] <br>\n**Output Format:** [Markdown text with JSON analysis content, history lists, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May write an optional output file when requested; supports mp4, avi, and mov inputs up to 10 MB.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release evidence; packaged SKILL.md frontmatter reports 1.0.7) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.6:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.6:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.5: 31 files, 38572 bytes\n\nFiles: references/api_doc.md (680b), scripts/__init__.py (31b), scripts/config.py (663b), scripts/config.yaml (3b), scripts/infant_sleep_monitoring_analysis.py (3358b), scripts/skill.py (573b), skill-card.md (2682b), SKILL.md (9689b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (156b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参数 | 由脚本静默接收并使用 |\n| 上游系统未提供内部身份参数 | 脚本会自动复用本地缺省用户 |\n| 本地缺省用户不存在 | 脚本会自动创建并在后续任务中复用 |\n| 对用户输出 | 只展示分析进度、分析结果和报告链接，不展示内部身份值 |\n\n#### 🔒 关键约束\n\n| 禁止/要求 | 说明 |\n|---|---|\n| 🚫 不得询问身份 | 不得提示用户输入用户名、手机号或任何内部身份参数 |\n| 🚫 不得暴露身份值 | 不得在回复、报告、示例、错误提示中暴露内部身份值 |\n| 🚫 不得列为用户参数 | 不得把内部身份参数列为用户需要理解或传入的参数 |\n| ✅ 自动关联报告 | 历史报告查询同样由系统内部身份自动关联，用户只需表达“查看历史报告/报告清单”等意图 |\n\n---\n\n### 🧪 标准流程 | Standard Flow\n\n| 步骤 | 阶段 | 执行动作 |\n|---:|---|---|\n| 1 | 📥 准备婴儿床监控视频输入 | 提供本地文件路径或网络 URL；确保输入内容清晰、符合技能场景要求 |\n| 2 | 🔐 系统自动完成身份关联 | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行婴儿睡眠状态监测分析 | 调用 `-m scripts.infant_sleep_monitoring_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--list` | 显示历史婴儿睡眠监测分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/infant_sleep_monitoring_analysis.py`](scripts/infant_sleep_monitoring_analysis.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 🐍 必要脚本 | [`scripts/config.py`](scripts/config.py) | 调用 API、执行分析或查询历史报告 | 执行分析或查询时使用 |\n| 📘 领域参考 | [`references/api_doc.md`](references/api_doc.md) | 了解 API 接口规范、字段说明和错误码 | 仅在需要了解接口规范或错误码时读取 |\n\n## ⚠️ 注意事项 | Notes\n| 分类 | 注意事项 |\n|---|---|\n| 📚 文档读取 | 仅在需要时读取参考文档，保持上下文简洁 |\n| 📁 格式支持 | 支持格式：mp4/avi/mov，最大 10MB |\n| 🧑‍⚖️ 结果性质 | **⚠️ 重要提示**：本分析结果仅供育儿参考，不能替代专业医护建议，宝宝睡眠异常请咨询儿科医生 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网路地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1783594108376\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析\n\nFile v1.0.5:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.5:scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.5:skills/smyx_common/scripts/config-dev.yaml\n\nApiEnum:\n  base-url-open-api: \"http://192.168.1.234:9601/smyx-open-api\"\n  base-url-open-h5: \"http://192.168.1.234:4100\"\n  base-url-health: \"http://192.168.1.234:7070/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config-test.yaml\n\nApiEnum:\n  base-url-open-api: \"https://livemonitortest.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitortest.lifeemergence.com\"\n  base-url-health: \"https://healthtest.lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: true\n\nFile v1.0.5:skills/smyx_common/scripts/config.yaml\n\nApiEnum:\n  api-key: null\n  api-secret-key: null\n  base-url-health: https://lifeemergence.com/jeecg-boot-xzgz\n  base-url-open-api: https://open.lifeemergence.com/smyx-open-api\n  base-url-open-h5: http://livemonitor.lifeemergence.com\n  database-url: null\nConstantEnum:\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: XIAN_ZHAO_GAN_ZHI\n  default--skill-platform-name: ARK_CLAW\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret: null\n  is-debug: false\nenv: prod\n\nFile v1.0.5:skill-card.md\n\n## Description: <br>\nIdentifies infant sleep states from monitoring media, generates daily sleep reports, and supports cloud lookup of prior sleep analysis reports. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nParents, caregivers, and family-support agents use this skill to analyze baby sleep monitoring videos or URLs, understand sleep states and routines, and retrieve previous sleep report records. The analysis is for parenting reference and is not a substitute for pediatric medical advice. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Baby-monitoring media, URLs, report metadata, and account-linked identifiers are sent to the Life Emergence cloud service. <br>\nMitigation: Use only with media that users are comfortable sharing with that provider, review the provider's privacy and retention terms before installation, and avoid sensitive nursery footage unless necessary. <br>\nRisk: The skill can automatically create or reuse account-linked identity values and tokens, and the workspace data directory may contain those sensitive values. <br>\nMitigation: Treat the workspace data directory as sensitive, restrict access to it, and rotate or remove stored credentials when the skill is no longer needed. <br>\nRisk: Sleep analysis output may be incomplete or unsuitable for medical decisions. <br>\nMitigation: Use results only as parenting reference and consult a pediatric medical professional for abnormal sleep patterns or health concerns. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-infant-sleep-monitoring-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [API documentation](references/api_doc.md) <br>\n- [smyx_analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, guidance] <br>\n**Output Format:** [Markdown text and JSON report data with report export links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May save the generated report content to a file when an output path is provided.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.5:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.5:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能 Owner: smyx-sunjinhui Summary: Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 Tags: latest:1.0.14 Version history: v1.0.14 | 2026-10-04T11:53:27.778Z | auto - Update","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.infant_sleep_monitoring_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.infant_sleep_monitoring_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地婴儿房监控视频\npython -m scripts.infant_sleep_monitoring_analysis --input /path/to/night_monitor.mp4\n\n# 分析网络监控视频\npython -m scripts.infant_sleep_monitoring_analysis --url https://example.com/night.mp4\n\n# 显示历史监测报告/显示监测报告清单列表/显示历史睡眠监测（自动触发关键词：查看历史监测报告、历史报告、监测报告清单等）\npython -m scripts.infant_sleep_monitoring_analysis --list\n\n# 输出精简报告\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.infant_sleep_monitoring_analysis --input night_monitor.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"infant-sleep-monitoring-analysis\"\ndescription: \"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律\"\nversion: \"1.0.19\"\nlicense: \"MIT-0\"\n---\n\n# 😴 Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **婴儿睡眠状态监测技能** |\n| 🎯 核心目标 | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `INFANT_SLEEP_MONITORING` |\n\nUtilizing high-sensitivity sensing technology, this feature conducts refined monitoring of infant sleep cycles,\nprecisely distinguishing between different states such as deep sleep, light sleep, awakening, and restlessness. The\nsystem automatically records full-night sleep data and, through intelligent algorithms, generates visualized daily sleep\nreports and in-depth routine analysis. This not only helps parents intuitively understand their baby's sleep quality but\nalso assists them in mastering the baby's circadian rhythms, thereby scientifically adjusting schedules and cultivating\nhealthy sleep habits.\n\n本功能利用高灵敏度传感技术，对婴儿的睡眠周期进行精细化监测，能够精准区分熟睡、浅睡、苏醒及躁动等不同状态。系统会自动记录全晚的睡眠数据，通过智能算法生成可视化的每日睡眠报告与深度作息分析。这不仅能帮助家长直观了解宝宝的睡眠质量，更能辅助其掌握宝宝的生物钟规律，从而科学地调整作息安排，培养宝宝良好的睡眠习惯\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n\n### 1. 🧩 技能用途\n\n通过婴儿房夜间监控视频分析，识别宝宝不同睡眠状态：熟睡、浅睡、苏醒、躁动\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 睡眠状态分类 |\n| 2 | 睡眠时间统计 |\n| 3 | 觉醒次数统计 |\n| 4 | 生成睡眠报告 |\n| 5 | 作息规律分析 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供婴儿睡眠监控视频需要分析睡眠状态时，默认触发本技能 |\n| 🔎 明确分析意图 | 当用户明确需要婴儿睡眠监测、睡眠状态分析时，提及睡眠监测、宝宝睡眠、睡眠报告、作息分析等关键词，并且上传了监控视频 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看历史睡眠报告、睡眠监测报告清单、监测报告列表、查询历史监测报告、显示所有监测报告、睡眠分析报告，查询婴儿睡眠监测分析报告 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.infant_sleep_monitoring_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.infant_sleep_monitoring_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 📸 监测要求 | Monitoring Requirements\n| 要求项 | 说明 |\n|---|---|\n| 摄像头固定位置 | ，覆盖婴儿床整体区域 |\n| 夜视/红外功能正常 | ，关灯后宝宝轮廓清晰可见 |\n| 婴儿床无过多杂物遮挡 | ，保证宝宝身体姿态完整可见 |\n\n## 🚀 操作步骤 | Workflow\n### 🔐 用户身份处理（内部自动完成）\n\n> **绿色安全原则：** 用户身份参数由系统内部自动处理，**不得向用户展示、询问或要求输入任何身份标识**。\n\n执行本技能分析或历史报告查询时，脚本会自动完成身份初始化：\n\n| 场景 | 系统行为 |\n|---|---|\n| 上游系统有内部身份参"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-infant-sleep-monitoring-analysis\",\n  \"version\": \"1.0.14\",\n  \"publishedAt\": 1791114807778\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放婴儿睡眠监测分析 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/ai-analysis/v2/start-common-ai-analysis` - 启动AI分析任务\n2. `/web/ai-analysis/v2/get-common-ai-analysis-result` - 获取分析结果\n3. `/web/ai-analysis/page-common-ai-analysis-result` - 分页查询历史报告\n4. `/ai/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `OPEN_INFANT_SLEEP_MONITORING_ANALYSIS` - 开放平台婴儿睡眠监测分析"},{"path":"skills/smyx_analysis/references/api_doc.md","content":"# API接口文档\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 请求格式：支持文件上传\n- 响应格式：JSON\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |"},{"path":"scripts/config.yaml","content":"{}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 Skill: Baby Sleep State Monitoring Skill | 婴儿睡眠状态监测技能 Owner: smyx-sunjinhui Summary: Identifies sleep states like deep sleep, light sleep, waking, and restlessness. Generates daily sleep reports and schedule analysis to help parents understand their baby's sleep patterns. | 婴儿睡眠状态监测技能，识别熟睡、浅睡、苏醒、躁动不同睡眠状态，生成每日睡眠报告和作息分析，帮助家长掌握宝宝睡眠规律 Tags: latest:1.0.14 Version history: v1.0.14 | 2026-10-04T11:53:27.778Z | auto - Update","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":830,"uniquenessScore":50,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T15:28:03.353Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T15:28:03.353Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:30:35.581Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}