{"id":"5e674c81-0ef4-4666-950c-6972b87a2de0","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys","name":"Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys","generatedAt":"2026-10-10T10:50:36.323Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:19:23.534Z","emptyReason":null},"description":"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.6K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-elderly-long-term-immobility-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-elderly-long-term-immobility-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-elderly-long-term-immobility-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":64,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测 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-10T06:19:23.534Z","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-10T06:19:23.534Z","emptyReason":null},"stars":null,"forks":null,"downloads":1624,"packageName":null,"latestVersion":"1.0.10","tractionLabel":"1.6K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T06:19:23.534Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T06:19:23.534Z","lastCrawledAt":"2026-10-10T06:19:23.534Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T06:19:23.534Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.10","createdAt":"2026-08-27T05:40:39.601Z","changelog":"- Updated version number to 1.0.13 in SKILL.md. - Removed the file: skill-card.md. - No changes to skill functionality or workflow. - Documentation maintenance; all instructions and usage remain consistent with prior version.","fileCount":31,"zipByteSize":40901},{"version":"1.0.9","createdAt":"2026-08-18T17:53:30.040Z","changelog":"- Updated skill version from 1.0.10 to 1.0.11. - Removed the redundant file `skill-card.md`. - Minor internal configuration updates in skills/smyx_common/scripts/config.yaml. - No changes to features or interface; documentation remains unchanged except for the version.","fileCount":31,"zipByteSize":40907},{"version":"1.0.8","createdAt":"2026-08-10T01:43:36.508Z","changelog":"- Removes the file: skill-card.md. - No changes to code or functionality; this is a documentation cleanup release.","fileCount":31,"zipByteSize":40790},{"version":"1.0.7","createdAt":"2026-08-05T16:33:30.626Z","changelog":"- Updated SKILL.md to increment the version number and reflect minor documentation changes. - Removed the file skill-card.md. - No changes to code or core functionality. - Documentation and resource indexing remain consistent; usage instructions and constraints unchanged.","fileCount":31,"zipByteSize":40963},{"version":"1.0.6","createdAt":"2026-07-30T17:55:29.903Z","changelog":"- Updated version to 1.0.8 in SKILL.md. - Removed the file skill-card.md. - No functional or capability changes in the skill itself. - Documentation maintenance: updated version information and cleaned up files.","fileCount":31,"zipByteSize":40782},{"version":"1.0.5","createdAt":"2026-07-14T06:40:34.647Z","changelog":"- Removed the skill-card.md file. - No changes to functionality or features. - Documentation or metadata affected only.","fileCount":31,"zipByteSize":40939},{"version":"1.0.4","createdAt":"2026-07-10T14:50:35.835Z","changelog":"- Updated version numbers in SKILL.md to reflect a new release. - Removed the redundant file skill-card.md. - Minor revisions to internal utility scripts or documentation.","fileCount":31,"zipByteSize":40936},{"version":"1.0.3","createdAt":"2026-07-04T20:15:26.713Z","changelog":"- Updated internal version to 1.0.5. - Documentation in SKILL.md revised for clarity; no functional changes to feature set. - Removed deprecated skill-card.md file. - Made minor code and config adjustments in scripts/config.py, dao.py, and util.py; no user-facing behavioral changes.","fileCount":31,"zipByteSize":40674}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-elderly-long-term-immobility-analysis","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-elderly-long-term-immobility-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/smyx-sunjinhui/smyx-elderly-long-term-immobility-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-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/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-10T10:50:36.319Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-elderly-long-term-immobility-analys/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-10T06:19:23.534Z","emptyReason":null},"readme":"Skill: Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n\nOwner: smyx-sunjinhui\n\nSummary: Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\n\nTags: latest:1.0.10\n\nVersion history:\n\nv1.0.10 | 2026-08-27T05:40:39.601Z | auto\n\n- Updated version number to 1.0.13 in SKILL.md.\n- Removed the file: skill-card.md.\n- No changes to skill functionality or workflow.\n- Documentation maintenance; all instructions and usage remain consistent with prior version.\n\nv1.0.9 | 2026-08-18T17:53:30.040Z | auto\n\n- Updated skill version from 1.0.10 to 1.0.11.\n- Removed the redundant file `skill-card.md`.\n- Minor internal configuration updates in skills/smyx_common/scripts/config.yaml.\n- No changes to features or interface; documentation remains unchanged except for the version.\n\nv1.0.8 | 2026-08-10T01:43:36.508Z | auto\n\n- Removes the file: skill-card.md.\n- No changes to code or functionality; this is a documentation cleanup release.\n\nv1.0.7 | 2026-08-05T16:33:30.626Z | auto\n\n- Updated SKILL.md to increment the version number and reflect minor documentation changes.\n- Removed the file skill-card.md.\n- No changes to code or core functionality.\n- Documentation and resource indexing remain consistent; usage instructions and constraints unchanged.\n\nv1.0.6 | 2026-07-30T17:55:29.903Z | auto\n\n- Updated version to 1.0.8 in SKILL.md.\n- Removed the file skill-card.md.\n- No functional or capability changes in the skill itself.\n- Documentation maintenance: updated version information and cleaned up files.\n\nv1.0.5 | 2026-07-14T06:40:34.647Z | auto\n\n- Removed the skill-card.md file.\n- No changes to functionality or features.\n- Documentation or metadata affected only.\n\nv1.0.4 | 2026-07-10T14:50:35.835Z | auto\n\n- Updated version numbers in SKILL.md to reflect a new release.\n- Removed the redundant file skill-card.md.\n- Minor revisions to internal utility scripts or documentation.\n\nv1.0.3 | 2026-07-04T20:15:26.713Z | auto\n\n- Updated internal version to 1.0.5.\n- Documentation in SKILL.md revised for clarity; no functional changes to feature set.\n- Removed deprecated skill-card.md file.\n- Made minor code and config adjustments in scripts/config.py, dao.py, and util.py; no user-facing behavioral changes.\n\nv1.0.2 | 2026-06-28T12:52:25.936Z | auto\n\n- Major update: User identity management and documentation overhaul.\n- Identity parameters are now handled internally; users are never asked to provide or see any identity value.\n- The entire workflow is restructured for clarity, with enhanced step-by-step tables and icons.\n- API/history report queries must always use the cloud interface; all local/manual history report collection is strictly forbidden.\n- Documentation reformatted for concise bilingual presentation, with dedicated resource, requirements, and example sections.\n- Updated sample usage and added new visual demo link; removed all instructions about user-provided open-id.\n\nv1.0.1 | 2026-05-24T18:04:04.126Z | auto\n\nNo changes detected in this version.\n\n- No updates were made to the skill files or documentation.\n- Functionality and documentation remain unchanged from the previous release.\n\nv1.0.0 | 2026-05-24T17:57:13.107Z | auto\n\nInitial release — AI-based system for detecting long-term immobility (over 12 hours) in solo-living elders using multi-zone fixed cameras.\n\n- Continuously analyzes video from multiple home areas to detect human movement and activity.\n- Sends \"long-term no activity\" alerts and notifies emergency contacts if no activity is detected within a configurable time window (default 12 hours).\n- Designed for solo-living elder households and community elderly-care centers; integrates with smart-home security or care platforms.\n- Includes strict requirements for user identification (open-id) before analysis or report queries.\n- Enables structured, cross-zone inactivity reporting and easy access to past alert records via cloud API.\n\nArchive index:\n\nArchive v1.0.10: 31 files, 40901 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (2963b), SKILL.md (12659b), 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 (162b)\n\nFile v1.0.10:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.10:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787809239601\n}\n\nFile v1.0.10:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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\nUsing fixed cameras in multiple zones of a solo-living elder's home, the skill analyzes video streams for human activity and reports a long-term no-activity alert when the configured window, defaulting to 12 hours, is exceeded.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal care teams, family caregivers, community elderly-care services, and developers integrating monitoring workflows can use this skill to analyze multi-zone home video for prolonged inactivity indicators and retrieve structured monitoring reports. The skill is an assistive monitoring tool and does not provide medical diagnosis or rescue instructions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill processes sensitive home-monitoring videos, video URLs, report history, and report export links.\n\nMitigation: Use it only with informed consent from the monitored person or lawful guardian, confirm the provider's retention policy, and avoid bathrooms or similarly sensitive spaces unless there is a clear legal and privacy basis.\n\nRisk: The skill silently creates or reuses cloud identity state for analysis and history retrieval.\n\nMitigation: Review identity handling before installation and assume identity values and associated reports may be processed or stored by the provider.\n\nRisk: The skill submits local video files or network video URLs to backend analysis endpoints.\n\nMitigation: Verify configured endpoints before use and limit submitted media to the intended monitoring scope.\n\nRisk: Long-term inactivity alerts may be incorrect or incomplete because the skill is based on visual activity detection.\n\nMitigation: Treat alerts as assistive signals and require human verification by phone or in-person check before taking further action.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis)\n- [API documentation](references/api_doc.md)\n- [Shared analysis API documentation](skills/smyx_analysis/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, json, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown text with structured JSON content and optional report export links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May save the returned report text to a local output file when an output path is provided.]\n\n## Skill Version(s):\n\n1.0.10 (source: server release evidence; artifact frontmatter reports 1.0.13)\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, 40907 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (2955b), SKILL.md (12659b), 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 (161b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1787075610040\n}\n\nFile v1.0.9:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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\nUsing fixed cameras in multiple zones of a solo-living elder's home, the skill analyzes video streams for human activity and returns a long-term no-activity alert when no movement is detected within the configured window, defaulting to 12 hours.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal developers, care-platform operators, and smart-home integrators use this skill to analyze fixed-camera video from solo-living elder homes or community elder-care settings, estimate inactivity duration, and produce structured alert results for human follow-up. The skill is an auxiliary monitoring aid and does not provide medical diagnosis or rescue instructions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Home monitoring video and report metadata are highly sensitive and may be sent to remote services.\n\nMitigation: Use the skill only with informed consent from the monitored person or an authorized guardian, confirm the configured endpoints before deployment, and avoid visual monitoring in highly private areas when a less intrusive sensor can meet the need.\n\nRisk: The skill silently manages persistent identity values and tokens.\n\nMitigation: Review local storage and token handling before installation, rotate credentials when moving environments, and limit access to machines that run the skill.\n\nRisk: A no-activity alert can be wrong because camera coverage, lighting, file quality, or model output may be incomplete.\n\nMitigation: Treat alerts as prompts for human verification, not as medical conclusions or rescue instructions, and verify camera placement and supported input formats before operational use.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis)\n- [API interface documentation](artifact/references/api_doc.md)\n- [Shared analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or text containing structured JSON-style monitoring results, alert status, report links, and optional shell command examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include report export links and historical report listings returned from the configured remote service.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata; artifact frontmatter declares 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, 40790 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (2670b), SKILL.md (12659b), 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 (161b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1786326216508\n}\n\nFile v1.0.8:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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 multi-zone home camera video for solo-living elder activity and raises a long-term no-activity alert when no movement is detected for the configured window, defaulting to 12 hours.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal caregivers, community elder-care operators, and developers integrating elder-safety monitoring workflows use this skill to analyze home camera files or URLs for prolonged inactivity and produce alerts, structured reports, and report links. It is an auxiliary monitoring tool and does not provide medical diagnosis or rescue instructions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive home video and report history are sent through cloud APIs.\n\nMitigation: Use only with consent from the monitored person or authorized caregivers, and avoid visual monitoring in sensitive areas when a less invasive sensor can satisfy the use case.\n\nRisk: Local workspace data may contain identity records and tokens.\n\nMitigation: Treat the workspace data directory as sensitive, restrict access, apply retention controls, and prefer an explicit managed account over silent default identity behavior.\n\nRisk: A long-term no-activity alert may be incorrect, delayed, or incomplete.\n\nMitigation: Use alerts as auxiliary monitoring signals, require human verification, and do not treat the output as medical diagnosis or a rescue plan.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Analysis API error-code reference](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and JSON-like structured report text, with optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include activity timestamps, idle duration, active zones, alert levels, suggested contacts, and report links; history queries return Markdown tables.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release evidence; artifact SKILL.md frontmatter reports 1.0.10)\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, 40963 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (3095b), SKILL.md (12659b), 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 (161b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.10\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1785947610626\n}\n\nFile v1.0.7:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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\nAnalyzes fixed-camera home video for solo-living elder activity and produces long-term no-activity alerts when configured inactivity thresholds, default 12 hours, are exceeded.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal caregivers, community elder-care operators, and smart-home integrators use this skill to analyze elder-care camera video or video URLs for prolonged inactivity and produce structured alerts, report links, and history reports. It is an auxiliary monitoring tool and does not provide medical diagnosis or rescue instructions.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive elder-care home video or video URLs may be sent to LifeEmergence services for analysis.\n\nMitigation: Use only with consent from the monitored person or lawful representative, avoid bathroom or bedroom cameras where possible, and confirm that service-side handling meets the deployment's privacy requirements.\n\nRisk: The skill can create or reuse local account identity state and retain tokens or default identity data in the workspace.\n\nMitigation: Restrict workspace access, review the local data store before and after use, and delete retained identity or token state when it should not persist.\n\nRisk: Account-linked history reports can expose sensitive monitoring results.\n\nMitigation: Limit who can request report history, treat generated report links as sensitive, and audit access before enabling shared or unattended use.\n\nRisk: Long-term inactivity alerts are safety-relevant but are based on visual activity analysis rather than medical assessment.\n\nMitigation: Treat alerts as prompts for immediate human verification by phone or in person, and do not use the skill as a medical diagnosis or emergency response substitute.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n- [Shared API documentation](skills/smyx_analysis/references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, guidance]\n\n**Output Format:** [Markdown text with structured JSON report content, command examples, alert fields, history tables, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports local video files or video URLs, history listing, optional output file writing, and basic/standard/json detail levels; documented media constraints include mp4, avi, and mov files up to 10 MB.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; artifact frontmatter says 1.0.10)\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, 40782 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (2826b), SKILL.md (12658b), 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 (161b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.8\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1785434129903\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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>\nThis skill analyzes fixed-camera video from multiple home zones to detect long-term inactivity in solo-living elder care settings and produce structured alerts when the configured inactivity window, default 12 hours, is exceeded. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal developers, smart-home integrators, and elder-care service operators use this skill to analyze home monitoring videos or video URLs, summarize activity and inactivity signals, and return alerts, recommendations, and report links for follow-up review. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Elder-home videos, video URLs, identity values, report metadata, and account tokens may be sent to and stored by external lifeemergence.com services. <br>\nMitigation: Use only with explicit informed consent from monitored people or authorized caregivers, verify backend retention and deletion controls, and avoid sensitive rooms unless legally and ethically justified. <br>\nRisk: The skill creates persistent identity or account state with limited user control. <br>\nMitigation: Confirm account lifecycle, access, and deletion controls before deployment, and do not expose internal identity values in user-facing outputs. <br>\nRisk: The skill may be mistaken for a complete emergency notification or continuous safety monitoring system. <br>\nMitigation: Treat outputs as auxiliary monitoring signals, require human verification for alerts, and maintain independent emergency response procedures. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [API documentation](references/api_doc.md) <br>\n- [SMYX analysis API documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Files] <br>\n**Output Format:** [Structured analysis report text or JSON, with Markdown tables for historical report lists and optional saved output files.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Outputs may include alert levels, inactivity duration, detected activity zones, recommendations, and report links.] <br>\n\n## Skill Version(s): <br>\n1.0.6 (source: server release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.0.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, 40939 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (3219b), SKILL.md (12658b), 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 (161b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1784011234647\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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 home video or video URLs for solo-living elder monitoring, detects prolonged lack of visible activity, and returns structured long-term immobility alerts and report links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal caregivers, family members, community elder-care teams, and developers use this skill to submit home-monitoring video for long-term no-activity analysis and to retrieve structured alert reports. It is intended as an auxiliary monitoring workflow and does not provide medical diagnosis or rescue instructions. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Home-monitoring video or video URLs are sent to a remote Life Emergence service for processing. <br>\nMitigation: Use only with informed consent from the monitored person or authorized family, avoid visual coverage of highly sensitive areas when possible, and submit only approved video sources. <br>\nRisk: The skill may silently create or reuse a local identity, log in to a remote account, and store tokens in a local SQLite database under the workspace data directory. <br>\nMitigation: Review account-linkage behavior before installation, protect the workspace data directory, and clear stored tokens or local user records when the skill is no longer needed. <br>\nRisk: The security verdict is suspicious because the skill handles sensitive home video while performing remote account and token management. <br>\nMitigation: Review and scan the skill before deployment, restrict execution to trusted environments, and confirm the remote service relationship is acceptable for the organization. <br>\nRisk: Long-term immobility alerts are auxiliary visual activity signals, not medical diagnoses or emergency response instructions. <br>\nMitigation: Manually verify any alert by phone or an in-person check and do not rely on the skill as the sole emergency response mechanism. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [API documentation](references/api_doc.md) <br>\n- [Analysis API error reference](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance] <br>\n**Output Format:** [Markdown or JSON text containing structured activity analysis, alert status, history records, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May write the returned report text to a user-specified output file.] <br>\n\n## Skill Version(s): <br>\n1.0.5 (source: server release metadata; artifact frontmatter states 1.0.6) <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, 40936 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (3167b), SKILL.md (12658b), 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 (161b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1783695035835\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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>\nUsing fixed cameras in multiple zones of a solo-living elder's home, this skill analyzes video streams for human activity and reports a long-term no-activity alert when no activity is detected within the configured window, defaulting to 12 hours. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and care-service operators can use this skill to analyze home monitoring video for prolonged elder immobility, review structured activity results, and retrieve cloud-hosted monitoring history. It is an auxiliary monitoring aid and does not provide medical diagnosis or rescue instructions. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill sends in-home elder monitoring footage or video URLs to the LifeEmergence cloud service. <br>\nMitigation: Use it only with informed consent from the monitored person or authorized family, and avoid cameras or uploads from highly sensitive areas. <br>\nRisk: The skill can automatically create or reuse an identity and store local service tokens and SQLite data in the workspace data directory. <br>\nMitigation: Protect the workspace data directory, periodically clear local files such as smyx-api-key.txt and generated databases, and avoid sharing the workspace with untrusted users. <br>\nRisk: The skill may generate an urgent no-activity alert, but it is based on visual activity analysis rather than medical diagnosis. <br>\nMitigation: Treat alerts as prompts for human verification and emergency-contact follow-up, not as diagnostic or rescue instructions. <br>\nRisk: Submitting untrusted video URLs may expose the cloud service and the user workflow to unsafe or unintended remote content. <br>\nMitigation: Submit only trusted local files or trusted public URLs that are intended for analysis. <br>\n\n\n## Reference(s): <br>\n- [API 接口文档](references/api_doc.md) <br>\n- [API接口文档](skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis) <br>\n- [Publisher profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Analysis, API Calls, Markdown, JSON, Files] <br>\n**Output Format:** [Markdown or JSON structured analysis results, with optional saved output file] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include alert level, last detected activity time, idle duration, active zones, suggested contacts, and report export links.] <br>\n\n## Skill Version(s): <br>\n1.0.4 (source: ClawHub release metadata; artifact frontmatter says 1.0.6) <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, 40674 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (2775b), SKILL.md (12658b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (427b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1509b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3833b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (47b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2645b), skills/smyx_common/scripts/base.py (469b), skills/smyx_common/scripts/config-dev.yaml (214b), skills/smyx_common/scripts/config-prod.yaml (0b), skills/smyx_common/scripts/config-test.yaml (256b), skills/smyx_common/scripts/config.py (24363b), skills/smyx_common/scripts/config.yaml (473b), skills/smyx_common/scripts/dao.py (18266b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (28605b), _meta.json (161b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1783196126713\n}\n\nFile v1.0.3:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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>\nThis skill analyzes fixed-camera home video or video URLs for solo-living elder activity, emits long-term no-activity alerts at the configured threshold, and can return structured monitoring reports and history links. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, care coordinators, and developers use this skill to submit elder-care home video for activity monitoring, long-term immobility alerting, and retrieval of prior cloud reports. It is intended as an auxiliary monitoring workflow and not as a medical diagnosis or rescue instruction system. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill may send elder-care home video, images, or video URLs to an external service. <br>\nMitigation: Use it only with explicit consent from the monitored person or legal caregiver, and avoid sensitive camera locations unless appropriate privacy-preserving alternatives are in place. <br>\nRisk: Cloud report links and history queries can expose sensitive surveillance records. <br>\nMitigation: Restrict access to report links, review the configured identity before use, and treat stored history as sensitive personal data. <br>\nRisk: The skill silently manages local and remote identity and token use with limited user control. <br>\nMitigation: Install only from a trusted publisher, review the configured service account and endpoints, and run it in an environment where credentials and generated reports are access-controlled. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis) <br>\n- [Publisher Profile](https://clawhub.ai/user/smyx-sunjinhui) <br>\n- [API Reference](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 text with optional local file output and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May query cloud report history and may write the generated report text to a user-specified output file.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: server release metadata; artifact frontmatter says 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.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\n\nArchive v1.0.2: 31 files, 37674 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3611b), skill-card.md (2879b), SKILL.md (12658b), 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 (13468b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (23409b), _meta.json (161b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.4\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化） |\n| 2 | 最近一次活动时间戳 |\n| 3 | 累计无活动时长统计 |\n| 4 | 活动区域覆盖统计 |\n| 5 | 长期静止阈值判定（默认 12 小时 |\n| 6 | 可覆盖） |\n| 7 | 分级预警（none / warning / critical / emergency） |\n| 8 | 紧急联系人通知建议 |\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_elderly_long_term_immobility_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_elderly_long_term_immobility_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_elderly_long_term_immobility_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_elderly_long_term_immobility_analysis.py`](scripts/smyx_elderly_long_term_immobility_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| 🔏 隐私合规 | 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json\n```\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1782651145936\n}\n\nFile v1.0.2:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\n\n> 仅基于视觉活动检测输出统计与预警，不提供医疗诊断或具体救援操作方案。\n\nFile v1.0.2: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.2:scripts/config.yaml\n\n{}\n\nFile v1.0.2:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.2: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.2: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.2: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.2:skill-card.md\n\n## Description: <br>\nUsing fixed cameras in multiple zones of a solo-living elder's home, this skill analyzes video streams for human activity and emits a long-term no-activity alert when activity is not detected within a configured window, defaulting to 12 hours. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, caregivers, elder-care service operators, and developers use this skill to analyze home monitoring video or video URLs for prolonged immobility indicators and to review structured monitoring reports. It is an auxiliary monitoring workflow and should be paired with human confirmation for urgent alerts. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Private elder-home video or video URLs may be sent to the provider's cloud service. <br>\nMitigation: Use only with informed consent from the monitored person or authorized family, confirm provider data handling terms, and avoid bathroom or other highly sensitive feeds unless strong privacy controls are in place. <br>\nRisk: Reports may be tied to an automatically managed identity and locally or remotely stored tokens. <br>\nMitigation: Review where identity state, reports, and tokens are stored; restrict workspace access; and rotate or remove credentials when the skill is no longer needed. <br>\nRisk: A no-activity alert may be wrong or incomplete and does not provide a medical diagnosis or rescue plan. <br>\nMitigation: Treat alerts as prompts for human verification and maintain a separate emergency response process. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-elderly-long-term-immobility-analysis) <br>\n- [Skill Demo](https://lifeemergence.com/sample.html) <br>\n- [API Interface Documentation](references/api_doc.md) <br>\n- [Shared Analysis API Documentation](skills/smyx_analysis/references/api_doc.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, shell commands, guidance] <br>\n**Output Format:** [Markdown and JSON-like structured analysis reports with report links and optional saved text output] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can list cloud-stored historical monitoring reports and can save the generated report text to a user-specified output file.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release metadata; artifact frontmatter says 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.2:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.2:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nPyYAML==6.0.3\n\nArchive v1.0.1: 31 files, 36347 bytes\n\nFiles: references/api_doc.md (2137b), scripts/__init__.py (56b), scripts/api_service.py (1704b), scripts/config.py (701b), scripts/config.yaml (3b), scripts/skill.py (593b), scripts/smyx_elderly_long_term_immobility_analysis.py (3580b), SKILL.md (14249b), skills/smyx_analysis/__init__.py (0b), skills/smyx_analysis/references/api_doc.md (2094b), skills/smyx_analysis/requirements.txt (45b), skills/smyx_analysis/scripts/__init__.py (0b), skills/smyx_analysis/scripts/api_service.py (1857b), skills/smyx_analysis/scripts/config.py (1003b), skills/smyx_analysis/scripts/config.yaml (3b), skills/smyx_analysis/scripts/skill.py (11394b), skills/smyx_analysis/scripts/smyx_analysis.py (3691b), skills/smyx_common/__init__.py (0b), skills/smyx_common/requirements.txt (45b), skills/smyx_common/scripts/__init__.py (177b), skills/smyx_common/scripts/api_service.py (2518b), 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 (21679b), skills/smyx_common/scripts/config.yaml (463b), skills/smyx_common/scripts/dao.py (11119b), skills/smyx_common/scripts/skill.py (2473b), skills/smyx_common/scripts/util.py (18384b), _meta.json (161b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\"\nversion: \"1.0.0\"\n---\n\n# Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🎯 AI 角色\n\n**假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。**\n\n## 任务目标\n\n- 本 Skill 用于：基于独居老人家中多区域连续监控视频，检测人体活动并统计累计无活动时长，按阈值输出长期静止紧急预警\n- 能力包含：跨区域人体活动检测（全身移动 / 四肢动作 / 手部动作 / 姿态变化）、最近一次活动时间戳、累计无活动时长统计、活动区域覆盖统计、长期静止阈值判定（默认 12 小时，可覆盖）、分级预警（none / warning / critical / emergency）、紧急联系人通知建议\n- 触发条件:\n    1. **默认触发**：当用户提供独居老人家中多区域连续监控视频 URL 或文件需要分析时，默认触发本技能进行长期静止监测\n    2. 当用户明确提及独居老人、长期无活动、长期静止、无人响应、无活动预警、突发疾病、跌倒无法起身、中风、心梗、晕厥、空巢老人监护等关键词，并且上传了视频文件\n    3. 当用户提及以下关键词时，**自动触发历史报告查询功能**\n       ：查看长期静止历史报告、独居监护报告清单、长期无活动报告清单、查询历史紧急预警记录、显示所有独居老人监护报告、显示长期静止诊断报告，查询紧急预警清单\n- 自动行为：\n    1. 如果用户上传了附件或者视频文件，则自动保存为本地文件\n    2. **⚠️ 强制数据获取规则（次高优先级）**：如果用户触发任何历史报告查询关键词（如\"查看所有长期静止报告\"、\"\n       显示所有独居老人监护报告\"、\"\n       查看历史报告\"等），**必须**：\n        - 直接使用 `python -m scripts.smyx_elderly_long_term_immobility_analysis --list --open-id` 参数调用 API\n          查询云端的历史报告数据\n        - **严格禁止**：从本地 memory 目录读取历史会话信息、严格禁止手动汇总本地记录中的报告、严格禁止从长期记忆中提取报告\n        - **必须统一**从云端接口获取最新完整数据，然后以 Markdown 表格格式输出结果\n\n## 前置准备\n\n- 依赖说明:scripts 脚本所需的依赖包及版本\n  ```\n  requests>=2.28.0\n  ```\n\n## 操作步骤\n\n### 🔒 open-id 获取流程控制（强制执行，防止遗漏）\n\n**在执行老年人长期静止监测前，必须按以下优先级顺序获取 open-id：**\n\n```\n第 1 步：【最高优先级】检查技能所在目录的配置文件（优先）\n        路径：skills/smyx_common/scripts/config.yaml（相对于技能根目录）\n        完整路径示例：${OPENCLAW_WORKSPACE}/skills/{当前技能目录}/skills/smyx_common/scripts/config.yaml\n        → 如果文件存在且配置了 api-key 字段，则读取 api-key 作为 open-id\n        ↓ (未找到/未配置/api-key 为空)\n第 2 步：检查 workspace 公共目录的配置文件\n        路径：${OPENCLAW_WORKSPACE}/skills/smyx_common/scripts/config.yaml\n        → 如果文件存在且配置了 api-key 字段，则读取 api-key 作为 open-id\n        ↓ (未找到/未配置)\n第 3 步：检查用户是否在消息中明确提供了 open-id\n        ↓ (未提供)\n第 4 步：❗ 必须暂停执行，明确提示用户提供用户名或手机号作为 open-id\n```\n\n**⚠️ 关键约束：**\n\n- **禁止**自行假设,自行推导,自行生成 open-id 值（如 openclaw-control-ui、default、userC113、user123 等）\n- **禁止**跳过 open-id 验证直接调用 API\n- **必须**在获取到有效 open-id 后才能继续执行分析\n- 如果用户拒绝提供 open-id，说明用途（用于保存和查询历史报告记录），并询问是否继续\n\n---\n\n- 标准流程:\n    1. **准备多区域监控视频输入**\n        - 提供本地居家多区域监控视频文件路径或网络 URL\n        - 建议覆盖至少 2 个常驻区域（客厅 + 卧室），可加入厨房、卫生间\n        - 摄像头建议全天候运行（含红外夜视），视频可按区域分段或上传整段长视频\n        - 可选附带：被监护人姓名、紧急联系人列表、阈值覆盖（immobility_threshold_hour）\n    2. **获取 open-id（强制执行）**\n        - 按上述流程控制获取 open-id\n        - 如无法获取，必须提示用户提供用户名或手机号\n    3. **执行长期静止监测**\n        - 调用 `-m scripts.smyx_elderly_long_term_immobility_analysis` 处理输入（**必须在技能根目录下运行脚本**）\n        - 参数说明:\n            - `--input`: 本地居家多区域监控视频文件路径\n            - `--url`: 网络居家多区域监控视频 URL 地址（API 服务自动下载）\n            - `--pet-type`: 类别标识，独居老人监护场景默认 `other`\n            - `--open-id`: 当前用户的 open-id（必填，按上述流程获取）\n            - `--list`: 显示老年人长期静止历史监测报告列表清单（可以输入起始日期参数过滤数据范围）\n            - `--api-key`: API 访问密钥（可选）\n            - `--api-url`: API 服务地址（可选，使用默认值）\n            - `--detail`: 输出详细程度（basic/standard/json，默认 json）\n            - `--output`: 结果输出文件路径（可选）\n    4. **查看分析结果**\n        - 接收结构化的长期静止监测报告\n        - 包含：最近一次活动时间（last_motion_time）、累计无活动时长（idle_duration_hour）、活动区域覆盖列表（active_zones）、长期静止预警标志（immobility_alert）、预警等级（none / warning / critical / emergency）、预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）、建议通知的紧急联系人\n        - **重要提示**：仅基于视觉活动检测输出统计与预警，不提供医疗诊断或具体救援操作方案\n\n## 资源索引\n\n- 必要脚本：见 [scripts/smyx_elderly_long_term_immobility_analysis.py](scripts/smyx_elderly_long_term_immobility_analysis.py)(\n  用途：调用 API 进行老年人长期静止（超 12 小时）监测分析，本地文件上传，网络 URL 由 API 服务自动下载)\n- 配置文件：见 [scripts/config.py](scripts/config.py)(用途：配置 API 地址、默认参数和场景码)\n- 领域参考：见 [references/api_doc.md](references/api_doc.md)(何时读取：需要了解 API 接口详细规范、阈值定义和错误码时)\n\n## 注意事项\n\n- 仅在需要时读取参考文档，保持上下文简洁\n- 输入要求：支持 mp4/avi/mov 视频，最大 10MB；建议夜视模式 + 整日时间段\n- API 密钥可选，如果通过参数传入则必须确保调用鉴权成功，否则忽略鉴权\n- 触发紧急预警时，请立即通过电话/上门方式人工核实，本工具仅作辅助监测\n- 隐私合规：居家多区域视频涉及个人隐私，使用前需取得被监护人或家属知情同意；卫生间等敏感区域建议改用毫米波雷达/PIR 传感器替代视觉\n- 禁止临时生成脚本，只能用技能本身的脚本\n- 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载\n- 当显示历史分析报告清单的时候，从接口返回 json 数据中提取字段 reportImageUrl 作为超链接地址，且自动转化为如下 Markdown\n  表格格式输出，包含\"\n  报告名称\"、\"被监护人\"、\"分析时间\"、\"点击查看\"四列，其中\"报告名称\"列使用`长期静止监测报告-{记录id}`形式拼接, \"点击查看\"\n  列使用\n  `[🔗 查看报告](reportImageUrl)`\n  格式的超链接，用户点击即可直接跳转到对应的完整报告页面。\n- 表格输出示例：\n  | 报告名称 | 被监护人 | 分析时间 | 点击查看 |\n  |----------|----------|----------|----------|\n  | 长期静止监测报告-20260312172200001 | 独居张爷爷 | 2026-03-12 17:22:00 | [🔗 查看报告](https://example.com/report?id=xxx) |\n\n## 使用示例\n\n```bash\n# 分析本地居家多区域监控视频（以下只是示例，禁止直接使用openclaw-control-ui 作为 open-id）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4 --open-id your-open-id\n\n# 分析网络居家多区域监控视频（以下只是示例，禁止直接使用openclaw-control-ui 作为 open-id）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4 --open-id your-open-id\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list --open-id your-open-id\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --open-id your-open-id --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --open-id your-open-id --output result.json\n```\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1779645844126\n}\n\nFile v1.0.1:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\n\n> 仅基于视觉活动检测输出统计与预警，不提供医疗诊断或具体救援操作方案。\n\nFile v1.0.1:skills/smyx_analysis/references/api_doc.md\n\n# API接口文档\n\n## 接口地址\n\n`POST https://your-api-server.com/api/v1/common-analysis`\n\n## 请求头\n\n| 字段           | 必选 | 说明                            |\n|--------------|----|-------------------------------|\n| X-API-Key    | 是  | API访问密钥                       |\n| Content-Type | 是  | 文件上传或 application/json（URL模式） |\n\n## 请求参数\n\n### 1. 文件上传模式\n\n| 字段           | 类型     | 必选 | 说明                                    |\n|--------------|--------|----|---------------------------------------|\n| video        | file   | 是  | MP4视频文件                               |\n| detail_level | string | 否  | 输出详细程度：basic/standard/full，默认standard |\n\n### 2. URL模式\n\n| 字段           | 类型     | 必选 | 说明                                    |\n|--------------|--------|----|---------------------------------------|\n| video_url    | string | 是  | 可公开访问的视频URL                           |\n| detail_level | string | 否  | 输出详细程度：basic/standard/full，默认standard |\n\n## 响应格式\n\n```json\n{\n  \"code\": 200,\n  \"message\": \"success\",\n  \"data\": {\n    \"analysis_time\": \"2026-03-10 15:30:00\",\n    \"face_detection\": {\n      \"status\": \"success\",\n      \"face_count\": 1,\n      \"quality_score\": 95\n    },\n    \"diagnosis\": {\n      \"overall_constitution\": \"平和质\",\n      \"organ_condition\": {\n        \"liver\": \"正常\",\n        \"heart\": \"轻微火旺\",\n        \"spleen\": \"略虚\",\n        \"lung\": \"正常\",\n        \"kidney\": \"正常\"\n      },\n      \"color_analysis\": {\n        \"complexion\": \"微黄\",\n        \"correspondence\": \"脾胃功能略弱\"\n      }\n    },\n    \"health_warnings\": [\n      \"注意休息，避免熬夜\"\n    ],\n    \"suggestions\": [\n      \"饮食清淡，减少辛辣食物摄入\"\n    ]\n  }\n}\n```\n\n## 错误码说明\n\n| 错误码 | 说明       |\n|-----|----------|\n| 400 | 请求参数错误   |\n| 401 | API密钥无效  |\n| 403 | 权限不足     |\n| 413 | 文件过大     |\n| 415 | 不支持的文件格式 |\n| 500 | 服务器内部错误  |\n\nFile v1.0.1:scripts/config.yaml\n\n{}\n\nFile v1.0.1:skills/smyx_analysis/scripts/config.yaml\n\n{}\n\nFile v1.0.1: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.1: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.1:skills/smyx_common/scripts/config.yaml\n\nenv: prod\n\nApiEnum:\n  api-key:\n  api-secret-key:\n  database-url:\n  base-url-open-api: \"https://open.lifeemergence.com/smyx-open-api\"\n  base-url-open-h5: \"http://livemonitor.lifeemergence.com\"\n  base-url-health: \"https://lifeemergence.com/jeecg-boot-xzgz\"\n\nConstantEnum:\n  is-debug: false\n  app--id: x1a3s4nwy1s2r4se\n  current--tentant-code: \"XIAN_ZHAO_GAN_ZHI\"\n  feishu-app--id: cli_a93d769369badcb1\n  feishu-app--secret:\n  default--skill-platform-name: ARK_CLAW\n\nFile v1.0.1:skills/smyx_analysis/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3\n\nFile v1.0.1:skills/smyx_common/requirements.txt\n\npydash==8.0.6\nSQLAlchemy==2.0.46\nyaml==6.0.3","readmeExcerpt":"Skill: Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测 Owner: smyx-sunjinhui Summary: Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), th","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_elderly_long_term_immobility_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_elderly_long_term_immobility_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input /path/to/home_multi_zone.mp4\n\n# 分析网络居家多区域监控视频\npython -m scripts.smyx_elderly_long_term_immobility_analysis --url https://example.com/home_multi_zone.mp4\n\n# 显示历史长期静止监测报告（自动触发关键词：查看长期静止历史报告、独居监护报告清单等）\npython -m scripts.smyx_elderly_long_term_immobility_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_elderly_long_term_immobility_analysis --input home.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-elderly-long-term-immobility-analysis\"\ndescription: \"Using fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。\"\nversion: \"1.0.13\"\nlicense: \"MIT-0\"\n---\n\n# 🧓 Elderly Long-Term Immobility Monitoring (>12h) | 老年人长期静止（超12小时）监测\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **老年人长期静止（超12小时）监测** |\n| 🎯 核心目标 | 通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。 |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` |\n\nUsing fixed cameras in multiple zones of a solo-living elder's home (living room, bedroom, kitchen, bathroom, etc.), the system continuously analyzes the video streams to detect human activity (movement, limb actions, gestures, etc.). If no activity is detected within a configured time window (default 12 hours), the system outputs a 'long-term no activity' alert and can notify emergency contacts via app or phone. The skill helps detect immobilization caused by sudden illness (stroke, heart attack), falls, or syncope in time. Application scenarios: solo-living elder households, community elderly-care service centers. The system runs around the clock; when no human activity is detected beyond the preset duration (e.g., 12 hours), it automatically pushes an emergency alert to remind children, community grid workers, or care service institutions to visit. Skill features: when a solo-living elder has a sudden illness or fall and cannot call for help, long unnoticed time can cause severe consequences. AI-based long-term no-activity monitoring can trigger alerts within the golden rescue window and save lives. Can be integrated into smart-home security systems or elderly-care service platforms as the last line of defense for solo-living elders.\n\n通过独居老人家中的多个区域（客厅、卧室、厨房、卫生间等）固定摄像头，连续分析视频流，检测人体活动（包括移动、肢体动作、手势等）。若在设定的时间窗口内（默认12小时）未检测到任何活动，则输出'长期无活动'预警，并可通过APP或电话通知紧急联系人。该技能用于及时发现老人因突发疾病（如中风、心梗）、跌倒或晕厥导致的无法行动状况。应用场景：独居老人家庭、社区养老服务中心。系统全天候运行，当超过预设时间（如12小时）未检测到任何人体活动时，自动推送紧急预警，提醒子女、社区网格员或养老服务机构上门查看。技能特点：独居老人突发疾病或意外摔倒后无法起身求助，长时间未被发现可能造成严重后果。通过AI自动监测长期无活动，可在黄金救援时间内触发预警，挽救生命。该技能可集成到智能家居安防系统或养老服务平台中，成为独居老人安全防护的最后一道防线。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的独居老人安全监测 AI。你的任务是分析家中多个区域（至少客厅和卧室）固定摄像头的连续视频流，检测是否有人体活动（全身移动、四肢动作、手部动作等）。若在连续 12 小时内未检测到任何活动，则输出紧急预警。不要提供健康诊断或具体救援操作方案，仅基于视觉活动检测输出统计与报警结果。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](htt"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-elderly-long-term-immobility-analysis\",\n  \"version\": \"1.0.10\",\n  \"publishedAt\": 1787809239601\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放老年人长期静止（超12小时）监测 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_ELDERLY_LONG_TERM_IMMOBILITY_ANALYSIS` - 老年人长期静止（超12小时）监测\n\n## 输入约束\n\n- 推荐覆盖独居老人家中至少 2 个常驻区域（如客厅 + 卧室），建议加入厨房、卫生间\n- 摄像头建议全天候运行（含红外夜视），固定机位\n- 视频可按区域分段上传，或上传整段长视频\n\n## 关键检测事件\n\n- 人体活动事件（全身移动 / 四肢动作 / 手部动作 / 姿态变化）\n- 最近一次活动时间戳（last_motion_time）\n- 累计无活动时长（idle_duration_sec）\n- 跨区域活动覆盖统计（active_zones）\n\n## 默认安全阈值（可由调用方覆盖）\n\n- 长期静止阈值：12 小时（immobility_threshold_hour）\n- 预警分级：\n  - 6h ≤ idle < 12h → warning\n  - idle ≥ 12h → critical\n  - idle ≥ 24h → emergency\n\n## 输出字段（参考）\n\n- `last_motion_time` - 最近一次检测到活动的时间\n- `idle_duration_hour` - 累计无活动时长（小时）\n- `active_zones` - 监测期内出现过活动的区域列表\n- `immobility_alert` - 是否触发长期静止预警\n- `alert_level` - 预警等级（none / warning / critical / emergency）\n- `alert_message` - 预警文本（如\"独居张爷爷已 14 小时未检测到活动，建议立即联系上门查看\"）\n- `suggested_contacts` - 建议通知的联系人（子女 / 社区网格员 / 养老服务机构）\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":1137,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T06:19:23.534Z","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-10T06:19:23.534Z","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-10T10:50:36.323Z","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"}]}}}