Something went wrong. Try again.
small gleam coding and (not yet) persistent agent daemon with a detachable cli forked from okami.mom/albedo
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715# Daemon protocol 3. See http-api-design.md for behavioral semantics.openapi: 3.2.1info: title: Albedo daemon API version: 3.0.0 summary: 'Protocol 3: typed HTTP resources and SSE.' description: This file owns daemon request and response shapes. http-api-design.md owns ordering, atomicity, retry and recovery behavior. Server and clients switch together; there are no legacy route aliases. Unknown request fields and duplicate JSON keys are errors. Unknown response fields may be ignored by clients. No operation starts or replaces a daemon. JSON and SSE frames are at most 1 MiB unless an extension explicitly overrides that limit. Ordinary request bodies are at most 64 KiB, input bodies 72,200,000 bytes and proxy bodies 32,000,000 bytes. UTF-8 and encoded-byte limits are described with x-max-utf8-bytes/x-max-encoded-bytes; standard schema validation alone does not assert them. Examples use synthetic secrets only. JSON and text responses of at least 1 KiB, and session event streams, use Content-Encoding zstd when Accept-Encoding admits it; limits and ETags apply to the decoded representation. When capabilities include zstd_requests, a request body may use Content-Encoding zstd as one frame that declares its decoded size.jsonSchemaDialect: https://json-schema.org/draft/2020-12/schemaexternalDocs: description: Behavior, ownership, feature coverage and verification. url: http-api-design.mdsecurity:- DaemonBearer: []tags:- name: server- name: settings- name: storage- name: sessions- name: models- name: workspaces- name: hosts- name: auth- name: work- name: paperclips- name: artifacts- name: web-search- name: skills- name: schedule- name: links- name: webhooks- name: discord- name: proxy- name: terminalspaths: /terminals/{terminal_id}: get: operationId: attachTerminal summary: Upgrade to interactive pseudo-terminal session tags: - terminals description: |- WebSocket upgrade endpoint for an interactive terminal. Authenticated by the same bearer token and origin policy as other daemon routes. Binary frames carry raw terminal PTY bytes. Text frames are JSON objects for control commands: {type:"ping"}, {type:"input",data:...}, {type:"resize",cols:...,rows:...}, {type:"signal",signal:"SIGINT"|"SIGTERM"|...}, {type:"restart",cols:...,rows:...}. Server sends {type:"ready",id,cwd,shell,cols,rows,state,exit_code} on attach, binary frames for terminal output (including initial scrollback history), {type:"exit",exit_code} when the shell process exits, and {type:"pong"} keepalives. parameters: - name: terminal_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: cwd in: query required: false description: Initial working directory for the terminal session. schema: type: string - name: session_id in: query required: false description: Existing session ID to derive initial working directory from. schema: $ref: '#/components/schemas/ID' - name: cols in: query required: false description: Terminal column width (2-500, default 80). schema: type: integer minimum: 2 maximum: 500 - name: rows in: query required: false description: Terminal row height (1-200, default 24). schema: type: integer minimum: 1 maximum: 200 - name: restart in: query required: false description: Whether to restart an existing terminal process group. schema: type: boolean - name: shell in: query required: false description: Command or shell executable to run (defaults to user shell). schema: type: string responses: '101': description: WebSocket connection established. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '503': $ref: '#/components/responses/Problem503' delete: operationId: closeTerminal summary: Explicitly close an interactive pseudo-terminal session tags: - terminals description: Terminates the pseudo-terminal process group and releases its resources. parameters: - name: terminal_id in: path required: true schema: $ref: '#/components/schemas/ID' responses: '200': description: Terminal session closed. content: application/json: schema: $ref: '#/components/schemas/TerminalClose' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '503': $ref: '#/components/responses/Problem503' /events: get: operationId: getEvents summary: Upgrade to multiplexed live session events tags: - sessions description: | WebSocket upgrade endpoint, authenticated by the same bearer token and origin policy as other daemon routes. A socket owns at most 64 keyed follows. Client text frames are JSON objects: {key,type:"session",session_id,tail:0, after_generation?,after_seq?}, {key,type:"sessions",scope:"roots"}, {key,type:"stop"}, or {type:"ping"}. Keys contain 1 to 128 UTF-8 bytes. Session replay and tail validation match GET /sessions/{session_id} SSE. Subscribing an existing key replaces that follow. after_seq accepts an integer or its decimal string; tail defaults to 100 and is at most 200. Server text frames are {key,batch:<unchanged SSE batch>}: session batches carry generation,cursor,events and optional snapshot; collection batches carry events. A successful send acknowledges its session cursor. A follow ending (including stop, deletion, failure or overflow) sends {key,end:true}. Invalid commands and admission refusals send {key,failure:{code,detail}}; malformed commands without a usable key use an empty key. Session failures and collection overflow retain their SSE batch before the end frame. Ping replies and 15-second keepalives are {type:"pong"}. Commands are at most 4096 UTF-8 bytes; response frames are at most 1 MiB. Unsubscribe and socket closure release watches. Clients reconnect a follow with its last fully consumed cursor. Existing SSE routes remain available. responses: '101': description: WebSocket connection established. '400': description: Invalid WebSocket handshake; empty response body. '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '503': $ref: '#/components/responses/Problem503' /server: get: operationId: getServer summary: Read daemon identity and capabilities tags: - server responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Server' examples: Server: value: instance_id: instance-1 protocol: 3 state: ready capabilities: durable_inputs: 1 session_replay: 1 collection_invalidation: 1 tool_progress: 1 storage_report: 1 build: example-build digest: null extensions: - name: work version: 1 quota: null notices: [] '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: No startup or replacement. Authentication and protocol failures remain actionable errors. Pagination is valid only with include=quota_history. parameters: - name: include in: query required: false schema: type: string enum: [quota_history, extensions] - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' - name: quota_provider in: query required: false description: Exact provider ID to filter quota history. Requires include=quota_history, quota_account, and quota_limit. schema: type: string - name: quota_account in: query required: false description: Exact account label to filter quota history. Requires include=quota_history, quota_provider, and quota_limit. schema: type: string - name: quota_limit in: query required: false description: Exact limit ID to filter quota history. Requires include=quota_history, quota_provider, and quota_account. schema: type: string - name: quota_since in: query required: false description: Filter quota history to observations at or after this RFC 3339 UTC timestamp. Requires include=quota_history and the limit filter trio. schema: $ref: '#/components/schemas/Timestamp' /server/shutdown: post: operationId: shutdownServer summary: Drain the identified daemon tags: - server responses: '202': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Shutdown' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '409': $ref: '#/components/responses/Problem409' description: No automatic recovery or replay. The local launcher alone may offer replacement. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ShutdownRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /settings: get: operationId: getSettings summary: Read shared settings or one canonical group tags: - settings responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/SettingsRead' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: Without group, return Settings and observed group validators. With group, return that group only; the ETag covers that representation. parameters: - name: group in: query required: false schema: type: string enum: [providers, mcp, extensions, extension_settings, capabilities, models, ui] patch: operationId: patchSettings summary: Atomically edit one settings group tags: - settings responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/SettingsChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Query group selects its corresponding schema. Omitted fields keep values. Null removes only nullable fields or map entries. Candidate validation precedes the complete group commit. No lost-response retry. parameters: - name: group in: query required: true schema: type: string enum: [providers, mcp, extensions, extension_settings, capabilities, models, ui] - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/SettingsPatch' examples: ProviderSettingsPatch: value: default_profile: personal profiles: personal: extension: openai endpoint: https://provider.example/v1 protocol: responses model: example-model effort: null image_edge: null account_id: null project: null location: null api_key: synthetic-example-key description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /storage: get: operationId: getStorage summary: Read storage accounting tags: - storage responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/StorageReport' examples: StorageReport: value: database: main_file_bytes: 8192 wal_bytes: 0 page_size_bytes: 4096 page_count: 2 free_page_count: 0 used_bytes: 8192 sessions: items: [] next: null total_count: 0 total_estimated_content_bytes: 0 images: count: 0 bytes: 0 files: items: [] next: null totals: kernel_bytes: 0 backup_bytes: 0 other_bytes: 0 shell_output_bytes: 0 recent_backup_bytes: 0 recent_backup_count: 0 measured_at: '2026-10-02T14:00:00Z' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: 'Each section has its own continuation. Totals cover complete storage. Paths never authorize local mutation. Requires capability `storage_report: 1`.' parameters: - name: sessions_next in: query required: false schema: $ref: '#/components/schemas/PageToken' - name: files_next in: query required: false schema: $ref: '#/components/schemas/PageToken' - $ref: '#/components/parameters/Limit' /sessions: get: operationId: listSessions summary: Browse sessions or watch collection changes tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/SessionPage' examples: SessionPage: value: items: - id: 01a0fcea-2b00-7000-8000-000000000001 name: New session automatic_name: New session workspace: /workspace/project location: host: null user: null path: /workspace/project label: null parent_id: null root_id: 01a0fcea-2b00-7000-8000-000000000001 address: null depth: 0 closed: false created_at: '2026-10-02T14:00:00Z' activity_at: '2026-10-02T14:00:00Z' provider_profile: personal model: example-model effort: null status: phase: idle run_id: null interrupt_requested: false blocking_reason: null preview: text: '' transcript_count: 0 truncated: false preferences: pinned: false pin_order: null archived: false opens: 0 current_progress: [] active_output: [] activity: lines: [] output_scalars: 0 output_utf8_bytes: 0 observed_at: '2026-10-02T14:00:00Z' latest_input: null latest_answer: null cursor: generation: J6kYj6IGcXyP3eMIp-WL3A sequence: 0 next: null text/event-stream: itemSchema: $ref: '#/components/schemas/CollectionSSE' headers: Vary: $ref: '#/components/headers/Vary' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: JSON defaults to roots, or all with parent/family. Parent and family are exclusive. Explicit roots with either is invalid. SSE accepts the same scope filters, excluding sort/limit/next; no cursor or replay. Subscribe, wait for ready, then read pages. Closure or overflow repeats this flow. parameters: - name: scope in: query required: false schema: type: string enum: [roots, all] - name: parent_id in: query required: false schema: $ref: '#/components/schemas/ID' - name: family_id in: query required: false schema: $ref: '#/components/schemas/ID' - name: workspace in: query required: false schema: $ref: '#/components/schemas/Workspace' - name: search in: query required: false schema: type: string maxLength: 256 - name: archived in: query required: false schema: type: boolean - name: needs_reload in: query required: false schema: type: boolean - name: acp in: query required: false description: true lists only ACP-owned sessions, false only the others. Combine with workspace for an exact canonical workspace match. schema: type: boolean - name: sort in: query required: false schema: type: string enum: [activity, frequent] default: activity - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' /sessions/{session_id}/fast-mode: parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' get: operationId: getFastMode summary: Read fast-mode state and provider capability tags: [sessions] responses: '200': description: Current setting and capability observation. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/FastMode' '401': $ref: '#/components/responses/Problem401' '404': $ref: '#/components/responses/Problem404' patch: operationId: patchFastMode summary: Change session fast mode tags: [sessions] description: | Conditional, user-facing configuration change. Requires the session configuration ETag. Enabling is rejected unless the provider reports fast mode supported; unknown capability is not inferred. Disabling is always allowed. `toggle` inverts the state protected by If-Match; replaying a successful toggle with the old ETag is refused rather than toggling twice. This setting can affect provider billing. parameters: - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: type: object additionalProperties: false required: [state] properties: state: type: string enum: [on, off, toggle] responses: '200': description: Fast-mode state and current provider capability. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/FastMode' '400': $ref: '#/components/responses/Problem400' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' /sessions/{session_id}: get: operationId: getSession summary: Read or watch one session tags: - sessions responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' Vary: $ref: '#/components/headers/Vary' content: application/json: schema: $ref: '#/components/schemas/SessionRead' examples: Session: value: id: 01a0fcea-2b00-7000-8000-000000000001 name: New session automatic_name: New session workspace: /workspace/project location: host: null user: null path: /workspace/project label: null parent_id: null root_id: 01a0fcea-2b00-7000-8000-000000000001 address: null depth: 0 closed: false created_at: '2026-10-02T14:00:00Z' activity_at: '2026-10-02T14:00:00Z' provider_profile: personal model: example-model effort: null status: phase: idle run_id: null interrupt_requested: false blocking_reason: null preview: text: '' transcript_count: 0 truncated: false preferences: pinned: false pin_order: null archived: false opens: 0 current_progress: [] active_output: [] shell_commands: [] activity: lines: [] output_scalars: 0 output_utf8_bytes: 0 observed_at: '2026-10-02T14:00:00Z' latest_input: null latest_answer: null cursor: generation: J6kYj6IGcXyP3eMIp-WL3A sequence: 0 creation: submitted: kind: new workspace: /workspace/project name: null provider_profile: null model: null effort: null resolved: workspace: /workspace/project provider_profile: personal model: example-model effort: null revision: config-1 family_revision: family-1 configuration_resource: url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration etag: '"session-config-1"' value: id: 01a0fcea-2b00-7000-8000-000000000001 name: New session workspace: /workspace/project provider_profile: personal model: example-model effort: null preferences: pinned: false pin_order: null archived: false selection: extensions: {} skills: {} instructions: {} mcp: {} revision: config-1 workspace_change: null selection: overrides: extensions: {} skills: {} instructions: {} mcp: {} effective: extensions: {} skills: {} instructions: {} mcp: {} composition: desired_revision: composition-1 loaded_revision: null needs_reload: true dependencies: {} quarantine: [] availability: {} kernel: instance_id: null state: none stage: null build: null stale: false staleness_reasons: [] live_job_count: 0 running_jobs: [] pending_inputs: [] input_order: 0 usage: model: null observed_at: null prompt_tokens: null cached_prompt_tokens: null cache_write_tokens: null completion_tokens: null total_tokens: null elapsed_ms: null tokens_per_second: null context_window_tokens: null cache_ttl_seconds: null cache_fade: [] history: items: [] older: null newer: null high_water: 0 glances: [] text/event-stream: itemSchema: $ref: '#/components/schemas/SessionSSE' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '410': $ref: '#/components/responses/Problem410' description: JSON defaults to complete Session. Configuration and status JSON exclude tail and replay parameters. SSE accepts tail and after_generation/after_seq, without view. Initial subscription omits both cursors; reconnect keeps the fully consumed pair. A missing generation requests reset. after_generation without after_seq is invalid. Neither auth failure nor closure starts a daemon. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: false schema: type: string enum: [configuration, status] - name: tail in: query required: false schema: type: integer minimum: 0 maximum: 200 default: 100 - name: after_generation in: query required: false schema: $ref: '#/components/schemas/Generation' - name: after_seq in: query required: false schema: $ref: '#/components/schemas/Counter' put: operationId: createSession summary: Create a new, forked or child session tags: - sessions responses: '201': description: Successful result. headers: Location: $ref: '#/components/headers/Location' ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/Session' examples: Session: value: id: 01a0fcea-2b00-7000-8000-000000000001 name: New session automatic_name: New session workspace: /workspace/project location: host: null user: null path: /workspace/project label: null parent_id: null root_id: 01a0fcea-2b00-7000-8000-000000000001 address: null depth: 0 closed: false created_at: '2026-10-02T14:00:00Z' activity_at: '2026-10-02T14:00:00Z' provider_profile: personal model: example-model effort: null status: phase: idle run_id: null interrupt_requested: false blocking_reason: null preview: text: '' transcript_count: 0 truncated: false preferences: pinned: false pin_order: null archived: false opens: 0 current_progress: [] active_output: [] shell_commands: [] activity: lines: [] output_scalars: 0 output_utf8_bytes: 0 observed_at: '2026-10-02T14:00:00Z' latest_input: null latest_answer: null cursor: generation: J6kYj6IGcXyP3eMIp-WL3A sequence: 0 creation: submitted: kind: new workspace: /workspace/project name: null provider_profile: null model: null effort: null resolved: workspace: /workspace/project provider_profile: personal model: example-model effort: null revision: config-1 family_revision: family-1 configuration_resource: url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration etag: '"session-config-1"' value: id: 01a0fcea-2b00-7000-8000-000000000001 name: New session workspace: /workspace/project provider_profile: personal model: example-model effort: null preferences: pinned: false pin_order: null archived: false selection: extensions: {} skills: {} instructions: {} mcp: {} revision: config-1 workspace_change: null selection: overrides: extensions: {} skills: {} instructions: {} mcp: {} effective: extensions: {} skills: {} instructions: {} mcp: {} composition: desired_revision: composition-1 loaded_revision: null needs_reload: true dependencies: {} quarantine: [] availability: {} kernel: instance_id: null state: none stage: null build: null stale: false staleness_reasons: [] live_job_count: 0 running_jobs: [] pending_inputs: [] input_order: 0 usage: model: null observed_at: null prompt_tokens: null cached_prompt_tokens: null cache_write_tokens: null completion_tokens: null total_tokens: null elapsed_ms: null tokens_per_second: null context_window_tokens: null cache_ttl_seconds: null cache_fade: [] history: items: [] older: null newer: null high_water: 0 glances: [] '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '409': $ref: '#/components/responses/Problem409' '410': $ref: '#/components/responses/Problem410' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' '429': $ref: '#/components/responses/Problem429' description: Session ID must be UUIDv7. If-None-Match:* is required. Retain the identity and submitted intent after response loss. An existing resource returns 412; GET creation.submitted proves original intent. Child membership and task admission commit together. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' - $ref: '#/components/parameters/IfNoneMatch' - $ref: '#/components/parameters/AttachmentTokenOptional' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SessionCreationRequest' examples: NewSessionRequest: value: kind: new workspace: /workspace/project description: UTF-8 JSON; duplicate keys and unknown fields are rejected. patch: operationId: patchSession summary: Edit configuration or move workspace tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/SessionChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Use the observed configuration URL and validator. Workspace is a standalone change carrying the observed session family revision. Busy target fails before commit; busy descendants follow a committed parent move at idle. Other configuration fields commit together. No automatic lost-response retry. An ACP attachment holder may select a model with a patch containing only model and an optional provider_profile; other execution changes remain unavailable to ACP sessions. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: true schema: const: configuration - $ref: '#/components/parameters/IfMatch' - $ref: '#/components/parameters/AttachmentTokenOptional' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/SessionChangeRequest' examples: SessionPatch: value: selection: extensions: browser: null skills: candidate-1: false catalog_revision: discovery-1 description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: deleteSession summary: Delete a leaf or captured subtree tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/SessionDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Leaf requires idle and no children. Subtree requires the session's observed family revision and gates new children, interrupts captured members and deletes deepest first. Partial outcomes are explicit. Refresh before confirming a new attempt; never automatically replay after transport loss. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: true schema: const: configuration - $ref: '#/components/parameters/IfMatch' - name: scope in: query required: false schema: type: string enum: [leaf, subtree] default: leaf - name: family_revision in: query required: false schema: $ref: '#/components/schemas/ID' /sessions/{session_id}/visits/{visit_id}: put: operationId: recordVisit summary: Count one deliberate opening tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Visit' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '410': $ref: '#/components/responses/Problem410' description: Visit ID is UUIDv7. Same identity increments once; reads and refreshes never count. parameters: - name: visit_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmptyRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/shell-commands/{command_id}: put: operationId: putShellCommand summary: Admit one immutable human shell command tags: [sessions] parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: command_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' description: Durable admission precedes process spawn. Same identity and command returns the original resource before mutable checks; changed intent conflicts. One running command and at most 32 uncommitted outcomes per session. No automatic model turn. Remote workspaces are refused. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ShellCommandRequest' responses: '200': description: Current durable shell command resource. content: application/json: schema: $ref: '#/components/schemas/ShellCommandResponse' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': $ref: '#/components/responses/Problem409' '503': $ref: '#/components/responses/Problem503' get: operationId: getShellCommand summary: Read a human shell command tags: [sessions] parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: command_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' responses: '200': description: Current durable shell command resource. content: application/json: schema: $ref: '#/components/schemas/ShellCommandResponse' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': $ref: '#/components/responses/Problem409' '503': $ref: '#/components/responses/Problem503' /sessions/{session_id}/shell-commands/{command_id}/stop: post: operationId: stopShellCommand summary: Request termination of one human shell command tags: [sessions] parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: command_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' description: Stops this command process group only. Response can remain running until cleanup is confirmed; read the same resource for its terminal outcome. responses: '200': description: Current durable shell command resource. content: application/json: schema: $ref: '#/components/schemas/ShellCommandResponse' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': $ref: '#/components/responses/Problem409' '503': $ref: '#/components/responses/Problem503' /sessions/{session_id}/shell-commands/{command_id}/output: get: operationId: getShellCommandOutput summary: Read retained sanitized shell output tags: [sessions] parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: command_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' - name: offset in: query schema: type: integer minimum: 0 maximum: 16777216 default: 0 - name: limit in: query schema: type: integer minimum: 4 maximum: 65536 default: 4000 description: UTF-8 byte offsets, complete-codepoint pages, next_offset null at the current captured cutoff. Retained output is at most 16 MiB; no terminal controls are stored. responses: '200': description: Current durable shell command resource. content: application/json: schema: $ref: '#/components/schemas/ShellCommandOutput' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': $ref: '#/components/responses/Problem409' '503': $ref: '#/components/responses/Problem503' /sessions/{session_id}/inputs/{input_id}: put: operationId: putInput summary: Admit immutable identified input tags: - sessions responses: '202': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Input' examples: Input: value: id: 01a0fcea-2b00-7000-8000-000000000002 session_id: 01a0fcea-2b00-7000-8000-000000000001 kind: message admission: accepted http_status: 202 problem: null accepted_at: '2026-10-02T14:00:00Z' acceptance_order: 1 delivery: pending blocking_reason: null transcript_position: null turn: null client_id: draft-1 '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '410': $ref: '#/components/responses/Problem410' '429': description: Retained rejection, even if capacity later clears. content: application/problem+json: schema: $ref: '#/components/schemas/Problem' examples: queue_full: value: type: about:blank title: Queue full status: 429 detail: This session already has 32 waiting inputs. code: queue_full decision: kind: input input: id: 01a0fcea-2b00-7000-8000-000000000002 session_id: 01a0fcea-2b00-7000-8000-000000000001 kind: message admission: rejected http_status: 429 problem: type: about:blank title: Queue full status: 429 detail: This session already has 32 waiting inputs. code: queue_full accepted_at: null acceptance_order: null delivery: null blocking_reason: null transcript_position: null turn: null client_id: draft-1 headers: Retry-After: $ref: '#/components/headers/RetryAfter' description: Input ID is UUIDv7. Duplicate lookup precedes mutable validation and returns the original admission status with current delivery. Queue-full rejection remains rejected. No If-None-Match. Preserve the exact intent and identity while recovering an uncertain response. parameters: - name: input_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/AttachmentTokenOptional' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InputRequest' examples: MessageInputRequest: value: kind: message text: Fix the parser. client_id: draft-1 description: UTF-8 JSON; duplicate keys and unknown fields are rejected. get: operationId: getInput summary: Read a durable input outcome tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Input' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '410': $ref: '#/components/responses/Problem410' description: Available after session deletion. Accepted is not consumed or answered. Retain pending and unfinished-turn identities; terminal decisions last seven days. Unknown old UUIDv7 returns 410, never a fresh admission. parameters: - name: input_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' /sessions/{session_id}/inputs/{input_id}/cancel: post: operationId: cancelInput summary: Cancel or interrupt only this input tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/InputCancellation' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '409': $ref: '#/components/responses/Problem409' '404': $ref: '#/components/responses/Problem404' '410': $ref: '#/components/responses/Problem410' description: Never interrupts a later unrelated turn. shared_running leaves a shared turn running; retry only inspects or acts on this same input. ACP sessions require the current attachment token. parameters: - $ref: '#/components/parameters/AttachmentTokenOptional' - name: input_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmptyRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/interrupt: post: operationId: interruptSession summary: Interrupt a captured run and waiting prefix tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Interruption' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' description: Capture run_id and through_input_order from the installed session. Retry cannot interrupt a later run or cancel newer inputs. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InterruptRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/acp-attachment: put: operationId: attachACPSession summary: Attach this ACP connection as the session's single writer tags: - sessions responses: '200': description: Attached. The cursor and active turn are one session-actor capture; follow the stream from the cursor to receive only later events. content: application/json: schema: $ref: '#/components/schemas/ACPAttachment' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': $ref: '#/components/responses/Problem409' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '503': $ref: '#/components/responses/Problem503' description: Attach or re-attach with the same token. 409 not_acp_session for a session created without kind acp; 409 workspace_mismatch unless workspace equals the session's canonical workspace exactly; 409 attachment_held while another token holds a live lease (never stolen); 409 session_busy when the session has an active turn and the overlay differs from the installed one (nothing changes); 409 mcp_overlay_conflict for duplicate names or names already configured globally; 409 mcp_overlay_failed when an idle replacement could not be prepared (the previous overlay and attachment stay as they were). 503 overlay_installed_reload_failed means publication succeeded but runtime reload failed; the replacement remains installed. 503 overlay_update_uncertain means publication or reload was not confirmed within 15 seconds and may still complete. An identical reattach retries a failed reload. With editor-mcp enabled, publication awaiting reload blocks turns with 409 overlay_installed_reload_failed. A missing required overlay after restart blocks turns with 409 overlay_reattach_required; the editor must resume and resupply its servers. An empty overlay permits daemon-driven turns after daemon restart, but old editor tokens are invalid. Failed setup releases a newly acquired lease and retains a preexisting same-token lease. An empty list removes only the editor overlay. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/AttachmentToken' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ACPAttachRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: releaseACPSession summary: Release this connection's attachment tags: - sessions responses: '204': description: Released, or this token held no attachment. Accepted work keeps running. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '409': $ref: '#/components/responses/Problem409' '503': $ref: '#/components/responses/Problem503' description: Idempotent. Never cancels accepted inputs, the active turn, or the MCP overlay. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/AttachmentToken' /sessions/{session_id}/acp-attachment/renew: post: operationId: renewACPSession summary: Extend this connection's attachment lease tags: - sessions responses: '204': description: Lease extended. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': $ref: '#/components/responses/Problem409' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '503': $ref: '#/components/responses/Problem503' description: 409 attachment_lost when this token no longer holds the attachment (expired, released, or the daemon restarted). Renewal never re-attaches; the client must attach again. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/AttachmentToken' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmptyRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/active-output/{content_id}: get: operationId: getActiveOutputContent summary: Read unfinished output at a captured snapshot cutoff tags: - sessions description: Pages contain at most 262144 UTF-8 bytes and remain within the captured cutoff. Preserve the required snapshot query when following next. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: content_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: snapshot in: query required: true schema: $ref: '#/components/schemas/PageToken' - name: next in: query schema: $ref: '#/components/schemas/PageToken' responses: '200': description: Bounded UTF-8 content page at the signed snapshot cutoff content: application/json: schema: $ref: '#/components/schemas/EntryContentPage' '400': $ref: '#/components/responses/Problem400' '403': $ref: '#/components/responses/Problem403' '410': $ref: '#/components/responses/Problem410' '503': $ref: '#/components/responses/Problem503' /sessions/{session_id}/history: get: operationId: getHistory summary: Page history or fork checkpoints tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/HistoryRead' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: Use only one of before/after/next. Durable positions are independent of actor replay. Pages are ascending and preserve complete display groups where bounded. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: false schema: type: string enum: [entries, checkpoints] default: entries - name: before in: query required: false schema: $ref: '#/components/schemas/Counter' - name: after in: query required: false schema: $ref: '#/components/schemas/Counter' - $ref: '#/components/parameters/Next' - name: limit in: query required: false schema: type: integer minimum: 1 maximum: 200 default: 100 /sessions/{session_id}/history/content: get: operationId: getHistoryContentBatch summary: Read several entries' full content in one walk tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/EntryContentBatch' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: The same parts and byte offsets as the single-entry route, for up to 200 entries, in the order `entries` names them. Follow next until null, repeating entries. One page stays inside the common encoded response bound, so a page whose entries are mostly references costs one request per byte budget instead of one request per entry. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: entries in: query required: true description: Comma separated history entry ids, in display order, at most 200 of them, each at most 128 characters. schema: type: string minLength: 1 maxLength: 26000 - $ref: '#/components/parameters/Next' /sessions/{session_id}/history/{entry_id}: get: operationId: getHistoryContent summary: Read full content in bounded pieces tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/EntryContentPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: Follow next until null. UTF-8 pieces end at character boundaries. Reconstruct stored content, not shortened previews. Image fields are not paged here; their references name the image resource. parameters: - name: entry_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/Next' /sessions/{session_id}/history/{entry_id}/{field}: get: operationId: getHistoryImage summary: Read one image field as its own bytes tags: - sessions responses: '200': description: The decoded image, typed by its MIME type. content: image/png: schema: type: string contentMediaType: image/png image/jpeg: schema: type: string contentMediaType: image/jpeg image/webp: schema: type: string contentMediaType: image/webp '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: Image references in history point here. The body is the stored image itself, not base64, and is never content-coded. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: entry_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: field in: path required: true schema: type: string minLength: 1 maxLength: 256 /sessions/{session_id}/context: get: operationId: getContext summary: Inspect prepared context or request records tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ContextRead' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '410': $ref: '#/components/responses/Problem410' description: 'Summary never prepares a request. Section requires snapshot_id, section_id, page and forbids request-pagination fields. Requests accepts after/since_ms/limit/next. Stale snapshot is 410 context_changed, never another section. Requires capability `context: 1`.' parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: false schema: type: string enum: [summary, section, requests] default: summary - name: snapshot_id in: query required: false schema: $ref: '#/components/schemas/ID' - name: section_id in: query required: false schema: $ref: '#/components/schemas/ID' - name: page in: query required: false schema: $ref: '#/components/schemas/Counter' - name: after in: query required: false schema: $ref: '#/components/schemas/Counter' - name: since_ms in: query required: false description: Requests only. Include attempts finished at or after this Unix timestamp in milliseconds. schema: $ref: '#/components/schemas/Counter' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' /sessions/{session_id}/catalog: get: operationId: getCatalog summary: Discover candidates, loaded commands and pages tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Catalog' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: 'Discovery and loaded composition are separate. Reads do not reload. Continuation identifies its section; candidate revision guards discovery-based selection. Requires capability `catalog: 1`.' parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: kind in: query required: false schema: type: string enum: [extensions, skills, instructions, mcp, commands] - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' /sessions/{session_id}/context-window: get: operationId: getContextWindow summary: Read the window this session compacts against tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ContextWindow' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: 'The session''s own window outranks the model''s. Reads do not prepare a request, so the answer is available while the prepared context is pending. Requires capability `context: 1`.' parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' /sessions/{session_id}/files: get: operationId: getSessionFile summary: Read a text file in the session's workspace tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/SessionFile' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '413': description: The file is over 1 MiB, or its JSON answer would exceed the response limit (`file_too_large`). content: application/problem+json: schema: $ref: '#/components/schemas/Problem' '415': description: The file is binary or not valid UTF-8 (`file_not_text`). content: application/problem+json: schema: $ref: '#/components/schemas/Problem' '502': description: The gather on the workspace's host failed or answered badly (`workspace_unavailable`). content: application/problem+json: schema: $ref: '#/components/schemas/Problem' description: 'Reads on the machine the workspace is on: the daemon for a local workspace, the host through one SSH gather for a remote one. A missing file, a directory or another non-regular file answers 404 `file_not_found`; an unknown session answers 404 like other session routes. A remote host that is not ready answers 503 `workspace_unavailable`, a failed gather 502. Requires capability `file_reading: 1`.' parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: path in: query required: true description: Absolute on the workspace's machine, relative to the workspace, `~/...` in a local workspace, or the host-prefixed spelling `path` answers with. schema: type: string minLength: 1 /sessions/{session_id}/changes: get: operationId: getSessionChanges summary: Read every change of the session's checkout tags: - sessions responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/CheckoutChanges' examples: CheckoutChanges: value: checkout: kind: git root: /workspace/project head: 6e1f2a9 branch: main base: spec: uncommitted label: HEAD commit: 6e1f2a9 files: - path: docs/guide.md old_path: null status: untracked added: 2 removed: 0 binary: false diff: "diff --git a/docs/guide.md b/docs/guide.md\nnew file mode 100644\n--- /dev/null\n+++ b/docs/guide.md\n@@ -0,0 +1,2 @@\n+# guide\n+read me" omitted: null - path: logo.png old_path: null status: modified added: 0 removed: 0 binary: true diff: null omitted: binary - path: src/main.go old_path: src/app.go status: renamed added: 1 removed: 1 binary: false diff: "diff --git a/src/app.go b/src/main.go\nsimilarity index 90%\nrename from src/app.go\nrename to src/main.go\nindex 3b18e51..a0423896 100644\n--- a/src/app.go\n+++ b/src/main.go\n@@ -1,3 +1,3 @@\n package main\n-// app\n+// main\n func main() {}" omitted: null truncated: false '304': description: The answer named by `If-None-Match` is still current. No body. headers: ETag: $ref: '#/components/headers/ETag' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': description: The workspace is in no git or jj checkout (`not_a_repository`), or `base=upstream` has nothing to compare with (`no_upstream`). content: application/problem+json: schema: $ref: '#/components/schemas/Problem' '502': description: git or jj failed or is not installed (`vcs_failed`), or the gather on the workspace's host failed (`workspace_unavailable`). content: application/problem+json: schema: $ref: '#/components/schemas/Problem' '503': $ref: '#/components/responses/Problem503' '504': description: The commands missed their 15 s deadline (`vcs_timeout`). content: application/problem+json: schema: $ref: '#/components/schemas/Problem' description: 'Diffs the working copy of the checkout enclosing the session''s workspace, on the machine the workspace is on (the daemon, or the host through SSH gathers). Read-only: git runs without optional locks and jj with `--ignore-working-copy`. `uncommitted` compares the working tree, staged and unstaged, with HEAD (git) or `@-` (jj); `upstream` compares it with the merge base of HEAD and the branch''s upstream, else origin/HEAD, else origin/main (git), or with `fork_point(trunk() | @)` (jj). Untracked files that are not ignored are listed whole. A jj checkout colocated with git is answered by git and so includes edits jj has not snapshotted, listing a file new to git as `added`; one without git is as fresh as jj''s last snapshot. Files sort by path, at most 1000 (`truncated` past that). A diff over 256 KiB is omitted `too_large`; once the JSON-encoded diffs reach 768 KiB, that file and every later one are omitted `budget`. Binary content, and text that is not UTF-8, is `binary`. `diff` is null exactly when `omitted` is set; counts are always filled (0 for binary, and for an untracked file over 64 MiB). The ETag hashes the answer: `If-None-Match` with it answers 304. A missing workspace folder is 404 `workspace_unavailable`. Requires capability `checkout_changes: 1`.' parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: base in: query required: false schema: type: string enum: [uncommitted, upstream] default: uncommitted - name: If-None-Match in: header required: false description: The ETag of an earlier answer. schema: type: string /sessions/{session_id}/reload: post: operationId: reloadSession summary: Reload composition, models or both tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ReloadResult' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: Session reload requires idle. Both targets return separate outcomes, preserving confirmed success when the other fails. Lost-response replay is not automatic. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ReloadRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/kernel/upgrade: post: operationId: upgradeKernel summary: Explicitly upgrade an idle kernel tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/KernelUpgradeResult' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: Stage and validate before swap. Report external jobs stopped during an unsuccessful upgrade; do not claim them restored. No automatic retry. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmptyRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/kernel/restart: post: operationId: restartKernel summary: Replace the session's kernel with an empty one tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/KernelRestartResult' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' description: Stop the running turn and cancel queued inputs as an interrupt does, discard the saved variables, and stop the kernel and its jobs. The response waits for the stop; the next turn boots an empty kernel. A stop that fails answers 503 kernel_restart_failed. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmptyRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/compaction: post: operationId: compactSession summary: Compact model context while retaining history tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/CompactionResult' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: Idle required. Selecting a strategy can succeed even if compaction later fails; report both. Full durable history stays intact. No automatic retry. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CompactionRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /sessions/{session_id}/rewind: post: operationId: rewindSession summary: Cut a session back to before a user message and keep the removed tail as an archived session tags: - sessions responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/RewindResult' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: 'Idle required. The checkpoint must be a user message from the checkpoint view. The session keeps every row before it, and the full prior conversation is copied first into a new archived session. The session actor stops, so attached streams reconnect and reset. Python namespace and files on disk are not rewound. A requested summary is made before anything changes, so a failed summary leaves the session untouched. Requires capability `history_rewind: 1`.' parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RewindRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /models: get: operationId: listModels summary: Read provider model metadata tags: - models responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ModelRead' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: In catalogue view, exactly one of provider_profile/provider is required. Endpoint is allowed only with provider. Unknown facts are null. A manual unlisted ID remains usable. Optional model returns one metadata row, including cap_key, for an unlisted manual ID; unknown facts stay null. parameters: - name: view in: query required: false schema: type: string enum: [catalogue, cache-policy] default: catalogue - name: extension in: query required: false description: Cache-policy matching only; defaults to the empty selector. schema: type: string maxLength: 256 - name: host in: query required: false description: Cache-policy matching only; defaults to the empty selector. schema: type: string maxLength: 4096 - name: model in: query required: false schema: $ref: '#/components/schemas/ID' - name: provider_profile in: query required: false schema: $ref: '#/components/schemas/ID' - name: provider in: query required: false schema: $ref: '#/components/schemas/ID' - name: endpoint in: query required: false schema: type: string format: uri maxLength: 4096 - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' /workspaces: get: operationId: getWorkspaces summary: Browse recent locations or a directory tags: - workspaces responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/WorkspaceRead' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: 'Without location return recent workspaces. include requires location. Paths resolve on the daemon host; cached host state does not perform SSH sign-in. Requires capability `workspace_browsing: 1`.' parameters: - name: location in: query required: false schema: $ref: '#/components/schemas/Workspace' - name: include in: query required: false description: '`preview` adds repository facts and a tree; `files` lists the directory''s files after its directories, each item with `kind`, `size` and `ignored`.' schema: type: string enum: [preview, files, 'preview,files', 'files,preview'] - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' /hosts: get: operationId: listHosts summary: Read known SSH hosts and cached state tags: - hosts responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/HostPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' parameters: - name: target in: query required: false schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' description: 'Requires capability `host_probes: 1`.' /hosts/{host}/probe: post: operationId: probeHost summary: Start or join a host probe tags: - hosts responses: '202': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Host' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' description: 'Coalesce repeated probes. Authentication remains an explicit operator handoff; no background SSH sign-in. Requires capability `host_probes: 1`.' parameters: - name: host in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EmptyRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /auth: get: operationId: getAuth summary: Read login choices and redacted accounts tags: - auth responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Auth' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: 'Requires capability `provider_auth: 1`.' /auth/logins/{login_id}: put: operationId: createLogin summary: Start or recover an identified provider login tags: - auth responses: '201': description: Successful result. headers: Location: $ref: '#/components/headers/Location' ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/Login' examples: Login: value: id: 01a0fcea-2b00-7000-8000-000000000003 provider: example-provider url: https://provider.example/authorize?state=synthetic-state expires_at: '2026-10-02T14:15:00Z' state: waiting instructions: Paste the callback URL if the browser cannot reach the daemon. progress: Waiting for authorization. accounts: [] failure: null '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '409': $ref: '#/components/responses/Problem409' '410': $ref: '#/components/responses/Problem410' '429': $ref: '#/components/responses/Problem429' '200': description: Existing identified flow. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/Login' description: 'UUIDv7 identity. Compare immutable private intent inside the daemon. Duplicate returns existing flow, never another browser/exchange. Restart turns unfinished flows into retained daemon_restarted failures; a new flow needs a new ID. Requires capability `provider_auth: 1`.' parameters: - name: login_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LoginRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. get: operationId: getLogin summary: Inspect a provider login tags: - auth responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/Login' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '410': $ref: '#/components/responses/Problem410' description: 'No credential or submitted form echo. Terminal records remain fifteen minutes; unfinished flows expire at their provider deadline. Requires capability `provider_auth: 1`.' parameters: - name: login_id in: path required: true schema: $ref: '#/components/schemas/ID' patch: operationId: answerLogin summary: Supply manual callback or code tags: - auth responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/Login' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '410': $ref: '#/components/responses/Problem410' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' parameters: - name: login_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/LoginPatch' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. description: 'Requires capability `provider_auth: 1`.' delete: operationId: cancelLogin summary: Cancel a login idempotently tags: - auth responses: '204': description: Successful result. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '410': $ref: '#/components/responses/Problem410' description: 'Cancellation stops only this flow; completed accounts remain saved. No If-Match is needed for identity-scoped cancellation. Requires capability `provider_auth: 1`.' parameters: - name: login_id in: path required: true schema: $ref: '#/components/schemas/ID' /auth/accounts/{account_id}: delete: operationId: deleteAccount summary: Remove an unreferenced provider account tags: - auth responses: '204': description: Successful result. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: 'Reject if a profile pins it by `account_id`, if it is the last account of a profile''s `account_ids`, or if it comes from the environment (`account_external`). Otherwise it also leaves every `account_ids` list naming it. Does not interrupt captured credentials in an active request. Account IDs are never reused. Requires capability `provider_auth: 1`.' parameters: - name: account_id in: path required: true schema: $ref: '#/components/schemas/ID' patch: operationId: patchAccount summary: Rename a saved provider account tags: - auth requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AccountPatch' responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/Account' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: 'Environment accounts cannot be renamed (`account_external`). Requires capability `provider_auth: 1`.' parameters: - name: account_id in: path required: true schema: $ref: '#/components/schemas/ID' /auth/keys/{account_id}: put: operationId: putKeyAccount summary: Save an API key as a provider account tags: - auth requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/KeyAccountRequest' responses: '201': description: Created. content: application/json: schema: $ref: '#/components/schemas/Account' '200': description: The same request again; the account it created. content: application/json: schema: $ref: '#/components/schemas/Account' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: 'The client chooses the account id (a UUIDv7). Replaying the same request returns the account; different content at a used id is `409 conflict`. Requires capability `provider_auth: 1`.' parameters: - name: account_id in: path required: true schema: $ref: '#/components/schemas/UUIDv7' /extensions/work/items: get: operationId: listWork summary: List work resources tags: - work responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/WorkPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: Requires enabled extension work. Lists may include bounded page descriptors and glances. parameters: - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' post: operationId: createWork summary: Create a work resource tags: - work responses: '201': description: Successful result. headers: Location: $ref: '#/components/headers/Location' content: application/json: schema: $ref: '#/components/schemas/WorkChange' examples: WorkChange: value: resource: url: /extensions/work/items/work-1?workspace=%2Fworkspace%2Fproject etag: '"work-revision-1"' value: id: work-1 workspace: /workspace/project title: Fix the parser notes: '' parent_id: null session_id: null run_id: null status: open revision: work-revision-1 created_at: '2026-10-02T14:00:00Z' updated_at: '2026-10-02T14:00:00Z' notification: state: not_requested code: null detail: null '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: No automatic lost-response retry. Notification outcome does not undo a committed domain edit. parameters: - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WorkCreate' examples: WorkCreate: value: title: Fix the parser description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/work/items/{item_id}: get: operationId: getWork summary: Read one work resource tags: - work responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/WorkItem' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: item_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' patch: operationId: patchWork summary: Edit a work resource tags: - work responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/WorkChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry. parameters: - name: item_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/WorkPatch' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: deleteWork summary: Delete a work resource tags: - work responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ExtensionDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Committed deletion remains successful if notification fails. Work items with children cannot be deleted. parameters: - name: item_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' - name: notify_session_id in: query required: false schema: $ref: '#/components/schemas/ID' description: Queue the deletion note for this session after the durable edit. - $ref: '#/components/parameters/IfMatch' /extensions/artifacts/items: get: operationId: listArtifacts summary: List artifacts, newest change first tags: - artifacts responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ArtifactPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: Requires enabled extension artifacts. Artifacts outlive their session; `session_deleted` marks one whose session is gone. parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' - name: session in: query required: false description: Only this session's artifacts. schema: $ref: '#/components/schemas/ID' /extensions/artifacts/items/{artifact_id}: get: operationId: getArtifact summary: Read one artifact with its versions tags: - artifacts responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ArtifactDetail' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: artifact_id in: path required: true schema: $ref: '#/components/schemas/ArtifactID' delete: operationId: deleteArtifact summary: Delete an artifact and every version of it tags: - artifacts responses: '204': description: Deleted. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: artifact_id in: path required: true schema: $ref: '#/components/schemas/ArtifactID' /extensions/artifacts/frame/{frame}/{version}/{path}: get: operationId: getArtifactFile summary: Serve one file of one artifact version tags: - artifacts responses: '200': description: The file, with its content type. An HTML file has the page bridge injected at the start of its head. content: '*/*': schema: type: string format: binary '302': description: The bare version path goes to its folder (`latest` to `latest/`), and an empty path to an entry inside a folder goes to that entry, so the page's relative paths resolve inside the version. headers: Location: description: Relative to the request. schema: type: string '304': description: The file named by `If-None-Match` is still the one served. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: '`albedo web` forwards `/frame/...` here; see robot-docs/artifacts.md. A wrong key answers 404. `path` may contain `/`; one ending in `/` serves its index.html, and an empty one the entry of that version. Under `latest` files are `no-cache` and the bridge is told to follow; the files of a numbered version are immutable.' parameters: - name: frame in: path required: true description: The artifact's id and capability key, joined by a dot. schema: type: string maxLength: 128 - name: version in: path required: true description: A version number, or `latest` for the newest. schema: type: string pattern: ^([1-9][0-9]*|latest)$ - name: path in: path required: true schema: type: string maxLength: 512 /extensions/artifacts/frame/{frame}/{version}/.albedo/state: post: operationId: saveArtifactState summary: Save the page's localStorage tags: - artifacts responses: '204': description: Saved. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '413': $ref: '#/components/responses/Problem413' parameters: - name: frame in: path required: true description: The artifact's id and capability key, joined by a dot. schema: type: string maxLength: 128 - name: version in: path required: true description: A version number, or `latest` for the newest. schema: type: string pattern: ^([1-9][0-9]*|latest)$ requestBody: required: true content: text/plain: schema: $ref: '#/components/schemas/ArtifactState' description: JSON sent as text/plain, so a sandboxed page can send it without a preflight. /extensions/artifacts/frame/{frame}/{version}/.albedo/errors: post: operationId: reportArtifactError summary: Record a failure in the page tags: - artifacts responses: '204': description: Recorded. '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '413': $ref: '#/components/responses/Problem413' parameters: - name: frame in: path required: true description: The artifact's id and capability key, joined by a dot. schema: type: string maxLength: 128 - name: version in: path required: true description: A version number, or `latest` for the newest. schema: type: string pattern: ^([1-9][0-9]*|latest)$ requestBody: required: true content: text/plain: schema: $ref: '#/components/schemas/ArtifactError' description: JSON sent as text/plain, so a sandboxed page can send it without a preflight. /extensions/artifacts/frame/{frame}/{version}/.albedo/version: get: operationId: getArtifactLatestVersion summary: Wait for a newer version of an artifact tags: - artifacts description: What a page open on `latest/` in a tab of its own asks to know when to reload. With `after`, the daemon holds the answer until the latest version passes it or about 25 seconds pass; without, it answers at once. The version in the path only has to exist. responses: '200': description: The artifact's latest version. headers: Cache-Control: schema: type: string const: no-store content: application/json: schema: type: object additionalProperties: false required: - version properties: version: type: integer minimum: 1 '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: frame in: path required: true description: The artifact's id and capability key, joined by a dot. schema: type: string maxLength: 128 - name: version in: path required: true description: A version number, or `latest` for the newest. schema: type: string pattern: ^([1-9][0-9]*|latest)$ - name: after in: query required: false description: The version the page shows; the answer waits for one past it. schema: type: integer minimum: 0 /extensions/paperclips/items: get: operationId: listPaperclips summary: List paperclips resources tags: - paperclips responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/PaperclipPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: Requires enabled extension paperclips. Lists may include bounded page descriptors and glances. parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' post: operationId: createPaperclips summary: Create a paperclips resource tags: - paperclips responses: '201': description: Successful result. headers: Location: $ref: '#/components/headers/Location' content: application/json: schema: $ref: '#/components/schemas/PaperclipChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: No automatic lost-response retry. Notification outcome does not undo a committed domain edit. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaperclipCreate' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/paperclips/items/{item_id}: get: operationId: getPaperclips summary: Read one paperclips resource tags: - paperclips responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/Paperclip' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: item_id in: path required: true schema: $ref: '#/components/schemas/ID' patch: operationId: patchPaperclips summary: Edit a paperclips resource tags: - paperclips responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/PaperclipChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry. parameters: - name: item_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/PaperclipPatch' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: deletePaperclips summary: Delete a paperclips resource tags: - paperclips responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ExtensionDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Committed deletion remains successful if notification fails. Work items with children cannot be deleted. parameters: - name: item_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/IfMatch' /extensions/web-search/providers: get: operationId: listWebSearchProviders summary: List web search providers in the order a search tries them tags: - web-search responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/WebSearchProviderPage' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '503': $ref: '#/components/responses/Problem503' description: Requires enabled extension web-search. The global order lives in extensions.json. /extensions/web-search/providers/{name}: post: operationId: changeWebSearchProvider summary: Move a web search provider up or down, or turn it on or off tags: - web-search responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/WebSearchProviderChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '503': $ref: '#/components/responses/Problem503' description: A move past either end leaves the order as it was. parameters: - name: name in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/WebSearchProviderChangeRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/skills/loads: get: operationId: listSkillLoads summary: List the skills a session loaded tags: - skills responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/SkillLoadList' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '503': $ref: '#/components/responses/Problem503' description: Requires enabled extension skills. Each skill the session's model or user loaded, once, first loaded first; the session's sidebar glance lists the same. parameters: - name: session_id in: query required: true schema: $ref: '#/components/schemas/ID' /extensions/schedule/jobs: get: operationId: listSchedule summary: List schedule resources tags: - schedule responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/SchedulePage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: Requires enabled extension schedule. Lists may include bounded page descriptors and glances. parameters: - name: session_id in: query required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' post: operationId: createSchedule summary: Create a schedule resource tags: - schedule responses: '201': description: Successful result. headers: Location: $ref: '#/components/headers/Location' content: application/json: schema: $ref: '#/components/schemas/ScheduleChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: No automatic lost-response retry. Notification outcome does not undo a committed domain edit. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ScheduleCreate' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/schedule/jobs/{job_id}: get: operationId: getSchedule summary: Read one schedule resource tags: - schedule responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/ScheduleJob' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: job_id in: path required: true schema: $ref: '#/components/schemas/ID' patch: operationId: patchSchedule summary: Edit a schedule resource tags: - schedule responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ScheduleChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Use the displayed item validator. Reject readonly/unknown fields. No automatic lost-response retry. parameters: - name: job_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/SchedulePatch' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: deleteSchedule summary: Delete a schedule resource tags: - schedule responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ExtensionDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Committed deletion remains successful if notification fails. Work items with children cannot be deleted. parameters: - name: job_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/IfMatch' /extensions/links/groups: get: operationId: getLinkGroup summary: Read linked membership and presence tags: - links responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: oneOf: - $ref: '#/components/schemas/LinkGroup' - $ref: '#/components/schemas/LinkConfiguration' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' description: Only configuration view has the canonical membership ETag. Presence does not change that validator. parameters: - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' - name: view in: query required: false schema: type: string enum: [configuration] - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' post: operationId: mergeLinkGroups summary: Merge two observed workspace groups tags: - links responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/LinkChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Check both observed validators in one owner commit. Human-only; domain commit and notifications are separate. No automatic lost-response retry. parameters: - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' - name: view in: query required: true schema: const: configuration - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LinkMerge' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: unlinkWorkspace summary: Remove a member from the observed group tags: - links responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/LinkChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Check membership at commit. Creates a singleton group; deletes no work or memory. Human-only. parameters: - name: workspace in: query required: true schema: $ref: '#/components/schemas/Workspace' - name: member in: query required: true schema: $ref: '#/components/schemas/Workspace' - name: view in: query required: true schema: const: configuration - $ref: '#/components/parameters/IfMatch' /extensions/webhooks/hooks: get: operationId: listHooks summary: List hooks without secrets tags: - webhooks responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/HookPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' parameters: - name: session_id in: query required: false schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' post: operationId: createHook summary: Create a hook and disclose its secret once tags: - webhooks responses: '201': description: Successful result. headers: Location: $ref: '#/components/headers/Location' content: application/json: schema: $ref: '#/components/schemas/HookChange' examples: HookChange: value: resource: url: /extensions/webhooks/hooks/hook-1?view=configuration etag: '"hook-revision-1"' value: id: hook-1 name: ci session_id: 01a0fcea-2b00-7000-8000-000000000001 enabled: true signature_header: X-Albedo-Signature signature_prefix: sha256= revision: hook-revision-1 notification: state: not_requested code: null detail: null secret: synthetic-example-hook-secret '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: Default enabled=true, signature_header=X-Albedo-Signature and signature_prefix=sha256=. Missing secret generates one. Lost secret requires explicit rotation; never retry creation automatically. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/HookCreate' examples: HookCreate: value: session_id: 01a0fcea-2b00-7000-8000-000000000001 name: ci description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/webhooks/hooks/{hook_id}: get: operationId: getHook summary: Read hook state or canonical configuration tags: - webhooks responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: oneOf: - $ref: '#/components/schemas/Hook' - $ref: '#/components/schemas/HookConfiguration' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: ETag is present only on configuration view. Ordinary read exposes the configuration resource and validator plus runtime observations. parameters: - name: hook_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: false schema: type: string enum: [configuration] patch: operationId: patchHook summary: Edit the observed hook configuration tags: - webhooks responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/HookChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Target session and secret are not writable. Agent callers need that session permission; HTTP bearer clients are operators. parameters: - name: hook_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: true schema: const: configuration - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/HookPatch' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: deleteHook summary: Delete a hook while retaining accepted deliveries tags: - webhooks responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ExtensionDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' parameters: - name: hook_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: view in: query required: true schema: const: configuration - $ref: '#/components/parameters/IfMatch' /extensions/webhooks/hooks/{hook_id}/secret: post: operationId: rotateHookSecret summary: Rotate and disclose the hook secret once tags: - webhooks responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/HookChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: If-Match is the observed hook configuration validator. Missing secret generates one. No automatic retry after a lost response. parameters: - name: hook_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/HookSecretRequest' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/webhooks/hooks/{hook_id}/deliveries: get: operationId: listHookDeliveries summary: Read accepted hook delivery metadata tags: - webhooks responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DeliveryPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: Historical reads remain available after hook deletion while retained deliveries exist. parameters: - name: hook_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: state in: query required: false schema: type: string enum: [pending, delivered, all] default: all - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Next' post: operationId: deliverWebhook summary: Accept signed external data durably tags: - webhooks responses: '202': description: Successful result. content: application/json: schema: type: object properties: delivery_id: $ref: '#/components/schemas/ID' required: [delivery_id] additionalProperties: false '400': $ref: '#/components/responses/Problem400' '403': description: Missing or invalid hook signature. content: application/problem+json: schema: $ref: '#/components/schemas/Problem' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' '429': $ref: '#/components/responses/Problem429' description: Authenticate configured HMAC-SHA256 over the exact raw body. A daemon bearer is not a substitute. Signature header name and prefix come from hook configuration. Same event ID and body returns original admission; changed body conflicts. Pending inbox limit 1000. Raw body maximum 65536 bytes. parameters: - name: hook_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: X-Albedo-Event-Id in: header required: false schema: type: string pattern: ^[^\r\n]+$ maxLength: 128 description: Optional sender identity scoped to hook and exact body hash. security: - WebhookSignature: [] requestBody: required: true content: '*/*': schema: type: string format: binary maxLength: 65536 description: Raw bytes, not a parsed JSON requirement. Verify signature before admission. /extensions/webhooks/deliveries/{delivery_id}: get: operationId: getDelivery summary: Read an accepted delivery payload tags: - webhooks responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DeliveryDetail' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: delivery_id in: path required: true schema: $ref: '#/components/schemas/ID' /extensions/webhooks/permissions/{session_id}: get: operationId: getHookPermission summary: Read agent hook-management permission tags: - webhooks responses: '200': description: Successful result. headers: ETag: $ref: '#/components/headers/ETag' content: application/json: schema: $ref: '#/components/schemas/HookPermission' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: Absent stored permission reads false with its initial canonical validator. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' patch: operationId: patchHookPermission summary: Set agent hook-management permission tags: - webhooks responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/HookPermissionChange' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '412': $ref: '#/components/responses/Problem412' '428': $ref: '#/components/responses/Problem428' description: Only operator callers can grant permission. Omission retains it; turning off management keeps existing hooks enabled. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - $ref: '#/components/parameters/IfMatch' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/HookPermissionPatch' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/discord/bots: get: operationId: listDiscordBots summary: List Discord bots of every session without tokens tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordBotPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' post: operationId: createDiscordBot summary: Create the Discord bot of a session tags: - discord responses: '201': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordBot' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '409': $ref: '#/components/responses/Problem409' description: One bot per session (409 bot_exists). The token must have three dot-separated parts and is never returned. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DiscordBotCreate' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/discord/bots/{bot_id}: get: operationId: getDiscordBot summary: Read a Discord bot and its live state tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordBot' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' patch: operationId: patchDiscordBot summary: Edit a Discord bot at an observed revision tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordBot' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' '412': $ref: '#/components/responses/Problem412' description: A token or enabled change restarts or stops the bot process. A stale revision is 412 precondition_failed. parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/merge-patch+json: schema: $ref: '#/components/schemas/DiscordBotPatch' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: deleteDiscordBot summary: Delete a Discord bot and its channel and DM settings tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' '412': $ref: '#/components/responses/Problem412' parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: revision in: query required: true schema: type: integer minimum: 1 /extensions/discord/bots/{bot_id}/guilds: get: operationId: listDiscordGuilds summary: List the servers and channels the bot can see, with their delivery tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordGuildList' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: Read live from the bot process; 503 bot_offline when the bot is not online. parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' /extensions/discord/bots/{bot_id}/channels/{channel_id}: put: operationId: putDiscordChannel summary: Set how a channel reaches the session tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordChannelState' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' description: Delivery off removes the channel; threads follow their parent channel. parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: channel_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DiscordChannelSetting' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/discord/bots/{bot_id}/dms: get: operationId: getDiscordDMs summary: Read the DM allow list and pending requests tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordDMs' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' /extensions/discord/bots/{bot_id}/dms/{user_id}: put: operationId: putDiscordDM summary: Allow a person to DM the session tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordAllowed' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '404': $ref: '#/components/responses/Problem404' description: A null name is resolved from Discord when the bot is online. Allowing removes a pending request. parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: user_id in: path required: true schema: $ref: '#/components/schemas/ID' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DiscordAllow' description: UTF-8 JSON; duplicate keys and unknown fields are rejected. delete: operationId: deleteDiscordDM summary: Remove a person from the DM allow list tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordUserDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' description: The owner cannot be removed (400). parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: user_id in: path required: true schema: $ref: '#/components/schemas/ID' /extensions/discord/bots/{bot_id}/requests/{user_id}: delete: operationId: deleteDiscordRequest summary: Dismiss a pending DM request tags: - discord responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/DiscordUserDeletion' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '403': $ref: '#/components/responses/Problem403' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' '404': $ref: '#/components/responses/Problem404' parameters: - name: bot_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: user_id in: path required: true schema: $ref: '#/components/schemas/ID' /extensions/proxy/v1/models: get: operationId: listProxyModels summary: List saved-profile OpenAI model IDs tags: - proxy responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ProxyModels' '400': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '401': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '403': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '405': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '406': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '503': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' description: External OpenAI envelope. Bearer required unless operator explicitly configured anonymous loopback access. /extensions/proxy/v1/chat/completions: post: operationId: createProxyCompletion summary: Run a stateless OpenAI chat completion tags: - proxy responses: '200': description: Successful result. content: application/json: schema: $ref: '#/components/schemas/ProxyCompletion' examples: ProxyCompletion: value: id: completion-1 object: chat.completion created: 1790949600 model: personal/example-model choices: - index: 0 message: role: assistant content: Hello finish_reason: stop usage: prompt_tokens: 1 completion_tokens: 1 total_tokens: 2 text/event-stream: itemSchema: $ref: '#/components/schemas/ProxySSE' '400': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '401': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '403': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '405': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '406': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '503': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '413': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' '415': description: OpenAI proxy error. content: application/json: schema: $ref: '#/components/schemas/ProxyError' description: Caller supplies full history. Tool IDs carry opaque provider state and must be echoed exactly. Bearer required unless anonymous loopback policy explicitly enabled. Providers apply only representable generation options; proxy transport documentation defines these differences. No automatic replay after request admission. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProxyCompletionRequest' examples: ProxyCompletionRequest: value: model: personal/example-model messages: - role: user content: Hello stream: true description: UTF-8 JSON; duplicate keys and unknown fields are rejected. /extensions/run/sessions/{session_id}/jobs: get: operationId: listJobs summary: Read bounded live job observations and the jobs page parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' responses: '200': description: Known live jobs, with up to 100 summaries ordered by ID. content: application/json: schema: $ref: '#/components/schemas/JobCollection' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' /extensions/run/sessions/{session_id}/jobs/recent: get: operationId: listRecentJobs summary: Read the kernel's jobs, running and finished description: What the session's kernel still knows of the jobs its run tool started, newest first, with up to 100 rows. Finished jobs stay for as long as the kernel keeps their output (its 64 newest). A session with no kernel has none. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' responses: '200': description: The kernel's job book. content: application/json: schema: $ref: '#/components/schemas/JobRecordCollection' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '503': $ref: '#/components/responses/Problem503' /extensions/run/sessions/{session_id}/jobs/{job_id}/output: get: operationId: readJobOutput summary: Read a page of one job's output description: Pages are byte ranges cut on character boundaries, so a reader that continues from `next_offset` loses none of what the job wrote; a running job's last character waits for the page after it. Without `offset` the page is the end of the output. Reading never counts as the model reading the job's result. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: job_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: offset in: query required: false description: Byte to start from. Omitted, the page ends at the end of the output. schema: type: integer minimum: 0 - name: limit in: query required: false description: Most bytes in the page; four hold any character. schema: type: integer minimum: 4 maximum: 65536 default: 16384 responses: '200': description: One page of output and the job it belongs to. content: application/json: schema: $ref: '#/components/schemas/JobOutputPage' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '409': description: The page lies in output the kernel no longer keeps; read the end of the output instead. content: application/problem+json: schema: $ref: '#/components/schemas/Problem' '503': $ref: '#/components/responses/Problem503' /extensions/run/sessions/{session_id}/jobs/{job_id}/stop: post: operationId: stopJob summary: Explicitly stop one observed process group description: No automatic retry after response loss. Read the job collection before confirming another attempt. A successful response confirms the supervisor verdict, not just signal delivery. parameters: - name: session_id in: path required: true schema: $ref: '#/components/schemas/ID' - name: job_id in: path required: true schema: $ref: '#/components/schemas/ID' responses: '200': description: The observed job's process group was stopped. content: application/json: schema: $ref: '#/components/schemas/JobStop' '400': $ref: '#/components/responses/Problem400' '401': $ref: '#/components/responses/Problem401' '404': $ref: '#/components/responses/Problem404' '405': $ref: '#/components/responses/Problem405' '406': $ref: '#/components/responses/Problem406' '413': $ref: '#/components/responses/Problem413' '415': $ref: '#/components/responses/Problem415' '503': $ref: '#/components/responses/Problem503' requestBody: required: false content: application/json: schema: type: object additionalProperties: falsecomponents: securitySchemes: DaemonBearer: type: http scheme: bearer description: Daemon operator token, supplied out of band. Browser clients use fetch for authenticated JSON and SSE. No query tokens or authentication cookies. WebhookSignature: type: apiKey in: header name: X-Albedo-Signature description: Default header only. Each hook may configure another header and prefix. HMAC-SHA256 over exact raw bytes; bearer is not an alternative. parameters: AttachmentToken: name: Albedo-Attachment-Token in: header required: true schema: $ref: '#/components/schemas/AttachmentToken' description: Per-connection ACP attachment capability, generated by the client. Separate from the daemon bearer token; the daemon keeps only a digest in memory and never returns or logs it. AttachmentTokenOptional: name: Albedo-Attachment-Token in: header required: false schema: $ref: '#/components/schemas/AttachmentToken' description: Required for kind acp creation and for input or scoped cancellation in an ACP session. Also authorizes model-only configuration patches by an ACP attachment holder. Ordinary creation ignores this header. Input, scoped cancellation, and configuration patches parse and reject malformed supplied values. Not part of the durable intent. IfMatch: name: If-Match in: header required: true schema: $ref: '#/components/schemas/ETag' description: Observed canonical representation validator. Wildcards and weak validators are not accepted. IfNoneMatch: name: If-None-Match in: header required: true schema: const: '*' description: Conditional creation only. Limit: name: limit in: query required: false schema: type: integer minimum: 1 maximum: 200 default: 50 Next: name: next in: query required: false schema: $ref: '#/components/schemas/PageToken' headers: ETag: description: Opaque strong validator for the complete canonical JSON representation. Mutation envelopes carry their resource validator inside the body. schema: $ref: '#/components/schemas/ETag' Location: description: URL of the created resource. schema: $ref: '#/components/schemas/ResourceURL' required: true Vary: description: Includes Accept; browser responses also include Origin. schema: type: string RetryAfter: description: Seconds until a later new admission may succeed. Never retries an already rejected identified input. schema: type: integer minimum: 0 maximum: 3600 WWWAuthenticate: description: Bearer challenge. schema: type: string pattern: ^Bearer Allow: description: Allowed methods for a known path. schema: type: string responses: Problem400: description: Invalid request content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem401: description: Missing or invalid daemon token headers: WWWAuthenticate: $ref: '#/components/headers/WWWAuthenticate' content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem403: description: Disallowed origin or caller content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem404: description: Unknown resource or disabled service content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem405: description: Method not allowed headers: Allow: $ref: '#/components/headers/Allow' content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem406: description: Unsupported response media type content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem409: description: Conflicting intent, busy state or stale catalog content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem410: description: Expired identity, deletion tombstone or obsolete context content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem412: description: Stale representation or failed creation condition content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem413: description: Body too large content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem415: description: Unsupported request media type content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem428: description: Required precondition missing content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem429: description: Admission limit headers: RetryAfter: $ref: '#/components/headers/RetryAfter' content: application/problem+json: schema: $ref: '#/components/schemas/Problem' Problem503: description: Unavailable owner, storage or upstream preparation content: application/problem+json: schema: $ref: '#/components/schemas/Problem' schemas: TerminalClose: type: object required: - closed properties: closed: $ref: '#/components/schemas/ID' description: The interactive terminal session was closed and its process group ended. additionalProperties: false ID: type: string minLength: 1 description: Opaque identity. Never infer a resource type or route from its contents. maxLength: 512 UUIDv7: type: string pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ format: uuid description: Client-generated lowercase UUIDv7. Retained decisions are checked before timestamp expiry. Generation: type: string pattern: ^[A-Za-z0-9_-]{21}[AQgw]$ description: 128 random bits encoded as unpadded base64url; new for each session actor lifetime. Counter: type: integer minimum: 0 maximum: 9007199254740991 Timestamp: type: string format: date-time pattern: Z$ description: UTC RFC 3339. PageToken: type: string minLength: 1 description: Opaque continuation, tied to the query and representation; never authority. maxLength: 4096 ETag: type: string pattern: ^"[^"\r\n]+"$ description: Strong opaque validator for the complete canonical representation. maxLength: 512 ResourceURL: type: string pattern: ^/([^/#][^#]*)?$ description: Daemon-relative URL, including any representation query. No foreign origin or fragment. maxLength: 16384 Workspace: type: string minLength: 1 description: Canonical daemon-host location, local or SSH. Clients do not resolve this path locally. maxLength: 4096 SafeReason: type: object properties: code: type: string minLength: 1 maxLength: 100 detail: type: string maxLength: 4096 required: [code, detail] additionalProperties: false Warnings: type: array items: $ref: '#/components/schemas/SafeReason' maxItems: 100 DynamicJSON: description: 'Explicit domain payload: tool arguments, tool results, provider-private state, or extension data. JSON values of any type are allowed; no core resource uses this as its envelope.' Problem: type: object properties: type: const: about:blank title: type: string maxLength: 256 status: type: integer minimum: 400 maximum: 599 detail: type: string maxLength: 4096 code: type: string minLength: 1 maxLength: 100 fields: type: array items: type: object properties: pointer: type: string maxLength: 4096 detail: type: string maxLength: 4096 required: [pointer, detail] additionalProperties: false maxItems: 100 decision: oneOf: - $ref: '#/components/schemas/CreationDecision' - $ref: '#/components/schemas/InputDecision' required: [type, title, status, detail, code] additionalProperties: false examples: - type: about:blank title: Queue full status: 429 detail: This session already has 32 waiting inputs. code: queue_full decision: kind: input input: id: 01a0fcea-2b00-7000-8000-000000000002 session_id: 01a0fcea-2b00-7000-8000-000000000001 kind: message admission: rejected http_status: 429 problem: type: about:blank title: Queue full status: 429 detail: This session already has 32 waiting inputs. code: queue_full accepted_at: null acceptance_order: null delivery: null blocking_reason: null transcript_position: null turn: null client_id: draft-1 EmptyRequest: type: object properties: {} additionalProperties: false Cursor: type: object properties: generation: $ref: '#/components/schemas/Generation' sequence: $ref: '#/components/schemas/Counter' required: [generation, sequence] additionalProperties: false ResourceValidator: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' required: [url, etag] additionalProperties: false Notification: type: object properties: state: type: string enum: [not_requested, queued, failed] code: anyOf: - type: string maxLength: 100 - type: 'null' detail: anyOf: - type: string maxLength: 4096 - type: 'null' required: [state, code, detail] additionalProperties: false TargetNotification: type: object properties: session_id: $ref: '#/components/schemas/ID' notification: $ref: '#/components/schemas/Notification' required: [session_id, notification] additionalProperties: false QuotaObservation: type: object properties: sequence: $ref: '#/components/schemas/Counter' provider: $ref: '#/components/schemas/ID' account_id: $ref: '#/components/schemas/ID' limit_id: type: string maxLength: 256 label: type: string maxLength: 4096 plan: anyOf: - type: string maxLength: 256 - type: 'null' used_percent: anyOf: - type: number - type: 'null' window_label: anyOf: - type: string maxLength: 4096 - type: 'null' window_seconds: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' resets_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' scope: anyOf: - type: string maxLength: 256 - type: 'null' status: type: string maxLength: 256 source: type: string maxLength: 256 error: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' observed_at: $ref: '#/components/schemas/Timestamp' required: - sequence - provider - account_id - limit_id - label - plan - used_percent - window_label - window_seconds - resets_at - scope - status - source - error - observed_at additionalProperties: false QuotaPage: type: object properties: items: type: array items: $ref: '#/components/schemas/QuotaObservation' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [items, next] additionalProperties: false GlobalExtension: type: object description: Installed extension and its resolved global default, independent of session overrides. properties: id: $ref: '#/components/schemas/ID' description: type: string requires: type: array items: $ref: '#/components/schemas/ID' enabled: type: boolean quarantined: type: boolean diagnostic: type: [string, 'null'] required: [id, description, requires, enabled, quarantined, diagnostic] additionalProperties: false Server: type: object properties: instance_id: $ref: '#/components/schemas/ID' protocol: const: 3 state: type: string enum: [ready, draining] capabilities: type: object additionalProperties: type: integer minimum: 1 maximum: 9007199254740991 build: anyOf: - type: string maxLength: 512 - type: 'null' digest: type: [string, 'null'] pattern: ^[0-9a-f]{64}$ description: Content digest of the running code tree; update information, not attachment compatibility. api_digest: type: string pattern: ^[0-9a-f]{64}$ description: Digest of the HTTP contract this daemon serves (docs/openapi.yaml without prose or examples), as cli/tools/apigen computes it. A client generated from a different digest may reject responses, so it refuses to attach and names the side to rebuild or restart. Absent from daemons that predate it. extensions: type: array items: type: object properties: name: $ref: '#/components/schemas/ID' version: type: integer minimum: 1 maximum: 9007199254740991 required: [name, version] additionalProperties: false maxItems: 200 quota: anyOf: - type: array items: $ref: '#/components/schemas/QuotaObservation' maxItems: 200 - type: 'null' notices: type: array items: type: object properties: id: $ref: '#/components/schemas/ID' kind: type: string enum: [info, warning, migration] message: type: string maxLength: 4096 required: [id, kind, message] additionalProperties: false maxItems: 100 extension_inventory: type: array description: Returned only with include=extensions. Includes disabled and quarantined extensions; never prepares a session. items: $ref: '#/components/schemas/GlobalExtension' quota_history: $ref: '#/components/schemas/QuotaPage' required: [instance_id, protocol, state, capabilities, build, digest, extensions, quota, notices] additionalProperties: false examples: - instance_id: instance-1 protocol: 3 state: ready capabilities: durable_inputs: 1 session_replay: 1 collection_invalidation: 1 tool_progress: 1 storage_report: 1 build: example-build digest: null extensions: - name: work version: 1 quota: null notices: [] ShutdownRequest: type: object properties: instance_id: $ref: '#/components/schemas/ID' timeout_ms: type: integer minimum: 1 maximum: 30000 default: 5000 stop_kernels: type: boolean default: false description: End every Python kernel this daemon holds instead of leaving them running for the next daemon to attach to. Sessions save their variables first, as when they go idle; running jobs end. required: [instance_id] additionalProperties: false Shutdown: type: object properties: instance_id: $ref: '#/components/schemas/ID' state: const: draining required: [instance_id, state] additionalProperties: false ProviderProfile: type: object properties: extension: $ref: '#/components/schemas/ID' api: anyOf: - type: string enum: [messages, converse] - type: 'null' description: Bedrock API mode. Null or omission means messages; replay protocol is unchanged. endpoint: anyOf: - type: string format: uri maxLength: 4096 - type: 'null' protocol: type: string enum: [responses, chat_completions] model: $ref: '#/components/schemas/ID' effort: anyOf: - type: string maxLength: 100 - type: 'null' image_edge: anyOf: - type: integer minimum: 1 maximum: 65536 - type: 'null' account_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' account_ids: description: Accounts this profile rotates between after a limit, by id. Null when it does not rotate. Exclusive with `account_id`; with neither, a profile uses one account (its saved key, the environment key, or the provider's selected or first account) and never switches. anyOf: - type: array items: $ref: '#/components/schemas/ID' minItems: 1 maxItems: 50 - type: 'null' project: anyOf: - type: string maxLength: 256 - type: 'null' location: anyOf: - type: string maxLength: 256 - type: 'null' has_key: type: boolean required: [extension, endpoint, protocol, model, effort, image_edge, account_id, account_ids, project, location, has_key] additionalProperties: false ProviderProfilePatch: type: object properties: extension: $ref: '#/components/schemas/ID' api: type: string enum: [messages, converse] description: Bedrock API mode. Omission preserves an existing value; new and legacy profiles without a value use messages; converse selects streaming Converse. endpoint: anyOf: - type: string format: uri maxLength: 4096 - type: 'null' protocol: type: string enum: [responses, chat_completions] model: $ref: '#/components/schemas/ID' effort: anyOf: - type: string maxLength: 100 - type: 'null' image_edge: anyOf: - type: integer minimum: 1 maximum: 65536 - type: 'null' account_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' account_ids: description: Accounts this profile rotates between after a limit, by id. Null when it does not rotate. Exclusive with `account_id`; with neither, a profile uses one account (its saved key, the environment key, or the provider's selected or first account) and never switches. anyOf: - type: array items: $ref: '#/components/schemas/ID' minItems: 1 maxItems: 50 - type: 'null' project: anyOf: - type: string maxLength: 256 - type: 'null' location: anyOf: - type: string maxLength: 256 - type: 'null' api_key: anyOf: - type: string minLength: 1 writeOnly: true maxLength: 16384 - type: 'null' description: Partial existing profile; extension and model required when creating a new map entry. additionalProperties: false ProviderSettings: type: object properties: default_profile: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' profiles: type: object additionalProperties: $ref: '#/components/schemas/ProviderProfile' required: [default_profile, profiles] additionalProperties: false ProviderSettingsPatch: type: object properties: default_profile: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' profiles: type: object additionalProperties: anyOf: - $ref: '#/components/schemas/ProviderProfilePatch' - type: 'null' renames: type: object additionalProperties: $ref: '#/components/schemas/ID' description: Existing profile names mapped to new ones, applied before profiles, which then use the new names. The saved key, default_profile and every session on the old name follow. An unknown old name is 409 unknown_profile; a new name another profile already has is 409 profile_exists. description: Removing the selected profile requires replacing or clearing default_profile in this same patch. additionalProperties: false examples: - default_profile: personal profiles: personal: extension: openai endpoint: https://provider.example/v1 protocol: responses model: example-model effort: null image_edge: null account_id: null project: null location: null api_key: synthetic-example-key ValueSource: type: object properties: source: type: string enum: [literal, env] value: type: string maxLength: 16384 description: For env, value is a daemon-host environment variable name. required: [source, value] additionalProperties: false SecretPresence: type: object properties: bearer_token: type: boolean environment: type: array items: type: string maxLength: 256 maxItems: 200 headers: type: array items: type: string maxLength: 256 maxItems: 200 required: [bearer_token, environment, headers] additionalProperties: false MCPAuth: type: object description: A server's OAuth sign-in. none until the server asks for one; needs_sign_in when it asked and albedo has no usable token, signed_in, or signed_out after the user signed out. Start a sign-in with PUT /auth/logins/{login_id} and provider mcp:<server>. Tokens and client secrets never appear. properties: state: type: string enum: [none, needs_sign_in, signed_in, signed_out] account: anyOf: - type: string maxLength: 256 - type: 'null' expires_at: anyOf: - type: string format: date-time - type: 'null' scope: anyOf: - type: string maxLength: 4096 - type: 'null' step_up: anyOf: - type: string maxLength: 4096 - type: 'null' description: The wider scope a signed-in server asked for; signing in again grants it. reason: anyOf: - type: string maxLength: 4096 - type: 'null' client: anyOf: - type: string enum: [configured, registered] - type: 'null' description: configured when the user set a client id, registered when albedo registered itself. required: [state, account, expires_at, scope, step_up, reason, client] additionalProperties: false MCPDefinition: type: object properties: enabled: type: boolean transport: type: string enum: [stdio, http] command: anyOf: - type: string maxLength: 4096 - type: 'null' arguments: type: array items: type: string maxLength: 4096 maxItems: 200 cwd: anyOf: - $ref: '#/components/schemas/Workspace' - type: 'null' url: anyOf: - type: string format: uri maxLength: 4096 - type: 'null' environment: type: object additionalProperties: $ref: '#/components/schemas/ValueSource' headers: type: object additionalProperties: $ref: '#/components/schemas/ValueSource' bearer_token_env_var: anyOf: - type: string maxLength: 256 - type: 'null' enabled_tools: anyOf: - type: array items: type: string maxLength: 256 maxItems: 1000 - type: 'null' disabled_tools: type: array items: type: string maxLength: 256 maxItems: 1000 startup_timeout_ms: type: integer minimum: 1 maximum: 300000 call_timeout_ms: type: integer minimum: 1 maximum: 3600000 secret_presence: $ref: '#/components/schemas/SecretPresence' auth: $ref: '#/components/schemas/MCPAuth' required: [enabled, transport, command, arguments, cwd, url, environment, headers, bearer_token_env_var, enabled_tools, disabled_tools, startup_timeout_ms, call_timeout_ms, secret_presence, auth] additionalProperties: false MCPSecretsPatch: type: object properties: bearer_token: anyOf: - type: string minLength: 1 writeOnly: true maxLength: 16384 - type: 'null' environment: type: object additionalProperties: anyOf: - type: string writeOnly: true maxLength: 16384 - type: 'null' headers: type: object additionalProperties: anyOf: - type: string writeOnly: true maxLength: 16384 - type: 'null' oauth: type: 'null' description: Null signs the server out of its OAuth sign-in. oauth_client: anyOf: - type: object properties: client_id: type: string minLength: 1 maxLength: 1024 client_secret: anyOf: - type: string writeOnly: true maxLength: 4096 - type: 'null' required: [client_id] additionalProperties: false - type: 'null' description: A client the user registered with the server's authorization server, used instead of registering albedo; null forgets it. writeOnly: true additionalProperties: false MCPDefinitionPatch: type: object properties: enabled: type: boolean transport: type: string enum: [stdio, http] command: anyOf: - type: string maxLength: 4096 - type: 'null' arguments: type: array items: type: string maxLength: 4096 maxItems: 200 cwd: anyOf: - $ref: '#/components/schemas/Workspace' - type: 'null' url: anyOf: - type: string format: uri maxLength: 4096 - type: 'null' environment: anyOf: - type: object additionalProperties: anyOf: - $ref: '#/components/schemas/ValueSource' - type: 'null' - type: 'null' headers: anyOf: - type: object additionalProperties: anyOf: - $ref: '#/components/schemas/ValueSource' - type: 'null' - type: 'null' bearer_token_env_var: anyOf: - type: string maxLength: 256 - type: 'null' enabled_tools: anyOf: - type: array items: type: string maxLength: 256 maxItems: 1000 - type: 'null' disabled_tools: type: array items: type: string maxLength: 256 maxItems: 1000 startup_timeout_ms: type: integer minimum: 1 maximum: 300000 call_timeout_ms: type: integer minimum: 1 maximum: 3600000 secrets: $ref: '#/components/schemas/MCPSecretsPatch' description: Partial merge patch. Public and secret sources cannot overlap. HTTP and stdio fields are validated against transport on the complete candidate. Public environment/header entries accept null removal; a null whole map clears it. Switching credential sources removes the former source in the same patch. additionalProperties: false MCPSettings: type: object properties: definitions: type: object additionalProperties: $ref: '#/components/schemas/MCPDefinition' required: [definitions] additionalProperties: false MCPSettingsPatch: type: object properties: definitions: type: object additionalProperties: anyOf: - $ref: '#/components/schemas/MCPDefinitionPatch' - type: 'null' validate_connection: type: boolean default: true writeOnly: true description: Validate candidate connections before atomic commit unless explicitly disabled. additionalProperties: false examples: - validate_connection: true definitions: example: enabled: true transport: http url: https://tools.example/mcp secrets: bearer_token: synthetic-example-token ExtensionSettings: type: object properties: defaults: type: object additionalProperties: type: boolean required: [defaults] additionalProperties: false ExtensionSettingsPatch: type: object properties: defaults: type: object additionalProperties: anyOf: - type: boolean - type: 'null' additionalProperties: false CapabilitySettings: type: object properties: preferences: type: object additionalProperties: type: boolean required: [preferences] additionalProperties: false CapabilitySettingsPatch: type: object properties: catalog_session_id: $ref: '#/components/schemas/ID' catalog_revision: $ref: '#/components/schemas/ID' choices: type: object additionalProperties: anyOf: - type: boolean - type: 'null' description: Resolve candidate IDs to stable preference keys under the observed catalog revision. required: [catalog_session_id, catalog_revision, choices] additionalProperties: false CachePrior: type: object properties: provider: $ref: '#/components/schemas/ID' model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' ttl_seconds: anyOf: - type: integer minimum: 0 maximum: 9007199254740991 - type: 'null' source: type: string maxLength: 256 required: [provider, model, ttl_seconds, source] additionalProperties: false ModelSettings: type: object properties: raised_caps: type: object additionalProperties: type: boolean compact_at: type: object additionalProperties: type: integer minimum: 1 maximum: 100000000 cache_ttl_priors: type: array items: $ref: '#/components/schemas/CachePrior' maxItems: 200 required: [raised_caps, cache_ttl_priors] additionalProperties: false ModelSettingsPatch: type: object properties: raised_caps: type: object additionalProperties: anyOf: - type: boolean - type: 'null' compact_at: type: object additionalProperties: anyOf: - type: integer minimum: 1 maximum: 100000000 - type: 'null' description: Keys are cap_key values from model metadata. For raised_caps, true raises to the advertised maximum; false uses the ordinary limit; null clears the choice. A missing choice defaults to false. For compact_at, a token count is the window every session on that model compacts against, as long as it is below the model's window; null clears it. Only raised_caps and compact_at are writable. additionalProperties: false UISettings: type: object properties: thinking: type: boolean tools: type: boolean dismissed_notices: type: array items: $ref: '#/components/schemas/ID' maxItems: 1000 web_allow: description: Networks `albedo web` serves to besides this machine, as CIDR or an address whose trailing zero octets stand for any (10.0.0.0 is 10.0.0.0/8). type: array items: type: string minLength: 1 maxLength: 64 maxItems: 64 proxy_allow: description: Networks `albedo proxy` serves to besides this machine, as CIDR or an address whose trailing zero octets stand for any (10.0.0.0 is 10.0.0.0/8). type: array items: type: string minLength: 1 maxLength: 64 maxItems: 64 required: [thinking, tools, dismissed_notices] additionalProperties: false UISettingsPatch: type: object properties: thinking: type: boolean tools: type: boolean dismissed_notices: type: array items: $ref: '#/components/schemas/ID' maxItems: 1000 web_allow: description: Networks `albedo web` serves to besides this machine, as CIDR or an address whose trailing zero octets stand for any (10.0.0.0 is 10.0.0.0/8). type: array items: type: string minLength: 1 maxLength: 64 maxItems: 64 proxy_allow: description: Networks `albedo proxy` serves to besides this machine, as CIDR or an address whose trailing zero octets stand for any (10.0.0.0 is 10.0.0.0/8). type: array items: type: string minLength: 1 maxLength: 64 maxItems: 64 additionalProperties: false DeclaredSetting: type: object properties: key: type: string minLength: 1 maxLength: 128 description: The key in the section of extensions.json. label: type: string maxLength: 128 description: type: string maxLength: 1024 kind: type: string enum: [integer, text, limit] description: integer takes a whole number from minimum to maximum; text takes a non-empty string of at most 4096 bytes; limit takes a whole number from minimum to maximum, or -1 for no limit. default: anyOf: - type: integer - type: string - type: 'null' description: What the section's owner uses while nothing is saved. Null when leaving the setting unset has a meaning of its own, which the description gives. minimum: anyOf: - type: integer - type: 'null' description: The smallest integer accepted; null for text. maximum: anyOf: - type: integer - type: 'null' description: The largest integer accepted; null for text. value: anyOf: - type: integer - type: string - type: 'null' description: The saved value, or null when nothing is saved and the default applies. A saved value of the wrong kind reads as null, and the section's problem names it. required: [key, label, description, kind, default, minimum, maximum, value] additionalProperties: false DeclaredSettingsSection: type: object properties: name: $ref: '#/components/schemas/ID' description: The section's key in extensions.json. The daemon's own sections take names no extension may have; every other section is named after the extension that declares it. label: type: string maxLength: 128 description: What the section configures, for a reader who does not know who declares it. category: type: string enum: [web_search, context, agents, models_and_caching, tools] description: The part of /config the section belongs to. web_search is what web_search asks and where; context is how a session's context is kept within its window; agents is how many agents a session may spawn and how deep; models_and_caching is the model catalog and prompt cache warming; tools is what the agent drives or reaches, such as MCP servers, remote kernels and the desktop. description: type: string maxLength: 1024 fields: type: array items: $ref: '#/components/schemas/DeclaredSetting' maxItems: 64 problem: anyOf: - type: string maxLength: 1024 - type: 'null' description: Why the section's owner cannot use its saved section, when it cannot. required: [name, label, category, description, fields, problem] additionalProperties: false DeclaredSettings: type: object properties: sections: type: array items: $ref: '#/components/schemas/DeclaredSettingsSection' maxItems: 512 description: The daemon's own sections, then the sections installed extensions declare, in registry order. required: [sections] additionalProperties: false DeclaredSettingsPatch: type: object properties: values: type: object description: Section name to declared key to value. A value replaces the saved one; null removes it so the default applies. Unknown sections, undeclared keys, values outside the declaration, and a section its owner's own check rejects are refused, and nothing is saved. additionalProperties: type: object additionalProperties: anyOf: - type: integer - type: string - type: 'null' required: [values] additionalProperties: false ProviderSettingsResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/ProviderSettings' required: [url, etag, value] additionalProperties: false MCPSettingsResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/MCPSettings' required: [url, etag, value] additionalProperties: false ExtensionSettingsResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/ExtensionSettings' required: [url, etag, value] additionalProperties: false DeclaredSettingsResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/DeclaredSettings' required: [url, etag, value] additionalProperties: false CapabilitySettingsResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/CapabilitySettings' required: [url, etag, value] additionalProperties: false ModelSettingsResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/ModelSettings' required: [url, etag, value] additionalProperties: false UISettingsResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/UISettings' required: [url, etag, value] additionalProperties: false Settings: type: object properties: providers: $ref: '#/components/schemas/ProviderSettings' mcp: $ref: '#/components/schemas/MCPSettings' extensions: $ref: '#/components/schemas/ExtensionSettings' extension_settings: $ref: '#/components/schemas/DeclaredSettings' capabilities: $ref: '#/components/schemas/CapabilitySettings' models: $ref: '#/components/schemas/ModelSettings' ui: $ref: '#/components/schemas/UISettings' group_resources: type: object properties: providers: $ref: '#/components/schemas/ResourceValidator' mcp: $ref: '#/components/schemas/ResourceValidator' extensions: $ref: '#/components/schemas/ResourceValidator' extension_settings: $ref: '#/components/schemas/ResourceValidator' capabilities: $ref: '#/components/schemas/ResourceValidator' models: $ref: '#/components/schemas/ResourceValidator' ui: $ref: '#/components/schemas/ResourceValidator' required: [providers, mcp, extensions, extension_settings, capabilities, models, ui] additionalProperties: false required: [providers, mcp, extensions, extension_settings, capabilities, models, ui, group_resources] additionalProperties: false SettingsRead: oneOf: - $ref: '#/components/schemas/Settings' - $ref: '#/components/schemas/ProviderSettings' - $ref: '#/components/schemas/MCPSettings' - $ref: '#/components/schemas/ExtensionSettings' - $ref: '#/components/schemas/DeclaredSettings' - $ref: '#/components/schemas/CapabilitySettings' - $ref: '#/components/schemas/ModelSettings' - $ref: '#/components/schemas/UISettings' SettingsPatch: anyOf: - $ref: '#/components/schemas/ProviderSettingsPatch' - $ref: '#/components/schemas/MCPSettingsPatch' - $ref: '#/components/schemas/ExtensionSettingsPatch' - $ref: '#/components/schemas/DeclaredSettingsPatch' - $ref: '#/components/schemas/CapabilitySettingsPatch' - $ref: '#/components/schemas/ModelSettingsPatch' - $ref: '#/components/schemas/UISettingsPatch' description: The group query selects the one applicable patch schema. It is an error to send fields for another group. SettingsApplication: type: object properties: desired_revision: $ref: '#/components/schemas/ID' active_service_revision: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' composition_changed: type: boolean description: Whether this save changed the desired composition, so loaded sessions need a reload to apply it. Always false for providers, extension_settings, models and ui. A concurrent save to another composition group can make it true. GET /sessions?needs_reload=true lists the sessions. validation: type: string enum: [passed, skipped, not_applicable] warnings: $ref: '#/components/schemas/Warnings' required: [desired_revision, active_service_revision, composition_changed, validation, warnings] additionalProperties: false ProviderSettingsChange: type: object properties: group: const: providers resource: $ref: '#/components/schemas/ProviderSettingsResource' application: $ref: '#/components/schemas/SettingsApplication' required: [group, resource, application] additionalProperties: false MCPSettingsChange: type: object properties: group: const: mcp resource: $ref: '#/components/schemas/MCPSettingsResource' application: $ref: '#/components/schemas/SettingsApplication' required: [group, resource, application] additionalProperties: false ExtensionSettingsChange: type: object properties: group: const: extensions resource: $ref: '#/components/schemas/ExtensionSettingsResource' application: $ref: '#/components/schemas/SettingsApplication' required: [group, resource, application] additionalProperties: false DeclaredSettingsChange: type: object properties: group: const: extension_settings resource: $ref: '#/components/schemas/DeclaredSettingsResource' application: $ref: '#/components/schemas/SettingsApplication' required: [group, resource, application] additionalProperties: false CapabilitySettingsChange: type: object properties: group: const: capabilities resource: $ref: '#/components/schemas/CapabilitySettingsResource' application: $ref: '#/components/schemas/SettingsApplication' required: [group, resource, application] additionalProperties: false ModelSettingsChange: type: object properties: group: const: models resource: $ref: '#/components/schemas/ModelSettingsResource' application: $ref: '#/components/schemas/SettingsApplication' required: [group, resource, application] additionalProperties: false UISettingsChange: type: object properties: group: const: ui resource: $ref: '#/components/schemas/UISettingsResource' application: $ref: '#/components/schemas/SettingsApplication' required: [group, resource, application] additionalProperties: false SettingsChange: oneOf: - $ref: '#/components/schemas/ProviderSettingsChange' - $ref: '#/components/schemas/MCPSettingsChange' - $ref: '#/components/schemas/ExtensionSettingsChange' - $ref: '#/components/schemas/DeclaredSettingsChange' - $ref: '#/components/schemas/CapabilitySettingsChange' - $ref: '#/components/schemas/ModelSettingsChange' - $ref: '#/components/schemas/UISettingsChange' StorageSession: type: object properties: id: $ref: '#/components/schemas/ID' title: type: string maxLength: 4096 workspace: $ref: '#/components/schemas/Workspace' created_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' activity_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' estimated_content_bytes: $ref: '#/components/schemas/Counter' required: [id, title, workspace, created_at, activity_at, estimated_content_bytes] additionalProperties: false StorageFile: type: object properties: path: type: string maxLength: 4096 category: type: string enum: [kernel, backup, other] bytes: $ref: '#/components/schemas/Counter' modified_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' cleanup_candidate: type: boolean cleanup_reason: anyOf: - type: string maxLength: 100 - type: 'null' required: [path, category, bytes, modified_at, cleanup_candidate, cleanup_reason] additionalProperties: false StorageSessionPage: type: object properties: items: type: array items: $ref: '#/components/schemas/StorageSession' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' total_count: $ref: '#/components/schemas/Counter' total_estimated_content_bytes: $ref: '#/components/schemas/Counter' required: [items, next, total_count, total_estimated_content_bytes] additionalProperties: false StorageFilePage: type: object properties: items: type: array items: $ref: '#/components/schemas/StorageFile' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' totals: type: object properties: kernel_bytes: $ref: '#/components/schemas/Counter' backup_bytes: $ref: '#/components/schemas/Counter' other_bytes: $ref: '#/components/schemas/Counter' shell_output_bytes: $ref: '#/components/schemas/Counter' recent_backup_bytes: $ref: '#/components/schemas/Counter' recent_backup_count: $ref: '#/components/schemas/Counter' required: [kernel_bytes, backup_bytes, other_bytes, shell_output_bytes, recent_backup_bytes, recent_backup_count] additionalProperties: false required: [items, next, totals] additionalProperties: false StorageReport: type: object properties: database: type: object properties: main_file_bytes: $ref: '#/components/schemas/Counter' wal_bytes: $ref: '#/components/schemas/Counter' page_size_bytes: $ref: '#/components/schemas/Counter' page_count: $ref: '#/components/schemas/Counter' free_page_count: $ref: '#/components/schemas/Counter' used_bytes: $ref: '#/components/schemas/Counter' required: [main_file_bytes, wal_bytes, page_size_bytes, page_count, free_page_count, used_bytes] additionalProperties: false sessions: $ref: '#/components/schemas/StorageSessionPage' images: type: object properties: count: $ref: '#/components/schemas/Counter' bytes: $ref: '#/components/schemas/Counter' required: [count, bytes] additionalProperties: false files: $ref: '#/components/schemas/StorageFilePage' measured_at: $ref: '#/components/schemas/Timestamp' required: [database, sessions, images, files, measured_at] additionalProperties: false examples: - database: main_file_bytes: 8192 wal_bytes: 0 page_size_bytes: 4096 page_count: 2 free_page_count: 0 used_bytes: 8192 sessions: items: [] next: null total_count: 0 total_estimated_content_bytes: 0 images: count: 0 bytes: 0 files: items: [] next: null totals: kernel_bytes: 0 backup_bytes: 0 other_bytes: 0 shell_output_bytes: 0 recent_backup_bytes: 0 recent_backup_count: 0 measured_at: '2026-10-02T14:00:00Z' SessionStatus: type: object properties: phase: type: string enum: [idle, preparing, generating, running, interrupting, compacting] run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' interrupt_requested: type: boolean blocking_reason: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [phase, run_id, interrupt_requested, blocking_reason] additionalProperties: false Preview: type: object properties: text: type: string x-max-utf8-bytes: 1024 maxLength: 256 transcript_count: $ref: '#/components/schemas/Counter' truncated: type: boolean required: [text, transcript_count, truncated] additionalProperties: false SessionPreferences: type: object properties: pinned: type: boolean pin_order: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' archived: type: boolean opens: $ref: '#/components/schemas/Counter' required: [pinned, pin_order, archived, opens] additionalProperties: false PreferencePatch: type: object properties: pinned: type: boolean archived: type: boolean pin_before: description: Moves the session among the pinned, before this pinned session, or last when null. The session must be pinned, in this patch or already. Fails with 409 `pin_target_invalid` when the target is not pinned, and 400 `pin_move_unpinned` when the session is not. Only this session is renumbered when a number is free between its new neighbours; otherwise the fewest neighbours shift in the same commit and are named in the collection stream's `invalidate` event. A shift changes their ETag, not their revision, so a change already admitted against them still commits. anyOf: - $ref: '#/components/schemas/ID' - type: 'null' additionalProperties: false ProgressPreview: type: object properties: offset_scalars: $ref: '#/components/schemas/Counter' text: type: string x-max-utf8-bytes: 2048 maxLength: 512 required: [offset_scalars, text] additionalProperties: false ToolProgress: type: object properties: call_id: $ref: '#/components/schemas/ID' tool_call_id: anyOf: - type: string minLength: 1 x-max-utf8-bytes: 200 maxLength: 200 - type: 'null' name: type: string minLength: 1 x-max-utf8-bytes: 100 maxLength: 100 phase: type: string enum: [generating, running] intent: type: string enum: [read, search, list, run, unknown] title: anyOf: - type: string minLength: 1 x-max-utf8-bytes: 400 maxLength: 160 - type: 'null' preview: $ref: '#/components/schemas/ProgressPreview' x-max-encoded-bytes: 8192 required: [call_id, tool_call_id, name, phase, intent] additionalProperties: false examples: - call_id: progress-1 tool_call_id: null name: python phase: generating intent: unknown title: "find which go files label python cells" preview: offset_scalars: 0 text: print("hello") AgentRequest: type: object properties: input_id: $ref: '#/components/schemas/ID' text: type: string maxLength: 512 required: [input_id, text] additionalProperties: false Activity: type: object properties: lines: type: array items: type: object properties: kind: type: string enum: [assistant, thinking, tool, input, note, error] text: type: string x-max-utf8-bytes: 1024 maxLength: 256 required: [kind, text] additionalProperties: false maxItems: 12 output_scalars: $ref: '#/components/schemas/Counter' output_utf8_bytes: $ref: '#/components/schemas/Counter' observed_at: $ref: '#/components/schemas/Timestamp' latest_input: anyOf: - type: object properties: input_id: $ref: '#/components/schemas/ID' source: type: string enum: [chat, agent, system] bytes: $ref: '#/components/schemas/Counter' required: [input_id, source, bytes] additionalProperties: false - type: 'null' current_request: anyOf: - $ref: '#/components/schemas/AgentRequest' - type: 'null' latest_progress: anyOf: - type: string maxLength: 512 - type: 'null' latest_answer: anyOf: - type: object properties: message_id: $ref: '#/components/schemas/ID' bytes: $ref: '#/components/schemas/Counter' required: [message_id, bytes] additionalProperties: false - type: 'null' x-max-encoded-bytes: 16384 required: [lines, output_scalars, output_utf8_bytes, observed_at, latest_input, latest_answer] additionalProperties: false SessionLocation: type: object description: Parsed workspace and daemon-resolved display label. Reading this metadata does not connect to the remote host. properties: host: anyOf: - type: string maxLength: 4096 - type: 'null' user: anyOf: - type: string maxLength: 4096 - type: 'null' path: type: string maxLength: 16384 label: anyOf: - type: string maxLength: 8192 - type: 'null' required: [host, user, path, label] additionalProperties: false SessionSummary: type: object properties: id: $ref: '#/components/schemas/ID' name: type: string maxLength: 4096 automatic_name: type: string maxLength: 4096 location: $ref: '#/components/schemas/SessionLocation' workspace: $ref: '#/components/schemas/Workspace' parent_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' root_id: $ref: '#/components/schemas/ID' role: type: string maxLength: 512 started_by: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' address: anyOf: - type: string maxLength: 512 - type: 'null' depth: type: integer minimum: 0 maximum: 1000 closed: type: boolean created_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' activity_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' provider_profile: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 100 - type: 'null' fast: type: boolean status: $ref: '#/components/schemas/SessionStatus' preview: $ref: '#/components/schemas/Preview' preferences: $ref: '#/components/schemas/SessionPreferences' current_progress: type: array items: $ref: '#/components/schemas/ToolProgress' maxItems: 32 activity: $ref: '#/components/schemas/Activity' cursor: anyOf: - $ref: '#/components/schemas/Cursor' - type: 'null' acp: description: Present only for ACP-owned sessions. Attachment state is read separately from the session capture. $ref: '#/components/schemas/ACPState' description: Session live fields and cursor are captured together. ACP attachment metadata is read separately. Extra response fields may be ignored. required: [id, name, automatic_name, workspace, location, parent_id, root_id, address, depth, closed, created_at, activity_at, role, started_by, provider_profile, model, effort, fast, status, preview, preferences, current_progress, activity, cursor] SessionPage: type: object properties: items: type: array items: $ref: '#/components/schemas/SessionSummary' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' family: type: object properties: root_id: $ref: '#/components/schemas/ID' revision: $ref: '#/components/schemas/ID' required: [root_id, revision] additionalProperties: false required: [items, next] additionalProperties: false examples: - items: - id: 01a0fcea-2b00-7000-8000-000000000001 name: New session automatic_name: New session workspace: /workspace/project location: host: null user: null path: /workspace/project label: null parent_id: null root_id: 01a0fcea-2b00-7000-8000-000000000001 address: null depth: 0 closed: false created_at: '2026-10-02T14:00:00Z' activity_at: '2026-10-02T14:00:00Z' provider_profile: personal model: example-model effort: null status: phase: idle run_id: null interrupt_requested: false blocking_reason: null preview: text: '' transcript_count: 0 truncated: false preferences: pinned: false pin_order: null archived: false opens: 0 current_progress: [] active_output: [] activity: lines: [] output_scalars: 0 output_utf8_bytes: 0 observed_at: '2026-10-02T14:00:00Z' latest_input: null latest_answer: null cursor: generation: J6kYj6IGcXyP3eMIp-WL3A sequence: 0 next: null SelectionOverrides: type: object properties: extensions: type: object additionalProperties: anyOf: - type: boolean - type: 'null' skills: type: object additionalProperties: anyOf: - type: boolean - type: 'null' instructions: type: object additionalProperties: anyOf: - type: boolean - type: 'null' mcp: type: object additionalProperties: anyOf: - type: boolean - type: 'null' required: [extensions, skills, instructions, mcp] additionalProperties: false SelectionPatch: type: object properties: extensions: anyOf: - type: object additionalProperties: anyOf: - type: boolean - type: 'null' - type: 'null' skills: anyOf: - type: object additionalProperties: anyOf: - type: boolean - type: 'null' - type: 'null' instructions: anyOf: - type: object additionalProperties: anyOf: - type: boolean - type: 'null' - type: 'null' mcp: anyOf: - type: object additionalProperties: anyOf: - type: boolean - type: 'null' - type: 'null' description: Null map entry clears that override. Null entire map clears all overrides of that kind. additionalProperties: false SessionSelection: type: object properties: overrides: $ref: '#/components/schemas/SelectionOverrides' effective: type: object properties: extensions: type: object additionalProperties: type: boolean skills: type: object additionalProperties: type: boolean instructions: type: object additionalProperties: type: boolean mcp: type: object additionalProperties: type: boolean required: [extensions, skills, instructions, mcp] additionalProperties: false required: [overrides, effective] additionalProperties: false FastMode: type: object properties: fast: type: boolean support: type: object properties: status: type: string enum: [supported, unsupported, unknown] mode: type: [string, 'null'] source: type: [string, 'null'] detail: type: [string, 'null'] required: [status] additionalProperties: false message: type: string required: [fast, support, message] additionalProperties: false SessionConfiguration: type: object properties: id: $ref: '#/components/schemas/ID' name: description: Explicit name. Null shows the automatic title for a root, or the family name for a child; the session representation carries the displayed name. anyOf: - type: string maxLength: 4096 - type: 'null' workspace: $ref: '#/components/schemas/Workspace' provider_profile: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 100 - type: 'null' fast: type: boolean description: Provider fast-mode setting; defaults off and may affect billing. context_window: description: Tokens this session compacts against instead of the model's catalogued window. Null uses the model's window. anyOf: - type: integer minimum: 1 maximum: 100000000 - type: 'null' preferences: type: object properties: pinned: type: boolean pin_order: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' archived: type: boolean required: [pinned, pin_order, archived] additionalProperties: false selection: $ref: '#/components/schemas/SelectionOverrides' revision: $ref: '#/components/schemas/ID' required: [id, name, workspace, provider_profile, model, effort, fast, preferences, selection, revision] additionalProperties: false examples: - id: 01a0fcea-2b00-7000-8000-000000000001 name: null workspace: /workspace/project provider_profile: personal model: example-model effort: null fast: false preferences: pinned: false pin_order: null archived: false selection: extensions: {} skills: {} instructions: {} mcp: {} revision: config-1 SessionConfigurationResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/SessionConfiguration' required: [url, etag, value] additionalProperties: false SessionPatch: type: object properties: name: anyOf: - type: string maxLength: 4096 - type: 'null' provider_profile: $ref: '#/components/schemas/ID' model: $ref: '#/components/schemas/ID' effort: anyOf: - type: string maxLength: 100 - type: 'null' fast: type: boolean description: Enable provider fast mode; enabling requires a supported capability and may affect billing. context_window: description: Tokens this session compacts against instead of the model's catalogued window. Null uses the model's window. anyOf: - type: integer minimum: 1 maximum: 100000000 - type: 'null' preferences: $ref: '#/components/schemas/PreferencePatch' selection: $ref: '#/components/schemas/SelectionPatch' catalog_revision: $ref: '#/components/schemas/ID' description: Skill and instruction changes require catalog_revision. All fields validate and commit together. additionalProperties: false examples: - selection: extensions: browser: null skills: candidate-1: false catalog_revision: discovery-1 WorkspaceMoveRequest: type: object properties: workspace: $ref: '#/components/schemas/Workspace' family_revision: $ref: '#/components/schemas/ID' required: [workspace, family_revision] additionalProperties: false examples: - workspace: /workspace/other-project family_revision: family-1 SessionChangeRequest: oneOf: - $ref: '#/components/schemas/SessionPatch' - $ref: '#/components/schemas/WorkspaceMoveRequest' NewSessionRequest: type: object properties: kind: const: new workspace: $ref: '#/components/schemas/Workspace' name: anyOf: - type: string maxLength: 4096 - type: 'null' provider_profile: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 100 - type: 'null' context_window: description: Tokens this session compacts against instead of the model's catalogued window. Null uses the model's window. anyOf: - type: integer minimum: 1 maximum: 100000000 - type: 'null' required: [kind, workspace] additionalProperties: false examples: - kind: new workspace: /workspace/project NewSessionIntent: type: object properties: kind: const: new workspace: $ref: '#/components/schemas/Workspace' name: anyOf: - type: string maxLength: 4096 - type: 'null' provider_profile: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 100 - type: 'null' context_window: description: Tokens this session compacts against instead of the model's catalogued window. Null uses the model's window. anyOf: - type: integer minimum: 1 maximum: 100000000 - type: 'null' required: [kind, workspace, name, provider_profile, model, effort] additionalProperties: false ForkSessionRequest: type: object properties: kind: const: fork source_session_id: $ref: '#/components/schemas/ID' checkpoint_id: $ref: '#/components/schemas/ID' name: anyOf: - type: string maxLength: 4096 - type: 'null' required: [kind, source_session_id, checkpoint_id] additionalProperties: false ForkSessionIntent: type: object properties: kind: const: fork source_session_id: $ref: '#/components/schemas/ID' checkpoint_id: $ref: '#/components/schemas/ID' name: anyOf: - type: string maxLength: 4096 - type: 'null' required: [kind, source_session_id, checkpoint_id, name] additionalProperties: false ChildSessionRequest: type: object properties: kind: const: child parent_id: $ref: '#/components/schemas/ID' address: type: string minLength: 1 maxLength: 512 name: type: string minLength: 1 maxLength: 4096 initial_input_id: $ref: '#/components/schemas/UUIDv7' task: type: string minLength: 1 maxLength: 32768 model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 100 - type: 'null' required: [kind, parent_id, address, name, initial_input_id, task] additionalProperties: false ChildSessionIntent: type: object properties: kind: const: child parent_id: $ref: '#/components/schemas/ID' address: type: string minLength: 1 maxLength: 512 name: type: string minLength: 1 maxLength: 4096 initial_input_id: $ref: '#/components/schemas/UUIDv7' task: type: string minLength: 1 maxLength: 32768 model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 100 - type: 'null' required: [kind, parent_id, address, name, initial_input_id, task, model, effort] additionalProperties: false SessionCreationRequest: oneOf: - $ref: '#/components/schemas/NewSessionRequest' - $ref: '#/components/schemas/ForkSessionRequest' - $ref: '#/components/schemas/ChildSessionRequest' - $ref: '#/components/schemas/ACPSessionRequest' Creation: type: object properties: submitted: oneOf: - $ref: '#/components/schemas/NewSessionIntent' - $ref: '#/components/schemas/ForkSessionIntent' - $ref: '#/components/schemas/ChildSessionIntent' - $ref: '#/components/schemas/ACPSessionIntent' resolved: type: object properties: workspace: $ref: '#/components/schemas/Workspace' provider_profile: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 100 - type: 'null' required: [workspace, provider_profile, model, effort] additionalProperties: false required: [submitted, resolved] additionalProperties: false CreationDecision: type: object properties: kind: const: creation session_id: $ref: '#/components/schemas/ID' admission: type: string enum: [accepted, rejected] http_status: type: integer minimum: 200 maximum: 599 creation: anyOf: - $ref: '#/components/schemas/Creation' - type: 'null' decided_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' deleted_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' required: [kind, session_id, admission, http_status, creation, decided_at, deleted_at] additionalProperties: false WorkspaceChange: type: object properties: desired: $ref: '#/components/schemas/Workspace' active: $ref: '#/components/schemas/Workspace' state: type: string enum: [deferred, applying] revision: $ref: '#/components/schemas/ID' required: [desired, active, state, revision] additionalProperties: false QuarantineDiagnostic: type: object properties: id: $ref: '#/components/schemas/ID' reason: $ref: '#/components/schemas/SafeReason' required: [id, reason] additionalProperties: false Composition: type: object properties: desired_revision: $ref: '#/components/schemas/ID' loaded_revision: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' needs_reload: type: boolean dependencies: type: object additionalProperties: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 quarantine: type: array items: $ref: '#/components/schemas/QuarantineDiagnostic' maxItems: 200 availability: type: object additionalProperties: type: boolean required: [desired_revision, loaded_revision, needs_reload, dependencies, quarantine, availability] additionalProperties: false JobCollection: type: object properties: items: type: array items: $ref: '#/components/schemas/KernelJob' maxItems: 100 live_job_count: $ref: '#/components/schemas/Counter' page: $ref: '#/components/schemas/PageDescriptor' required: [items, live_job_count, page] additionalProperties: false examples: - items: [] live_job_count: 0 page: title: jobs empty_state: no background jobs running rows: [] glance: null actions: [] summary: 0 background jobs running JobRecord: type: object properties: id: $ref: '#/components/schemas/ID' command: type: string maxLength: 4096 state: type: string enum: [running, exited] exit_code: anyOf: - type: integer - type: 'null' timed_out: type: boolean service: type: boolean description: Started to keep running, so nothing waits on its end. started_at: $ref: '#/components/schemas/Counter' description: Wall-clock milliseconds since the epoch. ended_at: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' bytes: $ref: '#/components/schemas/Counter' description: Everything the job has written, kept or not. required: [id, command, state, exit_code, timed_out, service, started_at, ended_at, bytes] additionalProperties: false JobRecordCollection: type: object properties: items: type: array items: $ref: '#/components/schemas/JobRecord' maxItems: 100 required: [items] additionalProperties: false JobOutputPage: type: object properties: job: $ref: '#/components/schemas/JobRecord' offset: $ref: '#/components/schemas/Counter' description: Byte the page starts at. next_offset: $ref: '#/components/schemas/Counter' description: Byte to continue from; equal to `offset` when there is nothing more yet. text: type: string maxLength: 65536 required: [job, offset, next_offset, text] additionalProperties: false JobStop: type: object properties: stopped: $ref: '#/components/schemas/ID' required: [stopped] additionalProperties: false examples: - stopped: job-1 KernelJob: type: object properties: id: $ref: '#/components/schemas/ID' pid: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' command: type: string maxLength: 4096 started_at: $ref: '#/components/schemas/Counter' description: Wall-clock milliseconds since the epoch when the owner recorded the job. Zero when unknown, which clients treat as settled work. required: [id, pid, command, started_at] additionalProperties: false Kernel: type: object properties: state: type: string enum: [none, booting, attached, reattaching, busy, lost] stage: anyOf: - type: string enum: [staging, starting] - type: 'null' build: anyOf: - type: string maxLength: 512 - type: 'null' stale: type: boolean staleness_reasons: type: array items: $ref: '#/components/schemas/SafeReason' maxItems: 100 running_jobs: description: Up to 100 observed live jobs, ordered by ID. Null when the kernel owner is unavailable. The count may exceed this list. anyOf: - type: array items: $ref: '#/components/schemas/KernelJob' maxItems: 100 - type: 'null' live_job_count: description: Observed owned jobs. Null while booting or when the kernel owner is lost. anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' instance_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' required: [state, stage, build, stale, staleness_reasons, live_job_count, running_jobs, instance_id] additionalProperties: false Usage: type: object properties: model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' observed_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' prompt_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' cached_prompt_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' cache_write_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' completion_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' total_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' elapsed_ms: anyOf: - type: number minimum: 0 - type: 'null' tokens_per_second: anyOf: - type: number minimum: 0 - type: 'null' context_window_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' cache_ttl_seconds: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' cache_miss_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' cache_drift_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' cache_fade: type: array items: type: object properties: at: $ref: '#/components/schemas/Timestamp' cached_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' required: [at, cached_tokens] additionalProperties: false maxItems: 200 required: [model, observed_at, prompt_tokens, cached_prompt_tokens, cache_write_tokens, completion_tokens, total_tokens, elapsed_ms, tokens_per_second, context_window_tokens, cache_ttl_seconds, cache_fade] additionalProperties: false PendingInput: type: object properties: id: $ref: '#/components/schemas/ID' kind: type: string enum: [message, continue, skill, command] preview: $ref: '#/components/schemas/Preview' accepted_at: $ref: '#/components/schemas/Timestamp' acceptance_order: $ref: '#/components/schemas/Counter' delivery: const: pending blocking_reason: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [id, kind, preview, accepted_at, acceptance_order, delivery, blocking_reason] additionalProperties: false Glance: type: object properties: extension: $ref: '#/components/schemas/ID' title: type: string maxLength: 256 rows: type: array items: $ref: '#/components/schemas/PageRow' maxItems: 12 url: $ref: '#/components/schemas/ResourceURL' data: $ref: '#/components/schemas/DynamicJSON' x-max-encoded-bytes: 8192 required: [extension, title, rows, url] additionalProperties: false Session: allOf: - $ref: '#/components/schemas/SessionSummary' - type: object properties: creation: description: Null only for stored sessions that predate immutable creation provenance. All newly admitted creations have provenance. anyOf: - $ref: '#/components/schemas/Creation' - type: 'null' revision: $ref: '#/components/schemas/ID' family_revision: $ref: '#/components/schemas/ID' configuration_resource: $ref: '#/components/schemas/SessionConfigurationResource' workspace_change: anyOf: - $ref: '#/components/schemas/WorkspaceChange' - type: 'null' selection: $ref: '#/components/schemas/SessionSelection' composition: $ref: '#/components/schemas/Composition' kernel: $ref: '#/components/schemas/Kernel' shell_commands: type: array items: $ref: '#/components/schemas/ShellCommand' maxItems: 32 pending_inputs: type: array items: $ref: '#/components/schemas/PendingInput' maxItems: 32 input_order: $ref: '#/components/schemas/Counter' usage: $ref: '#/components/schemas/Usage' active_output: type: array items: $ref: '#/components/schemas/ActiveOutput' maxItems: 256 history: $ref: '#/components/schemas/HistoryPage' glances: type: array items: $ref: '#/components/schemas/Glance' maxItems: 16 required: [creation, revision, family_revision, configuration_resource, workspace_change, selection, composition, kernel, pending_inputs, input_order, usage, history, glances, active_output, shell_commands] unevaluatedProperties: false x-max-encoded-bytes: 1048576 examples: - id: 01a0fcea-2b00-7000-8000-000000000001 name: New session automatic_name: New session workspace: /workspace/project location: host: null user: null path: /workspace/project label: null parent_id: null root_id: 01a0fcea-2b00-7000-8000-000000000001 address: null depth: 0 closed: false created_at: '2026-10-02T14:00:00Z' activity_at: '2026-10-02T14:00:00Z' provider_profile: personal model: example-model effort: null status: phase: idle run_id: null interrupt_requested: false blocking_reason: null preview: text: '' transcript_count: 0 truncated: false preferences: pinned: false pin_order: null archived: false opens: 0 current_progress: [] active_output: [] shell_commands: [] activity: lines: [] output_scalars: 0 output_utf8_bytes: 0 observed_at: '2026-10-02T14:00:00Z' latest_input: null latest_answer: null cursor: generation: J6kYj6IGcXyP3eMIp-WL3A sequence: 0 creation: submitted: kind: new workspace: /workspace/project name: null provider_profile: null model: null effort: null resolved: workspace: /workspace/project provider_profile: personal model: example-model effort: null revision: config-1 family_revision: family-1 configuration_resource: url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration etag: '"session-config-1"' value: id: 01a0fcea-2b00-7000-8000-000000000001 name: New session workspace: /workspace/project provider_profile: personal model: example-model effort: null preferences: pinned: false pin_order: null archived: false selection: extensions: {} skills: {} instructions: {} mcp: {} revision: config-1 workspace_change: null selection: overrides: extensions: {} skills: {} instructions: {} mcp: {} effective: extensions: {} skills: {} instructions: {} mcp: {} composition: desired_revision: composition-1 loaded_revision: null needs_reload: true dependencies: {} quarantine: [] availability: {} kernel: instance_id: null state: none stage: null build: null stale: false staleness_reasons: [] live_job_count: 0 running_jobs: [] pending_inputs: [] input_order: 0 usage: model: null observed_at: null prompt_tokens: null cached_prompt_tokens: null cache_write_tokens: null completion_tokens: null total_tokens: null elapsed_ms: null tokens_per_second: null context_window_tokens: null cache_ttl_seconds: null cache_fade: [] history: items: [] older: null newer: null high_water: 0 glances: [] SessionRead: oneOf: - $ref: '#/components/schemas/Session' - $ref: '#/components/schemas/SessionConfiguration' - $ref: '#/components/schemas/SessionStatusRead' SessionStatusRead: type: object properties: id: $ref: '#/components/schemas/ID' cursor: $ref: '#/components/schemas/Cursor' status: $ref: '#/components/schemas/SessionStatus' kernel: $ref: '#/components/schemas/Kernel' usage: $ref: '#/components/schemas/Usage' glances: type: array items: $ref: '#/components/schemas/Glance' maxItems: 16 description: The live facts a watching client keeps current, read from the session's own memory and its kernel, with no configuration, history, or composition read. Kernel job changes and glance changes also arrive on the session stream, so this is a safety read rather than the cadence. required: [id, cursor, status, kernel, usage, glances] additionalProperties: false SessionChange: type: object properties: resource: $ref: '#/components/schemas/SessionConfigurationResource' session: $ref: '#/components/schemas/Session' move: anyOf: - type: object properties: applied_count: $ref: '#/components/schemas/Counter' deferred_count: $ref: '#/components/schemas/Counter' applied_ids: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 deferred_ids: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 truncated: type: boolean warnings: $ref: '#/components/schemas/Warnings' required: [applied_count, deferred_count, applied_ids, deferred_ids, truncated, warnings] additionalProperties: false - type: 'null' required: [resource, session, move] additionalProperties: false Visit: type: object properties: visit_id: $ref: '#/components/schemas/ID' session_id: $ref: '#/components/schemas/ID' opens: $ref: '#/components/schemas/Counter' required: [visit_id, session_id, opens] additionalProperties: false SessionDeletion: type: object properties: state: type: string enum: [complete, partial] deleted_count: $ref: '#/components/schemas/Counter' remaining_count: $ref: '#/components/schemas/Counter' deleted_ids: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 remaining: type: array items: type: object properties: id: $ref: '#/components/schemas/ID' reason: $ref: '#/components/schemas/SafeReason' required: [id, reason] additionalProperties: false maxItems: 200 truncated: type: boolean description: Counts cover the complete captured operation. ID lists are bounded summaries, never false completion. Refresh the authoritative family or known tombstones if truncated; deletion is never repeated to page a result. required: [state, deleted_count, remaining_count, deleted_ids, remaining, truncated] additionalProperties: false AttachmentToken: type: string pattern: ^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$ description: 32 random bytes, canonical unpadded base64url (the last character carries no stray bits). ACPMCPServer: type: object description: Editor-supplied stdio MCP server. command is an absolute executable run without a shell in the session workspace; env values are literal secrets held only in daemon memory. properties: name: type: string pattern: ^[A-Za-z0-9_-]{1,64}$ command: type: string minLength: 1 maxLength: 4096 args: type: array items: type: string maxLength: 32768 maxItems: 256 env: type: array description: Names must be unique; duplicates are rejected. items: $ref: '#/components/schemas/ACPEnvVariable' maxItems: 128 required: [name, command, args, env] additionalProperties: false ACPEnvVariable: type: object properties: name: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]{0,127}$ value: type: string maxLength: 32768 required: [name, value] additionalProperties: false ACPMCPServerIdentity: type: object description: Durable stand-in for an overlay server. The fingerprint is a keyed digest of command, args and env; literal values are never stored. properties: name: type: string pattern: ^[A-Za-z0-9_-]{1,64}$ fingerprint: type: string pattern: ^[A-Za-z0-9_-]{43}$ required: [name, fingerprint] additionalProperties: false ACPSessionRequest: type: object properties: kind: const: acp workspace: $ref: '#/components/schemas/Workspace' mcp_servers: type: array items: $ref: '#/components/schemas/ACPMCPServer' maxItems: 32 required: [kind, workspace, mcp_servers] additionalProperties: false description: Creates an ACP-owned session. The overlay is prepared strictly before the creation decision commits (any server failure rejects the creation with 409 mcp_overlay_failed); the durable ACP marker, the initial attachment for the Albedo-Attachment-Token header and the overlay are installed before the first session preparation. Resending the identical request under the same session ID is the recovery path; see robot-docs/acp.md. ACPSessionIntent: type: object properties: kind: const: acp workspace: $ref: '#/components/schemas/Workspace' mcp_servers: type: array items: $ref: '#/components/schemas/ACPMCPServerIdentity' maxItems: 32 required: [kind, workspace, mcp_servers] additionalProperties: false ACPState: type: object description: Present on ACP-owned sessions. Other clients may read, stop and delete them but not submit input or change execution. properties: attachment: type: string enum: [attached, detached] required: [attachment] additionalProperties: false ACPAttachRequest: type: object properties: workspace: $ref: '#/components/schemas/Workspace' mcp_servers: type: array items: $ref: '#/components/schemas/ACPMCPServer' maxItems: 32 required: [workspace, mcp_servers] additionalProperties: false ACPLease: type: object properties: heartbeat_ms: type: integer minimum: 1 lease_ms: type: integer minimum: 1 required: [heartbeat_ms, lease_ms] additionalProperties: false ACPActiveTurn: type: object properties: turn_id: $ref: '#/components/schemas/ID' acp_input_id: description: The exclusive acp_prompt input of this turn, which session/cancel targets. Null for a turn started by system work (mail, schedule), which stays observable and busy but is never interrupted by the adapter. anyOf: - $ref: '#/components/schemas/ID' - type: 'null' required: [turn_id, acp_input_id] additionalProperties: false ACPAttachment: type: object properties: session_id: $ref: '#/components/schemas/ID' lease: $ref: '#/components/schemas/ACPLease' cursor: $ref: '#/components/schemas/Cursor' active_turn: anyOf: - $ref: '#/components/schemas/ACPActiveTurn' - type: 'null' pending_input_ids: type: array description: Accepted ACP inputs not yet consumed, in acceptance order. items: $ref: '#/components/schemas/ID' maxItems: 32 output_boundaries: type: array description: For every unfinished live text or thinking message at the cursor, how much had streamed before it. Reconciliation only; the client never emits this content. Installing this capture stands in for the initial snapshot reset of a fresh stream. items: $ref: '#/components/schemas/ACPOutputBoundary' maxItems: 256 history_cutoff: $ref: '#/components/schemas/Counter' description: Position of the newest durable history entry at the same capture as cursor and output_boundaries (0 when there is none). Entries at or before it are history; everything later arrives on the stream after cursor. required: [session_id, lease, cursor, active_turn, pending_input_ids, output_boundaries, history_cutoff] additionalProperties: false ACPOutputBoundary: type: object properties: live_id: $ref: '#/components/schemas/ID' utf8_bytes: type: integer minimum: 0 required: [live_id, utf8_bytes] additionalProperties: false ACPTextBlock: type: object properties: type: const: text text: type: string maxLength: 1048576 annotations: $ref: '#/components/schemas/DynamicJSON' meta: $ref: '#/components/schemas/DynamicJSON' required: [type, text] additionalProperties: false ACPResourceLinkBlock: type: object properties: type: const: resource_link uri: type: string minLength: 1 maxLength: 8192 name: type: string maxLength: 4096 title: anyOf: - type: string maxLength: 4096 - type: 'null' description: anyOf: - type: string maxLength: 16384 - type: 'null' mime_type: anyOf: - type: string maxLength: 256 - type: 'null' size: anyOf: - type: integer minimum: 0 - type: 'null' annotations: $ref: '#/components/schemas/DynamicJSON' meta: $ref: '#/components/schemas/DynamicJSON' required: [type, uri, name] additionalProperties: false ACPPromptBlock: oneOf: - $ref: '#/components/schemas/ACPTextBlock' - $ref: '#/components/schemas/ACPResourceLinkBlock' ACPPromptInputRequest: type: object properties: kind: const: acp_prompt blocks: type: array items: $ref: '#/components/schemas/ACPPromptBlock' minItems: 1 maxItems: 256 required: [kind, blocks] additionalProperties: false description: Only for ACP sessions, with the attachment token. Forms its own logical turn; no other input joins it and it joins no other turn. Blocks keep their order, metadata and original URIs. ImageUpload: type: object properties: mime_type: type: string enum: [image/png, image/jpeg, image/gif, image/webp] data: type: string contentEncoding: base64 description: Strict base64; decoded dimensions and provider constraints are validated before admission. required: [mime_type, data] additionalProperties: false MessageInputRequest: type: object properties: kind: const: message text: type: string maxLength: 1048576 images: type: array description: Attached in order; the text's numbered image markers say where each was attached. items: $ref: '#/components/schemas/ImageUpload' maxItems: 10 pastes: type: array description: Pasted text the text marks by number; a long one is saved to a file the model reads. items: type: string maxItems: 20 client_id: type: string maxLength: 512 required: [kind, text] additionalProperties: false anyOf: - properties: text: pattern: \S - required: [images] properties: images: minItems: 1 examples: - kind: message text: Fix the parser. client_id: draft-1 ContinueInputRequest: type: object properties: kind: const: continue client_id: type: string maxLength: 512 required: [kind] additionalProperties: false SkillInputRequest: type: object properties: kind: const: skill candidate_id: $ref: '#/components/schemas/ID' catalog_revision: $ref: '#/components/schemas/ID' arguments: type: string maxLength: 1048576 client_id: type: string maxLength: 512 required: [kind, candidate_id, catalog_revision, arguments] additionalProperties: false CommandInputRequest: type: object properties: kind: const: command command_id: $ref: '#/components/schemas/ID' arguments: $ref: '#/components/schemas/DynamicJSON' client_id: type: string maxLength: 512 required: [kind, command_id, arguments] additionalProperties: false InputRequest: oneOf: - $ref: '#/components/schemas/MessageInputRequest' - $ref: '#/components/schemas/ContinueInputRequest' - $ref: '#/components/schemas/SkillInputRequest' - $ref: '#/components/schemas/CommandInputRequest' - $ref: '#/components/schemas/ACPPromptInputRequest' x-max-encoded-bytes: 72200000 Turn: type: object properties: id: $ref: '#/components/schemas/ID' state: type: string enum: [running, completed, interrupted, failed, abandoned] started_at: $ref: '#/components/schemas/Timestamp' ended_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' outcome: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [id, state, started_at, ended_at, outcome] additionalProperties: false Input: type: object properties: id: $ref: '#/components/schemas/ID' session_id: $ref: '#/components/schemas/ID' kind: type: string enum: [message, continue, skill, command, acp_prompt] admission: type: string enum: [accepted, rejected] http_status: type: integer minimum: 200 maximum: 599 problem: anyOf: - $ref: '#/components/schemas/AdmissionProblem' - type: 'null' accepted_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' acceptance_order: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' delivery: anyOf: - type: string enum: [pending, committed, cancelled] - type: 'null' blocking_reason: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' transcript_position: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' turn: anyOf: - $ref: '#/components/schemas/Turn' - type: 'null' client_id: anyOf: - type: string maxLength: 512 - type: 'null' required: [id, session_id, kind, admission, http_status, problem, accepted_at, acceptance_order, delivery, blocking_reason, transcript_position, turn, client_id] additionalProperties: false allOf: - if: properties: admission: const: rejected then: properties: delivery: type: 'null' accepted_at: type: 'null' acceptance_order: type: 'null' turn: type: 'null' http_status: type: integer minimum: 400 maximum: 599 problem: $ref: '#/components/schemas/AdmissionProblem' else: properties: delivery: type: string enum: [pending, committed, cancelled] accepted_at: $ref: '#/components/schemas/Timestamp' acceptance_order: type: integer minimum: 1 maximum: 9007199254740991 http_status: const: 202 problem: type: 'null' examples: - id: 01a0fcea-2b00-7000-8000-000000000002 session_id: 01a0fcea-2b00-7000-8000-000000000001 kind: message admission: accepted http_status: 202 problem: null accepted_at: '2026-10-02T14:00:00Z' acceptance_order: 1 delivery: pending blocking_reason: null transcript_position: null turn: null client_id: draft-1 InputDecision: type: object properties: kind: const: input input: $ref: '#/components/schemas/Input' required: [kind, input] additionalProperties: false InputCancellation: type: object properties: input: $ref: '#/components/schemas/Input' result: type: string enum: [cancelled, interrupt_requested, shared_running, not_pending] required: [input, result] additionalProperties: false InterruptRequest: type: object properties: run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' through_input_order: $ref: '#/components/schemas/Counter' required: [run_id, through_input_order] additionalProperties: false Interruption: type: object properties: run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' state: type: string enum: [requested, already_ended] cancelled_input_ids: type: array items: $ref: '#/components/schemas/ID' maxItems: 32 warnings: $ref: '#/components/schemas/Warnings' required: [run_id, state, cancelled_input_ids, warnings] additionalProperties: false ArtifactID: type: string pattern: ^[a-z0-9]{12}$ Artifact: type: object properties: id: $ref: '#/components/schemas/ArtifactID' key: type: string pattern: ^[0-9a-f]{32}$ description: The capability that serves its pages, `/frame/{id}.{key}/{version}/{path}`. title: type: string maxLength: 1000 version: type: integer minimum: 1 versions: type: integer minimum: 1 entry: type: string maxLength: 512 session_id: $ref: '#/components/schemas/ID' session_name: type: [string, 'null'] maxLength: 1000 session_deleted: type: boolean workspace: type: string maxLength: 4096 created_at: $ref: '#/components/schemas/Counter' updated_at: $ref: '#/components/schemas/Counter' bytes: $ref: '#/components/schemas/Counter' required: [id, key, title, version, versions, entry, session_id, session_name, session_deleted, workspace, created_at, updated_at, bytes] additionalProperties: false ArtifactPage: type: object properties: items: type: array items: $ref: '#/components/schemas/Artifact' maxItems: 200 next: type: [string, 'null'] maxLength: 4096 required: [items, next] additionalProperties: false ArtifactFile: type: object properties: path: type: string maxLength: 512 size: $ref: '#/components/schemas/Counter' required: [path, size] additionalProperties: false ArtifactVersion: type: object properties: version: type: integer minimum: 1 entry: type: string maxLength: 512 created_at: $ref: '#/components/schemas/Counter' cell_id: type: [string, 'null'] maxLength: 1000 files: type: array items: $ref: '#/components/schemas/ArtifactFile' maxItems: 2000 bytes: $ref: '#/components/schemas/Counter' required: [version, entry, created_at, cell_id, files, bytes] additionalProperties: false ArtifactDetail: allOf: - $ref: '#/components/schemas/Artifact' - type: object properties: history: type: array description: Every version, newest first. items: $ref: '#/components/schemas/ArtifactVersion' required: [history] ArtifactState: type: object description: The page's localStorage. additionalProperties: type: string ArtifactError: type: object properties: message: type: string maxLength: 4000 source: type: string maxLength: 2000 line: type: integer minimum: 0 column: type: integer minimum: 0 stack: type: string maxLength: 8000 required: [message] additionalProperties: false ToolActivity: type: object properties: kind: type: string enum: [read, search, list, run, web, display, mcp, cua, artifact, skill] target: type: string maxLength: 1000 detail: type: string maxLength: 16000 description: What the person watching sees of the result, as markdown; a web search's answer and sources, or displayed content. ms: type: integer minimum: 0 description: How long the call took, when it ended while its cell's trace was open. ok: type: boolean description: Whether the call worked, when it ended while its cell's trace was open. artifact: type: object description: The artifact version an `artifact` activity made; its title is the target. properties: id: $ref: '#/components/schemas/ArtifactID' version: type: integer minimum: 1 required: [id, version] additionalProperties: false skill: type: object description: Where the skill a `skill` activity loaded was found; its name is the target. A cell notes each skill once, when it reads the skill's SKILL.md from the start or runs its command. properties: scope: $ref: '#/components/schemas/SkillScope' source: type: string maxLength: 1000 description: The installed SKILL.md path. required: [scope, source] additionalProperties: false required: [kind, target] additionalProperties: false SkillScope: type: string description: The discovery root a skill came from. Empty for a user activation recorded before scopes were. enum: [workspace, user, built-in, ''] SkillLoad: type: object description: A skill a user's slash activation loaded, as the `skill` JSON part of that user entry. properties: name: type: string scope: $ref: '#/components/schemas/SkillScope' source: type: string description: The installed SKILL.md path. required: [name, scope, source] additionalProperties: false SkillLoadSummary: type: object description: One skill a session loaded, by the model or the user, with how often and when. properties: name: type: string scope: $ref: '#/components/schemas/SkillScope' source: type: string description: The installed SKILL.md path the newest load used. count: type: integer minimum: 1 first_loaded_at: type: integer description: Unix seconds. last_loaded_at: type: integer description: Unix seconds. required: [name, scope, source, count, first_loaded_at, last_loaded_at] additionalProperties: false SkillLoadList: type: object properties: items: type: array maxItems: 256 description: First loaded first. items: $ref: '#/components/schemas/SkillLoadSummary' required: [items] additionalProperties: false FileDiff: type: object properties: path: type: string maxLength: 1000 kind: const: diff diff: type: string maxLength: 16000 added: $ref: '#/components/schemas/Counter' removed: $ref: '#/components/schemas/Counter' old_text: description: The whole file before the change, null when the change created it. Present together with new_text only when both fit the trace's snapshot budget. anyOf: - type: string maxLength: 131072 - type: 'null' new_text: type: string maxLength: 131072 description: The whole file after the change. required: [path, kind, diff, added, removed] additionalProperties: false FileUnavailable: type: object properties: path: type: string maxLength: 1000 kind: const: unavailable reason: type: string maxLength: 1000 required: [path, kind, reason] additionalProperties: false ToolTrace: type: object properties: activities: type: array items: $ref: '#/components/schemas/ToolActivity' maxItems: 64 changes: type: array items: oneOf: - $ref: '#/components/schemas/FileDiff' - $ref: '#/components/schemas/FileUnavailable' maxItems: 16 truncated: type: boolean calls: type: array description: The session bindings the cell's code calls (`files.find`, `run`), sorted. Absent for a cell replayed from inside another. items: type: string maxLength: 1000 maxItems: 64 required: [activities, changes, truncated] additionalProperties: false ActiveOutput: type: object properties: message_id: $ref: '#/components/schemas/ID' run_id: $ref: '#/components/schemas/ID' kind: type: string enum: [text, thinking] bytes: $ref: '#/components/schemas/Counter' elapsed_ms: type: [integer, 'null'] minimum: 0 text: type: [string, 'null'] reference: anyOf: - $ref: '#/components/schemas/ContentReference' - type: 'null' required: [message_id, run_id, kind, bytes, elapsed_ms, text, reference] additionalProperties: false description: Ordered unfinished output captured with the session cursor. Exactly one of text or reference is non-null. References retain a fixed byte cutoff through their short snapshot lease. A run retains at most 64 MiB of unfinished output across at most 256 descriptors. Inline output is limited to 64 KiB encoded; larger content uses references. ContentReference: type: object properties: url: $ref: '#/components/schemas/ResourceURL' field: type: string minLength: 1 maxLength: 256 bytes: $ref: '#/components/schemas/Counter' required: [url, field, bytes] additionalProperties: false ImageMetadata: type: object properties: mime_type: type: string maxLength: 100 width: type: integer minimum: 1 maximum: 9007199254740991 height: type: integer minimum: 1 maximum: 9007199254740991 original_bytes: $ref: '#/components/schemas/Counter' reference: $ref: '#/components/schemas/ContentReference' description: Its url is the image resource, which serves the decoded bytes. required: [mime_type, width, height, original_bytes, reference] additionalProperties: false TextContent: type: object properties: kind: const: text text: type: string maxLength: 262144 required: [kind, text] additionalProperties: false JSONContent: type: object properties: kind: const: json field: type: string maxLength: 256 description: What the value is. A user entry's `skill` value is the SkillLoad its slash activation loaded. value: $ref: '#/components/schemas/DynamicJSON' required: [kind, field, value] additionalProperties: false ImageContent: type: object properties: kind: const: image image: $ref: '#/components/schemas/ImageMetadata' required: [kind, image] additionalProperties: false TraceContent: type: object properties: kind: const: trace trace: $ref: '#/components/schemas/ToolTrace' required: [kind, trace] additionalProperties: false ReferenceContent: type: object properties: kind: const: reference reference: $ref: '#/components/schemas/ContentReference' required: [kind, reference] additionalProperties: false HistoryMail: type: object properties: mail_id: $ref: '#/components/schemas/ID' sender_session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' sender_label: type: string kind: type: string enum: [task, message, result, unreviewed, webhook, event_tool, event_turn] required: [mail_id, sender_session_id, sender_label, kind] additionalProperties: false HistoryEntry: type: object properties: id: $ref: '#/components/schemas/ID' position: $ref: '#/components/schemas/Counter' kind: type: string enum: [user, assistant, thinking, tool_call, tool_result, note, continuation, compaction, image_fit, shell_command] turn_type: type: string enum: [user, agent, webhook, event, scheduled, continue] mail: anyOf: - $ref: '#/components/schemas/HistoryMail' - type: 'null' turn_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' input_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' created_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' content: type: array items: oneOf: - $ref: '#/components/schemas/TextContent' - $ref: '#/components/schemas/JSONContent' - $ref: '#/components/schemas/ImageContent' - $ref: '#/components/schemas/TraceContent' - $ref: '#/components/schemas/ReferenceContent' maxItems: 200 checkpoint_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' content_complete: type: boolean tool: anyOf: - type: object properties: name: type: string maxLength: 100 tool_call_id: $ref: '#/components/schemas/ID' progress_call_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' title: anyOf: - type: string maxLength: 160 - type: 'null' status: type: string enum: [completed, failed] description: Outcome of the whole call, derived from the stored result exactly as the live tool event's status, so rows recorded before this field have it too. required: [name, tool_call_id, progress_call_id, status] additionalProperties: false - type: 'null' phase: description: Assistant response phase. Null for legacy rows, unfinished responses, and non-assistant entries. anyOf: - type: string enum: [commentary, final] - type: 'null' thinking_duration_ms: description: Observed thinking duration, when recorded. anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' required: [id, position, kind, phase, turn_id, input_id, created_at, content, checkpoint_id, content_complete, tool] additionalProperties: false HistoryPage: type: object properties: items: type: array items: $ref: '#/components/schemas/HistoryEntry' maxItems: 200 older: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' newer: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' high_water: $ref: '#/components/schemas/Counter' x-max-content-bytes: 262144 required: [items, older, newer, high_water] additionalProperties: false examples: - items: [] older: null newer: null high_water: 0 Checkpoint: type: object properties: position: $ref: '#/components/schemas/Counter' checkpoint_id: $ref: '#/components/schemas/ID' title: type: string maxLength: 4096 turn_type: type: string enum: [user, continue, agent, scheduled, webhook, event] preview: $ref: '#/components/schemas/Preview' required: [position, checkpoint_id, title, turn_type, preview] additionalProperties: false CheckpointPage: type: object properties: items: type: array items: $ref: '#/components/schemas/Checkpoint' maxItems: 200 older: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' newer: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' high_water: $ref: '#/components/schemas/Counter' required: [items, older, newer, high_water] additionalProperties: false HistoryRead: anyOf: - $ref: '#/components/schemas/HistoryPage' - $ref: '#/components/schemas/CheckpointPage' description: The requested view determines the item type. Empty pages are valid for either view. ContentPart: type: object properties: field: type: string maxLength: 256 offset_bytes: $ref: '#/components/schemas/Counter' encoding: type: string enum: [utf8] text: type: string maxLength: 1048576 complete: type: boolean description: Offsets count exact stored UTF-8 bytes. required: [field, offset_bytes, encoding, text, complete] additionalProperties: false EntryContentPage: type: object properties: entry_id: $ref: '#/components/schemas/ID' parts: type: array items: $ref: '#/components/schemas/ContentPart' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' x-max-decoded-content-bytes: 262144 required: [entry_id, parts, next] additionalProperties: false EntryContentBatchPart: type: object properties: entry_id: $ref: '#/components/schemas/ID' field: type: string maxLength: 256 offset_bytes: $ref: '#/components/schemas/Counter' encoding: type: string enum: [utf8] text: type: string maxLength: 1048576 complete: type: boolean description: One field piece of one named entry; offsets count exact stored UTF-8 bytes. required: [entry_id, field, offset_bytes, encoding, text, complete] additionalProperties: false EntryContentBatch: type: object properties: parts: type: array items: $ref: '#/components/schemas/EntryContentBatchPart' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' x-max-decoded-content-bytes: 524288 required: [parts, next] additionalProperties: false ContextSection: type: object properties: id: $ref: '#/components/schemas/ID' label: type: string maxLength: 256 kind: type: string enum: [instructions, extension_context, history, tools, other] source: anyOf: - type: string maxLength: 4096 - type: 'null' item_count: $ref: '#/components/schemas/Counter' utf8_bytes: $ref: '#/components/schemas/Counter' page_count: $ref: '#/components/schemas/Counter' preview: $ref: '#/components/schemas/Preview' required: [id, label, kind, source, item_count, utf8_bytes, page_count, preview] additionalProperties: false ContextSummary: type: object properties: state: type: string enum: [pending, ready] snapshot_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' captured_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' provider: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' model: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' protocol: anyOf: - type: string enum: [responses, chat_completions] - type: 'null' context_window_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' compaction: $ref: '#/components/schemas/ContextCompaction' sections: type: array items: $ref: '#/components/schemas/ContextSection' maxItems: 1000 reason: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [state, snapshot_id, captured_at, provider, model, protocol, context_window_tokens, compaction, sections, reason] additionalProperties: false allOf: - if: properties: state: const: ready then: properties: snapshot_id: $ref: '#/components/schemas/ID' captured_at: $ref: '#/components/schemas/Timestamp' reason: type: 'null' else: properties: snapshot_id: type: 'null' reason: $ref: '#/components/schemas/SafeReason' ContextSectionPage: type: object properties: snapshot_id: $ref: '#/components/schemas/ID' section_id: $ref: '#/components/schemas/ID' text: type: string x-max-utf8-bytes: 32768 maxLength: 32768 omitted: anyOf: - type: string maxLength: 4096 - type: 'null' page: $ref: '#/components/schemas/Counter' page_count: $ref: '#/components/schemas/Counter' required: [snapshot_id, section_id, text, omitted, page, page_count] additionalProperties: false TokenObservation: type: object properties: estimated: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' observed: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' source: anyOf: - type: string maxLength: 100 - type: 'null' required: [estimated, observed, source] additionalProperties: false ProviderRequestRecord: type: object properties: sequence: $ref: '#/components/schemas/Counter' provider: $ref: '#/components/schemas/ID' model: $ref: '#/components/schemas/ID' run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' started_at: $ref: '#/components/schemas/Timestamp' ended_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' prompt_tokens: $ref: '#/components/schemas/TokenObservation' completion_tokens: $ref: '#/components/schemas/TokenObservation' cached_tokens: $ref: '#/components/schemas/TokenObservation' failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' kind: type: string enum: [turn, summarizer, background] provider_profile: $ref: '#/components/schemas/ID' account_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' effort: anyOf: - type: string maxLength: 256 - type: 'null' outcome: type: string enum: [completed, failed] http_status: anyOf: - type: integer minimum: 100 maximum: 599 - type: 'null' cache_creation_tokens: $ref: '#/components/schemas/TokenObservation' cache_write_5m_tokens: $ref: '#/components/schemas/TokenObservation' cache_write_1h_tokens: $ref: '#/components/schemas/TokenObservation' reasoning_tokens: $ref: '#/components/schemas/TokenObservation' head_hash: type: string maxLength: 128 input_count: $ref: '#/components/schemas/Counter' replaced_input_count: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' projection_hash: anyOf: - type: string maxLength: 128 - type: 'null' strategy: anyOf: - type: string maxLength: 256 - type: 'null' cache_marks: type: array maxItems: 200 items: type: object properties: through: type: string enum: [tools, system, input] index: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' ttl_seconds: $ref: '#/components/schemas/Counter' required: [through, index, ttl_seconds] additionalProperties: false input_chain: anyOf: - type: string maxLength: 65536 - type: 'null' stream: anyOf: - type: object properties: first_event_ms: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' events: $ref: '#/components/schemas/Counter' thinking_bytes: $ref: '#/components/schemas/Counter' output_bytes: $ref: '#/components/schemas/Counter' required: [first_event_ms, events, thinking_bytes, output_bytes] additionalProperties: false - type: 'null' first_byte_ms: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' total_tokens: $ref: '#/components/schemas/TokenObservation' response_id: anyOf: - type: string maxLength: 1024 - type: 'null' model_version: anyOf: - type: string maxLength: 1024 - type: 'null' trace_id: anyOf: - type: string maxLength: 1024 - type: 'null' transcript_positions: type: array items: $ref: '#/components/schemas/Counter' maxItems: 200 required: [sequence, provider, model, run_id, started_at, ended_at, prompt_tokens, completion_tokens, cached_tokens, failure, transcript_positions, kind, provider_profile, account_id, effort, outcome, http_status, cache_creation_tokens, cache_write_5m_tokens, cache_write_1h_tokens, reasoning_tokens, head_hash, input_count, replaced_input_count, projection_hash, strategy, cache_marks, input_chain, stream, first_byte_ms, total_tokens, response_id, model_version, trace_id] additionalProperties: false RequestRecordPage: type: object properties: items: type: array items: $ref: '#/components/schemas/ProviderRequestRecord' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [items, next] additionalProperties: false ContextWindow: type: object properties: context_window: description: The window set for this session. Null when it uses the model's. anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' model_context_tokens: description: The model's own window, with any raised cap or context limit applied. Null when the catalog does not know the model. anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' effective_context_tokens: description: The window compaction measures against. anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' source: type: string enum: [session, model, unknown] message: type: string description: One sentence a client can show as it is. required: [context_window, model_context_tokens, effective_context_tokens, source, message] additionalProperties: false SessionFile: type: object properties: path: type: string description: Absolute location as the daemon spells it, `host:/path` for a remote workspace. size: $ref: '#/components/schemas/Counter' modified_at: $ref: '#/components/schemas/Timestamp' text: type: string description: The file's contents. At most 1 MiB of UTF-8 without NUL. required: [path, size, modified_at, text] additionalProperties: false ChangedFile: type: object properties: path: type: string maxLength: 4096 description: Relative to the checkout root. old_path: anyOf: - type: string maxLength: 4096 - type: 'null' description: Where a renamed file came from. status: type: string enum: [modified, added, deleted, renamed, untracked] added: $ref: '#/components/schemas/Counter' removed: $ref: '#/components/schemas/Counter' binary: type: boolean description: Binary content, or text that is not UTF-8. diff: anyOf: - type: string - type: 'null' description: Unified diff with git's `diff --git` and `---`/`+++` headers, without a trailing newline. Null exactly when `omitted` is set. omitted: anyOf: - type: string enum: [binary, too_large, budget] - type: 'null' required: [path, old_path, status, added, removed, binary, diff, omitted] additionalProperties: false CheckoutChanges: type: object properties: checkout: type: object properties: kind: type: string enum: [git, jj] root: $ref: '#/components/schemas/Workspace' head: description: The short HEAD commit (git) or `@`'s change id (jj); null when unborn. anyOf: - type: string maxLength: 256 - type: 'null' branch: description: The branch (git) or the bookmark `@` works on (jj). anyOf: - type: string maxLength: 4096 - type: 'null' required: [kind, root, head, branch] additionalProperties: false base: type: object properties: spec: type: string enum: [uncommitted, upstream] label: type: string maxLength: 4096 description: What the working copy was compared with, such as HEAD, @-, origin/main or trunk(). commit: description: The short commit compared with; null for an unborn HEAD or jj's root. anyOf: - type: string maxLength: 256 - type: 'null' required: [spec, label, commit] additionalProperties: false files: type: array items: $ref: '#/components/schemas/ChangedFile' maxItems: 1000 truncated: type: boolean description: More files changed than are listed. required: [checkout, base, files, truncated] additionalProperties: false ContextRead: oneOf: - $ref: '#/components/schemas/ContextSummary' - $ref: '#/components/schemas/ContextSectionPage' - $ref: '#/components/schemas/RequestRecordPage' FormField: type: object properties: name: type: string minLength: 1 maxLength: 256 label: type: string maxLength: 256 type: type: string enum: [text, secret, boolean, choice, integer, hidden] required: type: boolean default: $ref: '#/components/schemas/DynamicJSON' default_binding: description: Prefill from the selected row or installed session, before showing the form. type: object properties: source: type: string enum: [row, session] pointer: type: string pattern: ^(|/.*)$ maxLength: 4096 required: [source, pointer] additionalProperties: false choices: type: array items: type: object properties: value: $ref: '#/components/schemas/DynamicJSON' label: type: string maxLength: 256 required: [value, label] additionalProperties: false maxItems: 200 minimum: anyOf: - type: number - type: 'null' maximum: anyOf: - type: number - type: 'null' description: type: string maxLength: 4096 required: [name, label, type, required, default, choices, minimum, maximum, description] additionalProperties: false Binding: oneOf: - type: object properties: source: const: literal value: $ref: '#/components/schemas/DynamicJSON' required: [source, value] additionalProperties: false - type: object properties: source: type: string enum: [row, form, session] pointer: type: string pattern: ^(|/.*)$ maxLength: 4096 required: [source, pointer] additionalProperties: false description: JSON pointer resolves against the selected row, submitted form, or installed session snapshot. No expression language. ActionOperation: type: object properties: operation_id: type: string minLength: 1 maxLength: 256 method: type: string enum: [GET, PUT, POST, PATCH, DELETE] path_template: $ref: '#/components/schemas/ResourceURL' path: type: object additionalProperties: $ref: '#/components/schemas/Binding' query: type: object additionalProperties: $ref: '#/components/schemas/Binding' headers: type: object additionalProperties: $ref: '#/components/schemas/Binding' body: type: object additionalProperties: $ref: '#/components/schemas/Binding' propertyNames: type: string format: json-pointer pattern: ^/ success_status: type: integer enum: [200, 201] description: Expected synchronous JSON success status. Omitted operations accept 200 or 201 for mutations and 200 for reads. result_schema: $ref: '#/components/schemas/DynamicJSON' description: Operation must be declared in this contract, or the installed extension contract version. Bind If-Match from the displayed resource, never from a fresh read. Path, query and header map keys name declared parameters; body map keys are JSON pointers into the request object. Missing optional form values omit their bindings. result_schema is a JSON Schema 2020-12 fragment, with no remote schema retrieval. required: [operation_id, method, path_template, path, query, headers, body, result_schema] additionalProperties: false PageAction: type: object properties: id: $ref: '#/components/schemas/ID' label: type: string maxLength: 256 keyboard_hint: anyOf: - type: string maxLength: 100 - type: 'null' confirmation: anyOf: - type: string maxLength: 4096 - type: 'null' fields: type: array items: $ref: '#/components/schemas/FormField' maxItems: 100 operation: $ref: '#/components/schemas/ActionOperation' required: [id, label, keyboard_hint, confirmation, fields, operation] additionalProperties: false PageRow: type: object properties: id: $ref: '#/components/schemas/ID' text: type: string maxLength: 4096 badge: anyOf: - type: string maxLength: 256 - type: 'null' tone: type: string enum: [plain, active, muted, success, warning, error] detail: anyOf: - type: string maxLength: 16384 - type: 'null' resource: anyOf: - type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/DynamicJSON' required: [url, etag, value] additionalProperties: false - type: 'null' required: [id, text, badge, tone, detail, resource] additionalProperties: false PageDescriptor: type: object properties: title: type: string maxLength: 256 empty_state: type: string maxLength: 4096 rows: type: array items: $ref: '#/components/schemas/PageRow' maxItems: 200 glance: anyOf: - $ref: '#/components/schemas/Glance' - type: 'null' actions: type: array items: $ref: '#/components/schemas/PageAction' maxItems: 100 summary: type: string maxLength: 4096 required: [title, empty_state, rows, glance, actions, summary] additionalProperties: false CatalogCandidate: type: object properties: id: $ref: '#/components/schemas/ID' kind: type: string enum: [extension, skill, instruction, mcp] title: type: string maxLength: 256 description: type: string maxLength: 4096 source: type: string maxLength: 4096 resolved_source: anyOf: - type: string maxLength: 4096 - type: 'null' preference_key: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' valid: type: boolean eligible: type: boolean effective_enabled: type: boolean global_preference: anyOf: - type: boolean - type: 'null' session_override: anyOf: - type: boolean - type: 'null' shadowed_by: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' dependencies: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 quarantined: type: boolean diagnostic: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' extension: description: Installed extension metadata for the inspector. Null for other candidate kinds. anyOf: - $ref: '#/components/schemas/ExtensionMetadata' - type: 'null' x-max-encoded-bytes: 65536 required: [id, kind, title, description, source, resolved_source, preference_key, valid, eligible, effective_enabled, global_preference, session_override, shadowed_by, dependencies, quarantined, diagnostic, extension] additionalProperties: false ExtensionMetadata: type: object properties: shelf: description: Where a client shows the extension. Presentation only. type: string enum: [memory, reach, channels, providers, builtins] summary: description: One line a client shows beside the name; null when the extension has none. anyOf: - type: string maxLength: 120 - type: 'null' context: type: boolean tools: type: array maxItems: 200 items: $ref: '#/components/schemas/ID' python_modules: type: array maxItems: 200 items: $ref: '#/components/schemas/ID' plugins: type: array maxItems: 200 items: $ref: '#/components/schemas/ID' required: [shelf, summary, context, tools, python_modules, plugins] additionalProperties: false HTTPCommand: type: object properties: id: $ref: '#/components/schemas/ID' slash_name: type: string maxLength: 256 description: type: string maxLength: 4096 arguments: type: array items: $ref: '#/components/schemas/FormField' maxItems: 100 caller_permissions: type: array items: type: string enum: [human, model] maxItems: 2 delivery: type: string enum: [read, mutation] operation: $ref: '#/components/schemas/ActionOperation' required: [id, slash_name, description, arguments, caller_permissions, delivery, operation] additionalProperties: false InputCommand: type: object properties: id: $ref: '#/components/schemas/ID' slash_name: type: string maxLength: 256 description: type: string maxLength: 4096 arguments: type: array items: $ref: '#/components/schemas/FormField' maxItems: 100 caller_permissions: type: array items: type: string enum: [human, model] maxItems: 2 delivery: const: input command_id: $ref: '#/components/schemas/ID' required: [id, slash_name, description, arguments, caller_permissions, delivery, command_id] additionalProperties: false Catalog: type: object properties: native_commands: type: array items: $ref: '#/components/schemas/HTTPCommand' maxItems: 200 description: Static HTTP declarations for selected extensions when no composition has been loaded. Reading these declarations does not prepare extensions or start a kernel. discovery: type: [object, 'null'] properties: revision: $ref: '#/components/schemas/ID' workspace: $ref: '#/components/schemas/Workspace' candidates: type: array items: $ref: '#/components/schemas/CatalogCandidate' maxItems: 200 diagnostics: type: array items: $ref: '#/components/schemas/SafeReason' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [revision, workspace, candidates, diagnostics, next] additionalProperties: false discovery_failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' loaded: type: object properties: revision: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' commands: type: array items: oneOf: - $ref: '#/components/schemas/HTTPCommand' - $ref: '#/components/schemas/InputCommand' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [revision, commands, next] additionalProperties: false pages: type: array items: $ref: '#/components/schemas/PageDescriptor' maxItems: 16 description: Pagination is independent for discovered candidates and loaded commands; next tokens identify their section. required: [discovery, discovery_failure, loaded] additionalProperties: false SessionReloadOutcome: type: object properties: state: type: string enum: [applied, failed, skipped] loaded_revision: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' restart_required: type: boolean warnings: $ref: '#/components/schemas/Warnings' failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [state, loaded_revision, restart_required, warnings, failure] additionalProperties: false ModelReloadOutcome: type: object properties: provider: $ref: '#/components/schemas/ID' state: type: string enum: [refreshed, failed, skipped] observed_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [provider, state, observed_at, failure] additionalProperties: false CachePolicyReloadOutcome: type: object properties: state: type: string enum: [refreshed, failed] failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [state, failure] additionalProperties: false ReloadRequest: type: object properties: target: type: string enum: [session, models, both] default: both additionalProperties: false ReloadResult: type: object properties: cache_policy: anyOf: - $ref: '#/components/schemas/CachePolicyReloadOutcome' - type: 'null' session: anyOf: - $ref: '#/components/schemas/SessionReloadOutcome' - type: 'null' models: type: array items: $ref: '#/components/schemas/ModelReloadOutcome' maxItems: 200 required: [session, models, cache_policy] additionalProperties: false KernelUpgradeResult: type: object properties: old_build: anyOf: - type: string maxLength: 512 - type: 'null' new_build: anyOf: - type: string maxLength: 512 - type: 'null' state: type: string enum: [upgraded, unchanged, failed] stopped_jobs: type: array items: type: object properties: id: $ref: '#/components/schemas/ID' reason: $ref: '#/components/schemas/SafeReason' required: [id, reason] additionalProperties: false maxItems: 200 warnings: $ref: '#/components/schemas/Warnings' failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' old_kernel_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' new_kernel_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' required: [old_build, new_build, state, stopped_jobs, warnings, failure, old_kernel_id, new_kernel_id] additionalProperties: false KernelRestartResult: type: object properties: old_kernel_id: description: The kernel the session held when the restart began; null when it held none. A kernel only recorded for the session is stopped too. anyOf: - $ref: '#/components/schemas/ID' - type: 'null' stopped_jobs: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 ended_cells: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 required: [old_kernel_id, stopped_jobs, ended_cells] additionalProperties: false RewindRequest: type: object properties: checkpoint_id: $ref: '#/components/schemas/ID' summary: anyOf: - type: object properties: instructions: anyOf: - type: string maxLength: 4096 - type: 'null' additionalProperties: false - type: 'null' description: Ask for a summary of the removed tail, added to the session as a note. required: [checkpoint_id] additionalProperties: false RewindResult: type: object properties: archive_session_id: $ref: '#/components/schemas/ID' input: anyOf: - type: string - type: 'null' description: The text of the removed user message, when a person wrote it. summary: anyOf: - type: string maxLength: 32768 - type: 'null' description: The summary note added after the cut, when one was requested. required: [archive_session_id, input, summary] additionalProperties: false CompactionRequest: type: object properties: strategy: $ref: '#/components/schemas/ID' additionalProperties: false CompactionObservation: type: object properties: strategy: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' before_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' after_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' evicted_entries: $ref: '#/components/schemas/Counter' summary: type: string maxLength: 32768 required: [strategy, before_tokens, after_tokens, evicted_entries, summary] additionalProperties: false CompactionResult: type: object properties: selection_applied: type: boolean effective_strategy: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' state: type: string enum: [compacted, unchanged, failed] observation: anyOf: - $ref: '#/components/schemas/CompactionObservation' - type: 'null' failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [selection_applied, effective_strategy, state, observation, failure] additionalProperties: false Model: type: object properties: id: $ref: '#/components/schemas/ID' label: type: string maxLength: 256 efforts: type: array items: type: object properties: id: type: string maxLength: 100 label: type: string maxLength: 256 required: [id, label] additionalProperties: false maxItems: 100 default_context_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' effective_context_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' max_context_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' max_output_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' input_modalities: type: array items: type: string minLength: 1 maxLength: 100 maxItems: 32 image_edge: anyOf: - type: integer minimum: 1 maximum: 65536 - type: 'null' raised: type: boolean compact_at: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' description: The window the user saved for this model, below its own; null or absent follows the model. cap_key: $ref: '#/components/schemas/ID' cache_policy: type: object properties: ttl_seconds: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' source: anyOf: - type: string maxLength: 256 - type: 'null' required: [ttl_seconds, source] additionalProperties: false source: type: string maxLength: 256 observed_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' required: [id, label, efforts, default_context_tokens, effective_context_tokens, max_context_tokens, max_output_tokens, input_modalities, image_edge, raised, cap_key, cache_policy, source, observed_at] additionalProperties: false CachePolicyEntry: type: object properties: id: $ref: '#/components/schemas/ID' layer: type: string enum: - default - remote - local match: type: object properties: extension: anyOf: - type: array items: type: string maxLength: 4096 maxItems: 100 - type: 'null' host: anyOf: - type: array items: type: string maxLength: 4096 maxItems: 100 - type: 'null' model: anyOf: - type: array items: type: string maxLength: 4096 maxItems: 100 - type: 'null' required: - extension - host - model additionalProperties: false policy: type: string enum: - refresh - fixed - evict - unknown clock: type: string enum: - request - response tiers: anyOf: - type: array maxItems: 32 items: type: object properties: seconds: $ref: '#/components/schemas/Counter' write: anyOf: - type: number minimum: 0 - type: 'null' required: - seconds - write additionalProperties: false - type: 'null' read: anyOf: - type: number minimum: 0 - type: 'null' survival: anyOf: - type: object properties: typical: $ref: '#/components/schemas/Counter' max: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' required: - typical - max additionalProperties: false - type: 'null' evidence: type: string enum: - documented - measured - implemented - folklore - unknown source: type: string maxLength: 4096 checked: type: string maxLength: 100 note: type: string maxLength: 16384 required: - id - layer - match - policy - clock - tiers - read - survival - evidence - source - checked - note additionalProperties: false CachePolicyLayer: type: object properties: name: type: string enum: - default - remote - local path: type: string maxLength: 16384 loaded: type: boolean error: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: - name - path - loaded - error additionalProperties: false CachePolicyPage: type: object properties: entries: type: array items: $ref: '#/components/schemas/CachePolicyEntry' maxItems: 200 layers: type: array items: $ref: '#/components/schemas/CachePolicyLayer' maxItems: 3 matched: anyOf: - $ref: '#/components/schemas/CachePolicyEntry' - type: 'null' next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: - entries - layers - matched - next additionalProperties: false ModelRead: oneOf: - $ref: '#/components/schemas/ModelPage' - $ref: '#/components/schemas/CachePolicyPage' ModelPage: type: object properties: items: type: array items: $ref: '#/components/schemas/Model' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [items, next] additionalProperties: false Host: type: object properties: step: description: Current probe progress. Null when connecting or when no probe is running. anyOf: - type: string enum: [staging] - type: 'null' target: $ref: '#/components/schemas/ID' state: type: string enum: [unknown, probing, ready, needs_auth, unreachable, unsupported] detail: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' observed_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' os: anyOf: - type: string maxLength: 256 - type: 'null' architecture: anyOf: - type: string maxLength: 256 - type: 'null' home: anyOf: - $ref: '#/components/schemas/Workspace' - type: 'null' authentication: anyOf: - type: object properties: instructions: type: string maxLength: 4096 ssh_target: type: string maxLength: 4096 control_path: anyOf: - type: string maxLength: 4096 - type: 'null' required: [instructions, ssh_target, control_path] additionalProperties: false - type: 'null' required: [target, state, detail, observed_at, os, architecture, home, authentication] additionalProperties: false HostPage: type: object properties: items: type: array items: $ref: '#/components/schemas/Host' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [items, next] additionalProperties: false RecentWorkspace: type: object properties: location: $ref: '#/components/schemas/Workspace' use_count: $ref: '#/components/schemas/Counter' activity_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' required: [location, use_count, activity_at] additionalProperties: false RecentWorkspacePage: type: object properties: items: type: array items: $ref: '#/components/schemas/RecentWorkspace' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [items, next] additionalProperties: false TreeChild: type: object properties: name: type: string maxLength: 4096 kind: type: string enum: [file, directory, symlink] location: $ref: '#/components/schemas/Workspace' language: anyOf: - type: string maxLength: 256 - type: 'null' changed: $ref: '#/components/schemas/Counter' required: [name, kind, location, language, changed] additionalProperties: false TreeEntry: type: object properties: name: type: string maxLength: 4096 kind: type: string enum: [file, directory, symlink] location: $ref: '#/components/schemas/Workspace' children: type: array items: $ref: '#/components/schemas/TreeChild' maxItems: 4 more: $ref: '#/components/schemas/Counter' language: anyOf: - type: string maxLength: 256 - type: 'null' changed: $ref: '#/components/schemas/Counter' required: [name, kind, location, children, more, language, changed] additionalProperties: false GitFacts: type: object properties: kind: const: git branch: anyOf: - type: string maxLength: 4096 - type: 'null' revision: anyOf: - type: string maxLength: 256 - type: 'null' dirty: anyOf: - type: boolean - type: 'null' added: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' modified: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' removed: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' root: $ref: '#/components/schemas/Workspace' changed: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' touched_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' required: [kind, branch, revision, dirty, added, modified, removed, root, changed, touched_at] additionalProperties: false JJFacts: type: object properties: kind: const: jj change_id: anyOf: - type: string maxLength: 256 - type: 'null' revision: anyOf: - type: string maxLength: 256 - type: 'null' description: anyOf: - type: string maxLength: 4096 - type: 'null' dirty: anyOf: - type: boolean - type: 'null' conflicts: anyOf: - type: boolean - type: 'null' root: $ref: '#/components/schemas/Workspace' changed: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' touched_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' bookmark: anyOf: - type: object properties: name: type: string maxLength: 4096 ahead: $ref: '#/components/schemas/Counter' required: [name, ahead] additionalProperties: false - type: 'null' required: [kind, change_id, revision, description, dirty, conflicts, root, changed, touched_at, bookmark] additionalProperties: false WorkspacePreview: type: object properties: repository: anyOf: - oneOf: - $ref: '#/components/schemas/GitFacts' - $ref: '#/components/schemas/JJFacts' - type: 'null' repository_diagnostic: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' languages: type: array items: type: object properties: name: type: string maxLength: 256 bytes: $ref: '#/components/schemas/Counter' share: type: number minimum: 0 maximum: 1 color: anyOf: - type: string pattern: ^#[0-9a-fA-F]{6}$ - type: 'null' required: [name, bytes, share, color] additionalProperties: false maxItems: 100 tree: type: array items: $ref: '#/components/schemas/TreeEntry' maxItems: 12 more: $ref: '#/components/schemas/Counter' required: [repository, repository_diagnostic, languages, tree, more] additionalProperties: false WorkspaceDirectory: type: object properties: directory: $ref: '#/components/schemas/Workspace' parent: anyOf: - $ref: '#/components/schemas/Workspace' - type: 'null' home: anyOf: - $ref: '#/components/schemas/Workspace' - type: 'null' host: anyOf: - $ref: '#/components/schemas/Host' - type: 'null' items: type: array items: type: object properties: name: type: string maxLength: 4096 location: $ref: '#/components/schemas/Workspace' vcs: anyOf: - type: string enum: [git, jj] - type: 'null' modified_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' hidden: type: boolean kind: description: Only with `include=files`. A link to a file is a file. type: string enum: [directory, file] size: description: Only with `include=files`. Bytes for a file, null for a directory. anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' ignored: description: Only with `include=files`. Whether git (or a colocated jj) ignores it; null outside a repository, in a jj checkout without git, or when git cannot say. anyOf: - type: boolean - type: 'null' required: [name, location, vcs, modified_at, hidden] additionalProperties: false maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' preview: $ref: '#/components/schemas/WorkspacePreview' required: [directory, parent, home, host, items, next] additionalProperties: false WorkspaceRead: oneOf: - $ref: '#/components/schemas/RecentWorkspacePage' - $ref: '#/components/schemas/WorkspaceDirectory' Account: type: object properties: id: $ref: '#/components/schemas/ID' provider: $ref: '#/components/schemas/ID' label: type: string maxLength: 256 detail: type: string maxLength: 4096 kind: type: string enum: [model, service, key] default: model description: '`key` is an API key: saved in creds.json, or read from the daemon environment on every request when `source` is `env`.' source: type: string enum: [saved, env] description: '`env` accounts are never stored and cannot be removed or renamed; their label names the variable, as `$OPENROUTER_API_KEY`.' endpoint: description: The base url a key account sends to; null for sign-in accounts. anyOf: - type: string format: uri maxLength: 4096 - type: 'null' limited_until: description: When a rate or usage limit recorded against this account ends; null when it has room. anyOf: - type: string format: date-time - type: 'null' selected_by_profiles: type: array description: Profiles pinned to this account by `account_id`. items: $ref: '#/components/schemas/ID' maxItems: 200 rotated_by_profiles: type: array description: Profiles that list this account in `account_ids`. items: $ref: '#/components/schemas/ID' maxItems: 200 required: [id, provider, label, detail, kind, source, endpoint, limited_until, selected_by_profiles, rotated_by_profiles] additionalProperties: false KeyAccountRequest: type: object properties: provider: description: The profile extension the key serves, such as `openai` or `opencode-go`. $ref: '#/components/schemas/ID' endpoint: type: string format: uri maxLength: 4096 api_key: type: string minLength: 1 writeOnly: true maxLength: 16384 label: type: string minLength: 1 maxLength: 256 description: Saves an API key as an account. A key already saved for the same endpoint is refused with `key_exists`; its account id is in the problem detail. required: [provider, endpoint, api_key] additionalProperties: false AccountPatch: type: object properties: label: type: string minLength: 1 maxLength: 256 required: [label] additionalProperties: false LoginProvider: type: object properties: id: $ref: '#/components/schemas/ID' label: type: string maxLength: 256 detail: type: string maxLength: 4096 kind: type: string enum: [model, service] default: model flows: type: array items: type: string enum: [browser, manual, device, form] maxItems: 4 fields: type: array items: $ref: '#/components/schemas/FormField' maxItems: 100 required: [id, label, detail, kind, flows, fields] additionalProperties: false Auth: type: object properties: providers: type: array items: $ref: '#/components/schemas/LoginProvider' maxItems: 200 accounts: type: array items: $ref: '#/components/schemas/Account' maxItems: 200 required: [providers, accounts] additionalProperties: false LoginRequest: type: object properties: provider: $ref: '#/components/schemas/ID' flow: type: string enum: [browser, manual, device, form] values: type: object additionalProperties: type: [string, boolean, integer] description: Flow defaults to the provider preferred flow. Form names, types and required values are checked against that provider declaration. Values are write-only. required: [provider, values] additionalProperties: false LoginPatch: type: object properties: response: type: string minLength: 1 writeOnly: true maxLength: 16384 required: [response] additionalProperties: false Login: type: object properties: id: $ref: '#/components/schemas/ID' provider: $ref: '#/components/schemas/ID' url: anyOf: - type: string format: uri maxLength: 4096 - type: 'null' expires_at: $ref: '#/components/schemas/Timestamp' state: type: string enum: [waiting, exchanging, complete, failed, cancelled, expired] instructions: anyOf: - type: string maxLength: 4096 - type: 'null' progress: type: string maxLength: 4096 accounts: type: array items: $ref: '#/components/schemas/Account' maxItems: 200 failure: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [id, provider, url, expires_at, state, instructions, progress, accounts, failure] additionalProperties: false examples: - id: 01a0fcea-2b00-7000-8000-000000000003 provider: example-provider url: https://provider.example/authorize?state=synthetic-state expires_at: '2026-10-02T14:15:00Z' state: waiting instructions: Paste the callback URL if the browser cannot reach the daemon. progress: Waiting for authorization. accounts: [] failure: null MailMetadata: type: object properties: mail_id: $ref: '#/components/schemas/ID' sender_session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' receiver_session_id: $ref: '#/components/schemas/ID' kind: type: string enum: [task, message, result, unreviewed, webhook, event_tool, event_turn] bytes: $ref: '#/components/schemas/Counter' sender_label: anyOf: - type: string x-max-utf8-bytes: 400 maxLength: 100 - type: 'null' required: [mail_id, sender_session_id, receiver_session_id, kind, bytes, sender_label] additionalProperties: false SessionKernelEvent: type: object properties: type: const: kernel sequence: $ref: '#/components/schemas/Counter' data: type: object properties: kernel: $ref: '#/components/schemas/Kernel' required: [kernel] additionalProperties: false description: The kernel's job facts changed. Published only when they differ from what the stream last carried, so a client that keeps them needs no status poll. required: [type, sequence, data] additionalProperties: false SessionGlancesEvent: type: object properties: type: const: glances sequence: $ref: '#/components/schemas/Counter' data: type: object properties: glances: type: array items: $ref: '#/components/schemas/Glance' maxItems: 16 required: [glances] additionalProperties: false description: The loaded extensions' sidebar values changed, observed at a low rate while a client watches the stream. required: [type, sequence, data] additionalProperties: false SessionStatusEvent: type: object properties: type: const: status sequence: $ref: '#/components/schemas/Counter' data: $ref: '#/components/schemas/SessionStatus' required: [type, sequence, data] additionalProperties: false ShellCommandRequest: type: object properties: command: type: string minLength: 1 maxLength: 16384 x-max-utf8-bytes: 16384 required: [command] additionalProperties: false ShellCommand: type: object properties: id: $ref: '#/components/schemas/UUIDv7' command: type: string maxLength: 16384 x-max-utf8-bytes: 16384 status: type: string enum: [running, completed, cancelled, interrupted, failed] exit_code: type: [integer, 'null'] output: type: string maxLength: 65536 x-max-utf8-bytes: 65536 output_bytes: type: integer minimum: 0 maximum: 16777216 truncated: type: boolean error: type: [string, 'null'] history_seq: type: [integer, 'null'] minimum: 1 delivery: description: Whether this receipt was included in a model request whose response has started. Pending does not wake an idle agent; unknown is legacy tracking, detached is removed by rewind. Execution status is independent. type: string enum: [unknown, pending, delivered, detached] required: [id, command, status, exit_code, output, output_bytes, truncated, error, history_seq, delivery] additionalProperties: false ShellCommandResponse: type: object properties: shell_command: $ref: '#/components/schemas/ShellCommand' required: [shell_command] additionalProperties: false ShellCommandOutput: type: object properties: text: type: string maxLength: 65536 x-max-utf8-bytes: 65536 next_offset: type: [integer, 'null'] minimum: 0 required: [text, next_offset] additionalProperties: false SessionShellCommandEvent: type: object properties: type: const: shell_command sequence: $ref: '#/components/schemas/Counter' data: $ref: '#/components/schemas/ShellCommandResponse' required: [type, sequence, data] additionalProperties: false SessionInputEvent: type: object properties: type: const: input sequence: $ref: '#/components/schemas/Counter' data: type: object properties: input: $ref: '#/components/schemas/Input' required: [input] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionTextEvent: type: object properties: type: const: text sequence: $ref: '#/components/schemas/Counter' data: type: object properties: run_id: $ref: '#/components/schemas/ID' message_id: $ref: '#/components/schemas/ID' text: type: string maxLength: 262144 required: [run_id, message_id, text] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionThinkingEvent: type: object properties: type: const: thinking sequence: $ref: '#/components/schemas/Counter' data: type: object properties: run_id: $ref: '#/components/schemas/ID' message_id: $ref: '#/components/schemas/ID' text: type: string maxLength: 262144 elapsed_ms: description: Completed thinking duration, when observed. $ref: '#/components/schemas/Counter' required: [run_id, message_id, text] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionMessageEvent: type: object properties: type: const: message sequence: $ref: '#/components/schemas/Counter' data: type: object properties: entry: $ref: '#/components/schemas/HistoryEntry' replaces_live_ids: type: array description: Live message IDs whose streamed text this durable entry represents, in order, as an exact prefix. Empty when nothing of this entry streamed live. Always sent by daemons with capability acp_attachment. items: $ref: '#/components/schemas/ID' maxItems: 256 required: [entry] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionToolProgressEvent: type: object properties: type: const: tool_progress sequence: $ref: '#/components/schemas/Counter' data: type: object properties: progress: anyOf: - $ref: '#/components/schemas/ToolProgress' - type: 'null' required: [progress] additionalProperties: false x-max-encoded-bytes: 8192 required: [type, sequence, data] additionalProperties: false SessionToolEvent: type: object properties: type: const: tool sequence: $ref: '#/components/schemas/Counter' data: type: object properties: tool_call_id: $ref: '#/components/schemas/ID' progress_call_id: $ref: '#/components/schemas/ID' name: type: string maxLength: 100 title: anyOf: - type: string maxLength: 160 - type: 'null' arguments: $ref: '#/components/schemas/DynamicJSON' result: $ref: '#/components/schemas/DynamicJSON' trace: anyOf: - $ref: '#/components/schemas/ToolTrace' - type: 'null' content_complete: type: boolean reference: anyOf: - $ref: '#/components/schemas/ContentReference' - type: 'null' status: type: string enum: [completed, failed] description: Outcome of the whole call. progress_call_id equals the call_id of any progress for this call, is unique within the session, and exists even when no progress was sent. Always sent by daemons with capability acp_attachment. required: [tool_call_id, progress_call_id, name, arguments, result, trace, content_complete, reference] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionNoteEvent: type: object properties: type: const: note sequence: $ref: '#/components/schemas/Counter' data: type: object properties: entry_id: $ref: '#/components/schemas/ID' origin: type: string maxLength: 256 text: type: string maxLength: 262144 mail: anyOf: - $ref: '#/components/schemas/MailMetadata' - type: 'null' required: [entry_id, origin, text, mail] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionRetryEvent: type: object properties: type: const: retry sequence: $ref: '#/components/schemas/Counter' data: type: object properties: run_id: $ref: '#/components/schemas/ID' attempt: type: integer minimum: 1 maximum: 9007199254740991 reason: $ref: '#/components/schemas/SafeReason' delay_ms: $ref: '#/components/schemas/Counter' required: [run_id, attempt, reason, delay_ms] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionUsageEvent: type: object properties: type: const: usage sequence: $ref: '#/components/schemas/Counter' data: $ref: '#/components/schemas/Usage' required: [type, sequence, data] additionalProperties: false SessionCommittedEvent: type: object properties: type: const: committed sequence: $ref: '#/components/schemas/Counter' data: type: object properties: high_water: $ref: '#/components/schemas/Counter' replaces_all_live: type: boolean description: Retire all provisional output for a model commit. replaces_live_ids: type: array items: $ref: '#/components/schemas/ID' maxItems: 256 required: [high_water, replaces_live_ids, replaces_all_live] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionTurnCompletedEvent: type: object properties: type: const: turn_completed sequence: $ref: '#/components/schemas/Counter' data: type: object properties: run_id: $ref: '#/components/schemas/ID' state: type: string enum: [completed, interrupted, failed, abandoned] input_ids: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 input_count: $ref: '#/components/schemas/Counter' truncated: type: boolean required: [run_id, state, input_ids, input_count, truncated] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionCompactedEvent: type: object properties: type: const: compacted sequence: $ref: '#/components/schemas/Counter' data: $ref: '#/components/schemas/CompactionObservation' required: [type, sequence, data] additionalProperties: false SessionErrorEvent: type: object properties: type: const: error sequence: $ref: '#/components/schemas/Counter' data: type: object properties: run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' code: type: string maxLength: 100 message: type: string maxLength: 4096 required: [run_id, code, message] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionInvalidateEvent: type: object properties: type: const: invalidate sequence: $ref: '#/components/schemas/Counter' data: type: object properties: kind: type: string enum: [session, settings, catalog, context, extension] url: $ref: '#/components/schemas/ResourceURL' required: [kind, url] additionalProperties: false required: [type, sequence, data] additionalProperties: false SessionEvent: oneOf: - $ref: '#/components/schemas/SessionStatusEvent' - $ref: '#/components/schemas/SessionInputEvent' - $ref: '#/components/schemas/SessionShellCommandEvent' - $ref: '#/components/schemas/SessionTextEvent' - $ref: '#/components/schemas/SessionThinkingEvent' - $ref: '#/components/schemas/SessionMessageEvent' - $ref: '#/components/schemas/SessionToolProgressEvent' - $ref: '#/components/schemas/SessionToolEvent' - $ref: '#/components/schemas/SessionNoteEvent' - $ref: '#/components/schemas/SessionRetryEvent' - $ref: '#/components/schemas/SessionUsageEvent' - $ref: '#/components/schemas/SessionCommittedEvent' - $ref: '#/components/schemas/SessionTurnCompletedEvent' - $ref: '#/components/schemas/SessionCompactedEvent' - $ref: '#/components/schemas/SessionErrorEvent' - $ref: '#/components/schemas/SessionInvalidateEvent' - $ref: '#/components/schemas/SessionKernelEvent' - $ref: '#/components/schemas/SessionGlancesEvent' ResetEvent: type: object properties: type: const: reset data: type: object properties: reason: type: string enum: [initial, generation_changed, replay_unavailable, recovery] required: [reason] additionalProperties: false required: [type, data] additionalProperties: false FailureEvent: type: object properties: type: const: failure data: $ref: '#/components/schemas/SafeReason' required: [type, data] additionalProperties: false ReplayBatch: type: object properties: generation: $ref: '#/components/schemas/Generation' cursor: $ref: '#/components/schemas/Counter' events: type: array items: $ref: '#/components/schemas/SessionEvent' maxItems: 256 description: Empty keepalive keeps the last sequence. Nonempty event sequences are contiguous from the requested cursor. required: [generation, cursor, events] additionalProperties: false examples: - generation: J6kYj6IGcXyP3eMIp-WL3A cursor: 1 events: - type: input sequence: 1 data: input: id: 01a0fcea-2b00-7000-8000-000000000002 session_id: 01a0fcea-2b00-7000-8000-000000000001 kind: message admission: accepted http_status: 202 problem: null accepted_at: '2026-10-02T14:00:00Z' acceptance_order: 1 delivery: pending blocking_reason: null transcript_position: null turn: null client_id: draft-1 ResetBatch: type: object properties: generation: $ref: '#/components/schemas/Generation' cursor: $ref: '#/components/schemas/Counter' events: type: array prefixItems: - $ref: '#/components/schemas/ResetEvent' items: $ref: '#/components/schemas/SessionEvent' minItems: 1 maxItems: 256 snapshot: $ref: '#/components/schemas/Session' description: Leading reset and complete snapshot. Later events, if any, follow the snapshot cursor. Envelope cursor advances through every delivered event. required: [generation, cursor, events, snapshot] additionalProperties: false examples: - generation: J6kYj6IGcXyP3eMIp-WL3A cursor: 0 events: - type: reset data: reason: initial snapshot: id: 01a0fcea-2b00-7000-8000-000000000001 name: New session automatic_name: New session workspace: /workspace/project location: host: null user: null path: /workspace/project label: null parent_id: null root_id: 01a0fcea-2b00-7000-8000-000000000001 address: null depth: 0 closed: false created_at: '2026-10-02T14:00:00Z' activity_at: '2026-10-02T14:00:00Z' provider_profile: personal model: example-model effort: null status: phase: idle run_id: null interrupt_requested: false blocking_reason: null preview: text: '' transcript_count: 0 truncated: false preferences: pinned: false pin_order: null archived: false opens: 0 current_progress: [] active_output: [] shell_commands: [] activity: lines: [] output_scalars: 0 output_utf8_bytes: 0 observed_at: '2026-10-02T14:00:00Z' latest_input: null latest_answer: null cursor: generation: J6kYj6IGcXyP3eMIp-WL3A sequence: 0 creation: submitted: kind: new workspace: /workspace/project name: null provider_profile: null model: null effort: null resolved: workspace: /workspace/project provider_profile: personal model: example-model effort: null revision: config-1 family_revision: family-1 configuration_resource: url: /sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration etag: '"session-config-1"' value: id: 01a0fcea-2b00-7000-8000-000000000001 name: New session workspace: /workspace/project provider_profile: personal model: example-model effort: null preferences: pinned: false pin_order: null archived: false selection: extensions: {} skills: {} instructions: {} mcp: {} revision: config-1 workspace_change: null selection: overrides: extensions: {} skills: {} instructions: {} mcp: {} effective: extensions: {} skills: {} instructions: {} mcp: {} composition: desired_revision: composition-1 loaded_revision: null needs_reload: true dependencies: {} quarantine: [] availability: {} kernel: instance_id: null state: none stage: null build: null stale: false staleness_reasons: [] live_job_count: 0 running_jobs: [] pending_inputs: [] input_order: 0 usage: model: null observed_at: null prompt_tokens: null cached_prompt_tokens: null cache_write_tokens: null completion_tokens: null total_tokens: null elapsed_ms: null tokens_per_second: null context_window_tokens: null cache_ttl_seconds: null cache_fade: [] history: items: [] older: null newer: null high_water: 0 glances: [] FailureBatch: type: object properties: generation: $ref: '#/components/schemas/Generation' cursor: $ref: '#/components/schemas/Counter' events: type: array items: $ref: '#/components/schemas/FailureEvent' minItems: 1 maxItems: 1 description: Terminal failure, alone with no snapshot. It does not commit a replacement cursor. required: [generation, cursor, events] additionalProperties: false examples: - generation: J6kYj6IGcXyP3eMIp-WL3A cursor: 0 events: - type: failure data: code: history_unavailable detail: Durable history could not be loaded. SessionBatch: oneOf: - $ref: '#/components/schemas/ReplayBatch' - $ref: '#/components/schemas/ResetBatch' - $ref: '#/components/schemas/FailureBatch' x-max-encoded-bytes: 1048576 ActivityEvent: type: object properties: type: const: activity data: type: object properties: session_id: $ref: '#/components/schemas/ID' cursor: $ref: '#/components/schemas/Cursor' status: $ref: '#/components/schemas/SessionStatus' current_progress: type: array items: $ref: '#/components/schemas/ToolProgress' maxItems: 32 activity: $ref: '#/components/schemas/Activity' required: [session_id, cursor, status, current_progress, activity] additionalProperties: false required: [type, data] additionalProperties: false CollectionInvalidateEvent: type: object properties: type: const: invalidate data: type: object properties: urls: type: array items: $ref: '#/components/schemas/ResourceURL' maxItems: 200 session_ids: type: array items: $ref: '#/components/schemas/ID' maxItems: 200 scope_dirty: type: boolean required: [urls, session_ids, scope_dirty] additionalProperties: false required: [type, data] additionalProperties: false CollectionMailEvent: type: object properties: type: const: mail data: $ref: '#/components/schemas/MailMetadata' required: [type, data] additionalProperties: false CollectionReadyEvent: type: object properties: type: const: ready data: $ref: '#/components/schemas/EmptyRequest' required: [type, data] additionalProperties: false CollectionResetEvent: type: object properties: type: const: reset data: type: object properties: reason: const: initial required: [reason] additionalProperties: false required: [type, data] additionalProperties: false CollectionOverflowEvent: type: object properties: type: const: overflow data: $ref: '#/components/schemas/EmptyRequest' required: [type, data] additionalProperties: false CollectionReadyBatch: type: object properties: events: type: array prefixItems: - $ref: '#/components/schemas/CollectionReadyEvent' - $ref: '#/components/schemas/CollectionResetEvent' items: false minItems: 2 maxItems: 2 required: [events] additionalProperties: false examples: - events: - type: ready data: {} - type: reset data: reason: initial CollectionBatch: oneOf: - $ref: '#/components/schemas/CollectionReadyBatch' - type: object properties: events: type: array items: oneOf: - $ref: '#/components/schemas/ActivityEvent' - $ref: '#/components/schemas/CollectionInvalidateEvent' - $ref: '#/components/schemas/CollectionMailEvent' maxItems: 256 required: [events] additionalProperties: false - type: object properties: events: type: array items: $ref: '#/components/schemas/CollectionOverflowEvent' minItems: 1 maxItems: 1 required: [events] additionalProperties: false x-max-encoded-bytes: 1048576 examples: - events: - type: activity data: session_id: 01a0fcea-2b00-7000-8000-000000000001 cursor: generation: J6kYj6IGcXyP3eMIp-WL3A sequence: 0 status: phase: idle run_id: null interrupt_requested: false blocking_reason: null current_progress: [] active_output: [] activity: lines: [] output_scalars: 0 output_utf8_bytes: 0 observed_at: '2026-10-02T14:00:00Z' latest_input: null latest_answer: null SessionSSE: type: object properties: data: type: string contentMediaType: application/json contentSchema: $ref: '#/components/schemas/SessionBatch' description: One parsed SSE event. Decode data as JSON and validate SessionBatch separately; contentSchema is not asserted by ordinary JSON Schema validation. No event, id or retry fields are emitted. required: [data] additionalProperties: false examples: - data: '{"generation":"J6kYj6IGcXyP3eMIp-WL3A","cursor":0,"events":[{"type":"reset","data":{"reason":"initial"}}],"snapshot":{"id":"01a0fcea-2b00-7000-8000-000000000001","name":"New session","automatic_name":"New session","workspace":"/workspace/project","location":{"host":null,"user":null,"path":"/workspace/project","label":null},"parent_id":null,"root_id":"01a0fcea-2b00-7000-8000-000000000001","address":null,"depth":0,"closed":false,"created_at":"2026-10-02T14:00:00Z","activity_at":"2026-10-02T14:00:00Z","provider_profile":"personal","model":"example-model","effort":null,"status":{"phase":"idle","run_id":null,"interrupt_requested":false,"blocking_reason":null},"preview":{"text":"","transcript_count":0,"truncated":false},"preferences":{"pinned":false,"pin_order":null,"archived":false,"opens":0},"current_progress":[],"activity":{"lines":[],"output_scalars":0,"output_utf8_bytes":0,"observed_at":"2026-10-02T14:00:00Z","latest_input":null,"latest_answer":null},"cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"creation":{"submitted":{"kind":"new","workspace":"/workspace/project","name":null,"provider_profile":null,"model":null,"effort":null},"resolved":{"workspace":"/workspace/project","provider_profile":"personal","model":"example-model","effort":null}},"revision":"config-1","family_revision":"family-1","configuration_resource":{"url":"/sessions/01a0fcea-2b00-7000-8000-000000000001?view=configuration","etag":"\"session-config-1\"","value":{"id":"01a0fcea-2b00-7000-8000-000000000001","name":"New session","workspace":"/workspace/project","provider_profile":"personal","model":"example-model","effort":null,"preferences":{"pinned":false,"pin_order":null,"archived":false},"selection":{"extensions":{},"skills":{},"instructions":{},"mcp":{}},"revision":"config-1"}},"workspace_change":null,"selection":{"overrides":{"extensions":{},"skills":{},"instructions":{},"mcp":{}},"effective":{"extensions":{},"skills":{},"instructions":{},"mcp":{}}},"composition":{"desired_revision":"composition-1","loaded_revision":null,"needs_reload":true,"dependencies":{},"quarantine":[],"availability":{}},"kernel":{"instance_id":null,"state":"none","stage":null,"build":null,"stale":false,"staleness_reasons":[],"live_job_count":0,"running_jobs":[]},"pending_inputs":[],"input_order":0,"usage":{"model":null,"observed_at":null,"prompt_tokens":null,"cached_prompt_tokens":null,"cache_write_tokens":null,"completion_tokens":null,"total_tokens":null,"elapsed_ms":null,"tokens_per_second":null,"context_window_tokens":null,"cache_ttl_seconds":null,"cache_fade":[]},"history":{"items":[],"older":null,"newer":null,"high_water":0},"glances":[]}}' - data: '{"generation":"J6kYj6IGcXyP3eMIp-WL3A","cursor":1,"events":[{"type":"input","sequence":1,"data":{"input":{"id":"01a0fcea-2b00-7000-8000-000000000002","session_id":"01a0fcea-2b00-7000-8000-000000000001","kind":"message","admission":"accepted","http_status":202,"problem":null,"accepted_at":"2026-10-02T14:00:00Z","acceptance_order":1,"delivery":"pending","blocking_reason":null,"transcript_position":null,"turn":null,"client_id":"draft-1"}}}]}' CollectionSSE: type: object properties: data: type: string contentMediaType: application/json contentSchema: $ref: '#/components/schemas/CollectionBatch' description: One parsed SSE event. Decode data as JSON and validate CollectionBatch separately; contentSchema is not asserted by ordinary JSON Schema validation. No event, id or retry fields are emitted. required: [data] additionalProperties: false examples: - data: '{"events":[{"type":"ready","data":{}},{"type":"reset","data":{"reason":"initial"}}]}' - data: '{"events":[{"type":"activity","data":{"session_id":"01a0fcea-2b00-7000-8000-000000000001","cursor":{"generation":"J6kYj6IGcXyP3eMIp-WL3A","sequence":0},"status":{"phase":"idle","run_id":null,"interrupt_requested":false,"blocking_reason":null},"current_progress":[],"activity":{"lines":[],"output_scalars":0,"output_utf8_bytes":0,"observed_at":"2026-10-02T14:00:00Z","latest_input":null,"latest_answer":null}}}]}' WorkItem: type: object properties: id: $ref: '#/components/schemas/ID' workspace: $ref: '#/components/schemas/Workspace' title: type: string x-max-utf8-bytes: 4096 maxLength: 4096 notes: type: string x-max-utf8-bytes: 32768 maxLength: 32768 parent_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' status: type: string enum: [open, active, blocked, done, cancelled] revision: $ref: '#/components/schemas/ID' created_at: $ref: '#/components/schemas/Timestamp' updated_at: $ref: '#/components/schemas/Timestamp' required: [id, workspace, title, notes, parent_id, session_id, run_id, status, revision, created_at, updated_at] additionalProperties: false WorkCreate: type: object properties: title: type: string x-max-utf8-bytes: 4096 maxLength: 4096 notes: type: string x-max-utf8-bytes: 32768 maxLength: 32768 parent_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' notify_session_id: $ref: '#/components/schemas/ID' required: [title] additionalProperties: false examples: - title: Fix the parser WorkPatch: type: object properties: title: type: string x-max-utf8-bytes: 4096 maxLength: 4096 notes: type: string x-max-utf8-bytes: 32768 maxLength: 32768 session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' run_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' status: type: string enum: [open, active, blocked, done, cancelled] notify_session_id: $ref: '#/components/schemas/ID' additionalProperties: false Paperclip: type: object properties: id: $ref: '#/components/schemas/ID' topic: type: string enum: [harness, workflow, bug, user, other] title: type: string x-max-utf8-bytes: 4096 maxLength: 4096 message: type: string minLength: 1 pattern: \S x-max-utf8-bytes: 32768 maxLength: 32768 suggestion: type: string x-max-utf8-bytes: 16384 maxLength: 16384 reply: type: string x-max-utf8-bytes: 16384 maxLength: 16384 status: type: string enum: [open, acknowledged, resolved, dismissed] session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' workspace: anyOf: - $ref: '#/components/schemas/Workspace' - type: 'null' created_at: $ref: '#/components/schemas/Timestamp' updated_at: $ref: '#/components/schemas/Timestamp' resolution: type: string x-max-utf8-bytes: 16384 maxLength: 16384 resolving_session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' revision: $ref: '#/components/schemas/ID' required: [id, topic, title, message, suggestion, reply, status, session_id, workspace, created_at, updated_at, resolution, resolving_session_id, revision] additionalProperties: false PaperclipCreate: type: object properties: topic: type: string enum: [harness, workflow, bug, user, other] title: type: string x-max-utf8-bytes: 4096 maxLength: 4096 message: type: string minLength: 1 pattern: \S x-max-utf8-bytes: 32768 maxLength: 32768 suggestion: type: string x-max-utf8-bytes: 16384 maxLength: 16384 session_id: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' workspace: anyOf: - $ref: '#/components/schemas/Workspace' - type: 'null' required: [message] additionalProperties: false PaperclipPatch: type: object properties: status: type: string enum: [acknowledged, resolved, dismissed] reply: type: string x-max-utf8-bytes: 16384 maxLength: 16384 resolution: type: string x-max-utf8-bytes: 16384 maxLength: 16384 description: Reply cannot accompany resolved or dismissed status. It acknowledges the item. additionalProperties: false ScheduleJob: type: object properties: id: $ref: '#/components/schemas/ID' session_id: $ref: '#/components/schemas/ID' kind: type: string enum: [once, recurring, heartbeat] prompt: type: string minLength: 1 x-max-utf8-bytes: 4096 maxLength: 4096 next_at: $ref: '#/components/schemas/Timestamp' every_seconds: anyOf: - type: integer minimum: 60 maximum: 31536000 - type: 'null' revision: $ref: '#/components/schemas/ID' created_at: description: Null for historical schedules that did not record creation time. anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' updated_at: description: Null until a historical schedule records a new update. anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' required: [id, session_id, kind, prompt, next_at, every_seconds, revision, created_at, updated_at] additionalProperties: false ScheduleCreate: type: object properties: session_id: $ref: '#/components/schemas/ID' kind: type: string enum: [once, recurring, heartbeat] prompt: type: string minLength: 1 x-max-utf8-bytes: 4096 maxLength: 4096 delay_seconds: type: integer minimum: 0 maximum: 31536000 default: 0 every_seconds: type: integer minimum: 60 maximum: 31536000 required: [session_id, kind, prompt] additionalProperties: false allOf: - if: properties: kind: const: once then: not: required: [every_seconds] else: required: [every_seconds] SchedulePatch: type: object properties: kind: type: string enum: [once, recurring, heartbeat] prompt: type: string minLength: 1 x-max-utf8-bytes: 4096 maxLength: 4096 delay_seconds: type: integer minimum: 0 maximum: 31536000 every_seconds: anyOf: - type: integer minimum: 60 maximum: 31536000 - type: 'null' description: 'Validate complete candidate: once has null repetition; recurring and heartbeat require every_seconds.' additionalProperties: false LinkConfiguration: type: object properties: workspace: $ref: '#/components/schemas/Workspace' group_id: $ref: '#/components/schemas/ID' members: type: array items: $ref: '#/components/schemas/Workspace' maxItems: 200 revision: $ref: '#/components/schemas/ID' next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [workspace, group_id, members, revision, next] additionalProperties: false LinkConfigurationResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/LinkConfiguration' required: [url, etag, value] additionalProperties: false LinkGroup: type: object properties: page: $ref: '#/components/schemas/PageDescriptor' configuration_resource: $ref: '#/components/schemas/LinkConfigurationResource' presence: type: array items: type: object properties: workspace: $ref: '#/components/schemas/Workspace' exists: description: Observed directory presence. Null for an uninspected or unreachable location. anyOf: - type: boolean - type: 'null' session_count: $ref: '#/components/schemas/Counter' host: anyOf: - $ref: '#/components/schemas/Host' - type: 'null' required: [workspace, session_count, host, exists] additionalProperties: false maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [configuration_resource, presence, next] additionalProperties: false LinkMerge: type: object properties: other_workspace: $ref: '#/components/schemas/Workspace' other_etag: $ref: '#/components/schemas/ETag' required: [other_workspace, other_etag] additionalProperties: false LinkChange: type: object properties: resource: $ref: '#/components/schemas/LinkConfigurationResource' notifications: type: array items: $ref: '#/components/schemas/TargetNotification' maxItems: 200 notification_count: $ref: '#/components/schemas/Counter' truncated: type: boolean required: [resource, notifications, notification_count, truncated] additionalProperties: false HookConfiguration: type: object properties: id: $ref: '#/components/schemas/ID' name: type: string pattern: ^[A-Za-z0-9_-]{1,64}$ maxLength: 64 session_id: $ref: '#/components/schemas/ID' enabled: type: boolean signature_header: type: string pattern: ^[A-Za-z0-9-]{1,64}$ maxLength: 64 signature_prefix: type: string pattern: ^[^\r\n]*$ x-max-utf8-bytes: 32 maxLength: 32 revision: $ref: '#/components/schemas/ID' required: [id, name, session_id, enabled, signature_header, signature_prefix, revision] additionalProperties: false HookConfigurationResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/HookConfiguration' required: [url, etag, value] additionalProperties: false Hook: type: object properties: configuration_resource: $ref: '#/components/schemas/HookConfigurationResource' delivery_url: description: Where a sender posts this hook's deliveries; null while no webhook intake listener runs. anyOf: - type: string format: uri maxLength: 4096 - type: 'null' pending_count: $ref: '#/components/schemas/Counter' deferral_reason: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [configuration_resource, delivery_url, pending_count, deferral_reason] additionalProperties: false HookCreate: type: object properties: name: type: string pattern: ^[A-Za-z0-9_-]{1,64}$ maxLength: 64 session_id: $ref: '#/components/schemas/ID' enabled: type: boolean signature_header: type: string pattern: ^[A-Za-z0-9-]{1,64}$ maxLength: 64 signature_prefix: type: string pattern: ^[^\r\n]*$ x-max-utf8-bytes: 32 maxLength: 32 secret: type: string minLength: 1 writeOnly: true x-min-utf8-bytes: 16 x-max-utf8-bytes: 4096 maxLength: 4096 required: [name, session_id] additionalProperties: false examples: - session_id: 01a0fcea-2b00-7000-8000-000000000001 name: ci HookPatch: type: object properties: name: type: string pattern: ^[A-Za-z0-9_-]{1,64}$ maxLength: 64 enabled: type: boolean signature_header: type: string pattern: ^[A-Za-z0-9-]{1,64}$ maxLength: 64 signature_prefix: type: string pattern: ^[^\r\n]*$ x-max-utf8-bytes: 32 maxLength: 32 additionalProperties: false HookSecretRequest: type: object properties: secret: type: string minLength: 1 writeOnly: true x-min-utf8-bytes: 16 x-max-utf8-bytes: 4096 maxLength: 4096 additionalProperties: false HookChange: type: object properties: resource: $ref: '#/components/schemas/HookConfigurationResource' notification: $ref: '#/components/schemas/Notification' secret: type: string minLength: 1 x-min-utf8-bytes: 16 x-max-utf8-bytes: 4096 maxLength: 4096 description: Secret appears only on creation and explicit rotation, including a generated secret. Never present on PATCH or reads. required: [resource, notification] additionalProperties: false examples: - resource: url: /extensions/webhooks/hooks/hook-1?view=configuration etag: '"hook-revision-1"' value: id: hook-1 name: ci session_id: 01a0fcea-2b00-7000-8000-000000000001 enabled: true signature_header: X-Albedo-Signature signature_prefix: sha256= revision: hook-revision-1 notification: state: not_requested code: null detail: null secret: synthetic-example-hook-secret HookPermission: type: object properties: session_id: $ref: '#/components/schemas/ID' agent_manage: type: boolean revision: $ref: '#/components/schemas/ID' required: [session_id, agent_manage, revision] additionalProperties: false HookPermissionPatch: type: object properties: agent_manage: type: boolean additionalProperties: false HookPermissionResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/HookPermission' required: [url, etag, value] additionalProperties: false HookPermissionChange: type: object properties: resource: $ref: '#/components/schemas/HookPermissionResource' notification: $ref: '#/components/schemas/Notification' required: [resource, notification] additionalProperties: false DiscordID: type: string minLength: 1 maxLength: 64 description: Discord snowflake as decimal text. DiscordBot: type: object properties: id: $ref: '#/components/schemas/ID' session_id: $ref: '#/components/schemas/ID' name: type: string minLength: 1 maxLength: 64 owner_id: $ref: '#/components/schemas/DiscordID' enabled: type: boolean revision: type: integer minimum: 1 state: type: string enum: [disabled, connecting, online, reconnecting, failed] detail: anyOf: - type: string maxLength: 4096 - type: 'null' user: anyOf: - $ref: '#/components/schemas/DiscordBotUser' - type: 'null' application_id: anyOf: - $ref: '#/components/schemas/DiscordID' - type: 'null' invite_url: anyOf: - type: string maxLength: 4096 - type: 'null' channels: $ref: '#/components/schemas/Counter' allowed: $ref: '#/components/schemas/Counter' requests: $ref: '#/components/schemas/Counter' required: [id, session_id, name, owner_id, enabled, revision, state, detail, user, application_id, invite_url, channels, allowed, requests] additionalProperties: false description: A session's Discord bot. The token never leaves the daemon. DiscordBotUser: type: object properties: id: $ref: '#/components/schemas/DiscordID' username: type: string maxLength: 256 required: [id, username] additionalProperties: false DiscordBotPage: type: object properties: items: type: array items: $ref: '#/components/schemas/DiscordBot' required: [items] additionalProperties: false DiscordBotCreate: type: object properties: session_id: $ref: '#/components/schemas/ID' name: type: string minLength: 1 maxLength: 64 token: type: string minLength: 1 maxLength: 4096 owner_id: type: string pattern: ^[0-9]{17,20}$ required: [session_id, name, token, owner_id] additionalProperties: false DiscordBotPatch: type: object properties: revision: type: integer minimum: 1 name: type: string minLength: 1 maxLength: 64 token: type: string minLength: 1 maxLength: 4096 owner_id: type: string pattern: ^[0-9]{17,20}$ enabled: type: boolean required: [revision] additionalProperties: false DiscordDeletion: type: object properties: deleted: $ref: '#/components/schemas/ID' required: [deleted] additionalProperties: false DiscordUserDeletion: type: object properties: deleted: $ref: '#/components/schemas/DiscordID' required: [deleted] additionalProperties: false DiscordDelivery: type: string enum: ['off', turn, tool] description: off ignores the channel; turn queues messages until the running turn ends; tool steers the running turn after its current tool call. DiscordGuildList: type: object properties: guilds: type: array items: $ref: '#/components/schemas/DiscordGuild' required: [guilds] additionalProperties: false DiscordGuild: type: object properties: id: $ref: '#/components/schemas/DiscordID' name: type: string maxLength: 256 channels: type: array items: $ref: '#/components/schemas/DiscordChannel' required: [id, name, channels] additionalProperties: false DiscordChannel: type: object properties: id: $ref: '#/components/schemas/DiscordID' name: type: string maxLength: 256 type: type: integer description: Discord channel type; 0 text, 2 voice, 4 category, 5 announcement, 15 forum. parent_id: anyOf: - $ref: '#/components/schemas/DiscordID' - type: 'null' position: type: integer delivery: $ref: '#/components/schemas/DiscordDelivery' mentions_only: type: boolean required: [id, name, type, parent_id, position, delivery, mentions_only] additionalProperties: false DiscordChannelSetting: type: object properties: delivery: $ref: '#/components/schemas/DiscordDelivery' mentions_only: type: boolean guild_id: $ref: '#/components/schemas/DiscordID' guild_name: type: string maxLength: 256 channel_name: type: string maxLength: 256 required: [delivery, mentions_only] additionalProperties: false DiscordChannelState: type: object properties: channel_id: $ref: '#/components/schemas/DiscordID' delivery: $ref: '#/components/schemas/DiscordDelivery' mentions_only: type: boolean required: [channel_id, delivery, mentions_only] additionalProperties: false DiscordDMs: type: object properties: owner: $ref: '#/components/schemas/DiscordOwner' allowed: type: array items: $ref: '#/components/schemas/DiscordAllowed' requests: type: array items: $ref: '#/components/schemas/DiscordRequest' maxItems: 50 required: [owner, allowed, requests] additionalProperties: false DiscordOwner: type: object properties: user_id: $ref: '#/components/schemas/DiscordID' name: anyOf: - type: string maxLength: 256 - type: 'null' required: [user_id, name] additionalProperties: false DiscordAllowed: type: object properties: user_id: $ref: '#/components/schemas/DiscordID' name: anyOf: - type: string maxLength: 256 - type: 'null' added_at: type: integer minimum: 0 description: Unix milliseconds. required: [user_id, name, added_at] additionalProperties: false DiscordRequest: type: object properties: user_id: $ref: '#/components/schemas/DiscordID' username: type: string maxLength: 256 preview: type: string maxLength: 200 last_at: type: integer minimum: 0 description: Unix milliseconds. count: type: integer minimum: 1 required: [user_id, username, preview, last_at, count] additionalProperties: false description: Someone whose DMs were refused because they are not on the allow list. DiscordAllow: type: object properties: name: anyOf: - type: string maxLength: 256 - type: 'null' required: [name] additionalProperties: false Delivery: type: object properties: id: $ref: '#/components/schemas/ID' hook_id: $ref: '#/components/schemas/ID' session_id: $ref: '#/components/schemas/ID' received_at: $ref: '#/components/schemas/Timestamp' delivered_at: anyOf: - $ref: '#/components/schemas/Timestamp' - type: 'null' attempts: $ref: '#/components/schemas/Counter' deferral_reason: anyOf: - $ref: '#/components/schemas/SafeReason' - type: 'null' required: [id, hook_id, session_id, received_at, delivered_at, attempts, deferral_reason] DeliveryDetail: allOf: - $ref: '#/components/schemas/Delivery' - type: object properties: payload: type: object properties: encoding: type: string enum: [utf8, base64] data: type: string maxLength: 90000 required: [encoding, data] additionalProperties: false required: [payload] WorkResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/WorkItem' required: [url, etag, value] additionalProperties: false WorkChange: type: object properties: resource: $ref: '#/components/schemas/WorkResource' notification: $ref: '#/components/schemas/Notification' required: [resource, notification] additionalProperties: false examples: - resource: url: /extensions/work/items/work-1?workspace=%2Fworkspace%2Fproject etag: '"work-revision-1"' value: id: work-1 workspace: /workspace/project title: Fix the parser notes: '' parent_id: null session_id: null run_id: null status: open revision: work-revision-1 created_at: '2026-10-02T14:00:00Z' updated_at: '2026-10-02T14:00:00Z' notification: state: not_requested code: null detail: null WorkPage: type: object properties: items: type: array items: $ref: '#/components/schemas/WorkResource' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' page: $ref: '#/components/schemas/PageDescriptor' glance: $ref: '#/components/schemas/Glance' required: [items, next] additionalProperties: false PaperclipResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/Paperclip' required: [url, etag, value] additionalProperties: false PaperclipChange: type: object properties: resource: $ref: '#/components/schemas/PaperclipResource' notification: $ref: '#/components/schemas/Notification' required: [resource, notification] additionalProperties: false PaperclipPage: type: object properties: items: type: array items: $ref: '#/components/schemas/PaperclipResource' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' page: $ref: '#/components/schemas/PageDescriptor' glance: $ref: '#/components/schemas/Glance' required: [items, next] additionalProperties: false WebSearchProvider: type: object properties: name: $ref: '#/components/schemas/ID' label: type: string maxLength: 256 position: type: integer minimum: 1 enabled: type: boolean required: [name, label, position, enabled] additionalProperties: false WebSearchProviderResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/WebSearchProvider' required: [url, etag, value] additionalProperties: false WebSearchProviderPage: type: object properties: items: type: array items: $ref: '#/components/schemas/WebSearchProviderResource' maxItems: 200 next: type: 'null' page: $ref: '#/components/schemas/PageDescriptor' required: [items, next, page] additionalProperties: false WebSearchProviderChangeRequest: type: object properties: change: type: string enum: [up, down, toggle] required: [change] additionalProperties: false WebSearchProviderChange: type: object properties: resource: $ref: '#/components/schemas/WebSearchProviderResource' required: [resource] additionalProperties: false ScheduleResource: type: object properties: url: $ref: '#/components/schemas/ResourceURL' etag: $ref: '#/components/schemas/ETag' value: $ref: '#/components/schemas/ScheduleJob' required: [url, etag, value] additionalProperties: false ScheduleChange: type: object properties: resource: $ref: '#/components/schemas/ScheduleResource' notification: $ref: '#/components/schemas/Notification' required: [resource, notification] additionalProperties: false SchedulePage: type: object properties: items: type: array items: $ref: '#/components/schemas/ScheduleResource' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' page: $ref: '#/components/schemas/PageDescriptor' glance: $ref: '#/components/schemas/Glance' required: [items, next] additionalProperties: false HookPage: type: object properties: items: type: array items: $ref: '#/components/schemas/Hook' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [items, next] additionalProperties: false DeliveryPage: type: object properties: items: type: array items: $ref: '#/components/schemas/Delivery' maxItems: 200 next: anyOf: - $ref: '#/components/schemas/PageToken' - type: 'null' required: [items, next] additionalProperties: false ExtensionDeletion: type: object properties: id: $ref: '#/components/schemas/ID' notification: $ref: '#/components/schemas/Notification' required: [id, notification] additionalProperties: false ProxyTextPart: type: object properties: type: const: text text: type: string required: [type, text] additionalProperties: false ProxyImagePart: type: object properties: type: const: image_url image_url: type: object properties: url: type: string pattern: ^data:image/(png|jpeg|gif|webp);base64, detail: type: string enum: [auto, low, high] required: [url] additionalProperties: false required: [type, image_url] additionalProperties: false ProxyToolCall: type: object properties: id: type: string minLength: 1 maxLength: 270000 type: const: function function: type: object properties: name: type: string minLength: 1 maxLength: 256 arguments: type: string required: [name, arguments] additionalProperties: false required: [id, type, function] additionalProperties: false ProxyMessage: type: object properties: role: type: string enum: [system, developer, user, assistant, tool] content: anyOf: - oneOf: - type: string - type: array items: oneOf: - $ref: '#/components/schemas/ProxyTextPart' - $ref: '#/components/schemas/ProxyImagePart' - type: 'null' name: type: string maxLength: 256 tool_call_id: type: string minLength: 1 maxLength: 270000 tool_calls: type: array items: $ref: '#/components/schemas/ProxyToolCall' maxItems: 200 reasoning_content: anyOf: - type: string - type: 'null' description: Tool messages require tool_call_id. Only assistant messages carry tool_calls. Images are accepted only as user data URLs. required: [role] additionalProperties: false ProxyToolDefinition: type: object properties: type: const: function function: type: object properties: name: type: string minLength: 1 maxLength: 256 description: type: string parameters: $ref: '#/components/schemas/DynamicJSON' strict: type: boolean required: [name] additionalProperties: false required: [type, function] additionalProperties: false ProxyCompletionRequest: type: object properties: model: type: string minLength: 1 maxLength: 577 messages: type: array items: $ref: '#/components/schemas/ProxyMessage' tools: type: array items: $ref: '#/components/schemas/ProxyToolDefinition' maxItems: 200 max_tokens: type: integer minimum: 1 maximum: 9007199254740991 max_completion_tokens: type: integer minimum: 1 maximum: 9007199254740991 temperature: type: number minimum: 0 maximum: 2 top_p: type: number minimum: 0 maximum: 1 stop: oneOf: - type: string - type: array items: type: string maxItems: 4 tool_choice: oneOf: - type: string enum: [none, auto, required] - type: object properties: type: const: function function: type: object properties: name: type: string minLength: 1 maxLength: 256 required: [name] additionalProperties: false required: [type, function] additionalProperties: false parallel_tool_calls: type: boolean reasoning_effort: type: string maxLength: 100 reasoning: type: object properties: effort: type: string maxLength: 100 required: [effort] additionalProperties: false response_format: oneOf: - type: object properties: type: const: json_object required: [type] additionalProperties: false - type: object properties: type: const: json_schema json_schema: type: object properties: name: type: string maxLength: 256 description: type: string schema: $ref: '#/components/schemas/DynamicJSON' strict: type: boolean required: [name, schema] additionalProperties: false required: [type, json_schema] additionalProperties: false stream: type: boolean default: false stream_options: type: object properties: include_usage: type: boolean additionalProperties: false x-max-encoded-bytes: 32000000 required: [model, messages] additionalProperties: false examples: - model: personal/example-model messages: - role: user content: Hello stream: true ProxyUsage: type: object properties: prompt_tokens_details: type: object properties: cached_tokens: $ref: '#/components/schemas/Counter' required: [cached_tokens] additionalProperties: false completion_tokens_details: type: object properties: reasoning_tokens: $ref: '#/components/schemas/Counter' required: [reasoning_tokens] additionalProperties: false prompt_tokens: $ref: '#/components/schemas/Counter' completion_tokens: $ref: '#/components/schemas/Counter' total_tokens: $ref: '#/components/schemas/Counter' required: [prompt_tokens, completion_tokens, total_tokens] additionalProperties: false ProxyError: type: object properties: error: type: object properties: message: type: string maxLength: 4096 type: type: string maxLength: 100 code: anyOf: - type: string maxLength: 100 - type: 'null' param: anyOf: - type: string maxLength: 256 - type: 'null' required: [message, type, code, param] additionalProperties: false required: [error] additionalProperties: false ProxyCompletion: type: object properties: id: $ref: '#/components/schemas/ID' object: const: chat.completion created: $ref: '#/components/schemas/Counter' model: type: string maxLength: 577 choices: type: array items: type: object properties: index: $ref: '#/components/schemas/Counter' message: type: object properties: role: const: assistant content: anyOf: - type: string - type: 'null' reasoning_content: anyOf: - type: string - type: 'null' tool_calls: type: array items: $ref: '#/components/schemas/ProxyToolCall' maxItems: 200 required: [role, content] additionalProperties: false finish_reason: type: string enum: [stop, length, tool_calls, content_filter] required: [index, message, finish_reason] additionalProperties: false minItems: 1 maxItems: 1 usage: anyOf: - $ref: '#/components/schemas/ProxyUsage' - type: 'null' required: [id, object, created, model, choices, usage] additionalProperties: false examples: - id: completion-1 object: chat.completion created: 1790949600 model: personal/example-model choices: - index: 0 message: role: assistant content: Hello finish_reason: stop usage: prompt_tokens: 1 completion_tokens: 1 total_tokens: 2 ProxyToolDelta: type: object properties: index: $ref: '#/components/schemas/Counter' id: type: string minLength: 1 maxLength: 270000 type: const: function function: type: object properties: name: type: string maxLength: 256 arguments: type: string required: [name, arguments] additionalProperties: false required: [index] additionalProperties: false ProxyChunk: type: object properties: id: $ref: '#/components/schemas/ID' object: const: chat.completion.chunk created: $ref: '#/components/schemas/Counter' model: type: string maxLength: 577 choices: type: array items: type: object properties: index: $ref: '#/components/schemas/Counter' delta: type: object properties: role: const: assistant content: type: string reasoning_content: type: string tool_calls: type: array items: $ref: '#/components/schemas/ProxyToolDelta' maxItems: 200 additionalProperties: false finish_reason: anyOf: - type: string enum: [stop, length, tool_calls, content_filter] - type: 'null' required: [index, delta, finish_reason] additionalProperties: false maxItems: 1 usage: anyOf: - $ref: '#/components/schemas/ProxyUsage' - type: 'null' required: [id, object, created, model, choices] additionalProperties: false ProxySSE: type: object properties: data: anyOf: - const: '[DONE]' - type: string contentMediaType: application/json contentSchema: oneOf: - $ref: '#/components/schemas/ProxyChunk' - $ref: '#/components/schemas/ProxyError' description: Data is a JSON chunk or error, followed by literal [DONE]. Validate decoded JSON explicitly. required: [data] additionalProperties: false ProxyModels: type: object properties: object: const: list data: type: array items: type: object properties: id: type: string minLength: 1 maxLength: 577 object: const: model created: $ref: '#/components/schemas/Counter' owned_by: type: string maxLength: 256 required: [id, object, created, owned_by] additionalProperties: false errors: type: array items: type: object properties: profile: $ref: '#/components/schemas/ID' message: type: string maxLength: 4096 required: [profile, message] additionalProperties: false maxItems: 200 required: [object, data] additionalProperties: false AdmissionProblem: type: object properties: type: const: about:blank title: type: string maxLength: 256 status: type: integer minimum: 400 maximum: 599 detail: type: string maxLength: 4096 code: type: string minLength: 1 maxLength: 100 fields: type: array items: type: object properties: pointer: type: string maxLength: 4096 detail: type: string maxLength: 4096 required: [pointer, detail] additionalProperties: false maxItems: 100 required: [type, title, status, detail, code] additionalProperties: false ContextCompaction: type: object properties: status: type: string enum: [not_configured, not_needed, compacted, unknown] strategy: anyOf: - $ref: '#/components/schemas/ID' - type: 'null' trigger_free_percent: anyOf: - type: number minimum: 0 maximum: 100 - type: 'null' input_limit_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' estimated_input_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' provider_input_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' provider_cached_input_tokens: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' before_items: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' after_items: anyOf: - $ref: '#/components/schemas/Counter' - type: 'null' source: anyOf: - type: string maxLength: 512 - type: 'null' estimate_method: anyOf: - type: string maxLength: 512 - type: 'null' required: [status, strategy, trigger_free_percent, input_limit_tokens, estimated_input_tokens, provider_input_tokens, provider_cached_input_tokens, before_items, after_items, source, estimate_method] additionalProperties: false