generated from coulomb/repo-seed
575 lines
14 KiB
Python
575 lines
14 KiB
Python
"""Structured markdown primitives for markitect-tool."""
|
|
|
|
from markitect_tool.core import (
|
|
ContentBlock,
|
|
Document,
|
|
Heading,
|
|
MarkdownParseError,
|
|
Section,
|
|
parse_markdown,
|
|
parse_markdown_file,
|
|
)
|
|
from markitect_tool.contract import (
|
|
ContractCheckResult,
|
|
ContractValidationResult,
|
|
DocumentContract,
|
|
check_document_contract,
|
|
check_markdown_file,
|
|
collect_metrics,
|
|
load_contract_file,
|
|
validate_contract,
|
|
validate_contract_file,
|
|
)
|
|
from markitect_tool.document_function import (
|
|
DocumentFunctionCall,
|
|
DocumentFunctionDescriptor,
|
|
DocumentFunctionError,
|
|
DocumentFunctionEvaluationResult,
|
|
DocumentFunctionParameter,
|
|
DocumentFunctionRegistry,
|
|
DocumentFunctionRun,
|
|
default_document_function_registry,
|
|
parse_document_function_calls,
|
|
render_document_functions,
|
|
validate_document_functions,
|
|
)
|
|
from markitect_tool.cache import (
|
|
CacheEntry,
|
|
CacheManifest,
|
|
CacheStatus,
|
|
build_cache,
|
|
cache_path_for,
|
|
detect_changes,
|
|
fingerprint_file,
|
|
load_cache,
|
|
save_cache,
|
|
scan_markdown_files,
|
|
)
|
|
from markitect_tool.backend import (
|
|
BACKEND_CAPABILITIES,
|
|
DEFAULT_BACKEND_PATHS,
|
|
DEFAULT_LOCAL_INDEX_PATH,
|
|
LOCAL_INDEX_SCHEMA_VERSION,
|
|
AccessPolicyGateway,
|
|
BackendCapabilityCheck,
|
|
BackendManifest,
|
|
BackendRegistry,
|
|
BackendRegistryError,
|
|
ContextPackageRegistry,
|
|
DependencyEdge,
|
|
DocumentSnapshot,
|
|
EMPTY_PARSE_OPTIONS_HASH,
|
|
IndexBackend,
|
|
LocalIndexBuildResult,
|
|
LocalSearchResult,
|
|
LocalSnapshotStore,
|
|
ProcessorResultStore,
|
|
ProvenanceEnvelope,
|
|
QueryAdapter,
|
|
SnapshotPlanEntry,
|
|
SnapshotRefreshPlan,
|
|
SnapshotBackend,
|
|
SnapshotIdentity,
|
|
SnapshotState,
|
|
capability_check,
|
|
load_backend_manifest,
|
|
load_backend_registry,
|
|
load_snapshot_state_file,
|
|
local_index_path_for,
|
|
plan_snapshot_refresh,
|
|
snapshot_identity_for_file,
|
|
)
|
|
from markitect_tool.content_class import (
|
|
ClassCompositionResult,
|
|
ContentClass,
|
|
ContentClassRegistry,
|
|
ContentClassResolutionError,
|
|
load_content_class_file,
|
|
load_content_classes,
|
|
)
|
|
from markitect_tool.diagnostics import Diagnostic, SourceLocation
|
|
from markitect_tool.extension import (
|
|
ExtensionDependencyCheck,
|
|
ExtensionDescriptor,
|
|
ExtensionExecutor,
|
|
ExtensionLifecycle,
|
|
ExtensionRegistry,
|
|
ExtensionRegistryError,
|
|
ExtensionRunner,
|
|
OptionalDependency,
|
|
ProcessingCapability,
|
|
ProcessingContext,
|
|
ProcessingDiagnostic,
|
|
ProcessingProvenance,
|
|
ProcessingRequest,
|
|
ProcessingResult,
|
|
ProcessingTrace,
|
|
builtin_extension_registry,
|
|
)
|
|
from markitect_tool.explode import (
|
|
EXPLODE_MANIFEST_NAME,
|
|
ExplodeEntry,
|
|
ExplodeError,
|
|
ExplodeManifest,
|
|
ExplodeResult,
|
|
ImplodeResult,
|
|
explode_markdown_file,
|
|
implode_markdown_directory,
|
|
load_explode_manifest,
|
|
)
|
|
from markitect_tool.generation import (
|
|
GeneratedDocument,
|
|
GenerationHookRequest,
|
|
GenerationHookResult,
|
|
GenerationPlan,
|
|
GenerationResult,
|
|
generate_stub_from_contract,
|
|
generate_with_hook,
|
|
load_generation_plan_file,
|
|
run_generation_plan,
|
|
)
|
|
from markitect_tool.literate import (
|
|
CodeChunk,
|
|
LiterateFile,
|
|
TangleResult,
|
|
WeaveResult,
|
|
discover_code_chunks,
|
|
tangle_markdown,
|
|
weave_markdown,
|
|
write_tangle_files,
|
|
)
|
|
from markitect_tool.memory import (
|
|
ContextActivation,
|
|
ContextBudget,
|
|
ContextPackage,
|
|
ContextPackageError,
|
|
ContextPackageItem,
|
|
LocalContextPackageRegistry,
|
|
MemoryNamespace,
|
|
RetrievalRecipe,
|
|
SourceSpan as MemorySourceSpan,
|
|
SummaryLayer,
|
|
activate_context_package,
|
|
create_context_package_from_index,
|
|
create_context_package_from_manifest,
|
|
create_context_package_from_sources,
|
|
deactivate_context_package,
|
|
explain_context_package,
|
|
load_context_package_file,
|
|
refresh_context_package,
|
|
)
|
|
from markitect_tool.ops import (
|
|
ComposeResult,
|
|
IncludeError,
|
|
IncludeResult,
|
|
OperationProvenance,
|
|
TransformResult,
|
|
compose_files,
|
|
resolve_includes,
|
|
transform_markdown,
|
|
)
|
|
from markitect_tool.processor import (
|
|
FencedProcessorBlock,
|
|
ProcessorContext,
|
|
ProcessorOutputFile,
|
|
ProcessorRegistry,
|
|
ProcessorRequest,
|
|
ProcessorResult,
|
|
ProcessorRun,
|
|
default_processor_registry,
|
|
discover_fenced_processors,
|
|
run_fenced_processors,
|
|
)
|
|
from markitect_tool.policy import (
|
|
DecisionLogStore,
|
|
DirectoryGroupResolution,
|
|
DirectoryGroupResolutionRequest,
|
|
DirectoryGroupResolver,
|
|
EnterpriseIdentity,
|
|
EnterprisePolicyError,
|
|
EnterprisePolicyMap,
|
|
EnterprisePolicyMapRequest,
|
|
EnterprisePolicyMapper,
|
|
FlexAuthResource,
|
|
FlexAuthResourceManifest,
|
|
IdentityClaimsAdapter,
|
|
LocalLabelPolicy,
|
|
LocalLabelPolicyGateway,
|
|
LocalPathPolicyRule,
|
|
LocalDecisionLogStore,
|
|
LocalEnterprisePolicyMapper,
|
|
NetKingdomIdentityClaimsAdapter,
|
|
PolicyDecision,
|
|
PolicyFilterResult,
|
|
PolicyObject,
|
|
PolicySubject,
|
|
RelationshipPolicyAdapter,
|
|
RelationshipPolicyRequest,
|
|
RulePolicyAdapter,
|
|
RulePolicyRequest,
|
|
StaticDirectoryGroupResolver,
|
|
load_enterprise_identity_file,
|
|
load_enterprise_policy_subject,
|
|
policy_metadata_from_document,
|
|
)
|
|
from markitect_tool.query import (
|
|
InvalidQueryError,
|
|
QueryEngine,
|
|
QueryEngineRegistry,
|
|
QueryMatch,
|
|
default_query_engine_registry,
|
|
extract_document,
|
|
extract_document_jsonpath,
|
|
extract_document_with_engine,
|
|
query_document,
|
|
query_document_jsonpath,
|
|
query_document_with_engine,
|
|
)
|
|
from markitect_tool.reference import (
|
|
ContentUnit,
|
|
ReferenceAddress,
|
|
ReferenceContext,
|
|
ReferenceResolution,
|
|
ReferenceResolutionError,
|
|
SourceSpan as ReferenceSourceSpan,
|
|
load_namespaces,
|
|
parse_reference,
|
|
resolve_reference,
|
|
)
|
|
from markitect_tool.runtime import (
|
|
AssessmentRequest,
|
|
AssessmentResult,
|
|
AssessmentRunResult,
|
|
AssessmentRunner,
|
|
FieldState,
|
|
FormState,
|
|
MemoryAssessmentCache,
|
|
RuntimeContext,
|
|
RuntimeContextLoadResult,
|
|
RuntimeContextSource,
|
|
assessment_requests_for_contract,
|
|
evaluate_form_state,
|
|
load_runtime_context_file,
|
|
load_runtime_context_file_result,
|
|
run_contract_assessments,
|
|
)
|
|
from markitect_tool.schema import (
|
|
MarkdownSchema,
|
|
SchemaValidationResult,
|
|
ValidationViolation,
|
|
load_schema_file,
|
|
validate_document,
|
|
validate_markdown_file,
|
|
validate_schema,
|
|
)
|
|
from markitect_tool.source import (
|
|
NORMALIZED_SOURCE_SCHEMA_VERSION,
|
|
SOURCE_ADAPTER_ENTRY_POINT_GROUP,
|
|
NormalizationQuality,
|
|
NormalizedMarkdownDocument,
|
|
NormalizedMarkdownSegment,
|
|
SourceAdapterDescriptor,
|
|
SourceAdapterError,
|
|
SourceAdapterMatch,
|
|
SourceAdapterMatchRequest,
|
|
SourceAdapterRegistry,
|
|
SourceAsset,
|
|
SourceInspectRequest,
|
|
SourceInspectResult,
|
|
SourceMetadata,
|
|
SourceProvenance,
|
|
SourceReadAdapter,
|
|
SourceReadRequest,
|
|
SourceReadResult,
|
|
default_source_adapter_registry,
|
|
discover_source_adapters,
|
|
inspect_source,
|
|
normalization_cache_key,
|
|
normalize_source,
|
|
source_adapter_registry_descriptor,
|
|
)
|
|
from markitect_tool.template import (
|
|
MissingTemplateVariable,
|
|
TemplateAnalysis,
|
|
TemplateError,
|
|
TemplateRenderResult,
|
|
analyze_template,
|
|
render_template,
|
|
)
|
|
from markitect_tool.workflow import (
|
|
WorkflowError,
|
|
WorkflowOutputRecord,
|
|
WorkflowPlan,
|
|
WorkflowRunResult,
|
|
WorkflowRunner,
|
|
load_workflow_file,
|
|
resolve_workflow_bindings,
|
|
)
|
|
|
|
__all__ = [
|
|
"ContentBlock",
|
|
"Document",
|
|
"Heading",
|
|
"MarkdownParseError",
|
|
"Section",
|
|
"parse_markdown",
|
|
"parse_markdown_file",
|
|
"MarkdownSchema",
|
|
"SchemaValidationResult",
|
|
"ValidationViolation",
|
|
"load_schema_file",
|
|
"validate_document",
|
|
"validate_markdown_file",
|
|
"validate_schema",
|
|
"NORMALIZED_SOURCE_SCHEMA_VERSION",
|
|
"SOURCE_ADAPTER_ENTRY_POINT_GROUP",
|
|
"NormalizationQuality",
|
|
"NormalizedMarkdownDocument",
|
|
"NormalizedMarkdownSegment",
|
|
"SourceAdapterDescriptor",
|
|
"SourceAdapterError",
|
|
"SourceAdapterMatch",
|
|
"SourceAdapterMatchRequest",
|
|
"SourceAdapterRegistry",
|
|
"SourceAsset",
|
|
"SourceInspectRequest",
|
|
"SourceInspectResult",
|
|
"SourceMetadata",
|
|
"SourceProvenance",
|
|
"SourceReadAdapter",
|
|
"SourceReadRequest",
|
|
"SourceReadResult",
|
|
"default_source_adapter_registry",
|
|
"discover_source_adapters",
|
|
"inspect_source",
|
|
"normalization_cache_key",
|
|
"normalize_source",
|
|
"source_adapter_registry_descriptor",
|
|
"ContractCheckResult",
|
|
"ContractValidationResult",
|
|
"DocumentContract",
|
|
"check_document_contract",
|
|
"check_markdown_file",
|
|
"collect_metrics",
|
|
"load_contract_file",
|
|
"validate_contract",
|
|
"validate_contract_file",
|
|
"DocumentFunctionCall",
|
|
"DocumentFunctionDescriptor",
|
|
"DocumentFunctionError",
|
|
"DocumentFunctionEvaluationResult",
|
|
"DocumentFunctionParameter",
|
|
"DocumentFunctionRegistry",
|
|
"DocumentFunctionRun",
|
|
"default_document_function_registry",
|
|
"parse_document_function_calls",
|
|
"render_document_functions",
|
|
"validate_document_functions",
|
|
"CacheEntry",
|
|
"CacheManifest",
|
|
"CacheStatus",
|
|
"build_cache",
|
|
"cache_path_for",
|
|
"detect_changes",
|
|
"fingerprint_file",
|
|
"load_cache",
|
|
"save_cache",
|
|
"scan_markdown_files",
|
|
"BACKEND_CAPABILITIES",
|
|
"DEFAULT_BACKEND_PATHS",
|
|
"DEFAULT_LOCAL_INDEX_PATH",
|
|
"LOCAL_INDEX_SCHEMA_VERSION",
|
|
"AccessPolicyGateway",
|
|
"BackendCapabilityCheck",
|
|
"BackendManifest",
|
|
"BackendRegistry",
|
|
"BackendRegistryError",
|
|
"ContextPackageRegistry",
|
|
"DependencyEdge",
|
|
"DocumentSnapshot",
|
|
"EMPTY_PARSE_OPTIONS_HASH",
|
|
"IndexBackend",
|
|
"LocalIndexBuildResult",
|
|
"LocalSearchResult",
|
|
"LocalSnapshotStore",
|
|
"ProcessorResultStore",
|
|
"ProvenanceEnvelope",
|
|
"QueryAdapter",
|
|
"SnapshotPlanEntry",
|
|
"SnapshotRefreshPlan",
|
|
"SnapshotBackend",
|
|
"SnapshotIdentity",
|
|
"SnapshotState",
|
|
"capability_check",
|
|
"load_backend_manifest",
|
|
"load_backend_registry",
|
|
"load_snapshot_state_file",
|
|
"local_index_path_for",
|
|
"plan_snapshot_refresh",
|
|
"snapshot_identity_for_file",
|
|
"ClassCompositionResult",
|
|
"ContentClass",
|
|
"ContentClassRegistry",
|
|
"ContentClassResolutionError",
|
|
"load_content_class_file",
|
|
"load_content_classes",
|
|
"Diagnostic",
|
|
"SourceLocation",
|
|
"ExtensionDependencyCheck",
|
|
"ExtensionDescriptor",
|
|
"ExtensionExecutor",
|
|
"ExtensionLifecycle",
|
|
"ExtensionRegistry",
|
|
"ExtensionRegistryError",
|
|
"ExtensionRunner",
|
|
"OptionalDependency",
|
|
"ProcessingCapability",
|
|
"ProcessingContext",
|
|
"ProcessingDiagnostic",
|
|
"ProcessingProvenance",
|
|
"ProcessingRequest",
|
|
"ProcessingResult",
|
|
"ProcessingTrace",
|
|
"builtin_extension_registry",
|
|
"EXPLODE_MANIFEST_NAME",
|
|
"ExplodeEntry",
|
|
"ExplodeError",
|
|
"ExplodeManifest",
|
|
"ExplodeResult",
|
|
"ImplodeResult",
|
|
"explode_markdown_file",
|
|
"implode_markdown_directory",
|
|
"load_explode_manifest",
|
|
"GeneratedDocument",
|
|
"GenerationHookRequest",
|
|
"GenerationHookResult",
|
|
"GenerationPlan",
|
|
"GenerationResult",
|
|
"generate_stub_from_contract",
|
|
"generate_with_hook",
|
|
"load_generation_plan_file",
|
|
"run_generation_plan",
|
|
"CodeChunk",
|
|
"LiterateFile",
|
|
"TangleResult",
|
|
"WeaveResult",
|
|
"discover_code_chunks",
|
|
"tangle_markdown",
|
|
"weave_markdown",
|
|
"write_tangle_files",
|
|
"ContextActivation",
|
|
"ContextBudget",
|
|
"ContextPackage",
|
|
"ContextPackageError",
|
|
"ContextPackageItem",
|
|
"LocalContextPackageRegistry",
|
|
"MemoryNamespace",
|
|
"RetrievalRecipe",
|
|
"MemorySourceSpan",
|
|
"SummaryLayer",
|
|
"activate_context_package",
|
|
"create_context_package_from_index",
|
|
"create_context_package_from_manifest",
|
|
"create_context_package_from_sources",
|
|
"deactivate_context_package",
|
|
"explain_context_package",
|
|
"load_context_package_file",
|
|
"refresh_context_package",
|
|
"ComposeResult",
|
|
"IncludeError",
|
|
"IncludeResult",
|
|
"OperationProvenance",
|
|
"TransformResult",
|
|
"compose_files",
|
|
"resolve_includes",
|
|
"transform_markdown",
|
|
"FencedProcessorBlock",
|
|
"ProcessorContext",
|
|
"ProcessorOutputFile",
|
|
"ProcessorRegistry",
|
|
"ProcessorRequest",
|
|
"ProcessorResult",
|
|
"ProcessorRun",
|
|
"default_processor_registry",
|
|
"discover_fenced_processors",
|
|
"run_fenced_processors",
|
|
"DecisionLogStore",
|
|
"DirectoryGroupResolution",
|
|
"DirectoryGroupResolutionRequest",
|
|
"DirectoryGroupResolver",
|
|
"EnterpriseIdentity",
|
|
"EnterprisePolicyError",
|
|
"EnterprisePolicyMap",
|
|
"EnterprisePolicyMapRequest",
|
|
"EnterprisePolicyMapper",
|
|
"FlexAuthResource",
|
|
"FlexAuthResourceManifest",
|
|
"IdentityClaimsAdapter",
|
|
"LocalLabelPolicy",
|
|
"LocalLabelPolicyGateway",
|
|
"LocalPathPolicyRule",
|
|
"LocalDecisionLogStore",
|
|
"LocalEnterprisePolicyMapper",
|
|
"NetKingdomIdentityClaimsAdapter",
|
|
"PolicyDecision",
|
|
"PolicyFilterResult",
|
|
"PolicyObject",
|
|
"PolicySubject",
|
|
"RelationshipPolicyAdapter",
|
|
"RelationshipPolicyRequest",
|
|
"RulePolicyAdapter",
|
|
"RulePolicyRequest",
|
|
"StaticDirectoryGroupResolver",
|
|
"load_enterprise_identity_file",
|
|
"load_enterprise_policy_subject",
|
|
"policy_metadata_from_document",
|
|
"InvalidQueryError",
|
|
"QueryEngine",
|
|
"QueryEngineRegistry",
|
|
"QueryMatch",
|
|
"default_query_engine_registry",
|
|
"extract_document",
|
|
"extract_document_jsonpath",
|
|
"extract_document_with_engine",
|
|
"query_document",
|
|
"query_document_jsonpath",
|
|
"query_document_with_engine",
|
|
"ContentUnit",
|
|
"ReferenceAddress",
|
|
"ReferenceContext",
|
|
"ReferenceResolution",
|
|
"ReferenceResolutionError",
|
|
"ReferenceSourceSpan",
|
|
"load_namespaces",
|
|
"parse_reference",
|
|
"resolve_reference",
|
|
"AssessmentRequest",
|
|
"AssessmentResult",
|
|
"AssessmentRunResult",
|
|
"AssessmentRunner",
|
|
"FieldState",
|
|
"FormState",
|
|
"MemoryAssessmentCache",
|
|
"RuntimeContext",
|
|
"RuntimeContextLoadResult",
|
|
"RuntimeContextSource",
|
|
"assessment_requests_for_contract",
|
|
"evaluate_form_state",
|
|
"load_runtime_context_file",
|
|
"load_runtime_context_file_result",
|
|
"run_contract_assessments",
|
|
"MissingTemplateVariable",
|
|
"TemplateAnalysis",
|
|
"TemplateError",
|
|
"TemplateRenderResult",
|
|
"analyze_template",
|
|
"render_template",
|
|
"WorkflowError",
|
|
"WorkflowOutputRecord",
|
|
"WorkflowPlan",
|
|
"WorkflowRunResult",
|
|
"WorkflowRunner",
|
|
"load_workflow_file",
|
|
"resolve_workflow_bindings",
|
|
]
|