-
Notifications
You must be signed in to change notification settings - Fork 0
feat(hermes): enable webhook platform #2319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -327,3 +327,9 @@ custom_providers: | |
| base_url: https://cliproxy.shunkakinoki.com/v1 | ||
| api_key: __CLIPROXY_API_KEY__ | ||
| api_mode: chat_completions | ||
| platforms: | ||
| webhook: | ||
| enabled: true | ||
| extra: | ||
| port: 8644 | ||
| secret: __WEBHOOK_SECRET__ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Quote and escape the webhook secret.
🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,7 @@ fi | |
| TELEGRAM_TOKEN="${HERMES_TELEGRAM_TOKEN:-${TELEGRAM_TOKEN:-$(read_secret "${SECRETS_DIR}/telegram-token")}}" | ||
| GATEWAY_TOKEN="${HERMES_GATEWAY_TOKEN:-${GATEWAY_TOKEN:-$(read_secret "${SECRETS_DIR}/gateway-token")}}" | ||
| WHATSAPP_ALLOW_FROM="${WHATSAPP_ALLOW_FROM:-$(read_secret "${SECRETS_DIR}/whatsapp-allow-from")}" | ||
| WEBHOOK_SECRET="${HERMES_WEBHOOK_SECRET:-$(read_secret "${SECRETS_DIR}/webhook-secret")}" | ||
|
|
||
| if [ -z "${GATEWAY_TOKEN}" ]; then | ||
| echo "Warning: HERMES_GATEWAY_TOKEN not set, skipping Hermes hydration" >&2 | ||
|
|
@@ -72,6 +73,7 @@ fi | |
| # Hydrate config.yaml | ||
| @sed@ \ | ||
| -e "s|__CLIPROXY_API_KEY__|${CLIPROXY_API_KEY}|g" \ | ||
| -e "s|__WEBHOOK_SECRET__|${WEBHOOK_SECRET}|g" \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Escape The raw value is interpolated into the replacement expression. A secret containing 🤖 Prompt for AI Agents |
||
| "$CONFIG_TEMPLATE" >"${STATE_DIR}/config.yaml" | ||
| chmod 600 "${STATE_DIR}/config.yaml" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Webhook enabled on all hosts:
default.nixsetsmodetogatewayon Kyber andclienton macOS, buthydrate.shnever branches on@mode@for this block, so client hosts will also bind TCP 8644. If the webhook endpoint is only reachable via the gateway host's public URL, consider gating this section on mode (or onWEBHOOK_SECRETbeing non-empty) insidehydrate.sh.