awp-conformance 0.1.0a1__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 (85) hide show
  1. awp_conformance-0.1.0a1/.gitignore +15 -0
  2. awp_conformance-0.1.0a1/.gitmodules +3 -0
  3. awp_conformance-0.1.0a1/CHANGELOG.md +10 -0
  4. awp_conformance-0.1.0a1/LICENSE +201 -0
  5. awp_conformance-0.1.0a1/PKG-INFO +101 -0
  6. awp_conformance-0.1.0a1/README.md +81 -0
  7. awp_conformance-0.1.0a1/fixtures/awp-sim.json +127 -0
  8. awp_conformance-0.1.0a1/pyproject.toml +82 -0
  9. awp_conformance-0.1.0a1/scripts/sync_spec.py +77 -0
  10. awp_conformance-0.1.0a1/src/awp_conformance/__init__.py +16 -0
  11. awp_conformance-0.1.0a1/src/awp_conformance/_spec/frames.json +214 -0
  12. awp_conformance-0.1.0a1/src/awp_conformance/_spec/lifecycle.json +190 -0
  13. awp_conformance-0.1.0a1/src/awp_conformance/_spec/requirements.json +2362 -0
  14. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/action-cancel-result.schema.json +13 -0
  15. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/action-ref.schema.json +11 -0
  16. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/action-schema.schema.json +37 -0
  17. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/action-status.schema.json +39 -0
  18. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/action-submit-result.schema.json +16 -0
  19. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/action-submit.schema.json +19 -0
  20. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/agent-manifest.schema.json +27 -0
  21. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/approval-requested.schema.json +25 -0
  22. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/approval-respond.schema.json +31 -0
  23. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/common.schema.json +150 -0
  24. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/embodiment.schema.json +22 -0
  25. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/empty-result.schema.json +8 -0
  26. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/error.schema.json +25 -0
  27. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/frame-inline.schema.json +20 -0
  28. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/frame-tree.schema.json +26 -0
  29. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/obs-report.schema.json +40 -0
  30. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/observation-channel.schema.json +28 -0
  31. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/ping-result.schema.json +13 -0
  32. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/ping.schema.json +12 -0
  33. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/profiles/gui-actions.schema.json +57 -0
  34. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/reset-result.schema.json +11 -0
  35. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/reset.schema.json +12 -0
  36. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/restore.schema.json +11 -0
  37. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/safety-policy.schema.json +81 -0
  38. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/session-open.schema.json +41 -0
  39. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/session-ready.schema.json +50 -0
  40. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/session-resume.schema.json +12 -0
  41. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/session-state.schema.json +14 -0
  42. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/session-telemetry.schema.json +22 -0
  43. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/session-transfer-result.schema.json +12 -0
  44. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/session-transfer.schema.json +11 -0
  45. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/snapshot-result.schema.json +11 -0
  46. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/subscribe-result.schema.json +11 -0
  47. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/subscribe.schema.json +11 -0
  48. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/task-update.schema.json +11 -0
  49. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/tick-result.schema.json +9 -0
  50. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/tick.schema.json +12 -0
  51. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/unsubscribe.schema.json +11 -0
  52. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/world-event.schema.json +45 -0
  53. awp_conformance-0.1.0a1/src/awp_conformance/_spec/schemas/world-manifest.schema.json +61 -0
  54. awp_conformance-0.1.0a1/src/awp_conformance/agent/__init__.py +0 -0
  55. awp_conformance-0.1.0a1/src/awp_conformance/agent/harness.py +873 -0
  56. awp_conformance-0.1.0a1/src/awp_conformance/agent/runner.py +311 -0
  57. awp_conformance-0.1.0a1/src/awp_conformance/cli.py +151 -0
  58. awp_conformance-0.1.0a1/src/awp_conformance/fixture.py +95 -0
  59. awp_conformance-0.1.0a1/src/awp_conformance/frames.py +133 -0
  60. awp_conformance-0.1.0a1/src/awp_conformance/link.py +395 -0
  61. awp_conformance-0.1.0a1/src/awp_conformance/monitor.py +638 -0
  62. awp_conformance-0.1.0a1/src/awp_conformance/py.typed +0 -0
  63. awp_conformance-0.1.0a1/src/awp_conformance/report.py +143 -0
  64. awp_conformance-0.1.0a1/src/awp_conformance/results.py +69 -0
  65. awp_conformance-0.1.0a1/src/awp_conformance/scope.py +74 -0
  66. awp_conformance-0.1.0a1/src/awp_conformance/spec.py +215 -0
  67. awp_conformance-0.1.0a1/src/awp_conformance/world/__init__.py +0 -0
  68. awp_conformance-0.1.0a1/src/awp_conformance/world/context.py +425 -0
  69. awp_conformance-0.1.0a1/src/awp_conformance/world/registry.py +41 -0
  70. awp_conformance-0.1.0a1/src/awp_conformance/world/runner.py +154 -0
  71. awp_conformance-0.1.0a1/src/awp_conformance/world/t_actions.py +522 -0
  72. awp_conformance-0.1.0a1/src/awp_conformance/world/t_basics.py +663 -0
  73. awp_conformance-0.1.0a1/src/awp_conformance/world/t_features.py +495 -0
  74. awp_conformance-0.1.0a1/src/awp_conformance/world/t_lockstep.py +191 -0
  75. awp_conformance-0.1.0a1/src/awp_conformance/world/t_multi.py +111 -0
  76. awp_conformance-0.1.0a1/src/awp_conformance/world/t_operator.py +127 -0
  77. awp_conformance-0.1.0a1/src/awp_conformance/world/t_resume.py +226 -0
  78. awp_conformance-0.1.0a1/src/awp_conformance/world/t_streaming.py +211 -0
  79. awp_conformance-0.1.0a1/src/awp_conformance/world/t_streams.py +190 -0
  80. awp_conformance-0.1.0a1/tests/__init__.py +0 -0
  81. awp_conformance-0.1.0a1/tests/conftest.py +81 -0
  82. awp_conformance-0.1.0a1/tests/test_agent.py +44 -0
  83. awp_conformance-0.1.0a1/tests/test_units.py +73 -0
  84. awp_conformance-0.1.0a1/tests/test_world.py +173 -0
  85. awp_conformance-0.1.0a1/uv.lock +825 -0
@@ -0,0 +1,15 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv*/
4
+ dist/
5
+ build/
6
+ *.egg-info/
7
+ .coverage
8
+ coverage.xml
9
+ htmlcov/
10
+ .mypy_cache/
11
+ .pytest_cache/
12
+ .ruff_cache/
13
+ .DS_Store
14
+ awp-audit/
15
+ traces/
@@ -0,0 +1,3 @@
1
+ [submodule "spec"]
2
+ path = spec
3
+ url = https://github.com/Hyperduality/agent-world-protocol.git
@@ -0,0 +1,10 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0a1
4
+
5
+ First release, targeting specification revision `0.1-draft.7`.
6
+
7
+ - `awp-conformance world`: passive checks on every message a world sends, and active tests for discovery, versioning, transport and security, session establishment, grants and subscriptions, the action lifecycle, idempotency, preemption, deadlines, closing, lockstep advancement and its clock, streaming delivery and telemetry, the watchdog, stale intents, resumption and replay, half-open connections, reconnect-window expiry, heartbeat loss, resets, session isolation, the e-stop, and the audit log.
8
+ - Beyond Core, when offered: the `ws` stream binding (with an independent binary frame decoder checked against every spec vector), task, approval, blend, transfer, seeding, snapshots and replay, and command channels.
9
+ - `awp-conformance agent`: a harness world and seven episodes of stimuli for agent requirements.
10
+ - Reports with a verdict per requirement and the claim wording it supports; wire traces per connection.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent 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
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to those parts of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to those parts of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Hyperduality and Agent World Protocol contributors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,101 @@
1
+ Metadata-Version: 2.5
2
+ Name: awp-conformance
3
+ Version: 0.1.0a1
4
+ Summary: Conformance suite for the Agent World Protocol: tests any world or agent against the requirement matrix.
5
+ Project-URL: Specification, https://www.agentworldprotocol.com/conformance/test-suite
6
+ Project-URL: Source, https://github.com/Hyperduality/awp-conformance
7
+ Author: Hyperduality
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Classifier: Topic :: Software Development :: Testing
15
+ Classifier: Typing :: Typed
16
+ Requires-Python: >=3.11
17
+ Requires-Dist: jsonschema>=4.23
18
+ Requires-Dist: websockets>=13.0
19
+ Description-Content-Type: text/markdown
20
+
21
+ # awp-conformance
22
+
23
+ The conformance suite for the [Agent World Protocol](https://www.agentworldprotocol.com). It tests a world at a WebSocket URL, or an agent launched against the suite's own harness world, against the [requirement matrix](https://www.agentworldprotocol.com/spec/requirements) of one specification revision, and reports a verdict per requirement ID.
24
+
25
+ It targets specification revision **`0.1-draft.7`**, pinned as the `spec/` submodule. The suite shares no code with any implementation: it speaks the protocol from the bundled canonical schemas, lifecycle table, and matrix.
26
+
27
+ ```bash
28
+ pip install awp-conformance
29
+ awp-conformance world ws://127.0.0.1:8710 --fixture my-world.json --out report/
30
+ awp-conformance agent --manifest manifest.json --frames frames.json -- python my_agent.py --url {url}
31
+ ```
32
+
33
+ ## Testing a world
34
+
35
+ The suite connects as one or more agents and checks everything the world sends: schemas in receiver and sender form, `status_seq` sequencing and replay, every action transition against the lifecycle table, frame sequencing per channel, closing, and integer bounds. Then it runs active tests named after the requirements they cover — idempotency, preemption, deadlines, the watchdog, resumption from a partial acknowledgement, half-open connections, resets, isolation between sessions, and more. `awp-conformance tests` lists them.
36
+
37
+ A manifest declares action types but not which parameter values make an action run long enough to interrupt, so a world supplies a **fixture**:
38
+
39
+ ```json
40
+ {
41
+ "embodiment": "arm_01",
42
+ "subscribe": ["proprio", "arm_state"],
43
+ "moves": [
44
+ { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [0.4, 0.4, 0.6], "q": [0, 0, 0, 1] } } },
45
+ { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [-0.4, 0.3, 0.2], "q": [0, 0, 0, 1] } } },
46
+ { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [0.0, -0.45, 0.5], "q": [0, 0, 0, 1] } } }
47
+ ],
48
+ "extended_min_ms": 1500,
49
+ "invalid": { "type": "move_to_pose", "params": { "pose": { "frame": "base" } } },
50
+ "outside_envelope": { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [0.9, 0, 0.4], "q": [0, 0, 0, 1] } } },
51
+ "operator": { "estop_engage": "kill -USR1 $WORLD_PID", "estop_release": "kill -USR2 $WORLD_PID" },
52
+ "audit_dir": "./awp-audit"
53
+ }
54
+ ```
55
+
56
+ | Key | Meaning |
57
+ |---|---|
58
+ | `moves` | Three or more extended actions in one concurrency group, at targets not on one line, each lasting at least `extended_min_ms` (streaming) or `extended_min_ticks` advances (lockstep). The suite always picks a target the embodiment is not near |
59
+ | `invalid` | Params that fail the type's schema (generated from the schema when absent) |
60
+ | `outside_envelope` | Params outside a declared envelope |
61
+ | `operator` | Shell commands that engage and release the e-stop |
62
+ | `audit_dir` | Where the world writes its audit log, if the suite can read it |
63
+ | `max_wait_s` | The longest single wait the suite does (default 45); `--slow` lifts it |
64
+ | `approver_token` | Bearer token of an approver connection, for worlds with `requires_approval` types |
65
+ | `approval_action` | The action to submit for approval (default: the first such type, with empty params) |
66
+ | `servo` | For command channels: `{ "action": {type, params}, "setpoint": {...}, "violation": {...} }` |
67
+
68
+ Beyond Core, the suite tests what the world offers: the `ws` stream binding, task, approval, blend, transfer, seeding, snapshots and replay, and command channels. `--profile sim` adds the sim profile to the claim.
69
+
70
+ `fixtures/awp-sim.json` is the fixture for the reference world.
71
+
72
+ ## Testing an agent
73
+
74
+ `awp-conformance agent` serves the manifest you give it from a scripted harness world, launches the agent once per episode (`{url}` and `{token}` in the command, or `$AWP_URL` and `$AWP_TOKEN`), and checks what the agent sends. The episodes add the stimuli that make agent requirements observable: unknown fields on every message, reserved frame flag bits, a redelivered terminal status, an unknown world request, a dropped connection, a world that falls silent, an invalid manifest, a session with no action grants, and a refused submission.
75
+
76
+ `--frames` gives a sample payload per channel, so the agent sees observations it can parse.
77
+
78
+ ## The report
79
+
80
+ Every requirement gets one outcome: `pass`, `fail`, `warn` (a SHOULD not met), `untested` (in scope but not exercised), `n/a` (outside the tested time models, gates, or declared features), `manual`, or `untestable`. The report states the claim the outcomes support (AWP-CNF-005):
81
+
82
+ - **AWP-conformant** — no failed and no untested requirement in scope, for the claimed classes and the named draft revision; manual evidence is attached separately.
83
+ - **self-assessed against 0.1-draft.N** — nothing failed, but some requirement in scope was not exercised.
84
+ - **not conformant** — something failed.
85
+
86
+ `--out DIR` writes `report.json` and a wire trace per connection in the specification's trace format.
87
+
88
+ ## Development
89
+
90
+ ```bash
91
+ git clone --recurse-submodules https://github.com/Hyperduality/awp-conformance
92
+ uv sync
93
+ uv run pytest # runs the suite against awp-sim, including deliberately broken worlds
94
+ uv run python scripts/sync_spec.py --check
95
+ ```
96
+
97
+ To move to a new draft revision: check out its tag in `spec/`, run `scripts/sync_spec.py`, update `SPEC_REVISION` in `src/awp_conformance/__init__.py`, and fix what the tests report.
98
+
99
+ ## License
100
+
101
+ Apache-2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,81 @@
1
+ # awp-conformance
2
+
3
+ The conformance suite for the [Agent World Protocol](https://www.agentworldprotocol.com). It tests a world at a WebSocket URL, or an agent launched against the suite's own harness world, against the [requirement matrix](https://www.agentworldprotocol.com/spec/requirements) of one specification revision, and reports a verdict per requirement ID.
4
+
5
+ It targets specification revision **`0.1-draft.7`**, pinned as the `spec/` submodule. The suite shares no code with any implementation: it speaks the protocol from the bundled canonical schemas, lifecycle table, and matrix.
6
+
7
+ ```bash
8
+ pip install awp-conformance
9
+ awp-conformance world ws://127.0.0.1:8710 --fixture my-world.json --out report/
10
+ awp-conformance agent --manifest manifest.json --frames frames.json -- python my_agent.py --url {url}
11
+ ```
12
+
13
+ ## Testing a world
14
+
15
+ The suite connects as one or more agents and checks everything the world sends: schemas in receiver and sender form, `status_seq` sequencing and replay, every action transition against the lifecycle table, frame sequencing per channel, closing, and integer bounds. Then it runs active tests named after the requirements they cover — idempotency, preemption, deadlines, the watchdog, resumption from a partial acknowledgement, half-open connections, resets, isolation between sessions, and more. `awp-conformance tests` lists them.
16
+
17
+ A manifest declares action types but not which parameter values make an action run long enough to interrupt, so a world supplies a **fixture**:
18
+
19
+ ```json
20
+ {
21
+ "embodiment": "arm_01",
22
+ "subscribe": ["proprio", "arm_state"],
23
+ "moves": [
24
+ { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [0.4, 0.4, 0.6], "q": [0, 0, 0, 1] } } },
25
+ { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [-0.4, 0.3, 0.2], "q": [0, 0, 0, 1] } } },
26
+ { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [0.0, -0.45, 0.5], "q": [0, 0, 0, 1] } } }
27
+ ],
28
+ "extended_min_ms": 1500,
29
+ "invalid": { "type": "move_to_pose", "params": { "pose": { "frame": "base" } } },
30
+ "outside_envelope": { "type": "move_to_pose", "params": { "pose": { "frame": "base", "p_m": [0.9, 0, 0.4], "q": [0, 0, 0, 1] } } },
31
+ "operator": { "estop_engage": "kill -USR1 $WORLD_PID", "estop_release": "kill -USR2 $WORLD_PID" },
32
+ "audit_dir": "./awp-audit"
33
+ }
34
+ ```
35
+
36
+ | Key | Meaning |
37
+ |---|---|
38
+ | `moves` | Three or more extended actions in one concurrency group, at targets not on one line, each lasting at least `extended_min_ms` (streaming) or `extended_min_ticks` advances (lockstep). The suite always picks a target the embodiment is not near |
39
+ | `invalid` | Params that fail the type's schema (generated from the schema when absent) |
40
+ | `outside_envelope` | Params outside a declared envelope |
41
+ | `operator` | Shell commands that engage and release the e-stop |
42
+ | `audit_dir` | Where the world writes its audit log, if the suite can read it |
43
+ | `max_wait_s` | The longest single wait the suite does (default 45); `--slow` lifts it |
44
+ | `approver_token` | Bearer token of an approver connection, for worlds with `requires_approval` types |
45
+ | `approval_action` | The action to submit for approval (default: the first such type, with empty params) |
46
+ | `servo` | For command channels: `{ "action": {type, params}, "setpoint": {...}, "violation": {...} }` |
47
+
48
+ Beyond Core, the suite tests what the world offers: the `ws` stream binding, task, approval, blend, transfer, seeding, snapshots and replay, and command channels. `--profile sim` adds the sim profile to the claim.
49
+
50
+ `fixtures/awp-sim.json` is the fixture for the reference world.
51
+
52
+ ## Testing an agent
53
+
54
+ `awp-conformance agent` serves the manifest you give it from a scripted harness world, launches the agent once per episode (`{url}` and `{token}` in the command, or `$AWP_URL` and `$AWP_TOKEN`), and checks what the agent sends. The episodes add the stimuli that make agent requirements observable: unknown fields on every message, reserved frame flag bits, a redelivered terminal status, an unknown world request, a dropped connection, a world that falls silent, an invalid manifest, a session with no action grants, and a refused submission.
55
+
56
+ `--frames` gives a sample payload per channel, so the agent sees observations it can parse.
57
+
58
+ ## The report
59
+
60
+ Every requirement gets one outcome: `pass`, `fail`, `warn` (a SHOULD not met), `untested` (in scope but not exercised), `n/a` (outside the tested time models, gates, or declared features), `manual`, or `untestable`. The report states the claim the outcomes support (AWP-CNF-005):
61
+
62
+ - **AWP-conformant** — no failed and no untested requirement in scope, for the claimed classes and the named draft revision; manual evidence is attached separately.
63
+ - **self-assessed against 0.1-draft.N** — nothing failed, but some requirement in scope was not exercised.
64
+ - **not conformant** — something failed.
65
+
66
+ `--out DIR` writes `report.json` and a wire trace per connection in the specification's trace format.
67
+
68
+ ## Development
69
+
70
+ ```bash
71
+ git clone --recurse-submodules https://github.com/Hyperduality/awp-conformance
72
+ uv sync
73
+ uv run pytest # runs the suite against awp-sim, including deliberately broken worlds
74
+ uv run python scripts/sync_spec.py --check
75
+ ```
76
+
77
+ To move to a new draft revision: check out its tag in `spec/`, run `scripts/sync_spec.py`, update `SPEC_REVISION` in `src/awp_conformance/__init__.py`, and fix what the tests report.
78
+
79
+ ## License
80
+
81
+ Apache-2.0. See [LICENSE](LICENSE).
@@ -0,0 +1,127 @@
1
+ {
2
+ "embodiment": "arm_01",
3
+ "subscribe": [
4
+ "proprio",
5
+ "arm_state"
6
+ ],
7
+ "moves": [
8
+ {
9
+ "type": "move_to_pose",
10
+ "params": {
11
+ "pose": {
12
+ "frame": "base",
13
+ "p_m": [
14
+ 0.4,
15
+ 0.4,
16
+ 0.6
17
+ ],
18
+ "q": [
19
+ 0,
20
+ 0,
21
+ 0,
22
+ 1
23
+ ]
24
+ }
25
+ }
26
+ },
27
+ {
28
+ "type": "move_to_pose",
29
+ "params": {
30
+ "pose": {
31
+ "frame": "base",
32
+ "p_m": [
33
+ -0.4,
34
+ 0.3,
35
+ 0.2
36
+ ],
37
+ "q": [
38
+ 0,
39
+ 0,
40
+ 0,
41
+ 1
42
+ ]
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "type": "move_to_pose",
48
+ "params": {
49
+ "pose": {
50
+ "frame": "base",
51
+ "p_m": [
52
+ 0.0,
53
+ -0.45,
54
+ 0.5
55
+ ],
56
+ "q": [
57
+ 0,
58
+ 0,
59
+ 0,
60
+ 1
61
+ ]
62
+ }
63
+ }
64
+ }
65
+ ],
66
+ "extended_min_ms": 1500,
67
+ "extended_min_ticks": 20,
68
+ "instant": {
69
+ "type": "stop",
70
+ "params": {}
71
+ },
72
+ "invalid": {
73
+ "type": "move_to_pose",
74
+ "params": {
75
+ "pose": {
76
+ "frame": "base"
77
+ }
78
+ }
79
+ },
80
+ "outside_envelope": {
81
+ "type": "move_to_pose",
82
+ "params": {
83
+ "pose": {
84
+ "frame": "base",
85
+ "p_m": [
86
+ 0.9,
87
+ 0.0,
88
+ 0.4
89
+ ],
90
+ "q": [
91
+ 0,
92
+ 0,
93
+ 0,
94
+ 1
95
+ ]
96
+ }
97
+ }
98
+ },
99
+ "initial_state": "home",
100
+ "operator": {
101
+ "estop_engage": "kill -USR1 $AWP_SIM_PID",
102
+ "estop_release": "kill -USR2 $AWP_SIM_PID"
103
+ },
104
+ "audit_dir": "awp-audit",
105
+ "max_wait_s": 45,
106
+ "approver_token": "conformance-approver",
107
+ "servo": {
108
+ "action": {
109
+ "type": "servo",
110
+ "params": {}
111
+ },
112
+ "setpoint": {
113
+ "v_mps": [
114
+ 0.05,
115
+ 0.0,
116
+ 0.0
117
+ ]
118
+ },
119
+ "violation": {
120
+ "v_mps": [
121
+ 2.0,
122
+ 0.0,
123
+ 0.0
124
+ ]
125
+ }
126
+ }
127
+ }
@@ -0,0 +1,82 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.25"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "awp-conformance"
7
+ version = "0.1.0a1"
8
+ description = "Conformance suite for the Agent World Protocol: tests any world or agent against the requirement matrix."
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.11"
13
+ authors = [{ name = "Hyperduality" }]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Topic :: Software Development :: Testing",
20
+ "Typing :: Typed",
21
+ ]
22
+ dependencies = [
23
+ "jsonschema>=4.23",
24
+ "websockets>=13.0",
25
+ ]
26
+
27
+ [project.urls]
28
+ Specification = "https://www.agentworldprotocol.com/conformance/test-suite"
29
+ Source = "https://github.com/Hyperduality/awp-conformance"
30
+
31
+ [project.scripts]
32
+ awp-conformance = "awp_conformance.cli:main"
33
+
34
+ [dependency-groups]
35
+ dev = [
36
+ "awp-python",
37
+ "mypy>=1.13",
38
+ "pytest>=8.3",
39
+ "pytest-asyncio>=0.24",
40
+ "pyyaml>=6.0",
41
+ "ruff>=0.8",
42
+ "types-jsonschema",
43
+ "types-pyyaml",
44
+ ]
45
+
46
+ [tool.uv.sources]
47
+ awp-python = { git = "https://github.com/Hyperduality/awp-python", branch = "main" }
48
+
49
+ [tool.hatch.build.targets.wheel]
50
+ packages = ["src/awp_conformance"]
51
+
52
+ [tool.hatch.build.targets.sdist]
53
+ exclude = ["/spec", "/.github"]
54
+
55
+ [tool.ruff]
56
+ line-length = 100
57
+ target-version = "py311"
58
+
59
+ [tool.ruff.lint]
60
+ select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF", "PT", "ASYNC", "C4", "PIE", "RET"]
61
+ ignore = ["ASYNC109"]
62
+
63
+ [tool.mypy]
64
+ strict = true
65
+ python_version = "3.11"
66
+ files = ["src", "tests", "scripts"]
67
+
68
+ [[tool.mypy.overrides]]
69
+ module = ["tests.*"]
70
+ disallow_untyped_defs = false
71
+ disallow_incomplete_defs = false
72
+ disallow_untyped_calls = false
73
+
74
+ [[tool.mypy.overrides]]
75
+ module = ["awp.*", "awp_sim.*"]
76
+ follow_untyped_imports = true
77
+
78
+ [tool.pytest.ini_options]
79
+ testpaths = ["tests"]
80
+ asyncio_mode = "auto"
81
+ asyncio_default_fixture_loop_scope = "function"
82
+ addopts = "-ra --strict-markers"