8 lines
579 B
Python
8 lines
579 B
Python
|
|
import hashlib,json
|
||
|
|
from pathlib import Path
|
||
|
|
import activity_core.context_resolvers
|
||
|
|
from activity_core.context_resolvers.base import CONTEXT_RESOLVER_REGISTRY
|
||
|
|
from activity_core.repository_grant import RepositoryGrant
|
||
|
|
root=Path('/app/src/activity_core')
|
||
|
|
print(json.dumps({'registered':sorted(CONTEXT_RESOLVER_REGISTRY),'source_hashes':{str(p.relative_to(root)):hashlib.sha256(p.read_bytes()).hexdigest() for p in root.rglob('*.py')},'grant_id':RepositoryGrant.model_validate({'version':'1','allowed_paths':['docs/'],'commit_count':{'min':1,'max':1},'publish':False}).grant_id}))
|