Replaces hardcoded 38 roles with complete list extracted from
bicep/lookup/rbaclookup:2.x module.
Changes:
- Add scripts/extract_roles_from_rbaclookup.py to parse rbacLookup.bicep
- Generate ilsp/bicep_lsp/azure_roles.json with 682 role names
- Load roles dynamically in modules.py from JSON file
- Now supports ALL Azure built-in roles for autocomplete
Benefits:
- Complete Azure RBAC coverage (682 vs 38 roles)
- Easy to update when new roles are added to rbaclookup module
- Cleaner code (no giant hardcoded list in modules.py)
Usage to update roles:
python3 scripts/extract_roles_from_rbaclookup.py /path/to/rbacLookup.bicep
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Catalog stores lowercase paths (e.g. modules/keyvault) but .bicep files
may use camelCase (e.g. modules/keyVault). Make get_module_by_ref
case-insensitive so completions work regardless of casing.
- yaml-language-server: rewrite to stdio per WebSocket (fixes crash loop)
vscode-jsonrpc v9 createServerSocketTransport is a TCP client, not server
now spawns yaml-language-server --stdio per connection via asyncio subprocess
- bicep/modules.py: add /iac_source_catalog.json as first path in _IAC_SOURCE_PATHS
Dockerfile copies to /iac_source_catalog.json but path wasn't listed
- server.py: remove YAML_LSP_PORT daemon (no longer needed with stdio mode)
- Makefile: add -e HTTP_PORT=$(HEALTH_PORT) to all docker run commands
server defaulted to :8000 but Makefile exposed :2089 with no override
Two bugs fixed in BicepModuleCatalog:
1. as_completion_items() generated 'br/modules:bicep/modules/appservice:...'
but bicepconfig modulePath='bicep' means Bicep prepends 'bicep/' automatically.
Fix: store ref_path = path.removeprefix('bicep/') and use it in insertText.
Correct output: 'br/modules:modules/appservice:2.3.x'
2. version/param lookups used get_module_by_name() which only matches the last
path segment ('appservice'). New-style refs capture 'modules/appservice' from
the regex, so lookup returned empty. Fix: add get_module_by_ref() that matches
both ref_path and bare name.
Also fixes _iac_param_map to strip path prefix so IAC source descriptions
still enrich completions for 'modules/appservice' refs.
All 63 tests pass.
- Remove all DevOpsMCP/aiohttp runtime deps from BicepModuleCatalog
- BicepModuleCatalog.load() reads bicep_modules_catalog.json from disk at startup (sync)
- Fix _load_catalog: catalog uses dict {path: {versions, schema}} not a list
- server.py: call BicepModuleCatalog.load() synchronously, not via asyncio.gather
- Dockerfile: COPY bicep_modules_catalog.json into both builder + runtime stages
- Health endpoint now reports bicep_modules: 27
Verified locally: make run-quick → health returns pypi_packages:40 bicep_modules:27
catalog.py: Fix HTML parsing regex — pypi-server.i80.dk uses relative hrefs
like href="pkg-name/" not /simple/pkg-name/. Use simpler <a> text extractor.
modules.py: Replace /call-tool POST (wrong) with GET /api/bicep-modules (new REST
endpoint added to DevOpsMCP). Simpler, no MCP protocol overhead.