[{"data":1,"prerenderedAt":639},["ShallowReactive",2],{"navigation_docs":3,"-guide-agents":128,"-guide-agents-surround":634},[4,40],{"title":5,"path":6,"stem":7,"children":8,"icon":39},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Encoding and Decoding","\u002Fguide\u002Fencoding","1.guide\u002F02.encoding",{"title":16,"path":17,"stem":18},"Checksums","\u002Fguide\u002Fchecksums","1.guide\u002F03.checksums",{"title":20,"path":21,"stem":22},"Identify","\u002Fguide\u002Fidentify","1.guide\u002F04.identify",{"title":24,"path":25,"stem":26},"CLI","\u002Fguide\u002Fcli","1.guide\u002F05.cli",{"title":28,"path":29,"stem":30},"Agents","\u002Fguide\u002Fagents","1.guide\u002F06.agents",{"title":32,"path":33,"stem":34},"Custom Encodings","\u002Fguide\u002Fcustom","1.guide\u002F07.custom",{"title":36,"path":37,"stem":38},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F08.playground","i-lucide-book-open",{"title":41,"path":42,"stem":43,"children":44,"icon":127},"Encodings","\u002Fencodings","2.encodings\u002F00.index",[45,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123],{"title":46,"path":42,"stem":43},"Every encoding",{"title":48,"path":49,"stem":50},"Binary","\u002Fencodings\u002Fbinary","2.encodings\u002F01.binary",{"title":52,"path":53,"stem":54},"Hex","\u002Fencodings\u002Fhex","2.encodings\u002F02.hex",{"title":56,"path":57,"stem":58},"Base32","\u002Fencodings\u002Fbase32","2.encodings\u002F03.base32",{"title":60,"path":61,"stem":62},"Base32hex","\u002Fencodings\u002Fbase32hex","2.encodings\u002F04.base32hex",{"title":64,"path":65,"stem":66},"Crockford's Base32","\u002Fencodings\u002Fbase32-crockford","2.encodings\u002F05.base32-crockford",{"title":68,"path":69,"stem":70},"z-base-32","\u002Fencodings\u002Fz-base-32","2.encodings\u002F06.z-base-32",{"title":72,"path":73,"stem":74},"Base45","\u002Fencodings\u002Fbase45","2.encodings\u002F07.base45",{"title":76,"path":77,"stem":78},"Base58","\u002Fencodings\u002Fbase58","2.encodings\u002F08.base58",{"title":80,"path":81,"stem":82},"Base58Check","\u002Fencodings\u002Fbase58check","2.encodings\u002F09.base58check",{"title":84,"path":85,"stem":86},"Base58 (Flickr)","\u002Fencodings\u002Fbase58-flickr","2.encodings\u002F10.base58-flickr",{"title":88,"path":89,"stem":90},"Base58 (Ripple)","\u002Fencodings\u002Fbase58-ripple","2.encodings\u002F11.base58-ripple",{"title":92,"path":93,"stem":94},"Base64","\u002Fencodings\u002Fbase64","2.encodings\u002F12.base64",{"title":96,"path":97,"stem":98},"Base64url","\u002Fencodings\u002Fbase64url","2.encodings\u002F13.base64url",{"title":100,"path":101,"stem":102},"Ascii85","\u002Fencodings\u002Fascii85","2.encodings\u002F14.ascii85",{"title":104,"path":105,"stem":106},"Z85","\u002Fencodings\u002Fz85","2.encodings\u002F15.z85",{"title":108,"path":109,"stem":110},"basE91","\u002Fencodings\u002Fbase91","2.encodings\u002F16.base91",{"title":112,"path":113,"stem":114},"Bech32","\u002Fencodings\u002Fbech32","2.encodings\u002F17.bech32",{"title":116,"path":117,"stem":118},"Bech32m","\u002Fencodings\u002Fbech32m","2.encodings\u002F18.bech32m",{"title":120,"path":121,"stem":122},"uuencode","\u002Fencodings\u002Fuuencode","2.encodings\u002F19.uuencode",{"title":124,"path":125,"stem":126},"Quoted-Printable","\u002Fencodings\u002Fquoted-printable","2.encodings\u002F20.quoted-printable","i-lucide-library",{"id":129,"title":28,"body":130,"description":627,"extension":628,"links":629,"meta":630,"navigation":563,"path":29,"seo":632,"stem":30,"__hash__":633},"docs\u002F1.guide\u002F06.agents.md",{"type":131,"value":132,"toc":619},"minimark",[133,138,155,263,267,270,279,292,297,303,310,314,317,323,326,332,339,343,398,401,476,479,483,509,516,520,605,615],[134,135,137],"h2",{"id":136},"same-tools-every-host","Same tools, every host",[139,140,141,142,146,147,150,151,154],"p",{},"Four hosts, one set of executors. The MCP server, the Pi and OMP extensions and ",[143,144,145],"code",{},"@agntn\u002Fencodings\u002Fai"," all call ",[143,148,149],{},"src\u002Ftool-operations.ts",". Same arguments, same checks, same text back. A fix lands once. This site runs those executors too. Every ",[143,152,153],{},"Full tool response"," dialog here is exactly what a model reads.",[156,157,158,174],"table",{},[159,160,161],"thead",{},[162,163,164,168,171],"tr",{},[165,166,167],"th",{},"Tool",[165,169,170],{},"Does",[165,172,173],{},"Arguments",[175,176,177,203,223,244],"tbody",{},[162,178,179,185,188],{},[180,181,182],"td",{},[143,183,184],{},"encodings_encode",[180,186,187],{},"Write text or bytes in an encoding",[180,189,190,193,194,193,197,193,200],{},[143,191,192],{},"encoding",", ",[143,195,196],{},"input",[143,198,199],{},"inputFormat",[143,201,202],{},"options",[162,204,205,210,213],{},[180,206,207],{},[143,208,209],{},"encodings_decode",[180,211,212],{},"Read text back into bytes",[180,214,215,193,217,193,220],{},[143,216,192],{},[143,218,219],{},"text",[143,221,222],{},"outputFormat",[162,224,225,230,237],{},[180,226,227],{},[143,228,229],{},"encodings_identify",[180,231,232,236],{},[233,234,235],"a",{"href":21},"Rank"," the encodings a string decodes in",[180,238,239,193,241],{},[143,240,219],{},[143,242,243],{},"limit",[162,245,246,251,254],{},[180,247,248],{},[143,249,250],{},"encodings_info",[180,252,253],{},"The list, one family, or one encoding with its alphabet",[180,255,256,258,259,262],{},[143,257,192],{}," or ",[143,260,261],{},"family",", both optional",[134,264,266],{"id":265},"what-a-model-reads","What a model reads",[139,268,269],{},"A header line, then the value.",[271,272,277],"pre",{"className":273,"code":275,"language":219,"meta":276},[274],"language-text","bech32 → 20 bytes as hex (prefix \"bc\", witnessVersion 0):\n751e76e8199196d454941c45d1b3a323f1433bd6\n","",[143,278,275],{"__ignoreMap":276},[139,280,281,283,284,287,288,291],{},[143,282,222],{}," is ",[143,285,286],{},"auto"," by default. Clean UTF-8 comes back as a quoted string, anything else as hex. Clean means no control characters, no bidi overrides, no line separators. Why so strict? A decoded string could rewrite the line it sits on, and a model would believe it. Ask for ",[143,289,290],{},"utf8"," explicitly and you get it, escaped.",[139,293,294,296],{},[143,295,229],{}," gives each candidate two lines. The rank, the encoding, the score and the reasons. Then the byte count and the bytes.",[271,298,301],{"className":299,"code":300,"language":219,"meta":276},[274],"1. base32 0.593; padding fits the block length, decodes to readable text\n   11 bytes, text \"Hello World\"\n",[143,302,300],{"__ignoreMap":276},[139,304,305,306,309],{},"Everything the next call needs is in the text. An MCP client sees nothing else. Pi, OMP and the AI SDK also get structured ",[143,307,308],{},"details",".",[134,311,313],{"id":312},"what-they-refuse","What they refuse",[139,315,316],{},"Every schema is closed. A misspelled argument is an error, not a quiet default.",[271,318,321],{"className":319,"code":320,"language":219,"meta":276},[274],"Invalid arguments: unknown property \"encodng\"; takes encoding, input, inputFormat, options\n",[143,322,320],{"__ignoreMap":276},[139,324,325],{},"A checksum that doesn't match is a tool error with the reason. The session carries on.",[271,327,330],{"className":328,"code":329,"language":219,"meta":276},[274],"encodings_decode failed: base58check: checksum does not match\n",[143,331,329],{"__ignoreMap":276},[139,333,334,335,338],{},"The bounds sit in the schema. The executor checks them again, since a host may skip schema validation. Text up to 100000 characters. Base58 up to 10000, because base58 is quadratic. Real ones are addresses and keys, nowhere near that long. At most 20 ",[143,336,337],{},"identify"," candidates. Nothing is written anywhere, and there's no network to reach.",[134,340,342],{"id":341},"mcp","MCP",[271,344,348],{"className":345,"code":346,"language":347,"meta":276,"style":276},"language-bash shiki shiki-themes encodings encodings encodings","encodings mcp\nclaude mcp add encodings --scope user -- npx -y @agntn\u002Fencodings mcp\n","bash",[143,349,350,363],{"__ignoreMap":276},[351,352,355,359],"span",{"class":353,"line":354},"line",1,[351,356,358],{"class":357},"sK71F","encodings",[351,360,362],{"class":361},"shU9J"," mcp\n",[351,364,366,369,372,375,378,381,384,387,390,393,396],{"class":353,"line":365},2,[351,367,368],{"class":357},"claude",[351,370,371],{"class":361}," mcp",[351,373,374],{"class":361}," add",[351,376,377],{"class":361}," encodings",[351,379,380],{"class":361}," --scope",[351,382,383],{"class":361}," user",[351,385,386],{"class":361}," --",[351,388,389],{"class":361}," npx",[351,391,392],{"class":361}," -y",[351,394,395],{"class":361}," @agntn\u002Fencodings",[351,397,362],{"class":361},[139,399,400],{},"Or in a client's config:",[271,402,406],{"className":403,"code":404,"language":405,"meta":276,"style":276},"language-json shiki shiki-themes encodings encodings encodings","{\n  \"mcpServers\": {\n    \"encodings\": { \"command\": \"npx\", \"args\": [\"-y\", \"@agntn\u002Fencodings\", \"mcp\"] }\n  }\n}\n","json",[143,407,408,414,422,464,470],{"__ignoreMap":276},[351,409,410],{"class":353,"line":354},[351,411,413],{"class":412},"s38Sx","{\n",[351,415,416,419],{"class":353,"line":365},[351,417,418],{"class":357},"  \"mcpServers\"",[351,420,421],{"class":412},": {\n",[351,423,425,428,431,434,437,440,442,445,448,451,453,456,458,461],{"class":353,"line":424},3,[351,426,427],{"class":357},"    \"encodings\"",[351,429,430],{"class":412},": { ",[351,432,433],{"class":357},"\"command\"",[351,435,436],{"class":412},": ",[351,438,439],{"class":361},"\"npx\"",[351,441,193],{"class":412},[351,443,444],{"class":357},"\"args\"",[351,446,447],{"class":412},": [",[351,449,450],{"class":361},"\"-y\"",[351,452,193],{"class":412},[351,454,455],{"class":361},"\"@agntn\u002Fencodings\"",[351,457,193],{"class":412},[351,459,460],{"class":361},"\"mcp\"",[351,462,463],{"class":412},"] }\n",[351,465,467],{"class":353,"line":466},4,[351,468,469],{"class":412},"  }\n",[351,471,473],{"class":353,"line":472},5,[351,474,475],{"class":412},"}\n",[139,477,478],{},"stdio, every tool read-only and idempotent.",[134,480,482],{"id":481},"pi-and-omp","Pi and OMP",[271,484,486],{"className":345,"code":485,"language":347,"meta":276,"style":276},"pi install npm:@agntn\u002Fencodings\nomp install @agntn\u002Fencodings\n",[143,487,488,499],{"__ignoreMap":276},[351,489,490,493,496],{"class":353,"line":354},[351,491,492],{"class":357},"pi",[351,494,495],{"class":361}," install",[351,497,498],{"class":361}," npm:@agntn\u002Fencodings\n",[351,500,501,504,506],{"class":353,"line":365},[351,502,503],{"class":357},"omp",[351,505,495],{"class":361},[351,507,508],{"class":361}," @agntn\u002Fencodings\n",[139,510,511,512,515],{},"Both extensions are declared in ",[143,513,514],{},"package.json"," and ship as source the host loads directly.",[134,517,519],{"id":518},"ai-sdk","AI SDK",[271,521,525],{"className":522,"code":523,"language":524,"meta":276,"style":276},"language-ts shiki shiki-themes encodings encodings encodings","import { generateText } from \"ai\";\nimport { encodingAiTools } from \"@agntn\u002Fencodings\u002Fai\";\n\nawait generateText({\n  model,\n  tools: encodingAiTools,\n  prompt: \"What does 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa decode to?\",\n});\n","ts",[143,526,527,545,559,565,576,581,587,599],{"__ignoreMap":276},[351,528,529,533,536,539,542],{"class":353,"line":354},[351,530,532],{"class":531},"skH_V","import",[351,534,535],{"class":412}," { generateText } ",[351,537,538],{"class":531},"from",[351,540,541],{"class":361}," \"ai\"",[351,543,544],{"class":412},";\n",[351,546,547,549,552,554,557],{"class":353,"line":365},[351,548,532],{"class":531},[351,550,551],{"class":412}," { encodingAiTools } ",[351,553,538],{"class":531},[351,555,556],{"class":361}," \"@agntn\u002Fencodings\u002Fai\"",[351,558,544],{"class":412},[351,560,561],{"class":353,"line":424},[351,562,564],{"emptyLinePlaceholder":563},true,"\n",[351,566,567,570,573],{"class":353,"line":466},[351,568,569],{"class":531},"await",[351,571,572],{"class":357}," generateText",[351,574,575],{"class":412},"({\n",[351,577,578],{"class":353,"line":472},[351,579,580],{"class":412},"  model,\n",[351,582,584],{"class":353,"line":583},6,[351,585,586],{"class":412},"  tools: encodingAiTools,\n",[351,588,590,593,596],{"class":353,"line":589},7,[351,591,592],{"class":412},"  prompt: ",[351,594,595],{"class":361},"\"What does 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa decode to?\"",[351,597,598],{"class":412},",\n",[351,600,602],{"class":353,"line":601},8,[351,603,604],{"class":412},"});\n",[139,606,607,610,611,614],{},[143,608,609],{},"encodingAiTools"," holds all four under the same names. Each one is exported alone too, ",[143,612,613],{},"encodingsDecodeTool"," and friends, if you'd rather hand a model fewer.",[616,617,618],"style",{},"html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}",{"title":276,"searchDepth":365,"depth":365,"links":620},[621,622,623,624,625,626],{"id":136,"depth":365,"text":137},{"id":265,"depth":365,"text":266},{"id":312,"depth":365,"text":313},{"id":341,"depth":365,"text":342},{"id":481,"depth":365,"text":482},{"id":518,"depth":365,"text":519},"The same four tools over MCP and Pi and OMP and the AI SDK. What they take and what they refuse and what the model reads back","md",null,{"icon":631},"i-lucide-bot",{"title":28,"description":627},"iGz7j3fm3n-6aaBt3_vBWFtE6GaAZGHwrYznSOj_Ahs",[635,637],{"title":24,"path":25,"stem":26,"description":636,"children":-1},"encode and decode and identify and list from the terminal. Bytes go to stdout raw and everything else goes to stderr",{"title":32,"path":33,"stem":34,"description":638,"children":-1},"An encoding is one object with a name and info and encode and decode. Register it and everything sees it",1790940133608]