Files
aigc-home/docs/hel-892/gh-multi-document-evidence/source-acquisition-tools.json
T
2026-11-01 08:58:01 +08:00

31 lines
10 KiB
JSON

{
"note": "本轮实际工具源文存档;前三个工具使用已有fetch/reuse片段,片段另附;finish初始事后创建时间不作为首次获取,最终sources.json已改正并保留准确请求时间/未知。工具不作为自动重跑远端的授权。",
"tools": [
{
"name": "sources-gh-multi.py",
"sha256": "3808378da24713c765658e3d3e307711037bdb139a3a43f8c34d5b48d5fc171f",
"text": "from pathlib import Path\nimport json,hashlib,os,datetime,subprocess,concurrent.futures,urllib.request\nR=Path.cwd();REF=R/'docs/hel-892/gh-multi-reference';REF.mkdir(exist_ok=True);now=datetime.datetime.now(datetime.timezone.utc).isoformat();rows=[]\nfragment=Path('.local-evidence/setup-anima.py').read_text();fragment=fragment[fragment.index('def fetch(spec):'):fragment.index('with concurrent.futures.ThreadPoolExecutor')].replace('anima-','gh-multi-').replace(\"['git','-C',str(cache),*args]\",\"['git','-c','core.quotepath=false','-C',str(cache),*args]\");exec(fragment)\ndef reuse(folder,ids,files=None):\n prior=R/'docs/hel-892'/folder\n for e in json.loads((prior/'sources.json').read_bytes())['sources']:\n if e['id']not in ids or(files is not None and e['file']not in files):continue\n if any(x['id']==e['id']and x['file']==e['file']for x in rows):continue\n e=dict(e)\n for k in ['local_file','license_file','identity_root','canonical_identity_record']:\n if k in e and not e[k].startswith('未知'):e[k]=os.path.relpath((prior/e[k]).resolve(),REF)\n e['reverified_at']=now;e['applicability']='本图逐实例准确版本复核;首次获取保留,local驱动实现未知,不执行或认证目标';rows.append(e)\nreuse('h3-latent-reference',['core0300','frontend','litegraph'])\nreuse('t8-i2v-reference',['core0311','kjpatch','vhs'])\nreuse('qwen21-n-reference',['goohai'])\nspecs=[('easy','yolain/ComfyUI-Easy-Use','130c1b5796d9876a5f853fa0bea88e808cfda4ad',['__init__.py','py/easyNodes.py','py/nodes/logic.py','pyproject.toml','requirements.txt','LICENSE']),('vhssecond','Kosinkadink/ComfyUI-VideoHelperSuite','02dfc5ee26ceaaabd4c4dbff53e2075e258a626f',['__init__.py','videohelpersuite/nodes.py','videohelpersuite/utils.py','videohelpersuite/server.py','videohelpersuite/logger.py','videohelpersuite/documentation.py','video_formats/h264-mp4.json','web/js/VHS.core.js','web/js/videoinfo.js','LICENSE','requirements.txt','pyproject.toml'])]\nwith concurrent.futures.ThreadPoolExecutor(max_workers=2)as pool:\n for rr in pool.map(fetch,specs):rows+=rr\n(REF/'sources.json').write_text(json.dumps(dict(sources=rows),ensure_ascii=False,indent=2)+'\\n');print('TOTAL',len(rows),flush=True)\n"
},
{
"name": "extend-gh-multi.py",
"sha256": "a51fed233588d12c9d1c4c8cadfe635639738026449efc9acc3cc530b13bf1eb",
"text": "from pathlib import Path\nimport json,hashlib,os,datetime,subprocess,concurrent.futures,urllib.request\nR=Path.cwd();REF=R/'docs/hel-892/gh-multi-reference';REF.mkdir(exist_ok=True);now=datetime.datetime.now(datetime.timezone.utc).isoformat();rows=[]\nfragment=Path('.local-evidence/setup-anima.py').read_text();fragment=fragment[fragment.index('def fetch(spec):'):fragment.index('with concurrent.futures.ThreadPoolExecutor')].replace('anima-','gh-multi-').replace(\"['git','-C',str(cache),*args]\",\"['git','-c','core.quotepath=false','-C',str(cache),*args]\");exec(fragment)\ndef reuse(folder,ids,files=None):\n prior=R/'docs/hel-892'/folder\n for e in json.loads((prior/'sources.json').read_bytes())['sources']:\n if e['id']not in ids or(files is not None and e['file']not in files):continue\n if any(x['id']==e['id']and x['file']==e['file']for x in rows):continue\n e=dict(e)\n for k in ['local_file','license_file','identity_root','canonical_identity_record']:\n if k in e and not e[k].startswith('未知'):e[k]=os.path.relpath((prior/e[k]).resolve(),REF)\n e['reverified_at']=now;e['applicability']='本图逐实例准确版本复核;首次获取保留,local驱动实现未知,不执行或认证目标';rows.append(e)\nreuse('h3-latent-reference',['core0300','frontend','litegraph'])\nreuse('t8-i2v-reference',['core0311','kjpatch','vhs'])\nreuse('gh-multi-reference',['easy','vhssecond'])\nreuse('qwen21-n-reference',['goohai'])\nspecs=[('goohai','goohai/Goohaitools-comfyui','83abca47fa10d47a1ffd0c7cb62b7fa2a9dc0ddc',['nodes/孤海-浮点滑条.py','nodes/孤海批处理开关.py','nodes/孤海遮罩检测.py']),('easy','yolain/ComfyUI-Easy-Use','130c1b5796d9876a5f853fa0bea88e808cfda4ad',['py/libs/utils.py','py/libs/log.py','py/config.py'])]\nwith concurrent.futures.ThreadPoolExecutor(max_workers=2)as pool:\n for rr in pool.map(fetch,specs):\n for e in rr:\n if not any(x['id']==e['id']and x['file']==e['file']for x in rows):rows.append(e)\n(REF/'sources.json').write_text(json.dumps(dict(sources=rows),ensure_ascii=False,indent=2)+'\\n');print('TOTAL',len(rows),flush=True)\n"
},
{
"name": "core-gh-multi.py",
"sha256": "99ea22cefb59461208e2f2d2f6e85cd8f0b530fa278b64d57d1154a72f3b7379",
"text": "from pathlib import Path\nimport json,hashlib,os,datetime,subprocess,concurrent.futures,urllib.request\nR=Path.cwd();REF=R/'docs/hel-892/gh-multi-reference';REF.mkdir(exist_ok=True);now=datetime.datetime.now(datetime.timezone.utc).isoformat();rows=[]\nfragment=Path('.local-evidence/setup-anima.py').read_text();fragment=fragment[fragment.index('def fetch(spec):'):fragment.index('with concurrent.futures.ThreadPoolExecutor')].replace('anima-','gh-multi-').replace(\"['git','-C',str(cache),*args]\",\"['git','-c','core.quotepath=false','-C',str(cache),*args]\");exec(fragment)\ndef reuse(folder,ids,files=None):\n prior=R/'docs/hel-892'/folder\n for e in json.loads((prior/'sources.json').read_bytes())['sources']:\n if e['id']not in ids or(files is not None and e['file']not in files):continue\n if any(x['id']==e['id']and x['file']==e['file']for x in rows):continue\n e=dict(e)\n for k in ['local_file','license_file','identity_root','canonical_identity_record']:\n if k in e and not e[k].startswith('未知'):e[k]=os.path.relpath((prior/e[k]).resolve(),REF)\n e['reverified_at']=now;e['applicability']='本图逐实例准确版本复核;首次获取保留,local驱动实现未知,不执行或认证目标';rows.append(e)\nreuse('gh-multi-reference',['core0300','core0311','kjpatch','vhs','vhssecond','frontend','goohai','easy','art'])\nspecs=[('core0300','Comfy-Org/ComfyUI','v0.30.0',['comfy_extras/nodes_lora_debug.py','comfy_extras/nodes_lora_extract.py']),('core0311','Comfy-Org/ComfyUI','v0.31.1',['comfy_extras/nodes_custom_sampler.py','comfy_api/latest/_io.py'])]\nwith concurrent.futures.ThreadPoolExecutor(max_workers=2)as pool:\n for rr in pool.map(fetch,specs):\n for e in rr:\n if not any(x['id']==e['id']and x['file']==e['file']for x in rows):rows.append(e)\n(REF/'sources.json').write_text(json.dumps(dict(sources=rows),ensure_ascii=False,indent=2)+'\\n')\n"
},
{
"name": "art-gh-multi.py",
"sha256": "76a8f31666dd54b2e37a60096290ce6e414d41cca23cdfd3045d6290a9b32778",
"text": "from pathlib import Path\nimport json,urllib.request,struct,zlib,hashlib,datetime\nR=Path('docs/hel-892/gh-multi-reference');url=json.loads((R/'art-version.txt').read_bytes())['downloadUrl'];logs=[]\ndef request(span):\n req=urllib.request.Request(url,headers={'Range':'bytes='+span,'User-Agent':'Multica-static-source-review'})\n with urllib.request.urlopen(req,timeout=40)as z:\n assert z.status==206,(z.status,dict(z.headers));raw=z.read(2000000);h={k.lower():v for k,v in z.headers.items()}\n logs.append(dict(range=span,status=206,headers=h,bytes=len(raw),sha256=hashlib.sha256(raw).hexdigest(),time=datetime.datetime.now(datetime.timezone.utc).isoformat()));return raw,h\nraw,h=request('-65536');(R/'art-central-tail.bin').write_bytes(raw);total=int(h['content-range'].split('/')[-1]);i=raw.rfind(b'PK\\x05\\x06');e=struct.unpack_from('<4s4H2IH',raw,i);size,offset=e[5:7];start=total-len(raw);cd=raw[offset-start:offset-start+size]if offset>=start else request(f'{offset}-{offset+size-1}')[0];(R/'art-central-directory.bin').write_bytes(cd)\nentries=[];i=0\nwhile i<len(cd):\n a=struct.unpack_from('<4s6H3I5H2I',cd,i);assert a[0]==b'PK\\x01\\x02';name=cd[i+46:i+46+a[10]].decode('utf8');entries.append(dict(name=name,method=a[4],crc=a[7],compressed=a[8],size=a[9],offset=a[16]));i+=46+sum(a[10:13])\n(R/'art-members.json').write_text(json.dumps(entries,ensure_ascii=False,indent=2)+'\\n');print([x['name']for x in entries if x['name'].endswith('.py')],flush=True)\nselected=['__init__.py','LICENSE','requirements.txt','pyproject.toml','modules/postprocessing/color_correct.py','modules/postprocessing/__init__.py','modules/nodes.py','modules/utils.py']\nfor ent in entries:\n if ent['name']not in selected:continue\n off=ent['offset'];head=request(f'{off}-{off+29}')[0];a=struct.unpack('<4s5H3I2H',head);payload=off+30+a[-2]+a[-1];data=request(f'{payload}-{payload+ent[\"compressed\"]-1}')[0];out=zlib.decompress(data,-15)if ent['method']==8 else data;assert len(out)==ent['size']and zlib.crc32(out)==ent['crc'];(R/('art__'+ent['name'].replace('/','__'))).write_bytes(out);ent.update(saved=True,sha256=hashlib.sha256(out).hexdigest());print('SAVED',ent['name'],len(out),flush=True)\n(R/'art-members.json').write_text(json.dumps(entries,ensure_ascii=False,indent=2)+'\\n');(R/'art-range-requests.json').write_text(json.dumps(logs,ensure_ascii=False,indent=2)+'\\n')\n"
},
{
"name": "finish-gh-multi-sources.py",
"sha256": "4cef8a6430cbe9b2742d26c791befcd8e7ed52c24ae8062a0a71bb301859f2ce",
"text": "from pathlib import Path\nimport json,hashlib,datetime\nr=Path('docs/hel-892/gh-multi-reference');p=r/'sources.json';x=json.loads(p.read_bytes());now=datetime.datetime.now(datetime.timezone.utc).isoformat()\nfor e in x['sources']:\n if e['id']=='goohai':e['license_file']='未知:准确Git树无许可文本,未取得本图三准确类'\nfor m in json.loads((r/'art-members.json').read_bytes()):\n if not m.get('saved'):continue\n name='art__'+m['name'].replace('/','__');x['sources'].append(dict(id='art',repo='sipherxyz/comfyui-art-venture',file=m['name'],local_file=name,commit='未知:registry准确1.1.4发布未绑定Git',tree='未知:发布ZIP中央目录非Git树',tag='1.1.4',url=json.loads((r/'art-version.txt').read_bytes())['downloadUrl'],sha256=m['sha256'],member_crc32=m['crc'],package_sha256='unknown: Range selected members only',license_file='art__LICENSE',identity_root='.',acquisition_time=now,reverified_at=now,transport='HTTP206 central directory and necessary members only',applicability='本图252准确1.1.4发布成员,未执行调色/取整包,Git未知'))\np.write_text(json.dumps(x,ensure_ascii=False,indent=2)+'\\n')\n"
}
]
}