{"openapi":"3.1.0","info":{"title":"CloudWish personal Agent","version":"1.0.0"},"servers":[{"url":"https://cloudwish.online"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"security":[{"bearer":[]}],"paths":{"/api/agent/tools/get_connection":{"post":{"operationId":"get_connection","description":"Check this CloudWish connection, granted permissions and expiry. Never returns credentials.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/get_places":{"post":{"operationId":"get_places","description":"List actual CloudWish places and worship targets. Ask the user for a worship target; never choose their faith.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/draw_fortune":{"post":{"operationId":"draw_fortune","description":"Draw a fortune from the original CloudWish collection for the user. A topic has one result per 12 hours, shared with the website. Reuse request_id on retries. Keep original text distinct from your interpretation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"default":"general","type":"string","enum":["general","love","career","stocks"]},"request_id":{"type":"string","minLength":8,"maxLength":80,"pattern":"^[\\w-]+$"}},"required":["topic","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/start_meditation":{"post":{"operationId":"start_meditation","description":"Start a timed virtual meditation by the user’s Agent. It continues after the browser closes. It does not count as the human’s practice. Return the action ID and check it later.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"minutes":{"default":10,"type":"integer","minimum":1,"maximum":120},"place_id":{"default":"quiet","type":"string","const":"quiet"},"request_id":{"type":"string","minLength":8,"maxLength":80,"pattern":"^[\\w-]+$"}},"required":["minutes","place_id","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/perform_worship":{"post":{"operationId":"perform_worship","description":"Perform 1–9 virtual bows or joined-palms gestures at a target explicitly chosen by the user. Return the running action; completed repetitions are counted by the server.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target_id":{"type":"string","enum":["buddha","guanyin","mazu"]},"gesture":{"default":"bow","type":"string","enum":["bow","gassho"]},"count":{"default":1,"type":"integer","minimum":1,"maximum":9},"request_id":{"type":"string","minLength":8,"maxLength":80,"pattern":"^[\\w-]+$"}},"required":["target_id","gesture","count","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/make_wish":{"post":{"operationId":"make_wish","description":"Record a private wish explicitly supplied by the user. Never invent a wish. It is visible only to the owner and the connection that created it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500},"request_id":{"type":"string","minLength":8,"maxLength":80,"pattern":"^[\\w-]+$"}},"required":["text","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/get_action":{"post":{"operationId":"get_action","description":"Read one action created by this connection, including its actual status and immutable result. Full-history permission permits other actions belonging to this owner.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["action_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/cancel_action":{"post":{"operationId":"cancel_action","description":"Stop an action created by this connection. Completed results stay unchanged. Cancelling is idempotent.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"request_id":{"type":"string","minLength":8,"maxLength":80,"pattern":"^[\\w-]+$"}},"required":["action_id","request_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}},"/api/agent/tools/get_activity":{"post":{"operationId":"get_activity","description":"Read the owner’s activity history. Requires the separately granted history:read permission. Returns 30 records with a next_cursor.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cursor":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"actor":{"default":"all","type":"string","enum":["all","human","agent"]}},"required":["cursor","actor"],"additionalProperties":false}}}},"responses":{"200":{"description":"Connection-scoped result"},"400":{"description":"Invalid arguments"},"401":{"description":"Missing or revoked connection"},"403":{"description":"Permission required"},"409":{"description":"Busy or request ID reused with other arguments"}}}}}}