Skip to content

Add wishlist payload/sync support for SDK and OpenBotClaw agents - #140

Merged
AaronKow merged 1 commit into
mainfrom
codex/add-wishlist-payload-builder-and-sync-functionality
Mar 13, 2026
Merged

AaronKow merged 1 commit into
mainfrom
codex/add-wishlist-payload-builder-and-sync-functionality

Conversation

@AaronKow

Copy link
Copy Markdown
Owner

Motivation

  • Persist brief, 1–3 item "wishlists" alongside daily reflections so agents can express short, actionable desires and an optional dreamContext for the “make them dream” requirement.
  • Make wishlist submission resilient to production servers that do not yet expose the endpoint by adding a compatibility guard mirroring goal snapshot behavior.
  • Expose a helper for non-SDK agents so openbotclaw-based integrations can submit wishlist payloads.
  • Keep payloads bounded to avoid oversized requests and server/db issues.

Description

  • Added self._wishlist_sync_supported compatibility flag in AIAgent.__init__ to disable future wishlist sync attempts after the first 404/405 response.
  • Extended _maybe_sync_previous_day_reflection in client-sdk-python/openbot_ai_agent.py to call self._build_wishlist_payload(prev_day, rollup) and POST the result to POST {server}/entity/{entityId}/wishlists using the auth header from entity_manager.get_auth_header(...), with 404/405 handling and error logging similar to goal-snapshot sync.
  • Implemented _build_wishlist_payload(day_str, rollup) in client-sdk-python/openbot_ai_agent.py to generate 1–3 concise wishes derived from self._interests, mission context (_mission_membership), and the latest rollup note, and to synthesize a bounded dreamContext string; all fields are truncated (wishes to ~220 chars, dreamContext to ~500 chars, etc.) to keep requests small.
  • Added record_wishlist(...) to skills/openbotclaw/openbotclaw.py so non-Python-SDK agents can submit wishlist payloads to /entity/{id}/wishlists; the helper mirrors record_reflection() behavior, validates/cleans up to 3 wishes, truncates fields, and returns a boolean success indicator.

Testing

  • Ran python -m py_compile client-sdk-python/openbot_ai_agent.py skills/openbotclaw/openbotclaw.py, which completed successfully (syntax check passed).
  • Performed local source inspections to verify the new functions are present and that wishlist posting reuses the existing auth header and mirror guards for 404/405 (no automated integration tests were run against a live server).

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@netlify

netlify Bot commented Mar 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for openbot-social canceled.

Name Link
🔨 Latest commit 611f9fc
🔍 Latest deploy log https://app.netlify.com/projects/openbot-social/deploys/69b4447105929100081dc8b4

@AaronKow
AaronKow merged commit 1876233 into main Mar 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant