尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證The Ring doorbell works the night shift for families living with dementia. Voice first, caregiver second, alarm never. Built for the Build, Ship, Shape: Amazon Developer Hackathon.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Nightlight learns a household's normal night, answers an unusual 3am doorway event with a recorded family voice played at the Ring chime, and wakes the caregiver only if that does not settle it.
Across 2,936 nights of 34 real homes from the public CASAS corpus, a standard door alarm wakes the caregiver 14,068 times. Nightlight wakes them 774, a 94.5 percent reduction, with 365 doorway moments settled by the recorded voice alone.檢視完整 README ↗The Ring doorbell works the night shift for families living with dementia: it learns the household's normal nights, answers an unusual 3am doorway with a recorded family voice, and wakes the caregiver only if that does not settle it.
/api/summary, /api/morning-note, or the MCP endpoint at /mcp)POST /webhooks/ring. Every delivery is HMAC SHA-256 verified and deduplicated by request id (packages/ring-webhook-kit, published on npm as ring-webhook-kit, MIT, zero dependencies).packages/engine/src/baseline.ts, WARMUP_DAYS = 7).apps/backend/src/voice.ts).packages/engine/src/incidents.ts, defaults in packages/engine/src/types.ts).apps/backend/src/summaries.ts)./mcp, so Alexa+ or any MCP client can ask how the night went or acknowledge an incident hands-free (apps/backend/src/mcp.ts). An Agent Skill in skills/nightlight/SKILL.md tells an agent how to use it.Detection is deterministic and explainable end to end. Language models never decide anything; they only phrase summaries.
Six in ten people living with dementia will wander at least once, and night-time wandering occurs in roughly 60 percent of cases [1][2]. The published answer is detect-and-alert: a nighttime monitor that woke the caregiver reduced injuries and unattended exits [5], and its companion trial of 49 caregivers, measured by actigraphy, found their sleep did not improve on any measure [6]. That matters because 70 percent of caregivers who moved a relative into care cited nocturnal problems in that decision [4], and nearly half of dementia caregivers report trouble falling back to sleep once woken [3]. Nightlight changes what happens in the seconds after detection, so the caregiver alert becomes the escalation path rather than the first response.
flowchart LR
Ring["Ring doorbell and Partner API<br/>(webhooks, event history, chime audio)"]
subgraph Lambda["Backend on AWS Lambda (Fastify)"]
Intake["POST /webhooks/ring<br/>ring-webhook-kit: HMAC verify, dedupe"]
Engine["Night engine<br/>baseline, scoring, incident state machine"]
Voice["Voice chain<br/>family recording, then Amazon Polly"]
API["Caregiver API<br/>/api/summary, /api/morning-note"]
MCP["MCP server /mcp<br/>spec 2025-11-25, Streamable HTTP"]
end
DDB[("Amazon DynamoDB<br/>event log, acks, exactly-once effects")]
Bedrock["Amazon Bedrock (Claude)<br/>phrases the morning note"]
Web["Web app<br/>Amazon S3 + CloudFront"]
Alexa["Alexa+ or any MCP client"]
Agent["Week Review agent<br/>Strands Agents on Amazon Bedrock AgentCore"]
Ring -->|signed webhook| Intake --> Engine
Engine <--> DDB
Engine -->|unusual 3am doorway| Voice -->|play at the chime| Ring
Engine -->|if the voice does not settle it| Caregiver["Caregiver notification"]
API --> Bedrock
Web --> API
Alexa --> MCP
Agent --> MCP
Agent --> Bedrock
oauth.ring.com; devices, event history, snapshots and chime audio playback against api.amazonvision.com (apps/backend/src/ring.ts). Three of three read endpoints answered on 2026-09-17 with a Ring Playground token; the redacted capture is docs/RING_LIVE.md.docs/EVAL.md).packages/simulator), replayed through the real signed webhook route. Every response and screen carries a Simulated label./webhooks/ring and shows one accepted, one tampered byte rejected with 401, and one redelivery ignored as a duplicate. They land in a sandbox household (POST /api/ring/simulate).apps/backend/src/adapters.ts).apps/backend/test/voice.test.ts.Measured on the public CASAS HH corpus (Zenodo record 15708568, CC-BY-4.0), replayed through the production engine. Every number below is read from apps/eval/results/casas-hh.json, and apps/eval/test/claims.test.ts re-derives each one from that file and checks it appears here.
| Measure | Value | Field in apps/eval/results/casas-hh.json |
|---|---|---|
| Real homes | 34 | totals.homes |
| Nights judged | 2,936 | totals.nightsJudged |
| Caregiver wakes, threshold door alarm | 14,068 | totals.thresholdAlarm.wakes |
| Caregiver wakes, Nightlight | 774 | totals.nightlight.caregiverWakes |
| Wake reduction | 94.5 percent | recomputed from the two wake counts |
| Nights disturbed, alarm vs Nightlight | 1,068 vs 319 | totals.thresholdAlarm.nightsDisturbed, totals.nightlight.nightsDisturbed |
| Doorway moments settled by the voice alone | 365 | totals.nightlight.voiceOnlyResolved |
What the restraint cost, on the same data: of 34 resident-labeled night-time exits, Nightlight flagged 7 as unusual (totals.labeledNightExits.nightlightNoticed). Of the 27 it did not flag, 26 were exits the resident came back from within thirty minutes, by the corpus's own label (totals.labeledNightExits.missedByNightlightButResidentReturnedWithin30Min). The misses concentrate in homes where the door already opens many times a night. Method and per-home table: docs/EVAL.md.
Other measured figures:
docs/EVIDENCE.md, section 7).docs/ACCESSIBILITY.md).docs/RING_LIVE.md).All sources are in docs/EVIDENCE.md, with the corrections made during a pre-submission audit.
Node 20 or newer.
npm install
npm test # builds the packages, then runs every vitest suite
npm run demo # replays the simulated month through the engine and prints the nights
npm run dev # backend plus MCP server on http://127.0.0.1:8787
npm run web:dev # the site, against the backend
Try the local API:
curl -X POST http://127.0.0.1:8787/api/demo/replay -H "content-type: application/json" -d "{}"
curl http://127.0.0.1:8787/api/summary
curl http://127.0.0.1:8787/api/morning-note
A household of your own on the live API, no account needed. Nothing about the key is stored; the household is derived from the key's hash on every request (apps/backend/src/keys.ts).
API=https://qdvxx267lgnsitq242aplz722a0zuien.lambda-url.us-east-1.on.aws
curl -X POST $API/v1/keys
curl -X POST $API/api/demo/replay -H "authorization: Bearer <key>"
curl $API/api/summary -H "authorization: Bearer <key>"
Talk to it over MCP (Streamable HTTP):
curl -i -X POST http://127.0.0.1:8787/mcp \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'
# take the MCP-Session-Id response header, then:
curl -X POST http://127.0.0.1:8787/mcp \
-H "content-type: application/json" \
-H "mcp-session-id: <SESSION-ID>" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_night_summary","arguments":{"date":"2026-09-23"}}}'
Probe the deployed MCP server over real HTTP, no install: npm run verify:live (scripts/mcp-conform.mjs, nineteen graded checks against spec revision 2025-11-25).
The Week Review agent (Strands Agents, Claude on Amazon Bedrock, needs AWS credentials):
pip install strands-agents strands-agents-tools
python apps/agent/week_review.py --url https://qdvxx267lgnsitq242aplz722a0zuien.lambda-url.us-east-1.on.aws/mcp
Deploy your own stack: docs/AWS.md (CDK, infra/). Deploy the agent to Amazon Bedrock AgentCore: apps/agentcore/README.md.
Reproduce the Ring API evidence with a thirty-minute token from the Ring console Playground (never commit the value): RING_ACCESS_TOKEN="<token>" npx tsx apps/backend/scripts/ring-evidence.mts.
Run on 2026-10-22, both suites passing.
| Command | Where | Result |
|---|---|---|
npx vitest run | repository root (same as npm test) | 23 files, 163 tests passed |
npx jest | apps/agentcore/agentcore/cdk (after npm install there) | 1 test passed |
So the repository carries 163 tests total in the vitest suite, across packages/engine, packages/ring-webhook-kit, packages/simulator, apps/backend, apps/web and apps/eval, plus the CDK synthesis test. The Python agent code in apps/agent and apps/agentcore/app has no test suite; it is verified by invoking it against the live MCP server (apps/agentcore/README.md).
Tests that pin public claims: apps/eval/test/claims.test.ts re-derives every evaluation figure from apps/eval/results/casas-hh.json; apps/eval/test/counts.test.ts checks that stated test counts match the suite; apps/eval/test/skill.test.ts checks the Agent Skill names every MCP tool; apps/backend/test/mcp.test.ts holds 20 MCP transport tests; apps/backend/test/ring-simulate.test.ts checks the published household is untouched by the site's Ring proof.
| Tool | What it does here | Where |
|---|---|---|
| Ring Partner API | signed webhook intake, OAuth token exchange, devices, event history, snapshots, chime audio | apps/backend/src/ring.ts, apps/backend/src/server.ts, packages/ring-webhook-kit |
| Alexa+ via MCP (spec 2025-11-25, Streamable HTTP) | five household tools, signed sessions, origin allowlist | apps/backend/src/mcp.ts |
| Agent Skill | tells an agent how to use the five tools and what never to say | skills/nightlight/SKILL.md |
| Amazon Bedrock (Claude) | phrases the morning note; three-model ladder with deterministic fallback | apps/backend/src/summaries.ts |
| Strands Agents | the Week Review agent, an outside client of the MCP server | apps/agent/week_review.py |
| Amazon Bedrock AgentCore | hosts the same agent as an invocable runtime, nightlightweek_weekreview, us-east-1 | apps/agentcore/ |
| Amazon Polly | the synthesised voice when no family recording exists | apps/backend/src/voice.ts |
| Amazon DynamoDB | event log, acks, exactly-once effect claims by conditional put | apps/backend/src/store.ts |
| AWS Lambda, Amazon S3, Amazon CloudFront, AWS CDK | the backend, the site, one deploy | infra/bin/app.ts, apps/backend/src/lambda.ts |
Reasons for each choice, and the services deliberately not used, are in docs/AWS.md. Product feedback on every tool is in PRODUCT_FEEDBACK.md; FRICTION_LOG.md has eight entries.
apps/backend/src/store.ts): Ring events (timestamp, event type, device id, request id, motion sub-type), caregiver acknowledgements, a record of each effect already executed, and small metadata rows for Ring tokens and link state.apps/backend/src/voice.ts).apps/backend/src/keys.ts), and MCP sessions, which are signed tokens rather than stored rows (apps/backend/src/mcp.ts)..env files that are gitignored. docs/RING_LIVE.md was redacted by the capture script before it was written.Nightlight is a home safety aid. It does not diagnose, treat or prevent any medical condition, and it does not replace supervision or professional care advice. In an emergency, call your local emergency number.
EVIDENCE.md · EVAL.md · AWS.md · RING_LIVE.md · DESIGN.md · ACCESSIBILITY.md · FEATURE_REQUESTS.md · VIDEO_SCRIPT.md · FRICTION_LOG.md · PRODUCT_FEEDBACK.md
MIT. See LICENSE. ring-webhook-kit is also MIT.