wspx 0.1.0.dev0__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.
- wspx-0.1.0.dev0/.gitignore +42 -0
- wspx-0.1.0.dev0/LICENSE +201 -0
- wspx-0.1.0.dev0/PKG-INFO +278 -0
- wspx-0.1.0.dev0/README.md +205 -0
- wspx-0.1.0.dev0/pyproject.toml +163 -0
- wspx-0.1.0.dev0/src/wspx/__init__.py +24 -0
- wspx-0.1.0.dev0/src/wspx/_version.py +1 -0
- wspx-0.1.0.dev0/src/wspx/addressing.py +415 -0
- wspx-0.1.0.dev0/src/wspx/auth.py +77 -0
- wspx-0.1.0.dev0/src/wspx/cli/__init__.py +1 -0
- wspx-0.1.0.dev0/src/wspx/cli/client.py +124 -0
- wspx-0.1.0.dev0/src/wspx/cli/config.py +89 -0
- wspx-0.1.0.dev0/src/wspx/cli/connect.py +88 -0
- wspx-0.1.0.dev0/src/wspx/cli/main.py +848 -0
- wspx-0.1.0.dev0/src/wspx/cloud/__init__.py +20 -0
- wspx-0.1.0.dev0/src/wspx/cloud/app.py +191 -0
- wspx-0.1.0.dev0/src/wspx/cloud/backend.py +141 -0
- wspx-0.1.0.dev0/src/wspx/cloud/compose.py +85 -0
- wspx-0.1.0.dev0/src/wspx/cloud/deploy.py +102 -0
- wspx-0.1.0.dev0/src/wspx/config.py +189 -0
- wspx-0.1.0.dev0/src/wspx/control/__init__.py +5 -0
- wspx-0.1.0.dev0/src/wspx/control/app.py +488 -0
- wspx-0.1.0.dev0/src/wspx/control/backend.py +244 -0
- wspx-0.1.0.dev0/src/wspx/control/gateway_client.py +79 -0
- wspx-0.1.0.dev0/src/wspx/control/mcp_server.py +71 -0
- wspx-0.1.0.dev0/src/wspx/control/sessions.py +424 -0
- wspx-0.1.0.dev0/src/wspx/control/tracedb.py +183 -0
- wspx-0.1.0.dev0/src/wspx/control/ui/assets/index-BJFweZAn.css +1 -0
- wspx-0.1.0.dev0/src/wspx/control/ui/assets/index-DhUVhWIK.js +10 -0
- wspx-0.1.0.dev0/src/wspx/control/ui/index.html +13 -0
- wspx-0.1.0.dev0/src/wspx/control/views.py +180 -0
- wspx-0.1.0.dev0/src/wspx/diagnostics.py +146 -0
- wspx-0.1.0.dev0/src/wspx/driver/__init__.py +7 -0
- wspx-0.1.0.dev0/src/wspx/driver/loop.py +255 -0
- wspx-0.1.0.dev0/src/wspx/driver/messages.py +62 -0
- wspx-0.1.0.dev0/src/wspx/driver/providers/__init__.py +84 -0
- wspx-0.1.0.dev0/src/wspx/driver/providers/anthropic.py +149 -0
- wspx-0.1.0.dev0/src/wspx/driver/providers/compat.py +115 -0
- wspx-0.1.0.dev0/src/wspx/driver/providers/google.py +138 -0
- wspx-0.1.0.dev0/src/wspx/driver/providers/openai.py +125 -0
- wspx-0.1.0.dev0/src/wspx/driver/run.py +134 -0
- wspx-0.1.0.dev0/src/wspx/errors.py +69 -0
- wspx-0.1.0.dev0/src/wspx/gateway/__init__.py +8 -0
- wspx-0.1.0.dev0/src/wspx/gateway/app.py +626 -0
- wspx-0.1.0.dev0/src/wspx/gateway/ledger.py +536 -0
- wspx-0.1.0.dev0/src/wspx/gateway/prices.py +75 -0
- wspx-0.1.0.dev0/src/wspx/gateway/usage.py +284 -0
- wspx-0.1.0.dev0/src/wspx/handles.py +117 -0
- wspx-0.1.0.dev0/src/wspx/integrations/AGENTS.snippet.md +8 -0
- wspx-0.1.0.dev0/src/wspx/integrations/SKILL.md +52 -0
- wspx-0.1.0.dev0/src/wspx/integrations/__init__.py +17 -0
- wspx-0.1.0.dev0/src/wspx/integrations/claude-plugin/.claude-plugin/plugin.json +30 -0
- wspx-0.1.0.dev0/src/wspx/integrations/claude-plugin/skills/wspx/SKILL.md +52 -0
- wspx-0.1.0.dev0/src/wspx/integrations/codex-hooks.toml +9 -0
- wspx-0.1.0.dev0/src/wspx/lab/__init__.py +5 -0
- wspx-0.1.0.dev0/src/wspx/lab/analysis.py +485 -0
- wspx-0.1.0.dev0/src/wspx/lab/check.py +489 -0
- wspx-0.1.0.dev0/src/wspx/lab/evaluate.py +108 -0
- wspx-0.1.0.dev0/src/wspx/lab/export.py +275 -0
- wspx-0.1.0.dev0/src/wspx/lab/grep.py +754 -0
- wspx-0.1.0.dev0/src/wspx/lab/index.py +239 -0
- wspx-0.1.0.dev0/src/wspx/lab/ir/__init__.py +1 -0
- wspx-0.1.0.dev0/src/wspx/lab/ir/capture.py +299 -0
- wspx-0.1.0.dev0/src/wspx/lab/ir/graph.py +148 -0
- wspx-0.1.0.dev0/src/wspx/lab/ir/model_ir.py +522 -0
- wspx-0.1.0.dev0/src/wspx/lab/ir/semantics.py +1255 -0
- wspx-0.1.0.dev0/src/wspx/lab/ir/tape.py +853 -0
- wspx-0.1.0.dev0/src/wspx/lab/loader.py +204 -0
- wspx-0.1.0.dev0/src/wspx/lab/merge.py +200 -0
- wspx-0.1.0.dev0/src/wspx/lab/ops/__init__.py +76 -0
- wspx-0.1.0.dev0/src/wspx/lab/ops/builtin.py +379 -0
- wspx-0.1.0.dev0/src/wspx/lab/patch.py +320 -0
- wspx-0.1.0.dev0/src/wspx/lab/probe.py +206 -0
- wspx-0.1.0.dev0/src/wspx/lab/results.py +114 -0
- wspx-0.1.0.dev0/src/wspx/lab/sdk.py +120 -0
- wspx-0.1.0.dev0/src/wspx/lab/server.py +236 -0
- wspx-0.1.0.dev0/src/wspx/lab/session.py +1574 -0
- wspx-0.1.0.dev0/src/wspx/lab/tensors.py +119 -0
- wspx-0.1.0.dev0/src/wspx/lab/text.py +69 -0
- wspx-0.1.0.dev0/src/wspx/lab/tree.py +302 -0
- wspx-0.1.0.dev0/src/wspx/loops.py +127 -0
- wspx-0.1.0.dev0/src/wspx/project.py +143 -0
- wspx-0.1.0.dev0/src/wspx/py.typed +0 -0
- wspx-0.1.0.dev0/src/wspx/safety/__init__.py +15 -0
- wspx-0.1.0.dev0/src/wspx/safety/kill.py +47 -0
- wspx-0.1.0.dev0/src/wspx/safety/sweeper.py +68 -0
- wspx-0.1.0.dev0/src/wspx/store/__init__.py +64 -0
- wspx-0.1.0.dev0/src/wspx/store/objects.py +130 -0
- wspx-0.1.0.dev0/src/wspx/store/overlay.py +209 -0
- wspx-0.1.0.dev0/src/wspx/store/refs.py +150 -0
- wspx-0.1.0.dev0/src/wspx/testing/__init__.py +21 -0
- wspx-0.1.0.dev0/src/wspx/testing/api.py +155 -0
- wspx-0.1.0.dev0/src/wspx/testing/builtin.py +139 -0
- wspx-0.1.0.dev0/src/wspx/testing/runner.py +257 -0
- wspx-0.1.0.dev0/src/wspx/tools/__init__.py +17 -0
- wspx-0.1.0.dev0/src/wspx/tools/dispatch.py +129 -0
- wspx-0.1.0.dev0/src/wspx/tools/schemas.py +313 -0
- wspx-0.1.0.dev0/src/wspx/vcs/__init__.py +17 -0
- wspx-0.1.0.dev0/src/wspx/vcs/repo.py +431 -0
- wspx-0.1.0.dev0/tests/__init__.py +0 -0
- wspx-0.1.0.dev0/tests/control/__init__.py +0 -0
- wspx-0.1.0.dev0/tests/control/test_control.py +331 -0
- wspx-0.1.0.dev0/tests/driver/__init__.py +0 -0
- wspx-0.1.0.dev0/tests/driver/test_loop.py +193 -0
- wspx-0.1.0.dev0/tests/driver/test_providers.py +244 -0
- wspx-0.1.0.dev0/tests/gateway/__init__.py +0 -0
- wspx-0.1.0.dev0/tests/gateway/test_gateway.py +447 -0
- wspx-0.1.0.dev0/tests/lab/__init__.py +0 -0
- wspx-0.1.0.dev0/tests/lab/conftest.py +60 -0
- wspx-0.1.0.dev0/tests/lab/test_analysis.py +190 -0
- wspx-0.1.0.dev0/tests/lab/test_conformance.py +290 -0
- wspx-0.1.0.dev0/tests/lab/test_dispatch.py +47 -0
- wspx-0.1.0.dev0/tests/lab/test_edit.py +334 -0
- wspx-0.1.0.dev0/tests/lab/test_ir.py +168 -0
- wspx-0.1.0.dev0/tests/lab/test_merge_export.py +134 -0
- wspx-0.1.0.dev0/tests/lab/test_overlay.py +74 -0
- wspx-0.1.0.dev0/tests/lab/test_session.py +283 -0
- wspx-0.1.0.dev0/tests/test_addressing.py +165 -0
- wspx-0.1.0.dev0/tests/test_auth.py +36 -0
- wspx-0.1.0.dev0/tests/test_cli.py +158 -0
- wspx-0.1.0.dev0/tests/test_cloud.py +101 -0
- wspx-0.1.0.dev0/tests/test_config.py +93 -0
- wspx-0.1.0.dev0/tests/test_diagnostics.py +59 -0
- wspx-0.1.0.dev0/tests/test_project.py +111 -0
- wspx-0.1.0.dev0/tests/test_safety.py +31 -0
- wspx-0.1.0.dev0/tests/test_store.py +93 -0
- wspx-0.1.0.dev0/tests/test_tools.py +50 -0
- wspx-0.1.0.dev0/tests/test_vcs.py +102 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Byte-compiled / cached
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# Build and packaging
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
.eggs/
|
|
11
|
+
wheels/
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
|
|
18
|
+
# Test, lint and type-check caches
|
|
19
|
+
.pytest_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
.mypy_cache/
|
|
22
|
+
.coverage
|
|
23
|
+
.coverage.*
|
|
24
|
+
coverage.xml
|
|
25
|
+
htmlcov/
|
|
26
|
+
.hypothesis/
|
|
27
|
+
|
|
28
|
+
# Secrets and local config
|
|
29
|
+
.env
|
|
30
|
+
.env.*
|
|
31
|
+
|
|
32
|
+
# Editors and OS
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
*.swp
|
|
36
|
+
.DS_Store
|
|
37
|
+
|
|
38
|
+
# Local design notes (not part of the distribution)
|
|
39
|
+
harness-plan.md
|
|
40
|
+
|
|
41
|
+
# UI build dependencies (the built bundle lives in src/wspx/control/ui)
|
|
42
|
+
ui/node_modules/
|
wspx-0.1.0.dev0/LICENSE
ADDED
|
@@ -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 any part 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 any part 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 Ritik Bompilwar
|
|
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.
|
wspx-0.1.0.dev0/PKG-INFO
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: wspx
|
|
3
|
+
Version: 0.1.0.dev0
|
|
4
|
+
Summary: Grep, edit, check, test and version-control model weights. A sandboxed harness for AI agents.
|
|
5
|
+
Project-URL: Homepage, https://github.com/RITIK-12/wspx
|
|
6
|
+
Project-URL: Source, https://github.com/RITIK-12/wspx
|
|
7
|
+
Project-URL: Issues, https://github.com/RITIK-12/wspx/issues
|
|
8
|
+
Author: Ritik Bompilwar
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agents,interpretability,llm,mcp,model-editing,pytorch,transformers,version-control
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
|
+
Requires-Dist: httpx>=0.28
|
|
26
|
+
Requires-Dist: mcp>=2.3
|
|
27
|
+
Requires-Dist: modal>=1.6.4
|
|
28
|
+
Requires-Dist: pydantic>=2.14
|
|
29
|
+
Requires-Dist: typer>=0.29
|
|
30
|
+
Provides-Extra: all
|
|
31
|
+
Requires-Dist: accelerate>=1.16; extra == 'all'
|
|
32
|
+
Requires-Dist: anthropic>=2.11; extra == 'all'
|
|
33
|
+
Requires-Dist: fastapi>=0.165; extra == 'all'
|
|
34
|
+
Requires-Dist: gguf>=0.19; extra == 'all'
|
|
35
|
+
Requires-Dist: google-genai>=3.6; extra == 'all'
|
|
36
|
+
Requires-Dist: huggingface-hub>=2.4; extra == 'all'
|
|
37
|
+
Requires-Dist: numpy>=2.0; extra == 'all'
|
|
38
|
+
Requires-Dist: openai>=3.56; extra == 'all'
|
|
39
|
+
Requires-Dist: peft>=0.22; extra == 'all'
|
|
40
|
+
Requires-Dist: pyarrow>=26; extra == 'all'
|
|
41
|
+
Requires-Dist: safetensors>=0.8; extra == 'all'
|
|
42
|
+
Requires-Dist: sse-starlette>=3.7; extra == 'all'
|
|
43
|
+
Requires-Dist: starlette>=1.10; extra == 'all'
|
|
44
|
+
Requires-Dist: torch>=2.15; extra == 'all'
|
|
45
|
+
Requires-Dist: transformers>=5.23; extra == 'all'
|
|
46
|
+
Requires-Dist: uvicorn>=0.54; extra == 'all'
|
|
47
|
+
Provides-Extra: control
|
|
48
|
+
Requires-Dist: fastapi>=0.165; extra == 'control'
|
|
49
|
+
Requires-Dist: pyarrow>=26; extra == 'control'
|
|
50
|
+
Requires-Dist: sse-starlette>=3.7; extra == 'control'
|
|
51
|
+
Requires-Dist: uvicorn>=0.54; extra == 'control'
|
|
52
|
+
Provides-Extra: driver
|
|
53
|
+
Requires-Dist: anthropic>=2.11; extra == 'driver'
|
|
54
|
+
Requires-Dist: google-genai>=3.6; extra == 'driver'
|
|
55
|
+
Requires-Dist: openai>=3.56; extra == 'driver'
|
|
56
|
+
Provides-Extra: gateway
|
|
57
|
+
Requires-Dist: starlette>=1.10; extra == 'gateway'
|
|
58
|
+
Requires-Dist: uvicorn>=0.54; extra == 'gateway'
|
|
59
|
+
Provides-Extra: lab
|
|
60
|
+
Requires-Dist: accelerate>=1.16; extra == 'lab'
|
|
61
|
+
Requires-Dist: gguf>=0.19; extra == 'lab'
|
|
62
|
+
Requires-Dist: huggingface-hub>=2.4; extra == 'lab'
|
|
63
|
+
Requires-Dist: numpy>=2.0; extra == 'lab'
|
|
64
|
+
Requires-Dist: pyarrow>=26; extra == 'lab'
|
|
65
|
+
Requires-Dist: safetensors>=0.8; extra == 'lab'
|
|
66
|
+
Requires-Dist: starlette>=1.10; extra == 'lab'
|
|
67
|
+
Requires-Dist: torch>=2.15; extra == 'lab'
|
|
68
|
+
Requires-Dist: transformers>=5.23; extra == 'lab'
|
|
69
|
+
Requires-Dist: uvicorn>=0.54; extra == 'lab'
|
|
70
|
+
Provides-Extra: peft
|
|
71
|
+
Requires-Dist: peft>=0.22; extra == 'peft'
|
|
72
|
+
Description-Content-Type: text/markdown
|
|
73
|
+
|
|
74
|
+
# wspx
|
|
75
|
+
|
|
76
|
+
Grep, edit, check, test and version-control model weights.
|
|
77
|
+
|
|
78
|
+
wspx gives an AI agent (or you) the tools to change a model's weights the way it
|
|
79
|
+
changes code: search them, make targeted edits, check each edit, run tests
|
|
80
|
+
against the base, and commit or revert. It runs in your own
|
|
81
|
+
[Modal](https://modal.com) account with your own provider keys.
|
|
82
|
+
|
|
83
|
+
## Install
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pip install wspx
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Set up
|
|
90
|
+
|
|
91
|
+
Once per machine and account:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
wspx login # link your Modal account
|
|
95
|
+
wspx keys set anthropic # or openai, google, hf
|
|
96
|
+
wspx deploy
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Keys are stored as secrets in your Modal account and shared by every project
|
|
100
|
+
and session. `wspx keys list` shows which are set and checks that each works;
|
|
101
|
+
`wspx keys rm <provider>` removes one.
|
|
102
|
+
|
|
103
|
+
## Projects
|
|
104
|
+
|
|
105
|
+
A project is a directory with a `wspx.toml`. Sessions started inside it take
|
|
106
|
+
their defaults from it, and its files (test suites, prompt sets, scripts) are
|
|
107
|
+
uploaded to the session's lab.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
mkdir loops && cd loops
|
|
111
|
+
wspx init --model Qwen/Qwen3-0.6B --driver anthropic:claude-opus-5-5 --gpu L4
|
|
112
|
+
wspx new "The model loops on 'Wait'. Find the direction responsible and remove it without hurting math."
|
|
113
|
+
wspx open # watch the session in the browser
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`wspx sessions` lists the project's sessions (`--all` for every project). Each
|
|
117
|
+
project has its own current session, which the commands below act on; pass
|
|
118
|
+
`--session` to pick another.
|
|
119
|
+
|
|
120
|
+
## Commands
|
|
121
|
+
|
|
122
|
+
Every tool the agent has is also a command:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
wspx info
|
|
126
|
+
wspx grep 'writes(" Wait") > 0.3' --in 'L*.mlp.down' --top 5
|
|
127
|
+
wspx contrast data/loops.jsonl data/clean.jsonl --name loop
|
|
128
|
+
wspx edit project_out direction=dir:loop 'targets=["L15.mlp.down","L19.mlp.down"]' cols=@r1
|
|
129
|
+
wspx check
|
|
130
|
+
wspx test --vs base
|
|
131
|
+
wspx vcs commit -m "Project out the loop direction in L15/L19 down_proj"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
| Tool | Does |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `info` | Outline of the model: blocks, layer types, residual stream |
|
|
137
|
+
| `ls` | Addresses matching a scope |
|
|
138
|
+
| `grep` | Ranks weight units by an expression, or by what fires on prompts |
|
|
139
|
+
| `show` | Stats, histogram, spectrum and vocabulary of a slice |
|
|
140
|
+
| `contrast` | A direction from two prompt sets, and its top writers |
|
|
141
|
+
| `generate` | Samples from the current weights |
|
|
142
|
+
| `trace` | Logit lens and top writers; diff (`--vs`) and attribution traces |
|
|
143
|
+
| `edit` | Stages `ablate`, `set`, `scale`, `project_out`, `bake_steer`, `rank_one_write`, `transplant` or `orthogonalize` |
|
|
144
|
+
| `check` | Static, numeric and smoke diagnostics, each with suggested fixes |
|
|
145
|
+
| `test` | Test suites, paired against another revision |
|
|
146
|
+
| `vcs` | `status`, `diff`, `commit`, `log`, `checkout`, `branch`, `revert`, `bisect`, `blame`, `merge` |
|
|
147
|
+
| `export` | Merged safetensors, PEFT adapter, GGUF or a portable bundle |
|
|
148
|
+
| `run` | A Python script in the lab, with the SDK loaded |
|
|
149
|
+
| `jobs` | Status and results of long-running jobs |
|
|
150
|
+
|
|
151
|
+
Weights are addressed by role, derived from the model's actual computation:
|
|
152
|
+
`L19.mlp.down[:, 8812]`, `L7.attn.q.h3`, `L12.moe.e5.up`, `embed[" Wait"]`.
|
|
153
|
+
Raw parameter names work too. Results come back as handles (`@r1`, `dir:loop`,
|
|
154
|
+
`p_8f2a91c0`) that later commands accept.
|
|
155
|
+
|
|
156
|
+
## Claude Code and Codex
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
wspx connect claude # or: wspx connect codex
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Adds the wspx MCP server, the wspx skill, and hooks that record the agent's
|
|
163
|
+
steps in the session trace.
|
|
164
|
+
|
|
165
|
+
## Python
|
|
166
|
+
|
|
167
|
+
With a GPU (or a small model on CPU) the lab can run in your own process:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
pip install "wspx[lab]"
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
import wspx
|
|
175
|
+
|
|
176
|
+
m = wspx.session("Qwen/Qwen3-0.6B", store="./wspx-store")
|
|
177
|
+
hits = m.grep('writes(" Wait") > 0.3', scope="L*.mlp.down", top=50)
|
|
178
|
+
d = m.contrast("data/loops.jsonl", "data/clean.jsonl", name="loop")
|
|
179
|
+
p = m.edit.project_out(d, ["L15.mlp.down", "L19.mlp.down"], cols=hits)
|
|
180
|
+
print(m.check(p).summary())
|
|
181
|
+
print(m.commit("Project out the loop direction"))
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Tests
|
|
185
|
+
|
|
186
|
+
Suites live in `wtests/`, as Python or YAML:
|
|
187
|
+
|
|
188
|
+
```python
|
|
189
|
+
from wspx.testing import expect, load_jsonl, suite
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
@suite(split="dev")
|
|
193
|
+
def math_finishes(model):
|
|
194
|
+
for item in load_jsonl("data/math_dev.jsonl"):
|
|
195
|
+
out = model.generate(item["prompt"], max_tokens=4096)
|
|
196
|
+
yield expect.regex(out, item["answer_regex"])
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
`wspx test --vs <revision>` runs them item by item against another revision and
|
|
200
|
+
reports confidence intervals. Suites with `split="heldout"` show the agent only
|
|
201
|
+
aggregate scores. The built-in `canary` and `regression` suites need no data.
|
|
202
|
+
|
|
203
|
+
## Configuration
|
|
204
|
+
|
|
205
|
+
`wspx.toml`, all sections optional:
|
|
206
|
+
|
|
207
|
+
```toml
|
|
208
|
+
[project]
|
|
209
|
+
name = "loops"
|
|
210
|
+
exclude = ["data/raw"] # kept out of the upload, on top of .git, venvs, caches and weights
|
|
211
|
+
|
|
212
|
+
[model]
|
|
213
|
+
id = "Qwen/Qwen3-0.6B"
|
|
214
|
+
dtype = "bfloat16"
|
|
215
|
+
|
|
216
|
+
[driver]
|
|
217
|
+
model = "anthropic:claude-opus-5-5"
|
|
218
|
+
|
|
219
|
+
[lab]
|
|
220
|
+
gpu = "L4"
|
|
221
|
+
grace = "15m" # keep the lab warm this long after the session goes idle
|
|
222
|
+
|
|
223
|
+
[check]
|
|
224
|
+
max_rel_norm = 0.05
|
|
225
|
+
max_canary_kl = 0.10
|
|
226
|
+
|
|
227
|
+
[tests]
|
|
228
|
+
paths = ["wtests/"]
|
|
229
|
+
|
|
230
|
+
[policy]
|
|
231
|
+
protected_branches = ["main"]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Spend and safety
|
|
235
|
+
|
|
236
|
+
wspx sets no spend limits unless you ask for them. Every model call goes
|
|
237
|
+
through a gateway in your deployment, which meters it and enforces the limits
|
|
238
|
+
you set:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
wspx limits set day dollars 50
|
|
242
|
+
wspx limits set session calls 400
|
|
243
|
+
wspx usage
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Sessions that repeat themselves are nudged, then paused. Idle labs are shut
|
|
247
|
+
down. To stop everything:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
wspx kill --all # stop all sessions and halt model calls
|
|
251
|
+
wspx kill --hard # with only your Modal token, even if the deployment is down
|
|
252
|
+
wspx resume
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Labs run in Modal sandboxes with no network access and no secrets.
|
|
256
|
+
|
|
257
|
+
## Supported models
|
|
258
|
+
|
|
259
|
+
Any PyTorch model whose forward pass runs. Tested against Llama, Mistral,
|
|
260
|
+
Qwen3, Qwen3-MoE, Qwen3.5, Gemma 3, Gemma 4, Phi-3/Phi-4, OLMo 2, GPT-2,
|
|
261
|
+
Falcon, Mixtral, gpt-oss, DeepSeek-V3, Jamba, Bamba, Mamba, ViT and ResNet, and
|
|
262
|
+
plain MLPs, CNNs, LSTMs and GRUs.
|
|
263
|
+
|
|
264
|
+
## Development
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
uv sync --extra all --group dev
|
|
268
|
+
uv run pytest
|
|
269
|
+
uv run ruff check && uv run ruff format --check
|
|
270
|
+
uv run mypy
|
|
271
|
+
cd ui && npm install && npm run build
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
`wspx deploy` run from a source checkout deploys that checkout.
|
|
275
|
+
|
|
276
|
+
## License
|
|
277
|
+
|
|
278
|
+
Apache-2.0
|