@aiquants/chat 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +234 -18
- package/dist/{ChatAnswerHtml-NBI6KBTM.js → ChatAnswerHtml-NAD7XPMQ.js} +1 -1
- package/dist/{chunk-NKHHXW42.js → chunk-44WLZMPZ.js} +1 -1
- package/dist/chunk-BTDHRYBO.js +1 -0
- package/dist/chunk-GSCTWGZT.js +1 -0
- package/dist/chunk-HC7HXC2K.js +1 -0
- package/dist/{chunk-PLNRET3Z.js → chunk-KNPMHSTQ.js} +1 -1
- package/dist/{chunk-7KWWXSGA.js → chunk-NWDLT2AZ.js} +1 -1
- package/dist/client.cjs +2 -2
- package/dist/client.d.cts +5 -5
- package/dist/client.d.ts +5 -5
- package/dist/client.js +1 -1
- package/dist/{httpTransport-BAaKwioS.d.ts → httpTransport-Cgj10OUn.d.ts} +1 -1
- package/dist/{httpTransport-D_JJABMq.d.cts → httpTransport-o7MkPUuY.d.cts} +1 -1
- package/dist/{index-iHWm67aF.d.cts → index-g-wjju1F.d.cts} +9518 -1785
- package/dist/{index-iHWm67aF.d.ts → index-g-wjju1F.d.ts} +9518 -1785
- package/dist/protocol.cjs +1 -1
- package/dist/protocol.d.cts +1 -1
- package/dist/protocol.d.ts +1 -1
- package/dist/protocol.js +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.d.cts +295 -56
- package/dist/react.d.ts +295 -56
- package/dist/react.js +2 -2
- package/dist/{runStream-7KHfaNOq.d.ts → runStream-Wn5F3RKe.d.ts} +1 -1
- package/dist/{runStream-CKisFztQ.d.cts → runStream-jp4rlkIw.d.cts} +1 -1
- package/dist/testing.cjs +6 -6
- package/dist/testing.d.cts +55 -4
- package/dist/testing.d.ts +55 -4
- package/dist/testing.js +6 -6
- package/dist/{transport-Clvkp7mW.d.ts → transport-CYd9hh42.d.cts} +23 -1
- package/dist/{transport-5ExGY_ti.d.cts → transport-DlhniH4C.d.ts} +23 -1
- package/package.json +7 -7
- package/dist/chunk-4NR4KSV6.js +0 -1
- package/dist/chunk-EEUIBWBF.js +0 -1
- package/dist/chunk-WGNEBS4H.js +0 -1
package/dist/testing.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
`)
|
|
1
|
+
import{a as Oe,b as Ae,c as xe,d as Ne,e as Te,f as _e,g as je,h as Be}from"./chunk-HC7HXC2K.js";import{a as m,c as ke,d as F,f as G,h as ve}from"./chunk-NWDLT2AZ.js";import{a as c,c as J}from"./chunk-KNPMHSTQ.js";import{C as Q,D as ye,E as fe,J as ge,K as me,L as Ee,M as we,O as be,a as he,b as ne,cb as Z,db as Se,eb as Re,f as x,fb as Ce,gb as P,hb as $e,l as pe}from"./chunk-GSCTWGZT.js";import{z as oe}from"zod";var Pe="application/json",ae="multipart/form-data",Me=Object.freeze({body:void 0,filenames:Object.freeze([])}),dt=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+/,ct=/[\t ]*;[\t ]*(?:([!#$%&'*+.^_`|~0-9A-Za-z-]+)=([!#$%&'*+.^_`|~0-9A-Za-z-]+|"(?:[\t !#-\x5b\x5d-~\x80-\xff]|\\[\t -~\x80-\xff])*"))?/y,lt=/^[0-9A-Za-z'()+_,./:=? -]{0,69}[0-9A-Za-z'()+_,./:=?-]$/,ut=/^([!#$%&'*+.^_`|~0-9A-Za-z-]+):[\t ]*([^\r\n]*?)[\t ]*$/,ht=Object.freeze(["content-disposition","content-type"]),pt=/^form-data/i,yt=/[\t ]*;[\t ]*([!#$%&'*+.^_`|~0-9A-Za-z-]+)="([^"]*)"/y,ft=Object.freeze(["name","filename"]),Ue=Object.freeze(Object.keys(x.attachments.upload)),Y=new TextEncoder,W=Y.encode(`\r
|
|
2
|
+
`),Le=Y.encode(`\r
|
|
3
3
|
\r
|
|
4
|
-
`),
|
|
5
|
-
`)){let i=
|
|
6
|
-
`);if(!
|
|
7
|
-
--${t}`),a=[],i=r.length;for(;;){let s=xe(e,o,i);if(s===-1)throw n("whose part is not closed by a delimiter");a.push(st(e.subarray(i,s),n));let d=s+o.length;if(_(e,F,d)){i=d+F.length;continue}if(!_(e,X,d))throw n('whose delimiter is followed by neither CRLF nor "--"');if(e.length!==d+X.length+F.length||!_(e,F,d+X.length))throw n("that does not end with CRLF right after its close delimiter");return a}},dt=e=>{if(!et.test(e))return null;let t=new RegExp(tt.source,"y");t.lastIndex=9;let n=new Map;for(;t.lastIndex<e.length;){let o=t.exec(e);if(o===null)return null;let[,a,i]=o,s=a.toLowerCase();if(!nt.includes(s)||n.has(s))return null;n.set(s,i)}let r=n.get("name");return r===void 0?null:{name:r,filename:n.get("filename")??null}},ct=(e,t)=>{let n={},r=[],o=-1;for(let a of e){let i=a.headers.get("content-disposition");if(i===void 0)throw t("with a part without a Content-Disposition");let s=dt(i);if(s===null)throw t(`with the Content-Disposition ${c(i)}`);let d=ke.indexOf(s.name);if(d===-1)throw t(`with a part named ${c(s.name)}`);if(d<=o)throw t(d===o?`with the part ${c(s.name)} twice`:`with the part ${c(s.name)} after the part ${c(ke[o])}`);o=d;let l=a.headers.get("content-type");if(s.filename===null){if(l!==void 0)throw t(`with the text part ${c(s.name)} holding a Content-Type`);try{n[s.name]=Ae(a.content)}catch{throw t(`with the text part ${c(s.name)} that is not UTF-8`)}}else{if(l===void 0)throw t(`with the file part ${c(s.name)} without a Content-Type`);n[s.name]=new Blob([a.content],{type:l}),r.push(s.filename)}}return{body:n,filenames:r}},Ne=async(e,t,n,r)=>{if(N[e].body===null){if(n!=null)throw new TypeError(`${r}: init.body must be undefined or null (${e} takes no body), got ${c(n)}`);if(t!==null)throw new RangeError(`${r}: init.headers must hold no Content-Type (${e} takes no body), got ${c(t)}`);return Oe}let o=t===null?null:rt(t);if(!Object.hasOwn(R.paths.upload,e)){if(o?.essence!==Ce)throw new RangeError(`${r}: the Content-Type of init.headers must declare ${Ce} (${e} takes a JSON body), got ${c(t)}`);if(typeof n!="string")throw new TypeError(`${r}: init.body must be a JSON text (${e} takes a JSON body), got ${c(n)}`);try{return{body:JSON.parse(n),filenames:Oe.filenames}}catch{throw new RangeError(`${r}: init.body must be a JSON text (${e} takes a JSON body), got a text that is not JSON`)}}let a=ot(o);if(a===null)throw new RangeError(`${r}: the Content-Type of init.headers must declare ${K} with one boundary of RFC 2046 and no other parameter (${e} takes a multipart body), got ${c(t)}`);if(fe(n)===null)throw new TypeError(`${r}: init.body must be a Blob (${e} takes a multipart body), got ${c(n)}`);let i=s=>new RangeError(`${r}: init.body must be a ${K} body of the upload's fields (RFC 7578), got a body ${s}`);return ct(it(await at(n),a,i),i)};var lt=Object.freeze(Object.keys(N).map(e=>{let t=Object.hasOwn(R.paths.upload,e),{method:n,path:r}=t?R.paths.upload[e]:R.paths.json[e];return Object.freeze({endpoint:e,upload:t,method:n,segments:Object.freeze(`${R.paths.base}${r}`.split("/"))})})),ht=/^\{([a-z_]+)\}$/,je=e=>e instanceof V.ZodEffects?je(e.innerType()):e.shape,ut=new Map(Object.entries(le).map(([e,t])=>[e,Object.freeze(Object.entries(je(t)).filter(([,n])=>(n instanceof V.ZodOptional?n.unwrap():n)instanceof V.ZodBoolean).map(([n])=>n))])),Te=(e,t)=>{C("object",e,t,"init");let{method:n,headers:r,body:o,signal:a}=e;return Object.freeze({method:n,headers:r,body:o,signal:a})},pt=(e,t,n)=>{for(let r of lt){let o=r.upload?n.uploadBaseUrl:n.jsonBaseUrl;if(r.method!==e||!t.startsWith(o))continue;let a=t.slice(o.length),i=a.indexOf("?"),s=i===-1?a:a.slice(0,i),d=s.split("/");if(d.length!==r.segments.length)continue;let l={};if(r.segments.every((O,j)=>{let k=d[j],P=ht.exec(O);return P===null?k===O:(l[P[1]]=k,k!=="")}))return{route:r,written:l,path:s,search:i===-1?"":a.slice(i)}}return null},ft=(e,t,n,r)=>{let o=[n.jsonBaseUrl,n.uploadBaseUrl].filter(i=>t.startsWith(i)).sort((i,s)=>s.length-i.length)[0],a=o===void 0?"a URL under neither base":`the URL ${c(t.slice(o.length))} after a base`;return new RangeError(`${r}: url and init.method must name an endpoint of the exchanges' table under the base of its channel, got ${c(e)} and ${a}`)},yt=(e,t,n,r)=>{let o=()=>new RangeError(`${r}: url must hold the path of ${e.endpoint} as the contract writes it, each parameter one segment encoded by encodeURIComponent, got the path ${c(n)}`),a={};for(let[s,d]of Object.entries(t))try{a[s]=decodeURIComponent(d)}catch{throw o()}if((e.upload?de(e.endpoint,a).path:ie(e.endpoint,a).path)!==n)throw o();return a},gt=(e,t,n)=>{let r=ut.get(e);if(r===void 0){if(t!=="")throw new RangeError(`${n}: url must hold no query (${e} takes no query), got the query ${c(t)}`);return}let o=new Map;for(let[a,i]of new URLSearchParams(t.slice(1))){if(o.has(a))throw new RangeError(`${n}: url must hold each field of the query of ${e} once, got the field ${c(a)} twice`);o.set(a,r.includes(a)&&(i==="true"||i==="false")?i==="true":i)}return Object.fromEntries(o)},mt=(e,t,n,r)=>{if(!Ee(e))return t;let o=be(t),a=t.slice(o.length);return Re(a)?`${o}${Se(n,a,r,"unstampWrite")}`:t},_e=async(e,t,n,r,o)=>{C("string",e,o,"url");let a=t.method===void 0?"GET":t.method;if(typeof a!="string")throw new TypeError(`${o}: init.method must be undefined or a string, got ${c(a)}`);let i=mt(a,e,r,o),s=pt(a,i,n);if(s===null)throw ft(a,i,n,o);let{route:d,search:l}=s,g=yt(d,s.written,s.path,o),O;try{O=new Headers(t.headers)}catch(L){throw new TypeError(`${o}: init.headers must be headers the browser's Headers reads, got ${c(t.headers)}`,{cause:L})}let j=gt(d.endpoint,l,o),{body:k,filenames:P}=await Ne(d.endpoint,O.get("content-type"),t.body,o),q=ge(d.endpoint,{params:Object.keys(g).length===0?void 0:g,query:j,body:k,signal:t.signal===null?void 0:t.signal},o);if(q.query!==null&&he(d.endpoint,q.query)!==l)throw new RangeError(`${o}: url must hold the query of ${d.endpoint} as chatQueryString writes it of the query its schema read, got the query ${c(l)}`);if(d.upload){let L=P[0],Y=me(q.body.file_name);if(L!==Y)throw new RangeError(`${o}: init.body must carry the filename of its file part as the transport writes it of file_name (${c(Y)}), got ${c(L)}`)}return q};var v="createChatScenarioFetch",B="ChatScenarioFetch.fetch",ee="ChatScenarioFetch.plan",wt="ChatScenarioFetch.hold",ve="ChatScenarioHold.settle",Et="ChatScenarioFetch.assertDone",W="chatScenarioRefusal",Be=Object.freeze(Object.keys(N)),bt=Object.freeze(Object.keys(R.business_codes)),ze=se({answered:["kind","answer"],refused:["kind","status","body"],unreached:["kind"],response:["kind","response"]}),Rt=Object.freeze(Object.keys(ze)),te=Object.freeze(Object.keys(D.innerType().shape).filter(e=>e!=="error_code")),St="application/json",Pe=65536,Ct=1,qe=400,Le=599,Ot=Z({Blob:{attributes:["size","type"],operations:["slice"],statics:[]},AbortSignal:{attributes:["aborted","reason"],operations:["addEventListener","removeEventListener"],statics:["any"]}}),kt=Object.freeze({kind:"unreached"}),$t=Object.freeze({waiting:"has taken no request",answering:"awaits the answer its response function makes",settled:"has answered its request",stopped:"was stopped"}),Ie=e=>Object.getOwnPropertyDescriptor(AbortSignal.prototype,e).get,re=e=>Reflect.apply(Ie("aborted"),e,[])===!0,oe=e=>Reflect.apply(Ie("reason"),e,[]),Ue=e=>{let t=Function.prototype.bind(void 0);return Reflect.apply(AbortSignal.prototype.addEventListener,e,["abort",t]),Reflect.apply(AbortSignal.prototype.removeEventListener,e,["abort",t]),e},xt=e=>{let t=Ue(AbortSignal.any([Ue(e)]));if(re(t))throw new TypeError("the runtime's AbortSignal.any made an aborted signal from a signal that is not aborted");return t},Me=e=>typeof e=="object"&&e!==null||typeof e=="function",Fe=(e,t)=>{let n=!1,r=a=>{n||(n=!0,t.rejected(a))},o=a=>{if(n)return;n=!0;let i;try{i=Me(a)?Reflect.get(a,"then"):void 0}catch(d){t.rejected(d);return}if(typeof i!="function"){t.fulfilled(a);return}let s=i;Promise.resolve().then(()=>Fe((d,l)=>Reflect.apply(s,a,[d,l]),t))};try{e(o,r)}catch(a){r(a)}},He=(e,t,n)=>{let r=a=>new RangeError(`${t}: ${n} must be a value JSON.stringify writes as a JSON text, got ${c(e)}`,a===void 0?void 0:{cause:a}),o;try{o=JSON.stringify(e)}catch(a){throw r(a)}if(o===void 0)throw r();return o},At=(e,t,n,r)=>{let o=N[e];if(o.answer===null){if(t!==null)throw new TypeError(`${n}: ${r} must be null (${e} answers no body), got ${c(t)}`);return Object.freeze({kind:"json",status:o.status,text:null})}let a=He(t,n,r);return J(ue[o.answer],JSON.parse(a),n,r,`the answer of ${e} (${o.answer}) when written as a JSON text and read back`),Object.freeze({kind:"json",status:o.status,text:a})},Nt=(e,t,n,r)=>{let o=pe(e,n,`${r}.status`,`an integer from ${qe} to ${Le}`,s=>Number.isInteger(s)&&s>=qe&&s<=Le),a=He(t,n,`${r}.body`),i=ce(J(D,JSON.parse(a),n,`${r}.body`,"a failed answer's body when written as a JSON text and read back"));if(i!==null){let s=R.business_codes[i.name].http_status;if(o!==s)throw new RangeError(`${n}: ${r}.status must be ${s}, the status of the business code ${i.name} its body carries, got ${o}`)}return Object.freeze({kind:"json",status:o,text:a})},ne=(e,t,n,r)=>{C("object",t,n,r);let o=t,a=M(Rt,o.kind,n,`${r}.kind`),i=ze[a],s=Object.keys(o).find(d=>!i.includes(d));if(s!==void 0)throw new RangeError(`${n}: ${r} must hold only the fields of a reply of the kind ${a} (${i.join(", ")}), got the key ${c(s)}`);switch(a){case"answered":return At(e,o.answer,n,`${r}.answer`);case"refused":{let{status:d,body:l}=o;return Nt(d,l,n,r)}case"unreached":return kt;case"response":{let{response:d}=o;return C("function",d,n,`${r}.response`),Object.freeze({kind:"response",make:d})}}},jt=e=>{let t=new TextEncoder().encode(e),n=()=>{},r;return{stream:new ReadableStream({type:"bytes",start:i=>{r=i;for(let s=0;s<t.byteLength;s+=Pe)i.enqueue(t.slice(s,s+Pe))},pull:i=>{n(),i.close(),i.byobRequest?.respond(0)},cancel:()=>{n()}},{highWaterMark:Ct}),tie:i=>{let s=()=>{n(),r.error(oe(i))};n=()=>Reflect.apply(AbortSignal.prototype.removeEventListener,i,["abort",s]),Reflect.apply(AbortSignal.prototype.addEventListener,i,["abort",s])}}},Tt=e=>{if(e.text===null)return{response:new Response(null,{status:e.status}),tie:null};let t=jt(e.text);return{response:new Response(t.stream,{status:e.status,headers:{"Content-Type":St}}),tie:t.tie}},_t=e=>{let t=Reflect.get(Blob.prototype,"arrayBuffer"),n=Reflect.get(globalThis,"FileReader");if(typeof t!="function"&&typeof n!="function")throw new TypeError(`${e}: the runtime's Blob.prototype.arrayBuffer or its FileReader must be a function, as an upload's file is read by one of them, got ${c(t)} and ${c(n)}`)},vt=e=>e instanceof Error?`${e.name}: ${e.message}`:c(e),on=(e,t)=>{let n=M(bt,e,W,"name");C("object",t,W,"fields");let r=t,o=Object.keys(r).find(g=>!te.includes(g));if(o!==void 0)throw new RangeError(`${W}: fields must hold only the fields of a failed answer's body besides error_code (${te.join(", ")}), got the key ${c(o)}`);let{number:a,http_status:i}=R.business_codes[n],s=[["error_code",a],...te.map(g=>[g,r[g]])],d=Object.fromEntries(s.filter(([,g])=>g!==void 0)),l=J(D,d,W,"fields",`the fields of a failed answer's body of ${n}`);return Z({kind:"refused",status:i,body:l})},an=e=>{C("object",e,v,"options");let{jsonBaseUrl:t,uploadBaseUrl:n,unstampWrite:r}=e;G(t,v,"jsonBaseUrl"),G(n,v,"uploadBaseUrl"),C("function",r,v,"unstampWrite"),we(v,Ot),_t(v);let o=Object.freeze({jsonBaseUrl:t,uploadBaseUrl:n}),a=new Map,i=[],s=[],d=[],l=new Set,g=new Set,O=Promise.resolve(),j=()=>{for(let w of g)w()},k=w=>{let u=a.get(w);if(u!==void 0)return u;let y=[];return a.set(w,y),y};return Object.freeze({fetch:(w,u)=>{let y;try{y=Te(u,B)}catch(m){return d.push(m),Promise.reject(m)}let E=ye(y.signal)?y.signal:null;if(E!==null&&re(E))return Promise.reject(oe(E));let f=null;if(E!==null)try{f=xt(E)}catch(m){let x=new TypeError(`${B}: init.signal must be a signal the runtime's AbortSignal.any can make the request's own signal from, got ${c(E)}`,{cause:m});return d.push(x),Promise.reject(x)}return new Promise((m,x)=>{let b=!1,$=null,U={};l.add(U);let T=p=>{b||(b=!0,l.delete(U),$!==null&&$.phase.kind==="answering"&&($.phase={kind:"settled"}),f!==null&&(g.delete(S),Reflect.apply(AbortSignal.prototype.removeEventListener,f,["abort",Q])),p())},z=p=>{S(),d.push(p),T(()=>x(p))},Q=()=>{$!==null&&($.phase={kind:"stopped"}),T(()=>x(oe(E)))},S=()=>(!b&&E!==null&&re(E)&&Q(),b),De=p=>{let h;try{h=Tt(p)}catch(I){z(I);return}T(()=>{f!==null&&h.tie!==null&&h.tie(f),m(h.response)})},Je=p=>{let h,I;try{h=Reflect.apply(p,void 0,[]),I=Me(h)?Reflect.get(h,"then"):void 0}catch(A){z(A);return}if(typeof I!="function"){T(()=>m(h));return}let Ye=I;Fe((A,Qe)=>Reflect.apply(Ye,h,[A,Qe]),{fulfilled:A=>{S(),T(()=>m(A))},rejected:A=>{S()||z(A)}})},ae=p=>{if(!S())switch(p.kind){case"unreached":T(()=>x(new TypeError(`${B}: the request was not reached, as its step planned`)));return;case"json":De(p);return;case"response":Je(p.make)}},We=p=>{let h=a.get(p.endpoint)?.shift();if(h===void 0)throw new RangeError(`${B}: a request of ${p.endpoint} must find a step the scenario planned for it, got one when none is left`);if(s.push(p),h.kind==="hold"){$=h.state,l.delete(U),h.state.phase={kind:"arrived",answer:ae},h.state.arrive(p);return}ae(h.kind==="reply"?h.reply:ne(p.endpoint,Reflect.apply(h.step,void 0,[p]),B,h.field))};f!==null&&(g.add(S),Reflect.apply(AbortSignal.prototype.addEventListener,f,["abort",Q])),O=O.then(async()=>{if(S())return;let p;try{p=await _e(w,y,o,r,B)}catch(h){S()||z(h);return}if(!S())try{We(p)}catch(h){z(h)}})})},plan:(w,...u)=>{let y=M(Be,w,ee,"endpoint");if(u.length===0)throw new RangeError(`${ee}: steps must be one step or more, got none`);let E=u.map((f,m)=>Object.freeze(typeof f=="function"?{kind:"function",step:f,field:`steps[${m}](request)`}:{kind:"reply",reply:ne(y,f,ee,`steps[${m}]`)}));k(y).push(...E)},hold:w=>{let u=M(Be,w,wt,"endpoint"),y,E=new Promise(b=>{y=b}),f={endpoint:u,phase:{kind:"waiting"},arrive:y};i.push(f),k(u).push(Object.freeze({kind:"hold",state:f}));let m=()=>{j();let{phase:b}=f;if(b.kind!=="arrived")throw new TypeError(`${ve}: the held step of ${u} must hold a request it has neither answered nor stopped, got a step that ${$t[b.kind]}`);return b};return Object.freeze({arrived:E,settle:b=>{m();let $=ne(u,b,ve,"reply"),U=m();f.phase={kind:"answering"},U.answer($)}})},requests:()=>Object.freeze([...s]),assertDone:()=>{j();let w=[...l.size>0?[`requests still being read: ${l.size}`]:[],...d.map(u=>`the breach ${vt(u)}`),...[...a].filter(([,u])=>u.length>0).map(([u,y])=>`untaken steps of ${u}: ${y.length}`),...i.filter(u=>u.phase.kind==="arrived"||u.phase.kind==="answering").map(u=>`the held request of ${u.endpoint} neither answered nor stopped`)];if(w.length>0)throw new Error(`${Et}: the scenario must end with every request read, no breach, every step taken, and every held request answered or stopped, got ${w.join("; ")}`)}})};export{on as chatScenarioRefusal,an as createChatScenarioFetch};
|
|
4
|
+
`),re=Y.encode("--"),gt=e=>{let t=dt.exec(e);if(t===null)return null;let n=new RegExp(ct.source,"y");n.lastIndex=t[0].length;let r=[];for(;n.lastIndex<e.length;){let a=n.exec(e);if(a===null)return null;let[,o,i]=a;if(o!==void 0){let s=i;r.push([o.toLowerCase(),s.startsWith('"')?s.slice(1,-1).replace(/\\([\s\S])/g,"$1"):s])}}return{essence:t[0].toLowerCase(),parameters:r}},mt=e=>{if(e===null||e.essence!==ae||e.parameters.length!==1)return null;let[t,n]=e.parameters[0];return t==="boundary"&<.test(n)?n:null},Et=async e=>typeof Blob.prototype.arrayBuffer=="function"?new Uint8Array(await Reflect.apply(Blob.prototype.arrayBuffer,e,[])):await new Promise((t,n)=>{let r=new FileReader;r.addEventListener("load",()=>t(new Uint8Array(r.result))),r.addEventListener("error",()=>n(r.error)),r.readAsArrayBuffer(e)}),L=(e,t,n)=>n+t.length<=e.length&&t.every((r,a)=>e[n+a]===r),qe=(e,t,n)=>{let r=t[0];for(let a=e.indexOf(r,n);a!==-1;a=e.indexOf(r,a+1))if(L(e,t,a))return a;return-1},ze=e=>new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}).decode(e),wt=(e,t)=>{if(L(e,W,0))throw t("with a part without headers");let n=qe(e,Le,0);if(n===-1)throw t("with a part without a blank line after its headers");let r;try{r=ze(e.subarray(0,n))}catch{throw t("with headers that are not UTF-8")}let a=new Map;for(let o of r.split(`\r
|
|
5
|
+
`)){let i=ut.exec(o);if(i===null)throw t(`with the header line ${c(o)}`);let[,s,d]=i,p=s.toLowerCase();if(!ht.includes(p))throw t(`with the header ${c(s)} in a part`);if(a.has(p))throw t(`with the header ${c(s)} twice in a part`);a.set(p,d)}return{headers:a,content:e.subarray(n+Le.length)}},bt=(e,t,n)=>{let r=Y.encode(`--${t}\r
|
|
6
|
+
`);if(!L(e,r,0))throw n("that does not begin with the delimiter of its boundary and CRLF");let a=Y.encode(`\r
|
|
7
|
+
--${t}`),o=[],i=r.length;for(;;){let s=qe(e,a,i);if(s===-1)throw n("whose part is not closed by a delimiter");o.push(wt(e.subarray(i,s),n));let d=s+a.length;if(L(e,W,d)){i=d+W.length;continue}if(!L(e,re,d))throw n('whose delimiter is followed by neither CRLF nor "--"');if(e.length!==d+re.length+W.length||!L(e,W,d+re.length))throw n("that does not end with CRLF right after its close delimiter");return o}},St=e=>{if(!pt.test(e))return null;let t=new RegExp(yt.source,"y");t.lastIndex=9;let n=new Map;for(;t.lastIndex<e.length;){let a=t.exec(e);if(a===null)return null;let[,o,i]=a,s=o.toLowerCase();if(!ft.includes(s)||n.has(s))return null;n.set(s,i)}let r=n.get("name");return r===void 0?null:{name:r,filename:n.get("filename")??null}},Rt=(e,t)=>{let n={},r=[],a=-1;for(let o of e){let i=o.headers.get("content-disposition");if(i===void 0)throw t("with a part without a Content-Disposition");let s=St(i);if(s===null)throw t(`with the Content-Disposition ${c(i)}`);let d=Ue.indexOf(s.name);if(d===-1)throw t(`with a part named ${c(s.name)}`);if(d<=a)throw t(d===a?`with the part ${c(s.name)} twice`:`with the part ${c(s.name)} after the part ${c(Ue[a])}`);a=d;let p=o.headers.get("content-type");if(s.filename===null){if(p!==void 0)throw t(`with the text part ${c(s.name)} holding a Content-Type`);try{n[s.name]=ze(o.content)}catch{throw t(`with the text part ${c(s.name)} that is not UTF-8`)}}else{if(p===void 0)throw t(`with the file part ${c(s.name)} without a Content-Type`);n[s.name]=new Blob([o.content],{type:p}),r.push(s.filename)}}return{body:n,filenames:r}},Ie=async(e,t,n,r)=>{if(P[e].body===null){if(n!=null)throw new TypeError(`${r}: init.body must be undefined or null (${e} takes no body), got ${c(n)}`);if(t!==null)throw new RangeError(`${r}: init.headers must hold no Content-Type (${e} takes no body), got ${c(t)}`);return Me}let a=t===null?null:gt(t);if(!Object.hasOwn(x.paths.upload,e)){if(a?.essence!==Pe)throw new RangeError(`${r}: the Content-Type of init.headers must declare ${Pe} (${e} takes a JSON body), got ${c(t)}`);if(typeof n!="string")throw new TypeError(`${r}: init.body must be a JSON text (${e} takes a JSON body), got ${c(n)}`);try{return{body:JSON.parse(n),filenames:Me.filenames}}catch{throw new RangeError(`${r}: init.body must be a JSON text (${e} takes a JSON body), got a text that is not JSON`)}}let o=mt(a);if(o===null)throw new RangeError(`${r}: the Content-Type of init.headers must declare ${ae} with one boundary of RFC 2046 and no other parameter (${e} takes a multipart body), got ${c(t)}`);if(ve(n)===null)throw new TypeError(`${r}: init.body must be a Blob (${e} takes a multipart body), got ${c(n)}`);let i=s=>new RangeError(`${r}: init.body must be a ${ae} body of the upload's fields (RFC 7578), got a body ${s}`);return Rt(bt(await Et(n),o,i),i)};var Ct=Object.freeze(Object.keys(P).map(e=>{let t=Object.hasOwn(x.paths.upload,e),{method:n,path:r}=t?x.paths.upload[e]:x.paths.json[e];return Object.freeze({endpoint:e,upload:t,method:n,segments:Object.freeze(`${x.paths.base}${r}`.split("/"))})})),$t=/^\{([a-z_]+)\}$/,He=e=>e instanceof oe.ZodEffects?He(e.innerType()):e.shape,kt=new Map(Object.entries(Re).map(([e,t])=>[e,Object.freeze(Object.entries(He(t)).filter(([,n])=>(n instanceof oe.ZodOptional?n.unwrap():n)instanceof oe.ZodBoolean).map(([n])=>n))])),De=(e,t)=>{m("object",e,t,"init");let{method:n,headers:r,body:a,signal:o}=e;return Object.freeze({method:n,headers:r,body:a,signal:o})},vt=(e,t,n)=>{for(let r of Ct){let a=r.upload?n.uploadBaseUrl:n.jsonBaseUrl;if(r.method!==e||!t.startsWith(a))continue;let o=t.slice(a.length),i=o.indexOf("?"),s=i===-1?o:o.slice(0,i),d=s.split("/");if(d.length!==r.segments.length)continue;let p={};if(r.segments.every((k,O)=>{let N=d[O],$=$t.exec(k);return $===null?N===k:(p[$[1]]=N,N!=="")}))return{route:r,written:p,path:s,search:i===-1?"":o.slice(i)}}return null},Ot=(e,t,n,r)=>{let a=[n.jsonBaseUrl,n.uploadBaseUrl].filter(i=>t.startsWith(i)).sort((i,s)=>s.length-i.length)[0],o=a===void 0?"a URL under neither base":`the URL ${c(t.slice(a.length))} after a base`;return new RangeError(`${r}: url and init.method must name an endpoint of the exchanges' table under the base of its channel, got ${c(e)} and ${o}`)},At=(e,t,n,r)=>{let a=()=>new RangeError(`${r}: url must hold the path of ${e.endpoint} as the contract writes it, each parameter one segment encoded by encodeURIComponent, got the path ${c(n)}`),o={};for(let[s,d]of Object.entries(t))try{o[s]=decodeURIComponent(d)}catch{throw a()}if((e.upload?we(e.endpoint,o).path:Ee(e.endpoint,o).path)!==n)throw a();return o},xt=(e,t,n)=>{let r=kt.get(e);if(r===void 0){if(t!=="")throw new RangeError(`${n}: url must hold no query (${e} takes no query), got the query ${c(t)}`);return}let a=new Map;for(let[o,i]of new URLSearchParams(t.slice(1))){if(a.has(o))throw new RangeError(`${n}: url must hold each field of the query of ${e} once, got the field ${c(o)} twice`);a.set(o,r.includes(o)&&(i==="true"||i==="false")?i==="true":i)}return Object.fromEntries(a)},Nt=(e,t,n,r)=>{if(!Te(e))return t;let a=_e(t),o=t.slice(a.length);return je(o)?`${a}${Be(n,o,r,"unstampWrite")}`:t},Fe=async(e,t,n,r,a)=>{m("string",e,a,"url");let o=t.method===void 0?"GET":t.method;if(typeof o!="string")throw new TypeError(`${a}: init.method must be undefined or a string, got ${c(o)}`);let i=Nt(o,e,r,a),s=vt(o,i,n);if(s===null)throw Ot(o,i,n,a);let{route:d,search:p}=s,g=At(d,s.written,s.path,a),k;try{k=new Headers(t.headers)}catch(l){throw new TypeError(`${a}: init.headers must be headers the browser's Headers reads, got ${c(t.headers)}`,{cause:l})}let O=xt(d.endpoint,p,a),{body:N,filenames:$}=await Ie(d.endpoint,k.get("content-type"),t.body,a),M=Ae(d.endpoint,{params:Object.keys(g).length===0?void 0:g,query:O,body:N,signal:t.signal===null?void 0:t.signal},a);if(M.query!==null&&Ce(d.endpoint,M.query)!==p)throw new RangeError(`${a}: url must hold the query of ${d.endpoint} as chatQueryString writes it of the query its schema read, got the query ${c(p)}`);if(d.upload){let l=$[0],y=xe(M.body.file_name);if(l!==y)throw new RangeError(`${a}: init.body must carry the filename of its file part as the transport writes it of file_name (${c(y)}), got ${c(l)}`)}return M};var q="createChatScenarioFetch",z="ChatScenarioFetch.fetch",se="ChatScenarioFetch.plan",Tt="ChatScenarioFetch.hold",Je="ChatScenarioHold.settle",_t="ChatScenarioFetch.assertDone",X="chatScenarioRefusal",We=Object.freeze(Object.keys(P)),jt=Object.freeze(Object.keys(x.business_codes)),Xe=he({answered:["kind","answer"],refused:["kind","status","body"],unreached:["kind"],response:["kind","response"]}),Bt=Object.freeze(Object.keys(Xe)),ie=Object.freeze(Object.keys(Z.innerType().shape).filter(e=>e!=="error_code")),Pt="application/json",Ye=65536,Mt=1,Qe=400,Ze=599,Ut=ne({Blob:{attributes:["size","type"],operations:["slice"],statics:[]},AbortSignal:{attributes:["aborted","reason"],operations:["addEventListener","removeEventListener"],statics:["any"]}}),Lt=Object.freeze({kind:"unreached"}),qt=Object.freeze({waiting:"has taken no request",answering:"awaits the answer its response function makes",settled:"has answered its request",stopped:"was stopped"}),Ve=e=>Object.getOwnPropertyDescriptor(AbortSignal.prototype,e).get,ce=e=>Reflect.apply(Ve("aborted"),e,[])===!0,le=e=>Reflect.apply(Ve("reason"),e,[]),Ge=e=>{let t=Function.prototype.bind(void 0);return Reflect.apply(AbortSignal.prototype.addEventListener,e,["abort",t]),Reflect.apply(AbortSignal.prototype.removeEventListener,e,["abort",t]),e},zt=e=>{let t=Ge(AbortSignal.any([Ge(e)]));if(ce(t))throw new TypeError("the runtime's AbortSignal.any made an aborted signal from a signal that is not aborted");return t},Ke=e=>typeof e=="object"&&e!==null||typeof e=="function",et=(e,t)=>{let n=!1,r=o=>{n||(n=!0,t.rejected(o))},a=o=>{if(n)return;n=!0;let i;try{i=Ke(o)?Reflect.get(o,"then"):void 0}catch(d){t.rejected(d);return}if(typeof i!="function"){t.fulfilled(o);return}let s=i;Promise.resolve().then(()=>et((d,p)=>Reflect.apply(s,o,[d,p]),t))};try{e(a,r)}catch(o){r(o)}},tt=(e,t,n)=>{let r=o=>new RangeError(`${t}: ${n} must be a value JSON.stringify writes as a JSON text, got ${c(e)}`,o===void 0?void 0:{cause:o}),a;try{a=JSON.stringify(e)}catch(o){throw r(o)}if(a===void 0)throw r();return a},It=(e,t,n,r)=>{let a=P[e];if(a.answer===null){if(t!==null)throw new TypeError(`${n}: ${r} must be null (${e} answers no body), got ${c(t)}`);return Object.freeze({kind:"json",status:a.status,text:null})}let o=tt(t,n,r);return G($e[a.answer],JSON.parse(o),n,r,`the answer of ${e} (${a.answer}) when written as a JSON text and read back`),Object.freeze({kind:"json",status:a.status,text:o})},Ht=(e,t,n,r)=>{let a=ke(e,n,`${r}.status`,`an integer from ${Qe} to ${Ze}`,s=>Number.isInteger(s)&&s>=Qe&&s<=Ze),o=tt(t,n,`${r}.body`),i=Se(G(Z,JSON.parse(o),n,`${r}.body`,"a failed answer's body when written as a JSON text and read back"));if(i!==null){let s=x.business_codes[i.name].http_status;if(a!==s)throw new RangeError(`${n}: ${r}.status must be ${s}, the status of the business code ${i.name} its body carries, got ${a}`)}return Object.freeze({kind:"json",status:a,text:o})},de=(e,t,n,r)=>{m("object",t,n,r);let a=t,o=J(Bt,a.kind,n,`${r}.kind`),i=Xe[o],s=Object.keys(a).find(d=>!i.includes(d));if(s!==void 0)throw new RangeError(`${n}: ${r} must hold only the fields of a reply of the kind ${o} (${i.join(", ")}), got the key ${c(s)}`);switch(o){case"answered":return It(e,a.answer,n,`${r}.answer`);case"refused":{let{status:d,body:p}=a;return Ht(d,p,n,r)}case"unreached":return Lt;case"response":{let{response:d}=a;return m("function",d,n,`${r}.response`),Object.freeze({kind:"response",make:d})}}},Dt=e=>{let t=new TextEncoder().encode(e),n=()=>{},r;return{stream:new ReadableStream({type:"bytes",start:i=>{r=i;for(let s=0;s<t.byteLength;s+=Ye)i.enqueue(t.slice(s,s+Ye))},pull:i=>{n(),i.close(),i.byobRequest?.respond(0)},cancel:()=>{n()}},{highWaterMark:Mt}),tie:i=>{let s=()=>{n(),r.error(le(i))};n=()=>Reflect.apply(AbortSignal.prototype.removeEventListener,i,["abort",s]),Reflect.apply(AbortSignal.prototype.addEventListener,i,["abort",s])}}},Ft=e=>{if(e.text===null)return{response:new Response(null,{status:e.status}),tie:null};let t=Dt(e.text);return{response:new Response(t.stream,{status:e.status,headers:{"Content-Type":Pt}}),tie:t.tie}},Jt=e=>{let t=Reflect.get(Blob.prototype,"arrayBuffer"),n=Reflect.get(globalThis,"FileReader");if(typeof t!="function"&&typeof n!="function")throw new TypeError(`${e}: the runtime's Blob.prototype.arrayBuffer or its FileReader must be a function, as an upload's file is read by one of them, got ${c(t)} and ${c(n)}`)},Wt=e=>e instanceof Error?`${e.name}: ${e.message}`:c(e),wn=(e,t)=>{let n=J(jt,e,X,"name");m("object",t,X,"fields");let r=t,a=Object.keys(r).find(g=>!ie.includes(g));if(a!==void 0)throw new RangeError(`${X}: fields must hold only the fields of a failed answer's body besides error_code (${ie.join(", ")}), got the key ${c(a)}`);let{number:o,http_status:i}=x.business_codes[n],s=[["error_code",o],...ie.map(g=>[g,r[g]])],d=Object.fromEntries(s.filter(([,g])=>g!==void 0)),p=G(Z,d,X,"fields",`the fields of a failed answer's body of ${n}`);return ne({kind:"refused",status:i,body:p})},bn=e=>{m("object",e,q,"options");let{jsonBaseUrl:t,uploadBaseUrl:n,unstampWrite:r}=e;F(t,q,"jsonBaseUrl"),F(n,q,"uploadBaseUrl"),m("function",r,q,"unstampWrite"),Ne(q,Ut),Jt(q);let a=Object.freeze({jsonBaseUrl:t,uploadBaseUrl:n}),o=new Map,i=[],s=[],d=[],p=new Set,g=new Set,k=Promise.resolve(),O=()=>{for(let h of g)h()},N=h=>{let u=o.get(h);if(u!==void 0)return u;let R=[];return o.set(h,R),R};return Object.freeze({fetch:(h,u)=>{let R;try{R=De(u,z)}catch(C){return d.push(C),Promise.reject(C)}let v=Oe(R.signal)?R.signal:null;if(v!==null&&ce(v))return Promise.reject(le(v));let E=null;if(v!==null)try{E=zt(v)}catch(C){let j=new TypeError(`${z}: init.signal must be a signal the runtime's AbortSignal.any can make the request's own signal from, got ${c(v)}`,{cause:C});return d.push(j),Promise.reject(j)}return new Promise((C,j)=>{let A=!1,_=null,I={};p.add(I);let U=S=>{A||(A=!0,p.delete(I),_!==null&&_.phase.kind==="answering"&&(_.phase={kind:"settled"}),E!==null&&(g.delete(T),Reflect.apply(AbortSignal.prototype.removeEventListener,E,["abort",te])),S())},H=S=>{T(),d.push(S),U(()=>j(S))},te=()=>{_!==null&&(_.phase={kind:"stopped"}),U(()=>j(le(v)))},T=()=>(!A&&v!==null&&ce(v)&&te(),A),rt=S=>{let w;try{w=Ft(S)}catch(D){H(D);return}U(()=>{E!==null&&w.tie!==null&&w.tie(E),C(w.response)})},at=S=>{let w,D;try{w=Reflect.apply(S,void 0,[]),D=Ke(w)?Reflect.get(w,"then"):void 0}catch(B){H(B);return}if(typeof D!="function"){U(()=>C(w));return}let st=D;et((B,it)=>Reflect.apply(st,w,[B,it]),{fulfilled:B=>{T(),U(()=>C(B))},rejected:B=>{T()||H(B)}})},ue=S=>{if(!T())switch(S.kind){case"unreached":U(()=>j(new TypeError(`${z}: the request was not reached, as its step planned`)));return;case"json":rt(S);return;case"response":at(S.make)}},ot=S=>{let w=o.get(S.endpoint)?.shift();if(w===void 0)throw new RangeError(`${z}: a request of ${S.endpoint} must find a step the scenario planned for it, got one when none is left`);if(s.push(S),w.kind==="hold"){_=w.state,p.delete(I),w.state.phase={kind:"arrived",answer:ue},w.state.arrive(S);return}ue(w.kind==="reply"?w.reply:de(S.endpoint,Reflect.apply(w.step,void 0,[S]),z,w.field))};E!==null&&(g.add(T),Reflect.apply(AbortSignal.prototype.addEventListener,E,["abort",te])),k=k.then(async()=>{if(T())return;let S;try{S=await Fe(h,R,a,r,z)}catch(w){T()||H(w);return}if(!T())try{ot(S)}catch(w){H(w)}})})},plan:(h,...u)=>{let R=J(We,h,se,"endpoint");if(u.length===0)throw new RangeError(`${se}: steps must be one step or more, got none`);let v=u.map((E,C)=>Object.freeze(typeof E=="function"?{kind:"function",step:E,field:`steps[${C}](request)`}:{kind:"reply",reply:de(R,E,se,`steps[${C}]`)}));N(R).push(...v)},hold:h=>{let u=J(We,h,Tt,"endpoint"),R,v=new Promise(A=>{R=A}),E={endpoint:u,phase:{kind:"waiting"},arrive:R};i.push(E),N(u).push(Object.freeze({kind:"hold",state:E}));let C=()=>{O();let{phase:A}=E;if(A.kind!=="arrived")throw new TypeError(`${Je}: the held step of ${u} must hold a request it has neither answered nor stopped, got a step that ${qt[A.kind]}`);return A};return Object.freeze({arrived:v,settle:A=>{C();let _=de(u,A,Je,"reply"),I=C();E.phase={kind:"answering"},I.answer(_)}})},requests:()=>Object.freeze([...s]),assertDone:()=>{O();let h=[...p.size>0?[`requests still being read: ${p.size}`]:[],...d.map(u=>`the breach ${Wt(u)}`),...[...o].filter(([,u])=>u.length>0).map(([u,R])=>`untaken steps of ${u}: ${R.length}`),...i.filter(u=>u.phase.kind==="arrived"||u.phase.kind==="answering").map(u=>`the held request of ${u.endpoint} neither answered nor stopped`)];if(h.length>0)throw new Error(`${_t}: the scenario must end with every request read, no breach, every step taken, and every held request answered or stopped, got ${h.join("; ")}`)}})};var f="createChatScenarioRunStreams",V=Object.freeze({connecting:0,open:1,closed:2}),K=2147483647,ee=class extends EventTarget{url;#r=V.connecting;#e=null;#t=null;#n;#a=()=>{};constructor(t,n){super(),this.url=t,this.#n=n}get readyState(){return this.#r}isClosed(){return this.#r===V.closed}whenClosed(t){this.#a=t}after(t,n){this.#e=this.#n.setTimer(()=>{this.#e=null,n()},t)}beat(t){this.#t=this.#n.setTimer(()=>{this.#t=null,this.carry(t.event,t.data,""),this.isClosed()||this.beat(t)},t.everyMs)}stopBeating(){this.#t!==null&&(this.#n.clearTimer(this.#t),this.#t=null)}open(){this.#r=V.open,this.dispatchEvent(new Event("open"))}carry(t,n,r){this.dispatchEvent(new MessageEvent(t,{data:n,lastEventId:r}))}fail(){this.#o(),this.dispatchEvent(new Event("error"))}close(){this.#o()}#o(){this.isClosed()||(this.#r=V.closed,this.#e!==null&&(this.#n.clearTimer(this.#e),this.#e=null),this.stopBeating(),this.#a())}},nt=(e,t)=>{if(m("number",e,f,`${t}.afterMs`),!Number.isInteger(e)||e<0||e>K)throw new RangeError(`${f}: ${t}.afterMs must be an integer from 0 to ${K}, got ${c(e)}`)},Yt=e=>{m("object",e,f,"heartbeat");let{event:t,data:n,everyMs:r}=e;if(m("string",t,f,"heartbeat.event"),t===""||ye(t))throw new RangeError(`${f}: heartbeat.event must be a non-empty name that is not an event of the contract, got ${c(t)}`);if(m("string",n,f,"heartbeat.data"),m("number",r,f,"heartbeat.everyMs"),!Number.isInteger(r)||r<1||r>K)throw new RangeError(`${f}: heartbeat.everyMs must be an integer from 1 to ${K}, got ${c(r)}`);return Object.freeze({event:t,data:n,everyMs:r})},Qt=(e,t,n)=>{if(!Array.isArray(t))throw new TypeError(`${f}: runs[${JSON.stringify(e)}] must be an array of steps, got ${c(t)}`);let r=new Set,a=0;return t.map((o,i)=>{let s=`runs[${JSON.stringify(e)}][${i}]`;m("object",o,f,s);let{kind:d}=o;if(d==="gate"){let{gate:$}=o;if(m("string",$,f,`${s}.gate`),$===""||r.has($))throw new RangeError(`${f}: ${s}.gate must be a non-empty gate the script names once, got ${c($)}`);return r.add($),{kind:d,gate:$}}let{afterMs:p}=o;if(d==="resync"||d==="drop")return nt(p,s),{kind:d,afterMs:p};if(d!=="event")throw new RangeError(`${f}: ${s}.kind must be "event", "resync", "drop" or "gate", got ${c(d)}`);nt(p,s);let{event:g,data:k}=o;if(m("string",g,f,`${s}.event`),g===Q)throw new RangeError(`${f}: ${s}.event must not be ${Q}; a script places it as a step of kind "resync"`);let O=JSON.stringify(k)??"";try{me(g,O)}catch($){throw $ instanceof ge?new RangeError(`${f}: ${s} is not an event the contract reads: ${$.message}`,{cause:$}):$}let N=`${n}-${a}`;return a+=1,{kind:d,afterMs:p,event:g,data:O,id:N}})},vn=e=>{m("object",e,f,"options");let{baseUrl:t,cursorParam:n,idBaseMs:r,heartbeat:a,timers:o,runs:i}=e;if(F(t,f,"baseUrl"),m("string",n,f,"cursorParam"),n==="")throw new RangeError(`${f}: cursorParam must be a non-empty string, got ${c(n)}`);if(m("number",r,f,"idBaseMs"),!Number.isSafeInteger(r)||r<1)throw new RangeError(`${f}: idBaseMs must be a positive safe integer, got ${c(r)}`);let s=Yt(a);m("object",o,f,"timers"),m("function",o.setTimer,f,"timers.setTimer"),m("function",o.clearTimer,f,"timers.clearTimer"),m("object",i,f,"runs");let d=new Map;for(let[l,y]of Object.entries(i)){if(!pe.safeParse(l).success)throw new RangeError(`${f}: runs must be keyed by chat uids, got ${c(l)}`);let b=Qt(l,y,r),h=new Set(b.flatMap(u=>u.kind==="gate"?[u.gate]:[]));d.set(l,{runUid:l,path:`${t}${be("runEvents",{run_uid:l})}`,steps:b,gates:h,released:new Set,passed:new Set,open:null,end:null})}let p=[],g=new Map,k=(l,y,b)=>{let h=l.steps[b];if(!(h===void 0||y.isClosed())){if(h.kind==="gate"){if(l.released.has(h.gate)){k(l,y,b+1);return}let u=g.get(l.runUid)??new Map;u.set(h.gate,()=>k(l,y,b+1)),g.set(l.runUid,u);return}if((h.kind==="drop"||h.kind==="resync")&&l.passed.has(b)){k(l,y,b+1);return}y.after(h.afterMs,()=>{if(h.kind==="drop"){l.passed.add(b),y.fail();return}if(h.kind==="resync"){l.passed.add(b),y.stopBeating(),y.carry(Q,"","");return}if(fe(h.event)){l.end=h.event,y.stopBeating(),y.carry(h.event,h.data,h.id);return}y.carry(h.event,h.data,h.id),k(l,y,b+1)})}},O=(l,y)=>{p.push(y);let b=new ee(l,o);return b.after(0,()=>b.fail()),b};return Object.freeze({createEventSource:(l,y)=>{let[b,h=""]=l.split("?",2),u=[...d.values()].find(C=>C.path===b);if(u===void 0)return O(l,`a stream no script plans: ${l}`);if(u.open!==null&&!u.open.isClosed())return O(l,`a second stream of run ${u.runUid} while one is open: ${l}`);let R=new URLSearchParams(h).get(n),v=R===null?0:u.steps.findIndex(C=>C.kind==="event"&&C.id===R)+1;if(v===0&&R!==null)return O(l,`a stream of run ${u.runUid} from a stream ID its script does not hold: ${R}`);let E=new ee(l,o);return u.open=E,E.whenClosed(()=>{u.open=null,g.delete(u.runUid)}),E.after(0,()=>{E.open(),E.beat(s),k(u,E,v)}),E},release:(l,y)=>{let b=d.get(l);if(b===void 0||!b.gates.has(y)){p.push(`a release of gate ${JSON.stringify(y)} no script of run ${l} has`);return}b.released.add(y);let h=g.get(l)?.get(y);h!==void 0&&(g.get(l)?.delete(y),h())},endOf:l=>{let y=d.get(l);return y===void 0?(p.push(`an end of run ${l} no script plans`),null):y.end},breaches:()=>[...p]})};export{K as CHAT_SCENARIO_STREAM_MAX_WAIT_MS,wn as chatScenarioRefusal,bn as createChatScenarioFetch,vn as createChatScenarioRunStreams};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { K as ChatBusinessCodeName, $ as ChatExchangeEndpointName, Z as ChatExchangeAnswer, S as ChatErrorBody, ad as ChatQueryName, bg as chatQuerySchemas, _ as ChatExchangeBody } from "./index-g-wjju1F.cjs";
|
|
3
3
|
declare const EXCHANGE_PATH_PARAMS: {
|
|
4
4
|
readonly listConversations: readonly [
|
|
5
5
|
];
|
|
@@ -8,6 +8,12 @@ declare const EXCHANGE_PATH_PARAMS: {
|
|
|
8
8
|
readonly getConversation: readonly [
|
|
9
9
|
"conversation_uid"
|
|
10
10
|
];
|
|
11
|
+
readonly updateConversation: readonly [
|
|
12
|
+
"conversation_uid"
|
|
13
|
+
];
|
|
14
|
+
readonly deleteConversation: readonly [
|
|
15
|
+
"conversation_uid"
|
|
16
|
+
];
|
|
11
17
|
readonly listMessages: readonly [
|
|
12
18
|
"conversation_uid"
|
|
13
19
|
];
|
|
@@ -19,6 +25,18 @@ declare const EXCHANGE_PATH_PARAMS: {
|
|
|
19
25
|
"conversation_uid",
|
|
20
26
|
"message_uid"
|
|
21
27
|
];
|
|
28
|
+
readonly getConversationTree: readonly [
|
|
29
|
+
"conversation_uid"
|
|
30
|
+
];
|
|
31
|
+
readonly searchConversation: readonly [
|
|
32
|
+
"conversation_uid"
|
|
33
|
+
];
|
|
34
|
+
readonly setActiveRoot: readonly [
|
|
35
|
+
"conversation_uid"
|
|
36
|
+
];
|
|
37
|
+
readonly setActiveChild: readonly [
|
|
38
|
+
"message_uid"
|
|
39
|
+
];
|
|
22
40
|
readonly startRun: readonly [
|
|
23
41
|
"conversation_uid"
|
|
24
42
|
];
|
|
@@ -34,6 +52,10 @@ declare const EXCHANGE_PATH_PARAMS: {
|
|
|
34
52
|
];
|
|
35
53
|
readonly updateSettings: readonly [
|
|
36
54
|
];
|
|
55
|
+
readonly getPolicy: readonly [
|
|
56
|
+
];
|
|
57
|
+
readonly consentPolicy: readonly [
|
|
58
|
+
];
|
|
37
59
|
readonly getAttachment: readonly [
|
|
38
60
|
"attachment_uid"
|
|
39
61
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { K as ChatBusinessCodeName, $ as ChatExchangeEndpointName, Z as ChatExchangeAnswer, S as ChatErrorBody, ad as ChatQueryName, bg as chatQuerySchemas, _ as ChatExchangeBody } from "./index-g-wjju1F.js";
|
|
3
3
|
declare const EXCHANGE_PATH_PARAMS: {
|
|
4
4
|
readonly listConversations: readonly [
|
|
5
5
|
];
|
|
@@ -8,6 +8,12 @@ declare const EXCHANGE_PATH_PARAMS: {
|
|
|
8
8
|
readonly getConversation: readonly [
|
|
9
9
|
"conversation_uid"
|
|
10
10
|
];
|
|
11
|
+
readonly updateConversation: readonly [
|
|
12
|
+
"conversation_uid"
|
|
13
|
+
];
|
|
14
|
+
readonly deleteConversation: readonly [
|
|
15
|
+
"conversation_uid"
|
|
16
|
+
];
|
|
11
17
|
readonly listMessages: readonly [
|
|
12
18
|
"conversation_uid"
|
|
13
19
|
];
|
|
@@ -19,6 +25,18 @@ declare const EXCHANGE_PATH_PARAMS: {
|
|
|
19
25
|
"conversation_uid",
|
|
20
26
|
"message_uid"
|
|
21
27
|
];
|
|
28
|
+
readonly getConversationTree: readonly [
|
|
29
|
+
"conversation_uid"
|
|
30
|
+
];
|
|
31
|
+
readonly searchConversation: readonly [
|
|
32
|
+
"conversation_uid"
|
|
33
|
+
];
|
|
34
|
+
readonly setActiveRoot: readonly [
|
|
35
|
+
"conversation_uid"
|
|
36
|
+
];
|
|
37
|
+
readonly setActiveChild: readonly [
|
|
38
|
+
"message_uid"
|
|
39
|
+
];
|
|
22
40
|
readonly startRun: readonly [
|
|
23
41
|
"conversation_uid"
|
|
24
42
|
];
|
|
@@ -34,6 +52,10 @@ declare const EXCHANGE_PATH_PARAMS: {
|
|
|
34
52
|
];
|
|
35
53
|
readonly updateSettings: readonly [
|
|
36
54
|
];
|
|
55
|
+
readonly getPolicy: readonly [
|
|
56
|
+
];
|
|
57
|
+
readonly consentPolicy: readonly [
|
|
58
|
+
];
|
|
37
59
|
readonly getAttachment: readonly [
|
|
38
60
|
"attachment_uid"
|
|
39
61
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "The chat of the AI Quants applications: the wire contract of its stream events, failure codes, business codes, endpoints (their paths, queries and exchanges), resources, attachments and vocabularies, with the marks of the characters a reader cannot see, the subscription to a run's stream and the notice of its connection, the fold of the stream into the view a window holds, the arithmetic, frame, composer (with its recording through the host's microphone) and attachment rules of the chat's screen, the reading of a refused answer, the names of the diagrams a window saves, and the authorization resources its endpoints guard with.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"license": "MIT",
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@aiquants/authz-core": "^0.6.2",
|
|
78
|
-
"@aiquants/console-ui": "^0.
|
|
78
|
+
"@aiquants/console-ui": "^0.11.0",
|
|
79
79
|
"@aiquants/input-method": "^0.1.2",
|
|
80
|
-
"@aiquants/markdown": "^
|
|
80
|
+
"@aiquants/markdown": "^15.0.0",
|
|
81
81
|
"@aiquants/sse": "^0.4.0",
|
|
82
82
|
"@aiquants/virtualscroll": "^3.26.0",
|
|
83
83
|
"react": ">=19",
|
|
@@ -113,12 +113,12 @@
|
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@aiquants/auth-core": "0.9.4",
|
|
115
115
|
"@aiquants/authz-core": "0.6.4",
|
|
116
|
-
"@aiquants/console-ui": "0.
|
|
116
|
+
"@aiquants/console-ui": "0.11.0",
|
|
117
117
|
"@aiquants/input-method": "0.1.2",
|
|
118
|
-
"@aiquants/markdown": "
|
|
119
|
-
"@aiquants/spreadsheet": "0.
|
|
118
|
+
"@aiquants/markdown": "15.0.0",
|
|
119
|
+
"@aiquants/spreadsheet": "0.22.0",
|
|
120
120
|
"@aiquants/sse": "0.4.0",
|
|
121
|
-
"@aiquants/virtualscroll": "3.
|
|
121
|
+
"@aiquants/virtualscroll": "3.31.1",
|
|
122
122
|
"@testing-library/jest-dom": "^6.9.1",
|
|
123
123
|
"@testing-library/react": "^16.3.2",
|
|
124
124
|
"@testing-library/user-event": "^14.6.1",
|
package/dist/chunk-4NR4KSV6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var H={protocol_version:1,events:{"run.started":{terminal:!1,start:!0,fields:{run_uid:"required",conversation_uid:"required",assistant_message_uid:"required",protocol:"required",model:"required",started_at:"required"}},"step.started":{terminal:!1,start:!1,fields:{step:"required",kind:"required"}},"step.retry":{terminal:!1,start:!1,fields:{step:"required",retry_no:"required",reason:"required",wait_ms:"required"}},"text.delta":{terminal:!1,start:!1,fields:{step:"required",text:"required"}},"reasoning.delta":{terminal:!1,start:!1,fields:{step:"required",text:"required"}},usage:{terminal:!1,start:!1,fields:{step:"required",input_tokens:"required",output_tokens:"required",cached_input_tokens:"required",reasoning_tokens:"required",cost_micros:"required"}},"step.finished":{terminal:!1,start:!1,fields:{step:"required",finish_reason:"required",reasoning_ms:"optional"}},"step.reset":{terminal:!1,start:!1,fields:{step:"required"}},"run.completed":{terminal:!0,start:!1,fields:{finish_reason:"required",usage_total:"required",cost_total_micros:"required"}},"run.failed":{terminal:!0,start:!1,fields:{error_code:"required",detail:"required",retryable:"required",calls:"required"}},"run.cancelled":{terminal:!0,start:!1,fields:{cancelled_by:"required",calls:"required"}},"resync-required":{terminal:!0,start:!1,fields:{}}},event_refusals:["unknown_event","reserved_data","too_deep","not_json","shape"],data_max_depth:8,failure_codes:{CHAT_PROVIDER_FAILED:{detail:[{reason:{presence:"required",values:["rate_limited","quota_exhausted","auth_failed","timeout","error"]},retry:{presence:"required",values:["exhausted","withheld","no_time","none"]},retry_after_seconds:{presence:"optional",type:"count"}}]},CHAT_PROVIDER_REFUSED:{detail:[{}]},CHAT_MODEL_UNAVAILABLE:{detail:[{reason:{presence:"required",values:["access_denied","classification","stopped","breaker_open","ledger_mismatch","config_invalid","credential_refused","reasoning_level_unavailable"]}}]},CHAT_ASSISTANT_UNAVAILABLE:{detail:[{}]},CHAT_CONTEXT_OVERFLOW:{detail:[{}]},CHAT_CONTEXT_CHANGED:{detail:[{}]},CHAT_KNOWLEDGE_UNAVAILABLE:{detail:[{}]},CHAT_KNOWLEDGE_BODY_HIDDEN:{detail:[{}]},CHAT_KNOWLEDGE_SCOPE_TOO_LARGE:{detail:[{}]},CHAT_RUN_LIMIT_REACHED:{detail:[{kind:{presence:"required",values:["steps","tool_calls","events","active_time"]}}]},CHAT_CONFIRM_LIMIT_REACHED:{detail:[{}]},CHAT_CONFIDENTIALITY_BLOCKED:{detail:[{}]},CHAT_BUDGET_EXCEEDED:{detail:[{scope:{presence:"required",values:["run"]}},{scope:{presence:"required",values:["user","tenant"]},resets_at:{presence:"required",type:"instant"}}]},CHAT_RUN_INTERRUPTED:{detail:[{}]},CHAT_STOPPED_BY_ADMIN:{detail:[{}]},CHAT_ACCESS_REVOKED:{detail:[{}]},CHAT_TOOL_ARGS_INVALID:{detail:[{}]},CHAT_TOOL_UNAVAILABLE:{detail:[{}]},CHAT_TOOL_TIMEOUT:{detail:[{}]},CHAT_SOURCE_BUSY:{detail:[{}]},CHAT_TOOL_CONTRACT_ERROR:{detail:[{}]},CHAT_TOOL_INTERRUPTED:{detail:[{}]},CHAT_TOOL_RESULT_SHAPE_CHANGED:{detail:[{}]},CHAT_EGRESS_DENIED:{detail:[{}]}},business_codes:{PERMISSION_DENIED:{http_status:403,number:4031,detail:[{}]},NOT_FOUND:{http_status:404,number:4040,detail:[{resource:{presence:"required",values:["conversation","message","run","approval","source","tool","assistant","citation","attachment"]}}]},REQUEST_INVALID:{http_status:422,number:4222,detail:[{errors:{presence:"required",type:"errors"}}]},UPSTREAM_UNAVAILABLE:{http_status:503,number:5039,detail:[{upstream:{presence:"required",values:["model","stream_store","attachment_store"]}}]},CONFIGURATION_ERROR:{http_status:503,number:5030,detail:[{},{errors:{presence:"required",type:"errors"}},{reading:{presence:"required",values:["transcription","ocr"]}}]},CHAT_POLICY_CONSENT_REQUIRED:{http_status:403,number:40310,detail:[{}]},CHAT_POLICY_NOT_PUBLISHED:{http_status:403,number:40311,detail:[{}]},CHAT_STATE_CONFLICT:{http_status:409,number:40910,detail:[{kind:{presence:"required",values:["approval","branch","edit"]}},{kind:{presence:"required",values:["attachment"]},reason:{presence:"required",values:["processing","failed","already_bound"]}}]},CHAT_RUN_ACTIVE:{http_status:423,number:4233,detail:[{}]},CHAT_ADMISSION_BUSY:{http_status:423,number:4234,detail:[{}]},CHAT_CONCURRENCY_LIMIT:{http_status:429,number:4290,detail:[{scope:{presence:"required",values:["user","tenant","model"]}}]},CHAT_RATE_LIMIT:{http_status:429,number:4291,detail:[{}]},CHAT_BUDGET_EXCEEDED:{http_status:429,number:4292,detail:[{scope:{presence:"required",values:["run"]}},{scope:{presence:"required",values:["user","tenant"]},resets_at:{presence:"required",type:"instant"}}]}},request_invalid_types:["egress_denied","sql_statement_rejected","secret_in_text","individual_number_in_text","idempotency_key_reused","message_role","toggle_unknown","secret_name_unknown","reasoning_shape_invalid","reasoning_summary_unsupported","reasoning_level_unsupported","approval_stale_unconfirmed","model_unavailable","assistant_unavailable","declared_level_below_default","attachment_type_refused","attachment_too_large","attachment_too_many_pixels","attachment_too_many_pages","attachment_too_long","attachment_count_exceeded","attachment_unsupported_by_model","attachment_exceeds_provider_limit","attachment_unread_for_external_model"],host_refusal_roles:["chat_disabled","knowledge_body_hidden"],paths:{base:"/ai/chat",json:{listConversations:{method:"GET",path:"/conversations"},createConversation:{method:"POST",path:"/conversations"},getConversation:{method:"GET",path:"/conversations/{conversation_uid}"},updateConversation:{method:"PATCH",path:"/conversations/{conversation_uid}"},deleteConversation:{method:"DELETE",path:"/conversations/{conversation_uid}"},listMessages:{method:"GET",path:"/conversations/{conversation_uid}/messages"},getMessage:{method:"GET",path:"/conversations/{conversation_uid}/messages/{message_uid}"},getMessagePath:{method:"GET",path:"/conversations/{conversation_uid}/messages/{message_uid}/path"},getConversationTree:{method:"GET",path:"/conversations/{conversation_uid}/tree"},searchConversation:{method:"GET",path:"/conversations/{conversation_uid}/search"},setActiveRoot:{method:"PUT",path:"/conversations/{conversation_uid}/active-root"},setActiveChild:{method:"PUT",path:"/messages/{message_uid}/active-child"},startRun:{method:"POST",path:"/conversations/{conversation_uid}/runs"},getRun:{method:"GET",path:"/runs/{run_uid}"},cancelRun:{method:"POST",path:"/runs/{run_uid}/cancel"},exportConversation:{method:"GET",path:"/conversations/{conversation_uid}/export"},putFeedback:{method:"PUT",path:"/messages/{message_uid}/feedback"},listModels:{method:"GET",path:"/models"},getSettings:{method:"GET",path:"/settings"},updateSettings:{method:"PATCH",path:"/settings"},getPolicy:{method:"GET",path:"/policy"},consentPolicy:{method:"POST",path:"/policy-consents"},listPolicyVersions:{method:"GET",path:"/admin/policy"},publishPolicy:{method:"POST",path:"/admin/policy"},getAttachment:{method:"GET",path:"/attachments/{attachment_uid}"},updateAttachment:{method:"PATCH",path:"/attachments/{attachment_uid}"},deleteAttachment:{method:"DELETE",path:"/attachments/{attachment_uid}"}},upload:{createAttachment:{method:"POST",path:"/attachments"}},content:{getAttachmentContent:{method:"GET",path:"/attachments/{attachment_uid}/content"},getAttachmentPreview:{method:"GET",path:"/attachments/{attachment_uid}/preview"}},stream:{runEvents:{method:"GET",path:"/runs/{run_uid}/events"}}},limits:["CHAT_USER_MESSAGE_MAX_CHARS","CHAT_RUN_POLL_INTERVAL_MS","CHAT_RENDER_DIAGRAM_MAX_CHARS","CHAT_RENDER_DIAGRAM_MAX_EDGES","CHAT_RENDER_MAX_DIAGRAMS_PER_MESSAGE","CHAT_RENDER_DIAGRAM_CACHE_MAX_CHARS","CHAT_RENDER_HTML_CACHE_MAX_CHARS","CHAT_RENDER_HTML_MAX_BYTES","CHAT_RENDER_CONVERT_TIMEOUT_MS","CHAT_RENDER_LOAD_TIMEOUT_MS","CHAT_RENDER_MATH_MAX_SIZE_EM","CHAT_RENDER_MATH_MAX_EXPAND","CHAT_RENDER_LIST_OVERSCAN_ROWS","CHAT_RENDER_SMOOTH_HALF_LIFE_MS","CHAT_CONVERSATION_PAGE_SIZE","CHAT_TITLE_SEARCH_PAUSE_MS","CHAT_ATTACHMENT_MAX_COUNT","CHAT_ATTACHMENT_IMAGE_MAX_BYTES","CHAT_ATTACHMENT_PDF_MAX_BYTES","CHAT_ATTACHMENT_AUDIO_MAX_BYTES","CHAT_ATTACHMENT_AUDIO_MAX_SECONDS","CHAT_ATTACHMENT_POLL_INTERVAL_MS"],attachments:{kinds:{image:{flag:"supports_images",accepted_types:["image/png","image/jpeg","image/webp","image/gif"],failure_tags:["secret_in_text","individual_number_in_text"],part:"image_text",fields:{width:"required",height:"required",text_unread:"required"}},document:{flag:"supports_pdf",accepted_types:["application/pdf"],failure_tags:["ocr_unavailable","secret_in_text","individual_number_in_text"],part:"page",fields:{page_count:"required",unread_pages:"required"}},audio:{flag:"supports_audio",accepted_types:["audio/webm","audio/mp4","audio/wav","audio/mpeg","audio/ogg","audio/flac"],failure_tags:["transcription_unavailable","secret_in_text","individual_number_in_text"],part:"segment",fields:{duration_ms:"required"}}},origins:["user","tool"],states:["processing","ready","failed"],failure_tags:["transcription_unavailable","ocr_unavailable","secret_in_text","individual_number_in_text"],parts:{page:{sources:["text_layer","ocr"],fields:{kind:"required",page:"required",source:"required",text:"required"}},segment:{sources:["transcription"],fields:{kind:"required",start_ms:"required",end_ms:"required",source:"required",text:"required"}},image_text:{sources:["ocr"],fields:{kind:"required",source:"required",text:"required"}}},pdf_deliveries:["document","page_text"],resource:{attachment_uid:"required",origin:"required",kind:"required",content_type:"required",byte_size:"required",sha256:"required",file_name:"required",alt_text:"required",state:"required",failure_tag:"required",expires_at:"required",parts:"required"},message_item:{attachment_uid:"required",origin:"required",kind:"required",content_type:"required",byte_size:"required",file_name:"required",alt_text:"required"},upload:{model_uid:"required",file_name:"required",alt_text:"optional",file:"required"},update:{alt_text:"required"},fragments:{message:{attachments:"required"},message_request:{attachment_ids:"required"},model:{supports_images:"required",supports_pdf:"required",supports_audio:"required",pdf_delivery:"required"}}},vocabularies:{run_states:["queued","running","awaiting_approval","completed","failed","cancelled"],active_run_states:["queued","running","awaiting_approval"],run_kinds:["send","edit","regenerate"],finish_reasons:["stop","length"],message_roles:["user","assistant"],reasoning_levels:["off","low","medium","high","max"],title_origins:["user","model"],confidentiality_levels:["PUBLIC","INTERNAL","DEPARTMENT","CONFIDENTIAL","RESTRICTED"],model_unavailable_reasons:["access_denied","classification","disabled","ledger_mismatch","config_invalid","credential_refused","stopped","breaker_open"],model_upstream_unavailable_reasons:["stopped","breaker_open"],processing_locations:["internal","external"],export_formats:["markdown","json"],language_codes:["ja","en"],notification_levels:["all","finish","none"],stream_displays:["smooth","immediate","on_finish"],message_actions_displays:["auto","always","hover"],send_keys:["enter","ctrl_enter"]},queries:{listConversations:{cursor:"optional",until:"optional",q:"optional",pinned:"optional"},listMessages:{cursor:"optional"},getMessagePath:{cursor:"optional"},searchConversation:{q:"required"},exportConversation:{format:"required"},listModels:{conversation_uid:"optional",declared_level:"optional"}},resources:{conversation:{conversation_uid:"required",title:"required",title_origin:"required",model_uid:"required",reasoning_level:"required",declared_level:"required",pinned:"required",last_activity_at:"required",purge_due_at:"required",active_root_message_uid:"required",active_run:"required",created_at:"required"},active_run:{run_uid:"required",state:"required"},page:{items:"required",next_cursor:"required"},message:{message_uid:"required",conversation_uid:"required",parent_message_uid:"required",role:"required",text:"required",created_at:"required",active_child_message_uid:"required",sibling_message_uids:"required",attachments:"required"},message_role_fields:{user:{},assistant:{context_cut_before:"required",run:"required"}},message_run:{run_uid:"required",model:"required",state:"required",segment_no:"required",finish_reason:"required",failure:"required",cancelled_by:"required",stream_open:"required",view:"required"},message_run_model:{model_uid:"required",display_name:"required"},run_failure:{error_code:"required",detail:"required"},run_seed:{mark:"required",started:"required",steps:"required"},run_seed_step:{step:"required",kind:"required",text:"required",reasoning:"required",usage:"required",finish:"required"},run_request:{send:{kind:"required",client_request_id:"required",parent_message_uid:"required",text:"required",attachment_ids:"required",model_uid:"required",reasoning_level:"required"},edit:{kind:"required",client_request_id:"required",target_message_uid:"required",text:"required",attachment_ids:"required",model_uid:"required",reasoning_level:"required"},regenerate:{kind:"required",client_request_id:"required",target_message_uid:"required",model_uid:"required",reasoning_level:"required"}},run_accepted:{run_uid:"required",user_message_uid:"required",assistant_message_uid:"required"},conversation_request:{client_request_id:"required",text:"required",attachment_ids:"required",model_uid:"required",reasoning_level:"required",declared_level:"required"},conversation_accepted:{conversation:"required",run:"required"},run:{run_uid:"required",conversation_uid:"required",assistant_message_uid:"required",state:"required",segment_no:"required"},settings:{user_settings:"required",conversation_defaults:"required",limits:"required"},user_settings:{language_code:"required",notification_level:"required",stream_display:"required",follow_scroll:"required",reduce_motion:"required",message_actions_display:"required",collapse_action_labels:"required",send_key:"required",default_model_uid:"required"},user_settings_update:{language_code:"optional",notification_level:"optional",stream_display:"optional",follow_scroll:"optional",reduce_motion:"optional",message_actions_display:"optional",collapse_action_labels:"optional",send_key:"optional",default_model_uid:"optional"},conversation_defaults:{model_uid:"required",declared_level:"required"},model_list:{items:"required"},model:{model_uid:"required",display_name:"required",unavailable_reason:"required",reasoning_levels:"required",default_reasoning_level:"required",reasoning_summary:"required",supports_tools:"required",supports_images:"required",supports_pdf:"required",supports_audio:"required",pdf_delivery:"required",context_window_tokens:"required",max_output_tokens:"required",processing_location:"required",processing_countries:"required",storage_countries:"required",used_for_training:"required",retention_days:"required",contract_terms:"required",recent_failures:"required"},model_hidden:{model_uid:"required",unavailable_reason:"required"},recent_failures:{calls:"required",failures:"required"},error_body:{error_code:"required",error_msg:"required",request_id:"required",detail:"optional",failed_stage:"optional"}},exchanges:{listConversations:{status:200,body:null,answer:"conversation_page"},createConversation:{status:201,body:"conversation_request",answer:"conversation_accepted"},getConversation:{status:200,body:null,answer:"conversation"},listMessages:{status:200,body:null,answer:"message_page"},getMessage:{status:200,body:null,answer:"message"},getMessagePath:{status:200,body:null,answer:"message_page"},startRun:{status:202,body:"run_request",answer:"run_accepted"},getRun:{status:200,body:null,answer:"run"},cancelRun:{status:200,body:null,answer:"run"},listModels:{status:200,body:null,answer:"model_list"},getSettings:{status:200,body:null,answer:"settings"},updateSettings:{status:200,body:"user_settings_update",answer:"settings"},getAttachment:{status:200,body:null,answer:"attachment"},updateAttachment:{status:200,body:"attachment_update",answer:"attachment"},deleteAttachment:{status:204,body:null,answer:null},createAttachment:{status:201,body:"attachment_upload",answer:"attachment"}},invisible:{set:{default_ignorable:["U+00AD","U+034F","U+061C","U+115F..U+1160","U+17B4..U+17B5","U+180B..U+180F","U+200B..U+200F","U+202A..U+202E","U+2060..U+206F","U+3164","U+FE00..U+FE0F","U+FEFF","U+FFA0","U+FFF0..U+FFF8","U+1BCA0..U+1BCA3","U+1D173..U+1D17A","U+E0000..U+E0FFF"],controls:["U+0000..U+0008","U+000B..U+000C","U+000E..U+001F","U+007F..U+009F"],separators:["U+2028..U+2029"],interlinear_annotations:["U+FFF9..U+FFFB"],noncharacters:["U+FDD0..U+FDEF","U+FFFE..U+FFFF","U+1FFFE..U+1FFFF","U+2FFFE..U+2FFFF","U+3FFFE..U+3FFFF","U+4FFFE..U+4FFFF","U+5FFFE..U+5FFFF","U+6FFFE..U+6FFFF","U+7FFFE..U+7FFFF","U+8FFFE..U+8FFFF","U+9FFFE..U+9FFFF","U+AFFFE..U+AFFFF","U+BFFFE..U+BFFFF","U+CFFFE..U+CFFFF","U+DFFFE..U+DFFFF","U+EFFFE..U+EFFFF","U+FFFFE..U+FFFFF","U+10FFFE..U+10FFFF"]},exceptions:{variation_selectors:["U+180B..U+180D","U+180F","U+FE00..U+FE0F","U+E0100..U+E01EF"],joiners:["U+200C..U+200D"],tag_flags:[["U+1F3F4","U+E0067","U+E0062","U+E0065","U+E006E","U+E0067","U+E007F"],["U+1F3F4","U+E0067","U+E0062","U+E0073","U+E0063","U+E0074","U+E007F"],["U+1F3F4","U+E0067","U+E0062","U+E0077","U+E006C","U+E0073","U+E007F"]]},white_space:["U+0009..U+000D","U+0020","U+0085","U+00A0","U+1680","U+2000..U+200A","U+2028..U+2029","U+202F","U+205F","U+3000"]},drawable_diagrams:[{type:"mindmap",header:"mindmap"},{type:"architecture",header:"architecture-beta"},{type:"c4",header:"C4Context"},{type:"kanban",header:"kanban"},{type:"classDiagram",header:"classDiagram-v2"},{type:"class",header:"classDiagram"},{type:"er",header:"erDiagram"},{type:"gantt",header:"gantt"},{type:"info",header:"info"},{type:"pie",header:"pie"},{type:"requirement",header:"requirementDiagram"},{type:"sequence",header:"sequenceDiagram"},{type:"swimlane",header:"swimlane-beta"},{type:"flowchart-v2",header:"flowchart"},{type:"timeline",header:"timeline"},{type:"gitGraph",header:"gitGraph"},{type:"stateDiagram",header:"stateDiagram-v2"},{type:"quadrantChart",header:"quadrantChart"},{type:"sankey",header:"sankey"},{type:"packet",header:"packet"},{type:"xychart",header:"xychart"},{type:"block",header:"block"},{type:"eventmodeling",header:"eventmodeling"},{type:"treeView",header:"treeView-beta"},{type:"ishikawa",header:"ishikawa-beta"},{type:"railroad",header:"railroad-beta"},{type:"railroadEbnf",header:"railroad-ebnf-beta"},{type:"railroadAbnf",header:"railroad-abnf-beta"},{type:"railroadPeg",header:"railroad-peg-beta"},{type:"venn",header:"venn-beta"},{type:"wardley",header:"wardley-beta"},{type:"cynefin",header:"cynefin-beta"}]};var I=e=>`U+${e.toString(16).toUpperCase().padStart(4,"0")}`,re=e=>{let a=/^U\+[0-9A-F]{4,6}$/.test(e)?Number.parseInt(e.slice(2),16):Number.NaN;if(!(a<=1114111)||a>=55296&&a<=57343||I(a)!==e)throw new Error(`not the contract's spelling of a code point: ${JSON.stringify(e)}`);return a},U=(e,a)=>{let n=[];for(let r of e){let s=r.split("..").map(re),o=s[0],d=s.at(-1);if(s.length>2||s.length===2&&!(o<d))throw new Error(`not the contract's spelling of a range of code points in ${a}: ${JSON.stringify(r)}`);let i=n.at(-1);if(i!==void 0&&!(o>i[1]+1))throw new Error(`not in order with a gap after every range in ${a}: ${JSON.stringify(r)}`);n.push([o,d])}return n},b=(e,a)=>e.some(([n,r])=>n<=a&&a<=r),De=e=>{let a=[],n=Object.entries(e.set).flatMap(([i,c])=>U(c,`the set's ${i}`)).sort((i,c)=>i[0]-c[0]);for(let[i,c]of n){let y=a.at(-1);if(y===void 0||i>y[1]+1)a.push([i,c]);else if(i===y[1]+1)a[a.length-1]=[y[0],c];else throw new Error(`two categories of the set share ${I(i)}`)}let r=U(e.exceptions.variation_selectors,"the variation selectors"),s=U(e.exceptions.joiners,"the joiners");for(let[i,c]of[...r,...s])if(!a.some(y=>y[0]<=i&&c<=y[1]))throw new Error(`an exception is outside the set: ${I(i)}`);let o=U(e.white_space,"the white space"),d=e.exceptions.tag_flags.map(i=>{let[c,...y]=i.map(re);if(c===void 0||b(a,c)||b(o,c)||y.length===0||!y.every(Ue=>b(a,Ue)))throw new Error(`a tag flag is not a visible character followed by characters of the set: ${JSON.stringify(i)}`);return[c,...y]});return{set:a,variationSelectors:r,joiners:s,tagFlags:d,whiteSpace:o}},A=De(H.invisible),D=e=>e.map(([a,n])=>a===n?`\\u{${a.toString(16)}}`:`\\u{${a.toString(16)}}-\\u{${n.toString(16)}}`).join(""),se=`[^${D(A.set)}${D(A.whiteSpace)}]`,ke=new RegExp(`(${A.tagFlags.map(e=>e.map(a=>`\\u{${a.toString(16)}}`).join("")).join("|")})|[${D(A.set)}]`,"gu"),oe=new RegExp(se,"uy"),we=new RegExp(`[${D(A.variationSelectors)}]`,"uy"),Me=new RegExp(se,"u"),Le=[...new Map(A.tagFlags.flatMap(([e,...a])=>a.slice(0,-1).map((n,r)=>{let s=String.fromCodePoint(...a.slice(0,r+1));return[String.fromCodePoint(e)+s,s.length]})))].map(([e,a])=>({ending:e,held:a})),w=(e,a)=>{let n=e.charCodeAt(a-1),r=e.charCodeAt(a-2);return n>=56320&&n<=57343&&r>=55296&&r<=56319?a-2:a-1},X=(e,a,n)=>(e.lastIndex=n,e.test(a)),k=(e,a)=>a>0&&X(oe,e,w(e,a)),ie=(e,a)=>{if(a===0)return!1;let n=w(e,a);return X(we,e,n)&&k(e,n)},je=(e,a,n)=>{let r=n.codePointAt(0);return b(A.variationSelectors,r)?k(e,a):b(A.joiners,r)&&X(oe,e,a+n.length)&&(k(e,a)||ie(e,a))},Pe=e=>{if(e.length===0)return 0;let a=w(e,e.length),n=e.codePointAt(a);if(b(A.joiners,n)&&(k(e,a)||ie(e,a)))return a;let r=Le.find(({ending:s})=>e.endsWith(s));return r===void 0?e.length:e.length-r.held},Be=(e,a)=>{let n=a.complete?e:e.slice(0,Pe(e)),r=[],s=0,o=0;for(let d of n.matchAll(ke)){let[i,c]=d;c!==void 0||je(n,d.index,i)||(r.push(n.slice(s,d.index),`\u27E6${I(i.codePointAt(0))}\u27E7`),s=d.index+i.length,o+=1)}return o===0?{text:n,marks:o}:(r.push(n.slice(s)),{text:r.join(""),marks:o})},Ge=e=>Me.test(e),$=e=>{let a=0;for(let r of e){if(!b(A.whiteSpace,r.codePointAt(0)))break;a+=r.length}let n=e.length;for(;n>a;){let r=w(e,n);if(!b(A.whiteSpace,e.codePointAt(r)))break;n=r}return a===n?null:e.slice(a,n)};import{z as t}from"zod";var M=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;let a=Object.getPrototypeOf(e);return a===null||typeof a=="object"&&Object.getPrototypeOf(a)===null},u=e=>{if(Array.isArray(e)||M(e)){for(let a of Object.values(e))u(a);Object.freeze(e)}return e},de=e=>u(e);var le=e=>{if(!(Number.isInteger(e)&&e>=1))throw new RangeError(`the most members of one set of marks is not a positive integer: ${e}`);let a=[],n=new Set;return a.push(n),{has:r=>{for(let s of a)if(s.has(r))return!0;return!1},add:r=>{n.size===e&&(n=new Set,a.push(n)),n.add(r)}}};var g=de(H),ha=g.protocol_version,ga=u(["chat_disabled","knowledge_body_hidden"]),ze=u(["CHAT_USER_MESSAGE_MAX_CHARS","CHAT_RUN_POLL_INTERVAL_MS","CHAT_RENDER_DIAGRAM_MAX_CHARS","CHAT_RENDER_DIAGRAM_MAX_EDGES","CHAT_RENDER_MAX_DIAGRAMS_PER_MESSAGE","CHAT_RENDER_DIAGRAM_CACHE_MAX_CHARS","CHAT_RENDER_HTML_CACHE_MAX_CHARS","CHAT_RENDER_HTML_MAX_BYTES","CHAT_RENDER_CONVERT_TIMEOUT_MS","CHAT_RENDER_LOAD_TIMEOUT_MS","CHAT_RENDER_MATH_MAX_SIZE_EM","CHAT_RENDER_MATH_MAX_EXPAND","CHAT_RENDER_LIST_OVERSCAN_ROWS","CHAT_RENDER_SMOOTH_HALF_LIFE_MS","CHAT_CONVERSATION_PAGE_SIZE","CHAT_TITLE_SEARCH_PAUSE_MS","CHAT_ATTACHMENT_MAX_COUNT","CHAT_ATTACHMENT_IMAGE_MAX_BYTES","CHAT_ATTACHMENT_PDF_MAX_BYTES","CHAT_ATTACHMENT_AUDIO_MAX_BYTES","CHAT_ATTACHMENT_AUDIO_MAX_SECONDS","CHAT_ATTACHMENT_POLL_INTERVAL_MS"]),fa=g.drawable_diagrams,m=u({run_states:["queued","running","awaiting_approval","completed","failed","cancelled"],active_run_states:["queued","running","awaiting_approval"],run_kinds:["send","edit","regenerate"],finish_reasons:["stop","length"],message_roles:["user","assistant"],reasoning_levels:["off","low","medium","high","max"],title_origins:["user","model"],confidentiality_levels:["PUBLIC","INTERNAL","DEPARTMENT","CONFIDENTIAL","RESTRICTED"],model_unavailable_reasons:["access_denied","classification","disabled","ledger_mismatch","config_invalid","credential_refused","stopped","breaker_open"],model_upstream_unavailable_reasons:["stopped","breaker_open"],processing_locations:["internal","external"],export_formats:["markdown","json"],language_codes:["ja","en"],notification_levels:["all","finish","none"],stream_displays:["smooth","immediate","on_finish"],message_actions_displays:["auto","always","hover"],send_keys:["enter","ctrl_enter"]}),Xe=/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,ye=/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})\.[0-9]{7}Z$/,$e=/[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/,Ke=e=>{let a=ye.exec(e);if(a===null)return!1;let[n,r,s,o,d,i]=a.slice(1).map(Number),c=new Date(0);return c.setUTCFullYear(n,r-1,s),c.setUTCHours(o,d,i,0),n>=1&&c.getUTCFullYear()===n&&c.getUTCMonth()===r-1&&c.getUTCDate()===s&&c.getUTCHours()===o&&c.getUTCMinutes()===d&&c.getUTCSeconds()===i},l=t.string().regex(Xe),R=t.string().regex(ye).refine(Ke,{message:"not a real instant"}),h=t.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),T=t.number().int().positive().max(Number.MAX_SAFE_INTEGER),G=e=>!$e.test(e),p=t.string().min(1).refine(G,{message:"a lone surrogate"}),C=t.string().refine(G,{message:"a lone surrogate"}),ce=p.refine(e=>($(e)??"")===e,{message:"white space at an end"}),ee=u(Object.keys(g.failure_codes)),Ze=t.enum(ee),_=t.object({}).strict(),te=u({CHAT_PROVIDER_FAILED:t.object({reason:t.enum(["rate_limited","quota_exhausted","auth_failed","timeout","error"]),retry:t.enum(["exhausted","withheld","no_time","none"]),retry_after_seconds:h.optional()}).strict(),CHAT_PROVIDER_REFUSED:_,CHAT_MODEL_UNAVAILABLE:t.object({reason:t.enum(["access_denied","classification","stopped","breaker_open","ledger_mismatch","config_invalid","credential_refused","reasoning_level_unavailable"])}).strict(),CHAT_ASSISTANT_UNAVAILABLE:_,CHAT_CONTEXT_OVERFLOW:_,CHAT_CONTEXT_CHANGED:_,CHAT_KNOWLEDGE_UNAVAILABLE:_,CHAT_KNOWLEDGE_BODY_HIDDEN:_,CHAT_KNOWLEDGE_SCOPE_TOO_LARGE:_,CHAT_RUN_LIMIT_REACHED:t.object({kind:t.enum(["steps","tool_calls","events","active_time"])}).strict(),CHAT_CONFIRM_LIMIT_REACHED:_,CHAT_CONFIDENTIALITY_BLOCKED:_,CHAT_BUDGET_EXCEEDED:t.union([t.object({scope:t.enum(["run"])}).strict(),t.object({scope:t.enum(["user","tenant"]),resets_at:R}).strict()]),CHAT_RUN_INTERRUPTED:_,CHAT_STOPPED_BY_ADMIN:_,CHAT_ACCESS_REVOKED:_,CHAT_TOOL_ARGS_INVALID:_,CHAT_TOOL_UNAVAILABLE:_,CHAT_TOOL_TIMEOUT:_,CHAT_SOURCE_BUSY:_,CHAT_TOOL_CONTRACT_ERROR:_,CHAT_TOOL_INTERRUPTED:_,CHAT_TOOL_RESULT_SHAPE_CHANGED:_,CHAT_EGRESS_DENIED:_}),Ye=t.object({loc:t.array(t.union([C,h])),msg:p,type:p}).strict(),Je=t.array(Ye).min(1),ue=t.object({errors:Je}).strict(),Ee=u({PERMISSION_DENIED:_,NOT_FOUND:t.object({resource:t.enum(["conversation","message","run","approval","source","tool","assistant","citation","attachment"])}).strict(),REQUEST_INVALID:ue,UPSTREAM_UNAVAILABLE:t.object({upstream:t.enum(["model","stream_store","attachment_store"])}).strict(),CONFIGURATION_ERROR:t.union([_,ue,t.object({reading:t.enum(["transcription","ocr"])}).strict()]),CHAT_POLICY_CONSENT_REQUIRED:_,CHAT_POLICY_NOT_PUBLISHED:_,CHAT_STATE_CONFLICT:t.union([t.object({kind:t.enum(["approval","branch","edit"])}).strict(),t.object({kind:t.enum(["attachment"]),reason:t.enum(["processing","failed","already_bound"])}).strict()]),CHAT_RUN_ACTIVE:_,CHAT_ADMISSION_BUSY:_,CHAT_CONCURRENCY_LIMIT:t.object({scope:t.enum(["user","tenant","model"])}).strict(),CHAT_RATE_LIMIT:_,CHAT_BUDGET_EXCEEDED:te.CHAT_BUDGET_EXCEEDED}),ya=u(["egress_denied","sql_statement_rejected","secret_in_text","individual_number_in_text","idempotency_key_reused","message_role","toggle_unknown","secret_name_unknown","reasoning_shape_invalid","reasoning_summary_unsupported","reasoning_level_unsupported","approval_stale_unconfirmed","model_unavailable","assistant_unavailable","declared_level_below_default","attachment_type_refused","attachment_too_large","attachment_too_many_pixels","attachment_too_many_pages","attachment_too_long","attachment_count_exceeded","attachment_unsupported_by_model","attachment_exceeds_provider_limit","attachment_unread_for_external_model"]),Ae=t.object({call:l,status:t.enum(["succeeded","failed","denied","cancelled","interrupted"]),error_code:Ze.nullable()}).strict(),Qe=t.object({input_tokens:h,output_tokens:h,cached_input_tokens:h,reasoning_tokens:h}).strict(),We=e=>t.object({error_code:t.literal(e),detail:te[e],retryable:t.boolean(),calls:t.array(Ae)}).strict(),et=ee.map(e=>We(e)),v=u({"run.started":t.object({run_uid:l,conversation_uid:l,assistant_message_uid:l,protocol:t.number().int().positive().max(Number.MAX_SAFE_INTEGER),model:t.object({model_uid:l,display_name:p}).strict(),started_at:R}).strict(),"step.started":t.object({step:T,kind:t.enum(["llm"])}).strict(),"step.retry":t.object({step:T,retry_no:t.number().int().positive().max(Number.MAX_SAFE_INTEGER),reason:t.enum(["rate_limited","timeout","error"]),wait_ms:h}).strict(),"text.delta":t.object({step:T,text:p}).strict(),"reasoning.delta":t.object({step:T,text:p}).strict(),usage:t.object({step:T,input_tokens:h,output_tokens:h,cached_input_tokens:h,reasoning_tokens:h,cost_micros:h}).strict(),"step.finished":t.object({step:T,finish_reason:t.enum(m.finish_reasons),reasoning_ms:h.optional()}).strict(),"step.reset":t.object({step:T}).strict(),"run.completed":t.object({finish_reason:t.enum(m.finish_reasons),usage_total:Qe,cost_total_micros:h}).strict(),"run.failed":t.discriminatedUnion("error_code",et),"run.cancelled":t.object({cancelled_by:t.enum(["user","admin"]),calls:t.array(Ae)}).strict(),"resync-required":t.object({}).strict()}),tt="resync-required",at=e=>Object.hasOwn(g.events,e),Ea=e=>g.events[e].terminal,Aa=u(Object.keys(g.events).filter(e=>g.events[e].start)),Ca=u(Object.keys(g.events).filter(e=>g.events[e].terminal)),ba=u(["unknown_event","reserved_data","too_deep","not_json","shape"]),B=g.data_max_depth,S=class extends Error{eventName;refusal;constructor(a,n,r){super(`chat event ${JSON.stringify(a)} refused (${n}): ${r}`),this.name="ChatEventRefusedError",this.eventName=a,this.refusal=n}},_e=34,nt=92,rt=new Set([91,123]),st=new Set([93,125]),ot=(e,a)=>{let n=0,r=!1,s=!1;for(let o=0;o<e.length;o+=1){let d=e.charCodeAt(o);if(r)s?s=!1:d===nt?s=!0:d===_e&&(r=!1);else if(d===_e)r=!0;else if(rt.has(d)){if(n+=1,n>a)return!0}else st.has(d)&&(n-=1)}return!1},Ta=(e,a)=>{if(!at(e))throw new S(e,"unknown_event","the contract names no such event");if(e===tt){if(a!=="")throw new S(e,"reserved_data","the reserved event carries no data");return{event:e,data:{}}}if(ot(a,B))throw new S(e,"too_deep",`data nests more than ${B} arrays and objects`);let n;try{n=JSON.parse(a)}catch{throw new S(e,"not_json","data is not JSON")}let r=v[e].safeParse(n);if(!r.success)throw new S(e,"shape",r.error.issues.map(s=>`${s.path.join(".")||"(root)"}: ${s.code}`).join("; "));return{event:e,data:r.data}},it=(e,a)=>{let n=new Set,r=e.replace(/\{([a-z_]+)\}/g,(o,d)=>{n.add(d);let i=a[d];if(i===void 0||i==="")throw new RangeError(`path ${e} needs a value for {${d}}`);return encodeURIComponent(i)}),s=Object.keys(a).filter(o=>!n.has(o));if(s.length>0)throw new RangeError(`path ${e} names no ${s.map(o=>`{${o}}`).join(", ")}`);return r},V=(e,a)=>({method:e.method,path:`${g.paths.base}${it(e.path,a)}`}),Sa=(e,a={})=>V(g.paths.json[e],a),Ra=(e,a={})=>V(g.paths.upload[e],a),va=(e,a)=>V(g.paths.content[e],a).path,xa=(e,a)=>V(g.paths.stream[e],a).path,dt=u({image:"supports_images",document:"supports_pdf",audio:"supports_audio"}),Oa=u(Object.keys(dt)),x=u({image:["image/png","image/jpeg","image/webp","image/gif"],document:["application/pdf"],audio:["audio/webm","audio/mp4","audio/wav","audio/mpeg","audio/ogg","audio/flac"]}),lt=u(["user","tool"]),ct=u(["processing","ready","failed"]),ut=u(["transcription_unavailable","ocr_unavailable","secret_in_text","individual_number_in_text"]),_t=u({image:["secret_in_text","individual_number_in_text"],document:["ocr_unavailable","secret_in_text","individual_number_in_text"],audio:["transcription_unavailable","secret_in_text","individual_number_in_text"]}),pt=u(["document","page_text"]),mt=/^[0-9a-f]{64}$/,ht=t.string().regex(mt),E=h.positive(),Ce=t.object({kind:t.literal("page"),page:E,source:t.enum(["text_layer","ocr"]),text:p}).strict(),be=t.object({kind:t.literal("segment"),start_ms:h,end_ms:h,source:t.enum(["transcription"]),text:p}).strict(),Te=t.object({kind:t.literal("image_text"),source:t.enum(["ocr"]),text:p}).strict(),qa=u({page:Ce,segment:be,image_text:Te}),O={attachment_uid:l,origin:t.enum(lt)},K={byte_size:E,sha256:ht,file_name:p,alt_text:p.nullable(),state:t.enum(ct),failure_tag:t.enum(ut).nullable(),expires_at:R.nullable()},Z={byte_size:E,file_name:p,alt_text:p.nullable()},q={image:{width:E,height:E,text_unread:t.boolean()},document:{page_count:E,unread_pages:t.array(E)},audio:{duration_ms:E}},Y=u({image:t.object({...O,kind:t.literal("image"),content_type:t.enum(x.image),...K,parts:t.array(Te),...q.image}).strict(),document:t.object({...O,kind:t.literal("document"),content_type:t.enum(x.document),...K,parts:t.array(Ce),...q.document}).strict(),audio:t.object({...O,kind:t.literal("audio"),content_type:t.enum(x.audio),...K,parts:t.array(be),...q.audio}).strict()}),J=u({image:t.object({...O,kind:t.literal("image"),content_type:t.enum(x.image),...Z,...q.image}).strict(),document:t.object({...O,kind:t.literal("document"),content_type:t.enum(x.document),...Z,...q.document}).strict(),audio:t.object({...O,kind:t.literal("audio"),content_type:t.enum(x.audio),...Z,...q.audio}).strict()}),f=e=>(a,n)=>e.addIssue({code:t.ZodIssueCode.custom,path:[...a],message:n}),Se=(e,a,n)=>{let r=0;for(let[s,o]of e.entries())o>a?n(["unread_pages",s],"past the last page"):o<=r&&n(["unread_pages",s],"not after the page before it"),r=o},gt=(e,a,n,r)=>{let s=new Set(n),o=0;for(let[d,i]of e.entries())i.page>a?r(["parts",d,"page"],"past the last page"):i.page<o?r(["parts",d,"page"],"before the page of the part before it"):s.has(i.page)&&r(["parts",d,"page"],"a page named unread"),o=i.page},ft=(e,a,n)=>{let r=0;for(let[s,o]of e.entries())o.end_ms<o.start_ms?n(["parts",s,"end_ms"],"before its start"):o.end_ms>a&&n(["parts",s,"end_ms"],"past the end of the audio"),o.start_ms<r&&n(["parts",s,"start_ms"],"before the start of the segment before it"),r=o.start_ms},yt=(e,a)=>{let n=f(a);switch(e.state==="failed"!=(e.failure_tag!==null)&&n(["failure_tag"],"a failure tag goes with the failed state and with no other"),e.failure_tag!==null&&!_t[e.kind].includes(e.failure_tag)&&n(["failure_tag"],"a failure tag the kind does not fail with"),e.state!=="ready"&&e.parts.length>0&&n(["parts"],"only a ready attachment holds read text"),e.kind){case"image":e.parts.length>1&&n(["parts"],"an image holds one read text at most"),e.text_unread&&(e.state!=="ready"&&n(["text_unread"],"only a ready attachment marks its text unread"),e.parts.length>0&&n(["text_unread"],"an image marked unread holds no read text"));break;case"document":e.state!=="ready"&&e.unread_pages.length>0&&n(["unread_pages"],"only a ready attachment names unread pages"),Se(e.unread_pages,e.page_count,n),gt(e.parts,e.page_count,e.unread_pages,n);break;case"audio":ft(e.parts,e.duration_ms,n);break}},Et=t.discriminatedUnion("kind",[Y.image,Y.document,Y.audio]).superRefine(yt),At=t.discriminatedUnion("kind",[J.image,J.document,J.audio]).superRefine((e,a)=>{e.kind==="document"&&Se(e.unread_pages,e.page_count,f(a))}),z=(e,a,n)=>{let r=new Set;for(let[s,o]of e.entries())r.has(o)&&a(n(s),"given twice"),r.add(o)},Ct=t.array(l).superRefine((e,a)=>z(e,f(a),n=>[n])),bt=t.array(At).superRefine((e,a)=>z(e.map(n=>n.attachment_uid),f(a),n=>[n,"attachment_uid"])),F=u({message:{attachments:bt},message_request:{attachment_ids:Ct},model:{supports_images:t.boolean(),supports_pdf:t.boolean(),supports_audio:t.boolean(),pdf_delivery:t.enum(pt).nullable()}}),Tt=(e,a)=>{e.supports_pdf!==(e.pdf_delivery!==null)&&f(a)(["pdf_delivery"],"how a model takes a PDF goes with its flag for PDFs and with nothing else")},St=t.object({model_uid:l,file_name:p,alt_text:p.optional(),file:t.instanceof(Blob)}).strict(),Rt=t.object({alt_text:p.nullable()}).strict(),vt=/^[A-Za-z0-9_-]{1,1024}$/,xt=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,Re=/^(0|[1-9][0-9]{0,19})-(0|[1-9][0-9]{0,19})$/,Ot=(1n<<64n)-1n,N=t.string().regex(vt),L=t.string().regex(xt),qt=e=>{let a=Re.exec(e);return a===null?!1:a.slice(1).every(n=>BigInt(n)<=Ot)},Nt=t.string().regex(Re).refine(qt,{message:"a part above 64 bits"}).brand(),Ft=t.object({step:T,kind:v["step.started"].shape.kind,text:C,reasoning:C,usage:v.usage.omit({step:!0}).nullable(),finish:v["step.finished"].omit({step:!0}).nullable()}).strict(),ae=(e,a,n)=>{for(let[r,s]of e.steps.entries()){let o=e.steps[r-1];a.order&&o!==void 0&&o.step>=s.step&&n(["steps",r,"step"],"the seed's steps are not in increasing order of their numbers"),a.mark&&e.mark===null&&(s.text!==""||s.reasoning!=="")&&n(["steps",r],"a seed without a mark holds a step's text or reasoning")}},ve=t.object({mark:Nt.nullable(),started:v["run.started"].nullable(),steps:t.array(Ft)}).strict(),Ht=ve.superRefine((e,a)=>ae(e,{order:!0,mark:!1},f(a))),Na=ve.superRefine((e,a)=>ae(e,{order:!0,mark:!0},f(a))),Ut=t.object({run_uid:l,state:t.enum(m.active_run_states)}).strict(),ne=t.object({conversation_uid:l,title:p.nullable(),title_origin:t.enum(m.title_origins).nullable(),model_uid:l,reasoning_level:t.enum(m.reasoning_levels),declared_level:t.enum(m.confidentiality_levels),pinned:t.boolean(),last_activity_at:R,purge_due_at:R.nullable(),active_root_message_uid:l,active_run:Ut.nullable(),created_at:R}).strict().superRefine((e,a)=>{e.title===null!=(e.title_origin===null)&&f(a)(["title_origin"],"a title and its origin are null together")}),xe=e=>t.object({items:t.array(e),next_cursor:N.nullable()}).strict(),It=xe(ne),Dt=e=>t.object({error_code:t.literal(e),detail:te[e]}).strict(),kt=t.discriminatedUnion("error_code",ee.map(e=>Dt(e))),wt=t.object({model_uid:l,display_name:p.nullable()}).strict(),Mt=t.object({run_uid:l,model:wt,state:t.enum(m.run_states),segment_no:E,finish_reason:t.enum(m.finish_reasons).nullable(),failure:kt.nullable(),cancelled_by:v["run.cancelled"].shape.cancelled_by.nullable(),stream_open:t.boolean(),view:Ht}).strict().superRefine((e,a)=>{let n=f(a);e.state==="completed"!=(e.finish_reason!==null)&&n(["finish_reason"],"a run's finish reason goes with its completed state and with nothing else"),e.state==="failed"!=(e.failure!==null)&&n(["failure"],"a run's failure goes with its failed state and with nothing else"),e.state==="cancelled"!=(e.cancelled_by!==null)&&n(["cancelled_by"],"who cancelled a run goes with its cancelled state and with nothing else"),e.stream_open&&ae(e.view,{order:!1,mark:!0},(r,s)=>n(["view",...r],s))}),pe={message_uid:l,conversation_uid:l,parent_message_uid:l.nullable()},me={created_at:R,active_child_message_uid:l.nullable(),sibling_message_uids:t.array(l),...F.message},he=u({user:t.object({...pe,role:t.literal("user"),text:C,...me}).strict(),assistant:t.object({...pe,role:t.literal("assistant"),text:C,...me,context_cut_before:l.nullable(),run:Mt}).strict()}),Lt=(e,a)=>{let n=f(a);z(e.sibling_message_uids,n,r=>["sibling_message_uids",r]),e.sibling_message_uids.includes(e.message_uid)||n(["sibling_message_uids"],"a message is one of its siblings"),e.role==="user"&&e.text===""&&e.attachments.length===0&&n(["text"],"a message without text holds an attachment")},Oe=t.discriminatedUnion("role",[he.user,he.assistant]).superRefine(Lt),jt=xe(Oe),j={model_uid:l,reasoning_level:t.enum(m.reasoning_levels)},Q=u({send:t.object({kind:t.literal("send"),client_request_id:L,parent_message_uid:l,text:C,...F.message_request,...j}).strict(),edit:t.object({kind:t.literal("edit"),client_request_id:L,target_message_uid:l,text:C,...F.message_request,...j}).strict(),regenerate:t.object({kind:t.literal("regenerate"),client_request_id:L,target_message_uid:l,...j}).strict()}),qe=(e,a)=>{e.text===""&&e.attachment_ids.length===0&&a(["text"],"a message without text binds an attachment")},Pt=t.discriminatedUnion("kind",[Q.send,Q.edit,Q.regenerate]).superRefine((e,a)=>{e.kind!=="regenerate"&&qe(e,f(a))}),Ne=t.object({run_uid:l,user_message_uid:l.nullable(),assistant_message_uid:l}).strict(),Bt=t.object({client_request_id:L,text:C,...F.message_request,...j,declared_level:t.enum(m.confidentiality_levels)}).strict().superRefine((e,a)=>qe(e,f(a))),Gt=t.object({conversation:ne,run:Ne.extend({user_message_uid:l})}).strict(),Vt=t.object({run_uid:l,conversation_uid:l,assistant_message_uid:l,state:t.enum(m.run_states),segment_no:E}).strict(),Fe=t.object({language_code:t.enum(m.language_codes),notification_level:t.enum(m.notification_levels),stream_display:t.enum(m.stream_displays),follow_scroll:t.boolean(),reduce_motion:t.boolean(),message_actions_display:t.enum(m.message_actions_displays),collapse_action_labels:t.boolean(),send_key:t.enum(m.send_keys),default_model_uid:l.nullable()}).strict(),zt=Fe.partial().superRefine((e,a)=>{Object.values(e).every(n=>n===void 0)&&f(a)([],"no setting; an update names at least one setting it changes")}),Xt=t.object({model_uid:l.nullable(),declared_level:t.enum(m.confidentiality_levels)}).strict(),$t=t.object(Object.fromEntries(ze.map(e=>[e,E]))).strict(),Kt=t.object({user_settings:Fe,conversation_defaults:Xt,limits:$t}).strict(),Zt=t.object({calls:h,failures:h}).strict().superRefine((e,a)=>{e.failures>e.calls&&f(a)(["failures"],"more failures than calls")}),Yt=(e,a)=>{let n=-1;for(let[r,s]of e.reasoning_levels.entries()){let o=m.reasoning_levels.indexOf(s);o<=n&&a(["reasoning_levels",r],"not after the level before it in the vocabulary's order"),n=o}e.reasoning_levels.includes(e.default_reasoning_level)||a(["default_reasoning_level"],"not one of the model's reasoning levels")},Jt=t.object({model_uid:l,display_name:p,unavailable_reason:t.enum(m.model_unavailable_reasons).exclude(["access_denied"]).nullable(),reasoning_levels:t.array(t.enum(m.reasoning_levels)).min(1),default_reasoning_level:t.enum(m.reasoning_levels),reasoning_summary:t.boolean(),supports_tools:t.boolean(),...F.model,context_window_tokens:E,max_output_tokens:E,processing_location:t.enum(m.processing_locations),processing_countries:p,storage_countries:p,used_for_training:t.boolean(),retention_days:h,contract_terms:p,recent_failures:Zt.nullable()}).strict().superRefine((e,a)=>{Tt(e,a),Yt(e,f(a))}),Qt=t.object({model_uid:l,unavailable_reason:t.literal("access_denied")}).strict(),Wt=t.object({items:t.array(t.union([Jt,Qt]))}).strict().superRefine((e,a)=>{let n=f(a);for(let[r,s]of e.items.entries())r>0&&s.unavailable_reason==="access_denied"&&n(["items",r],"a hidden row comes first");z(e.items.map(r=>r.model_uid),n,r=>["items",r,"model_uid"])}),He=new Map(Object.keys(g.business_codes).map(e=>[g.business_codes[e].number,e])),P="a value no JSON text reads as",ea=(e,a)=>{let n=e.length,r=Reflect.ownKeys(e).length-1;return n!==r?{kind:"problem",message:P}:{kind:"array",source:e,length:r,depth:a,copy:[],next:0}},ge=(e,a)=>{let n=[];for(let r of Reflect.ownKeys(e)){if(typeof r=="symbol")return{kind:"problem",message:"a member name that is not a text"};if(!G(r))return{kind:"problem",message:"a lone surrogate"};n.push(r)}return{kind:"object",source:e,names:n,depth:a,copy:{},next:0}},ta=e=>{let a=e.kind==="array"?e.length:e.names.length;if(e.next===a)return;let n=e.next;return e.next+=1,e.kind==="array"?n:e.names[n]},fe=(e,a,n)=>{Object.defineProperty(e,a,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},aa=e=>{if(!M(e))return{kind:"problem",message:"not a JSON object"};let a=ge(e,1);if(a.kind==="problem")return a;let n=le(4194304);n.add(e);let r=[a];for(let s=r.at(-1);s!==void 0;s=r.at(-1)){let o=ta(s);if(o===void 0){r.pop();continue}let d=Object.getOwnPropertyDescriptor(s.source,o);if(d===void 0||d.enumerable!==!0||!Object.hasOwn(d,"value"))return{kind:"problem",message:P};let i=d.value;if(typeof i=="string"&&!G(i))return{kind:"problem",message:"a lone surrogate"};if(typeof i=="number"&&!(Math.abs(i)<=Number.MAX_SAFE_INTEGER))return{kind:"problem",message:`a number outside \xB1${Number.MAX_SAFE_INTEGER}`};if(i===null||typeof i=="string"||typeof i=="number"||typeof i=="boolean"){fe(s.copy,o,i);continue}if(typeof i!="object")return{kind:"problem",message:P};if(n.has(i))return{kind:"problem",message:"an array or object held twice"};if(!(Array.isArray(i)||M(i)))return{kind:"problem",message:P};n.add(i);let c=s.depth+1;if(c>B)return{kind:"problem",message:`nests more than ${B} arrays and objects`};let y=Array.isArray(i)?ea(i,c):ge(i,c);if(y.kind==="problem")return y;fe(s.copy,o,y.copy),r.push(y)}return{kind:"copy",copy:a.copy}},na=t.object({error_code:h,error_msg:p,request_id:p,detail:t.unknown(),failed_stage:p.optional()}).strict(),W=(e,a)=>{for(let n of a)e.addIssue({...n,path:n.path.slice(e.path.length),fatal:!0})},Fa=na.transform((e,a)=>{let{detail:n,...r}=e;if(n===void 0)return r;let s={path:[...a.path,"detail"]};if(typeof n=="string"){let i=C.safeParse(n,s);return i.success?{...e,detail:n}:(W(a,i.error.issues),t.NEVER)}let o=aa(n);if(o.kind==="problem")return W(a,[{code:t.ZodIssueCode.custom,path:s.path,message:o.message}]),t.NEVER;let d=He.get(e.error_code);if(d!==void 0){let c=Ee[d].safeParse(o.copy,s);if(!c.success)return W(a,c.error.issues),t.NEVER}return{...e,detail:o.copy}}),Ha=e=>{let a=He.get(e.error_code);if(a===void 0)return null;let n=Ee[a],r=typeof e.detail=="object"?n.parse(e.detail):null;return{name:a,detail:r}},ra=u({listConversations:t.object({cursor:N.optional(),until:N.optional(),q:ce.optional(),pinned:t.boolean().optional()}).strict().superRefine((e,a)=>{e.cursor!==void 0&&e.until!==void 0&&f(a)(["until"],"the rows after a cursor or the rows before one, not both")}),listMessages:t.object({cursor:N.optional()}).strict(),getMessagePath:t.object({cursor:N.optional()}).strict(),searchConversation:t.object({q:ce}).strict(),exportConversation:t.object({format:t.enum(m.export_formats)}).strict(),listModels:t.object({conversation_uid:l.optional(),declared_level:t.enum(m.confidentiality_levels).optional()}).strict().superRefine((e,a)=>{e.conversation_uid!==void 0&&e.declared_level!==void 0&&f(a)(["declared_level"],"a conversation's list or a new conversation's, not both")})}),Ua=(e,a)=>{let r=ra[e].parse(a),s=new URLSearchParams;for(let d of Object.keys(g.queries[e])){let i=r[d];i!==void 0&&s.append(d,String(i))}let o=s.toString();return o===""?"":`?${o}`},Ia=u({listConversations:{status:200,body:null,answer:"conversation_page"},createConversation:{status:201,body:"conversation_request",answer:"conversation_accepted"},getConversation:{status:200,body:null,answer:"conversation"},listMessages:{status:200,body:null,answer:"message_page"},getMessage:{status:200,body:null,answer:"message"},getMessagePath:{status:200,body:null,answer:"message_page"},startRun:{status:202,body:"run_request",answer:"run_accepted"},getRun:{status:200,body:null,answer:"run"},cancelRun:{status:200,body:null,answer:"run"},listModels:{status:200,body:null,answer:"model_list"},getSettings:{status:200,body:null,answer:"settings"},updateSettings:{status:200,body:"user_settings_update",answer:"settings"},getAttachment:{status:200,body:null,answer:"attachment"},updateAttachment:{status:200,body:"attachment_update",answer:"attachment"},deleteAttachment:{status:204,body:null,answer:null},createAttachment:{status:201,body:"attachment_upload",answer:"attachment"}}),Da=u({conversation_page:It,conversation_request:Bt,conversation_accepted:Gt,conversation:ne,message_page:jt,message:Oe,run_request:Pt,run_accepted:Ne,run:Vt,model_list:Wt,settings:Kt,user_settings_update:zt,attachment:Et,attachment_update:Rt,attachment_upload:St});export{u as a,de as b,Be as c,Ge as d,$ as e,g as f,ha as g,ga as h,ze as i,fa as j,m as k,l,R as m,h as n,T as o,p,C as q,ce as r,ee as s,Ze as t,te as u,Ye as v,Je as w,Ee as x,ya as y,Ae as z,v as A,tt as B,at as C,Ea as D,Aa as E,Ca as F,ba as G,B as H,S as I,Ta as J,Sa as K,Ra as L,va as M,xa as N,dt as O,Oa as P,x as Q,lt as R,ct as S,ut as T,_t as U,pt as V,ht as W,Ce as X,be as Y,Te as Z,qa as _,Y as $,J as aa,Et as ba,At as ca,Ct as da,bt as ea,F as fa,Tt as ga,St as ha,Rt as ia,N as ja,L as ka,Nt as la,Ft as ma,Ht as na,Na as oa,Ut as pa,ne as qa,It as ra,kt as sa,wt as ta,Mt as ua,he as va,Oe as wa,jt as xa,Q as ya,Pt as za,Ne as Aa,Bt as Ba,Gt as Ca,Vt as Da,Fe as Ea,zt as Fa,Xt as Ga,$t as Ha,Kt as Ia,Zt as Ja,Jt as Ka,Qt as La,Wt as Ma,Fa as Na,Ha as Oa,ra as Pa,Ua as Qa,Ia as Ra,Da as Sa};
|
package/dist/chunk-EEUIBWBF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r}from"./chunk-PLNRET3Z.js";import{a as s}from"./chunk-4NR4KSV6.js";import{useConsoleUi as f}from"@aiquants/console-ui";var o="\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\u30FC",m="\\u3000-\\u303F\\u30FB\\u3200-\\u33FF\\uFF00-\\uFFEF",c=`[^\\s\\p{C}${o}${m}]`,u=new RegExp(`[${o}]$`,"u"),y=new RegExp(`^[${o}]`,"u"),p=new RegExp(`${c}$`,"u"),_=new RegExp(`^${c}`,"u"),t=(...e)=>e.reduce((n,a)=>p.test(n)&&y.test(a)||u.test(n)&&_.test(a)?`${n} ${a}`:`${n}${a}`,""),i=new Intl.ListFormat("en",{type:"conjunction"}),d={run:"The limit is for one answer.",user:"The limit is for your own use.",tenant:"The limit is for your whole organization."},l={run:"\u4E0A\u9650\u306F 1 \u3064\u306E\u7B54\u3048\u306E\u5206\u3067\u3059\u3002",user:"\u4E0A\u9650\u306F\u3042\u306A\u305F\u306E\u5229\u7528\u306E\u5206\u3067\u3059\u3002",tenant:"\u4E0A\u9650\u306F\u7D44\u7E54\u5168\u4F53\u306E\u5206\u3067\u3059\u3002"},h=s({en:{direction:"ltr",joinSentences:e=>e.join(" "),invisibleMarks:(e,n)=>n===1?`This text holds ${e} character a reader cannot see, shown as \u27E6U+XXXX\u27E7, where XXXX is its code point.`:`This text holds ${e} characters a reader cannot see, each shown as \u27E6U+XXXX\u27E7, where XXXX is the character's code point.`,failures:{codes:{CHAT_PROVIDER_FAILED:"The service that runs the model failed.",CHAT_PROVIDER_REFUSED:"The service that runs the model refused to answer for safety reasons.",CHAT_MODEL_UNAVAILABLE:"The model became unavailable during the answer.",CHAT_ASSISTANT_UNAVAILABLE:"The assistant became unavailable during the answer.",CHAT_CONTEXT_OVERFLOW:"The required parts of the conversation do not fit in what the model can read at once.",CHAT_CONTEXT_CHANGED:"A knowledge passage that the answer used changed during the answer.",CHAT_KNOWLEDGE_UNAVAILABLE:"The knowledge sources could not be searched.",CHAT_KNOWLEDGE_BODY_HIDDEN:"You do not have permission to read the text of these documents.",CHAT_KNOWLEDGE_SCOPE_TOO_LARGE:"The knowledge range holds more documents than the limit.",CHAT_RUN_LIMIT_REACHED:"The answer stopped at a limit.",CHAT_CONFIRM_LIMIT_REACHED:"The answer asked for your approval as many times as one answer may ask.",CHAT_CONFIDENTIALITY_BLOCKED:"This conversation holds information that this model may not receive.",CHAT_BUDGET_EXCEEDED:"The answer stopped at the cost limit.",CHAT_RUN_INTERRUPTED:"The answer was interrupted and could not resume.",CHAT_STOPPED_BY_ADMIN:"An administrator stopped this model.",CHAT_ACCESS_REVOKED:"Your permissions changed during the answer.",CHAT_TOOL_ARGS_INVALID:"The model called a tool with input that does not fit the tool.",CHAT_TOOL_UNAVAILABLE:"The tool is turned off.",CHAT_TOOL_TIMEOUT:"The tool took too long to answer.",CHAT_SOURCE_BUSY:"The data source was busy.",CHAT_TOOL_CONTRACT_ERROR:"The tool failed.",CHAT_TOOL_INTERRUPTED:"The tool's result did not arrive.",CHAT_TOOL_RESULT_SHAPE_CHANGED:"The database returned results in a different form than expected.",CHAT_EGRESS_DENIED:"The tool's destination is not on the allowed list."},details:{CHAT_PROVIDER_FAILED:{reason:{rate_limited:"The service limited how many requests it takes.",quota_exhausted:"The account at the service reached its usage limit or has a billing problem.",auth_failed:"The service refused the credentials that an administrator set.",timeout:"The service took too long to answer.",error:"The service returned an error."},retry:{exhausted:"The chat tried again as many times as it may.",withheld:"The chat held back from trying again, so it would not add to the service's load.",no_time:"Not enough time was left to wait and try again.",none:"The chat did not try again."}},CHAT_MODEL_UNAVAILABLE:{reason:{access_denied:"You do not have permission to use this model.",classification:"This conversation holds information that this model may not receive.",stopped:"The model's server is stopped.",breaker_open:"The model failed several times in a row, so it is paused for a while.",ledger_mismatch:"The model's registration does not match its settings.",config_invalid:"The model's settings have an error.",credential_refused:"The service that runs the model refused its credentials.",reasoning_level_unavailable:"The chosen thinking depth is no longer available for this model."}},CHAT_RUN_LIMIT_REACHED:{kind:{steps:"The answer used all the steps one answer may take.",tool_calls:"The answer used all the tool calls one answer may make.",events:"The answer sent all the updates one answer may send.",active_time:"The answer used all the time one answer may take."}},CHAT_BUDGET_EXCEEDED:{scope:d}}},refusals:{codes:{PERMISSION_DENIED:"You do not have permission to do this.",NOT_FOUND:"Not found.",REQUEST_INVALID:"The request was refused.",UPSTREAM_UNAVAILABLE:"A service the chat needs is not answering.",CONFIGURATION_ERROR:"The chat's settings have an error.",CHAT_POLICY_CONSENT_REQUIRED:"You need to agree to the usage policy first.",CHAT_POLICY_NOT_PUBLISHED:"An administrator needs to publish the usage policy before you can use the chat.",CHAT_STATE_CONFLICT:"Something changed after you started this.",CHAT_RUN_ACTIVE:"This conversation has an answer in progress or waiting for approval.",CHAT_ADMISSION_BUSY:"The chat is busy right now.",CHAT_CONCURRENCY_LIMIT:"Too many answers are in progress at the same time.",CHAT_RATE_LIMIT:"Too many answers were started in the last minute.",CHAT_BUDGET_EXCEEDED:"The cost limit was reached."},details:{NOT_FOUND:{resource:{conversation:"The conversation does not exist, or you do not have permission to see it.",message:"The message does not exist, or you do not have permission to see it.",run:"The answer does not exist, or you do not have permission to see it.",approval:"The approval request does not exist, or you do not have permission to see it.",source:"The data source does not exist, or you do not have permission to see it.",tool:"The tool does not exist, or you do not have permission to see it.",assistant:"The assistant does not exist, or you do not have permission to see it.",citation:"The citation does not exist, or you do not have permission to see it.",attachment:"The attachment does not exist, or you do not have permission to see it."}},UPSTREAM_UNAVAILABLE:{upstream:{model:"The model's server is not answering.",stream_store:"The store that relays answers is not answering.",attachment_store:"The store for attachments is not answering."}},CONFIGURATION_ERROR:{reading:{transcription:"Transcription is set to a service outside this system.",ocr:"Text reading (OCR) is set to a service outside this system."}},CHAT_STATE_CONFLICT:{kind:{approval:"This approval request has already been decided.",branch:"This message is not on the branch you are viewing.",edit:"The message was edited somewhere else.",attachment:"An attachment is not ready for this."},reason:{processing:"The attachment is still being read.",failed:"The attachment could not be read.",already_bound:"The attachment already belongs to a sent message."}},CHAT_CONCURRENCY_LIMIT:{scope:{user:"The limit is for your own answers.",tenant:"The limit is for your whole organization.",model:"The limit is for this model."}},CHAT_BUDGET_EXCEEDED:{scope:d}},rules:{egress_denied:"The destination is not on the allowed list.",sql_statement_rejected:"The SQL statement is not allowed.",secret_in_text:"The text holds something that looks like a password or a key.",individual_number_in_text:"The text holds something that looks like an Individual Number (My Number).",idempotency_key_reused:"The same request was sent before with different content.",message_role:"This action cannot be done on that message.",toggle_unknown:"The request has a setting that the chat does not know.",secret_name_unknown:"The request names a secret that is not registered.",reasoning_shape_invalid:"The model's thinking settings have an error.",reasoning_summary_unsupported:"This model cannot summarize its thinking.",reasoning_level_unsupported:"This model does not offer the chosen thinking depth.",approval_stale_unconfirmed:"Allowing an older approval request needs one more confirmation.",model_unavailable:"The model cannot be used now.",assistant_unavailable:"The assistant cannot be used now.",declared_level_below_default:"The confidentiality level is below your organization's default.",attachment_type_refused:"The file type of the attachment is not accepted.",attachment_too_large:"The attachment is larger than the limit.",attachment_too_many_pixels:"The image has more pixels than the limit.",attachment_too_many_pages:"The PDF has more pages than the limit.",attachment_too_long:"The recording is longer than the limit.",attachment_count_exceeded:"The message has more attachments than the limit.",attachment_unsupported_by_model:"The chosen model does not take this kind of attachment.",attachment_exceeds_provider_limit:"The attachment is larger than the model's service takes.",attachment_unread_for_external_model:"A model outside this system cannot take an attachment with unread text."},hostRoles:{chat_disabled:"The chat is turned off.",knowledge_body_hidden:"You do not have permission to read the text of this document."},statusClasses:{unauthenticated:"You are no longer signed in.",unavailable:"The chat cannot answer right now.","not-accepted":"The chat did not accept the request."}},detailCounts:{retry_after_seconds:(e,n)=>`The service asked for a wait of ${e} ${n===1?"second":"seconds"} before the next try.`},detailInstants:{resets_at:e=>`The limit resets at ${e}.`},attachmentFailures:{transcription_unavailable:"The recording could not be turned into text.",ocr_unavailable:"The text in the PDF could not be read.",secret_in_text:"The file holds something that looks like a password or a key.",individual_number_in_text:"The file holds something that looks like an Individual Number (My Number)."},stream:{notices:{reconnecting:"Reconnecting.",unreachable:"Cannot connect.",incompatible:"Reload the page.","awaiting-end":"The rest cannot be streamed, so this waits for the answer to end."},actions:{"reconnect-now":"Connect now",reread:"Refresh"}},layout:{columns:{conversations:"Conversations",process:"Process and sources"}},composer:{label:"Message",send:"Send",sending:"Sending",stop:"Stop",stopping:"Stopping",tooLongReason:(e,n,a)=>`To send, shorten the message by ${e} ${a===1?"character":"characters"} (the limit is ${n}).`,emptyReason:"To send, write a message.",emptyOrFileReason:"To send, write a message or attach a file.",pendingReason:"You can send when the attachments are ready.",unsendableReason:"To send, remove the attachments that cannot be sent.",refusedByModelReason:"To send, remove the attachments this model does not take.",refusedByModelRestoreReason:"To send, remove the attachments this model does not take, or change the model back.",recordingReason:"You can send when the recording ends.",modelUnchosenReason:"Choose a model to send.",phaseReasons:{sending:"The message is being sent.",running:"You can send when the answer is finished or stopped.",stopping:"You can send when the answer has stopped."},sendUnreached:"The message could not reach the service.",sendIncompatible:"The service's answer could not be read, so whether the message was sent is not known.",sendKeyHints:{enter:"Press Enter to send, and Shift + Enter for a new line.",ctrl_enter:"Press Enter for a new line, and Control + Enter or \u2318 + Enter to send."},restore:e=>`Change the model back to ${e}`,disclaimer:["AI answers can be wrong.","Check important facts in their sources."]},attachments:{attach:"Attach files",list:"Attachments",kinds:{image:"images",document:"PDFs",audio:"audio files"},badges:{image:"Image",document:"PDF",audio:"Audio",file:"File"},joinKinds:e=>i.format(e),accepts:(e,n)=>`You can attach ${e}, up to ${n} in one message.`,acceptsNone:"This model does not take files.",acceptsAfterModel:"Choose a model to attach files.",full:e=>`One message holds up to ${e} attachments.`,fullRemedy:"Remove an attachment to attach another.",uploading:"Uploading.",processing:{image:"Preparing the image.",document:"Reading the text.",audio:"Turning the recording into text."},unreached:"The upload could not reach the service.",incompatible:"The service's answer about the file could not be read.",expired:"The upload has expired.",refusedByModel:{image:"This model does not take images.",document:"This model does not take PDFs.",audio:"This model does not take audio files."},allReady:"The attachments are ready.",retry:"Try again",remove:"Remove",pages:(e,n)=>`${e} ${n===1?"page":"pages"}`,durations:{hours:(e,n)=>`${e} ${n===1?"hour":"hours"}`,minutes:(e,n)=>`${e} ${n===1?"minute":"minutes"}`,seconds:(e,n)=>`${e} ${n===1?"second":"seconds"}`},joinDuration:e=>e.join(" "),pageRange:(e,n)=>`${e}\u2013${n}`,joinPages:e=>i.format(e),unreadPages:(e,n)=>`${n===1?"Page":"Pages"} ${e} could not be read.`,textUnread:"The text in the image could not be read.",pageText:"This model gets only the text of the PDF, without its figures and page images.",joinMeta:e=>e.join(" \xB7 "),statusOf:(e,n)=>`${e}: ${n}`,recording:{record:"Record",stop:"Stop recording",stopping:"Stopping the recording",opening:"Opening the microphone.",recording:"Recording",clock:(e,n)=>`${e} / ${n}`,lengthLimit:e=>`The recording was stopped before it passed the limit of ${e}.`,sizeLimit:e=>`The recording was stopped before it passed the size limit of ${e}.`,ended:"The microphone stopped, so the recording ended.",problems:{denied:["The microphone is not allowed.","Allow it for this site in the browser's settings."],missing:["No microphone was found."],unavailable:["The microphone could not be started.","Another app may be using it."]}},details:{open:"Details",altText:"Alternative text",altTextHelp:["It tells people using a screen reader what the attachment holds.","When it is empty, they hear the file name."],save:"Save",saving:"Saving",saved:"The alternative text is saved.",saveUnreached:"The alternative text could not reach the service.",saveIncompatible:"The service's answer could not be read, so whether the alternative text is saved is not known.",readText:"Text read from the file",noReadText:"No text was read from the file.",page:e=>`Page ${e}`,fromImage:"This text was read from the page image.",partlyFromImage:"Part of this text was read from the page image.",audioText:"The model gets the text read from the recording, not the recording.",timeRange:(e,n)=>`${e}\u2013${n}`}},answer:{plain:"It is shown without formatting.",failures:{unavailable:"The formatting could not be loaded.",timeout:"The formatting took too long.","too-large":"The answer is too large to format.",document:"The formatting of the answer could not be read."},retry:"Try again",retrying:"Trying again",newTab:e=>`(${e}, opens in a new tab)`,destination:e=>`(${e})`,image:{name:"Image",before:"Image: ",after:""},footnote:{reference:"Footnote ",back:(e,n)=>n===1?`Back to the reference to footnote ${e}`:`Back to reference ${n} to footnote ${e}`}},message:{user:"You",assistant:e=>`Assistant (${e})`,assistantUnnamed:"Assistant",writing:"The answer is being written.",ends:{cut:"The answer was cut off.",unwritten:"The answer could not be written.",stopped:"The answer stopped partway.","stopped-early":"The answer stopped before it began.",length:"The answer was cut off at the longest text the model writes at once.",empty:"The answer has no text."},stoppers:{user:"You stopped it.",admin:"An administrator stopped it."},contextCut:"Except for the conversation's first question, messages before this point are not in the latest answer's context."},list:{latest:"Jump to latest",answerEnded:"The answer is complete.",older:"Show earlier messages",olderReading:"Loading earlier messages",olderLoaded:(e,n)=>n===1?"Loaded 1 earlier message.":`Loaded ${e} earlier messages.`,olderUnread:"The earlier messages could not be loaded."},conversations:{newConversation:"New conversation",search:"Search titles",sections:{pinned:"Pinned",recent:"Recent"},untitled:"Untitled conversation",runStates:{answering:"Answering",awaiting:"Awaiting approval"},purgeDue:e=>`It will be deleted at ${e}.`,purgeKeep:"Export it to keep it.",failureReasons:{unreached:"the service could not be reached",incompatible:"the service's answer could not be read",refused:"the request was refused"},denied:"You do not have permission to see the conversations.",reading:"Reading the conversations.",empty:"There are no conversations yet.",searchCount:(e,n,a)=>a===1?`Showing 1 conversation whose title contains "${e}".`:`Showing ${n} conversations whose titles contain "${e}".`,searchMore:"There are more.",searchNone:e=>`No conversation has a title containing "${e}".`},conversation:{reading:"Reading the conversation.",unreached:"The conversation could not be read, as the service could not be reached.",incompatible:"The service's answer could not be read, so the conversation cannot be shown.",retry:"Read again",rereading:"Reading again",reopen:"Open again"},settings:{fields:{language_code:{legend:"Language",description:["The language of the chat's screen."]},send_key:{legend:"Send key",description:["With Enter, a device with only an on-screen keyboard cannot start a new line in a message.","With Control + Enter, a keyboard without a Control key sends only with Send."]},stream_display:{legend:"How answers appear",description:["How an answer's text appears while the model writes it.","While motion is reduced, a smooth answer appears as it arrives."]},follow_scroll:{legend:"Follow answers",description:["Keep the newest text in view while an answer grows.","When off, the list moves only when you send a message or open a conversation."],option:"Follow a growing answer"},reduce_motion:{legend:"Motion",description:["Stop the screen's animations and smooth scrolling, whatever your device asks for."],option:"Reduce motion"},notification_level:{legend:"Announcements of answers",description:["What a screen reader is told about answers.","Replies to what you do, such as a send that failed, are always told."]},default_model_uid:{legend:"Default model",description:["The model a new conversation starts with."]}},languages:{ja:"Japanese",en:"English"},sendKeys:{enter:"Enter sends, Shift + Enter starts a new line",ctrl_enter:"Control + Enter or \u2318 + Enter sends, Enter starts a new line"},streamDisplays:{smooth:"Smoothly, a little at a time",immediate:"As it arrives",on_finish:"All at once, when the text stops"},notificationLevels:{all:"Its start, its end and a wait for approval",finish:"Its end and a wait for approval",none:"Nothing"},tenantModel:"Your organization's default model",unavailableModels:"These models cannot be chosen now.",modelReasons:{access_denied:"You do not have permission to use this model.",classification:"A new conversation's information may not be sent to this model.",disabled:"An administrator has turned this model off.",ledger_mismatch:"The model's registration does not match its settings.",config_invalid:"The model's settings have an error.",credential_refused:"The service that runs the model refused its credentials.",stopped:"The model's server is stopped.",breaker_open:"The model failed several times in a row, so it is paused for a while."},modelStates:{stopped:"stopped now",breaker_open:"paused after repeated failures"},modelWithState:(e,n)=>`${e} (${n})`,unnamedModel:"A model whose name you may not read",defaultModelUnavailable:e=>e===null?"Your default model cannot be used now.":`Your default model, ${e}, cannot be used now.`,pickedModelUnavailable:e=>e===null?"The model you chose cannot be used now.":`The model you chose, ${e}, cannot be used now.`,defaultModelMissing:"Your default model is not in the list.",pickedModelMissing:"The model you chose is not in the list.",chooseAnother:"Choose another model, or your organization's default.",reading:"Reading the settings.",unreached:"The settings could not be read, as the service could not be reached.",incompatible:"The service's answer could not be read, so the settings cannot be shown.",modelsReading:"Reading the list of models.",modelsUnreached:"The list of models could not be read, as the service could not be reached.",modelsIncompatible:"The service's answer could not be read, so the models cannot be shown.",retry:"Read again",rereading:"Reading again",save:"Save",saving:"Saving",unchanged:"No setting has changed.",saved:"The settings are saved.",saveUnreached:"The settings could not be saved, as the service could not be reached.",saveIncompatible:"The service's answer could not be read, so whether the settings were saved is not known.",fieldRefused:"This setting could not be saved."},newConversation:{levelLegend:"Conversation's level",levelDescription:["The level of the information the conversation handles.","It cannot go below the default."],levels:{PUBLIC:"Public",INTERNAL:"Internal",DEPARTMENT:"Department",CONFIDENTIAL:"Confidential",RESTRICTED:"Restricted"},modelLegend:"Model",modelDescription:["The model the conversation uses."],reasoningLegend:"Thinking depth",reasoningDescription:["How deeply the model thinks before it answers."],reasoningLevels:{off:"Off",low:"Low",medium:"Medium",high:"High",max:"Max"},created:"The conversation was created."}},ja:{direction:"ltr",joinSentences:e=>e.join(""),invisibleMarks:e=>`\u3053\u306E\u6587\u306E\u898B\u3048\u306A\u3044\u5B57 ${e} \u500B\u306F\u3001\u27E6U+XXXX\u27E7 (XXXX \u306F\u5B57\u306E\u756A\u53F7) \u306E\u5370\u3067\u793A\u3057\u3066\u3044\u307E\u3059\u3002`,failures:{codes:{CHAT_PROVIDER_FAILED:"\u30E2\u30C7\u30EB\u3092\u52D5\u304B\u3059\u30B5\u30FC\u30D3\u30B9\u3067\u5931\u6557\u3057\u307E\u3057\u305F\u3002",CHAT_PROVIDER_REFUSED:"\u30E2\u30C7\u30EB\u3092\u52D5\u304B\u3059\u30B5\u30FC\u30D3\u30B9\u304C\u3001\u5B89\u5168\u4E0A\u306E\u7406\u7531\u3067\u7B54\u3048\u3092\u62D2\u307F\u307E\u3057\u305F\u3002",CHAT_MODEL_UNAVAILABLE:"\u7B54\u3048\u306E\u9014\u4E2D\u3067\u30E2\u30C7\u30EB\u304C\u4F7F\u3048\u306A\u304F\u306A\u308A\u307E\u3057\u305F\u3002",CHAT_ASSISTANT_UNAVAILABLE:"\u7B54\u3048\u306E\u9014\u4E2D\u3067\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u304C\u4F7F\u3048\u306A\u304F\u306A\u308A\u307E\u3057\u305F\u3002",CHAT_CONTEXT_OVERFLOW:"\u4F1A\u8A71\u306E\u5FC5\u8981\u306A\u90E8\u5206\u304C\u3001\u30E2\u30C7\u30EB\u304C\u4E00\u5EA6\u306B\u8AAD\u3081\u308B\u91CF\u306B\u53CE\u307E\u308A\u307E\u305B\u3093\u3002",CHAT_CONTEXT_CHANGED:"\u7B54\u3048\u304C\u4F7F\u3063\u3066\u3044\u305F\u77E5\u8B58\u306E\u4E00\u7BC0\u304C\u3001\u7B54\u3048\u306E\u9014\u4E2D\u3067\u5909\u308F\u308A\u307E\u3057\u305F\u3002",CHAT_KNOWLEDGE_UNAVAILABLE:"\u77E5\u8B58\u306E\u6E90\u3092\u691C\u7D22\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",CHAT_KNOWLEDGE_BODY_HIDDEN:"\u3053\u308C\u3089\u306E\u6587\u66F8\u306E\u672C\u6587\u3092\u8AAD\u3080\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",CHAT_KNOWLEDGE_SCOPE_TOO_LARGE:"\u77E5\u8B58\u306E\u7BC4\u56F2\u306E\u6587\u66F8\u306E\u6570\u304C\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",CHAT_RUN_LIMIT_REACHED:"\u7B54\u3048\u306F\u4E0A\u9650\u3067\u6B62\u307E\u308A\u307E\u3057\u305F\u3002",CHAT_CONFIRM_LIMIT_REACHED:"\u7B54\u3048\u304C\u627F\u8A8D\u3092\u6C42\u3081\u305F\u56DE\u6570\u304C\u30011 \u3064\u306E\u7B54\u3048\u306E\u4E0A\u9650\u306B\u9054\u3057\u307E\u3057\u305F\u3002",CHAT_CONFIDENTIALITY_BLOCKED:"\u3053\u306E\u4F1A\u8A71\u306B\u306F\u3001\u3053\u306E\u30E2\u30C7\u30EB\u3078\u9001\u308C\u306A\u3044\u533A\u5206\u306E\u60C5\u5831\u304C\u3042\u308A\u307E\u3059\u3002",CHAT_BUDGET_EXCEEDED:"\u7B54\u3048\u306F\u8CBB\u7528\u306E\u4E0A\u9650\u3067\u6B62\u307E\u308A\u307E\u3057\u305F\u3002",CHAT_RUN_INTERRUPTED:"\u7B54\u3048\u304C\u4E2D\u65AD\u3055\u308C\u3001\u518D\u958B\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",CHAT_STOPPED_BY_ADMIN:"\u7BA1\u7406\u8005\u304C\u3053\u306E\u30E2\u30C7\u30EB\u3092\u6B62\u3081\u307E\u3057\u305F\u3002",CHAT_ACCESS_REVOKED:"\u7B54\u3048\u306E\u9014\u4E2D\u3067\u3001\u3042\u306A\u305F\u306E\u6A29\u9650\u304C\u5909\u308F\u308A\u307E\u3057\u305F\u3002",CHAT_TOOL_ARGS_INVALID:"\u30E2\u30C7\u30EB\u304C\u3001\u9053\u5177\u306B\u5408\u308F\u306A\u3044\u5165\u529B\u3067\u9053\u5177\u3092\u547C\u3073\u307E\u3057\u305F\u3002",CHAT_TOOL_UNAVAILABLE:"\u9053\u5177\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002",CHAT_TOOL_TIMEOUT:"\u9053\u5177\u306E\u7B54\u3048\u304C\u6642\u9593\u5185\u306B\u5C4A\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",CHAT_SOURCE_BUSY:"\u30C7\u30FC\u30BF\u6E90\u304C\u6DF7\u3093\u3067\u3044\u307E\u3057\u305F\u3002",CHAT_TOOL_CONTRACT_ERROR:"\u9053\u5177\u3067\u5931\u6557\u3057\u307E\u3057\u305F\u3002",CHAT_TOOL_INTERRUPTED:"\u9053\u5177\u306E\u7D50\u679C\u3092\u53D7\u3051\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",CHAT_TOOL_RESULT_SHAPE_CHANGED:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u7D50\u679C\u306E\u5F62\u304C\u3001\u60F3\u5B9A\u3068\u9055\u3044\u307E\u3057\u305F\u3002",CHAT_EGRESS_DENIED:"\u9053\u5177\u306E\u5B9B\u5148\u304C\u3001\u8A31\u53EF\u306E\u4E00\u89A7\u306B\u3042\u308A\u307E\u305B\u3093\u3002"},details:{CHAT_PROVIDER_FAILED:{reason:{rate_limited:"\u30B5\u30FC\u30D3\u30B9\u304C\u3001\u53D7\u3051\u308B\u8981\u6C42\u306E\u6570\u3092\u5236\u9650\u3057\u307E\u3057\u305F\u3002",quota_exhausted:"\u30B5\u30FC\u30D3\u30B9\u306E\u5951\u7D04\u304C\u3001\u4F7F\u7528\u306E\u4E0A\u9650\u306B\u9054\u3057\u305F\u304B\u3001\u652F\u6255\u3044\u306B\u554F\u984C\u304C\u3042\u308A\u307E\u3059\u3002",auth_failed:"\u30B5\u30FC\u30D3\u30B9\u304C\u3001\u7BA1\u7406\u8005\u306E\u8A2D\u5B9A\u3057\u305F\u8A8D\u8A3C\u60C5\u5831\u3092\u62D2\u307F\u307E\u3057\u305F\u3002",timeout:"\u30B5\u30FC\u30D3\u30B9\u306E\u7B54\u3048\u304C\u6642\u9593\u5185\u306B\u5C4A\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",error:"\u30B5\u30FC\u30D3\u30B9\u304C\u30A8\u30E9\u30FC\u3092\u8FD4\u3057\u307E\u3057\u305F\u3002"},retry:{exhausted:"\u4E0A\u9650\u306E\u56DE\u6570\u307E\u3067\u3084\u308A\u76F4\u3057\u307E\u3057\u305F\u3002",withheld:"\u30B5\u30FC\u30D3\u30B9\u306E\u8CA0\u62C5\u3092\u5897\u3084\u3055\u306A\u3044\u305F\u3081\u3001\u3084\u308A\u76F4\u3057\u3092\u63A7\u3048\u307E\u3057\u305F\u3002",no_time:"\u5F85\u3063\u3066\u3084\u308A\u76F4\u3059\u6642\u9593\u304C\u6B8B\u3063\u3066\u3044\u307E\u305B\u3093\u3067\u3057\u305F\u3002",none:"\u3084\u308A\u76F4\u3057\u306F\u3057\u3066\u3044\u307E\u305B\u3093\u3002"}},CHAT_MODEL_UNAVAILABLE:{reason:{access_denied:"\u3053\u306E\u30E2\u30C7\u30EB\u3092\u4F7F\u3046\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",classification:"\u3053\u306E\u4F1A\u8A71\u306B\u306F\u3001\u3053\u306E\u30E2\u30C7\u30EB\u3078\u9001\u308C\u306A\u3044\u533A\u5206\u306E\u60C5\u5831\u304C\u3042\u308A\u307E\u3059\u3002",stopped:"\u30E2\u30C7\u30EB\u306E\u30B5\u30FC\u30D0\u30FC\u304C\u6B62\u307E\u3063\u3066\u3044\u307E\u3059\u3002",breaker_open:"\u30E2\u30C7\u30EB\u304C\u7D9A\u3051\u3066\u5931\u6557\u3057\u305F\u305F\u3081\u3001\u3057\u3070\u3089\u304F\u6B62\u3081\u3066\u3044\u307E\u3059\u3002",ledger_mismatch:"\u30E2\u30C7\u30EB\u306E\u767B\u9332\u304C\u3001\u8A2D\u5B9A\u3068\u5408\u3063\u3066\u3044\u307E\u305B\u3093\u3002",config_invalid:"\u30E2\u30C7\u30EB\u306E\u8A2D\u5B9A\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002",credential_refused:"\u30E2\u30C7\u30EB\u3092\u52D5\u304B\u3059\u30B5\u30FC\u30D3\u30B9\u304C\u3001\u8A8D\u8A3C\u60C5\u5831\u3092\u62D2\u307F\u307E\u3057\u305F\u3002",reasoning_level_unavailable:"\u9078\u3093\u3060\u601D\u8003\u306E\u6DF1\u3055\u306F\u3001\u3053\u306E\u30E2\u30C7\u30EB\u3067\u306F\u4F7F\u3048\u306A\u304F\u306A\u308A\u307E\u3057\u305F\u3002"}},CHAT_RUN_LIMIT_REACHED:{kind:{steps:"1 \u3064\u306E\u7B54\u3048\u304C\u9032\u3081\u308B\u6BB5\u306E\u6570\u3092\u4F7F\u3044\u5207\u308A\u307E\u3057\u305F\u3002",tool_calls:"1 \u3064\u306E\u7B54\u3048\u304C\u547C\u3079\u308B\u9053\u5177\u306E\u6570\u3092\u4F7F\u3044\u5207\u308A\u307E\u3057\u305F\u3002",events:"1 \u3064\u306E\u7B54\u3048\u304C\u9001\u308C\u308B\u77E5\u3089\u305B\u306E\u6570\u3092\u4F7F\u3044\u5207\u308A\u307E\u3057\u305F\u3002",active_time:"1 \u3064\u306E\u7B54\u3048\u304C\u4F7F\u3048\u308B\u6642\u9593\u3092\u4F7F\u3044\u5207\u308A\u307E\u3057\u305F\u3002"}},CHAT_BUDGET_EXCEEDED:{scope:l}}},refusals:{codes:{PERMISSION_DENIED:"\u3053\u306E\u64CD\u4F5C\u306E\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",NOT_FOUND:"\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002",REQUEST_INVALID:"\u8981\u6C42\u3092\u53D7\u3051\u4ED8\u3051\u307E\u305B\u3093\u3067\u3057\u305F\u3002",UPSTREAM_UNAVAILABLE:"\u30C1\u30E3\u30C3\u30C8\u306B\u5FC5\u8981\u306A\u30B5\u30FC\u30D3\u30B9\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\u3002",CONFIGURATION_ERROR:"\u30C1\u30E3\u30C3\u30C8\u306E\u8A2D\u5B9A\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002",CHAT_POLICY_CONSENT_REQUIRED:"\u5148\u306B\u3001\u5229\u7528\u306E\u65B9\u91DD\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002",CHAT_POLICY_NOT_PUBLISHED:"\u30C1\u30E3\u30C3\u30C8\u3092\u4F7F\u3046\u306B\u306F\u3001\u7BA1\u7406\u8005\u304C\u5229\u7528\u306E\u65B9\u91DD\u3092\u516C\u958B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002",CHAT_STATE_CONFLICT:"\u64CD\u4F5C\u3092\u59CB\u3081\u305F\u5F8C\u3067\u3001\u72B6\u614B\u304C\u5909\u308F\u308A\u307E\u3057\u305F\u3002",CHAT_RUN_ACTIVE:"\u3053\u306E\u4F1A\u8A71\u306B\u306F\u3001\u9032\u3093\u3067\u3044\u308B\u304B\u627F\u8A8D\u3092\u5F85\u3063\u3066\u3044\u308B\u7B54\u3048\u304C\u3042\u308A\u307E\u3059\u3002",CHAT_ADMISSION_BUSY:"\u30C1\u30E3\u30C3\u30C8\u304C\u6DF7\u307F\u5408\u3063\u3066\u3044\u307E\u3059\u3002",CHAT_CONCURRENCY_LIMIT:"\u540C\u6642\u306B\u9032\u3080\u7B54\u3048\u304C\u591A\u3059\u304E\u307E\u3059\u3002",CHAT_RATE_LIMIT:"\u3053\u306E 1 \u5206\u9593\u306B\u59CB\u3081\u305F\u7B54\u3048\u304C\u591A\u3059\u304E\u307E\u3059\u3002",CHAT_BUDGET_EXCEEDED:"\u8CBB\u7528\u306E\u4E0A\u9650\u306B\u9054\u3057\u307E\u3057\u305F\u3002"},details:{NOT_FOUND:{resource:{conversation:"\u4F1A\u8A71\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",message:"\u767A\u8A00\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",run:"\u7B54\u3048\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",approval:"\u627F\u8A8D\u306E\u6C42\u3081\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",source:"\u30C7\u30FC\u30BF\u6E90\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",tool:"\u9053\u5177\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",assistant:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",citation:"\u5F15\u7528\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",attachment:"\u6DFB\u4ED8\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u3001\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002"}},UPSTREAM_UNAVAILABLE:{upstream:{model:"\u30E2\u30C7\u30EB\u306E\u30B5\u30FC\u30D0\u30FC\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\u3002",stream_store:"\u7B54\u3048\u3092\u4E2D\u7D99\u3059\u308B\u4FDD\u5B58\u5148\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\u3002",attachment_store:"\u6DFB\u4ED8\u306E\u4FDD\u5B58\u5148\u304C\u5FDC\u7B54\u3057\u307E\u305B\u3093\u3002"}},CONFIGURATION_ERROR:{reading:{transcription:"\u6587\u5B57\u8D77\u3053\u3057\u304C\u3001\u3053\u306E\u30B7\u30B9\u30C6\u30E0\u306E\u5916\u306E\u30B5\u30FC\u30D3\u30B9\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002",ocr:"\u6587\u5B57\u306E\u8AAD\u307F\u53D6\u308A (OCR) \u304C\u3001\u3053\u306E\u30B7\u30B9\u30C6\u30E0\u306E\u5916\u306E\u30B5\u30FC\u30D3\u30B9\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002"}},CHAT_STATE_CONFLICT:{kind:{approval:"\u3053\u306E\u627F\u8A8D\u306E\u6C42\u3081\u306F\u3001\u3059\u3067\u306B\u5224\u65AD\u3055\u308C\u3066\u3044\u307E\u3059\u3002",branch:"\u3053\u306E\u767A\u8A00\u306F\u3001\u898B\u3066\u3044\u308B\u679D\u306E\u4E0A\u306B\u3042\u308A\u307E\u305B\u3093\u3002",edit:"\u767A\u8A00\u304C\u3001\u307B\u304B\u306E\u5834\u6240\u3067\u7DE8\u96C6\u3055\u308C\u307E\u3057\u305F\u3002",attachment:"\u6DFB\u4ED8\u304C\u3001\u3053\u306E\u64CD\u4F5C\u306B\u4F7F\u3048\u308B\u72B6\u614B\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"},reason:{processing:"\u6DFB\u4ED8\u3092\u307E\u3060\u8AAD\u307F\u53D6\u3063\u3066\u3044\u307E\u3059\u3002",failed:"\u6DFB\u4ED8\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",already_bound:"\u6DFB\u4ED8\u306F\u3001\u3059\u3067\u306B\u9001\u3063\u305F\u767A\u8A00\u306B\u4ED8\u3044\u3066\u3044\u307E\u3059\u3002"}},CHAT_CONCURRENCY_LIMIT:{scope:{user:"\u4E0A\u9650\u306F\u3042\u306A\u305F\u306E\u7B54\u3048\u306E\u5206\u3067\u3059\u3002",tenant:"\u4E0A\u9650\u306F\u7D44\u7E54\u5168\u4F53\u306E\u5206\u3067\u3059\u3002",model:"\u4E0A\u9650\u306F\u3053\u306E\u30E2\u30C7\u30EB\u306E\u5206\u3067\u3059\u3002"}},CHAT_BUDGET_EXCEEDED:{scope:l}},rules:{egress_denied:"\u5B9B\u5148\u304C\u3001\u8A31\u53EF\u306E\u4E00\u89A7\u306B\u3042\u308A\u307E\u305B\u3093\u3002",sql_statement_rejected:"\u305D\u306E SQL \u306E\u6587\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",secret_in_text:"\u6587\u306B\u3001\u30D1\u30B9\u30EF\u30FC\u30C9\u304B\u9375\u306E\u3088\u3046\u306A\u5B57\u304C\u3042\u308A\u307E\u3059\u3002",individual_number_in_text:"\u6587\u306B\u3001\u500B\u4EBA\u756A\u53F7 (\u30DE\u30A4\u30CA\u30F3\u30D0\u30FC) \u306E\u3088\u3046\u306A\u5B57\u304C\u3042\u308A\u307E\u3059\u3002",idempotency_key_reused:"\u540C\u3058\u8981\u6C42\u304C\u3001\u9055\u3046\u4E2D\u8EAB\u3067\u524D\u306B\u9001\u3089\u308C\u3066\u3044\u307E\u3059\u3002",message_role:"\u305D\u306E\u767A\u8A00\u306B\u306F\u3001\u3053\u306E\u64CD\u4F5C\u306F\u3067\u304D\u307E\u305B\u3093\u3002",toggle_unknown:"\u8981\u6C42\u306B\u3001\u30C1\u30E3\u30C3\u30C8\u306E\u77E5\u3089\u306A\u3044\u8A2D\u5B9A\u304C\u3042\u308A\u307E\u3059\u3002",secret_name_unknown:"\u8981\u6C42\u304C\u3001\u767B\u9332\u3055\u308C\u3066\u3044\u306A\u3044\u79D8\u5BC6\u306E\u540D\u3092\u6307\u3057\u3066\u3044\u307E\u3059\u3002",reasoning_shape_invalid:"\u30E2\u30C7\u30EB\u306E\u601D\u8003\u306E\u8A2D\u5B9A\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002",reasoning_summary_unsupported:"\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001\u601D\u8003\u306E\u8981\u7D04\u3092\u51FA\u305B\u307E\u305B\u3093\u3002",reasoning_level_unsupported:"\u3053\u306E\u30E2\u30C7\u30EB\u306B\u306F\u3001\u9078\u3093\u3060\u601D\u8003\u306E\u6DF1\u3055\u304C\u3042\u308A\u307E\u305B\u3093\u3002",approval_stale_unconfirmed:"\u53E4\u3044\u627F\u8A8D\u306E\u6C42\u3081\u3092\u8A31\u3059\u306B\u306F\u3001\u3082\u3046\u4E00\u5EA6\u306E\u78BA\u8A8D\u304C\u5FC5\u8981\u3067\u3059\u3002",model_unavailable:"\u3053\u306E\u30E2\u30C7\u30EB\u306F\u4ECA\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002",assistant_unavailable:"\u3053\u306E\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8\u306F\u4ECA\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002",declared_level_below_default:"\u6A5F\u5BC6\u306E\u533A\u5206\u304C\u3001\u7D44\u7E54\u306E\u65E2\u5B9A\u3088\u308A\u4F4E\u304F\u306A\u3063\u3066\u3044\u307E\u3059\u3002",attachment_type_refused:"\u6DFB\u4ED8\u306E\u30D5\u30A1\u30A4\u30EB\u306E\u7A2E\u985E\u3092\u53D7\u3051\u4ED8\u3051\u3066\u3044\u307E\u305B\u3093\u3002",attachment_too_large:"\u6DFB\u4ED8\u304C\u3001\u5927\u304D\u3055\u306E\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",attachment_too_many_pixels:"\u753B\u50CF\u306E\u753B\u7D20\u306E\u6570\u304C\u3001\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",attachment_too_many_pages:"PDF \u306E\u9801\u306E\u6570\u304C\u3001\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",attachment_too_long:"\u9332\u97F3\u304C\u3001\u9577\u3055\u306E\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",attachment_count_exceeded:"\u767A\u8A00\u306E\u6DFB\u4ED8\u306E\u6570\u304C\u3001\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",attachment_unsupported_by_model:"\u9078\u3093\u3060\u30E2\u30C7\u30EB\u306F\u3001\u3053\u306E\u7A2E\u985E\u306E\u6DFB\u4ED8\u3092\u53D7\u3051\u4ED8\u3051\u307E\u305B\u3093\u3002",attachment_exceeds_provider_limit:"\u6DFB\u4ED8\u304C\u3001\u30E2\u30C7\u30EB\u3092\u52D5\u304B\u3059\u30B5\u30FC\u30D3\u30B9\u306E\u53D7\u3051\u4ED8\u3051\u308B\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059\u3002",attachment_unread_for_external_model:"\u8AAD\u307F\u53D6\u308C\u306A\u304B\u3063\u305F\u5B57\u306E\u3042\u308B\u6DFB\u4ED8\u306F\u3001\u3053\u306E\u30B7\u30B9\u30C6\u30E0\u306E\u5916\u306E\u30E2\u30C7\u30EB\u3078\u9001\u308C\u307E\u305B\u3093\u3002"},hostRoles:{chat_disabled:"\u30C1\u30E3\u30C3\u30C8\u306F\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002",knowledge_body_hidden:"\u3053\u306E\u6587\u66F8\u306E\u672C\u6587\u3092\u8AAD\u3080\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002"},statusClasses:{unauthenticated:"\u30B5\u30A4\u30F3\u30A4\u30F3\u304C\u5207\u308C\u307E\u3057\u305F\u3002",unavailable:"\u30C1\u30E3\u30C3\u30C8\u304C\u4ECA\u306F\u5FDC\u7B54\u3067\u304D\u307E\u305B\u3093\u3002","not-accepted":"\u30C1\u30E3\u30C3\u30C8\u304C\u8981\u6C42\u3092\u53D7\u3051\u4ED8\u3051\u307E\u305B\u3093\u3067\u3057\u305F\u3002"}},detailCounts:{retry_after_seconds:e=>`\u30B5\u30FC\u30D3\u30B9\u306F\u3001\u6B21\u306E\u8A66\u307F\u307E\u3067 ${e} \u79D2\u5F85\u3064\u3088\u3046\u6C42\u3081\u307E\u3057\u305F\u3002`},detailInstants:{resets_at:e=>`\u4E0A\u9650\u306F ${e} \u306B\u623B\u308A\u307E\u3059\u3002`},attachmentFailures:{transcription_unavailable:"\u9332\u97F3\u3092\u6587\u5B57\u306B\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",ocr_unavailable:"PDF \u306E\u5B57\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",secret_in_text:"\u30D5\u30A1\u30A4\u30EB\u306B\u3001\u30D1\u30B9\u30EF\u30FC\u30C9\u304B\u9375\u306E\u3088\u3046\u306A\u5B57\u304C\u3042\u308A\u307E\u3059\u3002",individual_number_in_text:"\u30D5\u30A1\u30A4\u30EB\u306B\u3001\u500B\u4EBA\u756A\u53F7 (\u30DE\u30A4\u30CA\u30F3\u30D0\u30FC) \u306E\u3088\u3046\u306A\u5B57\u304C\u3042\u308A\u307E\u3059\u3002"},stream:{notices:{reconnecting:"\u7E4B\u304E\u76F4\u3057\u3066\u3044\u307E\u3059\u3002",unreachable:"\u7E4B\u304C\u308A\u307E\u305B\u3093\u3002",incompatible:"\u753B\u9762\u3092\u8AAD\u307F\u8FBC\u307F\u76F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002","awaiting-end":"\u7D9A\u304D\u3092\u6D41\u305B\u306A\u3044\u305F\u3081\u3001\u7D42\u308F\u308A\u3092\u5F85\u3063\u3066\u3044\u307E\u3059\u3002"},actions:{"reconnect-now":"\u4ECA\u3059\u3050\u7E4B\u3050",reread:"\u8AAD\u307F\u76F4\u3059"}},layout:{columns:{conversations:"\u4F1A\u8A71\u306E\u4E00\u89A7",process:"\u904E\u7A0B\u3068\u51FA\u5178"}},composer:{label:"\u30E1\u30C3\u30BB\u30FC\u30B8",send:"\u9001\u308B",sending:"\u9001\u3063\u3066\u3044\u307E\u3059",stop:"\u6B62\u3081\u308B",stopping:"\u6B62\u3081\u3066\u3044\u307E\u3059",tooLongReason:(e,n)=>`\u9001\u308B\u306B\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u3092 ${e} \u5B57\u77ED\u304F\u3057\u3066\u304F\u3060\u3055\u3044 (\u4E0A\u9650\u306F ${n} \u5B57)\u3002`,emptyReason:"\u9001\u308B\u306B\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002",emptyOrFileReason:"\u9001\u308B\u306B\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u66F8\u304F\u304B\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u6DFB\u3048\u3066\u304F\u3060\u3055\u3044\u3002",pendingReason:"\u6DFB\u4ED8\u306E\u6E96\u5099\u304C\u3067\u304D\u308B\u3068\u3001\u9001\u308C\u307E\u3059\u3002",unsendableReason:"\u9001\u308B\u306B\u306F\u3001\u9001\u308C\u306A\u3044\u6DFB\u4ED8\u3092\u5916\u3057\u3066\u304F\u3060\u3055\u3044\u3002",refusedByModelReason:"\u9001\u308B\u306B\u306F\u3001\u3053\u306E\u30E2\u30C7\u30EB\u304C\u53D7\u3051\u4ED8\u3051\u306A\u3044\u6DFB\u4ED8\u3092\u5916\u3057\u3066\u304F\u3060\u3055\u3044\u3002",refusedByModelRestoreReason:"\u9001\u308B\u306B\u306F\u3001\u3053\u306E\u30E2\u30C7\u30EB\u304C\u53D7\u3051\u4ED8\u3051\u306A\u3044\u6DFB\u4ED8\u3092\u5916\u3059\u304B\u3001\u30E2\u30C7\u30EB\u3092\u623B\u3057\u3066\u304F\u3060\u3055\u3044\u3002",recordingReason:"\u9332\u97F3\u3092\u7D42\u3048\u308B\u3068\u3001\u9001\u308C\u307E\u3059\u3002",modelUnchosenReason:"\u9001\u308B\u306B\u306F\u3001\u30E2\u30C7\u30EB\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002",phaseReasons:{sending:"\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u3063\u3066\u3044\u307E\u3059\u3002",running:"\u7B54\u3048\u3092\u66F8\u304D\u7D42\u3048\u308B\u304B\u6B62\u3081\u308B\u3068\u3001\u9001\u308C\u307E\u3059\u3002",stopping:"\u7B54\u3048\u304C\u6B62\u307E\u308B\u3068\u3001\u9001\u308C\u307E\u3059\u3002"},sendUnreached:"\u7E4B\u304C\u3089\u305A\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",sendIncompatible:"\u7B54\u3048\u3092\u8AAD\u3081\u305A\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u308C\u305F\u304B\u5206\u304B\u308A\u307E\u305B\u3093\u3002",sendKeyHints:{enter:"Enter \u3067\u9001\u308A\u3001Shift + Enter \u3067\u6539\u884C\u3057\u307E\u3059\u3002",ctrl_enter:"Enter \u3067\u6539\u884C\u3057\u3001Control + Enter \u304B \u2318 + Enter \u3067\u9001\u308A\u307E\u3059\u3002"},restore:e=>t("\u30E2\u30C7\u30EB\u3092",e,"\u306B\u623B\u3059"),disclaimer:["AI \u306E\u7B54\u3048\u306F\u8AA4\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002","\u5927\u4E8B\u306A\u4E8B\u306F\u51FA\u3069\u3053\u308D\u3067\u78BA\u304B\u3081\u3066\u304F\u3060\u3055\u3044\u3002"]},attachments:{attach:"\u30D5\u30A1\u30A4\u30EB\u3092\u6DFB\u3048\u308B",list:"\u6DFB\u4ED8",kinds:{image:"\u753B\u50CF",document:"PDF",audio:"\u97F3\u58F0"},badges:{image:"\u753B\u50CF",document:"PDF",audio:"\u97F3\u58F0",file:"\u30D5\u30A1\u30A4\u30EB"},joinKinds:e=>e.join("\u30FB"),accepts:(e,n)=>t(e,"\u3092\u30011 \u3064\u306E\u767A\u8A00\u306B",n,"\u500B\u307E\u3067\u6DFB\u3048\u3089\u308C\u307E\u3059\u3002"),acceptsNone:"\u3053\u306E\u30E2\u30C7\u30EB\u306B\u306F\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u6DFB\u3048\u3089\u308C\u307E\u305B\u3093\u3002",acceptsAfterModel:"\u30E2\u30C7\u30EB\u3092\u9078\u3076\u3068\u3001\u30D5\u30A1\u30A4\u30EB\u3092\u6DFB\u3048\u3089\u308C\u307E\u3059\u3002",full:e=>`\u6DFB\u4ED8\u306F\u30011 \u3064\u306E\u767A\u8A00\u306B ${e} \u500B\u307E\u3067\u3067\u3059\u3002`,fullRemedy:"\u6DFB\u4ED8\u3092\u5916\u3059\u3068\u3001\u307E\u305F\u6DFB\u3048\u3089\u308C\u307E\u3059\u3002",uploading:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u3044\u307E\u3059\u3002",processing:{image:"\u753B\u50CF\u3092\u6E96\u5099\u3057\u3066\u3044\u307E\u3059\u3002",document:"\u5B57\u3092\u8AAD\u307F\u53D6\u3063\u3066\u3044\u307E\u3059\u3002",audio:"\u9332\u97F3\u3092\u6587\u5B57\u306B\u3057\u3066\u3044\u307E\u3059\u3002"},unreached:"\u7E4B\u304C\u3089\u305A\u3001\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",incompatible:"\u30D5\u30A1\u30A4\u30EB\u306B\u3064\u3044\u3066\u306E\u7B54\u3048\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",expired:"\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306E\u671F\u9650\u304C\u5207\u308C\u307E\u3057\u305F\u3002",refusedByModel:{image:"\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001\u753B\u50CF\u3092\u53D7\u3051\u4ED8\u3051\u307E\u305B\u3093\u3002",document:"\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001PDF \u3092\u53D7\u3051\u4ED8\u3051\u307E\u305B\u3093\u3002",audio:"\u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001\u97F3\u58F0\u3092\u53D7\u3051\u4ED8\u3051\u307E\u305B\u3093\u3002"},allReady:"\u6DFB\u4ED8\u306E\u6E96\u5099\u304C\u3067\u304D\u307E\u3057\u305F\u3002",retry:"\u3082\u3046\u4E00\u5EA6\u8A66\u3059",remove:"\u5916\u3059",pages:e=>`${e} \u9801`,durations:{hours:e=>`${e} \u6642\u9593`,minutes:e=>`${e} \u5206`,seconds:e=>`${e} \u79D2`},joinDuration:e=>e.join(" "),pageRange:(e,n)=>`${e}\u301C${n}`,joinPages:e=>e.join("\u30FB"),unreadPages:e=>`\u9801 ${e} \u306F\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002`,textUnread:"\u753B\u50CF\u306E\u4E2D\u306E\u5B57\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",pageText:"\u3053\u306E\u30E2\u30C7\u30EB\u3078\u306F\u3001PDF \u306E\u5B57\u3060\u3051\u3092\u9001\u308A\u307E\u3059 (\u56F3\u3068\u9801\u306E\u7D75\u306F\u9001\u308A\u307E\u305B\u3093)\u3002",joinMeta:e=>e.join("\u30FB"),statusOf:(e,n)=>`${e}: ${n}`,recording:{record:"\u9332\u97F3\u3059\u308B",stop:"\u9332\u97F3\u3092\u6B62\u3081\u308B",stopping:"\u9332\u97F3\u3092\u6B62\u3081\u3066\u3044\u307E\u3059",opening:"\u30DE\u30A4\u30AF\u3092\u958B\u3044\u3066\u3044\u307E\u3059\u3002",recording:"\u9332\u97F3\u3057\u3066\u3044\u307E\u3059",clock:(e,n)=>`${e} / ${n}`,lengthLimit:e=>t("\u9332\u97F3\u304C\u4E0A\u9650\u306E",e,"\u3092\u8D85\u3048\u308B\u524D\u306B\u6B62\u3081\u307E\u3057\u305F\u3002"),sizeLimit:e=>t("\u9332\u97F3\u304C\u5927\u304D\u3055\u306E\u4E0A\u9650\u306E",e,"\u3092\u8D85\u3048\u308B\u524D\u306B\u6B62\u3081\u307E\u3057\u305F\u3002"),ended:"\u30DE\u30A4\u30AF\u304C\u6B62\u307E\u3063\u305F\u306E\u3067\u3001\u9332\u97F3\u3092\u7D42\u3048\u307E\u3057\u305F\u3002",problems:{denied:["\u30DE\u30A4\u30AF\u3092\u4F7F\u3048\u307E\u305B\u3093\u3002","\u30D6\u30E9\u30A6\u30B6\u306E\u8A2D\u5B9A\u3067\u3001\u3053\u306E\u30B5\u30A4\u30C8\u306B\u30DE\u30A4\u30AF\u3092\u8A31\u3057\u3066\u304F\u3060\u3055\u3044\u3002"],missing:["\u30DE\u30A4\u30AF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"],unavailable:["\u30DE\u30A4\u30AF\u3092\u59CB\u3081\u3089\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002","\u307B\u304B\u306E\u30A2\u30D7\u30EA\u304C\u4F7F\u3063\u3066\u3044\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u3002"]}},details:{open:"\u8A73\u3057\u304F",altText:"\u4EE3\u66FF\u306E\u6587",altTextHelp:["\u753B\u9762\u306E\u8AAD\u307F\u4E0A\u3052\u3092\u4F7F\u3046\u4EBA\u306B\u3001\u6DFB\u4ED8\u306E\u4E2D\u8EAB\u3092\u4F1D\u3048\u308B\u6587\u3067\u3059\u3002","\u7A7A\u306B\u3059\u308B\u3068\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u540D\u3092\u4F1D\u3048\u307E\u3059\u3002"],save:"\u4FDD\u5B58\u3059\u308B",saving:"\u4FDD\u5B58\u3057\u3066\u3044\u307E\u3059",saved:"\u4EE3\u66FF\u306E\u6587\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F\u3002",saveUnreached:"\u7E4B\u304C\u3089\u305A\u3001\u4EE3\u66FF\u306E\u6587\u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",saveIncompatible:"\u7B54\u3048\u3092\u8AAD\u3081\u305A\u3001\u4EE3\u66FF\u306E\u6587\u3092\u4FDD\u5B58\u3067\u304D\u305F\u304B\u5206\u304B\u308A\u307E\u305B\u3093\u3002",readText:"\u8AAD\u307F\u53D6\u3063\u305F\u5B57",noReadText:"\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u8AAD\u307F\u53D6\u3063\u305F\u5B57\u306F\u3042\u308A\u307E\u305B\u3093\u3002",page:e=>`\u9801 ${e}`,fromImage:"\u3053\u306E\u5B57\u306F\u3001\u9801\u306E\u7D75\u304B\u3089\u8AAD\u307F\u53D6\u308A\u307E\u3057\u305F\u3002",partlyFromImage:"\u3053\u306E\u5B57\u306E\u4E00\u90E8\u306F\u3001\u9801\u306E\u7D75\u304B\u3089\u8AAD\u307F\u53D6\u308A\u307E\u3057\u305F\u3002",audioText:"\u30E2\u30C7\u30EB\u3078\u306F\u3001\u9332\u97F3\u3067\u306A\u304F\u3001\u9332\u97F3\u304B\u3089\u8AAD\u307F\u53D6\u3063\u305F\u5B57\u3092\u9001\u308A\u307E\u3059\u3002",timeRange:(e,n)=>`${e}\u301C${n}`}},answer:{plain:"\u66F8\u5F0F\u306A\u3057\u3067\u8868\u793A\u3057\u3066\u3044\u307E\u3059\u3002",failures:{unavailable:"\u66F8\u5F0F\u306E\u90E8\u54C1\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",timeout:"\u66F8\u5F0F\u3092\u3064\u3051\u308B\u51E6\u7406\u304C\u6642\u9593\u5185\u306B\u7D42\u308F\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002","too-large":"\u7B54\u3048\u304C\u5927\u304D\u304F\u3001\u66F8\u5F0F\u3092\u3064\u3051\u3089\u308C\u307E\u305B\u3093\u3002",document:"\u7B54\u3048\u306E\u66F8\u5F0F\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002"},retry:"\u3082\u3046\u4E00\u5EA6",retrying:"\u3082\u3046\u4E00\u5EA6\u8A66\u3057\u3066\u3044\u307E\u3059",newTab:e=>`(${e}\u30FB\u65B0\u3057\u3044\u30BF\u30D6\u3067\u958B\u304D\u307E\u3059)`,destination:e=>`(${e})`,image:{name:"\u753B\u50CF",before:"\u753B\u50CF\u300C",after:"\u300D"},footnote:{reference:"\u811A\u6CE8 ",back:(e,n)=>n===1?`\u811A\u6CE8 ${e} \u306E\u53C2\u7167\u3078\u623B\u308B`:`\u811A\u6CE8 ${e} \u306E ${n} \u756A\u76EE\u306E\u53C2\u7167\u3078\u623B\u308B`}},message:{user:"\u3042\u306A\u305F",assistant:e=>`\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8 (${e})`,assistantUnnamed:"\u30A2\u30B7\u30B9\u30BF\u30F3\u30C8",writing:"\u7B54\u3048\u3092\u66F8\u3044\u3066\u3044\u307E\u3059\u3002",ends:{cut:"\u7B54\u3048\u306F\u9014\u4E2D\u3067\u5207\u308C\u307E\u3057\u305F\u3002",unwritten:"\u7B54\u3048\u3092\u66F8\u3051\u307E\u305B\u3093\u3067\u3057\u305F\u3002",stopped:"\u7B54\u3048\u306F\u9014\u4E2D\u3067\u6B62\u307E\u308A\u307E\u3057\u305F\u3002","stopped-early":"\u7B54\u3048\u306F\u66F8\u304D\u59CB\u3081\u308B\u524D\u306B\u6B62\u307E\u308A\u307E\u3057\u305F\u3002",length:"\u7B54\u3048\u306F\u3001\u30E2\u30C7\u30EB\u304C 1 \u5EA6\u306B\u66F8\u3051\u308B\u9577\u3055\u306E\u4E0A\u9650\u3067\u5207\u308C\u307E\u3057\u305F\u3002",empty:"\u7B54\u3048\u306B\u6587\u304C\u3042\u308A\u307E\u305B\u3093\u3002"},stoppers:{user:"\u3042\u306A\u305F\u304C\u6B62\u3081\u307E\u3057\u305F\u3002",admin:"\u7BA1\u7406\u8005\u304C\u6B62\u3081\u307E\u3057\u305F\u3002"},contextCut:"\u4F1A\u8A71\u306E\u6700\u521D\u306E\u554F\u3044\u306E\u307B\u304B\u306F\u3001\u3053\u3053\u3088\u308A\u524D\u306E\u767A\u8A00\u306F\u6700\u65B0\u306E\u7B54\u3048\u306E\u6587\u8108\u306B\u5165\u3063\u3066\u3044\u307E\u305B\u3093\u3002"},list:{latest:"\u6700\u65B0\u3078",answerEnded:"\u7B54\u3048\u304C\u7D42\u308F\u308A\u307E\u3057\u305F\u3002",older:"\u524D\u306E\u767A\u8A00\u3092\u8AAD\u3080",olderReading:"\u524D\u306E\u767A\u8A00\u3092\u8AAD\u3093\u3067\u3044\u307E\u3059",olderLoaded:e=>`\u524D\u306E\u767A\u8A00\u3092 ${e} \u4EF6\u8AAD\u307F\u307E\u3057\u305F\u3002`,olderUnread:"\u524D\u306E\u767A\u8A00\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002"},conversations:{newConversation:"\u65B0\u3057\u3044\u4F1A\u8A71",search:"\u984C\u3067\u63A2\u3059",sections:{pinned:"\u30D4\u30F3\u7559\u3081",recent:"\u6700\u8FD1"},untitled:"\u984C\u306E\u7121\u3044\u4F1A\u8A71",runStates:{answering:"\u5FDC\u7B54\u4E2D",awaiting:"\u627F\u8A8D\u5F85\u3061"},purgeDue:e=>t(e,"\u306B\u6D88\u3048\u307E\u3059\u3002"),purgeKeep:"\u66F8\u304D\u51FA\u3059\u3068\u6B8B\u305B\u307E\u3059\u3002",failureReasons:{unreached:"\u7E4B\u304C\u308A\u307E\u305B\u3093",incompatible:"\u7B54\u3048\u3092\u8AAD\u3081\u307E\u305B\u3093",refused:"\u53D7\u3051\u4ED8\u3051\u3089\u308C\u307E\u305B\u3093\u3067\u3057\u305F"},denied:"\u4F1A\u8A71\u306E\u4E00\u89A7\u3092\u898B\u308B\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",reading:"\u4F1A\u8A71\u306E\u4E00\u89A7\u3092\u8AAD\u3093\u3067\u3044\u307E\u3059\u3002",empty:"\u4F1A\u8A71\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",searchCount:(e,n)=>t("\u984C\u306B\u300C",e,"\u300D\u3092\u542B\u3080\u4F1A\u8A71\u3092",n,"\u4EF6\u51FA\u3057\u3066\u3044\u307E\u3059\u3002"),searchMore:"\u7D9A\u304D\u304C\u3042\u308A\u307E\u3059\u3002",searchNone:e=>t("\u984C\u306B\u300C",e,"\u300D\u3092\u542B\u3080\u4F1A\u8A71\u306F\u3042\u308A\u307E\u305B\u3093\u3002")},conversation:{reading:"\u4F1A\u8A71\u3092\u8AAD\u3093\u3067\u3044\u307E\u3059\u3002",unreached:"\u7E4B\u304C\u3089\u305A\u3001\u4F1A\u8A71\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",incompatible:"\u7B54\u3048\u3092\u8AAD\u3081\u305A\u3001\u4F1A\u8A71\u3092\u898B\u305B\u3089\u308C\u307E\u305B\u3093\u3002",retry:"\u3082\u3046\u4E00\u5EA6\u8AAD\u3080",rereading:"\u8AAD\u307F\u76F4\u3057\u3066\u3044\u307E\u3059",reopen:"\u958B\u304D\u76F4\u3059"},settings:{fields:{language_code:{legend:"\u8A00\u8A9E",description:["\u30C1\u30E3\u30C3\u30C8\u306E\u753B\u9762\u306E\u8A00\u8A9E\u3067\u3059\u3002"]},send_key:{legend:"\u9001\u308B\u30AD\u30FC",description:["Enter \u3067\u9001\u308B\u3068\u3001\u753B\u9762\u306E\u30AD\u30FC\u30DC\u30FC\u30C9\u3060\u3051\u306E\u7AEF\u672B\u3067\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u4E2D\u3067\u6539\u884C\u3067\u304D\u307E\u305B\u3093\u3002","Control + Enter \u3067\u9001\u308B\u3068\u3001Control \u30AD\u30FC\u306E\u7121\u3044\u30AD\u30FC\u30DC\u30FC\u30C9\u3067\u306F\u300C\u9001\u308B\u300D\u3067\u3060\u3051\u9001\u308C\u307E\u3059\u3002"]},stream_display:{legend:"\u7B54\u3048\u306E\u898B\u305B\u65B9",description:["\u30E2\u30C7\u30EB\u304C\u66F8\u304F\u9593\u306E\u3001\u7B54\u3048\u306E\u6587\u306E\u898B\u305B\u65B9\u3067\u3059\u3002","\u52D5\u304D\u3092\u6E1B\u3089\u3059\u9593\u306F\u3001\u6ED1\u3089\u304B\u306B\u3059\u308B\u898B\u305B\u65B9\u3082\u5C4A\u3044\u305F\u307E\u307E\u306B\u898B\u305B\u307E\u3059\u3002"]},follow_scroll:{legend:"\u7B54\u3048\u3092\u8FFD\u3046",description:["\u7B54\u3048\u304C\u4F38\u3073\u308B\u9593\u3001\u6700\u65B0\u306E\u6587\u304C\u898B\u3048\u308B\u3088\u3046\u306B\u4E26\u3073\u3092\u52D5\u304B\u3057\u307E\u3059\u3002","\u5207\u308B\u3068\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u3063\u305F\u6642\u3068\u4F1A\u8A71\u3092\u958B\u3044\u305F\u6642\u3060\u3051\u52D5\u304B\u3057\u307E\u3059\u3002"],option:"\u4F38\u3073\u308B\u7B54\u3048\u3092\u8FFD\u3046"},reduce_motion:{legend:"\u52D5\u304D",description:["\u7AEF\u672B\u306E\u8A2D\u5B9A\u306B\u4F9D\u3089\u305A\u3001\u753B\u9762\u306E\u52D5\u304D\u3068\u6ED1\u3089\u304B\u306A\u30B9\u30AF\u30ED\u30FC\u30EB\u3092\u6B62\u3081\u307E\u3059\u3002"],option:"\u52D5\u304D\u3092\u6E1B\u3089\u3059"},notification_level:{legend:"\u7B54\u3048\u306E\u8AAD\u307F\u4E0A\u3052",description:["\u30B9\u30AF\u30EA\u30FC\u30F3\u30EA\u30FC\u30C0\u30FC\u3078\u7B54\u3048\u306E\u4F55\u3092\u544A\u3052\u308B\u304B\u3067\u3059\u3002","\u9001\u308C\u306A\u304B\u3063\u305F\u4E8B\u306A\u3069\u3001\u64CD\u4F5C\u3078\u306E\u7B54\u3048\u306F\u3044\u3064\u3082\u544A\u3052\u307E\u3059\u3002"]},default_model_uid:{legend:"\u65E2\u5B9A\u306E\u30E2\u30C7\u30EB",description:["\u65B0\u3057\u3044\u4F1A\u8A71\u304C\u4F7F\u3046\u30E2\u30C7\u30EB\u3067\u3059\u3002"]}},languages:{ja:"\u65E5\u672C\u8A9E",en:"\u82F1\u8A9E"},sendKeys:{enter:"Enter \u3067\u9001\u308A\u3001Shift + Enter \u3067\u6539\u884C",ctrl_enter:"Control + Enter \u304B \u2318 + Enter \u3067\u9001\u308A\u3001Enter \u3067\u6539\u884C"},streamDisplays:{smooth:"\u6ED1\u3089\u304B\u306B\u5C11\u3057\u305A\u3064",immediate:"\u5C4A\u3044\u305F\u307E\u307E",on_finish:"\u6587\u304C\u6B62\u307E\u3063\u3066\u304B\u3089\u4E00\u5EA6\u306B"},notificationLevels:{all:"\u59CB\u3081\u30FB\u7D42\u308F\u308A\u30FB\u627F\u8A8D\u306E\u5F85\u3061",finish:"\u7D42\u308F\u308A\u3068\u627F\u8A8D\u306E\u5F85\u3061",none:"\u544A\u3052\u306A\u3044"},tenantModel:"\u7D44\u7E54\u306E\u65E2\u5B9A\u306E\u30E2\u30C7\u30EB",unavailableModels:"\u6B21\u306E\u30E2\u30C7\u30EB\u306F\u3001\u4ECA\u306F\u9078\u3079\u307E\u305B\u3093\u3002",modelReasons:{access_denied:"\u3053\u306E\u30E2\u30C7\u30EB\u3092\u4F7F\u3046\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093\u3002",classification:"\u65B0\u3057\u3044\u4F1A\u8A71\u306E\u533A\u5206\u306E\u60C5\u5831\u3092\u3001\u3053\u306E\u30E2\u30C7\u30EB\u3078\u9001\u308C\u307E\u305B\u3093\u3002",disabled:"\u7BA1\u7406\u8005\u304C\u3053\u306E\u30E2\u30C7\u30EB\u3092\u6B62\u3081\u3066\u3044\u307E\u3059\u3002",ledger_mismatch:"\u30E2\u30C7\u30EB\u306E\u767B\u9332\u304C\u3001\u8A2D\u5B9A\u3068\u5408\u3063\u3066\u3044\u307E\u305B\u3093\u3002",config_invalid:"\u30E2\u30C7\u30EB\u306E\u8A2D\u5B9A\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002",credential_refused:"\u30E2\u30C7\u30EB\u3092\u52D5\u304B\u3059\u30B5\u30FC\u30D3\u30B9\u304C\u3001\u8A8D\u8A3C\u60C5\u5831\u3092\u62D2\u307F\u307E\u3057\u305F\u3002",stopped:"\u30E2\u30C7\u30EB\u306E\u30B5\u30FC\u30D0\u30FC\u304C\u6B62\u307E\u3063\u3066\u3044\u307E\u3059\u3002",breaker_open:"\u30E2\u30C7\u30EB\u304C\u7D9A\u3051\u3066\u5931\u6557\u3057\u305F\u305F\u3081\u3001\u3057\u3070\u3089\u304F\u6B62\u3081\u3066\u3044\u307E\u3059\u3002"},modelStates:{stopped:"\u4ECA\u306F\u6B62\u307E\u3063\u3066\u3044\u307E\u3059",breaker_open:"\u5931\u6557\u304C\u7D9A\u304D\u3001\u3057\u3070\u3089\u304F\u6B62\u3081\u3066\u3044\u307E\u3059"},modelWithState:(e,n)=>`${e} (${n})`,unnamedModel:"\u540D\u3092\u8AAD\u3081\u306A\u3044\u30E2\u30C7\u30EB",defaultModelUnavailable:e=>e===null?"\u65E2\u5B9A\u306E\u30E2\u30C7\u30EB\u306F\u3001\u4ECA\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002":t("\u65E2\u5B9A\u306E\u30E2\u30C7\u30EB\u306E",e,"\u306F\u3001\u4ECA\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002"),pickedModelUnavailable:e=>e===null?"\u9078\u3093\u3060\u30E2\u30C7\u30EB\u306F\u3001\u4ECA\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002":t("\u9078\u3093\u3060\u30E2\u30C7\u30EB\u306E",e,"\u306F\u3001\u4ECA\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002"),defaultModelMissing:"\u65E2\u5B9A\u306E\u30E2\u30C7\u30EB\u304C\u4E00\u89A7\u306B\u3042\u308A\u307E\u305B\u3093\u3002",pickedModelMissing:"\u9078\u3093\u3060\u30E2\u30C7\u30EB\u304C\u4E00\u89A7\u306B\u3042\u308A\u307E\u305B\u3093\u3002",chooseAnother:"\u5225\u306E\u30E2\u30C7\u30EB\u304B\u7D44\u7E54\u306E\u65E2\u5B9A\u3092\u9078\u3093\u3067\u304F\u3060\u3055\u3044\u3002",reading:"\u8A2D\u5B9A\u3092\u8AAD\u3093\u3067\u3044\u307E\u3059\u3002",unreached:"\u7E4B\u304C\u3089\u305A\u3001\u8A2D\u5B9A\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",incompatible:"\u7B54\u3048\u3092\u8AAD\u3081\u305A\u3001\u8A2D\u5B9A\u3092\u898B\u305B\u3089\u308C\u307E\u305B\u3093\u3002",modelsReading:"\u30E2\u30C7\u30EB\u306E\u4E00\u89A7\u3092\u8AAD\u3093\u3067\u3044\u307E\u3059\u3002",modelsUnreached:"\u7E4B\u304C\u3089\u305A\u3001\u30E2\u30C7\u30EB\u306E\u4E00\u89A7\u3092\u8AAD\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",modelsIncompatible:"\u7B54\u3048\u3092\u8AAD\u3081\u305A\u3001\u30E2\u30C7\u30EB\u306E\u4E00\u89A7\u3092\u898B\u305B\u3089\u308C\u307E\u305B\u3093\u3002",retry:"\u3082\u3046\u4E00\u5EA6\u8AAD\u3080",rereading:"\u8AAD\u307F\u76F4\u3057\u3066\u3044\u307E\u3059",save:"\u4FDD\u5B58\u3059\u308B",saving:"\u4FDD\u5B58\u3057\u3066\u3044\u307E\u3059",unchanged:"\u5909\u3048\u305F\u8A2D\u5B9A\u306F\u3042\u308A\u307E\u305B\u3093\u3002",saved:"\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F\u3002",saveUnreached:"\u7E4B\u304C\u3089\u305A\u3001\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",saveIncompatible:"\u7B54\u3048\u3092\u8AAD\u3081\u305A\u3001\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3067\u304D\u305F\u304B\u5206\u304B\u308A\u307E\u305B\u3093\u3002",fieldRefused:"\u3053\u306E\u8A2D\u5B9A\u306F\u4FDD\u5B58\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002"},newConversation:{levelLegend:"\u4F1A\u8A71\u306E\u533A\u5206",levelDescription:["\u4F1A\u8A71\u3067\u6271\u3046\u60C5\u5831\u306E\u533A\u5206\u3067\u3059\u3002","\u65E2\u5B9A\u3088\u308A\u4E0B\u3052\u3089\u308C\u307E\u305B\u3093\u3002"],levels:{PUBLIC:"\u516C\u958B (PUBLIC)",INTERNAL:"\u793E\u5185 (INTERNAL)",DEPARTMENT:"\u90E8\u7F72 (DEPARTMENT)",CONFIDENTIAL:"\u6A5F\u5BC6 (CONFIDENTIAL)",RESTRICTED:"\u9694\u96E2 (RESTRICTED)"},modelLegend:"\u30E2\u30C7\u30EB",modelDescription:["\u3053\u306E\u4F1A\u8A71\u3067\u4F7F\u3046\u30E2\u30C7\u30EB\u3067\u3059\u3002"],reasoningLegend:"\u8003\u3048\u308B\u6DF1\u3055",reasoningDescription:["\u7B54\u3048\u308B\u524D\u306B\u8003\u3048\u308B\u6DF1\u3055\u3067\u3059\u3002"],reasoningLevels:{off:"\u8003\u3048\u306A\u3044 (off)",low:"\u6D45\u304F (low)",medium:"\u3075\u3064\u3046 (medium)",high:"\u6DF1\u304F (high)",max:"\u6700\u3082\u6DF1\u304F (max)"},created:"\u4F1A\u8A71\u3092\u4F5C\u308A\u307E\u3057\u305F\u3002"}}}),T=Object.keys(h),g=e=>h[r(T,e,"resolveChatLabels","locale")];var D=()=>g(f().locale);import{createContext as C}from"react";var L=C(null);export{D as a,L as b};
|
package/dist/chunk-WGNEBS4H.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,e as w,f as y,i as E}from"./chunk-7KWWXSGA.js";import{a,c as $}from"./chunk-PLNRET3Z.js";import{Pa as h,Ra as f,Sa as b,a as m,b as g,l}from"./chunk-4NR4KSV6.js";var R=m({listConversations:[],createConversation:[],getConversation:["conversation_uid"],listMessages:["conversation_uid"],getMessage:["conversation_uid","message_uid"],getMessagePath:["conversation_uid","message_uid"],startRun:["conversation_uid"],getRun:["run_uid"],cancelRun:["run_uid"],listModels:[],getSettings:[],updateSettings:[],getAttachment:["attachment_uid"],updateAttachment:["attachment_uid"],deleteAttachment:["attachment_uid"],createAttachment:[]}),C=Object.freeze(Object.keys(f)),A=Object.freeze({}),T=(t,e,n)=>{let r=R[t];if(r.length===0){if(e!==void 0)throw new TypeError(`${n}: request.params must be undefined (the path of ${t} names no parameter), got ${a(e)}`);return A}p("object",e,n,"request.params");let o=e,u=Object.keys(o).find(i=>!r.includes(i));if(u!==void 0)throw new RangeError(`${n}: request.params must hold only the parameters the path of ${t} names (${r.join(", ")}), got the key ${a(u)}`);let d={};for(let i of r){let s=Object.hasOwn(o,i)?o[i]:void 0;w(l,s,n,`request.params.${i}`,"a chat uid"),d[i]=s}return Object.freeze(d)},k=(t,e,n)=>{if(!Object.hasOwn(h,t)){if(e!==void 0)throw new TypeError(`${n}: request.query must be undefined (${t} takes no query), got ${a(e)}`);return null}let r=h[t],o=e===void 0&&r.safeParse({}).success?{}:e;return g(y(r,o,n,"request.query",`the query of ${t}`))},x=(t,e,n)=>{let r=f[t].body;if(r===null){if(e!==void 0)throw new TypeError(`${n}: request.body must be undefined (${t} takes no body), got ${a(e)}`);return null}let o=y(b[r],e,n,"request.body",`the body of ${t} (${r})`);if(r!=="attachment_upload")return g(o);let u=E(o.file);if(u===null)throw new RangeError(`${n}: request.body.file must be a Blob as the browser's Blob reads one, got ${a(o.file)}`);return g({...o,file:u})},O=t=>{try{return Reflect.apply(Object.getOwnPropertyDescriptor(AbortSignal.prototype,"aborted").get,t,[]),!0}catch{return!1}},G=(t,e,n)=>{let r=$(C,t,n,"endpoint");p("object",e,n,"request");let o=e,{params:u,query:d,body:i,signal:s}=o,c={endpoint:r,params:T(r,u,n),query:k(r,d,n),body:x(r,i,n)};if(s!==void 0&&!O(s))throw new TypeError(`${n}: request.signal must be undefined or an AbortSignal, got ${a(s)}`);return Object.freeze({...c,signal:s===void 0?null:s})};var _=Object.freeze({"\n":"%0A","\r":"%0D",'"':"%22"}),B=t=>t.replace(/[\n\r"]/g,e=>_[e]);var L=(t,e)=>{for(let[n,{attributes:r,operations:o,statics:u}]of Object.entries(e)){let d=Reflect.get(globalThis,n);if(typeof d!="function")throw new TypeError(`${t}: the runtime's ${n} must be a function, got ${a(d)}`);let i=d.prototype;if(typeof i!="object"||i===null)throw new TypeError(`${t}: the runtime's ${n}.prototype must be an object, got ${a(i)}`);for(let s of r){let c=Object.getOwnPropertyDescriptor(i,s)?.get;if(typeof c!="function")throw new TypeError(`${t}: the runtime's getter of ${n}.prototype.${s} must be a function, as Web IDL makes an attribute an accessor of its interface's own prototype, got ${a(c)}`)}for(let s of o){let c=Reflect.get(i,s);if(typeof c!="function")throw new TypeError(`${t}: the runtime's ${n}.prototype.${s} must be a function, got ${a(c)}`)}for(let s of u){let c=Reflect.get(d,s);if(typeof c!="function")throw new TypeError(`${t}: the runtime's ${n}.${s} must be a function, got ${a(c)}`)}}};var S=new Set(["GET","HEAD"]),P=/^https?:\/\/[^/\\?#]+/i,j=Object.freeze(["http://chat-write-target-a.invalid","http://chat-write-target-b.invalid"]),F=t=>!S.has(t.toUpperCase()),Z=t=>{let e=P.exec(t);return e===null?"":e[0]},N=t=>{if(!t.startsWith("/"))return!1;try{return j.every(e=>new URL(t,e).origin===e)}catch(e){if(e instanceof TypeError)return!1;throw e}},J=(t,e,n,r)=>{let o;try{o=t(e)}catch(u){throw new RangeError(`${n}: ${r} must return without throwing, got ${a(u)}`,{cause:u})}if(typeof o!="string")throw new TypeError(`${n}: ${r} must return a string, got ${a(o)}`);if(!N(o))throw new RangeError(`${n}: ${r} must return a path of the same origin that starts with one "/"`);return o};export{O as a,G as b,B as c,L as d,F as e,Z as f,N as g,J as h};
|