@inkeep/open-knowledge 0.63.0-beta.0 → 0.63.0-beta.2

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/{acp-harness-probe-BLxtOeJP.mjs → acp-harness-probe-C3-fF_7J.mjs} +2 -2
  2. package/dist/cli.mjs +6 -6
  3. package/dist/constants-yIkyWtCN.mjs +2 -0
  4. package/dist/{git-handle-DBSBLTQr.mjs → git-handle-4kfkNWhe.mjs} +2 -2
  5. package/dist/git-handle-BdfJ9JDW.mjs +1 -0
  6. package/dist/index.d.mts +17 -17
  7. package/dist/index.mjs +60 -56
  8. package/dist/init-PDbiLRIQ.mjs +1 -0
  9. package/dist/{init-CFBWWVL6.mjs → init-u8_k-C2Q.mjs} +3 -3
  10. package/dist/{launch-json-removal-BiR8TkdA.mjs → launch-json-removal-BVmHBVgF.mjs} +2 -2
  11. package/dist/loader-BFcuWgS0.mjs +1 -0
  12. package/dist/{loader-BTqWazXb.mjs → loader-Cywqvo2_.mjs} +2 -2
  13. package/dist/md-manager-DS8TUqd4.mjs +2 -0
  14. package/dist/{open-browser-ycZBGuNV.mjs → open-browser-c1C7j5cZ.mjs} +2 -2
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/{preview-bcFQvR8X.mjs → preview-BXr_fh1A.mjs} +2 -2
  17. package/dist/preview-wUkofHV-.mjs +1 -0
  18. package/dist/public/assets/{ActivityModeContent-DKNTU3xF.js → ActivityModeContent-BRHWUTU_.js} +1 -1
  19. package/dist/public/assets/{AddPropertiesButton-DqpU3aSu.js → AddPropertiesButton-B5S_biuo.js} +1 -1
  20. package/dist/public/assets/{AgentDiffPane-9yWEGSlA.js → AgentDiffPane-CKMN7uO2.js} +1 -1
  21. package/dist/public/assets/{AgentThreadClientBinder-B7GHdT50.js → AgentThreadClientBinder-BeOI_eLL.js} +1 -1
  22. package/dist/public/assets/{BugReportHistory-CDjs-UvS.js → BugReportHistory-DX6L-_sJ.js} +1 -1
  23. package/dist/public/assets/{BugReportHistoryDialog-gMqpgd_4.js → BugReportHistoryDialog-DsssFBQs.js} +1 -1
  24. package/dist/public/assets/{CodeMirrorPropInput-BkPz1S4U.js → CodeMirrorPropInput-CiDPQMoe.js} +2 -2
  25. package/dist/public/assets/DocumentContext-BNVmouLp.js +38 -0
  26. package/dist/public/assets/{EditorModeToggle-BdGWhpIY.js → EditorModeToggle-ChXuaX-g.js} +1 -1
  27. package/dist/public/assets/{EnableSyncConfirmDialog-BI3oSfND.js → EnableSyncConfirmDialog-BZxFQH1e.js} +1 -1
  28. package/dist/public/assets/{ExcalidrawDocEditor-DBz9XgPR.js → ExcalidrawDocEditor-kSXgInTo.js} +1 -1
  29. package/dist/public/assets/FeedbackForm-i76yrsBl.js +1 -0
  30. package/dist/public/assets/{GraphPanel-fAs0m1k4.js → GraphPanel-XzZ9os01.js} +1 -1
  31. package/dist/public/assets/{ImportSkillDialog-DoECJCyD.js → ImportSkillDialog-AMZB8Sq-.js} +1 -1
  32. package/dist/public/assets/{LintConfigEditor-BbQC5XBO.js → LintConfigEditor-CR1JM7qC.js} +1 -1
  33. package/dist/public/assets/ManagedArtifactProperties-BXWl4sj9.js +1 -0
  34. package/dist/public/assets/ManagedArtifactProperties-DvxRb75E.js +1 -0
  35. package/dist/public/assets/{MermaidDocEditor-BLuA0Zbi.js → MermaidDocEditor-DNtN6gpQ.js} +1 -1
  36. package/dist/public/assets/{PropertyDisplayRow-CQC5Z0n6.js → PropertyDisplayRow-D8YTuo2g.js} +1 -1
  37. package/dist/public/assets/{ReportBugDialogBody-7G3gDx90.js → ReportBugDialogBody-eEi1p8SY.js} +1 -1
  38. package/dist/public/assets/{SchemaConfigEditor-DJdskJ7F.js → SchemaConfigEditor-BdDBPlf8.js} +1 -1
  39. package/dist/public/assets/{SessionsHost-zVHqq9cr.js → SessionsHost-BWF5LkCB.js} +2 -2
  40. package/dist/public/assets/{SettingsDialogBody-CHR0gEF6.js → SettingsDialogBody-D-xJh1Wz.js} +1 -1
  41. package/dist/public/assets/{ShareBranchSwitchDialog-BVSorWIl.js → ShareBranchSwitchDialog-CrAn8BfM.js} +1 -1
  42. package/dist/public/assets/{ShareReceiveDialog-MMs7AIMS.js → ShareReceiveDialog-BHw7vyVN.js} +1 -1
  43. package/dist/public/assets/{ShareReceiveMissDialog-Brs6R8I6.js → ShareReceiveMissDialog-BLiZVpAL.js} +1 -1
  44. package/dist/public/assets/{SkillCostValue-_Y5l2XwJ.js → SkillCostValue-BLO1pLvK.js} +1 -1
  45. package/dist/public/assets/{SkillEditBanner-D7_vEL-Q.js → SkillEditBanner-gs8OWdnP.js} +1 -1
  46. package/dist/public/assets/{SkillInstallMenu-B06AbDvI.js → SkillInstallMenu-B8VpVw2e.js} +1 -1
  47. package/dist/public/assets/{SkillOriginInline-CPhIPMvZ.js → SkillOriginInline-B2Xgoqtt.js} +1 -1
  48. package/dist/public/assets/{SkillToolbarControls-D53zgCnN.js → SkillToolbarControls-DV1Fs4Pg.js} +1 -1
  49. package/dist/public/assets/{SlidesToolbarControls-BMDuGCKO.js → SlidesToolbarControls-CTcysZq-.js} +1 -1
  50. package/dist/public/assets/{SourceEditor--mA47noe.js → SourceEditor-n5FZTUOu.js} +1 -1
  51. package/dist/public/assets/{TerminalPanel-CyBB22vO.js → TerminalPanel-B6ZtyhwL.js} +1 -1
  52. package/dist/public/assets/{TerminalWindowApp-DuCRqNRC.js → TerminalWindowApp-CZJAw22h.js} +1 -1
  53. package/dist/public/assets/{TextDocEditor-Bll9nONn.js → TextDocEditor-DkJOYSVf.js} +1 -1
  54. package/dist/public/assets/{ThreadView-CZ-jRmGS.js → ThreadView-BRzUHw-R.js} +1 -1
  55. package/dist/public/assets/{TimelineDiffPane-BQAeLDdZ.js → TimelineDiffPane-DCCqK3H8.js} +1 -1
  56. package/dist/public/assets/{agent-diff-store-BqTBnCD3.js → agent-diff-store-DI5tXhTu.js} +1 -1
  57. package/dist/public/assets/{auth-state-cache-CFoMX9IK.js → auth-state-cache-CG_XUeO-.js} +1 -1
  58. package/dist/public/assets/{bug-report-send-manager-BVeLqplu.js → bug-report-send-manager-zDc5vC2X.js} +1 -1
  59. package/dist/public/assets/{client-version-D29tmSfy.js → client-version-lhd-bvFR.js} +1 -1
  60. package/dist/public/assets/{comment-chips-vycRkjQG.js → comment-chips-ChSYInGh.js} +1 -1
  61. package/dist/public/assets/{config-provider-Cn54Nsso.js → config-provider-CQmpYETo.js} +3 -3
  62. package/dist/public/assets/{dist-D3fPY7nj2.js → dist-GmWRTOzP2.js} +1 -1
  63. package/dist/public/assets/{doc-paths-82OyHgqG.js → doc-paths-UE_zeyLH.js} +1 -1
  64. package/dist/public/assets/{documents-events-DuT0NGpP.js → documents-events-BgxcR4IL.js} +1 -1
  65. package/dist/public/assets/{file-tree-adapter-QHHr7v_y.js → file-tree-adapter-K79-tTPB.js} +1 -1
  66. package/dist/public/assets/{file-tree-utils-dEjn4DTA.js → file-tree-utils-tuCOKGBG.js} +1 -1
  67. package/dist/public/assets/{folder-config-api-CCs-JTL1.js → folder-config-api-CU0x8rpW.js} +1 -1
  68. package/dist/public/assets/i18n-CW15xoEi.js +1 -0
  69. package/dist/public/assets/index-C3NZCyxs.js +2196 -0
  70. package/dist/public/assets/{lint-config-client-sUKnaDfE.js → lint-config-client-CHv46z_2.js} +1 -1
  71. package/dist/public/assets/{markdownlint-rule-browser-DoSn8IJz.js → markdownlint-rule-browser-BnjfZkl5.js} +1 -1
  72. package/dist/public/assets/{messages-BjsESsFx.js → messages-B4vyk0Oe.js} +1 -1
  73. package/dist/public/assets/{messages-CgRQxqOr.js → messages-Bry-igYF.js} +1 -1
  74. package/dist/public/assets/{messages-B8yzAqdX.js → messages-C-vHgGCq.js} +1 -1
  75. package/dist/public/assets/{messages-DKj1XaXP.js → messages-CyOd2E4x.js} +1 -1
  76. package/dist/public/assets/{messages-rvWZA8Dv.js → messages-Czl8K-VD.js} +1 -1
  77. package/dist/public/assets/{messages-su76b0h7.js → messages-D6n-Lvbi.js} +1 -1
  78. package/dist/public/assets/{messages-B_leGMuj.js → messages-DFdt_O5T.js} +1 -1
  79. package/dist/public/assets/{messages-ClYIPasG.js → messages-DXYzwWT9.js} +1 -1
  80. package/dist/public/assets/{messages-rsgDLMpR.js → messages-DYELQ0Z6.js} +1 -1
  81. package/dist/public/assets/{messages-WY-HJ7CG.js → messages-DcU5DDUm.js} +1 -1
  82. package/dist/public/assets/{messages-DoiuiDAc.js → messages-DmlpLtXS.js} +1 -1
  83. package/dist/public/assets/{messages-XTC09BUs.js → messages-HxBLjyRy.js} +1 -1
  84. package/dist/public/assets/{page-list-cache-SxA5m5if.js → page-list-cache-C3X4L8GH.js} +1 -1
  85. package/dist/public/assets/{pending-receive-nav-store-DY4RHmGg.js → pending-receive-nav-store-DVgOZI59.js} +1 -1
  86. package/dist/public/assets/progress-dpq4llLB.js +9 -0
  87. package/dist/public/assets/{prop-types-CPMCR1bB.js → prop-types-DtbA0trN.js} +1 -1
  88. package/dist/public/assets/{receive-store-DXkS-6fp.js → receive-store-CN9wympB.js} +1 -1
  89. package/dist/public/assets/{selection-context-C2jhGMgO.js → selection-context-CrjxZBGv.js} +1 -1
  90. package/dist/public/assets/{skill-scope-CSgNqFEM.js → skill-scope-Dbjtreno.js} +1 -1
  91. package/dist/public/assets/skills-api-CjF1HVT0.js +1 -0
  92. package/dist/public/assets/{src-COmrouI5.js → src-BlvJjNme.js} +1 -1
  93. package/dist/public/assets/{tag-pill-input-vXWkMHt_.js → tag-pill-input-DiSoMc1e.js} +1 -1
  94. package/dist/public/assets/{target-navigation-intent-B6pF65mo.js → target-navigation-intent-Bti3wCKM.js} +1 -1
  95. package/dist/public/assets/{terminal-cli-display-D8ya3OyM.js → terminal-cli-display-BSCPXe42.js} +1 -1
  96. package/dist/public/assets/{terminal-launch-events-CEw1ZoL3.js → terminal-launch-events-CBiJUoBx.js} +1 -1
  97. package/dist/public/assets/{terminal-telemetry-BkPbxfR9.js → terminal-telemetry-Bq5le7-n.js} +1 -1
  98. package/dist/public/assets/{typing-burst-detector-D8opQPVA.js → typing-burst-detector-mAlBPt1_.js} +3 -3
  99. package/dist/public/assets/{uninstall-D6ZjikLo.js → uninstall-2B6SvOJQ.js} +1 -1
  100. package/dist/public/assets/use-activity-panel-DKoNNsPq.js +1 -0
  101. package/dist/public/assets/{use-apply-config-color-theme-Chbv5kIz.js → use-apply-config-color-theme-DaKv9alx.js} +1 -1
  102. package/dist/public/assets/{use-collab-url-CLES09HL.js → use-collab-url-bAnITYA-.js} +1 -1
  103. package/dist/public/assets/{use-live-xterm-theme-BeGlZWUx.js → use-live-xterm-theme-DkxNKSl2.js} +1 -1
  104. package/dist/public/assets/use-open-skill-BPCb-4s8.js +1 -0
  105. package/dist/public/assets/{use-settings-route-1RDLdzh1.js → use-settings-route-wdvSSekr.js} +1 -1
  106. package/dist/public/assets/{use-skill-origin-BPSEVtzI.js → use-skill-origin-D-1lraVF.js} +1 -1
  107. package/dist/public/assets/use-skills-D-q84Vic.js +1 -0
  108. package/dist/public/assets/{use-terminal-enabled-FDOP0Dht.js → use-terminal-enabled-CiKWUCqJ.js} +1 -1
  109. package/dist/public/assets/{use-timeline-entry-diff-CDYxwT8Z.js → use-timeline-entry-diff-CpLnYL7S.js} +2 -2
  110. package/dist/public/assets/{use-workspace-BuKQ4WE6.js → use-workspace-ClElU10Z.js} +1 -1
  111. package/dist/public/index.html +46 -46
  112. package/dist/public/uninstall.html +4 -4
  113. package/dist/{repair-launch-json-DAAbCvvm.mjs → repair-launch-json-BvNXg6hL.mjs} +2 -2
  114. package/dist/{repair-mcp-configs-BN-aQmcz.mjs → repair-mcp-configs-aNSt_9BT.mjs} +2 -2
  115. package/dist/repair-skills-BI9OFTxB.mjs +1 -0
  116. package/dist/{repair-skills-Dye90u_k.mjs → repair-skills-CPlU1WM5.mjs} +2 -2
  117. package/dist/{resolve-project-root-Bc1ADd86.mjs → resolve-project-root-C70nb-25.mjs} +2 -2
  118. package/dist/{server-lock-DmHwX0B4.mjs → server-lock-BGqc8NMa.mjs} +2 -2
  119. package/dist/server-lock-DuwfbnK9.mjs +1 -0
  120. package/dist/{skill-teardown-D6lPMY6n.mjs → skill-teardown-BfYSeXPm.mjs} +2 -2
  121. package/dist/{src-DYGvbcXO.mjs → src-BK0RpErg.mjs} +2 -2
  122. package/dist/{src-BOzh5nAU.mjs → src-Bh7r8AFJ.mjs} +2 -2
  123. package/dist/src-DsICXqk7.mjs +1 -0
  124. package/dist/{src-CzJVDa-w.mjs → src-aLTXEBdL.mjs} +1 -1
  125. package/dist/src-vY_ilATE.mjs +2038 -0
  126. package/dist/{start-CXzNBszs.mjs → start-CSnxrtYP.mjs} +3 -3
  127. package/dist/start-Dapb2KVv.mjs +1 -0
  128. package/package.json +4 -4
  129. package/dist/constants-CXrNCX02.mjs +0 -2
  130. package/dist/git-handle-Bp1KC5ON.mjs +0 -1
  131. package/dist/init-B-JC6toB.mjs +0 -1
  132. package/dist/loader-CpTJ3qxR.mjs +0 -1
  133. package/dist/md-manager-YCnEcytX.mjs +0 -2
  134. package/dist/preview-D6sAAZcw.mjs +0 -1
  135. package/dist/public/assets/DocumentContext-uEkPWsfu.js +0 -38
  136. package/dist/public/assets/FeedbackForm-jEEgxvE6.js +0 -1
  137. package/dist/public/assets/ManagedArtifactProperties-BPM5-upl.js +0 -1
  138. package/dist/public/assets/ManagedArtifactProperties-gZ33ParZ.js +0 -1
  139. package/dist/public/assets/i18n-CrTwsN89.js +0 -1
  140. package/dist/public/assets/index-uWwSanPO.js +0 -2196
  141. package/dist/public/assets/progress-Cfh7jhIR.js +0 -9
  142. package/dist/public/assets/skills-api-Bk-f3oIn.js +0 -1
  143. package/dist/public/assets/use-activity-panel-Cob7wbER.js +0 -1
  144. package/dist/public/assets/use-open-skill-DggswBlG.js +0 -1
  145. package/dist/public/assets/use-skills-X0D5g-_u.js +0 -1
  146. package/dist/repair-skills-DnJVC8BQ.mjs +0 -1
  147. package/dist/server-lock-0Z4DgFB6.mjs +0 -1
  148. package/dist/src-BqTdx7nf.mjs +0 -2030
  149. package/dist/src-CEwAgAUS.mjs +0 -1
  150. package/dist/start-DCYQqoBl.mjs +0 -1
@@ -295,7 +295,7 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
295
295
  A --> B`};else{let r=iQ(e),i=t===`jsx-block`?aQ(e):[];n={type:`mdxJsxFlowElement`,name:e.name,attributes:r,children:i}}return Dk({type:`root`,children:[n]},{extensions:[ZZ]}).trimEnd()}function sQ(e){let t=[];for(let n of e.props){if(n.hidden===!0)continue;let e={name:n.name,type:n.type,required:n.required};n.description!==void 0&&(e.description=n.description),n.advanced===!0&&(e.advanced=!0),n.omitOnDefault===!0&&(e.omitOnDefault=!0),n.type===`enum`&&(e.values=n.enumValues,n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue)),n.type===`string`&&(n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.language!==void 0&&(e.language=n.language),n.accept!==void 0&&(e.accept=n.accept)),n.type===`boolean`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.type===`number`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),t.push(e)}return t}function cQ(e){return{...tQ(e),example:oQ(e),params:sQ(e)}}function lQ(){return[``,"**Custom canonical components.** OK `.md` / `.mdx` supports the JSX components below. For source syntax + parameter schemas, call `palette({ components: [ids] })`. Arbitrary `<TagName>` JSX falls through as raw MDX when no canonical fits.",``,...$Z().map(tQ).map(e=>`- \`${e.id}\` (${e.kind}) — ${e.description}`)].join(`
296
296
  `)}function uQ(){return[lQ(),``,"Fenced code blocks render naturally and don't need a fetch — including ` ```mermaid ` for diagrams (mermaid label text has sharp edges — `palette({ components: [\"Mermaid\"] })` lists them; parse failures come back as `warnings` entries on write/edit) and ` ```html preview ` for interactive HTML/JS/CSS pages (the fence info-string `preview` token renders the block as a live iframe; works for `html` / `htm` / `xml`; optional `h=` / `w=` tokens set size, e.g. ` ```html preview h=400px `). Use ` ```html preview ` whenever you want anything interactive or JS-powered (charts, demos, calculators, animations) — just author the standalone HTML page in the fence. Call `palette` for the markdown-native component forms (write `> [!NOTE]`, not `<Callout>`), copy-ready themed `html preview` starters, and the theme tokens (`var(--chart-1)`, `var(--foreground)`, …) an embed should reference so it tracks the reader's light/dark theme."].join(`
297
297
  `)}const dQ=f({entries:_(f({level:N([`info`,`warn`,`error`]),message:l().max(8192),event:l().optional(),fields:s(l(),g()).optional(),ts:k().optional(),sourceId:l().optional(),lineNumber:k().optional()}).loose()).max(100),droppedSinceLastFlush:k().int().min(0).optional()}).loose(),fQ=f({accepted:k().int().min(0)}).loose(),pQ=f({exact:l().min(1),prefix:l(),suffix:l(),start:k().int().nonnegative(),end:k().int().nonnegative()}),mQ=_(d([l(),k().int().nonnegative()])),hQ=v(`kind`,[f({kind:A(`body`)}),f({kind:A(`property`),key:l().min(1),path:mQ.default([])})]).default({kind:`body`}),gQ=N([`anchored`,`orphaned`,`resolved`]),_Q=f({threadId:l().min(1),docName:l().min(1),target:hQ,anchor:pQ.nullable(),state:gQ,queued:o(),latestComment:l(),createdBy:l().min(1),createdAt:k(),updatedAt:k().optional()}),vQ=f({docName:l(),instruction:l(),property:l().nullable(),passage:f({exact:l(),prefix:l(),suffix:l()}).nullable(),anchorLost:o(),passageRepeats:o()}).loose(),yQ=f({threadId:l(),ok:A(!0)}),bQ=f({threadId:l(),ok:A(!1),error:A(`not-found`)}),xQ=f({threads:_(_Q)}).loose(),SQ=f({meta:_Q,orphaned:o()}).loose(),CQ=f({threadId:l()}).loose(),wQ=f({meta:_Q,payload:vQ}).loose(),TQ=f({results:_(d([yQ.extend({meta:_Q,payload:vQ}),bQ]))}).loose(),EQ=f({results:_(d([yQ.extend({meta:_Q}),bQ]))}).loose(),DQ=f({status:l().min(1),reason:l()}).loose(),OQ=f({docName:l().min(1),content:l(),lifecycle:DQ.nullable()}).loose(),kQ=f({documents:_(f({kind:N([`document`,`asset`,`folder`,`file`]).default(`document`),docName:l().min(1).optional(),docExt:l().min(1).default(`.md`),size:k().int().nonnegative(),modified:l().min(1),isSymlink:o().default(!1),canonicalDocName:l().nullable().default(null),targetPath:l().nullable().default(null),path:l().min(1).optional(),assetExt:l().min(1).optional(),mediaKind:N([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:_(l().min(1)).optional(),hasChildren:o().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`})),truncated:o().optional()}).loose(),AQ=f({source:l().min(1),anchor:l().nullable(),title:l(),snippet:l().nullable()}).loose(),jQ=f({docName:l().min(1),backlinks:_(AQ)}).loose(),MQ=f({counts:s(l().min(1),k().int().nonnegative())}).loose(),NQ=f({counts:s(l().min(1),k().int().nonnegative())}).loose(),PQ=v(`kind`,[f({kind:A(`doc`),docName:l().min(1),anchor:l().nullable(),title:l(),snippet:l().nullable()}).loose(),f({kind:A(`external`),url:l().min(1),title:l(),snippet:l().nullable()}).loose()]),FQ=f({role:l().min(1),sourceForm:l().min(1),targetKind:l().min(1),href:l(),resolvedTarget:l().nullable(),status:l().min(1),reason:l().nullable(),resolutionMethod:l().min(1),fallbackTarget:l().nullable().default(null),range:f({start:k().int().nonnegative(),end:k().int().nonnegative()}),line:k().int().nonnegative(),column:k().int().nonnegative(),definition:f({label:l(),line:k().int().nonnegative()}).nullable().default(null)}).loose(),IQ=f({docName:l().min(1),forwardLinks:_(PQ),localTargets:_(FQ).optional()}).loose(),LQ=v(`kind`,[f({id:l().min(1),kind:A(`doc`),docName:l().min(1),anchor:l().nullable(),label:l(),cluster:l().nullable(),category:l().nullable(),tags:_(l()).nullable(),managed:o().optional()}).loose(),f({id:l().min(1),kind:A(`external`),url:l().min(1),label:l()}).loose()]),RQ=f({source:l().min(1),target:l().min(1)}).loose(),zQ=f({nodes:_(LQ),links:_(RQ)}).loose(),BQ=f({ts:k().int().min(0),url:l(),method:l(),ua:l().optional(),origin:l().optional(),referer:l().optional(),host:l().optional(),remote:l().optional(),secChUa:l().optional(),secChUaMobile:l().optional(),secChUaPlatform:l().optional(),secFetchSite:l().optional(),secFetchDest:l().optional(),secFetchMode:l().optional(),secFetchUser:l().optional()}).loose(),VQ=f({app:d([A(`cursor`),A(`codex`),A(`claude`),D()]),signals_fired:_(l())}).loose(),HQ=f({entries:_(BQ),count:k().int().min(0),detection:VQ}).loose(),UQ=f({writers:_(f({id:l().min(1),name:l().optional(),email:l().optional()}).loose()).optional(),summary:Bb,...zb}).loose(),WQ=f({checkpointRef:l().min(1)}).loose(),GQ=f({v:k().int().optional(),id:l().min(1),name:l().min(1),colorSeed:l().optional(),docs:_(l()),summaries:_(l()).optional()}).loose(),KQ=f({entries:_(f({sha:l().min(1),timestamp:l().min(1),author:l(),authorEmail:l(),type:N([`checkpoint`,`wip`,`upstream`,`park`]),message:l(),contributors:_(GQ),checkpoint:g().nullable(),parentSha:l().nullable().optional()}).loose()),total:k().int().nonnegative().optional(),truncated:o().optional(),hasMore:o().optional()}).loose(),qQ=f({sha:l().regex(/^[0-9a-f]{40}$/i),content:l(),timestamp:l(),author:l()}).loose(),JQ=f({contentDir:l().min(1),pathSeparator:N([`/`,`\\`]),symlinkResolved:o()}).loose(),YQ=_(v(`source`,[f({docName:l().min(1),timestamp:l().min(1),size:k().int().nonnegative(),source:A(`flat`)}).loose(),f({docName:l().min(1),timestamp:l().min(1),source:A(`timeline`),sha:l().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),XQ=f({domain:l().min(1),title:l().optional(),description:l().optional(),siteName:l().optional(),faviconDataUri:l().optional()}).loose(),ZQ=f({url:l()}).loose(),QQ=v(`ok`,[f({ok:A(!0),metadata:XQ}).loose(),f({ok:A(!1),reason:l()}).loose()]),$Q=f({orphans:_(f({docName:l().min(1),title:l()}).loose())}).loose(),e$=f({hubs:_(f({docName:l().min(1),title:l(),count:k().int().nonnegative()}).loose())}).loose(),t$=f({source:l().min(1),title:l(),snippet:l().nullable()}).loose(),n$=f({deadLinks:_(f({target:l().min(1),sources:_(t$)}).loose())}).loose(),r$=f({target:f({docName:l().min(1),title:l(),aliases:_(l())}).loose(),mentions:_(f({source:l().min(1),excerpt:l(),offset:k().int().nonnegative()}).loose()),truncated:o()}).loose(),i$=f({projectPath:l().min(1)}).loose(),a$=N([`not-a-git-worktree`,`init-failed`]),o$=v(`ok`,[f({ok:A(!0),projectPath:l().min(1)}).loose(),f({ok:A(!1),reason:a$,message:l().min(1)}).loose()]),s$=f({host:l().min(1).optional()}).loose(),c$=f({host:l().min(1).optional(),token:l().min(1)}).loose(),l$=f({host:l(),login:l()}).loose(),u$=f({key:l().min(1)}).loose(),d$=f({keyPresent:o()}).loose(),f$=N([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),p$=v(`ok`,[f({ok:A(!0),endpoint:l().min(1),model:l().min(1),dimensions:k().int().positive()}).loose(),f({ok:A(!1),endpoint:l().min(1),model:l().min(1),reason:f$,status:k().int().optional()}).loose()]),m$=f({name:l().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:l().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),h$=f({authenticated:o()}).loose(),g$=f({channel:N([`login`,`gh-login`]).default(`login`)}).loose(),_$=f({}).loose(),v$={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function y$(e){if(e.trim()===``)return{doc:new ht.Document({}),map:{}};let t;try{t=(0,ht.parseDocument)(e)}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new ht.Document({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=wX.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function b$(e){return Object.keys(e).length===0?``:new ht.Document(e).toString(v$)}function x$(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function S$(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=(0,ht.isSeq)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(x$(n)){let r=e.createNode(n),i=(0,ht.isMap)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function C$(e){return e===``?``:`---\n${e.endsWith(`
298
- `)?e.slice(0,-1):e}\n---\n`}function w$(e){let t=e.contents;return typeof t!=`object`||!t||!(`items`in t)?[]:t.items.map(e=>{let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}).filter(e=>e!==null)}function T$(e){let t=e.match(ch);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function E$(e){if(e.trim()===``)return{doc:new ht.Document({}),map:{}};let t;try{t=(0,ht.parseDocument)(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new ht.Document({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=wX.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function D$(e){return e===``?{doc:new ht.Document({}),map:{}}:E$(dh(e))}function O$(e){let{fenced:t}=T$(e),{map:n}=D$(t);return n??{}}function k$(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function A$(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:C$(e.toString(v$))}function j$(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:65536}:null}function M$(e){let t=A$(e),n=j$(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function N$(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:`frontmatter`}};let{doc:n,map:r}=D$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{k$(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=SX.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,S$(n,n.get(e,!0),t.data))}return M$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}const P$=f({changes:_(v(`kind`,[f({key:l(),kind:A(`added`),after:SX}).loose(),f({key:l(),kind:A(`removed`),before:SX}).loose(),f({key:l(),kind:A(`changed`),before:SX,after:SX}).loose()])),unparseable:f({before:l(),after:l()}).loose().nullable()}).loose();function F$(e){let{fenced:t}=T$(e),n=D$(t);if(n.map===null)return{fenced:t,map:{},keys:[],parseError:n.parseError};let r=w$(n.doc);return{fenced:t,map:n.map,keys:r.length>0?r:Object.keys(n.map),parseError:void 0}}function I$(e,t){let n=F$(e),r=F$(t);if(n.parseError!==void 0||r.parseError!==void 0)return{changes:[],unparseable:{before:n.fenced,after:r.fenced}};let i=[],a=new Set;for(let e of r.keys){if(a.has(e))continue;a.add(e);let t=r.map[e];if(t===void 0)continue;let o=n.map[e];if(o===void 0){i.push({key:e,kind:`added`,after:t});continue}EX(o,t)||i.push({key:e,kind:`changed`,before:o,after:t})}for(let e of n.keys){if(a.has(e))continue;a.add(e);let t=n.map[e];t!==void 0&&i.push({key:e,kind:`removed`,before:t})}return{changes:i,unparseable:null}}const L$=f({stackIndex:k().int().min(0),ts:k().int().min(0),additions:k().int().min(0),deletions:k().int().min(0)}).loose(),R$=f({docName:l().min(1),additionsTotal:k().int().min(0),deletionsTotal:k().int().min(0),lastTs:k().int().min(0),bursts:_(L$)}).loose(),z$=f({displayName:l().min(1),color:l().min(1),icon:l().optional(),connectionId:l().min(1)}).loose(),B$=f({sessionAlive:o(),agent:z$.nullable(),files:_(R$)}).loose(),V$=f({diff:l(),before:l(),after:l(),properties:P$,generatedAt:k().int().min(0)}).loose(),H$=f({}).loose(),U$=f({}).loose(),W$=f({}).loose(),G$=f({}).loose(),K$=f({}).loose(),q$=f({}).loose(),J$=f({displayName:l().min(1),icon:l(),color:l().min(1),currentDoc:l().nullable(),mode:N([`idle`,`writing`]),ts:k().int().min(0)}).loose(),Y$=f({presence:s(l().min(1),J$)}).loose(),X$=f({sessionId:l().min(1),agentType:l().min(1),ts:k().int().min(0),insertedChars:k().int().min(0),deletedChars:k().int().min(0)}).loose(),Z$=f({effects:_(f({"doc.name":l().min(1),entries:_(X$)}).loose())}).loose(),Q$=f({decisions:_(f({ts:k().int().min(0),decision:l().min(1),kind:l().min(1),"doc.name":l().min(1),pathRole:l().min(1)}).loose())}).loose(),$$=s(l().min(1),o()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});f({path:l().min(1,`path must be non-empty`)}).loose();const e1=f({}).loose(),t1=f({fromDocName:l().min(1),toDocName:l().min(1)}).loose(),n1=f({fromPath:l().min(1),toPath:l().min(1)}).loose(),r1=f({}).loose(),i1=f({path:l().min(1),...zb,summary:Bb}).loose(),a1=f({docName:l().min(1)}).loose(),o1=f({path:l().min(1),...zb,summary:Bb}).loose(),s1=f({path:l().min(1)}).loose(),c1=f({kind:N([`file`,`folder`]),path:l().min(1),...zb,summary:Bb}).loose(),l1=f({kind:N([`file`,`folder`]),path:l().min(1),duplicatedDocNames:_(l().min(1))}).loose(),u1=f({pages:_(f({docName:l().min(1),title:l(),docExt:l().min(1),size:k().int().nonnegative(),modified:l().min(1),icon:l().min(1).max(2048).optional()}).loose())}).loose(),d1=f({level:k().int().min(1).max(6),text:l(),slug:l()}).loose(),f1=f({docName:l().min(1),headings:_(d1)}).loose(),p1=f({docName:l().min(1),rewrites:k().int().nonnegative()}).loose(),m1=f({kind:N([`file`,`folder`,`asset`]),fromPath:l().min(1),toPath:l().min(1),...zb,summary:Bb}).loose(),h1=f({renamed:_(t1),renamedAssets:_(n1),rewrittenDocs:_(p1).optional(),summary:jX.optional()}).loose(),g1=f({kind:N([`file`,`folder`,`asset`]),path:l().min(1),...zb}).loose(),_1=f({deletedDocNames:_(l().min(1))}).loose(),v1=f({kind:N([`file`,`folder`,`asset`]),path:l().min(1),...zb,summary:Bb}).loose(),y1=f({deletedDocNames:_(l().min(1))}).loose(),b1=f({docName:l().min(1),commitSha:l().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:Bb,...zb}).loose(),x1=f({restoredFrom:l().min(1),timestamp:l().min(1),summary:jX.optional(),warning:NX.optional(),warnings:BX.optional()}).loose(),S1=/^#[0-9a-fA-F]{6}$/,C1=f(Object.fromEntries(le.map(e=>[e,l().regex(S1,`must be a #rrggbb hex color`)]))),w1=l().min(1).refine(y,{message:`must contain a non-whitespace character`}),T1=f({name:w1,author:w1.optional(),variant:N([`dark`,`light`]),palette:C1}).loose(),E1=f({name:l().min(1),scheme:T1,stem:l().min(1).optional(),extension:N([`.yaml`,`.yml`]).optional()}).loose(),D1=f({id:l().min(1),filename:l().min(1)}).loose(),O1=f({id:l().min(1),scheme:T1}).loose(),k1=f({id:l().min(1),filename:l().min(1)}).loose(),A1=v(`existed`,[f({existed:A(!1)}).loose(),f({existed:A(!0),filename:l().min(1),scheme:T1}).loose()]),j1=f({themes:_(v(`ok`,[f({ok:A(!0),id:l().min(1),filename:l().min(1),scheme:T1}),f({ok:A(!1),filename:l().min(1),id:l().min(1).optional(),code:l().min(1),conflictingFilenames:_(l().min(1)).min(2).optional()})])),truncated:o()}).loose(),M1=N([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),N1=f({label:l().min(1),webUrl:ue().nullable()}).loose(),P1=v(`checkStatus`,[f({checkStatus:A(`allowed`)}).loose(),f({checkStatus:A(`denied`),deniedReason:N([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:l().optional(),declaredLogin:l().optional(),declaredSource:l().optional()}).loose(),f({checkStatus:A(`unknown`),unknownError:N([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),F1=N([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),I1=N(re),L1=N([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]),R1=f({state:M1,lastSyncUtc:l().nullable(),lastFetchUtc:l().nullable(),lastPushedSha:l().nullable(),ahead:k().int().min(0),behind:k().int().min(0),consecutiveFailures:k().int().min(0),conflictCount:k().int().min(0),hasRemote:o(),syncEnabled:o(),identityUnresolved:o(),remote:N1.nullable().optional(),pushError:l().optional(),pushErrorCode:F1.optional(),pullError:l().optional(),pullErrorCode:F1.optional(),pausedReason:l().optional(),pushPermission:P1.optional(),syncMode:I1.optional(),lastPullUtc:l().nullable().optional(),lastPullOutcome:L1.nullable().optional()}).loose(),z1=f({op:N([`sync`,`push`,`pull`]).optional()}).loose(),B1=f({op:N([`sync`,`push`,`pull`])}).loose(),V1=f({conflicts:_(f({file:l().min(1),detectedAt:l().min(1),oursSha:l().optional(),theirsSha:l().optional(),baseSha:l().optional()}).loose())}).loose(),H1=f({file:l().min(1),strategy:N([`mine`,`theirs`,`content`,`delete`]),content:l().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),U1=f({}).loose(),W1=f({file:l().min(1),base:l(),ours:l(),theirs:l(),kind:N([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:l().nullable()}).loose(),G1=f({plan:ce(e=>e!==void 0,{message:`plan is required`})}).loose(),K1=f({plan:ce(e=>e!==void 0,{message:`plan is required`})}).loose(),q1=f({result:ce(e=>e!==void 0,{message:`result is required`})}).loose(),J1=f({packId:l().min(1)}).strict(),Y1=f({installedHosts:_(l()),skills:_(f({name:l().min(1),created:o()}).strict())}).strict(),X1=f({path:l().min(1),summary:l().min(1)}).loose(),Z1=f({files:k().int().nonnegative(),folders:k().int().nonnegative()}).loose(),Q1=f({packs:_(f({id:l().min(1),name:l().min(1),description:l().min(1),defaultSubfolder:l().optional(),folders:_(X1),entryCounts:Z1}).loose())}).loose(),$1=f({noOpen:o().optional(),out:l().min(1).optional()}).loose(),e0=f({reason:N([`unsupported-platform`,`spawn-error`]),message:l()}).loose(),t0=v(`status`,[f({status:A(`installed`),outputPath:l(),size:k().int().nonnegative(),sha256:l(),skillVersion:l()}).loose(),f({status:A(`built`),outputPath:l(),size:k().int().nonnegative(),sha256:l(),skillVersion:l(),handoffError:e0.optional()}).loose(),f({status:A(`failed`),buildError:l()}).loose(),f({status:A(`skip-current`),skillVersion:l(),recordedAt:l().optional()}).loose()]),n0=N(kn),r0=N(An);function i0(e){return e===`agents`||An.includes(e)}const a0=f({alwaysOn:k().int().nonnegative(),onTrigger:k().int().nonnegative(),onDemand:k().int().nonnegative()}).strict(),o0=[`.md`,`.mdx`,`.txt`];function s0(e){return Math.round(e/4)}function c0(e){let t=e.lastIndexOf(`.`);return t===-1?!1:o0.includes(e.slice(t).toLowerCase())}function l0(e){let t=s0((e.name??``).length+(e.description??``).length),n=s0(lh(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||c0(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:s0(i)}}const u0=f({tags:_(f({name:l().min(1),count:k().int().nonnegative(),isLeaf:o()}).loose())}).loose(),d0=f({docName:l().min(1),title:l(),matchingTags:_(l().min(1)),snippet:l().nullable()}).loose(),f0=f({name:l().min(1),docs:_(d0)}).loose(),p0=f({folder:g(),frontmatter_local:s(l(),g()).nullable()}).loose(),m0=f({path:l(),frontmatter:s(l(),g()).optional()}).loose(),h0=f({applied:g()}).loose(),g0=s(l(),g()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),_0=f({template:f({name:l().min(1),folder:l(),scope:N([`local`,`inherited`]),path:l().min(1),frontmatter:g0,body:l()}).strict()}).strict(),v0=f({templates:_(f({name:l().min(1),title:l().optional(),description:l().optional(),path:l().min(1),source_folder:l()}).strict()),truncated:o()}).strict(),y0=f({folder:l(),name:l(),body:l().optional(),frontmatter:g0.optional(),...zb,summary:Bb}).strict(),b0=f({path:l().min(1),created:o(),warnings:_(l())}).strict(),x0=f({sourcePath:l().min(1),targetFolder:l(),name:l().optional(),title:l().optional(),deleteSource:o().optional(),...zb,summary:Bb}).strict(),S0=f({path:l().min(1),created:o(),warnings:_(l())}).strict(),C0=f({existed:o(),path:l().min(1)}).strict(),w0=f({fromFolder:l(),fromName:l(),toFolder:l(),toName:l(),body:l().optional(),frontmatter:g0.optional(),...zb,summary:Bb}).strict(),T0=f({from:l().min(1),to:l().min(1),committed:o()}).strict(),E0=N(en),D0=/^[a-z0-9-]+$/,O0=/<\/?[A-Za-z][^>]*>/;function k0(e){return O0.test(e)}const A0=/^[A-Za-z0-9_-]+$/,j0=f({name:l(),description:l(),metadata:f({pack:l()}).strict().optional()}).strict(),M0=f({skill:f({name:l().min(1),scope:E0,path:l().min(1),frontmatter:j0,body:l(),files:_(f({path:l().min(1),text:l().nullable()})).optional(),managed:o().optional()}).strict()}).strict(),N0=f({source:l().min(1),publisher:l().optional(),skill:l().optional(),marketplaceUrl:l().optional(),importedAt:l().min(1),autoUpdate:o().optional()}).strict(),P0=f({name:l().min(1),description:l().optional(),scope:E0,path:l().min(1),canonicalPath:l().min(1).optional(),absolutePath:l().min(1).optional(),installed:o(),hosts:_(l()),hostQualifier:l().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:_(l()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:s(l(),l()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:_(l()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:_(l()).optional(),installableEditors:_(l()).optional(),linkMode:o().optional(),customPlacements:_(f({path:l(),mode:N([`copy`,`link`])}).strict()).optional(),plugin:f({name:l().min(1),marketplace:l().min(1),provider:l().min(1),url:l().optional()}).strict().optional(),managed:o().optional(),origin:N0.optional(),pack:l().optional(),modified:o().optional(),revertable:o().optional(),ignored:o().optional(),size:a0.optional()}).strict(),F0=f({name:l().min(1),scope:E0,apply:o().optional()}).strict(),I0=f({line:l().min(1),gitignorePath:l().min(1),applied:o(),alreadyTracked:o().optional()}).strict(),L0=f({skills:_(P0),truncated:o()}).strict(),R0=f({scope:E0.default(`project`),name:l().meta({description:`Managed skill name to create or update.`}),body:l().optional(),frontmatter:j0,...zb,summary:Bb}).strict(),z0=f({path:l().min(1),created:o(),warnings:_(l())}).strict(),B0=f({scope:E0.default(`project`),name:l(),dryRun:o().optional(),setAutoUpdate:o().optional(),...zb,summary:Bb}).strict(),V0=f({name:l().min(1),updated:o(),source:l().min(1),localBody:l().optional(),upstreamBody:l().optional(),gitTracked:o().optional(),warnings:_(l())}).strict(),H0=f({scope:E0.default(`project`),name:l(),...zb,summary:Bb}).strict(),U0=f({name:l().min(1),baselineRef:l().min(1),restoredFiles:_(l()),warnings:_(l())}).strict(),W0=f({existed:o(),path:l().min(1)}).strict(),G0=f({scope:E0.default(`project`),fromName:l(),toName:l(),body:l().optional(),frontmatter:j0.optional(),...zb,summary:Bb}).strict(),K0=f({from:l().min(1),to:l().min(1),committed:o()}).strict(),q0=f({name:l(),fromScope:E0,toScope:E0,...zb,summary:Bb}).strict(),J0=f({scope:E0,path:l().optional()}).strict(),Y0=f({scope:E0,name:l(),toName:l(),...zb,summary:Bb}).strict(),X0=f({name:l().min(1)}).strict(),Z0=f({name:l(),home:l().min(1)}).strict(),Q0=f({docName:l().min(1)}).strict(),$0=N([`reference`,`script`,`file`]),e2=f({scope:E0.default(`project`),name:l(),path:l().min(1),content:l(),...zb,summary:Bb}).strict(),t2=f({path:l().min(1),created:o(),kind:$0,content:o()}).strict(),n2=f({scope:E0.default(`project`),name:l(),from:l().min(1),to:l().min(1),...zb,summary:Bb}).strict(),r2=f({from:l().min(1),to:l().min(1),fromDocName:l().optional(),toDocName:l().optional()}).strict(),i2=f({path:l().min(1),kind:$0,text:l()}).strict(),a2=f({path:l().min(1),existed:o(),kind:$0}).strict(),o2=d([r0,A(`agents`)]),s2=l().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),c2=d([o2,s2]),l2=f({scope:E0.default(`project`),name:l(),targets:_(o2).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:_(c2).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:_(c2).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:N([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:c2.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:o().optional(),setSource:l().min(1).optional(),place:f({dir:l().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:N([`copy`,`link`])}).strict().optional(),convert:f({target:c2.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:N([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:f({path:l().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...zb,summary:Bb,fork:f({editor:l().min(1),action:N([`align`,`make-source`,`rename`]),toName:l().optional()}).strict().optional()}).strict().refine(e=>!(e.targets!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>!(e.source!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),u2=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`],d2=f({name:l().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:_(l()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:o().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:_(l()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:_(N(u2)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:l().optional(),sourceMovedTo:l().optional()}).strict(),f2=f({scope:E0.default(`project`),name:l().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),p2=f({name:l().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:o().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict(),m2=f({targets:_(n0),configured:o(),folders:_(f({scope:E0,host:l(),root:l(),state:N([`own`,`linked`,`linked-parent`,`absent`]),target:l().optional(),drift:A(!0).optional(),expected:l().optional()}).strict()).optional()}).strict(),h2=f({action:A(`link`),scope:E0,root:l().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:l().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),g2=f({action:A(`unlink`),scope:E0,root:l().min(1).meta({description:`The linked folder to materialize back.`}),exclude:_(l().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),_2=f({action:A(`add-root`),scope:E0,root:s2.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),v2=v(`action`,[h2.extend({preview:o().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),g2,_2]),y2=v(`action`,[h2.strict(),g2,_2]),b2=f({folderAction:v2}).strict(),x2=f({moves:_(l()),drops:_(l()),removes:_(l()),replaces:_(l()),conflicts:_(l()),strays:_(l())}).strict(),S2=f({targets:_(n0),reprojected:_(f({name:l(),hosts:_(l())}).strict()),bundleHosts:_(l()),removedFrom:_(l()),folder:f({moved:_(l()),dropped:_(l()),linked:_(l())}).strict().optional(),preview:x2.optional()}).strict(),C2=f({scope:E0.default(`project`),name:l(),version:l().regex(/^[0-9a-f]{40}$/i),...zb,summary:Bb}).strict(),w2=f({name:l().min(1),version:l(),restoredFiles:_(l()),warnings:_(l())}).strict(),T2=f({query:l().optional(),intent:N([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:N([`navigation`,`relevance`]).optional(),scopes:_(N([`page`,`folder`,`content`,`file`])).optional(),scope:l().optional(),limit:k().int().nonnegative().optional(),semantic:o().optional(),source:N([`omnibar`,`mcp`,`http`]).optional()}).loose(),E2=f({kind:N([`page`,`folder`,`content`,`file`]),path:l().min(1),title:l(),score:k(),signals:s(l(),g()),snippet:l().optional()}).loose(),D2=f({capable:o(),applied:o(),coverage:f({embedded:k().int().nonnegative(),total:k().int().nonnegative()})}).loose(),O2=f({enabled:o(),keyPresent:o(),keyNotRequired:o(),keySource:N([`project`,`file`,`env`]).nullable(),keyHint:l().nullable(),ready:o(),capable:o(),embedded:k().int().nonnegative(),total:k().int().nonnegative()}).loose(),k2=f({query:l(),intent:N([`autocomplete`,`full_text`,`omnibar`]),results:_(E2),elapsedMs:k().nonnegative(),semantic:D2.optional(),truncated:o().optional(),ready:o().optional()}).loose(),A2=f({version:l().min(1),recordedAt:l().min(1)}).loose(),j2=f({currentVersion:l().min(1),targets:s(l(),A2.nullable())}).loose(),M2=f({scope:E0.default(`project`),source:l().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:l().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:o().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:o().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...zb,summary:Bb}).strict(),N2=f({scope:E0.default(`project`),source:l().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:_(l().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:o().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:o().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...zb,summary:Bb}).strict(),P2=f({results:_(f({requested:l(),status:N([`imported`,`already-imported`,`not-found`,`failed`]),name:l().optional(),collisionRenamedFrom:l().optional(),warnings:_(l()),error:l().optional()}).loose()),imported:k(),alreadyImported:k(),failed:k()}).loose(),F2=f({scope:E0.default(`project`),names:_(l().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...zb,summary:Bb}).strict(),I2=f({results:_(f({requested:l(),status:N([`updated`,`up-to-date`,`not-found`,`failed`]),source:l().optional(),warnings:_(l()),error:l().optional()}).loose()),updated:k(),upToDate:k(),failed:k()}).loose(),L2=f({source:l(),ref:l().optional(),contentHash:l(),publisher:l().optional()}).loose(),R2=f({name:l().min(1).meta({description:`Managed skill name created or matched.`}),path:l().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:o().meta({description:`True when this request created new source files.`}),alreadyImported:o().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:l().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:L2,warnings:_(l()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`})}).loose(),z2=`server-info`,B2=`branch-switched`,V2=`disk-ack`,H2=`config-validation-rejected`,U2=`config-ignore-nested-error`,W2=N([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),G2=f({v:A(1),ch:A(z2),seq:k(),serverInstanceId:l().min(1),currentBranch:l().min(1).optional()}).loose(),K2=f({v:A(1),ch:A(B2),seq:k(),branch:l().min(1)}).loose(),q2=f({v:A(1),ch:W2,seq:k()}).loose(),J2=f({v:A(1),ch:A(V2),seq:k(),docName:l().min(1),sv:l().min(1)}).loose(),Y2=f({v:A(1),ch:A(H2),seq:k(),docName:l().min(1),error:ee}).loose(),X2=f({v:A(1),ch:A(U2),seq:k(),path:l().min(1),error:l().min(1)}).loose();function Z2(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function Q2(e){return e.reason!==void 0||Z2(e.note)!==void 0||Z2(e.email)!==void 0}function $2(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol===`https:`)return t;let n=t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`;return t.protocol===`http:`&&n?t:null}function e4(){return $2((typeof process>`u`?void 0:Z2(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function t4(e){let t=Z2(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function n4(e,t,n){try{let r=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t),signal:AbortSignal.timeout(n)});if(r.ok){let e=await r.json().catch(()=>null);return{ok:!0,reference:typeof e?.reference==`string`?e.reference:``}}return r.status===400||r.status===413?{ok:!1,reason:`invalid`}:r.status===503?{ok:!1,reason:`unavailable`}:{ok:!1,reason:`error`}}catch(e){return{ok:!1,reason:e instanceof Error&&(e.name===`TimeoutError`||e.name===`AbortError`)?`timeout`:`error`}}}async function r4(e,t={}){let n=e4();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=Z2(e.note),a=t4(e.email),o={kind:`uninstall`,reasons:e.reason===void 0?[]:[e.reason],...i===void 0?{}:{message:i},appVersion:e.appVersion,platform:e.platform,source:e.source},s=Date.now()+(t.timeoutMs??4e3),c=()=>s-Date.now();if(a===void 0)return n4(r,o,c());let l=await n4(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:n4(r,o,c())}var i4=t(r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``;break}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
298
+ `)?e.slice(0,-1):e}\n---\n`}function w$(e){let t=e.contents;return typeof t!=`object`||!t||!(`items`in t)?[]:t.items.map(e=>{let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}).filter(e=>e!==null)}function T$(e){let t=e.match(ch);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function E$(e){if(e.trim()===``)return{doc:new ht.Document({}),map:{}};let t;try{t=(0,ht.parseDocument)(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new ht.Document({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=wX.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function D$(e){return e===``?{doc:new ht.Document({}),map:{}}:E$(dh(e))}function O$(e){let{fenced:t}=T$(e),{map:n}=D$(t);return n??{}}function k$(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function A$(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:C$(e.toString(v$))}function j$(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:65536}:null}function M$(e){let t=A$(e),n=j$(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function N$(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:`frontmatter`}};let{doc:n,map:r}=D$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{k$(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=SX.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,S$(n,n.get(e,!0),t.data))}return M$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}const P$=f({changes:_(v(`kind`,[f({key:l(),kind:A(`added`),after:SX}).loose(),f({key:l(),kind:A(`removed`),before:SX}).loose(),f({key:l(),kind:A(`changed`),before:SX,after:SX}).loose()])),unparseable:f({before:l(),after:l()}).loose().nullable()}).loose();function F$(e){let{fenced:t}=T$(e),n=D$(t);if(n.map===null)return{fenced:t,map:{},keys:[],parseError:n.parseError};let r=w$(n.doc);return{fenced:t,map:n.map,keys:r.length>0?r:Object.keys(n.map),parseError:void 0}}function I$(e,t){let n=F$(e),r=F$(t);if(n.parseError!==void 0||r.parseError!==void 0)return{changes:[],unparseable:{before:n.fenced,after:r.fenced}};let i=[],a=new Set;for(let e of r.keys){if(a.has(e))continue;a.add(e);let t=r.map[e];if(t===void 0)continue;let o=n.map[e];if(o===void 0){i.push({key:e,kind:`added`,after:t});continue}EX(o,t)||i.push({key:e,kind:`changed`,before:o,after:t})}for(let e of n.keys){if(a.has(e))continue;a.add(e);let t=n.map[e];t!==void 0&&i.push({key:e,kind:`removed`,before:t})}return{changes:i,unparseable:null}}const L$=f({stackIndex:k().int().min(0),ts:k().int().min(0),additions:k().int().min(0),deletions:k().int().min(0)}).loose(),R$=f({docName:l().min(1),additionsTotal:k().int().min(0),deletionsTotal:k().int().min(0),lastTs:k().int().min(0),bursts:_(L$)}).loose(),z$=f({displayName:l().min(1),color:l().min(1),icon:l().optional(),connectionId:l().min(1)}).loose(),B$=f({sessionAlive:o(),agent:z$.nullable(),files:_(R$)}).loose(),V$=f({diff:l(),before:l(),after:l(),properties:P$,generatedAt:k().int().min(0)}).loose(),H$=f({}).loose(),U$=f({}).loose(),W$=f({}).loose(),G$=f({}).loose(),K$=f({}).loose(),q$=f({}).loose(),J$=f({displayName:l().min(1),icon:l(),color:l().min(1),currentDoc:l().nullable(),mode:N([`idle`,`writing`]),ts:k().int().min(0)}).loose(),Y$=f({presence:s(l().min(1),J$)}).loose(),X$=f({sessionId:l().min(1),agentType:l().min(1),ts:k().int().min(0),insertedChars:k().int().min(0),deletedChars:k().int().min(0)}).loose(),Z$=f({effects:_(f({"doc.name":l().min(1),entries:_(X$)}).loose())}).loose(),Q$=f({decisions:_(f({ts:k().int().min(0),decision:l().min(1),kind:l().min(1),"doc.name":l().min(1),pathRole:l().min(1)}).loose())}).loose(),$$=s(l().min(1),o()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`});f({path:l().min(1,`path must be non-empty`)}).loose();const e1=f({}).loose(),t1=f({fromDocName:l().min(1),toDocName:l().min(1)}).loose(),n1=f({fromPath:l().min(1),toPath:l().min(1)}).loose(),r1=f({}).loose(),i1=f({path:l().min(1),...zb,summary:Bb}).loose(),a1=f({docName:l().min(1)}).loose(),o1=f({path:l().min(1),...zb,summary:Bb}).loose(),s1=f({path:l().min(1)}).loose(),c1=f({kind:N([`file`,`folder`]),path:l().min(1),...zb,summary:Bb}).loose(),l1=f({kind:N([`file`,`folder`]),path:l().min(1),duplicatedDocNames:_(l().min(1))}).loose(),u1=f({pages:_(f({docName:l().min(1),title:l(),docExt:l().min(1),size:k().int().nonnegative(),modified:l().min(1),icon:l().min(1).max(2048).optional()}).loose())}).loose(),d1=f({level:k().int().min(1).max(6),text:l(),slug:l()}).loose(),f1=f({docName:l().min(1),headings:_(d1)}).loose(),p1=f({docName:l().min(1),rewrites:k().int().nonnegative()}).loose(),m1=f({kind:N([`file`,`folder`,`asset`]),fromPath:l().min(1),toPath:l().min(1),...zb,summary:Bb}).loose(),h1=f({renamed:_(t1),renamedAssets:_(n1),rewrittenDocs:_(p1).optional(),summary:jX.optional()}).loose(),g1=f({kind:N([`file`,`folder`,`asset`]),path:l().min(1),...zb}).loose(),_1=f({deletedDocNames:_(l().min(1))}).loose(),v1=f({kind:N([`file`,`folder`,`asset`]),path:l().min(1),...zb,summary:Bb}).loose(),y1=f({deletedDocNames:_(l().min(1))}).loose(),b1=f({docName:l().min(1),commitSha:l().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:Bb,...zb}).loose(),x1=f({restoredFrom:l().min(1),timestamp:l().min(1),summary:jX.optional(),warning:NX.optional(),warnings:BX.optional()}).loose(),S1=/^#[0-9a-fA-F]{6}$/,C1=f(Object.fromEntries(le.map(e=>[e,l().regex(S1,`must be a #rrggbb hex color`)]))),w1=l().min(1).refine(y,{message:`must contain a non-whitespace character`}),T1=f({name:w1,author:w1.optional(),variant:N([`dark`,`light`]),palette:C1}).loose(),E1=f({name:l().min(1),scheme:T1,stem:l().min(1).optional(),extension:N([`.yaml`,`.yml`]).optional()}).loose(),D1=f({id:l().min(1),filename:l().min(1)}).loose(),O1=f({id:l().min(1),scheme:T1}).loose(),k1=f({id:l().min(1),filename:l().min(1)}).loose(),A1=v(`existed`,[f({existed:A(!1)}).loose(),f({existed:A(!0),filename:l().min(1),scheme:T1}).loose()]),j1=f({themes:_(v(`ok`,[f({ok:A(!0),id:l().min(1),filename:l().min(1),scheme:T1}),f({ok:A(!1),filename:l().min(1),id:l().min(1).optional(),code:l().min(1),conflictingFilenames:_(l().min(1)).min(2).optional()})])),truncated:o()}).loose(),M1=N([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),N1=f({label:l().min(1),webUrl:ue().nullable()}).loose(),P1=v(`checkStatus`,[f({checkStatus:A(`allowed`)}).loose(),f({checkStatus:A(`denied`),deniedReason:N([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:l().optional(),declaredLogin:l().optional(),declaredSource:l().optional()}).loose(),f({checkStatus:A(`unknown`),unknownError:N([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),F1=N([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),I1=N(re),L1=N([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]),R1=f({state:M1,lastSyncUtc:l().nullable(),lastFetchUtc:l().nullable(),lastPushedSha:l().nullable(),ahead:k().int().min(0),behind:k().int().min(0),consecutiveFailures:k().int().min(0),conflictCount:k().int().min(0),hasRemote:o(),syncEnabled:o(),identityUnresolved:o(),remote:N1.nullable().optional(),pushError:l().optional(),pushErrorCode:F1.optional(),pullError:l().optional(),pullErrorCode:F1.optional(),pausedReason:l().optional(),pushPermission:P1.optional(),syncMode:I1.optional(),lastPullUtc:l().nullable().optional(),lastPullOutcome:L1.nullable().optional()}).loose(),z1=f({op:N([`sync`,`push`,`pull`]).optional()}).loose(),B1=f({op:N([`sync`,`push`,`pull`])}).loose(),V1=f({conflicts:_(f({file:l().min(1),detectedAt:l().min(1),oursSha:l().optional(),theirsSha:l().optional(),baseSha:l().optional()}).loose())}).loose(),H1=f({file:l().min(1),strategy:N([`mine`,`theirs`,`content`,`delete`]),content:l().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),U1=f({}).loose(),W1=f({file:l().min(1),base:l(),ours:l(),theirs:l(),kind:N([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:l().nullable()}).loose(),G1=f({plan:ce(e=>e!==void 0,{message:`plan is required`})}).loose(),K1=f({plan:ce(e=>e!==void 0,{message:`plan is required`})}).loose(),q1=f({result:ce(e=>e!==void 0,{message:`result is required`})}).loose(),J1=f({packId:l().min(1)}).strict(),Y1=f({installedHosts:_(l()),skills:_(f({name:l().min(1),created:o()}).strict())}).strict(),X1=f({path:l().min(1),summary:l().min(1)}).loose(),Z1=f({files:k().int().nonnegative(),folders:k().int().nonnegative()}).loose(),Q1=f({packs:_(f({id:l().min(1),name:l().min(1),description:l().min(1),defaultSubfolder:l().optional(),folders:_(X1),entryCounts:Z1}).loose())}).loose(),$1=f({noOpen:o().optional(),out:l().min(1).optional()}).loose(),e0=f({reason:N([`unsupported-platform`,`spawn-error`]),message:l()}).loose(),t0=v(`status`,[f({status:A(`installed`),outputPath:l(),size:k().int().nonnegative(),sha256:l(),skillVersion:l()}).loose(),f({status:A(`built`),outputPath:l(),size:k().int().nonnegative(),sha256:l(),skillVersion:l(),handoffError:e0.optional()}).loose(),f({status:A(`failed`),buildError:l()}).loose(),f({status:A(`skip-current`),skillVersion:l(),recordedAt:l().optional()}).loose()]),n0=N(kn),r0=N(An);function i0(e){return e===`agents`||An.includes(e)}const a0=f({alwaysOn:k().int().nonnegative(),onTrigger:k().int().nonnegative(),onDemand:k().int().nonnegative()}).strict(),o0=[`.md`,`.mdx`,`.txt`];function s0(e){return Math.round(e/4)}function c0(e){let t=e.lastIndexOf(`.`);return t===-1?!1:o0.includes(e.slice(t).toLowerCase())}function l0(e){let t=s0((e.name??``).length+(e.description??``).length),n=s0(lh(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||c0(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:s0(i)}}const u0=f({tags:_(f({name:l().min(1),count:k().int().nonnegative(),isLeaf:o()}).loose())}).loose(),d0=f({docName:l().min(1),title:l(),matchingTags:_(l().min(1)),snippet:l().nullable()}).loose(),f0=f({name:l().min(1),docs:_(d0)}).loose(),p0=f({folder:g(),frontmatter_local:s(l(),g()).nullable()}).loose(),m0=f({path:l(),frontmatter:s(l(),g()).optional()}).loose(),h0=f({applied:g()}).loose(),g0=s(l(),g()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),_0=f({template:f({name:l().min(1),folder:l(),scope:N([`local`,`inherited`]),path:l().min(1),frontmatter:g0,body:l()}).strict()}).strict(),v0=f({templates:_(f({name:l().min(1),title:l().optional(),description:l().optional(),path:l().min(1),source_folder:l()}).strict()),truncated:o()}).strict(),y0=f({folder:l(),name:l(),body:l().optional(),frontmatter:g0.optional(),...zb,summary:Bb}).strict(),b0=f({path:l().min(1),created:o(),warnings:_(l())}).strict(),x0=f({sourcePath:l().min(1),targetFolder:l(),name:l().optional(),title:l().optional(),deleteSource:o().optional(),...zb,summary:Bb}).strict(),S0=f({path:l().min(1),created:o(),warnings:_(l())}).strict(),C0=f({existed:o(),path:l().min(1)}).strict(),w0=f({fromFolder:l(),fromName:l(),toFolder:l(),toName:l(),body:l().optional(),frontmatter:g0.optional(),...zb,summary:Bb}).strict(),T0=f({from:l().min(1),to:l().min(1),committed:o()}).strict(),E0=N(en),D0=/^[a-z0-9-]+$/,O0=/<\/?[A-Za-z][^>]*>/;function k0(e){return O0.test(e)}const A0=/^[A-Za-z0-9_-]+$/,j0=f({name:l(),description:l(),metadata:f({pack:l()}).strict().optional()}).strict(),M0=f({skill:f({name:l().min(1),scope:E0,path:l().min(1),frontmatter:j0,body:l(),files:_(f({path:l().min(1),text:l().nullable()})).optional(),managed:o().optional()}).strict()}).strict(),N0=f({source:l().min(1),publisher:l().optional(),skill:l().optional(),marketplaceUrl:l().optional(),importedAt:l().min(1),autoUpdate:o().optional()}).strict(),P0=f({name:l().min(1),description:l().optional(),scope:E0,path:l().min(1),canonicalPath:l().min(1).optional(),filePaths:_(l()).optional(),absolutePath:l().min(1).optional(),installed:o(),hosts:_(l()),hostQualifier:l().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:_(l()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:s(l(),l()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:_(l()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:_(l()).optional(),installableEditors:_(l()).optional(),linkMode:o().optional(),customPlacements:_(f({path:l(),mode:N([`copy`,`link`])}).strict()).optional(),plugin:f({name:l().min(1),marketplace:l().min(1),provider:l().min(1),url:l().optional()}).strict().optional(),managed:o().optional(),origin:N0.optional(),pack:l().optional(),modified:o().optional(),revertable:o().optional(),ignored:o().optional(),size:a0.optional()}).strict(),F0=f({name:l().min(1),scope:E0,apply:o().optional()}).strict(),I0=f({line:l().min(1),gitignorePath:l().min(1),applied:o(),alreadyTracked:o().optional()}).strict(),L0=f({skills:_(P0),truncated:o()}).strict(),R0=f({scope:E0.default(`project`),name:l().meta({description:`Managed skill name to create or update.`}),body:l().optional(),frontmatter:j0,...zb,summary:Bb}).strict(),z0=f({path:l().min(1),created:o(),warnings:_(l())}).strict(),B0=f({scope:E0.default(`project`),name:l(),dryRun:o().optional(),setAutoUpdate:o().optional(),...zb,summary:Bb}).strict(),V0=f({name:l().min(1),updated:o(),source:l().min(1),localBody:l().optional(),upstreamBody:l().optional(),gitTracked:o().optional(),warnings:_(l())}).strict(),H0=f({scope:E0.default(`project`),name:l(),...zb,summary:Bb}).strict(),U0=f({name:l().min(1),baselineRef:l().min(1),restoredFiles:_(l()),warnings:_(l())}).strict(),W0=f({existed:o(),path:l().min(1)}).strict(),G0=f({scope:E0.default(`project`),fromName:l(),toName:l(),body:l().optional(),frontmatter:j0.optional(),...zb,summary:Bb}).strict(),K0=f({from:l().min(1),to:l().min(1),committed:o()}).strict(),q0=f({name:l(),fromScope:E0,toScope:E0,...zb,summary:Bb}).strict(),J0=f({scope:E0,path:l().optional()}).strict(),Y0=f({scope:E0,name:l(),toName:l(),...zb,summary:Bb}).strict(),X0=f({name:l().min(1)}).strict(),Z0=f({name:l(),home:l().min(1)}).strict(),Q0=f({docName:l().min(1)}).strict(),$0=N([`reference`,`script`,`file`]),e2=f({scope:E0.default(`project`),name:l(),path:l().min(1),content:l(),...zb,summary:Bb}).strict(),t2=f({path:l().min(1),created:o(),kind:$0,content:o()}).strict(),n2=f({scope:E0.default(`project`),name:l(),from:l().min(1),to:l().min(1),...zb,summary:Bb}).strict(),r2=f({from:l().min(1),to:l().min(1),fromDocName:l().optional(),toDocName:l().optional()}).strict(),i2=f({path:l().min(1),kind:$0,text:l()}).strict(),a2=f({path:l().min(1),existed:o(),kind:$0}).strict(),o2=d([r0,A(`agents`)]),s2=l().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),c2=d([o2,s2]),l2=f({scope:E0.default(`project`),name:l(),targets:_(o2).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:_(c2).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:_(c2).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:N([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:c2.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:o().optional(),setSource:l().min(1).optional(),place:f({dir:l().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:N([`copy`,`link`])}).strict().optional(),convert:f({target:c2.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:N([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:f({path:l().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...zb,summary:Bb,fork:f({editor:l().min(1),action:N([`align`,`make-source`,`rename`]),toName:l().optional()}).strict().optional()}).strict().refine(e=>!(e.targets!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>!(e.source!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),u2=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`],d2=f({name:l().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:_(l()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:o().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:_(l()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:_(N(u2)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:l().optional(),sourceMovedTo:l().optional()}).strict(),f2=f({scope:E0.default(`project`),name:l().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),p2=f({name:l().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:o().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict(),m2=f({targets:_(n0),configured:o(),folders:_(f({scope:E0,host:l(),root:l(),state:N([`own`,`linked`,`linked-parent`,`absent`]),target:l().optional(),drift:A(!0).optional(),expected:l().optional()}).strict()).optional()}).strict(),h2=f({action:A(`link`),scope:E0,root:l().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:l().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),g2=f({action:A(`unlink`),scope:E0,root:l().min(1).meta({description:`The linked folder to materialize back.`}),exclude:_(l().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),_2=f({action:A(`add-root`),scope:E0,root:s2.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),v2=v(`action`,[h2.extend({preview:o().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),g2,_2]),y2=v(`action`,[h2.strict(),g2,_2]),b2=f({folderAction:v2}).strict(),x2=f({moves:_(l()),drops:_(l()),removes:_(l()),replaces:_(l()),conflicts:_(l()),strays:_(l())}).strict(),S2=f({targets:_(n0),reprojected:_(f({name:l(),hosts:_(l())}).strict()),bundleHosts:_(l()),removedFrom:_(l()),folder:f({moved:_(l()),dropped:_(l()),linked:_(l())}).strict().optional(),preview:x2.optional()}).strict(),C2=f({scope:E0.default(`project`),name:l(),version:l().regex(/^[0-9a-f]{40}$/i),...zb,summary:Bb}).strict(),w2=f({name:l().min(1),version:l(),restoredFiles:_(l()),warnings:_(l())}).strict(),T2=f({query:l().optional(),intent:N([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:N([`navigation`,`relevance`]).optional(),scopes:_(N([`page`,`folder`,`content`,`file`])).optional(),scope:l().optional(),limit:k().int().nonnegative().optional(),semantic:o().optional(),source:N([`omnibar`,`mcp`,`http`]).optional()}).loose(),E2=f({kind:N([`page`,`folder`,`content`,`file`]),path:l().min(1),title:l(),score:k(),signals:s(l(),g()),snippet:l().optional()}).loose(),D2=f({capable:o(),applied:o(),coverage:f({embedded:k().int().nonnegative(),total:k().int().nonnegative()})}).loose(),O2=f({enabled:o(),keyPresent:o(),keyNotRequired:o(),keySource:N([`project`,`file`,`env`]).nullable(),keyHint:l().nullable(),ready:o(),capable:o(),embedded:k().int().nonnegative(),total:k().int().nonnegative()}).loose(),k2=f({query:l(),intent:N([`autocomplete`,`full_text`,`omnibar`]),results:_(E2),elapsedMs:k().nonnegative(),semantic:D2.optional(),truncated:o().optional(),ready:o().optional()}).loose(),A2=f({version:l().min(1),recordedAt:l().min(1)}).loose(),j2=f({currentVersion:l().min(1),targets:s(l(),A2.nullable())}).loose(),M2=f({scope:E0.default(`project`),source:l().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:l().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:o().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:o().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...zb,summary:Bb}).strict(),N2=f({scope:E0.default(`project`),source:l().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:_(l().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:o().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:o().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...zb,summary:Bb}).strict(),P2=f({results:_(f({requested:l(),status:N([`imported`,`already-imported`,`not-found`,`failed`]),name:l().optional(),collisionRenamedFrom:l().optional(),warnings:_(l()),error:l().optional()}).loose()),imported:k(),alreadyImported:k(),failed:k()}).loose(),F2=f({scope:E0.default(`project`),names:_(l().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...zb,summary:Bb}).strict(),I2=f({results:_(f({requested:l(),status:N([`updated`,`up-to-date`,`not-found`,`failed`]),source:l().optional(),warnings:_(l()),error:l().optional()}).loose()),updated:k(),upToDate:k(),failed:k()}).loose(),L2=f({source:l(),ref:l().optional(),contentHash:l(),publisher:l().optional()}).loose(),R2=f({name:l().min(1).meta({description:`Managed skill name created or matched.`}),path:l().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:o().meta({description:`True when this request created new source files.`}),alreadyImported:o().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:l().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:L2,warnings:_(l()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`})}).loose(),z2=`server-info`,B2=`branch-switched`,V2=`disk-ack`,H2=`config-validation-rejected`,U2=`config-ignore-nested-error`,W2=N([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),G2=f({v:A(1),ch:A(z2),seq:k(),serverInstanceId:l().min(1),currentBranch:l().min(1).optional()}).loose(),K2=f({v:A(1),ch:A(B2),seq:k(),branch:l().min(1)}).loose(),q2=f({v:A(1),ch:W2,seq:k()}).loose(),J2=f({v:A(1),ch:A(V2),seq:k(),docName:l().min(1),sv:l().min(1)}).loose(),Y2=f({v:A(1),ch:A(H2),seq:k(),docName:l().min(1),error:ee}).loose(),X2=f({v:A(1),ch:A(U2),seq:k(),path:l().min(1),error:l().min(1)}).loose();function Z2(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function Q2(e){return e.reason!==void 0||Z2(e.note)!==void 0||Z2(e.email)!==void 0}function $2(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol===`https:`)return t;let n=t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`;return t.protocol===`http:`&&n?t:null}function e4(){return $2((typeof process>`u`?void 0:Z2(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function t4(e){let t=Z2(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function n4(e,t,n){try{let r=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t),signal:AbortSignal.timeout(n)});if(r.ok){let e=await r.json().catch(()=>null);return{ok:!0,reference:typeof e?.reference==`string`?e.reference:``}}return r.status===400||r.status===413?{ok:!1,reason:`invalid`}:r.status===503?{ok:!1,reason:`unavailable`}:{ok:!1,reason:`error`}}catch(e){return{ok:!1,reason:e instanceof Error&&(e.name===`TimeoutError`||e.name===`AbortError`)?`timeout`:`error`}}}async function r4(e,t={}){let n=e4();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=Z2(e.note),a=t4(e.email),o={kind:`uninstall`,reasons:e.reason===void 0?[]:[e.reason],...i===void 0?{}:{message:i},appVersion:e.appVersion,platform:e.platform,source:e.source},s=Date.now()+(t.timeoutMs??4e3),c=()=>s-Date.now();if(a===void 0)return n4(r,o,c());let l=await n4(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:n4(r,o,c())}var i4=t(r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``;break}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
299
299
  `,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=0,d=0,f=0,p=0;l<e.length;)e[l][0]==a?(o[s++]=l,u=f,d=p,f=0,p=0,c=e[l][1]):(e[l][0]==i?f+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(u,d)&&c.length<=Math.max(f,p)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,s--,l=s>0?o[s-1]:-1,u=0,d=0,f=0,p=0,c=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var m=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(m,h),_=this.diff_commonOverlap_(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(l,0,new n.Diff(a,h.substring(0,g))),e[l-1][1]=m.substring(0,m.length-g),e[l+1][1]=h.substring(g),l++):(_>=m.length/2||_>=h.length/2)&&(e.splice(l,0,new n.Diff(a,m.substring(0,_))),e[l-1][0]=i,e[l-1][1]=h.substring(0,h.length-_),e[l+1][0]=r,e[l+1][1]=m.substring(_),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),a=r.match(n.nonAlphaNumericRegex_),o=i.match(n.nonAlphaNumericRegex_),s=a&&r.match(n.whitespaceRegex_),c=o&&i.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&i.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),f=u&&t.match(n.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==a&&e[r+1][0]==a){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],c=this.diff_commonSuffix(i,o);if(c){var l=o.substring(o.length-c);i=i.substring(0,i.length-c),o=l+o.substring(0,o.length-c),s=l+s}for(var u=i,d=o,f=s,p=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var m=t(i,o)+t(o,s);m>=p&&(p=m,u=i,d=o,f=s)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=d,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=!1,d=!1,f=!1,p=!1;l<e.length;)e[l][0]==a?(e[l][1].length<this.Diff_EditCost&&(f||p)?(o[s++]=l,u=f,d=p,c=e[l][1]):(s=0,c=null),f=p=!1):(e[l][0]==r?p=!0:f=!0,c&&(u&&d&&f&&p||c.length<this.Diff_EditCost/2&&u+d+f+p==3)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,c=null,u&&d?(f=p=!0,s=0):(s--,l=s>0?o[s-1]:-1,f=p=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(a,``));for(var t=0,o=0,s=0,c=``,l=``,u;t<e.length;)switch(e[t][0]){case i:s++,l+=e[t][1],t++;break;case r:o++,c+=e[t][1],t++;break;case a:o+s>1?(o!==0&&s!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(t-o-s>0&&e[t-o-s-1][0]==a?e[t-o-s-1][1]+=l.substring(0,u):(e.splice(0,0,new n.Diff(a,l.substring(0,u))),t++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(e[t][1]=l.substring(l.length-u)+e[t][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),t-=o+s,e.splice(t,o+s),c.length&&(e.splice(t,0,new n.Diff(r,c)),t++),l.length&&(e.splice(t,0,new n.Diff(i,l)),t++),t++):t!==0&&e[t-1][0]==a?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,s=0,o=0,c=``,l=``;break}e[e.length-1][1]===``&&e.pop();var d=!1;for(t=1;t<e.length-1;)e[t-1][0]==a&&e[t+1][0]==a&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n=0,a=0,o=0,s=0,c;for(c=0;c<e.length&&(e[c][0]!==i&&(n+=e[c][1].length),e[c][0]!==r&&(a+=e[c][1].length),!(n>t));c++)o=n,s=a;return e.length!=c&&e[c][0]===r?s:s+(t-o)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,s=/>/g,c=/\n/g,l=0;l<e.length;l++){var u=e[l][0],d=e[l][1].replace(n,`&amp;`).replace(o,`&lt;`).replace(s,`&gt;`).replace(c,`&para;<br>`);switch(u){case i:t[l]=`<ins style="background:#e6ffe6;">`+d+`</ins>`;break;case r:t[l]=`<del style="background:#ffe6e6;">`+d+`</del>`;break;case a:t[l]=`<span>`+d+`</span>`;break}}return t.join(``)},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,s=0;s<e.length;s++){var c=e[s][0],l=e[s][1];switch(c){case i:n+=l.length;break;case r:o+=l.length;break;case a:t+=Math.max(n,o),n=0,o=0;break}}return t+=Math.max(n,o),t},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]=`+`+encodeURI(e[n][1]);break;case r:t[n]=`-`+e[n][1].length;break;case a:t[n]=`=`+e[n][1].length;break}return t.join(` `).replace(/%20/g,` `)},n.prototype.diff_fromDelta=function(e,t){for(var o=[],s=0,c=0,l=t.split(/\t/g),u=0;u<l.length;u++){var d=l[u].substring(1);switch(l[u].charAt(0)){case`+`:try{o[s++]=new n.Diff(i,decodeURI(d))}catch{throw Error(`Illegal escape in diff_fromDelta: `+d)}break;case`-`:case`=`:var f=parseInt(d,10);if(isNaN(f)||f<0)throw Error(`Invalid number in diff_fromDelta: `+d);var p=e.substring(c,c+=f);l[u].charAt(0)==`=`?o[s++]=new n.Diff(a,p):o[s++]=new n.Diff(r,p);break;default:if(l[u])throw Error(`Invalid diff operation in diff_fromDelta: `+l[u])}}if(c!=e.length)throw Error(`Delta length (`+c+`) does not equal source text length (`+e.length+`).`);return o},n.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o)if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}if(a(p+1,n)>o)break;f=g}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new n.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},n.prototype.patch_make=function(e,t,o){var s,c;if(typeof e==`string`&&typeof t==`string`&&o===void 0)s=e,c=this.diff_main(s,t,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(e&&typeof e==`object`&&t===void 0&&o===void 0)c=e,s=this.diff_text1(c);else if(typeof e==`string`&&t&&typeof t==`object`&&o===void 0)s=e,c=t;else if(typeof e==`string`&&typeof t==`string`&&o&&typeof o==`object`)s=e,c=o;else throw Error(`Unknown call format to patch_make.`);if(c.length===0)return[];for(var l=[],u=new n.patch_obj,d=0,f=0,p=0,m=s,h=s,g=0;g<c.length;g++){var _=c[g][0],v=c[g][1];switch(!d&&_!==a&&(u.start1=f,u.start2=p),_){case i:u.diffs[d++]=c[g],u.length2+=v.length,h=h.substring(0,p)+v+h.substring(p);break;case r:u.length1+=v.length,u.diffs[d++]=c[g],h=h.substring(0,p)+h.substring(p+v.length);break;case a:v.length<=2*this.Patch_Margin&&d&&c.length!=g+1?(u.diffs[d++]=c[g],u.length1+=v.length,u.length2+=v.length):v.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(u,m),l.push(u),u=new n.patch_obj,d=0,m=h,f=p);break}_!==i&&(f+=v.length),_!==r&&(p+=v.length)}return d&&(this.patch_addContext_(u,m),l.push(u)),l},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=new n.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new n.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,t[r]=a}return t},n.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,s=[],c=0;c<e.length;c++){var l=e[c].start2+o,u=this.diff_text1(e[c].diffs),d,f=-1;if(u.length>this.Match_MaxBits?(d=this.match_main(t,u.substring(0,this.Match_MaxBits),l),d!=-1&&(f=this.match_main(t,u.substring(u.length-this.Match_MaxBits),l+u.length-this.Match_MaxBits),(f==-1||d>=f)&&(d=-1))):d=this.match_main(t,u,l),d==-1)s[c]=!1,o-=e[c].length2-e[c].length1;else{s[c]=!0,o=d-l;var p=f==-1?t.substring(d,d+u.length):t.substring(d,f+this.Match_MaxBits);if(u==p)t=t.substring(0,d)+this.diff_text2(e[c].diffs)+t.substring(d+u.length);else{var m=this.diff_main(u,p,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(m)/u.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,g,_=0;_<e[c].diffs.length;_++){var v=e[c].diffs[_];v[0]!==a&&(g=this.diff_xIndex(m,h)),v[0]===i?t=t.substring(0,d+g)+v[1]+t.substring(d+g):v[0]===r&&(t=t.substring(0,d+g)+t.substring(d+this.diff_xIndex(m,h+v[1].length))),v[0]!==r&&(h+=v[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r=``,i=1;i<=t;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(s.length==0||s[0][0]!=a)s.unshift(new n.Diff(a,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var c=t-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}if(o=e[e.length-1],s=o.diffs,s.length==0||s[s.length-1][0]!=a)s.push(new n.Diff(a,r)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var c=t-s[s.length-1][1].length;s[s.length-1][1]+=r.substring(0,c),o.length1+=c,o.length2+=c}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=t)){var s=e[o];e.splice(o--,1);for(var c=s.start1,l=s.start2,u=``;s.diffs.length!==0;){var d=new n.patch_obj,f=!0;for(d.start1=c-u.length,d.start2=l-u.length,u!==``&&(d.length1=d.length2=u.length,d.diffs.push(new n.Diff(a,u)));s.diffs.length!==0&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],m=s.diffs[0][1];p===i?(d.length2+=m.length,l+=m.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&d.diffs.length==1&&d.diffs[0][0]==a&&m.length>2*t?(d.length1+=m.length,c+=m.length,f=!1,d.diffs.push(new n.Diff(p,m)),s.diffs.shift()):(m=m.substring(0,t-d.length1-this.Patch_Margin),d.length1+=m.length,c+=m.length,p===a?(d.length2+=m.length,l+=m.length):f=!1,d.diffs.push(new n.Diff(p,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}u=this.diff_text2(d.diffs),u=u.substring(u.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);h!==``&&(d.length1+=h.length,d.length2+=h.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===a?d.diffs[d.diffs.length-1][1]+=h:d.diffs.push(new n.Diff(a,h))),f||e.splice(++o,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var o=e.split(`
300
300
  `),s=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<o.length;){var l=o[s].match(c);if(!l)throw Error(`Invalid patch string: `+o[s]);var u=new n.patch_obj;for(t.push(u),u.start1=parseInt(l[1],10),l[2]===``?(u.start1--,u.length1=1):l[2]==`0`?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===``?(u.start2--,u.length2=1):l[4]==`0`?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),s++;s<o.length;){var d=o[s].charAt(0);try{var f=decodeURI(o[s].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+f)}if(d==`-`)u.diffs.push(new n.Diff(r,f));else if(d==`+`)u.diffs.push(new n.Diff(i,f));else if(d==` `)u.diffs.push(new n.Diff(a,f));else if(d==`@`)break;else if(d!==``)throw Error(`Invalid patch mode "`+d+`" in: `+f);s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
301
301
  `],o,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:o=`+`;break;case r:o=`-`;break;case a:o=` `;break}n[s+1]=o+encodeURI(this.diffs[s][1])+`
@@ -354,4 +354,4 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
354
354
  `);if(!(t[0]??``).startsWith(`template:`))return null;let n=[t[0]??``],r=1;for(;r<t.length;){let e=t[r]??``;if(/^[ \t]/.test(e)){n.push(e),r++;continue}if(e.trim()===``){let i=r+1;for(;i<t.length&&(t[i]??``).trim()===``;)i++;if(i<t.length&&/^[ \t]/.test(t[i]??``)){n.push(e),r++;continue}}break}let i=M9(n.join(`
355
355
  `))[j9];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
356
356
  `).replace(/\n+$/,``)}}function P9(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=lh(t);if(n===``)return{identity:{},starterContent:t};let i=dh(n),a=$te(i);if(a)return{identity:a.identity,starterContent:N9(a.docFrontmatterText,r)};let{frontmatter:o}=lh(r);if(o!==``)return{identity:M9(i),starterContent:r};let s=M9(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:N9(i,r)}}function ene(e,t){let{docFrontmatterText:n,markdown:r}=Qte(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,ht.stringify)({[j9]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function tne(e){return P9(e).starterContent}const F9=e=>e*8+4;F9(92),F9(40);const nne=/^(#{1,6})\s+(.+)$/;function rne(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(nne);if(!n)return null;let r=n[2].trim(),i=qZ(r,t);return i?{level:n[1].length,text:r,slug:i}:null}Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));const ine={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},ane=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],one={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function sne(e,t=ane){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const cne={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function I9(e){return e?cne[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const lne={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function une(e){let t=e?.trim();return t?lne[I9(t)]??t:`Agent`}function L9(e){if(!e.includes(`%`))return e;let t;try{t=decodeURIComponent(e)}catch{return e}return t===`.`||t===`..`||t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?e:t}function R9(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function dne(e){return e.split(`/`).map(R9).join(`/`)}function z9(e){return e.split(`/`).map(L9).join(`/`)}function B9(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=L9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!bn.includes(e))return null}let c=o.startsWith(`/`),l=c?o.slice(1):o,u=c?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],d=l.split(`/`),f=d.length-1;for(let e=0;e<d.length;e++){let t=L9(d[e]??``);if(e===f&&(t=an(t)),t===`..`){if(u.length===0)return null;u.pop()}else t!==`.`&&t!==``&&u.push(t)}return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function fne(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}const V9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function H9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function U9(e){let t=e.trim();return V9.test(t)||t.startsWith(`//`)}function pne(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if(U9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=z9(r<0?n:n.slice(0,r)),a=un(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=ln(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=B9(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=H9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function W9(e,t){let n=e.trim();if(!n)return null;if(U9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=H9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function mne(e,t,n){let r=e.trim();if(!r||V9.test(r)||r.startsWith(`//`)||r.startsWith(`#`))return null;let i=r.indexOf(`#`),a=((i>=0?r.slice(0,i):r).split(`?`)[0]??``).trim();if(!a)return null;let o=a.startsWith(`/`),s=o?a.slice(1):a,c=o?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(n.literal?e:L9(e));return c.length===0?null:c.join(`/`)}function G9(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function K9(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function q9(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function J9(e){return e.split(`/`).filter(e=>e!==``)}function hne(e,t){let n=q9(t);return e===``||n===e?!0:n.startsWith(`${e}/`)}function Y9(e,t){let n=q9(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:J9(r).length}function X9(e,t){let n=J9(e),r=J9(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function gne(){let e=new Map;function t(t){let n=G9(t);if(n===``)return;let r=K9(n);if(r===``)return;let i=r.toLowerCase(),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=G9(t),r=K9(n).toLowerCase(),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=t.toLowerCase(),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=q9(G9(n)),o=[],s=[];for(let e of i)hne(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=Y9(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=Y9(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=X9(a,q9(t));for(let r=1;r<e.length;r++){let i=e[r],o=X9(a,q9(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}function _ne(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function vne(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}function Z9(e){return`pagesBySlug`in e}function yne(e){return Z9(e)?e.pages:e}function bne(e,t){return Z9(e)?e.assetPaths??new Set:t??new Set}function xne(e,t){return Z9(e)?e.filePaths??new Set:t??new Set}function Q9(e,t){return e<t?-1:+(e>t)}function Sne(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function Cne(e,t){let n=new Map,r=[...e].sort(Q9);for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function wne(e,t){let n=GZ(e);if(n){if(Z9(t))return t.pagesBySlug.get(n);for(let e of t)if(GZ(e)===n)return e}}function Tne(e,t){if(e.includes(`/`))return;let n=GZ(e);if(!n)return;if(Z9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);GZ(t===-1?e:e.slice(t+1))===n&&(r===void 0||Q9(e,r)<0)&&(r=e)}return r}function Ene(e){let t=e.trim();if(!t)return[];let n=GZ(t);return n.length>0&&n!==t?[n]:[]}function $9(e,t){let n=e.trim();if(!n)return;let r=yne(t);if(r.has(n))return n;let i=wne(n,t);if(i)return i;for(let e of Ene(n))if(r.has(e))return e;return Dne(n,r)||Tne(n,t)}function Dne(e,t){let n=`${e}/index`;if(t.has(n))return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1),a=i?`${e}/${i}`:null;if(a&&t.has(a))return a}function One(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function kne(e,t,n){let r=One(e);if(!r)return null;let i=r.toLowerCase(),a=n?[t,n]:[t];for(let e of a){if(e.has(r))return r;for(let t of e)if(t.toLowerCase()===i)return t}if(r.includes(`/`))return null;let o=[];for(let e of a)for(let t of e){let e=t.lastIndexOf(`/`);(e===-1?t:t.slice(e+1)).toLowerCase()===i&&o.push(t)}return o.length===0?null:o.sort(Q9)[0]??null}function Ane(e,t,n){let r=W9(e,t);return r===null||r.kind!==`asset`||kne(r.url,bne(n),xne(n))!==null||$9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}export{a9 as $,_X as $a,_Q as $i,F2 as $n,kb as $o,y1 as $r,Jt as $s,U2 as $t,Zte as A,lZ as Aa,Oe as Ac,i$ as Ai,G0 as An,Dx as Ao,B1 as Ar,zn as As,Y4 as At,Ote as B,AX as Ba,qQ as Bi,H0 as Bn,Xb as Bo,a1 as Br,jn as Bs,b4 as Bt,j9 as C,yZ as Ca,gt as Cc,c$ as Ci,M0 as Cn,jx as Co,G1 as Cr,Xn as Cs,k3 as Ct,Xte as D,aZ as Da,ft as Dc,d$ as Di,j2 as Dn,Tx as Do,U1 as Dr,Vn as Ds,o3 as Dt,P9 as E,iZ as Ea,pt as Ec,h$ as Ei,l2 as En,xx as Eo,H1 as Er,Gn as Es,i3 as Et,Lte as F,fZ as Fa,Ce as Fc,r$ as Fi,z0 as Fn,gx as Fo,k1 as Fr,Tn as Fs,A4 as Ft,D9 as G,WX as Ga,HQ as Gi,S2 as Gn,vx as Go,r1 as Gr,Sn as Gs,r4 as Gt,Dte as H,qX as Ha,UQ as Hi,E0 as Hn,Qb as Ho,_1 as Hr,An as Hs,l4 as Ht,Hte as I,$X as Ia,be as Ic,XQ as Ii,B0 as In,Ub as Io,j1 as Ir,En as Is,k4 as It,wte as J,VX as Ja,NQ as Ji,f2 as Jn,dx as Jo,m1 as Jr,Kt as Js,Y2 as Jt,Cte as K,DX as Ka,MQ as Ki,F0 as Kn,ux as Ko,f1 as Kr,xn as Ks,K2 as Kt,Rte as L,zX as La,ZQ as Li,V0 as Ln,Hb as Lo,o1 as Lr,Nn as Ls,w4 as Lt,Gte as M,gZ as Ma,Te as Mc,n$ as Mi,J0 as Mn,wx as Mo,E1 as Mr,Cn as Ms,K4 as Mt,Kte as N,rZ as Na,Ee as Nc,e$ as Ni,K0 as Nn,px as No,D1 as Nr,wn as Ns,W4 as Nt,A9 as O,uZ as Oa,ct as Oc,u$ as Oi,d2 as On,bx as Oo,R1 as Or,Hn as Os,Z4 as Ot,Ite as P,mZ as Pa,we as Pc,$Q as Pi,R0 as Pn,mx as Po,O1 as Pr,Fn as Ps,N4 as Pt,lte as Q,TX as Qa,zQ as Qi,L0 as Qn,jb as Qo,v1 as Qr,Yt as Qs,B2 as Qt,Pte as R,kX as Ra,QQ as Ri,C2 as Rn,Gb as Ro,s1 as Rr,kn as Rs,C4 as Rt,rne as S,_Z as Sa,Mt as Sc,s$ as Si,y2 as Sn,zN as So,Q1 as Sr,Qn as Ss,M3 as St,tne as T,kZ as Ta,kt as Tc,m$ as Ti,R2 as Tn,Ox as To,V1 as Tr,Wn as Ts,f3 as Tt,yte as U,XX as Ua,WQ as Ui,m2 as Un,ex as Uo,c1 as Ur,Pn as Us,c4 as Ut,Ete as V,KX as Va,YQ as Vi,U0 as Vn,Yb as Vo,g1 as Vr,In as Vs,x4 as Vt,bte as W,OX as Wa,JQ as Wi,b2 as Wn,_x as Wo,l1 as Wr,On as Ws,Q2 as Wt,fte as X,QX as Xa,OQ as Xi,N2 as Xn,Fb as Xo,b1 as Xr,Xt as Xs,J2 as Xt,h9 as Y,ZX as Ya,kQ as Yi,p2 as Yn,tx as Yo,h1 as Yr,Zt as Ys,q2 as Yt,g9 as Z,SX as Za,IQ as Zi,P2 as Zn,Pb as Zo,x1 as Zr,qt as Zs,G2 as Zt,one as _,RZ as _a,Bt as _c,y$ as _i,i2 as _n,Ez as _o,t0 as _r,cr as _s,H3 as _t,_ne as a,xQ as aa,nn as ac,q$ as ai,h0 as an,mG as ao,_0 as ar,lh as as,o6 as at,une as b,bZ as ba,Nt as bc,g$ as bi,n2 as bn,QR as bo,J1 as br,$n as bs,z3 as bt,fne as c,$Z as ca,mn as cc,e1 as ci,T2 as cn,vG as co,w0 as cr,to as cs,Z3 as ct,U9 as d,lQ as da,sn as dc,W$ as di,W0 as dn,XW as do,b0 as dr,tr as ds,J3 as dt,EQ as ea,on as ec,B$ as ei,H2 as en,vX as eo,I2 as er,Ob as es,e9 as et,mne as f,GZ as fa,un as fc,H$ as fi,Y0 as fn,hW as fo,v0 as fr,sr as fs,G3 as ft,B9 as g,LZ as ga,Ht as gc,O$ as gi,a2 as gn,Dz as go,$1 as gr,rr as gs,K3 as gt,R9 as h,zZ as ha,Wt as hc,T$ as hi,Q0 as hn,VH as ho,i0 as hr,eee as hs,q3 as ht,$9 as i,SQ as ia,Gt as ic,Y$ as ii,m0 as in,fG as io,C0 as ir,uh as is,a6 as it,k9 as j,hZ as ja,ke as jc,o$ as ji,q0 as jn,Ex as jo,A1 as jr,Ln as js,z4 as jt,Yte as k,tZ as ka,mt as kc,p$ as ki,c2 as kn,kx as ko,z1 as kr,Rn as ks,Q4 as kt,pne as l,cQ as la,vn as lc,G$ as li,k2 as ln,lG as lo,T0 as lr,I as ls,X3 as lt,dne as m,BZ as ma,yn as mc,N$ as mi,Z0 as mn,HH as mo,l0 as mr,or as ms,U3 as mt,Sne as n,TQ as na,$t as nc,$$ as ni,z2 as nn,OY as no,f0 as nr,Cb as ns,Jee as nt,vne as o,dQ as oa,tn as oc,K$ as oi,u2 as on,pG as oo,x0 as or,dh as os,s6 as ot,z9 as p,VZ as pa,hn as pc,I$ as pi,X0 as pn,eU as po,k0 as pr,nr as ps,W3 as pt,Tte as q,UX as qa,jQ as qi,I0 as qn,rx as qo,u1 as qr,bn as qs,X2 as qt,Ane as r,wQ as ra,en as rc,Z$ as ri,p0 as rn,DY as ro,u0 as rr,yb as rs,n6 as rt,gne as s,fQ as sa,rn as sc,Q$ as si,D0 as sn,EG as so,S0 as sr,fp as ss,t6 as st,Cne as t,CQ as ta,Qt as tc,V$ as ti,V2 as tn,RY as to,A0 as tr,Eb as ts,ste as tt,W9 as u,uQ as ua,fn as uc,U$ as ui,O2 as un,uG as uo,y0 as ur,pr as us,Y3 as ut,ine as v,PZ as va,Vt as vc,b$ as vi,e2 as vn,bz as vo,K1 as vr,tee as vs,B3 as vt,ene as w,OZ as wa,Dt as wc,l$ as wi,M2 as wn,Sx as wo,W1 as wr,Un as ws,c3 as wt,I9 as x,CZ as xa,jt as xc,_$ as xi,r2 as xn,JP as xo,Y1 as xr,Zn as xs,j3 as xt,sne as y,AZ as ya,Ut as yc,C$ as yi,t2 as yn,lz as yo,q1 as yr,er as ys,N3 as yt,Fte as z,GX as za,KQ as zi,w2 as zn,Wb as zo,i1 as zr,Mn as zs,S4 as zt};
357
- //# sourceMappingURL=src-BOzh5nAU.mjs.map
357
+ //# sourceMappingURL=src-Bh7r8AFJ.mjs.map
@@ -0,0 +1 @@
1
+ import"./src-Bh7r8AFJ.mjs";import"./resolve-project-root-C70nb-25.mjs";import"./src-BK0RpErg.mjs";import"./acp-harness-probe-C3-fF_7J.mjs";import"./init-u8_k-C2Q.mjs";import{n as e}from"./loader-Cywqvo2_.mjs";import"./skill-teardown-BfYSeXPm.mjs";import"./preview-BXr_fh1A.mjs";import"./mcp-migrate-event-9DFnNzHa.mjs";export{e as loadConfig};
@@ -1 +1 @@
1
- import{Ds as e,J as t,Js as n,Ks as r,Os as i,Pc as a,W as o,ic as s,ws as c,x as l,y as u}from"./src-BOzh5nAU.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Aa as _,Ai as v,An as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ca as D,Ci as O,Cn as k,Cr as A,Ct as j,D as M,Da as N,Di as P,Dn as F,Dr as I,Dt as L,E as R,Ea as z,Ei as B,En as V,Er as H,Et as U,F as W,Fi as G,Fn as K,Fr as q,Ft as J,G as Y,Gi as X,Gn as Z,Gr as Q,Gt as $,H as ee,Hi as te,Hn as ne,Hr as re,Ht as ie,I as ae,Ii as oe,In as se,Ir as ce,It as le,J as ue,Ji as de,Jn as fe,Jr as pe,Jt as me,K as he,Ki as ge,Kn as _e,Kr as ve,Kt as ye,L as be,Li as xe,Ln as Se,Lr as Ce,Lt as we,M as Te,Ma as Ee,Mi as De,Mn as Oe,Mt as ke,N as Ae,Ni as je,Nn as Me,Nr as Ne,Nt as Pe,O as Fe,Oa as Ie,Oi as Le,On as Re,Ot as ze,P as Be,Pi as Ve,Pn as He,Pr as Ue,Pt as We,Q as Ge,Qi as Ke,Qn as qe,Qr as Je,Qt as Ye,R as Xe,Ri as Ze,Rn as Qe,Rr as $e,Rt as et,S as tt,Sa as nt,Si as rt,Sn as it,Sr as at,St as ot,T as st,Ta as ct,Ti as lt,Tn as ut,Tr as dt,Tt as ft,U as pt,Ui as mt,Un as ht,Ur as gt,Ut as _t,V as vt,Vi as yt,Vn as bt,Vr as xt,Vt as St,W as Ct,Wi as wt,Wn as Tt,Wr as Et,Wt as Dt,X as Ot,Xi as kt,Xn as At,Xr as jt,Xt as Mt,Y as Nt,Yi as Pt,Yn as Ft,Yr as It,Yt as Lt,Z as Rt,Zi as zt,Zn as Bt,Zr as Vt,Zt as Ht,_ as Ut,_a as Wt,_i as Gt,_n as Kt,_r as qt,a as Jt,aa as Yt,ai as Xt,an as Zt,ar as Qt,at as $t,b as en,ba as tn,bi as nn,bn as rn,br as an,bt as on,c as sn,ca as cn,ci as ln,cn as un,cr as dn,ct as fn,d as pn,da as mn,di as hn,dn as gn,dr as _n,dt as vn,ea as yn,ei as bn,en as xn,er as Sn,et as Cn,f as wn,fa as Tn,fi as En,fn as Dn,fr as On,ft as kn,g as An,ga as jn,gi as Mn,gn as Nn,gr as Pn,h as Fn,ha as In,hi as Ln,hn as Rn,hr as zn,i as Bn,ia as Vn,ii as Hn,in as Un,ir as Wn,it as Gn,j as Kn,ja as qn,ji as Jn,jn as Yn,jt as Xn,k as Zn,ka as Qn,ki as $n,kn as er,kt as tr,l as nr,la as rr,li as ir,ln as ar,lr as or,lt as sr,m as cr,ma as lr,mi as ur,mn as dr,mr as fr,n as pr,na as mr,ni as hr,nn as gr,nr as _r,nt as vr,o as yr,oa as br,oi as xr,on as Sr,or as Cr,ot as wr,p as Tr,pa as Er,pi as Dr,pn as Or,pr as kr,q as Ar,qi as jr,qn as Mr,qr as Nr,qt as Pr,r as Fr,ra as Ir,ri as Lr,rn as Rr,rr as zr,rt as Br,s as Vr,sa as Hr,si as Ur,sn as Wr,sr as Gr,st as Kr,t as qr,ta as Jr,ti as Yr,tn as Xr,tr as Zr,tt as Qr,u as $r,ua as ei,ui as ti,un as ni,ur as ri,ut as ii,v as ai,va as oi,vi as si,vn as ci,vr as li,w as ui,wa as di,wi as fi,wn as pi,wr as mi,wt as hi,x as gi,xa as _i,xn as vi,xr as yi,xt as bi,y as xi,ya as Si,yi as Ci,yn as wi,yr as Ti,yt as Ei,z as Di,zi as Oi,zn as ki,zr as Ai,zt as ji}from"./src-BqTdx7nf.mjs";import{C as Mi,E as Ni,T as Pi,_ as Fi,b as Ii,c as Li,d as Ri,g as zi,i as Bi,l as Vi,m as Hi,n as Ui,p as Wi,s as Gi,t as Ki,u as qi,v as Ji,w as Yi,x as Xi,y as Zi}from"./fs-traced-Dm4NQ6S5.mjs";import{a as Qi,d as $i,f as ea,i as ta,l as na,n as ra,r as ia,t as aa,u as oa}from"./logger-Dq-cRhcP.mjs";import{C as sa,S as ca,_ as la,a as ua,b as da,c as fa,d as pa,f as ma,g as ha,h as ga,i as _a,l as va,m as ya,n as ba,o as xa,p as Sa,r as Ca,s as wa,t as Ta,u as Ea,x as Da}from"./server-lock-DmHwX0B4.mjs";export{D as AGENT_ID_MAX_LEN,di as AGENT_ID_RE,Oi as AGENT_WRITE_ORIGIN,_ as AcpPermissionStore,N as AcpRegistry,lt as AcpThreadManager,O as AgentFocusBroadcaster,rt as AgentPresenceBroadcaster,S as AgentSessionCapacityError,yt as AgentSessionManager,on as AutoStartDisabledError,Ln as BUNDLE_IDS,Mn as BUNDLE_SCOPE,Gt as BUNDLE_SKILL_NAME,Bt as BacklinkIndex,zt as CC1Broadcaster,n as CC1_CONTRACT_VERSION,Wr as CONFIG_FILENAME,Z as CONFLICT_MARKER_RE,q as CURSOR_BUNDLE_PATHS_BY_PLATFORM,xi as ConfigSchema,Ir as DEFAULT_CHECKPOINT_RETENTION,m as DEFAULT_EMBEDDINGS_DIMENSIONS,T as DEFAULT_PACK_ID,Ct as DocumentDurabilityState,bn as EMBEDDINGS_API_KEY_ENV,qr as EPHEMERAL_PROJECT_DIR_PREFIX,wi as ExposureConsentError,Ie as FEATURED_AGENT_IDS,Vn as FILE_SYSTEM_WRITER,Ft as FILE_WATCHER_ORIGIN,Nr as FileEmbeddingsBackend,gr as GIT_PREFLIGHT_FAIL_SPAN_NAME,Yt as GIT_UPSTREAM_WRITER,qn as GitDirAccessError,v as GitNotAvailableError,Jn as GitTooOldError,bi as HOCUSPOCUS_AUTH_REJECTION_REASONS,ot as HocuspocusAuthRejection,j as HocuspocusAuthTokenSchema,Rn as HomeProjectRootError,xt as INSTALLED_AGENTS_SCHEMES,vn as JSON_SCHEMA_DIALECT_2020_12,r as LINEAGE_EPOCH_KEY,vt as LIVE_DERIVED_INDEX_DEBOUNCE_MS,St as LOG_MD_TEMPLATE,b as MANAGED_RENAME_ORIGIN,B as MAX_ACP_THREADS,te as MAX_AGENT_SESSIONS,Le as MCP_CONNECTION_ID_HEADER,c as MCP_SERVER_NAME,mt as MIN_EVICTABLE_IDLE_MS,De as MIN_GIT_VERSION,Y as MISSING_OK_CONFIG_MESSAGE,Ee as MalformedGitPointerError,Br as McpLogger,he as MissingOkConfigError,X as OBSERVER_SYNC_ORIGIN,un as OK_OKIGNORE_TEMPLATE,si as ONBOARDING_BUNDLE_IDS,e as ORPHAN_MODES,a as PROTOCOL_VERSION,aa as PinoLogger,va as ProcessLockCollisionError,pn as ProjectGitInitError,Xn as ROLLBACK_ORIGIN,ar as ROOT_GITIGNORE_TEMPLATE,da as RUNTIME_VERSION,br as SERVICE_WRITER,kr as SKILL_INSTALL_EVENTS_FILE_REL,o as SKILL_STATE_TARGETS,ie as STARTER_FOLDERS,_t as STARTER_FOLDER_FRONTMATTER_FILENAME,Dt as STARTER_PACKS,$ as STARTER_PACK_IDS,ye as STARTER_TEMPLATES,Fe as STATE_MANIFEST_FILENAME,Da as STATE_SCHEMA_VERSION,s as SYSTEM_DOC_NAME,Ye as SeedPrerequisiteError,h as SeedRootDirError,Ta as ServerLockCollisionError,pr as SingleFileNotAFileError,Fr as SingleFileNotFoundError,Bn as SingleFileNotMarkdownError,Zn as StateManifestError,At as TagIndex,Ci as USER_GLOBAL_BUNDLE_IDS,ke as __getShowAllWalkStatsForTesting,Pe as __resetShowAllWalkStatsForTesting,Ea as acquireProcessLock,ba as acquireServerLock,wt as applyAgentMarkdownWrite,ht as applyExternalChange,ji as applySeed,g as assertCompatibleStateManifest,je as assertGitAvailable,Yn as assertNeverDiskEvent,Nn as assertNotHomeProjectRoot,fi as attachAcpThreadSocket,Ei as attachIdleShutdown,en as bootServer,p as buildAndOpenSkill,ni as buildConfigYmlContent,Ge as buildExecResult,rn as buildIngressPolicy,P as buildOkMcpStdioCommand,En as buildSkillZip,Pr as buildStarterFolderFrontmatterYaml,Hr as buildWipTree,nn as bundleSkillMdPath,pe as canonicalProjectKey,Kt as canonicalizeForCompare,Oe as classifyEvents,Ki as classifyFsPath,It as clearAllEmbeddingsKeys,hr as clearContributors,me as coercePackId,u as colorFromSeed,cn as commitUpstreamImport,rr as commitWip,ei as commitWipFromTree,Ve as compareSemver,an as composeEffectiveLinterConfig,yi as composeFrontmatterSchemasConfig,_e as containsConflictMarkers,Me as contentHash,Lr as contributorCount,be as countShadowObjects,Xe as countStaleAgentWipRefs,Di as countWipRefs,We as createApiExtension,tr as createAssetServeMiddleware,ue as createCollaborationHost,Ne as createContentFilter,Ue as createContentFilterAsync,jt as createEmbeddingsSecretStore,Jt as createEphemeralProjectDir,Tt as createExternalChangeHandler,cr as createFileLogger,ee as createLiveDerivedIndexExtension,Ot as createMcpHttpHandler,re as createOsProbe,ae as createPersistenceExtension,st as createServer,Be as createServerObserverExtension,de as createStreamingErrorWriter,ra as createTestLogger,Vt as describeStoredEmbeddingsKey,ai as detectClaudeDesktopPresence,G as detectGit,Kn as detectProjectShape,Sn as detectUserSkillHosts,wr as discoverLockDirs,mi as discoverMarkdownlintConfig,Rr as emitPreflightFailureSpan,d as encodeDocName,Cn as encodeFolderRoute,Qr as encodeSkillRoute,wn as ensureProjectGit,gn as ensureProjectSkillGitignore,Pt as errorResponse,He as evictStaleTrackerEntries,J as extractHeadings,Kr as extractOkBinaryPath,qe as extractWikiLinksFromMarkdown,oe as fallbackPaths,Tr as findEnclosingGitRoot,er as findEnclosingProjectRoot,dt as findNativeMarkdownlintFile,Fn as flushFileLogger,hi as formatAuthRejectionWire,Hn as formatContributors,Xt as formatContributorsFrom,we as formatPackRationale,mn as gcCheckpointRefs,Gn as getCurrentMcpLogger,vi as getIngressContext,ir as getLocalDir,An as getLogFilePath,ia as getLogger,Ut as getLogsDir,la as getMachineId,Zi as getMeter,oi as getMetrics,Ii as getTracer,Si as handleCollabSocketError,ce as handleSpawnCursor,it as hasForwardingHeaders,x as hasGcLogLatch,l as iconFromClientName,tn as incrementCollabSocketFilteredError,_i as incrementServerObserverFire,Dn as initContent,Tn as initShadowRepo,Xi as initTelemetry,tt as initToleranceTelemetryWriter,kn as installJsonSchemaDialect,ii as installPrettyZodErrors,ta as installTestLoggers,Zr as installUserSkill,Re as isAllowedApiOrigin,V as isAllowedWorkspaceHostHeader,Ke as isConfigDoc,ft as isHocuspocusAuthRejectionReason,ci as isHomeDir,k as isHostAdmitted,Lt as isKnownPackId,f as isLinkIndexExcludedDoc,F as isLoopbackAddress,yn as isManagedArtifactDoc,pi as isOriginAdmitted,i as isOrphanMode,ge as isPairedWriteOrigin,Ce as isPathWithinDir,ut as isPeerAdmitted,ca as isProcessAlive,y as isProjectRoot,Jr as isReservedForUserTree,K as isSelfWrite,mr as isSystemDoc,E as isToleranceTelemetryEnabled,sa as isValidLockPid,se as lastKnownHash,Er as listRescueCheckpoints,Mt as listStarterPacks,Qn as loadCustomAgents,W as loadPrincipal,Ca as lockAdvertisesUi,pa as lockBaseUrl,ma as lockFilePath,Qi as loggerFactory,Pn as loginShapedUserinfoUser,na as logsCurrentPath,oa as logsPreviousPath,Je as makeLazyEmbeddingsKeyStore,_a as markServerLockDraining,Ar as mountMcpAndApi,Ui as normalizeFsPath,qt as originGitHubHost,Or as packageVersionMajorMinor,U as parseAuthRejectionWire,xe as parseGitVersion,L as parseHocuspocusAuthToken,Nt as parseKeepaliveConnectionId,Se as pathToDocName,et as planSeed,yr as prepareSingleFileOpen,fn as processCommand,sr as processUsage,Wn as readAllTargets,Qt as readBundleDecision,H as readOwnNativeRules,Sa as readProcessLock,ya as readProcessLockDetailed,pt as readProjectHeadState,ve as readProjectLocalSemanticConfig,ua as readServerLock,Cr as readServerPackageVersion,Gr as readSkillInstallStateSnapshot,Te as readStateManifest,dn as readTargetRecordedAt,or as readTargetVersion,Mr as reconcile,xr as recordContributor,fr as recordSkillInstallEvent,zn as redactShareSubprocessStderr,Rt as registerAllTools,Qe as registerWrite,ga as releaseProcessLock,xa as releaseServerLock,ki as removeLastKnownHash,zr as reportSkillInstall,nt as resetMetrics,_r as resolveBuiltinSkillHosts,t as resolveBundleEnabled,Dr as resolveBundledSkillDir,ti as resolveContentDir,$e as resolveCursorBinaryDefault,Ai as resolveCursorSpawnInvocation,at as resolveEffectiveLinterConfig,Yr as resolveEmbeddingsCredential,M as resolveGitHubAccountFromUrl,hn as resolveLockDir,A as resolveNativeConfigForDoc,I as resolveNativeMarkdownlintConfig,Ht as resolvePack,nr as resolvePackageVersion,On as resolveSkillInstallReportSettings,vr as resolveUiInfo,Ur as restoreContributors,gi as restoreLifecycleFromConflictsJson,Et as rewriteMarkdownLinksForDocumentRename,Q as rewriteWikiLinksForDocumentRename,Un as runAuthReposSubprocess,Zt as runAuthStatusSubprocess,xn as runCloneSubprocess,Sr as runDeviceFlowSubprocess,$t as runWithMcpLogger,gt as safeContentPath,le as safeSubdir,lr as safetyCheckpoint,li as sameGitHubLogin,$n as sanitizeClientName,In as saveInMemoryCheckpoint,jn as saveVersion,ze as seedBasenameIndex,Vr as seedEphemeralProjectDir,sn as serializeError,Mi as setActiveSpanAttributes,jr as setupServerObservers,Wt as shadowGit,Yi as shutdownTelemetry,$i as spansCurrentPath,ea as spansPreviousPath,w as spawnDetached,fe as splitMarkdownBlocks,C as startWatcher,kt as streamingProblemEvent,ln as swapContributors,ui as teardownToleranceTelemetryWriter,ct as toBroadcasterKey,Bi as tracedAppendFileSync,Gi as tracedLinkSync,Li as tracedMkdir,Vi as tracedMkdirSync,qi as tracedRename,Ri as tracedRenameSync,Wi as tracedRmSync,Hi as tracedRmdirSync,zi as tracedUnlinkSync,Fi as tracedWriteFile,Ji as tracedWriteFileSync,R as trustSystemCertificates,$r as untrackTrackedProjectSkillProjection,bt as updateLastKnownHash,ha as updateProcessLockPort,wa as updateServerLockPort,z as validateAgentId,Xr as validateCloneInputs,ur as validateSkillZip,fa as waitForServerLockDrain,Ze as withHiddenWindowsConsole,Pi as withSpan,Ni as withSpanSync,ri as writeBundleDecision,Ti as writeMarkdownlintRule,dr as writeRootGitignoreForNewRepo,Ae as writeStateManifest,_n as writeTargetVersion,ne as writeTracker};
1
+ import{Ds as e,J as t,Js as n,Ks as r,Os as i,Pc as a,W as o,ic as s,ws as c,x as l,y as u}from"./src-Bh7r8AFJ.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Aa as _,Ai as v,An as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ca as D,Ci as O,Cn as k,Cr as A,Ct as j,D as M,Da as N,Di as P,Dn as F,Dr as I,Dt as L,E as R,Ea as z,Ei as B,En as V,Er as H,Et as U,F as W,Fi as G,Fn as K,Fr as q,Ft as J,G as Y,Gi as X,Gn as Z,Gr as Q,Gt as $,H as ee,Hi as te,Hn as ne,Hr as re,Ht as ie,I as ae,Ii as oe,In as se,Ir as ce,It as le,J as ue,Ji as de,Jn as fe,Jr as pe,Jt as me,K as he,Ki as ge,Kn as _e,Kr as ve,Kt as ye,L as be,Li as xe,Ln as Se,Lr as Ce,Lt as we,M as Te,Ma as Ee,Mi as De,Mn as Oe,Mt as ke,N as Ae,Ni as je,Nn as Me,Nr as Ne,Nt as Pe,O as Fe,Oa as Ie,Oi as Le,On as Re,Ot as ze,P as Be,Pi as Ve,Pn as He,Pr as Ue,Pt as We,Q as Ge,Qi as Ke,Qn as qe,Qr as Je,Qt as Ye,R as Xe,Ri as Ze,Rn as Qe,Rr as $e,Rt as et,S as tt,Sa as nt,Si as rt,Sn as it,Sr as at,St as ot,T as st,Ta as ct,Ti as lt,Tn as ut,Tr as dt,Tt as ft,U as pt,Ui as mt,Un as ht,Ur as gt,Ut as _t,V as vt,Vi as yt,Vn as bt,Vr as xt,Vt as St,W as Ct,Wi as wt,Wn as Tt,Wr as Et,Wt as Dt,X as Ot,Xi as kt,Xn as At,Xr as jt,Xt as Mt,Y as Nt,Yi as Pt,Yn as Ft,Yr as It,Yt as Lt,Z as Rt,Zi as zt,Zn as Bt,Zr as Vt,Zt as Ht,_ as Ut,_a as Wt,_i as Gt,_n as Kt,_r as qt,a as Jt,aa as Yt,ai as Xt,an as Zt,ar as Qt,at as $t,b as en,ba as tn,bi as nn,bn as rn,br as an,bt as on,c as sn,ca as cn,ci as ln,cn as un,cr as dn,ct as fn,d as pn,da as mn,di as hn,dn as gn,dr as _n,dt as vn,ea as yn,ei as bn,en as xn,er as Sn,et as Cn,f as wn,fa as Tn,fi as En,fn as Dn,fr as On,ft as kn,g as An,ga as jn,gi as Mn,gn as Nn,gr as Pn,h as Fn,ha as In,hi as Ln,hn as Rn,hr as zn,i as Bn,ia as Vn,ii as Hn,in as Un,ir as Wn,it as Gn,j as Kn,ja as qn,ji as Jn,jn as Yn,jt as Xn,k as Zn,ka as Qn,ki as $n,kn as er,kt as tr,l as nr,la as rr,li as ir,ln as ar,lr as or,lt as sr,m as cr,ma as lr,mi as ur,mn as dr,mr as fr,n as pr,na as mr,ni as hr,nn as gr,nr as _r,nt as vr,o as yr,oa as br,oi as xr,on as Sr,or as Cr,ot as wr,p as Tr,pa as Er,pi as Dr,pn as Or,pr as kr,q as Ar,qi as jr,qn as Mr,qr as Nr,qt as Pr,r as Fr,ra as Ir,ri as Lr,rn as Rr,rr as zr,rt as Br,s as Vr,sa as Hr,si as Ur,sn as Wr,sr as Gr,st as Kr,t as qr,ta as Jr,ti as Yr,tn as Xr,tr as Zr,tt as Qr,u as $r,ua as ei,ui as ti,un as ni,ur as ri,ut as ii,v as ai,va as oi,vi as si,vn as ci,vr as li,w as ui,wa as di,wi as fi,wn as pi,wr as mi,wt as hi,x as gi,xa as _i,xn as vi,xr as yi,xt as bi,y as xi,ya as Si,yi as Ci,yn as wi,yr as Ti,yt as Ei,z as Di,zi as Oi,zn as ki,zr as Ai,zt as ji}from"./src-vY_ilATE.mjs";import{C as Mi,E as Ni,T as Pi,_ as Fi,b as Ii,c as Li,d as Ri,g as zi,i as Bi,l as Vi,m as Hi,n as Ui,p as Wi,s as Gi,t as Ki,u as qi,v as Ji,w as Yi,x as Xi,y as Zi}from"./fs-traced-Dm4NQ6S5.mjs";import{a as Qi,d as $i,f as ea,i as ta,l as na,n as ra,r as ia,t as aa,u as oa}from"./logger-Dq-cRhcP.mjs";import{C as sa,S as ca,_ as la,a as ua,b as da,c as fa,d as pa,f as ma,g as ha,h as ga,i as _a,l as va,m as ya,n as ba,o as xa,p as Sa,r as Ca,s as wa,t as Ta,u as Ea,x as Da}from"./server-lock-BGqc8NMa.mjs";export{D as AGENT_ID_MAX_LEN,di as AGENT_ID_RE,Oi as AGENT_WRITE_ORIGIN,_ as AcpPermissionStore,N as AcpRegistry,lt as AcpThreadManager,O as AgentFocusBroadcaster,rt as AgentPresenceBroadcaster,S as AgentSessionCapacityError,yt as AgentSessionManager,on as AutoStartDisabledError,Ln as BUNDLE_IDS,Mn as BUNDLE_SCOPE,Gt as BUNDLE_SKILL_NAME,Bt as BacklinkIndex,zt as CC1Broadcaster,n as CC1_CONTRACT_VERSION,Wr as CONFIG_FILENAME,Z as CONFLICT_MARKER_RE,q as CURSOR_BUNDLE_PATHS_BY_PLATFORM,xi as ConfigSchema,Ir as DEFAULT_CHECKPOINT_RETENTION,m as DEFAULT_EMBEDDINGS_DIMENSIONS,T as DEFAULT_PACK_ID,Ct as DocumentDurabilityState,bn as EMBEDDINGS_API_KEY_ENV,qr as EPHEMERAL_PROJECT_DIR_PREFIX,wi as ExposureConsentError,Ie as FEATURED_AGENT_IDS,Vn as FILE_SYSTEM_WRITER,Ft as FILE_WATCHER_ORIGIN,Nr as FileEmbeddingsBackend,gr as GIT_PREFLIGHT_FAIL_SPAN_NAME,Yt as GIT_UPSTREAM_WRITER,qn as GitDirAccessError,v as GitNotAvailableError,Jn as GitTooOldError,bi as HOCUSPOCUS_AUTH_REJECTION_REASONS,ot as HocuspocusAuthRejection,j as HocuspocusAuthTokenSchema,Rn as HomeProjectRootError,xt as INSTALLED_AGENTS_SCHEMES,vn as JSON_SCHEMA_DIALECT_2020_12,r as LINEAGE_EPOCH_KEY,vt as LIVE_DERIVED_INDEX_DEBOUNCE_MS,St as LOG_MD_TEMPLATE,b as MANAGED_RENAME_ORIGIN,B as MAX_ACP_THREADS,te as MAX_AGENT_SESSIONS,Le as MCP_CONNECTION_ID_HEADER,c as MCP_SERVER_NAME,mt as MIN_EVICTABLE_IDLE_MS,De as MIN_GIT_VERSION,Y as MISSING_OK_CONFIG_MESSAGE,Ee as MalformedGitPointerError,Br as McpLogger,he as MissingOkConfigError,X as OBSERVER_SYNC_ORIGIN,un as OK_OKIGNORE_TEMPLATE,si as ONBOARDING_BUNDLE_IDS,e as ORPHAN_MODES,a as PROTOCOL_VERSION,aa as PinoLogger,va as ProcessLockCollisionError,pn as ProjectGitInitError,Xn as ROLLBACK_ORIGIN,ar as ROOT_GITIGNORE_TEMPLATE,da as RUNTIME_VERSION,br as SERVICE_WRITER,kr as SKILL_INSTALL_EVENTS_FILE_REL,o as SKILL_STATE_TARGETS,ie as STARTER_FOLDERS,_t as STARTER_FOLDER_FRONTMATTER_FILENAME,Dt as STARTER_PACKS,$ as STARTER_PACK_IDS,ye as STARTER_TEMPLATES,Fe as STATE_MANIFEST_FILENAME,Da as STATE_SCHEMA_VERSION,s as SYSTEM_DOC_NAME,Ye as SeedPrerequisiteError,h as SeedRootDirError,Ta as ServerLockCollisionError,pr as SingleFileNotAFileError,Fr as SingleFileNotFoundError,Bn as SingleFileNotMarkdownError,Zn as StateManifestError,At as TagIndex,Ci as USER_GLOBAL_BUNDLE_IDS,ke as __getShowAllWalkStatsForTesting,Pe as __resetShowAllWalkStatsForTesting,Ea as acquireProcessLock,ba as acquireServerLock,wt as applyAgentMarkdownWrite,ht as applyExternalChange,ji as applySeed,g as assertCompatibleStateManifest,je as assertGitAvailable,Yn as assertNeverDiskEvent,Nn as assertNotHomeProjectRoot,fi as attachAcpThreadSocket,Ei as attachIdleShutdown,en as bootServer,p as buildAndOpenSkill,ni as buildConfigYmlContent,Ge as buildExecResult,rn as buildIngressPolicy,P as buildOkMcpStdioCommand,En as buildSkillZip,Pr as buildStarterFolderFrontmatterYaml,Hr as buildWipTree,nn as bundleSkillMdPath,pe as canonicalProjectKey,Kt as canonicalizeForCompare,Oe as classifyEvents,Ki as classifyFsPath,It as clearAllEmbeddingsKeys,hr as clearContributors,me as coercePackId,u as colorFromSeed,cn as commitUpstreamImport,rr as commitWip,ei as commitWipFromTree,Ve as compareSemver,an as composeEffectiveLinterConfig,yi as composeFrontmatterSchemasConfig,_e as containsConflictMarkers,Me as contentHash,Lr as contributorCount,be as countShadowObjects,Xe as countStaleAgentWipRefs,Di as countWipRefs,We as createApiExtension,tr as createAssetServeMiddleware,ue as createCollaborationHost,Ne as createContentFilter,Ue as createContentFilterAsync,jt as createEmbeddingsSecretStore,Jt as createEphemeralProjectDir,Tt as createExternalChangeHandler,cr as createFileLogger,ee as createLiveDerivedIndexExtension,Ot as createMcpHttpHandler,re as createOsProbe,ae as createPersistenceExtension,st as createServer,Be as createServerObserverExtension,de as createStreamingErrorWriter,ra as createTestLogger,Vt as describeStoredEmbeddingsKey,ai as detectClaudeDesktopPresence,G as detectGit,Kn as detectProjectShape,Sn as detectUserSkillHosts,wr as discoverLockDirs,mi as discoverMarkdownlintConfig,Rr as emitPreflightFailureSpan,d as encodeDocName,Cn as encodeFolderRoute,Qr as encodeSkillRoute,wn as ensureProjectGit,gn as ensureProjectSkillGitignore,Pt as errorResponse,He as evictStaleTrackerEntries,J as extractHeadings,Kr as extractOkBinaryPath,qe as extractWikiLinksFromMarkdown,oe as fallbackPaths,Tr as findEnclosingGitRoot,er as findEnclosingProjectRoot,dt as findNativeMarkdownlintFile,Fn as flushFileLogger,hi as formatAuthRejectionWire,Hn as formatContributors,Xt as formatContributorsFrom,we as formatPackRationale,mn as gcCheckpointRefs,Gn as getCurrentMcpLogger,vi as getIngressContext,ir as getLocalDir,An as getLogFilePath,ia as getLogger,Ut as getLogsDir,la as getMachineId,Zi as getMeter,oi as getMetrics,Ii as getTracer,Si as handleCollabSocketError,ce as handleSpawnCursor,it as hasForwardingHeaders,x as hasGcLogLatch,l as iconFromClientName,tn as incrementCollabSocketFilteredError,_i as incrementServerObserverFire,Dn as initContent,Tn as initShadowRepo,Xi as initTelemetry,tt as initToleranceTelemetryWriter,kn as installJsonSchemaDialect,ii as installPrettyZodErrors,ta as installTestLoggers,Zr as installUserSkill,Re as isAllowedApiOrigin,V as isAllowedWorkspaceHostHeader,Ke as isConfigDoc,ft as isHocuspocusAuthRejectionReason,ci as isHomeDir,k as isHostAdmitted,Lt as isKnownPackId,f as isLinkIndexExcludedDoc,F as isLoopbackAddress,yn as isManagedArtifactDoc,pi as isOriginAdmitted,i as isOrphanMode,ge as isPairedWriteOrigin,Ce as isPathWithinDir,ut as isPeerAdmitted,ca as isProcessAlive,y as isProjectRoot,Jr as isReservedForUserTree,K as isSelfWrite,mr as isSystemDoc,E as isToleranceTelemetryEnabled,sa as isValidLockPid,se as lastKnownHash,Er as listRescueCheckpoints,Mt as listStarterPacks,Qn as loadCustomAgents,W as loadPrincipal,Ca as lockAdvertisesUi,pa as lockBaseUrl,ma as lockFilePath,Qi as loggerFactory,Pn as loginShapedUserinfoUser,na as logsCurrentPath,oa as logsPreviousPath,Je as makeLazyEmbeddingsKeyStore,_a as markServerLockDraining,Ar as mountMcpAndApi,Ui as normalizeFsPath,qt as originGitHubHost,Or as packageVersionMajorMinor,U as parseAuthRejectionWire,xe as parseGitVersion,L as parseHocuspocusAuthToken,Nt as parseKeepaliveConnectionId,Se as pathToDocName,et as planSeed,yr as prepareSingleFileOpen,fn as processCommand,sr as processUsage,Wn as readAllTargets,Qt as readBundleDecision,H as readOwnNativeRules,Sa as readProcessLock,ya as readProcessLockDetailed,pt as readProjectHeadState,ve as readProjectLocalSemanticConfig,ua as readServerLock,Cr as readServerPackageVersion,Gr as readSkillInstallStateSnapshot,Te as readStateManifest,dn as readTargetRecordedAt,or as readTargetVersion,Mr as reconcile,xr as recordContributor,fr as recordSkillInstallEvent,zn as redactShareSubprocessStderr,Rt as registerAllTools,Qe as registerWrite,ga as releaseProcessLock,xa as releaseServerLock,ki as removeLastKnownHash,zr as reportSkillInstall,nt as resetMetrics,_r as resolveBuiltinSkillHosts,t as resolveBundleEnabled,Dr as resolveBundledSkillDir,ti as resolveContentDir,$e as resolveCursorBinaryDefault,Ai as resolveCursorSpawnInvocation,at as resolveEffectiveLinterConfig,Yr as resolveEmbeddingsCredential,M as resolveGitHubAccountFromUrl,hn as resolveLockDir,A as resolveNativeConfigForDoc,I as resolveNativeMarkdownlintConfig,Ht as resolvePack,nr as resolvePackageVersion,On as resolveSkillInstallReportSettings,vr as resolveUiInfo,Ur as restoreContributors,gi as restoreLifecycleFromConflictsJson,Et as rewriteMarkdownLinksForDocumentRename,Q as rewriteWikiLinksForDocumentRename,Un as runAuthReposSubprocess,Zt as runAuthStatusSubprocess,xn as runCloneSubprocess,Sr as runDeviceFlowSubprocess,$t as runWithMcpLogger,gt as safeContentPath,le as safeSubdir,lr as safetyCheckpoint,li as sameGitHubLogin,$n as sanitizeClientName,In as saveInMemoryCheckpoint,jn as saveVersion,ze as seedBasenameIndex,Vr as seedEphemeralProjectDir,sn as serializeError,Mi as setActiveSpanAttributes,jr as setupServerObservers,Wt as shadowGit,Yi as shutdownTelemetry,$i as spansCurrentPath,ea as spansPreviousPath,w as spawnDetached,fe as splitMarkdownBlocks,C as startWatcher,kt as streamingProblemEvent,ln as swapContributors,ui as teardownToleranceTelemetryWriter,ct as toBroadcasterKey,Bi as tracedAppendFileSync,Gi as tracedLinkSync,Li as tracedMkdir,Vi as tracedMkdirSync,qi as tracedRename,Ri as tracedRenameSync,Wi as tracedRmSync,Hi as tracedRmdirSync,zi as tracedUnlinkSync,Fi as tracedWriteFile,Ji as tracedWriteFileSync,R as trustSystemCertificates,$r as untrackTrackedProjectSkillProjection,bt as updateLastKnownHash,ha as updateProcessLockPort,wa as updateServerLockPort,z as validateAgentId,Xr as validateCloneInputs,ur as validateSkillZip,fa as waitForServerLockDrain,Ze as withHiddenWindowsConsole,Pi as withSpan,Ni as withSpanSync,ri as writeBundleDecision,Ti as writeMarkdownlintRule,dr as writeRootGitignoreForNewRepo,Ae as writeStateManifest,_n as writeTargetVersion,ne as writeTracker};