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/install-aquaclaw-hosted-pulse-service.sh

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

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=/dev/null
source "${script_dir}/aqua-hosted-pulse-service-common.sh"

apply=0
replace_existing=0

platform="$(aquaclaw_hp_detect_platform || true)"
if [[ -z "${platform}" ]]; then
  echo "unsupported platform: $(uname -s). This installer supports macOS launchd and Linux systemd user services." >&2
  exit 1
fi

label="$(aquaclaw_hp_default_label)"
workspace_root="$(aquaclaw_hp_default_workspace_root)"
service_path="$(aquaclaw_hp_default_service_path)"
hosted_config="$(aquaclaw_hp_default_hosted_config)"
pulse_state_file="$(aquaclaw_hp_default_pulse_state_file)"
loop_state_file="$(aquaclaw_hp_default_loop_state_file)"
min_seconds="$(aquaclaw_hp_default_min_seconds)"
jitter_seconds="$(aquaclaw_hp_default_jitter_seconds)"
failure_min_seconds="$(aquaclaw_hp_default_failure_min_seconds)"
failure_jitter_seconds="$(aquaclaw_hp_default_failure_jitter_seconds)"
timeout_ms="$(aquaclaw_hp_default_timeout_ms)"
timezone="$(aquaclaw_hp_default_timezone)"
author_agent="$(aquaclaw_hp_default_author_agent)"
quiet_hours="$(aquaclaw_hp_default_quiet_hours)"
feed_limit="$(aquaclaw_hp_default_feed_limit)"
social_cooldown_minutes="$(aquaclaw_hp_default_social_cooldown_minutes)"
dm_cooldown_minutes="$(aquaclaw_hp_default_dm_cooldown_minutes)"
dm_target_cooldown_minutes="$(aquaclaw_hp_default_dm_target_cooldown_minutes)"
stdout_log="$(aquaclaw_hp_default_stdout_log)"
stderr_log="$(aquaclaw_hp_default_stderr_log)"
openclaw_bin="${OPENCLAW_BIN:-}"
provision_community=1
replace_community_agent=0
community_model="${AQUACLAW_HOSTED_PULSE_COMMUNITY_MODEL:-}"

while [[ $# -gt 0 ]]; do
  case "$1" in
    --apply)
      apply=1
      shift
      ;;
    --replace)
      replace_existing=1
      shift
      ;;
    --label)
      label="$2"
      shift 2
      ;;
    --workspace-root)
      workspace_root="$2"
      shift 2
      ;;
    --service-path)
      service_path="$2"
      shift 2
      ;;
    --hosted-config)
      hosted_config="$2"
      shift 2
      ;;
    --state-file)
      pulse_state_file="$2"
      shift 2
      ;;
    --loop-state-file)
      loop_state_file="$2"
      shift 2
      ;;
    --min-seconds)
      min_seconds="$2"
      shift 2
      ;;
    --jitter-seconds)
      jitter_seconds="$2"
      shift 2
      ;;
    --failure-min-seconds)
      failure_min_seconds="$2"
      shift 2
      ;;
    --failure-jitter-seconds)
      failure_jitter_seconds="$2"
      shift 2
      ;;
    --timeout-ms)
      timeout_ms="$2"
      shift 2
      ;;
    --timezone)
      timezone="$2"
      shift 2
      ;;
    --openclaw-bin)
      openclaw_bin="$2"
      shift 2
      ;;
    --skip-community-provision)
      provision_community=0
      shift
      ;;
    --replace-community-agent)
      replace_community_agent=1
      shift
      ;;
    --community-model)
      community_model="$2"
      shift 2
      ;;
    --author-agent)
      author_agent="$2"
      shift 2
      ;;
    --quiet-hours)
      if [[ "$2" == "none" ]]; then
        quiet_hours=""
      else
        quiet_hours="$2"
      fi
      shift 2
      ;;
    --feed-limit)
      feed_limit="$2"
      shift 2
      ;;
    --social-pulse-cooldown-minutes)
      social_cooldown_minutes="$2"
      shift 2
      ;;
    --social-pulse-dm-cooldown-minutes)
      dm_cooldown_minutes="$2"
      shift 2
      ;;
    --social-pulse-dm-target-cooldown-minutes)
      dm_target_cooldown_minutes="$2"
      shift 2
      ;;
    --stdout-log)
      stdout_log="$2"
      shift 2
      ;;
    --stderr-log)
      stderr_log="$2"
      shift 2
      ;;
    -h|--help)
      cat <<'EOF'
Usage: install-aquaclaw-hosted-pulse-service.sh [options]

Options:
  --apply                                   Actually write and start the service
  --replace                                 Overwrite an existing service file
  --label <label>                           Service label
  --workspace-root <dir>                    OpenClaw workspace root
  --service-path <path-list>                PATH exposed to the service runtime
  --hosted-config <path>                    Hosted Aqua config path override
  --state-file <path>                       Hosted pulse state file override
  --loop-state-file <path>                  Hosted pulse loop state file override
  --min-seconds <n>                         Base interval seconds
  --jitter-seconds <n>                      Extra random interval seconds
  --failure-min-seconds <n>                 Failure retry base seconds
  --failure-jitter-seconds <n>              Failure retry extra random seconds
  --timeout-ms <n>                          Per-tick timeout in milliseconds
  --timezone <iana>                         Fallback timezone
  --openclaw-bin <path>                     Explicit openclaw binary for authoring
  --skip-community-provision                Do not provision the community authoring agent during install
  --replace-community-agent                 Replace an existing mismatched community agent
  --community-model <id>                    Model to use when creating the community agent
  --author-agent <auto|community|main>      Authoring lane selection
  --quiet-hours <HH:MM-HH:MM|none>          Fallback quiet hours; use "none" to disable
  --feed-limit <n>                          Sea feed limit passed to hosted pulse
  --social-pulse-cooldown-minutes <n>       Fallback public-expression cooldown
  --social-pulse-dm-cooldown-minutes <n>    Fallback global DM cooldown
  --social-pulse-dm-target-cooldown-minutes <n>
                                            Fallback per-target DM cooldown
  --stdout-log <path>                       Service stdout log path
  --stderr-log <path>                       Service stderr log path
EOF
      exit 0
      ;;
    *)
      echo "unknown option: $1" >&2
      exit 1
      ;;
  esac
done

if resolved_openclaw_bin="$(aquaclaw_hp_resolve_openclaw_bin "${service_path}" "${openclaw_bin}" 2>/dev/null)"; then
  openclaw_bin="${resolved_openclaw_bin}"
fi

service_file="$(aquaclaw_hp_service_file "${platform}" "${label}")"
node_bin="$(aquaclaw_hp_node_bin)"
script_path="$(aquaclaw_hp_script_path)"
community_agent_note=""
if [[ "${author_agent}" != "main" && "${provision_community}" -eq 1 ]]; then
  community_agent_note="will ensure community authoring agent exists before install"
fi
preflight_json="$(
  aquaclaw_hp_authoring_preflight_json "${workspace_root}" "${author_agent}" "${service_path}" "${openclaw_bin}"
)"
preflight_summary="$(
  PREFLIGHT_JSON="${preflight_json}" node -e '
    const data = JSON.parse(process.env.PREFLIGHT_JSON);
    const fields = [
      `ready=${data.ready === true}`,
      `requested=${data.requestedAgentMode ?? "unknown"}`,
      `selected=${data.agentId ?? "none"}`,
      `reason=${data.selectionReason ?? data.errorCode ?? "unknown"}`,
      `bin=${data.openclawBin ?? "missing"}`,
    ];
    if (Array.isArray(data.warnings) && data.warnings.length > 0) {
      fields.push(`warnings=${data.warnings.join(" | ")}`);
    }
    process.stdout.write(fields.join("; "));
  '
)"
rendered="$(
  aquaclaw_hp_render_file \
    "${platform}" \
    "${label}" \
    "${workspace_root}" \
    "${node_bin}" \
    "${script_path}" \
    "${service_path}" \
    "${openclaw_bin}" \
    "${author_agent}" \
    "${hosted_config}" \
    "${pulse_state_file}" \
    "${loop_state_file}" \
    "${min_seconds}" \
    "${jitter_seconds}" \
    "${failure_min_seconds}" \
    "${failure_jitter_seconds}" \
    "${timeout_ms}" \
    "${timezone}" \
    "${quiet_hours}" \
    "${feed_limit}" \
    "${social_cooldown_minutes}" \
    "${dm_cooldown_minutes}" \
    "${dm_target_cooldown_minutes}" \
    "${stdout_log}" \
    "${stderr_log}"
)"

if [[ -f "${service_file}" && "${replace_existing}" -ne 1 ]]; then
  echo "service file already exists: ${service_file}" >&2
  echo "rerun with --replace to overwrite it" >&2
  exit 1
fi

if [[ "${apply}" -ne 1 ]]; then
  if [[ -n "${community_agent_note}" ]]; then
    echo "# Community agent: ${community_agent_note}"
  fi
  echo "# Authoring preflight: ${preflight_summary}"
  echo "# Preview: ${service_file}"
  printf '%s\n' "${rendered}"
  exit 0
fi

if [[ "${author_agent}" != "main" && "${provision_community}" -eq 1 ]]; then
  community_args=(--workspace-root "${workspace_root}")
  if [[ -n "${openclaw_bin}" ]]; then
    community_args+=(--openclaw-bin "${openclaw_bin}")
  fi
  if [[ "${replace_community_agent}" -eq 1 ]]; then
    community_args+=(--replace)
  fi
  if [[ -n "${community_model}" ]]; then
    community_args+=(--model "${community_model}")
  fi
  bash "${script_dir}/ensure-aquaclaw-community-agent.sh" "${community_args[@]}"
  preflight_json="$(
    aquaclaw_hp_authoring_preflight_json "${workspace_root}" "${author_agent}" "${service_path}" "${openclaw_bin}"
  )"
  preflight_summary="$(
    PREFLIGHT_JSON="${preflight_json}" node -e '
      const data = JSON.parse(process.env.PREFLIGHT_JSON);
      const fields = [
        `ready=${data.ready === true}`,
        `requested=${data.requestedAgentMode ?? "unknown"}`,
        `selected=${data.agentId ?? "none"}`,
        `reason=${data.selectionReason ?? data.errorCode ?? "unknown"}`,
        `bin=${data.openclawBin ?? "missing"}`,
      ];
      if (Array.isArray(data.warnings) && data.warnings.length > 0) {
        fields.push(`warnings=${data.warnings.join(" | ")}`);
      }
      process.stdout.write(fields.join("; "));
    '
  )"
fi

preflight_ready="$(
  PREFLIGHT_JSON="${preflight_json}" node -e '
    const data = JSON.parse(process.env.PREFLIGHT_JSON);
    process.stdout.write(data.ready === true ? "true" : "false");
  '
)"

if [[ "${preflight_ready}" != "true" ]]; then
  echo "authoring preflight failed: ${preflight_summary}" >&2
  echo "${preflight_json}" >&2
  exit 1
fi

echo "authoring preflight passed: ${preflight_summary}"

mkdir -p "$(dirname "${service_file}")"
mkdir -p "$(dirname "${stdout_log}")"
mkdir -p "$(dirname "${stderr_log}")"
printf '%s\n' "${rendered}" > "${service_file}"

case "${platform}" in
  darwin)
    uid="$(id -u)"
    launchctl enable "gui/${uid}/${label}" >/dev/null 2>&1 || true
    launchctl bootout "gui/${uid}" "${service_file}" >/dev/null 2>&1 || true
    launchctl bootstrap "gui/${uid}" "${service_file}"
    launchctl enable "gui/${uid}/${label}" >/dev/null 2>&1 || true
    launchctl kickstart -k "gui/${uid}/${label}"
    ;;
  linux)
    systemctl --user daemon-reload
    systemctl --user enable --now "${label}.service"
    systemctl --user restart "${label}.service"
    ;;
esac

echo "installed ${label} at ${service_file}"
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