fix(openclaw): allow xai-x-search, xai-web-search and WebFetch via ConfigMap#534
Open
fix(openclaw): allow xai-x-search, xai-web-search and WebFetch via ConfigMap#534
Conversation
Contributor
ArgoCD Diff ResultAuth path: tailscale アプリケーション: openclaw の差分パス: argoproj/openclaw ===== apps/Deployment openclaw/openclaw ======
713a714,737
> # Patch settings.json to allow cron-invoked skills (xai-x-search,
> # xai-web-search) and WebFetch so daily-morning-trend-research
> # is not blocked by approval prompts.
> node -e "
> const fs = require('fs');
> const p = '/home/node/.claude/settings.json';
> try {
> const s = JSON.parse(fs.readFileSync(p, 'utf8'));
> const add = [
> 'Bash(bash /home/node/.claude/skills/xai-x-search/scripts/search.sh *)',
> 'Bash(bash /home/node/.claude/skills/xai-web-search/scripts/search.sh *)',
> 'WebFetch'
> ];
> s.permissions = s.permissions || {};
> s.permissions.allow = s.permissions.allow || [];
> const before = JSON.stringify(s);
> add.forEach(t => { if (!s.permissions.allow.includes(t)) s.permissions.allow.push(t); });
> if (JSON.stringify(s) !== before) {
> fs.writeFileSync(p, JSON.stringify(s, null, 2) + '\n');
> }
> } catch (e) {
> console.error('settings.json patch skipped:', e.message);
> }
> "
ℹ️ 上記の差分が見つかりました |
…earch-approval-settings
…p - Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
ArgoCD Diff ResultAuth path: tailscale アプリケーション: openclaw の差分パス: argoproj/openclaw ===== apps/Deployment openclaw/openclaw ======
704c704
< # and settings.json (trustedWorkspaces, allowedCommands).
---
> # and ConfigMap-mounted settings.json.
846a847,850
> - mountPath: /home/node/.claude/settings.json
> name: claude-settings
> readOnly: true
> subPath: settings.json
1116a1121,1124
> - configMap:
> defaultMode: 420
> name: claude-settings
> name: claude-settings
===== /ConfigMap openclaw/claude-settings ======
0a1,64
> apiVersion: v1
> data:
> settings.json: |
> {
> "permissions": {
> "defaultMode": "acceptEdits",
> "allow": [
> "Read",
> "Glob",
> "Grep",
> "Bash(git *)",
> "Bash(gh *)",
> "Bash(ghq *)",
> "Bash(gwq *)",
> "Bash(mkdir *)",
> "Bash(touch *)",
> "Bash(cp *)",
> "Bash(mv *)",
> "Bash(rm *)",
> "Bash(ls *)",
> "Bash(cat *)",
> "Bash(head *)",
> "Bash(tail *)",
> "Bash(find *)",
> "Bash(grep *)",
> "Bash(sed *)",
> "Bash(awk *)",
> "Bash(sort *)",
> "Bash(uniq *)",
> "Bash(wc *)",
> "Bash(diff *)",
> "Bash(chmod *)",
> "Bash(ln *)",
> "Bash(curl *)",
> "Bash(tar *)",
> "Bash(xargs *)",
> "Bash(dirname *)",
> "Bash(basename *)",
> "Bash(tee *)",
> "Bash(codex *)",
> "Bash(docker *)",
> "Bash(bb *)",
> "Bash(man *)",
> "Bash(apt-get *)",
> "Bash(apt *)",
> "Bash(bash /home/node/.claude/skills/xai-x-search/scripts/search.sh *)",
> "Bash(bash /home/node/.claude/skills/xai-web-search/scripts/search.sh *)",
> "WebFetch",
> "mcp__grafana__*"
> ]
> },
> "mcpServers": {
> "grafana": {
> "command": "mcp-grafana",
> "args": ["--transport", "stdio", "--disable-write"]
> }
> }
> }
> kind: ConfigMap
> metadata:
> annotations:
> argocd.argoproj.io/tracking-id: openclaw:/ConfigMap:openclaw/claude-settings
> name: claude-settings
> namespace: openclaw
ℹ️ 上記の差分が見つかりました |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
daily-morning-trend-research cron が 6日間連続で承認ブロックされ機能停止していた問題を修正。settings.json を ConfigMap として外部化し必要な権限を静的に定義。前案では deployment の起動スクリプトに node -e でインラインJS を埋め込み settings.json を動的パッチしていたが責務過剰かつ不透明だった。ConfigMap-only に変更: configmap-claude-settings.yaml (新規) で settings.json 全内容を静的定義し volumeMount(subPath) でマウント。node -e パッチ削除。settings.json は静的設定であり動的処理不要なため ConfigMap-only で成立する。Codex レビュー OK。Generated with Claude Code