julee 0.1.0__py3-none-any.whl

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 (161) hide show
  1. julee/__init__.py +3 -0
  2. julee/api/__init__.py +20 -0
  3. julee/api/app.py +180 -0
  4. julee/api/dependencies.py +257 -0
  5. julee/api/requests.py +175 -0
  6. julee/api/responses.py +43 -0
  7. julee/api/routers/__init__.py +43 -0
  8. julee/api/routers/assembly_specifications.py +212 -0
  9. julee/api/routers/documents.py +182 -0
  10. julee/api/routers/knowledge_service_configs.py +79 -0
  11. julee/api/routers/knowledge_service_queries.py +293 -0
  12. julee/api/routers/system.py +137 -0
  13. julee/api/routers/workflows.py +234 -0
  14. julee/api/services/__init__.py +20 -0
  15. julee/api/services/system_initialization.py +214 -0
  16. julee/api/tests/__init__.py +14 -0
  17. julee/api/tests/routers/__init__.py +17 -0
  18. julee/api/tests/routers/test_assembly_specifications.py +749 -0
  19. julee/api/tests/routers/test_documents.py +301 -0
  20. julee/api/tests/routers/test_knowledge_service_configs.py +234 -0
  21. julee/api/tests/routers/test_knowledge_service_queries.py +738 -0
  22. julee/api/tests/routers/test_system.py +179 -0
  23. julee/api/tests/routers/test_workflows.py +393 -0
  24. julee/api/tests/test_app.py +285 -0
  25. julee/api/tests/test_dependencies.py +245 -0
  26. julee/api/tests/test_requests.py +250 -0
  27. julee/domain/__init__.py +22 -0
  28. julee/domain/models/__init__.py +49 -0
  29. julee/domain/models/assembly/__init__.py +17 -0
  30. julee/domain/models/assembly/assembly.py +103 -0
  31. julee/domain/models/assembly/tests/__init__.py +0 -0
  32. julee/domain/models/assembly/tests/factories.py +37 -0
  33. julee/domain/models/assembly/tests/test_assembly.py +430 -0
  34. julee/domain/models/assembly_specification/__init__.py +24 -0
  35. julee/domain/models/assembly_specification/assembly_specification.py +172 -0
  36. julee/domain/models/assembly_specification/knowledge_service_query.py +123 -0
  37. julee/domain/models/assembly_specification/tests/__init__.py +0 -0
  38. julee/domain/models/assembly_specification/tests/factories.py +78 -0
  39. julee/domain/models/assembly_specification/tests/test_assembly_specification.py +490 -0
  40. julee/domain/models/assembly_specification/tests/test_knowledge_service_query.py +310 -0
  41. julee/domain/models/custom_fields/__init__.py +0 -0
  42. julee/domain/models/custom_fields/content_stream.py +68 -0
  43. julee/domain/models/custom_fields/tests/__init__.py +0 -0
  44. julee/domain/models/custom_fields/tests/test_custom_fields.py +53 -0
  45. julee/domain/models/document/__init__.py +17 -0
  46. julee/domain/models/document/document.py +150 -0
  47. julee/domain/models/document/tests/__init__.py +0 -0
  48. julee/domain/models/document/tests/factories.py +76 -0
  49. julee/domain/models/document/tests/test_document.py +297 -0
  50. julee/domain/models/knowledge_service_config/__init__.py +17 -0
  51. julee/domain/models/knowledge_service_config/knowledge_service_config.py +86 -0
  52. julee/domain/models/policy/__init__.py +15 -0
  53. julee/domain/models/policy/document_policy_validation.py +220 -0
  54. julee/domain/models/policy/policy.py +203 -0
  55. julee/domain/models/policy/tests/__init__.py +0 -0
  56. julee/domain/models/policy/tests/factories.py +47 -0
  57. julee/domain/models/policy/tests/test_document_policy_validation.py +420 -0
  58. julee/domain/models/policy/tests/test_policy.py +546 -0
  59. julee/domain/repositories/__init__.py +27 -0
  60. julee/domain/repositories/assembly.py +45 -0
  61. julee/domain/repositories/assembly_specification.py +52 -0
  62. julee/domain/repositories/base.py +146 -0
  63. julee/domain/repositories/document.py +49 -0
  64. julee/domain/repositories/document_policy_validation.py +52 -0
  65. julee/domain/repositories/knowledge_service_config.py +54 -0
  66. julee/domain/repositories/knowledge_service_query.py +44 -0
  67. julee/domain/repositories/policy.py +49 -0
  68. julee/domain/use_cases/__init__.py +17 -0
  69. julee/domain/use_cases/decorators.py +107 -0
  70. julee/domain/use_cases/extract_assemble_data.py +649 -0
  71. julee/domain/use_cases/initialize_system_data.py +842 -0
  72. julee/domain/use_cases/tests/__init__.py +7 -0
  73. julee/domain/use_cases/tests/test_extract_assemble_data.py +548 -0
  74. julee/domain/use_cases/tests/test_initialize_system_data.py +455 -0
  75. julee/domain/use_cases/tests/test_validate_document.py +1228 -0
  76. julee/domain/use_cases/validate_document.py +736 -0
  77. julee/fixtures/assembly_specifications.yaml +70 -0
  78. julee/fixtures/documents.yaml +178 -0
  79. julee/fixtures/knowledge_service_configs.yaml +37 -0
  80. julee/fixtures/knowledge_service_queries.yaml +27 -0
  81. julee/repositories/__init__.py +17 -0
  82. julee/repositories/memory/__init__.py +31 -0
  83. julee/repositories/memory/assembly.py +84 -0
  84. julee/repositories/memory/assembly_specification.py +125 -0
  85. julee/repositories/memory/base.py +227 -0
  86. julee/repositories/memory/document.py +149 -0
  87. julee/repositories/memory/document_policy_validation.py +104 -0
  88. julee/repositories/memory/knowledge_service_config.py +123 -0
  89. julee/repositories/memory/knowledge_service_query.py +120 -0
  90. julee/repositories/memory/policy.py +87 -0
  91. julee/repositories/memory/tests/__init__.py +0 -0
  92. julee/repositories/memory/tests/test_document.py +212 -0
  93. julee/repositories/memory/tests/test_document_policy_validation.py +161 -0
  94. julee/repositories/memory/tests/test_policy.py +443 -0
  95. julee/repositories/minio/__init__.py +31 -0
  96. julee/repositories/minio/assembly.py +103 -0
  97. julee/repositories/minio/assembly_specification.py +170 -0
  98. julee/repositories/minio/client.py +570 -0
  99. julee/repositories/minio/document.py +530 -0
  100. julee/repositories/minio/document_policy_validation.py +120 -0
  101. julee/repositories/minio/knowledge_service_config.py +187 -0
  102. julee/repositories/minio/knowledge_service_query.py +211 -0
  103. julee/repositories/minio/policy.py +106 -0
  104. julee/repositories/minio/tests/__init__.py +0 -0
  105. julee/repositories/minio/tests/fake_client.py +213 -0
  106. julee/repositories/minio/tests/test_assembly.py +374 -0
  107. julee/repositories/minio/tests/test_assembly_specification.py +391 -0
  108. julee/repositories/minio/tests/test_client_protocol.py +57 -0
  109. julee/repositories/minio/tests/test_document.py +591 -0
  110. julee/repositories/minio/tests/test_document_policy_validation.py +192 -0
  111. julee/repositories/minio/tests/test_knowledge_service_config.py +374 -0
  112. julee/repositories/minio/tests/test_knowledge_service_query.py +438 -0
  113. julee/repositories/minio/tests/test_policy.py +559 -0
  114. julee/repositories/temporal/__init__.py +38 -0
  115. julee/repositories/temporal/activities.py +114 -0
  116. julee/repositories/temporal/activity_names.py +34 -0
  117. julee/repositories/temporal/proxies.py +159 -0
  118. julee/services/__init__.py +18 -0
  119. julee/services/knowledge_service/__init__.py +48 -0
  120. julee/services/knowledge_service/anthropic/__init__.py +12 -0
  121. julee/services/knowledge_service/anthropic/knowledge_service.py +331 -0
  122. julee/services/knowledge_service/anthropic/tests/test_knowledge_service.py +318 -0
  123. julee/services/knowledge_service/factory.py +138 -0
  124. julee/services/knowledge_service/knowledge_service.py +160 -0
  125. julee/services/knowledge_service/memory/__init__.py +13 -0
  126. julee/services/knowledge_service/memory/knowledge_service.py +278 -0
  127. julee/services/knowledge_service/memory/test_knowledge_service.py +345 -0
  128. julee/services/knowledge_service/test_factory.py +112 -0
  129. julee/services/temporal/__init__.py +38 -0
  130. julee/services/temporal/activities.py +86 -0
  131. julee/services/temporal/activity_names.py +22 -0
  132. julee/services/temporal/proxies.py +41 -0
  133. julee/util/__init__.py +0 -0
  134. julee/util/domain.py +119 -0
  135. julee/util/repos/__init__.py +0 -0
  136. julee/util/repos/minio/__init__.py +0 -0
  137. julee/util/repos/minio/file_storage.py +213 -0
  138. julee/util/repos/temporal/__init__.py +11 -0
  139. julee/util/repos/temporal/client_proxies/file_storage.py +68 -0
  140. julee/util/repos/temporal/data_converter.py +123 -0
  141. julee/util/repos/temporal/minio_file_storage.py +12 -0
  142. julee/util/repos/temporal/proxies/__init__.py +0 -0
  143. julee/util/repos/temporal/proxies/file_storage.py +58 -0
  144. julee/util/repositories.py +55 -0
  145. julee/util/temporal/__init__.py +22 -0
  146. julee/util/temporal/activities.py +123 -0
  147. julee/util/temporal/decorators.py +473 -0
  148. julee/util/tests/__init__.py +1 -0
  149. julee/util/tests/test_decorators.py +770 -0
  150. julee/util/validation/__init__.py +29 -0
  151. julee/util/validation/repository.py +100 -0
  152. julee/util/validation/type_guards.py +369 -0
  153. julee/worker.py +211 -0
  154. julee/workflows/__init__.py +26 -0
  155. julee/workflows/extract_assemble.py +215 -0
  156. julee/workflows/validate_document.py +228 -0
  157. julee-0.1.0.dist-info/METADATA +195 -0
  158. julee-0.1.0.dist-info/RECORD +161 -0
  159. julee-0.1.0.dist-info/WHEEL +5 -0
  160. julee-0.1.0.dist-info/licenses/LICENSE +674 -0
  161. julee-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,114 @@
1
+ """
2
+ Temporal activity wrapper classes for the julee domain.
3
+
4
+ This module contains all @temporal_activity_registration decorated classes
5
+ that wrap pure backend repositories as Temporal activities. These classes are
6
+ imported by the worker to register activities with Temporal.
7
+
8
+ The classes follow the naming pattern documented in systemPatterns.org:
9
+ - Activity names: {domain}.{repo_name}.{method}
10
+ - Each repository type gets its own activity prefix
11
+ """
12
+
13
+ from julee.util.temporal.decorators import temporal_activity_registration
14
+ from julee.repositories.minio.assembly import MinioAssemblyRepository
15
+ from julee.repositories.minio.assembly_specification import (
16
+ MinioAssemblySpecificationRepository,
17
+ )
18
+ from julee.repositories.minio.document import MinioDocumentRepository
19
+ from julee.repositories.minio.knowledge_service_config import (
20
+ MinioKnowledgeServiceConfigRepository,
21
+ )
22
+ from julee.repositories.minio.knowledge_service_query import (
23
+ MinioKnowledgeServiceQueryRepository,
24
+ )
25
+ from julee.repositories.minio.policy import (
26
+ MinioPolicyRepository,
27
+ )
28
+ from julee.repositories.minio.document_policy_validation import (
29
+ MinioDocumentPolicyValidationRepository,
30
+ )
31
+
32
+ # Import activity name bases from shared module
33
+ from julee.repositories.temporal.activity_names import (
34
+ ASSEMBLY_ACTIVITY_BASE,
35
+ ASSEMBLY_SPECIFICATION_ACTIVITY_BASE,
36
+ DOCUMENT_ACTIVITY_BASE,
37
+ KNOWLEDGE_SERVICE_CONFIG_ACTIVITY_BASE,
38
+ KNOWLEDGE_SERVICE_QUERY_ACTIVITY_BASE,
39
+ POLICY_ACTIVITY_BASE,
40
+ DOCUMENT_POLICY_VALIDATION_ACTIVITY_BASE,
41
+ )
42
+
43
+
44
+ @temporal_activity_registration(ASSEMBLY_ACTIVITY_BASE)
45
+ class TemporalMinioAssemblyRepository(MinioAssemblyRepository):
46
+ """Temporal activity wrapper for MinioAssemblyRepository."""
47
+
48
+ pass
49
+
50
+
51
+ @temporal_activity_registration(ASSEMBLY_SPECIFICATION_ACTIVITY_BASE)
52
+ class TemporalMinioAssemblySpecificationRepository(
53
+ MinioAssemblySpecificationRepository
54
+ ):
55
+ """Temporal activity wrapper for MinioAssemblySpecificationRepository."""
56
+
57
+ pass
58
+
59
+
60
+ @temporal_activity_registration(DOCUMENT_ACTIVITY_BASE)
61
+ class TemporalMinioDocumentRepository(MinioDocumentRepository):
62
+ """Temporal activity wrapper for MinioDocumentRepository."""
63
+
64
+ pass
65
+
66
+
67
+ @temporal_activity_registration(KNOWLEDGE_SERVICE_CONFIG_ACTIVITY_BASE)
68
+ class TemporalMinioKnowledgeServiceConfigRepository(
69
+ MinioKnowledgeServiceConfigRepository
70
+ ):
71
+ """Temporal activity wrapper for MinioKnowledgeServiceConfigRepository."""
72
+
73
+ pass
74
+
75
+
76
+ @temporal_activity_registration(KNOWLEDGE_SERVICE_QUERY_ACTIVITY_BASE)
77
+ class TemporalMinioKnowledgeServiceQueryRepository(
78
+ MinioKnowledgeServiceQueryRepository
79
+ ):
80
+ """Temporal activity wrapper for MinioKnowledgeServiceQueryRepository."""
81
+
82
+ pass
83
+
84
+
85
+ @temporal_activity_registration(POLICY_ACTIVITY_BASE)
86
+ class TemporalMinioPolicyRepository(MinioPolicyRepository):
87
+ """Temporal activity wrapper for MinioPolicyRepository."""
88
+
89
+ pass
90
+
91
+
92
+ @temporal_activity_registration(DOCUMENT_POLICY_VALIDATION_ACTIVITY_BASE)
93
+ class TemporalMinioDocumentPolicyValidationRepository(
94
+ MinioDocumentPolicyValidationRepository
95
+ ):
96
+ """Temporal activity wrapper for DocumentPolicyValidationRepository."""
97
+
98
+ pass
99
+
100
+
101
+ # Export the temporal repository classes for use in worker.py
102
+ __all__ = [
103
+ "TemporalMinioAssemblyRepository",
104
+ "TemporalMinioAssemblySpecificationRepository",
105
+ "TemporalMinioDocumentRepository",
106
+ "TemporalMinioKnowledgeServiceConfigRepository",
107
+ "TemporalMinioKnowledgeServiceQueryRepository",
108
+ # Export constants for proxy consistency
109
+ "ASSEMBLY_ACTIVITY_BASE",
110
+ "ASSEMBLY_SPECIFICATION_ACTIVITY_BASE",
111
+ "DOCUMENT_ACTIVITY_BASE",
112
+ "KNOWLEDGE_SERVICE_CONFIG_ACTIVITY_BASE",
113
+ "KNOWLEDGE_SERVICE_QUERY_ACTIVITY_BASE",
114
+ ]
@@ -0,0 +1,34 @@
1
+ """
2
+ Shared activity name constants for the julee domain.
3
+
4
+ This module contains activity name base constants that are shared between
5
+ activities.py and proxies.py, avoiding the need for either module to import
6
+ from the other, which would create problematic transitive dependencies.
7
+
8
+ By isolating these constants in their own module, we maintain DRY principles
9
+ while preserving Temporal's workflow sandbox restrictions. The proxies module
10
+ can import these constants without transitively importing non-deterministic
11
+ backend code from activities.py.
12
+ """
13
+
14
+ # Activity name bases - shared constants for consistency between
15
+ # activity registrations and workflow proxies
16
+ ASSEMBLY_ACTIVITY_BASE = "julee.assembly_repo.minio"
17
+ ASSEMBLY_SPECIFICATION_ACTIVITY_BASE = "julee.assembly_specification_repo.minio"
18
+ DOCUMENT_ACTIVITY_BASE = "julee.document_repo.minio"
19
+ KNOWLEDGE_SERVICE_CONFIG_ACTIVITY_BASE = "julee.knowledge_service_config_repo.minio"
20
+ KNOWLEDGE_SERVICE_QUERY_ACTIVITY_BASE = "julee.knowledge_service_query_repo.minio"
21
+ POLICY_ACTIVITY_BASE = "julee.policy_repo.minio"
22
+ DOCUMENT_POLICY_VALIDATION_ACTIVITY_BASE = "julee.document_policy_validation_repo.minio"
23
+
24
+
25
+ # Export all constants
26
+ __all__ = [
27
+ "ASSEMBLY_ACTIVITY_BASE",
28
+ "ASSEMBLY_SPECIFICATION_ACTIVITY_BASE",
29
+ "DOCUMENT_ACTIVITY_BASE",
30
+ "KNOWLEDGE_SERVICE_CONFIG_ACTIVITY_BASE",
31
+ "KNOWLEDGE_SERVICE_QUERY_ACTIVITY_BASE",
32
+ "POLICY_ACTIVITY_BASE",
33
+ "DOCUMENT_POLICY_VALIDATION_ACTIVITY_BASE",
34
+ ]
@@ -0,0 +1,159 @@
1
+ """
2
+ Workflow-safe proxy classes for the julee domain.
3
+
4
+ This module contains all @temporal_workflow_proxy decorated classes that
5
+ delegate to Temporal activities from within workflows. These classes are
6
+ isolated from backend imports to avoid Temporal's workflow sandbox
7
+ restrictions.
8
+
9
+ The proxy classes automatically generate methods that call
10
+ workflow.execute_activity() with the appropriate activity names, timeouts,
11
+ and retry policies.
12
+ """
13
+
14
+ from julee.util.temporal.decorators import temporal_workflow_proxy
15
+ from julee.domain.repositories.assembly import AssemblyRepository
16
+ from julee.domain.repositories.assembly_specification import (
17
+ AssemblySpecificationRepository,
18
+ )
19
+ from julee.domain.repositories.document import DocumentRepository
20
+ from julee.domain.repositories.knowledge_service_config import (
21
+ KnowledgeServiceConfigRepository,
22
+ )
23
+ from julee.domain.repositories.knowledge_service_query import (
24
+ KnowledgeServiceQueryRepository,
25
+ )
26
+ from julee.domain.repositories.policy import PolicyRepository
27
+ from julee.domain.repositories.document_policy_validation import (
28
+ DocumentPolicyValidationRepository,
29
+ )
30
+
31
+ # Import activity name bases from shared module
32
+ from julee.repositories.temporal.activity_names import (
33
+ ASSEMBLY_ACTIVITY_BASE,
34
+ ASSEMBLY_SPECIFICATION_ACTIVITY_BASE,
35
+ DOCUMENT_ACTIVITY_BASE,
36
+ KNOWLEDGE_SERVICE_CONFIG_ACTIVITY_BASE,
37
+ KNOWLEDGE_SERVICE_QUERY_ACTIVITY_BASE,
38
+ POLICY_ACTIVITY_BASE,
39
+ DOCUMENT_POLICY_VALIDATION_ACTIVITY_BASE,
40
+ )
41
+
42
+
43
+ @temporal_workflow_proxy(
44
+ activity_base=ASSEMBLY_ACTIVITY_BASE,
45
+ default_timeout_seconds=30,
46
+ retry_methods=["save", "generate_id"],
47
+ )
48
+ class WorkflowAssemblyRepositoryProxy(AssemblyRepository):
49
+ """
50
+ Workflow implementation of AssemblyRepository that calls activities.
51
+ All methods are automatically generated by the @temporal_workflow_proxy
52
+ decorator.
53
+ """
54
+
55
+ pass
56
+
57
+
58
+ @temporal_workflow_proxy(
59
+ activity_base=ASSEMBLY_SPECIFICATION_ACTIVITY_BASE,
60
+ default_timeout_seconds=30,
61
+ retry_methods=["save", "generate_id"],
62
+ )
63
+ class WorkflowAssemblySpecificationRepositoryProxy(AssemblySpecificationRepository):
64
+ """
65
+ Workflow implementation of AssemblySpecificationRepository that calls
66
+ activities.
67
+ All methods are automatically generated by the @temporal_workflow_proxy
68
+ decorator.
69
+ """
70
+
71
+ pass
72
+
73
+
74
+ @temporal_workflow_proxy(
75
+ activity_base=DOCUMENT_ACTIVITY_BASE,
76
+ default_timeout_seconds=30,
77
+ retry_methods=["save", "generate_id"],
78
+ )
79
+ class WorkflowDocumentRepositoryProxy(DocumentRepository):
80
+ """
81
+ Workflow implementation of DocumentRepository that calls activities.
82
+ All methods are automatically generated by the @temporal_workflow_proxy
83
+ decorator.
84
+ """
85
+
86
+ pass
87
+
88
+
89
+ @temporal_workflow_proxy(
90
+ activity_base=KNOWLEDGE_SERVICE_CONFIG_ACTIVITY_BASE,
91
+ default_timeout_seconds=30,
92
+ retry_methods=["save", "generate_id"],
93
+ )
94
+ class WorkflowKnowledgeServiceConfigRepositoryProxy(KnowledgeServiceConfigRepository):
95
+ """
96
+ Workflow implementation of KnowledgeServiceConfigRepository that calls
97
+ activities.
98
+ All methods are automatically generated by the @temporal_workflow_proxy
99
+ decorator.
100
+ """
101
+
102
+ pass
103
+
104
+
105
+ @temporal_workflow_proxy(
106
+ activity_base=KNOWLEDGE_SERVICE_QUERY_ACTIVITY_BASE,
107
+ default_timeout_seconds=30,
108
+ retry_methods=["save", "generate_id"],
109
+ )
110
+ class WorkflowKnowledgeServiceQueryRepositoryProxy(KnowledgeServiceQueryRepository):
111
+ """
112
+ Workflow implementation of KnowledgeServiceQueryRepository that calls
113
+ activities. All methods are automatically generated by the
114
+ @temporal_workflow_proxy decorator.
115
+ """
116
+
117
+ pass
118
+
119
+
120
+ @temporal_workflow_proxy(
121
+ activity_base=POLICY_ACTIVITY_BASE,
122
+ default_timeout_seconds=30,
123
+ retry_methods=["save", "generate_id"],
124
+ )
125
+ class WorkflowPolicyRepositoryProxy(PolicyRepository):
126
+ """
127
+ Workflow implementation of PolicyRepository that calls activities.
128
+ All methods are automatically generated by the @temporal_workflow_proxy
129
+ decorator.
130
+ """
131
+
132
+ pass
133
+
134
+
135
+ @temporal_workflow_proxy(
136
+ activity_base=DOCUMENT_POLICY_VALIDATION_ACTIVITY_BASE,
137
+ default_timeout_seconds=30,
138
+ retry_methods=["save", "generate_id"],
139
+ )
140
+ class WorkflowDocumentPolicyValidationRepositoryProxy(
141
+ DocumentPolicyValidationRepository
142
+ ):
143
+ """
144
+ Workflow implementation of DocumentPolicyValidationRepository that calls
145
+ activities. All methods are automatically generated by the
146
+ @temporal_workflow_proxy decorator.
147
+ """
148
+
149
+ pass
150
+
151
+
152
+ # Export the workflow proxy classes
153
+ __all__ = [
154
+ "WorkflowAssemblyRepositoryProxy",
155
+ "WorkflowAssemblySpecificationRepositoryProxy",
156
+ "WorkflowDocumentRepositoryProxy",
157
+ "WorkflowKnowledgeServiceConfigRepositoryProxy",
158
+ "WorkflowKnowledgeServiceQueryRepositoryProxy",
159
+ ]
@@ -0,0 +1,18 @@
1
+ """
2
+ Services for julee domain.
3
+
4
+ This module provides service classes and factory functions for interacting
5
+ with external services in the Capture, Extract, Assemble, Publish workflow.
6
+
7
+ The services layer handles external integrations while the repository layer
8
+ handles local metadata persistence. Services are organized by service type
9
+ into submodules, each with their own protocols and implementations.
10
+ """
11
+
12
+ # Re-export knowledge service components
13
+ from .knowledge_service import KnowledgeService
14
+
15
+ __all__ = [
16
+ # Knowledge Service
17
+ "KnowledgeService",
18
+ ]
@@ -0,0 +1,48 @@
1
+ """
2
+ Knowledge Service module for julee domain.
3
+
4
+ This module provides the KnowledgeService protocol and factory function for
5
+ creating configured knowledge service instances. The factory routes to the
6
+ appropriate implementation based on the service_api configuration.
7
+ """
8
+
9
+ import logging
10
+
11
+ from .knowledge_service import (
12
+ KnowledgeService,
13
+ QueryResult,
14
+ FileRegistrationResult,
15
+ )
16
+
17
+
18
+ logger = logging.getLogger(__name__)
19
+
20
+
21
+ def ensure_knowledge_service(service: object) -> KnowledgeService:
22
+ """Ensure an object satisfies the KnowledgeService protocol.
23
+
24
+ Args:
25
+ service: The service implementation to validate
26
+
27
+ Returns:
28
+ The validated service (type checker knows it satisfies
29
+ KnowledgeService)
30
+
31
+ Raises:
32
+ TypeError: If the service doesn't satisfy the protocol
33
+ """
34
+ if not isinstance(service, KnowledgeService):
35
+ raise TypeError(
36
+ f"Service {type(service).__name__} does not satisfy "
37
+ f"KnowledgeService protocol"
38
+ )
39
+
40
+ return service
41
+
42
+
43
+ __all__ = [
44
+ "KnowledgeService",
45
+ "ensure_knowledge_service",
46
+ "QueryResult",
47
+ "FileRegistrationResult",
48
+ ]
@@ -0,0 +1,12 @@
1
+ """
2
+ Anthropic service implementations for julee domain.
3
+
4
+ This module exports Anthropic-specific implementations of service protocols
5
+ for the Capture, Extract, Assemble, Publish workflow.
6
+ """
7
+
8
+ from .knowledge_service import AnthropicKnowledgeService
9
+
10
+ __all__ = [
11
+ "AnthropicKnowledgeService",
12
+ ]