Perpetua Skill (Hosted)
Overview
Use Perpetua.sh hosted API as the default path:
- - Base URL: INLINECODE0
- API routes: INLINECODE1
- Auth: INLINECODE2
Load secrets with:
CODEBLOCK0
Credentials
Set API key via env var from any secret source (1Password, CI, .env, secret manager):
CODEBLOCK1
Core endpoints (hosted)
CODEBLOCK2
Proxy call pattern
CODEBLOCK3
Optional: ?account=default for explicit account selection.
Oura examples
Avoid huge endpoints (daily_activity, detailed sleep) unless explicitly needed.
CODEBLOCK4
Google Calendar examples
CODEBLOCK5
Connection management (hosted)
CODEBLOCK6
Troubleshooting
- -
401 → wrong/expired API key - INLINECODE8 on provider routes → missing connection or wrong provider/account
- INLINECODE9 → 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.
Perpetua 技能(托管版)
概述
使用 Perpetua.sh 托管 API 作为默认路径:
- - 基础 URL:https://www.perpetua.sh
- API 路由:/api/*
- 认证:Authorization: Bearer $PERPETUAAPIKEY
加载密钥:
bash
op run --env-file=$HOME/.openclaw/secrets.env --
凭证
通过任意密钥源(1Password、CI、.env、密钥管理器)的环境变量设置 API 密钥:
bash
export PERPETUAAPIKEY=
核心端点(托管版)
bash
连接状态摘要
curl -s https://www.perpetua.sh/api/status \
-H Authorization: Bearer $PERPETUA
APIKEY
活跃连接
curl -s https://www.perpetua.sh/api/connections \
-H Authorization: Bearer $PERPETUA
APIKEY
提供商
curl -s https://www.perpetua.sh/api/providers \
-H Authorization: Bearer $PERPETUA
APIKEY
代理调用模式
bash
GET https://www.perpetua.sh/api/proxy/:provider/:path
Authorization: Bearer $PERPETUAAPIKEY
可选:使用 ?account=default 进行显式账户选择。
Oura 示例
除非明确需要,否则避免使用大型端点(daily_activity、详细的 sleep)。
bash
每日睡眠
curl -s https://www.perpetua.sh/api/proxy/oura/v2/usercollection/daily
sleep?startdate=YYYY-MM-DD&end_date=YYYY-MM-DD&account=default \
-H Authorization: Bearer $PERPETUA
APIKEY | jq .
每日准备度
curl -s https://www.perpetua.sh/api/proxy/oura/v2/usercollection/daily
readiness?startdate=YYYY-MM-DD&end_date=YYYY-MM-DD&account=default \
-H Authorization: Bearer $PERPETUA
APIKEY | jq .
锻炼
curl -s https://www.perpetua.sh/api/proxy/oura/v2/usercollection/workout?start
date=YYYY-MM-DD&enddate=YYYY-MM-DD&account=default \
-H Authorization: Bearer $PERPETUA
APIKEY | jq .
Google 日历示例
bash
即将到来的主日历事件
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
APIKEY | jq [.items[] | {summary, start}]
日历列表
curl -s https://www.perpetua.sh/api/proxy/gcal/users/me/calendarList?account=default \
-H Authorization: Bearer $PERPETUA
APIKEY | jq .
连接管理(托管版)
bash
启动提供商的 OAuth 流程
curl -s -X POST https://www.perpetua.sh/api/auth/connect/:provider/start \
-H Authorization: Bearer $PERPETUA
APIKEY \
-H Content-Type: application/json \
-d {account:default} | jq .authUrl
故障排除
- - 401 → API 密钥错误或已过期
- 提供商路由上的 403/404 → 缺少连接或提供商/账户错误
- 5xx → 托管服务问题;重试和/或通知 Daniel
本地 OSS 说明
本地 http://localhost:3001 仅用于 OSS 开发。此工作区中的默认操作路径是托管的 Perpetua.sh。