Skip to content

fix(config): move CONFIG_DIR to ~/.clagentic/console/ — complete Console data isolation (lr-12d0)#240

Merged
akuehner merged 1 commit into
mainfrom
fix/lr-12d0-config-dir-console
Jun 11, 2026
Merged

fix(config): move CONFIG_DIR to ~/.clagentic/console/ — complete Console data isolation (lr-12d0)#240
akuehner merged 1 commit into
mainfrom
fix/lr-12d0-config-dir-console

Conversation

@akuehner

Copy link
Copy Markdown
Member

Summary

  • Moves CONFIG_DIR from ~/.clagentic/ (brand root) to ~/.clagentic/console/ — all Console data paths automatically isolated to the Console tool subdir
  • Adds one-time bulk migration at module load: cpSync(CLAGENTIC_HOME to console/, force:false) — force:false preserves files already migrated by lr-5dca and lr-eb5a
  • Fixes configPath/socketPath/logPath — no longer add console segment since CONFIG_DIR is already the console dir; old* counterparts now point at CLAGENTIC_HOME
  • Fixes CLAGENTIC_HOME in all daemon spawn sites (bin/cli.js, lib/daemon.js) — was CONFIG_DIR (now console/); corrected to brand root
  • Adds bootstrap guard in daemon.js: exits EX_CONFIG 78 when CLAGENTIC_HOME is mis-pointed at socket subdir with real config one level above
  • Exports CLAGENTIC_HOME from lib/config.js
  • Updates five test files for new path layout

Test plan

  • npm test passes (308 tests, 0 failures)
  • configPath() returns ~/.clagentic/console/daemon.json (no double-nesting)
  • CONFIG_DIR equals ~/.clagentic/console/
  • oldSocketPath() is under CLAGENTIC_HOME (brand root), not CONFIG_DIR
  • Bootstrap guard exits 78 when CLAGENTIC_HOME mis-pointed at socket subdir

…ole data isolation (lr-12d0)

CONFIG_DIR was CLAGENTIC_HOME (~/.clagentic/), causing all Console data
(sessions, users, auth-tokens, avatars, images, etc.) to land at the
brand root instead of the Console tool subdir.

One constant change: CONFIG_DIR = path.join(CLAGENTIC_HOME, "console").
Every path derived from CONFIG_DIR follows automatically.

One-time bulk migration at module load: if console/sessions/ is absent,
cpSync(CLAGENTIC_HOME → console/, force:false) copies everything in one
shot. force:false preserves files already migrated by lr-5dca/#238 and
lr-eb5a/#239. Same pattern as the clay→clagentic migration.

Fixes the "console" segment in configPath/socketPath/logPath — those
functions no longer add "console" since CONFIG_DIR is already the console
dir. Their old* counterparts now point at CLAGENTIC_HOME (the pre-migration
root).

Fixes CLAGENTIC_HOME in all daemon spawn sites — was incorrectly set to
CONFIG_DIR (now console/); corrected to CLAGENTIC_HOME (brand root).

Adds bootstrap guard in daemon.js: if no config found at configPath() but
a populated daemon.json exists one level above CLAGENTIC_HOME, the daemon
exits EX_CONFIG (78) instead of silently bootstrapping empty projects.

Updates five test files for the new path layout: sessions under
console/sessions, old socket under CLAGENTIC_HOME (not CONFIG_DIR),
lite home under console/lite, audit log directly in CONFIG_DIR,
and new CONFIG_DIR equality assertion in config.test.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@akuehner akuehner merged commit e4919bb into main Jun 11, 2026
1 check passed
@akuehner akuehner deleted the fix/lr-12d0-config-dir-console branch June 11, 2026 22:20
@clagentic-release-bot

Copy link
Copy Markdown

This issue has been resolved in version 1.5.0-beta.2 (beta).

To update, run:

npx @clagentic/console@1.5.0-beta.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant