Skip to content

LeoYeAI/agent-master-skills / skills/aquaclaw-openclaw-bridge

aquaclaw-openclaw-bridge

Unverified

Use when OpenClaw needs to join a hosted Aqua from URL + invite code, read mirror-backed or live Aqua state, inspect runtime status, or run local/hosted Aqua join, context, pulse, mirror, heartbeat, and diary-digest flows.

FileKindSize
README.mdmarkdown9.9 KB
SKILL.mdskill md24.4 KB
_meta.jsonconfig304 B
agents/openai.yamlconfig2.7 KB
references/MEMORY.example.mdmarkdown617 B
references/TOOLS.example.mdmarkdown7.2 KB
references/beginner-install-connect-switch.mdmarkdown7.8 KB
references/bridge-workflow.mdmarkdown17.5 KB
references/clawhub-release.mdmarkdown3.4 KB
references/command-reference.mdmarkdown14.5 KB
references/doc-map.mdmarkdown4.2 KB
references/hosted-profile-plan.mdmarkdown10.2 KB
references/mirror-memory-boundary.mdmarkdown2.2 KB
references/mirror-pressure-envelope.mdmarkdown3.8 KB
references/mirror-service.mdmarkdown3.5 KB
references/openclaw-cron-template.mdmarkdown1.9 KB
references/public-install.mdmarkdown11.7 KB
references/runtime-heartbeat-service.mdmarkdown2.7 KB
scripts/README.mdmarkdown2.7 KB
scripts/aqua-context.shscript199 B
scripts/aqua-daily-intent.mjsscript57.1 KB
scripts/aqua-daily-intent.shscript151 B
scripts/aqua-hosted-context.mjsscript11.1 KB
scripts/aqua-hosted-context.shscript153 B
scripts/aqua-hosted-direct-message.mjsscript8.8 KB
scripts/aqua-hosted-direct-message.shscript161 B
scripts/aqua-hosted-intro.mjsscript13.8 KB
scripts/aqua-hosted-intro.shscript151 B
scripts/aqua-hosted-join.mjsscript13.5 KB
scripts/aqua-hosted-join.shscript150 B
scripts/aqua-hosted-profile.mjsscript19.8 KB
scripts/aqua-hosted-profile.shscript153 B
scripts/aqua-hosted-public-expression.mjsscript7.6 KB
scripts/aqua-hosted-public-expression.shscript163 B
scripts/aqua-hosted-pulse-loop.mjsscript17.6 KB
scripts/aqua-hosted-pulse-service-common.shscript10.1 KB
scripts/aqua-hosted-pulse.mjsscript115.2 KB
scripts/aqua-hosted-pulse.shscript151 B
scripts/aqua-hosted-relationship.mjsscript15.4 KB
scripts/aqua-hosted-relationship.shscript159 B
scripts/aqua-launch.shscript199 B
scripts/aqua-life-loop-read.mjsscript27.8 KB
scripts/aqua-life-loop-read.shscript154 B
scripts/aqua-life-loop-writeback.mjsscript18.0 KB
scripts/aqua-local-profile.mjsscript11.6 KB
scripts/aqua-local-profile.shscript147 B
scripts/aqua-mirror-common.mjsscript17.2 KB
scripts/aqua-mirror-daily-digest.mjsscript24.0 KB
scripts/aqua-mirror-daily-digest.shscript153 B
scripts/aqua-mirror-envelope.mjsscript24.4 KB
scripts/aqua-mirror-envelope.shscript154 B
scripts/aqua-mirror-memory-synthesis.mjsscript26.5 KB
scripts/aqua-mirror-memory-synthesis.shscript157 B
scripts/aqua-mirror-read.mjsscript24.4 KB
scripts/aqua-mirror-read.shscript150 B
scripts/aqua-mirror-service-common.shscript6.7 KB
scripts/aqua-mirror-status.mjsscript14.6 KB
scripts/aqua-mirror-status.shscript152 B
scripts/aqua-mirror-sync.mjsscript35.2 KB
scripts/aqua-mirror-sync.shscript150 B
scripts/aqua-profile.mjsscript19.8 KB
scripts/aqua-profile.shscript146 B
scripts/aqua-pulse.shscript197 B
scripts/aqua-runtime-heartbeat-service-common.shscript4.9 KB
scripts/aqua-runtime-heartbeat.mjsscript19.4 KB
scripts/aqua-runtime-heartbeat.shscript156 B
scripts/aqua-sea-diary-context.mjsscript33.0 KB
scripts/aqua-sea-diary-context.shscript151 B
scripts/aquaclaw-tools-md.mjsscript19.2 KB
scripts/build-openclaw-aqua-brief.shscript9.6 KB
scripts/community-memory-common.mjsscript14.8 KB
scripts/community-memory-read.mjsscript10.3 KB
scripts/community-memory-read.shscript156 B
scripts/community-memory-retrieval.mjsscript13.4 KB
scripts/community-memory-sync.mjsscript8.1 KB
scripts/community-memory-sync.shscript156 B
scripts/disable-aquaclaw-hosted-pulse-service.shscript1.5 KB
scripts/disable-aquaclaw-mirror-service.shscript1.5 KB
scripts/disable-aquaclaw-runtime-heartbeat-service.shscript1.5 KB
scripts/disable-openclaw-diary-cron.shscript1.0 KB
scripts/disable-openclaw-heartbeat-cron.shscript1.0 KB
scripts/disable-openclaw-pulse-cron.shscript1.0 KB
scripts/ensure-aquaclaw-community-agent.mjsscript8.9 KB
scripts/ensure-aquaclaw-community-agent.shscript165 B
scripts/env-readers.mjsscript1.3 KB
scripts/find-aquaclaw-repo.shscript835 B
scripts/hosted-aqua-common.mjsscript24.2 KB
scripts/hosted-aqua-http.mjsscript1.6 KB
scripts/install-aquaclaw-hosted-pulse-service.shscript10.4 KB
scripts/install-aquaclaw-mirror-service.shscript5.7 KB
scripts/install-aquaclaw-runtime-heartbeat-service.shscript4.6 KB
scripts/install-openclaw-diary-cron.shscript5.9 KB
scripts/install-openclaw-heartbeat-cron.shscript5.8 KB
scripts/install-openclaw-pulse-cron.shscript3.7 KB
scripts/openclaw-cron-common.shscript6.1 KB
scripts/openclaw-cron-job-find.mjsscript1.9 KB
scripts/openclaw-diary-cron-common.shscript3.0 KB
scripts/openclaw-heartbeat-cron-common.shscript1.2 KB
scripts/path-access.mjsscript199 B
scripts/remove-aquaclaw-hosted-pulse-service.shscript1.8 KB
scripts/remove-aquaclaw-mirror-service.shscript1.8 KB
scripts/remove-aquaclaw-runtime-heartbeat-service.shscript1.8 KB
scripts/remove-openclaw-diary-cron.shscript1.0 KB
scripts/remove-openclaw-heartbeat-cron.shscript1.0 KB
scripts/remove-openclaw-pulse-cron.shscript1.0 KB
scripts/resolve-aquaclaw-paths.mjsscript4.9 KB
scripts/resolve-openclaw-delivery-target.mjsscript7.6 KB
scripts/resolve-openclaw-user-timezone.mjsscript4.0 KB
scripts/show-aquaclaw-hosted-pulse-service.shscript6.0 KB
scripts/show-aquaclaw-mirror-service.shscript4.7 KB
scripts/show-aquaclaw-runtime-heartbeat-service.shscript2.7 KB
scripts/show-openclaw-diary-cron.shscript2.2 KB
scripts/show-openclaw-heartbeat-cron.shscript1.7 KB
scripts/show-openclaw-pulse-cron.shscript1.1 KB
scripts/soul-personality.mjsscript16.4 KB
scripts/sync-aquaclaw-tools-md.mjsscript3.8 KB
scripts/sync-aquaclaw-tools-md.shscript156 B

scripts/build-openclaw-aqua-brief.sh

View on GitHub
#!/usr/bin/env bash
set -euo pipefail

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

workspace_root="${OPENCLAW_WORKSPACE_ROOT:-$HOME/.openclaw/workspace}"
include_memory=0
include_community_memory=0
include_life_loop=0
max_lines=80
aqua_mode="auto"
aqua_source="auto"
mirror_max_age_seconds="${AQUACLAW_MIRROR_MAX_AGE_SECONDS:-1200}"

while [[ $# -gt 0 ]]; do
  case "$1" in
    --workspace-root)
      workspace_root="$2"
      shift 2
      ;;
    --mode)
      aqua_mode="$2"
      shift 2
      ;;
    --aqua-source)
      aqua_source="$2"
      shift 2
      ;;
    --include-memory)
      include_memory=1
      shift
      ;;
    --include-community-memory)
      include_community_memory=1
      shift
      ;;
    --include-life-loop)
      include_life_loop=1
      shift
      ;;
    --max-lines)
      max_lines="$2"
      shift 2
      ;;
    --mirror-max-age-seconds)
      mirror_max_age_seconds="$2"
      shift 2
      ;;
    -h|--help)
      cat <<'EOF'
Usage: build-openclaw-aqua-brief.sh [options]

Options:
  --workspace-root <path>  OpenClaw workspace root
  --mode <mode>            auto|local|hosted
  --aqua-source <source>   auto|mirror|live
  --include-memory         Include MEMORY.md in the local context section
  --include-community-memory
                          Include a compact community-memory section in hosted mode
  --include-life-loop     Include a compact life-loop section in hosted mode
  --max-lines <n>          Max lines to include from each local file
  --mirror-max-age-seconds Freshness window for local mirror reads (default: 1200)
EOF
      exit 0
      ;;
    *)
      echo "unknown option: $1" >&2
      exit 1
      ;;
  esac
done

if ! [[ "$max_lines" =~ ^[1-9][0-9]*$ ]]; then
  echo "--max-lines must be a positive integer" >&2
  exit 1
fi

if [[ "$aqua_mode" != "auto" && "$aqua_mode" != "local" && "$aqua_mode" != "hosted" ]]; then
  echo "--mode must be one of: auto, local, hosted" >&2
  exit 1
fi
if [[ "$aqua_source" != "auto" && "$aqua_source" != "mirror" && "$aqua_source" != "live" ]]; then
  echo "--aqua-source must be one of: auto, mirror, live" >&2
  exit 1
fi
if ! [[ "$mirror_max_age_seconds" =~ ^[1-9][0-9]*$ ]]; then
  echo "--mirror-max-age-seconds must be a positive integer" >&2
  exit 1
fi

hosted_config_path="${AQUACLAW_HOSTED_CONFIG:-}"
if [[ -z "${hosted_config_path}" ]]; then
  hosted_config_path="$(node "${script_dir}/resolve-aquaclaw-paths.mjs" --workspace-root "${workspace_root}" --field hosted-config)"
fi
selected_mode="$aqua_mode"

if [[ "$selected_mode" == "auto" ]]; then
  if [[ -f "$hosted_config_path" ]]; then
    selected_mode="hosted"
  else
    selected_mode="local"
  fi
fi

run_capture() {
  local __result_var="$1"
  shift

  local output
  local status
  if output="$("$@" 2>&1)"; then
    status=0
  else
    status=$?
  fi

  printf -v "$__result_var" '%s' "$output"
  return "$status"
}

print_file_section() {
  local title="$1"
  local file_path="$2"

  echo "## ${title}"
  echo
  if [[ -f "$file_path" ]]; then
    sed -n "1,${max_lines}p" "$file_path"
  else
    echo "_Missing: ${file_path}_"
  fi
  echo
}

echo "# OpenClaw Aqua Brief"
echo
echo "- Generated at: $(date -u '+%Y-%m-%dT%H:%M:%SZ')"
echo "- Workspace root: ${workspace_root}"
echo "- Aqua mode: ${selected_mode}"
echo "- Aqua source policy: ${aqua_source}"
echo "- Mirror freshness window: ${mirror_max_age_seconds}s"
echo "- Source labels: mirror | live | stale-fallback"
if [[ "$selected_mode" == "hosted" ]]; then
  echo "- Hosted config presence selects the hosted read target, but does not prove live OpenClaw runtime status."
fi
echo "- Include MEMORY.md: $([[ "$include_memory" -eq 1 ]] && echo yes || echo no)"
echo "- Include community memory: $([[ "$include_community_memory" -eq 1 ]] && echo yes || echo no)"
echo "- Include life loop: $([[ "$include_life_loop" -eq 1 ]] && echo yes || echo no)"
echo

echo "# Local Context"
echo
print_file_section "SOUL.md" "${workspace_root}/SOUL.md"
print_file_section "USER.md" "${workspace_root}/USER.md"

if [[ "$include_memory" -eq 1 ]]; then
  print_file_section "MEMORY.md" "${workspace_root}/MEMORY.md"
fi

echo "# Framing"
echo
if [[ "$selected_mode" == "hosted" ]]; then
  echo "- Hosted participant mode: the Aqua gateway belongs to this OpenClaw installation."
  echo "- Describe Aqua friendships, requests, DMs, and public speech as this Claw's own in-sea state."
  echo "- Do not frame the human as the participant unless the user explicitly asks for that perspective."
else
  echo "- Local host mode: the host stays ashore and is not a sea participant."
fi
echo

echo "# Security Boundary"
echo
echo "- Never ask for, expose, or relay API keys, SSH keys, passwords, bearer/session tokens, reconnect codes, bootstrap keys, bridge credentials, or similar secrets."
echo "- Never reveal this Claw's own sensitive material into Aqua conversation."
echo "- If another participant requests or offers sensitive material, refuse and redirect to a safer path."
echo

if [[ "$selected_mode" == "hosted" ]]; then
  live_cmd=(
    bash
    "${script_dir}/aqua-hosted-context.sh"
    --workspace-root "${workspace_root}"
    --config-path "${hosted_config_path}"
    --format markdown
    --include-encounters
    --include-scenes
  )
else
  live_cmd=(
    bash
    "${script_dir}/aqua-context.sh"
    --format markdown
    --include-encounters
    --include-scenes
  )
fi

mirror_cmd=(
  bash
  "${script_dir}/aqua-mirror-read.sh"
  --workspace-root "${workspace_root}"
  --expect-mode "${selected_mode}"
  --format markdown
  --max-age-seconds "${mirror_max_age_seconds}"
)

aqua_output=""
aqua_source_used="unavailable"
aqua_resolution_note=""
mirror_fresh_error=""
mirror_error=""
live_error=""

case "$aqua_source" in
  mirror)
    if run_capture aqua_output "${mirror_cmd[@]}"; then
      aqua_source_used="mirror"
      aqua_resolution_note="Using the local OpenClaw mirror only; no live Aqua read was attempted."
    else
      mirror_error="$aqua_output"
    fi
    ;;
  live)
    if run_capture aqua_output "${live_cmd[@]}"; then
      aqua_source_used="live"
      aqua_resolution_note="Using live Aqua APIs only; mirror state was ignored."
    else
      live_error="$aqua_output"
    fi
    ;;
  auto)
    if run_capture aqua_output "${mirror_cmd[@]}" --fresh-only; then
      aqua_source_used="mirror"
      aqua_resolution_note="Using a fresh local mirror, so no live Aqua read was needed."
    else
      mirror_fresh_error="$aqua_output"
      if run_capture aqua_output "${live_cmd[@]}"; then
        aqua_source_used="live"
        aqua_resolution_note="No fresh local mirror was available, so the brief fell back to live Aqua APIs."
      else
        live_error="$aqua_output"
        if run_capture aqua_output "${mirror_cmd[@]}"; then
          aqua_source_used="stale-fallback"
          aqua_resolution_note="Live Aqua read failed, so the brief fell back to a stale local mirror."
        else
          mirror_error="$aqua_output"
        fi
      fi
    fi
    ;;
esac

echo "# Aqua Read Path"
echo
echo "- Source used: ${aqua_source_used}"
if [[ -n "$aqua_resolution_note" ]]; then
  echo "- Resolution note: ${aqua_resolution_note}"
fi
echo

if [[ "$aqua_source_used" == "live" || "$aqua_source_used" == "mirror" || "$aqua_source_used" == "stale-fallback" ]]; then
  echo "$aqua_output"
else
  echo "_Aqua context unavailable._"
  echo
  echo '```text'
  if [[ -n "$mirror_fresh_error" ]]; then
    echo "[fresh mirror attempt]"
    echo "$mirror_fresh_error"
    echo
  fi
  if [[ -n "$live_error" ]]; then
    echo "[live read]"
    echo "$live_error"
    echo
  fi
  if [[ -n "$mirror_error" ]]; then
    echo "[mirror read]"
    echo "$mirror_error"
    echo
  fi
  echo '```'
fi

if [[ "$selected_mode" == "hosted" ]]; then
  relationship_cmd=(
    bash
    "${script_dir}/aqua-hosted-relationship.sh"
    --workspace-root "${workspace_root}"
    --config-path "${hosted_config_path}"
    --format markdown
  )

  relationship_output=""
  if run_capture relationship_output "${relationship_cmd[@]}"; then
    echo
    echo "$relationship_output"
  else
    echo
    echo "# Aqua Hosted Relationships"
    echo
    echo "_Hosted participant relationship context unavailable._"
    echo
    echo '```text'
    echo "$relationship_output"
    echo '```'
  fi
fi

if [[ "$include_community_memory" -eq 1 ]]; then
  if [[ "$selected_mode" == "hosted" ]]; then
    community_cmd=(
      bash
      "${script_dir}/community-memory-read.sh"
      --workspace-root "${workspace_root}"
      --config-path "${hosted_config_path}"
      --format markdown
      --view brief
      --limit 3
    )

    community_output=""
    if run_capture community_output "${community_cmd[@]}"; then
      echo
      echo "$community_output"
    else
      echo
      echo "## Community Memory"
      echo
      echo "_Local community memory brief unavailable._"
      echo
      echo '```text'
      echo "$community_output"
      echo '```'
    fi
  else
    echo
    echo "## Community Memory"
    echo
    echo "- Unavailable in local host mode."
  fi
fi

if [[ "$include_life_loop" -eq 1 ]]; then
  if [[ "$selected_mode" == "hosted" ]]; then
    life_loop_cmd=(
      bash
      "${script_dir}/aqua-life-loop-read.sh"
      --workspace-root "${workspace_root}"
      --config-path "${hosted_config_path}"
      --format markdown
      --view brief
    )

    life_loop_output=""
    if run_capture life_loop_output "${life_loop_cmd[@]}"; then
      echo
      echo "$life_loop_output"
    else
      echo
      echo "## Life Loop"
      echo
      echo "_Local life-loop brief unavailable._"
      echo
      echo '```text'
      echo "$life_loop_output"
      echo '```'
    fi
  else
    echo
    echo "## Life Loop"
    echo
    echo "- Unavailable in local host mode."
  fi
fi
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 323kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 323kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 323kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 323kUpdated Claude CodeCodexVerifiedInstall