ws-aitoolkit 0.0.0__tar.gz → 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.
Potentially problematic release.
This version of ws-aitoolkit might be problematic. Click here for more details.
- ws_aitoolkit-0.1.0/LICENSE +202 -0
- ws_aitoolkit-0.1.0/NOTICE +6 -0
- ws_aitoolkit-0.1.0/PKG-INFO +136 -0
- ws_aitoolkit-0.1.0/README.md +119 -0
- ws_aitoolkit-0.1.0/pyproject.toml +47 -0
- ws_aitoolkit-0.1.0/pyproject.toml.orig +41 -0
- ws_aitoolkit-0.1.0/src/ws/__init__.py +10 -0
- ws_aitoolkit-0.1.0/src/ws/__main__.py +3 -0
- ws_aitoolkit-0.1.0/src/ws/_build.py +6 -0
- ws_aitoolkit-0.1.0/src/ws/adapters/__init__.py +68 -0
- ws_aitoolkit-0.1.0/src/ws/adapters/claude_code.py +353 -0
- ws_aitoolkit-0.1.0/src/ws/adapters/opencode.py +286 -0
- ws_aitoolkit-0.1.0/src/ws/adapters/opencode_plugin.py +126 -0
- ws_aitoolkit-0.1.0/src/ws/approvals.py +415 -0
- ws_aitoolkit-0.1.0/src/ws/broker.py +997 -0
- ws_aitoolkit-0.1.0/src/ws/canary.py +381 -0
- ws_aitoolkit-0.1.0/src/ws/cli.py +292 -0
- ws_aitoolkit-0.1.0/src/ws/config_cmd.py +115 -0
- ws_aitoolkit-0.1.0/src/ws/devices.py +78 -0
- ws_aitoolkit-0.1.0/src/ws/doctor.py +288 -0
- ws_aitoolkit-0.1.0/src/ws/eval.py +1702 -0
- ws_aitoolkit-0.1.0/src/ws/evalstats.py +490 -0
- ws_aitoolkit-0.1.0/src/ws/frontmatter.py +298 -0
- ws_aitoolkit-0.1.0/src/ws/gate.py +210 -0
- ws_aitoolkit-0.1.0/src/ws/globals.py +448 -0
- ws_aitoolkit-0.1.0/src/ws/install.py +780 -0
- ws_aitoolkit-0.1.0/src/ws/jobs.py +384 -0
- ws_aitoolkit-0.1.0/src/ws/jsonl.py +252 -0
- ws_aitoolkit-0.1.0/src/ws/mcp_server.py +264 -0
- ws_aitoolkit-0.1.0/src/ws/memory.py +506 -0
- ws_aitoolkit-0.1.0/src/ws/modules.py +303 -0
- ws_aitoolkit-0.1.0/src/ws/notes.py +120 -0
- ws_aitoolkit-0.1.0/src/ws/notesdetect.py +85 -0
- ws_aitoolkit-0.1.0/src/ws/osinfo.py +62 -0
- ws_aitoolkit-0.1.0/src/ws/output.py +194 -0
- ws_aitoolkit-0.1.0/src/ws/policy.py +1418 -0
- ws_aitoolkit-0.1.0/src/ws/profile.py +115 -0
- ws_aitoolkit-0.1.0/src/ws/rating.py +102 -0
- ws_aitoolkit-0.1.0/src/ws/roles/__init__.py +90 -0
- ws_aitoolkit-0.1.0/src/ws/roles/_schedule.py +84 -0
- ws_aitoolkit-0.1.0/src/ws/roles/anthropic.py +46 -0
- ws_aitoolkit-0.1.0/src/ws/roles/commands.py +221 -0
- ws_aitoolkit-0.1.0/src/ws/roles/launchd.py +122 -0
- ws_aitoolkit-0.1.0/src/ws/roles/markdown_git.py +31 -0
- ws_aitoolkit-0.1.0/src/ws/roles/notify_none.py +15 -0
- ws_aitoolkit-0.1.0/src/ws/roles/ntfy.py +287 -0
- ws_aitoolkit-0.1.0/src/ws/roles/opencode.py +71 -0
- ws_aitoolkit-0.1.0/src/ws/roles/restic.py +358 -0
- ws_aitoolkit-0.1.0/src/ws/roles/secrets_env.py +15 -0
- ws_aitoolkit-0.1.0/src/ws/roles/secrets_ws.py +45 -0
- ws_aitoolkit-0.1.0/src/ws/roles/sops_age.py +104 -0
- ws_aitoolkit-0.1.0/src/ws/roles/systemd.py +167 -0
- ws_aitoolkit-0.1.0/src/ws/run.py +686 -0
- ws_aitoolkit-0.1.0/src/ws/runrecord.py +222 -0
- ws_aitoolkit-0.1.0/src/ws/runschema.py +181 -0
- ws_aitoolkit-0.1.0/src/ws/sandbox.py +1512 -0
- ws_aitoolkit-0.1.0/src/ws/secrets.py +631 -0
- ws_aitoolkit-0.1.0/src/ws/selfcmd.py +19 -0
- ws_aitoolkit-0.1.0/src/ws/session.py +194 -0
- ws_aitoolkit-0.1.0/src/ws/setup_ui/__init__.py +149 -0
- ws_aitoolkit-0.1.0/src/ws/setup_ui/brand.py +94 -0
- ws_aitoolkit-0.1.0/src/ws/setup_ui/flow.py +513 -0
- ws_aitoolkit-0.1.0/src/ws/setup_ui/inline.py +771 -0
- ws_aitoolkit-0.1.0/src/ws/setup_ui/web.py +697 -0
- ws_aitoolkit-0.1.0/src/ws/skills/__init__.py +191 -0
- ws_aitoolkit-0.1.0/src/ws/skills/align.py +82 -0
- ws_aitoolkit-0.1.0/src/ws/skills/checkpoint.py +32 -0
- ws_aitoolkit-0.1.0/src/ws/skills/dataviz.py +95 -0
- ws_aitoolkit-0.1.0/src/ws/skills/taste_gate.py +30 -0
- ws_aitoolkit-0.1.0/src/ws/status.py +147 -0
- ws_aitoolkit-0.1.0/src/ws/testing/__init__.py +4 -0
- ws_aitoolkit-0.1.0/src/ws/testing/mockprovider.py +349 -0
- ws_aitoolkit-0.1.0/src/ws/testing/scenarios.py +211 -0
- ws_aitoolkit-0.1.0/src/ws/usage.py +73 -0
- ws_aitoolkit-0.1.0/src/ws/version.py +168 -0
- ws_aitoolkit-0.0.0/PKG-INFO +0 -13
- ws_aitoolkit-0.0.0/README.md +0 -3
- ws_aitoolkit-0.0.0/pyproject.toml +0 -13
- ws_aitoolkit-0.0.0/src/ws_aitoolkit/__init__.py +0 -1
|
@@ -0,0 +1,202 @@
|
|
|
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 [yyyy] [name of copyright owner]
|
|
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.
|
|
202
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
ws
|
|
2
|
+
Copyright 2026 Michael Fry
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
5
|
+
|
|
6
|
+
Portions adapted from claw-code (https://github.com/ultraworkers/claw-code), Copyright (c) 2026 UltraWorkers and Claw Code contributors, MIT License. The MIT text is in LICENSES/MIT-claw-code.txt.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ws-aitoolkit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Your memory, skills and rules, in any AI.
|
|
5
|
+
Author: Michael Fry
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Operating System :: MacOS
|
|
12
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Requires-Python: >=3.11
|
|
15
|
+
Project-URL: Source, https://github.com/Michael-A-Fry/ws
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# ws: Your memory, skills and rules, in any AI
|
|
19
|
+
|
|
20
|
+
ws turns one `policy.toml` into each AI tool's own config, answers the tools' hooks, and runs headless jobs that leave
|
|
21
|
+
one complete record each. Your memory, skills and rules live in plain files that you own, so you can change tool or
|
|
22
|
+
model without starting again.
|
|
23
|
+
|
|
24
|
+
ws is a small command-line toolkit. The core is Python 3.11 or newer and the standard library only. It runs on macOS and
|
|
25
|
+
Linux. On Windows it runs inside WSL2.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
Run the installer. It checks the machine, installs the `ws` command with uv or pipx, and runs a smoke test.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
curl -fsSL https://raw.githubusercontent.com/Michael-A-Fry/ws/main/install.sh | bash
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or install the package yourself:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
pipx install ws-aitoolkit
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
For other ways to install, including a pinned version, see [Install ws](docs/how-to/install.md).
|
|
42
|
+
|
|
43
|
+
## First command
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
ws doctor
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`ws doctor` prints one line per check, each with a stable ID. `WS0xx` checks cover the machine and `WS1xx` checks cover
|
|
50
|
+
the roles you set up (runner, model, budget, secrets, memory, notes, scheduler, notify, backup, usage).
|
|
51
|
+
|
|
52
|
+
| Status | Meaning |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `ok` | The check passed. |
|
|
55
|
+
| `warn` | It works, but something weakens it. Read the `fix:` line. |
|
|
56
|
+
| `unconfigured` | You haven't set this up yet. This is normal on a new install. |
|
|
57
|
+
| `fail` | Something is wrong. Read the `fix:` line. |
|
|
58
|
+
|
|
59
|
+
Doctor exits with 1 while anything needs doing, so a new install exits with 1. Run `ws init` to answer the three setup
|
|
60
|
+
questions, or `ws setup` to go step by step. `ws doctor --json` gives the same report for scripts.
|
|
61
|
+
|
|
62
|
+
To follow a whole first session, see the [first-run tutorial](docs/tutorials/first-run.md).
|
|
63
|
+
|
|
64
|
+
## Verify
|
|
65
|
+
|
|
66
|
+
Check which build you have:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
ws version --json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The output has `version`, `git_sha`, `dirty`, `build_date`, `python`, `install_path` and `install_source`. Each release
|
|
73
|
+
carries a checksum, a build provenance attestation, a Sigstore bundle and an SBOM. To check them, see
|
|
74
|
+
[Verify a release](docs/how-to/verify-a-release.md).
|
|
75
|
+
|
|
76
|
+
## Troubleshooting
|
|
77
|
+
|
|
78
|
+
| Problem | Fix |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Neither uv nor pipx is installed | Install one: `curl -LsSf https://astral.sh/uv/install.sh \| sh`. The installer prints the line for your OS. |
|
|
81
|
+
| Python is older than 3.11 | Use uv, which fetches a current Python for you. |
|
|
82
|
+
| Native Windows | ws runs inside WSL2. Run `wsl --install -d Ubuntu-24.04`, then run the installer in that shell. |
|
|
83
|
+
| `ws` isn't found after the install | Run `uv tool update-shell` or `pipx ensurepath`, then open a new terminal. |
|
|
84
|
+
|
|
85
|
+
For more, see [Troubleshoot ws](docs/how-to/troubleshoot.md).
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
Start with the [documentation map](docs/README.md). Pages are grouped as tutorials, how-to guides, explanation and
|
|
90
|
+
reference (the [Diátaxis](https://diataxis.fr/) split).
|
|
91
|
+
|
|
92
|
+
| Page | What it covers |
|
|
93
|
+
|---|---|
|
|
94
|
+
| [Usage](docs/usage.md) | Every command, one task each |
|
|
95
|
+
| [First run](docs/tutorials/first-run.md) | Install, check, set up and run a first task |
|
|
96
|
+
| [Install](docs/how-to/install.md) | Install options and pinning a version |
|
|
97
|
+
| [Verify a release](docs/how-to/verify-a-release.md) | Checksum, attestation, Sigstore bundle |
|
|
98
|
+
| [Upgrade and uninstall](docs/how-to/upgrade-and-uninstall.md) | Move to a new version, or remove ws |
|
|
99
|
+
| [Troubleshoot](docs/how-to/troubleshoot.md) | Install and doctor failures |
|
|
100
|
+
| [Use the gate](docs/how-to/use-the-gate.md) | Turn the policy into each runner's rules |
|
|
101
|
+
| [Use the wall](docs/how-to/use-the-wall.md) | Run a runner inside the sandbox |
|
|
102
|
+
| [Approve a command](docs/how-to/approve-a-command.md) | Give a refused call a single-use yes |
|
|
103
|
+
| [Store a secret](docs/how-to/store-a-secret.md) | Keep a key where agents can't read it |
|
|
104
|
+
| [Apply the Rule of Two](docs/how-to/apply-the-rule-of-two.md) | Limit what one session can combine |
|
|
105
|
+
| [Set a budget](docs/how-to/set-a-budget.md) | Cap spend per month |
|
|
106
|
+
| [Send drafts only](docs/how-to/send-drafts-only.md) | Let agents draft, never send |
|
|
107
|
+
| [Run an eval](docs/how-to/run-an-eval.md) | Compare two setups on your own tasks |
|
|
108
|
+
| [The gate](docs/explanation/gate.md) | How policy becomes enforcement |
|
|
109
|
+
| [The wall](docs/explanation/wall.md) | What the sandbox stops and what it doesn't |
|
|
110
|
+
| [Approvals](docs/explanation/approvals.md) | Why an approval is bound and single-use |
|
|
111
|
+
| [The broker](docs/explanation/broker.md) | Why agents never see a secret |
|
|
112
|
+
| [The Rule of Two](docs/explanation/rule-of-two.md) | The design rule behind the policy |
|
|
113
|
+
| [Budget](docs/explanation/budget.md) | How caps are counted |
|
|
114
|
+
| [Draft-only sending](docs/explanation/draft-only-sending.md) | Why ws never sends for you |
|
|
115
|
+
| [Known limits](docs/explanation/known-limits.md) | What ws doesn't protect against yet |
|
|
116
|
+
| [Write-up 1](docs/explanation/write-up-1.md) | The design and what we measured |
|
|
117
|
+
| [CLI reference](docs/reference/cli.md) | Every command and flag |
|
|
118
|
+
| [Doctor checks](docs/reference/doctor-checks.md) | Every check ID |
|
|
119
|
+
| [Policy reference](docs/reference/policy.md) | Every `policy.toml` key |
|
|
120
|
+
| [Eval reference](docs/reference/eval.md) | Task format, graders, metrics |
|
|
121
|
+
| [Lab reference](docs/reference/lab.md) | The lab machine and the launch matrix |
|
|
122
|
+
| [`ws version --json`](docs/reference/version-json.md) | The fields of the version report |
|
|
123
|
+
|
|
124
|
+
For contributors: [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), [SUPPORT.md](SUPPORT.md),
|
|
125
|
+
[CHANGELOG.md](CHANGELOG.md) and [AGENTS.md](AGENTS.md).
|
|
126
|
+
|
|
127
|
+
## Status
|
|
128
|
+
|
|
129
|
+
ws is pre-1.0. Commands, JSON output and `policy.toml` keys can still change between releases, and the
|
|
130
|
+
[CHANGELOG](CHANGELOG.md) says when they do. Doctor IDs never change meaning once released. Read
|
|
131
|
+
[Known limits](docs/explanation/known-limits.md) before you rely on the wall or the gate.
|
|
132
|
+
|
|
133
|
+
## Licence
|
|
134
|
+
|
|
135
|
+
ws is [Apache-2.0](LICENSE). Contributions need the [CLA](CLA.md), signed through a bot on your first pull request.
|
|
136
|
+
Code adapted from claw-code (MIT) is listed in [NOTICE](NOTICE).
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# ws: Your memory, skills and rules, in any AI
|
|
2
|
+
|
|
3
|
+
ws turns one `policy.toml` into each AI tool's own config, answers the tools' hooks, and runs headless jobs that leave
|
|
4
|
+
one complete record each. Your memory, skills and rules live in plain files that you own, so you can change tool or
|
|
5
|
+
model without starting again.
|
|
6
|
+
|
|
7
|
+
ws is a small command-line toolkit. The core is Python 3.11 or newer and the standard library only. It runs on macOS and
|
|
8
|
+
Linux. On Windows it runs inside WSL2.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
Run the installer. It checks the machine, installs the `ws` command with uv or pipx, and runs a smoke test.
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
curl -fsSL https://raw.githubusercontent.com/Michael-A-Fry/ws/main/install.sh | bash
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or install the package yourself:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pipx install ws-aitoolkit
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
For other ways to install, including a pinned version, see [Install ws](docs/how-to/install.md).
|
|
25
|
+
|
|
26
|
+
## First command
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
ws doctor
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`ws doctor` prints one line per check, each with a stable ID. `WS0xx` checks cover the machine and `WS1xx` checks cover
|
|
33
|
+
the roles you set up (runner, model, budget, secrets, memory, notes, scheduler, notify, backup, usage).
|
|
34
|
+
|
|
35
|
+
| Status | Meaning |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `ok` | The check passed. |
|
|
38
|
+
| `warn` | It works, but something weakens it. Read the `fix:` line. |
|
|
39
|
+
| `unconfigured` | You haven't set this up yet. This is normal on a new install. |
|
|
40
|
+
| `fail` | Something is wrong. Read the `fix:` line. |
|
|
41
|
+
|
|
42
|
+
Doctor exits with 1 while anything needs doing, so a new install exits with 1. Run `ws init` to answer the three setup
|
|
43
|
+
questions, or `ws setup` to go step by step. `ws doctor --json` gives the same report for scripts.
|
|
44
|
+
|
|
45
|
+
To follow a whole first session, see the [first-run tutorial](docs/tutorials/first-run.md).
|
|
46
|
+
|
|
47
|
+
## Verify
|
|
48
|
+
|
|
49
|
+
Check which build you have:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
ws version --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The output has `version`, `git_sha`, `dirty`, `build_date`, `python`, `install_path` and `install_source`. Each release
|
|
56
|
+
carries a checksum, a build provenance attestation, a Sigstore bundle and an SBOM. To check them, see
|
|
57
|
+
[Verify a release](docs/how-to/verify-a-release.md).
|
|
58
|
+
|
|
59
|
+
## Troubleshooting
|
|
60
|
+
|
|
61
|
+
| Problem | Fix |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Neither uv nor pipx is installed | Install one: `curl -LsSf https://astral.sh/uv/install.sh \| sh`. The installer prints the line for your OS. |
|
|
64
|
+
| Python is older than 3.11 | Use uv, which fetches a current Python for you. |
|
|
65
|
+
| Native Windows | ws runs inside WSL2. Run `wsl --install -d Ubuntu-24.04`, then run the installer in that shell. |
|
|
66
|
+
| `ws` isn't found after the install | Run `uv tool update-shell` or `pipx ensurepath`, then open a new terminal. |
|
|
67
|
+
|
|
68
|
+
For more, see [Troubleshoot ws](docs/how-to/troubleshoot.md).
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
Start with the [documentation map](docs/README.md). Pages are grouped as tutorials, how-to guides, explanation and
|
|
73
|
+
reference (the [Diátaxis](https://diataxis.fr/) split).
|
|
74
|
+
|
|
75
|
+
| Page | What it covers |
|
|
76
|
+
|---|---|
|
|
77
|
+
| [Usage](docs/usage.md) | Every command, one task each |
|
|
78
|
+
| [First run](docs/tutorials/first-run.md) | Install, check, set up and run a first task |
|
|
79
|
+
| [Install](docs/how-to/install.md) | Install options and pinning a version |
|
|
80
|
+
| [Verify a release](docs/how-to/verify-a-release.md) | Checksum, attestation, Sigstore bundle |
|
|
81
|
+
| [Upgrade and uninstall](docs/how-to/upgrade-and-uninstall.md) | Move to a new version, or remove ws |
|
|
82
|
+
| [Troubleshoot](docs/how-to/troubleshoot.md) | Install and doctor failures |
|
|
83
|
+
| [Use the gate](docs/how-to/use-the-gate.md) | Turn the policy into each runner's rules |
|
|
84
|
+
| [Use the wall](docs/how-to/use-the-wall.md) | Run a runner inside the sandbox |
|
|
85
|
+
| [Approve a command](docs/how-to/approve-a-command.md) | Give a refused call a single-use yes |
|
|
86
|
+
| [Store a secret](docs/how-to/store-a-secret.md) | Keep a key where agents can't read it |
|
|
87
|
+
| [Apply the Rule of Two](docs/how-to/apply-the-rule-of-two.md) | Limit what one session can combine |
|
|
88
|
+
| [Set a budget](docs/how-to/set-a-budget.md) | Cap spend per month |
|
|
89
|
+
| [Send drafts only](docs/how-to/send-drafts-only.md) | Let agents draft, never send |
|
|
90
|
+
| [Run an eval](docs/how-to/run-an-eval.md) | Compare two setups on your own tasks |
|
|
91
|
+
| [The gate](docs/explanation/gate.md) | How policy becomes enforcement |
|
|
92
|
+
| [The wall](docs/explanation/wall.md) | What the sandbox stops and what it doesn't |
|
|
93
|
+
| [Approvals](docs/explanation/approvals.md) | Why an approval is bound and single-use |
|
|
94
|
+
| [The broker](docs/explanation/broker.md) | Why agents never see a secret |
|
|
95
|
+
| [The Rule of Two](docs/explanation/rule-of-two.md) | The design rule behind the policy |
|
|
96
|
+
| [Budget](docs/explanation/budget.md) | How caps are counted |
|
|
97
|
+
| [Draft-only sending](docs/explanation/draft-only-sending.md) | Why ws never sends for you |
|
|
98
|
+
| [Known limits](docs/explanation/known-limits.md) | What ws doesn't protect against yet |
|
|
99
|
+
| [Write-up 1](docs/explanation/write-up-1.md) | The design and what we measured |
|
|
100
|
+
| [CLI reference](docs/reference/cli.md) | Every command and flag |
|
|
101
|
+
| [Doctor checks](docs/reference/doctor-checks.md) | Every check ID |
|
|
102
|
+
| [Policy reference](docs/reference/policy.md) | Every `policy.toml` key |
|
|
103
|
+
| [Eval reference](docs/reference/eval.md) | Task format, graders, metrics |
|
|
104
|
+
| [Lab reference](docs/reference/lab.md) | The lab machine and the launch matrix |
|
|
105
|
+
| [`ws version --json`](docs/reference/version-json.md) | The fields of the version report |
|
|
106
|
+
|
|
107
|
+
For contributors: [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), [SUPPORT.md](SUPPORT.md),
|
|
108
|
+
[CHANGELOG.md](CHANGELOG.md) and [AGENTS.md](AGENTS.md).
|
|
109
|
+
|
|
110
|
+
## Status
|
|
111
|
+
|
|
112
|
+
ws is pre-1.0. Commands, JSON output and `policy.toml` keys can still change between releases, and the
|
|
113
|
+
[CHANGELOG](CHANGELOG.md) says when they do. Doctor IDs never change meaning once released. Read
|
|
114
|
+
[Known limits](docs/explanation/known-limits.md) before you rely on the wall or the gate.
|
|
115
|
+
|
|
116
|
+
## Licence
|
|
117
|
+
|
|
118
|
+
ws is [Apache-2.0](LICENSE). Contributions need the [CLA](CLA.md), signed through a bot on your first pull request.
|
|
119
|
+
Code adapted from claw-code (MIT) is listed in [NOTICE](NOTICE).
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ws-aitoolkit"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Your memory, skills and rules, in any AI."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
license-files = [
|
|
8
|
+
"LICENSE",
|
|
9
|
+
"NOTICE",
|
|
10
|
+
]
|
|
11
|
+
requires-python = ">=3.11"
|
|
12
|
+
dependencies = []
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Operating System :: MacOS",
|
|
17
|
+
"Operating System :: POSIX :: Linux",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[[project.authors]]
|
|
22
|
+
name = "Michael Fry"
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Source = "https://github.com/Michael-A-Fry/ws"
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
ws = "ws.cli:main"
|
|
29
|
+
|
|
30
|
+
[dependency-groups]
|
|
31
|
+
dev = [
|
|
32
|
+
"jsonschema==4.26.0",
|
|
33
|
+
"pytest==9.0.3",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[build-system]
|
|
37
|
+
requires = ["uv_build>=0.13,<0.14"]
|
|
38
|
+
build-backend = "uv_build"
|
|
39
|
+
|
|
40
|
+
[tool.uv]
|
|
41
|
+
exclude-newer = "7 days"
|
|
42
|
+
|
|
43
|
+
[tool.uv.build-backend]
|
|
44
|
+
module-name = "ws"
|
|
45
|
+
|
|
46
|
+
[tool.pytest.ini_options]
|
|
47
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "ws-aitoolkit"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Your memory, skills and rules, in any AI."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
8
|
+
requires-python = ">=3.11"
|
|
9
|
+
authors = [{ name = "Michael Fry" }]
|
|
10
|
+
# The core has no runtime dependencies: stdlib only, so the install works the same on every OS.
|
|
11
|
+
dependencies = []
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 2 - Pre-Alpha",
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Operating System :: MacOS",
|
|
16
|
+
"Operating System :: POSIX :: Linux",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Source = "https://github.com/Michael-A-Fry/ws"
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
ws = "ws.cli:main"
|
|
25
|
+
|
|
26
|
+
[dependency-groups]
|
|
27
|
+
dev = ["jsonschema==4.26.0", "pytest==9.0.3"]
|
|
28
|
+
|
|
29
|
+
[build-system]
|
|
30
|
+
requires = ["uv_build>=0.13,<0.14"]
|
|
31
|
+
build-backend = "uv_build"
|
|
32
|
+
|
|
33
|
+
[tool.uv.build-backend]
|
|
34
|
+
module-name = "ws"
|
|
35
|
+
|
|
36
|
+
[tool.uv]
|
|
37
|
+
# Hold new upstream releases for a week before they can enter the lock.
|
|
38
|
+
exclude-newer = "7 days"
|
|
39
|
+
|
|
40
|
+
[tool.pytest.ini_options]
|
|
41
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""ws: your memory, skills and rules, in any AI."""
|
|
2
|
+
|
|
3
|
+
# Aliased: a bare `version` here would be the package attribute `ws.version`, which is the `ws version` module.
|
|
4
|
+
from importlib.metadata import PackageNotFoundError
|
|
5
|
+
from importlib.metadata import version as _distribution_version
|
|
6
|
+
|
|
7
|
+
try:
|
|
8
|
+
__version__ = _distribution_version("ws-aitoolkit")
|
|
9
|
+
except PackageNotFoundError: # running from a source tree without an install
|
|
10
|
+
__version__ = "0.0.0+src"
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"""Runner adapters: one module per runner. To add a runner, add a module here; nothing else changes.
|
|
2
|
+
|
|
3
|
+
A module must define:
|
|
4
|
+
|
|
5
|
+
NAME: str the --runner name, e.g. "claude-code"
|
|
6
|
+
def generate(policy, ws_cmd, out, policy_file) -> dict
|
|
7
|
+
file name (relative to the out dir) -> text; pure, no I/O.
|
|
8
|
+
`ws_cmd` is the argv list that runs ws, e.g. ["ws"]; `out` is the
|
|
9
|
+
folder the files go in and `policy_file` the policy they came from:
|
|
10
|
+
both are ws's own files, so the runner must not let a session edit
|
|
11
|
+
them (see check_argv for the hook's side of that).
|
|
12
|
+
def parse(payload) -> Call | list[Call] | None
|
|
13
|
+
a hook payload from that runner, as neutral Call(s); None if the call
|
|
14
|
+
is not one the policy governs; ValueError or TypeError if it cannot be
|
|
15
|
+
read (`ws gate check` then denies: fail closed).
|
|
16
|
+
def launch_hint(out) -> str one line: how to start the runner with the generated config.
|
|
17
|
+
|
|
18
|
+
Modules are found by scanning this package, so the registry is the directory.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import importlib
|
|
24
|
+
import pkgutil
|
|
25
|
+
from dataclasses import dataclass
|
|
26
|
+
from pathlib import Path
|
|
27
|
+
from types import ModuleType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
@dataclass(frozen=True)
|
|
31
|
+
class Call:
|
|
32
|
+
"""A tool call in runner-neutral terms. kind: "command" (shell), "read" (one file read), "search" (a folder
|
|
33
|
+
searched or listed, recursively), "write" (a file written or edited) or "tool" (a neutral tool name from
|
|
34
|
+
ws.policy.KNOWN_TOOLS). value: the command text, the path, or the tool name."""
|
|
35
|
+
|
|
36
|
+
kind: str
|
|
37
|
+
value: str
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def all_adapters() -> dict[str, ModuleType]:
|
|
41
|
+
found = {}
|
|
42
|
+
for info in pkgutil.iter_modules(__path__):
|
|
43
|
+
mod = importlib.import_module(f"{__name__}.{info.name}")
|
|
44
|
+
if hasattr(mod, "NAME") and hasattr(mod, "generate"):
|
|
45
|
+
found[mod.NAME] = mod
|
|
46
|
+
return dict(sorted(found.items()))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def get(name: str) -> ModuleType:
|
|
50
|
+
adapters = all_adapters()
|
|
51
|
+
if name not in adapters:
|
|
52
|
+
raise KeyError(f"unknown runner {name!r} (known: {', '.join(adapters)})")
|
|
53
|
+
return adapters[name]
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def protected_paths(out: Path, policy_file: Path) -> list[str]:
|
|
57
|
+
"""Everything a session must not write: the generated folder, the policy, and ws's other control files next to
|
|
58
|
+
it (profile, secrets, jobs, release, runs, logs). Each adapter denies edits to all of them natively."""
|
|
59
|
+
from ws.policy import control_paths
|
|
60
|
+
|
|
61
|
+
paths = [str(out), str(policy_file), *control_paths(policy_file.parent)]
|
|
62
|
+
return list(dict.fromkeys(paths))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def check_argv(ws_cmd: list[str], runner: str, policy_file: Path, out: Path) -> list[str]:
|
|
66
|
+
"""The command a generated hook or shim runs. The policy and the protected folder are absolute paths, so the hook
|
|
67
|
+
reads the same policy wherever the runner starts and cannot be pointed at another one by the session's cwd."""
|
|
68
|
+
return [*ws_cmd, "gate", "check", "--runner", runner, "--policy", str(policy_file), "--protect", str(out)]
|