@@ -109,7 +109,15 @@ const fs = require("node:fs");
|
109 | 109 | const path = require("node:path"); |
110 | 110 | |
111 | 111 | const configPath = path.join(process.env.HOME, ".openclaw", "openclaw.json"); |
| 112 | +const stateDir = path.dirname(configPath); |
112 | 113 | const config = { |
| 114 | + gateway: { |
| 115 | + mode: "local", |
| 116 | + auth: { |
| 117 | + mode: "token", |
| 118 | + token: "disabled-config-runtime-deps-token", |
| 119 | + }, |
| 120 | + }, |
113 | 121 | plugins: { |
114 | 122 | enabled: true, |
115 | 123 | entries: { |
@@ -136,8 +144,10 @@ const config = {
|
136 | 144 | }, |
137 | 145 | }, |
138 | 146 | }; |
139 | | -fs.mkdirSync(path.dirname(configPath), { recursive: true }); |
| 147 | +fs.mkdirSync(path.join(stateDir, "agents", "main", "sessions"), { recursive: true }); |
140 | 148 | fs.writeFileSync(configPath, `${JSON.stringify(config, null, 2)}\n`, "utf8"); |
| 149 | +fs.chmodSync(stateDir, 0o700); |
| 150 | +fs.chmodSync(configPath, 0o600); |
141 | 151 | NODE |
142 | 152 | |
143 | 153 | if ! openclaw doctor --non-interactive >/tmp/openclaw-disabled-config-doctor.log 2>&1; then |
@@ -150,7 +160,7 @@ assert_dep_absent_everywhere telegram grammy "$root"
|
150 | 160 | assert_dep_absent_everywhere slack @slack/web-api "$root" |
151 | 161 | assert_dep_absent_everywhere discord discord-api-types "$root" |
152 | 162 | |
153 | | -if grep -Eq "(used by .*\\b(telegram|slack|discord)\\b|\\[plugins\\] (telegram|slack|discord) installed bundled runtime deps( in [0-9]+ms)?:)" /tmp/openclaw-disabled-config-doctor.log; then |
| 163 | +if grep -Eq "(grammy|@slack/web-api|discord-api-types)" /tmp/openclaw-disabled-config-doctor.log; then |
154 | 164 | echo "doctor installed runtime deps for an explicitly disabled channel/plugin" >&2 |
155 | 165 | cat /tmp/openclaw-disabled-config-doctor.log >&2 |
156 | 166 | exit 1 |
|