diff --git a/AGENTS.md b/AGENTS.md index e8f3d20..c3f2102 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,8 +32,8 @@ PATH=/mnt/DATA/git/govoplan-core/webui/node_modules/.bin:/home/zemion/.nvm/versi For combined checks, run: ```bash -cd /mnt/DATA/git/govoplan-core -./scripts/check-focused.sh +cd /mnt/DATA/git/govoplan +tools/checks/check-focused.sh ``` ## Working Rules diff --git a/README.md b/README.md index 486d7db..95a85e3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # govoplan-mail + +**Repository type:** module (domain). + + GovOPlaN Mail is the mail transport module. It owns reusable SMTP/IMAP profile management, mail profile policy enforcement, mock mail infrastructure, and the mail WebUI package. ## Ownership diff --git a/package.json b/package.json index 0517781..99e9b87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@govoplan/mail-webui", - "version": "0.1.7", + "version": "0.1.8", "private": true, "type": "module", "main": "webui/src/index.ts", @@ -19,7 +19,7 @@ "LICENSE" ], "peerDependencies": { - "@govoplan/core-webui": "^0.1.7", + "@govoplan/core-webui": "^0.1.8", "lucide-react": "^1.23.0", "react": "^19.0.0", "react-dom": "^19.0.0", diff --git a/pyproject.toml b/pyproject.toml index e6a07ff..9946b91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta" [project] name = "govoplan-mail" -version = "0.1.7" +version = "0.1.8" description = "GovOPlaN mail module with backend and WebUI integration." readme = "README.md" requires-python = ">=3.12" license = { file = "LICENSE" } authors = [{ name = "GovOPlaN" }] dependencies = [ - "govoplan-core>=0.1.7", + "govoplan-core>=0.1.8", "pydantic>=2,<3", "redis>=5,<6", "SQLAlchemy>=2,<3", diff --git a/src/govoplan_mail/backend/manifest.py b/src/govoplan_mail/backend/manifest.py index e3f1732..d5f148b 100644 --- a/src/govoplan_mail/backend/manifest.py +++ b/src/govoplan_mail/backend/manifest.py @@ -89,7 +89,7 @@ def _mail_router(context: ModuleContext): manifest = ModuleManifest( id="mail", name="Mail", - version="0.1.7", + version="0.1.8", required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR), optional_dependencies=("campaigns",), provides_interfaces=( diff --git a/src/govoplan_mail/backend/migrations/versions/3d4e5f708192_mail_profile_policies.py b/src/govoplan_mail/backend/migrations/dev_versions/3d4e5f708192_mail_profile_policies.py similarity index 100% rename from src/govoplan_mail/backend/migrations/versions/3d4e5f708192_mail_profile_policies.py rename to src/govoplan_mail/backend/migrations/dev_versions/3d4e5f708192_mail_profile_policies.py diff --git a/src/govoplan_mail/backend/migrations/dev_versions/__init__.py b/src/govoplan_mail/backend/migrations/dev_versions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/govoplan_mail/backend/migrations/versions/3d4e5f708192_v017_mail_baseline.py b/src/govoplan_mail/backend/migrations/versions/3d4e5f708192_v017_mail_baseline.py new file mode 100644 index 0000000..aac01fd --- /dev/null +++ b/src/govoplan_mail/backend/migrations/versions/3d4e5f708192_v017_mail_baseline.py @@ -0,0 +1,39 @@ +"""v0.1.7 mail baseline + +Revision ID: 3d4e5f708192 +Revises: None +Create Date: 2026-07-11 00:00:00.000000 +""" +from __future__ import annotations + +from alembic import op +import sqlalchemy as sa + + +revision = '3d4e5f708192' +down_revision = None +branch_labels = None +depends_on = '4f2a9c8e7b6d' + + +def upgrade() -> None: + op.create_table('mail_profile_policies', + sa.Column('id', sa.String(length=36), nullable=False), + sa.Column('tenant_id', sa.String(length=36), nullable=True), + sa.Column('scope_type', sa.String(length=20), nullable=False), + sa.Column('scope_id', sa.String(length=36), nullable=True), + sa.Column('policy', sa.JSON(), nullable=False), + sa.Column('created_at', sa.DateTime(timezone=True), nullable=False), + sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False), + sa.ForeignKeyConstraint(['tenant_id'], ['core_scopes.id'], name=op.f('fk_mail_profile_policies_tenant_id_scopes'), ondelete='CASCADE'), + sa.PrimaryKeyConstraint('id', name=op.f('pk_mail_profile_policies')), + sa.UniqueConstraint('tenant_id', 'scope_type', 'scope_id', name='uq_mail_profile_policies_scope') + ) + op.create_index('ix_mail_profile_policies_scope', 'mail_profile_policies', ['scope_type', 'scope_id'], unique=False) + op.create_index(op.f('ix_mail_profile_policies_scope_id'), 'mail_profile_policies', ['scope_id'], unique=False) + op.create_index(op.f('ix_mail_profile_policies_scope_type'), 'mail_profile_policies', ['scope_type'], unique=False) + op.create_index(op.f('ix_mail_profile_policies_tenant_id'), 'mail_profile_policies', ['tenant_id'], unique=False) + + +def downgrade() -> None: + op.drop_table('mail_profile_policies') diff --git a/webui/package.json b/webui/package.json index 037a15a..2511dbb 100644 --- a/webui/package.json +++ b/webui/package.json @@ -1,6 +1,6 @@ { "name": "@govoplan/mail-webui", - "version": "0.1.7", + "version": "0.1.8", "private": true, "type": "module", "main": "src/index.ts", @@ -14,7 +14,7 @@ "./styles/mail-profiles.css": "./src/styles/mail-profiles.css" }, "peerDependencies": { - "@govoplan/core-webui": "^0.1.7", + "@govoplan/core-webui": "^0.1.8", "lucide-react": "^1.23.0", "react": "^19.0.0", "react-dom": "^19.0.0",