@oscharko-dev/keiko 0.2.13 → 0.2.14

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.
Files changed (150) hide show
  1. package/dist/ui/csp-hashes.json +11 -11
  2. package/dist/ui/static/404.html +1 -1
  3. package/dist/ui/static/__next.__PAGE__.txt +2 -2
  4. package/dist/ui/static/__next._full.txt +2 -2
  5. package/dist/ui/static/__next._head.txt +1 -1
  6. package/dist/ui/static/__next._index.txt +1 -1
  7. package/dist/ui/static/__next._tree.txt +1 -1
  8. package/dist/ui/static/_next/static/chunks/{1a_fruu6pucj3.js → 00z66zbbbra-j.js} +3 -3
  9. package/dist/ui/static/_next/static/chunks/{43qhz7noctvzl.js → 1r5hnsrgkrath.js} +1 -1
  10. package/dist/ui/static/_next/static/chunks/{1fi98c2i0d9nw.js → 3324vgiq57xc4.js} +1 -1
  11. package/dist/ui/static/_next/static/chunks/3e9ez0whrt_3e.js +1 -0
  12. package/dist/ui/static/_next/static/chunks/3m-1c900pj68k.css +1 -0
  13. package/dist/ui/static/_next/static/chunks/3uf9j0-nj02sh.js +1 -0
  14. package/dist/ui/static/_not-found/__next._full.txt +1 -1
  15. package/dist/ui/static/_not-found/__next._head.txt +1 -1
  16. package/dist/ui/static/_not-found/__next._index.txt +1 -1
  17. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
  18. package/dist/ui/static/_not-found/__next._not-found.txt +1 -1
  19. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  20. package/dist/ui/static/_not-found.html +1 -1
  21. package/dist/ui/static/_not-found.txt +1 -1
  22. package/dist/ui/static/index.html +1 -1
  23. package/dist/ui/static/index.txt +2 -2
  24. package/dist/ui/static/launch/__next._full.txt +2 -2
  25. package/dist/ui/static/launch/__next._head.txt +1 -1
  26. package/dist/ui/static/launch/__next._index.txt +1 -1
  27. package/dist/ui/static/launch/__next._tree.txt +1 -1
  28. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +2 -2
  29. package/dist/ui/static/launch/__next.launch.txt +1 -1
  30. package/dist/ui/static/launch.html +1 -1
  31. package/dist/ui/static/launch.txt +2 -2
  32. package/dist/ui/static/local-knowledge/__next._full.txt +2 -2
  33. package/dist/ui/static/local-knowledge/__next._head.txt +1 -1
  34. package/dist/ui/static/local-knowledge/__next._index.txt +1 -1
  35. package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
  36. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +2 -2
  37. package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +1 -1
  38. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +1 -1
  39. package/dist/ui/static/local-knowledge/capsule/__next._head.txt +1 -1
  40. package/dist/ui/static/local-knowledge/capsule/__next._index.txt +1 -1
  41. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  42. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +1 -1
  43. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +1 -1
  44. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +1 -1
  45. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  46. package/dist/ui/static/local-knowledge/capsule.txt +1 -1
  47. package/dist/ui/static/local-knowledge.html +1 -1
  48. package/dist/ui/static/local-knowledge.txt +2 -2
  49. package/dist/ui/static/memoriaviva/__next._full.txt +1 -1
  50. package/dist/ui/static/memoriaviva/__next._head.txt +1 -1
  51. package/dist/ui/static/memoriaviva/__next._index.txt +1 -1
  52. package/dist/ui/static/memoriaviva/__next._tree.txt +1 -1
  53. package/dist/ui/static/memoriaviva/__next.memoriaviva.__PAGE__.txt +1 -1
  54. package/dist/ui/static/memoriaviva/__next.memoriaviva.txt +1 -1
  55. package/dist/ui/static/memoriaviva/consolidation/__next._full.txt +1 -1
  56. package/dist/ui/static/memoriaviva/consolidation/__next._head.txt +1 -1
  57. package/dist/ui/static/memoriaviva/consolidation/__next._index.txt +1 -1
  58. package/dist/ui/static/memoriaviva/consolidation/__next._tree.txt +1 -1
  59. package/dist/ui/static/memoriaviva/consolidation/__next.memoriaviva.consolidation.__PAGE__.txt +1 -1
  60. package/dist/ui/static/memoriaviva/consolidation/__next.memoriaviva.consolidation.txt +1 -1
  61. package/dist/ui/static/memoriaviva/consolidation/__next.memoriaviva.txt +1 -1
  62. package/dist/ui/static/memoriaviva/consolidation.html +1 -1
  63. package/dist/ui/static/memoriaviva/consolidation.txt +1 -1
  64. package/dist/ui/static/memoriaviva/detail/__next._full.txt +1 -1
  65. package/dist/ui/static/memoriaviva/detail/__next._head.txt +1 -1
  66. package/dist/ui/static/memoriaviva/detail/__next._index.txt +1 -1
  67. package/dist/ui/static/memoriaviva/detail/__next._tree.txt +1 -1
  68. package/dist/ui/static/memoriaviva/detail/__next.memoriaviva.detail.__PAGE__.txt +1 -1
  69. package/dist/ui/static/memoriaviva/detail/__next.memoriaviva.detail.txt +1 -1
  70. package/dist/ui/static/memoriaviva/detail/__next.memoriaviva.txt +1 -1
  71. package/dist/ui/static/memoriaviva/detail.html +1 -1
  72. package/dist/ui/static/memoriaviva/detail.txt +1 -1
  73. package/dist/ui/static/memoriaviva/review-queue/__next._full.txt +1 -1
  74. package/dist/ui/static/memoriaviva/review-queue/__next._head.txt +1 -1
  75. package/dist/ui/static/memoriaviva/review-queue/__next._index.txt +1 -1
  76. package/dist/ui/static/memoriaviva/review-queue/__next._tree.txt +1 -1
  77. package/dist/ui/static/memoriaviva/review-queue/__next.memoriaviva.review-queue.__PAGE__.txt +1 -1
  78. package/dist/ui/static/memoriaviva/review-queue/__next.memoriaviva.review-queue.txt +1 -1
  79. package/dist/ui/static/memoriaviva/review-queue/__next.memoriaviva.txt +1 -1
  80. package/dist/ui/static/memoriaviva/review-queue.html +1 -1
  81. package/dist/ui/static/memoriaviva/review-queue.txt +1 -1
  82. package/dist/ui/static/memoriaviva.html +1 -1
  83. package/dist/ui/static/memoriaviva.txt +1 -1
  84. package/node_modules/@oscharko-dev/keiko-cli/package.json +14 -14
  85. package/node_modules/@oscharko-dev/keiko-contracts/dist/documentation-browser.d.ts +83 -0
  86. package/node_modules/@oscharko-dev/keiko-contracts/dist/documentation-browser.d.ts.map +1 -0
  87. package/node_modules/@oscharko-dev/keiko-contracts/dist/documentation-browser.js +307 -0
  88. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +4 -2
  89. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  90. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +3 -2
  91. package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-embedding-profiles.d.ts.map +1 -1
  92. package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-embedding-profiles.js +7 -0
  93. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  94. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  95. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  96. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  97. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  98. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  99. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  100. package/node_modules/@oscharko-dev/keiko-harness/package.json +6 -6
  101. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts.map +1 -1
  102. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.js +10 -3
  103. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  104. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  105. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  106. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  107. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  108. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  109. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  110. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  111. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  112. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  113. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  114. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  115. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  116. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  117. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  118. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  119. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  120. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  121. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  122. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  123. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +3 -3
  124. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  125. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  126. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  127. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  128. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  129. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  130. package/node_modules/@oscharko-dev/keiko-server/dist/docs-browser.d.ts +4 -0
  131. package/node_modules/@oscharko-dev/keiko-server/dist/docs-browser.d.ts.map +1 -0
  132. package/node_modules/@oscharko-dev/keiko-server/dist/docs-browser.js +137 -0
  133. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-retrieval-eval.js +4 -4
  134. package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
  135. package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +3 -0
  136. package/node_modules/@oscharko-dev/keiko-server/package.json +19 -19
  137. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  138. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  139. package/node_modules/@oscharko-dev/keiko-tools/package.json +5 -5
  140. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  141. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  142. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  143. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  144. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  145. package/package.json +22 -22
  146. package/release-impact.catalog.json +47 -0
  147. package/dist/ui/static/_next/static/chunks/10_smqoa8jvj7.js +0 -1
  148. /package/dist/ui/static/_next/static/{r0VdLXKyCNsr8xWF_pD0_ → jl8jH3yyn14ivcsupg7WV}/_buildManifest.js +0 -0
  149. /package/dist/ui/static/_next/static/{r0VdLXKyCNsr8xWF_pD0_ → jl8jH3yyn14ivcsupg7WV}/_clientMiddlewareManifest.js +0 -0
  150. /package/dist/ui/static/_next/static/{r0VdLXKyCNsr8xWF_pD0_ → jl8jH3yyn14ivcsupg7WV}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20414,e=>{"use strict";let t=["DIRTY","VERSION_MISMATCH","CONTENT_HASH_MISMATCH","NO_ACTIVE_SESSION","NO_ACTIVE_BRIDGE","INVALID_EDITS","OUT_OF_SCOPE","PRECONDITION_REQUIRED"],n=["TIMED_OUT","QUEUE_FULL"],i=["openFile","focusTab","moveTab","splitPane","setSelection","format","save","applyTextEdits","applyPatch"];function r(e){return"object"==typeof e&&null!==e&&!Array.isArray(e);}function l(e){return"string"==typeof e;}function o(e){return"string"==typeof e&&e.length>0;}function a(e){return Array.isArray(e)&&e.every(e=>"string"==typeof e);}function u(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0;}function c(e){return"string"==typeof e&&/^[a-f0-9]{64}$/u.test(e);}function s(e,t){return null===e||t(e);}function d(e,t){return void 0===e||t(e);}function f(e){return r(e)&&u(e.sizeBytes)&&u(e.modifiedAt)&&c(e.contentHash);}function p(e){return r(e)&&u(e.line)&&u(e.character);}function h(e){return r(e)&&p(e.start)&&p(e.end);}function g(e){return r(e)&&u(e.errors)&&u(e.warnings)&&u(e.infos);}function y(e){return r(e)&&o(e.paneId)&&(null===e.activeFile||"string"==typeof e.activeFile)&&a(e.openFiles);}function m(e){return"row"===e||"column"===e;}function v(e){return r(e)&&h(e.range)&&"string"==typeof e.newText;}function w(e){return Array.isArray(e)&&e.every(v);}e.s(["EDITOR_AGENT_SCHEMA_VERSION",0,"1","isContainedAgentPath",0,function(e){return!(0===e.length||e.startsWith("/")||/^[A-Za-z]:/u.test(e)||e.includes("\0"))&&!e.split(/[/\\]/u).includes("..");},"isEditorAgentEvent",0,function(e){if(!r(e)||"1"!==e.schemaVersion||!o(e.eventId))return!1;switch(e.type){case"session":var v,b,I,x,S,k,P,F,C=e.snapshot;if(!r(C))return!1;return["1"===C.schemaVersion,o(C.sessionId),o(C.windowId),o(C.workspaceRoot),s(C.activePaneId,l),Array.isArray(P=C.panes)&&P.every(y),a(C.dirtyFiles),s(C.activeFile,l),s(C.cursor,p),s(C.selection,h),s(C.diagnosticsSummary,g),d(C.languageCapability,e=>null===e||r(e)&&o(e.languageId)&&(null===e.providerId||l(e.providerId))&&"boolean"==typeof e.available&&d(e.unavailableReason,l)),d(C.documentVersion,f),d(C.activeFileContentHash,c),"none"===(F=C.textMode)||"selection"===F||"activeFile"===F,d(C.text,l),d(C.textTruncated,e=>"boolean"==typeof e),u(C.updatedAt)].every(Boolean);case"action":var M,R,A=e.action;if(!r(A))return!1;return["1"===A.schemaVersion,o(A.actionId),o(A.idempotencyKey),o(A.sessionId),"string"==typeof(M=A.type)&&i.includes(M),void 0===(R=A.target)||!!r(R)&&[d(R.paneId,l),d(R.file,l),d(R.toPaneId,l),d(R.splitDirection,m),d(R.selection,h)].every(Boolean),d(A.expectedDocumentVersion,f),d(A.expectedContentHash,c),d(A.textEdits,w),d(A.patch,l)].every(Boolean);case"result":return r(I=e.result)&&"1"===I.schemaVersion&&o(I.actionId)&&o(I.sessionId)&&("queued"===(x=I.status)||"succeeded"===x||"failed"===x||"conflict"===x)&&(void 0===I.message||"string"==typeof I.message)&&(void 0===(S=I.conflict)||r(S)&&"string"==typeof(v=S.code)&&t.includes(v)&&"string"==typeof S.message)&&(void 0===(k=I.failure)||r(k)&&"string"==typeof(b=k.code)&&n.includes(b)&&"string"==typeof k.message);case"heartbeat":return u(e.updatedAt);default:return!1;}}]);},63312,70478,e=>{"use strict";function t(e){return"object"==typeof e&&null!==e&&!Array.isArray(e);}function n(e,t,n){return Math.min(n,Math.max(t,e));}function i(e){return n(Math.round(e),15,85);}function r(e){if(!Array.isArray(e))return[];let t=[];for(let n of e)"string"==typeof n&&n.length>0&&!t.includes(n)&&t.push(n);return t;}function l(e,t,n){let i=[],r=e=>{e.length>0&&!i.includes(e)&&i.push(e);};for(let e of null!=n?n:[])r(e);for(let e of t)r(e);return r(e),i;}function o(e,t,n){var i;let r=l(t,n);return{id:e,openFiles:r,activeFile:t.length>0?t:null!=(i=r[0])?i:"",tabOrder:r};}function a(e,n){if(!t(e))return null;let i="string"==typeof e.id&&e.id.length>0?e.id:n,a="string"==typeof e.activeFile?e.activeFile:"string"==typeof e.file?e.file:"",u=o(i,a,l(a,r(e.openFiles),r(e.tabOrder)));return u.openFiles.length>0||u.activeFile.length>0?u:null;}function u(e){return"column"===e?"column":"row";}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return"pane"===e.type?t.push(e.paneId):(c(e.first,t),c(e.second,t)),t;}function s(e,t){return"number"==typeof e.sidebarWidth&&Number.isFinite(e.sidebarWidth)?n(e.sidebarWidth,t.minSidebarWidth,t.maxSidebarWidth):t.defaultSidebarWidth;}function d(e,t,n){return"string"==typeof e.activePaneId&&void 0!==t[e.activePaneId]?e.activePaneId:n;}function f(e){return c(e.tree);}function p(e){return f(e).map(t=>e.panes[t]).filter(e=>void 0!==e);}function h(e,t,n){let i=e.panes[t];return void 0===i?e:{...e,panes:{...e.panes,[t]:n(i)}};}function g(e,t){return e.filter(e=>e!==t);}function y(e,t,i){let r=g(e,t),l=void 0===i?r.length:n(i,0,r.length);return[...r.slice(0,l),t,...r.slice(l)];}function m(e,t,n){var i;let r=l(n,t);return{...e,openFiles:r,tabOrder:r,activeFile:n.length>0?n:null!=(i=r[0])?i:""};}function v(e,t,n,i,r){let l=e.panes[t];if(void 0===l)return e;let a=null!=i?i:l.activeFile;if(0===a.length)return e;let u=function(e){let t=Object.keys(e.panes).length+1;for(;void 0!==e.panes[`pane-${String(t)}`];)t+=1;return`pane-${String(t)}`;}(e),c=o(u,a,[a]),s={type:"split",id:function(e){let t=new Set(),n=e=>{"split"===e.type&&(t.add(e.id),n(e.first),n(e.second));};n(e);let i=t.size+1;for(;t.has(`split-${String(i)}`);)i+=1;return`split-${String(i)}`;}(e.tree),direction:n,ratio:50,first:{type:"pane",paneId:r?u:t},second:{type:"pane",paneId:r?t:u}};return{...e,activePaneId:u,tree:function e(t,n,i){return"pane"===t.type?t.paneId===n?i:t:{...t,first:e(t.first,n,i),second:e(t.second,n,i)};}(e.tree,t,s),panes:{...e.panes,[u]:c}};}function w(e,t){var n;if(void 0===e.panes[t]||f(e).length<=1)return e;let i=function e(t,n){if("pane"===t.type)return t.paneId===n?null:t;let i=e(t.first,n),r=e(t.second,n);return null===i?r:null===r?i:{...t,first:i,second:r};}(e.tree,t);if(null===i)return e;let r={};for(let[n,i]of Object.entries(e.panes))n!==t&&(r[n]=i);let l=e.activePaneId===t&&null!=(n=c(i)[0])?n:e.activePaneId;return{...e,tree:i,panes:r,activePaneId:l};}function b(e,t,n){var i,r,l;let o=e.panes[t];if(!(null==o?void 0:o.openFiles.includes(n)))return e;let a=o.tabOrder.indexOf(n),u=g(o.openFiles,n);if(0===u.length)return f(e).length>1?w(e,t):h(e,t,e=>m(e,[],""));let c=o.activeFile===n?null!=(i=null!=(r=null!=(l=u[a])?l:u[a-1])?r:u[0])?i:"":o.activeFile;return h(e,t,e=>m(e,u,c));}function I(e,t,n,i,r){if(t===n)return h(e,n,e=>m(e,y(e.tabOrder,i,r),i));let l=e.panes[t],o=e.panes[n];if(void 0===l||void 0===o||!l.openFiles.includes(i))return e;let a=b(e,t,i);return void 0===a.panes[n]?a:{...(a=h(a,n,e=>m(e,y(e.tabOrder,i,r),i))),activePaneId:n};}function x(e){let t=[];for(let n of e)n.length>0&&!t.includes(n)&&t.push(n);return t;}let S=new Set(["open-file","select-file","close-tab","reorder-tab"]),k=new Set(["close-pane","move-tab","drop-tab","split-pane"]);e.s(["activeEditorPane",0,function(e){var t,n;return null!=(t=null!=(n=e.panes[e.activePaneId])?n:p(e)[0])?t:o("pane-1","",[]);},"createEditorLayoutStateV2",0,function(e){var n;let r=function(e){if(void 0!==e.layoutJson&&e.layoutJson.trim().length>0)try{let r=JSON.parse(e.layoutJson);if(t(r)){var n;let l=null!=(n=r.schemaVersion)?n:r.version,o=2===l||"2"===l?function(e,n,r){var l,o;let f=function(e){if(!t(e))return{};let n={};for(let[t,i]of Object.entries(e)){let e=a(i,t);null!==e&&(n[e.id]=e);}return n;}(n.panes),p=Object.keys(f)[0];if(void 0===p)return null;let h=null!=(l=function e(n,r){var l;return t(n)?null!==(l="pane"===n.type&&"string"==typeof n.paneId&&void 0!==r[n.paneId]?{type:"pane",paneId:n.paneId}:null)&&void 0!==l?l:function(t,n){if("split"!==t.type)return null;let r=e(t.first,n),l=e(t.second,n);if(null===r||null===l)return null;let o="string"==typeof t.id&&t.id.length>0?t.id:"split-1",a="number"==typeof t.ratio&&Number.isFinite(t.ratio)?t.ratio:50;return{type:"split",id:o,direction:u(t.direction),ratio:i(a),first:r,second:l};}(n,r):null;}(n.tree,f))?l:{type:"pane",paneId:p},g=function(e,t){let n={};for(let i of new Set(c(e))){let e=t[i];void 0!==e&&(n[i]=e);}return n;}(h,f);return{schemaVersion:2,root:e,activePaneId:d(n,g,null!=(o=c(h)[0])?o:p),tree:h,panes:g,sidebarWidth:s(n,r),sidebarCollapsed:!0===n.sidebarCollapsed};}(e.root,r,e):function(e,t,n){var r;let l=Array.isArray(r=t.panes)?r.map((e,t)=>a(e,`pane-${String(t+1)}`)).filter(e=>null!==e):[];if(0===l.length)return null;let o={};for(let e of l)o[e.id]=e;let c=l[0];if(void 0===c)return null;let f=function(e,t,n){if(void 0===t)return{type:"pane",paneId:e.id};let r="number"==typeof n.splitRatio&&Number.isFinite(n.splitRatio)?i(n.splitRatio):50;return{type:"split",id:"split-1",direction:u(n.direction),ratio:r,first:{type:"pane",paneId:e.id},second:{type:"pane",paneId:t.id}};}(c,l[1],t);return{schemaVersion:2,root:e,activePaneId:d(t,o,c.id),tree:f,panes:o,sidebarWidth:s(t,n),sidebarCollapsed:!0===t.sidebarCollapsed};}(e.root,r,e);if(null!==o)return o;}}catch{}return null;}(e);if(null!==r)return r;let l=o("pane-1",e.file.length>0?e.file:null!=(n=e.openFiles[0])?n:"",e.openFiles);return{schemaVersion:2,root:e.root,activePaneId:l.id,tree:{type:"pane",paneId:l.id},panes:{[l.id]:l},sidebarWidth:e.defaultSidebarWidth,sidebarCollapsed:!1};},"editorLayoutOpenFiles",0,function(e){let t=[];for(let n of p(e))for(let e of n.openFiles)e.length>0&&!t.includes(e)&&t.push(e);return t;},"editorLayoutPaneIds",0,f,"editorLayoutPanes",0,p,"editorLayoutReducer",0,function(e,t){if(S.has(t.type)){switch(t.type){case"open-file":return h(e,t.paneId,e=>m(e,l(t.file,e.openFiles),t.file));case"select-file":return h({...e,activePaneId:t.paneId},t.paneId,e=>e.openFiles.includes(t.file)?m(e,e.openFiles,t.file):e);case"close-tab":return b(e,t.paneId,t.file);case"reorder-tab":return h(e,t.paneId,e=>e.openFiles.includes(t.file)?m(e,y(e.tabOrder,t.file,t.targetIndex),t.file):e);}return;}return k.has(t.type)?function(e,t){switch(t.type){case"close-pane":return w(e,t.paneId);case"move-tab":return I(e,t.fromPaneId,t.toPaneId,t.file,t.targetIndex);case"drop-tab":var n;return"center"===(n=t.intent).zone?I(e,n.fromPaneId,n.toPaneId,n.file,n.targetIndex):v(I(e,n.fromPaneId,n.fromPaneId,n.file),n.toPaneId,"top"===n.zone||"bottom"===n.zone?"column":"row",n.file,"top"===n.zone||"left"===n.zone);case"split-pane":return v(e,t.paneId,t.direction,t.file,!1);}}(e,t):function(e,t){switch(t.type){case"set-active-pane":return void 0===e.panes[t.paneId]?e:{...e,activePaneId:t.paneId};case"resize-split":return{...e,tree:function e(t,n,r){return"pane"===t.type?t:{...t,ratio:t.id===n?i(r):t.ratio,first:e(t.first,n,r),second:e(t.second,n,r)};}(e.tree,t.splitId,t.ratio)};case"set-sidebar":return{...e,sidebarWidth:null!=(r=t.width)?r:e.sidebarWidth,sidebarCollapsed:null!=(l=t.collapsed)?l:e.sidebarCollapsed};case"replace-root":let n;return n=o("pane-1","",[]),{schemaVersion:2,root:t.root,activePaneId:n.id,tree:{type:"pane",paneId:n.id},panes:{[n.id]:n},sidebarWidth:null!=(a=t.sidebarWidth)?a:e.sidebarWidth,sidebarCollapsed:!1};case"rename-file":return function(e,t,n){if(0===t.length||0===n.length||t===n)return e;let i={},r=!1;for(let[l,o]of Object.entries(e.panes)){let e=function(e,t,n){var i,r;let l=e=>e===t?n:e.startsWith(`${t}/`)?`${n}${e.slice(t.length)}`:e,o=x(e.openFiles.map(l)),a=x(e.tabOrder.map(l)),u=l(e.activeFile);return o.length===e.openFiles.length&&o.every((t,n)=>t===e.openFiles[n])&&u===e.activeFile?e:{...e,openFiles:o,tabOrder:a,activeFile:u.length>0?u:null!=(i=null!=(r=a[0])?r:o[0])?i:""};}(o,t,n);e!==o&&(r=!0),i[l]=e;}return r?{...e,panes:i}:e;}(e,t.from,t.to);case"remove-file":var r,l,a,u=t.file;if(0===u.length)return e;let c=[];for(let t of p(e))for(let e of t.openFiles)(e===u||e.startsWith(`${u}/`))&&c.push([t.id,e]);return c.reduce((e,t)=>{let[n,i]=t;return b(e,n,i);},e);}}(e,t);},"serializeEditorLayoutStateV2",0,function(e){return JSON.stringify({schemaVersion:2,root:e.root,activePaneId:e.activePaneId,tree:e.tree,panes:e.panes,sidebarWidth:Math.round(e.sidebarWidth),sidebarCollapsed:e.sidebarCollapsed});}],63312);var P=e.i(20414);let F=/^[A-Za-z]:/u;function C(e){return e.startsWith("/")||e.startsWith("\\")||e.startsWith("~")||F.test(e);}function M(e){let t=e.replace(/\\/gu,"/"),n=t.split("/").filter(e=>e.length>0).join("/");return 0===n.length?"":t.startsWith("/")?`/${n}`:n;}function R(e){return(0,P.isContainedAgentPath)(e);}function A(e,t){var n;let i=null!=(n=null==t?void 0:t.trim())?n:"";if(0===i.length)return{kind:"empty"};if(i.includes("\0"))return{kind:"outside-root",candidate:M(i)};if(C(i)){let t;return null===(t=function(e,t){let n=M(e),i=M(t);if(0===n.length)return null;let r=n.toLowerCase(),l=i.toLowerCase();return l===r?"":l.startsWith(`${r}/`)?i.slice(n.length+1):null;}(e,i))?{kind:"outside-root",candidate:M(i)}:0===t.length?{kind:"root"}:R(t)?{kind:"relative",path:t}:{kind:"outside-root",candidate:M(i)};}let r=M(i).replace(/^\.\//u,"");return 0===r.length?{kind:"empty"}:R(r)?{kind:"relative",path:r}:{kind:"outside-root",candidate:r};}e.s(["isRootRelativeFileIdentifier",0,R,"resolveWorkspaceFileIdentifier",0,A,"selectWorkspaceFileTarget",0,function(e,t){let n=M(e.trim()),i=A(n,t);switch(i.kind){case"relative":return n.length>0?{root:n,file:i.path}:null;case"root":case"empty":return n.length>0?{root:n,file:""}:null;case"outside-root":{let e,t,n=i.candidate;if(!C(n))return null;let r=(e=n.lastIndexOf("/"))<0?"":0===e?"/":n.slice(0,e),l=(t=n.lastIndexOf("/"))<0?n:n.slice(t+1);if(0===r.length||!R(l))return null;return{root:r,file:l};}}}],70478);},95313,e=>{"use strict";let t,n={w:150,h:110},i={w:290,h:190},r={chat:{title:"Chat",icon:"newChat",accent:!0,desc:"Talk to Keiko",w:480,h:480,min:{w:300,h:260},singleton:!0,config:[{key:"title",label:"Title",type:"text",def:"New chat",optional:!0,placeholder:"Name this conversation"}]},chatHistory:{title:"Chat History",icon:"archive",desc:"Manage conversations",w:380,h:560,min:{w:300,h:320},tiny:{w:260,h:220},tool:!0,singleton:!0},memoria:{title:"MemoriaViva",icon:"brain",desc:"Review governed memory",w:680,h:600,min:{w:420,h:360},tiny:{w:300,h:220},tool:!0,singleton:!0},files:{title:"Files",icon:"files",accent:!0,desc:"Browse a folder",w:290,h:340,tiny:{w:200,h:150},config:[{key:"root",label:"Folder",type:"directory",def:""}]},editor:{title:"Editor",icon:"editor",desc:"Open a folder or file",w:920,h:620,min:{w:620,h:380},config:[{key:"root",label:"Folder",type:"directory",def:"",optional:!0,placeholder:"/absolute/folder/path"},{key:"file",label:"File path",type:"text",def:"",optional:!0,placeholder:"optional relative file path"}]},browser:{title:"Browser",icon:"browser",desc:"Open a URL",w:460,h:340,config:[{key:"url",label:"URL",type:"text",def:"",optional:!0,placeholder:"https://…"}]},terminal:{title:"Terminal",icon:"terminal",accent:!0,desc:"Run commands",w:460,h:250,tiny:{w:250,h:140},config:[{key:"projectPath",label:"Project path",type:"text",def:""},{key:"cwd",label:"Working directory",type:"directory",def:""}]},commands:{title:"Tasks",icon:"terminal",accent:!0,desc:"Run test/build/run tasks",w:460,h:280,tiny:{w:250,h:140},config:[{key:"projectPath",label:"Project path",type:"text",def:""}]},runtime:{title:"Runtime",icon:"cube",accent:!0,desc:"Runtime, Git, tasks, and audit",w:500,h:390,min:{w:320,h:260},tiny:{w:260,h:200},config:[{key:"projectPath",label:"Project path",type:"text",def:"",optional:!0}]},containerStatus:{title:"Containers",icon:"cube",desc:"Container engine status & diagnostics",w:460,h:320,min:{w:300,h:220},tiny:{w:250,h:160},config:[{key:"projectPath",label:"Project path",type:"text",def:"",optional:!0}]},review:{title:"Review",icon:"review",desc:"Review a proposed diff",w:520,h:420,config:[{key:"runId",label:"Run ID",type:"text",def:"",optional:!0,placeholder:"e.g. r-2026-06-01-…"}]},agents:{title:"Agents",icon:"agents",desc:"Choose a coding agent",w:520,h:560,tiny:{w:250,h:140},cta:"Start agent",config:[]},integ:{title:"Integrations",icon:"plugins",desc:"Connect apps",w:320,h:300,config:[{key:"provider",label:"Provider",type:"select",options:["GitHub","Linear","Slack","Sentry"],def:"GitHub"}]},keiko:{title:"Keiko",icon:"spark",desc:"Keiko twin",w:344,h:520,tool:!0,singleton:!0},settings:{title:"Settings",icon:"settings",desc:"Preferences",w:470,h:560,tool:!0,singleton:!0},updates:{title:"Updates",icon:"activity",desc:"Review available updates",w:620,h:640,min:{w:420,h:430},tiny:{w:320,h:260},singleton:!0},project:{title:"Project",icon:"folder",desc:"Project tree",w:304,h:440,tool:!0,singleton:!0},search:{title:"Search",icon:"search",desc:"Search the workspace",w:320,h:500,tool:!0,singleton:!0},plugins:{title:"Plugins",icon:"plugins",desc:"Plugins & tools",w:320,h:470,tool:!0,singleton:!0},automations:{title:"Automations",icon:"automations",desc:"Workflow automations",w:320,h:300,tool:!0,singleton:!0},mobile:{title:"Keiko Mobile",icon:"mobile",desc:"Mobile companion",w:300,h:380,tool:!0,singleton:!0},inspector:{title:"Inspector",icon:"layers",desc:"Inspect the workspace",w:290,h:440,tool:!0,singleton:!0},activity:{title:"Activity",icon:"activity",desc:"Activity timeline",w:322,h:460,tool:!0,singleton:!0},notifications:{title:"Notifications",icon:"bell",desc:"Review alerts & updates",w:300,h:360,tool:!0,singleton:!0},resources:{title:"Resources",icon:"cube",desc:"System resources",w:300,h:320,tool:!0,singleton:!0},connector:{title:"Knowledge Pod",icon:"server",accent:!0,desc:"Pick a Knowledge Pod source",w:320,h:380,min:{w:220,h:180},config:[]},localKnowledge:{title:"Local Knowledge",icon:"localKnowledge",accent:!0,desc:"Manage Knowledge Pods",w:720,h:560,min:{w:360,h:320},tiny:{w:300,h:220},tool:!0,singleton:!0},quality:{title:"Quality Intelligence",icon:"check",accent:!0,desc:"Design & review test cases",w:384,h:580,min:{w:300,h:320},tiny:{w:260,h:200},tool:!0,singleton:!0},promptEnhancer:{title:"Prompt Enhancer",icon:"spark",accent:!0,desc:"Turn a raw prompt into a governed, reviewable Enhanced Prompt",w:880,h:720,min:{w:520,h:420},tiny:{w:320,h:240},tool:!0,singleton:!0},qiRun:{title:"QI Run",icon:"check",desc:"Generated test cases",w:760,h:660,min:{w:320,h:280},tiny:{w:280,h:200},config:[{key:"runId",label:"Run ID",type:"text",def:""}]},relationships:{title:"Relationships",icon:"branch",accent:!0,desc:"Inspect the relationship graph",w:760,h:600,min:{w:360,h:320},tiny:{w:300,h:220},tool:!0,singleton:!0},figma:{title:"Figma Snapshot",icon:"layers",accent:!0,desc:"Manage Figma snapshots",w:420,h:540,min:{w:320,h:360},tiny:{w:280,h:240},tool:!0,singleton:!0},figmaView:{title:"Figma View",icon:"layers",accent:!0,desc:"Inspect a scoped Figma screen view",w:360,h:360,min:{w:300,h:260},tiny:{w:260,h:200}},figmaJson:{title:"Figma JSON",icon:"file",accent:!0,desc:"Inspect scoped Figma Screen-IR JSON",w:520,h:540,min:{w:340,h:300},tiny:{w:280,h:220}},figmaImage:{title:"Figma Image",icon:"file",accent:!0,desc:"Inspect a scoped Figma screen render",w:560,h:420,min:{w:300,h:240},tiny:{w:240,h:180}},pdfCitationPreview:{title:"PDF Preview",icon:"file",accent:!0,desc:"Read a verified PDF preview in Keiko",w:880,h:680,min:{w:440,h:320},tiny:{w:320,h:220}},governedGit:{title:"Git",icon:"git",accent:!0,desc:"Branch, stage, commit, and publish",w:520,h:640,min:{w:360,h:420},tiny:{w:300,h:240},tool:!0,singleton:!0,config:[{key:"projectPath",label:"Project path",type:"text",def:""}]},governedPullRequest:{title:"Pull Request",icon:"git",accent:!0,desc:"Open a review-ready PR under policy",w:540,h:680,min:{w:380,h:440},tiny:{w:320,h:260},config:[{key:"projectPath",label:"Project path",type:"text",def:""},{key:"headBranchName",label:"Head branch",type:"text",def:""}]},governedMerge:{title:"Merge",icon:"git",accent:!0,desc:"Merge a review-ready PR under policy",w:540,h:680,min:{w:380,h:440},tiny:{w:320,h:260},config:[{key:"projectPath",label:"Project path",type:"text",def:""},{key:"headBranchName",label:"Head branch",type:"text",def:""}]}},l=new Map(),o=(t={},Object.keys(r).forEach(e=>{var o,a,u;let c,s;t[e]=(c={title:(o=r[e]).title,icon:o.icon,desc:o.desc,w:o.w,h:o.h,min:null!=(a=o.min)?a:n,tiny:null!=(u=o.tiny)?u:i,render:(t,n)=>{let i=l.get(e);return void 0!==i?i(t,n):null;}},s={},!0===o.accent&&(s.accent=!0),!0===o.tool&&(s.tool=!0),!0===o.singleton&&(s.singleton=!0),void 0!==o.config&&(s.config=o.config),void 0!==o.cta&&(s.cta=o.cta),{...c,...s});}),t);e.s(["CHAT_MINI_W",0,430,"WIN_TYPES",0,o,"registerWindowRender",0,function(e,t){l.set(e,t);}]);},68611,48143,e=>{"use strict";let t=new Set(["chat","agents","quality","editor","promptEnhancer"]),n=new Set(["agents","quality","editor","promptEnhancer"]);function i(e){return t.has(e);}let r={agents:["files","terminal","plugins","review","browser","agents","keiko"],chat:["files","browser","plugins","keiko","connector"],files:["agents","chat","quality","editor","promptEnhancer"],editor:["files","connector"],terminal:["agents"],plugins:["agents","chat"],review:["agents"],browser:["agents","chat"],keiko:["agents","chat"],connector:["chat","quality","editor"],quality:["files","connector","figma","figmaView","figmaJson","figmaImage"],promptEnhancer:["files"],figma:["quality"],figmaView:["quality"],figmaJson:["quality"],figmaImage:["quality"]},l=Object.fromEntries(Object.entries(r).map(e=>{let[t,n]=e;return[t,new Set(n)];})),o=new Set([...Object.keys(r),...Object.values(r).flat()]);function a(e,t){var n,i;return void 0!==e&&void 0!==t&&e!==t&&((null==(n=l[e])?void 0:n.has(t))===!0||(null==(i=l[t])?void 0:i.has(e))===!0);}function u(e){return{left:{x:e.x,y:e.y,w:e.w/2,h:e.h},right:{x:e.x+e.w/2,y:e.y,w:e.w/2,h:e.h},maxi:{x:e.x,y:e.y,w:e.w,h:e.h},tl:{x:e.x,y:e.y,w:e.w/2,h:e.h/2},tr:{x:e.x+e.w/2,y:e.y,w:e.w/2,h:e.h/2},bl:{x:e.x,y:e.y+e.h/2,w:e.w/2,h:e.h/2},br:{x:e.x+e.w/2,y:e.y+e.h/2,w:e.w/2,h:e.h/2}};}e.s(["canConnect",0,a,"connPath",0,function(e,t){let n,i,r,l,o={x:e.x+e.w/2,y:e.y+e.h/2},a={x:t.x+t.w/2,y:t.y+t.h/2},u=a.x-o.x,c=a.y-o.y;if(Math.abs(u)>=Math.abs(c)){n=u>=0?{x:e.x+e.w,y:o.y}:{x:e.x,y:o.y};let c=Math.max(40,Math.abs((i=u>=0?{x:t.x,y:a.y}:{x:t.x+t.w,y:a.y}).x-n.x)/2),s=u>=0?1:-1;r={x:n.x+s*c,y:n.y},l={x:i.x-s*c,y:i.y};}else{n=c>=0?{x:o.x,y:e.y+e.h}:{x:o.x,y:e.y};let u=Math.max(40,Math.abs((i=c>=0?{x:a.x,y:t.y}:{x:a.x,y:t.y+t.h}).y-n.y)/2),s=c>=0?1:-1;r={x:n.x,y:n.y+s*u},l={x:i.x,y:i.y-s*u};}let s={x:(n.x+3*r.x+3*l.x+i.x)/8,y:(n.y+3*r.y+3*l.y+i.y)/8};return{d:`M${String(n.x)},${String(n.y)} C${String(r.x)},${String(r.y)} ${String(l.x)},${String(l.y)} ${String(i.x)},${String(i.y)}`,mid:s};},"hasConnectablePeer",0,function(e){return void 0!==e&&o.has(e);},"receivesFilesContext",0,i,"receivesFocusedFileContext",0,function(e){return n.has(e);},"relLabel",0,function(e,t){let n="files"===e.type?e:"files"===t.type?t:null,r=null===n?null:n===e?t:e;if(null!==n&&null!==r&&i(r.type)){let e=function(e){if(void 0===e)return null;let t=e.resolvedRoot;if("string"==typeof t&&t.length>0)return t;let n=e.root;return"string"==typeof n&&n.length>0?n:null;}(n.cfg);return null===e?"no folder selected":`uses ${function(e,t){var n,i,r;let l=null==e?void 0:e.activeFilePath;if("string"==typeof l&&l.length>0)return null!=(i=l.split(/[/\\]/u).filter(Boolean).pop())?i:l;let o=null==e?void 0:e.activeDirectoryPath;return"string"==typeof o&&o.length>0?`${null!=(r=o.split(/[/\\]/u).filter(Boolean).pop())?r:o}/`:`${null!=(n=t.split(/[/\\]/u).filter(Boolean).pop())?n:t}/`;}(n.cfg,e)}`;}let l=[e.type,t.type];if(l.includes("connector"))return"uses knowledge";if(l.includes("figmaJson"))return"uses JSON";if(l.includes("figmaImage"))return"uses image";if(l.includes("figmaView"))return"uses view";if(l.includes("figma")){var o;let n="figma"===e.type?e:"figma"===t.type?t:null,i=null==n||null==(o=n.cfg)?void 0:o.selectedScreenName;return"string"==typeof i&&i.trim().length>0?"uses view":"uses snapshot";}return l.includes("keiko")?"governed by":"agents"===l[0]&&"agents"===l[1]?"delegates":l.includes("terminal")?"runs in":l.includes("plugins")?"uses tools":l.includes("review")?"reviews":l.includes("browser")?"browses":"connected";},"snapMap",0,u,"subText",0,function(e,t){var n,i;if(void 0===t)return null;let r=e=>{let n=t[e];return"string"==typeof n&&n.length>0?n:null;};switch(e){case"files":return r("root");case"browser":return r("url");case"editor":{let e=r("file"),t=r("root");return null!==e&&null!==t?`${e} — ${t}`:e;}case"terminal":return r("cwd");case"commands":case"runtime":return r("projectPath");case"chat":{let e=r("title");return null!==e&&"New chat"!==e?e:null;}case"figma":case"figmaView":return r("selectedScreenName");case"figmaJson":return null!=(n=r("selectedScreenName"))?n:r("screenId");case"pdfCitationPreview":return null!=(i=r("documentLabel"))?i:r("pageLabel");default:return null;}}],48143);var c=e.i(95313),s=e.i(63312),d=e.i(70478);function f(e,t,n,i,r){return{x:e.x+Math.max(16,Math.min(r+26*i,e.w-t-16)),y:e.y+Math.max(16,Math.min(r+26*i,e.h-n-16))};}function p(e){return e.trim().replace(/\\/gu,"/").replace(/\/+$/u,"");}function h(e,t){if("string"!=typeof t)return"";let n=(0,d.resolveWorkspaceFileIdentifier)(e,t);if("relative"===n.kind)return n.path;if("outside-root"===n.kind){let e=n.candidate.replace(/^\/+/u,"");return(0,d.isRootRelativeFileIdentifier)(e)?e:"";}return"";}function g(e,t){let n=e[t];return"string"==typeof n?n:void 0;}function y(e){let{prev:t,...n}=e;return n;}function m(e){return"prev"in e;}function v(e,t){return e.x===t.x&&e.y===t.y&&e.w===t.w&&e.h===t.h;}function w(e,t,n){return e.some(e=>e.a===t&&e.b===n||e.a===n&&e.b===t);}function b(e,t){return(null==e?void 0:e.type)==="chat"?e.id:(null==t?void 0:t.type)==="chat"?t.id:null;}function I(e){return e.length>0&&(e.startsWith("/")||/^[A-Za-z]:[/\\]/u.test(e));}function x(e){return /^[A-Za-z]:[/\\]?$/u.test(e)?e.replace(/\\/gu,"/"):e.replace(/\\/gu,"/").replace(/\/+$/u,"");}function S(e){if("files"!==e.type)return null;let t=e.cfg.resolvedRoot,n=e.cfg.root,i="string"==typeof t&&t.length>0?t:"string"==typeof n&&n.length>0?n:null;return null!==i&&I(i)?i:null;}function k(e){return e.replace(/\\/gu,"/").replace(/^\/+/u,"").replace(/\/+$/u,"");}function P(e,t){return void 0!==e.root&&void 0!==t.root&&x(e.root)===x(t.root)&&e.kind===t.kind&&e.relativePaths.length===t.relativePaths.length&&e.relativePaths.every((e,n)=>{var i;return k(e)===k(null!=(i=t.relativePaths[n])?i:"");});}function F(e,t,n){let i="files"===e.type?e:"files"===t.type?t:null,r="chat"===e.type?e:"chat"===t.type?t:null;if(null===i||null===r)return null;let l=S(i);if(null===l)return null;let o=i.cfg.activeFilePath;if("string"==typeof o&&o.length>0)return{kind:"files",relativePaths:[k(o)],root:x(l),connectedAtMs:n};let a=i.cfg.activeDirectoryPath;return"string"==typeof a&&a.length>0?{kind:"directory",relativePaths:[k(a)],root:x(l),connectedAtMs:n}:{kind:"workspace-root",relativePaths:[],root:x(l),connectedAtMs:n};}function C(e){if("string"!=typeof e.boundRoot||0===e.boundRoot.length)return null;let t=Date.now();return"directory"===e.boundScopeKind?"string"!=typeof e.boundRelativePath||0===e.boundRelativePath.length?null:{kind:"directory",relativePaths:[k(e.boundRelativePath)],root:x(e.boundRoot),connectedAtMs:t}:"files"===e.boundScopeKind?"string"!=typeof e.boundRelativePath||0===e.boundRelativePath.length?null:{kind:"files",relativePaths:[k(e.boundRelativePath)],root:x(e.boundRoot),connectedAtMs:t}:{kind:"workspace-root",relativePaths:[],root:x(e.boundRoot),connectedAtMs:t};}function M(e){return"capsule"===e.kind?`capsule:${e.capsuleId}`:`set:${e.capsuleSetId}`;}function R(e){return"string"!=typeof e.boundConnectorId||0===e.boundConnectorId.length?null:"capsule"===e.boundConnectorKind?{kind:"capsule",capsuleId:e.boundConnectorId,connectedAtMs:0}:"capsule-set"===e.boundConnectorKind?{kind:"capsule-set",capsuleSetId:e.boundConnectorId,connectedAtMs:0}:null;}function A(e,t){let n="connector"===e.type?e:"connector"===t.type?t:null,i="chat"===e.type?e:"chat"===t.type?t:null;if(null===n||null===i)return null;let r=n.cfg.selectedKind,l=n.cfg.selectedId;if("string"!=typeof r||"string"!=typeof l)return null;let o=l.trim();return 0===o.length?null:"capsule"===r?{kind:"capsule",capsuleId:o,connectedAtMs:Date.now()}:"capsule-set"===r?{kind:"capsule-set",capsuleSetId:o,connectedAtMs:Date.now()}:null;}e.s(["MAX_SCOPES",0,16,"appendConnectedScope",0,function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16;if(void 0===t.root)return null;let i=x(t.root);if(!I(i))return null;let r=t.relativePaths.map(k),l={kind:t.kind,relativePaths:r,root:i,connectedAtMs:t.connectedAtMs};return e.some(e=>P(e,l))||e.length>=n?e:[...e,l];},"appendConnectorScope",0,function(e,t,n){let i=M(t);return e.some(e=>M(e)===i)||e.length>=n?e:[...e,t];},"boundConnectorScopeOf",0,R,"boundScopeOf",0,C,"connectorChatBind",0,A,"effectiveLocalKnowledgeScopes",0,function(e){var t;return null!=(t=e.localKnowledgeScopes)?t:void 0!==e.localKnowledgeScope?[e.localKnowledgeScope]:[];},"effectiveScopes",0,function(e){var t;return null!=(t=e.connectedScopes)?t:void 0!==e.connectedScope?[e.connectedScope]:[];},"filesChatBindScope",0,F,"isConnectorScopeConnected",0,function(e,t){let n=M(t);return e.some(e=>M(e)===n);},"isScopeConnected",0,function(e,t){return e.some(e=>P(e,t));},"makeConnectActions",0,function(e){let{wsRef:t,viewRef:n,winsRef:i,connsRef:r,winsByIdRef:l,connsByIdRef:o,connsByEndpointRef:u,connectingRef:c,connectCleanupRef:s,focus:d,setConns:f,setConnecting:p,onScopeBind:h,onScopeUnbind:g,onConnectorBind:y,onConnectorUnbind:m}=e,v=e=>{var t;return null!=(t=null==l?void 0:l.current.get(e))?t:i.current.find(t=>t.id===e);},x=e=>{var t;return null!=(t=null==u?void 0:u.current.get(e))?t:r.current.filter(t=>t.a===e||t.b===e);},k=()=>{null!==s.current&&(s.current(),s.current=null),c.current=null,p(null);},P=e=>{if("files"!==e.type)return null;let t=e.cfg.resolvedRoot,n=e.cfg.root,i="string"==typeof t&&t.length>0?t:"string"==typeof n&&n.length>0?n:null;if(null===i||!I(i))return null;let r=e.cfg.activeFilePath;return{id:e.id,root:i,...("string"==typeof r&&r.length>0?{activeFilePath:r}:{})};},M=e=>{let t=[];for(let n of x(e)){let i=n.a===e?n.b:n.b===e?n.a:null;if(null===i)continue;let r=v(i);void 0!==r&&"files"===r.type&&t.push(r);}if(0===t.length)return null;let n=[...t].sort((e,t)=>t.z-e.z),i=n.find(e=>{let t=e.cfg.activeFilePath;return"string"==typeof t&&t.length>0;}),r=null!=i?i:n[0];return void 0===r?null:P(r);},z=(e,t)=>{let n=new Set(),i=[];for(let r of x(e)){if(i.length>=16)break;let l=r.a===e?r.b:r.b===e?r.a:null;if(null===l)continue;let o=v(l);if(void 0===o||"connector"!==o.type||o.cfg.selectedKind!==t)continue;let a=o.cfg.selectedId;"string"==typeof a&&0!==a.trim().length&&(n.has(a)||(n.add(a),i.push(a)));}return i;},O=e=>{let t=(e=>{if("string"!=typeof e||0===e.trim().length)return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=t.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>e.trim());return[...new Set(n)].sort();}catch{return[];}})(e.cfg.selectedScreenIdsJson);if(t.length>0)return t;let n=e.cfg.screenId;return"string"==typeof n&&n.trim().length>0?[n.trim()]:[];};return{startConnect:(e,i)=>{if(i.preventDefault(),i.stopPropagation(),null!==c.current&&c.current.from===e)return void k();let r=t.current;if(null===r)return;let l=r.getBoundingClientRect(),o=n.current,a=e=>(e-l.left-o.x)/o.zoom,u=e=>(e-l.top-o.y)/o.zoom;null!==s.current&&(s.current(),s.current=null);let d={from:e,x:a(i.clientX),y:u(i.clientY)};c.current=d,p(d);let f=null,h=null,g=()=>{h=null;let t=f;if(null===t)return;let n={from:e,x:a(t.clientX),y:u(t.clientY)};c.current=n,p(n);},y=e=>{f=e,null===h&&(h=window.requestAnimationFrame(g));};window.addEventListener("pointermove",y),s.current=()=>{window.removeEventListener("pointermove",y),null!==h&&(window.cancelAnimationFrame(h),h=null);};},confirmConnect:(e,t)=>{t.preventDefault(),t.stopPropagation();let n=c.current;if(null===n)return;let i=v(n.from),r=v(e);if(void 0!==i&&void 0!==r&&a(i.type,r.type)){let t,a=F(i,r,Date.now()),u=null===a?A(i,r):null,c=null!==a||null!==u?b(i,r):null;try{var l,o;t=null!==a&&null!==c?null==(l=null==h?void 0:h(c,a))||l:null===u||null!==c&&(null==(o=null==y?void 0:y(c,u))||o);}catch{t=!1;}Promise.resolve(t).then(t=>{t&&void 0!==v(n.from)&&void 0!==v(e)&&(f(t=>w(t,n.from,e)?t:[...t,{id:`${n.from}~${e}`,a:n.from,b:e,...(null!==c?{boundChatWindowId:c}:{}),...(null!==a?{boundRoot:a.root,boundScopeKind:a.kind,boundRelativePath:a.relativePaths[0]}:{}),...(null!==u?"capsule"===u.kind?{boundConnectorKind:"capsule",boundConnectorId:u.capsuleId}:{boundConnectorKind:"capsule-set",boundConnectorId:u.capsuleSetId}:{})}]),d(e));}).catch(()=>void 0);}k();},cancelConnect:k,removeConn:e=>{var t,n,i,l;let a=null!=(l=null==o?void 0:o.current.get(e))?l:r.current.find(t=>t.id===e);if(f(t=>t.filter(t=>t.id!==e)),void 0===a)return;let u=v(a.a),c=v(a.b),s=void 0!==u&&void 0!==c,d=null!=(t=a.boundChatWindowId)?t:s?b(u,c):null,p=null!=(n=C(a))?n:!0!==a.boundScopeElided&&s?F(u,c,Date.now()):null;null!==p&&null!==d&&(null==g||g(d,p));let h=null!=(i=R(a))?i:s?A(u,c):null;null!==h&&null!==d&&(null==m||m(d,h));},connect:(e,t)=>{let n=v(e),i=v(t);void 0!==n&&void 0!==i&&a(n.type,i.type)&&f(n=>w(n,e,t)?n:[...n,{id:`${e}~${t}`,a:e,b:t}]);},linkedFilesRoot:e=>{var t,n;return null!=(t=null==(n=M(e))?void 0:n.root)?t:null;},linkedFilesContext:M,linkedAllFilesRoots:e=>{let t=new Set(),n=[];for(let i of x(e)){if(n.length>=16)break;let r=i.a===e?i.b:i.b===e?i.a:null;if(null===r)continue;let l=v(r);if(void 0===l)continue;let o=S(l);null===o||t.has(o)||(t.add(o),n.push(o));}return n;},linkedConnectorCapsuleIds:e=>z(e,"capsule"),linkedConnectorCapsuleSetIds:e=>z(e,"capsule-set"),linkedFigmaSnapshotRunIds:e=>{let t=new Set(),n=[];for(let i of x(e)){if(n.length>=16)break;let r=i.a===e?i.b:i.b===e?i.a:null;if(null===r)continue;let l=v(r);if(void 0===l||"figma"!==l.type)continue;let o=l.cfg.snapshotRunId;"string"==typeof o&&0!==o.trim().length&&(t.has(o)||(t.add(o),n.push(o)));}return n;},linkedFigmaSnapshotSources:e=>{let t=new Set(),n=[];for(let i of x(e)){if(n.length>=16)break;let r=i.a===e?i.b:i.b===e?i.a:null;if(null===r)continue;let l=v(r);if(void 0===l||"figma"!==l.type&&"figmaView"!==l.type&&"figmaJson"!==l.type)continue;let o=l.cfg.snapshotRunId;if("string"!=typeof o||0===o.trim().length)continue;let a=l.cfg.selectedScreenIdsJson,u=l.cfg.selectedScreenName,c=O(l);if(("figmaJson"===l.type||"figmaView"===l.type||void 0!==a||"string"==typeof u&&u.trim().length>0)&&0===c.length)continue;let s=`${o}:${c.join(",")||"*"}`;if(t.has(s))continue;t.add(s);let d=c.length>0&&"string"==typeof u&&u.trim().length>0?"figmaJson"===l.type?`JSON \xb7 ${u}`:u:o;n.push({kind:"figma-snapshot",label:d,snapshotRunId:o,...(c.length>0?{screenIds:c}:{})});}return n;},linkedImageSources:e=>{let t=new Set(),n=[];for(let i of x(e)){if(n.length>=16)break;let r=i.a===e?i.b:i.b===e?i.a:null;if(null===r)continue;let l=v(r);if(void 0===l||"figmaImage"!==l.type)continue;let o=l.cfg.snapshotRunId,a=l.cfg.screenId;if("string"!=typeof o||0===o.trim().length||"string"!=typeof a||0===a.trim().length)continue;let u=`${o}:${a}`;if(t.has(u))continue;t.add(u);let c=l.cfg.selectedScreenName,s="string"==typeof c&&c.trim().length>0?`Image \xb7 ${c}`:`Image \xb7 ${a}`;n.push({kind:"image",label:s,sourceKind:"figma-snapshot-screen",snapshotRunId:o,screenId:a});}return n;},currentFilesContext:()=>{let e=null,t=0,n=null;for(let r of i.current){if("files"!==r.type)continue;let i=P(r);null!==i&&(t+=1,e=i),(null===n||r.z>n.z)&&(n=r);}return 1===t?e:null===n?null:P(n);}};},"makeLayoutActions",0,function(e){return{tileAll:function(e){let{setWins:t,worldVP:n}=e;return()=>t(e=>{if(null===e||0===e.length)return e;let t=n();if(null===t)return e;let i=e.length,r=Math.ceil(Math.sqrt(i)),l=Math.ceil(i/r),o=(t.w-12*(r+1))/r,a=(t.h-12*(l+1))/l,u=!1,c=e.map((e,n)=>{let i=Math.floor(n/r),l={x:t.x+12+n%r*(o+12),y:t.y+12+i*(a+12),w:o,h:a};return!1===e.max&&!1===e.minimized&&!m(e)&&v(e,l)?e:(u=!0,{...y(e),max:!1,minimized:!1,...l});});return u?c:e;});}(e),splitFront:function(e){let{setWins:t,worldVP:n}=e;return()=>t(e=>{if(null===e||0===e.length)return e;let t=n();if(null===t)return e;let i=[...e].filter(e=>!0!==e.minimized).sort((e,t)=>t.z-e.z).slice(0,2).map(e=>e.id);if(i.length<2)return e;let r=!1,l=e.map(e=>{let n=i.indexOf(e.id);if(0===n){let n={x:t.x,y:t.y,w:t.w/2,h:t.h};return!1===e.max&&!1===e.minimized&&!m(e)&&v(e,n)?e:(r=!0,{...y(e),max:!1,minimized:!1,...n});}if(1===n){let n={x:t.x+t.w/2,y:t.y,w:t.w/2,h:t.h};return!1===e.max&&!1===e.minimized&&!m(e)&&v(e,n)?e:(r=!0,{...y(e),max:!1,minimized:!1,...n});}return e;});return r?l:e;});}(e),cascade:function(e){let{setWins:t,worldVP:n}=e;return()=>t(e=>{if(null===e)return e;let t=n();return null===t?e:e.map((e,n)=>({...y(e),max:!1,minimized:!1,x:t.x+24+30*n,y:t.y+24+30*n,w:Math.min(560,t.w-80),h:Math.min(420,t.h-80),z:n+1}));});}(e)};},"makeMutations",0,function(e){var t,n,i,r,l,o,a;return{update:(t=e.setWins,(e,n)=>t(t=>{if(null===t)return t;let i=!1,r=t.map(t=>{if(t.id!==e)return t;for(let[e,r]of Object.entries(n))if(!function e(t,n){if(Object.is(t,n))return!0;if(Array.isArray(t)||Array.isArray(n))return!!Array.isArray(t)&&!!Array.isArray(n)&&t.length===n.length&&t.every((t,i)=>e(t,n[i]));if(null===t||null===n||"object"!=typeof t||"object"!=typeof n)return!1;let i=Object.keys(t),r=Object.keys(n);return i.length===r.length&&i.every(i=>e(t[i],n[i]));}(t[e],r))return i=!0,{...t,...n};return t;});return i?r:t;})),focus:(n=e.setWins,i=e.zc,e=>n(t=>{if(null===t)return t;let n=t.find(t=>t.id===e);if(void 0===n)return t;let r=t.reduce((e,t)=>Math.max(e,t.z),-1/0);return!0!==n.minimized&&n.z>=r?t:(i.current=Math.max(i.current+1,r+1),t.map(t=>t.id===e?{...t,z:i.current}:t));})),close:(r=e.setWins,e=>r(t=>null!==t&&t.some(t=>t.id===e)?t.filter(t=>t.id!==e):t)),minimize:(l=e.setWins,e=>l(t=>{if(null===t)return t;let n=!1,i=t.map(t=>t.id!==e||!0===t.minimized?t:(n=!0,{...t,minimized:!0}));return n?i:t;})),restore:(o=e.setWins,a=e.zc,e=>o(t=>{if(null===t)return t;let n=t.find(t=>t.id===e);if(void 0===n)return t;let i=t.reduce((e,t)=>Math.max(e,t.z),-1/0);return!0!==n.minimized&&n.z>=i?t:(a.current=Math.max(a.current+1,i+1),t.map(t=>t.id===e?{...t,minimized:!1,z:a.current}:t));})),maximize:function(e){let{setWins:t,zc:n,worldVP:i}=e;return e=>t(t=>{if(null===t)return t;let r=i();return null===r?t:t.map(t=>{if(t.id!==e)return t;if(t.max){var i,l;let e,o,a,u=null!=(i=t.prev)?i:(l=t.type,o=Math.min((e=c.WIN_TYPES[l]).w,Math.max(e.min.w,r.w-32)),a=Math.min(e.h,Math.max(e.min.h,r.h-32)),{x:r.x+Math.max(16,Math.round((r.w-o)/2)),y:r.y+Math.max(16,Math.round((r.h-a)/2)),w:o,h:a}),{prev:s,...d}=t;return{...d,x:u.x,y:u.y,w:u.w,h:u.h,max:!1,z:++n.current};}return{...t,max:!0,prev:{x:t.x,y:t.y,w:t.w,h:t.h},x:r.x,y:r.y,w:r.w,h:r.h,z:++n.current};});});}(e),add:function(e){let{setWins:t,zc:n,worldVP:i}=e;return(e,r)=>{let l=c.WIN_TYPES[e],o="figma"===e&&"string"==typeof(null==r?void 0:r.selectedScreenIdsJson)&&r.selectedScreenIdsJson.length>0,a=c.WIN_TYPES.figmaView,u=o?a.w:l.w,s=o?a.h:l.h,d=o?Math.max(l.min.w,a.min.w):l.min.w,p=o?Math.max(l.min.h,a.min.h):l.min.h,h=null;return t(t=>{let o=i();if(null===o)return t;let a=null!=t?t:[];if(!0===l.singleton){let t=a.find(t=>t.type===e);if(void 0!==t)return h=t.id,a.map(e=>e.id===t.id?{...e,cfg:void 0===r?e.cfg:{...e.cfg,...r},minimized:!1,z:++n.current}:e);}let c="qiRun"===e?null==r?void 0:r.runId:void 0;if("string"==typeof c&&c.length>0){let e=a.find(e=>"qiRun"===e.type&&e.cfg.runId===c);if(void 0!==e)return h=e.id,a.map(t=>t.id===e.id?{...t,cfg:void 0===r?t.cfg:{...t.cfg,...r},minimized:!1,z:++n.current}:t);}let g="chat"===e?null==r?void 0:r.chatId:void 0;if("string"==typeof g&&g.length>0){let e=a.find(e=>"chat"===e.type&&e.cfg.chatId===g);if(void 0!==e)return h=e.id,a.map(t=>t.id===e.id?{...t,minimized:!1,z:++n.current}:t);}let{x:y,y:m}=f(o,u,s,a.length,40),v=!0===l.singleton?e:`${e}-${Date.now().toString(36)}`;return h=v,[...a,{id:v,type:e,x:y,y:m,w:Math.max(u,d),h:Math.max(s,p),z:++n.current,cfg:null!=r?r:{},max:!1,zoom:1}];}),h;};}(e),openEditorFile:function(e){let{setWins:t,zc:n,worldVP:i,winsRef:r}=e;return e=>{var l;let{root:o,path:a,lineStart:u,lineEnd:d}=e,y=p(o);if(0===y.length)return{ok:!1,message:"Select a repository source before opening file references."};let m=h(y,a);if(0===m.length)return{ok:!1,message:"This repository reference is not a valid file path."};let v=i();if(null===v)return{ok:!1,message:"Unable to open editor because the workspace viewport is not ready."};let w=function(e,t){if(void 0===e)return{};let n=Math.max(1,Math.floor(e)),i=Math.max(n,Math.floor(null!=t?t:n));return{revealLineStart:n,revealLineEnd:i,revealRequestId:`${Date.now().toString(36)}:${n.toString()}:${i.toString()}`};}(u,d),b=null!=(l=null==r?void 0:r.current)?l:[],I=b.find(e=>"editor"===e.type&&p("string"==typeof e.cfg.root?e.cfg.root:"")===y);if(void 0!==I){let e=I.id;return t(t=>null===t?t:t.map(t=>{var i,r;let l,o,a;if(t.id!==e)return t;let u=(i=t.cfg,l=h(y,null!=(r=g(i,"file"))?r:""),o=(0,s.createEditorLayoutStateV2)({root:y,file:l,openFiles:function(e,t,n){let i=[],r=e=>{let n=h(t,e);0===n.length||i.includes(n)||i.push(n);};if(Array.isArray(e.openFiles))for(let t of e.openFiles)r(t);return r(e.file),r(n),i;}(i,y,m),layoutJson:g(i,"layoutJson"),defaultSidebarWidth:260,minSidebarWidth:180,maxSidebarWidth:440}),a=(0,s.editorLayoutReducer)(o,{type:"open-file",paneId:(0,s.activeEditorPane)(o).id,file:m}),{file:m,openFiles:(0,s.editorLayoutOpenFiles)(a),layoutJson:(0,s.serializeEditorLayoutStateV2)(a)});return{...t,minimized:!1,z:++n.current,cfg:{...t.cfg,root:y,...u,...w}};})),{ok:!0,windowId:e};}let x=c.WIN_TYPES.editor,{x:S,y:k}=f(v,x.w,x.h,b.length,40),P=`editor-${Date.now().toString(36)}`;return t(e=>[...(null!=e?e:[]),{id:P,type:"editor",x:S,y:k,w:Math.max(x.w,x.min.w),h:Math.max(x.h,x.min.h),z:++n.current,cfg:{root:y,file:m,openFiles:[m],layoutJson:(0,s.serializeEditorLayoutStateV2)((0,s.createEditorLayoutStateV2)({root:y,file:m,openFiles:[m],defaultSidebarWidth:260,minSidebarWidth:180,maxSidebarWidth:440})),...w},max:!1,zoom:1}]),{ok:!0,windowId:P};};}(e),toggleTool:function(e){let{setWins:t,zc:n,worldVP:i}=e;return e=>{let r=c.WIN_TYPES[e];t(t=>{let l=i();if(null===l)return t;let o=null!=t?t:[],a=o.find(t=>t.type===e);if(void 0!==a&&!0===a.minimized)return o.map(e=>e.id===a.id?{...e,minimized:!1,z:++n.current}:e);if(void 0!==a)return o.filter(t=>t.type!==e);let{x:u,y:c}=f(l,r.w,r.h,o.length,28);return[...o,{id:e,type:e,x:u,y:c,w:r.w,h:r.h,z:++n.current,cfg:{},max:!1,zoom:1}];});};}(e)};},"makeSnapActions",0,function(e){let{setSnapPrev:t,snapZone:n,worldVP:i,update:r}=e;return{setSnap:e=>{if(n.current=e,null===e)return void t(null);let r=i();null!==r&&t(u(r)[e]);},commitSnap:e=>{let l=n.current;if(n.current=null,t(null),null===l)return;let o=i();if(null===o)return;let a={...u(o)[l],max:"maxi"===l};"maxi"===l&&(a.prev={x:o.x+40,y:o.y+40,w:480,h:360}),r(e,a);}};},"removeConnectedScope",0,function(e,t){return e.filter(e=>!P(e,t));},"removeConnectorScope",0,function(e,t){return e.filter(e=>M(e)!==t);},"totalSourceCap",0,function(e){return Math.max(e.maxConnectedSources,e.maxLocalKnowledgeSources);}],68611);}]);