[{"data":1,"prerenderedAt":307},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fsdk\u002Frust-sdk":3,"docs-nav":193},{"id":4,"title":5,"body":6,"description":185,"extension":186,"meta":187,"navigation":60,"order":188,"path":189,"seo":190,"stem":191,"__hash__":192},"docs\u002Fdocs\u002F4.sdk\u002F2.rust-sdk.md","Rust SDK — jawb-sdk-rust",{"type":7,"value":8,"toc":183},"minimark",[9,38,98,133,168,179],[10,11,12,13,17,18,21,22,25,26,29,30,33,34,37],"p",{},"A Rust client library (in ",[14,15,16],"code",{},"jawb-core\u002Fsdks\u002Frust\u002F",") for ",[14,19,20],{},"jawbd","'s local\n",[14,23,24],{},"\u002Fv1"," HTTP API: the same contract the ",[14,27,28],{},"jawb"," CLI speaks. Replies come back\nas v1 envelopes (",[14,31,32],{},"serde_json::Value","), exactly as the CLI's ",[14,35,36],{},"--json","\noutput.",[39,40,45],"pre",{"className":41,"code":42,"language":43,"meta":44,"style":44},"language-rust shiki shiki-themes github-light github-dark","use jawb_sdk_rust::Client;\n\n\u002F\u002F Finds the daemon and its token the way the CLI does:\n\u002F\u002F JAWB_DAEMON (default http:\u002F\u002F127.0.0.1:4180) and JAWB_DATA_DIR\n\u002F\u002F (default: the platform data dir) for daemon.token.\nlet client = Client::discover()?;\nlet obs = client.observe(\"https:\u002F\u002Fexample.com\").await?;\nprintln!(\"{}\", obs[\"result\"]);\n","rust","",[14,46,47,55,62,68,74,80,86,92],{"__ignoreMap":44},[48,49,52],"span",{"class":50,"line":51},"line",1,[48,53,54],{},"use jawb_sdk_rust::Client;\n",[48,56,58],{"class":50,"line":57},2,[48,59,61],{"emptyLinePlaceholder":60},true,"\n",[48,63,65],{"class":50,"line":64},3,[48,66,67],{},"\u002F\u002F Finds the daemon and its token the way the CLI does:\n",[48,69,71],{"class":50,"line":70},4,[48,72,73],{},"\u002F\u002F JAWB_DAEMON (default http:\u002F\u002F127.0.0.1:4180) and JAWB_DATA_DIR\n",[48,75,77],{"class":50,"line":76},5,[48,78,79],{},"\u002F\u002F (default: the platform data dir) for daemon.token.\n",[48,81,83],{"class":50,"line":82},6,[48,84,85],{},"let client = Client::discover()?;\n",[48,87,89],{"class":50,"line":88},7,[48,90,91],{},"let obs = client.observe(\"https:\u002F\u002Fexample.com\").await?;\n",[48,93,95],{"class":50,"line":94},8,[48,96,97],{},"println!(\"{}\", obs[\"result\"]);\n",[39,99,101],{"className":41,"code":100,"language":43,"meta":44,"style":44},"\u002F\u002F Explicit address and data dir; any \u002Fv1 route through call():\nlet client = Client::from_data_dir(\"http:\u002F\u002F127.0.0.1:4180\", std::path::Path::new(\"\u002Fpath\u002Fto\u002Fdata_dir\"))?;\nlet tab = client.open(\"https:\u002F\u002Fexample.com\").await?;\nlet read = client\n    .call(\"GET\", &format!(\"\u002Fv1\u002Ftabs\u002F{tab}\u002Fcontent?format=md\"), None)\n    .await?;\n",[14,102,103,108,113,118,123,128],{"__ignoreMap":44},[48,104,105],{"class":50,"line":51},[48,106,107],{},"\u002F\u002F Explicit address and data dir; any \u002Fv1 route through call():\n",[48,109,110],{"class":50,"line":57},[48,111,112],{},"let client = Client::from_data_dir(\"http:\u002F\u002F127.0.0.1:4180\", std::path::Path::new(\"\u002Fpath\u002Fto\u002Fdata_dir\"))?;\n",[48,114,115],{"class":50,"line":64},[48,116,117],{},"let tab = client.open(\"https:\u002F\u002Fexample.com\").await?;\n",[48,119,120],{"class":50,"line":70},[48,121,122],{},"let read = client\n",[48,124,125],{"class":50,"line":76},[48,126,127],{},"    .call(\"GET\", &format!(\"\u002Fv1\u002Ftabs\u002F{tab}\u002Fcontent?format=md\"), None)\n",[48,129,130],{"class":50,"line":82},[48,131,132],{},"    .await?;\n",[10,134,135,136,139,140,143,144,147,148,151,152,155,156,159,160,163,164,167],{},"The client only talks to a loopback daemon (",[14,137,138],{},"127.0.0.1"," or ",[14,141,142],{},"localhost","):\nother addresses are refused, so the token never leaves your machine.\n",[14,145,146],{},"call"," returns the envelope even when ",[14,149,150],{},"ok"," is ",[14,153,154],{},"false","; ",[14,157,158],{},"open"," and\n",[14,161,162],{},"observe"," turn an ",[14,165,166],{},"ok: false"," envelope into an error.",[10,169,170,171,174,175,178],{},"TypeScript and Python equivalents are placeholders\n(",[14,172,173],{},"jawb-core\u002Fsdks\u002Ftypescript\u002F",", ",[14,176,177],{},"jawb-core\u002Fsdks\u002Fpython\u002F","), not implemented\nyet.",[180,181,182],"style",{},"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);}",{"title":44,"searchDepth":57,"depth":57,"links":184},[],"A Rust client library for jawbd's local \u002Fv1 HTTP API.","md",{},null,"\u002Fdocs\u002Fsdk\u002Frust-sdk",{"title":5,"description":185},"docs\u002F4.sdk\u002F2.rust-sdk","tet4TPfveHX2CoFwXLtxv68jJFLxent3o1j5Sv0vQto",[194],{"title":195,"path":196,"stem":197,"children":198},"Documentation","\u002Fdocs","docs\u002F1.index",[199,200,204,208,212,234,276,287,291,295,299,303],{"title":195,"path":196,"stem":197},{"title":201,"path":202,"stem":203},"Protocol adapters","\u002Fdocs\u002Fprotocol","docs\u002F10.protocol",{"title":205,"path":206,"stem":207},"Extensions","\u002Fdocs\u002Fextensions","docs\u002F11.extensions",{"title":209,"path":210,"stem":211},"Roadmap and status","\u002Fdocs\u002Froadmap","docs\u002F12.roadmap",{"title":213,"path":214,"stem":215,"children":216},"Getting started","\u002Fdocs\u002Fgetting-started","docs\u002F2.getting-started\u002F1.index",[217,218,222,226,230],{"title":213,"path":214,"stem":215},{"title":219,"path":220,"stem":221},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F2.getting-started\u002F2.installation",{"title":223,"path":224,"stem":225},"Desktop app","\u002Fdocs\u002Fgetting-started\u002Fdesktop-app","docs\u002F2.getting-started\u002F3.desktop-app",{"title":227,"path":228,"stem":229},"Running the daemon","\u002Fdocs\u002Fgetting-started\u002Frunning-the-daemon","docs\u002F2.getting-started\u002F4.running-the-daemon",{"title":231,"path":232,"stem":233},"Using the CLI","\u002Fdocs\u002Fgetting-started\u002Fusing-the-cli","docs\u002F2.getting-started\u002F5.using-the-cli",{"title":235,"path":236,"stem":237,"children":238},"CLI reference","\u002Fdocs\u002Fcli","docs\u002F3.cli\u002F1.index",[239,240,244,248,252,256,260,264,268,272],{"title":235,"path":236,"stem":237},{"title":241,"path":242,"stem":243},"JSON envelope and exit codes","\u002Fdocs\u002Fcli\u002Fjson-and-exit-codes","docs\u002F3.cli\u002F10.json-and-exit-codes",{"title":245,"path":246,"stem":247},"jawb status","\u002Fdocs\u002Fcli\u002Fstatus","docs\u002F3.cli\u002F2.status",{"title":249,"path":250,"stem":251},"Tabs, profiles and sessions","\u002Fdocs\u002Fcli\u002Ftabs-and-profiles","docs\u002F3.cli\u002F3.tabs-and-profiles",{"title":253,"path":254,"stem":255},"jawb observe [\u003Curl>] [--full] [--interactive-only] [--js]","\u002Fdocs\u002Fcli\u002Fobserve","docs\u002F3.cli\u002F4.observe",{"title":257,"path":258,"stem":259},"jawb read [--format md|text|json] [--element \u003Cid>] [--full] [--js]","\u002Fdocs\u002Fcli\u002Fread","docs\u002F3.cli\u002F5.read",{"title":261,"path":262,"stem":263},"Act commands","\u002Fdocs\u002Fcli\u002Fact","docs\u002F3.cli\u002F6.act",{"title":265,"path":266,"stem":267},"See commands","\u002Fdocs\u002Fcli\u002Fsee","docs\u002F3.cli\u002F7.see",{"title":269,"path":270,"stem":271},"Policy and confirmation","\u002Fdocs\u002Fcli\u002Fpolicy","docs\u002F3.cli\u002F8.policy",{"title":273,"path":274,"stem":275},"Install lifecycle and profile settings","\u002Fdocs\u002Fcli\u002Flifecycle","docs\u002F3.cli\u002F9.lifecycle",{"title":277,"path":278,"stem":279,"children":280},"SDK reference","\u002Fdocs\u002Fsdk","docs\u002F4.sdk\u002F1.index",[281,282,283],{"title":277,"path":278,"stem":279},{"title":5,"path":189,"stem":191},{"title":284,"path":285,"stem":286},"Website SDK — @4hum-ai\u002Fjawb-sdk","\u002Fdocs\u002Fsdk\u002Fwebsite-sdk","docs\u002F4.sdk\u002F3.website-sdk",{"title":288,"path":289,"stem":290},"Configuration","\u002Fdocs\u002Fconfig","docs\u002F5.config",{"title":292,"path":293,"stem":294},"WebMCP","\u002Fdocs\u002Fwebmcp","docs\u002F6.webmcp",{"title":296,"path":297,"stem":298},"Agents","\u002Fdocs\u002Fagents","docs\u002F7.agents",{"title":300,"path":301,"stem":302},"MCP server","\u002Fdocs\u002Fmcp","docs\u002F8.mcp",{"title":304,"path":305,"stem":306},"Security and trust","\u002Fdocs\u002Fsecurity","docs\u002F9.security",1792595702626]