projectdavid-orm 1.10.0__tar.gz → 1.12.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/CHANGELOG.md +14 -0
  2. {projectdavid_orm-1.10.0/src/projectdavid_orm.egg-info → projectdavid_orm-1.12.0}/PKG-INFO +1 -1
  3. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/pyproject.toml +1 -1
  4. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm/projectdavid_orm/models.py +85 -3
  5. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0/src/projectdavid_orm.egg-info}/PKG-INFO +1 -1
  6. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/LICENSE +0 -0
  7. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/MANIFEST.in +0 -0
  8. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/README.md +0 -0
  9. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/setup.cfg +0 -0
  10. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_common.egg-info/PKG-INFO +0 -0
  11. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_common.egg-info/SOURCES.txt +0 -0
  12. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_common.egg-info/dependency_links.txt +0 -0
  13. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_common.egg-info/entry_points.txt +0 -0
  14. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_common.egg-info/requires.txt +0 -0
  15. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_common.egg-info/top_level.txt +0 -0
  16. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm/__init__.py +0 -0
  17. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm/constants/__init__.py +0 -0
  18. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm/ormInterface.py +0 -0
  19. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm/projectdavid_orm/__init__.py +0 -0
  20. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm/projectdavid_orm/base.py +0 -0
  21. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm/utilities/__init__.py +0 -0
  22. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm.egg-info/SOURCES.txt +0 -0
  23. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm.egg-info/dependency_links.txt +0 -0
  24. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm.egg-info/requires.txt +0 -0
  25. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/src/projectdavid_orm.egg-info/top_level.txt +0 -0
  26. {projectdavid_orm-1.10.0 → projectdavid_orm-1.12.0}/tests/test_clients.py +0 -0
@@ -1,3 +1,17 @@
1
+ # [1.12.0](https://github.com/project-david-ai/projectdavid-orm/compare/v1.11.0...v1.12.0) (2026-09-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * **schema:** add canonical message sequence ordering ([ca58196](https://github.com/project-david-ai/projectdavid-orm/commit/ca581964f244a704bd2dd8e7f8bacb65a24ee6d7))
7
+
8
+ # [1.11.0](https://github.com/project-david-ai/projectdavid-orm/compare/v1.10.0...v1.11.0) (2026-09-27)
9
+
10
+
11
+ ### Features
12
+
13
+ * add tenant credential persistence ([d222bc0](https://github.com/project-david-ai/projectdavid-orm/commit/d222bc0764dfb10ced00006b68a06c6a55d1b508))
14
+
1
15
  # [1.10.0](https://github.com/project-david-ai/projectdavid-orm/compare/v1.9.1...v1.10.0) (2026-09-26)
2
16
 
3
17
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid-orm
3
- Version: 1.10.0
3
+ Version: 1.12.0
4
4
  Summary: Shared SQLAlchemy ORM models for ProjectDavid services
5
5
  Author-email: "Francis N." <engineering@projectdavid.co.uk>
6
6
  License: PolyForm Noncommercial License 1.0.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "projectdavid-orm"
7
- version = "1.10.0"
7
+ version = "1.12.0"
8
8
  description = "Shared SQLAlchemy ORM models for ProjectDavid services"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -9,6 +9,7 @@ from projectdavid_common.utilities.logging_service import LoggingUtility
9
9
  from sqlalchemy import JSON, BigInteger, Boolean, Column, DateTime
10
10
  from sqlalchemy import Enum as SAEnum
11
11
  from sqlalchemy import (
12
+ FetchedValue,
12
13
  Float,
13
14
  ForeignKey,
14
15
  Index,
@@ -180,6 +181,13 @@ class User(Base):
180
181
 
181
182
  audit_logs = relationship("AuditLog", back_populates="user", lazy="dynamic")
182
183
 
184
+ credentials = relationship(
185
+ "Credential",
186
+ back_populates="owner",
187
+ cascade="all, delete-orphan",
188
+ lazy="select",
189
+ )
190
+
183
191
  mcp_server_registrations = relationship(
184
192
  "McpServerRegistration",
185
193
  back_populates="owner",
@@ -287,6 +295,15 @@ class Message(Base):
287
295
  comment="For messages with role='tool', this links back to the specific tool_call_id.",
288
296
  )
289
297
 
298
+ sequence_no = Column(
299
+ BigInteger,
300
+ nullable=False,
301
+ unique=True,
302
+ index=True,
303
+ server_default=FetchedValue(),
304
+ comment="Canonical monotonic persistence order for conversation messages.",
305
+ )
306
+
290
307
  created_at = Column(Integer, nullable=False)
291
308
  incomplete_at = Column(Integer, nullable=True)
292
309
  incomplete_details = Column(JSON, nullable=True)
@@ -504,12 +521,58 @@ class Assistant(Base):
504
521
  )
505
522
 
506
523
 
524
+ class Credential(Base):
525
+ """Tenant-owned encrypted credential material.
526
+
527
+ Plaintext credentials are never persisted. Decryption is owned by
528
+ the application credential service and requires deployment-supplied
529
+ root key material.
530
+ """
531
+
532
+ __tablename__ = "credentials"
533
+
534
+ id = Column(String(64), primary_key=True, index=True)
535
+
536
+ owner_id = Column(
537
+ String(64),
538
+ ForeignKey("users.id", ondelete="CASCADE"),
539
+ nullable=False,
540
+ index=True,
541
+ )
542
+
543
+ kind = Column(String(32), nullable=False)
544
+ encrypted_payload = Column(Text, nullable=False)
545
+ encryption_version = Column(
546
+ Integer,
547
+ nullable=False,
548
+ default=1,
549
+ server_default="1",
550
+ )
551
+
552
+ created_at = Column(DateTime, nullable=False, default=datetime.utcnow)
553
+ updated_at = Column(
554
+ DateTime,
555
+ nullable=False,
556
+ default=datetime.utcnow,
557
+ onupdate=datetime.utcnow,
558
+ )
559
+
560
+ owner = relationship("User", back_populates="credentials")
561
+
562
+ mcp_server_registrations = relationship(
563
+ "McpServerRegistration",
564
+ back_populates="credential",
565
+ lazy="select",
566
+ )
567
+
568
+ __table_args__ = (Index("idx_credentials_owner_kind", "owner_id", "kind"),)
569
+
570
+
507
571
  class McpServerRegistration(Base):
508
572
  """A user-owned remote MCP server registration.
509
573
 
510
- Credentials are intentionally absent. MCP-5A supports unauthenticated
511
- Streamable HTTP registrations only until Project David has a dedicated
512
- reversible secret-reference facility.
574
+ Authentication references generic tenant-owned encrypted credentials.
575
+ Raw credential material is never persisted on the registration itself.
513
576
  """
514
577
 
515
578
  __tablename__ = "mcp_server_registrations"
@@ -544,6 +607,20 @@ class McpServerRegistration(Base):
544
607
  server_default="streamable_http",
545
608
  )
546
609
 
610
+ auth_type = Column(
611
+ String(32),
612
+ nullable=False,
613
+ default="none",
614
+ server_default="none",
615
+ )
616
+
617
+ credential_id = Column(
618
+ String(64),
619
+ ForeignKey("credentials.id", ondelete="RESTRICT"),
620
+ nullable=True,
621
+ index=True,
622
+ )
623
+
547
624
  timeout_seconds = Column(Float, nullable=False, default=30.0, server_default="30")
548
625
 
549
626
  enabled = Column(Boolean, nullable=False, default=True, server_default="1")
@@ -558,6 +635,11 @@ class McpServerRegistration(Base):
558
635
 
559
636
  owner = relationship("User", back_populates="mcp_server_registrations")
560
637
 
638
+ credential = relationship(
639
+ "Credential",
640
+ back_populates="mcp_server_registrations",
641
+ )
642
+
561
643
  assistant_tools = relationship(
562
644
  "AssistantMcpTool",
563
645
  back_populates="registration",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: projectdavid-orm
3
- Version: 1.10.0
3
+ Version: 1.12.0
4
4
  Summary: Shared SQLAlchemy ORM models for ProjectDavid services
5
5
  Author-email: "Francis N." <engineering@projectdavid.co.uk>
6
6
  License: PolyForm Noncommercial License 1.0.0