Commit Graph

20 Commits

Author SHA1 Message Date
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
2a7f129df6 docs: describe recall search callers without the legacy HybridSearch (P1.5) 2026-10-24 17:48:05 +02:00
shumeiko.it
9aae9d6537 refactor(core): remove the single-mind to multi-mind migration (P1.2)
needsMigration and migrateToMultiMind moved a pre-M4 default.mind to
personal.mind at startup. The community edition has no installs with that
layout, so the module, its export, the startup step, its "migration" progress
phase and the default.mind first-run check go.
2026-10-24 17:35:36 +02:00
shumeiko.it
2226ec1bd7 refactor(server): move the config.json provider-key copy out of VaultStore (P1.2)
VaultStore.migrateFromConfig had two callers, both in the server. It is now
copyProviderKeysToVault in provider-env.ts, next to
migrateLegacyProviderKeysToVault, with the same rules: copy keys that have a
value, keep keys the vault already holds, store models and baseUrl as metadata.
Its tests moved from core to provider-env.test.ts.
2026-10-24 17:35:36 +02:00
shumeiko.it
3528a242f6 refactor(agent): move the connector credential helpers out of VaultStore (P1.2)
getConnectorCredential, setConnectorCredential and setConnectorCredentialBundle
are now plain functions over a SecretStore in
packages/agent/src/connectors/connector-credentials.ts. The secret names,
metadata layout and the rule that tokens never go into plaintext metadata are
unchanged, so existing vault files keep working.

A bundle still lands as one update: SecretStore gains writeBatch, which
VaultStore applies with a single vault-file replacement.

Connector tests seed a Map-backed SecretStore instead of mocking VaultStore
methods; the helper tests from core and server moved to the agent package.
2026-10-24 17:35:36 +02:00
shumeiko.it
e435e7da94 refactor: drop the legacy memory engine from core, the server and the build (P1.5)
- @waggle/core no longer re-exports @waggle/hive-mind-core and no longer
  depends on it.
- The server no longer opens personal.mind or a cache of workspace minds;
  the legacy files are only read by the one-time copies of legacy data.
  releaseWorkspace closes the workspace's sessions and detaches it from the
  shared orchestrator.
- WorkspaceManager stops creating an empty workspace.mind.
- memory-center-legacy.ts had no callers left and is removed.
- build:packages no longer builds hive-mind-core and wiki-compiler; the
  sidecar aliases the memory packages to source instead.
- mem0ai stays external in the sidecar and launcher bundles: it imports a
  client for every provider it supports on demand, and bundling it failed on
  the optional peers Waggle does not install. The launcher declares mem0ai
  and no longer needs sqlite-vec.
2026-10-24 13:34:09 +02:00
shumeiko.it
cd1ba288bb feat(server): turn the LiteLLM proxy off by default (P1.1)
Every sidecar start outside the desktop app looked for Python, probed
each interpreter for litellm and, when it found one, started a LiteLLM
child. The community edition must not need Python, so LiteLLM is now
opt-in: startService starts it only when config.json contains
"litellm": { "enabled": true } (WaggleConfig.isLiteLLMEnabled). Otherwise
there is no Python lookup, no LiteLLM health probe and no child process,
and the built-in provider proxy serves every request, as it already did
in the desktop app. --skip-litellm and WAGGLE_SKIP_LITELLM=1 still force
it off.

The lookup for a bundled resources/python/python.exe is removed: no
build ships one. When LiteLLM is enabled it runs on the user's own
Python from PATH.
2026-10-24 12:17:41 +02:00
shumeiko.it
c25efe6c44 refactor(server): move the team runtime into a postponed package (P1.1)
Team mode stays in the repository but is not built or shipped (ADR-0003).

- The team server (index.ts, config, db, daemons, plugins, proactive,
  routes, scheduler, services, ws, drizzle migrations) and its tests move
  from @waggle/server to packages/team-server (@waggle/team-server,
  private). It keeps its own copies of the logger and the agent-group
  executor, so it does not import @waggle/server. @clerk/fastify, bullmq,
  ioredis, postgres, drizzle-orm, drizzle-kit, cron-parser and
  @waggle/waggle-dance leave @waggle/server; the launcher drops the same
  team-only dependencies.
- build:packages no longer builds waggle-dance or the worker: nothing in
  the community edition imports them, and the worker's project reference
  would otherwise build the team server. The worker now imports from
  team-server; the team Dockerfile builds both explicitly.
- The sidecar no longer starts the team server when DATABASE_URL is set,
  and loses the team routes (/api/team/*, /api/teams), the WaggleDance
  routes and bridge (/api/waggle-dance/*), the Team server binding and
  egress guard, the WebSocket team client, the TeamSync cache and pushes,
  team audit forwarding, team workspace registration and the team
  capability-policy lookup in chat. The in-process room signal bus stays:
  agent groups, fleet runs and external tool runs use it.
  middleware/audit.ts was dead and is deleted.
- @waggle/core loses TeamSync and the teamServer part of WaggleConfig. A
  teamServer key in config.json is ignored and kept on save, as P0.1 does
  for the tier keys. Workspaces lose teamServerUrl and teamUserId; teamId
  and teamRole stay because workspaces from a shared data directory still
  carry them and the viewer write guards read them. POST /api/workspaces
  ignores team fields.
- The sidecar bundle no longer marks the team packages as external.

The agent still references the TeamSync type in orchestrator.ts and
pattern-write-back.ts; those files are being rewritten in P1.5 and drop
it there.

Logs UF-030 and UF-031 (team sync and team policy defects found while
removing the code).
2026-10-24 12:17:41 +02:00
shumeiko.it
0cbde468a9 refactor: remove S3 file storage, part of team mode (P1.2)
Nothing created an S3FileStore outside team workspaces; team storage is
postponed with team mode (ADR-0003), so such workspaces use virtual storage.
@aws-sdk/client-s3 leaves core's dependencies.
2026-10-24 12:09:05 +02:00
shumeiko.it
cb51ed0d28 refactor(core): describe secret storage as a SecretStore interface (P1.2) 2026-10-24 12:07:42 +02:00
shumeiko.it
815c667374 perf(core): check the Windows vault key ACL once per process (P1.2)
Every VaultStore construction started PowerShell to re-apply the key ACL.
The ACL does not change while the process runs; a created key is still
written and hardened by the same PowerShell call.
2026-10-24 12:07:21 +02:00
shumeiko.it
8555d84b75 feat(memory): refuse to open a memory store with a different embedder
Vectors of different models are not comparable even at the same size; the
store records its embedder in waggle-memory.json and names the mismatch.
Also drop the weaver references from the cli and server tsconfigs.
2026-10-24 12:06:10 +02:00
shumeiko.it
f4d2a62b24 refactor: remove the weaver package and the chat-export import (P1.5)
Weaver consolidated and decayed frames of the legacy memory engine; mem0
updates and merges memories itself. The ChatGPT/Claude export import wrote
frames and its screen is hidden in v1 (ADR-0002).
2026-10-24 12:01:22 +02:00
shumeiko.it
784ca770b1 refactor(memory): run agent recall, memory tools and the server on the memory contract (P1.5)
- Orchestrator, memory tools, context loader and pattern write-back use a
  MemoryStore and a workspace scope instead of MindDB layers; the knowledge
  graph tools, cognify, memory linker and feedback handler are gone (graph
  hidden in v1, ADR-0002).
- The server opens one mem0 store in <dataDir>/memory/, embedded by the
  in-process model on first use, and extracts facts about the user in the
  background with the model the user chose (memoryExtraction setting).
- Legacy .mind memories are copied into the store once, in the background;
  the legacy files are only read.
- Weaver consolidation, harvest, wiki, memory import, memory lanes, vector
  backfill and index reconciliation are removed; agent runs, loops, sub-agent
  results, connector fetch and the failed-turn capture write through the
  contract. Workspace sessions no longer hold a mind handle.
- FileIndexer and the install audit move to waggle.db; recall date helpers and
  the reranker are copied into core.
- The CLI REPL opens the same memory store.
2026-10-24 11:56:26 +02:00
shumeiko.it
ad2ca875cb feat(core): give Waggle its own database, apart from memory (P1.5)
Waggle kept its own tables in the memory database. Before the memory
engine can be replaced by mem0 they need a home of their own.

- add WaggleDB (<dataDir>/waggle.db). Automations, notifications, held
  actions, skill hashes, thumbs feedback, cost tracking, the profile card
  and awareness items live there. Their stores take a WaggleDB, so passing
  a memory database is a type error.
- the profile card and awareness items are now per scope ('personal' or
  'workspace:<id>') in one table each, instead of one table per .mind file
- on the first start, copy these tables from personal.mind and every
  workspace.mind (importLegacyMindData). The legacy files are only read,
  each scope is copied once and a table only while its target is empty.
- copy the logger, injection scanner, external-memory ingress guard,
  WorkspaceManager and the embedders from @waggle/hive-mind-core into
  @waggle/core, which now re-exports its own copies
- point the server, agent orchestrator and CLI at waggle.db; update the
  tests that seeded these tables in a memory database

ADR-0007 records the layout and the licensing question about the copied
files.
2026-10-23 14:31:28 +02:00
shumeiko.it
2e1999a3f6 refactor: remove self-learning and the optimizer package (P1.4)
Self-learning is excluded from the community edition (ADR-0004); the
project owner reworks it separately. Cost tracking stays.

- agent: delete behaviour evolution (evolve-schema, iterative GEPA,
  compose-evolution, evolution gates, orchestrator and deploy),
  improvement and correction detection, AgentLearning, the eval-dataset
  builder, optimization-capture and the agent_insights tool. Secret
  detection moves from eval-dataset to secret-patterns. The LLM wiring
  keeps only the Haiku adapter and judge call used by skill audit and
  hygiene, so @ax-llm/ax is now declared by agent instead of server.
- server: delete /api/evolution/*, the evolution and optimizer services,
  GEPA expansion of the first chat message, the prompt_optimization and
  monthly_assessment jobs, the idle-session reviewer and its
  session-reviewer persona, prompt injection of past corrections and
  thumbs-down recorded as correction signals. Existing job rows of the
  removed types are ignored, not deleted.
- core: delete OptimizationLogStore; stop re-exporting the improvement
  signal and evolution run stores.
- web: delete the Evolution screen and the two job types in the
  automation editor.
- delete packages/optimizer.

Also logs UF-027 (self-learning loops read data nothing collects) and
UF-028 (the Settings prompt-shape choice is ignored by chat).
2026-10-20 00:54:58 +02:00
shumeiko.it
b734c1d3d2 refactor: remove KVARK, enterprise packs and the compliance subsystem (P1.4, P1.6)
KVARK is the commercial enterprise product and is not part of the community
edition. The agent's KVARK tools were never wired into the server, so
removing them changes no runtime behaviour beyond the routes listed here.

- agent: delete kvark-tools; CombinedRetrieval and formatCombinedResult now
  merge workspace and personal memory only (no KVARK lane, no source
  conflict note); connector substrate is always 'waggle'
- agent: promote_skill stops at workspace scope; team and enterprise scopes
  answer "not available in this edition" instead of an upgrade prompt
- server: delete src/kvark and GET /api/marketplace/enterprise-packs
- marketplace: delete ENTERPRISE_PACKS
- compliance (EU AI Act dashboard, its templates and the KVARK template
  seeded on every boot): delete core/src/compliance, the /api/compliance/*
  routes, agent compliance-pdf and the Cockpit compliance panel. The
  ai_interactions table lives in the memory substrate and goes with P1.5.
2026-10-20 00:27:16 +02:00
shumeiko.it
fe2eb0f648 refactor: remove the billing tier model (P0.1)
The community edition has no monetization (ADR-0001). Remove the tier
model (packages/shared/src/tiers.ts), the requireTier middleware and every
tier gate, GET/PATCH /api/tier and the trial start, and the Stripe
integration, which depends on the tier model.

Personal features a tier used to limit are open to everyone: unlimited
workspaces and connectors, every embedding provider including LiteLLM,
per-workspace costs, Approvals. The workspace session cap is one constant
(100). Team and enterprise surfaces are hidden instead of unlocked (team
dock zone, Settings Team/Enterprise/Plan tabs, workspace Team tab);
cloud sync reports unavailable, as it did for free users.

The sidecar ignores the tier keys in config.json but does not delete them:
both editions may still share ~/.waggle.

Web billing UI is deleted: plan cards, upgrade and trial modals, payment
success route, the KVARK sales block, tier 403 handling.
2026-10-15 19:31:50 +02:00
Oleg Maslov
b20b138fe4 moving 2026-09-02 10:14:22 +02:00
Oleg Maslov
0c3e2ead3b moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled
2026-09-02 10:10:29 +02:00