[{"data":1,"prerenderedAt":372},["ShallowReactive",2],{"i-mdi:magnify":3,"i-simple-icons:visualstudiocode":8,"i-mdi:github":11,"i-mdi:discord":13,"i-mdi:youtube":15,"i-mdi:flask-outline":17,"docs-\u002Fdocs\u002Fv2\u002Fproviders\u002Fmock":19},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9,"hidden":10},"\u003Cpath fill=\"currentColor\" d=\"M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63l-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12L.326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128l9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z\"\u002F>",true,{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":12},"\u003Cpath fill=\"currentColor\" d=\"M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":14,"hidden":10},"\u003Cpath fill=\"currentColor\" d=\"m22 24l-5.25-5l.63 2H4.5A2.5 2.5 0 0 1 2 18.5v-15A2.5 2.5 0 0 1 4.5 1h15A2.5 2.5 0 0 1 22 3.5V24M12 6.8c-2.68 0-4.56 1.15-4.56 1.15c1.03-.92 2.83-1.45 2.83-1.45l-.17-.17c-1.69.03-3.22 1.2-3.22 1.2c-1.72 3.59-1.61 6.69-1.61 6.69c1.4 1.81 3.48 1.68 3.48 1.68l.71-.9c-1.25-.27-2.04-1.38-2.04-1.38S9.3 14.9 12 14.9s4.58-1.28 4.58-1.28s-.79 1.11-2.04 1.38l.71.9s2.08.13 3.48-1.68c0 0 .11-3.1-1.61-6.69c0 0-1.53-1.17-3.22-1.2l-.17.17s1.8.53 2.83 1.45c0 0-1.88-1.15-4.56-1.15m-2.07 3.79c.65 0 1.18.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27m4.17 0c.65 0 1.17.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27Z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":16},"\u003Cpath fill=\"currentColor\" d=\"m10 15l5.19-3L10 9zm11.56-7.83c.13.47.22 1.1.28 1.9c.07.8.1 1.49.1 2.09L22 12c0 2.19-.16 3.8-.44 4.83c-.25.9-.83 1.48-1.73 1.73c-.47.13-1.33.22-2.65.28c-1.3.07-2.49.1-3.59.1L12 19c-4.19 0-6.8-.16-7.83-.44c-.9-.25-1.48-.83-1.73-1.73c-.13-.47-.22-1.1-.28-1.9c-.07-.8-.1-1.49-.1-2.09L2 12c0-2.19.16-3.8.44-4.83c.25-.9.83-1.48 1.73-1.73c.47-.13 1.33-.22 2.65-.28c1.3-.07 2.49-.1 3.59-.1L12 5c4.19 0 6.8.16 7.83.44c.9.25 1.48.83 1.73 1.73\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":18},"\u003Cpath fill=\"currentColor\" d=\"M5 19a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1c0-.21-.07-.41-.18-.57L13 8.35V4h-2v4.35L5.18 18.43c-.11.16-.18.36-.18.57m1 3a3 3 0 0 1-3-3c0-.6.18-1.16.5-1.63L9 7.81V6a1 1 0 0 1-1-1V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1v1.81l5.5 9.56c.32.47.5 1.03.5 1.63a3 3 0 0 1-3 3zm7-6l1.34-1.34L16.27 18H7.73l2.66-4.61zm-.5-4a.5.5 0 0 1 .5.5a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5a.5.5 0 0 1 .5-.5\"\u002F>",{"id":20,"title":21,"body":22,"description":365,"extension":366,"meta":367,"navigation":10,"path":368,"seo":369,"stem":370,"__hash__":371},"docs\u002Fdocs\u002Fv2\u002Fproviders\u002Fmock.md","Mock()",{"type":23,"value":24,"toc":359},"minimark",[25,29,33,95,104,109,112,153,156,200,203,207,240,255,312,316,319,327,331,355],[26,27,21],"h1",{"id":28},"mock",[30,31,32],"p",{},"Deterministic scripted inference, for tests and offline scaffolds. The full loop still\nruns — tool calls execute, context accumulates — with nothing crossing the network.",[34,35,40],"pre",{"className":36,"code":37,"language":38,"meta":39,"style":39},"language-ts shiki shiki-themes dark-plus","export default defineAgent({\n    providers: [Mock({ hello: \"hi there\" })],\n})\n","ts","",[41,42,43,63,89],"code",{"__ignoreMap":39},[44,45,48,52,55,59],"span",{"class":46,"line":47},"line",1,[44,49,51],{"class":50},"sYbnZ","export",[44,53,54],{"class":50}," default",[44,56,58],{"class":57},"sCudf"," defineAgent",[44,60,62],{"class":61},"sTNBD","({\n",[44,64,66,70,73,76,79,82,86],{"class":46,"line":65},2,[44,67,69],{"class":68},"s3F5K","    providers:",[44,71,72],{"class":61}," [",[44,74,75],{"class":57},"Mock",[44,77,78],{"class":61},"({ ",[44,80,81],{"class":68},"hello:",[44,83,85],{"class":84},"sKc5r"," \"hi there\"",[44,87,88],{"class":61}," })],\n",[44,90,92],{"class":46,"line":91},3,[44,93,94],{"class":61},"})\n",[30,96,97,98,103],{},"This is what makes ",[99,100,102],"a",{"href":101},"\u002Fdocs\u002Fv2\u002Fagent\u002Ftesting","agent tests"," fast, free, and repeatable.",[105,106,108],"h2",{"id":107},"the-script-rides-on-the-declaration","The script rides on the declaration",[30,110,111],{},"Mock is the one provider whose declaration carries behaviour, which is exactly what makes\nit a test double rather than a source of inference. A map matches on the user's text:",[34,113,115],{"className":36,"code":114,"language":38,"meta":39,"style":39},"Mock({\n    \"hello\": \"hi there\",\n    \"what is 2+2\": \"4\",\n})\n",[41,116,117,123,136,148],{"__ignoreMap":39},[44,118,119,121],{"class":46,"line":47},[44,120,75],{"class":57},[44,122,62],{"class":61},[44,124,125,128,131,133],{"class":46,"line":65},[44,126,127],{"class":84},"    \"hello\"",[44,129,130],{"class":68},":",[44,132,85],{"class":84},[44,134,135],{"class":61},",\n",[44,137,138,141,143,146],{"class":46,"line":91},[44,139,140],{"class":84},"    \"what is 2+2\"",[44,142,130],{"class":68},[44,144,145],{"class":84}," \"4\"",[44,147,135],{"class":61},[44,149,151],{"class":46,"line":150},4,[44,152,94],{"class":61},[30,154,155],{},"A function gets the whole request:",[34,157,159],{"className":36,"code":158,"language":38,"meta":39,"style":39},"Mock(req => `you said: ${extractUserText(req)}`)\n",[41,160,161],{"__ignoreMap":39},[44,162,163,165,168,171,175,178,181,184,186,188,191,194,197],{"class":46,"line":47},[44,164,75],{"class":57},[44,166,167],{"class":61},"(",[44,169,170],{"class":68},"req",[44,172,174],{"class":173},"scz_3"," =>",[44,176,177],{"class":84}," `you said: ",[44,179,180],{"class":173},"${",[44,182,183],{"class":57},"extractUserText",[44,185,167],{"class":61},[44,187,170],{"class":68},[44,189,190],{"class":61},")",[44,192,193],{"class":173},"}",[44,195,196],{"class":84},"`",[44,198,199],{"class":61},")\n",[30,201,202],{},"Declared with no script, it echoes the prompt back — useful for checking wiring, useless\nas an assertion.",[105,204,206],{"id":205},"options","Options",[34,208,210],{"className":36,"code":209,"language":38,"meta":39,"style":39},"Mock(script?: MockHandler | MockReply | ProviderOptions)\n",[41,211,212],{"__ignoreMap":39},[44,213,214,216,218,221,224,227,230,233,235,238],{"class":46,"line":47},[44,215,75],{"class":57},[44,217,167],{"class":61},[44,219,220],{"class":68},"script",[44,222,223],{"class":61},"?: ",[44,225,226],{"class":68},"MockHandler",[44,228,229],{"class":61}," | ",[44,231,232],{"class":68},"MockReply",[44,234,229],{"class":61},[44,236,237],{"class":68},"ProviderOptions",[44,239,199],{"class":61},[30,241,242,243,246,247,250,251,254],{},"Because a bare options object and a reply map are both plain objects, an argument is read\nas options only when every key is one of ",[41,244,245],{},"key",", ",[41,248,249],{},"url",", or ",[41,252,253],{},"slots",". Everything else is a\nscript.",[256,257,258,274],"table",{},[259,260,261],"thead",{},[262,263,264,268,271],"tr",{},[265,266,267],"th",{},"Option",[265,269,270],{},"Default",[265,272,273],{},"Description",[275,276,277,290,302],"tbody",{},[262,278,279,284,287],{},[280,281,282],"td",{},[41,283,253],{},[280,285,286],{},"unbounded",[280,288,289],{},"Ceiling on concurrent calls",[262,291,292,296,299],{},[280,293,294],{},[41,295,245],{},[280,297,298],{},"—",[280,300,301],{},"Not used",[262,303,304,308,310],{},[280,305,306],{},[41,307,249],{},[280,309,298],{},[280,311,301],{},[105,313,315],{"id":314},"what-it-satisfies","What it satisfies",[30,317,318],{},"Every generate role. Its single catalogue entry declares a 1M context window and\nstructured output, so a test declaring a 200k-context role exercises the wiring it is\ntesting rather than the resolver's arithmetic.",[30,320,321,322,326],{},"It is deliberately ",[323,324,325],"strong",{},"not"," marked local, so a test that also declares a real local\nprovider still prefers the real one.",[105,328,330],{"id":329},"model-ids","Model ids",[34,332,334],{"className":36,"code":333,"language":38,"meta":39,"style":39},"export default defineAgent({ model: \"mock\" })\n",[41,335,336],{"__ignoreMap":39},[44,337,338,340,342,344,346,349,352],{"class":46,"line":47},[44,339,51],{"class":50},[44,341,54],{"class":50},[44,343,58],{"class":57},[44,345,78],{"class":61},[44,347,348],{"class":68},"model:",[44,350,351],{"class":84}," \"mock\"",[44,353,354],{"class":61}," })\n",[356,357,358],"style",{},"html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}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 pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}",{"title":39,"searchDepth":65,"depth":65,"links":360},[361,362,363,364],{"id":107,"depth":65,"text":108},{"id":205,"depth":65,"text":206},{"id":314,"depth":65,"text":315},{"id":329,"depth":65,"text":330},"Deterministic scripted inference for tests and offline scaffolds. The full loop runs and tools execute, with nothing crossing the network.","md",{},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fmock",{"title":21,"description":365},"docs\u002Fv2\u002Fproviders\u002Fmock","QIU_Tb9TBKk8t6khVRbzElWWLAufzeukgsHcXdSlGUc",1788121884384]