Completely removed the database context recall system while preserving database tables for safety. This major cleanup removes 80+ files and 16,831 lines of code. What was removed: - API layer: 4 routers (conversation-contexts, context-snippets, project-states, decision-logs) with 35+ endpoints - Database models: 5 models (ConversationContext, ContextSnippet, DecisionLog, ProjectState, ContextTag) - Services: 4 service layers with business logic - Schemas: 4 Pydantic schema files - Claude Code hooks: 13 hook files (user-prompt-submit, task-complete, sync-contexts, periodic saves) - Scripts: 15+ scripts (import, migration, testing, tombstone checking) - Tests: 5 test files (context recall, compression, diagnostics) - Documentation: 30+ markdown files (guides, architecture, quick starts) - Utilities: context compression, conversation parsing Files modified: - api/main.py: Removed router registrations - api/models/__init__.py: Removed model imports - api/schemas/__init__.py: Removed schema imports - api/services/__init__.py: Removed service imports - .claude/claude.md: Completely rewritten without context references Database tables preserved: - conversation_contexts, context_snippets, context_tags, project_states, decision_logs (5 orphaned tables remain for safety) - Migration created but NOT applied: 20260118_172743_remove_context_system.py - Tables can be dropped later when confirmed not needed New files added: - CONTEXT_SYSTEM_REMOVAL_SUMMARY.md: Detailed removal report - CONTEXT_SYSTEM_REMOVAL_COMPLETE.md: Final status - CONTEXT_EXPORT_RESULTS.md: Export attempt results - scripts/export-tombstoned-contexts.py: Export tool for future use - migrations/versions/20260118_172743_remove_context_system.py Impact: - Reduced from 130 to 95 API endpoints - Reduced from 43 to 38 active database tables - Removed 16,831 lines of code - System fully operational without context recall Reason for removal: - System was not actively used (no tombstoned contexts found) - Reduces codebase complexity - Focuses on core MSP work tracking functionality - Database preserved for safety (can rollback if needed) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
113 lines
3.5 KiB
Python
113 lines
3.5 KiB
Python
"""Pydantic schemas for request/response validation"""
|
|
|
|
from .billable_time import BillableTimeBase, BillableTimeCreate, BillableTimeResponse, BillableTimeUpdate
|
|
from .client import ClientBase, ClientCreate, ClientResponse, ClientUpdate
|
|
from .credential import CredentialBase, CredentialCreate, CredentialResponse, CredentialUpdate
|
|
from .credential_audit_log import (
|
|
CredentialAuditLogBase,
|
|
CredentialAuditLogCreate,
|
|
CredentialAuditLogResponse,
|
|
CredentialAuditLogUpdate,
|
|
)
|
|
from .firewall_rule import FirewallRuleBase, FirewallRuleCreate, FirewallRuleResponse, FirewallRuleUpdate
|
|
from .infrastructure import InfrastructureBase, InfrastructureCreate, InfrastructureResponse, InfrastructureUpdate
|
|
from .m365_tenant import M365TenantBase, M365TenantCreate, M365TenantResponse, M365TenantUpdate
|
|
from .machine import MachineBase, MachineCreate, MachineResponse, MachineUpdate
|
|
from .network import NetworkBase, NetworkCreate, NetworkResponse, NetworkUpdate
|
|
from .project import ProjectBase, ProjectCreate, ProjectResponse, ProjectUpdate
|
|
from .security_incident import SecurityIncidentBase, SecurityIncidentCreate, SecurityIncidentResponse, SecurityIncidentUpdate
|
|
from .service import ServiceBase, ServiceCreate, ServiceResponse, ServiceUpdate
|
|
from .session import SessionBase, SessionCreate, SessionResponse, SessionUpdate
|
|
from .site import SiteBase, SiteCreate, SiteResponse, SiteUpdate
|
|
from .tag import TagBase, TagCreate, TagResponse, TagUpdate
|
|
from .task import TaskBase, TaskCreate, TaskResponse, TaskUpdate
|
|
from .work_item import WorkItemBase, WorkItemCreate, WorkItemResponse, WorkItemUpdate
|
|
|
|
__all__ = [
|
|
# Machine schemas
|
|
"MachineBase",
|
|
"MachineCreate",
|
|
"MachineUpdate",
|
|
"MachineResponse",
|
|
# Client schemas
|
|
"ClientBase",
|
|
"ClientCreate",
|
|
"ClientUpdate",
|
|
"ClientResponse",
|
|
# Project schemas
|
|
"ProjectBase",
|
|
"ProjectCreate",
|
|
"ProjectUpdate",
|
|
"ProjectResponse",
|
|
# Session schemas
|
|
"SessionBase",
|
|
"SessionCreate",
|
|
"SessionUpdate",
|
|
"SessionResponse",
|
|
# Tag schemas
|
|
"TagBase",
|
|
"TagCreate",
|
|
"TagUpdate",
|
|
"TagResponse",
|
|
# WorkItem schemas
|
|
"WorkItemBase",
|
|
"WorkItemCreate",
|
|
"WorkItemUpdate",
|
|
"WorkItemResponse",
|
|
# Task schemas
|
|
"TaskBase",
|
|
"TaskCreate",
|
|
"TaskUpdate",
|
|
"TaskResponse",
|
|
# BillableTime schemas
|
|
"BillableTimeBase",
|
|
"BillableTimeCreate",
|
|
"BillableTimeUpdate",
|
|
"BillableTimeResponse",
|
|
# Site schemas
|
|
"SiteBase",
|
|
"SiteCreate",
|
|
"SiteUpdate",
|
|
"SiteResponse",
|
|
# Infrastructure schemas
|
|
"InfrastructureBase",
|
|
"InfrastructureCreate",
|
|
"InfrastructureUpdate",
|
|
"InfrastructureResponse",
|
|
# Service schemas
|
|
"ServiceBase",
|
|
"ServiceCreate",
|
|
"ServiceUpdate",
|
|
"ServiceResponse",
|
|
# Network schemas
|
|
"NetworkBase",
|
|
"NetworkCreate",
|
|
"NetworkUpdate",
|
|
"NetworkResponse",
|
|
# FirewallRule schemas
|
|
"FirewallRuleBase",
|
|
"FirewallRuleCreate",
|
|
"FirewallRuleUpdate",
|
|
"FirewallRuleResponse",
|
|
# M365Tenant schemas
|
|
"M365TenantBase",
|
|
"M365TenantCreate",
|
|
"M365TenantUpdate",
|
|
"M365TenantResponse",
|
|
# Credential schemas
|
|
"CredentialBase",
|
|
"CredentialCreate",
|
|
"CredentialUpdate",
|
|
"CredentialResponse",
|
|
# CredentialAuditLog schemas
|
|
"CredentialAuditLogBase",
|
|
"CredentialAuditLogCreate",
|
|
"CredentialAuditLogUpdate",
|
|
"CredentialAuditLogResponse",
|
|
# SecurityIncident schemas
|
|
"SecurityIncidentBase",
|
|
"SecurityIncidentCreate",
|
|
"SecurityIncidentUpdate",
|
|
"SecurityIncidentResponse",
|
|
]
|