{"id":"a6c58353-0d51-45f0-b8e8-de8dc535c4dd","entityType":"agent","slug":"clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi","name":"Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测","canonicalUrl":"https://www.xpersona.co/agent/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi","canonicalPath":"/agent/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi","generatedAt":"2026-10-10T07:43:02.611Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:40:05.126Z","emptyReason":null},"description":"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 2K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-outdoor-activity-monitor-analysis","sourceUrl":"https://clawhub.ai/18072937735/smyx-child-outdoor-activity-monitor-analysis","homepage":"https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/18072937735/smyx-child-outdoor-activity-monitor-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":66,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测 technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:40:05.126Z","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-09T21:40:05.126Z","emptyReason":null},"stars":null,"forks":null,"downloads":1969,"packageName":null,"latestVersion":"1.0.12","tractionLabel":"2K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T21:40:05.125Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T21:40:05.126Z","lastCrawledAt":"2026-10-09T21:40:05.125Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T21:40:05.125Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.12","createdAt":"2026-09-28T21:23:26.770Z","changelog":"- Removed the file: skill-card.md. - No changes to code or core functionality; only documentation file adjustment.","fileCount":31,"zipByteSize":41261},{"version":"1.0.11","createdAt":"2026-09-26T12:19:26.274Z","changelog":"- Removed the file `skill-card.md` to streamline documentation. - Updated `config.yaml` in `skills/smyx_common/scripts/`, reflecting configuration adjustments. - No changes to functionality or user-facing features. - Documentation in `SKILL.md` remains comprehensive and up to date.","fileCount":31,"zipByteSize":41241},{"version":"1.0.10","createdAt":"2026-08-28T22:33:28.733Z","changelog":"- Removed the file: skill-card.md - No changes to functionality or other documentation. - This update is limited to documentation cleanup.","fileCount":31,"zipByteSize":41393},{"version":"1.0.9","createdAt":"2026-08-19T19:34:28.895Z","changelog":"- Version update from 1.0.9 to 1.0.11. - Updated documentation and configuration files. - Removed redundant documentation file (skill-card.md). - No changes to core functionality.","fileCount":31,"zipByteSize":41489},{"version":"1.0.8","createdAt":"2026-08-09T18:39:44.094Z","changelog":"- Removed the file: skill-card.md - No changes to features or code logic. - Documentation and skill functionality remain unchanged.","fileCount":31,"zipByteSize":41422},{"version":"1.0.7","createdAt":"2026-08-06T00:00:31.454Z","changelog":"- Version bumped from 1.0.7 to 1.0.9. - Documentation (SKILL.md) updated; minor clarifications and maintenance. - skill-card.md file removed.","fileCount":31,"zipByteSize":41286},{"version":"1.0.6","createdAt":"2026-07-27T15:34:28.094Z","changelog":"- Version updated to 1.0.7. - Documentation updated: SKILL.md revised and skill-card.md removed. - No functional or logic changes; this release is a documentation/metadata update. - Outdated or redundant documentation files have been cleaned up.","fileCount":31,"zipByteSize":41411},{"version":"1.0.5","createdAt":"2026-07-18T07:52:31.934Z","changelog":"- Removed the file: skill-card.md. - No changes to features or code; documentation file cleanup only. - Version number remains 1.0.5 with no functional changes.","fileCount":31,"zipByteSize":41455}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-outdoor-activity-monitor-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17f8q65zg3y98t86jdg1177g583whq8:smyx-child-outdoor-activity-monitor-analysis` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/18072937735/smyx-child-outdoor-activity-monitor-analysis before using production credentials."],"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-18072937735-smyx-child-outdoor-activity-monitor-analysi/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/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-10T07:43:02.607Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-18072937735-smyx-child-outdoor-activity-monitor-analysi/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":"medium","updatedAt":"2026-10-09T21:40:05.126Z","emptyReason":null},"readme":"Skill: Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n\nOwner: 18072937735\n\nSummary: Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\n\nTags: latest:1.0.12\n\nVersion history:\n\nv1.0.12 | 2026-09-28T21:23:26.770Z | auto\n\n- Removed the file: skill-card.md.\n- No changes to code or core functionality; only documentation file adjustment.\n\nv1.0.11 | 2026-09-26T12:19:26.274Z | auto\n\n- Removed the file `skill-card.md` to streamline documentation.  \n- Updated `config.yaml` in `skills/smyx_common/scripts/`, reflecting configuration adjustments.  \n- No changes to functionality or user-facing features.  \n- Documentation in `SKILL.md` remains comprehensive and up to date.\n\nv1.0.10 | 2026-08-28T22:33:28.733Z | auto\n\n- Removed the file: skill-card.md\n- No changes to functionality or other documentation.\n- This update is limited to documentation cleanup.\n\nv1.0.9 | 2026-08-19T19:34:28.895Z | auto\n\n- Version update from 1.0.9 to 1.0.11.\n- Updated documentation and configuration files.\n- Removed redundant documentation file (skill-card.md).\n- No changes to core functionality.\n\nv1.0.8 | 2026-08-09T18:39:44.094Z | auto\n\n- Removed the file: skill-card.md\n- No changes to features or code logic.\n- Documentation and skill functionality remain unchanged.\n\nv1.0.7 | 2026-08-06T00:00:31.454Z | auto\n\n- Version bumped from 1.0.7 to 1.0.9.\n- Documentation (SKILL.md) updated; minor clarifications and maintenance.\n- skill-card.md file removed.\n\nv1.0.6 | 2026-07-27T15:34:28.094Z | auto\n\n- Version updated to 1.0.7.\n- Documentation updated: SKILL.md revised and skill-card.md removed.\n- No functional or logic changes; this release is a documentation/metadata update.\n- Outdated or redundant documentation files have been cleaned up.\n\nv1.0.5 | 2026-07-18T07:52:31.934Z | auto\n\n- Removed the file: skill-card.md.\n- No changes to features or code; documentation file cleanup only.\n- Version number remains 1.0.5 with no functional changes.\n\nv1.0.4 | 2026-07-10T12:33:41.558Z | auto\n\n- Version update from 1.0.4 to 1.0.5.\n- Updated internal scripts: config.py and util.py.\n- SKILL.md revised to reference new version.\n- Removed deprecated documentation file: skill-card.md.\n\nv1.0.3 | 2026-07-02T22:09:30.577Z | auto\n\nVersion 1.0.4\n\n- Updated version number to 1.0.4.\n- Removed unnecessary file: skill-card.md.\n- Various changes and maintenance updates applied to core script files (dao.py, util.py).\n- Documentation in SKILL.md updated to reflect version and content changes.\n\nv1.0.2 | 2026-06-27T12:52:26.043Z | auto\n\n**Summary: User-identity management is now fully internalized, making the skill easier and safer to use.**\n\n- User identity acquisition/handling moved entirely inside the scripts; users no longer need to supply or see any open-id or identity information.\n- Inputs and outputs streamlined: skill now only requires media input (video/file/URL), and all identity linkage is automatic.\n- Documentation updated: setup, workflow, usage examples, and constraints rewritten to reflect the new, transparent authentication approach.\n- Removed all prompts asking users for identity/account info; API and report queries strictly use internal parameters.\n- General documentation and script references improved for clarity and simplicity.\n\nv1.0.1 | 2026-06-18T05:18:29.875Z | auto\n\nv1.0.1\n\n- Refined and shortened the skill description for clarity and focus.\n- Updated open-id acquisition logic: primary config file path changed from 'skills/smyx_common/scripts/config.yaml' to 'scripts/config.yaml' within the skill directory.\n- Minor updates to documentation and instruction flow for improved usability.\n- Removed redundant documentation file 'skill-card.md'.\n- Added license information (MIT-0) to SKILL.md.\n\nv1.0.0 | 2026-05-26T13:01:10.097Z | auto\n\nsmyx-child-outdoor-activity-monitor-analysis v1.0.0\n\n- Initial release of skill for monitoring child outdoor activity based on fixed camera footage at balcony or home entrance.\n- Automatically detects child entries/exits, records timestamps, and accumulates total daily outdoor activity duration.\n- Issues reminders if daily outdoor activity falls below recommended threshold (default: 1 hour/day).\n- Generates automatic daily reports and pushes app reminders to parents if insufficient activity persists multiple days.\n- Requires open-id authentication for saving and retrieving historical reports; enforces privacy and consent best practices.\n- Can be integrated with smart cameras or family education apps as a practical child health management feature.\n\nArchive index:\n\nArchive v1.0.12: 31 files, 41261 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2272b), SKILL.md (13151b), 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 (164b)\n\nFile v1.0.12:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.12:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790630606770\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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: prod\n\nFile v1.0.12:skill-card.md\n\n## Description:\n\nAnalyzes fixed-camera footage of children entering and leaving a home or balcony to estimate daily outdoor time and provide activity reminders.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents and caregivers use fixed-camera videos or URLs to review a child's estimated outdoor time, activity reminders, and past reports. Results are visual estimates, not medical diagnoses or direct measurements of exercise.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Child and home entrance footage or video URLs are sent to LifeEmergence cloud services.\n\nMitigation: Get guardian and household consent, minimize clips, and confirm the service's retention and deletion practices before use.\n\nRisk: Reports are associated with a local or automatically created cloud-linked identity and token.\n\nMitigation: Review account and token handling, restrict access to reports, and use the service only when that identity linkage is acceptable.\n\nRisk: Doorway observations may be mistaken for actual exercise or used as health assessments.\n\nMitigation: Treat durations as visual estimates and reminders, not medical advice or measurements of exercise.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis)\n- [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, Files]\n\n**Output Format:** [Text or Markdown analysis reports and report links; optionally saved to a file]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include estimated outdoor duration, exit and return events, reminders, and cloud report history.]\n\n## Skill Version(s):\n\n1.0.12 (source: server-resolved ClawHub release; artifact frontmatter says 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.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, 41241 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2216b), SKILL.md (13151b), 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 (164b)\n\nFile v1.0.11:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.11:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.11\",\n  \"publishedAt\": 1790425166274\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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: prod\n\nFile v1.0.11:skill-card.md\n\n## Description:\n\nAnalyzes fixed home-entrance or balcony-door video to estimate a child's daily outdoor time from exit and return events and provide activity reminders.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nParents and caregivers use the skill to review estimated outdoor time and reminders for children using fixed doorway or balcony camera footage. They can also retrieve previous analysis reports.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Child and household entrance footage and report history are sent to a cloud service.\n\nMitigation: Obtain guardian consent and review the service's access controls, retention, and handling of exported reports before uploading real footage.\n\nRisk: The skill silently creates or reuses identity state and stores tokens.\n\nMitigation: Review account creation and token storage before installation; limit access to credentials and report history.\n\nRisk: Doorway events may misrepresent actual outdoor activity, especially for balcony visits or multiple children.\n\nMitigation: Treat reported time as an estimate, check ambiguous results, and avoid using it as a medical assessment.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis)\n- [Skill API reference](references/api_doc.md)\n- [Skill demonstration](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON]\n\n**Output Format:** [Structured analysis results or a Markdown table of historical reports with links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Estimated outdoor duration and reminders are based on observed door crossings, not measured exercise.]\n\n## Skill Version(s):\n\n1.0.11 (source: skill frontmatter and ClawHub release)\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, 41393 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2494b), SKILL.md (13151b), 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 (164b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787956408733\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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\nMonitors a fixed entrance or balcony camera feed to count child indoor/outdoor transitions, estimate daily outdoor activity duration, and generate structured activity alerts and reports.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal families, schools, kindergartens, and developers use this skill to analyze fixed entrance or balcony videos for child exit/return events, daily outdoor-time totals, threshold alerts, and historical report lookup.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive child and home entrance media, activity timestamps, report identifiers, and authentication material may be sent to remote services.\n\nMitigation: Use only with explicit guardian consent, confirm the remote service's data retention and deletion controls, and avoid submitting unnecessary identifying media.\n\nRisk: Packaged defaults include plaintext HTTP development endpoints and unclear account creation or token storage behavior.\n\nMitigation: Require HTTPS production endpoints, separate credentials from identity files, and review account and token handling before installation.\n\nRisk: Outdoor duration is based on visual entry and exit events and may not represent actual exercise or health status.\n\nMitigation: Treat reports as activity estimates only and keep medical or developmental decisions with qualified professionals.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis)\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, Code, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown summaries, JSON-style structured analysis, report links, and shell command examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May write analysis output to a user-specified file and list historical reports from the cloud API.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release; 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.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, 41489 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2865b), SKILL.md (13151b), 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 (163b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787168068895\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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: dev\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nMonitors fixed-camera footage at a home entrance or balcony door to count a child's indoor/outdoor transitions, estimate daily outdoor duration, and produce structured reminders when the configured activity target is not met.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to analyze home entrance or balcony-door video, summarize a child's outdoor-session counts and durations, and generate parent-facing activity reminders. It is intended for visual activity statistics and friendly reminders, not medical diagnosis or medical advice.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill may process sensitive video of children and home entrances.\n\nMitigation: Use it only with explicit guardian consent, confirm the video source is appropriate, and define retention and deletion expectations before analysis.\n\nRisk: Analysis may upload files or URLs and query cloud-hosted historical reports.\n\nMitigation: Confirm the configured service endpoints are trusted and approved before running analysis or history queries.\n\nRisk: The skill may silently manage an identity value and persist tokens locally.\n\nMitigation: Review local credential storage and account-linking behavior before installation, and clear stored tokens when the skill is no longer needed.\n\nRisk: Outdoor duration is inferred from door or balcony transitions and may not equal true exercise or time outdoors.\n\nMitigation: Treat the report as visual activity statistics and combine it with caregiver judgment; do not use it for medical diagnosis or medical advice.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n- [Child Outdoor Activity Monitoring API 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, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON-style structured analysis reports with optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include activity metrics, alert type and level, recommendations, report links, or a Markdown table of historical reports.]\n\n## Skill Version(s):\n\n1.0.9 (source: ClawHub release metadata; artifact frontmatter lists 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, 41422 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2608b), SKILL.md (13150b), 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 (163b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786300784094\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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\nAnalyzes fixed door or balcony camera media to estimate a child's indoor/outdoor transition events, daily outdoor duration, alert status, and report links.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal caregivers, schools, kindergartens, and child-health application developers can use this skill to analyze door or balcony camera footage for child outdoor-time tracking and friendly insufficient-activity reminders. It provides visual activity statistics and should not be used for medical diagnosis.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Child or household camera footage may be sent to configured LifeEmergence cloud services.\n\nMitigation: Use only with explicit guardian consent, avoid bystander or highly private footage, and keep captured media under approved retention and access controls.\n\nRisk: Cloud report history is tied to an automatically managed identity, and reusable service tokens may be stored locally.\n\nMitigation: Run the skill in a managed environment, review local credential and identity storage before installation, and remove stored tokens when access is no longer needed.\n\nRisk: Outdoor duration is inferred from door or balcony transition events and may not reflect actual exercise or health status.\n\nMitigation: Treat the report as a caregiver-facing activity signal, validate ambiguous results manually, and avoid using it as medical advice or diagnosis.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis)\n- [Child outdoor activity 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]\n\n**Output Format:** [Structured JSON or Markdown-style report text with optional saved output file and report export link]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can query cloud report history; results depend on configured cloud APIs, supported media size and format, and clear indoor/outdoor camera coverage.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata; artifact frontmatter reports 1.0.9)\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, 41286 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2360b), SKILL.md (13150b), 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 (163b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1785974431454\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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:\n\nMonitors fixed door or balcony camera footage to detect child exit and return events, compute daily outdoor-activity duration, and produce alerts when activity is below the configured recommendation.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[18072937735](https://clawhub.ai/user/18072937735)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to analyze authorized child door or balcony camera videos, generate structured outdoor-activity duration reports, and query prior reports from the configured cloud service.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Child and home camera footage is processed by the configured cloud service.\n\nMitigation: Use only with guardian consent, submit only authorized footage, and protect any generated report links or exported reports.\n\nRisk: The skill creates or reuses a local identity and can store access tokens in the workspace data directory.\n\nMitigation: Restrict access to the workspace data directory, avoid sharing it, and rotate or clear stored credentials when the workspace changes hands.\n\nRisk: Network video URL inputs can cause the cloud service to fetch externally hosted footage.\n\nMitigation: Provide only trusted, authorized video URLs and avoid arbitrary third-party links.\n\n## Reference(s):\n\n- [Child Outdoor Activity Duration Monitoring API Documentation](artifact/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis reports with optional report links and saved text output]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May query historical reports and may write an output file when requested.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; artifact frontmatter states 1.0.9)\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.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, 41411 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2735b), SKILL.md (13150b), 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 (163b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.7\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785166468094\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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>\nMonitors fixed-camera footage at a home entrance or balcony door to count a child's exits and returns, estimate daily outdoor duration, and produce insufficient-activity reminders. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nFamilies, schools, kindergartens, and developers building child health monitoring workflows use this skill to analyze entrance or balcony camera video and generate daily outdoor-duration reports and reminders. The output is based on visual door-transition events and should not be treated as medical advice or diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill handles child and home entrance or balcony video and may send it to the configured cloud service. <br>\nMitigation: Use only with explicit guardian consent, a clear retention and deletion plan, and privacy-preserving camera views where practical. <br>\nRisk: The skill can create or reuse persistent local identity state and stores authentication-related data locally. <br>\nMitigation: Review the local workspace data directory before deployment and treat the SQLite database and related local state as credentials. <br>\nRisk: Outdoor duration is estimated from door-transition events and does not prove actual exercise or health status. <br>\nMitigation: Review results as activity estimates only and avoid using the output for medical decisions or diagnosis. <br>\n\n\n## Reference(s): <br>\n- [API documentation](artifact/references/api_doc.md) <br>\n- [SMYX analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, guidance] <br>\n**Output Format:** [Markdown and JSON-like structured text with report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include daily duration metrics, event counts, alert type, recommended action, historical report tables, and export links.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata; artifact frontmatter and release changelog state 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, 41455 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2860b), SKILL.md (13150b), 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 (163b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1784361151934\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- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\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>\nAnalyzes fixed-camera doorway or balcony video to detect child exit and return events, estimate daily outdoor activity duration, and produce activity alerts and reports. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nFamilies, schools, kindergartens, and child-health application developers can use this skill to analyze doorway or balcony camera footage for child outdoor activity sessions, daily duration totals, and parent-facing reminders. It is intended for visual activity statistics and friendly reminders, not medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill sends sensitive child and home camera footage to cloud services and keeps account-linked report history. <br>\nMitigation: Use only with guardian consent, avoid private or internal URLs, and confirm that cloud processing and report retention match the deployment's privacy requirements. <br>\nRisk: The security assessment notes local storage of identity and authentication tokens. <br>\nMitigation: Limit installation to trusted environments and remove local workspace databases and tokens when the skill is no longer used. <br>\nRisk: Outdoor time estimates are based on doorway or balcony movement events and may not represent actual exercise or medical status. <br>\nMitigation: Treat outputs as visual activity statistics and reminders, and route health concerns to qualified professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [Child outdoor activity monitoring API documentation](artifact/references/api_doc.md) <br>\n- [SMYX analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown and JSON-style structured analysis reports, with optional shell commands for running analysis or listing historical reports.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Outputs may include detected events, daily duration totals, alert levels, recommendations, report links, and saved result files when requested.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: frontmatter and 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\n\nArchive v1.0.4: 31 files, 41625 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (3279b), SKILL.md (13150b), 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 (163b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783686821558\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童户外活动时长监测 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\n\nFile v1.0.4: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.4:scripts/config.yaml\n\n{}\n\nFile v1.0.4:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.4: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.4: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.4: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.4:skill-card.md\n\n## Description: <br>\nMonitors fixed door or balcony camera video to estimate a child's daily outdoor-activity duration from indoor/outdoor entry and return events, then returns structured activity metrics, reminders, and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and developers use this skill to analyze home entrance, balcony, or similar fixed-camera video for child entry/exit events, daily outdoor-session duration, insufficient-outdoor-activity alerts, and historical report lookup. It is intended for activity monitoring and caregiver reminders, not medical diagnosis. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Child and home entrance or balcony video, or a video URL, is sent to the publisher's remote analysis service. <br>\nMitigation: Use the skill only with clear guardian consent, avoid private footage when possible, and confirm the publisher's handling, retention, and deletion process before installation. <br>\nRisk: The skill can silently create or reuse an identity and store authentication tokens for report lookup. <br>\nMitigation: Prefer an explicit account and consent flow, review locally stored identity and token records, and verify how to delete reports and credentials. <br>\nRisk: Outdoor-activity duration is inferred from door or balcony transition events and may not represent actual exercise or health status. <br>\nMitigation: Treat results as caregiver-facing activity estimates and reminders only, and avoid using the output as medical advice or diagnosis. <br>\nRisk: Multiple children, similar appearances, unclear camera views, or missing indoor/outdoor regions can reduce result reliability. <br>\nMitigation: Use clear fixed-camera footage that covers both regions, define indoor and outdoor areas carefully, and review generated reports before acting on alerts. <br>\n\n\n## Reference(s): <br>\n- [Child Outdoor Activity Duration Monitoring API Documentation](artifact/references/api_doc.md) <br>\n- [Shared SMYX Analysis API Documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance] <br>\n**Output Format:** [Markdown text with structured JSON report content, status messages, and report links.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Supports basic, standard, or json detail levels and optional file output; analysis and history lookup use a remote API and may poll until results are ready.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: server release metadata; artifact frontmatter lists 1.0.5) <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.4:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.4:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.3: 31 files, 41181 bytes\n\nFiles: references/api_doc.md (3468b), scripts/__init__.py (58b), scripts/config.py (689b), scripts/config.yaml (3b), scripts/skill.py (579b), scripts/smyx_child_outdoor_activity_monitor_analysis.py (3660b), skill-card.md (2909b), SKILL.md (13150b), 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 (22801b), 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 (163b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 人体检测与跟踪 |\n| 2 | 儿童识别（结合身高/外观特征） |\n| 3 | 室内/户外两个 ROI 划分（indoor_region / outdoor_region） |\n| 4 | 区域进出事件识别（exit / return） |\n| 5 | 配对生成每次\"外出-归来\"会话 |\n| 6 | 累计每日总时长 + 会话次数 + 每次时长 |\n| 7 | 推荐值对比与达成率计算 |\n| 8 | 连续不足天数累计 |\n| 9 | 提醒类型分类（daily_outdoor_insufficient / multi_day_outdoor_insufficient / outdoor_goal_met / normal） |\n| 10 | 家长友好提醒文本生成 |\n\n### 3. ⚡ 触发条件\n\n| 触发类型 | 触发规则 |\n|---|---|\n| ✅ 默认触发 | **默认触发**：当用户提供阳台门/入户门口固定摄像头视频 URL 或文件需要分析时，默认触发本技能进行儿童户外活动时长监测 |\n| 🔎 明确分析意图 | 当用户明确提及儿童户外活动、近视预防、户外时间、骨骼发育、阳光时间、宝宝出门、家庭育儿健康等关键词，并且上传了视频文件 |\n| 📚 历史报告查询 | 当用户提及以下关键词时，**自动触发历史报告查询功能** ：查看儿童户外活动历史报告、户外时长报告清单、儿童出门记录清单、查询历史儿童户外活动记录、显示所有儿童户外活动报告、显示家庭育儿健康诊断报告，查询儿童户外活动不足预警清单 |\n\n### 4. 🤖 自动行为\n\n| 自动行为 | 执行要求 |\n|---|---|\n| 📎 附件处理 | 如果用户上传了附件或者视频/图片文件，则自动保存为本地文件 |\n| ☁️ 历史报告查询 | 如果用户触发历史报告查询关键词，必须直接调用云端 API 查询，不得从本地记忆或人工汇总中获取 |\n\n#### ⚠️ 强制数据获取规则（次高优先级）\n\n> **橙色强约束：** 历史报告清单只允许从云端接口读取，不允许从本地记录、长期记忆或人工汇总中提取。\n\n必须执行：\n\n```bash\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list` 调用 API 查询云端的历史报告数据 |\n| 🚫 严格禁止 | 从本地 `memory` 目录读取历史会话信息 |\n| 🚫 严格禁止 | 手动汇总本地记录中的报告 |\n| 🚫 严格禁止 | 从长期记忆中提取报告 |\n| ✅ 输出格式 | 必须统一从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果 |\n\n## 📦 前置准备 | Requirements\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\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.smyx_child_outdoor_activity_monitor_analysis` 处理输入（**必须在技能根目录下运行脚本**） |\n| 4 | 📊 查看分析结果 | 接收结构化分析报告，查看识别/监测结果、风险提示、建议与报告链接 |\n\n### ⚙️ 脚本参数说明\n\n| 参数 | 含义 | 备注 |\n|---|---|---|\n| `--input` | 本地阳台门/入户门口固定摄像头视频文件路径 | 适用于本地文件分析 |\n| `--url` | 网络阳台门/入户门口固定摄像头视频 URL 地址（API 服务自动下载） | API 服务自动下载网络资源 |\n| `--pet-type` | 类别标识，儿童健康成长场景默认 `other` | 按需填写 |\n| `--list` | 显示儿童户外活动时长监测历史分析报告列表清单（可以输入起始日期参数过滤数据范围） | 用于云端历史报告查询 |\n| `--api-url` | API 服务地址（可选，使用默认值） | 按需填写 |\n| `--detail` | 输出详细程度（basic/standard/json，默认 json） | 输出详细程度 |\n| `--output` | 结果输出文件路径（可选） | 可选 |\n\n## 🗂️ 资源索引 | Resource Index\n| 资源类型 | 路径 | 用途 | 何时读取 |\n|---|---|---|---|\n| 🐍 必要脚本 | [`scripts/smyx_child_outdoor_activity_monitor_analysis.py`](scripts/smyx_child_outdoor_activity_monitor_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| 🔎 使用提醒 | 短时间下楼丢垃圾、收快递（< 5 min）默认视为无效会话，可由调用方覆盖阈值 |\n| 🔏 隐私合规 | 隐私合规：家庭门口/阳台视频涉及未成年人隐私，使用前需取得监护人明确知情同意，妥善加密保管；建议优先采用人体轮廓模式 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783030170577\n}\n\nFile v1.0.3:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放儿童户外活动时长监测 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。\n\nFile v1.0.3: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.3:scripts/config.yaml\n\n{}\n\nFile v1.0.3:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.3: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.3: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.3: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.3:skill-card.md\n\n## Description: <br>\nAnalyzes fixed doorway or balcony camera video to detect child exit and return events, estimate daily outdoor activity duration, and produce structured reminders when activity is below the configured recommendation. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[18072937735](https://clawhub.ai/user/18072937735) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and integrators use this skill to connect fixed home, school, or kindergarten doorway camera footage to a child outdoor activity monitoring workflow. The agent returns event-based duration statistics, alerts, recommendations, and report links for family or education health-management scenarios. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive child and household camera video or video URLs are sent to the publisher's cloud service. <br>\nMitigation: Use the skill only after explicit guardian consent, review the publisher's privacy and retention terms, and avoid processing footage that does not need cloud analysis. <br>\nRisk: Reports may be tied to a persistent local or remote identity and tokens. <br>\nMitigation: Deploy only where persistent identity is acceptable, restrict access to runtime files and generated reports, and follow the service's token rotation or revocation process when access changes. <br>\nRisk: Outdoor duration is estimated from doorway or balcony crossing events and may not represent actual exercise or medical status. <br>\nMitigation: Present results as visual activity statistics and reminders, not medical advice or diagnosis, and route health concerns to qualified professionals. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/18072937735/skills/smyx-child-outdoor-activity-monitor-analysis) <br>\n- [API Interface Documentation](artifact/references/api_doc.md) <br>\n- [Shared Analysis API Documentation](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, configuration, guidance] <br>\n**Output Format:** [Markdown or JSON analysis report with child activity metrics, alert status, recommendations, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Supports local video files, video URLs, optional result-file output, and historical report listing.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release metadata; artifact frontmatter reports 1.0.4) <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.3:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.3:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3","readmeExcerpt":"Skill: Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测 Owner: 18072937735 Summary: Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity du","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_child_outdoor_activity_monitor_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input /path/to/door.mp4\n\n# 分析网络阳台门/入户门口视频\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --url https://example.com/door.mp4\n\n# 显示历史儿童户外活动时长监测报告（自动触发关键词：查看儿童户外活动历史报告、户外时长报告清单等）\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_child_outdoor_activity_monitor_analysis --input door.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-child-outdoor-activity-monitor-analysis\"\ndescription: \"Using a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🏃 Child Outdoor Activity Duration Monitoring | 儿童户外活动时长监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **儿童户外活动时长监测** |\n| 🎯 核心目标 | 通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` |\n\nUsing a fixed camera at the balcony door or home entrance, the system detects how many times the child enters/exits the home or balcony. With person-tracking and region-entry/exit logic, it records the timestamps of each 'leaving indoor (outdoor)' and 'returning indoor' event, and accumulates the daily total outdoor-activity duration. When the daily total falls below a preset recommendation (default: at least 1 hour of outdoor activity per day for school-age children), it outputs an 'insufficient outdoor activity' alert, suggesting parents take the child out more. Application scenarios: family parenting, child health management, schools / kindergartens. The system automatically generates daily outdoor-activity reports; if multiple consecutive days fall short, it pushes app reminders to parents. Skill features: outdoor activity is crucial for child vision protection (myopia prevention), bone development, and mental health. AI automatic monitoring helps parents objectively understand the child's outdoor situation and adjust parenting strategies. Can be integrated into smart cameras or family education apps as a practical feature for child health management.\n\n通过家庭阳台门或入户门口的固定摄像头，检测儿童进出家门或阳台的次数，利用人体跟踪和区域进出判定技术，记录每次离开室内（外出）和返回室内（归来）的时间点，累计每日户外活动总时长。当当日总时长低于预设推荐值（默认建议学龄儿童每天至少1小时户外活动）时，输出'户外活动不足'提醒，建议家长带孩子增加户外时间。应用场景：家庭育儿、儿童健康管理、学校/幼儿园。系统自动生成每日户外活动报告，若连续多日不足，通过APP推送提醒家长。技能特点：户外活动对儿童视力保护（预防近视）、骨骼发育、心理健康至关重要。通过AI自动监测，可帮助家长客观了解孩子户外活动情况，及时调整育儿方式。该技能可集成到智能摄像头或家庭教育APP中，成为儿童健康管理的实用功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的儿童健康成长 AI。你的任务是分析阳台门或入户门口固定摄像头的视频，检测儿童进出区域的行为，记录外出和归来时间，累计每日户外活动总时长。当总时长低于推荐值时输出提醒。不要提供医疗建议或医学诊断，仅输出基于视觉的活动统计与友好提醒。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于阳台门/入户门口固定摄像头视频，识别儿童跨区域进出事件 → 累计每日户外活动总时长 → 对比推荐值（默认 ≥ 60 min）→ 输出户外活动不足提醒\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e2caqj7pnsvr9r7t8zenghs83xw7n\",\n  \"slug\": \"smyx-child-outdoor-activity-monitor-analysis\",\n  \"version\": \"1.0.12\",\n  \"publishedAt\": 1790630606770\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放儿童户外活动时长监测 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动儿童户外活动时长监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取户外活动统计结果\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史户外活动记录\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整报告\n\n## 场景代码\n\n- `SMYX_CHILD_OUTDOOR_ACTIVITY_MONITOR_ANALYSIS` - 儿童户外活动时长监测\n\n## 输入约束\n\n- 摄像头：家庭阳台门 / 入户门口 / 楼道门口固定摄像头，对准门口/阳台门通道区域\n- 帧率 ≤ 10 FPS 即可（事件检测无需高帧率）；分辨率 ≥ 480p\n- 摄像头需可同时清晰看到\"门内侧\"和\"门外侧/阳台外侧\"两个区域\n- 初次部署在画面中**框选两个 ROI**：\n  - `indoor_region` - 室内区域\n  - `outdoor_region` - 户外区域（阳台/楼道外/楼下）\n- 建议儿童佩戴可识别特征（如颜色/身高），用于在多人场景下区分识别\n\n## 关键观测信号\n\n- `indoor_region_defined` / `outdoor_region_defined` - 两个 ROI 是否已定义\n- `child_detected` - 是否检测到儿童\n- `exit_events` - 儿童离开室内事件列表（含时间戳）\n- `return_events` - 儿童返回室内事件列表（含时间戳）\n- `outdoor_session_count_today` - 当日户外外出次数（一次外出+归来计 1 次）\n- `outdoor_session_durations_today` - 各次户外时长列表（分钟）\n- `total_outdoor_duration_today_min` - 当日累计户外活动总时长（分钟）\n- `last_exit_time` / `last_return_time` - 最近一次外出/归来时间\n\n## 默认推荐与阈值（可由调用方覆盖）\n\n- 学龄儿童建议每日户外活动 **≥ 60 分钟**（recommended_outdoor_min_default = 60）\n- 低于推荐值且时间已到 18:00 → 触发\"今日户外活动不足\"提醒\n- 连续 ≥ 3 天低于推荐值 → 升级提醒至 warning\n- 单次外出 < 5 分钟 默认视为无效会话（如下楼丢垃圾、收快递等，可由调用方覆盖）\n\n## 提醒类型\n\n- `daily_outdoor_insufficient` - 当日户外活动不足\n- `multi_day_outdoor_insufficient` - 连续多日户外不足\n- `outdoor_goal_met` - 当日已达成户外活动推荐量\n- `normal` - 正常\n\n## 输出字段（参考）\n\n- `child_detected` / `indoor_region_defined` / `outdoor_region_defined`\n- `today_metrics` - 当日指标（outdoor_session_count_today / outdoor_session_durations_today / total_outdoor_duration_today_min / last_exit_time / last_return_time）\n- `recommended_outdoor_min` - 推荐户外时长（min）\n- `goal_completion_pct` - 当日达成率（0-1）\n- `consecutive_insufficient_days` - 连续不足天数\n- `alert_type` - 提醒类型\n- `alert_level` - 提醒级别（info / notice / warning）\n- `alert_message` - 推送给家长的文本（如\"宝宝今天累计户外活动只有 25 分钟，离推荐 60 分钟还有差距，下午带 TA 去公园玩一会儿吧~\"）\n- `recommend_action` - 建议动作（push_app_notice / suggest_outdoor_plan / observe_only）\n\n> 仅输出基于视觉的进出门事件统计与友好提醒，不直接代表真实运动量；如儿童视力/骨骼发育/情绪问题已较明显，请咨询专业医生。"},{"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":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1096,"uniquenessScore":44,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T21:40:05.126Z","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-09T21:40:05.126Z","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-10T07:43:02.611Z","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"}]}}}