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

@@ -40,7 +40,7 @@ The Waggle Marketplace is a **unified package catalog and installer** that aggre
│ MarketplaceInstaller
▼
┌──────────────────────────────────────────────────────────────────────┐
│ ~/.waggle/ (Runtime) │
│ ~/.waggle-community/ (Runtime) │
│ │
│ skills/ plugins/ .mcp.json │
│ ├── code-review.md ├── registry.json mcpServers: │
@@ -149,7 +149,7 @@ No installation needed. The SecurityGate calls Gen's free API endpoint at `https
```bash
# The marketplace DB ships pre-populated with 120 seed packages.
# Copy it to Waggle's runtime directory:
cp marketplace.db ~/.waggle/marketplace.db
cp marketplace.db ~/.waggle-community/marketplace.db
# Or build from scratch:
python3 build_waggle_marketplace_db.py
@@ -190,7 +190,7 @@ Skills, plugins, and MCP servers run inside the agent's trust boundary. A malici
### 2.2 Security Gate — Multi-Layer Defense
The SecurityGate sits between content download and filesystem write. Nothing touches `~/.waggle/` without passing through it.
The SecurityGate sits between content download and filesystem write. Nothing touches `~/.waggle-community/` without passing through it.
```
┌─────────────────────────────────────────────────────────┐
@@ -363,7 +363,7 @@ waggle-market audit
| Property | Value |
|----------|-------|
| File format | Markdown (`.md`) |
| Install path | `~/.waggle/skills/{name}.md` |
| Install path | `~/.waggle-community/skills/{name}.md` |
| How loaded | `loadSkills()` reads all `*.md` from skills dir |
| Where used | Appended to agent system prompt |
| API endpoint | `PUT /api/skills/{name}` |
@@ -373,7 +373,7 @@ waggle-market audit
1. Resolve content (URL, GitHub raw, inline, or stub)
2. SECURITY GATE → scan content
3. If blocked → reject, record in DB
4. If passed → write ~/.waggle/skills/{name}.md
4. If passed → write ~/.waggle-community/skills/{name}.md
5. Notify server: PUT /api/skills/{name}
6. Record installation + scan results in DB
```
@@ -383,8 +383,8 @@ waggle-market audit
| Property | Value |
|----------|-------|
| File format | Directory with `plugin.json` |
| Install path | `~/.waggle/plugins/{name}/` |
| Registry | `~/.waggle/plugins/registry.json` |
| Install path | `~/.waggle-community/plugins/{name}/` |
| Registry | `~/.waggle-community/plugins/registry.json` |
| Manager | `@waggle/sdk` `PluginManager` class |
| API endpoint | `POST /api/plugins/install` |