oc_chat
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# oc_chat/registry/__init__.py
4
5# OCT-LINT: disable=tests_exist reason="Covered by oc_chat/tests/registry/test_storage_foundation.py"
6"""
7Public exports for the orchestration registry storage foundation.
8
9Purpose
10-------
11Expose the small public surface shipped by M11.1a without importing any
12unrelated command or workflow-engine code.
13
14Responsibilities
15----------------
16- Re-export the clock contract and implementations.
17- Re-export the Registry facade and operation-log/lock return types.
18- Re-export the public domain mutation and reader APIs.
19- Re-export storage backend types and the SQLite implementation.
20- Re-export registry path discovery.
21
22Diagnostics
23-----------
24Domain: OC_CHAT.MAIN
25Levels:
26 L2 - lifecycle events
27 L3 - semantic details
28 L4 - deep tracing
29
30Contracts
31---------
32- This module is import-only and has no filesystem or database side effects.
33- SQL ownership stays in :mod:`oc_chat.registry.backends.sqlite`.
34
35Dependencies
36------------
37- oc_diagnostics (structured debug logging via _dbg)
38- oc_chat.registry.api (re-exported Registry facade)
39- oc_chat.registry.backends.base (re-exported storage backend contract, lock handle and operation-log row types)
40- oc_chat.registry.backends.sqlite (re-exported SQLiteBackend implementation)
41- oc_chat.registry.checkpoint (re-exported checkpoint export, import and write functions and signature error)
42- oc_chat.registry.clock (re-exported Clock contract with real and fake clocks)
43- oc_chat.registry.discovery (re-exported registry path discovery)
44- oc_chat.registry.domain (re-exported plan and queue mutation functions)
45- oc_chat.registry.errors (re-exported registry error types)
46- oc_chat.registry.readers (re-exported status, plan, lifecycle, queue history and whoami readers)
47- oc_chat.registry.render (re-exported render_all for registry-backed filesystem artefacts)
48- oc_chat.registry.roadmap.operations (re-exported roadmap item, phase, section, plan-link and version mutations)
49"""
50from __future__ import annotations
51
52from oc_diagnostics import _dbg
53
54from oc_chat.registry.api import Registry
56 BackendCapabilityError,
57 LockHandle,
58 OperationLogRow,
59 StorageBackend,
60)
61from oc_chat.registry.backends.sqlite import SQLiteBackend
62from oc_chat.registry.clock import Clock, FakeClock, RealClock
64 CheckpointSignatureError,
65 export_checkpoint,
66 import_checkpoint,
67 write_checkpoint,
68)
69from oc_chat.registry.domain import (
70 plan_assign,
71 plan_create,
72 plan_reimport,
73 plan_set_status,
74 plan_supersede,
75 queue_complete,
76 queue_dequeue,
77 queue_enqueue,
78 queue_move,
79)
80from oc_chat.registry.discovery import discover_registry_path
81from oc_chat.registry.errors import (
82 ActorTypeMismatchError,
83 LockHeldError,
84 LockOwnerError,
85 ParentCycleError,
86 PayloadSchemaViolationError,
87 PayloadVersionMismatchError,
88 RegistryError,
89 UnknownActorError,
90)
91from oc_chat.registry.readers import (
92 current_status,
93 plan_lifecycle,
94 queue_history,
95 show_plan,
96 whoami,
97)
99 roadmap_item_add_dependency,
100 roadmap_item_create,
101 roadmap_item_set_status,
102 roadmap_phase_complete,
103 roadmap_plan_link_create,
104 roadmap_section_upsert,
105 roadmap_version_bump,
106)
107from oc_chat.registry.render import render_all
108
109_dbg("OC_CHAT.MAIN", "module", "loaded", 4)
110
111__all__ = [
112 "BackendCapabilityError",
113 "Clock",
114 "FakeClock",
115 "LockHandle",
116 "OperationLogRow",
117 "Registry",
118 "RegistryError",
119 "RealClock",
120 "SQLiteBackend",
121 "StorageBackend",
122 "ActorTypeMismatchError",
123 "CheckpointSignatureError",
124 "LockHeldError",
125 "LockOwnerError",
126 "ParentCycleError",
127 "PayloadSchemaViolationError",
128 "PayloadVersionMismatchError",
129 "UnknownActorError",
130 "discover_registry_path",
131 "export_checkpoint",
132 "import_checkpoint",
133 "plan_assign",
134 "plan_create",
135 "plan_reimport",
136 "plan_set_status",
137 "plan_supersede",
138 "queue_complete",
139 "queue_dequeue",
140 "queue_enqueue",
141 "queue_move",
142 "current_status",
143 "plan_lifecycle",
144 "queue_history",
145 "roadmap_item_add_dependency",
146 "roadmap_item_create",
147 "roadmap_item_set_status",
148 "roadmap_phase_complete",
149 "roadmap_plan_link_create",
150 "roadmap_section_upsert",
151 "roadmap_version_bump",
152 "show_plan",
153 "whoami",
154 "render_all",
155 "write_checkpoint",
156]