@inkeep/open-knowledge 0.65.0-beta.6 → 0.65.0-beta.7

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 (163) hide show
  1. package/dist/{acp-harness-probe-DYde9JLD.mjs → acp-harness-probe-0TsDLkSm.mjs} +2 -2
  2. package/dist/cli.mjs +6 -6
  3. package/dist/config-schema.json +1 -1
  4. package/dist/config.project-local.schema.json +1 -1
  5. package/dist/constants-5fvIhZpq.mjs +2 -0
  6. package/dist/fs-traced-CJauRo0X.mjs +1 -0
  7. package/dist/{fs-traced-C5oeVBiQ.mjs → fs-traced-DcgvOGgW.mjs} +2 -2
  8. package/dist/git-handle-2_ip1fTf.mjs +1 -0
  9. package/dist/{git-handle-CeLf_80_.mjs → git-handle-LrqWfHo9.mjs} +2 -2
  10. package/dist/index.mjs +2 -2
  11. package/dist/{init-D9c7bJgX.mjs → init-4m61hX8N.mjs} +3 -3
  12. package/dist/init-DTxzfZUK.mjs +1 -0
  13. package/dist/{launch-json-removal-CCE1hCzu.mjs → launch-json-removal-C_GDC4PP.mjs} +2 -2
  14. package/dist/loader-CX3-YjDu.mjs +1 -0
  15. package/dist/{loader-DfYCAjwQ.mjs → loader-CqMn0oDw.mjs} +2 -2
  16. package/dist/md-manager-BB0EfynB.mjs +2 -0
  17. package/dist/{open-browser-DScjpc4A.mjs → open-browser-BgX5g9kd.mjs} +2 -2
  18. package/dist/parse-worker.mjs +1 -1
  19. package/dist/{preview-C1bqAAHy.mjs → preview-DAr0H_Nz.mjs} +2 -2
  20. package/dist/preview-Fg1Qh_be.mjs +1 -0
  21. package/dist/public/assets/{ActivityModeContent-iVCQqweq.js → ActivityModeContent-elWsfC63.js} +1 -1
  22. package/dist/public/assets/{AddPropertiesButton-CPf02Fwa.js → AddPropertiesButton-CjPwqhhi.js} +1 -1
  23. package/dist/public/assets/{AgentDiffPane-BtpGOC45.js → AgentDiffPane-BrXppr_Y.js} +1 -1
  24. package/dist/public/assets/{AgentThreadClientBinder-byV-mbnY.js → AgentThreadClientBinder-9Kd_G6KF.js} +1 -1
  25. package/dist/public/assets/{BugReportHistory-Mvnt4SEp.js → BugReportHistory-BHIdpNMk.js} +1 -1
  26. package/dist/public/assets/{BugReportHistoryDialog-DcWVOW9N.js → BugReportHistoryDialog-Dr8-xNnX.js} +1 -1
  27. package/dist/public/assets/{CodeMirrorPropInput-B6CoPdiS.js → CodeMirrorPropInput-DBXjkPpK.js} +1 -1
  28. package/dist/public/assets/{ConsentDialogBody-0hoJ_ijU.js → ConsentDialogBody-DNra0D09.js} +1 -1
  29. package/dist/public/assets/{DocumentContext-cm1ZiCIR.js → DocumentContext-Bq5FEPlc.js} +2 -2
  30. package/dist/public/assets/{EditorModeToggle-CgD37GNE.js → EditorModeToggle-03bSlEYV.js} +1 -1
  31. package/dist/public/assets/{EnableSyncConfirmDialog-DFj2_7qp.js → EnableSyncConfirmDialog-BiXLM9eF.js} +1 -1
  32. package/dist/public/assets/{ExcalidrawDocEditor-Du-VDkG1.js → ExcalidrawDocEditor-ReIsu-q7.js} +1 -1
  33. package/dist/public/assets/FeedbackForm-Bh43LhOf.js +1 -0
  34. package/dist/public/assets/{GraphPanel-BV1qD1M6.js → GraphPanel-B85wHg1S.js} +1 -1
  35. package/dist/public/assets/{ImportSkillDialog-D3CIOCxg.js → ImportSkillDialog-Bf-a8cEF.js} +1 -1
  36. package/dist/public/assets/{LintConfigEditor-BgNu1pk8.js → LintConfigEditor-DQGDnaz9.js} +1 -1
  37. package/dist/public/assets/{ManagedArtifactProperties-B8EqUoZ3.js → ManagedArtifactProperties-CCxutXNq.js} +1 -1
  38. package/dist/public/assets/ManagedArtifactProperties-CD3zeeJm.js +1 -0
  39. package/dist/public/assets/{MermaidDocEditor-DX11737F.js → MermaidDocEditor-DDq0vsai.js} +1 -1
  40. package/dist/public/assets/{PropertyDisplayRow-DFgojvKc.js → PropertyDisplayRow-RavoaS4I.js} +1 -1
  41. package/dist/public/assets/{ReportBugDialogBody-rfqM32yk.js → ReportBugDialogBody-BTXd2_SI.js} +1 -1
  42. package/dist/public/assets/{ReportBugMenuTrigger-MbnqF2SK.js → ReportBugMenuTrigger-fKa7fr5P.js} +2 -2
  43. package/dist/public/assets/{SchemaConfigEditor-D2sSopqD.js → SchemaConfigEditor-CkwRhR9w.js} +1 -1
  44. package/dist/public/assets/{SessionsHost-CL1ekzh8.js → SessionsHost-BI_A0-0s.js} +2 -2
  45. package/dist/public/assets/{SettingsDialogBody-CcLAF7VK.js → SettingsDialogBody-B_hpIt8k.js} +1 -1
  46. package/dist/public/assets/{ShareBranchSwitchDialog-BO0uIFs7.js → ShareBranchSwitchDialog-ZPNZoORX.js} +1 -1
  47. package/dist/public/assets/{ShareReceiveDialog-CskBIDXp.js → ShareReceiveDialog-BhjCenvH.js} +1 -1
  48. package/dist/public/assets/{ShareReceiveMissDialog-DbZQyqUj.js → ShareReceiveMissDialog-rCbmgHHt.js} +1 -1
  49. package/dist/public/assets/{SkillCostValue-CNJ4MgeB.js → SkillCostValue-DyXB8AqC.js} +1 -1
  50. package/dist/public/assets/{SkillEditBanner-DACxakQd.js → SkillEditBanner-D5qW2gc9.js} +1 -1
  51. package/dist/public/assets/{SkillInstallMenu-DsV7Zg_N.js → SkillInstallMenu-DvUCOYH9.js} +1 -1
  52. package/dist/public/assets/{SkillOriginInline-Dy2zQZrT.js → SkillOriginInline-CWUNJzFn.js} +1 -1
  53. package/dist/public/assets/{SkillToolbarControls-CK1hDwSR.js → SkillToolbarControls-B-aau0od.js} +1 -1
  54. package/dist/public/assets/{SlidesToolbarControls-DauhKnHa.js → SlidesToolbarControls-Dw1l0rjA.js} +1 -1
  55. package/dist/public/assets/{SourceEditor-BAFCEDOW.js → SourceEditor-BqtT3ujn.js} +1 -1
  56. package/dist/public/assets/{TerminalPanel-BCS-RzlD.js → TerminalPanel-CRVCgsyx.js} +1 -1
  57. package/dist/public/assets/{TerminalWindowApp-Pr86JmqX.js → TerminalWindowApp-CEIrXzDF.js} +1 -1
  58. package/dist/public/assets/{TextDocEditor-CuXA3fG7.js → TextDocEditor-Bekb_f2n.js} +1 -1
  59. package/dist/public/assets/{ThreadView-D7sS5GXu.js → ThreadView-BKnIKa0T.js} +1 -1
  60. package/dist/public/assets/{TimelineDiffPane-C4-v6VKa.js → TimelineDiffPane-BdoPYWED.js} +1 -1
  61. package/dist/public/assets/{agent-diff-store-BD87nz3F.js → agent-diff-store-6T45Gkgl.js} +1 -1
  62. package/dist/public/assets/{auth-state-cache-BmBuSpVr.js → auth-state-cache-Cjt2VSzF.js} +1 -1
  63. package/dist/public/assets/{bug-report-send-manager-CWBwJLhw.js → bug-report-send-manager-BWS3P1nQ.js} +1 -1
  64. package/dist/public/assets/{client-version-D2q-P0iF.js → client-version-CPgBWecL.js} +1 -1
  65. package/dist/public/assets/{comment-chips-DsXikPkv.js → comment-chips-BBA9zWtL.js} +1 -1
  66. package/dist/public/assets/{config-provider-CTJraL6m.js → config-provider-DP90oIbG.js} +3 -3
  67. package/dist/public/assets/{dist-7elyeD1s.js → dist-7pFMKYKc.js} +1 -1
  68. package/dist/public/assets/{doc-paths-D_8UvPYx.js → doc-paths-AnuejHgE.js} +1 -1
  69. package/dist/public/assets/{documents-events--JsHluy4.js → documents-events-CQFs1txA.js} +1 -1
  70. package/dist/public/assets/{file-tree-adapter-DNXscpMG.js → file-tree-adapter-B0uo_ZTL.js} +1 -1
  71. package/dist/public/assets/{file-tree-utils-BjUMUlWv.js → file-tree-utils-AlbsUKjT.js} +1 -1
  72. package/dist/public/assets/{folder-config-api-D4_ApcVY.js → folder-config-api-AaGTW4Vi.js} +1 -1
  73. package/dist/public/assets/i18n-B40Sn8GX.js +1 -0
  74. package/dist/public/assets/{index-B0vTL8Ml.js → index-BDcCP25E.js} +120 -120
  75. package/dist/public/assets/{launcher-selection-DGh5-Pqt.js → launcher-selection-XGS5cMvX.js} +1 -1
  76. package/dist/public/assets/{lint-config-client-RAMPJ8G7.js → lint-config-client-BD9KBHEH.js} +1 -1
  77. package/dist/public/assets/{markdownlint-rule-browser-DitAECCM.js → markdownlint-rule-browser-DDi01i_N.js} +1 -1
  78. package/dist/public/assets/messages-4RkxHe2V.js +1 -0
  79. package/dist/public/assets/messages-B2mYVhA4.js +1 -0
  80. package/dist/public/assets/messages-B66IfJmC.js +1 -0
  81. package/dist/public/assets/messages-BnuH_5SE.js +1 -0
  82. package/dist/public/assets/messages-C6nB3b-S.js +1 -0
  83. package/dist/public/assets/messages-CruCvJrt.js +1 -0
  84. package/dist/public/assets/messages-DHU55TlV.js +1 -0
  85. package/dist/public/assets/messages-DXoOD1yT.js +1 -0
  86. package/dist/public/assets/messages-DlIZYdug.js +1 -0
  87. package/dist/public/assets/messages-Tw_xE_s7.js +1 -0
  88. package/dist/public/assets/messages-W1AArZV6.js +1 -0
  89. package/dist/public/assets/messages-v9AyC868.js +1 -0
  90. package/dist/public/assets/{page-list-cache-prUKRtRa.js → page-list-cache-uXT-06Rv.js} +1 -1
  91. package/dist/public/assets/{pending-receive-nav-store-DC3PrSPg.js → pending-receive-nav-store-BZbhMqVl.js} +1 -1
  92. package/dist/public/assets/{progress-BEXaBNIb.js → progress-DZfOlTRL.js} +1 -1
  93. package/dist/public/assets/{project-paths-D9vcEZSb.js → project-paths-BfZmC0Xe.js} +1 -1
  94. package/dist/public/assets/{prop-types-BOXmr7Q9.js → prop-types-BGi0QyJN.js} +1 -1
  95. package/dist/public/assets/{receive-store-DMcyiDfj.js → receive-store-B5UCXtcM.js} +1 -1
  96. package/dist/public/assets/{selection-context-CLtjNgSV.js → selection-context-Dzqum4PM.js} +1 -1
  97. package/dist/public/assets/{skill-scope-CVSSymVB.js → skill-scope-D5Su1R0A.js} +1 -1
  98. package/dist/public/assets/{skills-api-DHpABbiE.js → skills-api-DoDgfzdK.js} +1 -1
  99. package/dist/public/assets/{src-Dq3nd0Lx.js → src-xOo02BAQ.js} +1 -1
  100. package/dist/public/assets/{startup-marks-lmLF_OO-.js → startup-marks-CLmRley0.js} +1 -1
  101. package/dist/public/assets/{tag-pill-input-DHmb-7zU.js → tag-pill-input-kJ01bH0I.js} +1 -1
  102. package/dist/public/assets/{target-navigation-intent-zJ017p9i.js → target-navigation-intent-D4kqQyLi.js} +1 -1
  103. package/dist/public/assets/{telemetry-startup-DI_JMeyZ.js → telemetry-startup-DhGOoL9J.js} +1 -1
  104. package/dist/public/assets/{terminal-cli-display-2og2-PQg.js → terminal-cli-display-DAGgFkPy.js} +1 -1
  105. package/dist/public/assets/{typing-burst-detector-EBpBvXLS.js → typing-burst-detector-BLQPTYMY.js} +1 -1
  106. package/dist/public/assets/{uninstall-Cs7fpSSM.js → uninstall-C4c6_D4O.js} +1 -1
  107. package/dist/public/assets/{use-activity-panel-BP6cVXAM.js → use-activity-panel-C3v_dGDR.js} +1 -1
  108. package/dist/public/assets/{use-apply-config-color-theme-DdXME66g.js → use-apply-config-color-theme-DbSHvgtI.js} +1 -1
  109. package/dist/public/assets/{use-collab-url-Bw-ux1e9.js → use-collab-url-C2Pj7Ql6.js} +1 -1
  110. package/dist/public/assets/{use-live-xterm-theme-cynTCBxO.js → use-live-xterm-theme-kgq_fqMS.js} +1 -1
  111. package/dist/public/assets/{use-open-skill-C2S8Ju9E.js → use-open-skill-DIZ2AzWt.js} +1 -1
  112. package/dist/public/assets/{use-settings-route-DHPJ3RaJ.js → use-settings-route-B8Yh1epC.js} +1 -1
  113. package/dist/public/assets/{use-skill-origin-CH9FS4YO.js → use-skill-origin-CqK8ccXn.js} +1 -1
  114. package/dist/public/assets/{use-skills-D56xe4F0.js → use-skills-Dg7qNR3F.js} +1 -1
  115. package/dist/public/assets/{use-terminal-enabled-DTa27VwS.js → use-terminal-enabled-Cta7JKYN.js} +1 -1
  116. package/dist/public/assets/{use-timeline-entry-diff-7MYmjURO.js → use-timeline-entry-diff-pwdtUcXH.js} +1 -1
  117. package/dist/public/assets/{use-workspace-BiK7U2Dp.js → use-workspace-CpEi1UOP.js} +1 -1
  118. package/dist/public/index.html +48 -48
  119. package/dist/public/uninstall.html +4 -4
  120. package/dist/{repair-launch-json-zq4UShgG.mjs → repair-launch-json-B4A9iVBi.mjs} +2 -2
  121. package/dist/{repair-mcp-configs-Dg9WF_9I.mjs → repair-mcp-configs-D_eDwRH0.mjs} +2 -2
  122. package/dist/repair-skills-Bhl04NpZ.mjs +1 -0
  123. package/dist/{repair-skills-DkqRt0jh.mjs → repair-skills-BlANm1-D.mjs} +2 -2
  124. package/dist/{resolve-project-root-DZ8FUmWA.mjs → resolve-project-root-DVS2LVVT.mjs} +2 -2
  125. package/dist/schemas/v0/config.project-local.schema.json +1 -1
  126. package/dist/{server-lock-DE-aYwut.mjs → server-lock-B5HckUAb.mjs} +2 -2
  127. package/dist/server-lock-i4l0f8uD.mjs +1 -0
  128. package/dist/{skill-teardown-n1roKgm3.mjs → skill-teardown-DwNb2TRE.mjs} +2 -2
  129. package/dist/{sleep-DyLEGHvt.mjs → sleep-CKSyI4wt.mjs} +2 -2
  130. package/dist/{src-Bp6iyVLp.mjs → src-BF2VciaA.mjs} +2 -2
  131. package/dist/{src-Ct2lVbOu.mjs → src-BjPS9IEY.mjs} +3 -3
  132. package/dist/src-CuJVvkrO.mjs +1 -0
  133. package/dist/{src-DeoDqJay.mjs → src-D3A1jD_M.mjs} +6 -6
  134. package/dist/{src-DHmPa1LN.mjs → src-thqg3x4M.mjs} +1 -1
  135. package/dist/start-C2sq86ZK.mjs +1 -0
  136. package/dist/{start-bwJccpae.mjs → start-E8uCq6h7.mjs} +3 -3
  137. package/package.json +5 -5
  138. package/dist/constants-CXB_nN4r.mjs +0 -2
  139. package/dist/fs-traced-DiZ_Z58g.mjs +0 -1
  140. package/dist/git-handle-CUMkcH0Q.mjs +0 -1
  141. package/dist/init-QooMxlO-.mjs +0 -1
  142. package/dist/loader-GUgCYJc6.mjs +0 -1
  143. package/dist/md-manager-DrTOG_TR.mjs +0 -2
  144. package/dist/preview-BpsokUu6.mjs +0 -1
  145. package/dist/public/assets/FeedbackForm-HyVh8UGI.js +0 -1
  146. package/dist/public/assets/ManagedArtifactProperties-BPguuakJ.js +0 -1
  147. package/dist/public/assets/i18n-BZGgf8Qd.js +0 -1
  148. package/dist/public/assets/messages-2TaFL8Ip.js +0 -1
  149. package/dist/public/assets/messages-5EoLltUL.js +0 -1
  150. package/dist/public/assets/messages-BC11FP6A.js +0 -1
  151. package/dist/public/assets/messages-Bd3nERvw.js +0 -1
  152. package/dist/public/assets/messages-ByriK8ln.js +0 -1
  153. package/dist/public/assets/messages-CHhnwg_r.js +0 -1
  154. package/dist/public/assets/messages-CYykrejt.js +0 -1
  155. package/dist/public/assets/messages-D0jFOlFs.js +0 -1
  156. package/dist/public/assets/messages-DLDevhFL.js +0 -1
  157. package/dist/public/assets/messages-DZU_0bet.js +0 -1
  158. package/dist/public/assets/messages-SZ8C0t5f.js +0 -1
  159. package/dist/public/assets/messages-lAaVwcVx.js +0 -1
  160. package/dist/repair-skills-BArwmDoi.mjs +0 -1
  161. package/dist/server-lock-Bdq8J23F.mjs +0 -1
  162. package/dist/src-Bx8EE6Hc.mjs +0 -1
  163. package/dist/start-aGvsyPiX.mjs +0 -1
@@ -1,9 +1,9 @@
1
- import{i as e,o as t,r as n,t as r}from"./chunk-DTipWd-i.mjs";import{A as i,At as a,Dt as o,E as s,Et as c,Ft as l,G as u,Gt as d,Ht as f,It as p,Jt as m,Kt as h,L as g,Lt as _,Mt as v,P as y,Rt as b,T as x,Ut as S,Vt as C,Wt as w,X as T,Z as E,Zt as D,at as O,bt as ee,ct as te,et as ne,jt as re,kt as k,l as ie,lt as ae,mt as oe,nt as A,q as se,rt as ce,tt as le,v as j,x as M,yt as ue,zt as N}from"./sleep-DyLEGHvt.mjs";import{n as de,t as fe}from"./markdownit-BNz2xGu4.mjs";import P from"node:path";import pe from"node:process";import{fileURLToPath as me}from"node:url";import{access as he,accessSync as ge,readFile as F,readFileSync as _e}from"node:fs";import{EOL as ve,homedir as ye}from"node:os";const be=`state/bug-reports`,xe=_({at:S(),transport:S(),outcome:S(),reference:S().optional(),error:S().optional(),errorCode:S().optional()}),Se=_({reason:S(),at:S(),errorCode:S().optional()});_({version:b().int().catch(1),id:S(),createdAt:S(),bundleLevel:S(),zipBytes:b().int().nonnegative().catch(0),zipDeleted:a().optional(),state:S(),systemWide:a().optional(),projectSlug:S().nullable().optional(),reference:S().optional(),lastError:Se.optional(),attempts:k(xe).optional(),note:S().optional()});const Ce=`.sent.yaml`;_({version:b().int().catch(1),id:S().optional(),sentAt:S().optional(),reference:S().optional()});const we=2,Te={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function Ee({kind:e,runtimeVersion:t}){return{[Te.protocol]:`2`,[Te.runtime]:t,[Te.kind]:e}}const De=[{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:`$1[REDACTED]`},{name:`macos-home-path`,regex:/\/Users\/[^/"]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/"]+\//g,replacement:`~/`}],Oe=De.map(e=>e.name);function ke(e){let t=new Set,n=0;return{redacted:e.split(`
1
+ import{i as e,o as t,r as n,t as r}from"./chunk-DTipWd-i.mjs";import{A as i,At as a,Dt as o,E as s,Et as c,Ft as l,G as u,Gt as d,Ht as f,It as p,Jt as m,Kt as h,L as g,Lt as _,Mt as v,P as y,Rt as b,T as x,Ut as S,Vt as C,Wt as w,X as T,Z as E,Zt as D,at as O,bt as ee,ct as te,et as ne,jt as re,kt as k,l as ie,lt as ae,mt as oe,nt as A,q as se,rt as ce,tt as le,v as j,x as M,yt as ue,zt as N}from"./sleep-CKSyI4wt.mjs";import{n as de,t as fe}from"./markdownit-BNz2xGu4.mjs";import P from"node:path";import pe from"node:process";import{fileURLToPath as me}from"node:url";import{access as he,accessSync as ge,readFile as F,readFileSync as _e}from"node:fs";import{EOL as ve,homedir as ye}from"node:os";const be=`state/bug-reports`,xe=_({at:S(),transport:S(),outcome:S(),reference:S().optional(),error:S().optional(),errorCode:S().optional()}),Se=_({reason:S(),at:S(),errorCode:S().optional()});_({version:b().int().catch(1),id:S(),createdAt:S(),bundleLevel:S(),zipBytes:b().int().nonnegative().catch(0),zipDeleted:a().optional(),state:S(),systemWide:a().optional(),projectSlug:S().nullable().optional(),reference:S().optional(),lastError:Se.optional(),attempts:k(xe).optional(),note:S().optional()});const Ce=`.sent.yaml`;_({version:b().int().catch(1),id:S().optional(),sentAt:S().optional(),reference:S().optional()});const we=2,Te={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function Ee({kind:e,runtimeVersion:t}){return{[Te.protocol]:`2`,[Te.runtime]:t,[Te.kind]:e}}const De=[{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:`$1[REDACTED]`},{name:`macos-home-path`,regex:/\/Users\/[^/"]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/"]+\//g,replacement:`~/`}],Oe=De.map(e=>e.name);function ke(e){let t=new Set,n=0;return{redacted:e.split(`
2
2
  `).map(e=>{let r=e,i=!1;for(let{name:e,regex:n,replacement:a}of De)n.lastIndex=0,n.test(r)&&(t.add(e),i=!0,n.lastIndex=0,r=r.replace(n,a));return i&&n++,r}).join(`
3
3
  `),patterns:[...t],lineCount:n}}function Ae(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Me(e.position):`start`in e||`end`in e?Me(e):`line`in e||`column`in e?je(e):``}function je(e){return Ne(e&&e.line)+`:`+Ne(e&&e.column)}function Me(e){return je(e&&e.start)+`-`+je(e&&e.end)}function Ne(e){return e&&typeof e==`number`?e:1}var Pe=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Ae(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Pe.prototype.file=``,Pe.prototype.name=``,Pe.prototype.reason=``,Pe.prototype.message=``,Pe.prototype.stack=``,Pe.prototype.column=void 0,Pe.prototype.line=void 0,Pe.prototype.ancestors=void 0,Pe.prototype.cause=void 0,Pe.prototype.fatal=void 0,Pe.prototype.place=void 0,Pe.prototype.ruleId=void 0,Pe.prototype.source=void 0;const Fe=new Map([[32,` `],[9,` `],[160,`\xA0`]]);function Ie(e){let t=/^&#(x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);$/.exec(e);if(!t)return null;let n=t[1],r=n[0]===`x`||n[0]===`X`,i=Number.parseInt(r?n.slice(1):n,r?16:10);return Number.isNaN(i)?null:i}function Le(e){let t=Ie(e);return t!==null&&Fe.has(t)}function Re(e){let t=Ie(e);return t===null?null:Fe.get(t)??null}const ze=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function Be(e){ze.lastIndex=0;let t=e.match(ze);if(t===null||t.join(``)!==e)return null;let n=``;for(let e of t){let t=Re(e);if(t===null)return null;n+=t}return n}const Ve=new Set([`*`,`_`,"`",`~`,`\\`,`$`]),He=/^={2,}/,Ue=/^<(?:[A-Za-z][A-Za-z0-9+.-]*:[^<>\s]*|[^\s<>@]+@[^\s<>]+)>/;function We(e,t){return Ue.test(e.slice(t,t+512))}function Ge(e,t){let n=e.lastIndexOf(`<`,t);return n<0||t-n>512?!1:Ue.exec(e.slice(n,t+1))?.[0].length===t+1-n}const Ke=/^<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^>]*?)?\/?>/,qe=/^!(?=\[)/,Je=/^\[\^/,Ye=/^\]\[[^\]]*\]/,Xe=/^\[\[[^\][|]*\|/,Ze=/^#[^\][|]*(?=\]\])/,Qe=/^\]\([^)]*\)/,$e=/^(?:#{1,6}[ \t]+|>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?)/,et=/^(?:`{3,}[^`\n]*|~{3,}[^\n]*)$/,tt=/^(?:(?:[-*_][ \t]*){3,}|=+[ \t]*|[|\-: \t]*-[|\-: \t]*)$/;function nt(e,t){let n=e.indexOf(`
4
4
  `,t),r=n===-1?e.length:n;if(r>t&&e[r-1]===`\r`&&--r,r-t>1024)return 0;let i=e.slice(t,r);return i.length===0||!et.test(i)&&!tt.test(i)?0:i.length}const rt=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/y;function it(e,t){if(e[t]!==`&`)return null;let n=t,r=``;for(;;){rt.lastIndex=n;let t=rt.exec(e)?.[0];if(t===void 0)break;let i=Re(t);if(i===null)break;r+=i,n+=t.length}return n===t?null:{length:n-t,rendered:r}}function at(e){return e===` `||e===` `||e===`
5
5
  `||e===`\r`||e===`\f`||e===`\v`}function ot(e,t){for(let n=t-1;n>=0;--n){let t=e[n];if(t===`
6
- `)return!0;if(t!==` `&&t!==` `)return!1}return!0}function st(e,t){let n=e[t];if(n===void 0)return 0;if(ot(e,t)){let n=nt(e,t);if(n>0)return n}if(n===`|`)return 1;if(n===`<`){let n=Ke.exec(e.slice(t,t+512))?.[0].length;return n===void 0?+!!We(e,t):n}if(n===`>`&&Ge(e,t))return 1;if(n===`=`){let n=He.exec(e.slice(t,t+3))?.[0].length;if(n!==void 0)return n}if(n===`!`)return+!!qe.test(e.slice(t,t+2));if(Ve.has(n))return 1;if(n===`[`){let n=e.slice(t,t+512),r=Xe.exec(n)?.[0].length;return r===void 0?Je.test(n)?2:1:r}if(n===`#`){let n=Ze.exec(e.slice(t,t+512))?.[0].length;if(n!==void 0)return n}if(n===`]`){if(e[t+1]===`]`)return 2;let n=e.slice(t,t+512),r=Qe.exec(n)?.[0].length;if(r!==void 0)return r;let i=Ye.exec(n)?.[0].length;return i===void 0?1:i}return ot(e,t)?$e.exec(e.slice(t,t+32))?.[0].length??0:0}function ct(e,t,{syntaxIn:n}){let r=[];if(t.length===0)return r;let i=n===`haystack`;for(let n=0;n<e.length;n+=1){let a=e[n];if(a===void 0||at(a)||i&&a!==t[0]&&(st(e,n)>0||it(e,n)!==null))continue;let o=n,s=0;for(;o<e.length&&s<t.length;){let n=e[o],r=t[s];if(n===r){o+=1,s+=1;continue}if(at(r)){s+=1;continue}if(at(n)){o+=1;continue}let a=i?st(e,o):st(t,s);if(a>0){i?o+=a:s+=a;continue}let c=i?it(e,o):it(t,s);if(c!==null){let n=i?t:e,r=i?s:o,a=!0;for(let e of c.rendered)if(!at(e)){for(;r<n.length&&at(n[r]);)r+=1;if(n[r]!==e){a=!1;break}r+=1}if(!a)break;i?(o+=c.length,s=r):(s+=c.length,o=r);continue}break}for(;s<t.length&&at(t[s]);)s+=1;s===t.length&&r.push({start:n,end:o})}return r}function lt(e,t,n,r){let i=``,a=Math.max(0,t),o=Math.min(e.length,n);for(;a<o;){let t=e[a];if(at(t)){a+=1;continue}if(r){let t=st(e,a);if(t>0){a+=t;continue}let n=it(e,a);if(n!==null){for(let e of n.rendered)at(e)||(i+=e);a+=n.length;continue}}i+=t,a+=1}return i}function ut(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[e.length-1-r]===t[t.length-1-r];)r+=1;return r}function dt(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function eee(e,t,n,{syntaxIn:r,syntaxInContext:i=!1}){let a=n.prefix??``,o=n.suffix??``,s=r===`haystack`,c=0;if(a.length>0){let n=a.length*8+64;c+=ut(lt(a,0,a.length,i),lt(e,t.start-n,t.start,s))}if(o.length>0){let n=o.length*8+64;c+=dt(lt(o,0,o.length,i),lt(e,t.end,t.end+n,s))}return c}function ft(e,{syntaxInContext:t=!1}={}){let n=lt(e.prefix??``,0,1/0,t).length+lt(e.suffix??``,0,1/0,t).length;return Math.min(8,n)}function pt(e){return Math.max(e*4,e+64)}var mt=ue(),ht=class extends Error{envVar;constructor(e,t){super(`${e}: ${t}`),this.name=`EnvVarError`,this.envVar=e}};const gt=new Map([[`PORT`,[`server`,`port`]],[`OK_BIND`,[`server`,`bind`]],[`OK_EXTERNAL_URL`,[`server`,`externalUrl`]],[`OK_ALLOW_EXTERNAL`,[`server`,`allowExternal`]],[`OK_OPEN_BROWSER`,[`server`,`openBrowser`]],[`OK_IDLE_SHUTDOWN`,[`server`,`idleShutdown`]]]);function _t(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toUpperCase()}function vt(e){return`OK_${(e[0]===`server`?e.slice(1):e).map(_t).join(`_`)}`}function yt(e){let t=e;for(let e=0;e<16;e++){let e=t?._zod?.def;if(e===void 0||e.type!==`default`&&e.type!==`optional`&&e.type!==`nullable`)return t;t=e.innerType}return t}function bt(e){return yt(e)?._zod?.def?.type}function xt(e=i){let t=[],n=(e,r)=>{let i=yt(e)?._zod?.def?.shape;if(i===void 0){r.length>0&&t.push(r);return}for(let[e,t]of Object.entries(i))n(t,[...r,e])};return n(e,[]),t}function St(){let e=new Map;for(let t of xt())e.set(vt(t),t);return e}function Ct(e,t,n){switch(bt(n)){case`boolean`:if(t===`1`||t===`true`)return!0;if(t===`0`||t===`false`)return!1;throw new ht(e,`expected a boolean (1/0/true/false), got ${JSON.stringify(t)}`);case`number`:{let n=Number(t);if(!Number.isFinite(n))throw new ht(e,`expected a number, got ${JSON.stringify(t)}`);return n}case`array`:return t.split(/\s+/).filter(e=>e!==``);default:return t}}function wt(e,t){let n=Array(t.length+1);for(let e=0;e<=t.length;e++)n[e]=e;for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1));i=n[a],n[a]=o}}return n[t.length]}function Tt(e,t){if(e===`OK_PORT`)return{envVar:e,message:`OK_PORT is not read — the port variable is unprefixed PORT.`};let n=t.get(e);if(n!==void 0)return{envVar:e,message:`${e} maps to config key ${n.join(`.`)}, which is not env-configurable — set it in the config file instead.`};for(let t of gt.keys())if(t!==`PORT`&&wt(e,t)<=2)return{envVar:e,message:`Unknown variable ${e} — did you mean ${t}?`};return null}function Et(e,t){let n={...e};for(let[e,r]of Object.entries(t)){if(r===void 0)continue;let t=n[e];n[e]=Dt(r)&&Dt(t)?Et(t,r):r}return n}function Dt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ot(e){let t=[],n=[],r=St();for(let[n,r]of gt){let a=e[n];if(a===void 0||a.trim()===``)continue;let o=s(i,r);if(o===void 0)throw new ht(n,`internal: config path ${r.join(`.`)} does not resolve`);let c=Ct(n,a.trim(),o),l=o.safeParse(c);if(!l.success)throw new ht(n,`${l.error.issues.map(e=>e.message).join(`; `)||`invalid value`} (got ${JSON.stringify(a)})`);t.push({path:r,envVar:n,value:l.data})}for(let t of Object.keys(e)){if(!t.startsWith(`OK_`)||gt.has(t)||e[t]===void 0)continue;let i=Tt(t,r);i!==null&&n.push(i)}let a={};for(let{path:e,value:n}of t){let t=a;for(let n of e.slice(0,-1))t[n]??={},t=t[n];t[e[e.length-1]]=n}return{overrides:t,layer:a,diagnostics:n}}function kt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function At(e){let{value:t,file:n,source:r,doc:a}=e,o=[],s=(e,t)=>{if(t.length>0){let e=x(i,t);if(e!==void 0){if(e.scope===`project-local`){let e=vt(t),i;a!=null&&r!=null&&n!=null&&(i=M({file:n,source:r,doc:a,path:t})),o.push({path:[...t],...gt.has(e)?{envVar:e}:{},...i===void 0?{}:{source:i}})}return}}if(kt(e))for(let[n,r]of Object.entries(e))s(r,[...t,n])};return s(t,[]),o}function jt(e){let t=e.path.join(`.`);return`${e.source===void 0?``:`${e.source.file}:${e.source.line}:${e.source.column}: `}${t} is a per-machine (project-local) setting; the value committed in .ok/config.yml is ignored. Set it in .ok/local/config.yml (this machine only)${e.envVar===void 0?``:`, or set ${e.envVar} on this host`}.`}function Mt(e,t,n){return Nt([e,t,n],[])}function Nt(e,t){if(t.length>0){let n=x(i,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[0]}let n=Pt(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>Ft(e)?e:void 0),a=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))a.add(t);let o={};for(let e of a)o[e]=Nt(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return o}function Pt(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function Ft(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const It=`(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)`,Lt=RegExp(`^127\\.${It}\\.${It}\\.${It}$`);function Rt(e){let t=e.trim().toLowerCase();return t===`localhost`||t===`::1`||t===`[::1]`?!0:Lt.test(t)}function zt(e){return e.every(Rt)}function Bt(e){return!e.loopbackOnly}function Vt(e){if(e===`off`)return null;if(!g.test(e))throw Error(`invalid idleShutdown duration: ${JSON.stringify(e)}`);let t=Number(e.slice(0,-1));switch(e.at(-1)){case`s`:return t*1e3;case`m`:return t*6e4;default:return t*36e5}}function Ht(e){let t=e?.server,n=t?.bind===void 0||t.bind.length===0?y:t.bind,r=zt(n);return{port:t?.port,bind:n,externalUrl:t?.externalUrl,allowExternal:t?.allowExternal??!1,openBrowser:t?.openBrowser??r,idleShutdown:t?.idleShutdown??(r?`30m`:`off`),loopbackOnly:r}}function Ut(e,t){let n=e.length,r=t.length,i=0;for(;i<n&&i<r&&e[i]===t[i];)i++;let a=n,o=r;for(;a>i&&o>i&&e[a-1]===t[o-1];)a--,o--;return o<=i?null:{from:i,to:o}}const Wt=`__system__`,tee=1,Gt=`__config__/project`,Kt=`__user__/config.yml`,qt=`__local__/project`,Jt=`__config__/okignore`,Yt=Object.freeze([Gt,qt,Kt,Jt]),Xt=`__skill__/`,Zt=`__template__/`,Qt=[`project`,`global`];function $t(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)||e.startsWith(`__extskill__/`)}function en(e){return`__extskill__/${e}`}function tn(e){if(!e.startsWith(`__extskill__/`))return null;let t=e.slice(13),n=t.indexOf(`/`),r=n<0?t:t.slice(0,n),i=n<0?null:t.slice(n+1);return/^[a-z0-9-]+$/.test(r)?{name:r,rel:i&&i.length>0?i:null}:null}function nn(e){return e.replace(/\.mdx?$/i,``)}const rn=`.ok/skills`;function an(e){return`${rn}/${e}/SKILL`}const on=[`references`,`scripts`];function sn(e,t){let n=e.trim();if(!n.startsWith(`/`))return null;let r=n.slice(1);if(r===``||r.includes(`/`))return null;let i=/^(\.[A-Za-z0-9_-]+\/skills)\/[^/]+\/(?:SKILL|references\/.+)$/.exec(t);return i?`${i[1]}/${r}/SKILL`:/^__skill__\/(global)\/[^/]+(?:\/references\/.+)?$/.exec(t)?pn(`global`,r):null}function cn(e,t){let n=/^(\.[A-Za-z0-9_-]+\/skills\/[^/]+)\/(?:SKILL|references\/.+)$/.exec(t)??/^(__skill__\/global\/[^/]+)(?:\/references\/.+)?$/.exec(t)??/^(__extskill__\/[^/]+)(?:\/.+)?$/.exec(t);if(!n)return null;let r=n[1],i=nn(e.trim()).split(`/`).filter(e=>e!==``&&e!==`.`),[a]=i;return!a||!on.includes(a)||i.includes(`..`)||i.length<2?null:`${r}/${i.join(`/`)}`}const ln=/^\.[A-Za-z0-9_-]+\/skills\/([^/]+)\/(SKILL|references\/.+)$/;function un(e){let t=ln.exec(e);if(!t)return null;let n=t[1],r=t[2];return r===`SKILL`?{name:n,kind:`skill`,rel:null}:{name:n,kind:`reference`,rel:r.slice(11)}}const dn=/^__skill__\/global\/([^/]+)(?:\/(references\/.+))?$/;function fn(e){let t=dn.exec(e);if(!t)return null;let{name:n,host:r}=mn(t[1]),i=t[2];return i===void 0?{name:n,kind:`skill`,rel:null,host:r}:{name:n,kind:`reference`,rel:i.slice(11),host:r}}function pn(e,t,n){return e===`project`?an(t):`${Xt}${e}/${t}${n?`@${n}`:``}`}function mn(e){let t=e.indexOf(`@`);if(t<0)return{name:e,host:null};let n=e.slice(t+1);return{name:e.slice(0,t),host:n===``?null:n}}function hn(e){if(e===``)return``;try{return e.split(`/`).map(e=>decodeURIComponent(e)).join(`/`)}catch{return e}}function gn(e){if(e.startsWith(`__skill__/`)){let t=e.slice(10),n=t.indexOf(`/`);if(n<0)return null;let r=t.slice(0,n);if(r!==`global`&&r!==`project`)return null;let i=t.slice(n+1);if(!i)return null;let a=hn(i),o=a.indexOf(`/`),s=o<0?a:a.slice(0,o);if(!s)return null;let c=o<0?null:a.slice(o+1),{name:l,host:u}=mn(s);return l?{kind:`skill`,scope:r,name:l,host:u,rel:c}:null}return null}function _n(e,t){let n=e.replace(/^\/+|\/+$/g,``);return n?`${n}/.ok/templates/${t}`:`.ok/templates/${t}`}const vn=[`.mdx`,`.md`],yn=`epoch`,bn=512*1024,xn=[`claude`,`claude-desktop`,`cursor`,`codex`,`copilot`,`opencode`,`openclaw`,`pi`,`antigravity`,`lm-studio`,`hermes`],Sn={claude:`Claude`,"claude-desktop":`Claude Desktop`,cursor:`Cursor`,codex:`Codex`,copilot:`GitHub Copilot`,opencode:`OpenCode`,openclaw:`OpenClaw`,pi:`Pi`,antigravity:`Antigravity`,"lm-studio":`LM Studio`,hermes:`Hermes`},Cn={claude:`.claude/skills`,"claude-desktop":null,cursor:`.cursor/skills`,codex:`.codex/skills`,copilot:`.github/skills`,opencode:`.opencode/skills`,openclaw:null,pi:`.pi/skills`,antigravity:null,"lm-studio":null,hermes:null},wn={claude:`.claude/skills`,"claude-desktop":null,cursor:`.cursor/skills`,codex:`.codex/skills`,copilot:`.copilot/skills`,opencode:`.opencode/skills`,openclaw:null,pi:`.pi/agent/skills`,antigravity:`.gemini/skills`,"lm-studio":`.lmstudio/skills`,hermes:null},Tn=[{editorId:`lm-studio`,dotDir:`.lmstudio`,scope:`project`},{editorId:`openclaw`,dotDir:`.openclaw`,scope:`global`}],En=new Set([`.github`]);function Dn(e){let t=e.split(`/`)[0]??e;return En.has(t)?e:t}const On=xn.filter(e=>Cn[e]!==null),kn=xn.filter(e=>wn[e]!==null),An=`open-knowledge`,jn=xn.flatMap(e=>{let t=Cn[e];return t===null?[]:[`${t}/${An}/`]}),Mn=On.filter(e=>e!==`pi`&&e!==`copilot`).map(e=>({hostDir:(Cn[e]??``).split(`/`)[0],editorId:e})),Nn=xn.flatMap(e=>{let t=wn[e];if(t===null)return[];let n=t.split(`/`)[0];return n===void 0?[]:[{hostDir:n,skillsRoot:t,editorId:e}]}),Pn={claude:`.mcp.json`,"claude-desktop":null,cursor:`.cursor/mcp.json`,codex:`.codex/config.toml`,copilot:null,opencode:`opencode.json`,openclaw:null,pi:`.pi/extensions/open-knowledge.ts`,antigravity:null,"lm-studio":null,hermes:null},Fn=[`copilot`],In={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/},Ln=`Ov23liqlSd0V1MwR6rhI`,Rn=new Set([`gitlab.com`,`bitbucket.org`,`codeberg.org`,`gitea.com`,`sr.ht`,`sourcehut.org`]);function zn(e){let t=e.toLowerCase(),n=t===`www.github.com`?`github.com`:t;return Rn.has(n)?null:n}const Bn=[`incoming`,`outgoing`,`both`];function Vn(e){return Bn.includes(e)}const Hn=`open-knowledge`,Un=`OK_HOSTED_AGENT`;function Wn(e){return e.OK_DESKTOP_TERMINAL===`1`||e.OK_HOSTED_AGENT===`1`}const Gn={"unix-chain":{1:[`macos-bundle`,`npx-fallback`],2:[`macos-bundle`,`linux-deb-bundle`,`npx-fallback`]},"windows-chain":{1:[`windows-global-cli`,`npx-fallback`]}};function Kn(e){return{kind:`declined`,reason:e}}function qn(e){if(e.command===`node`)return Kn(`dev-mode`);if(typeof e.command==`string`)return Array.isArray(e.args)?e.command===`/bin/sh`?e.args.length!==3||e.args[0]!==`-l`||e.args[1]!==`-c`||typeof e.args[2]!=`string`?Kn(`malformed-argv`):{envelope:`split-command-args`,family:`unix-chain`,body:e.args[2]}:e.command===`powershell`?e.args.length!==4||e.args[0]!==`-NoProfile`||e.args[1]!==`-NonInteractive`||e.args[2]!==`-Command`||typeof e.args[3]!=`string`?Kn(`malformed-argv`):{envelope:`split-command-args`,family:`windows-chain`,body:e.args[3]}:Kn(`foreign-command`):Kn(`malformed-argv`);if(e.type!==`local`||!Array.isArray(e.command))return Kn(`unknown-envelope`);let[t,...n]=e.command;return t===`node`?Kn(`dev-mode`):t===`/bin/sh`?n.length!==3||n[0]!==`-l`||n[1]!==`-c`||typeof n[2]!=`string`?Kn(`malformed-argv`):{envelope:`opencode-argv`,family:`unix-chain`,body:n[2]}:t===`powershell`?n.length!==4||n[0]!==`-NoProfile`||n[1]!==`-NonInteractive`||n[2]!==`-Command`||typeof n[3]!=`string`?Kn(`malformed-argv`):{envelope:`opencode-argv`,family:`windows-chain`,body:n[3]}:Kn(`foreign-command`)}function Jn(e,t){let n=e.split(/\r?\n/,1)[0],r=t===`unix-chain`?/^# ok-mcp-v([1-9]\d*)$/:/^# ok-mcp-win-v([1-9]\d*)$/,i=n?.match(r);if(i==null)return null;let a=Number(i[1]);return Number.isSafeInteger(a)?a:null}function Yn(e,t=Gn){if(typeof e!=`object`||!e)return Kn(`not-an-object`);let n=qn(e);if(`kind`in n)return n;let r=Jn(n.body,n.family);if(r===null)return Kn(`malformed-marker`);let i=t[n.family],a=Math.max(...Object.keys(i).map(Number));if(r>a)return{kind:`recognized`,disposition:`keep`,descriptor:{envelope:n.envelope,family:n.family,revision:r,knowledge:`future`,capabilities:`opaque`}};let o=i[r];return o===void 0?Kn(`unknown-revision`):{kind:`recognized`,disposition:r===a?`keep`:`upgrade`,descriptor:{envelope:n.envelope,family:n.family,revision:r,knowledge:`known`,capabilities:o}}}const Xn=[{id:`chart`,title:`Chart`,description:`A bar chart whose series colors track the OK chart palette.`,html:`<div style="font-family:system-ui,sans-serif;padding:20px;color:var(--foreground)">
6
+ `)return!0;if(t!==` `&&t!==` `)return!1}return!0}function st(e,t){let n=e[t];if(n===void 0)return 0;if(ot(e,t)){let n=nt(e,t);if(n>0)return n}if(n===`|`)return 1;if(n===`<`){let n=Ke.exec(e.slice(t,t+512))?.[0].length;return n===void 0?+!!We(e,t):n}if(n===`>`&&Ge(e,t))return 1;if(n===`=`){let n=He.exec(e.slice(t,t+3))?.[0].length;if(n!==void 0)return n}if(n===`!`)return+!!qe.test(e.slice(t,t+2));if(Ve.has(n))return 1;if(n===`[`){let n=e.slice(t,t+512),r=Xe.exec(n)?.[0].length;return r===void 0?Je.test(n)?2:1:r}if(n===`#`){let n=Ze.exec(e.slice(t,t+512))?.[0].length;if(n!==void 0)return n}if(n===`]`){if(e[t+1]===`]`)return 2;let n=e.slice(t,t+512),r=Qe.exec(n)?.[0].length;if(r!==void 0)return r;let i=Ye.exec(n)?.[0].length;return i===void 0?1:i}return ot(e,t)?$e.exec(e.slice(t,t+32))?.[0].length??0:0}function ct(e,t,{syntaxIn:n}){let r=[];if(t.length===0)return r;let i=n===`haystack`;for(let n=0;n<e.length;n+=1){let a=e[n];if(a===void 0||at(a)||i&&a!==t[0]&&(st(e,n)>0||it(e,n)!==null))continue;let o=n,s=0;for(;o<e.length&&s<t.length;){let n=e[o],r=t[s];if(n===r){o+=1,s+=1;continue}if(at(r)){s+=1;continue}if(at(n)){o+=1;continue}let a=i?st(e,o):st(t,s);if(a>0){i?o+=a:s+=a;continue}let c=i?it(e,o):it(t,s);if(c!==null){let n=i?t:e,r=i?s:o,a=!0;for(let e of c.rendered)if(!at(e)){for(;r<n.length&&at(n[r]);)r+=1;if(n[r]!==e){a=!1;break}r+=1}if(!a)break;i?(o+=c.length,s=r):(s+=c.length,o=r);continue}break}for(;s<t.length&&at(t[s]);)s+=1;s===t.length&&r.push({start:n,end:o})}return r}function lt(e,t,n,r){let i=``,a=Math.max(0,t),o=Math.min(e.length,n);for(;a<o;){let t=e[a];if(at(t)){a+=1;continue}if(r){let t=st(e,a);if(t>0){a+=t;continue}let n=it(e,a);if(n!==null){for(let e of n.rendered)at(e)||(i+=e);a+=n.length;continue}}i+=t,a+=1}return i}function ut(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[e.length-1-r]===t[t.length-1-r];)r+=1;return r}function dt(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function eee(e,t,n,{syntaxIn:r,syntaxInContext:i=!1}){let a=n.prefix??``,o=n.suffix??``,s=r===`haystack`,c=0;if(a.length>0){let n=a.length*8+64;c+=ut(lt(a,0,a.length,i),lt(e,t.start-n,t.start,s))}if(o.length>0){let n=o.length*8+64;c+=dt(lt(o,0,o.length,i),lt(e,t.end,t.end+n,s))}return c}function ft(e,{syntaxInContext:t=!1}={}){let n=lt(e.prefix??``,0,1/0,t).length+lt(e.suffix??``,0,1/0,t).length;return Math.min(8,n)}function pt(e){return Math.max(e*4,e+64)}var mt=ue(),ht=class extends Error{envVar;constructor(e,t){super(`${e}: ${t}`),this.name=`EnvVarError`,this.envVar=e}};const gt=new Map([[`PORT`,[`server`,`port`]],[`OK_BIND`,[`server`,`bind`]],[`OK_EXTERNAL_URL`,[`server`,`externalUrl`]],[`OK_ALLOW_EXTERNAL`,[`server`,`allowExternal`]],[`OK_OPEN_BROWSER`,[`server`,`openBrowser`]],[`OK_IDLE_SHUTDOWN`,[`server`,`idleShutdown`]]]);function _t(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toUpperCase()}function vt(e){return`OK_${(e[0]===`server`?e.slice(1):e).map(_t).join(`_`)}`}function yt(e){let t=e;for(let e=0;e<16;e++){let e=t?._zod?.def;if(e===void 0||e.type!==`default`&&e.type!==`optional`&&e.type!==`nullable`)return t;t=e.innerType}return t}function bt(e){return yt(e)?._zod?.def?.type}function xt(e=i){let t=[],n=(e,r)=>{let i=yt(e)?._zod?.def?.shape;if(i===void 0){r.length>0&&t.push(r);return}for(let[e,t]of Object.entries(i))n(t,[...r,e])};return n(e,[]),t}function St(){let e=new Map;for(let t of xt())e.set(vt(t),t);return e}function Ct(e,t,n){switch(bt(n)){case`boolean`:if(t===`1`||t===`true`)return!0;if(t===`0`||t===`false`)return!1;throw new ht(e,`expected a boolean (1/0/true/false), got ${JSON.stringify(t)}`);case`number`:{let n=Number(t);if(!Number.isFinite(n))throw new ht(e,`expected a number, got ${JSON.stringify(t)}`);return n}case`array`:return t.split(/\s+/).filter(e=>e!==``);default:return t}}function wt(e,t){let n=Array(t.length+1);for(let e=0;e<=t.length;e++)n[e]=e;for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1));i=n[a],n[a]=o}}return n[t.length]}function Tt(e,t){if(e===`OK_PORT`)return{envVar:e,message:`OK_PORT is not read — the port variable is unprefixed PORT.`};let n=t.get(e);if(n!==void 0)return{envVar:e,message:`${e} maps to config key ${n.join(`.`)}, which is not env-configurable — set it in the config file instead.`};for(let t of gt.keys())if(t!==`PORT`&&wt(e,t)<=2)return{envVar:e,message:`Unknown variable ${e} — did you mean ${t}?`};return null}function Et(e,t){let n={...e};for(let[e,r]of Object.entries(t)){if(r===void 0)continue;let t=n[e];n[e]=Dt(r)&&Dt(t)?Et(t,r):r}return n}function Dt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ot(e){let t=[],n=[],r=St();for(let[n,r]of gt){let a=e[n];if(a===void 0||a.trim()===``)continue;let o=s(i,r);if(o===void 0)throw new ht(n,`internal: config path ${r.join(`.`)} does not resolve`);let c=Ct(n,a.trim(),o),l=o.safeParse(c);if(!l.success)throw new ht(n,`${l.error.issues.map(e=>e.message).join(`; `)||`invalid value`} (got ${JSON.stringify(a)})`);t.push({path:r,envVar:n,value:l.data})}for(let t of Object.keys(e)){if(!t.startsWith(`OK_`)||gt.has(t)||e[t]===void 0)continue;let i=Tt(t,r);i!==null&&n.push(i)}let a={};for(let{path:e,value:n}of t){let t=a;for(let n of e.slice(0,-1))t[n]??={},t=t[n];t[e[e.length-1]]=n}return{overrides:t,layer:a,diagnostics:n}}function kt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function At(e){let{value:t,file:n,source:r,doc:a}=e,o=[],s=(e,t)=>{if(t.length>0){let e=x(i,t);if(e!==void 0){if(e.scope===`project-local`){let e=vt(t),i;a!=null&&r!=null&&n!=null&&(i=M({file:n,source:r,doc:a,path:t})),o.push({path:[...t],...gt.has(e)?{envVar:e}:{},...i===void 0?{}:{source:i}})}return}}if(kt(e))for(let[n,r]of Object.entries(e))s(r,[...t,n])};return s(t,[]),o}function jt(e){let t=e.path.join(`.`);return`${e.source===void 0?``:`${e.source.file}:${e.source.line}:${e.source.column}: `}${t} is a per-machine (project-local) setting; the value committed in .ok/config.yml is ignored. Set it in .ok/local/config.yml (this machine only)${e.envVar===void 0?``:`, or set ${e.envVar} on this host`}.`}function Mt(e,t,n){return Nt([e,t,n],[])}function Nt(e,t){if(t.length>0){let n=x(i,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[0]}let n=Pt(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>Ft(e)?e:void 0),a=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))a.add(t);let o={};for(let e of a)o[e]=Nt(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return o}function Pt(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function Ft(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const It=`(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)`,Lt=RegExp(`^127\\.${It}\\.${It}\\.${It}$`);function Rt(e){let t=e.trim().toLowerCase();return t===`localhost`||t===`::1`||t===`[::1]`?!0:Lt.test(t)}function zt(e){return e.every(Rt)}function Bt(e){return!e.loopbackOnly}function Vt(e){if(e===`off`)return null;if(!g.test(e))throw Error(`invalid idleShutdown duration: ${JSON.stringify(e)}`);let t=Number(e.slice(0,-1));switch(e.at(-1)){case`s`:return t*1e3;case`m`:return t*6e4;default:return t*36e5}}function Ht(e){let t=e?.server,n=t?.bind===void 0||t.bind.length===0?y:t.bind,r=zt(n),i=t?.port,a=t?.externalUrl,o=(t?.allowExternal??!1)&&a!==void 0;return{port:i,bind:n,externalUrl:a,allowExternal:t?.allowExternal??!1,openBrowser:t?.openBrowser??r,idleShutdown:t?.idleShutdown??(r&&!o?`30m`:`off`),loopbackOnly:r}}function Ut(e,t){let n=e.length,r=t.length,i=0;for(;i<n&&i<r&&e[i]===t[i];)i++;let a=n,o=r;for(;a>i&&o>i&&e[a-1]===t[o-1];)a--,o--;return o<=i?null:{from:i,to:o}}const Wt=`__system__`,tee=1,Gt=`__config__/project`,Kt=`__user__/config.yml`,qt=`__local__/project`,Jt=`__config__/okignore`,Yt=Object.freeze([Gt,qt,Kt,Jt]),Xt=`__skill__/`,Zt=`__template__/`,Qt=[`project`,`global`];function $t(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)||e.startsWith(`__extskill__/`)}function en(e){return`__extskill__/${e}`}function tn(e){if(!e.startsWith(`__extskill__/`))return null;let t=e.slice(13),n=t.indexOf(`/`),r=n<0?t:t.slice(0,n),i=n<0?null:t.slice(n+1);return/^[a-z0-9-]+$/.test(r)?{name:r,rel:i&&i.length>0?i:null}:null}function nn(e){return e.replace(/\.mdx?$/i,``)}const rn=`.ok/skills`;function an(e){return`${rn}/${e}/SKILL`}const on=[`references`,`scripts`];function sn(e,t){let n=e.trim();if(!n.startsWith(`/`))return null;let r=n.slice(1);if(r===``||r.includes(`/`))return null;let i=/^(\.[A-Za-z0-9_-]+\/skills)\/[^/]+\/(?:SKILL|references\/.+)$/.exec(t);return i?`${i[1]}/${r}/SKILL`:/^__skill__\/(global)\/[^/]+(?:\/references\/.+)?$/.exec(t)?pn(`global`,r):null}function cn(e,t){let n=/^(\.[A-Za-z0-9_-]+\/skills\/[^/]+)\/(?:SKILL|references\/.+)$/.exec(t)??/^(__skill__\/global\/[^/]+)(?:\/references\/.+)?$/.exec(t)??/^(__extskill__\/[^/]+)(?:\/.+)?$/.exec(t);if(!n)return null;let r=n[1],i=nn(e.trim()).split(`/`).filter(e=>e!==``&&e!==`.`),[a]=i;return!a||!on.includes(a)||i.includes(`..`)||i.length<2?null:`${r}/${i.join(`/`)}`}const ln=/^\.[A-Za-z0-9_-]+\/skills\/([^/]+)\/(SKILL|references\/.+)$/;function un(e){let t=ln.exec(e);if(!t)return null;let n=t[1],r=t[2];return r===`SKILL`?{name:n,kind:`skill`,rel:null}:{name:n,kind:`reference`,rel:r.slice(11)}}const dn=/^__skill__\/global\/([^/]+)(?:\/(references\/.+))?$/;function fn(e){let t=dn.exec(e);if(!t)return null;let{name:n,host:r}=mn(t[1]),i=t[2];return i===void 0?{name:n,kind:`skill`,rel:null,host:r}:{name:n,kind:`reference`,rel:i.slice(11),host:r}}function pn(e,t,n){return e===`project`?an(t):`${Xt}${e}/${t}${n?`@${n}`:``}`}function mn(e){let t=e.indexOf(`@`);if(t<0)return{name:e,host:null};let n=e.slice(t+1);return{name:e.slice(0,t),host:n===``?null:n}}function hn(e){if(e===``)return``;try{return e.split(`/`).map(e=>decodeURIComponent(e)).join(`/`)}catch{return e}}function gn(e){if(e.startsWith(`__skill__/`)){let t=e.slice(10),n=t.indexOf(`/`);if(n<0)return null;let r=t.slice(0,n);if(r!==`global`&&r!==`project`)return null;let i=t.slice(n+1);if(!i)return null;let a=hn(i),o=a.indexOf(`/`),s=o<0?a:a.slice(0,o);if(!s)return null;let c=o<0?null:a.slice(o+1),{name:l,host:u}=mn(s);return l?{kind:`skill`,scope:r,name:l,host:u,rel:c}:null}return null}function _n(e,t){let n=e.replace(/^\/+|\/+$/g,``);return n?`${n}/.ok/templates/${t}`:`.ok/templates/${t}`}const vn=[`.mdx`,`.md`],yn=`epoch`,bn=512*1024,xn=[`claude`,`claude-desktop`,`cursor`,`codex`,`copilot`,`opencode`,`openclaw`,`pi`,`antigravity`,`lm-studio`,`hermes`],Sn={claude:`Claude`,"claude-desktop":`Claude Desktop`,cursor:`Cursor`,codex:`Codex`,copilot:`GitHub Copilot`,opencode:`OpenCode`,openclaw:`OpenClaw`,pi:`Pi`,antigravity:`Antigravity`,"lm-studio":`LM Studio`,hermes:`Hermes`},Cn={claude:`.claude/skills`,"claude-desktop":null,cursor:`.cursor/skills`,codex:`.codex/skills`,copilot:`.github/skills`,opencode:`.opencode/skills`,openclaw:null,pi:`.pi/skills`,antigravity:null,"lm-studio":null,hermes:null},wn={claude:`.claude/skills`,"claude-desktop":null,cursor:`.cursor/skills`,codex:`.codex/skills`,copilot:`.copilot/skills`,opencode:`.opencode/skills`,openclaw:null,pi:`.pi/agent/skills`,antigravity:`.gemini/skills`,"lm-studio":`.lmstudio/skills`,hermes:null},Tn=[{editorId:`lm-studio`,dotDir:`.lmstudio`,scope:`project`},{editorId:`openclaw`,dotDir:`.openclaw`,scope:`global`}],En=new Set([`.github`]);function Dn(e){let t=e.split(`/`)[0]??e;return En.has(t)?e:t}const On=xn.filter(e=>Cn[e]!==null),kn=xn.filter(e=>wn[e]!==null),An=`open-knowledge`,jn=xn.flatMap(e=>{let t=Cn[e];return t===null?[]:[`${t}/${An}/`]}),Mn=On.filter(e=>e!==`pi`&&e!==`copilot`).map(e=>({hostDir:(Cn[e]??``).split(`/`)[0],editorId:e})),Nn=xn.flatMap(e=>{let t=wn[e];if(t===null)return[];let n=t.split(`/`)[0];return n===void 0?[]:[{hostDir:n,skillsRoot:t,editorId:e}]}),Pn={claude:`.mcp.json`,"claude-desktop":null,cursor:`.cursor/mcp.json`,codex:`.codex/config.toml`,copilot:null,opencode:`opencode.json`,openclaw:null,pi:`.pi/extensions/open-knowledge.ts`,antigravity:null,"lm-studio":null,hermes:null},Fn=[`copilot`],In={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/},Ln=`Ov23liqlSd0V1MwR6rhI`,Rn=new Set([`gitlab.com`,`bitbucket.org`,`codeberg.org`,`gitea.com`,`sr.ht`,`sourcehut.org`]);function zn(e){let t=e.toLowerCase(),n=t===`www.github.com`?`github.com`:t;return Rn.has(n)?null:n}const Bn=[`incoming`,`outgoing`,`both`];function Vn(e){return Bn.includes(e)}const Hn=`open-knowledge`,Un=`OK_HOSTED_AGENT`;function Wn(e){return e.OK_DESKTOP_TERMINAL===`1`||e.OK_HOSTED_AGENT===`1`}const Gn={"unix-chain":{1:[`macos-bundle`,`npx-fallback`],2:[`macos-bundle`,`linux-deb-bundle`,`npx-fallback`]},"windows-chain":{1:[`windows-global-cli`,`npx-fallback`]}};function Kn(e){return{kind:`declined`,reason:e}}function qn(e){if(e.command===`node`)return Kn(`dev-mode`);if(typeof e.command==`string`)return Array.isArray(e.args)?e.command===`/bin/sh`?e.args.length!==3||e.args[0]!==`-l`||e.args[1]!==`-c`||typeof e.args[2]!=`string`?Kn(`malformed-argv`):{envelope:`split-command-args`,family:`unix-chain`,body:e.args[2]}:e.command===`powershell`?e.args.length!==4||e.args[0]!==`-NoProfile`||e.args[1]!==`-NonInteractive`||e.args[2]!==`-Command`||typeof e.args[3]!=`string`?Kn(`malformed-argv`):{envelope:`split-command-args`,family:`windows-chain`,body:e.args[3]}:Kn(`foreign-command`):Kn(`malformed-argv`);if(e.type!==`local`||!Array.isArray(e.command))return Kn(`unknown-envelope`);let[t,...n]=e.command;return t===`node`?Kn(`dev-mode`):t===`/bin/sh`?n.length!==3||n[0]!==`-l`||n[1]!==`-c`||typeof n[2]!=`string`?Kn(`malformed-argv`):{envelope:`opencode-argv`,family:`unix-chain`,body:n[2]}:t===`powershell`?n.length!==4||n[0]!==`-NoProfile`||n[1]!==`-NonInteractive`||n[2]!==`-Command`||typeof n[3]!=`string`?Kn(`malformed-argv`):{envelope:`opencode-argv`,family:`windows-chain`,body:n[3]}:Kn(`foreign-command`)}function Jn(e,t){let n=e.split(/\r?\n/,1)[0],r=t===`unix-chain`?/^# ok-mcp-v([1-9]\d*)$/:/^# ok-mcp-win-v([1-9]\d*)$/,i=n?.match(r);if(i==null)return null;let a=Number(i[1]);return Number.isSafeInteger(a)?a:null}function Yn(e,t=Gn){if(typeof e!=`object`||!e)return Kn(`not-an-object`);let n=qn(e);if(`kind`in n)return n;let r=Jn(n.body,n.family);if(r===null)return Kn(`malformed-marker`);let i=t[n.family],a=Math.max(...Object.keys(i).map(Number));if(r>a)return{kind:`recognized`,disposition:`keep`,descriptor:{envelope:n.envelope,family:n.family,revision:r,knowledge:`future`,capabilities:`opaque`}};let o=i[r];return o===void 0?Kn(`unknown-revision`):{kind:`recognized`,disposition:r===a?`keep`:`upgrade`,descriptor:{envelope:n.envelope,family:n.family,revision:r,knowledge:`known`,capabilities:o}}}const Xn=[{id:`chart`,title:`Chart`,description:`A bar chart whose series colors track the OK chart palette.`,html:`<div style="font-family:system-ui,sans-serif;padding:20px;color:var(--foreground)">
7
7
  <h3 style="margin:0 0 14px;font-size:15px;font-weight:600">Revenue by region</h3>
8
8
  <div id="bars" style="display:flex;align-items:flex-end;gap:14px;height:170px"></div>
9
9
  <script>
@@ -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=j9(n.join(`
355
355
  `))[A9];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
356
356
  `).replace(/\n+$/,``)}}function N9(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=$m(t);if(n===``)return{identity:{},starterContent:t};let i=th(n),a=gne(i);if(a)return{identity:a.identity,starterContent:M9(a.docFrontmatterText,r)};let{frontmatter:o}=$m(r);if(o!==``)return{identity:j9(i),starterContent:r};let s=j9(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:M9(i,r)}}function _ne(e,t){let{docFrontmatterText:n,markdown:r}=hne(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,mt.stringify)({[A9]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function vne(e){return N9(e).starterContent}const P9=e=>e*8+4;P9(92),P9(40);const yne=/^(#{1,6})\s+(.+)$/;function bne(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(yne);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 xne={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},Sne=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],Cne={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function wne(e,t=Sne){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const Tne={"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 F9(e){return e?Tne[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const Ene={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function Dne(e){let t=e?.trim();return t?Ene[F9(t)]??t:`Agent`}function I9(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 L9(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function R9(e){return e.split(`/`).map(L9).join(`/`)}function z9(e){return e.split(`/`).map(I9).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=I9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!vn.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=I9(d[e]??``);if(e===f&&(t=nn(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 One(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 kne(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=cn(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=sn(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 Ane(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:I9(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 jne(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 Mne(){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)jne(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 Nne(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 Pne(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 Fne(e){return Z9(e)?e.pages:e}function Ine(e,t){return Z9(e)?e.assetPaths??new Set:t??new Set}function Lne(e,t){return Z9(e)?e.filePaths??new Set:t??new Set}function Q9(e,t){return e<t?-1:+(e>t)}function Rne(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 zne(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 Bne(e,t){let n=XZ(e);if(n){if(Z9(t))return t.pagesBySlug.get(n);for(let e of t)if(XZ(e)===n)return e}}function Vne(e,t){if(e.includes(`/`))return;let n=XZ(e);if(!n)return;if(Z9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);XZ(t===-1?e:e.slice(t+1))===n&&(r===void 0||Q9(e,r)<0)&&(r=e)}return r}function Hne(e){let t=e.trim();if(!t)return[];let n=XZ(t);return n.length>0&&n!==t?[n]:[]}function $9(e,t){let n=e.trim();if(!n)return;let r=Fne(t);if(r.has(n))return n;let i=Bne(n,t);if(i)return i;for(let e of Hne(n))if(r.has(e))return e;return Une(n,r)||Vne(n,t)}function Une(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 Wne(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function Gne(e,t,n){let r=Wne(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 Kne(e,t,n){let r=W9(e,t);return r===null||r.kind!==`asset`||Gne(r.url,Ine(n),Lne(n))!==null||$9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}export{a9 as $,JX as $a,WQ as $i,S0 as $n,tx as $o,J$ as $r,vn as $s,Y2 as $t,mne as A,tZ as Aa,Et as Ac,m$ as Ai,n2 as An,vx as Ao,R1 as Ar,Un as As,e3 as At,Gte as B,XX as Ba,we as Bc,r$ as Bi,w2 as Bn,ox as Bo,w1 as Br,Cn as Bs,v4 as Bt,A9 as C,OZ as Ca,zt as Cc,_$ as Ci,y2 as Cn,nz as Co,J1 as Cr,fr as Cs,m3 as Ct,pne as D,_Z as Da,At as Dc,v$ as Di,t2 as Dn,Ow as Do,K1 as Dr,Zn as Ds,a3 as Dt,N9 as E,hZ as Ea,Mt as Ec,y$ as Ei,v2 as En,gP as Eo,$1 as Er,Xn as Es,c3 as Et,ene as F,pZ as Fa,pt as Fc,i$ as Fi,N2 as Fn,_x as Fo,z1 as Fr,Rn as Fs,N4 as Ft,E9 as G,UX as Ga,XQ as Gi,S2 as Gn,Bb as Go,b1 as Gr,jn as Gs,a4 as Gt,Wte as H,EX as Ha,be as Hc,QQ as Hi,M2 as Hn,Mb as Ho,g1 as Hr,Mn as Hs,p4 as Ht,ane as I,mZ as Ia,Oe as Ic,a$ as Ii,P2 as In,gx as Io,m1 as Ir,In as Is,M4 as It,Vte as J,TX as Ja,IQ as Ji,W2 as Jn,Wb as Jo,C1 as Jr,kn as Js,t4 as Jt,Bte as K,WX as Ka,qQ as Ki,C2 as Kn,zb as Ko,v1 as Kr,An as Ks,r4 as Kt,tne as L,eZ as La,ke as Lc,o$ as Li,Q0 as Ln,mx as Lo,h1 as Lr,xn as Ls,A4 as Lt,cne as M,cZ as Ma,ft as Mc,c$ as Mi,Y0 as Mn,hx as Mo,F1 as Mr,Bn as Ms,B4 as Mt,lne as N,QX as Na,eee as Nc,s$ as Ni,X0 as Nn,ux as No,I1 as Nr,Vn as Ns,z4 as Nt,k9 as O,EZ as Oa,jt as Oc,x$ as Oi,r2 as On,xx as Oo,Y1 as Or,Yn as Os,Y4 as Ot,$te as P,sZ as Pa,ct as Pc,d$ as Pi,Z0 as Pn,yx as Po,L1 as Pr,Ln as Ps,P4 as Pt,Ete as Q,RX as Qa,VQ as Qi,B0 as Qn,qb as Qo,D1 as Qr,yn as Qs,Z2 as Qt,Zte as R,fZ as Ra,Te as Rc,e$ as Ri,$0 as Rn,rx as Ro,f1 as Rr,Sn as Rs,j4 as Rt,bne as S,MZ as Sa,Vt as Sc,g$ as Si,J2 as Sn,pz as So,Z1 as Sr,sr as Ss,S3 as St,vne as T,xZ as Ta,Ht as Tc,C$ as Ti,x2 as Tn,TF as To,Q1 as Tr,Qn as Ts,s3 as Tt,Ite as U,HX as Ua,n$ as Ui,G0 as Un,Fb as Uo,_1 as Ur,Tn as Us,n4 as Ut,Ute as V,IX as Va,Ce as Vc,ZQ as Vi,A2 as Vn,Nb as Vo,T1 as Vr,wn as Vs,c4 as Vt,Lte as W,DX as Wa,JQ as Wi,K0 as Wn,Pb as Wo,d1 as Wr,On as Ws,o4 as Wt,kte as X,wX as Xa,PQ as Xi,G2 as Xn,cx as Xo,k1 as Xr,Dn as Xs,$2 as Xt,m9 as Y,VX as Ya,RQ as Yi,q0 as Yn,sx as Yo,O1 as Yr,Nn as Ys,X2 as Yt,h9 as Z,BX as Za,NQ as Zi,K2 as Zn,ex as Zo,E1 as Zr,bn as Zs,Q2 as Zt,Cne as _,HZ as _a,an as _c,O$ as _i,f2 as _n,JH as _o,i0 as _r,or as _s,Y3 as _t,Nne as a,DQ as aa,Kt as ac,e1 as ai,F2 as an,PY as ao,P0 as ar,vb as as,p6 as at,Dne as b,zZ as ba,_n as bc,T$ as bi,H0 as bn,bz as bo,t0 as br,dr as bs,z3 as bt,One as c,_Q as ca,Zt as cc,$$ as ci,e2 as cn,oG as co,A0 as cr,lb as cs,i6 as ct,U9 as d,hQ as da,en as dc,X$ as di,s2 as dn,bG as do,y0 as dr,th as ds,$3 as dt,SQ as ea,tee as ec,Y$ as ei,C0 as en,YX as eo,b0 as er,Gb as es,ste as et,Ane as f,mQ as fa,$t as fc,W$ as fi,c2 as fn,fG as fo,m0 as fr,ap as fs,r6 as ft,B9 as g,VZ as ga,un as gc,D$ as gi,d2 as gn,lW as go,r0 as gr,er as gs,U3 as gt,L9 as h,UZ as ha,gn as hc,I$ as hi,u2 as hn,WW as ho,n0 as hr,pr as hs,X3 as ht,$9 as i,kQ as ia,qt as ic,t1 as ii,L0 as in,hX as io,M0 as ir,yb as is,f6 as it,O9 as j,nZ as ja,Ot as jc,u$ as ji,J0 as jn,dx as jo,P1 as jr,Wn as js,U4 as jt,fne as k,DZ as ka,ht as kc,f$ as ki,i2 as kn,fx as ko,X1 as kr,Hn as ks,n3 as kt,kne as l,iQ as la,Qt as lc,Z$ as li,a2 as ln,cG as lo,O0 as lr,eh as ls,t6 as lt,R9 as m,WZ as ma,fn as mc,N$ as mi,m2 as mn,iG as mo,d0 as mr,I as ms,Q3 as mt,Rne as n,OQ as na,Jt as nc,a1 as ni,T0 as nn,SX as no,D0 as nr,wb as ns,dte as nt,Pne as o,EQ as oa,rn as oc,o1 as oi,z2 as on,wY as oo,F0 as or,gb as os,m6 as ot,z9 as p,XZ as pa,tn as pc,V$ as pi,h2 as pn,rG as po,l0 as pr,eo as ps,n6 as pt,Hte as q,qX as qa,LQ as qi,U2 as qn,Hb as qo,S1 as qr,Fn as qs,i4 as qt,Kne as r,AQ as ra,Gt as rc,r1 as ri,b2 as rn,pX as ro,j0 as rr,xb as rs,l6 as rt,Mne as s,gQ as sa,Xt as sc,c1 as si,R2 as sn,CY as so,k0 as sr,pb as ss,c6 as st,zne as t,jQ as ta,Yt as tc,s1 as ti,w0 as tn,yX as to,N0 as tr,Tb as ts,wte as tt,W9 as u,pQ as ua,Wt as uc,Q$ as ui,o2 as un,sG as uo,z0 as ur,$m as us,e6 as ut,xne as v,BZ as va,cn as vc,j$ as vi,p2 as vn,IH as vo,a0 as vr,tr as vs,V3 as vt,_ne as w,vZ as wa,Bt as wc,S$ as wi,V2 as wn,GR as wo,q1 as wr,$n as ws,g3 as wt,F9 as x,FZ as xa,Ut as xc,h$ as xi,H2 as xn,yz as xo,e0 as xr,nr as xs,v3 as xt,wne as y,RZ as ya,pn as yc,w$ as yi,k2 as yn,FH as yo,c0 as yr,ar as ys,H3 as yt,Qte as z,uZ as za,Ee as zc,t$ as zi,I0 as zn,ix as zo,p1 as zr,Pn as zs,y4 as zt};
357
- //# sourceMappingURL=src-Ct2lVbOu.mjs.map
357
+ //# sourceMappingURL=src-BjPS9IEY.mjs.map
@@ -0,0 +1 @@
1
+ import"./src-BjPS9IEY.mjs";import"./resolve-project-root-DVS2LVVT.mjs";import"./src-BF2VciaA.mjs";import"./acp-harness-probe-0TsDLkSm.mjs";import"./init-4m61hX8N.mjs";import{n as e}from"./loader-CqMn0oDw.mjs";import"./skill-teardown-DwNb2TRE.mjs";import"./preview-DAr0H_Nz.mjs";import"./mcp-migrate-event-9DFnNzHa.mjs";export{e as loadConfig};