Merge P1.3c: separate data directory and the Benchmarks page removal

The community edition defaults to ~/.waggle-community and copies nothing
from the commercial ~/.waggle (ADR-0011). The Benchmarks page, which
showed scores of a memory engine the community edition does not run, is
removed. Logs UF-068.
This commit is contained in:
shumeiko.it
2026-11-04 19:23:45 +01:00
113 changed files with 408 additions and 754 deletions

View File

@@ -1,6 +1,6 @@
# Optional settings for running the sidecar from source. A basic local run
# needs none of them: keys are entered in the app and kept in the encrypted
# vault (~/.waggle/vault.json).
# vault (~/.waggle-community/vault.json).
# ── Provider API keys ──────────────────────────────────────────────
# Set keys in the app under Settings > Models (Provider Keys) or in the Vault
@@ -15,7 +15,8 @@
# VOYAGE_API_KEY= # embeddings only (EMBEDDING_PROVIDER=voyage)
# ── Data directory and port ────────────────────────────────────────
# WAGGLE_DATA_DIR=~/.waggle
# Default: ~/.waggle-community, kept apart from the commercial Waggle's ~/.waggle.
# WAGGLE_DATA_DIR=~/.waggle-community
# WAGGLE_PORT=3333
# ── LiteLLM (optional) ─────────────────────────────────────────────
@@ -30,7 +31,7 @@
# EMBEDDING_PROVIDER=auto
# In-process model: downloads about 23 MB on first use, cached in
# ~/.waggle/models/, then works offline.
# ~/.waggle-community/models/, then works offline.
# EMBEDDING_MODEL=Xenova/all-MiniLM-L6-v2
# Ollama: needs Ollama running (https://ollama.com).

View File

@@ -31,17 +31,22 @@ lists what changed for users compared with that product. The reasons are recorde
Launcher still detects these tools, opens them in the active workspace, shows their live output
and stops them. "Best fit" in chat now proposes Waggle personas only, so no workspace memories
are sent to an external agent.
- **The Benchmarks page** (`/benchmarks`, opened from the command palette). It showed LoCoMo
scores of the old memory engine, which this edition does not run.
- **`install.sh`** and `scripts/waggle-server.sh`, replaced by the server installer.
- The automatic start of a LiteLLM proxy, which needed Python. It is now opt-in (see Changed).
### Changed
- **Memory runs on local mem0** behind a memory contract (ADR-0002, ADR-0007). Memories are kept
in `~/.waggle/memory/`, embedded by a model that runs on your computer, and searched with
in `~/.waggle-community/memory/`, embedded by a model that runs on your computer, and searched with
mem0's combined vector and keyword search. Nothing goes to a cloud memory service. Memories
from the old `.mind` files are not carried over. See [docs/memory.md](docs/memory.md).
- **Waggle's own data** (automations, notifications, cost tracking, your profile card and task
list) moved to a separate `waggle.db`, apart from memory.
- **The data directory is `~/.waggle-community`** (ADR-0011), so the community edition never
opens the databases of the commercial Waggle in `~/.waggle`. Nothing is copied from
`~/.waggle`; set `WAGGLE_DATA_DIR` to use another directory. The name is temporary.
- **Analytics are opt-in** (ADR-0006). Waggle asks once; nothing is sent until you choose
**Allow**, and Settings → General → Privacy & Telemetry turns it off again. When allowed,
Waggle sends one event at the end of setup with the template, persona and model you chose.

View File

@@ -65,7 +65,8 @@ sidecar: it registers the files in `dist/` when it starts. The Vite dev server
(`npm run dev:web`) cannot sign in to the sidecar yet.
Workspace packages are resolved from their TypeScript source, so no package build is needed
before running or testing. Data goes to `~/.waggle` unless you set `WAGGLE_DATA_DIR`.
before running or testing. Data goes to `~/.waggle-community` unless you set `WAGGLE_DATA_DIR`;
the commercial Waggle's `~/.waggle` is not used.
Add a model in the app (Settings → Models). `.env.example` lists optional environment
variables; a basic local run needs none of them.

View File

@@ -80,7 +80,10 @@ when, why, and by whom.
machine-local key file; each entry is independently encrypted. Runtime API keys
belong in the vault or a local `.env` (never committed). `.env.example` contains
names plus non-secret development defaults, never live credentials. Callers must
not persist secret values into prompts, logs, or memory frames.
not persist secret values into prompts, logs, or memory frames. The vault and its
key file live in the data directory, `~/.waggle-community` by default, which is
separate from the commercial edition's `~/.waggle` (ADR-0011): neither edition
opens the other's vault.
### 6. MCP tool scope gate (removed)
The memory MCP servers this gate protected are not part of the community edition

View File

@@ -20,7 +20,7 @@ describe('getDefaultInstallerConfig', () => {
expect(config.version).toBe('0.1.0');
expect(config.publisher).toBe('Waggle');
expect(config.defaultInstallDir).toBe('C:\\Program Files\\Waggle');
expect(config.dataDir).toBe('~/.waggle');
expect(config.dataDir).toBe('~/.waggle-community');
expect(config.autostart).toBe(true);
expect(config.desktopShortcut).toBe(true);
expect(config.startMenuEntry).toBe(true);
@@ -46,7 +46,7 @@ describe('generateNsisDefines', () => {
expect(defines.PRODUCT_VERSION).toBe('0.1.0');
expect(defines.PRODUCT_PUBLISHER).toBe('Waggle');
expect(defines.DEFAULT_INSTALL_DIR).toBe('C:\\Program Files\\Waggle');
expect(defines.DATA_DIR).toBe('~/.waggle');
expect(defines.DATA_DIR).toBe('~/.waggle-community');
expect(defines.AUTOSTART).toBe('1');
expect(defines.DESKTOP_SHORTCUT).toBe('1');
expect(defines.START_MENU_ENTRY).toBe('1');
@@ -188,22 +188,22 @@ describe('isSystemPath', () => {
describe('getUninstallPrompt', () => {
it('includes the data directory in the prompt', () => {
const prompt = getUninstallPrompt('~/.waggle');
expect(prompt).toContain('~/.waggle');
const prompt = getUninstallPrompt('~/.waggle-community');
expect(prompt).toContain('~/.waggle-community');
});
it('mentions keeping data for future use', () => {
const prompt = getUninstallPrompt('C:\\Users\\test\\.waggle');
const prompt = getUninstallPrompt('C:\\Users\\test\\.waggle-community');
expect(prompt).toContain('keep it for future use');
});
it('mentions deleting all data option', () => {
const prompt = getUninstallPrompt('~/.waggle');
const prompt = getUninstallPrompt('~/.waggle-community');
expect(prompt).toContain('delete all data');
});
it('mentions agents and memories', () => {
const prompt = getUninstallPrompt('~/.waggle');
const prompt = getUninstallPrompt('~/.waggle-community');
expect(prompt).toContain('agents');
expect(prompt).toContain('memories');
});

View File

@@ -12,7 +12,7 @@ export interface InstallerConfig {
version: string;
publisher: string;
defaultInstallDir: string;
dataDir: string; // ~/.waggle
dataDir: string; // ~/.waggle-community (ADR-0011)
autostart: boolean;
desktopShortcut: boolean;
startMenuEntry: boolean;
@@ -27,7 +27,7 @@ export function getDefaultInstallerConfig(): InstallerConfig {
version: '0.1.0',
publisher: 'Waggle',
defaultInstallDir: 'C:\\Program Files\\Waggle',
dataDir: '~/.waggle',
dataDir: '~/.waggle-community',
autostart: true,
desktopShortcut: true,
startMenuEntry: true,

View File

@@ -2,7 +2,7 @@
//
// Brief: briefs/2026-04-30-cc-sesija-A-waggle-apps-web-integration.md §2.3 Task A10
//
// Persists a flag file at `~/.waggle/first-launch.flag` so the onboarding wizard
// Persists a flag file at `~/.waggle-community/first-launch.flag` so the onboarding wizard
// state survives across app reinstalls (browser localStorage doesn't, since
// Tauri builds may use a fresh WebView profile per install). The web `npm run
// dev` path continues to use localStorage via useOnboarding — these commands
@@ -13,7 +13,8 @@
use std::path::PathBuf;
const FLAG_DIR: &str = ".waggle";
use crate::DEFAULT_DATA_DIR_NAME;
const FLAG_FILE: &str = "first-launch.flag";
fn home_dir() -> Option<PathBuf> {
@@ -23,10 +24,10 @@ fn home_dir() -> Option<PathBuf> {
}
/// Resolve the flag location: `WAGGLE_DATA_DIR` (when set and non-empty) else
/// `~/.waggle` — the SAME resolution order the sidecar's resolveDataDir uses
/// `~/.waggle-community` — the SAME resolution order the sidecar's resolveDataDir uses
/// (UX-Refactor P4/D11). Without this, a custom-data-dir install reads/writes
/// the flag in `~/.waggle` while the server's completion stamp lives in the
/// data dir — and a stale `~/.waggle` flag from a prior default install would
/// the flag in the default directory while the server's completion stamp lives in the
/// data dir — and a stale default-directory flag from a prior default install would
/// auto-skip onboarding against a brand-new data dir (P4 review, 5 findings).
fn flag_path() -> Result<PathBuf, String> {
if let Some(dir) = std::env::var_os("WAGGLE_DATA_DIR") {
@@ -37,7 +38,7 @@ fn flag_path() -> Result<PathBuf, String> {
let home = home_dir().ok_or_else(|| {
"could not resolve user home directory (USERPROFILE/HOME unset)".to_string()
})?;
Ok(home.join(FLAG_DIR).join(FLAG_FILE))
Ok(home.join(DEFAULT_DATA_DIR_NAME).join(FLAG_FILE))
}
/// Returns true if the user has not yet completed onboarding.
@@ -54,7 +55,7 @@ pub async fn is_first_launch() -> Result<bool, String> {
}
/// Marks onboarding as complete by creating the flag file. Idempotent.
/// Creates the parent `~/.waggle/` directory if needed.
/// Creates the parent data directory if needed.
#[tauri::command]
pub async fn mark_first_launch_complete() -> Result<(), String> {
let path = flag_path()?;
@@ -91,12 +92,12 @@ mod tests {
std::env::set_var("USERPROFILE", &tmp);
std::env::set_var("HOME", &tmp);
// Default: ~/.waggle.
// Default: ~/.waggle-community, never the commercial edition's ~/.waggle.
std::env::remove_var("WAGGLE_DATA_DIR");
let path = flag_path().expect("flag_path resolves with USERPROFILE/HOME set");
assert!(
path.ends_with(".waggle/first-launch.flag")
|| path.ends_with(".waggle\\first-launch.flag")
assert_eq!(
path,
tmp.join(".waggle-community").join("first-launch.flag")
);
// P4/D11: a custom data dir keeps the flag NEXT TO the server's stamp.
@@ -110,9 +111,9 @@ mod tests {
// Empty env value falls through to the home default (matches resolveDataDir).
std::env::set_var("WAGGLE_DATA_DIR", "");
let fallback = flag_path().expect("flag_path resolves with empty WAGGLE_DATA_DIR");
assert!(
fallback.ends_with(".waggle/first-launch.flag")
|| fallback.ends_with(".waggle\\first-launch.flag")
assert_eq!(
fallback,
tmp.join(".waggle-community").join("first-launch.flag")
);
std::env::remove_var("WAGGLE_DATA_DIR");

View File

@@ -8,6 +8,13 @@ mod tray;
use service::ServiceState;
use tauri::Manager;
/// Default data directory under the user's home directory, used when
/// `WAGGLE_DATA_DIR` is unset. It is separate from the commercial Waggle's
/// `~/.waggle` so the two editions never open the same databases (ADR-0011).
/// The name is temporary: the final one follows the product-name decision (Q8).
/// `packages/shared/tests/data-dir.test.ts` checks it matches `@waggle/shared`.
pub(crate) const DEFAULT_DATA_DIR_NAME: &str = ".waggle-community";
#[tauri::command]
async fn show_notification(
app: tauri::AppHandle,

View File

@@ -414,7 +414,7 @@ fn bundled_npm_environment(
home_dir
.filter(|value| !value.is_empty())
.map(PathBuf::from)
.map(|home| home.join(".waggle"))
.map(|home| home.join(crate::DEFAULT_DATA_DIR_NAME))
})
.ok_or_else(|| "Unable to resolve writable npm data directory".to_string())?;
let runtime_dir = resources_dir
@@ -1138,7 +1138,7 @@ mod tests {
}
#[test]
fn bundled_npm_environment_falls_back_to_waggle_home() {
fn bundled_npm_environment_falls_back_to_the_default_data_dir() {
let resources = Path::new("resources");
let home = Path::new("home");
let environment = bundled_npm_environment(
@@ -1149,15 +1149,10 @@ mod tests {
)
.expect("fallback npm environment resolves");
assert_eq!(
environment.npm_prefix,
home.join(".waggle").join("npm").join("prefix")
);
assert_eq!(
environment.npm_cache,
home.join(".waggle").join("npm").join("cache")
);
assert_eq!(environment.data_dir, home.join(".waggle"));
let data_dir = home.join(".waggle-community");
assert_eq!(environment.npm_prefix, data_dir.join("npm").join("prefix"));
assert_eq!(environment.npm_cache, data_dir.join("npm").join("cache"));
assert_eq!(environment.data_dir, data_dir);
}
#[test]

View File

@@ -34,7 +34,6 @@ const MissionControlRoute = lazy(() => import("@/routes/MissionControlRoute"));
const TimelineRoute = lazy(() => import("@/routes/TimelineRoute"));
const EventsRoute = lazy(() => import("@/routes/EventsRoute"));
const UsageRoute = lazy(() => import("@/routes/UsageRoute"));
const BenchmarkRoute = lazy(() => import("@/routes/BenchmarkRoute"));
const PlatformRoute = lazy(() => import("@/routes/PlatformRoute"));
const WorkspacesRoute = lazy(() => import("@/routes/WorkspacesRoute"));
const AuthRoute = lazy(() => import("@/routes/AuthRoute"));
@@ -157,8 +156,7 @@ const App = () => (
<Route path="settings/timeline" element={routeElement(<TimelineRoute />)} />
<Route path="settings/events" element={routeElement(<EventsRoute />)} />
<Route path="settings/usage" element={routeElement(<UsageRoute />)} />
{/* ── PR6a: ⌘K-only static surfaces ── */}
<Route path="benchmarks" element={routeElement(<BenchmarkRoute />)} />
{/* ── PR6a: ⌘K-only static surface ── */}
<Route path="platform" element={routeElement(<PlatformRoute />)} />
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
<Route path="*" element={<NotFound />} />

View File

@@ -1,73 +0,0 @@
/**
* BenchmarkApp — screen 17. Pure-UI static showcase. The test renders the
* component, asserts the Capabilities view's framing + matrix, toggles to the
* Memory SOTA view, and asserts the LoCoMo numbers + stat chips. No mocks
* needed — the component has zero props and makes no calls.
*/
import { describe, it, expect, afterEach } from 'vitest';
import { render, screen, cleanup, fireEvent, within } from '@testing-library/react';
import BenchmarkApp from './BenchmarkApp';
afterEach(() => cleanup());
describe('BenchmarkApp', () => {
it('renders the Capabilities view by default with the positioning framing', () => {
render(<BenchmarkApp />);
// Tablist toggle present, Capabilities tab selected.
expect(screen.getByRole('tab', { name: /vs competitors/i })).toHaveAttribute('aria-selected', 'true');
expect(screen.getByRole('tab', { name: /memory sota/i })).toHaveAttribute('aria-selected', 'false');
// Headline + the two framing cards.
expect(screen.getByText(/waggle remembers you/i)).toBeInTheDocument();
expect(screen.getByRole('heading', { name: /task agents/i })).toBeInTheDocument();
expect(screen.getByRole('heading', { name: /a memory layer \+ workspace/i })).toBeInTheDocument();
// Honest disclaimer label.
expect(screen.getByText(/positioning view, not a lab benchmark/i)).toBeInTheDocument();
});
it('renders the full 11-row capability matrix with the deliberate competitor win on deep coding', () => {
render(<BenchmarkApp />);
// Waggle column header + first/last capability rows.
expect(screen.getByRole('columnheader', { name: /^waggle$/i })).toBeInTheDocument();
expect(screen.getByRole('rowheader', { name: /persistent memory across sessions/i })).toBeInTheDocument();
const lastRow = screen.getByRole('rowheader', { name: /deep coding in the terminal/i });
expect(lastRow).toBeInTheDocument();
// 11 capability rows = 11 row headers.
expect(screen.getAllByRole('rowheader')).toHaveLength(11);
// The last row is honest: Waggle is only Partial on deep terminal coding.
const row = lastRow.closest('tr');
expect(row).not.toBeNull();
const cells = within(row as HTMLElement).getAllByRole('cell');
expect(cells[0]).toHaveAttribute('aria-label', 'Partial'); // Waggle column
expect(cells[1]).toHaveAttribute('aria-label', 'Yes'); // Claude Code column
});
it('toggles to the Memory SOTA view and shows the LoCoMo numbers + stat chips', () => {
render(<BenchmarkApp />);
fireEvent.click(screen.getByRole('tab', { name: /memory sota/i }));
// View switched.
expect(screen.getByRole('tab', { name: /memory sota/i })).toHaveAttribute('aria-selected', 'true');
expect(screen.queryByRole('rowheader', { name: /persistent memory across sessions/i })).not.toBeInTheDocument();
// SOTA headline + the four LoCoMo bar values.
expect(screen.getByText(/best long-term memory/i)).toBeInTheDocument();
expect(screen.getByText('86.49')).toBeInTheDocument();
expect(screen.getByText('81.95')).toBeInTheDocument();
expect(screen.getByText('78.05')).toBeInTheDocument();
expect(screen.getByText('62.47')).toBeInTheDocument();
// Stat chips.
expect(screen.getByText('+4.54')).toBeInTheDocument();
expect(screen.getByText('92.27%')).toBeInTheDocument();
expect(screen.getByText('100%')).toBeInTheDocument();
});
it('toggles back to Capabilities', () => {
render(<BenchmarkApp />);
fireEvent.click(screen.getByRole('tab', { name: /memory sota/i }));
fireEvent.click(screen.getByRole('tab', { name: /vs competitors/i }));
expect(screen.getByRole('tab', { name: /vs competitors/i })).toHaveAttribute('aria-selected', 'true');
expect(screen.getByRole('rowheader', { name: /persistent memory across sessions/i })).toBeInTheDocument();
});
});

View File

@@ -1,409 +0,0 @@
/**
* BenchmarkApp — Warm-Hive Benchmarks surface (screen 17). A pure-UI, ⌘K-only
* showcase with two views behind a segmented toggle:
*
* 1) Capabilities — honest positioning vs the field (task agents vs Waggle's
* memory layer), an 11-row capability matrix with the Waggle column
* honey-highlighted. Deliberately credits competitors on "deep terminal
* coding" — it's a positioning view, not a lab benchmark.
* 2) Memory SOTA — the one real head-to-head lab result: LoCoMo bars + stats.
*
* Static data only — no backend, no API, no props (default-export, zero-prop).
* Source fidelity: docs/design_handoff_waggle_app/design-files/screens/benchmark.html
*/
import { useState } from 'react';
import { BarChart3, Info } from 'lucide-react';
// ───────────────────────────────────────────────────────────────────────────
// Benchmark figures — manually refreshed from the hive-mind benchmark,
// 2026-06-18 — do not fabricate. Numbers MUST match benchmark.html exactly.
// ───────────────────────────────────────────────────────────────────────────
/** A capability mark: yes (●) / partial (◐) / no (○). */
type Mark = 'Y' | 'P' | 'N';
/** Competitor columns, in matrix order after the honey Waggle column. */
const COMPETITORS = [
{ name: 'Claude Code', sub: 'CLI' },
{ name: 'Codex', sub: 'CLI' },
{ name: 'Cowork', sub: 'Anthropic' },
{ name: 'Hermes', sub: 'agent' },
{ name: 'Odysseus', sub: 'agent' },
] as const;
/** 11-row capability matrix. marks order: Waggle, then the 5 COMPETITORS. */
const CAPABILITY_MATRIX: ReadonlyArray<{ capability: string; marks: readonly Mark[] }> = [
{ capability: 'Persistent memory across sessions', marks: ['Y', 'P', 'N', 'P', 'P', 'P'] },
{ capability: 'Local-first & private by default', marks: ['Y', 'N', 'N', 'N', 'P', 'P'] },
{ capability: 'Any model (incl. small local models)', marks: ['Y', 'N', 'N', 'N', 'P', 'P'] },
{ capability: 'Built for non-technical experts', marks: ['Y', 'N', 'N', 'P', 'N', 'N'] },
{ capability: 'Runs your existing coding agents', marks: ['Y', 'N', 'N', 'N', 'N', 'N'] },
{ capability: 'Self-evolving skills', marks: ['Y', 'N', 'N', 'N', 'P', 'N'] },
{ capability: 'Skills shared across agents/workspaces', marks: ['Y', 'P', 'P', 'N', 'P', 'N'] },
{ capability: 'Multi-agent swarm', marks: ['Y', 'P', 'N', 'P', 'P', 'Y'] },
{ capability: 'Native desktop app · Windows, macOS, Linux', marks: ['Y', 'N', 'N', 'P', 'N', 'N'] },
{ capability: 'Audit-ready / EU AI Act', marks: ['Y', 'P', 'P', 'P', 'N', 'N'] },
{ capability: 'Deep coding in the terminal', marks: ['P', 'Y', 'Y', 'P', 'P', 'Y'] },
];
/** LoCoMo memory bars — value drives both the label and the bar width. */
const MEMORY_BARS: ReadonlyArray<{ name: string; note: string; value: number; us?: boolean }> = [
{ name: 'Waggle · Hive Mind', note: 'ours · local', value: 86.49, us: true },
{ name: 'Memori', note: 'prev. SOTA', value: 81.95 },
{ name: 'LangMem', note: 'corrected', value: 78.05 },
{ name: 'Mem0', note: 'baseline', value: 62.47 },
];
/** Stat chips beneath the bars. */
const MEMORY_STATS: ReadonlyArray<{ value: string; label: React.ReactNode }> = [
{ value: '+4.54', label: <>points over the prior best · <b className="text-foreground font-semibold">z = 4.64, p &lt; 10⁻⁵</b></> },
{ value: '92.27%', label: <>single-hop recall, <b className="text-foreground font-semibold">~1pt off the full-context ceiling</b></> },
{ value: '100%', label: <>local: warm recalls in <b className="text-foreground font-semibold">58–83 ms</b>, on-device</> },
];
// ───────────────────────────────────────────────────────────────────────────
type View = 'caps' | 'memory';
const VIEW_LABELS: Record<View, React.ReactNode> = {
caps: <><b className="text-foreground font-semibold">Capabilities</b>: where Waggle sits vs the field</>,
memory: <><b className="text-foreground font-semibold">Memory SOTA</b>: the one head-to-head lab result</>,
};
const MARK_GLYPH: Record<Mark, string> = { Y: '●', P: '◐', N: '○' };
/** Colour a mark by kind. The Waggle (first) column reads honey. */
function markClass(mark: Mark, isUs: boolean): string {
if (isUs && mark === 'Y') return 'font-bold';
if (mark === 'Y') return '';
if (mark === 'P') return '';
return 'opacity-60';
}
function markStyle(mark: Mark, isUs: boolean): React.CSSProperties {
if (isUs) return { color: 'var(--honey)' };
if (mark === 'Y') return { color: 'var(--healthy)' };
if (mark === 'P') return { color: 'var(--attention)' };
return { color: 'var(--text-2)' };
}
/** One disclaimer/caveat block — shared between the two views. */
function Disclaimer({ children }: { children: React.ReactNode }) {
return (
<div
className="mt-4 flex items-start gap-3 rounded-xl px-4 py-3.5"
style={{ background: 'var(--bg-2)', border: '1px solid var(--line-soft)' }}
>
<Info className="w-4 h-4 mt-0.5 shrink-0" style={{ color: 'var(--text-muted, hsl(var(--muted-foreground)))' }} />
<p className="text-xs leading-relaxed text-muted-foreground m-0">{children}</p>
</div>
);
}
const BenchmarkApp = () => {
const [view, setView] = useState<View>('caps');
return (
<div className="flex flex-col h-full">
{/* Controls bar — segmented toggle + live view label */}
<div className="flex items-center gap-3 px-5 py-3 border-b border-border/40 shrink-0">
<BarChart3 className="w-5 h-5" style={{ color: 'var(--honey)' }} />
<span className="font-mono text-[10.5px] uppercase tracking-[0.12em] text-muted-foreground hidden sm:inline">
Benchmarks · view
</span>
<div
role="tablist"
aria-label="Benchmark view"
className="inline-flex gap-1 p-[3px] rounded-[10px]"
style={{ background: 'var(--secondary, hsl(var(--secondary)))', border: '1px solid var(--line-soft)' }}
>
{(['caps', 'memory'] as View[]).map(v => (
<button
key={v}
role="tab"
aria-selected={view === v}
onClick={() => setView(v)}
className={`text-[12.5px] font-display font-semibold px-3 py-1.5 rounded-md transition-colors whitespace-nowrap ${
view === v ? '' : 'text-muted-foreground hover:text-foreground'
}`}
style={view === v ? { background: 'var(--honey)', color: '#1a1407' } : undefined}
>
{v === 'caps' ? 'vs competitors' : 'Memory SOTA'}
</button>
))}
</div>
<span className="text-[12.5px] text-muted-foreground ml-1 hidden md:inline">{VIEW_LABELS[view]}</span>
</div>
{/* Stage */}
<div className="flex-1 min-h-0 overflow-auto" tabIndex={0} role="region" aria-label="Benchmark content">
<div className="max-w-[1000px] mx-auto px-8 py-7 pb-16">
{view === 'caps' ? <CapabilitiesView /> : <MemorySotaView />}
</div>
</div>
</div>
);
};
function CapabilitiesView() {
return (
<div role="tabpanel" aria-label="Capabilities">
<header className="mb-6">
<div
className="font-mono text-[11px] uppercase tracking-[0.14em] mb-3 flex items-center gap-2.5"
style={{ color: 'var(--honey)' }}
>
<span className="inline-block w-5 h-px" style={{ background: 'var(--honey-line)' }} aria-hidden="true" />
How we&apos;re different
</div>
<h1 className="text-[28px] font-display font-semibold tracking-tight leading-tight m-0 mb-2.5 text-foreground">
They automate tasks. <em className="not-italic" style={{ color: 'var(--honey)' }}>Waggle remembers you.</em>
</h1>
<p className="text-[15px] text-muted-foreground leading-relaxed m-0 max-w-[64ch]">
The strong agents today are <b className="text-foreground font-medium">terminal coding tools</b> for engineers.
Waggle plays a different game: a <b className="text-foreground font-medium">persistent, local-first memory layer</b> for
knowledge workers that even <b className="text-foreground font-medium">runs those agents inside it</b>. Here&apos;s the
honest lay of the land.
</p>
</header>
{/* Two framing cards */}
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 mb-7">
<article
className="p-5 rounded-2xl"
style={{ background: 'var(--card, hsl(var(--card)))', border: '1px solid var(--line-soft)' }}
>
<div className="font-mono text-[10px] uppercase tracking-[0.1em] mb-2.5 text-muted-foreground">The field</div>
<h2 className="text-lg font-display font-semibold tracking-tight m-0 mb-2 text-foreground">Task agents</h2>
<p className="m-0 text-[13px] text-muted-foreground leading-relaxed">
Powerful, mostly terminal-based, model-locked, and built for developers. Each session starts fresh; the
intelligence lives in the model, not in a memory of you.
</p>
<div className="mt-3 text-[11.5px] text-muted-foreground/80">
<b className="text-foreground/90 font-medium">Claude Code · Codex · Claude Cowork · Hermes · Odysseus</b>
</div>
</article>
<article
className="p-5 rounded-2xl"
style={{
border: '1px solid var(--honey-line)',
background: 'linear-gradient(155deg, var(--secondary, hsl(var(--secondary))), var(--card, hsl(var(--card))))',
}}
>
<div className="font-mono text-[10px] uppercase tracking-[0.1em] mb-2.5" style={{ color: 'var(--honey)' }}>
Our category
</div>
<h2 className="text-lg font-display font-semibold tracking-tight m-0 mb-2 text-foreground">
A memory layer + workspace
</h2>
<p className="m-0 text-[13px] text-muted-foreground leading-relaxed">
Knows you and your work across every session, runs on any model (even local), is built for non-technical
experts, and can launch the task agents into its shared memory.
</p>
<div className="mt-3 text-[11.5px] text-muted-foreground/80">
<b className="text-foreground/90 font-medium">Waggle</b>: complements them, doesn&apos;t compete head-on
</div>
</article>
</div>
{/* Capability matrix */}
<div
className="rounded-2xl overflow-hidden"
style={{ background: 'var(--card, hsl(var(--card)))', border: '1px solid var(--line-soft)' }}
>
<table className="w-full border-collapse">
<caption className="sr-only">Capability comparison: Waggle versus task agents</caption>
<thead>
<tr>
<th
scope="col"
className="text-left text-[13px] font-semibold p-3 w-[32%] text-foreground"
style={{ borderBottom: '1px solid var(--line-soft)', background: 'var(--secondary, hsl(var(--secondary)))' }}
>
Capability
</th>
<th
scope="col"
className="text-center text-[11.5px] font-semibold p-3"
style={{
color: 'var(--honey)',
borderBottom: '1px solid var(--line-soft)',
background: 'color-mix(in srgb, var(--honey) 7%, transparent)',
}}
>
Waggle
</th>
{COMPETITORS.map(c => (
<th
key={c.name}
scope="col"
className="text-center text-[11.5px] font-semibold p-3 text-foreground/90"
style={{ borderBottom: '1px solid var(--line-soft)', background: 'var(--secondary, hsl(var(--secondary)))' }}
>
<span className="whitespace-nowrap">{c.name}</span>
<span className="block font-mono font-normal text-[9.5px] mt-0.5 text-muted-foreground/70">{c.sub}</span>
</th>
))}
</tr>
</thead>
<tbody>
{CAPABILITY_MATRIX.map((row, rowIdx) => {
const isLast = rowIdx === CAPABILITY_MATRIX.length - 1;
return (
<tr key={row.capability}>
<th
scope="row"
className="text-left text-[13px] font-normal p-3 w-[32%]"
style={{ borderBottom: '1px solid var(--line-soft)', color: 'var(--text-2)' }}
>
{row.capability}
</th>
{row.marks.map((mark, colIdx) => {
const isUs = colIdx === 0;
return (
<td
key={colIdx}
className="text-center p-3"
aria-label={mark === 'Y' ? 'Yes' : mark === 'P' ? 'Partial' : 'No'}
style={{
borderBottom: isUs && isLast ? '1px solid var(--honey-line)' : '1px solid var(--line-soft)',
...(isUs
? {
background: 'color-mix(in srgb, var(--honey) 7%, transparent)',
borderLeft: '1px solid var(--honey-line)',
borderRight: '1px solid var(--honey-line)',
}
: {}),
}}
>
<span
className={`inline-grid place-items-center w-[22px] h-[22px] text-[13px] ${markClass(mark, isUs)}`}
style={markStyle(mark, isUs)}
>
{MARK_GLYPH[mark]}
</span>
</td>
);
})}
</tr>
);
})}
</tbody>
</table>
</div>
{/* Legend */}
<div className="flex flex-wrap gap-4 mt-4 text-[12.5px] text-muted-foreground">
<span className="inline-flex items-center gap-1.5">
<span style={{ color: 'var(--healthy)' }}>●</span>Yes
</span>
<span className="inline-flex items-center gap-1.5">
<span style={{ color: 'var(--attention)' }}>◐</span>Partial / limited
</span>
<span className="inline-flex items-center gap-1.5">
<span style={{ color: 'var(--text-2)' }}>○</span>No / not the focus
</span>
</div>
<Disclaimer>
<b className="text-foreground/90 font-medium">This is a positioning view, not a lab benchmark</b>: capabilities as
understood June 2026, focused on the dimensions Waggle is built around. Coding agents are genuinely excellent at
deep code work (the last row), which is exactly why Waggle <b className="text-foreground/90 font-medium">launches them</b>{' '}
rather than replacing them. The one head-to-head lab result is the memory benchmark → see &ldquo;Memory SOTA&rdquo;.
</Disclaimer>
</div>
);
}
function MemorySotaView() {
const maxValue = Math.max(...MEMORY_BARS.map(b => b.value));
return (
<div role="tabpanel" aria-label="Memory SOTA">
<header className="mb-6">
<div
className="font-mono text-[11px] uppercase tracking-[0.14em] mb-3 flex items-center gap-2.5"
style={{ color: 'var(--honey)' }}
>
<span className="inline-block w-5 h-px" style={{ background: 'var(--honey-line)' }} aria-hidden="true" />
State of the art · LoCoMo · June 2026
</div>
<h1 className="text-[28px] font-display font-semibold tracking-tight leading-tight m-0 mb-2.5 text-foreground">
The best long-term memory <em className="not-italic" style={{ color: 'var(--honey)' }}>on record.</em>
</h1>
<p className="text-[15px] text-muted-foreground leading-relaxed m-0 max-w-[64ch]">
On <b className="text-foreground font-medium">LoCoMo</b> (the standard test for long-term conversational memory),
Waggle&apos;s open-source substrate scores <b className="text-foreground font-medium">86.49%</b>, a new state of the
art, measured under the prior leader&apos;s own protocol and judge.
</p>
</header>
{/* LoCoMo bars */}
<div className="grid gap-3 mt-2">
{MEMORY_BARS.map(bar => (
<div
key={bar.name}
className="grid items-center gap-4"
style={{ gridTemplateColumns: '180px 1fr 64px' }}
>
<div className="text-[13.5px] font-semibold text-right leading-tight text-foreground">
{bar.name}
<small className="block font-normal font-mono text-[10.5px] mt-0.5 text-muted-foreground/70">{bar.note}</small>
</div>
<div
className="h-[34px] rounded-[9px] overflow-hidden"
role="img"
aria-label={`${bar.name}: ${bar.value} percent`}
style={{ background: 'var(--card, hsl(var(--card)))', border: '1px solid var(--line-soft)' }}
>
<div
className="h-full rounded-l-lg"
style={{
width: `${(bar.value / maxValue) * 100}%`,
...(bar.us
? {
background: 'linear-gradient(90deg, var(--honey-deep), var(--honey-bright))',
boxShadow: 'var(--shadow-honey)',
}
: { background: 'var(--muted, hsl(var(--muted)))' }),
}}
/>
</div>
<div
className="font-mono text-sm font-semibold"
style={{ color: bar.us ? 'var(--honey)' : 'var(--text-2)' }}
>
{bar.value}
</div>
</div>
))}
</div>
{/* Stat chips */}
<div className="grid grid-cols-1 sm:grid-cols-3 gap-3.5 my-6">
{MEMORY_STATS.map((stat, i) => (
<div
key={i}
className="p-5 rounded-2xl"
style={{ background: 'var(--card, hsl(var(--card)))', border: '1px solid var(--line-soft)' }}
>
<div className="text-[32px] font-display font-extrabold tracking-tight" style={{ color: 'var(--honey)' }}>
{stat.value}
</div>
<div className="text-[13px] text-muted-foreground mt-1.5">{stat.label}</div>
</div>
))}
</div>
<Disclaimer>
<b className="text-foreground/90 font-medium">LoCoMo</b>, N = 1,540, GPT-4.1-mini as answerer &amp; judge: the prior
SOTA&apos;s exact published protocol, reproduced in-harness to 0.03 points before comparison. The intelligence lives in
the <b className="text-foreground/90 font-medium">memory layer, not the model</b>, so it travels onto a small local
model too. Honest caveat: higher token use per question than the leanest systems; efficiency work underway.
</Disclaimer>
</div>
);
}
export default BenchmarkApp;

View File

@@ -40,7 +40,7 @@ interface RoomAppProps {
// Warm-token status styling (D21): the live SSE roster maps to semantic vars,
// not raw emerald/sky/violet. Inline style is the project convention for the
// --work/--intel/--healthy/--risk semantic palette (see BenchmarkApp).
// --work/--intel/--healthy/--risk semantic palette.
const STATUS_DOT_STYLE: Record<RoomAgent['status'], { background: string }> = {
pending: { background: 'var(--text-dim)' },
running: { background: 'var(--honey)' },

View File

@@ -1,5 +1,6 @@
import { useEffect, useRef, useState } from 'react';
import { useSearchParams } from 'react-router-dom';
import { DEFAULT_DATA_DIR_LABEL } from '@waggle/shared';
import {
Cpu, Shield, Palette, Save, Loader2, Database,
Download, Upload, Wrench, DollarSign, Key, Lock, BarChart3, Trash2,
@@ -916,7 +917,7 @@ const SettingsApp = () => {
</div>
<div className="p-3 rounded-xl bg-secondary/30 border border-border/30">
<p className="text-xs font-display font-medium text-foreground mb-1">Data Directory</p>
<p className="text-[11px] text-muted-foreground font-mono">~/.waggle/</p>
<p className="text-[11px] text-muted-foreground font-mono">{DEFAULT_DATA_DIR_LABEL}/</p>
<p className="text-[11px] text-muted-foreground mt-1">All workspaces, memory, vault, and config live here.</p>
</div>
<BrowserCompanionSettings />

View File

@@ -1,4 +1,5 @@
import { useState, useEffect, useRef } from 'react';
import { DEFAULT_DATA_DIR_LABEL } from '@waggle/shared';
import {
Lock, Plus, Trash2, Eye, EyeOff, Loader2, Key, Plug, ExternalLink,
Shield, ChevronDown, ChevronRight, RefreshCw, CheckCircle2, User, Pencil,
@@ -264,7 +265,7 @@ const VaultApp = () => {
<p>
<strong className="text-honey">The Vault is the single source for API keys.</strong>
{' '}Values are encrypted with <strong>AES-256-GCM</strong> and stored locally at{' '}
<code className="px-1 py-0.5 rounded bg-muted text-[10px] text-honey">~/.waggle/vault</code>.
<code className="px-1 py-0.5 rounded bg-muted text-[10px] text-honey">{DEFAULT_DATA_DIR_LABEL}/vault</code>.
</p>
<p className="text-muted-foreground">
Keys never leave your machine, never appear in logs, and are only decrypted in-memory when the LLM SDK needs them. Clicking <strong>Reveal</strong> shows the value for 10 seconds, then auto-hides.

View File

@@ -13,7 +13,7 @@ import { adapter } from '@/lib/adapter';
* Contracts honoured:
* - C13: create-to-local only (POST /api/skills/create — marketplace publish
* lives in the Hub). Create == installed: the file lands in
* ~/.waggle/skills and appears under My Skills immediately.
* ~/.waggle-community/skills and appears under My Skills immediately.
* - C14: inputs/outputs serialize into the markdown BODY ("## Inputs" /
* "## Outputs") — no frontmatter extension. The create route only accepts
* name/description/steps/category, so the sections are appended with a

View File

@@ -171,7 +171,7 @@ export const useOnboarding = () => {
}, []);
// CC Sesija A §2.3 A11: Tauri filesystem-flag fast-path for returning users.
// Runs in Tauri mode only; if ~/.waggle/first-launch.flag exists the user
// Runs in Tauri mode only; if ~/.waggle-community/first-launch.flag exists the user
// has completed onboarding before (even if this WebView profile is fresh).
// Auto-completes the wizard in that case. Complementary to the workspaces-
// check below — flag is faster + doesn't need sidecar; either trigger is
@@ -285,7 +285,7 @@ export const useOnboarding = () => {
adapter.markOnboardingComplete().catch((err) => {
console.warn('[useOnboarding] markOnboardingComplete failed:', err);
});
// CC Sesija A §2.3 A11: Tauri filesystem flag too (default ~/.waggle
// CC Sesija A §2.3 A11: Tauri filesystem flag too (default ~/.waggle-community
// installs share the same file; the IPC path works even when the
// sidecar is mid-restart).
if (isTauri()) {

View File

@@ -4,7 +4,7 @@ import {
Plus, Rocket, Settings,
Server, Plug, Store, Package, Shield, Clock, FolderOpen,
Lock, Activity, History, BarChart3, Users, Radio,
Gauge, Monitor, LayoutGrid, Eye,
Monitor, LayoutGrid, Eye,
} from "lucide-react";
/**
@@ -85,7 +85,6 @@ export function buildCommandCatalog(ctx: CatalogContext): CatalogGroup[] {
{ id: "timeline", group: "power", name: "Timeline", subtitle: "activity history", icon: History, to: "/settings/timeline" },
{ id: "events", group: "power", name: "Events & logs", subtitle: "live activity feed", icon: Radio, to: "/settings/events" },
{ id: "usage", group: "power", name: "Usage & cost", subtitle: "tokens · spend", icon: BarChart3, to: "/settings/usage" },
{ id: "benchmarks", group: "power", name: "Benchmarks", subtitle: "capabilities · memory SOTA", icon: Gauge, to: "/benchmarks" },
{ id: "platform", group: "power", name: "Platform & roadmap", subtitle: "desktop · what's coming", icon: Monitor, to: "/platform" },
];

View File

@@ -45,7 +45,6 @@ const ROUTE_LABELS: Record<string, string> = {
marketplace: 'Marketplace',
launcher: 'Launcher',
settings: 'Settings',
benchmarks: 'Benchmarks',
platform: 'Platform',
};

View File

@@ -234,7 +234,7 @@ export function listenAgentEnd(
// ─── onboarding (A10) ──────────────────────────────────────────────────────
// CC Sesija A §2.3 Task A10. First-launch detection via Rust-managed
// filesystem flag at `~/.waggle/first-launch.flag` (durable across reinstalls,
// filesystem flag at `~/.waggle-community/first-launch.flag` (durable across reinstalls,
// unlike browser localStorage). useOnboarding still uses localStorage for the
// per-step state shape; these commands gate the initial wizard show/hide
// decision in Tauri builds.

View File

@@ -1,11 +0,0 @@
/** PR6a route wrapper — `/benchmarks` → BenchmarkApp (static, ⌘K-only surface). */
import BenchmarkApp from '@/components/os/apps/BenchmarkApp';
import SurfaceBoundary from './SurfaceBoundary';
const BenchmarkRoute = () => (
<SurfaceBoundary appName="Benchmarks">
<BenchmarkApp />
</SurfaceBoundary>
);
export default BenchmarkRoute;

View File

@@ -49,8 +49,7 @@ export { default as MissionControlRoute } from './MissionControlRoute';
export { default as TimelineRoute } from './TimelineRoute';
export { default as EventsRoute } from './EventsRoute';
export { default as UsageRoute } from './UsageRoute';
// PR6a — ⌘K-only static surfaces (Benchmarks · Platform)
export { default as BenchmarkRoute } from './BenchmarkRoute';
// PR6a — ⌘K-only static surface (Platform)
export { default as PlatformRoute } from './PlatformRoute';
export { default as WorkspacesRoute } from './WorkspacesRoute';
// PR7b — pre-shell /auth route (sibling outside AppShell)

View File

@@ -127,7 +127,8 @@ loads the `apps/web` build. The shell:
## Data
One data directory per user: `WAGGLE_DATA_DIR`, or `~/.waggle`. [install.md](install.md#where-your-data-lives)
One data directory per user: `WAGGLE_DATA_DIR`, or `~/.waggle-community`, separate from the
commercial edition's `~/.waggle` (ADR-0011). [install.md](install.md#where-your-data-lives)
lists what it contains.
- **Memory** goes only through `MemoryStore` (`@waggle/memory-contract`). The shipped store keeps

View File

@@ -34,7 +34,7 @@ set of skills for working with other people; it does not need team mode.
## Writing your own skill
A skill is a Markdown file in `<data>/skills/` (by default `~/.waggle/skills/`). Optional YAML
A skill is a Markdown file in `<data>/skills/` (by default `~/.waggle-community/skills/`). Optional YAML
frontmatter gives it a name and other metadata:
```markdown

View File

@@ -1,7 +1,8 @@
# Troubleshooting
Common problems and what to do about them. Paths use `<data>` for the data directory:
`~/.waggle` by default (`%USERPROFILE%\.waggle` on Windows), or `WAGGLE_DATA_DIR`.
`~/.waggle-community` by default (`%USERPROFILE%\.waggle-community` on Windows), or
`WAGGLE_DATA_DIR`.
## Installing

View File

@@ -87,7 +87,8 @@ sha256sum Waggle_<version>_amd64.deb
The window shows "Starting Waggle…" while the app starts its own server in the background. The
server listens on `127.0.0.1` port 3333, or on another free port if 3333 is taken. Its log is in
`~/.waggle/logs/service.log` (on Windows `%USERPROFILE%\.waggle\logs\service.log`).
`~/.waggle-community/logs/service.log` (on Windows
`%USERPROFILE%\.waggle-community\logs\service.log`).
### Update the desktop app
@@ -168,7 +169,7 @@ it. It listens on this computer only (`127.0.0.1`).
|---|---|
| `--port <number>`, `-p` | Use another port (default 3333) |
| `--no-open` | Do not open the browser |
| `--data-dir <path>` | Keep data in another directory (default `$WAGGLE_DATA_DIR` or `~/.waggle`) |
| `--data-dir <path>` | Keep data in another directory (default `$WAGGLE_DATA_DIR` or `~/.waggle-community`) |
| `--dir <path>` | Use a program directory other than the default |
If Waggle already runs on the port, `waggle-server` only opens the browser.
@@ -244,9 +245,15 @@ send.
## Where your data lives
Both ways of installing use one data directory: `~/.waggle` (on Windows
`%USERPROFILE%\.waggle`). Set `WAGGLE_DATA_DIR` to use another directory; the server installer
also takes `--data-dir`.
Both ways of installing use one data directory: `~/.waggle-community` (on Windows
`%USERPROFILE%\.waggle-community`). Set `WAGGLE_DATA_DIR` to use another directory; the server
installer also takes `--data-dir`.
The community edition does not touch `~/.waggle`, the data directory of the commercial Waggle,
unless you point `WAGGLE_DATA_DIR` at it, so the two editions do not read or write each other's
databases. Nothing is copied from
`~/.waggle`: the community edition starts with an empty data directory. The directory name is
temporary until the product name is decided.
| Path in the data directory | What it holds |
|---|---|

View File

@@ -77,7 +77,7 @@ A store reports what it can do, and the web UI hides what it cannot:
## Where mem0 keeps its data
Everything is in `memory/` inside the data directory (`~/.waggle/memory/` by default):
Everything is in `memory/` inside the data directory (`~/.waggle-community/memory/` by default):
| File | Content |
|---|---|

View File

@@ -1,6 +1,6 @@
# ADR-0009: The installer delivers a prebuilt server archive
- Status: Accepted
- Status: Accepted; point 4 superseded by ADR-0011
- Date: 2026-11-01
## Context

View File

@@ -0,0 +1,47 @@
# ADR-0011: The community edition has its own data directory
- Status: Accepted
- Date: 2026-11-04
- Supersedes: point 4 of ADR-0009
## Context
The community edition was made from the commercial Waggle and kept its default data directory,
`~/.waggle` (`%USERPROFILE%\.waggle` on Windows). On a computer with both editions, the two
would open the same `config.json`, vault, `waggle.db`, marketplace catalog, skills and logs. Their
schemas and features have diverged: the community edition ignores the commercial keys in
`config.json` (ADR-0001) and the commercial `.mind` memory files (ADR-0007), and the commercial
edition does not know the mem0 store. Sharing one directory risks one edition changing data the
other relies on.
## Decision
1. **The default data directory is `~/.waggle-community`** (`%USERPROFILE%\.waggle-community` on
Windows) for the sidecar, the CLI, the marketplace, the desktop shell and the server
installer. The project owner chose this on 2026-11-04.
2. **`WAGGLE_DATA_DIR` still overrides the default** wherever it did before.
3. **Nothing is migrated.** The community edition does not read, copy or move anything from
`~/.waggle`. The owner explicitly does not want a migration: the product is still in
development and nobody has data to bring over.
4. **The name is temporary.** The final name follows the product-name decision (Q8). It is defined
once per runtime so that the rename is one change in each:
- TypeScript: `DEFAULT_DATA_DIR_NAME` and `DEFAULT_DATA_DIR_LABEL` in `@waggle/shared`, with
`defaultDataDir()` in `@waggle/core` for Node code;
- the Tauri shell: `DEFAULT_DATA_DIR_NAME` in `app/src-tauri/src/lib.rs`;
- the server installer, which uses only Node's built-in modules: `DATA_DIR_NAME` in
`packages/launcher/src/platform.ts`;
- the marketplace, which installs on its own without the workspace packages:
`DATA_DIR_NAME` in `packages/marketplace/src/data-dir.ts`.
`packages/shared/tests/data-dir.test.ts` fails when these copies differ. The CLI help text,
which loads no dependency, spells the path out and `packages/cli/tests/cli-runtime.test.ts`
checks it.
## Consequences
- A user who ran an earlier build of the community edition finds an empty data directory and
sets Waggle up again.
- The commercial keys stay untouched in `config.json` (ADR-0001), which still matters when a user
points `WAGGLE_DATA_DIR` at `~/.waggle`.
- The marketplace security scan flags skills that reference the skills folder of either
directory.

View File

@@ -14,8 +14,9 @@ decision, add a new record that supersedes the old one.
| [0006](0006-opt-in-analytics.md) | Analytics are opt-in | Accepted, one open item |
| [0007](0007-memory-contract.md) | The memory contract and how it maps onto mem0 | Accepted |
| [0008](0008-native-modules.md) | Native modules ship with a pinned Node runtime | Accepted |
| [0009](0009-installer-server-archive.md) | The installer delivers a prebuilt server archive | Accepted |
| [0009](0009-installer-server-archive.md) | The installer delivers a prebuilt server archive | Accepted, point 4 superseded by ADR-0011 |
| [0010](0010-marketplace-catalog-in-repo.md) | The marketplace catalog stays in the repository | Accepted |
| [0011](0011-separate-data-directory.md) | The community edition has its own data directory | Accepted |
## Pending decisions
@@ -28,5 +29,4 @@ work packages wait for the answer.
| Product name and system identifiers | Temporary names | P1.3d, P2.6 |
| Location of the public repository | `release.yml` is ready but has not run; the installer has no default download location (`--from`) | P2.6, P2.7 |
| Installer signing | First release may ship unsigned with launch instructions | P2.5 |
| Separate data directory from the commercial edition | Not separated yet | P1.3c |
| PostHog project for the community edition | See ADR-0006 | P1.3a |

View File

@@ -113,10 +113,10 @@ node scripts/release-smoke.mjs desktop --app "$env:LOCALAPPDATA\Waggle\waggle.ex
2. Start Waggle from the Start menu. The window should move past "Starting Waggle…" to the
Home screen.
3. If it stays on "Starting Waggle…", close it and take the log from
`%USERPROFILE%\.waggle\logs\service.log`.
`%USERPROFILE%\.waggle-community\logs\service.log`.
4. Chat needs a model: an API key in Settings → Models (Provider Keys), or a running Ollama.
Waggle keeps its data in `%USERPROFILE%\.waggle`.
Waggle keeps its data in `%USERPROFILE%\.waggle-community`.
## Troubleshooting

View File

@@ -329,7 +329,7 @@ npx tsx packages/memory-mem0/bench/search-quality.ts --engines mem0,cosine
npx tsx packages/memory-mem0/bench/search-quality.ts --out /tmp/search-quality.json
```
The in-process model must be in `~/.waggle/models` (the sidecar downloads it on first start)
The in-process model must be in `~/.waggle-community/models` (the sidecar downloads it on first start)
or in the directory named by `WAGGLE_MODELS_DIR`; the bench refuses network access and does
not download it.

View File

@@ -96,6 +96,7 @@ Baseline: commit `b20b138` of the main Waggle repository.
| UF-065 | The Windows uninstaller names a "Data & Privacy" settings page that does not exist | Fixed | Desktop, Windows installer |
| UF-066 | Installed builds have no capability packs and no starter skills | Fixed | Sidecar bundle, SDK |
| UF-067 | The status bar names a default model that chats cannot use | Fixed | Sidecar, Web UI |
| UF-068 | Marketplace skills and plugins ignore the configured data directory | Open | Marketplace, sidecar |
## Entries
@@ -675,3 +676,12 @@ Entries UF-010 to UF-019 come from the UI audit `anti-slop/audit-001-2026-10-14.
- Cause: the chat route resolves the configured model to a usable one (`resolveUsableModel`), but the status endpoint returns the configured model as is.
- What we did: the status endpoint resolves the model the same way, without changing the configured one. A test covers it.
- Recommendation: same change in the main project.
### UF-068. Marketplace skills and plugins ignore the configured data directory
- Status: Open
- Found: 2026-11-04
- Where: at commit `b20b138`, `packages/marketplace/src/installer.ts:47-50` (`SKILLS_DIR`, `PLUGINS_DIR`, `REGISTRY_PATH`); the sidecar reads `<dataDir>/skills` and `<dataDir>/plugins` (`packages/server/src/local/routes/skills.ts:43`)
- Symptom: with `WAGGLE_DATA_DIR` or a custom data directory, a skill or plugin installed from the Marketplace is written to the default directory in the home folder, so the sidecar does not list or load it.
- Cause: the installer builds these paths from `os.homedir()` when its module loads. Only `.mcp.json` honors `WAGGLE_DATA_DIR`, and the MCP route also saves the entry in the server's data directory to make up for it.
- What we did: nothing yet. The community edition changed the default directory name only (ADR-0011).
- Recommendation: pass the server's data directory to `MarketplaceInstaller`, or resolve the paths at call time from `WAGGLE_DATA_DIR` like `mcpConfigPath()`.

View File

@@ -1,5 +1,5 @@
/**
* Custom Personas — user-created personas stored as JSON in ~/.waggle/personas/
* Custom Personas — user-created personas stored as JSON in ~/.waggle-community/personas/
* Loaded at startup and merged with built-in PERSONAS.
*/

View File

@@ -1,5 +1,5 @@
/**
* Custom Workflows — user-created workflow templates stored as JSON in ~/.waggle/workflows/
* Custom Workflows — user-created workflow templates stored as JSON in ~/.waggle-community/workflows/
*/
import fs from 'node:fs';

View File

@@ -14,7 +14,7 @@ interface HooksConfig {
}
/**
* Load user-configurable hooks from a JSON config file (e.g. ~/.waggle/hooks.json).
* Load user-configurable hooks from a JSON config file (e.g. ~/.waggle-community/hooks.json).
* If the file doesn't exist, returns silently — no error.
*
* Config format:

View File

@@ -1,7 +1,7 @@
/**
* Skill-audit sidecar (Odysseus §D2).
*
* ~/.waggle/skill-audit.json records the run-and-grade "verified" badge per
* ~/.waggle-community/skill-audit.json records the run-and-grade "verified" badge per
* skill — the sellable PRO artifact of the autonomous skill-audit loop
* (skill-audit.ts). DISTINCT from skill-hygiene.json (active|draft status):
* a skill can be active AND unverified, or active AND verified. The audit

View File

@@ -1,7 +1,7 @@
/**
* Skill hygiene sidecar (Odysseus §D1).
*
* ~/.waggle/skill-hygiene.json records each skill's hygiene status + advisory.
* ~/.waggle-community/skill-hygiene.json records each skill's hygiene status + advisory.
* The single-LLM-call judge (skill-hygiene.ts) writes here when a skill is found
* redundant-with-peers or too-generic, DEMOTING it to 'draft'. It never edits or
* deletes the SKILL.md, so the proven content and its change-detection hash never

View File

@@ -2,7 +2,7 @@
* Pre-write redaction for authored skill content.
*
* The closed-learning-loop (create_skill / auto_extract_skills) and the UI both
* persist skill markdown to disk (~/.waggle/skills). That content can carry
* persist skill markdown to disk (~/.waggle-community/skills). That content can carry
* secrets (API keys / tokens) or machine-specific filesystem paths pulled from
* the model's context or the user's input. The loop's "strip secrets/paths"
* instruction was model-advisory only — this enforces it deterministically

View File

@@ -3,7 +3,7 @@
*
* Walks the personal-scope skill directory and moves any SKILL.md file
* whose last-used timestamp (from skill-usage.json sidecar) is older than
* maxIdleDays into ~/.waggle/skills-archive/. Parallels the existing
* maxIdleDays into ~/.waggle-community/skills-archive/. Parallels the existing
* decayFrames() behavior in packages/weaver/src/consolidation.ts.
*
* Retirement rules:

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: {

View File

@@ -1,7 +1,7 @@
/**
* Skills 2.0 gap F — skill usage tracking.
*
* Sidecar JSON store at ~/.waggle/skill-usage.json that tracks when each
* Sidecar JSON store at ~/.waggle-community/skill-usage.json that tracks when each
* installed skill was last referenced and how many times. Consumed by
* retireStaleSkills to decide which SKILL.md files to archive.
*

View File

@@ -21,7 +21,7 @@ import type { InstallAuditRecorder } from '@waggle/shared';
/** Shared deps for every skill-write op. auditStore/onChange degrade gracefully. */
export interface SkillWriteDeps {
/** Directory holding personal-scope SKILL.md files (~/.waggle/skills). */
/** Directory holding personal-scope SKILL.md files (~/.waggle-community/skills). */
skillsDir: string;
/** Audit store — when present, every op records an install_audit row. */
auditStore?: InstallAuditRecorder;

View File

@@ -617,7 +617,7 @@ async function detectFromManifest(m: ToolManifest, deps: ResolvedDeps): Promise<
/**
* Run every registered tool's detector in parallel and assemble the envelope.
* The registry = built-in manifests (source of truth in @waggle/shared) +
* validated third-party adapters from ~/.waggle/adapters/*.json (#5). Order is
* validated third-party adapters from ~/.waggle-community/adapters/*.json (#5). Order is
* deterministic (registry order) so the UI doesn't shuffle between calls.
*/
export async function detectInstalledTools(

View File

@@ -1,13 +1,13 @@
/**
* AI-OS #5 — declarative loader for third-party tool adapters from
* ~/.waggle/adapters/*.json. Data only: hand-validated + safe-string-refined,
* ~/.waggle-community/adapters/*.json. Data only: hand-validated + safe-string-refined,
* PATH-detection only, never require()/eval. Never throws into detection.
*
* Validation is hand-rolled (not zod) to avoid adding a dependency to the agent
* package for one small flat schema; the safe-string refinement is the boundary
* defense against shell-metachar / path-traversal injection in adapter fields.
*/
import os from 'node:os';
import { defaultDataDir } from '@waggle/core';
import path from 'node:path';
import fs from 'node:fs';
import type { ToolManifest } from '@waggle/shared';
@@ -58,7 +58,7 @@ export interface ManifestLoaderDeps {
}
export function loadThirdPartyManifests(deps: ManifestLoaderDeps = {}): ToolManifest[] {
const dir = deps.dir ?? path.join(os.homedir(), '.waggle', 'adapters');
const dir = deps.dir ?? path.join(defaultDataDir(), 'adapters');
const readDir = deps.readDir ?? ((d) => fs.readdirSync(d));
const readFile = deps.readFile ?? ((p) => fs.readFileSync(p, 'utf8'));
let names: string[];

View File

@@ -6,7 +6,7 @@
* in tool-calls, within-model paired, graded on correctness.
*
* Usage: tsx packages/agent/tests/eval/hermes-skill-reuse-eval.ts
* Env: WAGGLE_DATA_DIR (vault location; default ~/.waggle)
* Env: WAGGLE_DATA_DIR (vault location; default ~/.waggle-community)
* HERMES_EVAL_N (override pair count; default = pilot 3)
* Output: tmp_hermes-skill-reuse.json (gitignored) + console verdict.
*
@@ -16,7 +16,7 @@ import { runAgentLoop } from '../../src/agent-loop.js';
import type { ToolDefinition } from '../../src/tools.js';
import { planSkillDistillation } from '../../src/skill-distillation.js';
import { CostTracker, BudgetExceededError } from '../../src/cost-tracker.js';
import { VaultStore } from '@waggle/core';
import { VaultStore, defaultDataDir } from '@waggle/core';
import * as fs from 'node:fs';
import * as os from 'node:os';
import * as path from 'node:path';
@@ -49,7 +49,7 @@ const COST_SAFETY = 1.3; // manifest §9.3
// the $5 pilot / $40 hard cap are enforced against this.
const MODEL_PRICING = { [MODEL]: { inputPer1k: 0.003, outputPer1k: 0.015 } };
const WAGGLE_DATA_DIR = process.env.WAGGLE_DATA_DIR || path.join(os.homedir(), '.waggle');
const WAGGLE_DATA_DIR = process.env.WAGGLE_DATA_DIR || defaultDataDir();
// ── Forcing corpus (manifest §7 + Amendment 3) ───────────────────────
// Fictional, project-specific "Floruxa" subsystem. Facts are scattered

View File

@@ -6,7 +6,7 @@
* tsx packages/agent/tests/eval/prompt-assembler-eval.ts
*
* Environment:
* WAGGLE_DATA_DIR — override ~/.waggle (for non-default installs)
* WAGGLE_DATA_DIR — override ~/.waggle-community (for non-default installs)
* WAGGLE_EVAL_SKIP_SECONDARY=1 — skip Gemma 4 26B MoE + Qwen3 secondary suites
* WAGGLE_EVAL_SEEDS — number of seeds per condition (default 3)
*
@@ -23,7 +23,7 @@
* EVAL-RESULTS.md — human-readable summary (committed)
*/
import { VaultStore } from '@waggle/core';
import { VaultStore, defaultDataDir } from '@waggle/core';
import {
createInMemoryMemoryStore,
PERSONAL_SCOPE,
@@ -43,7 +43,7 @@ import { execFileSync } from 'node:child_process';
// ── Config ──────────────────────────────────────────────────────────
const WAGGLE_DATA_DIR = process.env.WAGGLE_DATA_DIR ?? path.join(os.homedir(), '.waggle');
const WAGGLE_DATA_DIR = process.env.WAGGLE_DATA_DIR ?? defaultDataDir();
// Use fileURLToPath to handle Windows file:// URLs correctly (avoids
// `/D:/...` leading-slash bug that produced `D:\D:\...` double-drive paths).
const HARNESS_DIR = path.dirname(fileURLToPath(import.meta.url));

View File

@@ -16,7 +16,7 @@
* tsx packages/agent/tests/eval/prompt-assembler-v5-eval.ts
*
* Environment:
* WAGGLE_DATA_DIR — override ~/.waggle (for non-default installs)
* WAGGLE_DATA_DIR — override ~/.waggle-community (for non-default installs)
* WAGGLE_EVAL_SKIP_SECONDARY=1 — skip Gemma 4 26B MoE + Qwen thinking
* WAGGLE_EVAL_SEEDS — base seeds per condition (default 3)
* WAGGLE_EVAL_SKIP_SLUG_PROBE=1 — skip the pre-eval slug probe
@@ -32,7 +32,7 @@
* judges are reachable, the eval halts and reports partial state.
*/
import { VaultStore } from '@waggle/core';
import { VaultStore, defaultDataDir } from '@waggle/core';
import {
createInMemoryMemoryStore,
PERSONAL_SCOPE,
@@ -57,7 +57,7 @@ process.env.WAGGLE_EVAL_MODE = '1';
// ── Config ──────────────────────────────────────────────────────────
const WAGGLE_DATA_DIR = process.env.WAGGLE_DATA_DIR ?? path.join(os.homedir(), '.waggle');
const WAGGLE_DATA_DIR = process.env.WAGGLE_DATA_DIR ?? defaultDataDir();
const HARNESS_DIR = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(path.join(HARNESS_DIR, '..', '..', '..', '..'));
const RESULTS_JSON = path.join(REPO_ROOT, 'tmp_bench_results-v5.json');

View File

@@ -162,7 +162,7 @@ describe('Marketplace Commands', () => {
// Mock install response
fetchSpy.mockResolvedValueOnce(new Response(JSON.stringify({
success: true,
message: 'Installed to ~/.waggle/skills/',
message: 'Installed to ~/.waggle-community/skills/',
}), { status: 200 }));
const ctx = mockContext();

View File

@@ -7,6 +7,8 @@
* waggle --help Show help
*/
// Help loads no dependency (see cli-runtime.test.ts), so the default data
// directory is spelled out here; that test checks it matches DEFAULT_DATA_DIR_LABEL.
function printHelp(): void {
console.log(`
Waggle CLI — interactive AI agent with persistent memory
@@ -17,7 +19,7 @@ Usage:
waggle --help Show this help message
Configuration:
Edit ~/.waggle/config.json to set up providers and API keys.
Edit ~/.waggle-community/config.json to set up providers and API keys.
Commands (inside REPL):
/model <name> Switch model

View File

@@ -7,10 +7,9 @@
*/
import readline from 'node:readline';
import os from 'node:os';
import path from 'node:path';
import chalk from 'chalk';
import { WaggleConfig, WaggleDB, createMemoryEmbedder } from '@waggle/core';
import { WaggleConfig, WaggleDB, createMemoryEmbedder, defaultDataDir, DEFAULT_DATA_DIR_LABEL } from '@waggle/core';
import { PERSONAL_SCOPE } from '@waggle/memory-contract';
import { createMem0MemoryStore } from '@waggle/memory-mem0';
import { Orchestrator, ModelRouter, runAgentLoop, createSystemTools, createPlanTools, createGitTools, Workspace, ensureIdentity, loadSystemPromptWithOverrides, loadSkills, CostTracker, HookRegistry, loadHooksFromConfig, needsConfirmation } from '@waggle/agent';
@@ -44,20 +43,20 @@ export async function startRepl(options: ReplOptions = {}): Promise<void> {
const workspace = new Workspace(process.cwd());
workspace.init();
// Load user customizations from ~/.waggle/.
const waggleHome = path.join(os.homedir(), '.waggle');
// Load user customizations from the data directory.
const waggleHome = defaultDataDir();
const composedPrompt = loadSystemPromptWithOverrides(waggleHome);
const userSystemPrompt = composedPrompt.userPromptMd;
const skills = loadSkills(waggleHome);
// Load user-configurable hooks from ~/.waggle/hooks.json
// Load user-configurable hooks from <data dir>/hooks.json
const hookRegistry = new HookRegistry();
await loadHooksFromConfig(path.join(waggleHome, 'hooks.json'), hookRegistry);
// The proxy for non-local models; local ollama/* models skip it (model-endpoint.ts).
const wsConfig = workspace.getConfig();
// Memory: the same store the desktop app uses (ADR-0007), in ~/.waggle/memory.
// Memory: the same store the desktop app uses (ADR-0007), in <data dir>/memory.
const memory = await createMem0MemoryStore({
directory: path.join(waggleHome, 'memory'),
embedder: createMemoryEmbedder({ cacheDir: path.join(waggleHome, 'models') }),
@@ -176,7 +175,7 @@ export async function startRepl(options: ReplOptions = {}): Promise<void> {
console.log(chalk.dim(' ') + chalk.cyan(m) + marker);
}
if (models.length === 0) {
console.log(chalk.dim(' No models configured. Edit ~/.waggle/config.json'));
console.log(chalk.dim(` No models configured. Edit ${DEFAULT_DATA_DIR_LABEL}/config.json`));
}
console.log('');
break;
@@ -333,9 +332,9 @@ When asked about current events, products, releases, docs, or anything you're no
const errMsg = (err as Error).message;
if (errMsg.includes('Unknown model')) {
console.log(chalk.red(`Model "${currentModel}" is not configured.`));
console.log(chalk.dim('Run /models to see available models, or edit ~/.waggle/config.json'));
console.log(chalk.dim(`Run /models to see available models, or edit ${DEFAULT_DATA_DIR_LABEL}/config.json`));
} else if (errMsg.includes('API key') || errMsg.includes('authentication') || errMsg.includes('401')) {
console.log(chalk.red('Authentication failed. Check your API key in ~/.waggle/config.json'));
console.log(chalk.red(`Authentication failed. Check your API key in ${DEFAULT_DATA_DIR_LABEL}/config.json`));
} else {
console.log(chalk.red(`Error: ${errMsg}`));
}

View File

@@ -8,6 +8,7 @@ import type { AddressInfo } from 'node:net';
import os from 'node:os';
import path from 'node:path';
import { describe, expect, it } from 'vitest';
import { DEFAULT_DATA_DIR_LABEL, DEFAULT_DATA_DIR_NAME } from '@waggle/shared';
const ROOT = path.resolve(import.meta.dirname, '..', '..', '..');
const CLI_DIR = path.join(ROOT, 'packages', 'cli');
@@ -242,8 +243,9 @@ describe('@waggle/cli runtime UX', () => {
expect(result.status).toBe(0);
expect(result.stdout).toContain('Waggle CLI');
expect(result.stdout).toContain('Usage:');
expect(result.stdout).toContain(`${DEFAULT_DATA_DIR_LABEL}/config.json`);
expect(result.stderr).toBe('');
expect(fs.existsSync(path.join(home, '.waggle'))).toBe(false);
expect(fs.existsSync(path.join(home, DEFAULT_DATA_DIR_NAME))).toBe(false);
} finally {
fs.rmSync(home, { recursive: true, force: true });
}
@@ -281,7 +283,7 @@ describe('@waggle/cli runtime UX', () => {
expect(result.stdout).toContain('Waggle CLI');
expect(result.stdout).toContain('Usage:');
expect(result.stderr).toBe('');
expect(fs.existsSync(path.join(home, '.waggle'))).toBe(false);
expect(fs.existsSync(path.join(home, DEFAULT_DATA_DIR_NAME))).toBe(false);
} finally {
fs.rmSync(home, { recursive: true, force: true });
}
@@ -399,7 +401,7 @@ describe('@waggle/cli runtime UX', () => {
expect(result.stdout).toContain('Waggle CLI');
expect(result.stdout).toContain('Usage:');
expect(result.stderr).toBe('');
expect(fs.existsSync(path.join(home, '.waggle'))).toBe(false);
expect(fs.existsSync(path.join(home, DEFAULT_DATA_DIR_NAME))).toBe(false);
} finally {
fs.rmSync(home, { recursive: true, force: true });
}
@@ -505,9 +507,11 @@ describe('@waggle/cli runtime UX', () => {
expect(stdout).toContain('Goodbye!');
expect(stderr).not.toContain('Fatal error');
// Memory (mem0) and Waggle's own database live in the data directory (ADR-0007).
expect(fs.existsSync(path.join(home, '.waggle', 'memory', 'waggle-memory.json'))).toBe(true);
expect(fs.existsSync(path.join(home, '.waggle', 'waggle.db'))).toBe(true);
expect(fs.existsSync(path.join(home, '.waggle', 'default.mind'))).toBe(false);
expect(fs.existsSync(path.join(home, DEFAULT_DATA_DIR_NAME, 'memory', 'waggle-memory.json'))).toBe(true);
expect(fs.existsSync(path.join(home, DEFAULT_DATA_DIR_NAME, 'waggle.db'))).toBe(true);
expect(fs.existsSync(path.join(home, DEFAULT_DATA_DIR_NAME, 'default.mind'))).toBe(false);
// ADR-0011: the commercial edition's directory stays untouched.
expect(fs.existsSync(path.join(home, '.waggle'))).toBe(false);
} finally {
if (child) await stopProcess(child);
fs.rmSync(home, { recursive: true, force: true });
@@ -564,7 +568,7 @@ describe('@waggle/cli runtime UX', () => {
}
mockLiteLlm = await startMockLiteLlm();
const waggleHome = path.join(home, '.waggle');
const waggleHome = path.join(home, DEFAULT_DATA_DIR_NAME);
const workspaceConfigDir = path.join(projectDir, '.waggle');
fs.mkdirSync(waggleHome, { recursive: true });
fs.mkdirSync(workspaceConfigDir, { recursive: true });

View File

@@ -1,6 +1,7 @@
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
import { DEFAULT_DATA_DIR_NAME } from '@waggle/shared';
import type { EmbeddingProviderConfig, EmbeddingProviderType } from './embeddings/embedding-provider.js';
export interface ProviderEntry {
@@ -14,7 +15,8 @@ export interface CliConfig {
}
// Keys the commercial edition writes (tier, trialStartedAt, teamServer) are not
// read here but stay in config.json on save: both editions may share ~/.waggle.
// read here but stay in config.json on save, in case a user points both
// editions at one data directory with WAGGLE_DATA_DIR.
interface ConfigData {
defaultModel: string;
providers: Record<string, ProviderEntry>;
@@ -72,9 +74,17 @@ function getNonBlankEnv(name: string): string | undefined {
return process.env[name]?.trim() || undefined;
}
/**
* The default data directory, `~/.waggle-community` (ADR-0011). Callers that
* honor WAGGLE_DATA_DIR check it before falling back to this.
*/
export function defaultDataDir(): string {
return path.join(os.homedir(), DEFAULT_DATA_DIR_NAME);
}
function getDefaultConfigDir(): string {
const home = process.env.HOME || process.env.USERPROFILE || os.homedir();
return path.join(home, '.waggle');
return path.join(home, DEFAULT_DATA_DIR_NAME);
}
export class WaggleConfig {

View File

@@ -2,11 +2,11 @@
* In-process embedder using @huggingface/transformers (ONNX Runtime).
* Default provider for ALL desktop users — zero config, works offline.
* Model: Xenova/all-MiniLM-L6-v2 (384 native dims, normalized to target dims).
* Downloads ~90MB fp32 model on first use, cached in ~/.waggle/models/.
* Downloads ~90MB fp32 model on first use, cached in <data dir>/models/.
*/
import path from 'node:path';
import os from 'node:os';
import { defaultDataDir } from '../config.js';
import { createLazyEmbedder, type Embedder } from './embeddings.js';
import { createCoreLogger } from '../logger.js';
import { withTransformersModelLoad } from './transformers-model-load.js';
@@ -32,7 +32,7 @@ export function normalizeDimensions(embedding: Float32Array, targetDims: number)
export async function createInProcessEmbedder(config?: Partial<InProcessEmbedderConfig>): Promise<Embedder> {
const model = config?.model ?? DEFAULT_MODEL;
const cacheDir = config?.cacheDir ?? path.join(os.homedir(), '.waggle', 'models');
const cacheDir = config?.cacheDir ?? path.join(defaultDataDir(), 'models');
const targetDims = config?.targetDimensions ?? 1024;
log.info(`Loading in-process embedding model: ${model} (~90MB fp32 first download)`);

View File

@@ -4,7 +4,7 @@
* Provides a clean interface for reading/writing workspace files that abstracts
* over the underlying storage backend. Two implementations:
*
* - LocalFileStore: manages files in ~/.waggle/workspaces/{id}/files/ (virtual storage)
* - LocalFileStore: manages files in ~/.waggle-community/workspaces/{id}/files/ (virtual storage)
* - LinkedDirStore: reads/writes to workspace.directory (linked to external folder)
*
* All operations enforce path traversal protection — files cannot escape

View File

@@ -54,7 +54,8 @@ export {
} from './execution-traces.js';
// ── Waggle-specific orchestration ──
export { WaggleConfig, type ProviderEntry } from './config.js';
export { WaggleConfig, defaultDataDir, type ProviderEntry } from './config.js';
export { DEFAULT_DATA_DIR_NAME, DEFAULT_DATA_DIR_LABEL } from '@waggle/shared';
export {
CronStore, CRON_SCHEDULES_TABLE_SQL, CRON_RUN_LEASES_TABLE_SQL, VALID_JOB_TYPES, cronExprError,
type CronSchedule, type CreateScheduleInput, type CronJobType,

View File

@@ -19,7 +19,7 @@
*/
import path from 'node:path';
import os from 'node:os';
import { defaultDataDir } from '../config.js';
import { createCoreLogger } from '../logger.js';
import { withTransformersModelLoad } from '../embeddings/transformers-model-load.js';
@@ -53,7 +53,7 @@ export async function createInProcessReranker(
config?: Partial<InProcessRerankerConfig>,
): Promise<Reranker> {
const model = config?.model ?? 'Xenova/ms-marco-MiniLM-L-6-v2';
const cacheDir = config?.cacheDir ?? path.join(os.homedir(), '.waggle', 'models');
const cacheDir = config?.cacheDir ?? path.join(defaultDataDir(), 'models');
log.info(`Loading in-process reranker: ${model} (~22MB first download)`);

View File

@@ -1,7 +1,7 @@
/**
* TelemetryStore — local, privacy-first event tracking.
*
* All data stays in ~/.waggle/telemetry.db (SQLite).
* All data stays in ~/.waggle-community/telemetry.db (SQLite).
* Default: OFF. User opts in via Settings toggle.
* No cloud reporting in M2 — data is queryable via local API only.
*

View File

@@ -26,7 +26,8 @@ Run `waggle-server --help` for the full list.
Supported systems: Windows x64, macOS (Apple silicon and Intel), Linux x64. You need Node.js
20 or newer only for the first `npx` call.
Your data lives in `~/.waggle` (or `WAGGLE_DATA_DIR`). `uninstall` does not touch it.
Your data lives in `~/.waggle-community` (or `WAGGLE_DATA_DIR`), apart from the commercial
Waggle's `~/.waggle`. `uninstall` does not touch it.
The package and command names are temporary until the product name is decided, and until
the release location is set, install from an archive with `--from`.

View File

@@ -1,4 +1,4 @@
import { COMMAND_NAME } from './platform.js';
import { COMMAND_NAME, DATA_DIR_NAME } from './platform.js';
export type Command = 'install' | 'update' | 'run' | 'doctor' | 'uninstall' | 'help' | 'version';
@@ -97,7 +97,7 @@ export function formatHelp(version: string): string {
--sha256 <hex> Expected SHA-256 of the archive
--dir <path> Install directory
--bin-dir <path> Where to put the ${COMMAND_NAME} command
--data-dir <path> Data directory (default: $WAGGLE_DATA_DIR or ~/.waggle)
--data-dir <path> Data directory (default: $WAGGLE_DATA_DIR or ~/${DATA_DIR_NAME})
--port, -p <number> Server port (default: ${DEFAULT_PORT})
--no-open Do not open the browser
--force Reinstall even when this version is installed

View File

@@ -9,6 +9,14 @@ import path from 'node:path';
/** The command the installer puts on the PATH. A working name until the product name is decided. */
export const COMMAND_NAME = 'waggle-server';
/**
* The default data directory under the home directory, kept apart from the
* commercial Waggle's `~/.waggle` (ADR-0011). A temporary name: the final one
* follows the product-name decision (Q8). The launcher uses only Node's
* built-in modules, so this copies `DEFAULT_DATA_DIR_NAME` from `@waggle/shared`.
*/
export const DATA_DIR_NAME = '.waggle-community';
export interface Host {
platform: NodeJS.Platform;
arch: string;
@@ -63,9 +71,9 @@ export function defaultBinDir(host: Host, installDir: string): string {
return host.platform === 'win32' ? p.join(installDir, 'bin') : p.join(host.homedir, '.local', 'bin');
}
/** Same rule as the sidecar's resolveDataDir: WAGGLE_DATA_DIR, else ~/.waggle. */
/** Same rule as the sidecar's resolveDataDir: WAGGLE_DATA_DIR, else ~/.waggle-community. */
export function defaultDataDir(host: Host): string {
return host.env.WAGGLE_DATA_DIR || pathApi(host.platform).join(host.homedir, '.waggle');
return host.env.WAGGLE_DATA_DIR || pathApi(host.platform).join(host.homedir, DATA_DIR_NAME);
}
export function isOnPath(host: Host, dir: string): boolean {

View File

@@ -92,7 +92,8 @@ describe('platform paths', () => {
});
it('follows the sidecar data directory rule', () => {
expect(defaultDataDir(host('linux'))).toBe('/home/ana/.waggle');
expect(defaultDataDir(host('linux'))).toBe('/home/ana/.waggle-community');
expect(defaultDataDir(host('win32'))).toBe('C:\\Users\\ana\\.waggle-community');
expect(defaultDataDir(host('linux', { WAGGLE_DATA_DIR: '/srv/waggle' }))).toBe('/srv/waggle');
});
@@ -107,7 +108,7 @@ describe('payload helpers', () => {
it('gives the server the environment the desktop shell gives it', () => {
const env = serviceEnvironment({
appDir: '/opt/w/app',
dataDir: '/home/ana/.waggle',
dataDir: '/home/ana/.waggle-community',
port: 4000,
platform: 'linux',
baseEnv: { PATH: '/usr/bin', WAGGLE_DATA_DIR: '/stale' },
@@ -119,8 +120,8 @@ describe('payload helpers', () => {
WAGGLE_FRONTEND_DIR: '/opt/w/app/web',
NODE_PATH: '/opt/w/app/node_modules:/opt/w/app/native',
PATH: '/opt/w/app/node_modules/waggle-node-runtime/bin:/opt/w/app:/usr/bin',
NPM_CONFIG_PREFIX: '/home/ana/.waggle/npm/prefix',
NPM_CONFIG_CACHE: '/home/ana/.waggle/npm/cache',
NPM_CONFIG_PREFIX: '/home/ana/.waggle-community/npm/prefix',
NPM_CONFIG_CACHE: '/home/ana/.waggle-community/npm/cache',
});
expect(env.WAGGLE_DATA_DIR).toBeUndefined();

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` |

View File

@@ -14,6 +14,7 @@
* waggle-market info <name|id> Show package details
*/
import { DATA_DIR_NAME } from './data-dir.js';
import { MarketplaceDB } from './db.js';
import { MarketplaceInstaller } from './installer.js';
import { MarketplaceSync } from './sync.js';
@@ -412,7 +413,7 @@ async function main() {
// Show current config
const gate = new SecurityGate();
console.log('\n🔧 Security Configuration:');
console.log(' (edit ~/.waggle/security-config.json or use waggle-market security-config <key> <value>)');
console.log(` (edit ~/${DATA_DIR_NAME}/security-config.json or use waggle-market security-config <key> <value>)`);
// Would read from security_config table
} else if (positionals.length >= 2) {
console.log(` Set ${positionals[0]} = ${positionals[1]}`);

View File

@@ -0,0 +1,8 @@
/**
* The default data directory under the home directory, kept apart from the
* commercial Waggle's `~/.waggle` (ADR-0011). A temporary name: the final one
* follows the product-name decision (Q8). The marketplace installs on its own,
* without the workspace packages, so this copies `DEFAULT_DATA_DIR_NAME` from
* `@waggle/shared`; `packages/shared/tests/data-dir.test.ts` checks they match.
*/
export const DATA_DIR_NAME = '.waggle-community';

View File

@@ -8,6 +8,7 @@
import Database from 'better-sqlite3';
import { join } from 'path';
import { homedir } from 'os';
import { DATA_DIR_NAME } from './data-dir.js';
import { seedMcpServers } from './mcp-registry.js';
import type {
MarketplacePackage,
@@ -21,7 +22,7 @@ import type {
SearchSort,
} from './types.js';
const DEFAULT_DB_PATH = join(homedir(), '.waggle', 'marketplace.db');
const DEFAULT_DB_PATH = join(homedir(), DATA_DIR_NAME, 'marketplace.db');
export class MarketplaceDB {
private db: Database.Database;

View File

@@ -2,14 +2,14 @@
* Waggle Marketplace — Package Installer
*
* Handles installation of skills, plugins, and MCP servers from the
* marketplace database into the user's ~/.waggle/ directory.
* marketplace database into the user's data directory (~/.waggle-community/).
*
* Installation strategies per type:
*
* SKILL: Download/copy markdown file → ~/.waggle/skills/{name}.md
* SKILL: Download/copy markdown file → ~/.waggle-community/skills/{name}.md
* Then call PUT /api/skills/{name} if server is running.
*
* PLUGIN: Clone/download plugin dir → ~/.waggle/plugins/{name}/
* PLUGIN: Clone/download plugin dir → ~/.waggle-community/plugins/{name}/
* Write plugin.json manifest, copy skill files, register in registry.json.
* Then call POST /api/plugins/install if server is running.
*
@@ -19,6 +19,7 @@
import { existsSync, mkdirSync, writeFileSync, readFileSync, copyFileSync, rmSync } from 'fs';
import { join, dirname, resolve } from 'path';
import { homedir } from 'os';
import { DATA_DIR_NAME } from './data-dir.js';
import { createHash } from 'node:crypto';
import { MarketplaceDB } from './db.js';
import { SecurityGate, type ScanResult, type SecurityGateConfig } from './security.js';
@@ -44,7 +45,7 @@ import type {
PluginManifest,
} from './types.js';
const WAGGLE_DIR = join(homedir(), '.waggle');
const WAGGLE_DIR = join(homedir(), DATA_DIR_NAME);
const SKILLS_DIR = join(WAGGLE_DIR, 'skills');
const PLUGINS_DIR = join(WAGGLE_DIR, 'plugins');
const REGISTRY_PATH = join(PLUGINS_DIR, 'registry.json');
@@ -82,7 +83,7 @@ function isPluginRegistryPath(candidate: string): boolean {
}
// UX-Refactor Phase 4 (C4): the sidecar boot loader reads <dataDir>/.mcp.json
// (dataDir = WAGGLE_DATA_DIR or ~/.waggle — see server local/mcp-config.ts).
// (dataDir = WAGGLE_DATA_DIR or ~/.waggle-community — see server local/mcp-config.ts).
// This previously wrote to process.cwd(), a file nothing ever read.
// Resolved at CALL time (not module import) so a host that sets
// WAGGLE_DATA_DIR after this module loads still writes to the right place.

View File

@@ -21,6 +21,7 @@
import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync } from 'fs';
import { join, dirname } from 'path';
import { homedir } from 'os';
import { DATA_DIR_NAME } from './data-dir.js';
import { execFileSync } from 'child_process';
import { createHash } from 'crypto';
import type { MarketplacePackage, InstallManifest, McpServerConfig } from './types.js';
@@ -180,7 +181,7 @@ const DEFAULT_CONFIG: SecurityGateConfig = {
allow_force_bypass: false,
gen_trust_hub_url: 'https://ai.gendigital.com/api/scan/lookup',
cisco_scanner_args: ['--use-behavioral', '--format', 'json'],
cache_dir: join(homedir(), '.waggle', 'security-cache'),
cache_dir: join(homedir(), DATA_DIR_NAME, 'security-cache'),
cache_ttl_hours: 24,
};
@@ -1108,6 +1109,7 @@ export class SecurityGate {
const crossOrigin = [
/~\/\.claude\/(?:skills|plugins|hooks|commands)/i,
/~\/\.waggle\/skills/i,
new RegExp(`~/${DATA_DIR_NAME.replace(/\./g, '\\.')}/skills`, 'i'),
/CLAUDE\.md/i,
/\.cursorrules/i,
/write.*(?:CLAUDE\.md|\.cursorrules|settings\.json|hooks\/)/i,

View File

@@ -3,6 +3,7 @@ import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import { describe, expect, it } from 'vitest';
import { DATA_DIR_NAME } from '../src/data-dir.js';
const ROOT = path.resolve(import.meta.dirname, '..', '..', '..');
const MARKETPLACE_DIR = path.join(ROOT, 'packages', 'marketplace');
@@ -50,7 +51,7 @@ function run(
}
function marketplaceDbExists(home: string): boolean {
return fs.existsSync(path.join(home, '.waggle', 'marketplace.db'));
return fs.existsSync(path.join(home, DATA_DIR_NAME, 'marketplace.db'));
}
function readPackageJson(): {

View File

@@ -3,6 +3,7 @@ import { homedir, tmpdir } from 'node:os';
import { join } from 'node:path';
import { createHash, randomUUID } from 'node:crypto';
import { afterAll, afterEach, describe, expect, it, vi } from 'vitest';
import { DATA_DIR_NAME } from '../src/data-dir.js';
import { MarketplaceInstaller } from '../src/installer.js';
import {
assertSafeGitUrl,
@@ -188,8 +189,8 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects a caller-selected skill path inside the managed directory without overwriting it', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const managedPath = join(isolatedHome, '.waggle', 'skills', 'existing.md');
mkdirSync(join(isolatedHome, '.waggle', 'skills'), { recursive: true });
const managedPath = join(isolatedHome, DATA_DIR_NAME, 'skills', 'existing.md');
mkdirSync(join(isolatedHome, DATA_DIR_NAME, 'skills'), { recursive: true });
writeFileSync(managedPath, '# keep', 'utf8');
const { installer, recordInstallation } = installerFor(packageFixture());
@@ -203,7 +204,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('does not clean up a pre-existing plugin directory when a forced reinstall fails', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `existing-plugin-${randomUUID()}`;
const pluginDir = join(isolatedHome, '.waggle', 'plugins', name);
const pluginDir = join(isolatedHome, DATA_DIR_NAME, 'plugins', name);
const sentinel = join(pluginDir, 'keep.txt');
mkdirSync(pluginDir, { recursive: true });
writeFileSync(sentinel, 'keep', 'utf8');
@@ -226,8 +227,8 @@ describe('MarketplaceInstaller security boundaries', () => {
it('does not delete the plugin registry when a package name collides with it', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const registryPath = join(isolatedHome, '.waggle', 'plugins', 'registry.json');
mkdirSync(join(isolatedHome, '.waggle', 'plugins'), { recursive: true });
const registryPath = join(isolatedHome, DATA_DIR_NAME, 'plugins', 'registry.json');
mkdirSync(join(isolatedHome, DATA_DIR_NAME, 'plugins'), { recursive: true });
writeFileSync(registryPath, '{"keep":true}', 'utf8');
const { installer, recordInstallation } = installerFor(packageFixture({
name: 'registry.json',
@@ -245,8 +246,8 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects a case-insensitive alias of the reserved plugin registry path', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const registryPath = join(isolatedHome, '.waggle', 'plugins', 'registry.json');
mkdirSync(join(isolatedHome, '.waggle', 'plugins'), { recursive: true });
const registryPath = join(isolatedHome, DATA_DIR_NAME, 'plugins', 'registry.json');
mkdirSync(join(isolatedHome, DATA_DIR_NAME, 'plugins'), { recursive: true });
writeFileSync(registryPath, '{"keep":true}', 'utf8');
const { installer, recordInstallation } = installerFor(packageFixture({
name: 'REGISTRY.JSON',
@@ -266,7 +267,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects a traversal identifier before a plugin can escape the plugins directory', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const escapedName = `escaped-${randomUUID()}`;
const escapedPath = join(homedir(), '.waggle', escapedName);
const escapedPath = join(homedir(), DATA_DIR_NAME, escapedName);
cleanupPaths.push(escapedPath);
const { installer, recordInstallation } = installerFor(packageFixture({
name: `../${escapedName}`,
@@ -285,7 +286,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects an uncurated plugin git selector before clone execution', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `git-plugin-${randomUUID()}`;
cleanupPaths.push(join(homedir(), '.waggle', 'plugins', name));
cleanupPaths.push(join(homedir(), DATA_DIR_NAME, 'plugins', name));
const { installer } = installerFor(packageFixture({
name,
package_type: 'plugin',
@@ -303,7 +304,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects a plugin git URL containing shell syntax before process launch', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `git-injection-${randomUUID()}`;
cleanupPaths.push(join(homedir(), '.waggle', 'plugins', name));
cleanupPaths.push(join(homedir(), DATA_DIR_NAME, 'plugins', name));
const { installer } = installerFor(packageFixture({
name,
package_type: 'plugin',
@@ -321,7 +322,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects an uncurated plugin npm selector before lifecycle-script execution', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `npm-plugin-${randomUUID()}`;
cleanupPaths.push(join(homedir(), '.waggle', 'plugins', name));
cleanupPaths.push(join(homedir(), DATA_DIR_NAME, 'plugins', name));
const { installer } = installerFor(packageFixture({
name,
package_type: 'plugin',
@@ -345,7 +346,7 @@ describe('MarketplaceInstaller security boundaries', () => {
});
vi.stubGlobal('fetch', fetchMock);
const name = `bundled-skill-${randomUUID()}`;
const pluginDir = join(homedir(), '.waggle', 'plugins', name);
const pluginDir = join(homedir(), DATA_DIR_NAME, 'plugins', name);
cleanupPaths.push(pluginDir);
const { installer, getPackageByName, recordInstallation } = installerFor(packageFixture({
name,
@@ -378,7 +379,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('preserves installation of inline skill content', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `inline-skill-${randomUUID()}`;
const skillPath = join(homedir(), '.waggle', 'skills', `${name}.md`);
const skillPath = join(homedir(), DATA_DIR_NAME, 'skills', `${name}.md`);
cleanupPaths.push(skillPath);
const { installer } = installerFor(packageFixture({
name,
@@ -394,7 +395,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('installs the exact remote skill bytes that passed the security scan', async () => {
const name = `remote-skill-${randomUUID()}`;
const skillPath = join(homedir(), '.waggle', 'skills', `${name}.md`);
const skillPath = join(homedir(), DATA_DIR_NAME, 'skills', `${name}.md`);
cleanupPaths.push(skillPath);
const fetchMock = vi.fn()
.mockResolvedValueOnce(new Response('# Benign scanned skill'))
@@ -419,7 +420,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects plugin npm package shell syntax before process launch', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `npm-injection-${randomUUID()}`;
cleanupPaths.push(join(homedir(), '.waggle', 'plugins', name));
cleanupPaths.push(join(homedir(), DATA_DIR_NAME, 'plugins', name));
const { installer } = installerFor(packageFixture({
name,
package_type: 'plugin',
@@ -458,7 +459,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects custom npm_args instead of treating catalog metadata as npm options', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `npm-args-${randomUUID()}`;
cleanupPaths.push(join(homedir(), '.waggle', 'plugins', name));
cleanupPaths.push(join(homedir(), DATA_DIR_NAME, 'plugins', name));
const { installer } = installerFor(packageFixture({
name,
package_type: 'plugin',
@@ -479,7 +480,7 @@ describe('MarketplaceInstaller security boundaries', () => {
])('rejects a non-empty $type post-install array before any side effect', async hook => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `post-install-${randomUUID()}`;
const pluginDir = join(homedir(), '.waggle', 'plugins', name);
const pluginDir = join(homedir(), DATA_DIR_NAME, 'plugins', name);
cleanupPaths.push(pluginDir);
const { installer, recordInstallation } = installerFor(packageFixture({
name,
@@ -503,7 +504,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('preserves a plugin manifest containing an exact curated MCP profile', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `curated-mcp-plugin-${randomUUID()}`;
const pluginDir = join(homedir(), '.waggle', 'plugins', name);
const pluginDir = join(homedir(), DATA_DIR_NAME, 'plugins', name);
cleanupPaths.push(pluginDir);
const curatedMcp = MCP_SERVERS.find(server => server.name === 'memory')!
.install_manifest!.mcp_config!;
@@ -532,7 +533,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('maps an embedded plugin MCP setting only to its matching blank environment key', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const name = `brave-plugin-${randomUUID()}`;
const pluginDir = join(homedir(), '.waggle', 'plugins', name);
const pluginDir = join(homedir(), DATA_DIR_NAME, 'plugins', name);
cleanupPaths.push(pluginDir);
const braveConfig = MCP_SERVERS.find(server => server.name === 'brave-search')!
.install_manifest!.mcp_config!;
@@ -570,7 +571,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects undeclared plugin executable capabilities before writing plugin files', async () => {
const name = `plugin-tools-${randomUUID()}`;
const pluginDir = join(homedir(), '.waggle', 'plugins', name);
const pluginDir = join(homedir(), DATA_DIR_NAME, 'plugins', name);
cleanupPaths.push(pluginDir);
const pluginManifest = {
name,
@@ -723,7 +724,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects an arbitrary launcher embedded in a marketplace plugin manifest', async () => {
const name = `plugin-mcp-${randomUUID()}`;
cleanupPaths.push(join(homedir(), '.waggle', 'plugins', name));
cleanupPaths.push(join(homedir(), DATA_DIR_NAME, 'plugins', name));
const { installer, recordInstallation } = installerFor(packageFixture({
name,
package_type: 'plugin',
@@ -829,13 +830,13 @@ describe('MarketplaceInstaller security boundaries', () => {
it('rejects an approved MCP manifest cloned under a noncanonical source', async () => {
const brave = MCP_SERVERS.find(server => server.name === 'brave-search')!;
const configPath = join(isolatedHome, '.waggle', '.mcp.json');
const configPath = join(isolatedHome, DATA_DIR_NAME, '.mcp.json');
const originalConfig = JSON.stringify({
mcpServers: {
existing: { command: 'existing-command', args: ['existing-arg'] },
},
});
mkdirSync(join(isolatedHome, '.waggle'), { recursive: true });
mkdirSync(join(isolatedHome, DATA_DIR_NAME), { recursive: true });
writeFileSync(configPath, originalConfig, 'utf8');
const customSource = sourceFixture({
id: 77,
@@ -983,7 +984,7 @@ describe('MarketplaceInstaller security boundaries', () => {
const scan = await installer.scanOnly(pkg.id);
expect(scan).not.toBeNull();
const expectedApprovalIdentity = MarketplaceInstaller.createApprovalIdentity(pkg, scan!);
cleanupPaths.push(join(isolatedHome, '.waggle', 'skills', `${name}.md`));
cleanupPaths.push(join(isolatedHome, DATA_DIR_NAME, 'skills', `${name}.md`));
const result = await installer.install({ packageId: pkg.id, expectedApprovalIdentity });
@@ -1102,7 +1103,7 @@ describe('MarketplaceInstaller security boundaries', () => {
it('does not delete outside the plugins directory when uninstalling a traversal identifier', async () => {
vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('server offline')));
const escapedName = `uninstall-sentinel-${randomUUID()}`;
const escapedPath = join(homedir(), '.waggle', escapedName);
const escapedPath = join(homedir(), DATA_DIR_NAME, escapedName);
const sentinel = join(escapedPath, 'keep.txt');
cleanupPaths.push(escapedPath);
mkdirSync(escapedPath, { recursive: true });

View File

@@ -5,7 +5,7 @@
* sources are populated, URLs are well-formed, and sync results have
* the correct shape.
*
* Uses a temporary SQLite database (not the real ~/.waggle/marketplace.db)
* Uses a temporary SQLite database (not the real ~/.waggle-community/marketplace.db)
* and mocks global fetch to avoid real network calls.
*/

View File

@@ -21,7 +21,7 @@
*
* Embedders:
* inprocess Xenova/all-MiniLM-L6-v2 padded to 1024 dimensions, as in the
* sidecar, loaded from WAGGLE_MODELS_DIR (default ~/.waggle/models).
* sidecar, loaded from WAGGLE_MODELS_DIR (default ~/.waggle-community/models).
* ollama OLLAMA_HOST (default http://localhost:11434) and
* OLLAMA_EMBED_MODEL (default nomic-embed-text). Ollama must
* already be running with the model pulled.
@@ -41,6 +41,7 @@ import path from 'node:path';
import { performance } from 'node:perf_hooks';
import { fileURLToPath } from 'node:url';
import type { MemoryImportance, MemoryKind } from '@waggle/memory-contract';
import { DEFAULT_DATA_DIR_NAME } from '@waggle/shared';
// The adapter sets this too; setting it first keeps telemetry off even if
// something loads mem0 earlier than the adapter.
@@ -431,7 +432,7 @@ function packageVersion(fromDir: string, name: string): string {
async function main(): Promise<void> {
const options = parseArgs(process.argv.slice(2));
const set = JSON.parse(fs.readFileSync(path.join(BENCH_DIR, 'reference-set.json'), 'utf8')) as ReferenceSet;
const modelsDir = process.env.WAGGLE_MODELS_DIR ?? path.join(os.homedir(), '.waggle', 'models');
const modelsDir = process.env.WAGGLE_MODELS_DIR ?? path.join(os.homedir(), DEFAULT_DATA_DIR_NAME, 'models');
const plan = planEmbedder(options.embedder, modelsDir);
guardNetwork(plan.remoteHost);

View File

@@ -57,7 +57,7 @@ export interface ActivationDependencies {
requiredCapabilities?: string[];
/** Capabilities available in the current environment */
availableCapabilities?: string[];
/** Path to the plugin directory (e.g., ~/.waggle/plugins/<name>/) for resolving tool implementations */
/** Path to the plugin directory (e.g., ~/.waggle-community/plugins/<name>/) for resolving tool implementations */
pluginDir?: string;
}

View File

@@ -36,7 +36,7 @@ export function listStarterSkills(): string[] {
}
/**
* Install starter skills into a target directory (e.g., ~/.waggle/skills/).
* Install starter skills into a target directory (e.g., ~/.waggle-community/skills/).
* Only installs skills that don't already exist (no overwrite).
* Returns list of installed skill names.
*/

View File

@@ -10,7 +10,7 @@ import Fastify, { type FastifyInstance, type FastifyRequest } from 'fastify';
import cors from '@fastify/cors';
import fastifyStatic from '@fastify/static';
import websocket from '@fastify/websocket';
import { WaggleDB, workspaceDataScope, WorkspaceManager, WaggleConfig, createEmbeddingProvider, type EmbeddingProviderConfig, type EmbeddingProviderInstance, CronStore, AwarenessLayer, VaultStore, SkillHashStore, TelemetryStore, TELEMETRY_EVENTS, ExecutionTraceStore } from '@waggle/core';
import { WaggleDB, workspaceDataScope, WorkspaceManager, WaggleConfig, createEmbeddingProvider, type EmbeddingProviderConfig, type EmbeddingProviderInstance, CronStore, AwarenessLayer, VaultStore, SkillHashStore, TelemetryStore, TELEMETRY_EVENTS, ExecutionTraceStore, defaultDataDir } from '@waggle/core';
import { corsOriginAllowed } from './cors-config.js';
import { InstallAuditStore } from './install-audit.js';
import { selfBaseUrl, selfRequestHeaders } from './self-request.js';
@@ -185,7 +185,7 @@ import { copyProviderKeysToVault, hydrateProviderEnvFromVault } from './provider
export interface LocalConfig {
port: number;
host: string;
dataDir: string; // ~/.waggle
dataDir: string; // ~/.waggle-community
litellmUrl: string; // http://localhost:4000
/** Immutable desktop-launch identity used to prove sidecar ownership. */
instanceId?: string;
@@ -470,7 +470,7 @@ export async function buildLocalServer(config: Partial<LocalConfig> = {}) {
// Decorate with local config
server.decorate('localConfig', fullConfig);
// Set data dir for custom personas (loaded from ~/.waggle/personas/)
// Set data dir for custom personas (loaded from ~/.waggle-community/personas/)
setPersonaDataDir(fullConfig.dataDir);
// Event bus (replaces Redis pub/sub)
@@ -667,7 +667,7 @@ export async function buildLocalServer(config: Partial<LocalConfig> = {}) {
// Decorate server with embedding provider for status endpoints
server.decorate('embeddingProvider', embeddingProvider);
const waggleHome = fullConfig.dataDir || path.join(os.homedir(), '.waggle');
const waggleHome = fullConfig.dataDir || defaultDataDir();
const rerankerCacheDir = path.join(waggleHome, 'models', 'reranker');
// Memory (ADR-0007): one mem0 store in <dataDir>/memory/, embedded by the
@@ -893,7 +893,7 @@ export async function buildLocalServer(config: Partial<LocalConfig> = {}) {
const allTools = [...baseTools, ...subAgentTools, ...workflowTools];
// Load user customizations from ~/.waggle/
// Load user customizations from ~/.waggle-community/
const userSystemPrompt = loadSystemPrompt(waggleHome);
const skills = loadSkills(waggleHome);
@@ -954,7 +954,7 @@ export async function buildLocalServer(config: Partial<LocalConfig> = {}) {
// Plugin runtime manager — lifecycle, tools, skills from plugins
const pluginRuntimeManager = new PluginRuntimeManager();
// Auto-load installed plugins from ~/.waggle/plugins/
// Auto-load installed plugins from ~/.waggle-community/plugins/
const pluginsDir = path.join(waggleHome, 'plugins');
if (fs.existsSync(pluginsDir)) {
try {

View File

@@ -27,7 +27,7 @@
import fs from 'node:fs';
import * as path from 'node:path';
import * as os from 'node:os';
import { defaultDataDir } from '@waggle/core';
import { randomUUID, createHash } from 'node:crypto';
import type { McpRuntime, McpServerConfig } from '@waggle/agent';
import {
@@ -51,9 +51,9 @@ export interface McpConfigFile {
mcpServers: Record<string, PersistedMcpEntry>;
}
/** Same fallback as local/index.ts `waggleHome`: empty dataDir → ~/.waggle. */
/** Same fallback as local/index.ts `waggleHome`: empty dataDir → ~/.waggle-community. */
export function mcpConfigPath(dataDir: string): string {
const home = dataDir || path.join(os.homedir(), '.waggle');
const home = dataDir || defaultDataDir();
return path.join(home, '.mcp.json');
}

View File

@@ -24,7 +24,7 @@ export interface QueuedMessage {
}
export interface OfflineManagerConfig {
/** Directory for persistent storage (e.g. ~/.waggle) */
/** Directory for persistent storage (e.g. ~/.waggle-community) */
dataDir: string;
/** How often to check LLM health, in ms (default: 30000) */
checkIntervalMs?: number;

View File

@@ -1407,7 +1407,7 @@ function getAnthropicKey(server: FastifyInstance): string | null {
// Legacy fallback: env var (for test harnesses / dev loops)
if (process.env.ANTHROPIC_API_KEY) return process.env.ANTHROPIC_API_KEY;
// Legacy fallback: ~/.waggle/config.json
// Legacy fallback: ~/.waggle-community/config.json
try {
const configPath = path.join(server.localConfig.dataDir, 'config.json');
const raw = fs.readFileSync(configPath, 'utf-8');

View File

@@ -1,5 +1,5 @@
/**
* Backup & Restore Routes — encrypted ZIP-style archive of ~/.waggle/ for machine migration.
* Backup & Restore Routes — encrypted ZIP-style archive of ~/.waggle-community/ for machine migration.
*
* Endpoints:
* POST /api/backup — create and stream an encrypted backup archive

View File

@@ -28,7 +28,7 @@ const NON_RETAINED_TURN_CONTENT = '[Not retained: memory disabled for this turn]
/**
* Persona resolver that includes built-ins AND on-disk custom personas
* (Faza 1 evolved variants like `claude::gen1-v1`, `qwen-thinking::gen1-v1`,
* plus user-saved customs in `~/.waggle/personas/`).
* plus user-saved customs in `~/.waggle-community/personas/`).
*
* Previously `getPersona(id)` was used here, which only consulted the static
* built-in PERSONAS array — `listPersonas()` adds the custom ones from disk

View File

@@ -24,7 +24,7 @@
* later phases. The CommandResultType union carries them so the contract is stable.
*/
import os from 'node:os';
import { defaultDataDir } from '@waggle/core';
import path from 'node:path';
import fs from 'node:fs';
import type { FastifyPluginAsync } from 'fastify';
@@ -79,7 +79,7 @@ function toSubtitle(content: string, max = 120): string {
}
export const commandRoutes: FastifyPluginAsync = async (server) => {
const waggleHome = server.localConfig.dataDir || path.join(os.homedir(), '.waggle');
const waggleHome = server.localConfig.dataDir || defaultDataDir();
// ── GET /api/command/search ───────────────────────────────────────────
// Federated read over memory + workspaces + skills + sessions + commands.

View File

@@ -13,7 +13,7 @@
import type { FastifyPluginAsync } from 'fastify';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
import { defaultDataDir } from '@waggle/core';
import { assertSafeSegment } from './validate.js';
export interface DocumentVersion {
@@ -62,7 +62,7 @@ function writeRegistry(dataDir: string, workspaceId: string, registry: Documents
}
export const documentRoutes: FastifyPluginAsync = async (server) => {
const dataDir = server.localConfig?.dataDir || process.env.WAGGLE_DATA_DIR || path.join(os.homedir(), '.waggle');
const dataDir = server.localConfig?.dataDir || process.env.WAGGLE_DATA_DIR || defaultDataDir();
// GET /api/workspaces/:id/documents — list all tracked documents
server.get<{

View File

@@ -13,7 +13,7 @@
*/
import type { FastifyInstance } from 'fastify';
import os from 'node:os';
import { defaultDataDir } from '@waggle/core';
import path from 'node:path';
import { rankModels, OLLAMA_CATALOG } from '@waggle/agent';
import { detectHardware } from '../hardware-detect.js';
@@ -196,7 +196,7 @@ export async function localInferenceRoutes(
const VLLM_URL = process.env.VLLM_HOST ?? 'http://localhost:8000';
const dataDir = fastify.localConfig?.dataDir
|| process.env.WAGGLE_DATA_DIR
|| path.join(os.homedir(), '.waggle');
|| defaultDataDir();
const runtime = options.runtimeFactory?.(dataDir, OLLAMA_URL)
?? new ManagedOllamaRuntime(dataDir, OLLAMA_URL);
const probeOllama = options.ollamaProbe ?? checkOllama;

View File

@@ -18,6 +18,7 @@ import { createLogger } from '../logger.js';
const log = createLogger('marketplace-dev');
import fs from 'node:fs';
import { MarketplaceDB, SecurityGate } from '@waggle/marketplace';
import { DEFAULT_DATA_DIR_NAME } from '@waggle/shared';
import type { InstallationType, MarketplacePack, MarketplacePackage } from '@waggle/marketplace';
export async function marketplaceDevRoutes(fastify: FastifyInstance) {
@@ -26,7 +27,7 @@ export async function marketplaceDevRoutes(fastify: FastifyInstance) {
const dataDir = fastify.localConfig?.dataDir ?? path.join(
process.env.HOME ?? process.env.USERPROFILE ?? '.',
'.waggle',
DEFAULT_DATA_DIR_NAME,
);
// Lazy-instantiate marketplace handles on first use.

View File

@@ -11,7 +11,7 @@
import type { FastifyInstance, FastifyReply } from 'fastify';
import { existsSync, readFileSync } from 'fs';
import { join } from 'path';
import { homedir } from 'os';
import { defaultDataDir } from '@waggle/core';
import { MarketplaceDB, MarketplaceInstaller, MarketplaceSync, SecurityGate, PACKAGE_CATEGORIES, recategorizeAll, isCiscoScannerAvailable, resolveSkillSource, SkillSourceError, createMarketplaceMcpProvenance } from '@waggle/marketplace';
import type { InstallationType, SearchSort, ScanResult, MarketplacePackage, MarketplaceMcpProvenance, MarketplaceApprovalIdentity, FetchFn } from '@waggle/marketplace';
import { validateSkillMd } from '@waggle/sdk';
@@ -971,7 +971,7 @@ export async function marketplaceRoutes(fastify: FastifyInstance) {
// ── POST /api/marketplace/publish ─────────────────────────────────
// Publish a local skill to the marketplace catalog.
// Reads the skill from ~/.waggle/skills/, validates frontmatter,
// Reads the skill from ~/.waggle-community/skills/, validates frontmatter,
// runs SecurityGate scan, then upserts into the marketplace DB.
fastify.post('/api/marketplace/publish', async (request, reply) => {
@@ -991,8 +991,8 @@ export async function marketplaceRoutes(fastify: FastifyInstance) {
return reply.code(400).send({ error: 'Invalid skill name' });
}
// Read the skill file from ~/.waggle/skills/
const waggleHome = fastify.localConfig?.dataDir || join(homedir(), '.waggle');
// Read the skill file from ~/.waggle-community/skills/
const waggleHome = fastify.localConfig?.dataDir || defaultDataDir();
const skillPath = join(waggleHome, 'skills', `${skillName}.md`);
if (!existsSync(skillPath)) {

View File

@@ -373,7 +373,7 @@ export async function mcpRoutes(fastify: FastifyInstance) {
});
}
// Persist at the server's dataDir too — the installer writes to
// WAGGLE_DATA_DIR/~/.waggle, which may differ from a custom dataDir.
// WAGGLE_DATA_DIR/~/.waggle-community, which may differ from a custom dataDir.
saveMcpServerEntry(dataDir(), configured.name, entry);
const runtime = getRuntime();

View File

@@ -71,7 +71,7 @@ export const onboardingRoutes: FastifyPluginAsync = async (server) => {
});
// Idempotent completion stamp. The wizard's complete() fires this alongside
// the Tauri filesystem flag (which only covers default ~/.waggle installs).
// the Tauri filesystem flag (which only covers default ~/.waggle-community installs).
server.post('/api/onboarding/complete', async () => {
fs.mkdirSync(server.localConfig.dataDir, { recursive: true });
fs.writeFileSync(flagPath(), new Date().toISOString());

View File

@@ -13,7 +13,7 @@
import type { FastifyPluginAsync } from 'fastify';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
import { defaultDataDir } from '@waggle/core';
import crypto from 'node:crypto';
export interface PinnedItem {
@@ -57,7 +57,7 @@ function writePins(dataDir: string, workspaceId: string, pins: PinnedItem[]): vo
}
export const pinRoutes: FastifyPluginAsync = async (server) => {
const dataDir = server.localConfig?.dataDir || process.env.WAGGLE_DATA_DIR || path.join(os.homedir(), '.waggle');
const dataDir = server.localConfig?.dataDir || process.env.WAGGLE_DATA_DIR || defaultDataDir();
// GET /api/workspaces/:id/pins — list pins for workspace
server.get<{

View File

@@ -1,7 +1,7 @@
/**
* User Profile API — identity, writing style, brand, and preferences.
*
* Profile data is stored in a JSON file at ~/.waggle/profile.json and
* Profile data is stored in a JSON file at ~/.waggle-community/profile.json and
* key fields are also saved to personal memory for agent access.
*
* Endpoints:

View File

@@ -1,8 +1,7 @@
import os from 'node:os';
import path from 'node:path';
import fs from 'node:fs';
import type { FastifyPluginAsync } from 'fastify';
import { computeSkillHash } from '@waggle/core';
import { computeSkillHash, defaultDataDir } from '@waggle/core';
import {
loadActiveSkills,
loadSkillAudit,
@@ -44,7 +43,7 @@ async function buildAuditLLM(apiKey: string): Promise<EvolutionLLM | null> {
* first, then redacted/provenance-stamped/audited + the change-hash refreshed).
*/
export const skillsAuditRoutes: FastifyPluginAsync = async (server) => {
const waggleHome = server.localConfig.dataDir || path.join(os.homedir(), '.waggle');
const waggleHome = server.localConfig.dataDir || defaultDataDir();
const skillsDir = path.join(waggleHome, 'skills');
// GET /api/skills/audit — badge index (Skills Hub card source for the verified badge).

View File

@@ -1,4 +1,4 @@
import os from 'node:os';
import { defaultDataDir } from '@waggle/core';
import path from 'node:path';
import type { FastifyPluginAsync } from 'fastify';
import {
@@ -17,7 +17,7 @@ import {
* Waggle proxy cost — mirroring the evolution route's key gate.
*/
export const skillsHygieneRoutes: FastifyPluginAsync = async (server) => {
const waggleHome = server.localConfig.dataDir || path.join(os.homedir(), '.waggle');
const waggleHome = server.localConfig.dataDir || defaultDataDir();
// GET /api/skills/hygiene — current hygiene index (Skills Hub badges)
server.get('/api/skills/hygiene', async () => {

View File

@@ -1,4 +1,3 @@
import os from 'node:os';
import path from 'node:path';
import fs from 'node:fs';
import { createLogger } from '../logger.js';
@@ -7,7 +6,7 @@ import type { FastifyPluginAsync } from 'fastify';
const log = createLogger('skills');
import { PluginManager, getStarterSkillsDir, listStarterSkills, listCapabilityPacks, getPackManifest } from '@waggle/sdk';
import { loadSkills, loadSkillHygiene, loadSkillAudit, clearAuditBadge, SkillRecommender, assessTrust, generateSkillMarkdown, writeSkill, deleteSkill as deleteSkillWrite, parseSkillFrontmatter, extractSkillRequirements, checkSkillRequirements, type SkillTemplate, type SkillRequirements, type SkillRequirementsStatus } from '@waggle/agent';
import { computeSkillHash } from '@waggle/core';
import { computeSkillHash, defaultDataDir } from '@waggle/core';
/** Capability family definitions — user-job-first grouping */
const SKILL_FAMILIES: Record<string, { family: string; label: string }> = {
@@ -36,11 +35,11 @@ const WORKFLOW_SKILLS = new Set(['research-team', 'review-pair', 'plan-execute']
/**
* Skills & plugins routes — manage agent extensions.
* Skills: markdown files in ~/.waggle/skills/ that extend the system prompt.
* Plugins: structured packages in ~/.waggle/plugins/ with manifests.
* Skills: markdown files in ~/.waggle-community/skills/ that extend the system prompt.
* Plugins: structured packages in ~/.waggle-community/plugins/ with manifests.
*/
export const skillRoutes: FastifyPluginAsync = async (server) => {
const waggleHome = server.localConfig.dataDir || path.join(os.homedir(), '.waggle');
const waggleHome = server.localConfig.dataDir || defaultDataDir();
const skillsDir = path.join(waggleHome, 'skills');
const pluginsDir = path.join(waggleHome, 'plugins');
@@ -83,7 +82,7 @@ export const skillRoutes: FastifyPluginAsync = async (server) => {
const starterDir = getStarterSkillsDir();
const starterNames = listStarterSkills(); // returns sorted array of names without .md
// Determine installed skill names (files in ~/.waggle/skills/)
// Determine installed skill names (files in ~/.waggle-community/skills/)
const installedNames = new Set<string>();
if (fs.existsSync(skillsDir)) {
for (const f of fs.readdirSync(skillsDir)) {

View File

@@ -1,7 +1,7 @@
/**
* Task routes — workspace-scoped task board.
*
* JSONL-based storage in `~/.waggle/workspaces/{id}/tasks.jsonl`.
* JSONL-based storage in `~/.waggle-community/workspaces/{id}/tasks.jsonl`.
* Each task: id, title, status (open|in_progress|done), assignee, creator, timestamps.
*/

View File

@@ -4,7 +4,7 @@ import type { WorkflowTemplate } from '@waggle/agent';
/**
* Workflow routes — CRUD for custom workflow templates.
* Built-in templates are read-only; custom ones are stored as JSON in ~/.waggle/workflows/.
* Built-in templates are read-only; custom ones are stored as JSON in ~/.waggle-community/workflows/.
*/
export const workflowRoutes: FastifyPluginAsync = async (fastify) => {
const dataDir = fastify.localConfig.dataDir;

View File

@@ -1,9 +1,8 @@
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import type { FastifyPluginAsync } from 'fastify';
import { z } from 'zod';
import { AwarenessLayer, createFileStore, workspaceDataScope } from '@waggle/core';
import { AwarenessLayer, createFileStore, workspaceDataScope, defaultDataDir } from '@waggle/core';
import { workspaceScope, type MemoryRecord, type MemoryStore } from '@waggle/memory-contract';
import { assertSafeSegment } from './validate.js';
import { validateBody } from '../../validate-body.js';
@@ -438,7 +437,7 @@ export const workspaceRoutes: FastifyPluginAsync = async (server) => {
// Auto-install starter skills on first workspace creation
try {
const waggleHome = server.localConfig.dataDir || path.join(os.homedir(), '.waggle');
const waggleHome = server.localConfig.dataDir || defaultDataDir();
const skillsDir = path.join(waggleHome, 'skills');
const existingSkills = fs.existsSync(skillsDir)
? fs.readdirSync(skillsDir).filter(f => f.endsWith('.md'))

View File

@@ -2,9 +2,8 @@ import fs from 'node:fs';
import { randomUUID } from 'node:crypto';
import net from 'node:net';
import path from 'node:path';
import os from 'node:os';
import type { FastifyInstance } from 'fastify';
import { VaultStore, WaggleConfig, WAGGLE_DB_FILE } from '@waggle/core';
import { VaultStore, WaggleConfig, WAGGLE_DB_FILE, defaultDataDir } from '@waggle/core';
import { buildLocalServer } from './index.js';
import type { LlmHealthStatus } from './index.js';
import { startLiteLLM, stopLiteLLM, type LiteLLMStatus } from './lifecycle.js';
@@ -93,7 +92,7 @@ function removeOwnedDesktopReadyFile(filePath: string, instanceId: string): void
/**
* Resolve the service data directory: explicit option > WAGGLE_DATA_DIR env >
* ~/.waggle. D11 — the installer/launcher set WAGGLE_DATA_DIR; before this,
* ~/.waggle-community. D11 — the installer/launcher set WAGGLE_DATA_DIR; before this,
* startService ignored it while other modules (local/index.ts config,
* marketplace installer) honored it, splitting state across two
* directories on custom installs.
@@ -101,7 +100,7 @@ function removeOwnedDesktopReadyFile(filePath: string, instanceId: string): void
export function resolveDataDir(optionDataDir?: string): string {
// `||` on the env leg: WAGGLE_DATA_DIR set-but-empty must fall through to
// the default, not yield '' (mkdirSync('') throws / resolves to cwd).
return optionDataDir ?? (process.env.WAGGLE_DATA_DIR || path.join(os.homedir(), '.waggle'));
return optionDataDir ?? (process.env.WAGGLE_DATA_DIR || defaultDataDir());
}
/** Resolve the listen port: explicit option > validated WAGGLE_PORT > 3333. */
@@ -171,7 +170,7 @@ function getConfiguredProviderIds(dataDir: string, server?: FastifyInstance): st
/**
* Start the Waggle agent service.
*
* 1. Resolves/creates dataDir (option > WAGGLE_DATA_DIR > ~/.waggle)
* 1. Resolves/creates dataDir (option > WAGGLE_DATA_DIR > ~/.waggle-community)
* 2. Starts the LiteLLM proxy when config.json enables it and it is not skipped
* 3. Builds & starts local Fastify server
* 4. Registers graceful shutdown handlers

View File

@@ -7,7 +7,7 @@ import { STANDARD_DIRS } from './types.js';
/**
* Filesystem-backed StorageProvider.
* Used by both "virtual" storage (data in ~/.waggle/workspaces/{id}/files/)
* Used by both "virtual" storage (data in ~/.waggle-community/workspaces/{id}/files/)
* and "local" storage (data at a user-specified path).
*/
export class FsStorageProvider implements StorageProvider {

View File

@@ -17,7 +17,7 @@ interface WorkspaceLike {
/**
* Resolve the correct StorageProvider for a workspace.
*
* - virtual: files in ~/.waggle/workspaces/{id}/files/ (app-managed)
* - virtual: files in ~/.waggle-community/workspaces/{id}/files/ (app-managed)
* - local: user-specified directory on their machine (like Claude Code)
* - team: shared team storage is part of team mode, which the community
* edition does not ship (ADR-0003); such workspaces use virtual storage

View File

@@ -1,5 +1,5 @@
/**
* Backup & Restore Tests — PM-5: encrypted backup/restore of ~/.waggle/
* Backup & Restore Tests — PM-5: encrypted backup/restore of ~/.waggle-community/
*
* Tests:
* 1. POST /api/backup returns an octet-stream file

View File

@@ -1,7 +1,7 @@
/**
* D11 (UX-Refactor P4) — dataDir resolution.
*
* - resolveDataDir: explicit option > WAGGLE_DATA_DIR env > ~/.waggle. Before
* - resolveDataDir: explicit option > WAGGLE_DATA_DIR env > ~/.waggle-community. Before
* D11, startService ignored the env var while local/index.ts and the
* marketplace installer honored it — a custom install split
* its state across two directories.
@@ -10,6 +10,7 @@ import { describe, it, expect, afterEach, vi } from 'vitest';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
import { DEFAULT_DATA_DIR_NAME } from '@waggle/shared';
import { startService, resolveDataDir } from '../src/local/service.js';
import type { FastifyInstance } from 'fastify';
@@ -36,14 +37,15 @@ describe('resolveDataDir (D11)', () => {
expect(resolveDataDir()).toBe('D:/from-env');
});
it('defaults to ~/.waggle with neither', () => {
it('defaults to ~/.waggle-community with neither, never the commercial ~/.waggle (ADR-0011)', () => {
delete process.env[ENV_KEY];
expect(resolveDataDir()).toBe(path.join(os.homedir(), '.waggle'));
expect(resolveDataDir()).toBe(path.join(os.homedir(), DEFAULT_DATA_DIR_NAME));
expect(resolveDataDir()).not.toBe(path.join(os.homedir(), '.waggle'));
});
it('a set-but-EMPTY env var falls through to the default (never an empty dataDir)', () => {
process.env[ENV_KEY] = '';
expect(resolveDataDir()).toBe(path.join(os.homedir(), '.waggle'));
expect(resolveDataDir()).toBe(path.join(os.homedir(), DEFAULT_DATA_DIR_NAME));
});
});
@@ -72,7 +74,7 @@ describe('startService honors WAGGLE_DATA_DIR (D11 integration)', () => {
const result = await startService({ port, skipLiteLLM: true });
server = result.server;
// The env-pointed dir got the install, ~/.waggle got nothing new from us.
// The env-pointed dir got the install, ~/.waggle-community got nothing new from us.
expect(fs.existsSync(path.join(envDir, 'waggle.db'))).toBe(true);
expect(server.localConfig.dataDir).toBe(envDir);

Some files were not shown because too many files have changed in this diff Show More