360 Secure SkillHub
360 安全技能中心

Perpetua

该 Skill 通过 Perpetua.sh 托管 API 以单一 API Key 代理调用外部服务,可读取 Oura(睡眠、准备度、运动等)与 Google Calendar(日程、日历列表)数据,并查询连接状态、provider 及发起 OAuth 连接流程;以 curl 命令加 Bearer 令牌为示例,附带 401/403/5xx 排错说明,并注明本地 OSS 仅用于开发。

danielkillenberger
danielkillenberger
热度 87.18
最近更新 2026-05-11 17:27:04
分类:生活依赖:代码执行 / 第三方 API应用场景:健康 / 日程安排 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add perpetua
Metadata
name
perpetua
description
OAuth proxy for calling external APIs (Oura, Google Calendar, etc.) via Perpetua.sh hosted API using a single API key. Use when fetching Oura data, Google Calendar events, or managing OAuth connections.
version
1.0.0
read_when
["User asks about Oura Ring data (sleep, readiness, activity, workouts, HRV)","User asks about Google Calendar events or schedule","User wants to add or manage OAuth provider connections","Perpetua proxy setup or troubleshooting","User asks what's on their calendar or how they slept"]
triggers
["oura","sleep score","readiness score","hrv","perpetua","oauth proxy","calendar","google calendar"]
metadata
{"openclaw":{"emoji":"🔑","kind":"service","notes":"Primary endpoint is hosted Perpetua.sh API at https://www.perpetua.sh/api."}}

Perpetua Skill (Hosted)

Overview

Use Perpetua.sh hosted API as the default path:

  • Base URL: https://www.perpetua.sh
  • API routes: /api/*
  • Auth: Authorization: Bearer $PERPETUA_API_KEY

Load secrets with:

op run --env-file="$HOME/.openclaw/secrets.env" -- <command>

Credentials

Set API key via env var from any secret source (1Password, CI, .env, secret manager):

export PERPETUA_API_KEY="<your-key>"

Core endpoints (hosted)

# Connection status summary
curl -s "https://www.perpetua.sh/api/status" \
  -H "Authorization: Bearer $PERPETUA_API_KEY"

# Active connections
curl -s "https://www.perpetua.sh/api/connections" \
  -H "Authorization: Bearer $PERPETUA_API_KEY"

# Providers
curl -s "https://www.perpetua.sh/api/providers" \
  -H "Authorization: Bearer $PERPETUA_API_KEY"

Proxy call pattern

GET https://www.perpetua.sh/api/proxy/:provider/:path
Authorization: Bearer $PERPETUA_API_KEY

Optional: ?account=default for explicit account selection.

Oura examples

Avoid huge endpoints (daily_activity, detailed sleep) unless explicitly needed.

# Daily sleep
curl -s "https://www.perpetua.sh/api/proxy/oura/v2/usercollection/daily_sleep?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&account=default" \
  -H "Authorization: Bearer $PERPETUA_API_KEY" | jq .

# Daily readiness
curl -s "https://www.perpetua.sh/api/proxy/oura/v2/usercollection/daily_readiness?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&account=default" \
  -H "Authorization: Bearer $PERPETUA_API_KEY" | jq .

# Workout
curl -s "https://www.perpetua.sh/api/proxy/oura/v2/usercollection/workout?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD&account=default" \
  -H "Authorization: Bearer $PERPETUA_API_KEY" | jq .

Google Calendar examples

# Upcoming primary calendar events
curl -s "https://www.perpetua.sh/api/proxy/gcal/calendars/primary/events?account=default&maxResults=10&orderBy=startTime&singleEvents=true&timeMin=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
  -H "Authorization: Bearer $PERPETUA_API_KEY" | jq '[.items[] | {summary, start}]'

# Calendar list
curl -s "https://www.perpetua.sh/api/proxy/gcal/users/me/calendarList?account=default" \
  -H "Authorization: Bearer $PERPETUA_API_KEY" | jq .

Connection management (hosted)

# Start OAuth flow for provider
curl -s -X POST "https://www.perpetua.sh/api/auth/connect/:provider/start" \
  -H "Authorization: Bearer $PERPETUA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"account":"default"}' | jq .authUrl

Troubleshooting

  • 401 → wrong/expired API key
  • 403/404 on provider routes → missing connection or wrong provider/account
  • 5xx → hosted service issue; retry and/or notify Daniel

Local OSS note

Local http://localhost:3001 is for OSS development only. Default operational path in this workspace is hosted Perpetua.sh.