governed-objects 0.2.1__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 (93) hide show
  1. governed_objects-0.2.1/.gitignore +4 -0
  2. governed_objects-0.2.1/CONTRIBUTING.md +18 -0
  3. governed_objects-0.2.1/GOVERNANCE.md +84 -0
  4. governed_objects-0.2.1/LICENSE +202 -0
  5. governed_objects-0.2.1/LICENSING.md +31 -0
  6. governed_objects-0.2.1/NOTICE +12 -0
  7. governed_objects-0.2.1/PKG-INFO +184 -0
  8. governed_objects-0.2.1/PRINCIPLES.md +143 -0
  9. governed_objects-0.2.1/README.md +160 -0
  10. governed_objects-0.2.1/pyproject.toml +51 -0
  11. governed_objects-0.2.1/src/governed_objects/__init__.py +7 -0
  12. governed_objects-0.2.1/src/governed_objects/_version.py +38 -0
  13. governed_objects-0.2.1/src/governed_objects/adapters/base.py +80 -0
  14. governed_objects-0.2.1/src/governed_objects/adapters/context.py +58 -0
  15. governed_objects-0.2.1/src/governed_objects/adapters/mandate.py +45 -0
  16. governed_objects-0.2.1/src/governed_objects/adapters/registry.py +25 -0
  17. governed_objects-0.2.1/src/governed_objects/agent/session.py +111 -0
  18. governed_objects-0.2.1/src/governed_objects/applications/registry.py +39 -0
  19. governed_objects-0.2.1/src/governed_objects/authority/rules.py +63 -0
  20. governed_objects-0.2.1/src/governed_objects/delegation/configuration.py +74 -0
  21. governed_objects-0.2.1/src/governed_objects/delegation/mandate.py +44 -0
  22. governed_objects-0.2.1/src/governed_objects/delegation/materializer.py +152 -0
  23. governed_objects-0.2.1/src/governed_objects/delegation/projection.py +48 -0
  24. governed_objects-0.2.1/src/governed_objects/delegation/resolver.py +180 -0
  25. governed_objects-0.2.1/src/governed_objects/delegation/scope.py +75 -0
  26. governed_objects-0.2.1/src/governed_objects/delegation/service.py +245 -0
  27. governed_objects-0.2.1/src/governed_objects/delegation/validator.py +159 -0
  28. governed_objects-0.2.1/src/governed_objects/domain/__init__.py +21 -0
  29. governed_objects-0.2.1/src/governed_objects/domain/actor_manifest.py +40 -0
  30. governed_objects-0.2.1/src/governed_objects/domain/actors.py +55 -0
  31. governed_objects-0.2.1/src/governed_objects/domain/clock.py +28 -0
  32. governed_objects-0.2.1/src/governed_objects/domain/command.py +95 -0
  33. governed_objects-0.2.1/src/governed_objects/domain/command_context.py +35 -0
  34. governed_objects-0.2.1/src/governed_objects/domain/models.py +110 -0
  35. governed_objects-0.2.1/src/governed_objects/domain/traversal.py +25 -0
  36. governed_objects-0.2.1/src/governed_objects/events/lineage.py +71 -0
  37. governed_objects-0.2.1/src/governed_objects/events/reducers/__init__.py +2 -0
  38. governed_objects-0.2.1/src/governed_objects/events/reducers/mandate.py +31 -0
  39. governed_objects-0.2.1/src/governed_objects/events/replay.py +208 -0
  40. governed_objects-0.2.1/src/governed_objects/idempotency/store.py +160 -0
  41. governed_objects-0.2.1/src/governed_objects/interchange/__init__.py +49 -0
  42. governed_objects-0.2.1/src/governed_objects/interchange/artifact.py +310 -0
  43. governed_objects-0.2.1/src/governed_objects/interchange/export.py +345 -0
  44. governed_objects-0.2.1/src/governed_objects/interchange/governance.py +26 -0
  45. governed_objects-0.2.1/src/governed_objects/interchange/importer.py +672 -0
  46. governed_objects-0.2.1/src/governed_objects/interchange/prc.py +76 -0
  47. governed_objects-0.2.1/src/governed_objects/interchange/types.py +228 -0
  48. governed_objects-0.2.1/src/governed_objects/llm/__init__.py +16 -0
  49. governed_objects-0.2.1/src/governed_objects/llm/loop.py +130 -0
  50. governed_objects-0.2.1/src/governed_objects/llm/model.py +44 -0
  51. governed_objects-0.2.1/src/governed_objects/llm/tools/registry.py +87 -0
  52. governed_objects-0.2.1/src/governed_objects/llm/tools/results.py +53 -0
  53. governed_objects-0.2.1/src/governed_objects/llm/tools/schemas.py +67 -0
  54. governed_objects-0.2.1/src/governed_objects/llm/tools/surface.py +252 -0
  55. governed_objects-0.2.1/src/governed_objects/llm/trace.py +58 -0
  56. governed_objects-0.2.1/src/governed_objects/materialization/service.py +107 -0
  57. governed_objects-0.2.1/src/governed_objects/observations/__init__.py +3 -0
  58. governed_objects-0.2.1/src/governed_objects/observations/ingestion.py +375 -0
  59. governed_objects-0.2.1/src/governed_objects/observations/mapping.py +48 -0
  60. governed_objects-0.2.1/src/governed_objects/observations/models.py +81 -0
  61. governed_objects-0.2.1/src/governed_objects/observations/store.py +214 -0
  62. governed_objects-0.2.1/src/governed_objects/observations/validation.py +188 -0
  63. governed_objects-0.2.1/src/governed_objects/outbound/__init__.py +3 -0
  64. governed_objects-0.2.1/src/governed_objects/outbound/models.py +94 -0
  65. governed_objects-0.2.1/src/governed_objects/outbound/service.py +502 -0
  66. governed_objects-0.2.1/src/governed_objects/outbound/store.py +147 -0
  67. governed_objects-0.2.1/src/governed_objects/persistence/sqlite.py +635 -0
  68. governed_objects-0.2.1/src/governed_objects/policy/constraints.py +9 -0
  69. governed_objects-0.2.1/src/governed_objects/policy/context.py +28 -0
  70. governed_objects-0.2.1/src/governed_objects/policy/evaluator.py +301 -0
  71. governed_objects-0.2.1/src/governed_objects/policy/outcomes.py +93 -0
  72. governed_objects-0.2.1/src/governed_objects/policy/reasons.py +43 -0
  73. governed_objects-0.2.1/src/governed_objects/providers/base.py +26 -0
  74. governed_objects-0.2.1/src/governed_objects/providers/binding.py +42 -0
  75. governed_objects-0.2.1/src/governed_objects/providers/capabilities.py +27 -0
  76. governed_objects-0.2.1/src/governed_objects/providers/errors.py +48 -0
  77. governed_objects-0.2.1/src/governed_objects/providers/projection.py +25 -0
  78. governed_objects-0.2.1/src/governed_objects/providers/registry.py +59 -0
  79. governed_objects-0.2.1/src/governed_objects/query/service.py +171 -0
  80. governed_objects-0.2.1/src/governed_objects/query/traversal.py +154 -0
  81. governed_objects-0.2.1/src/governed_objects/reconciliation/service.py +213 -0
  82. governed_objects-0.2.1/src/governed_objects/registration/detach.py +43 -0
  83. governed_objects-0.2.1/src/governed_objects/registration/service.py +113 -0
  84. governed_objects-0.2.1/src/governed_objects/relationships/canonical.py +55 -0
  85. governed_objects-0.2.1/src/governed_objects/relationships/sync.py +63 -0
  86. governed_objects-0.2.1/src/governed_objects/relationships/vocabulary.py +12 -0
  87. governed_objects-0.2.1/src/governed_objects/runtime/runtime.py +1919 -0
  88. governed_objects-0.2.1/src/governed_objects/types/canonicalizers/base.py +15 -0
  89. governed_objects-0.2.1/src/governed_objects/types/extensions.py +48 -0
  90. governed_objects-0.2.1/src/governed_objects/types/lifecycle.py +65 -0
  91. governed_objects-0.2.1/src/governed_objects/types/registry.py +171 -0
  92. governed_objects-0.2.1/src/governed_objects/types/schema.py +90 -0
  93. governed_objects-0.2.1/src/governed_objects/types/validation.py +57 -0
@@ -0,0 +1,4 @@
1
+ __pycache__/
2
+ .pytest_cache/
3
+ .venv/
4
+ results*/
@@ -0,0 +1,18 @@
1
+ # Contributing
2
+
3
+ Thank you for your interest. Bug reports, questions and proposals are
4
+ welcome through GitHub issues, and code contributions are welcome through
5
+ pull requests.
6
+
7
+ Contributions are accepted under the Apache License, Version 2.0
8
+ (Section 5). Each commit must carry a Developer Certificate of Origin
9
+ sign-off (`git commit -s`), certifying that you have the right to submit
10
+ it under that license. The certificate text is at
11
+ https://developercertificate.org/.
12
+
13
+ Proposed changes to the Governed Objects Specification itself go to the
14
+ specification repository; see
15
+ https://github.com/governedobjects/governed-objects-spec/blob/main/GOVERNANCE.md.
16
+
17
+ Please report security issues privately to security@governedobjects.com,
18
+ not in public issues.
@@ -0,0 +1,84 @@
1
+ # Governance
2
+
3
+ ## Current Governance
4
+
5
+ The project is currently **founder-led** while the architecture and initial specification are being developed and validated.
6
+
7
+ There is no formal steering committee, contributor voting process, or certification body at this stage. Decisions about architecture direction, experimental phases, and documentation are made pragmatically to test whether the business sovereignty model can be implemented coherently.
8
+
9
+ This is intentional. Long-term governance has **not** been finalized.
10
+
11
+ ## Decision Making During Experimental Stage
12
+
13
+ During this stage, decisions prioritize:
14
+
15
+ 1. **Fidelity to [PRINCIPLES.md](PRINCIPLES.md)** — especially business sovereignty and replaceability
16
+ 2. **Evidence from working experiments** — phases should demonstrate claims with tests and demos
17
+ 3. **Honest limits** — unobserved vendor changes, projection gaps, and partial provider support must remain visible
18
+ 4. **Separation of semantics from implementation**
19
+
20
+ Experimental phases may be superseded. Implementation details may change. Principles should remain the evaluation baseline.
21
+
22
+ ## Relationship to PRINCIPLES.md
23
+
24
+ [PRINCIPLES.md](PRINCIPLES.md) is the project's architectural constitution during the experimental period.
25
+
26
+ Any future governance model should:
27
+
28
+ - Preserve the Business Sovereignty Principles
29
+ - Protect the portability of the specification
30
+ - Avoid giving any single implementation vendor unilateral control over what constitutes a conforming Governed Object system
31
+ - Enable conformance to be evaluated independently, without requiring permission from, dependence on, or access to a particular commercial provider
32
+
33
+ Governance processes should not be used to entrench one runtime, one hosted service, or one commercial vendor as mandatory for organizations to retain their canonical business state.
34
+
35
+ ## Specification and Implementation Governance
36
+
37
+ Governance of a particular runtime, hosted service, distribution, or commercial implementation may differ from governance of the portable Governed Object specification.
38
+
39
+ A company or maintainer may legitimately control its own implementation, service, roadmap, and operational features. That control should not by itself confer permanent unilateral authority over portable specification semantics or technical conformance requirements.
40
+
41
+ Likewise, the existence of a founding or dominant implementation should not make that implementation a mandatory dependency for organizations to retain or interpret canonical business state.
42
+
43
+ **Future governance should avoid allowing financial scale, implementation market share, or contribution volume alone to confer unilateral control over portable specification semantics.**
44
+
45
+ Large implementers may contribute substantial engineering resources and should be able to participate meaningfully. However, contribution scale alone should not allow one organization to redefine portable semantics in ways that make independent implementations or smaller participants structurally dependent on it.
46
+
47
+ **Future governance changes should be evaluated against the same Business Sovereignty Principles used to evaluate technical architecture.**
48
+
49
+ A governance change that makes the portable specification materially dependent on a particular implementation or provider should therefore be treated as a sovereignty tradeoff and made explicit.
50
+
51
+ ## Future Governance Goals
52
+
53
+ When the project moves beyond experimental validation, governance should aim to:
54
+
55
+ - Keep normative specification semantics independent of any one codebase
56
+ - Enable multiple conforming implementations to compete on quality, operations, and support
57
+ - Provide transparent processes for specification evolution
58
+ - Protect the specification and ecosystem from capture — particularly situations where "conformance" effectively requires dependence on one vendor
59
+
60
+ The specific structure (foundation, steering committee, etc.) remains to be decided. Trademark governance and certification/conformance governance are not decided here; see the specification repository's
61
+ [GOVERNANCE.md](https://github.com/governedobjects/governed-objects-spec/blob/main/GOVERNANCE.md) and
62
+ [TRADEMARKS.md](https://github.com/governedobjects/governed-objects-spec/blob/main/TRADEMARKS.md).
63
+
64
+ ## What Is Not Yet Decided
65
+
66
+ The following are **explicitly deferred**:
67
+
68
+ - Foundation or nonprofit structure
69
+ - Technical steering committee structure and membership rules
70
+ - Formal contributor voting or election processes
71
+ - Long-term specification ownership and stewardship
72
+ - Licensing strategy beyond the terms stated in [LICENSE](LICENSE) and [LICENSING.md](LICENSING.md)
73
+ - Commercial model for any future implementation or service
74
+ - Relationship between reference implementation maintainers and specification editors
75
+
76
+ None of these should be inferred from the existence of this repository or the experimental runtime it contains.
77
+
78
+ ## Contributing
79
+
80
+ Contributions: see [CONTRIBUTING.md](CONTRIBUTING.md).
81
+
82
+ ## License
83
+
84
+ This runtime is licensed under Apache 2.0. See [LICENSE](LICENSE) and [LICENSING.md](LICENSING.md). Governance and principles documentation do not themselves grant or alter any license.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,31 @@
1
+ # Licensing
2
+
3
+ This summary is for convenience. It is not legal advice, and the license
4
+ text controls.
5
+
6
+ ## License
7
+
8
+ This runtime is licensed under the Apache License, Version 2.0. See
9
+ [LICENSE](LICENSE) and [NOTICE](NOTICE). The Governed Objects
10
+ Specification and its conformance suite are also licensed under
11
+ Apache 2.0.
12
+
13
+ The license does not grant trademark rights. See the
14
+ [trademark policy](https://github.com/governedobjects/governed-objects-spec/blob/main/TRADEMARKS.md).
15
+
16
+ ## Our commitments
17
+
18
+ **Open-edition commitment.** Brafford Labs, LLC commits that:
19
+
20
+ 1. When this runtime implements a capability defined by the Governed
21
+ Objects Specification, including its optional profiles, that capability
22
+ is available in the open-source edition.
23
+ 2. Security fixes for supported open-source releases are published in the
24
+ open-source edition.
25
+ 3. Features in the open-source edition are not moved to a paid-only
26
+ edition. Paid offerings add value beyond the specification, such as
27
+ hosting, enterprise administration, integrations and support.
28
+
29
+ ## Contributions
30
+
31
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,12 @@
1
+ Governed Objects Python Runtime
2
+ Copyright 2026 Brafford Labs, LLC
3
+
4
+ Licensed under the Apache License, Version 2.0. See LICENSE.
5
+
6
+ "Governed Objects" and associated names and logos are trademarks of
7
+ Brafford Labs, LLC. No license grants trademark rights; see
8
+ https://github.com/governedobjects/governed-objects-spec/blob/main/TRADEMARKS.md.
9
+
10
+ A separate patent commitment covers implementations of Final versions
11
+ of the Governed Objects Specification; no Final version exists yet. See
12
+ https://github.com/governedobjects/governed-objects-spec/blob/main/PATENTS.md.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.5
2
+ Name: governed-objects
3
+ Version: 0.2.1
4
+ Summary: Governed Objects runtime — a reusable primitive for policy-aware organizational assets
5
+ Project-URL: Source, https://github.com/governedobjects/governed-objects-python
6
+ Project-URL: Issues, https://github.com/governedobjects/governed-objects-python/issues
7
+ Project-URL: Specification, https://github.com/governedobjects/governed-objects-spec
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: pydantic>=2.10.0
19
+ Requires-Dist: pyyaml>=6.0.2
20
+ Provides-Extra: dev
21
+ Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
22
+ Requires-Dist: pytest>=8.3.0; extra == 'dev'
23
+ Description-Content-Type: text/markdown
24
+
25
+ # Governed Objects Python runtime
26
+
27
+ Governed Objects is a policy-aware primitive for organizational assets: every
28
+ object has a declarative type, a canonical state, and an accepted-history
29
+ log, and every create/read/action goes through an explicit capability check
30
+ before it is accepted. This package is the Python reference runtime. See the
31
+ [specification](https://github.com/governedobjects/governed-objects-spec) and
32
+ the [conformance suite](https://github.com/governedobjects/governed-objects-conformance)
33
+ for the normative rules this runtime implements and tests against.
34
+
35
+ ## Status
36
+
37
+ Experimental, version 0.2.1, `0.x`. This is not a production product,
38
+ conformance certification, or interoperability approval. It targets
39
+ specification revision `draft2.2` and self-reports 76/0/2/0 (pass/not
40
+ applicable/not executable/fail) against Core conformance suite 0.1.0 for that revision;
41
+ see the conformance adapter below to reproduce that result yourself. The
42
+ suite's own claim text for that run:
43
+
44
+ > governed-objects-python 0.2.1 passes the Governed Objects Conformance Suite
45
+ > 0.1.0 for v0alpha1 draft2.2 Core (self-attested; not certified). Not
46
+ > executed by suite 0.1.0: D22-CON-001, D22-CS4-003. Conditional capabilities
47
+ > claimed: create_with_relationships, governance_reconfiguration,
48
+ > mutable_objects, relationship_add, relationship_remove, replay, restart,
49
+ > restoration, semantic_portability_view, type_version_exposed,
50
+ > unconditional_mutation.
51
+
52
+ ## Install
53
+
54
+ ```sh
55
+ pip install governed-objects
56
+ ```
57
+
58
+ ### From a source checkout
59
+
60
+ ```sh
61
+ python3 -m venv .venv
62
+ . .venv/bin/activate
63
+ pip install .
64
+ ```
65
+
66
+ Requires Python >=3.11. The distribution name is `governed-objects`; the
67
+ import package is `governed_objects`. The version is defined once, in
68
+ `pyproject.toml`, and exposed as `governed_objects.__version__`.
69
+
70
+ ## Example
71
+
72
+ Defining a type, creating an actor and an object, and performing one accepted
73
+ and one denied operation:
74
+
75
+ ```python
76
+ from pathlib import Path
77
+
78
+ from governed_objects.applications.registry import ApplicationRegistry
79
+ from governed_objects.domain.command import CreateObject
80
+ from governed_objects.domain.models import Actor, ActorType
81
+ from governed_objects.persistence.sqlite import SQLiteStore
82
+ from governed_objects.providers.registry import ProviderRegistry
83
+ from governed_objects.runtime.runtime import GovernedObjectRuntime
84
+ from governed_objects.types.extensions import TypeExtensionRegistry
85
+ from governed_objects.types.registry import TypeRegistry
86
+ from governed_objects.types.schema import FieldSchema, ObjectTypeDefinition
87
+
88
+ types = TypeRegistry()
89
+ types.register(ObjectTypeDefinition(
90
+ kind="example.widget", initial_state="active",
91
+ states={"active": {}},
92
+ fields={"label": FieldSchema(type="string", required=True)},
93
+ actions={"create": {"requires": ["widget.create"]}},
94
+ read_requires=["widget.read"],
95
+ ))
96
+
97
+ store = SQLiteStore(Path(":memory:"))
98
+ runtime = GovernedObjectRuntime.configured(
99
+ store=store, type_registry=types, adapters=[],
100
+ extension_registry=TypeExtensionRegistry(), providers=ProviderRegistry(),
101
+ application_registry=ApplicationRegistry(),
102
+ )
103
+
104
+ writer = Actor(id="writer", type=ActorType.SERVICE, capabilities=["widget.create", "widget.read"])
105
+ result = runtime.execute(CreateObject("w-1", "example.widget", {"label": "first"}), actor=writer)
106
+ print("accepted create:", result.decision, result.object_version)
107
+ # accepted create: ALLOW 1
108
+
109
+ stranger = Actor(id="stranger", type=ActorType.SERVICE)
110
+ result = runtime.execute(CreateObject("w-2", "example.widget", {"label": "second"}), actor=stranger)
111
+ print("denied create:", result.decision, result.deny_reason)
112
+ # denied create: DENY ACTOR_CAPABILITY_MISSING
113
+
114
+ store.close()
115
+ ```
116
+
117
+ A type opens an action or a read to every actor only with an explicit
118
+ `open: true` marker on the action (or `read_open: true` on the type) — an
119
+ action or read with no declared capabilities and no such marker denies every
120
+ actor, as above.
121
+
122
+ ## Running the tests and the conformance adapter
123
+
124
+ ```sh
125
+ pip install '.[dev]'
126
+ pytest
127
+ ```
128
+
129
+ The full test run takes several minutes. `uv.lock` is provided for `uv`
130
+ users (`uv sync --extra dev`); it is optional.
131
+
132
+ The conformance adapter under `conformance-adapter/` speaks the suite's
133
+ adapter protocol on stdin/stdout. The runner is in the
134
+ [`governed-objects-conformance`](https://github.com/governedobjects/governed-objects-conformance)
135
+ repository. Run these commands from the root of that repository, with the
136
+ adapter path pointing into this checkout:
137
+
138
+ ```sh
139
+ python -m runner --adapter-command "path/to/governed-objects-python/conformance-adapter/launch.sh" --output-dir results-python
140
+ python -m runner --verify-bundle results-python
141
+ ```
142
+
143
+ The adapter runs the source in this checkout; the interpreter only needs
144
+ `pydantic` and `pyyaml`. Set `CONFORMANCE_PYTHON` to an interpreter that has
145
+ them if it differs from `python3` on `PATH`. An activated virtual environment
146
+ from the install step above already satisfies this.
147
+
148
+ Tested on Linux. macOS is expected to work but is untested. On Windows, use
149
+ WSL. The adapters are `bash` scripts.
150
+
151
+ ## Known limits
152
+
153
+ - Experimental, `0.x`: no production, conformance-certification or
154
+ interoperability claim.
155
+ - The following public methods change or read canonical state without a
156
+ policy check and are for trusted integration code, not untrusted callers:
157
+ `resolve_review`, `replay`, `detach_provider`, `replace_provider`,
158
+ `apply_repair`, `ingest_observation`, registration, `get_object`,
159
+ `history`, `canonical_relationships`. Capabilities for every policy check
160
+ are taken from the `Actor` object the caller passes in; the runtime does
161
+ not authenticate actors itself.
162
+ - `governed_objects.agent.session` and `governed_objects.llm` are shipped for
163
+ experimental optional use, not a model-provider integration or a default
164
+ service; they accept a caller-supplied `ReasoningModel` and install no
165
+ provider SDK or live model call.
166
+ - `governed_objects.interchange` (artifact export/import, PRC) is a
167
+ provisional, representation-limited, non-normative experiment, not an
168
+ official wire standard.
169
+ - The SQLite store serializes operations on one store instance with a
170
+ per-instance connection guard, and `create`/`add_relationship`/
171
+ `remove_relationship`/transition commands re-check the expected Object
172
+ Version and write state plus history in one transaction (two connections
173
+ to the same file never both commit against the same prior version). This
174
+ does not cover multi-store or distributed-transaction guarantees, and
175
+ provider/adapter I/O runs outside the transaction.
176
+ - Query/traversal/delegation/provider/agent features and the conformance
177
+ adapter are implementation-specific; this is not a cross-runtime wire
178
+ protocol.
179
+
180
+ ## License
181
+
182
+ This runtime is licensed under Apache 2.0; see [LICENSE](https://github.com/governedobjects/governed-objects-python/blob/main/LICENSE), [NOTICE](https://github.com/governedobjects/governed-objects-python/blob/main/NOTICE) and
183
+ [LICENSING.md](https://github.com/governedobjects/governed-objects-python/blob/main/LICENSING.md). Contribution terms are in [CONTRIBUTING.md](https://github.com/governedobjects/governed-objects-python/blob/main/CONTRIBUTING.md).
184
+ Report security issues as described in [SECURITY.md](https://github.com/governedobjects/governed-objects-python/blob/main/SECURITY.md).