canon-gate 0.5.2__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.
- canon_gate-0.5.2/LICENSE +177 -0
- canon_gate-0.5.2/MANIFEST.in +7 -0
- canon_gate-0.5.2/NOTICE +3 -0
- canon_gate-0.5.2/PKG-INFO +345 -0
- canon_gate-0.5.2/README.md +135 -0
- canon_gate-0.5.2/adapter_policy.toml +39 -0
- canon_gate-0.5.2/canon_gate/__init__.py +1 -0
- canon_gate-0.5.2/canon_gate/boundary/__init__.py +1 -0
- canon_gate-0.5.2/canon_gate/boundary/adapters/__init__.py +13 -0
- canon_gate-0.5.2/canon_gate/boundary/adapters/mock_adapter.py +76 -0
- canon_gate-0.5.2/canon_gate/boundary/adapters/script_adapter.py +103 -0
- canon_gate-0.5.2/canon_gate/boundary/audit.py +39 -0
- canon_gate-0.5.2/canon_gate/boundary/decorator.py +50 -0
- canon_gate-0.5.2/canon_gate/boundary/main.py +162 -0
- canon_gate-0.5.2/canon_gate/cli.py +85 -0
- canon_gate-0.5.2/canon_gate/core/__init__.py +1 -0
- canon_gate-0.5.2/canon_gate/core/adapters.py +39 -0
- canon_gate-0.5.2/canon_gate/core/config.py +89 -0
- canon_gate-0.5.2/canon_gate/core/manifest_generator.py +66 -0
- canon_gate-0.5.2/canon_gate/core/models.py +133 -0
- canon_gate-0.5.2/canon_gate/core/orchestration.py +104 -0
- canon_gate-0.5.2/canon_gate/core/policy.py +60 -0
- canon_gate-0.5.2/canon_gate/demo.py +122 -0
- canon_gate-0.5.2/canon_gate/resources/__init__.py +1 -0
- canon_gate-0.5.2/canon_gate/resources/adapter_policy.example.toml +39 -0
- canon_gate-0.5.2/canon_gate/resources/policy.example.toml +23 -0
- canon_gate-0.5.2/canon_gate.egg-info/PKG-INFO +345 -0
- canon_gate-0.5.2/canon_gate.egg-info/SOURCES.txt +52 -0
- canon_gate-0.5.2/canon_gate.egg-info/dependency_links.txt +1 -0
- canon_gate-0.5.2/canon_gate.egg-info/entry_points.txt +2 -0
- canon_gate-0.5.2/canon_gate.egg-info/requires.txt +12 -0
- canon_gate-0.5.2/canon_gate.egg-info/top_level.txt +4 -0
- canon_gate-0.5.2/operator_console/__init__.py +0 -0
- canon_gate-0.5.2/operator_console/main.py +95 -0
- canon_gate-0.5.2/operator_console/models.py +49 -0
- canon_gate-0.5.2/operator_console/static/console.html +218 -0
- canon_gate-0.5.2/policy.toml +23 -0
- canon_gate-0.5.2/pyproject.toml +60 -0
- canon_gate-0.5.2/runtime_host/__init__.py +0 -0
- canon_gate-0.5.2/runtime_host/main.py +289 -0
- canon_gate-0.5.2/scripts/delete_demonstration_artifact.py +20 -0
- canon_gate-0.5.2/scripts/fail.py +3 -0
- canon_gate-0.5.2/scripts/health_check.py +3 -0
- canon_gate-0.5.2/scripts/write_demonstration_artifact.py +23 -0
- canon_gate-0.5.2/setup.cfg +4 -0
- canon_gate-0.5.2/tests/test_cli.py +71 -0
- canon_gate-0.5.2/tests/test_decorator.py +43 -0
- canon_gate-0.5.2/tests/test_main.py +100 -0
- canon_gate-0.5.2/tests/test_manifest.py +69 -0
- canon_gate-0.5.2/tests/test_operator_console.py +119 -0
- canon_gate-0.5.2/tests/test_runtime_host.py +163 -0
- canon_gate-0.5.2/tests/test_script_adapter.py +150 -0
- canon_gate-0.5.2/tests/test_scripts.py +83 -0
- canon_gate-0.5.2/tests/test_validation.py +75 -0
canon_gate-0.5.2/LICENSE
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Copyright 2026 Aurelius Canon LLC
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the Work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law or agreed to in writing, shall
|
|
158
|
+
any Contributor be liable to You for damages, including any direct,
|
|
159
|
+
indirect, special, incidental, or consequential damages of any
|
|
160
|
+
character arising as a result of this License or out of the use or
|
|
161
|
+
inability to use the Work (including but not limited to damages for
|
|
162
|
+
loss of goodwill, work stoppage, computer failure or malfunction,
|
|
163
|
+
or any and all other commercial damages or losses), even if such
|
|
164
|
+
Contributor 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
|
canon_gate-0.5.2/NOTICE
ADDED
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: canon-gate
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: Reference implementation of a policy-enforced execution layer for AI and automation runtimes.
|
|
5
|
+
Author-email: Christopher Mariani <contact@aureliuscanon.com>
|
|
6
|
+
License: Copyright 2026 Aurelius Canon LLC
|
|
7
|
+
|
|
8
|
+
Apache License
|
|
9
|
+
Version 2.0, January 2004
|
|
10
|
+
http://www.apache.org/licenses/
|
|
11
|
+
|
|
12
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
13
|
+
|
|
14
|
+
1. Definitions.
|
|
15
|
+
|
|
16
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
17
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
18
|
+
|
|
19
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
20
|
+
the copyright owner that is granting the License.
|
|
21
|
+
|
|
22
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
23
|
+
other entities that control, are controlled by, or are under common
|
|
24
|
+
control with that entity. For the purposes of this definition,
|
|
25
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
26
|
+
direction or management of such entity, whether by contract or
|
|
27
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
28
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
29
|
+
|
|
30
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
31
|
+
exercising permissions granted by this License.
|
|
32
|
+
|
|
33
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
34
|
+
including but not limited to software source code, documentation
|
|
35
|
+
source, and configuration files.
|
|
36
|
+
|
|
37
|
+
"Object" form shall mean any form resulting from mechanical
|
|
38
|
+
transformation or translation of a Source form, including but
|
|
39
|
+
not limited to compiled object code, generated documentation,
|
|
40
|
+
and conversions to other media types.
|
|
41
|
+
|
|
42
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
43
|
+
Object form, made available under the License, as indicated by a
|
|
44
|
+
copyright notice that is included in or attached to the Work
|
|
45
|
+
(an example is provided in the Appendix below).
|
|
46
|
+
|
|
47
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
48
|
+
form, that is based on (or derived from) the Work and for which the
|
|
49
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
50
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
51
|
+
of this License, Derivative Works shall not include works that remain
|
|
52
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
53
|
+
the Work and Derivative Works thereof.
|
|
54
|
+
|
|
55
|
+
"Contribution" shall mean any work of authorship, including
|
|
56
|
+
the original version of the Work and any modifications or additions
|
|
57
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
58
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
59
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
60
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
61
|
+
means any form of electronic, verbal, or written communication sent
|
|
62
|
+
to the Licensor or its representatives, including but not limited to
|
|
63
|
+
communication on electronic mailing lists, source code control systems,
|
|
64
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
65
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
66
|
+
excluding communication that is conspicuously marked or otherwise
|
|
67
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
68
|
+
|
|
69
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
70
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
71
|
+
subsequently incorporated within the Work.
|
|
72
|
+
|
|
73
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
77
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
78
|
+
Work and such Derivative Works in Source or Object form.
|
|
79
|
+
|
|
80
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
81
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
82
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
83
|
+
(except as stated in this section) patent license to make, have made,
|
|
84
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
85
|
+
where such license applies only to those patent claims licensable
|
|
86
|
+
by such Contributor that are necessarily infringed by their
|
|
87
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
88
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
89
|
+
institute patent litigation against any entity (including a
|
|
90
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
91
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
92
|
+
or contributory patent infringement, then any patent licenses
|
|
93
|
+
granted to You under this License for that Work shall terminate
|
|
94
|
+
as of the date such litigation is filed.
|
|
95
|
+
|
|
96
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
97
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
98
|
+
modifications, and in Source or Object form, provided that You
|
|
99
|
+
meet the following conditions:
|
|
100
|
+
|
|
101
|
+
(a) You must give any other recipients of the Work or
|
|
102
|
+
Derivative Works a copy of this License; and
|
|
103
|
+
|
|
104
|
+
(b) You must cause any modified files to carry prominent notices
|
|
105
|
+
stating that You changed the files; and
|
|
106
|
+
|
|
107
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
108
|
+
that You distribute, all copyright, patent, trademark, and
|
|
109
|
+
attribution notices from the Source form of the Work,
|
|
110
|
+
excluding those notices that do not pertain to any part of
|
|
111
|
+
the Derivative Works; and
|
|
112
|
+
|
|
113
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
114
|
+
distribution, then any Derivative Works that You distribute must
|
|
115
|
+
include a readable copy of the attribution notices contained
|
|
116
|
+
within such NOTICE file, excluding those notices that do not
|
|
117
|
+
pertain to any part of the Derivative Works, in at least one
|
|
118
|
+
of the following places: within a NOTICE text file distributed
|
|
119
|
+
as part of the Derivative Works; within the Source form or
|
|
120
|
+
documentation, if provided along with the Derivative Works; or,
|
|
121
|
+
within a display generated by the Derivative Works, if and
|
|
122
|
+
wherever such third-party notices normally appear. The contents
|
|
123
|
+
of the NOTICE file are for informational purposes only and
|
|
124
|
+
do not modify the License. You may add Your own attribution
|
|
125
|
+
notices within Derivative Works that You distribute, alongside
|
|
126
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
127
|
+
that such additional attribution notices cannot be construed
|
|
128
|
+
as modifying the License.
|
|
129
|
+
|
|
130
|
+
You may add Your own copyright statement to Your modifications and
|
|
131
|
+
may provide additional or different license terms and conditions
|
|
132
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
133
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
134
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
135
|
+
the conditions stated in this License.
|
|
136
|
+
|
|
137
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
138
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
139
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
140
|
+
this License, without any additional terms or conditions.
|
|
141
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
142
|
+
the terms of any separate license agreement you may have executed
|
|
143
|
+
with Licensor regarding such Contributions.
|
|
144
|
+
|
|
145
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
146
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
147
|
+
except as required for reasonable and customary use in describing the
|
|
148
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
149
|
+
|
|
150
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
151
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
152
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
153
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
154
|
+
implied, including, without limitation, any warranties or conditions
|
|
155
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
156
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
157
|
+
appropriateness of using or redistributing the Work and assume any
|
|
158
|
+
risks associated with Your exercise of permissions under this License.
|
|
159
|
+
|
|
160
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
161
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
162
|
+
unless required by applicable law or agreed to in writing, shall
|
|
163
|
+
any Contributor be liable to You for damages, including any direct,
|
|
164
|
+
indirect, special, incidental, or consequential damages of any
|
|
165
|
+
character arising as a result of this License or out of the use or
|
|
166
|
+
inability to use the Work (including but not limited to damages for
|
|
167
|
+
loss of goodwill, work stoppage, computer failure or malfunction,
|
|
168
|
+
or any and all other commercial damages or losses), even if such
|
|
169
|
+
Contributor has been advised of the possibility of such damages.
|
|
170
|
+
|
|
171
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
172
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
173
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
174
|
+
or other liability obligations and/or rights consistent with this
|
|
175
|
+
License. However, in accepting such obligations, You may act only
|
|
176
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
177
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
178
|
+
defend, and hold each Contributor harmless for any liability
|
|
179
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
180
|
+
of your accepting any such warranty or additional liability.
|
|
181
|
+
|
|
182
|
+
END OF TERMS AND CONDITIONS
|
|
183
|
+
|
|
184
|
+
Project-URL: Homepage, https://github.com/aureliuscanon/canon-gate
|
|
185
|
+
Project-URL: Repository, https://github.com/aureliuscanon/canon-gate
|
|
186
|
+
Project-URL: Bug Tracker, https://github.com/aureliuscanon/canon-gate/issues
|
|
187
|
+
Keywords: api,fastapi,governance,llm,agent,policy
|
|
188
|
+
Classifier: Development Status :: 4 - Beta
|
|
189
|
+
Classifier: Intended Audience :: Developers
|
|
190
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
191
|
+
Classifier: Programming Language :: Python :: 3
|
|
192
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
193
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
194
|
+
Requires-Python: >=3.11
|
|
195
|
+
Description-Content-Type: text/markdown
|
|
196
|
+
License-File: LICENSE
|
|
197
|
+
License-File: NOTICE
|
|
198
|
+
Requires-Dist: fastapi
|
|
199
|
+
Requires-Dist: starlette
|
|
200
|
+
Requires-Dist: uvicorn[standard]
|
|
201
|
+
Requires-Dist: pydantic
|
|
202
|
+
Requires-Dist: toml
|
|
203
|
+
Requires-Dist: requests
|
|
204
|
+
Requires-Dist: typer
|
|
205
|
+
Provides-Extra: dev
|
|
206
|
+
Requires-Dist: pytest; extra == "dev"
|
|
207
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
208
|
+
Requires-Dist: httpx; extra == "dev"
|
|
209
|
+
Dynamic: license-file
|
|
210
|
+
|
|
211
|
+
# Canon Gate
|
|
212
|
+
|
|
213
|
+
Canon Gate is a reference implementation of a policy-enforced execution layer designed to sit between systems that generate structured actions (including agents, automation workflows, and other upstream runtimes) and the systems that execute them. It provides a deterministic governance layer to ensure that all actions are validated against a clear policy before they are performed.
|
|
214
|
+
|
|
215
|
+
## Why does it exist?
|
|
216
|
+
|
|
217
|
+
As AI-driven and autonomous systems become more capable, the need for a "strong middle" layer to govern their actions becomes critical. Canon Gate provides this layer, ensuring that even as agentic systems become more complex, their actions remain constrained by human-defined policy. It separates the *probabilistic* world of AI reasoning from the *deterministic* world of execution.
|
|
218
|
+
|
|
219
|
+
## How do I experience it? (The Golden Path)
|
|
220
|
+
|
|
221
|
+
The recommended first experience of Canon Gate is to run the flagship demonstration, which shows how an external **Runtime Host** uses the **Runtime Protocol** to have its actions governed by Canon Gate. You will observe this entire process live in the **Operator Console**.
|
|
222
|
+
|
|
223
|
+
This journey has two parts: an **"Allowed"** scenario and a **"Denied"** scenario.
|
|
224
|
+
|
|
225
|
+
### Reference Demonstration
|
|
226
|
+
|
|
227
|
+
To keep Canon Gate itself incredibly lightweight and unopinionated, the demonstration separates the core governance service from the reasoning engine:
|
|
228
|
+
|
|
229
|
+
* **Reasoning Engine:** Gemini CLI
|
|
230
|
+
* **Purpose:** Demonstrates one possible Runtime Host implementation.
|
|
231
|
+
* **Replaceable?** Yes. Canon Gate never communicates directly with a reasoning engine. It governs the structured `ActionProposal` produced upstream. Any system capable of producing a valid `ActionProposal` may replace the reasoning engine.
|
|
232
|
+
|
|
233
|
+
#### Component Requirements Matrix
|
|
234
|
+
|
|
235
|
+
| Component | Canon Gate | Reference Demo |
|
|
236
|
+
| ------------------ | :----------: | :------------: |
|
|
237
|
+
| Canon Gate Service | ✅ | ✅ |
|
|
238
|
+
| Operator Console | Optional | ✅ |
|
|
239
|
+
| Runtime Host | Optional | ✅ |
|
|
240
|
+
| Gemini CLI | Not Required | ✅ |
|
|
241
|
+
| Node.js | Not Required | ✅ |
|
|
242
|
+
|
|
243
|
+
Note: Gemini CLI and Node.js are only required for the reference Runtime Host demonstration. Canon Gate itself is reasoning-engine agnostic and can be integrated with any system capable of producing a valid `ActionProposal`.
|
|
244
|
+
|
|
245
|
+
The Canon Gate CLI is a convenience interface for running the reference implementation. It is not required for integrating Canon Gate into your own applications. Most production integrations typically communicate directly with the Canon Gate HTTP API using the Runtime Protocol.
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### Step 1 — Install Dependencies
|
|
250
|
+
|
|
251
|
+
Install Canon Gate into your Python environment.
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
pip install canon-gate
|
|
255
|
+
```
|
|
256
|
+
*(The reference demonstration also requires the Gemini CLI. If you do not have it, run `npm install -g @google/gemini-cli`)*.
|
|
257
|
+
|
|
258
|
+
### Step 2 — Initialize Project Configuration
|
|
259
|
+
|
|
260
|
+
Navigate to (or create) the directory that will contain your Canon Gate project configuration.
|
|
261
|
+
|
|
262
|
+
Initialize the project with example policy templates:
|
|
263
|
+
```bash
|
|
264
|
+
canon-gate init
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
This creates the local project configuration (`policy.toml` and `adapter_policy.toml`) that Canon Gate will use for policy evaluation.
|
|
268
|
+
|
|
269
|
+
> **Important:** Canon Gate loads project configuration (`policy.toml` and `adapter_policy.toml`) from the current working directory. Continue running the CLI commands below from this same directory unless you intentionally create another Canon Gate project.
|
|
270
|
+
|
|
271
|
+
*The generated files (`policy.toml` and `adapter_policy.toml`) are configured for local project governance. The provided templates are intentionally designed to support the reference demonstration out of the box. Always review and customize these policies before deploying in production.*
|
|
272
|
+
|
|
273
|
+
### Step 3 — Run the Demonstration
|
|
274
|
+
|
|
275
|
+
The reference demonstration uses **two terminal windows**.
|
|
276
|
+
|
|
277
|
+
#### Terminal 1 — Canon Gate Service
|
|
278
|
+
|
|
279
|
+
From the same project directory above, start the Canon Gate server:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
canon-gate serve
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Leave this terminal running.
|
|
286
|
+
|
|
287
|
+
The Operator Console will automatically open in your browser.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
#### Terminal 2 — Runtime Host
|
|
292
|
+
|
|
293
|
+
Open a second terminal.
|
|
294
|
+
|
|
295
|
+
Navigate to the **same project directory**.
|
|
296
|
+
|
|
297
|
+
If using a virtual environment, activate the same environment used to start the Canon Gate service.
|
|
298
|
+
|
|
299
|
+
For example (Windows):
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
.\test_env\Scripts\Activate.ps1
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Then run:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
canon-gate demo
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
The Runtime Host will execute two scenarios against the running Canon Gate service:
|
|
312
|
+
|
|
313
|
+
1. Allowed Runtime
|
|
314
|
+
2. Denied Runtime
|
|
315
|
+
|
|
316
|
+
After completion, inspect both Runtime Sessions in the Operator Console.
|
|
317
|
+
|
|
318
|
+
You will see the full, two-scenario demonstration run in your terminal. When it's complete, the Operator Console (which was automatically opened) will contain the detailed `RuntimeSession` logs for both the "Allowed" and "Denied" scenarios, ready for your inspection.
|
|
319
|
+
|
|
320
|
+
This is the core value of Canon Gate: deterministic governance of agentic behavior.
|
|
321
|
+
|
|
322
|
+
## Where do I learn more?
|
|
323
|
+
|
|
324
|
+
Now that you have seen Canon Gate in action, explore the documentation to understand its architecture, configure and extend its capabilities, or begin contributing to the project.
|
|
325
|
+
|
|
326
|
+
### 🧠 Learn the Architecture
|
|
327
|
+
These documents establish the core vocabulary, protocol interactions, runtime contracts, and design principles of the framework:
|
|
328
|
+
- **[Core Concepts](./docs/CoreConcepts.md)**: The canonical glossary defining the system's core terminology.
|
|
329
|
+
- **[Runtime Protocol](./docs/RuntimeProtocol.md)**: The sequential interaction flow between the Runtime Host and Canon Gate.
|
|
330
|
+
- **[Manifest](./docs/Manifest.md)**: How Canon Gate exposes its policy surface for dynamic `Runtime Discovery`.
|
|
331
|
+
- **[Architecture](./docs/Architecture.md)**: A deeper dive into the "Strong Middle" and `Two-Phase Validation` design.
|
|
332
|
+
|
|
333
|
+
### 🔌 Build with Canon Gate
|
|
334
|
+
These documents explain how to configure, integrate, extend, observe, and experiment with Canon Gate:
|
|
335
|
+
- **[Configuration](./docs/Configuration.md)**: How to configure Ingress policies (`policy.toml`) and Egress policies (`adapter_policy.toml`).
|
|
336
|
+
- **[Integration Guide](./docs/IntegrationGuide.md)**: The primary patterns for connecting Canon Gate to your own applications.
|
|
337
|
+
- **[Adapters](./docs/Adapters.md)**: The guide for writing custom, schema-driven execution adapters.
|
|
338
|
+
- **[Examples](./docs/Examples.md)**: A guide to the primary ways to experience, evaluate, and test the HTTP API.
|
|
339
|
+
- **[Operator Console](./docs/OperatorConsole.md)**: The reference workspace for observing protocol execution.
|
|
340
|
+
|
|
341
|
+
### 🤝 Contribute
|
|
342
|
+
These documents explain how contributors should validate changes and participate in active development:
|
|
343
|
+
- **[Testing Guide](./docs/Testing.md)**: How to activate the virtual environment and validate changes using `pytest`.
|
|
344
|
+
- **[Contributing](./docs/Contributing.md)**: The contribution philosophy, development workflows, and internal state guidelines.
|
|
345
|
+
|