Matches original script APIs against MethodSpec registrations in Rex-EMoolator and keeps review evidence separate from registration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1.0 KiB
Python
28 lines
1.0 KiB
Python
"""Start the local Atlas with this repository's snapshots and review registry."""
|
|
import argparse
|
|
import os
|
|
from pathlib import Path
|
|
|
|
|
|
def main():
|
|
p = argparse.ArgumentParser(description=__doc__)
|
|
p.add_argument('--emulator-root', required=True, type=Path)
|
|
p.add_argument('--inventory', type=Path)
|
|
p.add_argument('--port', type=int, default=8766)
|
|
a = p.parse_args()
|
|
root = Path(__file__).resolve().parents[1]
|
|
if not (a.emulator_root / 'core/src').is_dir():
|
|
p.error('--emulator-root must point to Rex-EMoolator')
|
|
os.environ['AMS_EMULATOR_ROOT'] = str(a.emulator_root.resolve())
|
|
os.environ['AMS_TRACKER_SNAPSHOTS'] = str(root / 'snapshots')
|
|
os.environ['AMS_TRACKER_REVIEWS'] = str(root / 'tracker-reviews.json')
|
|
inventory = a.inventory or root / 'data/binary-inventory.json'
|
|
if inventory.is_file():
|
|
os.environ['AMS_TRACKER_INVENTORY'] = str(inventory.resolve())
|
|
import uvicorn
|
|
uvicorn.run('ams.api.app:create_app', factory=True, host='127.0.0.1', port=a.port)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|