{"id":"fileproof","name":"FileProof","version":"1.0.0","stage":"stable","tagline":{"en":"Check that a file is the file it should be.","zh":"核对一个文件是不是它该是的那个文件。"},"description":{"en":"Computes SHA-256, compares two files, checks a file against a known hash, detects the real file type from its bytes, and verifies a detached signature when you have the signer's public key. Returns a machine-readable report.","zh":"计算 SHA-256、比对两份文件、对照已知哈希、从字节识别真实文件类型，并在你持有签名者公钥时验证分离式签名。输出机器可读报告。"},"WHEN_TO_USE":["Before installing or running a downloaded file: confirm it matches the hash or signature the publisher published.","To confirm two copies of a file are byte-identical.","To find out what a file really is when its name or MIME type may be wrong.","To record a file's fingerprint so a later reader can confirm they have the same file."],"WHEN_NOT_TO_USE":["To decide whether what a document says is true. A hash says nothing about content.","To scan for malware. FileProof does not analyse behaviour.","To verify OpenPGP, minisign, Authenticode or certificate-chain signatures (not supported)."],"LIMITATIONS":["A matching hash proves identical bytes, not authorship, date or truth.","The reference hash or public key must come from a channel you already trust.","Inline files up to 3000000 bytes, URL files up to 8000000 bytes. For larger files compute the hash locally and send only the hash."],"pricing":{"tier":"L0","credits_per_call":0,"free":true,"payment":"none"},"auth":"none","interfaces":{"web":"https://www.agentarchitect.me/tools/fileproof","rest":{"method":"POST","url":"https://www.agentarchitect.me/api/v1/tools/fileproof","content_type":"application/json"},"definition":"https://www.agentarchitect.me/api/v1/tools/fileproof","mcp":{"endpoint":"https://www.agentarchitect.me/mcp","tool":"fileproof_check"},"skill":"https://www.agentarchitect.me/tools/fileproof/skill.md"},"runs_locally_in_browser":true,"example_request":{"file":{"content_base64":"aGVsbG8=","name":"hello.txt"},"expected_sha256":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"},"INPUT_SCHEMA":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"file":{"type":"object","properties":{"content_base64":{"description":"File bytes, base64. Max 3000000 bytes decoded.","type":"string","maxLength":4200000},"url":{"description":"Public http(s) URL to fetch. Max 8000000 bytes. Private and reserved addresses are refused.","type":"string","maxLength":2048},"sha256":{"description":"Hash you computed locally. Use this to compare or check a hash without sending the file.","type":"string","maxLength":80},"name":{"description":"File name, used only to compare the extension with the detected type.","type":"string","maxLength":200},"declared_type":{"description":"MIME type the file claims to be.","type":"string","maxLength":120},"size_bytes":{"description":"Size, when only a hash is supplied.","type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false,"description":"Exactly one of content_base64, url or sha256."},"compare_with":{"description":"A second file to compare byte-for-byte (by hash).","type":"object","properties":{"content_base64":{"description":"File bytes, base64. Max 3000000 bytes decoded.","type":"string","maxLength":4200000},"url":{"description":"Public http(s) URL to fetch. Max 8000000 bytes. Private and reserved addresses are refused.","type":"string","maxLength":2048},"sha256":{"description":"Hash you computed locally. Use this to compare or check a hash without sending the file.","type":"string","maxLength":80},"name":{"description":"File name, used only to compare the extension with the detected type.","type":"string","maxLength":200},"declared_type":{"description":"MIME type the file claims to be.","type":"string","maxLength":120},"size_bytes":{"description":"Size, when only a hash is supplied.","type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"expected_sha256":{"description":"The hash the publisher says the file should have.","type":"string","maxLength":80},"signature":{"type":"object","properties":{"algorithm":{"type":"string","enum":["ed25519","ecdsa-p256-sha256","ecdsa-p384-sha384","rsa-pss-sha256","rsa-pkcs1v15-sha256"]},"public_key_pem":{"type":"string","maxLength":8000,"description":"Signer's public key, SPKI PEM (-----BEGIN PUBLIC KEY-----)."},"signature_base64":{"type":"string","maxLength":4096,"description":"Detached signature over the raw file bytes, base64. ECDSA may be DER or raw r||s."}},"required":["algorithm","public_key_pem","signature_base64"],"additionalProperties":false},"max_cost_credits":{"description":"Refuse the call if it would cost more than this many credits. All current tools cost 0.","type":"number","minimum":0,"maximum":1000000}},"required":["file"],"additionalProperties":false},"OUTPUT_SCHEMA":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tool":{"type":"string"},"version":{"type":"string"},"status":{"type":"string","enum":["ok","error"]},"result":{"anyOf":[{"type":"object","properties":{"integrity":{"type":"string","enum":["verified_against_reference","mismatch","no_reference"]},"file":{"type":"object","properties":{"name":{"type":["string","null"]},"input_mode":{"type":"string","enum":["bytes","url","hash_only"]},"size_bytes":{"type":["number","null"]},"sha256":{"type":"string"},"detected_type":{"anyOf":[{"type":"object","properties":{"mime":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["image","document","archive","executable","media","text","unknown"]}},"required":["mime","label","category"],"additionalProperties":false},{"type":"null"}]},"declared_type":{"type":["string","null"]},"type_matches_declared":{"type":["boolean","null"]}},"required":["name","input_mode","size_bytes","sha256","detected_type","declared_type","type_matches_declared"],"additionalProperties":false},"compare":{"anyOf":[{"type":"object","properties":{"identical":{"type":"boolean"},"other":{"type":"object","properties":{"name":{"type":["string","null"]},"input_mode":{"type":"string","enum":["bytes","url","hash_only"]},"size_bytes":{"type":["number","null"]},"sha256":{"type":"string"},"detected_type":{"anyOf":[{"type":"object","properties":{"mime":{"type":"string"},"label":{"type":"string"},"category":{"type":"string","enum":["image","document","archive","executable","media","text","unknown"]}},"required":["mime","label","category"],"additionalProperties":false},{"type":"null"}]},"declared_type":{"type":["string","null"]},"type_matches_declared":{"type":["boolean","null"]}},"required":["name","input_mode","size_bytes","sha256","detected_type","declared_type","type_matches_declared"],"additionalProperties":false}},"required":["identical","other"],"additionalProperties":false},{"type":"null"}]},"known_hash":{"anyOf":[{"type":"object","properties":{"expected_sha256":{"type":"string"},"match":{"type":"boolean"}},"required":["expected_sha256","match"],"additionalProperties":false},{"type":"null"}]},"signature":{"anyOf":[{"type":"object","properties":{"algorithm":{"type":"string","enum":["ed25519","ecdsa-p256-sha256","ecdsa-p384-sha384","rsa-pss-sha256","rsa-pkcs1v15-sha256"]},"valid":{"type":"boolean"},"public_key_sha256":{"type":"string"}},"required":["algorithm","valid","public_key_sha256"],"additionalProperties":false},{"type":"null"}]},"checks_performed":{"type":"array","items":{"type":"string"}}},"required":["integrity","file","compare","known_hash","signature","checks_performed"],"additionalProperties":false},{"type":"null"}]},"evidence":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"source":{"type":"string","enum":["computed","file_metadata","content_credentials","user_supplied","remote_fetch"]},"summary":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","kind","source","summary"],"additionalProperties":false}},"limitations":{"type":"array","items":{"type":"string"}},"next_actions":{"type":"array","items":{"type":"string"}},"request_id":{"type":"string"},"cost":{"type":"object","properties":{"charged":{"type":"boolean"},"amount":{"type":"number"},"unit":{"type":"string","const":"credits"},"tier":{"type":"string","enum":["L0","L1","L2","L3"]},"simulated":{"type":"boolean"}},"required":["charged","amount","unit","tier","simulated"],"additionalProperties":false},"untrusted_content_notice":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_input","payload_too_large","unsupported_media_type","url_not_allowed","fetch_failed","fetch_timeout","rate_limited","quota_exceeded","budget_exceeded","not_available","tool_not_found","internal_error"]},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"retry_after_seconds":{"type":"number"}},"required":["code","message"],"additionalProperties":false}},"required":["tool","version","status","result","evidence","limitations","next_actions","request_id","cost","untrusted_content_notice"],"additionalProperties":false}}