@kitsuden/sdk 0.0.0-stage → 0.9.0-beta
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/LICENSE +21 -0
- package/README.md +475 -2
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +14556 -0
- package/dist/index.d.ts +14556 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/realtime/realtime.cjs +2 -0
- package/dist/realtime/realtime.cjs.map +1 -0
- package/dist/realtime/realtime.d.cts +133 -0
- package/dist/realtime/realtime.d.ts +133 -0
- package/dist/realtime/realtime.js +2 -0
- package/dist/realtime/realtime.js.map +1 -0
- package/dist/rpc/rpc.cjs +2 -0
- package/dist/rpc/rpc.cjs.map +1 -0
- package/dist/rpc/rpc.d.cts +44 -0
- package/dist/rpc/rpc.d.ts +44 -0
- package/dist/rpc/rpc.js +2 -0
- package/dist/rpc/rpc.js.map +1 -0
- package/dist/toon-protocol/toon-protocol.cjs +2 -0
- package/dist/toon-protocol/toon-protocol.cjs.map +1 -0
- package/dist/toon-protocol/toon-protocol.d.cts +36 -0
- package/dist/toon-protocol/toon-protocol.d.ts +36 -0
- package/dist/toon-protocol/toon-protocol.js +2 -0
- package/dist/toon-protocol/toon-protocol.js.map +1 -0
- package/openapi/kitsuden.openapi.json +41609 -0
- package/package.json +106 -3
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var pn=Object.defineProperty;var m=(n,e)=>{for(var t in e)pn(n,t,{get:e[t],enumerable:!0})};var ln=[","," ","|"],dn=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:e[+-]?\d+)?$/i,En=/^[+-]?\d+(?:\.\d+)?(?:e[+-]?\d+)?$/i,un=/^[A-Z_][\w.]*$/i,cn=/^(?:0|[1-9]\d*)$/,Tn=/[\u0000-\u001F]/,_n=/[\u0000-\u001F]/g,M=class extends SyntaxError{line;constructor(e,t){super(t!==void 0?`Line ${t}: ${e}`:e),this.name="ToonDecodeError",this.line=t}};function V(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function k(n){return n===null||typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function te(n){for(let e in n)return!1;return!0}var z=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);function b(n,e,t){if(e==="__proto__"){Object.defineProperty(n,e,{value:t,enumerable:!0,writable:!0,configurable:!0});return}n[e]=t}function X(n,e){if(n===null)return null;if(typeof n=="object"||typeof n=="bigint"){let o=n;if(typeof o.toJSON=="function")return X(o.toJSON(),e)}switch(typeof n){case"string":case"boolean":return n;case"number":return Number.isFinite(n)?Object.is(n,-0)?0:n:null;case"bigint":throw new TypeError("Do not know how to serialize a BigInt");case"undefined":case"function":case"symbol":return e?null:void 0}if(Array.isArray(n)){let o=null;for(let a=0;a<n.length;a++){let i=X(n[a],!0);o?o.push(i):i!==n[a]&&(o=n.slice(0,a),o.push(i))}return o??n}let t=n,r=null,s=Object.keys(t);for(let o=0;o<s.length;o++){let a=s[o],i=X(t[a],!1);if(r)i!==void 0&&b(r,a,i);else if(i!==t[a]){r={};for(let p=0;p<o;p++)b(r,s[p],t[s[p]]);i!==void 0&&b(r,a,i)}}return r??t}function _e(n){return n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(_n,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`)}function mn(n){return!(!n||/^[ \t]|[ \t]$/.test(n)||n==="true"||n==="false"||n==="null"||En.test(n)||n.includes(":")||n.includes('"')||n.includes("\\")||/[[\]{}]/.test(n)||Tn.test(n)||n.includes(",")||n.startsWith("-")||n.startsWith("#"))}function H(n){return n===null?"null":typeof n=="boolean"||typeof n=="number"?String(n):mn(n)?n:`"${_e(n)}"`}function P(n){return un.test(n)?n:`"${_e(n)}"`}function ne(n){if(n.length===0)return;let e=Object.keys(n[0]);if(e.length===0)return;for(let r of n){if(Object.keys(r).length!==e.length)return;for(let s of e)if(!z(r,s))return}let t=[];for(let r of e){let s=n.map(a=>a[r]);if(s.every(k)){t.push({name:r});continue}if(!s.every(a=>V(a)&&!te(a)))return;let o=ne(s);if(!o)return;t.push({name:r,children:o})}return t}function me(n){let e=Object.values(n);if(!(e.length<2)&&e.every(t=>V(t)&&!te(t)))return ne(e)}function Ie(n,e,t){for(let r of e){let s=n[r.name];r.children?Ie(s,r.children,t):t.push(s)}return t}function It(n){return n.map(e=>P(e.name)+(e.children?`{${It(e.children)}}`:"")).join(",")}function O(n,e,t,r=!1){let s=e!==void 0?P(e):"";return s+=`[${n}${r?":":""}]`,t&&(s+=`{${It(t)}}`),s+":"}function ge(n){return n.map(e=>H(e)).join(",")}var de=class{lines=[];line(e,t){this.lines.push(" ".repeat(2*e)+t)}item(e,t){this.line(e,"- "+t)}};function Z(n,e){let t=O(n.length,e);return n.length===0?t:`${t} ${ge(n)}`}function De(n,e,t){for(let r of Object.keys(n))gt(r,n[r],e,t)}function gt(n,e,t,r){if(k(e))r.line(t,`${P(n)}: ${H(e)}`);else if(Array.isArray(e))Ut(n,e,t,r);else{let s=me(e);if(s){Dt(n,e,s,t,r);return}r.line(t,`${P(n)}:`),te(e)||De(e,t+1,r)}}function Dt(n,e,t,r,s){let o=Object.keys(e);s.line(r,O(o.length,n,t,!0)),Nt(e,o,t,r+1,s)}function Nt(n,e,t,r,s){for(let o of e)s.line(r,`${P(o)}: ${ge(Ie(n[o],t,[]))}`)}function yt(n,e,t,r){for(let s of n)r.line(t,ge(Ie(s,e,[])))}function Ut(n,e,t,r){if(e.length===0){r.line(t,n!==void 0?`${P(n)}: []`:"[]");return}if(e.every(k)){r.line(t,Z(e,n));return}if(e.every(s=>Array.isArray(s)&&s.every(k))){r.line(t,O(e.length,n));for(let s of e)r.item(t+1,Z(s));return}if(e.every(V)){let s=ne(e);if(s){r.line(t,O(e.length,n,s)),yt(e,s,t+1,r);return}}r.line(t,O(e.length,n));for(let s of e)Ne(s,t+1,r)}function Ne(n,e,t){if(k(n))t.item(e,H(n));else if(Array.isArray(n))if(n.every(k))t.item(e,Z(n));else{t.item(e,O(n.length));for(let r of n)Ne(r,e+1,t)}else In(n,e,t)}function In(n,e,t){let r=Object.keys(n);if(r.length===0){t.line(e,"-");return}let s=r[0],o=n[s],a=()=>{for(let p=1;p<r.length;p++)gt(r[p],n[r[p]],e+1,t)};if(Array.isArray(o)&&o.length>0&&o.every(V)){let p=ne(o);if(p){t.item(e,O(o.length,s,p)),yt(o,p,e+2,t),a();return}}if(V(o)){let p=me(o);if(p){let l=Object.keys(o);t.item(e,O(l.length,s,p,!0)),Nt(o,l,p,e+2,t),a();return}}let i=P(s);if(k(o))t.item(e,`${i}: ${H(o)}`);else if(Array.isArray(o))if(o.length===0)t.item(e,`${i}: []`);else if(o.every(k))t.item(e,`${i}${Z(o)}`);else{t.item(e,`${i}${O(o.length)}`);for(let p of o)Ne(p,e+2,t)}else t.item(e,`${i}:`),te(o)||De(o,e+2,t);a()}function gn(n){let e=X(n,!0)??null;if(k(e))return typeof e=="string"&&e.startsWith("\uFEFF")?`"${_e(e)}"`:H(e);let t=new de;if(Array.isArray(e))Ut(void 0,e,0,t);else{let r=me(e);r?Dt(void 0,e,r,0,t):De(e,0,t)}return t.lines.join(`
|
|
2
|
+
`)}var Ee=class{constructor(e){this.lines=e}lines;i=0;look(){return this.lines[this.i]}read(){return this.lines[this.i++]}};function Dn(n){let e=n.split(`
|
|
3
|
+
`),t=[];for(let r=0;r<e.length;r++){let s=e[r];r===0&&s.startsWith("\uFEFF")&&(s=s.slice(1)),s.endsWith("\r")&&(s=s.slice(0,-1));let o=0,a=!1;for(;o<s.length&&(s[o]===" "||s[o]===" ");)s[o]===" "&&(a=!0),o++;let i=s.length;for(;i>o&&s[i-1]===" ";)i--;if(i===o||!a&&s[o]==="#")continue;if(a)throw new M("Tabs are not allowed in indentation",r+1);let p=o===0&&i===s.length?s:s.slice(o,i);t.push({level:Math.floor(o/2),text:p,num:r+1})}return t}function R(n){let e=0,t=n.length;for(;e<t&&n[e]===" ";)e++;for(;t>e&&n[t-1]===" ";)t--;return e===0&&t===n.length?n:n.slice(e,t)}var Nn={n:`
|
|
4
|
+
`,t:" ",r:"\r","\\":"\\",'"':'"'};function St(n){return n.includes("\\")?n.replace(/\\(u[0-9a-fA-F]{4}|.?)/g,(e,t)=>{if(t.length===5)return String.fromCharCode(parseInt(t.slice(1),16));let r=Nn[t];if(r===void 0)throw new SyntaxError(`Invalid escape sequence: \\${t}`);return r}):n}function ye(n,e){for(let t=e+1;t<n.length;t++){if(n[t]==="\\"){t++;continue}if(n[t]==='"')return t}return-1}function f(n,e,t=0){let r=n.indexOf('"',t),s=n.indexOf(e,t);if(r===-1||s!==-1&&s<r)return s;let o=!1;for(let a=t;a<n.length;a++){let i=n[a];if(o&&i==="\\"){a++;continue}if(i==='"')o=!o;else if(!o&&i===e)return a}return-1}function ee(n){let e=R(n);if(!e.startsWith('"'))return e;let t=ye(e,0);if(t===-1)throw new SyntaxError("Unterminated string: missing closing quote");if(t!==e.length-1)throw new SyntaxError("Unexpected characters after closing quote");return St(e.slice(1,t))}function B(n){let e=R(n);if(!e)return"";if(e.startsWith('"'))return ee(e);if(e==="true")return!0;if(e==="false")return!1;if(e==="null")return null;if(dn.test(e)){let t=Number.parseFloat(e);if(Number.isFinite(t))return Object.is(t,-0)?0:t}return e}function pe(n,e){if(!n.includes('"'))return n===""?[]:n.split(e).map(R);let t=[],r=0,s=!1;for(let o=0;o<n.length;o++){let a=n[o];if(s&&a==="\\"&&o+1<n.length){o++;continue}a==='"'?s=!s:!s&&a===e&&(t.push(R(n.slice(r,o))),r=o+1)}return(r<n.length||t.length>0)&&t.push(R(n.slice(r))),t}function ue(n,e){let t=!1,r=0;for(let s=e;s<n.length;s++){let o=n[s];if(t&&o==="\\"){s++;continue}if(o==='"')t=!t;else if(!t&&o==="{")r++;else if(!t&&o==="}"&&(r--,r===0))return s}return-1}function ft(n,e){let t=[],r="",s=!1,o=0;for(let a=0;a<n.length;a++){let i=n[a];if(s&&i==="\\"&&a+1<n.length){r+=i+n[a+1],a++;continue}if(i==='"')s=!s;else if(!s&&i==="{")o++;else if(!s&&i==="}")o--;else if(!s&&o===0&&i===e){t.push(r),r="";continue}r+=i}return t.push(r),t.map(a=>{let i=R(a);if(!i)throw new SyntaxError("Empty field name in field list");let p=f(i,"{");if(p===-1)return{name:ee(i)};let l=ue(i,p);if(l!==i.length-1)throw new SyntaxError("Unexpected content after nested field group");return{name:ee(i.slice(0,p)),children:ft(i.slice(p+1,l),e)}})}function ce(n){let e=0;for(let t of n)e+=t.children?ce(t.children):1;return e}function W(n){let e;if(n.startsWith('"')){let E=ye(n,0);if(E===-1||n[E+1]!=="[")return;e=E+1}else e=f(n,"[");if(e===-1)return;let t=f(n,":");if(t===-1||t<e)return;let r=f(n,"]",e);if(r===-1)throw new SyntaxError("Unterminated bracket segment");let s=r+1,o=f(n,"{",r);if(o!==-1&&o<f(n,":",r)){if(o!==r+1)throw new SyntaxError("Unexpected content between bracket segment and field list");let E=ue(n,o);E!==-1&&(s=E+1)}let a=f(n,":",Math.max(r,s));if(a===-1)throw new SyntaxError("Missing colon after array header");if(a!==Math.max(r+1,s))throw new SyntaxError("Unexpected content between bracket segment and colon");let i;if(e>0){let E=n.slice(0,e);if(/[ \t]$/.test(E))throw new SyntaxError("Unexpected whitespace between key and bracket segment");i=E.startsWith('"')?ee(E):E}let p=n.slice(e+1,r),l=",";p.endsWith(" ")?(l=" ",p=p.slice(0,-1)):p.endsWith("|")&&(l="|",p=p.slice(0,-1));let d=!1;if(p.endsWith(":")&&(d=!0,p=p.slice(0,-1)),!cn.test(p))throw new SyntaxError(`Invalid array length: "${p}"`);let T;if(o!==-1&&o<a){let E=ue(n,o);if(E!==-1&&E<a){let u=n.slice(o+1,E);for(let _ of ln)if(_!==l&&f(u,_)!==-1)throw new SyntaxError("Header delimiter mismatch");T=ft(u,l)}}let y=R(n.slice(a+1));if(d&&!T)throw new SyntaxError("Keyed header requires a field list");if(T&&y)throw new SyntaxError("Unexpected content after fields-bearing header colon");return{key:i,length:Number.parseInt(p,10),delim:l,fields:T,withKey:d,online:y||void 0}}function Tt(n){if(n.startsWith('"')){let t=ye(n,0);if(t===-1)throw new SyntaxError("Unterminated quoted key");let r=t+1;for(;n[r]===" ";)r++;if(n[r]!==":")throw new SyntaxError("Missing colon after key");return{key:St(n.slice(1,t)),end:r+1}}let e=f(n,":");if(e===-1)throw new SyntaxError("Missing colon after key");return{key:R(n.slice(0,e)),end:e+1}}var _t=n=>R(n).startsWith("[")&&f(n,":")!==-1,le=n=>f(n,":")!==-1;function yn(n,e){let t=f(n,":");if(t===-1)return!0;let r=f(n,e);return r!==-1&&r<t}function mt(n,e){let t=0,r=s=>{let o={};for(let a of s)b(o,a.name,a.children?r(a.children):e[t++]);return o};return r(n)}var Te=class{constructor(e){this.r=e}r;error(e,t){return new M(e,t?.num)}withLine(e,t){try{return t()}catch(r){throw r instanceof M?r:this.error(r.message,e)}}document(){let e=this.r.look();if(!e)return{};if(e.level!==0)throw this.error("Over-indented line",e);if(e.text==="[]")return this.r.read(),this.consumed(),[];if(_t(e.text)){let r=this.withLine(e,()=>W(e.text));if(r){this.r.read();let s=this.fromHeader(r,0,e);return this.consumed(),s}}if(this.r.read(),!this.r.look()&&!le(e.text))return this.withLine(e,()=>B(e.text));if(!le(e.text))throw this.error("Top-level document must start with a key-value or array-header line",e);let t={};this.par(e,0,t);for(let r=this.r.look();r;r=this.r.look()){if(r.level!==0)throw this.error("Over-indented line",r);this.r.read(),this.par(r,0,t)}return t}consumed(){let e=this.r.look();if(e)throw this.error("Unexpected content after the document root",e)}par(e,t,r){let s=this.withLine(e,()=>W(e.text));if(s){if(s.key===void 0)throw this.error("Keyless array header is only valid at the root or as a list item",e);if(z(r,s.key))throw this.error(`Duplicate sibling key "${s.key}"`,e);b(r,s.key,this.fromHeader(s,t,e));return}let{key:o,end:a}=this.withLine(e,()=>Tt(e.text));if(z(r,o))throw this.error(`Duplicate sibling key "${o}"`,e);let i=R(e.text.slice(a));if(!i){let p=this.r.look();b(r,o,p&&p.level>t?this.fields(t+1):{});return}b(r,o,i==="[]"?[]:this.withLine(e,()=>B(i)))}fields(e){let t={},r;for(let s=this.r.look();s&&s.level>=e;s=this.r.look()){if(r??=s.level,s.level!==r)throw this.error(`Over-indented line: expected depth ${r}`,s);this.r.read(),this.par(s,r,t)}return t}contentLevel(e){let t=this.r.look();return!t||t.level<=e+1?e+1:t.level}fromHeader(e,t,r){if(e.withKey)return this.tableWithKey(e,t,r);if(e.online!==void 0){let s=this.withLine(r,()=>pe(e.online,e.delim).map(B));if(s.length!==e.length)throw this.error(`Expected ${e.length} inline values, got ${s.length}`,r);return s}return e.fields&&e.fields.length>0?this.table(e,t,r):this.list(e,t,r)}table(e,t,r){let s=this.contentLevel(t),o=ce(e.fields),a=[];for(;a.length<e.length;){let i=this.r.look();if(!i||i.level<=t)break;if(i.level!==s)throw this.error(`Over-indented line: expected depth ${s}`,i);if(!yn(i.text,e.delim))break;this.r.read();let p=this.withLine(i,()=>pe(i.text,e.delim).map(B));if(p.length!==o)throw this.error(`Expected ${o} row values, got ${p.length}`,i);a.push(mt(e.fields,p))}if(a.length!==e.length)throw this.error(`Expected ${e.length} tabular rows, got ${a.length}`,r);return a}tableWithKey(e,t,r){let s=this.contentLevel(t),o=ce(e.fields),a={},i=0;for(let p=this.r.look();p&&p.level>t;p=this.r.look()){if(p.level!==s)throw this.error(`Over-indented line: expected depth ${s}`,p);this.r.read();let{key:l,end:d}=this.withLine(p,()=>Tt(p.text));if(z(a,l))throw this.error(`Duplicate key "${l}"`,p);let T=R(p.text.slice(d)),y=T===""?[]:this.withLine(p,()=>pe(T,e.delim).map(B));if(y.length!==o)throw this.error(`Expected ${o} entry cells, got ${y.length}`,p);b(a,l,mt(e.fields,y)),i++}if(i!==e.length)throw this.error(`Expected ${e.length} keyed entries, got ${i}`,r);return a}list(e,t,r){let s=this.contentLevel(t),o=[];for(;o.length<e.length;){let i=this.r.look();if(!i||i.level<=t)break;if(i.level!==s)throw this.error(`Over-indented line: expected depth ${s}`,i);if(!(i.text.startsWith("- ")||i.text==="-"))break;o.push(this.item(s))}if(o.length!==e.length)throw this.error(`Expected ${e.length} list items, got ${o.length}`,r);let a=this.r.look();if(a&&a.level===s&&(a.text.startsWith("- ")||a.text==="-"))throw this.error(`Expected ${e.length} list items, but found more`,a);return o}item(e){let t=this.r.read();if(t.text==="-")return{};let r=t.text.slice(2).replace(/^ +/,"");if(!R(r))return{};if(R(r)==="[]")return[];let s={...t,text:r};if(_t(r)){let a=this.withLine(s,()=>W(r));if(a){if(a.withKey||a.fields)throw this.error("Keyless header with a field list is only valid at the root",s);return this.fromHeader(a,e,s)}}let o=this.withLine(s,()=>W(r));if(o&&o.key!==void 0&&o.fields!==void 0){let a={};return b(a,o.key,this.fromHeader(o,e+1,s)),this.siblings(e+1,a),a}if(le(r)){let a={};return this.par(s,e+1,a),this.siblings(e+1,a),a}return this.withLine(s,()=>B(r))}siblings(e,t){for(let r=this.r.look();r&&r.level>=e;r=this.r.look()){if(r.level!==e)throw this.error(`Over-indented line: expected depth ${e}`,r);this.r.read(),this.par(r,e,t)}}};function Y(n){return new Te(new Ee(Dn(n))).document()}var Rt={};m(Rt,{operations:()=>Ue});var Ue={agentNotification:{kon:"kon-agent-notifications",id:"agent-notification",operationId:"agent-notifications.agent-notification",method:"GET",path:"/admin/agents/{id}/notify",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agent-notifications:agent-notification",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},rotateNotificationSecret:{kon:"kon-agent-notifications",id:"rotate-notification-secret",operationId:"agent-notifications.rotate-notification-secret",method:"POST",path:"/admin/agents/{id}/notify/rotate",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:agent-notifications:rotate-notification-secret",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},setAgentNotification:{kon:"kon-agent-notifications",id:"set-agent-notification",operationId:"agent-notifications.set-agent-notification",method:"PUT",path:"/admin/agents/{id}/notify",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agent-notifications:set-agent-notification",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var At={};m(At,{operations:()=>Se});var Se={exchangeAgentToken:{kon:"kon-agent-token",id:"exchange-agent-token",operationId:"agent-token.exchange-agent-token",method:"POST",path:"/agent/token/exchange",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:agent-token:exchange-agent-token",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var ht={};m(ht,{operations:()=>fe});var fe={agentAccess:{kon:"kon-agents",id:"agent-access",operationId:"agents.agent-access",method:"GET",path:"/v1/agents/{id}/access",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:agent-access",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},agentDecisions:{kon:"kon-agents",id:"agent-decisions",operationId:"agents.agent-decisions",method:"GET",path:"/v1/agent-decisions",pathParams:[],queryParams:["days","agentId","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:agent-decisions",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:null,limit:"limit"}},agentFriction:{kon:"kon-agents",id:"agent-friction",operationId:"agents.agent-friction",method:"GET",path:"/v1/agent-friction",pathParams:[],queryParams:["days","agentId"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:agent-friction",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},agentVersion:{kon:"kon-agents",id:"agent-version",operationId:"agents.agent-version",method:"GET",path:"/v1/agents/{id}/versions/{version}",pathParams:["id","version"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:agent-version",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},agentVersions:{kon:"kon-agents",id:"agent-versions",operationId:"agents.agent-versions",method:"GET",path:"/v1/agents/{id}/versions",pathParams:["id"],queryParams:["limit"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:agent-versions",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},bindKeyDpop:{kon:"kon-agents",id:"bind-key-dpop",operationId:"agents.bind-key-dpop",method:"PUT",path:"/v1/agents/{id}/keys/{keyId}/dpop",pathParams:["id","keyId"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agents:bind-key-dpop",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createKey:{kon:"kon-agents",id:"create-key",operationId:"agents.create-key",method:"POST",path:"/v1/agents/{id}/keys",pathParams:["id"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:agents:create-key",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listKeys:{kon:"kon-agents",id:"list-keys",operationId:"agents.list-keys",method:"GET",path:"/v1/agents/{id}/keys",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:list-keys",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},permissionCatalog:{kon:"kon-agents",id:"permission-catalog",operationId:"agents.permission-catalog",method:"GET",path:"/v1/agent-access/catalog",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:permission-catalog",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},readMcpSettings:{kon:"kon-agents",id:"read-mcp-settings",operationId:"agents.read-mcp-settings",method:"GET",path:"/v1/agents/{id}/mcp-settings",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:read-mcp-settings",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},readQuotas:{kon:"kon-agents",id:"read-quotas",operationId:"agents.read-quotas",method:"GET",path:"/v1/agents/{id}/quotas",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:read-quotas",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},readSigner:{kon:"kon-agents",id:"read-signer",operationId:"agents.read-signer",method:"GET",path:"/v1/agents/{id}/sponsor",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:agents:read-signer",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},restoreAgentVersion:{kon:"kon-agents",id:"restore-agent-version",operationId:"agents.restore-agent-version",method:"POST",path:"/v1/agents/{id}/versions/{version}/restore",pathParams:["id","version"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:agents:restore-agent-version",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},revokeKey:{kon:"kon-agents",id:"revoke-key",operationId:"agents.revoke-key",method:"POST",path:"/v1/agents/{id}/keys/{keyId}/revoke",pathParams:["id","keyId"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agents:revoke-key",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},rotateKey:{kon:"kon-agents",id:"rotate-key",operationId:"agents.rotate-key",method:"POST",path:"/v1/agents/{id}/keys/{keyId}/rotate",pathParams:["id","keyId"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:agents:rotate-key",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},saveMcpSettings:{kon:"kon-agents",id:"save-mcp-settings",operationId:"agents.save-mcp-settings",method:"PUT",path:"/v1/agents/{id}/mcp-settings",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agents:save-mcp-settings",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},saveQuotas:{kon:"kon-agents",id:"save-quotas",operationId:"agents.save-quotas",method:"PUT",path:"/v1/agents/{id}/quotas",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agents:save-quotas",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},saveRequireDpop:{kon:"kon-agents",id:"save-require-dpop",operationId:"agents.save-require-dpop",method:"PUT",path:"/v1/agents/{id}/dpop",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agents:save-require-dpop",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},saveScopes:{kon:"kon-agents",id:"save-scopes",operationId:"agents.save-scopes",method:"PUT",path:"/v1/agents/{id}/scopes",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agents:save-scopes",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},saveSigner:{kon:"kon-agents",id:"save-signer",operationId:"agents.save-signer",method:"PUT",path:"/v1/agents/{id}/sponsor",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:agents:save-signer",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var bt={};m(bt,{operations:()=>Re});var Re={addView:{kon:"kon-analytics",id:"add-view",operationId:"analytics.add-view",method:"POST",path:"/analytics/hit",pathParams:[],queryParams:[],body:"json",responses:{204:"empty"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:analytics:add-view",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getMostViewed:{kon:"kon-analytics",id:"get-most-viewed",operationId:"analytics.get-most-viewed",method:"GET",path:"/analytics/top",pathParams:[],queryParams:["type","days","limit","ids"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:analytics:get-most-viewed",mcpTool:"analytics__get-most-viewed",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getSubjectSeries:{kon:"kon-analytics",id:"get-subject-series",operationId:"analytics.get-subject-series",method:"GET",path:"/analytics/subject/{type}/{id}",pathParams:["type","id"],queryParams:["days"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:analytics:get-subject-series",mcpTool:"analytics__get-subject-series",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Ot={};m(Ot,{operations:()=>Ae});var Ae={agentMode:{kon:"kon-approvals",id:"agent-mode",operationId:"approvals.agent-mode",method:"PUT",path:"/approvals/agents/{id}/mode",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:approvals:agent-mode",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},agentUnattended:{kon:"kon-approvals",id:"agent-unattended",operationId:"approvals.agent-unattended",method:"PUT",path:"/approvals/agents/{id}/unattended",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:approvals:agent-unattended",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},approvalsAudit:{kon:"kon-approvals",id:"approvals-audit",operationId:"approvals.approvals-audit",method:"GET",path:"/approvals/audit",pathParams:[],queryParams:["agentId","proposalId","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:approvals-audit",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:null,limit:"limit"}},approvalsConfiguration:{kon:"kon-approvals",id:"approvals-configuration",operationId:"approvals.approvals-configuration",method:"GET",path:"/approvals/settings",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:approvals-configuration",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},approveProposal:{kon:"kon-approvals",id:"approve-proposal",operationId:"approvals.approve-proposal",method:"POST",path:"/approvals/proposals/{id}/approve",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:approvals:approve-proposal",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_APPROVAL_STALE","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},closeReview:{kon:"kon-approvals",id:"close-review",operationId:"approvals.close-review",method:"POST",path:"/approvals/reviews/{id}/done",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:approvals:close-review",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},countPending:{kon:"kon-approvals",id:"count-pending",operationId:"approvals.count-pending",method:"GET",path:"/approvals/proposals/count",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:count-pending",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listProposals:{kon:"kon-approvals",id:"list-proposals",operationId:"approvals.list-proposals",method:"GET",path:"/approvals/proposals",pathParams:[],queryParams:["status","agentId","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:list-proposals",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:null,limit:"limit"}},listReviews:{kon:"kon-approvals",id:"list-reviews",operationId:"approvals.list-reviews",method:"GET",path:"/approvals/reviews",pathParams:[],queryParams:["status","proposalId","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:list-reviews",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:null,limit:"limit"}},proposalDetail:{kon:"kon-approvals",id:"proposal-detail",operationId:"approvals.proposal-detail",method:"GET",path:"/approvals/proposals/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:proposal-detail",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},proposalImage:{kon:"kon-approvals",id:"proposal-image",operationId:"approvals.proposal-image",method:"GET",path:"/approvals/proposals/{id}/files/{fileId}",pathParams:["id","fileId"],queryParams:[],body:null,responses:{200:"binary"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:proposal-image",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},rejectProposal:{kon:"kon-approvals",id:"reject-proposal",operationId:"approvals.reject-proposal",method:"POST",path:"/approvals/proposals/{id}/reject",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:approvals:reject-proposal",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},rowEvidence:{kon:"kon-approvals",id:"row-evidence",operationId:"approvals.row-evidence",method:"GET",path:"/approvals/evidence",pathParams:[],queryParams:["entity","rowId"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:approvals:row-evidence",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},saveApprovalsConfiguration:{kon:"kon-approvals",id:"save-approvals-configuration",operationId:"approvals.save-approvals-configuration",method:"PUT",path:"/approvals/settings",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:approvals:save-approvals-configuration",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},scheduleProposalReview:{kon:"kon-approvals",id:"schedule-proposal-review",operationId:"approvals.schedule-proposal-review",method:"POST",path:"/approvals/proposals/{id}/review",pathParams:["id"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:approvals:schedule-proposal-review",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var kt={};m(kt,{operations:()=>he});var he={auditChainHead:{kon:"kon-audit",id:"audit-chain-head",operationId:"audit.audit-chain-head",method:"GET",path:"/admin/audit/head",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:audit:audit-chain-head",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},verifyAuditChain:{kon:"kon-audit",id:"verify-audit-chain",operationId:"audit.verify-audit-chain",method:"GET",path:"/admin/audit/verify",pathParams:[],queryParams:["fromSeq","toSeq"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:audit:verify-audit-chain",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Kt={};m(Kt,{operations:()=>be});var be={catalog:{kon:"kon-automation",id:"catalog",operationId:"automation.catalog",method:"GET",path:"/automation/catalog",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:automation:catalog",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},dryRunAction:{kon:"kon-automation",id:"dry-run-action",operationId:"automation.dry-run-action",method:"POST",path:"/automation/actions/{id}/dry-run",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!0,sensitive:!1,scope:"kon:automation:dry-run-action",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Pt={};m(Pt,{operations:()=>Oe});var Oe={blockTypes:{kon:"kon-blocks",id:"block-types",operationId:"blocks.block-types",method:"GET",path:"/page-builder/block-types",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:blocks:block-types",mcpTool:"blocks__block-types",errors:["KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},clonePage:{kon:"kon-blocks",id:"clone-page",operationId:"blocks.clone-page",method:"POST",path:"/page-builder/pages/{id}/clone",pathParams:["id"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:clone-page",mcpTool:"blocks__clone-page",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createBlock:{kon:"kon-blocks",id:"create-block",operationId:"blocks.create-block",method:"POST",path:"/page-builder/pages/{pageId}/blocks",pathParams:["pageId"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:create-block",mcpTool:"blocks__create-block",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createPage:{kon:"kon-blocks",id:"create-page",operationId:"blocks.create-page",method:"POST",path:"/page-builder/pages",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:create-page",mcpTool:"blocks__create-page",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createTemplate:{kon:"kon-blocks",id:"create-template",operationId:"blocks.create-template",method:"POST",path:"/page-builder/templates",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:create-template",mcpTool:"blocks__create-template",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteBlock:{kon:"kon-blocks",id:"delete-block",operationId:"blocks.delete-block",method:"DELETE",path:"/page-builder/blocks/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:blocks:delete-block",mcpTool:"blocks__delete-block",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deletePage:{kon:"kon-blocks",id:"delete-page",operationId:"blocks.delete-page",method:"DELETE",path:"/page-builder/pages/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:blocks:delete-page",mcpTool:"blocks__delete-page",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},duplicateBlock:{kon:"kon-blocks",id:"duplicate-block",operationId:"blocks.duplicate-block",method:"POST",path:"/page-builder/blocks/{id}/duplicate",pathParams:["id"],queryParams:[],body:null,responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:duplicate-block",mcpTool:"blocks__duplicate-block",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getPage:{kon:"kon-blocks",id:"get-page",operationId:"blocks.get-page",method:"GET",path:"/page-builder/pages/{id}",pathParams:["id"],queryParams:["includeBlocks","include_blocks"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:blocks:get-page",mcpTool:"blocks__get-page",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listPages:{kon:"kon-blocks",id:"list-pages",operationId:"blocks.list-pages",method:"GET",path:"/page-builder/pages",pathParams:[],queryParams:["status","limit","offset","layout","search","cursor","paging"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:blocks:list-pages",mcpTool:"blocks__list-pages",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"cursor",items:"docs",limit:"limit"}},listTemplates:{kon:"kon-blocks",id:"list-templates",operationId:"blocks.list-templates",method:"GET",path:"/page-builder/templates",pathParams:[],queryParams:["category","type"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:blocks:list-templates",mcpTool:"blocks__list-templates",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},publishBlockAsPage:{kon:"kon-blocks",id:"publish-block-as-page",operationId:"blocks.publish-block-as-page",method:"POST",path:"/page-builder/pages/from-block",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:blocks:publish-block-as-page",mcpTool:"blocks__publish-block-as-page",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},publishDraft:{kon:"kon-blocks",id:"publish-draft",operationId:"blocks.publish-draft",method:"POST",path:"/page-builder/pages/{id}/publish-draft",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:publish-draft",mcpTool:"blocks__publish-draft",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},renderPage:{kon:"kon-blocks",id:"render-page",operationId:"blocks.render-page",method:"GET",path:"/page-builder/render/{slug}",pathParams:["slug"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:blocks:render-page",mcpTool:"blocks__render-page",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},reorderBlocks:{kon:"kon-blocks",id:"reorder-blocks",operationId:"blocks.reorder-blocks",method:"POST",path:"/page-builder/pages/{pageId}/blocks/reorder",pathParams:["pageId"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:blocks:reorder-blocks",mcpTool:"blocks__reorder-blocks",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateBlock:{kon:"kon-blocks",id:"update-block",operationId:"blocks.update-block",method:"PATCH",path:"/page-builder/blocks/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:update-block",mcpTool:"blocks__update-block",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updatePage:{kon:"kon-blocks",id:"update-page",operationId:"blocks.update-page",method:"PATCH",path:"/page-builder/pages/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:update-page",mcpTool:"blocks__update-page",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},useTemplate:{kon:"kon-blocks",id:"use-template",operationId:"blocks.use-template",method:"POST",path:"/page-builder/templates/{id}/use",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:blocks:use-template",mcpTool:"blocks__use-template",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var vt={};m(vt,{operations:()=>ke});var ke={addClaim:{kon:"kon-brain",id:"add-claim",operationId:"brain.add-claim",method:"POST",path:"/brain/memory/claims",pathParams:[],queryParams:[],body:"json",responses:{200:"json",201:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:brain:add-claim",mcpTool:"brain_claim_add",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},connect:{kon:"kon-brain",id:"connect",operationId:"brain.connect",method:"POST",path:"/brain/memory/connections",pathParams:[],queryParams:[],body:"json",responses:{200:"json",201:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:brain:connect",mcpTool:"brain_connect",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteNote:{kon:"kon-brain",id:"delete-note",operationId:"brain.delete-note",method:"DELETE",path:"/brain/memory/notes/{id}",pathParams:["id"],queryParams:[],body:null,responses:{204:"empty"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:brain:delete-note",mcpTool:"brain_note_delete",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},exportOkf:{kon:"kon-brain",id:"export-okf",operationId:"brain.export-okf",method:"GET",path:"/brain/memory/export/okf",pathParams:[],queryParams:["noteIds","limit"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:brain:export-okf",mcpTool:"brain_export_okf",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},importGraphify:{kon:"kon-brain",id:"import-graphify",operationId:"brain.import-graphify",method:"POST",path:"/brain/memory/import/graphify",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:brain:import-graphify",mcpTool:"brain_import_graphify",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},lint:{kon:"kon-brain",id:"lint",operationId:"brain.lint",method:"POST",path:"/brain/memory/lint",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:brain:lint",mcpTool:"brain_lint",errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listClaims:{kon:"kon-brain",id:"list-claims",operationId:"brain.list-claims",method:"GET",path:"/brain/memory/claims",pathParams:[],queryParams:["noteId","status","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:brain:list-claims",mcpTool:"brain_claims",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"claims",limit:"limit"}},listNotes:{kon:"kon-brain",id:"list-notes",operationId:"brain.list-notes",method:"GET",path:"/brain/memory/notes",pathParams:[],queryParams:["mine","visibility","tag","keyPrefix","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:brain:list-notes",mcpTool:"brain_list",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"notes",limit:"limit"}},noteConnections:{kon:"kon-brain",id:"note-connections",operationId:"brain.note-connections",method:"GET",path:"/brain/memory/notes/{id}/connections",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:brain:note-connections",mcpTool:"brain_connections",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},readNote:{kon:"kon-brain",id:"read-note",operationId:"brain.read-note",method:"GET",path:"/brain/memory/notes/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:brain:read-note",mcpTool:"brain_read",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},search:{kon:"kon-brain",id:"search",operationId:"brain.search",method:"GET",path:"/brain/memory/search",pathParams:[],queryParams:["q","limit","threshold","visibility"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:brain:search",mcpTool:"brain_search",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},verifyClaim:{kon:"kon-brain",id:"verify-claim",operationId:"brain.verify-claim",method:"POST",path:"/brain/memory/claims/{id}/verify",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:brain:verify-claim",mcpTool:"brain_claim_verify",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},writeNote:{kon:"kon-brain",id:"write-note",operationId:"brain.write-note",method:"PUT",path:"/brain/memory/notes",pathParams:[],queryParams:[],body:"json",responses:{200:"json",201:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:brain:write-note",mcpTool:"brain_note_write",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var xt={};m(xt,{operations:()=>Ke});var Ke={addApiKey:{kon:"kon-connections",id:"add-api-key",operationId:"connections.add-api-key",method:"POST",path:"/connections/api-keys",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:connections:add-api-key",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},finishConnection:{kon:"kon-connections",id:"finish-connection",operationId:"connections.finish-connection",method:"GET",path:"/connections/oauth/callback",pathParams:[],queryParams:["state","code","error"],body:null,responses:{200:"json",302:"redirect"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:connections:finish-connection",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getConnection:{kon:"kon-connections",id:"get-connection",operationId:"connections.get-connection",method:"GET",path:"/connections/connections/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:connections:get-connection",mcpTool:"connections__get-connection",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listConnections:{kon:"kon-connections",id:"list-connections",operationId:"connections.list-connections",method:"GET",path:"/connections/connections",pathParams:[],queryParams:["limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:connections:list-connections",mcpTool:"connections__list-connections",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"data",limit:"limit"}},listProviders:{kon:"kon-connections",id:"list-providers",operationId:"connections.list-providers",method:"GET",path:"/connections/providers",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:connections:list-providers",mcpTool:"connections__list-providers",errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},refreshConnection:{kon:"kon-connections",id:"refresh-connection",operationId:"connections.refresh-connection",method:"POST",path:"/connections/connections/{id}/refresh",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:connections:refresh-connection",mcpTool:"connections__refresh-connection",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},revokeConnection:{kon:"kon-connections",id:"revoke-connection",operationId:"connections.revoke-connection",method:"POST",path:"/connections/connections/{id}/revoke",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!0,scope:"kon:connections:revoke-connection",mcpTool:"connections__revoke-connection",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},startConnection:{kon:"kon-connections",id:"start-connection",operationId:"connections.start-connection",method:"POST",path:"/connections/oauth/start",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:connections:start-connection",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var wt={};m(wt,{operations:()=>Pe});var Pe={applyIndexes:{kon:"kon-datasets",id:"apply-indexes",operationId:"datasets.apply-indexes",method:"POST",path:"/datasets/{id}/indexes/apply",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:datasets:apply-indexes",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},autoIndexes:{kon:"kon-datasets",id:"auto-indexes",operationId:"datasets.auto-indexes",method:"POST",path:"/datasets/indexes/auto",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:datasets:auto-indexes",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},compareEntries:{kon:"kon-datasets",id:"compare-entries",operationId:"datasets.compare-entries",method:"POST",path:"/datasets/{id}/compare",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:compare-entries",mcpTool:"datasets__compare-entries",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},compareSnapshots:{kon:"kon-datasets",id:"compare-snapshots",operationId:"datasets.compare-snapshots",method:"POST",path:"/datasets/{id}/entries/{entryId}/compare",pathParams:["id","entryId"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:compare-snapshots",mcpTool:"datasets__compare-snapshots",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createCalculatedField:{kon:"kon-datasets",id:"create-calculated-field",operationId:"datasets.create-calculated-field",method:"POST",path:"/datasets/{id}/calculated-fields",pathParams:["id"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:datasets:create-calculated-field",mcpTool:"datasets__create-calculated-field",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createDataset:{kon:"kon-datasets",id:"create-dataset",operationId:"datasets.create-dataset",method:"POST",path:"/datasets",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:datasets:create-dataset",mcpTool:"datasets__create-dataset",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createEntry:{kon:"kon-datasets",id:"create-entry",operationId:"datasets.create-entry",method:"POST",path:"/datasets/{id}/entries",pathParams:["id"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:datasets:create-entry",mcpTool:"datasets__create-entry",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createSnapshot:{kon:"kon-datasets",id:"create-snapshot",operationId:"datasets.create-snapshot",method:"POST",path:"/datasets/{id}/entries/{entryId}/snapshots",pathParams:["id","entryId"],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:datasets:create-snapshot",mcpTool:"datasets__create-snapshot",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteCalculatedField:{kon:"kon-datasets",id:"delete-calculated-field",operationId:"datasets.delete-calculated-field",method:"DELETE",path:"/datasets/{id}/calculated-fields/{fieldId}",pathParams:["id","fieldId"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:datasets:delete-calculated-field",mcpTool:"datasets__delete-calculated-field",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteDataset:{kon:"kon-datasets",id:"delete-dataset",operationId:"datasets.delete-dataset",method:"DELETE",path:"/datasets/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:datasets:delete-dataset",mcpTool:"datasets__delete-dataset",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteEntry:{kon:"kon-datasets",id:"delete-entry",operationId:"datasets.delete-entry",method:"DELETE",path:"/datasets/{id}/entries/{entryId}",pathParams:["id","entryId"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:datasets:delete-entry",mcpTool:"datasets__delete-entry",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},entryHistory:{kon:"kon-datasets",id:"entry-history",operationId:"datasets.entry-history",method:"GET",path:"/datasets/{id}/entries/{entryId}/history",pathParams:["id","entryId"],queryParams:["limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:entry-history",mcpTool:"datasets__entry-history",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"history",limit:"limit"}},exportDatasets:{kon:"kon-datasets",id:"export-datasets",operationId:"datasets.export-datasets",method:"POST",path:"/datasets/export",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:datasets:export-datasets",mcpTool:"datasets__export-datasets",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getCalculatedField:{kon:"kon-datasets",id:"get-calculated-field",operationId:"datasets.get-calculated-field",method:"GET",path:"/datasets/{id}/calculated-fields/{fieldId}",pathParams:["id","fieldId"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:get-calculated-field",mcpTool:"datasets__get-calculated-field",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getDataset:{kon:"kon-datasets",id:"get-dataset",operationId:"datasets.get-dataset",method:"GET",path:"/datasets/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:get-dataset",mcpTool:"datasets__get-dataset",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getDatasetBySlug:{kon:"kon-datasets",id:"get-dataset-by-slug",operationId:"datasets.get-dataset-by-slug",method:"GET",path:"/datasets/slug/{slug}",pathParams:["slug"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:get-dataset-by-slug",mcpTool:"datasets__get-dataset-by-slug",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getEntry:{kon:"kon-datasets",id:"get-entry",operationId:"datasets.get-entry",method:"GET",path:"/datasets/{id}/entries/{entryId}",pathParams:["id","entryId"],queryParams:["includeThumbnailUrl"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:get-entry",mcpTool:"datasets__get-entry",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},importPackage:{kon:"kon-datasets",id:"import-package",operationId:"datasets.import-package",method:"POST",path:"/datasets/import/package",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!0,scope:"kon:datasets:import-package",mcpTool:"datasets__import-package",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},importToDataset:{kon:"kon-datasets",id:"import-to-dataset",operationId:"datasets.import-to-dataset",method:"POST",path:"/datasets/import",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!0,scope:"kon:datasets:import-to-dataset",mcpTool:"datasets__import-to-dataset",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},indexReport:{kon:"kon-datasets",id:"index-report",operationId:"datasets.index-report",method:"POST",path:"/datasets/indexes/report",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:index-report",mcpTool:"datasets__index-report",errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},indexStats:{kon:"kon-datasets",id:"index-stats",operationId:"datasets.index-stats",method:"GET",path:"/datasets/indexes/stats",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:index-stats",mcpTool:"datasets__index-stats",errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listCalculatedFields:{kon:"kon-datasets",id:"list-calculated-fields",operationId:"datasets.list-calculated-fields",method:"GET",path:"/datasets/{id}/calculated-fields",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:list-calculated-fields",mcpTool:"datasets__list-calculated-fields",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listDatasets:{kon:"kon-datasets",id:"list-datasets",operationId:"datasets.list-datasets",method:"GET",path:"/datasets",pathParams:[],queryParams:["limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:list-datasets",mcpTool:"datasets__list-datasets",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"docs",limit:"limit"}},listEntries:{kon:"kon-datasets",id:"list-entries",operationId:"datasets.list-entries",method:"GET",path:"/datasets/{id}/entries",pathParams:["id"],queryParams:["limit","offset","status","includeCalculated","calculatedFields","includeThumbnailUrl"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:list-entries",mcpTool:"datasets__list-entries",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"docs",limit:"limit"}},readSnapshot:{kon:"kon-datasets",id:"read-snapshot",operationId:"datasets.read-snapshot",method:"GET",path:"/datasets/{id}/entries/{entryId}/snapshot",pathParams:["id","entryId"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:read-snapshot",mcpTool:"datasets__read-snapshot",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},restoreSnapshot:{kon:"kon-datasets",id:"restore-snapshot",operationId:"datasets.restore-snapshot",method:"POST",path:"/datasets/{id}/entries/{entryId}/restore",pathParams:["id","entryId"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:datasets:restore-snapshot",mcpTool:"datasets__restore-snapshot",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},searchEntries:{kon:"kon-datasets",id:"search-entries",operationId:"datasets.search-entries",method:"GET",path:"/datasets/{id}/search",pathParams:["id"],queryParams:["q","filters","facets","status","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:search-entries",mcpTool:"datasets__search-entries",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"data",limit:"limit"}},snapshotHistory:{kon:"kon-datasets",id:"snapshot-history",operationId:"datasets.snapshot-history",method:"GET",path:"/datasets/{id}/entries/{entryId}/snapshots",pathParams:["id","entryId"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:snapshot-history",mcpTool:"datasets__snapshot-history",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},suggestIndexes:{kon:"kon-datasets",id:"suggest-indexes",operationId:"datasets.suggest-indexes",method:"GET",path:"/datasets/{id}/indexes/suggest",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:datasets:suggest-indexes",mcpTool:"datasets__suggest-indexes",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateCalculatedField:{kon:"kon-datasets",id:"update-calculated-field",operationId:"datasets.update-calculated-field",method:"PATCH",path:"/datasets/{id}/calculated-fields/{fieldId}",pathParams:["id","fieldId"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:datasets:update-calculated-field",mcpTool:"datasets__update-calculated-field",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateDataset:{kon:"kon-datasets",id:"update-dataset",operationId:"datasets.update-dataset",method:"PATCH",path:"/datasets/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:datasets:update-dataset",mcpTool:"datasets__update-dataset",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateEntry:{kon:"kon-datasets",id:"update-entry",operationId:"datasets.update-entry",method:"PATCH",path:"/datasets/{id}/entries/{entryId}",pathParams:["id","entryId"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:datasets:update-entry",mcpTool:"datasets__update-entry",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Lt={};m(Lt,{operations:()=>ve});var ve={approveMcpServerTool:{kon:"kon-external-mcp",id:"approve-mcp-server-tool",operationId:"external-mcp.approve-mcp-server-tool",method:"POST",path:"/admin/mcp-servers/{id}/tools/approve",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:external-mcp:approve-mcp-server-tool",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createMcpServer:{kon:"kon-external-mcp",id:"create-mcp-server",operationId:"external-mcp.create-mcp-server",method:"POST",path:"/admin/mcp-servers",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:external-mcp:create-mcp-server",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteMcpServer:{kon:"kon-external-mcp",id:"delete-mcp-server",operationId:"external-mcp.delete-mcp-server",method:"DELETE",path:"/admin/mcp-servers/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:external-mcp:delete-mcp-server",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},disconnectMcpServerOauth:{kon:"kon-external-mcp",id:"disconnect-mcp-server-oauth",operationId:"external-mcp.disconnect-mcp-server-oauth",method:"DELETE",path:"/admin/mcp-servers/{id}/oauth",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:external-mcp:disconnect-mcp-server-oauth",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listMcpServerTools:{kon:"kon-external-mcp",id:"list-mcp-server-tools",operationId:"external-mcp.list-mcp-server-tools",method:"GET",path:"/admin/mcp-servers/{id}/tools",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:external-mcp:list-mcp-server-tools",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listMcpServers:{kon:"kon-external-mcp",id:"list-mcp-servers",operationId:"external-mcp.list-mcp-servers",method:"GET",path:"/admin/mcp-servers",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:external-mcp:list-mcp-servers",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},refreshMcpServer:{kon:"kon-external-mcp",id:"refresh-mcp-server",operationId:"external-mcp.refresh-mcp-server",method:"POST",path:"/admin/mcp-servers/{id}/refresh",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:external-mcp:refresh-mcp-server",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},startMcpServerOauth:{kon:"kon-external-mcp",id:"start-mcp-server-oauth",operationId:"external-mcp.start-mcp-server-oauth",method:"POST",path:"/admin/mcp-servers/{id}/oauth/start",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:external-mcp:start-mcp-server-oauth",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateMcpServer:{kon:"kon-external-mcp",id:"update-mcp-server",operationId:"external-mcp.update-mcp-server",method:"PATCH",path:"/admin/mcp-servers/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:external-mcp:update-mcp-server",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Ct={};m(Ct,{operations:()=>xe});var xe={mcpServerOauthCallback:{kon:"kon-external-mcp-oauth",id:"mcp-server-oauth-callback",operationId:"external-mcp-oauth.mcp-server-oauth-callback",method:"GET",path:"/mcp-oauth/callback",pathParams:[],queryParams:["state","code","error"],body:null,responses:{302:"redirect"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:external-mcp-oauth:mcp-server-oauth-callback",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Bt={};m(Bt,{operations:()=>we});var we={clearImageCache:{kon:"kon-media",id:"clear-image-cache",operationId:"media.clear-image-cache",method:"DELETE",path:"/media/cache/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:media:clear-image-cache",mcpTool:"media__clear-image-cache",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createFolder:{kon:"kon-media",id:"create-folder",operationId:"media.create-folder",method:"POST",path:"/media/folders",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:media:create-folder",mcpTool:"media__create-folder",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteMedia:{kon:"kon-media",id:"delete-media",operationId:"media.delete-media",method:"DELETE",path:"/media/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:media:delete-media",mcpTool:"media__delete-media",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getMedia:{kon:"kon-media",id:"get-media",operationId:"media.get-media",method:"GET",path:"/media/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:media:get-media",mcpTool:"media__get-media",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},imageWithPreset:{kon:"kon-media",id:"image-with-preset",operationId:"media.image-with-preset",method:"GET",path:"/media/preset/{id}/{preset}",pathParams:["id","preset"],queryParams:[],body:null,responses:{200:"binary"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:media:image-with-preset",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listFolders:{kon:"kon-media",id:"list-folders",operationId:"media.list-folders",method:"GET",path:"/media/folders",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:media:list-folders",mcpTool:"media__list-folders",errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listMedia:{kon:"kon-media",id:"list-media",operationId:"media.list-media",method:"GET",path:"/media",pathParams:[],queryParams:["limit","offset","folderId","search","type"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:media:list-media",mcpTool:"media__list-media",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"docs",limit:"limit"}},readConfiguration:{kon:"kon-media",id:"read-configuration",operationId:"media.read-configuration",method:"GET",path:"/media/config",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:media:read-configuration",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},readFocalPoint:{kon:"kon-media",id:"read-focal-point",operationId:"media.read-focal-point",method:"GET",path:"/media/focal-point/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:media:read-focal-point",mcpTool:"media__read-focal-point",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},saveConfiguration:{kon:"kon-media",id:"save-configuration",operationId:"media.save-configuration",method:"POST",path:"/media/config",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:media:save-configuration",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},setFocalPoint:{kon:"kon-media",id:"set-focal-point",operationId:"media.set-focal-point",method:"POST",path:"/media/focal-point/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:media:set-focal-point",mcpTool:"media__set-focal-point",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},testStorage:{kon:"kon-media",id:"test-storage",operationId:"media.test-storage",method:"POST",path:"/media/config/test-storage",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:media:test-storage",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_BAD_GATEWAY","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},transformImage:{kon:"kon-media",id:"transform-image",operationId:"media.transform-image",method:"GET",path:"/media/transform/{id}",pathParams:["id"],queryParams:["w","width","h","height","fit","pos","position","f","format","q","quality","fp"],body:null,responses:{200:"binary"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:media:transform-image",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateMedia:{kon:"kon-media",id:"update-media",operationId:"media.update-media",method:"PATCH",path:"/media/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:media:update-media",mcpTool:"media__update-media",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},uploadMedia:{kon:"kon-media",id:"upload-media",operationId:"media.upload-media",method:"POST",path:"/media/upload",pathParams:[],queryParams:["folderId","thumbnails"],body:"multipart",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:media:upload-media",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_PAYLOAD_TOO_LARGE","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Mt={};m(Mt,{operations:()=>Le});var Le={listModels:{kon:"kon-models",id:"list-models",operationId:"models.list-models",method:"GET",path:"/models",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:models:list-models",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Ft={};m(Ft,{operations:()=>Ce});var Ce={decideConsent:{kon:"kon-oauth",id:"decide-consent",operationId:"oauth.decide-consent",method:"POST",path:"/oauth/consent/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:oauth:decide-consent",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listConnections:{kon:"kon-oauth",id:"list-connections",operationId:"oauth.list-connections",method:"GET",path:"/oauth/grants",pathParams:[],queryParams:["agentId","includeRevoked"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:oauth:list-connections",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},revokeConnection:{kon:"kon-oauth",id:"revoke-connection",operationId:"oauth.revoke-connection",method:"DELETE",path:"/oauth/grants/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:oauth:revoke-connection",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},viewConsent:{kon:"kon-oauth",id:"view-consent",operationId:"oauth.view-consent",method:"GET",path:"/oauth/consent/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:oauth:view-consent",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var jt={};m(jt,{operations:()=>Be});var Be={activateVersion:{kon:"kon-promotion",id:"activate-version",operationId:"promotion.activate-version",method:"POST",path:"/promotion/versions/{id}/activate",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!0,scope:"kon:promotion:activate-version",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listDrafts:{kon:"kon-promotion",id:"list-drafts",operationId:"promotion.list-drafts",method:"GET",path:"/promotion/drafts",pathParams:[],queryParams:["status","slug","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:promotion:list-drafts",mcpTool:"promotion_list",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"versions",limit:"limit"}},proposeDraft:{kon:"kon-promotion",id:"propose-draft",operationId:"promotion.propose-draft",method:"POST",path:"/promotion/drafts",pathParams:[],queryParams:[],body:"json",responses:{200:"json",201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:promotion:propose-draft",mcpTool:"promotion_propose",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},readDraft:{kon:"kon-promotion",id:"read-draft",operationId:"promotion.read-draft",method:"GET",path:"/promotion/drafts/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:promotion:read-draft",mcpTool:"promotion_status",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var qt={};m(qt,{operations:()=>Me});var Me={activateApproved:{kon:"kon-promotion-admin",id:"activate-approved",operationId:"promotion-admin.activate-approved",method:"POST",path:"/approvals/promotion/versions/{id}/activate",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:promotion-admin:activate-approved",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},approveVersion:{kon:"kon-promotion-admin",id:"approve-version",operationId:"promotion-admin.approve-version",method:"POST",path:"/approvals/promotion/versions/{id}/approve",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:promotion-admin:approve-version",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},promotionConfiguration:{kon:"kon-promotion-admin",id:"promotion-configuration",operationId:"promotion-admin.promotion-configuration",method:"GET",path:"/approvals/promotion/settings",pathParams:[],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:promotion-admin:promotion-configuration",mcpTool:null,errors:["KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},promotionMode:{kon:"kon-promotion-admin",id:"promotion-mode",operationId:"promotion-admin.promotion-mode",method:"PUT",path:"/approvals/promotion/agents/{id}/mode",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:promotion-admin:promotion-mode",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},rejectVersion:{kon:"kon-promotion-admin",id:"reject-version",operationId:"promotion-admin.reject-version",method:"POST",path:"/approvals/promotion/versions/{id}/reject",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:promotion-admin:reject-version",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},rollback:{kon:"kon-promotion-admin",id:"rollback",operationId:"promotion-admin.rollback",method:"POST",path:"/approvals/promotion/versions/{id}/rollback",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:promotion-admin:rollback",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_CONFLICT","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},savePromotionConfiguration:{kon:"kon-promotion-admin",id:"save-promotion-configuration",operationId:"promotion-admin.save-promotion-configuration",method:"PUT",path:"/approvals/promotion/settings",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:promotion-admin:save-promotion-configuration",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},version:{kon:"kon-promotion-admin",id:"version",operationId:"promotion-admin.version",method:"GET",path:"/approvals/promotion/versions/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:promotion-admin:version",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},versions:{kon:"kon-promotion-admin",id:"versions",operationId:"promotion-admin.versions",method:"GET",path:"/approvals/promotion/versions",pathParams:[],queryParams:["status","slug","limit","offset","agentId"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:promotion-admin:versions",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"versions",limit:"limit"}}};var Vt={};m(Vt,{operations:()=>Fe});var Fe={myProposals:{kon:"kon-proposals",id:"my-proposals",operationId:"proposals.my-proposals",method:"GET",path:"/proposals",pathParams:[],queryParams:["status","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:proposals:my-proposals",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:null,limit:"limit"}},proposalEvents:{kon:"kon-proposals",id:"proposal-events",operationId:"proposals.proposal-events",method:"GET",path:"/proposals/{id}/events",pathParams:["id"],queryParams:[],body:null,responses:{200:"event-stream"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:proposals:proposal-events",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],stream:!0},proposalStatus:{kon:"kon-proposals",id:"proposal-status",operationId:"proposals.proposal-status",method:"GET",path:"/proposals/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:proposals:proposal-status",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Ht={};m(Ht,{operations:()=>je});var je={discardJob:{kon:"kon-queue",id:"discard-job",operationId:"queue.discard-job",method:"DELETE",path:"/admin/queue/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!1,scope:"kon:queue:discard-job",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},queueStatus:{kon:"kon-queue",id:"queue-status",operationId:"queue.queue-status",method:"GET",path:"/admin/queue",pathParams:[],queryParams:["limit"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:queue:queue-status",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},retryJob:{kon:"kon-queue",id:"retry-job",operationId:"queue.retry-job",method:"POST",path:"/admin/queue/{id}/retry",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:queue:retry-job",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var Yt={};m(Yt,{operations:()=>qe});var qe={recordHistory:{kon:"kon-record-history",id:"record-history",operationId:"record-history.record-history",method:"GET",path:"/history/{collection}/{id}",pathParams:["collection","id"],queryParams:["limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:record-history:record-history",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"history",limit:"limit"}}};var Qt={};m(Qt,{operations:()=>Ve});var Ve={aggregate:{kon:"kon-reports",id:"aggregate",operationId:"reports.aggregate",method:"POST",path:"/reports/aggregate",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!0,sensitive:!1,scope:"kon:reports:aggregate",mcpTool:"reports_aggregate",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createDashboard:{kon:"kon-reports",id:"create-dashboard",operationId:"reports.create-dashboard",method:"POST",path:"/reports/dashboards",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:reports:create-dashboard",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},createReport:{kon:"kon-reports",id:"create-report",operationId:"reports.create-report",method:"POST",path:"/reports",pathParams:[],queryParams:[],body:"json",responses:{201:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:reports:create-report",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteDashboard:{kon:"kon-reports",id:"delete-dashboard",operationId:"reports.delete-dashboard",method:"DELETE",path:"/reports/dashboards/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:reports:delete-dashboard",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},deleteReport:{kon:"kon-reports",id:"delete-report",operationId:"reports.delete-report",method:"DELETE",path:"/reports/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!1,sensitive:!0,scope:"kon:reports:delete-report",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getDashboard:{kon:"kon-reports",id:"get-dashboard",operationId:"reports.get-dashboard",method:"GET",path:"/reports/dashboards/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:reports:get-dashboard",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},getReport:{kon:"kon-reports",id:"get-report",operationId:"reports.get-report",method:"GET",path:"/reports/{id}",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:reports:get-report",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},listDashboards:{kon:"kon-reports",id:"list-dashboards",operationId:"reports.list-dashboards",method:"GET",path:"/reports/dashboards",pathParams:[],queryParams:["limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:reports:list-dashboards",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"dashboards",limit:"limit"}},listReports:{kon:"kon-reports",id:"list-reports",operationId:"reports.list-reports",method:"GET",path:"/reports",pathParams:[],queryParams:["limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:reports:list-reports",mcpTool:"reports_list",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"reports",limit:"limit"}},runDashboard:{kon:"kon-reports",id:"run-dashboard",operationId:"reports.run-dashboard",method:"POST",path:"/reports/dashboards/{id}/run",pathParams:["id"],queryParams:[],body:null,responses:{200:"json"},idempotent:!1,readOnly:!0,sensitive:!1,scope:"kon:reports:run-dashboard",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},runReport:{kon:"kon-reports",id:"run-report",operationId:"reports.run-report",method:"POST",path:"/reports/run",pathParams:[],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!0,sensitive:!1,scope:"kon:reports:run-report",mcpTool:"reports_run",errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateDashboard:{kon:"kon-reports",id:"update-dashboard",operationId:"reports.update-dashboard",method:"PATCH",path:"/reports/dashboards/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:reports:update-dashboard",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]},updateReport:{kon:"kon-reports",id:"update-report",operationId:"reports.update-report",method:"PATCH",path:"/reports/{id}",pathParams:["id"],queryParams:[],body:"json",responses:{200:"json"},idempotent:!1,readOnly:!1,sensitive:!1,scope:"kon:reports:update-report",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var $t={};m($t,{operations:()=>He});var He={listSecretAccess:{kon:"kon-secret-access",id:"list-secret-access",operationId:"secret-access.list-secret-access",method:"GET",path:"/admin/secret-access",pathParams:[],queryParams:["kon","limit","offset"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:secret-access:list-secret-access",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"entries",limit:"limit"}}};var Gt={};m(Gt,{operations:()=>Ye});var Ye={listRequests:{kon:"kon-traces",id:"list-requests",operationId:"traces.list-requests",method:"GET",path:"/admin/requests",pathParams:[],queryParams:["hours","limit","offset","blocked","errors","actor"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:traces:list-requests",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"],pagination:{style:"offset",items:"requests",limit:"limit"}},requestsSummary:{kon:"kon-traces",id:"requests-summary",operationId:"traces.requests-summary",method:"GET",path:"/admin/requests/summary",pathParams:[],queryParams:["hours"],body:null,responses:{200:"json"},idempotent:!0,readOnly:!0,sensitive:!1,scope:"kon:traces:requests-summary",mcpTool:null,errors:["KITSUDEN_E_VALIDATION","KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_INTERNAL"]}};var _r="0.9.0-beta",mr=["KITSUDEN_E_BAD_REQUEST","KITSUDEN_E_VALIDATION","KITSUDEN_E_UNAUTHENTICATED","KITSUDEN_E_LEGACY_KEY_RETIRED","KITSUDEN_E_FORBIDDEN","KITSUDEN_E_NOT_FOUND","KITSUDEN_E_METHOD_NOT_ALLOWED","KITSUDEN_E_CONFLICT","KITSUDEN_E_PAYLOAD_TOO_LARGE","KITSUDEN_E_UNSUPPORTED_MEDIA_TYPE","KITSUDEN_E_RATE_LIMITED","KITSUDEN_E_QUOTA_EXCEEDED","KITSUDEN_E_APPROVAL_REQUIRED","KITSUDEN_E_APPROVAL_UNSUPPORTED","KITSUDEN_E_APPROVAL_STALE","KITSUDEN_E_DENIED_UNATTENDED","KITSUDEN_E_AGENT_SPONSOR_INVALID","KITSUDEN_E_IDEMPOTENCY_KEY_INVALID","KITSUDEN_E_IDEMPOTENCY_KEY_REUSED","KITSUDEN_E_IDEMPOTENCY_IN_PROGRESS","KITSUDEN_E_IDEMPOTENCY_NOT_REPLAYABLE","KITSUDEN_E_IDEMPOTENCY_UNAVAILABLE","KITSUDEN_E_INTERNAL","KITSUDEN_E_BAD_GATEWAY","KITSUDEN_E_UNAVAILABLE","KITSUDEN_E_DB_POOL_EXHAUSTED","KITSUDEN_E_TIMEOUT"],Qe={agentNotifications:Ue,agentToken:Se,agents:fe,analytics:Re,approvals:Ae,audit:he,automation:be,blocks:Oe,brain:ke,connections:Ke,datasets:Pe,externalMcp:ve,externalMcpOauth:xe,media:we,models:Le,oauth:Ce,promotion:Be,promotionAdmin:Me,proposals:Fe,queue:je,recordHistory:qe,reports:Ve,secretAccess:He,traces:Ye};var K=class extends Error{name="KitsudenApiError";status;code;problem;retryable;retryAfter;requestId;meta;constructor(e,t,r){super(`${e.code}: ${e.detail||e.title}${e.hint?` (${e.hint})`:""}`),this.status=t.status,this.code=e.code,this.problem=e,this.retryable=e.retryable===!0,this.retryAfter=r,this.requestId=t.requestId??(typeof e.requestId=="string"?e.requestId:null),this.meta=t}},v=class extends Error{name="KitsudenNetworkError";operation;attempts;timedOut;constructor(e,t){super(e,{cause:t.cause}),this.operation=t.operation,this.attempts=t.attempts,this.timedOut=t.timedOut}},Q=class extends Error{name="KitsudenDecodeError";meta;constructor(e,t,r){super(e,{cause:r}),this.meta=t}},x=class extends Error{name="ProposalPendingError";pending;constructor(e){super(`${e.problem.code}: proposal ${e.proposal.id} is waiting for human approval; nothing ran. Do not resend it; poll ${e.proposal.statusUrl}.`),this.pending=e}};function Un(n,...e){return n instanceof K&&(e.length===0||e.includes(n.code))}var Sn=["docs","data","items","rows","results","entries"],fn=["","pagination","meta","pageInfo"];function $e(n){return n&&typeof n=="object"&&!Array.isArray(n)?n:null}function Ge(n,e){if(Array.isArray(n))return n;let t=$e(n);if(!t)return[];if(e)return Array.isArray(t[e])?t[e]:[];for(let s of Sn)if(Array.isArray(t[s]))return t[s];let r=Object.values(t).filter(Array.isArray);return r.length===1?r[0]:[]}function $(n,e){let t=$e(n);if(t)for(let r of fn){let s=r?$e(t[r]):t;if(s){for(let o of e)if(s[o]!==void 0&&s[o]!==null)return s[o]}}}var F=n=>{let e=typeof n=="string"?Number(n):n;return typeof e=="number"&&Number.isFinite(e)?e:void 0};async function*Je(n,e,t={},r){let s=e.pagination;if(!s)throw new TypeError(`${e.operationId} is not a list operation`);let o={...t},a=F(o.page)??1,i=F(o.offset)??0;for(let p=0;p<1e5;p++){s.style==="page"&&(o.page=a),s.style==="offset"&&(o.offset=i);let l=await n(e,o,r);if(l.kind!=="ok")throw new x(l);yield l;let d=Ge(l.data,s.items);if(d.length===0)return;let T=$(l.data,["hasNextPage","hasMore","has_more","hasNext"]);if(T===!1)return;let y=F(s.limit?o[s.limit]:void 0)??F($(l.data,["limit","pageSize","perPage"])),E=T!==!0&&y!==void 0&&d.length<y;if(s.style==="cursor"){let u=$(l.data,["nextCursor","next_cursor","cursor"]);if(u==null||u===""||u===o.cursor)return;o.cursor=u;continue}if(E)return;if(s.style==="page"){let u=F($(l.data,["totalPages","pages","pageCount"]));if(u!==void 0&&a>=u)return;a++}else{i+=d.length;let u=F($(l.data,["totalDocs","total","totalCount","count"]));if(u!==void 0&&i>=u)return}}}async function*Jt(n,e,t={},r){for await(let s of Je(n,e,t,r))yield*Ge(s.data,e.pagination?.items)}var N=class extends SyntaxError{constructor(e){super(`TRON: ${e}`),this.name="TronDecodeError"}};var Wt={"(":7,")":8,"[":9,"]":10,"{":11,"}":12,",":13,":":14,";":15,"=":16},Rn={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
5
|
+
`,r:"\r",t:" "};function An(n){let e=[],t=0;for(;t<n.length;){let r=n[t];if(r===" "||r===" "||r==="\r")t++;else if(r===`
|
|
6
|
+
`)e.push({t:17,v:r,at:t++});else if(r==="#")for(;t<n.length&&n[t]!==`
|
|
7
|
+
`;)t++;else if(r in Wt)e.push({t:Wt[r],v:r,at:t++});else if(r==='"'){let s=t++,o="";for(;;){if(t>=n.length)throw new N(`unterminated string at ${s}`);let a=n[t];if(a==='"'){t++;break}if(a==="\\"){let i=n[t+1];if(i===void 0)throw new N(`unterminated string at ${s}`);if(i==="u"){let p=n.slice(t+2,t+6);if(!/^[0-9a-fA-F]{4}$/.test(p))throw new N(`bad \\u escape at ${t}`);o+=String.fromCharCode(parseInt(p,16)),t+=6}else o+=Rn[i]??i,t+=2}else o+=a,t++}e.push({t:2,v:o,at:s})}else if(r==="-"||r>="0"&&r<="9"){let s=t++;for(;t<n.length&&/[0-9.eE+-]/.test(n[t]);)t++;e.push({t:3,v:n.slice(s,t),at:s})}else if(/[A-Za-z_]/.test(r)){let s=t++;for(;t<n.length&&/[A-Za-z0-9_]/.test(n[t]);)t++;let o=n.slice(s,t),a=o==="class"?0:o==="true"?4:o==="false"?5:o==="null"?6:1;e.push({t:a,v:o,at:s})}else throw new N(`unexpected character '${r}' at ${t}`)}return e.push({t:18,v:"",at:n.length}),e}function ze(n){let e=An(n),t=0,r=new Map,s=E=>e[t].t===E,o=E=>s(E)?(t++,!0):!1,a=(E,u)=>{let _=e[t];if(_.t!==E)throw new N(`expected ${u} at ${_.at}, found '${_.v}'`);return t++,_},i=()=>{for(;o(15)||o(17););},p=()=>{for(;o(17););},l=()=>{let E=a(1,"class name").v,u=[];if(o(7)){let _=a(1,"parent class name"),g=r.get(_.v);if(!g)throw new N(`undefined parent class ${_.v}`);u=[...g],a(8,"')'")}for(a(14,"':'");!s(15)&&!s(0)&&!s(18);){if(o(17)){if(s(0)||s(18)||s(1)&&e[t+1]?.t===7||!s(1)&&!s(2))break;continue}if(!o(13))if(s(1)||s(2))u.push(e[t++].v);else break}r.set(E,u)},d=()=>{let E=e[t];switch(E.t){case 6:return t++,null;case 4:return t++,!0;case 5:return t++,!1;case 3:{t++;let u=Number(E.v);if(Number.isNaN(u))throw new N(`bad number '${E.v}' at ${E.at}`);return u}case 2:return t++,E.v;case 9:{t++;let u=[];for(;p(),!(s(10)||(u.push(d()),p(),!o(13))););return a(10,"']'"),u}case 11:{t++;let u={};for(;p(),!s(12);){let _=a(2,"quoted key").v;if(a(14,"':'"),We(u,_,d()),p(),!o(13))break}return a(12,"'}'"),u}case 1:return T();default:throw new N(`unexpected '${E.v}' at ${E.at}`)}},T=()=>{let E=e[t++],u=r.get(E.v);if(!u)throw new N(`undefined class ${E.v} at ${E.at}`);a(7,"'('");let _={},g=new Set,S=0,U=!1;for(;p(),!s(8);){if((s(1)||s(2))&&e[t+1]?.t===16){U=!0;let D=e[t];if(!u.includes(D.v))throw new N(`unknown property ${D.v} of ${E.v}`);if(g.has(D.v))throw new N(`property ${D.v} repeated`);t+=2,We(_,D.v,d()),g.add(D.v)}else{if(U)throw new N(`positional argument after a named one at ${e[t].at}`);if(S>=u.length)throw new N(`too many arguments for ${E.v}`);let D=u[S++];We(_,D,d()),g.add(D)}if(p(),!o(13))break}if(g.size<u.length)throw new N(`missing arguments for ${E.v}: ${u.filter(D=>!g.has(D)).join(", ")}`);return a(8,"')'"),_};for(i();o(0);)l(),i();if(s(18))throw new N("no data section");let y=d();if(i(),!s(18))throw new N(`unexpected '${e[t].v}' after the data at ${e[t].at}`);return y}function We(n,e,t){e==="__proto__"?Object.defineProperty(n,e,{value:t,enumerable:!0,writable:!0,configurable:!0}):n[e]=t}var Xe={json:"application/json",toon:"application/vnd.toon",tron:"application/vnd.tron",auto:"application/vnd.kitsuden.auto"},re={maxRetries:2,baseDelayMs:250,maxDelayMs:8e3,maxRetryAfterMs:6e4},hn=new Set([408,429,502,503,504]);function Xt(){let n=new Uint8Array(16),e=globalThis.crypto;if(e?.getRandomValues)e.getRandomValues(n);else for(let r=0;r<n.length;r++)n[r]=Math.floor(Math.random()*256);let t="";for(let r of n)t+=r.toString(16).padStart(2,"0");return`ksdk-${t}`}function Ze(n){return typeof n=="string"?n:JSON.stringify(n)}function tt(n,e,t){let r=e.path;for(let a of e.pathParams){let i=t[a];if(i==null||i==="")throw new TypeError(`${e.operationId}: missing path parameter '${a}'`);r=r.replace(`{${a}}`,encodeURIComponent(Ze(i)))}let s=new URLSearchParams;for(let a of e.queryParams){let i=t[a];i!=null&&s.set(a,Ze(i))}let o=s.toString();return`${n}/api${r==="/"?"":r}${o?`?${o}`:""}`}function bn(n){return Xe[n]}function Zt(n){if(!n)return null;let e={untrusted:0,authors:{},raw:n};for(let t of n.split(";")){let[r,s]=t.split("=").map(a=>a.trim());if(!r||s===void 0)continue;let o=Number(s);Number.isFinite(o)&&(r==="untrusted"?e.untrusted=o:e.authors[r]=o)}return e}function en(n,e=Date.now()){if(!n)return null;let t=n.trim();if(/^\d+(\.\d+)?$/.test(t))return Number(t);let r=Date.parse(t);return Number.isNaN(r)?null:Math.max(0,(r-e)/1e3)}function On(n,e){let t=e?.trim().toLowerCase();return t==="json"||t==="toon"||t==="tron"?t:n?n.includes(Xe.toon)?"toon":n.includes(Xe.tron)?"tron":n.includes("json")?"json":null:null}function nt(n,e,t,r){let s=n.headers.get("content-type");return{status:n.status,headers:n.headers,requestId:n.headers.get("x-request-id"),format:On(s,n.headers.get("x-kitsuden-format")),contentType:s,provenance:Zt(n.headers.get("x-kitsuden-provenance")),idempotencyKey:t,replayed:(n.headers.get("idempotent-replayed")??"").toLowerCase()==="true",attempts:r,operation:e}}function et(n,e){return e==="toon"?Y(n):e==="tron"?ze(n):n.length===0?null:JSON.parse(n)}function se(n,e,t){if(e&&typeof e=="object"&&typeof e.code=="string"){let s=e;return{...s,status:typeof s.status=="number"?s.status:n}}let r=e&&typeof e=="object"&&"error"in e?Ze(e.error):typeof e=="string"&&e?e.slice(0,500):t||`HTTP ${n}`;return{type:"about:blank",title:t||`HTTP ${n}`,status:n,detail:r,code:n>=500?"KITSUDEN_E_INTERNAL":n===404?"KITSUDEN_E_NOT_FOUND":"KITSUDEN_E_BAD_REQUEST",retryable:hn.has(n),retry_after:null,hint:"",docs:"",error:e}}function zt(n,e,t){let r=Math.min(e.maxDelayMs,e.baseDelayMs*2**n);return Math.round(t()*r)}function kn(n){try{return JSON.parse(n)}catch{return n}}async function rt(n,e){let{info:t,params:r}=e,s=e.options??{},o=s.retry===!1?{...n.retry,maxRetries:0}:{...n.retry,...s.retry??{}},a=s.format??n.format,i=tt(n.baseUrl,t,r),p=t.method!=="GET",l={accept:bn(a),...n.headers};n.token&&(l.authorization=`Bearer ${n.token}`),n.sessionCookie&&(l.cookie=n.sessionCookie),(s.provenance??n.provenance)&&(l["x-kitsuden-provenance"]="1");let d=s.untrustedWrap??n.untrustedWrap;d&&(l["x-kitsuden-untrusted-wrap"]=d);let T;e.body!==void 0&&t.body!==null&&(t.body==="multipart"?T=e.body:(l["content-type"]="application/json",T=JSON.stringify(e.body)));let y=null;p&&s.idempotencyKey!==!1&&(y=typeof s.idempotencyKey=="string"?s.idempotencyKey:n.newIdempotencyKey(),l["idempotency-key"]=y),Object.assign(l,s.headers??{});let E=!p||t.idempotent||t.readOnly||y!==null,u=Object.values(t.responses).includes("redirect"),_=s.timeoutMs??n.timeoutMs;for(let g=0;;g++){let S=g+1,U=new AbortController,D=!1,J=_>0?setTimeout(()=>(D=!0,U.abort()),_):void 0,A=()=>U.abort();s.signal?.addEventListener("abort",A,{once:!0});let c;try{c=await n.fetch(i,{method:t.method,headers:l,body:T,signal:U.signal,...n.credentials?{credentials:n.credentials}:{},...u?{redirect:"manual"}:{}})}catch(I){if(clearTimeout(J),s.signal?.removeEventListener("abort",A),s.signal?.aborted)throw I;if(E&&g<o.maxRetries){await n.sleep(zt(g,o,n.random));continue}throw new v(`${t.method} ${i}: ${D?`no response in ${_} ms`:I?.message??String(I)}`,{cause:I,operation:t,attempts:S,timedOut:D})}try{let I=nt(c,t,y,S),q=(I.contentType??"").toLowerCase();if(c.status===202&&(I.format!==null||q.includes("json"))){let L=await c.text(),h;try{h=et(L,q.includes("problem+json")?"json":I.format)}catch{h=L}let C=h;return C&&typeof C=="object"&&C.code==="KITSUDEN_E_APPROVAL_REQUIRED"?{kind:"proposal_pending",ok:!1,status:202,proposal:C.proposal,problem:C,meta:I}:{kind:"ok",ok:!0,status:202,data:h,meta:I}}if(c.status>=400||c.status>=300&&!u){let L=await c.text(),h=se(c.status,kn(L),c.statusText),ie=en(c.headers.get("retry-after"))??(typeof h.retry_after=="number"?h.retry_after:null);if(h.retryable===!0&&E&&g<o.maxRetries){let ct=ie!==null?ie*1e3:zt(g,o,n.random);if(ct<=o.maxRetryAfterMs){await n.sleep(ct);continue}}throw new K(h,I,ie)}let w=t.responses[String(c.status)];if(w==="redirect"||c.status>=300&&c.status<400||c.type==="opaqueredirect")return{kind:"ok",ok:!0,status:c.status,data:{status:c.status,location:c.headers.get("location")},meta:I};if(c.status===204||w==="empty")return{kind:"ok",ok:!0,status:c.status,data:null,meta:I};let an=I.format!==null||q.startsWith("text/")||q.includes("javascript");if(w==="binary"||!an&&w!=="json"&&w!=="text")return{kind:"ok",ok:!0,status:c.status,data:await c.arrayBuffer(),meta:I};let Et=await c.text();if(w==="text"||I.format===null&&!q.includes("json"))return{kind:"ok",ok:!0,status:c.status,data:Et,meta:I};let ut;try{ut=et(Et,I.format)}catch(L){throw new Q(`${t.operationId}: could not decode the ${I.format??"json"} body`,I,L)}return{kind:"ok",ok:!0,status:c.status,data:ut,meta:I}}finally{clearTimeout(J),s.signal?.removeEventListener("abort",A)}}}function Kn(n){let e=[],t;for(let r of n.split(/\r?\n/)){if(!r||r.startsWith(":"))continue;let s=r.indexOf(":"),o=s===-1?r:r.slice(0,s),a=s===-1?"":r.slice(s+1).replace(/^ /,"");o==="data"?e.push(a):o==="event"&&(t=a)}return e.length===0&&!t?null:{event:t,data:e.join(`
|
|
8
|
+
`)}}function st(n){try{return JSON.parse(n)}catch{return n}}async function*tn(n,e){let{info:t,params:r}=e,s=e.options??{},o=tt(n.baseUrl,t,r),a={...n.headers,accept:"text/event-stream"};n.token&&(a.authorization=`Bearer ${n.token}`),n.sessionCookie&&(a.cookie=n.sessionCookie);let i;e.body!==void 0&&t.body!==null&&(t.body==="multipart"?i=e.body:(a["content-type"]="application/json",i=JSON.stringify(e.body))),Object.assign(a,s.headers??{});let p=new AbortController,l=()=>p.abort();s.signal?.addEventListener("abort",l,{once:!0});let d;try{d=await n.fetch(o,{method:t.method,headers:a,body:i,signal:p.signal,...n.credentials?{credentials:n.credentials}:{}})}catch(S){throw s.signal?.removeEventListener("abort",l),s.signal?.aborted?S:new v(`${t.method} ${o}: ${S?.message??String(S)}`,{cause:S,operation:t,attempts:1,timedOut:!1})}let T=nt(d,t,null,1),y=(d.headers.get("content-type")??"").toLowerCase();if(d.status!==200||!y.includes("text/event-stream")||!d.body){s.signal?.removeEventListener("abort",l);let S=await d.text(),U=st(S),D=U&&typeof U=="object"&&"code"in U?U:se(d.status,U,d.statusText);throw new K(D,T,null)}let E=d.body.getReader(),u=new TextDecoder,_="",g=!1;try{for(;;){let{value:S,done:U}=await E.read();S&&(_+=u.decode(S,{stream:!0})),U&&(_+=u.decode());let D=_.split(/\r?\n\r?\n/);_=U?"":D.pop()??"";for(let J of D){let A=Kn(J);if(A){if(A.event==="end"){g=!0;return}if(A.event==="error"){g=!0;let c=st(A.data),I=c&&typeof c=="object"&&"code"in c?c:se(500,c,"Stream error");throw new K(I,T,null)}(!A.event||A.event==="message")&&(yield st(A.data))}}if(U){g=!0;return}}}finally{s.signal?.removeEventListener("abort",l),g||(p.abort(),await E.cancel().catch(()=>{}))}}function nn(n){let e=globalThis;try{let t=e.process?.env?.[n]??e.Deno?.env?.get?.(n);return t&&t.trim()?t.trim():void 0}catch{return}}function Pn(){let n=globalThis.location;return n?.origin&&n.origin!=="null"?n.origin:void 0}function rn(n){let e=n.trim(),t=e.length;for(;t>0&&e[t-1]==="/";)t--;let r=e.slice(0,t);return r.endsWith("/api")?r.slice(0,-4):r}function vn(n,e,t){if(e.stream){let s=((o,a)=>t(e,o??{},a));return s.info=e,Object.freeze(s)}let r=((s,o)=>n(e,s??{},o));return r.info=e,e.pagination&&(r.pages=(s,o)=>Je(n,e,s??{},o),r.iterate=(s,o)=>Jt(n,e,s??{},o)),Object.freeze(r)}var oe=class n{#e;#t;constructor(e={}){let t=e.baseUrl??nn("KITSUDEN_API_URL")??Pn();if(!t)throw new TypeError("Kitsuden: no API URL. Pass { baseUrl } or set KITSUDEN_API_URL (the origin, e.g. http://localhost:13000).");let r=e.token===null?void 0:e.token??nn("KITSUDEN_API_TOKEN");this.#t=e;let s=e.fetch??globalThis.fetch;if(!s)throw new TypeError("Kitsuden: no fetch in this runtime; pass { fetch }.");this.#e={baseUrl:rn(t),token:r,sessionCookie:e.sessionCookie,credentials:e.credentials,fetch:e.fetch?s:s.bind(globalThis),format:e.format??"json",provenance:e.provenance??!1,untrustedWrap:e.untrustedWrap,headers:{...e.headers??{}},timeoutMs:e.timeoutMs??3e4,retry:e.retry===!1?{...re,maxRetries:0}:{...re,...e.retry??{}},sleep:e.sleep??(i=>new Promise(p=>setTimeout(p,i))),random:e.random??Math.random,newIdempotencyKey:e.idempotencyKey??Xt};let o=(i,p,l)=>{let{body:d,...T}=p;return rt(this.#e,{info:i,params:T,body:d,options:l})},a=(i,p,l)=>{let{body:d,...T}=p;return tn(this.#e,{info:i,params:T,body:d,options:l})};for(let[i,p]of Object.entries(Qe)){let l={};for(let[d,T]of Object.entries(p))l[d]=vn(o,T,a);Object.defineProperty(this,i,{value:Object.freeze(l),enumerable:!0})}}get baseUrl(){return this.#e.baseUrl}get operations(){return Object.values(Qe).flatMap(e=>Object.values(e))}withOptions(e){return new n({...this.#t,baseUrl:this.#e.baseUrl,token:this.#e.token??null,...e})}request(e,t,r={}){let{query:s,body:o,bodyFormat:a,...i}=r,p=t.startsWith("/")?t:`/${t}`,l={kon:"",id:"",operationId:`${e} ${p}`,method:e,path:p,pathParams:[],queryParams:Object.keys(s??{}),body:o===void 0?null:a??"json",responses:{},idempotent:e==="GET"||e==="PUT"||e==="DELETE",readOnly:e==="GET",sensitive:!1,scope:null,mcpTool:null,errors:[]};return rt(this.#e,{info:l,params:{...s??{}},body:o,options:i})}};function xn(n={}){return new oe(n)}function wn(n){if(n.kind==="ok")return n.data;throw new x(n)}function Ln(n){return n.kind==="proposal_pending"}function Cn(n){let e=n?._provenance;return e&&typeof e=="object"?e:null}function sn(n){return n===null?"null":Array.isArray(n)?"array":typeof n=="number"?Number.isInteger(n)?"integer":"number":typeof n}function Bn(n,e){let t=sn(e);return t===n||n==="number"&&t==="integer"}function Mn(n,e){let t=n??{};for(let r=0;r<20&&typeof t.$ref=="string";r++){let s=t.$ref;if(!s.startsWith("#/"))return{};if(t=s.slice(2).split("/").reduce((o,a)=>o?.[a.replace(/~1/g,"/").replace(/~0/g,"~")],e),!t)return{}}return t}function j(n,e,t,r,s){let o=Mn(n,t),a=i=>s.push({message:i,path:[...r]});if("const"in o&&JSON.stringify(o.const)!==JSON.stringify(e))return void a(`must be ${JSON.stringify(o.const)}`);if(Array.isArray(o.enum)&&!o.enum.some(i=>JSON.stringify(i)===JSON.stringify(e)))return void a(`must be one of ${o.enum.map(i=>JSON.stringify(i)).join(", ")}`);for(let i of o.allOf??[])j(i,e,t,r,s);for(let i of["anyOf","oneOf"]){let p=o[i];if(!p?.length)continue;let l=p.filter(d=>{let T=[];return j(d,e,t,r,T),T.length===0}).length;if(i==="anyOf"?l===0:l!==1)return void a(`does not match ${i==="anyOf"?"any":"exactly one"} of the allowed shapes`)}if(o.type!==void 0){let i=Array.isArray(o.type)?o.type:[o.type];if(o.nullable===!0&&i.push("null"),!i.some(p=>Bn(p,e)))return void a(`must be ${i.join(" or ")}`)}if(typeof e=="string"&&(typeof o.minLength=="number"&&e.length<o.minLength&&a(`must have at least ${o.minLength} characters`),typeof o.maxLength=="number"&&e.length>o.maxLength&&a(`must have at most ${o.maxLength} characters`),typeof o.pattern=="string"))try{new RegExp(o.pattern,"u").test(e)||a(`must match ${o.pattern}`)}catch{}if(typeof e=="number"&&(typeof o.minimum=="number"&&e<o.minimum&&a(`must be >= ${o.minimum}`),typeof o.maximum=="number"&&e>o.maximum&&a(`must be <= ${o.maximum}`),typeof o.exclusiveMinimum=="number"&&e<=o.exclusiveMinimum&&a(`must be > ${o.exclusiveMinimum}`),typeof o.exclusiveMaximum=="number"&&e>=o.exclusiveMaximum&&a(`must be < ${o.exclusiveMaximum}`)),Array.isArray(e)&&(typeof o.minItems=="number"&&e.length<o.minItems&&a(`must have at least ${o.minItems} items`),typeof o.maxItems=="number"&&e.length>o.maxItems&&a(`must have at most ${o.maxItems} items`),o.items&&typeof o.items=="object"&&e.forEach((i,p)=>j(o.items,i,t,[...r,p],s))),sn(e)==="object"){let i=e,p=o.properties??{};for(let l of o.required??[])i[l]===void 0&&s.push({message:"is required",path:[...r,l]});for(let[l,d]of Object.entries(i))d!==void 0&&(l in p?j(p[l],d,t,[...r,l],s):o.additionalProperties===!1?s.push({message:"is not allowed",path:[...r,l]}):o.additionalProperties&&typeof o.additionalProperties=="object"&&j(o.additionalProperties,d,t,[...r,l],s))}}function ot(n,e=n){return{"~standard":{version:1,vendor:"kitsuden",validate(t){let r=[];return j(n,t,e??{},[],r),r.length?{issues:r}:{value:t}}}}}function Fn(n,e){let t=n?.paths??{};for(let r of Object.values(t))for(let s of Object.values(r)){if(s?.operationId!==e)continue;let o=s.requestBody?.content?.["application/json"]?.schema,a=s.responses??{},i=Object.keys(a).sort().find(d=>/^2\d\d$/.test(d)),p=i?a[i]?.content??{}:{},l=p["application/json"]?.schema??p["text/event-stream"]?.["x-kitsuden-event-schema"];return{body:o?ot(o,n):null,response:l?ot(l,n):null}}throw new TypeError(`operationSchemas: no operation '${e}' in this document`)}var on="application/vnd.toon",jn='application/vnd.kitsuden.auto; formats="json,toon"',at=class{baseUrl;apiKey;format;constructor(e){this.baseUrl=e.url.replace(/\/$/,""),this.apiKey=e.apiKey,this.format=e.format||"json"}async request(e,t,r,s){let o=s||this.format,a=`${this.baseUrl}/api${t}`;if(o==="toon"){let d=a.includes("?")?"&":"?";a+=`${d}format=toon`}let i={"Content-Type":"application/json"};o==="toon"?i.Accept=on:o==="auto"&&(i.Accept=jn),this.apiKey&&(i.Authorization=`Bearer ${this.apiKey}`);let p=await fetch(a,{method:e,headers:i,body:r?JSON.stringify(r):void 0});if(!p.ok){let d=await p.json().catch(()=>({error:p.statusText}));throw new ae(d.error||d.message||`Request failed: ${p.status}`,p.status)}if(p.status===204)return;if((p.headers.get("content-type")||"").includes(on)){let d=await p.text();return Y(d)}return p.json()}get(e,t){return this.request("GET",e,void 0,t)}post(e,t){return this.request("POST",e,t,"json")}patch(e,t){return this.request("PATCH",e,t,"json")}del(e){return this.request("DELETE",e,void 0,"json")}},ae=class extends Error{constructor(t,r){super(t);this.statusCode=r;this.name="KitsudenError"}statusCode},it=class{constructor(e,t){this.tableName=e;this.client=t}tableName;client;async list(e={}){let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.page&&t.set("page",String(e.page)),e.sort&&t.set("sort",e.sort),e.dir&&t.set("dir",e.dir),e.search&&t.set("search",e.search),e.search_fields?.length&&t.set("search_fields",e.search_fields.join(","));for(let[s,o]of Object.entries(e.filters??{}))if(o!==null&&typeof o=="object")for(let[a,i]of Object.entries(o))i!==void 0&&t.append(`filter[${s}][${a}]`,String(i));else o!==void 0&&t.append(`filter[${s}]`,String(o));e.filter_field&&t.set("filter_field",e.filter_field),e.filter_op&&t.set("filter_op",e.filter_op),e.filter_value&&t.set("filter_value",e.filter_value);let r=t.toString();return this.client.get(`/explorer/${this.tableName}${r?`?${r}`:""}`)}async get(e){let r=(await this.list({filters:{id:e},limit:1})).data?.[0];if(!r)throw new ae("Record not found",404);return r}async create(e){return this.client.post(`/explorer/${this.tableName}`,e)}async update(e,t){return this.client.patch(`/explorer/${this.tableName}/${e}`,t)}async delete(e){await this.client.del(`/explorer/${this.tableName}/${e}`)}async history(e,t={}){let r=new URLSearchParams;t.limit&&r.set("limit",String(t.limit)),t.offset&&r.set("offset",String(t.offset));let s=r.toString();return this.client.get(`/history/${this.tableName}/${encodeURIComponent(e)}${s?`?${s}`:""}`)}async options(){return(await this.client.get(`/explorer/${this.tableName}/options`)).options}},pt=class{constructor(e,t){this.collectionName=e;this.client=t}collectionName;client;async get(e={}){let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.page&&t.set("page",String(e.page)),e.status&&t.set("status",e.status),e.sort&&t.set("sort",e.sort);let r=t.toString();return this.client.get(`/datasets/${this.collectionName}/entries${r?`?${r}`:""}`)}async insert(e){return this.client.post(`/datasets/slug/${this.collectionName}/entries`,e)}},lt=class{constructor(e){this.client=e}client;async list(){return(await this.client.get("/modules")).docs}async toggle(e){return this.client.post(`/modules/${e}/toggle`,{})}async enabled(){return(await this.list()).filter(t=>t.enabled)}},G=class{httpClient;modules;graph;constructor(e){this.httpClient=new at(e),this.modules=new lt(this.httpClient),this.graph=new dt(this.httpClient)}from(e){return new it(e,this.httpClient)}async schema(e){return this.httpClient.get(`/explorer/schema/kons/${e}`)}async tables(){return(await this.httpClient.get("/explorer/tables")).tables}collection(e){return new pt(e,this.httpClient)}async ping(){try{return await this.httpClient.get("/health"),!0}catch{return!1}}},dt=class{constructor(e){this.client=e}client;query(e={}){let t=new URLSearchParams;e.limit&&t.set("limit",String(e.limit)),e.offset&&t.set("offset",String(e.offset)),e.orderBy&&t.set("orderBy",e.orderBy),e.order&&t.set("order",e.order);for(let[s,o]of Object.entries(e.filters??{}))t.set(s,o);let r=t.toString();return r?`?${r}`:""}async info(){return this.client.get("/graph")}async list(e,t={}){return this.client.get(`/graph/${e}${this.query(t)}`)}async get(e,t){return this.client.get(`/graph/${e}/${t}`)}async related(e,t,r,s={}){return this.client.get(`/graph/${e}/${t}/${r}${this.query(s)}`)}};function Cr(n,e,t="json"){return new G({url:n,apiKey:e,format:t})}var Br=G,Mr=G;export{_r as API_VERSION,Rt as AgentNotifications,At as AgentToken,ht as Agents,bt as Analytics,Ot as Approvals,kt as Audit,Kt as Automation,Pt as Blocks,vt as Brain,pt as CollectionRef,xt as Connections,re as DEFAULT_RETRY,wt as Datasets,mr as ERROR_CODES,Lt as ExternalMcp,Ct as ExternalMcpOauth,dt as GraphAPI,Qe as KONS,Br as Kitsuden,oe as KitsudenApi,K as KitsudenApiError,G as KitsudenClient,Q as KitsudenDecodeError,ae as KitsudenError,v as KitsudenNetworkError,Bt as Media,Mt as Models,Ft as Oauth,jt as Promotion,qt as PromotionAdmin,x as ProposalPendingError,Vt as Proposals,Ht as Queue,Yt as RecordHistory,Qt as Reports,$t as SecretAccess,it as TableRef,M as ToonDecodeError,Gt as Traces,N as TronDecodeError,Cr as createClient,xn as createKitsuden,et as decodeBody,Y as decodeToon,ze as decodeTron,Mr as default,gn as encodeToon,wn as expectOk,Un as isKitsudenError,Ln as isProposalPending,Ge as itemsOf,rn as normalizeBaseUrl,Fn as operationSchemas,Zt as parseProvenance,en as parseRetryAfter,Cn as provenanceOf,ot as toStandardSchema};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|