Commit Graph

139 Commits

Author SHA1 Message Date
shumeiko.it
4377096495 docs: move CONTRIBUTING.md to the root and rewrite it for this edition (P2.4)
Point contributors to AGENTS.md for the rules, list the current setup
and check commands (no build:packages step, no Docker), and drop the
team-mode test setup and the stale test counts. docs/CONTRIBUTING.md
keeps a one-line pointer because the pull request template links it.
2026-11-01 01:53:53 +01:00
shumeiko.it
491df50a59 docs: add the install guide and the memory guide (P2.4)
docs/install.md covers both ways to install (the Tauri desktop
packages and the server installer), the unsigned-installer warnings
on each system, first launch, the data directory, update and
uninstall. docs/memory.md describes the memory contract, its mem0
implementation, where mem0 keeps its files, recall and background
fact extraction.
2026-11-01 01:50:35 +01:00
shumeiko.it
9806afbced docs(oss): propose how to sign the installers (P2.5)
Developer ID and notarization on macOS (including the bundled node and
native libraries), the owner's existing Azure Artifact Signing on Windows
with SignPath Foundation or a CA certificate as alternatives, and signed
checksums on Linux. Lists the decisions the owner has to make.
2026-11-01 01:39:49 +01:00
shumeiko.it
413956e0a1 fix(web): ship fonts as files so the CSP lets them load
Vite inlined the two smallest Hanken Grotesk and JetBrains Mono subsets as
data: URLs. The sidecar and Tauri CSPs allow fonts from 'self' only, so
the browser blocked them and those character ranges fell back to a system
font. Fonts are now never inlined.
2026-11-01 01:36:50 +01:00
shumeiko.it
3a426a5423 feat(launcher): install the server from a prebuilt archive (P1.3c)
The launcher is now a self-contained installer with install, run, update,
doctor and uninstall. Install downloads waggle-server-<version>-<target>
.tar.gz, checks its SHA-256, unpacks it into a per-user program directory
and writes a waggle-server command that runs the tool on the archive's own
Node. Nothing is built on the user's machine and the data directory stays
WAGGLE_DATA_DIR or ~/.waggle.

scripts/build-server-archive.mjs packs the staged desktop sidecar payload
with the built web UI and a manifest. The download location waits for the
repository decision; until then install takes --from or
WAGGLE_RELEASE_BASE_URL (ADR-0009).

Removes install.sh, scripts/waggle-server.sh and their CI job, which the
installer replaces, and the bin name clash with @waggle/cli.
2026-11-01 01:35:54 +01:00
shumeiko.it
eb2412b687 chore: refresh the lockfile and third-party notices after the merges
The lockfile picks up the license fields added to workspace packages; the
notices drop the crates of the removed updater plugin.
2026-11-01 01:18:00 +01:00
shumeiko.it
86ea0d7529 Merge P2.3: license gate and third-party notices
# Conflicts:
#	docs/oss/upstream-fixes.md
2026-11-01 01:17:28 +01:00
shumeiko.it
0cfe97b5ec Merge P2.2 part 2: remove the excluded packages and scrub internal names 2026-11-01 01:16:46 +01:00
shumeiko.it
acd9db90e1 chore: drop mentions of apps/www and memory-mcp from comments (P2.2) 2026-11-01 00:50:45 +01:00
shumeiko.it
16eaf01e14 chore: scrub personal names, maintainer URLs and local paths (P2.2)
Sample data in tests, prompts and UI placeholders uses Alex Morgan
instead of the maintainer's name; decision attributions say "owner".
Personal details in two test fixtures are replaced. Local paths
(D:/Projects/...) and paths into the maintainer's planning repository
are reworded. Clone and install URLs in CONTRIBUTING.md and the getting
started guide use placeholders until the public repository location is
decided (Q9). The Benchmarks page no longer names the maintainer's
hive-mind repository, and the upstream fixes log names the main Waggle
repository instead of an internal git host.
2026-11-01 00:50:13 +01:00
shumeiko.it
72a2a895a5 docs: drop references to the removed packages (P2.2)
AGENTS.md records that the excluded packages left in P2.2. SECURITY.md
scopes memory to memory-contract and memory-mem0. THREAT_MODEL.md points
the injection scanner at @waggle/core, marks the MCP tool scope gate as
removed with the memory MCP servers, and drops the hive-mind copy of the
URL egress guard. docs/ARCHITECTURE.md lists the memory packages instead
of the hive-mind substrate. docs/methodology.md, the LoCoMo write-up of
the hive-mind engine whose reproduction steps pointed at the
maintainer's hive-mind repository, is removed.
2026-11-01 00:50:06 +01:00
shumeiko.it
9276723f25 fix(core): name EMBEDDING_PROVIDER in the mock-embedding warning (UF-058)
When no embedding provider answers, the banner told users to set
HIVE_MIND_EMBEDDING_PROVIDER, which only the hive-mind CLI read; Waggle
reads EMBEDDING_PROVIDER. A test checks the banner text.
2026-11-01 00:43:05 +01:00
shumeiko.it
c098f20872 chore: drop hive-mind provenance notes from comments (P2.2)
Comments that pointed at hive-mind-core files, the hive-mind OSS
mirror and its drift triage now describe the code as it is. The
in-process reranker caches its model in ~/.waggle/models, like the
embedder, when the caller passes no directory; the sidecar always
passes one.
2026-11-01 00:42:48 +01:00
shumeiko.it
613b23be17 refactor(memory-mem0): drop the old engine from the search-quality bench (P2.2)
The bench compared mem0 with MindDB, FrameStore and HybridSearch from
the hive-mind substrate, which @waggle/core no longer exports and which
left the repository. It now runs mem0, mem0-rerank and cosine; the
recorded comparison stays in docs/oss/research/memory-search-quality.md.
2026-11-01 00:42:47 +01:00
shumeiko.it
4c1b404339 refactor(app): remove the wiki Tauri commands (P2.2)
get_wiki_pages, get_wiki_page, get_wiki_page_content and
compile_wiki_section proxied to the sidecar's /api/wiki routes, which
served the wiki-compiler package and left with the old memory engine in
P1.5. No screen called them. Remove the commands, their TypeScript
bindings and tests. cargo check and the 32 Rust tests pass.
2026-11-01 00:42:39 +01:00
shumeiko.it
2edfd01e6e refactor: remove coding-agent hook management (P2.2)
The hooks for Claude Code, Codex and the other agents ran the
hive-mind-hooks-* packages, which left the repository; ADR-0002 hides
the feature in v1. Remove the hook installer surface from the tool
launcher, the POST /api/tools/hooks route, the hook status probe in
tool detection, and the hook fields of the tool manifest and detection
envelope (hookCapable, hookRoot, hookPointer, hooksInstalled,
hookPointerPath). Third-party adapter manifests no longer accept the
hook fields.

In the web UI, remove the hidden hook actions and the "How memory is
shared" explainer from the Launcher, adapter.manageHooks, the
hook-wired count in Mission Control and the agentHooks and memoryMcp
memory feature flags. Launch, watch and stop are unchanged; the
roadmap tool note no longer mentions hooks.
2026-11-01 00:35:13 +01:00
shumeiko.it
8a308aac01 docs: generate THIRD_PARTY_NOTICES.md for the shipped components (P2.3)
scripts/generate-third-party-notices.mjs works offline: it lists the npm
packages of the sidecar and web UI closures from package-lock.json, the
Node.js runtime and npm that bundle-node.mjs stages, and the Rust crates of
the desktop shell from `cargo metadata --offline`, and reproduces each
distinct license text once. A section covers the LGPL (libvips,
node-webpmux), MPL (servo crates), OFL (fonts) and unlicensed components
and what their licenses ask.

The Windows and Linux crates are not in the local cargo cache, so this
first file covers the macOS crates and says so; regenerate after
`cargo fetch` before a release.

Log UF-058 (installers ship third-party code without notices) and UF-059
(buffers 0.1.1 has no license) in the upstream fixes.
2026-11-01 00:31:26 +01:00
shumeiko.it
3ebe97e033 build: add a license gate for shipped npm packages and Rust crates (P2.3)
scripts/check-licenses.mjs (npm run check:licenses) reads the production
dependency closures of the sidecar (@waggle/server minus the packages
stage-sidecar-deps.mjs never ships) and the web UI (apps/web) from
package-lock.json and fails on GPL, AGPL, SSPL, missing and unknown
licenses. It allows permissive licenses plus MPL-2.0 and lists named
exceptions with reasons; LGPL libvips and node-webpmux, the OFL fonts and
the unlicensed buffers package are marked as pending the licensing review.

app/src-tauri/deny.toml applies the same allowlist to the Tauri crates with
cargo-deny; the npm check fails when the two lists drift apart. A new CI
job runs both, with cargo-deny 0.18.3 installed and cached in CI.

scripts/license-inventory.mjs holds the shared closure logic.
2026-11-01 00:30:06 +01:00
shumeiko.it
5a7f3d24d9 chore: declare MIT and drop personal metadata from manifests (P2.3)
Add "license": "MIT" to the workspace manifests that lacked it (app,
apps/web, server, shared and the postponed team packages) and to the
Tauri crate. Remove the personal author and the maintainer repository,
homepage and bugs URLs; the public repository location is not decided
yet (Q9). package-lock.json is left as is and is regenerated later.
2026-11-01 00:28:07 +01:00
shumeiko.it
46687a823a chore: remove the packages excluded from the community edition (P2.2)
Delete apps/www, packages/admin-web, every packages/hive-mind-* package,
packages/memory-mcp and packages/wiki-compiler (ADR-0002), with what
existed only for them: their tests kept outside the packages, the hook
runtime build, the hive-mind OSS subtree-split and drift scripts, the
www deploy and hive-mind-cli workflows, the staged hook lifecycle step
in the Windows desktop workflows, and the root dev:www, build:www and
build:hook-runtime scripts.

Drop the matching excludes from the Vitest, ESLint and workspace
dependency checks, the next override, and the extraneous workspace
entries from package-lock.json. The smart-router qualification seed
now writes its spend to waggle.db, where the sidecar has read cost
traces since P1.5.
2026-11-01 00:21:10 +01:00
shumeiko.it
39d9f63043 build: let the sidecar build run from a source archive (P1.3d)
build-sidecar.mjs required a git checkout: it read HEAD, the tracked
file list and the marketplace database blob from git. Outside a checkout
it now records no source revision and ships the database from disk; a
checkout keeps the exact-revision checks.
2026-11-01 00:13:38 +01:00
shumeiko.it
d2ad282498 fix(desktop): find the sidecar through Tauri's resource directory (P1.3d)
Linux packages keep resources in /usr/lib/<app> (deb) or under $APPDIR
(AppImage), not next to the executable, so the shell never found
service.js there. Setup now records Tauri's resource_dir and the lookup
prefers it, keeping the executable-relative paths as a fallback.

Drop tauri-plugin-updater: it was declared but never registered, and the
updater stays disabled until release signing exists.
2026-11-01 00:10:22 +01:00
shumeiko.it
a8250cb375 refactor: drop the one-time copy of legacy .mind data
The first start copied Waggle's tables and the memories of the commercial
edition's .mind files into waggle.db and mem0. The product is still in
development and nobody has data to bring over, so both copies, their tests
and the legacy creation-time field are gone. ADR-0007 records the change.
2026-10-28 12:35:41 +01:00
shumeiko.it
fb3697ca6c fix(web): find a keyless primary's provider from the model id (UF-054, UF-055)
A provider without its key lists no models, so Model Pilot could not tell
the primary needed a key, and it compared a prefixed active id with a bare
one. The provider now also comes from the id's prefix or family name, and
prefixed and bare ids count as the same model. The account row's fallback
initial is A for Account, not W.
2026-10-27 14:56:30 +01:00
shumeiko.it
25ad379e38 fix: drop the em dash from user-facing copy
Anti-slop audit-002, item 13 (R-02). Every em dash in text the user sees
(web UI labels, toasts, tooltips, empty and error states, chat steps,
API messages, notifications and channel replies) became a period, comma,
colon or parentheses. Model prompts, logs, comments, regexes and the lone
dash that marks an empty value are unchanged. Text the client matches
against server copy (the default workspace summary, the quiet-night dream
summary) accepts the old wording too, so cached and saved data still match.
2026-10-27 14:53:12 +01:00
shumeiko.it
3ae3cc81fc fix(web): give phones a bottom navigation bar instead of the rail (UF-057)
At 375px the 64px icon rail took a fifth of the screen and Home's heading
wrapped over five lines. Below sm the rail hides, a bottom bar carries the
five places plus More (⌘K), and Home tightens its padding and heading.
2026-10-27 14:36:35 +01:00
shumeiko.it
5bf3dd9ea8 fix(web): replace generic AI icons and decorative arrows
Sparkles and Zap stood in as the icon for unrelated things: tools, MCP,
imports, model routing, workspaces, memory highlights (anti-slop audit-002,
item 16). Each now gets an icon for what it is (Wrench, Plug, Import, Route,
Hexagon, Brain and so on) or none. Chevrons and arrows on Resume, Continue,
Open, Set up a model and the onboarding buttons are gone (item 17); arrows
in settings paths, relations and the launcher flow diagram stay.
2026-10-27 14:36:20 +01:00
shumeiko.it
827bf8488b fix: drop decorative emoji from UI text, chat steps and channel replies
Bees, sparkle glyphs, fire, check and warning marks decorated buttons,
toasts, activity steps and channel replies (anti-slop audit-002, item 18).
Marks that carry state (key set, importance, the hive glyph) stay.
2026-10-27 14:27:19 +01:00
shumeiko.it
22846e4131 fix(web): label the Home activity summary as the last 24 hours (UF-056)
The summary always covers the last 24 hours, but it read "While you slept"
and "A calm night" at any time of day.
2026-10-27 14:24:44 +01:00
shumeiko.it
659c84bee2 fix: never greet the user by the assistant's default name (UF-055)
Home and the sidebar read the user's name from the identity row, which the
sidecar fills with the assistant's identity named Waggle. Both now use the
profile name, with the identity name as a fallback that skips the default.
2026-10-27 14:24:35 +01:00
shumeiko.it
c2998f1a6b fix(web): say when the primary model has no key and which model chats use (UF-054)
Settings showed the configured primary while the status bar showed the
model new chats fall back to, so the two screens disagreed. Model Pilot now
says the primary needs a key and names the model in use.
2026-10-27 14:20:05 +01:00
shumeiko.it
97b2c984d8 refactor(web): drop the team agent tab and team memory scopes (P1.1)
Team mode is out of the community edition, but Agents still offered a Team
tab, a team agent type and team / organization memory scopes.
2026-10-27 14:17:25 +01:00
shumeiko.it
f3c48e6f19 fix(web): square the user's chat bubble at the top right (UF-053)
User messages sit on the right, but the bubble's one square corner was the
top left, pointing away from the sender.
2026-10-27 13:15:57 +01:00
shumeiko.it
da574a5a7e feat(web): tighten the calm design after its anti-slop audit
Fixes items 3-11 of anti-slop/audit-002, all scoped to data-design=calm:
- no colored edges on Model Pilot rows, a connected extension or the
  active file workspace;
- section labels and eyebrows in the text face, mono for data only;
- one accent: honey text, washes and hover lines turn neutral, honey stays
  on primary buttons, the switch, focus and attention counts;
- dots with no state behind them are hidden and live dots no longer pulse;
- no card shadow or hover lift, including the --shadow token;
- inline-style gradients go solid or flat, glows go;
- no entrance motion: framer-motion animations finish instantly and the
  inline card-enter and scroll reveals are off;
- stock Tailwind hues map onto Hive status tokens, mixed toward --text so
  small status text keeps 4.5:1 in light;
- radii follow the 6 / 10 / 14 scale, text pills become chips.

The classic design is unchanged.
2026-10-27 12:55:02 +01:00
shumeiko.it
ef99f04c5b fix(web): stop offering the Start here workspace twice on Home (UF-052)
"Pick up where you left off" listed every recent workspace, including the
one the Start here card already offers. The list now leaves it out and
hides when nothing else is left.
2026-10-27 12:54:54 +01:00
shumeiko.it
b3b61e14c9 fix(server): close the memory recall step when nothing is found or recall fails (UF-051)
Only a successful recall reported its outcome, so an empty or failed
recall left "Recalling relevant memories..." as the last step after the
answer. Both cases now send a closing step and the turn goes on.
2026-10-27 12:54:51 +01:00
shumeiko.it
06d267dec8 fix(web): name only what a chat turn touched in the activity card (UF-050)
The card headline was a fixed "Worked across your memory, web & files".
It is now built from the turn: memory, web and file tools it called and
the memory steps the server reported, or a plain Working / Done.
2026-10-27 12:54:45 +01:00
shumeiko.it
711c37358a fix(web): keep the workspace title from stretching between tabs (UF-049)
The title carries a framer-motion layoutId for the card-to-header hero morph,
which also animates any change of its box. With a short workspace name the
title is as wide as the subtitle row; hiding that row on the Chat tab changed
the width, and framer animated it as a horizontal scale (2.9x for "Eng").

Both titles now use layout="position": only the position animates, and the
hero morph still moves the name into place. The hero-morph test checks it.
2026-10-26 21:22:32 +01:00
shumeiko.it
3d1d07bd50 fix(web): pad the command palette search field and center the account row (UF-047, UF-048)
The ⌘K search input had no padding but drew its own focus ring with an
offset, so the ring ran right against the text. It now has inner padding
and no offset, so the ring reads as the field's outline; the palette test
checks both.

The sidebar account row had 8px above its content and 22px below, because
its bottom padding added to the nav's own. It now has 14px above and none
below, matching the nav padding underneath.
2026-10-26 21:16:20 +01:00
shumeiko.it
5163f3dd48 feat(web): add the calm redesign as a sidebar switch
The redesign proposed after the anti-slop audit (anti-slop/audit-001) is now
an opt-in design layer. The "New design" switch at the bottom of the sidebar
sets data-design="calm" on <html> and remembers it; theme-init.js applies the
stored choice before the first paint. The classic look stays the default and
is unchanged.

styles/calm.css, scoped to that attribute, keeps the Hive DS colors and:
bundles Hanken Grotesk and JetBrains Mono (@fontsource-variable, OFL-1.1);
uses three radii (6 / 10 / 14 px); drops the honeycomb wallpaper, gradient
fills, glass, glows and pulsing dots; keeps shadows only on menus and
dialogs; shows labels as written instead of tracked capitals; and marks the
active sidebar item with fill, a 1px line and weight instead of a stripe.
Screen layouts are unchanged.
2026-10-26 21:01:27 +01:00
shumeiko.it
1e826aa220 fix(desktop): stop the sidecar with SIGTERM first, and free a stale WhatsApp profile (UF-046)
On macOS and Linux the shell stopped the sidecar with Child::kill(), which is
SIGKILL, so the sidecar never ran its shutdown: the processes it started (MCP
servers, a managed Ollama, the WhatsApp browser) kept running. After an app
restart the orphaned WhatsApp browser still held the session profile, and the
channel failed with "The browser is already running".

The shell now sends SIGTERM, waits up to 5 seconds for the sidecar to exit,
then sends SIGKILL; Windows keeps its kill-on-close job. For crashes, where no
shutdown runs, the WhatsApp channel stops a browser left over from an earlier
run before starting its own. It only stops a process whose command line uses
this profile and whose parent is gone; a browser another running Waggle server
owns is left alone, and the channel says so instead of retrying.
2026-10-26 12:03:31 +01:00
shumeiko.it
48bdab8087 fix(server): generate personas through the built-in proxy (UF-045)
POST /api/personas/generate posted to /api/anthropic/v1/messages, a route
that does not exist, with no session token and a port built from
address().toString(), so the URL did not even parse. It also pinned
claude-sonnet-4-6, which needs an Anthropic key.

The route now calls the built-in proxy through self-request.ts, reads the
OpenAI-format reply, and picks the model from the user's default with the
same fallback chat uses, so a local Ollama model works too. An end-to-end
test with localhost trust off checks the generated persona comes back.
2026-10-26 01:50:47 +01:00
shumeiko.it
d6217ad7c2 fix(server): send the session token on the sidecar's calls to its own proxy (UF-044)
Since the server stopped trusting loopback callers, the built-in model proxy
needs the session token like every other route, but the sidecar's own calls
to it sent none. The Models key check read the proxy's 401 as a rejected key,
so a working Anthropic key showed "Key found but not responding". Scheduled AI
tasks and loops, the dream diary narrative and the profile calls failed the
same way; the profile calls also built the port from address().toString(),
and the scheduled tasks used the configured port, which the desktop app's
port fallback can leave pointing at another Waggle server.

self-request.ts now builds the address from the bound port and adds the
session token; all these calls and command.ts use it, and the token is never
sent to Ollama. An end-to-end test runs the key check through the real
middleware and proxy with localhost trust off; it fails without the fix.

UF-045 records the persona generator, which posts to a route that does not
exist; it is left open.
2026-10-26 01:46:29 +01:00
shumeiko.it
5268881f46 docs(oss): how to build the Windows desktop installer 2026-10-26 00:43:43 +01:00
shumeiko.it
ae8233b8f6 fix(web): give the chat composer a single focus outline (UF-043)
The composer textarea drew its own focus ring inside the rounded box, which
already turns amber on focus-within. The ring is gone; the box's border stays
the focus indicator (8.14:1 dark, 4.92:1 light against the composer).
2026-10-26 00:32:11 +01:00
shumeiko.it
efcb19e682 fix(web): show sidebar hints only on the icon rail, above the main area (UF-042)
With the full-width sidebar every item showed a hover hint that repeated its
visible label, and the part of the hint that reached past the sidebar was
hidden wherever the main area had content: the hint rendered inside the nav,
and the nav and <main> are sibling z-10 layers.

Sidebar hints now show only on the icon rail below lg, where they are the
only label, and render in document.body through a new opt-in `portal` flag
on HintTooltip. Other hints keep rendering in place, since several sit in
overlays above z-50 where a portaled hint would end up underneath.
2026-10-25 23:37:20 +01:00
shumeiko.it
07a529512c fix(server): let the CLI server exit on Ctrl+C and SIGTERM (UF-041)
The OAuth routes started a module-level cleanup interval that was never
cleared or unref'd. The service's SIGTERM/SIGINT handler closes the server
and relies on the event loop going empty, so the process kept running: a
first Ctrl+C in `npx waggle` or `npm run dev:server` left it alive, and
SIGTERM never ended it. The interval is now unref'd.

The launcher tests left two `waggle` processes behind on every run: they
stopped `npx` but not the waggle process it started. They now start it in
its own process group and stop the whole group, with a SIGKILL fallback,
and a new test checks that the built CLI exits by itself after SIGTERM.
2026-10-25 23:01:05 +01:00
shumeiko.it
2e08f2ae96 refactor(server): move the install audit trail from core to the server (P1.2, UF-040)
Core keeps only shared infrastructure, so InstallAuditStore leaves it and
lives in packages/server/src/local/install-audit.ts. The trail itself stays:
the Audit and Activity tabs, the extend and export routes, and the threat
model entry keep working on the same waggle.db table.

- @waggle/shared gets RecordAuditInput and the narrow InstallAuditRecorder
  (record only), which the agent's skill tools now depend on.
- The server creates the audit table before the one-time legacy copy, which
  no longer constructs it in core.
- UF-040: GET /api/debug/logs called prepare() on the store's private db
  wrapper, which has none, so the support bundle never carried recent
  installs. It now reads them through getRecentSummary().
2026-10-25 21:32:38 +01:00
shumeiko.it
3befcd8e9b docs: how to build the desktop app, and the packaged macOS launch 2026-10-24 19:18:02 +02:00
shumeiko.it
1f536151d8 fix(desktop): find the sidecar in a macOS app bundle and fit the startup screen (UF-004, UF-017)
- The packaged macOS app stayed on "Starting Waggle…": the shell looked
  for node, service.js, native/ and node_modules/ next to the executable,
  the Windows layout, while a macOS bundle keeps them in
  Contents/Resources/resources. bundled_resources_dir() checks both.
- The startup screen used min-height 100vh on an unstyled body, which
  showed scroll bars, and a fixed light text colour that is invisible in
  the light theme. It is now styled from index.html, fixed to the window,
  with a dark text colour for the light theme.
2026-10-24 19:10:23 +02:00