Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
f8cd37ac8c
1823 changed files with 145167 additions and 0 deletions
2
scripts/formation/states/ut/__init__.py
Normal file
2
scripts/formation/states/ut/__init__.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
from .adapter import adapter
|
||||
from .config import CONFIG
|
||||
116
scripts/formation/states/ut/adapter.py
Normal file
116
scripts/formation/states/ut/adapter.py
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
"""Utah — DCC SOS portal automation.
|
||||
|
||||
Name search implemented via the public business entity search.
|
||||
LLC/Corp filing selectors pending live portal verification.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
|
||||
from scripts.formation.base import (
|
||||
StatePortal,
|
||||
NameSearchResult,
|
||||
FormationOrder,
|
||||
FilingResult,
|
||||
FilingStatus,
|
||||
)
|
||||
from .config import CONFIG
|
||||
|
||||
|
||||
class UTPortal(StatePortal):
|
||||
STATE_CODE = "UT"
|
||||
STATE_NAME = "Utah"
|
||||
PORTAL_NAME = "DCC"
|
||||
PORTAL_URL = CONFIG["portal_url"]
|
||||
NWRA_ADDRESS = CONFIG["nwra_address"]
|
||||
NWRA_CITY = CONFIG["nwra_city"]
|
||||
NWRA_STATE = CONFIG["nwra_state"]
|
||||
NWRA_ZIP = CONFIG["nwra_zip"]
|
||||
|
||||
async def search_name(self, name: str) -> NameSearchResult:
|
||||
"""Search Utah business name availability via the public portal."""
|
||||
try:
|
||||
page = await self.start_browser()
|
||||
await page.goto(CONFIG["name_search_url"], wait_until="networkidle")
|
||||
await self.human_delay(1.0, 2.5)
|
||||
|
||||
search_sel = (
|
||||
CONFIG["selectors"].get("search_input")
|
||||
or 'input[type="text"], input[name*="earch"], input[name*="ame"]'
|
||||
)
|
||||
await page.fill(search_sel, "")
|
||||
await self.type_slowly(page, search_sel, name)
|
||||
await self.human_delay(0.5, 1.0)
|
||||
|
||||
btn_sel = (
|
||||
CONFIG["selectors"].get("search_button")
|
||||
or 'button[type="submit"], input[type="submit"]'
|
||||
)
|
||||
await page.click(btn_sel)
|
||||
await page.wait_for_load_state("networkidle")
|
||||
await self.human_delay(1.0, 2.0)
|
||||
|
||||
content = await page.content()
|
||||
await self.screenshot(page, f"${CODE}_name_search_{name}")
|
||||
|
||||
no_results = any(
|
||||
phrase in content.lower()
|
||||
for phrase in ["no match", "no results", "no records", "no entities", "0 results"]
|
||||
)
|
||||
|
||||
if no_results:
|
||||
return NameSearchResult(
|
||||
available=True, exact_match=False, similar_names=[],
|
||||
state_code="UT", searched_name=name,
|
||||
raw_response=content[:2000],
|
||||
)
|
||||
|
||||
similar: list[str] = []
|
||||
pattern = re.compile(r'<td[^>]*>([^<]*?' + re.escape(name[:8]) + r'[^<]*?)</td>', re.IGNORECASE)
|
||||
for m in pattern.finditer(content):
|
||||
found = m.group(1).strip()
|
||||
if found and 3 < len(found) < 200:
|
||||
similar.append(found)
|
||||
|
||||
exact = any(
|
||||
s.upper().replace(",", "").strip() == name.upper().replace(",", "").strip()
|
||||
for s in similar
|
||||
)
|
||||
|
||||
return NameSearchResult(
|
||||
available=not exact, exact_match=exact,
|
||||
similar_names=similar[:10], state_code="UT",
|
||||
searched_name=name, raw_response=content[:2000],
|
||||
)
|
||||
except Exception as exc:
|
||||
return NameSearchResult(
|
||||
available=False, state_code="UT", searched_name=name,
|
||||
raw_response=f"Error: {exc}",
|
||||
)
|
||||
|
||||
async def file_llc(self, order: FormationOrder) -> FilingResult:
|
||||
"""File an LLC in Utah. Selectors pending live portal verification."""
|
||||
return FilingResult(
|
||||
success=False, status=FilingStatus.PENDING,
|
||||
state_code="UT", entity_name=order.entity_name,
|
||||
error_message=(
|
||||
"UT filing adapter selectors pending verification. "
|
||||
f"Admin: file manually at {CONFIG['portal_url']} — LLC formation."
|
||||
),
|
||||
)
|
||||
|
||||
async def file_corporation(self, order: FormationOrder) -> FilingResult:
|
||||
"""File a corporation in Utah. Selectors pending live portal verification."""
|
||||
return FilingResult(
|
||||
success=False, status=FilingStatus.PENDING,
|
||||
state_code="UT", entity_name=order.entity_name,
|
||||
error_message=(
|
||||
"UT filing adapter selectors pending verification. "
|
||||
f"Admin: file manually at {CONFIG['portal_url']} — Corp formation."
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
def adapter() -> UTPortal:
|
||||
return UTPortal()
|
||||
32
scripts/formation/states/ut/config.py
Normal file
32
scripts/formation/states/ut/config.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
"""Utah Secretary of State — portal configuration."""
|
||||
|
||||
CONFIG = {
|
||||
"state": "Utah",
|
||||
"abbreviation": "UT",
|
||||
"agency": "Secretary of State",
|
||||
"portal_name": "DCC",
|
||||
"portal_url": "https://corporations.utah.gov",
|
||||
"name_search_url": "https://secure.utah.gov/bes/index.html",
|
||||
"portal_login_required": False,
|
||||
"registered_agent": {
|
||||
"name": "Northwest Registered Agent",
|
||||
"street": "3400 Ashton Blvd Ste 180",
|
||||
"city": "Lehi",
|
||||
"state": "UT",
|
||||
"zip": "84043",
|
||||
},
|
||||
"nwra_address": "3400 Ashton Blvd Ste 180",
|
||||
"nwra_city": "Lehi",
|
||||
"nwra_state": "UT",
|
||||
"nwra_zip": "84043",
|
||||
"fees": {
|
||||
"llc": 59,
|
||||
"corporation": 59,
|
||||
},
|
||||
"selectors": {
|
||||
"search_input": "",
|
||||
"search_button": "",
|
||||
"results_table": "",
|
||||
"no_results": "",
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue