Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Minds Platform

## Submodules

This repo has 4 submodules:

| Path | Repo | Tracking |
|---|---|---|
| `frontend` | `mindsdb/cowork` | tag-pinned |
| `backend/core_api` | `mindsdb/cowork-server` | tag-pinned |
| `backend/core_agent` | `mindsdb/anton` | tag-pinned |
| `backend/data-vault` | `mindsdb/data-vault` | `main` branch |

### Clone (fresh)

```bash
git clone --recurse-submodules https://github.com/mindsdb/minds-platform
```

### Initialize after cloning without submodules

```bash
git submodule update --init --recursive
```

### Pull — sync to what the parent repo pins (default)

```bash
git submodule update --recursive
```

### Pull — advance all submodules to latest `main`

Only do this if you intend to develop across all repos. You'll need to commit the updated pointers in the parent repo afterward.

```bash
git submodule foreach 'git checkout main && git pull origin main'
```

### Make changes and push inside a submodule

1. Go into the submodule and get on a real branch first (all submodules start in detached HEAD):

```bash
cd backend/data-vault # or whichever submodule
git checkout main # or: git checkout -b your-feature-branch
```

2. Make your changes, commit, and push:

```bash
git add .
git commit -m "your message"
git push origin main
```

3. Back in the parent repo, stage and commit the updated submodule pointer:

```bash
cd ../..
git add backend/data-vault
git commit -m "bump data-vault to latest"
git push
```

> The parent repo stores a commit SHA pointer to each submodule, not the code itself. Always push from inside the submodule first, then update the pointer in the parent.

## Running locally (web browser mode)

After initializing submodules, start the full stack with:

```bash
cd frontend
npm install
npm run dev:web
```

Open `http://localhost:5173/`. The FastAPI backend starts automatically on `http://127.0.0.1:26866`.

### Skip Keycloak auth (required for local dev)

By default the web app redirects to MindsHub SSO on first load. To bypass this locally, create `frontend/src/renderer/.env` (Vite's root is `src/renderer`, not `frontend/`):

```bash
echo "VITE_SKIP_AUTH=true" > frontend/src/renderer/.env
```

Then restart `npm run dev:web`. The Keycloak redirect will be skipped and the app loads the onboarding screen directly where you can enter a BYOK API key.

### First-time symlink fix

The `dev:web` script expects the `uv`-installed tool at `~/.local/share/uv/tools/anton/`, but it may be installed as `anton-agent`. If you see "Anton Python interpreter not found", run:

```bash
ln -s ~/.local/share/uv/tools/anton-agent ~/.local/share/uv/tools/anton
```

## Flushing local installs (fresh start)

`make flush` wipes every local install **and** all app state, returning the machine to a pre-install condition. Use it to test the from-scratch install flow or to recover from a broken/half-installed environment.

```bash
make flush # prompts before deleting
make flush FORCE=1 # skip the prompt (CI / scripts)
```

It removes:

| Removed | What it is |
|---|---|
| `cowork-server` uv tool (+ legacy `anton-agent`) | the runtime the **Electron app** installs via `uv tool install` |
| `backend/core_api/.venv`, `backend/core_agent/.venv` | the venvs the **Makefile** dev flow builds via `uv sync` |
| `~/.anton` | provider keys / `.env` |
| `~/.cowork` | database, `hermes`, `projects` |

> ⚠️ Destructive — deletes conversations and saved provider keys, no undo. After flushing, the next `make setup` (or app launch) reinstalls everything from scratch.

> It deliberately leaves `uv` itself and uv-managed Python runtimes alone (shared infrastructure, not part of the anton/cowork install).
27 changes: 26 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _NPM_STAMP := $(FRONTEND)/node_modules/.package-lock.json
_API_STAMP := $(API)/.venv
_AGENT_STAMP := $(AGENT)/.venv

.PHONY: setup dev dev-web build dist-mac dist-win docker-build docker-up docker-down
.PHONY: setup dev dev-web build dist-mac dist-win docker-build docker-up docker-down flush

$(_NPM_STAMP): $(FRONTEND)/package-lock.json
npm --prefix $(FRONTEND) ci
Expand Down Expand Up @@ -50,3 +50,28 @@ docker-up:

docker-down:
docker compose down

# Wipe every local install + all app state, returning the machine to a
# pre-install state. Covers BOTH runtime models (the Makefile dev venvs
# AND the Electron app's `uv tool install cowork-server`) plus user data.
# Removes:
# • cowork-server uv tool (and the legacy anton-agent tool)
# • submodule venvs: $(API)/.venv, $(AGENT)/.venv
# • ~/.anton — provider keys / .env
# • ~/.cowork — database, hermes, projects
# The next `make setup` (or app launch) reinstalls from scratch.
# Set FORCE=1 to skip the confirmation prompt (CI / scripts).
flush:
@echo "This will PERMANENTLY remove:"
@echo " • cowork-server uv tool (+ legacy anton-agent)"
@echo " • $(API)/.venv and $(AGENT)/.venv"
@echo " • ~/.anton (provider keys / .env)"
@echo " • ~/.cowork (database, hermes, projects)"
@if [ "$(FORCE)" != "1" ]; then \
read -p "Proceed? [y/N] " ans; [ "$$ans" = y ] || [ "$$ans" = Y ] || { echo "Aborted."; exit 1; }; \
fi
-uv tool uninstall cowork-server
-uv tool uninstall anton-agent
rm -rf $(API)/.venv $(AGENT)/.venv
rm -rf $$HOME/.anton $$HOME/.cowork
@echo "✓ Flushed. Run 'make setup' (or relaunch the app) for a fresh install."
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ make setup
| Production build | `make build` |
| Package for macOS | `make dist-mac` |
| Package for Windows | `make dist-win` |
| Wipe all local installs + data (fresh start) | `make flush` |

> **Reset to a clean slate:** `make flush` uninstalls the local runtime (the `cowork-server` uv tool and the `backend/*/.venv`s) **and** deletes app state in `~/.anton` (provider keys) and `~/.cowork` (database, hermes, projects). Use it to test the from-scratch install flow or recover from a broken install. ⚠️ This deletes your conversations and saved keys. It prompts for confirmation; pass `FORCE=1` to skip it. The next `make setup` or app launch reinstalls everything.

---

Expand Down
2 changes: 1 addition & 1 deletion backend/core_agent
Submodule core_agent updated 82 files
+49 −0 .github/workflows/docs.yml
+1 −1 .gitignore
+5 −9 README.md
+1 −1 anton/__init__.py
+136 −32 anton/chat.py
+1 −11 anton/chat_session.py
+8 −6 anton/cli.py
+265 −0 anton/core/artifacts/backend_launcher.py
+53 −3 anton/core/artifacts/models.py
+33 −9 anton/core/artifacts/store.py
+10 −0 anton/core/backends/base.py
+25 −0 anton/core/backends/local.py
+11 −0 anton/core/backends/manager.py
+27 −13 anton/core/datasources/data_vault.py
+11 −8 anton/core/llm/prompt_builder.py
+352 −6 anton/core/llm/prompts.py
+1 −10 anton/core/runtime.py
+34 −2 anton/core/session.py
+101 −15 anton/core/tools/tool_defs.py
+115 −10 anton/core/tools/tool_handlers.py
+8 −5 anton/minds_client.py
+114 −8 anton/publisher.py
+1 −1 anton/utils/datasources.py
+15 −0 docs/.gitignore
+42 −0 docs/docs/configure/analytics.md
+82 −0 docs/docs/configure/env-vars.md
+66 −0 docs/docs/configure/search-providers.md
+75 −0 docs/docs/configure/security.md
+37 −0 docs/docs/configure/trace-headers.md
+59 −0 docs/docs/connect/custom-integrations.md
+83 −0 docs/docs/connect/data-sources.md
+73 −0 docs/docs/connect/overview.md
+51 −0 docs/docs/connect/web-fetch.md
+56 −0 docs/docs/connect/web-search.md
+143 −0 docs/docs/developer/adding-a-datasource.md
+148 −0 docs/docs/developer/adding-a-tool.md
+143 −0 docs/docs/developer/architecture.md
+105 −0 docs/docs/developer/brain-mapping.md
+192 −0 docs/docs/developer/cerebellum-and-acc.md
+120 −0 docs/docs/developer/contributing.md
+134 −0 docs/docs/developer/llm-dispatch.md
+202 −0 docs/docs/developer/memory-systems.md
+126 −0 docs/docs/developer/release-and-versioning.md
+139 −0 docs/docs/developer/scratchpad-runtime.md
+144 −0 docs/docs/developer/skills-internals.md
+125 −0 docs/docs/developer/tool-system.md
+73 −0 docs/docs/index.mdx
+130 −0 docs/docs/reference/cli-commands.md
+26 −0 docs/docs/reference/glossary.md
+92 −0 docs/docs/reference/slash-commands.md
+47 −0 docs/docs/reference/workspace-files.md
+110 −0 docs/docs/start/install.md
+107 −0 docs/docs/start/pick-a-provider.md
+126 −0 docs/docs/start/quickstart.md
+78 −0 docs/docs/start/updating.md
+52 −0 docs/docs/teach/episodes-and-recall.md
+29 −0 docs/docs/teach/learnings-cli.md
+89 −0 docs/docs/teach/lessons-and-rules.md
+64 −0 docs/docs/teach/memory-overview.md
+56 −0 docs/docs/teach/project-context.md
+61 −0 docs/docs/teach/skills.md
+85 −0 docs/docs/use/chat-basics.md
+81 −0 docs/docs/use/cli.md
+31 −0 docs/docs/use/dashboard.md
+28 −0 docs/docs/use/desktop.md
+70 −0 docs/docs/use/sessions.md
+57 −0 docs/docs/use/workspaces.md
+137 −0 docs/docusaurus.config.ts
+20,064 −0 docs/package-lock.json
+46 −0 docs/package.json
+93 −0 docs/sidebars.ts
+110 −0 docs/src/css/custom.css
+ docs/static/img/anton-dashboard-example.png
+ docs/static/img/anton-diagram.png
+ docs/static/img/anton-promo.gif
+1 −0 docs/static/img/logo.svg
+6 −0 docs/tsconfig.json
+35 −9 tests/test_artifacts.py
+1 −0 tests/test_prompt_builder_skills.py
+5 −4 tests/test_publish_api_key.py
+2 −0 tests/test_session_skills_init.py
+1 −0 tests/test_skills_e2e.py
2 changes: 1 addition & 1 deletion backend/core_api
Submodule core_api updated 57 files
+94 −2 README.md
+43 −3 cowork/api/v1/endpoints/artifacts.py
+247 −0 cowork/api/v1/endpoints/channels.py
+44 −7 cowork/api/v1/endpoints/compat/stubs.py
+49 −18 cowork/api/v1/endpoints/connectors/submissions.py
+11 −0 cowork/api/v1/endpoints/health.py
+6 −1 cowork/api/v1/endpoints/publish.py
+25 −0 cowork/api/v1/endpoints/settings.py
+13 −0 cowork/api/v1/router.py
+48 −0 cowork/channels/__init__.py
+129 −0 cowork/channels/ingress.py
+38 −0 cowork/channels/lifecycle.py
+101 −0 cowork/channels/plugin.py
+1 −0 cowork/channels/plugins/__init__.py
+423 −0 cowork/channels/plugins/discord.py
+357 −0 cowork/channels/plugins/slack.py
+455 −0 cowork/channels/plugins/telegram.py
+343 −0 cowork/channels/plugins/whatsapp.py
+68 −0 cowork/channels/registry.py
+452 −0 cowork/channels/runtime.py
+19 −0 cowork/channels/text.py
+234 −0 cowork/channels/webhooks.py
+36 −0 cowork/common/http_client.py
+72 −0 cowork/common/settings/app_settings.py
+17 −30 cowork/common/settings/user_settings.py
+108 −0 cowork/db/alembic/versions/b7c1d2e3f4a5_channels.py
+15 −15 cowork/handlers/probe.py
+37 −3 cowork/handlers/responses.py
+9 −20 cowork/harnesses/anton_harness/harness.py
+60 −7 cowork/harnesses/hermes_harness/harness.py
+202 −0 cowork/harnesses/hermes_harness/tools.py
+8 −6 cowork/migrations.py
+6 −0 cowork/models/__init__.py
+105 −0 cowork/models/channel.py
+191 −0 cowork/schemas/channels.py
+54 −1 cowork/server.py
+449 −29 cowork/services/artifacts.py
+179 −0 cowork/services/channel_bindings.py
+62 −0 cowork/services/channel_events.py
+97 −0 cowork/services/channel_lifecycle.py
+189 −0 cowork/services/channels.py
+2 −0 cowork/services/connectors/submissions.py
+6 −0 cowork/services/conversations.py
+50 −0 cowork/services/files.py
+209 −0 cowork/services/preview_proxy.py
+74 −5 cowork/services/providers.py
+95 −15 cowork/services/publish.py
+175 −0 cowork/services/scratchpad_runtime.py
+21 −3 pyproject.toml
+0 −0 tests/__init__.py
+48 −0 tests/conftest.py
+132 −0 tests/test_attachment_linkage.py
+274 −0 tests/test_channels_ingress.py
+737 −0 tests/test_channels_smoke.py
+201 −0 tests/test_hermes_artifact_tools.py
+15 −3 tests/test_schema_migrations.py
+1,474 −1,089 uv.lock
10 changes: 10 additions & 0 deletions docs/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,18 @@ <h2>All make commands</h2>
<tr><td><code>make docker-build</code></td><td>Build the api and web Docker images.</td></tr>
<tr><td><code>make docker-up</code></td><td>Start the Docker stack (<code>docker compose up</code>).</td></tr>
<tr><td><code>make docker-down</code></td><td>Stop and remove containers.</td></tr>
<tr><td><code>make flush</code></td><td>Wipe all local installs + app data for a fresh start (see below).</td></tr>
</tbody>
</table>

<h2>Reset to a clean slate</h2>
<p><code>make flush</code> returns the machine to a pre-install state. It uninstalls the local runtime &mdash; the <code>cowork-server</code> uv tool <em>and</em> the <code>backend/core_api/.venv</code> + <code>backend/core_agent/.venv</code> &mdash; and deletes all app state: <code>~/.anton</code> (provider keys / <code>.env</code>) and <code>~/.cowork</code> (database, hermes, projects).</p>
<p>Use it to test the from-scratch install flow or to recover from a broken install. It prompts for confirmation before deleting; pass <code>FORCE=1</code> to skip the prompt in scripts/CI. The next <code>make setup</code> (or app launch) reinstalls everything.</p>
<div class="note">
<strong>Destructive.</strong> This permanently deletes your conversations and saved provider keys. There is no undo.
</div>
<pre><code>make flush # prompts before wiping
make flush FORCE=1 # no prompt (CI / scripts)</code></pre>
</section>
</main>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend
Submodule frontend updated 392 files