feat: default the data directory to ~/.waggle-community (P1.3c)

The community edition defaulted to ~/.waggle, the data directory of the
commercial Waggle, so both editions would open the same config, vault,
waggle.db, marketplace catalog and skills. Default to
~/.waggle-community instead (ADR-0011). WAGGLE_DATA_DIR still overrides
it wherever it did; nothing is migrated from ~/.waggle.

The name is defined once as DEFAULT_DATA_DIR_NAME and
DEFAULT_DATA_DIR_LABEL in @waggle/shared, with defaultDataDir() in
@waggle/core for the sidecar, the CLI, the agent and the model caches.
The marketplace installs on its own without workspace packages, so it
keeps a copy in its data-dir.ts; the CLI help, which loads no
dependency, spells the path out and its runtime test checks it.

The marketplace security scan also flags skills that reference the new
skills folder. Tests that asserted the old default now use the
constant, and comments name the new directory.
This commit is contained in:
shumeiko.it
2026-11-04 10:31:20 +01:00
parent 120640780c
commit b275f0bf89
72 changed files with 217 additions and 170 deletions

View File

@@ -39,7 +39,7 @@ import { autoExtractAndCreateSkill, type AutoExtractMessage } from './skill-auto
import { retireStaleSkills } from './skill-retirement.js';
export interface SkillToolsDeps {
/** Path to ~/.waggle directory */
/** Path to ~/.waggle-community directory */
waggleHome: string;
/** Callback to reload skills into agent state after changes */
onSkillsChanged?: () => void;
@@ -69,10 +69,10 @@ export interface SkillToolsDeps {
/**
* Skills 2.0 gap E: resolve the on-disk directory for a given scope.
* - personal: ~/.waggle/skills/
* - workspace: ~/.waggle/workspaces/{workspaceId}/skills/
* - team: ~/.waggle/teams/{teamId}/skills/
* - enterprise: ~/.waggle/enterprise/skills/
* - personal: ~/.waggle-community/skills/
* - workspace: ~/.waggle-community/workspaces/{workspaceId}/skills/
* - team: ~/.waggle-community/teams/{teamId}/skills/
* - enterprise: ~/.waggle-community/enterprise/skills/
*
* Returns null when the required context (workspaceId, teamId) is missing.
*/
@@ -849,7 +849,7 @@ Only use this after acquire_capability has identified a specific installable can
name: 'retire_skills',
description:
'Archive personal-scope skills that have not been used within the idle window. '
+ 'Moves stale SKILL.md files to ~/.waggle/skills-archive/ (recoverable — no deletion). '
+ 'Moves stale SKILL.md files to ~/.waggle-community/skills-archive/ (recoverable — no deletion). '
+ 'Default max_idle_days is 90. Default dry_run is true — call with dry_run: false to '
+ 'actually move the files.',
parameters: {