mirror of
https://github.com/Heretek-AI/openclaw.git
synced 2026-07-21 00:55:21 -04:00
a9ae1a6778
Matrix Protocol: - docker-compose.matrix.yml: Dendrite homeserver + PostgreSQL + Nginx TLS - src/channels/plugins/matrix-channel.ts: OpenClaw plugin implementation - docs/matrix-triad-setup.md: Setup guide with auth scheme (@tm1-4:triad.local) MCP Server Integration: - docs/mcp-triad-integration.md: SearXNG, Playwright, GitHub MCP configs - docs/mcp-curiosity-mapping.md: Gap-to-capability mapping Node Sync Architecture: - src/services/node-sync-service.ts: WebSocket peer sync + presence detection - src/services/node-sync-service.test.ts: Unit tests - docs/node-sync-architecture.md: Architecture docs Triad Resilience: - scripts/triad-corruption-check.mjs: SQLite + log + config + git integrity - docs/triad-resilience.md: Recovery procedures - .secure/deployment-logs/README.md: Schema v2 - skills/triad-heartbeat/SKILL.md: Corruption check integration NPM Publish Workflow: - scripts/npm-publish.mjs: version, changelog, validate, publish, rollback - .github/workflows/npm-publish.yml: GitHub Actions with provenance - docs/npm-publish-guide.md: Complete documentation All deliverables tested in Docker before production.
96 lines
2.2 KiB
Bash
Executable File
96 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
OPENCLAW_DOCKER_LIVE_AUTH_ALL=(.claude .codex .minimax .qwen)
|
|
|
|
openclaw_live_trim() {
|
|
local value="${1:-}"
|
|
value="${value#"${value%%[![:space:]]*}"}"
|
|
value="${value%"${value##*[![:space:]]}"}"
|
|
printf '%s' "$value"
|
|
}
|
|
|
|
openclaw_live_normalize_auth_dir() {
|
|
local value
|
|
value="$(openclaw_live_trim "${1:-}")"
|
|
[[ -n "$value" ]] || return 1
|
|
value="${value#.}"
|
|
printf '.%s' "$value"
|
|
}
|
|
|
|
openclaw_live_should_include_auth_dir_for_provider() {
|
|
local provider
|
|
provider="$(openclaw_live_trim "${1:-}")"
|
|
case "$provider" in
|
|
anthropic)
|
|
printf '%s\n' ".claude"
|
|
;;
|
|
codex-cli | openai-codex)
|
|
printf '%s\n' ".codex"
|
|
;;
|
|
minimax | minimax-portal)
|
|
printf '%s\n' ".minimax"
|
|
;;
|
|
qwen | qwen-portal-auth)
|
|
printf '%s\n' ".qwen"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
openclaw_live_collect_auth_dirs_from_csv() {
|
|
local raw="${1:-}"
|
|
local token normalized
|
|
local -A seen=()
|
|
[[ -n "$(openclaw_live_trim "$raw")" ]] || return 0
|
|
IFS=',' read -r -a tokens <<<"$raw"
|
|
for token in "${tokens[@]}"; do
|
|
while IFS= read -r normalized; do
|
|
[[ -n "$normalized" ]] || continue
|
|
if [[ -z "${seen[$normalized]:-}" ]]; then
|
|
printf '%s\n' "$normalized"
|
|
seen[$normalized]=1
|
|
fi
|
|
done < <(openclaw_live_should_include_auth_dir_for_provider "$token")
|
|
done
|
|
}
|
|
|
|
openclaw_live_collect_auth_dirs_from_override() {
|
|
local raw token normalized
|
|
raw="$(openclaw_live_trim "${OPENCLAW_DOCKER_AUTH_DIRS:-}")"
|
|
[[ -n "$raw" ]] || return 1
|
|
case "$raw" in
|
|
all)
|
|
printf '%s\n' "${OPENCLAW_DOCKER_LIVE_AUTH_ALL[@]}"
|
|
return 0
|
|
;;
|
|
none)
|
|
return 0
|
|
;;
|
|
esac
|
|
IFS=',' read -r -a tokens <<<"$raw"
|
|
for token in "${tokens[@]}"; do
|
|
normalized="$(openclaw_live_normalize_auth_dir "$token")" || continue
|
|
printf '%s\n' "$normalized"
|
|
done | awk '!seen[$0]++'
|
|
return 0
|
|
}
|
|
|
|
openclaw_live_collect_auth_dirs() {
|
|
if openclaw_live_collect_auth_dirs_from_override; then
|
|
return 0
|
|
fi
|
|
printf '%s\n' "${OPENCLAW_DOCKER_LIVE_AUTH_ALL[@]}"
|
|
}
|
|
|
|
openclaw_live_join_csv() {
|
|
local first=1 value
|
|
for value in "$@"; do
|
|
[[ -n "$value" ]] || continue
|
|
if (( first )); then
|
|
printf '%s' "$value"
|
|
first=0
|
|
else
|
|
printf ',%s' "$value"
|
|
fi
|
|
done
|
|
}
|