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
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ATLAS_TELEGRAM_WEBHOOK_SECRET=

# App
SERVER_PORT=8080
ATLAS_DEPLOYMENT_MODE=self_hosted
ATLAS_SETUP_ENABLED=true

# Optional LLM configuration
ATLAS_LLM_ENABLED=false
Expand All @@ -27,6 +29,13 @@ ATLAS_LLM_DAY_PLAN_ENABLED=true
ATLAS_LLM_REPORT_ENABLED=true
ATLAS_LLM_QUESTION_ENABLED=true

# Optional memory snapshots
ATLAS_MEMORY_SNAPSHOTS_ENABLED=false
ATLAS_MEMORY_SNAPSHOT_PATH=/app/data/memory

# Optional routines
ATLAS_ROUTINE_SCHEDULER_ENABLED=true

# Database
POSTGRES_DB=atlas
POSTGRES_USER=atlas
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
ATLAS_TELEGRAM_BOT_TOKEN: ""
ATLAS_LLM_ENABLED: "false"
ATLAS_LLM_API_KEY: ""
ATLAS_DEPLOYMENT_MODE: "self_hosted"
ATLAS_MEMORY_SNAPSHOTS_ENABLED: "false"
ATLAS_ROUTINE_SCHEDULER_ENABLED: "false"

steps:
- name: Check out repository
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ target/
*.iml

logs/
data/
memory/
runtime/
storage/
/data/
/memory/
/runtime/
/storage/
*.log
*.pid
*.pid.lock
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL:-jdbc:postgresql://atlas-postgres:5432/atlas}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME:-atlas}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD:-atlas}
ATLAS_DEPLOYMENT_MODE: ${ATLAS_DEPLOYMENT_MODE:-self_hosted}
ATLAS_SETUP_ENABLED: ${ATLAS_SETUP_ENABLED:-true}
ATLAS_TELEGRAM_BOT_TOKEN: ${ATLAS_TELEGRAM_BOT_TOKEN:-}
ATLAS_TELEGRAM_BOT_USERNAME: ${ATLAS_TELEGRAM_BOT_USERNAME:-}
Expand All @@ -52,6 +53,9 @@ services:
ATLAS_LLM_DAY_PLAN_ENABLED: ${ATLAS_LLM_DAY_PLAN_ENABLED:-true}
ATLAS_LLM_REPORT_ENABLED: ${ATLAS_LLM_REPORT_ENABLED:-true}
ATLAS_LLM_QUESTION_ENABLED: ${ATLAS_LLM_QUESTION_ENABLED:-true}
ATLAS_MEMORY_SNAPSHOTS_ENABLED: ${ATLAS_MEMORY_SNAPSHOTS_ENABLED:-false}
ATLAS_MEMORY_SNAPSHOT_PATH: ${ATLAS_MEMORY_SNAPSHOT_PATH:-/app/data/memory}
ATLAS_ROUTINE_SCHEDULER_ENABLED: ${ATLAS_ROUTINE_SCHEDULER_ENABLED:-true}
volumes:
- atlas-runtime-data:/app/data
ports:
Expand Down
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
- [Локальный запуск](ru/local-launch.md)
- [Telegram UX](ru/telegram-ux.md)
- [LLM setup](ru/llm.md)
- [Память](ru/memory.md)
- [Режимы развертывания](ru/deployment.md)
- [Приватность](ru/privacy.md)
- [Рутины](ru/routines.md)
- [Недельное планирование](ru/weekly-planning.md)
- [Отчеты](ru/reports.md)
- [Интеграции](ru/integrations.md)
- [История изменений](ru/changelog.md)

## English
Expand All @@ -22,4 +29,11 @@
- [Local launch](en/local-launch.md)
- [Telegram UX](en/telegram-ux.md)
- [LLM setup](en/llm.md)
- [Memory](en/memory.md)
- [Deployment modes](en/deployment.md)
- [Privacy controls](en/privacy.md)
- [Routines](en/routines.md)
- [Weekly planning](en/weekly-planning.md)
- [Reports](en/reports.md)
- [Integrations](en/integrations.md)
- [Changelog](en/changelog.md)
9 changes: 8 additions & 1 deletion docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ ATLAS is a backend-first Telegram life operating system for state, focus, habits
- [Local launch](local-launch.md)
- [Telegram UX](telegram-ux.md)
- [LLM setup](llm.md)
- [Memory](memory.md)
- [Deployment modes](deployment.md)
- [Privacy controls](privacy.md)
- [Routines](routines.md)
- [Weekly planning](weekly-planning.md)
- [Reports](reports.md)
- [Integrations](integrations.md)
- [Changelog](changelog.md)

## Scope

ATLAS is a Telegram-first backend product. Frontend, landing pages, web dashboards, hosted official bot, reminders, persistent agent memory, embeddings and vector search are outside v0.6.0.
ATLAS is a Telegram-first backend product. Embeddings, vector search, OAuth sync and full external provider synchronization remain outside v0.9.0.
91 changes: 91 additions & 0 deletions docs/en/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,96 @@
# Changelog

## Unreleased

### Changed
- Connected user-aware agent routing so Planner, Report and Question agents can use persisted user context.
- Persisted agent-proposed memory writes through `AgentMemoryService`.
- Wired privacy commands to real export, forget-memory and delete-my-data service behavior.
- Connected weekly focus to weekly reports and archived generated reports.
- Persisted integration settings through `IntegrationSettingsPort`.
- Wired hosted rate limits and LLM quotas into Telegram and LLM flows.
- Hardened hosted mode to require a webhook secret and documented backup/restore.

## v0.9.0

### Added
- Added integration port interfaces and safe integration settings metadata.
- Added user-scoped Markdown export foundation.
- Added calendar integration preview contract without OAuth or external sync.

## v0.8.2

### Added
- Added deterministic trend detection for energy, focus, stress and sleep.
- Added habit consistency analysis.
- Added report archive persistence foundation.

## v0.8.1

### Added
- Added persisted weekly focus model.
- Added weekly planning service for saving and retrieving current focus.
- Prepared weekly report connection points for weekly plan data.

## v0.8.0

### Added
- Added routine preferences for check-in time, evening time, timezone, quiet hours and enabled state.
- Added reminder scheduler foundation that respects quiet hours.

## v0.7.3

### Added
- Added hosted rate-limit and LLM quota foundations.
- Kept health endpoints available through Spring Boot readiness and liveness probes.

## v0.7.2

### Added
- Added privacy panel, export, forget-memory and delete-my-data service foundations.
- Added strong confirmation checks for destructive operations.

### Security
- Privacy operations are user-scoped and do not expose raw secrets.

## v0.7.1

### Added
- Added hosted runtime foundations for server-owned Telegram configuration.
- Added webhook-first safety checks through deployment validation.
- Added basic per-user rate limiting.

## v0.7.0

### Added
- Added explicit self-hosted and hosted deployment modes.
- Added safe deployment status and validation for unsafe hosted combinations.

## v0.6.4

### Added
- Added memory-aware LLM context assembly.
- Added context limits and user-scoped shared/agent-specific memory retrieval.

## v0.6.3

### Added
- Added PostgreSQL persistence schema for memory records.
- Added user-scoped memory repository and persistent memory service.
- Added optional runtime Markdown memory snapshots.

## v0.6.2

### Added
- Added memory write model, policy, validation result and memory service contract.
- Extended agent results with proposed memory writes.

## v0.6.1

### Added
- Added first scoped LLM agent abstractions and question agent.
- Added fallback and safety metadata on agent responses.

## v0.6.0

### Added
Expand Down
18 changes: 18 additions & 0 deletions docs/en/deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Deployment Modes

ATLAS supports two deployment modes through `ATLAS_DEPLOYMENT_MODE`:

- `self_hosted`: default mode. Local setup can be enabled and a user-provided Telegram bot token is allowed.
- `hosted`: foundation for a server-owned runtime. Setup must be disabled, Telegram must run in webhook mode, and bot credentials must come from server environment or secrets.

Hosted mode blocks unsafe combinations such as public setup, missing webhook URL, missing webhook secret, missing bot token or polling-only runtime.

Status output may show mode, setup state, provider names and whether settings exist. It must not show Telegram tokens, webhook secrets or LLM API keys.

## Backup And Restore Checklist

- Back up PostgreSQL with `pg_dump` or provider-native snapshots.
- Back up persistent runtime volumes, especially `/app/data/memory` if memory snapshots are enabled.
- Do not back up plaintext `.env` files into shared storage; store secrets in the deployment secret manager.
- Restore PostgreSQL first, then runtime volumes, then restart ATLAS with the same `ATLAS_DEPLOYMENT_MODE`.
- Verify `/actuator/health/readiness` and `/actuator/health/liveness` after restore.
10 changes: 10 additions & 0 deletions docs/en/integrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Integrations

The integration foundation is port-first:

- integration settings persist safe metadata only through `IntegrationSettingsPort`;
- Markdown export is user-scoped;
- calendar integration exposes a preview contract;
- no OAuth flow or full external sync is included.

The Telegram settings panel links to integrations status. Future integrations can implement these ports without changing ATLAS into a multi-service system.
12 changes: 12 additions & 0 deletions docs/en/memory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Memory

ATLAS memory has two layers:

- Memory write contract: agents can propose user-scoped memories with type, scope, confidence, source and tags.
- Persistent memory: accepted records are stored in PostgreSQL and can optionally be mirrored as runtime Markdown snapshots.

Memory writes are validated before storage. The policy rejects secrets, missing user scope, unsafe medical claims and low-value one-off noise. Retrieval is always scoped by the internal user id.

Markdown snapshots are disabled by default. If enabled, they are written under `ATLAS_MEMORY_SNAPSHOT_PATH` and must stay in ignored runtime storage.

No embeddings or vector search are part of this release line.
11 changes: 11 additions & 0 deletions docs/en/privacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Privacy Controls

ATLAS exposes user-facing controls for:

- `/privacy`: explain stored profile, check-ins, habits, reflections, reports, memory and Telegram identifiers.
- `/memory`: show memory categories and counts without raw sensitive content by default.
- `/export`: produce user-scoped JSON and Markdown export data with saved check-ins, habits, reflections and memory records.
- `/forget DELETE`: archive memory records only, after confirmation.
- `/delete_my_data DELETE`: delete user-scoped profile, tracking, conversation, message, routine, planning, report, integration and memory data after strong confirmation.

Destructive operations require the exact confirmation value `DELETE` in the service layer. Export, forget and deletion use the internal user id and do not operate across users.
9 changes: 9 additions & 0 deletions docs/en/reports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Reports

Reports now have deterministic foundations for:

- energy, focus, stress and sleep trends;
- habit consistency;
- report archive persistence.

Weekly reports include deterministic trends, saved weekly focus when available and are archived after generation. Trend detection only uses saved check-ins and habit records. Reports must show missing data instead of inventing conclusions.
13 changes: 13 additions & 0 deletions docs/en/routines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Routines

Routine preferences store:

- daily check-in time;
- evening reflection time;
- timezone;
- quiet hours;
- enabled flag.

The reminder scheduler checks whether a reminder may be sent without interrupting quiet hours and claims a per-user, per-day reminder key to prevent duplicate check-in or evening reminders.

The Telegram settings panel links to the routines panel so users can see the current persisted reminder preferences.
7 changes: 7 additions & 0 deletions docs/en/weekly-planning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Weekly Planning

Weekly planning adds a persisted weekly focus per user and week. The week starts on Monday.

The Telegram command `/week <main focus>` saves or updates the current weekly focus. `/week` without an argument shows the current focus.

Weekly reports include the saved weekly focus when available. The model is intentionally small: it stores the focus text and week start without introducing external calendar sync.
7 changes: 7 additions & 0 deletions docs/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ ATLAS - backend-first Telegram-система для состояния, фок
- [Локальный запуск](local-launch.md)
- [Telegram UX](telegram-ux.md)
- [LLM setup](llm.md)
- [Память](memory.md)
- [Режимы развертывания](deployment.md)
- [Приватность](privacy.md)
- [Рутины](routines.md)
- [Недельное планирование](weekly-planning.md)
- [Отчеты](reports.md)
- [Интеграции](integrations.md)
- [История изменений](changelog.md)

## Scope
Expand Down
Loading
Loading