proteworks 0.1.3__tar.gz → 0.1.9__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.
- proteworks-0.1.9/PKG-INFO +173 -0
- proteworks-0.1.9/README.md +159 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/pyproject.toml +5 -2
- proteworks-0.1.9/src/proteworks/__init__.py +13 -0
- proteworks-0.1.9/src/proteworks/api.py +526 -0
- proteworks-0.1.9/src/proteworks/browse.py +50 -0
- proteworks-0.1.9/src/proteworks/cli.py +363 -0
- proteworks-0.1.9/src/proteworks/config.py +170 -0
- proteworks-0.1.9/src/proteworks/folders.py +117 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks/index.py +12 -2
- proteworks-0.1.9/src/proteworks/mcp/__init__.py +13 -0
- proteworks-0.1.9/src/proteworks/mcp/errors.py +87 -0
- proteworks-0.1.9/src/proteworks/mcp/paths.py +128 -0
- proteworks-0.1.9/src/proteworks/mcp/profile.py +30 -0
- proteworks-0.1.9/src/proteworks/mcp/runtime.py +47 -0
- proteworks-0.1.9/src/proteworks/mcp/server.py +75 -0
- proteworks-0.1.9/src/proteworks/mcp/tools_files.py +200 -0
- proteworks-0.1.9/src/proteworks/mcp/tools_orgs.py +158 -0
- proteworks-0.1.9/src/proteworks/mcp/tools_studio.py +393 -0
- proteworks-0.1.9/src/proteworks/mcp/tools_workflows.py +489 -0
- proteworks-0.1.9/src/proteworks/mcp_host.py +969 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks/pull.py +88 -41
- proteworks-0.1.9/src/proteworks/push.py +890 -0
- proteworks-0.1.9/src/proteworks/results.py +65 -0
- proteworks-0.1.9/src/proteworks/session.py +83 -0
- proteworks-0.1.9/src/proteworks/studio/__init__.py +16 -0
- proteworks-0.1.9/src/proteworks/studio/common.py +213 -0
- proteworks-0.1.9/src/proteworks/studio/kinds/__init__.py +25 -0
- proteworks-0.1.9/src/proteworks/studio/kinds/base.py +98 -0
- proteworks-0.1.9/src/proteworks/studio/kinds/proteinmpnn.py +214 -0
- proteworks-0.1.9/src/proteworks/studio/kinds/refolding.py +120 -0
- proteworks-0.1.9/src/proteworks/studio/kinds/rfd3.py +93 -0
- proteworks-0.1.9/src/proteworks/studio/kinds/rfd4_proteina.py +88 -0
- proteworks-0.1.9/src/proteworks/studio/kinds/structure_prediction.py +124 -0
- proteworks-0.1.9/src/proteworks/studio/registry.py +56 -0
- proteworks-0.1.9/src/proteworks/studio_proteinmpnn.py +37 -0
- proteworks-0.1.9/src/proteworks/workflows.py +757 -0
- proteworks-0.1.9/src/proteworks.egg-info/PKG-INFO +173 -0
- proteworks-0.1.9/src/proteworks.egg-info/SOURCES.txt +60 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks.egg-info/entry_points.txt +1 -0
- proteworks-0.1.9/src/proteworks.egg-info/requires.txt +9 -0
- proteworks-0.1.9/tests/test_browse.py +49 -0
- proteworks-0.1.9/tests/test_cli.py +1486 -0
- proteworks-0.1.9/tests/test_config_dir.py +34 -0
- proteworks-0.1.9/tests/test_folders.py +147 -0
- proteworks-0.1.9/tests/test_mcp_adversarial.py +142 -0
- proteworks-0.1.9/tests/test_mcp_errors.py +31 -0
- proteworks-0.1.9/tests/test_mcp_files.py +160 -0
- proteworks-0.1.9/tests/test_mcp_host.py +315 -0
- proteworks-0.1.9/tests/test_mcp_paths.py +45 -0
- proteworks-0.1.9/tests/test_mcp_studio.py +290 -0
- proteworks-0.1.9/tests/test_mcp_workflows.py +461 -0
- proteworks-0.1.9/tests/test_rfd4_proteina_workflow.py +57 -0
- proteworks-0.1.9/tests/test_session.py +45 -0
- proteworks-0.1.9/tests/test_token_store.py +70 -0
- proteworks-0.1.9/tests/test_transfer_result.py +169 -0
- proteworks-0.1.3/PKG-INFO +0 -28
- proteworks-0.1.3/README.md +0 -17
- proteworks-0.1.3/src/proteworks/__init__.py +0 -3
- proteworks-0.1.3/src/proteworks/api.py +0 -206
- proteworks-0.1.3/src/proteworks/cli.py +0 -193
- proteworks-0.1.3/src/proteworks/config.py +0 -88
- proteworks-0.1.3/src/proteworks/push.py +0 -121
- proteworks-0.1.3/src/proteworks.egg-info/PKG-INFO +0 -28
- proteworks-0.1.3/src/proteworks.egg-info/SOURCES.txt +0 -19
- proteworks-0.1.3/src/proteworks.egg-info/requires.txt +0 -5
- proteworks-0.1.3/tests/test_cli.py +0 -629
- {proteworks-0.1.3 → proteworks-0.1.9}/setup.cfg +0 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks/auth.py +0 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks/orgs.py +0 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks/redact.py +0 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks.egg-info/dependency_links.txt +0 -0
- {proteworks-0.1.3 → proteworks-0.1.9}/src/proteworks.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: proteworks
|
|
3
|
+
Version: 0.1.9
|
|
4
|
+
Summary: Sync files with Proteworks using file-browser paths.
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: httpx[socks]>=0.27
|
|
8
|
+
Requires-Dist: keyring>=25
|
|
9
|
+
Provides-Extra: dev
|
|
10
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
11
|
+
Provides-Extra: mcp
|
|
12
|
+
Requires-Dist: mcp>=1.2; extra == "mcp"
|
|
13
|
+
Requires-Dist: pyarrow>=14; extra == "mcp"
|
|
14
|
+
|
|
15
|
+
# proteworks
|
|
16
|
+
|
|
17
|
+
Command line client and local MCP server for syncing Proteworks files and submitting allowlisted workflows. The default API is production. Set `PROTEWORKS_API_URL` only when testing against staging or a local stack.
|
|
18
|
+
|
|
19
|
+
## One install (CLI + Claude Science)
|
|
20
|
+
|
|
21
|
+
There is a **single supported install**:
|
|
22
|
+
|
|
23
|
+
| Path | Role |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `/opt/proteworks` | Package + `proteworks-mcp` |
|
|
26
|
+
| `/usr/local/bin/proteworks` | CLI symlink |
|
|
27
|
+
| `/usr/local/bin/proteworks-mcp` | MCP symlink (Science **Command**) |
|
|
28
|
+
| `~/.config/proteworks/` | Login token file + org config |
|
|
29
|
+
|
|
30
|
+
Do **not** keep a second copy from `uv tool` / pipx / a repo `.venv` on your PATH for daily use. Those diverge and break Claude Science.
|
|
31
|
+
|
|
32
|
+
### Bootstrap once, then use only `/usr/local/bin`
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 1) Temporary bootstrap (any machine with uv)
|
|
36
|
+
uv tool install 'proteworks[mcp]'
|
|
37
|
+
|
|
38
|
+
# 2) Canonical install (needs sudo). Uses distro python3.12+ under /usr (not uv under $HOME).
|
|
39
|
+
sudo "$(which proteworks)" mcp install-system
|
|
40
|
+
# Developers working from a git checkout before publishing:
|
|
41
|
+
# sudo "$(which proteworks)" mcp install-system --package-spec "$PWD[mcp]"
|
|
42
|
+
|
|
43
|
+
# 3) Remove the bootstrap copy so PATH has one binary
|
|
44
|
+
uv tool uninstall proteworks
|
|
45
|
+
hash -r
|
|
46
|
+
which -a proteworks # expect only /usr/local/bin/proteworks
|
|
47
|
+
|
|
48
|
+
# 4) Login + Science grants
|
|
49
|
+
proteworks login
|
|
50
|
+
proteworks organization set "My Org"
|
|
51
|
+
proteworks mcp setup-claude-science
|
|
52
|
+
proteworks mcp doctor
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
After any upgrade: run step 2 again (same `install-system` command), then `doctor`. Do not `uv tool install` again unless `/usr/local/bin/proteworks` is missing.
|
|
56
|
+
|
|
57
|
+
### Claude Science connector
|
|
58
|
+
|
|
59
|
+
`setup-claude-science` prints the fields. Always:
|
|
60
|
+
|
|
61
|
+
| Field | Value |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| **Name** | `proteworks` |
|
|
64
|
+
| **Command** | `/opt/proteworks/bin/proteworks-mcp` |
|
|
65
|
+
| **Arguments** | leave empty |
|
|
66
|
+
| **Env** (if shown) | `PROTEWORKS_CONFIG_DIR=$HOME/.config/proteworks` |
|
|
67
|
+
|
|
68
|
+
Paste **only** that Command path. Do not use `python -m …`, `uvx`, or a path under `~/.local`. Science’s one-field UI can drop `-m` and hang for 180s; sandboxed `HOME` also cannot see a second user-level install’s credentials unless you use the system layout above.
|
|
69
|
+
|
|
70
|
+
Fully quit and relaunch Claude Science after setup so it reloads `config.toml`.
|
|
71
|
+
Also add each host **by name** under Science **Settings → Domain Allowlist**
|
|
72
|
+
(Science rejects wildcards). `setup-claude-science` prints the list — typically
|
|
73
|
+
`api.studio.proteworks.com` plus virtual-hosted GCS hosts such as
|
|
74
|
+
`proteworks-production.storage.googleapis.com`. The connector’s `config.toml`
|
|
75
|
+
grants are necessary but Science’s UI allowlist often gates egress separately.
|
|
76
|
+
Bare `storage.googleapis.com` is hard-denylisted (path-style GCS). If pull still
|
|
77
|
+
fails for a custom org bucket, add `<bucket>.storage.googleapis.com`. Science may
|
|
78
|
+
set `ALL_PROXY` (SOCKS); `proteworks` depends on `httpx[socks]` so that works out
|
|
79
|
+
of the box. If a direct GCS PUT is still blocked, push falls back to uploading
|
|
80
|
+
through the Proteworks API host.
|
|
81
|
+
|
|
82
|
+
Allow Claude to push/pull from a real project (like the CLI — no staging copy):
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
proteworks mcp setup-claude-science --mcp-root ~/projects/my-campaign
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
That grants the Science sandbox **and** writes `~/.config/proteworks/mcp_roots`.
|
|
89
|
+
Restart the connector afterward. Absolute paths under that project then work with
|
|
90
|
+
MCP `push` / `pull`.
|
|
91
|
+
|
|
92
|
+
`proteworks --version` / `proteworks-mcp --version` print the installed version.
|
|
93
|
+
|
|
94
|
+
Quote wildcards so the shell does not expand them. A trailing slash on a remote path means a folder. `proteworks --help` lists every command.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
proteworks pull '~/My Files/campaigns/run/' ./run
|
|
98
|
+
proteworks push ./1UBQ.pdb '~/My Files/test/'
|
|
99
|
+
proteworks push '*.pdb' '~/My Files/pdbs/'
|
|
100
|
+
proteworks push designs.zip '~/My Files/dest/' # auto-extracts
|
|
101
|
+
proteworks mkdir '~/My Files/campaigns/round6/'
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
MCP also exposes `create_folder` for the same empty-directory create (returns `folder_id` for `output_folder_id` / push).
|
|
105
|
+
|
|
106
|
+
Login returns to `http://127.0.0.1:8765/callback`. Add that exact URL to the Auth0 application's Allowed Callback URLs.
|
|
107
|
+
|
|
108
|
+
Example prompts: list `~/My Files/`, dry-run pull a folder, pull it, push results back.
|
|
109
|
+
|
|
110
|
+
Optional coaching skills (not required for the server):
|
|
111
|
+
|
|
112
|
+
- [`skills/proteworks-files/SKILL.md`](skills/proteworks-files/SKILL.md)
|
|
113
|
+
- [`skills/proteworks-workflows/SKILL.md`](skills/proteworks-workflows/SKILL.md)
|
|
114
|
+
|
|
115
|
+
Import via Settings → Skills → Import from GitHub (or upload the folder). Hosts without a Skills UI still get conventions from MCP tool descriptions and this README.
|
|
116
|
+
|
|
117
|
+
### Tools
|
|
118
|
+
|
|
119
|
+
| Tool | Purpose |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| `auth_status` | Login state, API URL, active org (never the token) |
|
|
122
|
+
| `organization_list` / `organization_set` | Choose organization (`organization_set` needs `confirm=true`) |
|
|
123
|
+
| `list_files` | Browse a remote path; returns `file_id` + `relative_path` |
|
|
124
|
+
| `pull` / `push` | Transfer with `dry_run` (default true); real transfers need `confirm_transfer=true` |
|
|
125
|
+
| `list_workflows` | Allowlisted agent workflows (`rf-diffusion3`, `proteinmpnn`, `refolding`, `structure-prediction`, `msa-generation`) |
|
|
126
|
+
| `get_workflow_schema` | Full schema with UI-matching defaults |
|
|
127
|
+
| `prepare_workflow_submission` | Merge defaults + overrides; **no submit** (draft body) |
|
|
128
|
+
| `submit_workflow` | Same merge, then submit |
|
|
129
|
+
| `inspect_studio` | Inspect supported `.studio` (proteinmpnn / refolding / rf-diffusion3 / structure_prediction); normalized rows + scores |
|
|
130
|
+
| `save_selected_studio` | Same as Studio Save selected → subset `.studio` uploaded + retention finalized (not yet for structure_prediction) |
|
|
131
|
+
| `inspect_proteinmpnn_studio` | Legacy ProteinMPNN flat-row inspect (prefer `inspect_studio`) |
|
|
132
|
+
| `prepare_refolding_from_proteinmpnn_studio` | Build refolding payload + SA handoff from MPNN studio selection (**no submit**) |
|
|
133
|
+
| `get_execution` / `list_execution_results` / `cancel_execution` | Status / results / cancel (`cancel_execution` needs `confirm=true`) |
|
|
134
|
+
| `estimate_workflow_cost` | Cost estimate from merged params (same validation as prepare) |
|
|
135
|
+
|
|
136
|
+
Auth is shared with the CLI. The access token is stored in the OS keychain and mirrored to `~/.config/proteworks/credentials` (mode `0600`) so Claude Science’s sandbox can read it. There is no separate MCP login: run `proteworks login` in a terminal, then restart the connector.
|
|
137
|
+
|
|
138
|
+
### MCP safety env
|
|
139
|
+
|
|
140
|
+
| Variable | Purpose |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| `PROTEWORKS_MCP_ROOT` | Local workspace root for `pull`/`push` (default: process cwd) |
|
|
143
|
+
| `PROTEWORKS_MCP_READ_ONLY` | When `1`/`true`, disables submit/push/cancel/save-selected |
|
|
144
|
+
| `PROTEWORKS_STORAGE_HOST_ALLOWLIST` | Comma-separated host suffixes for signed URL follow (default: GCS hosts) |
|
|
145
|
+
| `PROTEWORKS_MAX_STUDIO_BYTES` | Max `.studio` download size (default 80 MiB) |
|
|
146
|
+
| `PROTEWORKS_STUDIO_INSPECT_LIMIT` | Default row page size for `inspect_studio` (default 50) |
|
|
147
|
+
|
|
148
|
+
**Staging smoke:** `auth_status` → `list_workflows` → `get_workflow_schema` → `prepare_workflow_submission` → `estimate_workflow_cost` → `submit_workflow` → `get_execution` → `cancel_execution` (with `confirm=true` if still running).
|
|
149
|
+
|
|
150
|
+
### Workflow submit
|
|
151
|
+
|
|
152
|
+
1. `list_files` → get `file_id` for any structure input.
|
|
153
|
+
2. `get_workflow_schema` for the workflow (`rf-diffusion3`, `proteinmpnn`, `refolding`, `structure-prediction`, or `msa-generation`).
|
|
154
|
+
3. `prepare_workflow_submission` to review the merged payload (defaults match a fresh Studio form).
|
|
155
|
+
4. `submit_workflow` when ready.
|
|
156
|
+
|
|
157
|
+
**Refolding** and **Structure Prediction** have no default predictor/MSA — agents must **ask the user** which methods and (when required) which MSA to use before prepare/submit. Structure Prediction also requires a user-provided complex (`structure-prediction-complex-json`). **MSA generation** has no default sequences — ask, then pass `generated-fasta-inputs` or `fasta_files`; use the run **output folder** as `msa_output_folder` downstream. From ProteinMPNN results: `inspect_studio` → ask → `prepare_refolding_from_proteinmpnn_studio` → `submit_workflow`.
|
|
158
|
+
|
|
159
|
+
**`.studio` results:** `inspect_studio` → filter by scores (e.g. pLDDT / Rg) → `save_selected_studio` to write a subset bundle (structure_prediction is inspect-only for now).
|
|
160
|
+
|
|
161
|
+
Payload shape matches Studio `POST /api/v1/workflows/submit` and is reserved for future shareable draft links (`/app?workflowDraft=<id>`) that open the form pre-filled without submitting.
|
|
162
|
+
|
|
163
|
+
### Adding another workflow to the allowlist
|
|
164
|
+
|
|
165
|
+
In **protein-studio**:
|
|
166
|
+
|
|
167
|
+
1. Extract `buildXDefaultParameters` + form init from that workflow’s UI.
|
|
168
|
+
2. Implement `buildXAgentSchema()`.
|
|
169
|
+
3. Run `npm run export-agent-schemas` in `frontend/`; commit JSON under `backend/app/data/agent_workflow_schemas/`.
|
|
170
|
+
4. Add the workflow id to allowlists (frontend export index, backend `AGENT_WORKFLOW_ALLOWLIST`, proteworks-cli `AGENT_WORKFLOW_ALLOWLIST`).
|
|
171
|
+
5. Add default/parity tests; extend the workflows skill if needed.
|
|
172
|
+
|
|
173
|
+
No new MCP tool names are required.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# proteworks
|
|
2
|
+
|
|
3
|
+
Command line client and local MCP server for syncing Proteworks files and submitting allowlisted workflows. The default API is production. Set `PROTEWORKS_API_URL` only when testing against staging or a local stack.
|
|
4
|
+
|
|
5
|
+
## One install (CLI + Claude Science)
|
|
6
|
+
|
|
7
|
+
There is a **single supported install**:
|
|
8
|
+
|
|
9
|
+
| Path | Role |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `/opt/proteworks` | Package + `proteworks-mcp` |
|
|
12
|
+
| `/usr/local/bin/proteworks` | CLI symlink |
|
|
13
|
+
| `/usr/local/bin/proteworks-mcp` | MCP symlink (Science **Command**) |
|
|
14
|
+
| `~/.config/proteworks/` | Login token file + org config |
|
|
15
|
+
|
|
16
|
+
Do **not** keep a second copy from `uv tool` / pipx / a repo `.venv` on your PATH for daily use. Those diverge and break Claude Science.
|
|
17
|
+
|
|
18
|
+
### Bootstrap once, then use only `/usr/local/bin`
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# 1) Temporary bootstrap (any machine with uv)
|
|
22
|
+
uv tool install 'proteworks[mcp]'
|
|
23
|
+
|
|
24
|
+
# 2) Canonical install (needs sudo). Uses distro python3.12+ under /usr (not uv under $HOME).
|
|
25
|
+
sudo "$(which proteworks)" mcp install-system
|
|
26
|
+
# Developers working from a git checkout before publishing:
|
|
27
|
+
# sudo "$(which proteworks)" mcp install-system --package-spec "$PWD[mcp]"
|
|
28
|
+
|
|
29
|
+
# 3) Remove the bootstrap copy so PATH has one binary
|
|
30
|
+
uv tool uninstall proteworks
|
|
31
|
+
hash -r
|
|
32
|
+
which -a proteworks # expect only /usr/local/bin/proteworks
|
|
33
|
+
|
|
34
|
+
# 4) Login + Science grants
|
|
35
|
+
proteworks login
|
|
36
|
+
proteworks organization set "My Org"
|
|
37
|
+
proteworks mcp setup-claude-science
|
|
38
|
+
proteworks mcp doctor
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
After any upgrade: run step 2 again (same `install-system` command), then `doctor`. Do not `uv tool install` again unless `/usr/local/bin/proteworks` is missing.
|
|
42
|
+
|
|
43
|
+
### Claude Science connector
|
|
44
|
+
|
|
45
|
+
`setup-claude-science` prints the fields. Always:
|
|
46
|
+
|
|
47
|
+
| Field | Value |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| **Name** | `proteworks` |
|
|
50
|
+
| **Command** | `/opt/proteworks/bin/proteworks-mcp` |
|
|
51
|
+
| **Arguments** | leave empty |
|
|
52
|
+
| **Env** (if shown) | `PROTEWORKS_CONFIG_DIR=$HOME/.config/proteworks` |
|
|
53
|
+
|
|
54
|
+
Paste **only** that Command path. Do not use `python -m …`, `uvx`, or a path under `~/.local`. Science’s one-field UI can drop `-m` and hang for 180s; sandboxed `HOME` also cannot see a second user-level install’s credentials unless you use the system layout above.
|
|
55
|
+
|
|
56
|
+
Fully quit and relaunch Claude Science after setup so it reloads `config.toml`.
|
|
57
|
+
Also add each host **by name** under Science **Settings → Domain Allowlist**
|
|
58
|
+
(Science rejects wildcards). `setup-claude-science` prints the list — typically
|
|
59
|
+
`api.studio.proteworks.com` plus virtual-hosted GCS hosts such as
|
|
60
|
+
`proteworks-production.storage.googleapis.com`. The connector’s `config.toml`
|
|
61
|
+
grants are necessary but Science’s UI allowlist often gates egress separately.
|
|
62
|
+
Bare `storage.googleapis.com` is hard-denylisted (path-style GCS). If pull still
|
|
63
|
+
fails for a custom org bucket, add `<bucket>.storage.googleapis.com`. Science may
|
|
64
|
+
set `ALL_PROXY` (SOCKS); `proteworks` depends on `httpx[socks]` so that works out
|
|
65
|
+
of the box. If a direct GCS PUT is still blocked, push falls back to uploading
|
|
66
|
+
through the Proteworks API host.
|
|
67
|
+
|
|
68
|
+
Allow Claude to push/pull from a real project (like the CLI — no staging copy):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
proteworks mcp setup-claude-science --mcp-root ~/projects/my-campaign
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
That grants the Science sandbox **and** writes `~/.config/proteworks/mcp_roots`.
|
|
75
|
+
Restart the connector afterward. Absolute paths under that project then work with
|
|
76
|
+
MCP `push` / `pull`.
|
|
77
|
+
|
|
78
|
+
`proteworks --version` / `proteworks-mcp --version` print the installed version.
|
|
79
|
+
|
|
80
|
+
Quote wildcards so the shell does not expand them. A trailing slash on a remote path means a folder. `proteworks --help` lists every command.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
proteworks pull '~/My Files/campaigns/run/' ./run
|
|
84
|
+
proteworks push ./1UBQ.pdb '~/My Files/test/'
|
|
85
|
+
proteworks push '*.pdb' '~/My Files/pdbs/'
|
|
86
|
+
proteworks push designs.zip '~/My Files/dest/' # auto-extracts
|
|
87
|
+
proteworks mkdir '~/My Files/campaigns/round6/'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
MCP also exposes `create_folder` for the same empty-directory create (returns `folder_id` for `output_folder_id` / push).
|
|
91
|
+
|
|
92
|
+
Login returns to `http://127.0.0.1:8765/callback`. Add that exact URL to the Auth0 application's Allowed Callback URLs.
|
|
93
|
+
|
|
94
|
+
Example prompts: list `~/My Files/`, dry-run pull a folder, pull it, push results back.
|
|
95
|
+
|
|
96
|
+
Optional coaching skills (not required for the server):
|
|
97
|
+
|
|
98
|
+
- [`skills/proteworks-files/SKILL.md`](skills/proteworks-files/SKILL.md)
|
|
99
|
+
- [`skills/proteworks-workflows/SKILL.md`](skills/proteworks-workflows/SKILL.md)
|
|
100
|
+
|
|
101
|
+
Import via Settings → Skills → Import from GitHub (or upload the folder). Hosts without a Skills UI still get conventions from MCP tool descriptions and this README.
|
|
102
|
+
|
|
103
|
+
### Tools
|
|
104
|
+
|
|
105
|
+
| Tool | Purpose |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| `auth_status` | Login state, API URL, active org (never the token) |
|
|
108
|
+
| `organization_list` / `organization_set` | Choose organization (`organization_set` needs `confirm=true`) |
|
|
109
|
+
| `list_files` | Browse a remote path; returns `file_id` + `relative_path` |
|
|
110
|
+
| `pull` / `push` | Transfer with `dry_run` (default true); real transfers need `confirm_transfer=true` |
|
|
111
|
+
| `list_workflows` | Allowlisted agent workflows (`rf-diffusion3`, `proteinmpnn`, `refolding`, `structure-prediction`, `msa-generation`) |
|
|
112
|
+
| `get_workflow_schema` | Full schema with UI-matching defaults |
|
|
113
|
+
| `prepare_workflow_submission` | Merge defaults + overrides; **no submit** (draft body) |
|
|
114
|
+
| `submit_workflow` | Same merge, then submit |
|
|
115
|
+
| `inspect_studio` | Inspect supported `.studio` (proteinmpnn / refolding / rf-diffusion3 / structure_prediction); normalized rows + scores |
|
|
116
|
+
| `save_selected_studio` | Same as Studio Save selected → subset `.studio` uploaded + retention finalized (not yet for structure_prediction) |
|
|
117
|
+
| `inspect_proteinmpnn_studio` | Legacy ProteinMPNN flat-row inspect (prefer `inspect_studio`) |
|
|
118
|
+
| `prepare_refolding_from_proteinmpnn_studio` | Build refolding payload + SA handoff from MPNN studio selection (**no submit**) |
|
|
119
|
+
| `get_execution` / `list_execution_results` / `cancel_execution` | Status / results / cancel (`cancel_execution` needs `confirm=true`) |
|
|
120
|
+
| `estimate_workflow_cost` | Cost estimate from merged params (same validation as prepare) |
|
|
121
|
+
|
|
122
|
+
Auth is shared with the CLI. The access token is stored in the OS keychain and mirrored to `~/.config/proteworks/credentials` (mode `0600`) so Claude Science’s sandbox can read it. There is no separate MCP login: run `proteworks login` in a terminal, then restart the connector.
|
|
123
|
+
|
|
124
|
+
### MCP safety env
|
|
125
|
+
|
|
126
|
+
| Variable | Purpose |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| `PROTEWORKS_MCP_ROOT` | Local workspace root for `pull`/`push` (default: process cwd) |
|
|
129
|
+
| `PROTEWORKS_MCP_READ_ONLY` | When `1`/`true`, disables submit/push/cancel/save-selected |
|
|
130
|
+
| `PROTEWORKS_STORAGE_HOST_ALLOWLIST` | Comma-separated host suffixes for signed URL follow (default: GCS hosts) |
|
|
131
|
+
| `PROTEWORKS_MAX_STUDIO_BYTES` | Max `.studio` download size (default 80 MiB) |
|
|
132
|
+
| `PROTEWORKS_STUDIO_INSPECT_LIMIT` | Default row page size for `inspect_studio` (default 50) |
|
|
133
|
+
|
|
134
|
+
**Staging smoke:** `auth_status` → `list_workflows` → `get_workflow_schema` → `prepare_workflow_submission` → `estimate_workflow_cost` → `submit_workflow` → `get_execution` → `cancel_execution` (with `confirm=true` if still running).
|
|
135
|
+
|
|
136
|
+
### Workflow submit
|
|
137
|
+
|
|
138
|
+
1. `list_files` → get `file_id` for any structure input.
|
|
139
|
+
2. `get_workflow_schema` for the workflow (`rf-diffusion3`, `proteinmpnn`, `refolding`, `structure-prediction`, or `msa-generation`).
|
|
140
|
+
3. `prepare_workflow_submission` to review the merged payload (defaults match a fresh Studio form).
|
|
141
|
+
4. `submit_workflow` when ready.
|
|
142
|
+
|
|
143
|
+
**Refolding** and **Structure Prediction** have no default predictor/MSA — agents must **ask the user** which methods and (when required) which MSA to use before prepare/submit. Structure Prediction also requires a user-provided complex (`structure-prediction-complex-json`). **MSA generation** has no default sequences — ask, then pass `generated-fasta-inputs` or `fasta_files`; use the run **output folder** as `msa_output_folder` downstream. From ProteinMPNN results: `inspect_studio` → ask → `prepare_refolding_from_proteinmpnn_studio` → `submit_workflow`.
|
|
144
|
+
|
|
145
|
+
**`.studio` results:** `inspect_studio` → filter by scores (e.g. pLDDT / Rg) → `save_selected_studio` to write a subset bundle (structure_prediction is inspect-only for now).
|
|
146
|
+
|
|
147
|
+
Payload shape matches Studio `POST /api/v1/workflows/submit` and is reserved for future shareable draft links (`/app?workflowDraft=<id>`) that open the form pre-filled without submitting.
|
|
148
|
+
|
|
149
|
+
### Adding another workflow to the allowlist
|
|
150
|
+
|
|
151
|
+
In **protein-studio**:
|
|
152
|
+
|
|
153
|
+
1. Extract `buildXDefaultParameters` + form init from that workflow’s UI.
|
|
154
|
+
2. Implement `buildXAgentSchema()`.
|
|
155
|
+
3. Run `npm run export-agent-schemas` in `frontend/`; commit JSON under `backend/app/data/agent_workflow_schemas/`.
|
|
156
|
+
4. Add the workflow id to allowlists (frontend export index, backend `AGENT_WORKFLOW_ALLOWLIST`, proteworks-cli `AGENT_WORKFLOW_ALLOWLIST`).
|
|
157
|
+
5. Add default/parity tests; extend the workflows skill if needed.
|
|
158
|
+
|
|
159
|
+
No new MCP tool names are required.
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "proteworks"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.9"
|
|
4
4
|
description = "Sync files with Proteworks using file-browser paths."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
7
7
|
dependencies = [
|
|
8
|
-
|
|
8
|
+
# socks: Claude Science sets ALL_PROXY; httpx needs socksio for that backend.
|
|
9
|
+
"httpx[socks]>=0.27",
|
|
9
10
|
"keyring>=25",
|
|
10
11
|
]
|
|
11
12
|
|
|
12
13
|
[project.optional-dependencies]
|
|
13
14
|
dev = ["pytest>=8"]
|
|
15
|
+
mcp = ["mcp>=1.2", "pyarrow>=14"]
|
|
14
16
|
|
|
15
17
|
[project.scripts]
|
|
16
18
|
proteworks = "proteworks.cli:main"
|
|
19
|
+
proteworks-mcp = "proteworks.mcp.server:main"
|
|
17
20
|
|
|
18
21
|
[build-system]
|
|
19
22
|
requires = ["setuptools>=68"]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Proteworks sync client."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
7
|
+
|
|
8
|
+
try:
|
|
9
|
+
__version__ = version("proteworks")
|
|
10
|
+
except PackageNotFoundError:
|
|
11
|
+
__version__ = "0.1.9"
|
|
12
|
+
except Exception: # pragma: no cover
|
|
13
|
+
__version__ = "0.1.9"
|