- Reset master to upstream/main (16,697 commits) - Overlay 2,271 local-only files (skills, tools, workspace, configs, apps) - Restore IDENTITY.md and USER.md templates - Build verified, gateway running, Discord working Co-Authored-By: Claude Opus 4.6 <[email protected]>
26 lines
859 B
Bash
26 lines
859 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
# Usage: search.sh <backend> <query>
|
|
# backend: gmail | outlook | himalaya
|
|
BACKEND=${1:-}
|
|
QUERY=${2:-}
|
|
if [[ -z "$BACKEND" || -z "$QUERY" ]]; then
|
|
echo "Usage: $0 <backend> <query>" >&2
|
|
exit 2
|
|
fi
|
|
case "$BACKEND" in
|
|
outlook)
|
|
node ../../skills/gmail-reader/search-o365-all.cjs "$QUERY" || { echo "Outlook search failed (auth?). See ~/.openclaw/secrets/outlook-oauth.json" >&2; exit 1; }
|
|
;;
|
|
gmail)
|
|
node ../../skills/gmail-reader/search-gmail-only.cjs "$QUERY" || { echo "Gmail search failed (reauth needed?). Check ~/.openclaw/secrets/google-oauth.json" >&2; exit 1; }
|
|
;;
|
|
himalaya)
|
|
himalaya envelope list --account outlook --query "${QUERY}" --output json || { echo "Himalaya query failed (IMAP auth)." >&2; exit 1; }
|
|
;;
|
|
*)
|
|
echo "Unknown backend: $BACKEND" >&2
|
|
exit 2
|
|
;;
|
|
esac
|