fix: auto-create dev config for dev profile
This commit is contained in:
@@ -100,6 +100,7 @@
|
|||||||
- Gateway/CLI: add `clawdbot gateway --dev/--reset` to auto-create a dev config/workspace with a robot identity (no BOOTSTRAP.md), and reset wipes config/creds/sessions/workspace (subcommand --dev no longer collides with global --dev profile). — thanks @steipete
|
- Gateway/CLI: add `clawdbot gateway --dev/--reset` to auto-create a dev config/workspace with a robot identity (no BOOTSTRAP.md), and reset wipes config/creds/sessions/workspace (subcommand --dev no longer collides with global --dev profile). — thanks @steipete
|
||||||
- Configure: stop prompting to open the Control UI (still shown in onboarding). — thanks @steipete
|
- Configure: stop prompting to open the Control UI (still shown in onboarding). — thanks @steipete
|
||||||
- Telegram: suppress grammY getUpdates stack traces; log concise retry message instead. — thanks @steipete
|
- Telegram: suppress grammY getUpdates stack traces; log concise retry message instead. — thanks @steipete
|
||||||
|
- Gateway/CLI: allow dev profile (`clawdbot --dev`) to auto-create the dev config + workspace. — thanks @steipete
|
||||||
- Config: fix Minimax hosted onboarding to write `agents.defaults` and allow `msteams` as a heartbeat target. — thanks @steipete
|
- Config: fix Minimax hosted onboarding to write `agents.defaults` and allow `msteams` as a heartbeat target. — thanks @steipete
|
||||||
|
|
||||||
## 2026.1.8
|
## 2026.1.8
|
||||||
|
|||||||
@@ -146,6 +146,8 @@ const resolveDevWorkspaceDir = (
|
|||||||
env: NodeJS.ProcessEnv = process.env,
|
env: NodeJS.ProcessEnv = process.env,
|
||||||
): string => {
|
): string => {
|
||||||
const baseDir = resolveDefaultAgentWorkspaceDir(env, os.homedir);
|
const baseDir = resolveDefaultAgentWorkspaceDir(env, os.homedir);
|
||||||
|
const profile = env.CLAWDBOT_PROFILE?.trim().toLowerCase();
|
||||||
|
if (profile === "dev") return baseDir;
|
||||||
return `${baseDir}-${DEV_AGENT_WORKSPACE_SUFFIX}`;
|
return `${baseDir}-${DEV_AGENT_WORKSPACE_SUFFIX}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -536,7 +538,10 @@ async function runGatewayCommand(
|
|||||||
opts: GatewayRunOpts,
|
opts: GatewayRunOpts,
|
||||||
params: GatewayRunParams = {},
|
params: GatewayRunParams = {},
|
||||||
) {
|
) {
|
||||||
if (opts.reset && !opts.dev) {
|
const isDevProfile = process.env.CLAWDBOT_PROFILE?.trim().toLowerCase() ===
|
||||||
|
"dev";
|
||||||
|
const devMode = Boolean(opts.dev) || isDevProfile;
|
||||||
|
if (opts.reset && !devMode) {
|
||||||
defaultRuntime.error("Use --reset with --dev.");
|
defaultRuntime.error("Use --reset with --dev.");
|
||||||
defaultRuntime.exit(1);
|
defaultRuntime.exit(1);
|
||||||
return;
|
return;
|
||||||
@@ -577,7 +582,7 @@ async function runGatewayCommand(
|
|||||||
process.env.CLAWDBOT_RAW_STREAM_PATH = rawStreamPath;
|
process.env.CLAWDBOT_RAW_STREAM_PATH = rawStreamPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opts.dev) {
|
if (devMode) {
|
||||||
await ensureDevGatewayConfig({ reset: Boolean(opts.reset) });
|
await ensureDevGatewayConfig({ reset: Boolean(opts.reset) });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user