wiseorder 0.1.0__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.
- wiseorder-0.1.0/LICENSE +202 -0
- wiseorder-0.1.0/PKG-INFO +292 -0
- wiseorder-0.1.0/README.md +264 -0
- wiseorder-0.1.0/intellagent_runtime/__init__.py +7 -0
- wiseorder-0.1.0/intellagent_runtime/audit_memory.py +382 -0
- wiseorder-0.1.0/intellagent_runtime/authorization.py +213 -0
- wiseorder-0.1.0/intellagent_runtime/canonical.py +141 -0
- wiseorder-0.1.0/intellagent_runtime/chain.py +376 -0
- wiseorder-0.1.0/intellagent_runtime/cli.py +880 -0
- wiseorder-0.1.0/intellagent_runtime/execution_plan.py +417 -0
- wiseorder-0.1.0/intellagent_runtime/iii.py +240 -0
- wiseorder-0.1.0/intellagent_runtime/kernel.py +321 -0
- wiseorder-0.1.0/intellagent_runtime/memory.py +314 -0
- wiseorder-0.1.0/intellagent_runtime/policies/README.md +14 -0
- wiseorder-0.1.0/intellagent_runtime/policies/always_deny.json +5 -0
- wiseorder-0.1.0/intellagent_runtime/policies/test_allowlist.json +9 -0
- wiseorder-0.1.0/intellagent_runtime/prompts/class_a_fragment.md +24 -0
- wiseorder-0.1.0/intellagent_runtime/prompts/class_b_fragment.md +22 -0
- wiseorder-0.1.0/intellagent_runtime/prompts/class_c_fragment.md +32 -0
- wiseorder-0.1.0/intellagent_runtime/prompts/class_d_fragment.md +36 -0
- wiseorder-0.1.0/intellagent_runtime/prompts/system_preamble.md +10 -0
- wiseorder-0.1.0/intellagent_runtime/proposer.py +111 -0
- wiseorder-0.1.0/intellagent_runtime/proposer_transformer.py +785 -0
- wiseorder-0.1.0/intellagent_runtime/refusal.py +98 -0
- wiseorder-0.1.0/intellagent_runtime/runtime.py +222 -0
- wiseorder-0.1.0/intellagent_runtime/state.py +165 -0
- wiseorder-0.1.0/intellagent_runtime/transitions.py +165 -0
- wiseorder-0.1.0/intellagent_runtime/work_order_parser.py +525 -0
- wiseorder-0.1.0/intellagent_runtime/workflow_grammar.py +343 -0
- wiseorder-0.1.0/pyproject.toml +64 -0
- wiseorder-0.1.0/setup.cfg +4 -0
- wiseorder-0.1.0/tests/test_apply_transition_crash_safety.py +298 -0
- wiseorder-0.1.0/tests/test_audit_memory.py +207 -0
- wiseorder-0.1.0/tests/test_binary_fixture_check.py +115 -0
- wiseorder-0.1.0/tests/test_canonicalization_golden.py +233 -0
- wiseorder-0.1.0/tests/test_chain.py +293 -0
- wiseorder-0.1.0/tests/test_class_b_state_machine.py +258 -0
- wiseorder-0.1.0/tests/test_d5_preimage_size_cap.py +120 -0
- wiseorder-0.1.0/tests/test_execution_plan.py +290 -0
- wiseorder-0.1.0/tests/test_governed_run_pipeline.py +691 -0
- wiseorder-0.1.0/tests/test_identity_model.py +228 -0
- wiseorder-0.1.0/tests/test_iii.py +175 -0
- wiseorder-0.1.0/tests/test_intellagent_authorization.py +130 -0
- wiseorder-0.1.0/tests/test_intellagent_cli.py +340 -0
- wiseorder-0.1.0/tests/test_intellagent_kernel.py +311 -0
- wiseorder-0.1.0/tests/test_intellagent_memory.py +112 -0
- wiseorder-0.1.0/tests/test_intellagent_proposer_transformer.py +438 -0
- wiseorder-0.1.0/tests/test_intellagent_runtime.py +244 -0
- wiseorder-0.1.0/tests/test_intellagent_state.py +95 -0
- wiseorder-0.1.0/tests/test_interop.py +349 -0
- wiseorder-0.1.0/tests/test_minimal_verifier.py +351 -0
- wiseorder-0.1.0/tests/test_replay_diff.py +178 -0
- wiseorder-0.1.0/tests/test_run_conformance.py +71 -0
- wiseorder-0.1.0/tests/test_sandbox_escape_check.py +191 -0
- wiseorder-0.1.0/tests/test_sigkill_recovery.py +164 -0
- wiseorder-0.1.0/tests/test_validate_implementations.py +339 -0
- wiseorder-0.1.0/tests/test_validate_vectors.py +104 -0
- wiseorder-0.1.0/tests/test_work_order_parser.py +254 -0
- wiseorder-0.1.0/tests/test_workflow_grammar.py +193 -0
- wiseorder-0.1.0/wiseorder.egg-info/PKG-INFO +292 -0
- wiseorder-0.1.0/wiseorder.egg-info/SOURCES.txt +63 -0
- wiseorder-0.1.0/wiseorder.egg-info/dependency_links.txt +1 -0
- wiseorder-0.1.0/wiseorder.egg-info/entry_points.txt +2 -0
- wiseorder-0.1.0/wiseorder.egg-info/requires.txt +13 -0
- wiseorder-0.1.0/wiseorder.egg-info/top_level.txt +1 -0
wiseorder-0.1.0/LICENSE
ADDED
|
@@ -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.
|
wiseorder-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wiseorder
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: WiseOrder — the kernel that governs how an AI's output is allowed to become an action, and seals every decision. One of three peers under Wise.Est Systems.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Project-URL: Documentation, https://github.com/Wise-Est-Systems/wiseorder-protocol
|
|
7
|
+
Project-URL: Source, https://github.com/Wise-Est-Systems/wiseorder-protocol
|
|
8
|
+
Keywords: wiseorder,intellagent,epistemic,governance,audit,kernel
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: jsonschema==4.26.0
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: pytest<9,>=8; extra == "dev"
|
|
21
|
+
Provides-Extra: openai
|
|
22
|
+
Requires-Dist: openai>=1.0; extra == "openai"
|
|
23
|
+
Provides-Extra: anthropic
|
|
24
|
+
Requires-Dist: anthropic>=0.30; extra == "anthropic"
|
|
25
|
+
Provides-Extra: all
|
|
26
|
+
Requires-Dist: intellagent-wiseorder[anthropic,dev,openai]; extra == "all"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# wiseorder-protocol
|
|
30
|
+
|
|
31
|
+
[](https://github.com/Wise-Est-Systems/wiseorder-protocol/actions/workflows/test.yml)
|
|
32
|
+
[](https://github.com/Wise-Est-Systems/wiseorder-protocol/actions/workflows/conformance.yml)
|
|
33
|
+
[](https://github.com/Wise-Est-Systems/wiseorder-protocol/actions/workflows/verify-chain.yml)
|
|
34
|
+
[](https://github.com/Wise-Est-Systems/wiseorder-protocol/actions/workflows/lint.yml)
|
|
35
|
+
[](pyproject.toml)
|
|
36
|
+
|
|
37
|
+
> **WiseOrder governs how cognition becomes consequence** — the kernel that decides whether an AI's output is allowed to become an action, and seals every decision. It classifies each claim into a verification regime, runs a separate authorization gate before any action takes effect, and seals the resulting transitions in a hash-chained audit memory you can verify yourself, offline, with no account.
|
|
38
|
+
>
|
|
39
|
+
> One of three peers under Wise.Est Systems. A judgment can never be recorded as a proven fact, and an AI cannot rubber-stamp its own actions.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 1. Purpose
|
|
44
|
+
|
|
45
|
+
`wiseorder-protocol` is the **kernel that governs how an AI's output is allowed to become an action** — one of three peers under Wise.Est Systems. It defines:
|
|
46
|
+
|
|
47
|
+
- four artifact classes (A/B/C/D), each with a typed verification regime and a fixed set of status tokens
|
|
48
|
+
- an append-only audit memory that hash-chains every committed transition
|
|
49
|
+
- a hash-chained `.win` triple chain anchored at a `NULLASIGN` genesis
|
|
50
|
+
- an authorization gate that runs *separately* from kernel verification (the same transition can be kernel-passed and gate-denied; conformance vectors prove this)
|
|
51
|
+
- a refusal store that records the structure of every rejected proposal
|
|
52
|
+
- a CLI (`intellagent`) that exposes the runtime as a state machine: `init → propose → transition → audit → refuse`
|
|
53
|
+
|
|
54
|
+
**This repo is NOT:**
|
|
55
|
+
|
|
56
|
+
- A model. The runtime does not contain a neural network. Transformers serve as proposers under the kernel.
|
|
57
|
+
- A network service. The runtime is single-host with no outbound HTTP in the core path.
|
|
58
|
+
- A moral system. WiseOrder governs the *form* a claim must take to be admissible under its class; the substantive content of correct judgment lives in conduct artifacts (Class D) and is governed there.
|
|
59
|
+
- A claim of AGI. Every "Non-Goals" section in every doc says so explicitly.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 2. Architecture
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
AI output
|
|
67
|
+
↓
|
|
68
|
+
┌───────────────┐
|
|
69
|
+
│ Wisernance │ ← the kernel that governs what becomes an action (this repo)
|
|
70
|
+
└───────────────┘
|
|
71
|
+
↓
|
|
72
|
+
┌────────────────────────────┐
|
|
73
|
+
│ Intellagent Runtime v0.1 │ ← state machine over the kernel (this repo)
|
|
74
|
+
└────────────────────────────┘
|
|
75
|
+
↓
|
|
76
|
+
┌────────────────────────────┐
|
|
77
|
+
│ WIN │ WISEATA │ ← proof substrate: seal + verify, then inspect (separate repos)
|
|
78
|
+
└────────────────────────────┘
|
|
79
|
+
↓
|
|
80
|
+
execution systems
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The kernel and runtime share a process; the runtime exposes the kernel through the `intellagent` CLI. There is no daemon, no service, no network listener.
|
|
84
|
+
|
|
85
|
+
| Path | Purpose |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| [`SPEC.md`](./SPEC.md) | WiseOrder Protocol v0.1.0 canonical draft. Governs in case of conflict. |
|
|
88
|
+
| [`SPEC_LOCK_v0.1.md`](./SPEC_LOCK_v0.1.md) / [`SPEC_LOCK_v0.2.0.md`](./SPEC_LOCK_v0.2.0.md) | Frozen specifications per version. |
|
|
89
|
+
| [`STATUS-REGISTRY.md`](./STATUS-REGISTRY.md) | Per-class status tokens and their meanings. |
|
|
90
|
+
| [`ARTIFACTS.md`](./ARTIFACTS.md) | JSON schema per artifact class. |
|
|
91
|
+
| [`CONFORMANCE.md`](./CONFORMANCE.md) | Conformance is class-scoped; vectors determine conformance, prose explains it. |
|
|
92
|
+
| [`IMPLEMENTATIONS.md`](./IMPLEMENTATIONS.md) | Registry of known implementations. |
|
|
93
|
+
| [`vectors/`](./vectors/) | Conformance test vectors (29 in `vectors/v0.2.0/` + 23 in v0.1.0 baseline). |
|
|
94
|
+
| [`schemas/`](./schemas/) | JSON Schemas for vectors, manifests, fixtures, declarations. |
|
|
95
|
+
| [`chain/`](./chain/) | The live v0.2.0 chain: `genesis.win` + 2 follow-up triples, `CHAIN_VALID`. |
|
|
96
|
+
| [`intellagent_runtime/`](./intellagent_runtime/) | Kernel, gate, audit memory, refusal store, proposers, chain primitives, CLI. |
|
|
97
|
+
| [`tools/`](./tools/) | Conformance + interop validators, pseudocode scanner, demo runner. |
|
|
98
|
+
| [`tests/`](./tests/) | **480** pytest tests covering protocol vectors, runtime semantics, chain integrity, transformer proposer, CLI, plus 7 crash-injection + 3 SIGKILL recovery tests. |
|
|
99
|
+
| [`interop/`](./interop/) | Fixture manifests + interop checks tying implementations to vectors. |
|
|
100
|
+
| [`reports/`](./reports/) | Committed conformance + interop reports (regenerated by `make conformance` / `make interop`). |
|
|
101
|
+
| [`rust_verifier/`](./rust_verifier/) | First-party independent verifier track (Rust). |
|
|
102
|
+
| [`go_verifier/`](./go_verifier/) | First-party independent verifier track (Go). |
|
|
103
|
+
| [`docs/`](./docs/) | Whitepapers, strategy, release packets, audits, runtime architecture. |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 3. Invariants
|
|
108
|
+
|
|
109
|
+
Core invariants enforced by tests and CI. Documented in spec and code; reproduced here at high level.
|
|
110
|
+
|
|
111
|
+
- **Kernel ⟂ Gate separation.** Kernel verifies *structure*; the authorization gate verifies *policy*. A transition can pass one and fail the other. See [`intellagent_runtime/kernel.py`](./intellagent_runtime/kernel.py) and [`intellagent_runtime/authorization.py`](./intellagent_runtime/authorization.py).
|
|
112
|
+
- **Audit memory is fail-closed.** Loading the chain re-derives every entry's `this_entry_sha256` and verifies every `prev_entry_sha256` link. Any mismatch raises `ChainCorrupt` and the runtime refuses further operation.
|
|
113
|
+
- **State is content-addressed.** `state_id = sha256(canonical_json(sorted_objects))`. Loading state re-derives state_id and raises `StateTampered` on mismatch.
|
|
114
|
+
- **`apply_transition` is crash-safe.** Two-phase commit (stage → save → finalize) guarantees that after any crash, state and audit cannot diverge. Proven by 7 synthetic crash-injection tests + 3 real-process SIGKILL tests.
|
|
115
|
+
- **TS-1 timestamp precision.** Chain triples use microsecond precision; audit memory and conformance vectors use second precision. The two are intentionally NOT unified — chain filenames require sub-second uniqueness; audit/vectors require operator-readable consistency. Both formats are load-bearing.
|
|
116
|
+
- **WiseDigest-3 / III parity with WOP.** [`intellagent_runtime/iii.py`](./intellagent_runtime/iii.py) is a byte-identical mirror of [`wop/src/wise/digest_v3.py`](https://github.com/Wise-Est-Systems/wop). Any divergence breaks the cross-repository verifier compatibility claim.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 4. Failure model
|
|
121
|
+
|
|
122
|
+
The runtime is fail-closed everywhere a sealed claim is at stake.
|
|
123
|
+
|
|
124
|
+
| failure | response |
|
|
125
|
+
|---|---|
|
|
126
|
+
| Audit chain corrupt (link broken or hash mismatch) | `ChainCorrupt` raised; CLI exits 2; no further commits |
|
|
127
|
+
| State tampered (recomputed state_id differs from declared) | `StateTampered` raised; CLI exits 2 |
|
|
128
|
+
| Process killed mid-`apply_transition` | startup `reconcile_pending(state.audit_head_sha256)` either finalizes the staged entry (state already references it) or discards it (state does not) — proven by SIGKILL tests |
|
|
129
|
+
| Malformed transition body | `TransitionSchemaError` raised at load time, not at kernel time — bad `regime` or path-traversal `transition_id` is rejected before kernel verification |
|
|
130
|
+
| Malformed policy JSON | `PolicySchemaError` raised — known-kind bodies with missing fields fail loudly, not silently |
|
|
131
|
+
| State / audit divergence after reconciliation | `StateAuditDivergence` raised; CLI refuses to proceed |
|
|
132
|
+
|
|
133
|
+
See [`docs/REVIEWER_GUIDE.md`](docs/REVIEWER_GUIDE.md) for a 30-minute path to reproduce each one.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 5. Quick start
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git clone https://github.com/Wise-Est-Systems/wiseorder-protocol.git
|
|
141
|
+
cd wiseorder-protocol
|
|
142
|
+
|
|
143
|
+
python3.12 -m venv .venv
|
|
144
|
+
source .venv/bin/activate
|
|
145
|
+
pip install -r requirements.txt
|
|
146
|
+
|
|
147
|
+
# Full local CI: documentation code standard + tests + protocol conformance + interop.
|
|
148
|
+
make ci
|
|
149
|
+
|
|
150
|
+
# Run the transformer-backed runtime demo (no real model needed).
|
|
151
|
+
python3 tools/demo_transformer_proposer.py
|
|
152
|
+
|
|
153
|
+
# Initialize a runtime, propose a transition, commit, audit.
|
|
154
|
+
pip install -e .
|
|
155
|
+
intellagent --help
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 6. Verification commands
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
make ci # the heavy pre-flight: pseudocode standard + tests + conformance + interop + verifiers
|
|
164
|
+
make test # pytest only (480 tests, ~3s)
|
|
165
|
+
make chain-verify # standalone chain integrity; prints head hash
|
|
166
|
+
make conformance # regenerate + check vector pass rates
|
|
167
|
+
make interop # regenerate + check fixture conformance
|
|
168
|
+
make canonicalization-check # 10 canonical-form corpus entries
|
|
169
|
+
make rust-verifier-check # first-party Rust verifier — must agree on all 3 fingerprints
|
|
170
|
+
make go-verifier-check # first-party Go verifier — must agree on all 3 fingerprints
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Expected output of `make chain-verify`:
|
|
174
|
+
```
|
|
175
|
+
CHAIN_VALID count=3 head=5964497c48c877946e2c92d15e3116f5991c1d8a4c99dc7eadb477cec558dd81
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Expected output of `make test`:
|
|
179
|
+
```
|
|
180
|
+
480 passed, 9 xfailed in ~3s
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Frozen v0.1.0 fingerprints
|
|
184
|
+
|
|
185
|
+
A third party cloning this repo at the `v0.1.0` tag and running the three commands below MUST observe these exact fingerprints. Divergence is a non-conformance.
|
|
186
|
+
|
|
187
|
+
| Fingerprint | Required value |
|
|
188
|
+
|---|---|
|
|
189
|
+
| `vectors_suite_sha256` | `sha256:6168d2075931baa98bba763f9cd537142554aae7b26f19e3e93a60de2ee5bb0f` (33 vectors: 23 baseline + 10 adversarial) |
|
|
190
|
+
| `manifests_suite_sha256` | `sha256:74eaaa62271f23172232bda43ba3340543e66c46ba1e2f5e6da18d3447a6ba29` (3 fixtures) |
|
|
191
|
+
| `corpus_sha256` | `sha256:c95685bff48c15abc313c462908b05ac309250bc660c2d802ae51af5a8038b09` (10 corpus entries) |
|
|
192
|
+
|
|
193
|
+
The v0.2.0 vector set under `vectors/v0.2.0/` is published but not yet frozen; freezing happens at the next `SPEC_LOCK` cut.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 7. CI status explanation
|
|
198
|
+
|
|
199
|
+
| workflow | what it gates | matrix |
|
|
200
|
+
|---|---|---|
|
|
201
|
+
| `tests` | pytest under multiple Pythons and OSes | ubuntu / macos × py3.11 / py3.12 |
|
|
202
|
+
| `lint` | ruff check + ruff format check on package + tools | ubuntu × py3.12 |
|
|
203
|
+
| `verify-chain` | runs `verify_chain` over `chain/`; emits head hash to job summary | ubuntu × py3.12 |
|
|
204
|
+
| `conformance` | full `make ci` (the heavy pre-flight: pseudocode + tests + conformance + interop + verifiers) | ubuntu × py3.12 |
|
|
205
|
+
|
|
206
|
+
Every push to `main` triggers all four. The `verify-chain` workflow has path filters so it runs only when `chain/`, `chain.py`, or `iii.py` change; the others run on every push.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## 8. Recovery guarantees
|
|
211
|
+
|
|
212
|
+
| event | guarantee |
|
|
213
|
+
|---|---|
|
|
214
|
+
| Process killed mid-`apply_transition` | `reconcile_pending` at next startup recovers a consistent on-disk state. Proven by 3 real-process SIGKILL tests. |
|
|
215
|
+
| Mac power loss between stage and save | `write_atomic` guarantees `current.json` is either old or new, not partial. Staging file (if present) is orphan and discarded. |
|
|
216
|
+
| Mac power loss between save and finalize | `current.json` references the staged entry's hash; reconcile renames staging→final. |
|
|
217
|
+
| Independent verifier (rust/go) disagrees with python on the same input | Conformance failure. CI fails. Block release. |
|
|
218
|
+
| Cross-machine replay produces different bytes | A non-conformance. See [`docs/release/CROSS_MACHINE_REPLAY_REPORT.md`](docs/release/CROSS_MACHINE_REPLAY_REPORT.md) for the determinism evidence. |
|
|
219
|
+
|
|
220
|
+
There is no rollback of a sealed chain triple. The chain is an audit trail; withdrawing a prior statement is done by appending a new triple whose `statement` documents the withdrawal.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## 9. Operational philosophy
|
|
225
|
+
|
|
226
|
+
- **The chain is the public-facing artifact, not the code.** External verifiers re-derive `consequence_proof` and `previous_action` from a `.win` file alone. The repo is provenance for the verifier; it is not the source of truth.
|
|
227
|
+
- **Fail closed at every seam.** `ChainCorrupt`, `StateTampered`, `TransitionSchemaError`, `PolicySchemaError`, `StateAuditDivergence` are not warnings — they halt the runtime.
|
|
228
|
+
- **No part of the protocol depends on a network.** Verification works offline from a USB drop. See `/Volumes/T7/2026-05-24/verify.sh` for the canonical "drop the drive, prove the chain" example.
|
|
229
|
+
- **Cross-language verifier parity is non-negotiable.** Python, Rust, and Go must all agree on the head hash for any release tag. Single-language verification is single-source assurance.
|
|
230
|
+
- **Vectors are the contract; code is one implementation.** A second implementation that passes the vectors is a peer; one that does not is non-conformant.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## 10. Current limitations
|
|
235
|
+
|
|
236
|
+
- **External-validation status: NOT_COMPLETE.** The Rust and Go verifiers in this repo are `FIRST_PARTY_INDEPENDENT_IMPLEMENTATION_TRACKS`, not third-party validation. A real third-party verifier is required for `EXTERNALLY_VALIDATED` status; see [`docs/release/THIRD_PARTY_VERIFIER_BRIEF_v0.1.md`](docs/release/THIRD_PARTY_VERIFIER_BRIEF_v0.1.md).
|
|
237
|
+
- **WiseDigest-3 is novel.** It is not SHA-2, not BLAKE3, not a permutation function used in production crypto. The math is in `wop/research/WiseDigest-3.md`; cryptographic analysis is `not yet complete`. Production use as a security-critical primitive requires that analysis.
|
|
238
|
+
- **Lint and mypy run with `continue-on-error: true`.** The baselines are not clean. Drift is reported but does not block CI yet.
|
|
239
|
+
- **No license file.** `pyproject.toml` references one. Choosing a license is a deliberate decision the project owner has not yet made; the repo is currently effectively closed-source by default copyright law.
|
|
240
|
+
- **No `CHANGELOG.md` yet.** Release history is in `git log --oneline`; the changelog template is in `docs/RELEASE_PROCESS.md`.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## 11. Roadmap
|
|
245
|
+
|
|
246
|
+
1. Wire branch protection on GitHub (the policy in `docs/BRANCH_PROTECTION.md` is currently aspirational; the UI does not enforce it).
|
|
247
|
+
2. Pick a license.
|
|
248
|
+
3. Tighten ruff + mypy baselines; remove `continue-on-error: true`.
|
|
249
|
+
4. Freeze `vectors/v0.2.0/` and cut `SPEC_LOCK_v0.2.0` if it is not already (verify against `chain/2026-05-23T071437_...win`).
|
|
250
|
+
5. First external engineering scrutiny (see `docs/release/EXTERNAL_REVIEW_PACKET_v0.1.md`).
|
|
251
|
+
6. Tag `v0.1.0` once #1, #2, and the audit packet are ready.
|
|
252
|
+
7. Cryptanalysis of WiseDigest-3 (deferred to `wop`; tracked there).
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## 12. Security posture
|
|
257
|
+
|
|
258
|
+
| boundary | posture |
|
|
259
|
+
|---|---|
|
|
260
|
+
| Network | No outbound HTTP from the core runtime. Optional LLM providers (OpenAI / Anthropic) are opt-in dependencies; the default `DeterministicMockProvider` requires no network. |
|
|
261
|
+
| Filesystem | `intellagent` writes only under `--dir` (default cwd) into `intellagent_state/`, `intellagent_audit/`, `intellagent_refusals/`, `intellagent_objects/`. No writes elsewhere. |
|
|
262
|
+
| Untrusted JSON input | All transition + policy JSON is validated by typed schemas at load time. Unknown fields are tolerated (forward-compatible); known-field type mismatches raise. |
|
|
263
|
+
| Subprocess execution | `governed-run --execute` runs proposed commands under `tools/os_isolation_runtime` sandbox-exec isolation. Sandbox failures are recorded in the manifest. |
|
|
264
|
+
| Authentication | None at the protocol layer. The CLI is a local tool. Third-party verifier authentication is out of scope here (the chain is content-addressed). |
|
|
265
|
+
|
|
266
|
+
The threat model is: **an attacker with file-system access to the runtime root could tamper with `current.json`, the audit chain, or the queue, and the next invocation would either reject the tamper (StateTampered / ChainCorrupt) or surface it in CI (verify-chain workflow).** No invariant claims to defend against an attacker who can also modify the runtime's source code.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 13. Release discipline
|
|
271
|
+
|
|
272
|
+
Documented in [`docs/RELEASE_PROCESS.md`](docs/RELEASE_PROCESS.md):
|
|
273
|
+
|
|
274
|
+
- Semver with explicit MAJOR triggers (new chain root or non-backwards-compatible vector change).
|
|
275
|
+
- Pre-release checklist: clean tree → `make ci` → `make chain-verify` → rust + go verifier parity → signed tag → T7 evidence snapshot.
|
|
276
|
+
- No retagging. No re-sealing the genesis after a public release.
|
|
277
|
+
- Rollback is by *appending* a withdrawal triple, not by editing or removing existing triples.
|
|
278
|
+
|
|
279
|
+
No releases tagged yet — this repo is `v0.1.0-pre`. The first tag will follow the items in the Roadmap.
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Further reading
|
|
284
|
+
|
|
285
|
+
- [`docs/REVIEWER_GUIDE.md`](docs/REVIEWER_GUIDE.md) — 30-minute path for an external reviewer
|
|
286
|
+
- [`docs/INTEGRATION.md`](docs/INTEGRATION.md) — how another system integrates
|
|
287
|
+
- [`docs/BRANCH_PROTECTION.md`](docs/BRANCH_PROTECTION.md) — operational policy on `main`
|
|
288
|
+
- [`docs/RELEASE_PROCESS.md`](docs/RELEASE_PROCESS.md) — semver, checklist, rollback
|
|
289
|
+
- [`docs/release/EXTERNAL_REVIEW_PACKET_v0.1.md`](docs/release/EXTERNAL_REVIEW_PACKET_v0.1.md) — what v0.1.0 is, what it isn't, what counts as successful external validation
|
|
290
|
+
- [`docs/release/REVIEW_QUICKSTART.md`](docs/release/REVIEW_QUICKSTART.md) — commands only; reproduce CI from a cold clone
|
|
291
|
+
- [`docs/release/THIRD_PARTY_VERIFIER_BRIEF_v0.1.md`](docs/release/THIRD_PARTY_VERIFIER_BRIEF_v0.1.md) — formal requirements for a third-party verifier submission
|
|
292
|
+
- [`CHANGELOG.md`](CHANGELOG.md) — release history
|