{"id":"90521601-cdd8-4431-8a70-ffe470f8f090","entityType":"agent","slug":"clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a","name":"Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示","canonicalUrl":"https://www.xpersona.co/agent/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a","canonicalPath":"/agent/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a","generatedAt":"2026-10-10T13:54:35.675Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T11:28:25.922Z","emptyReason":null},"description":"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ Skill: Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示 Owner: smyx-sunjinhui Summary: Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressi","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-family-conflict-aftercare-suggest-analysis","sourceUrl":"https://clawhub.ai/smyx-sunjinhui/smyx-family-conflict-aftercare-suggest-analysis","homepage":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/smyx-sunjinhui/smyx-family-conflict-aftercare-suggest-analysis","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":63,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifyin"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T11:28:25.922Z","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-10T11:28:25.922Z","emptyReason":null},"stars":null,"forks":null,"downloads":1464,"packageName":null,"latestVersion":"1.0.8","tractionLabel":"1.5K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T11:28:25.922Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T11:28:25.922Z","lastCrawledAt":"2026-10-10T11:28:25.922Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T11:28:25.922Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.8","createdAt":"2026-09-08T18:28:30.039Z","changelog":"- Version updated from 1.0.12 to 1.0.14. - Documentation in SKILL.md revised with minor text and structure updates. - Obsolete or redundant skill-card.md file removed. - No changes to core features, codebase, or user-facing workflows.","fileCount":31,"zipByteSize":44281},{"version":"1.0.7","createdAt":"2026-08-25T17:05:30.457Z","changelog":"- Updated version number from 1.0.11 to 1.0.12 in SKILL.md. - Removed the skill-card.md file. - No changes to skill functionality or user-facing features.","fileCount":31,"zipByteSize":44543},{"version":"1.0.6","createdAt":"2026-08-21T14:43:29.271Z","changelog":"- Removed the skill-card.md documentation file. - Updated scripts/smyx_common/scripts/config.yaml. - No user-facing functional changes; minor internal or documentation housekeeping.","fileCount":31,"zipByteSize":44227},{"version":"1.0.5","createdAt":"2026-08-13T08:39:34.387Z","changelog":"- Updated version from 1.0.9 to 1.0.11. - Documentation (SKILL.md) updated with expanded instructions and details. - Removed skill-card.md file. - No functional or code changes indicated; changes focus on documentation and resource files.","fileCount":31,"zipByteSize":44464},{"version":"1.0.4","createdAt":"2026-08-04T17:44:37.168Z","changelog":"- Removed the file skill-card.md from the project. - No changes made to the skill logic or functionality.","fileCount":31,"zipByteSize":44375},{"version":"1.0.3","createdAt":"2026-07-28T17:55:29.152Z","changelog":"- Updated skill documentation with a new version number (1.0.9) in SKILL.md. - Removed the file skill-card.md. - Documentation changes only; core functionalities remain unchanged. - No impact on end-user features or workflow.","fileCount":31,"zipByteSize":44390},{"version":"1.0.2","createdAt":"2026-07-14T10:13:27.392Z","changelog":"- Version updated to 1.0.6. - Documentation improvements in SKILL.md for clarity and completeness. - Obsolete file skill-card.md removed. - Minor script adjustments in skills/smyx_common/scripts/util.py.","fileCount":31,"zipByteSize":44291},{"version":"1.0.1","createdAt":"2026-07-05T13:53:27.482Z","changelog":"- Major update: User identity handling is now fully automatic and invisible to end users; identity parameters are never requested or shown to users. - Updated SKILL.md to reflect new internal-only user authentication process and removed any instructions requiring users to input open-id or similar. - Clarified API/data query requirements: all history/report queries must use the cloud API; local/long-term memory or manual aggregation is prohibited. - Improved organization of workflow steps, input/output formats, and clarified strict boundaries for privacy, storage, and notification, including redline handling. - Removed and consolidated redundant documentation; several guidance and reference files were streamlined or removed.","fileCount":31,"zipByteSize":44315}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17cfv2h26b7hq5w47tgfy23xx83z9x6:smyx-family-conflict-aftercare-suggest-analysis","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/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-10T13:54:35.671Z"}},"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-family-conflict-aftercare-suggest-a/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-smyx-sunjinhui-smyx-family-conflict-aftercare-suggest-a/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T11:28:25.922Z","emptyReason":null},"readme":"Skill: Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n\nOwner: smyx-sunjinhui\n\nSummary: Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\n\nTags: latest:1.0.8\n\nVersion history:\n\nv1.0.8 | 2026-09-08T18:28:30.039Z | auto\n\n- Version updated from 1.0.12 to 1.0.14.\n- Documentation in SKILL.md revised with minor text and structure updates.\n- Obsolete or redundant skill-card.md file removed.\n- No changes to core features, codebase, or user-facing workflows.\n\nv1.0.7 | 2026-08-25T17:05:30.457Z | auto\n\n- Updated version number from 1.0.11 to 1.0.12 in SKILL.md.\n- Removed the skill-card.md file.\n- No changes to skill functionality or user-facing features.\n\nv1.0.6 | 2026-08-21T14:43:29.271Z | auto\n\n- Removed the skill-card.md documentation file.\n- Updated scripts/smyx_common/scripts/config.yaml.\n- No user-facing functional changes; minor internal or documentation housekeeping.\n\nv1.0.5 | 2026-08-13T08:39:34.387Z | auto\n\n- Updated version from 1.0.9 to 1.0.11.\n- Documentation (SKILL.md) updated with expanded instructions and details.\n- Removed skill-card.md file.\n- No functional or code changes indicated; changes focus on documentation and resource files.\n\nv1.0.4 | 2026-08-04T17:44:37.168Z | auto\n\n- Removed the file skill-card.md from the project.\n- No changes made to the skill logic or functionality.\n\nv1.0.3 | 2026-07-28T17:55:29.152Z | auto\n\n- Updated skill documentation with a new version number (1.0.9) in SKILL.md.\n- Removed the file skill-card.md.\n- Documentation changes only; core functionalities remain unchanged.\n- No impact on end-user features or workflow.\n\nv1.0.2 | 2026-07-14T10:13:27.392Z | auto\n\n- Version updated to 1.0.6.\n- Documentation improvements in SKILL.md for clarity and completeness.\n- Obsolete file skill-card.md removed.\n- Minor script adjustments in skills/smyx_common/scripts/util.py.\n\nv1.0.1 | 2026-07-05T13:53:27.482Z | auto\n\n- Major update: User identity handling is now fully automatic and invisible to end users; identity parameters are never requested or shown to users.\n- Updated SKILL.md to reflect new internal-only user authentication process and removed any instructions requiring users to input open-id or similar.\n- Clarified API/data query requirements: all history/report queries must use the cloud API; local/long-term memory or manual aggregation is prohibited.\n- Improved organization of workflow steps, input/output formats, and clarified strict boundaries for privacy, storage, and notification, including redline handling.\n- Removed and consolidated redundant documentation; several guidance and reference files were streamlined or removed.\n\nv1.0.0 | 2026-05-27T13:47:07.575Z | auto\n\nsmyx-family-conflict-aftercare-suggest-analysis 1.0.0\n\n- Initial release of a smart aftercare skill for family conflict scenarios using fixed cameras and microphones in common areas.\n- Detects intense disputes (loud arguments, door slams, aggressive gestures) in real time; prompts calming actions (soft music, caring messages) after a conflict and a calm period.\n- Utilizes AI to analyze both audio and video cues, distinguishing conflict from normal activity and assessing severity.\n- Provides non-intrusive support to de-escalate negative emotions and encourage recovery of communication post-conflict.\n- Strict open-id acquisition and security, with clear data-use policies and emergency protocols for critical situations.\n- Supports querying historical aftercare events and integrates with smart speakers or home-security systems for enhanced family care.\n\nArchive index:\n\nArchive v1.0.8: 31 files, 44281 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (2538b), SKILL.md (15766b), 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 (166b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1788892110039\n}\n\nFile v1.0.8:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\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: dev\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nThis skill analyzes audio and video from fixed cameras with microphones in shared family spaces to detect conflict events, wait for a calm window, and provide neutral aftercare suggestions or safety-resource escalation.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to analyze household shared-space audio/video for conflict signals, generate structured reports, and recommend calm-window aftercare actions. It is intended for public household areas such as living rooms, kitchens, and dining rooms, with safety-resource escalation for redline events.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill processes private household audio and video through cloud services.\n\nMitigation: Use only with explicit consent from affected household members and confirm where media and reports are stored, retained, and deleted.\n\nRisk: Unsafe HTTP defaults could expose sensitive media, reports, or tokens.\n\nMitigation: Require HTTPS production endpoints before deployment.\n\nRisk: Silent identity storage can cause reports to be associated with the wrong person on shared devices.\n\nMitigation: Review identity handling before installation and avoid shared-device identity reuse.\n\nRisk: The skill may identify serious household safety events but is not an emergency-response system.\n\nMitigation: Do not rely on the skill for emergency response; route redline events to appropriate safety resources.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis)\n- [Skill demo](https://lifeemergence.com/sample.html)\n- [API documentation](references/api_doc.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, JSON, Guidance]\n\n**Output Format:** [Structured analysis report with conflict signals, aftercare recommendations, safety-resource guidance, and report links]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May output historical report lists and optional saved result files.]\n\n## Skill Version(s):\n\n1.0.8 (source: server release metadata)\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, 44543 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (3034b), SKILL.md (15766b), 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 (166b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.12\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1787677530457\n}\n\nFile v1.0.7:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\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: dev\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nAnalyzes household public-area audio/video to detect family conflict signals, wait for a calm window, and suggest neutral aftercare actions such as soft music, gentle voice prompts, app messages, or safety escalation when red-line indicators appear.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and smart-home developers can use this skill to process living-room, kitchen, or dining-room camera and microphone inputs for conflict event detection, calm-window assessment, aftercare recommendations, and historical report lookup. The skill is intended for household public spaces with consent and is not a substitute for counseling, emergency response, or domestic-safety services.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive household audio/video may be processed through cloud services and report history.\n\nMitigation: Use only with consent from household members, verify backend endpoints, and confirm retention and report-access controls before installation.\n\nRisk: Hidden account and token persistence may affect privacy and access control.\n\nMitigation: Review identity and token storage behavior before deployment and ensure users can understand and control report association.\n\nRisk: Deployment in private rooms, around minors, or in domestic safety situations can create serious privacy and safety concerns.\n\nMitigation: Limit use to authorized household public spaces and require stronger controls and clear legal authorization for minors or domestic-safety contexts.\n\nRisk: Aftercare prompts during active or high-risk conflict could worsen a situation.\n\nMitigation: Require calm-window gating for aftercare and route red-line indicators such as suspected physical violence, dangerous objects, injury signs, or minors present to safety-resource guidance.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis)\n- [API Documentation](artifact/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown or JSON-like structured analysis with event fields, recommendations, safety resources, report links, and optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Supports local file or URL inputs, history listing, detail-level selection, and optional output-file writing.]\n\n## Skill Version(s):\n\n1.0.7 (source: server release metadata; artifact SKILL.md frontmatter lists 1.0.12)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 44227 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (2401b), SKILL.md (15766b), 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 (166b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1787323409271\n}\n\nFile v1.0.6:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\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: dev\n\nFile v1.0.6:skill-card.md\n\n## Description:\n\nAnalyzes family public-area camera and microphone media to detect conflict signals, assess calm-window status, and produce aftercare or safety-path suggestions.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and developers use this skill to process household public-area audio/video inputs for conflict-event detection, calm-window assessment, aftercare prompts, safety-path escalation guidance, and historical report retrieval.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive household camera and microphone media may be sent to remote services for processing.\n\nMitigation: Use only with explicit household consent, verified HTTPS production endpoints, and clear controls for disabling processing and limiting history access.\n\nRisk: Identity-linked history reports and local token persistence can expose sensitive family-conflict records.\n\nMitigation: Restrict report access to the intended household owner, provide deletion and opt-out controls, and review local token storage before deployment.\n\nRisk: Aftercare prompts during active or severe conflict could increase safety risk.\n\nMitigation: Require the calm-window gate before aftercare, and route suspected violence, minors present, weapons, or injury signals to safety resources instead of aftercare.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis)\n- [API documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis reports with report links and optional saved output files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May query remote APIs for analysis results and identity-linked history reports.]\n\n## Skill Version(s):\n\n1.0.6 (source: server release metadata)\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.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, 44464 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (2955b), SKILL.md (15766b), 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 (166b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.11\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1786610374387\n}\n\nFile v1.0.5:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\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:\n\nAnalyzes household public-area audio and video for conflict signals, waits for a calm window, and returns neutral aftercare suggestions or safety-resource escalation when red-line signals appear.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[smyx-sunjinhui](https://clawhub.ai/user/smyx-sunjinhui)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and smart-home integrators use this skill to process household public-area camera and microphone inputs, produce structured conflict-monitoring reports, and suggest neutral post-conflict aftercare actions after a calm window. It is intended for event detection and aftercare prompts, not psychological counseling or domestic-violence intervention.\n\n### Deployment Geography for Use:\n\nGlobal, with jurisdiction-specific emergency resources configured before use.\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive household audio/video may be uploaded to cloud APIs and retained in reports.\n\nMitigation: Use only with informed consent from affected household members, limit deployment to approved public household areas, and confirm deletion paths for uploaded media and cloud reports.\n\nRisk: The skill can silently create or reuse local identities and store tokens in a workspace database.\n\nMitigation: Review the workspace data directory before and after use, rotate or remove stored tokens when access is no longer needed, and document how local records are deleted.\n\nRisk: Safety-resource guidance can be wrong outside the configured jurisdiction.\n\nMitigation: Configure jurisdiction-appropriate emergency and domestic-violence resources before deployment and verify escalation behavior for red-line events.\n\nRisk: False positives or poorly timed prompts could escalate a household conflict.\n\nMitigation: Require the documented calm-window checks, provide an opt-out or disable control, cap repeated prompts, and keep aftercare messages neutral.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis)\n- [API interface documentation](references/api_doc.md)\n- [Skill demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown-oriented text with JSON structured report content and report links.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Can save the returned report text to a user-specified output file and can query cloud-stored historical reports.]\n\n## Skill Version(s):\n\n1.0.5 (source: server-resolved release metadata; artifact frontmatter says 1.0.11)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 44375 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (2655b), SKILL.md (15765b), 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 (166b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1785865477168\n}\n\nFile v1.0.4:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\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:\n\nAnalyzes fixed-camera household audio/video from public family areas to detect conflict signals, determine when a calm window has been reached, and produce neutral aftercare suggestions or safety-resource escalation.\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 smart-home developers and integrators use this skill to process household public-area media for conflict-event reports, calm-window status, aftercare action suggestions, and historical report lookup. It is intended for non-clinical aftercare prompts and safety-resource routing, not relationship scoring or therapy.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Sensitive household audio/video may be sent to cloud APIs and linked to persistent identity or token data.\n\nMitigation: Deploy only with informed consent from affected household members, confirm account linkage and deletion controls, and review retention behavior before use.\n\nRisk: In-home monitoring can overreach into private spaces or retain intimate conversation data.\n\nMitigation: Limit deployment to public household areas, avoid bedrooms, bathrooms, and children's private rooms, and minimize retained raw media in favor of event metrics and short-lived clips.\n\nRisk: Aftercare prompts during active or violent conflicts could increase harm.\n\nMitigation: Trigger prompts only after the calm-window criteria are met, route redline events to safety resources, and keep all wording neutral and non-accusatory.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis)\n- [API Interface Documentation](artifact/references/api_doc.md)\n- [Skill Demo](https://lifeemergence.com/sample.html)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown and JSON-style structured analysis reports with command examples]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include conflict levels, observed audio/video signals, calm-window status, aftercare recommendations, safety resources, and report links.]\n\n## Skill Version(s):\n\n1.0.4 (source: server release metadata; artifact frontmatter says 1.0.9)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.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, 44390 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (2849b), SKILL.md (15765b), 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 (166b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.9\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1785261329152\n}\n\nFile v1.0.3:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\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 household public-area audio-video to detect family conflict signals and produce structured reports with calm-window aftercare suggestions or safety-resource escalation when redline conditions appear. <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 developers use this skill to process family living-room, kitchen, or dining-area video inputs, query prior reports, and receive structured conflict-level, calm-window, aftercare, and safety-resource guidance. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Household microphone-enabled video and family conflict reports are highly sensitive and may be processed or retained in cloud services. <br>\nMitigation: Install only with explicit household consent, restrict use to public household areas, protect report links and local files, and confirm retention and deletion controls before use. <br>\nRisk: Hidden identity handling, local token persistence, and cloud history access can make it hard for users to understand or control identity-linked report history. <br>\nMitigation: Prefer deployments with visible identity selection, clear opt-out or local-only options, and documented history deletion and retention behavior. <br>\nRisk: Conflict detection and aftercare suggestions may be incorrect or inappropriate during safety-critical family situations. <br>\nMitigation: Review outputs before acting on them, do not treat the skill as counseling or relationship scoring, and route suspected violence, minors in danger, injuries, or dangerous objects to safety resources rather than aftercare prompts. <br>\n\n\n## Reference(s): <br>\n- [API interface documentation](artifact/references/api_doc.md) <br>\n- [Shared analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, Markdown, JSON, Shell commands, Guidance] <br>\n**Output Format:** [Markdown and JSON-style structured analysis reports with optional report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can output current analysis results, saved report files, or Markdown tables for cloud history queries.] <br>\n\n## Skill Version(s): <br>\n1.0.3 (source: ClawHub release metadata; artifact frontmatter states 1.0.9) <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, 44291 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (2653b), SKILL.md (15765b), 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 (166b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.6\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1784024007392\n}\n\nFile v1.0.2:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\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>\nAnalyzes household public-area audio/video to detect family conflict signals, wait for a calm window, and produce aftercare suggestions or safety escalation guidance. <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 developers use this skill to analyze household living-room, kitchen, or dining-area audio/video for conflict events and receive structured aftercare guidance, report links, or safety-resource escalation when redline signals are present. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive household conflict audio/video or URLs may be sent to the provider's cloud service and linked to a reused or created identity. <br>\nMitigation: Use only with informed consent from recorded household members, and confirm report visibility, retention, deletion, and access controls before deployment. <br>\nRisk: Stored tokens, report links, or history could expose private family conflict records. <br>\nMitigation: Protect tokens and report links, restrict history retrieval to authorized users, and document how local and cloud history can be deleted. <br>\nRisk: Aftercare prompts could be harmful if triggered during an active or unsafe conflict. <br>\nMitigation: Require the calm-window and redline checks described by the artifact before triggering aftercare; route suspected violence, minors in conflict, dangerous objects, or injury signs to safety resources instead. <br>\n\n\n## Reference(s): <br>\n- [API documentation](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-family-conflict-aftercare-suggest-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, guidance] <br>\n**Output Format:** [Markdown report or JSON with conflict signals, aftercare recommendations, safety resources, and report links] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May include historical report tables and safety-resource escalation guidance.] <br>\n\n## Skill Version(s): <br>\n1.0.2 (source: server release metadata; artifact frontmatter reports 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.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, 44315 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3738b), skill-card.md (2885b), SKILL.md (15765b), 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 (166b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.5\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色要点 | 说明 |\n|---|---|\n| 说明 1 | **假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。** |\n\n## 🎬 技能演示 | Skill Demo\n\n[▶️ 点击查看技能使用介绍](https://lifeemergence.com/sample.html)\n\n---\n\n## 🎯 任务目标 | Goals\n### 1. 🧩 技能用途\n\n基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n\n### 2. 🛠️ 能力范围\n\n| 序号 | 具体能力 |\n|---:|---|\n| 1 | 分贝峰值与持续时长检测 |\n| 2 | 喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分 |\n| 3 | 摔门撞击声 + 低频共振识别 |\n| 4 | 物体砸落识别 |\n| 5 | 哭泣声检测 |\n| 6 | 大幅甩手挥手势识别 |\n| 7 | 来回踱步检测 |\n| 8 | 人物离开画面检测 |\n| 9 | 两人最近物理距离测算 |\n| 10 | 转身背对持续时长统计 |\n| 11 | 平静窗口判定（多条件 AND） |\n| 12 | **疑似肢体暴力红线识别**（推搡/挥拳/抓握） |\n| 13 | **冲突现场未成年人在场识别** |\n| 14 | **危险物（刀具/重物）可见识别** |\n| 15 | 疑似受伤征兆识别（摔倒/抚摸面部/蜷缩） |\n| 16 | 缓和动作 3 秒前导铃声 |\n| 17 | 缓和文案中立性校验（**不指责任何一方**） |\n| 18 | 家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出 |\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_family_conflict_aftercare_suggest_analysis --list\n```\n\n| 类型 | 要求 |\n|---|---|\n| ✅ 必须 | 使用 `python -m scripts.smyx_family_conflict_aftercare_suggest_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 | 🔐 获取 open-id（强制执行） | 无需用户输入任何身份参数；不在回复中展示内部身份值 |\n| 3 | ⚙️ 执行夫妻/家人冲突后情绪缓和提示 | 调用 `-m scripts.smyx_family_conflict_aftercare_suggest_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_family_conflict_aftercare_suggest_analysis.py`](scripts/smyx_family_conflict_aftercare_suggest_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| 🔎 使用提醒 | **冲突中绝不介入**：`intense_conflict` 期间播放音乐或语音会激化情绪；**必须等待平静窗口** |\n| 📁 格式支持 | 与正常高分贝场景区分：聚会、大笑、儿童欢闹、看球赛——支持家庭主用户**整日关闭** |\n| 🔎 使用提醒 | 红线约束 |\n| 🔎 使用提醒 | **禁止**部署在卧室、卫生间、儿童独立房间 |\n| 🔎 使用提醒 | **禁止**录制并长期存储家庭对话原始音频（仅保留指标 + ≤ 24h 事件片段） |\n| 🔎 使用提醒 | **禁止**做\"婚姻/亲子关系评分\"或\"性格分析\" |\n| 🔎 使用提醒 | **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径 |\n| 🔎 使用提醒 | **禁止**将冲突事件转发给除家庭主用户外的第三方 |\n| 🔎 使用提醒 | **必须**：缓和动作前 3 秒柔和铃声前导避免突然出声二次惊吓；缓和文案**中立、不指责任何一方**；同一事件单日触发**上限 2 次** |\n| 🔎 使用提醒 | **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线 + **110** 报警提示；有未成年人在场优先级最高 |\n| 🚫 脚本限制 | 禁止临时生成脚本，只能用技能本身的脚本 |\n| 🌐 网络地址 | 传入的网络地址参数，不需要下载本地，默认地址都是公网地址，api 服务会自动下载 |\n| 📜 报告输出 | 当显示历史事件清单的时候，从接口返回 json 数据中提取字段  作为超链接地址，且自动转化为如下 Markdown |\n| 📜 报告输出 | 表格输出示例 |\n\n## 🧰 使用示例 | Examples\n```bash\n# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json\n```\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1783259607482\n}\n\nFile v1.0.1:references/api_doc.md\n\n# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"family_group_app\"}`）\n- `recommend_action` - 建议动作（trigger_soft_music / push_gentle_message / observe_only / escalate_safety_path）\n- `safety_resource` - 当 critical_redline 触发时附**安全资源**：\n    - 反家暴热线 **12338**\n    - 全国妇联权益部\n    - 报警 **110**（如有肢体暴力 + 儿童在场）\n    - 全国心理援助热线 **400-161-9995**\n    - 当地社区社工 / 司法所\n\n## 强制约束与红线\n\n- ❌ **禁止**部署在卧室、卫生间、儿童独立房间\n- ❌ **禁止**录制并长期存储家庭对话原始音频；建议仅保留**分贝/事件指标**和不超过 24 小时的事件片段\n- ❌ **禁止**做任何\"婚姻/亲子关系评分\"或\"性格分析\"\n- ❌ **禁止**在 `intense_conflict` 期间播放音乐或语音介入（会激化情绪）；**必须等待平静窗口**\n- ❌ **禁止**对疑似肢体暴力进行\"缓和处理\"——必须独立走**安全风险**路径\n- ❌ **禁止**将冲突事件转发给除家庭主用户外的第三方（亲戚、邻居、外人）\n- ✅ **必须**支持家庭主用户：一键关闭今日 / 整日关闭（用于聚会等正常高分贝场景）/ 永久退出\n- ✅ **必须**在播放缓和动作前给予 3 秒非语言提示（如柔和铃声），避免突然出声二次惊吓\n- ✅ **必须**在 `critical_redline` 触发时**立即**推送 **12338** 反家暴热线和 **110** 报警提示；有未成年人在场时优先级最高\n- ✅ 缓和文案必须**中立、不指责任何一方**，避免\"是 XX 错了\"等评判性语言\n- ✅ 同一事件单日缓和动作触发**上限 2 次**，避免过度介入\n\n> 仅输出基于音视频的**客观冲突事件检测和缓和动作建议**，**不构成婚姻/亲子关系咨询或心理治疗**；任何疑似家庭暴力情况请立即拨打 **12338 反家暴热线**或 **110**，并联系专业社工/心理咨询师。\n\nFile v1.0.1: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.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\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.1:skill-card.md\n\n## Description: <br>\nMonitors family common-area audio/video for conflict signals and, after a calm window, produces structured reports and aftercare suggestions such as soft music, neutral prompts, app messages, or safety-resource escalation. <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 smart-home and family-safety users can use this skill to analyze fixed-camera audio/video from shared family spaces, retrieve cloud reports, and suggest nonintrusive aftercare only after a conflict has calmed. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Sensitive household audio/video and history may be sent to the publisher's cloud service and associated with a persistent identity. <br>\nMitigation: Use only after all household members consent, confirm retention and deletion controls, and restrict deployment to shared spaces where monitoring is expected. <br>\nRisk: Automatic speaker or app interventions could worsen a conflict or disclose sensitive events to unintended viewers. <br>\nMitigation: Enable interventions only after reviewing who receives reports or prompts, and require the documented calm-window and redline safety handling before any aftercare action. <br>\nRisk: The skill handles family-conflict signals but is not psychological, legal, or emergency-response advice. <br>\nMitigation: Treat outputs as event-detection and aftercare suggestions; route suspected violence, child involvement, dangerous objects, or injury to the documented safety-resource path. <br>\n\n\n## Reference(s): <br>\n- [Family conflict aftercare API documentation](artifact/references/api_doc.md) <br>\n- [Shared analysis API documentation](artifact/skills/smyx_analysis/references/api_doc.md) <br>\n- [Skill demo](https://lifeemergence.com/sample.html) <br>\n- [ClawHub skill page](https://clawhub.ai/smyx-sunjinhui/skills/smyx-family-conflict-aftercare-suggest-analysis) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown and JSON-like structured text with report links and optional shell command invocations] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Uses cloud API calls for analysis and history retrieval; may save a local output file when requested.] <br>\n\n## Skill Version(s): <br>\n1.0.1 (source: server release evidence; artifact frontmatter reports 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.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\nPyYAML==6.0.3\n\nArchive v1.0.0: 32 files, 40883 bytes\n\nFiles: references/api_doc.md (6698b), scripts/__init__.py (55b), scripts/api_service.py (1704b), scripts/config.py (702b), scripts/config.yaml (3b), scripts/skill.py (589b), scripts/smyx_family_conflict_aftercare_suggest_analysis.py (3749b), skill-card.md (3265b), SKILL.md (18744b), 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 (6529b), skills/smyx_analysis/scripts/smyx_analysis.py (3706b), 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 (22771b), 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 (15959b), _meta.json (166b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\"\nversion: \"1.0.0\"\n---\n\n# Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🎯 AI 角色\n\n**假设你是一个专业的家庭情绪缓和 AI。你的任务是分析家庭公共活动区域（客厅 / 厨房 / 餐厅）固定摄像头的音视频，检测冲突事件：高分贝争吵（≥ 75 dB 且持续 ≥ 10 秒，与正常大笑/儿童欢闹区分）、摔门（撞击声 + 短暂低频共振）、物体砸落、大幅甩手、来回踱步、转身背对。当冲突结束后**连续 10 分钟（默认值，可配置）静默且无新冲突**，触发缓和动作：智能音箱播放轻柔音乐 / 温柔语音提示 / 家庭群 APP 关怀语推送。不提供心理咨询，仅输出基于音视频的事件检测和缓和动作建议；冲突中**不介入**避免激化；遇到疑似肢体暴力、未成年人在场、危险物等红线信号**立即转走\"安全风险\"路径**，推送 12338 反家暴热线 + 110 报警 + 400-161-9995 全国心理援助。**\n\n## 任务目标\n\n- 本 Skill 用于：基于家庭客厅/厨房/餐厅固定摄像头（**必须含麦克风**）音视频，识别冲突事件（核心音频 7 项：分贝峰值 / 持续 ≥ 75 dB 时长 / 喊叫声纹 / 摔门 / 物体砸落 / 哭泣声 / 静音时长；辅助视频 5 项：大幅甩手 / 来回踱步 / 有人离开画面 / 两人最近距离 / 转身背对时长）→ 5 档冲突等级（none / mild_dispute / conflict / intense_conflict / **critical_redline**）→ **平静窗口判定**（默认 10 min 静默 + 无新冲突 + 物理距离回归 + 至少一人回到画面）→ 触发 3 类缓和动作（智能音箱轻柔音乐 / 温柔语音 / 家庭群 APP 关怀语，**单日上限 2 次**避免过度介入）→ 红线触发立即转**安全资源路径**（12338 / 110 / 400-161-9995 / 妇联权益部 / 当地社工司法所）\n- 能力包含：分贝峰值与持续时长检测、喊叫/嘶吼声纹与正常大笑/儿童欢闹声区分、摔门撞击声 + 低频共振识别、物体砸落识别、哭泣声检测、大幅甩手挥手势识别、来回踱步检测、人物离开画面检测、两人最近物理距离测算、转身背对持续时长统计、平静窗口判定（多条件 AND）、**疑似肢体暴力红线识别**（推搡/挥拳/抓握）、**冲突现场未成年人在场识别**、**危险物（刀具/重物）可见识别**、疑似受伤征兆识别（摔倒/抚摸面部/蜷缩）、缓和动作 3 秒前导铃声、缓和文案中立性校验（**不指责任何一方**）、家庭主用户一键关闭今日 / 整日关闭（聚会场景）/ 永久退出\n- 触发条件:\n    1. **默认触发**：当用户提供家庭客厅/厨房/餐厅固定摄像头音视频 URL 或文件需要分析时，默认触发本技能进行夫妻/家人冲突后情绪缓和提示\n    2. 当用户明确提及夫妻吵架、家人冲突、摔门、家里争执后、家庭情绪缓和、智能音箱关怀等关键词，并且上传了音视频文件\n    3. 当用户提及以下关键词时，**自动触发历史报告查询功能*...","readmeExcerpt":"Skill: Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示 Owner: smyx-sunjinhui Summary: Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressi","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json"},{"language":"bash","snippet":"python -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list"},{"language":"text","snippet":"requests>=2.28.0"},{"language":"bash","snippet":"# 分析本地家庭公共区域音视频\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input /path/to/livingroom.mp4\n\n# 分析网络家庭公共区域音视频/实时流\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --url https://example.com/livingroom.mp4\n\n# 显示历史家庭冲突缓和事件清单（自动触发关键词：查看家庭冲突缓和历史报告、家庭情绪事件清单等）\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --list\n\n# 输出精简报告\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --detail basic\n\n# 保存结果到文件\npython -m scripts.smyx_family_conflict_aftercare_suggest_analysis --input lr.mp4 --output result.json"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: \"smyx-family-conflict-aftercare-suggest-analysis\"\ndescription: \"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？\"\nversion: \"1.0.14\"\nlicense: \"MIT-0\"\n---\n\n# 🕊️ Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示\n> **智能分析中枢** · 图片/视频智能分析 · 结构化报告 · 历史报告云端查询\n\n---\n\n## 🧭 技能概览 | Overview\n\n| 模块 | 内容 |\n|---|---|\n| 🏷️ 技能名称 | **夫妻/家人冲突后情绪缓和提示** |\n| 🎯 核心目标 | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ |\n| 🖼️ 输入类型 | 图片、视频、本地文件、网络 URL |\n| 📝 输出能力 | 结构化分析报告、识别/监测结果、建议与报告链接 |\n| 🧩 场景码 | `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` |\n\nThrough fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. After a conflict ends (both audio and video remain calm beyond a preset window, default 10 minutes) and no new conflict occurs, the system automatically outputs an aftercare prompt: playing soft music via a smart speaker or pushing caring messages through a mobile APP (such as 'Need a cup of tea?', 'Take a deep breath, speak slowly'). This skill aims to help family members soothe their emotions after intense arguments and restore communication. Application scenarios: family living rooms, kitchens, dining rooms and other conflict-prone areas. The system provides non-intrusive emotional comfort after conflicts. Skill features: family emotions easily continue to deteriorate after a conflict; appropriate external cues (music, caring words) can break the negative loop and encourage calm communication. AI-based automatic conflict detection with timely soothing helps maintain family harmony, especially for families with teenagers or members prone to emotional escalation. Can be integrated into smart speakers or home-security systems as a distinctive family-care feature.\n\n通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？'、'深呼吸，慢慢说'）。该技能旨在帮助家庭成员在激烈争执后平复情绪，促进沟通恢复。应用场景：家庭客厅、厨房、餐厅等易发生冲突的区域。系统在冲突后提供非介入式情绪安抚。技能特点：家庭冲突后情绪易持续恶化，适当的外界提示（如音乐、关怀语）可打断负面情绪循环，促进冷静沟通。通过AI自动识别冲突并适时提供安抚，有助于维护家庭和谐，尤其适合有青少年或情绪易失控成员的家庭。该技能可集成到智能音箱或家庭安防系统中，成为家庭关怀的特色功能。\n\n## 🤖 AI 角色 | AI Role\n| 角色"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7cyxkr2ymf7zwsrybpedg8xx83ywrj\",\n  \"slug\": \"smyx-family-conflict-aftercare-suggest-analysis\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1788892110039\n}"},{"path":"references/api_doc.md","content":"# API 接口文档\n\n此处用于存放夫妻/家人冲突后情绪缓和提示 API 的接口文档，待后续补充。\n\n## 接口规范\n\n- 基础地址：由 smyx_common 配置统一管理\n- 认证方式：API Key 鉴权\n- 响应格式：JSON\n\n## 主要接口\n\n1. `/web/health-analysis/v2/start-health-analysis` - 启动冲突检测 + 平静窗口监测任务\n2. `/web/health-analysis/v2/get-health-analysis-result` - 获取冲突事件 + 冷静后缓和动作建议\n3. `/web/health-analysis/page-health-analysis-result` - 分页查询历史冲突缓和提示事件清单\n4. `/health/order/api/getReportDetailExport?id={id}` - 导出完整事件报告\n5. （可选）`/web/companion/v2/trigger-aftercare-action` - 触发缓和动作（智能音箱轻柔音乐 / 家庭群关怀语推送）\n\n## 场景代码\n\n- `SMYX_FAMILY_CONFLICT_AFTERCARE_SUGGEST_ANALYSIS` - 夫妻/家人冲突后情绪缓和提示\n\n## 输入约束\n\n- 摄像头 + 麦克风：家庭客厅 / 厨房 / 餐厅等公共活动区域，**严禁部署在卧室、卫生间、儿童独立房间**\n- 帧率 ≥ 5 FPS（推荐 10 FPS）；分辨率 ≥ 480p\n- 音频：采样率 ≥ 16kHz，**必需**（用于分贝检测、音色情绪分析、摔门撞击声识别）\n- 视频时长：实时流接入；离线分析建议 ≥ 30 分钟（覆盖完整冲突 → 平静窗口）\n- ROI 标定：公共活动区域，识别但**不录制**或**仅缓存 ≤ 24 小时**即清理\n- **必须**支持家庭主用户一句话/物理按键**整日关闭**功能（用于聚会等正常高分贝场景）\n\n## 关键观测信号\n\n### 音频（核心）\n- `db_level_peak` - 分贝峰值（dBA）\n- `db_level_sustained_duration_sec` - 持续 ≥ 阈值（默认 75 dB）的时长\n- `shouting_voice_detected` - 喊叫/嘶吼声纹检测（与正常大笑、儿童欢闹声区分）\n- `door_slam_event_count` - 摔门事件次数（撞击声 + 短暂低频共振）\n- `object_impact_event_count` - 物体砸落/拍桌等撞击声\n- `crying_audio_detected` - 哭泣声检测（成人或儿童）\n- `silence_duration_sec` - 当前连续静音 / 低音量时长（用于平静窗口判定）\n\n### 视频（辅助）\n- `arm_swing_aggressive_count` - 大幅甩手 / 挥手势次数\n- `pacing_back_and_forth` - 来回踱步事件（参考指标）\n- `person_walked_out_event` - 有人离开画面（往往是冲突高潮）\n- `physical_distance_minimum_m` - 两人最近物理距离（用于评估冲突烈度）\n- `body_facing_away_duration_sec` - 转身背对持续时长（冷战指标）\n\n### ⚠️ 红线信号（必须独立优先级输出，不可用缓和动作处理）\n- `physical_violence_suspected` - **疑似肢体暴力**（推搡 / 挥拳 / 抓握等）\n- `child_present_during_conflict` - 冲突现场**有未成年人**在场\n- `weapon_or_dangerous_object_visible` - 出现刀具 / 重物等危险物\n- `injury_visual_signs` - 出现摔倒 / 抚摸面部 / 蜷缩等疑似受伤征兆\n\n## 阈值与冲突等级（默认值，可在配置中覆盖）\n\n- `db_peak < 70 dB` 且无摔门 → **none**（无冲突）\n- `db_peak 70-80 dB` 且 `sustained_duration ≥ 10s` → **mild_dispute**（轻度争论）\n- `db_peak ≥ 80 dB` 且 `sustained_duration ≥ 10s` 或 摔门 1 次 → **conflict**（明显冲突）\n- `db_peak ≥ 90 dB` 或 多次摔门/砸物 或 大幅甩手 ≥ 3 → **intense_conflict**（激烈冲突）\n- 任一红线信号触发 → **critical_redline**（**立即转走\"安全风险\"路径**，不进入缓和流程）\n\n## 平静窗口判定（aftercare 触发前置条件）\n\n- `silence_duration_sec ≥ 600`（默认 10 分钟，可配置）\n- 期间无新的 `mild_dispute / conflict / intense_conflict` 事件\n- 物理距离回归常态 或 至少一人回到画面内\n- 当**所有**条件满足才触发缓和动作\n\n## 输出字段（参考）\n\n- `event_id` / `conflict_start_time` / `conflict_end_time` / `conflict_duration_min`\n- `audio_signals` / `video_signals`\n- `conflict_level` - 冲突等级（none / mild_dispute / conflict / intense_conflict / critical_redline）\n- `redline_flags` - 红线信号清单\n- `calm_window_status` - 平静窗口状态（observing / met / reset_by_new_conflict）\n- `calm_window_duration_sec`\n- `aftercare_actions` - 缓和动作列表（每项含 action_type / message / target，例如：\n    - `{action_type: \"smart_speaker_soft_music\", message: \"为家里放一首舒缓的轻音乐\", target: \"living_room_speaker\"}`\n    - `{action_type: \"smart_speaker_gentle_voice\", message: \"需要一杯茶吗？深呼吸，慢慢说，你们都是这个家最重要的人~\", target: \"living_room_speaker\"}`\n    - `{action_type: \"family_app_push\", message: \"👋 给家人一个台阶：不如先各自冷静 5 分钟，再坐下来听对方说完三句话\", target: \"fam"},{"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":"Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressive arm-swing actions. | 通过家庭客厅或厨房的固定摄像头（含麦克风），实时监测家庭成员间的冲突事件，识别高分贝争吵（声音强度超过阈值且持续时间>10秒）、摔门（物体撞击声+门框振动）、甩手等激烈肢体动作。当冲突事件结束后（音频和视频均平静超过预设时间，默认10分钟）且无新冲突，系统自动输出缓和提示：通过智能音箱播放轻柔音乐，或通过手机APP推送关怀语（如'需要一杯茶吗？ Skill: Family Conflict Aftercare Suggestion | 夫妻/家人冲突后情绪缓和提示 Owner: smyx-sunjinhui Summary: Through fixed cameras (with microphones) in the family living room or kitchen, the system monitors conflict events among family members in real time, identifying high-decibel arguments (sound intensity exceeding a threshold and lasting more than 10 seconds), door slams (object impact sound + door-frame vibration), and aggressi","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1289,"uniquenessScore":48,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T11:28:25.922Z","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-10T11:28:25.922Z","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-10T13:54:35.675Z","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"}]}}}