omega-mini 3.3.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.
- omega_mini-3.3.0/LICENSE +21 -0
- omega_mini-3.3.0/PKG-INFO +440 -0
- omega_mini-3.3.0/README.md +394 -0
- omega_mini-3.3.0/pyproject.toml +40 -0
- omega_mini-3.3.0/setup.cfg +4 -0
- omega_mini-3.3.0/src/omega/__init__.py +58 -0
- omega_mini-3.3.0/src/omega/core.py +2117 -0
- omega_mini-3.3.0/src/omega_mini.egg-info/PKG-INFO +440 -0
- omega_mini-3.3.0/src/omega_mini.egg-info/SOURCES.txt +10 -0
- omega_mini-3.3.0/src/omega_mini.egg-info/dependency_links.txt +1 -0
- omega_mini-3.3.0/src/omega_mini.egg-info/top_level.txt +1 -0
- omega_mini-3.3.0/tests/test_omega.py +1332 -0
omega_mini-3.3.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 4jb5nkddkb-dot
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: omega-mini
|
|
3
|
+
Version: 3.3.0
|
|
4
|
+
Summary: Omega v3.3 — Zero-dependency constrained decision & safety learning framework (Python stdlib)
|
|
5
|
+
Author: 4jb5nkddkb-dot
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 4jb5nkddkb-dot
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/4jb5nkddkb-dot/omega-mini
|
|
29
|
+
Project-URL: Repository, https://github.com/4jb5nkddkb-dot/omega-mini
|
|
30
|
+
Project-URL: Issues, https://github.com/4jb5nkddkb-dot/omega-mini/issues
|
|
31
|
+
Keywords: omega,safety,constrained-decision,audit,calibration,stdlib
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Intended Audience :: Developers
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
40
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
41
|
+
Classifier: Topic :: Security
|
|
42
|
+
Requires-Python: >=3.10
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
License-File: LICENSE
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
|
|
47
|
+
Ω v3.3
|
|
48
|
+
|
|
49
|
+
受约束决策与安全学习框架
|
|
50
|
+
|
|
51
|
+
Ω v3.3 是一个基于 Python 标准库实现的实验型受约束决策与安全控制框架。
|
|
52
|
+
|
|
53
|
+
项目重点不是无限制地执行动作,而是在明确的能力边界、授权条件、不确定性和硬约束下进行受控决策。
|
|
54
|
+
|
|
55
|
+
系统主要支持:
|
|
56
|
+
|
|
57
|
+
* APPLY
|
|
58
|
+
* HOLD
|
|
59
|
+
* ESCALATE
|
|
60
|
+
* Owner Authorization
|
|
61
|
+
* Immutable Capability Boundary
|
|
62
|
+
* Single-use Token
|
|
63
|
+
* Prediction / Observation
|
|
64
|
+
* Uncertainty
|
|
65
|
+
* Attribution
|
|
66
|
+
* Bounded Calibration
|
|
67
|
+
* Pause / Resume
|
|
68
|
+
* Dry-run
|
|
69
|
+
* Replay
|
|
70
|
+
* Reflection
|
|
71
|
+
* Persistence
|
|
72
|
+
* Audit Hash Chain
|
|
73
|
+
|
|
74
|
+
⸻
|
|
75
|
+
|
|
76
|
+
1. 项目结构
|
|
77
|
+
|
|
78
|
+
Omega/
|
|
79
|
+
│
|
|
80
|
+
├── omega.py
|
|
81
|
+
├── test_omega.py
|
|
82
|
+
├── experiment.py
|
|
83
|
+
├── omega_results.json
|
|
84
|
+
├── omega_results.md
|
|
85
|
+
└── 项目报告.docx
|
|
86
|
+
|
|
87
|
+
omega.py
|
|
88
|
+
|
|
89
|
+
Ω v3.3 核心实现。
|
|
90
|
+
|
|
91
|
+
test_omega.py
|
|
92
|
+
|
|
93
|
+
标准库测试程序。
|
|
94
|
+
|
|
95
|
+
当前包含 25 项测试。
|
|
96
|
+
|
|
97
|
+
experiment.py
|
|
98
|
+
|
|
99
|
+
实验程序,用于运行不同环境条件下的决策实验。
|
|
100
|
+
|
|
101
|
+
omega_results.json
|
|
102
|
+
|
|
103
|
+
机器可读实验结果。
|
|
104
|
+
|
|
105
|
+
omega_results.md
|
|
106
|
+
|
|
107
|
+
Markdown 格式实验结果。
|
|
108
|
+
|
|
109
|
+
⸻
|
|
110
|
+
|
|
111
|
+
2. 环境要求
|
|
112
|
+
|
|
113
|
+
建议:
|
|
114
|
+
|
|
115
|
+
Python 3.10+
|
|
116
|
+
|
|
117
|
+
项目核心测试不依赖 pytest。
|
|
118
|
+
|
|
119
|
+
因此不需要执行:
|
|
120
|
+
|
|
121
|
+
pip install pytest
|
|
122
|
+
|
|
123
|
+
直接使用 Python 标准库即可。
|
|
124
|
+
|
|
125
|
+
⸻
|
|
126
|
+
|
|
127
|
+
3. 基础自检
|
|
128
|
+
|
|
129
|
+
运行:
|
|
130
|
+
|
|
131
|
+
python omega.py
|
|
132
|
+
|
|
133
|
+
如果系统正常,应显示:
|
|
134
|
+
|
|
135
|
+
Omega self-test: PASS
|
|
136
|
+
|
|
137
|
+
⸻
|
|
138
|
+
|
|
139
|
+
4. 完整测试
|
|
140
|
+
|
|
141
|
+
运行:
|
|
142
|
+
|
|
143
|
+
python test_omega.py
|
|
144
|
+
|
|
145
|
+
当前版本实际测试结果:
|
|
146
|
+
|
|
147
|
+
TOTAL : 25
|
|
148
|
+
PASS : 25
|
|
149
|
+
FAIL : 0
|
|
150
|
+
|
|
151
|
+
最终:
|
|
152
|
+
|
|
153
|
+
RESULT: ALL TESTS PASSED
|
|
154
|
+
|
|
155
|
+
⸻
|
|
156
|
+
|
|
157
|
+
5. 实验
|
|
158
|
+
|
|
159
|
+
运行:
|
|
160
|
+
|
|
161
|
+
python experiment.py --rounds 20
|
|
162
|
+
|
|
163
|
+
实验包含:
|
|
164
|
+
|
|
165
|
+
stable
|
|
166
|
+
model_bias
|
|
167
|
+
sensor_spike
|
|
168
|
+
input_uncertainty
|
|
169
|
+
constraint_violation
|
|
170
|
+
long_run
|
|
171
|
+
|
|
172
|
+
⸻
|
|
173
|
+
|
|
174
|
+
6. 实验结果
|
|
175
|
+
|
|
176
|
+
当前实际运行结果:
|
|
177
|
+
|
|
178
|
+
stable
|
|
179
|
+
rounds=20
|
|
180
|
+
APPLY=20
|
|
181
|
+
HOLD=0
|
|
182
|
+
ESC=0
|
|
183
|
+
error=0.0000
|
|
184
|
+
model_bias
|
|
185
|
+
rounds=20
|
|
186
|
+
APPLY=0
|
|
187
|
+
HOLD=20
|
|
188
|
+
ESC=0
|
|
189
|
+
error=4.0000
|
|
190
|
+
sensor_spike
|
|
191
|
+
rounds=20
|
|
192
|
+
APPLY=0
|
|
193
|
+
HOLD=0
|
|
194
|
+
ESC=20
|
|
195
|
+
error=0.9000
|
|
196
|
+
input_uncertainty
|
|
197
|
+
rounds=20
|
|
198
|
+
APPLY=10
|
|
199
|
+
HOLD=10
|
|
200
|
+
ESC=0
|
|
201
|
+
error=0.0000
|
|
202
|
+
constraint_violation
|
|
203
|
+
rounds=1
|
|
204
|
+
APPLY=0
|
|
205
|
+
HOLD=0
|
|
206
|
+
ESC=1
|
|
207
|
+
error=78.0000
|
|
208
|
+
long_run
|
|
209
|
+
rounds=20
|
|
210
|
+
APPLY=20
|
|
211
|
+
HOLD=0
|
|
212
|
+
ESC=0
|
|
213
|
+
error=0.2839
|
|
214
|
+
|
|
215
|
+
⸻
|
|
216
|
+
|
|
217
|
+
7. Dry-run
|
|
218
|
+
|
|
219
|
+
Dry-run 用于验证执行前的安全状态。
|
|
220
|
+
|
|
221
|
+
当前实际结果:
|
|
222
|
+
|
|
223
|
+
{
|
|
224
|
+
"decision": "HOLD",
|
|
225
|
+
"reason": "dry_run",
|
|
226
|
+
"environment_calls": 0,
|
|
227
|
+
"state_unchanged": true,
|
|
228
|
+
"token_preserved": true
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
这意味着:
|
|
232
|
+
|
|
233
|
+
* 没有调用环境;
|
|
234
|
+
* 系统状态没有变化;
|
|
235
|
+
* Token 没有被消耗。
|
|
236
|
+
|
|
237
|
+
⸻
|
|
238
|
+
|
|
239
|
+
8. Audit
|
|
240
|
+
|
|
241
|
+
当前 Audit 实验:
|
|
242
|
+
|
|
243
|
+
{
|
|
244
|
+
"audit_length": 8,
|
|
245
|
+
"valid_before_tampering": true,
|
|
246
|
+
"valid_after_tampering": false
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
说明:
|
|
250
|
+
|
|
251
|
+
正常 Audit:验证通过
|
|
252
|
+
篡改 Audit 数据后:验证失败
|
|
253
|
+
|
|
254
|
+
⸻
|
|
255
|
+
|
|
256
|
+
9. 核心决策
|
|
257
|
+
|
|
258
|
+
Ω v3.3 使用三类主要决策:
|
|
259
|
+
|
|
260
|
+
APPLY
|
|
261
|
+
HOLD
|
|
262
|
+
ESCALATE
|
|
263
|
+
|
|
264
|
+
APPLY
|
|
265
|
+
|
|
266
|
+
满足正常运行条件时执行。
|
|
267
|
+
|
|
268
|
+
HOLD
|
|
269
|
+
|
|
270
|
+
条件不足或不确定性较高时暂缓执行。
|
|
271
|
+
|
|
272
|
+
ESCALATE
|
|
273
|
+
|
|
274
|
+
检测到硬约束违反或其他需要升级处理的安全状态时进入升级状态。
|
|
275
|
+
|
|
276
|
+
⸻
|
|
277
|
+
|
|
278
|
+
10. Single-use Token
|
|
279
|
+
|
|
280
|
+
真实执行需要有效 Token。
|
|
281
|
+
|
|
282
|
+
Token 使用后不能重复使用。
|
|
283
|
+
|
|
284
|
+
重复使用已经消费的 Token 会被拒绝,并不会再次调用环境。
|
|
285
|
+
|
|
286
|
+
⸻
|
|
287
|
+
|
|
288
|
+
11. Capability Boundary
|
|
289
|
+
|
|
290
|
+
系统使用 Immutable Boundary 限制可执行能力。
|
|
291
|
+
|
|
292
|
+
当前测试验证了:
|
|
293
|
+
|
|
294
|
+
Boundary 不可修改
|
|
295
|
+
未经授权的 Capability 不可获得
|
|
296
|
+
|
|
297
|
+
⸻
|
|
298
|
+
|
|
299
|
+
12. Pause / Resume
|
|
300
|
+
|
|
301
|
+
系统支持暂停:
|
|
302
|
+
|
|
303
|
+
pause()
|
|
304
|
+
|
|
305
|
+
暂停状态下不会执行普通环境操作。
|
|
306
|
+
|
|
307
|
+
恢复:
|
|
308
|
+
|
|
309
|
+
resume()
|
|
310
|
+
|
|
311
|
+
之后系统可以重新进行正常决策。
|
|
312
|
+
|
|
313
|
+
⸻
|
|
314
|
+
|
|
315
|
+
13. Persistence
|
|
316
|
+
|
|
317
|
+
系统支持状态保存和恢复。
|
|
318
|
+
|
|
319
|
+
保存内容包括运行状态、Episode、Audit 等数据。
|
|
320
|
+
|
|
321
|
+
Capability Token 不进行持久化恢复。
|
|
322
|
+
|
|
323
|
+
⸻
|
|
324
|
+
|
|
325
|
+
14. Replay
|
|
326
|
+
|
|
327
|
+
Replay 可以用于读取历史运行记录。
|
|
328
|
+
|
|
329
|
+
可以根据历史 Episode 对过去的运行过程进行检查。
|
|
330
|
+
|
|
331
|
+
⸻
|
|
332
|
+
|
|
333
|
+
15. Reflection
|
|
334
|
+
|
|
335
|
+
Reflection 用于汇总运行结果,包括:
|
|
336
|
+
|
|
337
|
+
* Episode 数量;
|
|
338
|
+
* APPLY 数量;
|
|
339
|
+
* HOLD 数量;
|
|
340
|
+
* ESCALATE 数量;
|
|
341
|
+
* 平均误差;
|
|
342
|
+
* Attribution;
|
|
343
|
+
* View;
|
|
344
|
+
* Pause 状态;
|
|
345
|
+
* Escalation 状态。
|
|
346
|
+
|
|
347
|
+
⸻
|
|
348
|
+
|
|
349
|
+
16. 项目验证状态
|
|
350
|
+
|
|
351
|
+
当前版本:
|
|
352
|
+
|
|
353
|
+
Ω v3.3
|
|
354
|
+
|
|
355
|
+
核心测试:
|
|
356
|
+
|
|
357
|
+
25 / 25 PASS
|
|
358
|
+
|
|
359
|
+
实验:
|
|
360
|
+
|
|
361
|
+
6 scenarios completed
|
|
362
|
+
|
|
363
|
+
Dry-run:
|
|
364
|
+
|
|
365
|
+
PASS
|
|
366
|
+
|
|
367
|
+
Audit:
|
|
368
|
+
|
|
369
|
+
normal verification = PASS
|
|
370
|
+
tampering detection = PASS
|
|
371
|
+
|
|
372
|
+
⸻
|
|
373
|
+
|
|
374
|
+
17. 注意事项
|
|
375
|
+
|
|
376
|
+
本项目属于实验型软件框架。
|
|
377
|
+
|
|
378
|
+
当前实验结果只代表当前代码版本、参数和测试环境下的行为。
|
|
379
|
+
|
|
380
|
+
实验结果不能直接推导出系统在所有真实环境中的表现。
|
|
381
|
+
|
|
382
|
+
如果用于生产环境,还需要进一步进行:
|
|
383
|
+
|
|
384
|
+
* 安全审计;
|
|
385
|
+
* 压力测试;
|
|
386
|
+
* 随机测试;
|
|
387
|
+
* 故障注入;
|
|
388
|
+
* 权限管理;
|
|
389
|
+
* 日志保护;
|
|
390
|
+
* 更复杂的环境验证;
|
|
391
|
+
* 长时间运行测试。
|
|
392
|
+
|
|
393
|
+
⸻
|
|
394
|
+
|
|
395
|
+
18. 快速开始
|
|
396
|
+
|
|
397
|
+
完整验证可以按照以下顺序执行:
|
|
398
|
+
|
|
399
|
+
python omega.py
|
|
400
|
+
|
|
401
|
+
然后:
|
|
402
|
+
|
|
403
|
+
python test_omega.py
|
|
404
|
+
|
|
405
|
+
最后:
|
|
406
|
+
|
|
407
|
+
python experiment.py --rounds 20
|
|
408
|
+
|
|
409
|
+
如果三个步骤均正常完成,则可以查看:
|
|
410
|
+
|
|
411
|
+
omega_results.json
|
|
412
|
+
omega_results.md
|
|
413
|
+
|
|
414
|
+
以及项目报告。
|
|
415
|
+
|
|
416
|
+
⸻
|
|
417
|
+
|
|
418
|
+
19. 当前最终验证
|
|
419
|
+
|
|
420
|
+
========================================================================
|
|
421
|
+
Ω v3.3 FINAL VERIFICATION
|
|
422
|
+
========================================================================
|
|
423
|
+
Core Test Suite
|
|
424
|
+
TOTAL : 25
|
|
425
|
+
PASS : 25
|
|
426
|
+
FAIL : 0
|
|
427
|
+
Experiment Scenarios
|
|
428
|
+
stable PASS
|
|
429
|
+
model_bias PASS
|
|
430
|
+
sensor_spike PASS
|
|
431
|
+
input_uncertainty PASS
|
|
432
|
+
constraint_violation PASS
|
|
433
|
+
long_run PASS
|
|
434
|
+
Dry-run PASS
|
|
435
|
+
Audit
|
|
436
|
+
valid_before_tampering true
|
|
437
|
+
valid_after_tampering false
|
|
438
|
+
========================================================================
|
|
439
|
+
Ω v3.3 VERIFICATION COMPLETE
|
|
440
|
+
========================================================================
|