Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
59c6309
feat(messaging): move build setup to manifest hooks
sandl99 Jun 8, 2026
3297aa6
refactor(messaging): consolidate build applier
sandl99 Jun 8, 2026
d25245a
fix(messaging): address PR review failures
sandl99 Jun 8, 2026
19ab1d1
fix(ci): preserve openclaw config test budget
sandl99 Jun 8, 2026
440668e
Potential fix for pull request finding 'CodeQL / Unused variable, imp…
sandl99 Jun 8, 2026
eb1209a
refactor(messaging): split template reference resolvers
sandl99 Jun 8, 2026
71ad7e5
refactor(messaging): move template resolvers to channels
sandl99 Jun 8, 2026
f3bea00
refactor(messaging): split channel template resolvers
sandl99 Jun 8, 2026
1360ea1
fix(messaging): emit OpenClaw-valid channel config
sandl99 Jun 9, 2026
f794143
Merge remote-tracking branch 'origin/main' into feat/issue-4395-manif…
sandl99 Jun 9, 2026
4840c79
test: restore openclaw config test size budget
sandl99 Jun 9, 2026
765fa21
fix(messaging): block render target traversal
sandl99 Jun 9, 2026
e9ec012
test: restore onboard messaging size budget
sandl99 Jun 9, 2026
2ed61a9
fix(messaging): parse generated yaml headers
sandl99 Jun 9, 2026
3cc73a3
merge: merge main into manifest hooks
sandl99 Jun 10, 2026
43ec3ba
merge: integrate remote manifest hooks updates
sandl99 Jun 10, 2026
0ac4062
test: tighten messaging size budgets
sandl99 Jun 10, 2026
6dc742e
chore: apply static hook formatting
sandl99 Jun 10, 2026
fa66236
test: sync openclaw config size budget
sandl99 Jun 10, 2026
1f2f263
fix(messaging): reapply manifest after openclaw doctor
sandl99 Jun 10, 2026
acd6bec
fix(messaging): preserve runtime placeholders on reapply
sandl99 Jun 10, 2026
e5ef86c
fix(messaging): preserve hermes legacy rebuild config
sandl99 Jun 10, 2026
515d1d1
fix(messaging): harden plugin installs and env renders
sandl99 Jun 10, 2026
2c4c6a6
Merge remote-tracking branch 'origin/main' into feat/issue-4395-manif…
sandl99 Jun 10, 2026
7484aeb
test(messaging): expect wechat package install hook
sandl99 Jun 10, 2026
86c2287
test(cli): stabilize dispatch timeouts under load
sandl99 Jun 10, 2026
27ed07d
ci: fix channels stop-start wechat fixture
sandl99 Jun 10, 2026
32aa344
merge: merge main into manifest hooks
cv Jun 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ jobs:
/tmp/nemoclaw-e2e-install.log
/tmp/nemoclaw-e2e-channels-*-install.log
/tmp/nc-channels-*.log
env_json: '{"DISCORD_ALLOWED_IDS":"1005536447329222676","DISCORD_BOT_TOKEN":"test-fake-discord-token-stop-start-e2e","DISCORD_REQUIRE_MENTION":"0","DISCORD_SERVER_ID":"1491590992753590594","NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE":"1","NEMOCLAW_NON_INTERACTIVE":"1","NEMOCLAW_POLICY_TIER":"open","NEMOCLAW_SANDBOX_NAME":"e2e-channels-stop-start","SLACK_ALLOWED_USERS":"U0123456789,U09ABCDEFGH","SLACK_APP_TOKEN":"xapp-fake-slack-app-token-stop-start-e2e","SLACK_BOT_TOKEN":"xoxb-fake-slack-token-stop-start-e2e","TELEGRAM_ALLOWED_IDS":"123456789","TELEGRAM_BOT_TOKEN":"test-fake-telegram-token-stop-start-e2e","WECHAT_ACCOUNT_ID":"e2e-fake-account-stop-start","WECHAT_ALLOWED_IDS":"wxid_stopstart_operator","WECHAT_BASE_URL":"https://ilinkai-fake-stop-start.wechat.com","WECHAT_BOT_TOKEN":"test-fake-wechat-token-stop-start-e2e","WECHAT_USER_ID":"wxid_stopstart_operator"}'
env_json: '{"DISCORD_ALLOWED_IDS":"1005536447329222676","DISCORD_BOT_TOKEN":"test-fake-discord-token-stop-start-e2e","DISCORD_REQUIRE_MENTION":"0","DISCORD_SERVER_ID":"1491590992753590594","NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE":"1","NEMOCLAW_NON_INTERACTIVE":"1","NEMOCLAW_POLICY_TIER":"open","NEMOCLAW_SANDBOX_NAME":"e2e-channels-stop-start","SLACK_ALLOWED_USERS":"U0123456789,U09ABCDEFGH","SLACK_APP_TOKEN":"xapp-fake-slack-app-token-stop-start-e2e","SLACK_BOT_TOKEN":"xoxb-fake-slack-token-stop-start-e2e","TELEGRAM_ALLOWED_IDS":"123456789","TELEGRAM_BOT_TOKEN":"test-fake-telegram-token-stop-start-e2e","WECHAT_ACCOUNT_ID":"e2e-fake-account-stop-start","WECHAT_ALLOWED_IDS":"wxid_stopstart_operator","WECHAT_BASE_URL":"https://ilinkai.wechat.com","WECHAT_BOT_TOKEN":"test-fake-wechat-token-stop-start-e2e","WECHAT_USER_ID":"wxid_stopstart_operator"}'
nvidia_api_key: true
github_token: true
secrets: *nightly-e2e-default-secrets
Expand Down
85 changes: 37 additions & 48 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -531,15 +531,14 @@ COPY scripts/nemoclaw-start.sh /usr/local/bin/nemoclaw-start
# needs to read these files to install runtime preloads under /tmp.
COPY nemoclaw-blueprint/scripts/*.js /usr/local/lib/nemoclaw/preloads/
COPY scripts/codex-acp-wrapper.sh /usr/local/bin/nemoclaw-codex-acp
COPY scripts/generate-openclaw-config.mts /usr/local/lib/nemoclaw/generate-openclaw-config.mts
COPY scripts/openclaw-build-messaging-plugins.py /usr/local/lib/nemoclaw/openclaw-build-messaging-plugins.py
COPY scripts/seed-wechat-accounts.py /usr/local/lib/nemoclaw/seed-wechat-accounts.py
COPY scripts/generate-openclaw-config.mts /scripts/generate-openclaw-config.mts
COPY src/lib/messaging/ /src/lib/messaging/
COPY nemoclaw-blueprint/openclaw-plugins/ /usr/local/share/nemoclaw/openclaw-plugins/
RUN chmod 755 /usr/local/bin/nemoclaw-start /usr/local/bin/nemoclaw-codex-acp \
/usr/local/lib/nemoclaw/sandbox-init.sh \
/usr/local/lib/nemoclaw/generate-openclaw-config.mts \
/usr/local/lib/nemoclaw/openclaw-build-messaging-plugins.py \
/usr/local/lib/nemoclaw/seed-wechat-accounts.py \
/scripts/generate-openclaw-config.mts \
/src/lib/messaging/applier/build/messaging-build-applier.mts \
&& chmod -R a+rX /src/lib/messaging \
&& chmod 644 /usr/local/lib/nemoclaw/openclaw_device_approval_policy.py \
/usr/local/lib/nemoclaw/clean_runtime_shell_env_shim.py \
&& if [ -d /usr/local/lib/nemoclaw/preloads ]; then find /usr/local/lib/nemoclaw/preloads -type f -name '*.js' -exec chmod 644 {} +; fi \
Expand Down Expand Up @@ -576,34 +575,10 @@ ARG NEMOCLAW_AGENT_TIMEOUT=600
# change at image build time. Ref: issue #2880
ARG NEMOCLAW_AGENT_HEARTBEAT_EVERY=
ARG NEMOCLAW_INFERENCE_COMPAT_B64=e30=
# Base64-encoded JSON list of messaging channel names to pre-configure
# (e.g. ["discord","telegram"]). Channels are added with placeholder tokens
# so the L7 proxy can rewrite them at egress. Default: empty list.
ARG NEMOCLAW_MESSAGING_CHANNELS_B64=W10=
# Base64-encoded JSON map of channel→allowed sender IDs for DM allowlisting
# (e.g. {"telegram":["123456789"]}). Channels with IDs get dmPolicy=allowlist.
# Slack also uses those IDs for channel @mention allowlisting. Channels without
# IDs keep the OpenClaw default (pairing). Default: empty map.
ARG NEMOCLAW_MESSAGING_ALLOWED_IDS_B64=e30=
# Base64-encoded JSON map of Discord guild configs keyed by server ID
# (e.g. {"1234567890":{"requireMention":true,"users":["555"]}}).
# Used to enable guild-channel responses for native Discord. Default: empty map.
ARG NEMOCLAW_DISCORD_GUILDS_B64=e30=
# Base64-encoded JSON Telegram config (e.g. {"requireMention":true}).
# When requireMention is true, Telegram groups get groups: {"*": {"requireMention": true}}
# with groupPolicy: open. See #1737, #3022. Default: empty map.
ARG NEMOCLAW_TELEGRAM_CONFIG_B64=e30=
# Base64-encoded JSON WeChat config (e.g.
# {"accountId":"…","baseUrl":"https://…","userId":"…"}).
# Captured by the host-side iLink QR login during onboard. Non-secret per-account
# metadata only — the bot token flows through the OpenShell provider, never
# baked into the image. Default: empty map.
ARG NEMOCLAW_WECHAT_CONFIG_B64=e30=
# Base64-encoded JSON Slack config (e.g.
# {"allowedChannels":["C012AB3CD","C987ZY6XW"]}).
# Channel IDs scope Slack channel @mention handling. User allowlists still come
# from NEMOCLAW_MESSAGING_ALLOWED_IDS_B64. Default: empty map.
ARG NEMOCLAW_SLACK_CONFIG_B64=e30=
# Base64-encoded messaging build plan for messaging build inputs and agent
# rendering. The plan contains placeholders only; secrets are resolved at
# runtime via OpenShell providers.
ARG NEMOCLAW_MESSAGING_PLAN_B64=
# Base64-encoded JSON array of secondary OpenClaw agent config entries
# (e.g. [{"id":"research","workspace":"/sandbox/.openclaw/workspace-research",
# "agentDir":"/sandbox/.openclaw/agents/research", ...}]).
Expand Down Expand Up @@ -657,12 +632,7 @@ ENV NEMOCLAW_MODEL=${NEMOCLAW_MODEL} \
NEMOCLAW_AGENT_TIMEOUT=${NEMOCLAW_AGENT_TIMEOUT} \
NEMOCLAW_AGENT_HEARTBEAT_EVERY=${NEMOCLAW_AGENT_HEARTBEAT_EVERY} \
NEMOCLAW_INFERENCE_COMPAT_B64=${NEMOCLAW_INFERENCE_COMPAT_B64} \
NEMOCLAW_MESSAGING_CHANNELS_B64=${NEMOCLAW_MESSAGING_CHANNELS_B64} \
NEMOCLAW_MESSAGING_ALLOWED_IDS_B64=${NEMOCLAW_MESSAGING_ALLOWED_IDS_B64} \
NEMOCLAW_DISCORD_GUILDS_B64=${NEMOCLAW_DISCORD_GUILDS_B64} \
NEMOCLAW_TELEGRAM_CONFIG_B64=${NEMOCLAW_TELEGRAM_CONFIG_B64} \
NEMOCLAW_WECHAT_CONFIG_B64=${NEMOCLAW_WECHAT_CONFIG_B64} \
NEMOCLAW_SLACK_CONFIG_B64=${NEMOCLAW_SLACK_CONFIG_B64} \
NEMOCLAW_MESSAGING_PLAN_B64=${NEMOCLAW_MESSAGING_PLAN_B64} \
NEMOCLAW_EXTRA_AGENTS_JSON_B64=${NEMOCLAW_EXTRA_AGENTS_JSON_B64} \
NEMOCLAW_OPENCLAW_WECHAT_PLUGIN_PREINSTALLED=1 \
NEMOCLAW_DISABLE_DEVICE_AUTH=${NEMOCLAW_DISABLE_DEVICE_AUTH} \
Expand All @@ -689,18 +659,33 @@ USER sandbox
# is opt-in via `shields up` (DAC 444 root:root + chattr +i).
# Build args (NEMOCLAW_MODEL, CHAT_UI_URL) customize per deployment.
#
# Generate openclaw.json from environment variables. Config generation logic
# lives in scripts/generate-openclaw-config.mts — see that file for the full
# list of env vars and derivation rules.
# Generate base openclaw.json from environment variables. Messaging build
# steps run through src/lib/messaging/applier/build/messaging-build-applier.mts.
#
# OpenClaw's managed proxy config activates process-wide HTTP_PROXY/HTTPS_PROXY
# for child npm processes. During image build the OpenShell gateway is not
# available at the runtime sandbox proxy address yet, so defer the final proxy
# block until after build-time OpenClaw doctor/plugin commands complete.
RUN NEMOCLAW_OPENCLAW_MANAGED_PROXY=0 node --experimental-strip-types /usr/local/lib/nemoclaw/generate-openclaw-config.mts
RUN NEMOCLAW_OPENCLAW_MANAGED_PROXY=0 node --experimental-strip-types /scripts/generate-openclaw-config.mts

# Install non-messaging OpenClaw plugins that need to match the runtime.
# hadolint ignore=DL3059,DL4006
RUN python3 /usr/local/lib/nemoclaw/openclaw-build-messaging-plugins.py
RUN set -eu; \
if [ "$NEMOCLAW_OPENCLAW_OTEL" = "1" ] || [ "$NEMOCLAW_WEB_SEARCH_ENABLED" = "1" ]; then \
test -n "$OPENCLAW_VERSION"; \
fi; \
if [ "$NEMOCLAW_OPENCLAW_OTEL" = "1" ]; then \
openclaw plugins install "npm:@openclaw/diagnostics-otel@${OPENCLAW_VERSION}" --pin; \
fi; \
if [ "$NEMOCLAW_WEB_SEARCH_ENABLED" = "1" ]; then \
openclaw plugins install "npm:@openclaw/brave-plugin@${OPENCLAW_VERSION}" --pin; \
BRAVE_API_KEY=openshell:resolve:env:BRAVE_API_KEY openclaw doctor --fix --non-interactive; \
elif [ "$NEMOCLAW_OPENCLAW_OTEL" = "1" ]; then \
openclaw doctor --fix --non-interactive; \
fi

# hadolint ignore=DL3059,DL4006
RUN node --experimental-strip-types /src/lib/messaging/applier/build/messaging-build-applier.mts --agent openclaw --phase agent-install

# Patch the OpenClaw Slack channel (@openclaw/slack) so a denied explicit
# @-mention still blocks the command but sends one bounded sender-facing
Expand Down Expand Up @@ -729,16 +714,16 @@ ENV NPM_CONFIG_OFFLINE=true \
# This must fail the image build if registration fails; otherwise the sandbox
# can boot with a discoverable plugin manifest but without the /nemoclaw runtime
# command registered in the active Gateway.
# Re-apply WeChat account seeding after OpenClaw doctor/plugin-install touches
# openclaw.json; the seed script no-ops unless WeChat is actively configured.
# Messaging post-agent-install hooks run after the OpenClaw agent and
# NemoClaw plugin are installed; for example, WeChat seed files are written
# from messaging hook build-file outputs before the sandbox starts.
# Prune non-runtime metadata from staged bundled plugin dependencies before
# this layer is committed; deleting it in a later layer would not reduce the
# OCI image imported by k3s.
# hadolint ignore=DL3059,DL4006
RUN openclaw plugins install /opt/nemoclaw \
&& openclaw plugins enable nemoclaw \
&& openclaw plugins inspect nemoclaw --json > /dev/null \
&& python3 /usr/local/lib/nemoclaw/seed-wechat-accounts.py \
&& if [ -d /sandbox/.openclaw/plugin-runtime-deps ]; then \
find /sandbox/.openclaw/plugin-runtime-deps -type f \( \
-name '*.d.ts' -o -name '*.d.mts' -o -name '*.d.cts' -o \
Expand All @@ -750,6 +735,10 @@ RUN openclaw plugins install /opt/nemoclaw \
\) -prune -exec rm -rf {} +; \
fi

# Apply messaging render and post-agent-install build-file hooks after agent/plugin installation.
# hadolint ignore=DL3059,DL4006
RUN node --experimental-strip-types /src/lib/messaging/applier/build/messaging-build-applier.mts --agent openclaw --phase post-agent-install

# Release the offline lock so the runtime sandbox can install MCP servers,
# skills, and ad-hoc packages via the OpenShell L7 proxy.
ENV NPM_CONFIG_OFFLINE=false
Expand Down
8 changes: 0 additions & 8 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,6 @@ RUN --mount=type=bind,source=nemoclaw-blueprint/blueprint.yaml,target=/tmp/bluep
npm install -g "openclaw@${OPENCLAW_VERSION}" \
&& pip3 install --no-cache-dir --break-system-packages "pyyaml==6.0.3"

USER sandbox
WORKDIR /sandbox
# hadolint ignore=DL3059,DL4006
RUN openclaw plugins install '@tencent-weixin/openclaw-weixin@2.4.3' --pin \
&& openclaw config set plugins.entries.openclaw-weixin.enabled true
# hadolint ignore=DL3002
USER root
WORKDIR /

# Baseline health check. The base image runs no service, so this only
# verifies the Node.js runtime is functional. Child images that expose
Expand Down
33 changes: 14 additions & 19 deletions agents/hermes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ RUN chmod -R a+rX /opt/nemoclaw-hermes-plugin/
COPY agents/hermes/generate-config.ts /opt/nemoclaw-hermes-config/generate-config.ts
COPY agents/hermes/config/ /opt/nemoclaw-hermes-config/config/
COPY agents/hermes/host/managed-tool-gateway-matrix.json /opt/nemoclaw-hermes-config/managed-tool-gateway-matrix.json
COPY src/lib/messaging/ /src/lib/messaging/
RUN find /opt/nemoclaw-hermes-config -type d -exec chmod 755 {} + \
&& find /opt/nemoclaw-hermes-config -type f -exec chmod 444 {} +
&& find /opt/nemoclaw-hermes-config -type f -exec chmod 444 {} + \
&& chmod -R a+rX /src/lib/messaging

# Copy blueprint (shared infrastructure)
COPY nemoclaw-blueprint/ /opt/nemoclaw-blueprint/
Expand Down Expand Up @@ -121,18 +123,7 @@ ARG NEMOCLAW_INFERENCE_API=openai-completions
# Hermes this URL points at the browser dashboard. The OpenAI-compatible
# API remains exposed separately on port 8642.
ARG CHAT_UI_URL=http://127.0.0.1:18789
ARG NEMOCLAW_MESSAGING_CHANNELS_B64=W10=
ARG NEMOCLAW_MESSAGING_ALLOWED_IDS_B64=e30=
ARG NEMOCLAW_DISCORD_GUILDS_B64=e30=
ARG NEMOCLAW_TELEGRAM_CONFIG_B64=e30=
# Captured by NemoClaw's host-side iLink QR login during onboard (see
# src/lib/onboard/wechat-config.ts). Carries {accountId, baseUrl, userId} so
# the Hermes WeChat adapter starts with WEIXIN_ACCOUNT_ID/WEIXIN_BASE_URL
# already populated from .env; no in-sandbox QR re-scan. The token itself
# is never baked here — it flows through the OpenShell L7 proxy via the
# WECHAT_BOT_TOKEN credential slot.
ARG NEMOCLAW_WECHAT_CONFIG_B64=e30=
ARG NEMOCLAW_SLACK_CONFIG_B64=e30=
ARG NEMOCLAW_MESSAGING_PLAN_B64=
ARG NEMOCLAW_HERMES_TOOL_GATEWAY_BROKER=0
ARG NEMOCLAW_HERMES_TOOL_GATEWAY_PRESETS_B64=W10=
ARG NEMOCLAW_BUILD_ID=default
Expand All @@ -145,12 +136,7 @@ ENV NEMOCLAW_MODEL=${NEMOCLAW_MODEL} \
NEMOCLAW_INFERENCE_BASE_URL=${NEMOCLAW_INFERENCE_BASE_URL} \
NEMOCLAW_INFERENCE_API=${NEMOCLAW_INFERENCE_API} \
CHAT_UI_URL=${CHAT_UI_URL} \
NEMOCLAW_MESSAGING_CHANNELS_B64=${NEMOCLAW_MESSAGING_CHANNELS_B64} \
NEMOCLAW_MESSAGING_ALLOWED_IDS_B64=${NEMOCLAW_MESSAGING_ALLOWED_IDS_B64} \
NEMOCLAW_DISCORD_GUILDS_B64=${NEMOCLAW_DISCORD_GUILDS_B64} \
NEMOCLAW_TELEGRAM_CONFIG_B64=${NEMOCLAW_TELEGRAM_CONFIG_B64} \
NEMOCLAW_WECHAT_CONFIG_B64=${NEMOCLAW_WECHAT_CONFIG_B64} \
NEMOCLAW_SLACK_CONFIG_B64=${NEMOCLAW_SLACK_CONFIG_B64} \
NEMOCLAW_MESSAGING_PLAN_B64=${NEMOCLAW_MESSAGING_PLAN_B64} \
NEMOCLAW_HERMES_TOOL_GATEWAY_BROKER=${NEMOCLAW_HERMES_TOOL_GATEWAY_BROKER} \
NEMOCLAW_HERMES_TOOL_GATEWAY_PRESETS_B64=${NEMOCLAW_HERMES_TOOL_GATEWAY_PRESETS_B64}

Expand All @@ -168,10 +154,19 @@ RUN mkdir -p /sandbox/.nemoclaw/blueprints/0.1.0 \
# code injection via build-arg interpolation (same concern as OpenClaw C-2).
RUN node --experimental-strip-types /opt/nemoclaw-hermes-config/generate-config.ts

# Apply messaging agent-install hooks before Hermes plugin installation.
# hadolint ignore=DL3059
RUN node --experimental-strip-types /src/lib/messaging/applier/build/messaging-build-applier.mts --agent hermes --phase agent-install

# Install NemoClaw plugin into Hermes
# hadolint ignore=DL3059
RUN mkdir -p /sandbox/.hermes/plugins/nemoclaw \
&& cp -r /opt/nemoclaw-hermes-plugin/* /sandbox/.hermes/plugins/nemoclaw/

# Apply messaging render and post-agent-install build-file hooks after agent/plugin installation.
# hadolint ignore=DL3059
RUN node --experimental-strip-types /src/lib/messaging/applier/build/messaging-build-applier.mts --agent hermes --phase post-agent-install

# Write the default SOUL.md (agent identity) for the sandboxed agent.
# This is the stock Hermes default soul (hermes_cli/default_soul.py,
# DEFAULT_SOUL_MD) shipped verbatim. The OpenShell/NemoClaw environment is
Expand Down
51 changes: 0 additions & 51 deletions agents/hermes/config/build-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,6 @@

import { Buffer } from "node:buffer";

export type MessagingAllowedIds = Record<string, (string | number)[]>;

export type DiscordGuilds = Record<
string,
{
requireMention?: boolean;
users?: (string | number)[];
}
>;

export type TelegramConfig = {
requireMention?: boolean;
};

// Non-secret per-account metadata captured by the host-side iLink QR login
// during onboard (src/lib/onboard/wechat-config.ts). The bot token itself
// stays in the OpenShell credential store; only these fields are serialized
// into the build arg, so the in-sandbox adapter can hydrate WEIXIN_ACCOUNT_ID
// and WEIXIN_BASE_URL without a fresh QR scan on rebuild.
export type WechatConfig = {
accountId?: string;
baseUrl?: string;
userId?: string;
};

export type SlackConfig = {
allowedChannels?: string[];
};

export type HermesBuildSettings = {
model: string;
baseUrl: string;
Expand All @@ -42,14 +13,6 @@ export type HermesBuildSettings = {
brokerEnabled: boolean;
presets: string[];
};
messaging: {
enabledChannels: Set<string>;
allowedIds: MessagingAllowedIds;
discordGuilds: DiscordGuilds;
telegramConfig: TelegramConfig;
wechatConfig: WechatConfig;
slackConfig: SlackConfig;
};
};

export function readHermesBuildSettings(env: NodeJS.ProcessEnv): HermesBuildSettings {
Expand All @@ -66,20 +29,6 @@ export function readHermesBuildSettings(env: NodeJS.ProcessEnv): HermesBuildSett
brokerEnabled: env.NEMOCLAW_HERMES_TOOL_GATEWAY_BROKER === "1",
presets: readBase64Json<string[]>(env, "NEMOCLAW_HERMES_TOOL_GATEWAY_PRESETS_B64", "W10="),
},
messaging: {
enabledChannels: new Set(
readBase64Json<string[]>(env, "NEMOCLAW_MESSAGING_CHANNELS_B64", "W10="),
),
allowedIds: readBase64Json<MessagingAllowedIds>(
env,
"NEMOCLAW_MESSAGING_ALLOWED_IDS_B64",
"e30=",
),
discordGuilds: readBase64Json<DiscordGuilds>(env, "NEMOCLAW_DISCORD_GUILDS_B64", "e30="),
telegramConfig: readBase64Json<TelegramConfig>(env, "NEMOCLAW_TELEGRAM_CONFIG_B64", "e30="),
wechatConfig: readBase64Json<WechatConfig>(env, "NEMOCLAW_WECHAT_CONFIG_B64", "e30="),
slackConfig: readBase64Json<SlackConfig>(env, "NEMOCLAW_SLACK_CONFIG_B64", "e30="),
},
};
}

Expand Down
Loading
Loading