@inkeep/open-knowledge 0.59.0-beta.12 → 0.59.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-1nwnlbS0.mjs → acp-harness-probe-CNFNCUGz.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-DN-9zlW1.mjs +2 -0
- package/dist/fs-traced-C1nHpvFb.mjs +1 -0
- package/dist/{fs-traced-CJ0NSnI0.mjs → fs-traced-Dy67FR5_.mjs} +2 -2
- package/dist/git-handle-BPPRdjZZ.mjs +1 -0
- package/dist/{git-handle-DGgEJR3Q.mjs → git-handle-KDk0khh5.mjs} +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{init-C3tiLV4q.mjs → init-CfD5NARM.mjs} +3 -3
- package/dist/init-DWv8tT4O.mjs +1 -0
- package/dist/{launch-json-removal-DskngHoZ.mjs → launch-json-removal-D2sBQ6Ur.mjs} +2 -2
- package/dist/loader-BGkwEr7t.mjs +1 -0
- package/dist/{loader-wkIqjWKU.mjs → loader-BofTct4Y.mjs} +2 -2
- package/dist/md-manager-CdRw_aqi.mjs +2 -0
- package/dist/{open-browser-B-Kf-THH.mjs → open-browser-BklPlV75.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-DNmmZiVV.mjs → preview-B2a1S7UT.mjs} +2 -2
- package/dist/preview-D13Am20B.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-Dm80EO6I.js → ActivityModeContent-BIn008__.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CiDRNNtB.js → AgentDiffPane-3GMOCb2c.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-q7HjbS_V.js → AgentThreadClientBinder-Di2dPu4h.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CAuN39X3.js → CodeMirrorPropInput-BKSuOOVi.js} +1 -1
- package/dist/public/assets/{DocumentContext-BQwDWNIp.js → DocumentContext-C-X4T4d9.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-BPsUpNqB.js → EditorModeToggle-CPKSIpqP.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-SztigQDp.js → EnableSyncConfirmDialog-B9GQfDxa.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-DUpN3hmr.js → ExcalidrawDocEditor-CiuG3mW7.js} +1 -1
- package/dist/public/assets/FeedbackForm-DYjADexF.js +1 -0
- package/dist/public/assets/{GraphPanel-B_Mg9p1O.js → GraphPanel-DT-1F3b4.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-Dlx0DBn5.js → ImportSkillDialog-d6lkfU9h.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-DZNYgrQG.js → LintConfigEditor-BEaCP-Xa.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-B-0nFc46.js → ManagedArtifactProperties-CI77JvTy.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-RawOG82I.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-Bu0vzdBQ.js → MermaidDocEditor-3Qy_xxrY.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DFpnExTR.js → PropertyDisplayRow-jv0QSvvc.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CVQgnZSP.js → ReportBugDialogBody-CD42zSIE.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-BQ_qrwXQ.js → SchemaConfigEditor-DRPb60r3.js} +1 -1
- package/dist/public/assets/{SessionsHost-CednqHmx.js → SessionsHost-0wztntvc.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CDLuNlbr.js → SettingsDialogBody-CguEJilL.js} +2 -2
- package/dist/public/assets/{ShareBranchSwitchDialog-DIQmuIkz.js → ShareBranchSwitchDialog-DD3l5H06.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BWuqWxsw.js → ShareReceiveDialog-D5BGQzdA.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-CEG6W1Ev.js → ShareReceiveMissDialog-QiuppiTF.js} +1 -1
- package/dist/public/assets/{SkillCostValue-6xiHOBnl.js → SkillCostValue-D8ebP6Zc.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-BqzwArWv.js → SkillEditBanner-BkzopHHR.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-CiSsB_my.js → SkillInstallMenu-B7luagyu.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-B1B3kTSz.js → SkillOriginInline-BvpULx0r.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DzZ0Gk1t.js → SkillToolbarControls-Dzsdm7PA.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-BZvu5Syj.js → SlidesToolbarControls-CoX9pn5-.js} +1 -1
- package/dist/public/assets/{SourceEditor-qlPmt6ym.js → SourceEditor-QZM8qnoP.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DkxYnA6s.js → TerminalPanel-gvD8j_Io.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-BhcRGz-t.js → TerminalWindowApp-CAceqDR9.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CCvc4Q5l.js → TextDocEditor-tkRGKEq5.js} +1 -1
- package/dist/public/assets/{ThreadView-BbaUHoL7.js → ThreadView-BMvSxzC4.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-QLS0U_1C.js → TimelineDiffPane-DDkbig_i.js} +1 -1
- package/dist/public/assets/{agent-diff-store-J11a-4Bd.js → agent-diff-store-kz-Y8I6f.js} +1 -1
- package/dist/public/assets/{auth-state-cache-_thFjwl-.js → auth-state-cache-CXBlrCdD.js} +2 -2
- package/dist/public/assets/client-version-B1ECEFiM.js +1 -0
- package/dist/public/assets/{comment-chips-CLyRlBJL.js → comment-chips-ZBz8P1qB.js} +1 -1
- package/dist/public/assets/{config-provider-C7upY2Yd.js → config-provider-j9ER9l4W.js} +1 -1
- package/dist/public/assets/{dist-DGemBD_J.js → dist-7P3QNiAv.js} +2 -2
- package/dist/public/assets/{doc-paths-BkpejoFL.js → doc-paths-DPQCXAM6.js} +1 -1
- package/dist/public/assets/{documents-events-B2g_1xMi.js → documents-events-DSYMSbrh.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-Bo3rGytc.js → file-tree-adapter-DWQqMzJU.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CzXn1zjH.js → file-tree-utils-CCGJg4dv.js} +1 -1
- package/dist/public/assets/{folder-config-api-DPWmRi8a.js → folder-config-api-BFcRWayL.js} +1 -1
- package/dist/public/assets/{follow-file-DaYTg7AY.js → follow-file-DInAFQK_.js} +1 -1
- package/dist/public/assets/{globals-t_AE56h0.css → globals-DZLrtRra.css} +1 -1
- package/dist/public/assets/i18n-8WVAXtMP.js +1 -0
- package/dist/public/assets/{index-8x_9u23T.js → index-CW5V3fEN.js} +7 -7
- package/dist/public/assets/{lint-config-client-sK38eqbj.js → lint-config-client-D0R0SOyp.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-T68WxSIo.js → markdownlint-rule-browser-C-ng_hpW.js} +1 -1
- package/dist/public/assets/{navigation-targets-D6rHX3Pq.js → navigation-targets-BI4fIUSN.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-ENQgQOde.js → open-managed-artifact-tab-DUwaeWfA.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-CC2XknmZ.js → pending-receive-nav-store-Crc_XCGA.js} +1 -1
- package/dist/public/assets/{prop-types-CizsurD0.js → prop-types-tU6-fOmD.js} +1 -1
- package/dist/public/assets/{receive-store-DHalgzeU.js → receive-store-BzLz5gZK.js} +1 -1
- package/dist/public/assets/{selection-context-DdO1wltB.js → selection-context-CnpF-Ed9.js} +1 -1
- package/dist/public/assets/{skill-actions-BSweQ1qx.js → skill-actions-BdLNV2ET.js} +1 -1
- package/dist/public/assets/{skill-scope-gUkJkFRO.js → skill-scope-CRZYtnmj.js} +1 -1
- package/dist/public/assets/{skills-api-DO54o34O.js → skills-api-DT1cIHsu.js} +1 -1
- package/dist/public/assets/{src-B5lvdvjM.js → src-BHnBKao9.js} +1 -1
- package/dist/public/assets/{tag-pill-input-D2qVy9HA.js → tag-pill-input-Bcant_jp.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BqElNT05.js → target-navigation-intent-Bd_1P8q5.js} +1 -1
- package/dist/public/assets/{telemetry-impl-BcdvjHjJ.js → telemetry-impl-u08eIZFn.js} +1 -1
- package/dist/public/assets/{telemetry-startup-CmDjO4so.js → telemetry-startup-PYGQzY-J.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-BTQdEy1j.js → terminal-cli-display-Dcm1esjR.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-DNmxO4ft.js → terminal-launch-events-D8ytCf2E.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-BC3JNC05.js → terminal-telemetry-LPAWl6sJ.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-ChW315nG.js → typing-burst-detector-MvNJwskd.js} +1 -1
- package/dist/public/assets/{uninstall-C1RXngJE.js → uninstall-ACcONsCi.js} +1 -1
- package/dist/public/assets/{use-activity-panel-SBXuDVLV.js → use-activity-panel-DO4-UumZ.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-DZRctrdg.js → use-apply-config-color-theme-DpUYtbRe.js} +1 -1
- package/dist/public/assets/{use-collab-url-B7oEo69p.js → use-collab-url-B1V6TiLU.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-C1EtEd_i.js → use-live-xterm-theme-DYp4WjiU.js} +1 -1
- package/dist/public/assets/{use-open-skill-DI2x1PKF.js → use-open-skill-8o6IZoY2.js} +1 -1
- package/dist/public/assets/{use-popular-skills-DfFoUUYd.js → use-popular-skills-CC2urVQ6.js} +1 -1
- package/dist/public/assets/{use-settings-route-BrzzIll2.js → use-settings-route-DYSuZnve.js} +1 -1
- package/dist/public/assets/{use-skill-origin-FTbTIS5Y.js → use-skill-origin-Cd9ipAH-.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-BL8teAd-.js → use-terminal-enabled-pw2WV2qk.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-BjMCsEI9.js → use-timeline-entry-diff-B3StRSt9.js} +1 -1
- package/dist/public/assets/{use-workspace-8Sxb8Z6Q.js → use-workspace-BP0fuu9O.js} +1 -1
- package/dist/public/index.html +47 -47
- package/dist/public/uninstall.html +5 -5
- package/dist/{repair-launch-json-C21vqdF1.mjs → repair-launch-json-DNViuYZ7.mjs} +2 -2
- package/dist/{repair-mcp-configs-BUKx8wz_.mjs → repair-mcp-configs-BM4qXgds.mjs} +2 -2
- package/dist/{repair-skills-CI9y4QbJ.mjs → repair-skills-BoMh5uOr.mjs} +2 -2
- package/dist/repair-skills-D3qrrU25.mjs +1 -0
- package/dist/{resolve-project-root-CRcZU2OU.mjs → resolve-project-root-DpSmoodv.mjs} +2 -2
- package/dist/{server-lock-BmwIVWMl.mjs → server-lock-CSO3K0Ok.mjs} +2 -2
- package/dist/server-lock-D_MF6GOb.mjs +1 -0
- package/dist/{skill-teardown-DLV1OiQx.mjs → skill-teardown-D66Xjjil.mjs} +2 -2
- package/dist/{sleep-B416PNUo.mjs → sleep-CEs13Om_.mjs} +2 -2
- package/dist/src-8LdfqLwC.mjs +2029 -0
- package/dist/{src-BxdlvOrw.mjs → src-BimG4LM6.mjs} +3 -3
- package/dist/{src-suK9PJ_z.mjs → src-D72th7in.mjs} +2 -2
- package/dist/{src-DCqESfWX.mjs → src-DorV8gmN.mjs} +1 -1
- package/dist/src-bwfEbl1P.mjs +1 -0
- package/dist/{start-TsNChes_.mjs → start-BfQkBca_.mjs} +4 -4
- package/dist/start-C3q0F7F6.mjs +1 -0
- package/dist/{ui-DZeKrf4E.mjs → ui-DRrmB9yI.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-BplwuXJr.mjs +0 -2
- package/dist/fs-traced-Bmqe7SqT.mjs +0 -1
- package/dist/git-handle-CNjG3dz9.mjs +0 -1
- package/dist/init-BdwdCUiN.mjs +0 -1
- package/dist/loader-DCfDuFIB.mjs +0 -1
- package/dist/md-manager-30E0O9b-.mjs +0 -2
- package/dist/preview-DtCiQeRn.mjs +0 -1
- package/dist/public/assets/FeedbackForm-BTUVYyRh.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-FyJ6IPjk.js +0 -1
- package/dist/public/assets/client-version-CR8MBZoD.js +0 -1
- package/dist/public/assets/i18n-BmV9TpxI.js +0 -1
- package/dist/repair-skills-QaEJT3NL.mjs +0 -1
- package/dist/server-lock-e6dYuoeq.mjs +0 -1
- package/dist/src-DuQCE3HO.mjs +0 -1
- package/dist/src-_fp0S8Pp.mjs +0 -2029
- package/dist/start-DZCxW5no.mjs +0 -1
- /package/dist/public/assets/{globals-BEtYwZKH.js → globals-CQk8qCgW.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Go as r}from"./src-
|
|
1
|
+
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Go as r}from"./src-BimG4LM6.mjs";import{delimiter as i,normalize as a,resolve as o}from"node:path";import{existsSync as s,statSync as c}from"node:fs";import{homedir as l}from"node:os";import{EventEmitter as u}from"node:events";import{spawn as d}from"child_process";var f=n(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),p=n(((e,t)=>{function n(e){n.debug=n,n.default=n,n.coerce=c,n.disable=o,n.enable=i,n.enabled=s,n.humanize=f(),n.destroy=l,Object.keys(e).forEach(t=>{n[t]=e[t]}),n.names=[],n.skips=[],n.formatters={};function t(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return n.colors[Math.abs(t)%n.colors.length]}n.selectColor=t;function n(e){let t,i=null,a,o;function s(...e){if(!s.enabled)return;let r=s,i=Number(new Date);r.diff=i-(t||i),r.prev=t,r.curr=i,t=i,e[0]=n.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=n.formatters[i];if(typeof o==`function`){let n=e[a];t=o.call(r,n),e.splice(a,1),a--}return t}),n.formatArgs.call(r,e),(r.log||n.log).apply(r,e)}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=r,s.destroy=n.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>i===null?(a!==n.namespaces&&(a=n.namespaces,o=n.enabled(e)),o):i,set:e=>{i=e}}),typeof n.init==`function`&&n.init(s),s}function r(e,t){let r=n(this.namespace+(t===void 0?`:`:t)+e);return r.log=this.log,r}function i(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?n.skips.push(e.slice(1)):n.names.push(e)}function a(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function o(){let e=[...n.names,...n.skips.map(e=>`-`+e)].join(`,`);return n.enable(``),e}function s(e){for(let t of n.skips)if(a(e,t))return!1;for(let t of n.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=n})),m=n(((e,t)=>{e.formatArgs=r,e.save=i,e.load=a,e.useColors=n,e.storage=o(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function n(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function i(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function a(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function o(){try{return localStorage}catch{}}t.exports=p()(e);let{formatters:s}=t.exports;s.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),ee=n(((e,t)=>{t.exports=(e,t=process.argv)=>{let n=e.startsWith(`-`)?``:e.length===1?`-`:`--`,r=t.indexOf(n+e),i=t.indexOf(`--`);return r!==-1&&(i===-1||r<i)}})),te=n(((t,n)=>{let r=e(`os`),i=e(`tty`),a=ee(),{env:o}=process,s;a(`no-color`)||a(`no-colors`)||a(`color=false`)||a(`color=never`)?s=0:(a(`color`)||a(`colors`)||a(`color=true`)||a(`color=always`))&&(s=1),`FORCE_COLOR`in o&&(s=o.FORCE_COLOR===`true`?1:o.FORCE_COLOR===`false`?0:o.FORCE_COLOR.length===0?1:Math.min(parseInt(o.FORCE_COLOR,10),3));function c(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(s===0)return 0;if(a(`color=16m`)||a(`color=full`)||a(`color=truecolor`))return 3;if(a(`color=256`))return 2;if(e&&!t&&s===void 0)return 0;let n=s||0;if(o.TERM===`dumb`)return n;if(process.platform===`win32`){let e=r.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in o)return[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`GITHUB_ACTIONS`,`BUILDKITE`].some(e=>e in o)||o.CI_NAME===`codeship`?1:n;if(`TEAMCITY_VERSION`in o)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION);if(o.COLORTERM===`truecolor`)return 3;if(`TERM_PROGRAM`in o){let e=parseInt((o.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(o.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||`COLORTERM`in o?1:n}function u(e){return c(l(e,e&&e.isTTY))}n.exports={supportsColor:u,stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}})),ne=n(((t,n)=>{let r=e(`tty`),i=e(`util`);t.init=d,t.log=c,t.formatArgs=o,t.save=l,t.load=u,t.useColors=a,t.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{let e=te();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=/^(yes|on|true|enabled)$/i.test(r)?!0:/^(no|off|false|disabled)$/i.test(r)?!1:r===`null`?null:Number(r),e[n]=r,e},{});function a(){return`colors`in t.inspectOpts?!!t.inspectOpts.colors:r.isatty(process.stderr.fd)}function o(e){let{namespace:t,useColors:r}=this;if(r){let r=this.color,i=`\x1B[3`+(r<8?r:`8;5;`+r),a=` ${i};1m${t} \u001B[0m`;e[0]=a+e[0].split(`
|
|
2
2
|
`).join(`
|
|
3
3
|
`+a),e.push(i+`m+`+n.exports.humanize(this.diff)+`\x1B[0m`)}else e[0]=s()+t+` `+e[0]}function s(){return t.inspectOpts.hideDate?``:new Date().toISOString()+` `}function c(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+`
|
|
4
4
|
`)}function l(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function u(){return process.env.DEBUG}function d(e){e.inspectOpts={};let n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]}n.exports=p()(t);let{formatters:f}=n.exports;f.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split(`
|
|
@@ -6,5 +6,5 @@ import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{Go as r}from"./src
|
|
|
6
6
|
`){return e.split(n).reduce((e,n)=>{let r=t?n.trim():n;return r&&e.push(r),e},[])}function st(e,t){return k(e,!0).map(e=>t(e))}function ct(e){return(0,ae.exists)(e,ae.FOLDER)}function A(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function lt(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function ut(e,t){if(Array.isArray(e)){let n=e.indexOf(t);n>=0&&e.splice(n,1)}else e.delete(t);return t}function j(e){return Array.isArray(e)?e:[e]}function dt(e){return e.replace(/[\s-]+(.)/g,(e,t)=>t.toUpperCase())}function M(e){return j(e).map(e=>e instanceof String?e:String(e))}function N(e,t=0){if(e==null)return t;let n=parseInt(e,10);return Number.isNaN(n)?t:n}function P(e,t){let n=[];for(let r=0,i=e.length;r<i;r++)n.push(t,e[r]);return n}function F(e){return(Array.isArray(e)?Buffer.concat(e):e).toString(`utf-8`)}function ft(e,t){let n={};return t.forEach(t=>{e[t]!==void 0&&(n[t]=e[t])}),n}function pt(e=0){return new Promise(t=>setTimeout(t,e))}function mt(e){if(e!==!1)return e}var I,L,R,ht=S({"src/lib/utils/util.ts"(){St(),I=`\0`,L=()=>{},R=Object.prototype.toString.call.bind(Object.prototype.toString)}});function z(e,t,n){return t(e)?e:arguments.length>2?n:void 0}function gt(e,t){let n=h(e)?`string`:typeof e;return/number|string|boolean/.test(n)&&(!t||!t.includes(n))}function _t(e){return!!e&&R(e)===`[object Object]`}function vt(e){return typeof e==`function`}var B,yt,V,bt,xt,St=S({"src/lib/utils/argument-filters.ts"(){ht(),B=e=>Array.isArray(e),yt=e=>typeof e==`number`,V=e=>typeof e==`string`||h(e),bt=e=>V(e)||Array.isArray(e)&&e.every(V),xt=e=>e==null||`number|boolean|function`.includes(typeof e)?!1:typeof e.length==`number`}}),Ct,wt=S({"src/lib/utils/exit-codes.ts"(){Ct=(e=>(e[e.SUCCESS=0]=`SUCCESS`,e[e.ERROR=1]=`ERROR`,e[e.NOT_FOUND=-2]=`NOT_FOUND`,e[e.UNCLEAN=128]=`UNCLEAN`,e))(Ct||{})}}),Tt,Et=S({"src/lib/utils/git-output-streams.ts"(){Tt=class e{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new e(this.stdOut.toString(`utf8`),this.stdErr.toString(`utf8`))}}}});function Dt(){throw Error(`LineParser:useMatches not implemented`)}var H,U,Ot=S({"src/lib/utils/line-parser.ts"(){H=class{constructor(e,t){this.matches=[],this.useMatches=Dt,this.parse=(e,t)=>(this.resetMatches(),this._regExp.every((t,n)=>this.addMatch(t,n,e(n)))?this.useMatches(t,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,n){let r=n&&e.exec(n);return r&&this.pushMatch(t,r),!!r}pushMatch(e,t){this.matches.push(...t.slice(1))}},U=class extends H{addMatch(e,t,n){return/^remote:\s/.test(String(n))&&super.addMatch(e,t,n)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function kt(...e){let t=process.cwd(),n=Object.assign({baseDir:t,...At},...e.filter(e=>typeof e==`object`&&e));return n.baseDir=n.baseDir||t,n.trimmed=n.trimmed===!0,n}var At,jt=S({"src/lib/utils/simple-git-options.ts"(){At={binary:`git`,maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Mt(e,t=[]){return _t(e)?Object.keys(e).reduce((t,n)=>{let r=e[n];if(h(r))t.push(r);else if(gt(r,[`boolean`]))t.push(n+`=`+r);else if(Array.isArray(r))for(let e of r)gt(e,[`string`,`number`])||t.push(n+`=`+e);else t.push(n);return t},t):t}function W(e,t=0,n=!1){let r=[];for(let n=0,i=t<0?e.length:t;n<i;n++)`string|number`.includes(typeof e[n])&&r.push(String(e[n]));return Mt(Pt(e),r),n||r.push(...Nt(e)),r}function Nt(e){return M(z(O(e,+(typeof O(e)==`function`)),B,[]))}function Pt(e){return z(O(e,+!!vt(O(e))),_t)}function G(e,t=!0){let n=nt(O(e));return t||rt(n)?n:void 0}var Ft=S({"src/lib/utils/task-options.ts"(){St(),ht()}});function It(e,t){return e(t.stdOut,t.stdErr)}function K(e,t,n,r=!0){return j(n).forEach(n=>{for(let i=k(n,r),a=0,o=i.length;a<o;a++){let n=(e=0)=>{if(!(a+e>=o))return i[a+e]};t.some(({parse:t})=>t(n,e))}}),e}var Lt=S({"src/lib/utils/task-parser.ts"(){ht()}}),Rt={};C(Rt,{ExitCodes:()=>Ct,GitOutputStreams:()=>Tt,LineParser:()=>H,NOOP:()=>L,NULL:()=>I,RemoteLineParser:()=>U,append:()=>A,appendTaskOptions:()=>Mt,asArray:()=>j,asCamelCase:()=>dt,asFunction:()=>nt,asNumber:()=>N,asStringArray:()=>M,bufferToString:()=>F,callTaskParser:()=>It,createInstanceConfig:()=>kt,delay:()=>pt,filterArray:()=>B,filterFunction:()=>vt,filterHasLength:()=>xt,filterNumber:()=>yt,filterPlainObject:()=>_t,filterPrimitives:()=>gt,filterString:()=>V,filterStringOrStringArray:()=>bt,filterType:()=>z,first:()=>at,folderExists:()=>ct,forEachLineWithContent:()=>st,getTrailingOptions:()=>W,including:()=>lt,isUserFunction:()=>rt,last:()=>O,objectToString:()=>R,orVoid:()=>mt,parseStringResponse:()=>K,pick:()=>ft,prefixedArray:()=>P,remove:()=>ut,splitOn:()=>it,toLinesWithContent:()=>k,trailingFunctionArgument:()=>G,trailingOptionsArgument:()=>Pt});var q=S({"src/lib/utils/index.ts"(){St(),wt(),Et(),Ot(),jt(),Ft(),Lt(),ht()}}),zt={};C(zt,{CheckRepoActions:()=>Wt,checkIsBareRepoTask:()=>Ht,checkIsRepoRootTask:()=>Vt,checkIsRepoTask:()=>Bt});function Bt(e){switch(e){case`bare`:return Ht();case`root`:return Vt()}return{commands:[`rev-parse`,`--is-inside-work-tree`],format:`utf-8`,onError:Gt,parser:Kt}}function Vt(){return{commands:[`rev-parse`,`--git-dir`],format:`utf-8`,onError:Gt,parser(e){return/^\.(git)?$/.test(e.trim())}}}function Ht(){return{commands:[`rev-parse`,`--is-bare-repository`],format:`utf-8`,onError:Gt,parser:Kt}}function Ut(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var Wt,Gt,Kt,qt=S({"src/lib/tasks/check-is-repo.ts"(){q(),Wt=(e=>(e.BARE=`bare`,e.IN_TREE=`tree`,e.IS_REPO_ROOT=`root`,e))(Wt||{}),Gt=({exitCode:e},t,n,r)=>{if(e===128&&Ut(t))return n(Buffer.from(`false`));r(t)},Kt=e=>e.trim()===`true`}});function Jt(e,t){let n=new Yt(e),r=e?Zt:Xt;return k(t).forEach(e=>{let t=e.replace(r,``);n.paths.push(t),(Qt.test(t)?n.folders:n.files).push(t)}),n}var Yt,Xt,Zt,Qt,$t=S({"src/lib/responses/CleanSummary.ts"(){q(),Yt=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},Xt=/^[a-z]+\s*/i,Zt=/^[a-z]+\s+[a-z]+\s*/i,Qt=/\/$/}}),en={};C(en,{EMPTY_COMMANDS:()=>on,adhocExecTask:()=>tn,configurationErrorTask:()=>J,isBufferTask:()=>rn,isEmptyTask:()=>an,straightThroughBufferTask:()=>nn,straightThroughStringTask:()=>Y});function tn(e){return{commands:on,format:`empty`,parser:e}}function J(e){return{commands:on,format:`empty`,parser(){throw typeof e==`string`?new et(e):e}}}function Y(e,t=!1){return{commands:e,format:`utf-8`,parser(e){return t?String(e).trim():e}}}function nn(e){return{commands:e,format:`buffer`,parser(e){return e}}}function rn(e){return e.format===`buffer`}function an(e){return e.format===`empty`||!e.commands.length}var on,X=S({"src/lib/tasks/task.ts"(){tt(),on=[]}}),sn={};C(sn,{CONFIG_ERROR_INTERACTIVE_MODE:()=>hn,CONFIG_ERROR_MODE_REQUIRED:()=>gn,CONFIG_ERROR_UNKNOWN_OPTION:()=>_n,CleanOptions:()=>vn,cleanTask:()=>ln,cleanWithOptionsTask:()=>cn,isCleanOptionsArray:()=>un});function cn(e,t){let{cleanMode:n,options:r,valid:i}=dn(e);return n?i.options?(r.push(...t),r.some(mn)?J(hn):ln(n,r)):J(_n+JSON.stringify(e)):J(gn)}function ln(e,t){return{commands:[`clean`,`-${e}`,...t],format:`utf-8`,parser(t){return Jt(e===`n`,t)}}}function un(e){return Array.isArray(e)&&e.every(e=>yn.has(e))}function dn(e){let t,n=[],r={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,``).split(``).forEach(e=>{fn(e)?(t=e,r.cleanMode=!0):r.options=r.options&&pn(n[n.length]=`-${e}`)}),{cleanMode:t,options:n,valid:r}}function fn(e){return e===`f`||e===`n`}function pn(e){return/^-[a-z]$/i.test(e)&&yn.has(e.charAt(1))}function mn(e){return/^-[^\-]/.test(e)?e.indexOf(`i`)>0:e===`--interactive`}var hn,gn,_n,vn,yn,bn=S({"src/lib/tasks/clean.ts"(){$t(),q(),X(),hn=`Git clean interactive mode is not supported`,gn=`Git clean mode parameter ("n" or "f") is required`,_n=`Git clean unknown option found in: `,vn=(e=>(e.DRY_RUN=`n`,e.FORCE=`f`,e.IGNORED_INCLUDED=`x`,e.IGNORED_ONLY=`X`,e.EXCLUDING=`e`,e.QUIET=`q`,e.RECURSIVE=`d`,e))(vn||{}),yn=new Set([`i`,...M(Object.values(vn))])}});function xn(e){let t=new Tn;for(let n of wn(e))t.addValue(n.file,String(n.key),n.value);return t}function Sn(e,t){let n=null,r=[],i=new Map;for(let a of wn(e,t))a.key===t&&(r.push(n=a.value),i.has(a.file)||i.set(a.file,[]),i.get(a.file).push(n));return{key:t,paths:Array.from(i.keys()),scopes:i,value:n,values:r}}function Cn(e){return e.replace(/^(file):/,``)}function*wn(e,t=null){let n=e.split(`\0`);for(let e=0,r=n.length-1;e<r;){let r=Cn(n[e++]),i=n[e++],a=t;if(i.includes(`
|
|
7
7
|
`)){let e=it(i,`
|
|
8
8
|
`);a=e[0],i=e[1]}yield{file:r,key:a,value:i}}}var Tn,En=S({"src/lib/responses/ConfigList.ts"(){q(),Tn=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||=this.files.reduce((e,t)=>Object.assign(e,this.values[t]),{}),this._all}addFile(e){if(!(e in this.values)){let t=O(this.files);this.values[e]=t?Object.create(this.values[t]):{},this.files.push(e)}return this.values[e]}addValue(e,t,n){let r=this.addFile(e);Object.hasOwn(r,t)?Array.isArray(r[t])?r[t].push(n):r[t]=[r[t],n]:r[t]=n,this._all=void 0}}}});function Dn(e,t){return typeof e==`string`&&Object.hasOwn(Mn,e)?e:t}function On(e,t,n,r){let i=[`config`,`--${r}`];return n&&i.push(`--add`),i.push(e,t),{commands:i,format:`utf-8`,parser(e){return e}}}function kn(e,t){let n=[`config`,`--null`,`--show-origin`,`--get-all`,e];return t&&n.splice(1,0,`--${t}`),{commands:n,format:`utf-8`,parser(t){return Sn(t,e)}}}function An(e){let t=[`config`,`--list`,`--show-origin`,`--null`];return e&&t.push(`--${e}`),{commands:t,format:`utf-8`,parser(e){return xn(e)}}}function jn(){return{addConfig(e,t,...n){return this._runTask(On(e,t,n[0]===!0,Dn(n[1],`local`)),G(arguments))},getConfig(e,t){return this._runTask(kn(e,Dn(t,void 0)),G(arguments))},listConfig(...e){return this._runTask(An(Dn(e[0],void 0)),G(arguments))}}}var Mn,Nn=S({"src/lib/tasks/config.ts"(){En(),q(),Mn=(e=>(e.system=`system`,e.global=`global`,e.local=`local`,e.worktree=`worktree`,e))(Mn||{})}});function Pn(e){return In.has(e)}var Fn,In,Ln=S({"src/lib/tasks/diff-name-status.ts"(){Fn=(e=>(e.ADDED=`A`,e.COPIED=`C`,e.DELETED=`D`,e.MODIFIED=`M`,e.RENAMED=`R`,e.CHANGED=`T`,e.UNMERGED=`U`,e.UNKNOWN=`X`,e.BROKEN=`B`,e))(Fn||{}),In=new Set(Object.values(Fn))}});function Rn(...e){return new Wn().param(...e)}function zn(e){let t=new Set,n={};return st(e,e=>{let[r,i,a]=e.split(I);t.add(r),(n[r]=n[r]||[]).push({line:N(i),path:r,preview:a})}),{paths:t,results:n}}function Bn(){return{grep(e){let t=G(arguments),n=W(arguments);for(let e of Vn)if(n.includes(e))return this._runTask(J(`git.grep: use of "${e}" is not supported.`),t);typeof e==`string`&&(e=Rn().param(e));let r=[`grep`,`--null`,`-n`,`--full-name`,...n,...e];return this._runTask({commands:r,format:`utf-8`,parser(e){return zn(e)}},t)}}}var Vn,Hn,Un,Wn,Gn=S({"src/lib/tasks/grep.ts"(){q(),X(),Vn=[`-h`],Hn=Symbol(`grepQuery`),Wn=class{constructor(){this[Un]=[]}*[(Un=Hn,Symbol.iterator)](){for(let e of this[Hn])yield e}and(...e){return e.length&&this[Hn].push(`--and`,`(`,...P(e,`-e`),`)`),this}param(...e){return this[Hn].push(...P(e,`-e`)),this}}}}),Kn={};C(Kn,{ResetMode:()=>Xn,getResetMode:()=>Jn,resetTask:()=>qn});function qn(e,t){let n=[`reset`];return Yn(e)&&n.push(`--${e}`),n.push(...t),Y(n)}function Jn(e){if(Yn(e))return e;switch(typeof e){case`string`:case`undefined`:return`soft`}}function Yn(e){return typeof e==`string`&&Zn.includes(e)}var Xn,Zn,Qn=S({"src/lib/tasks/reset.ts"(){q(),X(),Xn=(e=>(e.MIXED=`mixed`,e.SOFT=`soft`,e.HARD=`hard`,e.MERGE=`merge`,e.KEEP=`keep`,e))(Xn||{}),Zn=M(Object.values(Xn))}});function $n(){return(0,ue.default)(`simple-git`)}function er(e,t,n){return!t||!String(t).replace(/\s*/,``)?n?(t,...r)=>{e(t,...r),n(t,...r)}:e:(r,...i)=>{e(`%s ${r}`,t,...i),n&&n(r,...i)}}function tr(e,t,{namespace:n}){if(typeof e==`string`)return e;let r=t&&t.namespace||``;return r.startsWith(n)?r.substr(n.length+1):r||n}function nr(e,t,n,r=$n()){let i=e&&`[${e}]`||``,a=[],o=typeof t==`string`?r.extend(t):t,s=tr(z(t,V),o,r);return l(n);function c(t,n){return A(a,nr(e,s.replace(/^[^:]+/,t),n,r))}function l(t){let n=t&&`[${t}]`||``,a=o&&er(o,n)||L,s=er(r,`${i} ${n}`,a);return Object.assign(o?a:s,{label:e,sibling:c,info:s,step:l})}}var rr=S({"src/lib/git-logger.ts"(){q(),ue.default.formatters.L=e=>String(xt(e)?e.length:`-`),ue.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString(`utf8`):R(e)}}),ir,ar=S({"src/lib/runners/tasks-pending-queue.ts"(){E(),rr(),ir=class e{constructor(e=`GitExecutor`){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(t){let n=e.getName(t.commands[0]);return{task:t,logger:nr(this.logLabel,n),name:n}}push(e){let t=this.createProgress(e);return t.logger(`Adding task to the queue, commands = %o`,e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:n}]of Array.from(this._queue.entries()))t===e.task?(n.info(`Failed %o`,e),n(`Fatal exception, any as-yet un-started tasks run through this executor will not be attempted`)):n.info(`A fatal exception occurred in a previous task, the queue has been purged: %o`,e.message),this.complete(t);if(this._queue.size!==0)throw Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new T(void 0,`TasksPendingQueue: attempt called for an unknown task`);return t.logger(`Starting task`),t}static getName(t=`empty`){return`task:${t}:${++e.counter}`}static{this.counter=0}}}});function Z(e,t){return{method:at(e.commands)||``,commands:t}}function or(e,t){return n=>{t(`[ERROR] child process exception %o`,n),e.push(Buffer.from(String(n.stack),`ascii`))}}function sr(e,t,n,r){return i=>{n(`%s received %L bytes`,t,i),r(`%B`,i),e.push(i)}}var cr,lr=S({"src/lib/runners/git-executor-chain.ts"(){E(),X(),q(),ar(),cr=class{constructor(e,t,n){this._executor=e,this._scheduler=t,this._plugins=n,this._chain=Promise.resolve(),this._queue=new ir}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}async attemptTask(e){let t=await this._scheduler.next(),n=()=>this._queue.complete(e);try{let{logger:t}=this._queue.attempt(e);return await(an(e)?this.attemptEmptyTask(e,t):this.attemptRemoteTask(e,t))}catch(t){throw this.onFatalException(e,t)}finally{n(),t()}}onFatalException(e,t){let n=t instanceof T?Object.assign(t,{task:e}):new T(e,t&&String(t));return this._chain=Promise.resolve(),this._queue.fatal(n),n}async attemptRemoteTask(e,t){let n=this._plugins.exec(`spawn.binary`,``,Z(e,e.commands)),r=this._plugins.exec(`spawn.args`,[...e.commands],{...Z(e,e.commands),env:{...this.env}}),i=await this.gitResponse(e,n,r,this.outputHandler,t.step(`SPAWN`)),a=await this.handleTaskData(e,r,i,t.step(`HANDLE`));return t(`passing response to task's parser as a %s`,e.format),rn(e)?It(e.parser,a):It(e.parser,a.asStrings())}async attemptEmptyTask(e,t){return t(`empty task bypassing child process to call to task's parser`),e.parser(this)}handleTaskData(e,t,n,r){let{exitCode:i,rejection:a,stdOut:o,stdErr:s}=n;return new Promise((c,l)=>{r(`Preparing to handle process response exitCode=%d stdOut=`,i);let{error:u}=this._plugins.exec(`task.error`,{error:a},{...Z(e,t),...n});if(u&&e.onError)return r.info(`exitCode=%s handling with custom error handler`),e.onError(n,u,e=>{r.info(`custom error handler treated as success`),r(`custom error returned a %s`,R(e)),c(new Tt(Array.isArray(e)?Buffer.concat(e):e,Buffer.concat(s)))},l);if(u)return r.info(`handling as error: exitCode=%s stdErr=%s rejection=%o`,i,s.length,a),l(u);r.info(`retrieving task output complete`),c(new Tt(Buffer.concat(o),Buffer.concat(s)))})}async gitResponse(e,t,n,r,i){let a=i.sibling(`output`),o=this._plugins.exec(`spawn.options`,{cwd:this.cwd,env:this.env,windowsHide:!0},Z(e,e.commands));return new Promise(s=>{let c=[],l=[];i.info(`%s %o`,t,n),i(`%O`,o);let u=this._beforeSpawn(e,n);if(u)return s({stdOut:c,stdErr:l,exitCode:9901,rejection:u});this._plugins.exec(`spawn.before`,void 0,{...Z(e,n),kill(e){u=e||u}});let f=d(t,n,o);f.stdout.on(`data`,sr(c,`stdOut`,i,a.step(`stdOut`))),f.stderr.on(`data`,sr(l,`stdErr`,i,a.step(`stdErr`))),f.on(`error`,or(l,i)),r&&(i(`Passing child process stdOut/stdErr to custom outputHandler`),r(t,f.stdout,f.stderr,[...n])),this._plugins.exec(`spawn.after`,void 0,{...Z(e,n),spawned:f,close(e,t){s({stdOut:c,stdErr:l,exitCode:e,rejection:u||t})},kill(e){f.killed||(u=e,f.kill(`SIGINT`))}})})}_beforeSpawn(e,t){let n;return this._plugins.exec(`spawn.before`,void 0,{...Z(e,t),kill(e){n=e||n}}),n}}}}),ur={};C(ur,{GitExecutor:()=>dr});var dr,fr=S({"src/lib/runners/git-executor.ts"(){lr(),dr=class{constructor(e,t,n){this.cwd=e,this._scheduler=t,this._plugins=n,this._chain=new cr(this,this._scheduler,this._plugins)}chain(){return new cr(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function pr(e,t,n=L){t.then(e=>{n(null,e)},t=>{t?.task===e&&n(t instanceof $e?mr(t):t,void 0)})}function mr(e){let t=e=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${e} should be GitResponseError.git.${e}, this will no longer be available in version 3`),t=L};return Object.create(e,Object.getOwnPropertyNames(e.git).reduce(n,{}));function n(n,r){return r in e||(n[r]={enumerable:!1,configurable:!1,get(){return t(r),e.git[r]}}),n}}var hr=S({"src/lib/task-callback.ts"(){D(),q()}});function gr(e,t){return tn(n=>{if(!ct(e))throw Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||n).cwd=e})}var _r=S({"src/lib/tasks/change-working-directory.ts"(){q(),X()}});function vr(e){let t=[`checkout`,...e];return t[1]===`-b`&&t.includes(`-B`)&&(t[1]=ut(t,`-B`)),Y(t)}function yr(){return{checkout(){return this._runTask(vr(W(arguments,1)),G(arguments))},checkoutBranch(e,t){return this._runTask(vr([`-b`,e,t,...W(arguments)]),G(arguments))},checkoutLocalBranch(e){return this._runTask(vr([`-b`,e,...W(arguments)]),G(arguments))}}}var br=S({"src/lib/tasks/checkout.ts"(){q(),X()}});function xr(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function Sr(){return{countObjects(){return this._runTask({commands:[`count-objects`,`--verbose`],format:`utf-8`,parser(e){return K(xr(),[Cr],e)}})}}}var Cr,wr=S({"src/lib/tasks/count-objects.ts"(){q(),Cr=new H(/([a-z-]+): (\d+)$/,(e,[t,n])=>{let r=dt(t);Object.hasOwn(e,r)&&(e[r]=N(n))})}});function Tr(e){return K({author:null,branch:``,commit:``,root:!1,summary:{changes:0,insertions:0,deletions:0}},Er,e)}var Er,Dr=S({"src/lib/parsers/parse-commit.ts"(){q(),Er=[new H(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(e,[t,n,r])=>{e.branch=t,e.commit=r,e.root=!!n}),new H(/\s*Author:\s(.+)/i,(e,[t])=>{let n=t.split(`<`),r=n.pop();!r||!r.includes(`@`)||(e.author={email:r.substr(0,r.length-1),name:n.join(`<`).trim()})}),new H(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(e,[t,n,r])=>{e.summary.changes=parseInt(t,10)||0,e.summary.insertions=parseInt(n,10)||0,e.summary.deletions=parseInt(r,10)||0}),new H(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(e,[t,n,r])=>{e.summary.changes=parseInt(t,10)||0;let i=parseInt(n,10)||0;r===`-`?e.summary.deletions=i:r===`+`&&(e.summary.insertions=i)})]}});function Or(e,t,n){return{commands:[`-c`,`core.abbrev=40`,`commit`,...P(e,`-m`),...t,...n],format:`utf-8`,parser:Tr}}function kr(){return{commit(t,...n){let r=G(arguments),i=e(t)||Or(j(t),j(z(n[0],bt,[])),[...M(z(n[1],B,[])),...W(arguments,0,!0)]);return this._runTask(i,r)}};function e(e){return!bt(e)&&J(`git.commit: requires the commit message to be supplied as a string/string[]`)}}var Ar=S({"src/lib/tasks/commit.ts"(){Dr(),q(),X()}});function jr(){return{firstCommit(){return this._runTask(Y([`rev-list`,`--max-parents=0`,`HEAD`],!0),G(arguments))}}}var Mr=S({"src/lib/tasks/first-commit.ts"(){q(),X()}});function Nr(e,t){let n=[`hash-object`,e];return t&&n.push(`-w`),Y(n,!0)}var Pr=S({"src/lib/tasks/hash-object.ts"(){X()}});function Fr(e,t,n){let r=String(n).trim(),i;if(i=Lr.exec(r))return new Ir(e,t,!1,i[1]);if(i=Rr.exec(r))return new Ir(e,t,!0,i[1]);let a=``,o=r.split(` `);for(;o.length;)if(o.shift()===`in`){a=o.join(` `);break}return new Ir(e,t,/^re/i.test(r),a)}var Ir,Lr,Rr,zr=S({"src/lib/responses/InitSummary.ts"(){Ir=class{constructor(e,t,n,r){this.bare=e,this.path=t,this.existing=n,this.gitDir=r}},Lr=/^Init.+ repository in (.+)$/,Rr=/^Rein.+ in (.+)$/}});function Br(e){return e.includes(Hr)}function Vr(e=!1,t,n){let r=[`init`,...n];return e&&!Br(r)&&r.splice(1,0,Hr),{commands:r,format:`utf-8`,parser(e){return Fr(r.includes(`--bare`),t,e)}}}var Hr,Ur=S({"src/lib/tasks/init.ts"(){zr(),Hr=`--bare`}});function Wr(e){for(let t=0;t<e.length;t++){let n=Kr.exec(e[t]);if(n)return`--${n[1]}`}return``}function Gr(e){return Kr.test(e)}var Kr,qr=S({"src/lib/args/log-format.ts"(){Kr=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Jr,Yr=S({"src/lib/responses/DiffSummary.ts"(){Jr=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Xr(e=``){let t=ti[e];return e=>K(new Jr,t,e,!1)}var Zr,Qr,$r,ei,ti,ni=S({"src/lib/parsers/parse-diff-summary.ts"(){qr(),Yr(),Ln(),q(),Zr=[new H(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(e,[t,n,r=``])=>{e.files.push({file:t.trim(),changes:N(n),insertions:r.replace(/[^+]/g,``).length,deletions:r.replace(/[^-]/g,``).length,binary:!1})}),new H(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(e,[t,n,r])=>{e.files.push({file:t.trim(),before:N(n),after:N(r),binary:!0})}),new H(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(e,[t,n])=>{let r=/(\d+) i/.exec(n),i=/(\d+) d/.exec(n);e.changed=N(t),e.insertions=N(r?.[1]),e.deletions=N(i?.[1])})],Qr=[new H(/(\d+)\t(\d+)\t(.+)$/,(e,[t,n,r])=>{let i=N(t),a=N(n);e.changed++,e.insertions+=i,e.deletions+=a,e.files.push({file:r,changes:i+a,insertions:i,deletions:a,binary:!1})}),new H(/-\t-\t(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,after:0,before:0,binary:!0})})],$r=[new H(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],ei=[new H(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(e,[t,n,r,i,a])=>{e.changed++,e.files.push({file:a??r,changes:0,insertions:0,deletions:0,binary:!1,status:mt(Pn(t)&&t),from:mt(!!a&&r!==a&&r),similarity:N(n)})})],ti={"":Zr,"--stat":Zr,"--numstat":Qr,"--name-status":ei,"--name-only":$r}}});function ri(e,t){return t.reduce((t,n,r)=>(t[n]=e[r]||``,t),Object.create({diff:null}))}function ii(e=si,t=ci,n=``){let r=Xr(n);return function(n){let i=k(n.trim(),!1,ai).map(function(n){let i=n.split(oi),a=ri(i[0].split(e),t);return i.length>1&&i[1].trim()&&(a.diff=r(i[1])),a});return{all:i,latest:i.length&&i[0]||null,total:i.length}}}var ai,oi,si,ci,li=S({"src/lib/parsers/parse-list-log-summary.ts"(){q(),ni(),qr(),ai=`òòòòòò `,oi=` òò`,si=` ò `,ci=[`hash`,`date`,`message`,`refs`,`author_name`,`author_email`]}}),ui={};C(ui,{diffSummaryTask:()=>di,validateLogFormatConfig:()=>fi});function di(e){let t=Wr(e),n=[`diff`];return t===``&&(t=`--stat`,n.push(`--stat=4096`)),n.push(...e),fi(n)||{commands:n,format:`utf-8`,parser:Xr(t)}}function fi(e){let t=e.filter(Gr);if(t.length>1)return J(`Summary flags are mutually exclusive - pick one of ${t.join(`,`)}`);if(t.length&&e.includes(`-z`))return J(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var pi=S({"src/lib/tasks/diff.ts"(){qr(),ni(),X()}});function mi(e,t){let n=[],r=[];return Object.keys(e).forEach(t=>{n.push(t),r.push(String(e[t]))}),[n,r.join(t)]}function hi(e){return Object.keys(e).reduce((t,n)=>(n in yi||(t[n]=e[n]),t),{})}function gi(e={},t=[]){let n=z(e.splitter,V,si),[r,i]=mi(_t(e.format)?e.format:{hash:`%H`,date:e.strictDate===!1?`%ai`:`%aI`,message:`%s`,refs:`%D`,body:e.multiLine?`%B`:`%b`,author_name:e.mailMap===!1?`%an`:`%aN`,author_email:e.mailMap===!1?`%ae`:`%aE`},n),a=[],o=[`--pretty=format:${ai}${i}${oi}`,...t],s=e.n||e[`max-count`]||e.maxCount;if(s&&o.push(`--max-count=${s}`),e.from||e.to){let t=e.symmetric===!1?`..`:`...`;a.push(`${e.from||``}${t}${e.to||``}`)}return V(e.file)&&o.push(`--follow`,se(e.file)),Mt(hi(e),o),{fields:r,splitter:n,commands:[...o,...a]}}function _i(e,t,n){let r=ii(e,t,Wr(n));return{commands:[`log`,...n],format:`utf-8`,parser:r}}function vi(){return{log(...n){let r=G(arguments),i=gi(Pt(arguments),M(z(arguments[0],B,[]))),a=t(...n)||fi(i.commands)||e(i);return this._runTask(a,r)}};function e(e){return _i(e.splitter,e.fields,e.commands)}function t(e,t){return V(e)&&V(t)&&J(`git.log(string, string) should be replaced with git.log({ from: string, to: string })`)}}var yi,bi=S({"src/lib/tasks/log.ts"(){qr(),li(),q(),X(),pi(),yi=(e=>(e[e[`--pretty`]=0]=`--pretty`,e[e[`max-count`]=1]=`max-count`,e[e.maxCount=2]=`maxCount`,e[e.n=3]=`n`,e[e.file=4]=`file`,e[e.format=5]=`format`,e[e.from=6]=`from`,e[e.to=7]=`to`,e[e.splitter=8]=`splitter`,e[e.symmetric=9]=`symmetric`,e[e.mailMap=10]=`mailMap`,e[e.multiLine=11]=`multiLine`,e[e.strictDate=12]=`strictDate`,e))(yi||{})}}),xi,Si,Ci=S({"src/lib/responses/MergeSummary.ts"(){xi=class{constructor(e,t=null,n){this.reason=e,this.file=t,this.meta=n}toString(){return`${this.file}:${this.reason}`}},Si=class{constructor(){this.conflicts=[],this.merges=[],this.result=`success`}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(`, `)}`:`OK`}}}}),wi,Ti,Ei=S({"src/lib/responses/PullSummary.ts"(){wi=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Ti=class{constructor(){this.remote=``,this.hash={local:``,remote:``},this.branch={local:``,remote:``},this.message=``}toString(){return this.message}}}});function Di(e){return e.objects=e.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function Oi(e){let t=/^\s*(\d+)/.exec(e),n=/delta (\d+)/i.exec(e);return{count:N(t&&t[1]||`0`),delta:N(n&&n[1]||`0`)}}var ki,Ai=S({"src/lib/parsers/parse-remote-objects.ts"(){q(),ki=[new U(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,n])=>{let r=t.toLowerCase(),i=Di(e.remoteMessages);Object.assign(i,{[r]:N(n)})}),new U(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,n])=>{let r=t.toLowerCase(),i=Di(e.remoteMessages);Object.assign(i,{[r]:N(n)})}),new U(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,n,r])=>{let i=Di(e.remoteMessages);i.total=Oi(t),i.reused=Oi(n),i.packReused=N(r)})]}});function ji(e,t){return K({remoteMessages:new Ni},Mi,t)}var Mi,Ni,Pi=S({"src/lib/parsers/parse-remote-messages.ts"(){q(),Ai(),Mi=[new U(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...ki,new U([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new U([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(e,[t,n,r])=>{e.remoteMessages.vulnerabilities={count:N(t),summary:n,url:r}})],Ni=class{constructor(){this.all=[]}}}});function Fi(e,t){let n=K(new Ti,Bi,[e,t]);return n.message&&n}var Ii,Li,Ri,zi,Bi,Vi,Hi,Ui=S({"src/lib/parsers/parse-pull.ts"(){Ei(),q(),Pi(),Ii=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,Li=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,Ri=/^(create|delete) mode \d+ (.+)/,zi=[new H(Ii,(e,[t,n,r])=>{e.files.push(t),n&&(e.insertions[t]=n.length),r&&(e.deletions[t]=r.length)}),new H(Li,(e,[t,,n,,r])=>n!==void 0||r!==void 0?(e.summary.changes=+t||0,e.summary.insertions=+n||0,e.summary.deletions=+r||0,!0):!1),new H(Ri,(e,[t,n])=>{A(e.files,n),A(t===`create`?e.created:e.deleted,n)})],Bi=[new H(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new H(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new H(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,n,r,i])=>{e.branch.local=r,e.hash.local=t,e.branch.remote=i,e.hash.remote=n})],Vi=(e,t)=>K(new wi,zi,[e,t]),Hi=(e,t)=>Object.assign(new wi,Vi(e,t),ji(e,t))}}),Wi,Gi,Ki,qi=S({"src/lib/parsers/parse-merge.ts"(){Ci(),q(),Ui(),Wi=[new H(/^Auto-merging\s+(.+)$/,(e,[t])=>{e.merges.push(t)}),new H(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(e,[t,n])=>{e.conflicts.push(new xi(t,n))}),new H(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,n,r])=>{e.conflicts.push(new xi(t,n,{deleteRef:r}))}),new H(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new xi(t,null))}),new H(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],Gi=(e,t)=>Object.assign(Ki(e,t),Hi(e,t)),Ki=e=>K(new Si,Wi,e)}});function Ji(e){return e.length?{commands:[`merge`,...e],format:`utf-8`,parser(e,t){let n=Gi(e,t);if(n.failed)throw new $e(n);return n}}:J(`Git.merge requires at least one option`)}var Yi=S({"src/lib/tasks/merge.ts"(){D(),qi(),X()}});function Xi(e,t,n){let r=n.includes(`deleted`),i=n.includes(`tag`)||/^refs\/tags/.test(e),a=!n.includes(`new`);return{deleted:r,tag:i,branch:!i,new:!a,alreadyUpdated:a,local:e,remote:t}}var Zi,Qi,$i,ea=S({"src/lib/parsers/parse-push.ts"(){q(),Pi(),Zi=[new H(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new H(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref={...e.ref||{},local:t}}),new H(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,n,r])=>{e.pushed.push(Xi(t,n,r))}),new H(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,n,r])=>{e.branch={...e.branch||{},local:t,remote:n,remoteName:r}}),new H(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,n,r,i])=>{e.update={head:{local:t,remote:n},hash:{from:r,to:i}}})],Qi=(e,t)=>{let n=$i(e,t),r=ji(e,t);return{...n,...r}},$i=(e,t)=>K({pushed:[]},Zi,[e,t])}}),ta={};C(ta,{pushTagsTask:()=>na,pushTask:()=>ra});function na(e={},t){return A(t,`--tags`),ra(e,t)}function ra(e={},t){let n=[`push`,...t];return e.branch&&n.splice(1,0,e.branch),e.remote&&n.splice(1,0,e.remote),ut(n,`-v`),A(n,`--verbose`),A(n,`--porcelain`),{commands:n,format:`utf-8`,parser:Qi}}var ia=S({"src/lib/tasks/push.ts"(){ea(),q()}});function aa(){return{showBuffer(){let e=[`show`,...W(arguments,1)];return e.includes(`--binary`)||e.splice(1,0,`--binary`),this._runTask(nn(e),G(arguments))},show(){let e=[`show`,...W(arguments,1)];return this._runTask(Y(e),G(arguments))}}}var oa=S({"src/lib/tasks/show.ts"(){q(),X()}}),sa,ca,la=S({"src/lib/responses/FileStatusSummary.ts"(){sa=/^(.+)\0(.+)$/,ca=class{constructor(e,t,n){if(this.path=e,this.index=t,this.working_dir=n,t===`R`||n===`R`){let t=sa.exec(e)||[null,e,e];this.from=t[2]||``,this.path=t[1]||``}}}}});function ua(e){let[t,n]=e.split(I);return{from:n||t,to:t}}function Q(e,t,n){return[`${e}${t}`,n]}function da(e,...t){return t.map(t=>Q(e,t,(e,t)=>e.conflicted.push(t)))}function fa(e,t){let n=t.trim();switch(` `){case n.charAt(2):return r(n.charAt(0),n.charAt(1),n.slice(3));case n.charAt(1):return r(` `,n.charAt(0),n.slice(2));default:return}function r(t,n,r){let i=`${t}${n}`,a=ma.get(i);a&&a(e,r),i!==`##`&&i!==`!!`&&e.files.push(new ca(r,t,n))}}var pa,ma,ha,ga=S({"src/lib/responses/StatusSummary.ts"(){q(),la(),pa=class{constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},ma=new Map([Q(` `,`A`,(e,t)=>e.created.push(t)),Q(` `,`D`,(e,t)=>e.deleted.push(t)),Q(` `,`M`,(e,t)=>e.modified.push(t)),Q(`A`,` `,(e,t)=>{e.created.push(t),e.staged.push(t)}),Q(`A`,`M`,(e,t)=>{e.created.push(t),e.staged.push(t),e.modified.push(t)}),Q(`D`,` `,(e,t)=>{e.deleted.push(t),e.staged.push(t)}),Q(`M`,` `,(e,t)=>{e.modified.push(t),e.staged.push(t)}),Q(`M`,`M`,(e,t)=>{e.modified.push(t),e.staged.push(t)}),Q(`R`,` `,(e,t)=>{e.renamed.push(ua(t))}),Q(`R`,`M`,(e,t)=>{let n=ua(t);e.renamed.push(n),e.modified.push(n.to)}),Q(`!`,`!`,(e,t)=>{(e.ignored=e.ignored||[]).push(t)}),Q(`?`,`?`,(e,t)=>e.not_added.push(t)),...da(`A`,`A`,`U`),...da(`D`,`D`,`U`),...da(`U`,`A`,`D`,`U`),[`##`,(e,t)=>{let n=/ahead (\d+)/,r=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,a=/\.{3}(\S*)/,o=/\son\s(\S+?)(?=\.{3}|$)/,s=n.exec(t);e.ahead=s&&+s[1]||0,s=r.exec(t),e.behind=s&&+s[1]||0,s=i.exec(t),e.current=z(s?.[1],V,null),s=a.exec(t),e.tracking=z(s?.[1],V,null),s=o.exec(t),s&&(e.current=z(s?.[1],V,e.current)),e.detached=/\(no branch\)/.test(t)}]]),ha=function(e){let t=e.split(I),n=new pa;for(let e=0,r=t.length;e<r;){let r=t[e++].trim();r&&(r.charAt(0)===`R`&&(r+=I+(t[e++]||``)),fa(n,r))}return n}}});function _a(e){return{format:`utf-8`,commands:[`status`,`--porcelain`,`-b`,`-u`,`--null`,...e.filter(e=>!va.includes(e))],parser(e){return ha(e)}}}var va,ya=S({"src/lib/tasks/status.ts"(){ga(),va=[`--null`,`-z`]}});function ba(e=0,t=0,n=0,r=``,i=!0){return Object.defineProperty({major:e,minor:t,patch:n,agent:r,installed:i},`toString`,{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function xa(){return ba(0,0,0,``,!1)}function Sa(){return{version(){return this._runTask({commands:[`--version`],format:`utf-8`,parser:Ca,onError(e,t,n,r){if(e.exitCode===-2)return n(Buffer.from(wa));r(t)}})}}}function Ca(e){return e===wa?xa():K(ba(0,0,0,e),Ta,e)}var wa,Ta,Ea=S({"src/lib/tasks/version.ts"(){q(),wa=`installed=false`,Ta=[new H(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,n,r,i=``])=>{Object.assign(e,ba(N(t),N(n),N(r),i))}),new H(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,n,r,i=``])=>{Object.assign(e,ba(N(t),N(n),r,i))})]}});function Da(e,t,n,...r){return V(n)?t(n,z(r[0],V),W(arguments)):J(`git.${e}() requires a string 'repoPath'`)}function Oa(){return{clone(e,...t){return this._runTask(Da(`clone`,ka,z(e,V),...t),G(arguments))},mirror(e,...t){return this._runTask(Da(`mirror`,Aa,z(e,V),...t),G(arguments))}}}var ka,Aa,ja=S({"src/lib/tasks/clone.ts"(){X(),q(),ka=(e,t,n)=>{let r=[`clone`,...n];return V(e)&&r.push(se(e)),V(t)&&r.push(se(t)),Y(r)},Aa=(e,t,n)=>(A(n,`--mirror`),ka(e,t,n))}}),Ma={};C(Ma,{SimpleGitApi:()=>Na});var Na,Pa=S({"src/lib/simple-git-api.ts"(){hr(),_r(),br(),wr(),Ar(),Nn(),Mr(),Gn(),Pr(),Ur(),bi(),Yi(),ia(),oa(),ya(),X(),Ea(),q(),ja(),Na=class{constructor(e){this._executor=e}_runTask(e,t){let n=this._executor.chain(),r=n.push(e);return t&&pr(e,r,t),Object.create(this,{then:{value:r.then.bind(r)},catch:{value:r.catch.bind(r)},_executor:{value:n}})}add(e){return this._runTask(Y([`add`,...j(e)]),G(arguments))}cwd(e){let t=G(arguments);return typeof e==`string`?this._runTask(gr(e,this._executor),t):typeof e?.path==`string`?this._runTask(gr(e.path,e.root&&this._executor||void 0),t):this._runTask(J(`Git.cwd: workingDirectory must be supplied as a string`),t)}hashObject(e,t){return this._runTask(Nr(e,t===!0),G(arguments))}init(e){return this._runTask(Vr(e===!0,this._executor.cwd,W(arguments)),G(arguments))}merge(){return this._runTask(Ji(W(arguments)),G(arguments))}mergeFromTo(e,t){return V(e)&&V(t)?this._runTask(Ji([e,t,...W(arguments)]),G(arguments,!1)):this._runTask(J(`Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings`))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=ra({remote:z(arguments[0],V),branch:z(arguments[1],V)},W(arguments));return this._runTask(e,G(arguments))}stash(){return this._runTask(Y([`stash`,...W(arguments)]),G(arguments))}status(){return this._runTask(_a(W(arguments)),G(arguments))}},Object.assign(Na.prototype,yr(),Oa(),kr(),jn(),Sr(),jr(),Bn(),vi(),aa(),Sa())}}),Fa={};C(Fa,{Scheduler:()=>La});var Ia,La,Ra=S({"src/lib/runners/scheduler.ts"(){q(),rr(),Ia=(()=>{let e=0;return()=>{e++;let{promise:t,done:n}=(0,g.createDeferred)();return{promise:t,done:n,id:e}}})(),La=class{constructor(e=2){this.concurrency=e,this.logger=nr(``,`scheduler`),this.pending=[],this.running=[],this.logger(`Constructed, concurrency=%s`,e)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger(`Schedule attempt ignored, pending=%s running=%s concurrency=%s`,this.pending.length,this.running.length,this.concurrency);return}let e=A(this.running,this.pending.shift());this.logger(`Attempting id=%s`,e.id),e.done(()=>{this.logger(`Completing id=`,e.id),ut(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=A(this.pending,Ia());return this.logger(`Scheduling id=%s`,t),this.schedule(),e}}}}),za={};C(za,{applyPatchTask:()=>Ba});function Ba(e,t){return Y([`apply`,...t,...e])}var Va=S({"src/lib/tasks/apply-patch.ts"(){X()}});function Ha(e,t){return{branch:e,hash:t,success:!0}}function Ua(e){return{branch:e,hash:null,success:!1}}var Wa,Ga=S({"src/lib/responses/BranchDeleteSummary.ts"(){Wa=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function Ka(e,t){return t===1&&Ja.test(e)}var qa,Ja,Ya,Xa,Za=S({"src/lib/parsers/parse-branch-delete.ts"(){Ga(),q(),qa=/(\S+)\s+\(\S+\s([^)]+)\)/,Ja=/^error[^']+'([^']+)'/m,Ya=[new H(qa,(e,[t,n])=>{let r=Ha(t,n);e.all.push(r),e.branches[t]=r}),new H(Ja,(e,[t])=>{let n=Ua(t);e.errors.push(n),e.all.push(n),e.branches[t]=n})],Xa=(e,t)=>K(new Wa,Ya,[e,t])}}),Qa,$a=S({"src/lib/responses/BranchSummary.ts"(){Qa=class{constructor(){this.all=[],this.branches={},this.current=``,this.detached=!1}push(e,t,n,r,i){e===`*`&&(this.detached=t,this.current=n),this.all.push(n),this.branches[n]={current:e===`*`,linkedWorkTree:e===`+`,name:n,commit:r,label:i}}}}});function eo(e){return e?e.charAt(0):``}function to(e,t=!1){return K(new Qa,t?[ro]:no,e)}var no,ro,io=S({"src/lib/parsers/parse-branch.ts"(){$a(),q(),no=[new H(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,n,r,i])=>{e.push(eo(t),!0,n,r,i)}),new H(/^([*+]\s)?(\S+)\s+([a-z0-9]+)\s?(.*)$/s,(e,[t,n,r,i])=>{e.push(eo(t),!1,n,r,i)})],ro=new H(/^(\S+)$/s,(e,[t])=>{e.push(`*`,!1,t,``,``)})}}),ao={};C(ao,{branchLocalTask:()=>co,branchTask:()=>so,containsDeleteBranchCommand:()=>oo,deleteBranchTask:()=>uo,deleteBranchesTask:()=>lo});function oo(e){let t=[`-d`,`-D`,`--delete`];return e.some(e=>t.includes(e))}function so(e){let t=oo(e),n=e.includes(`--show-current`),r=[`branch`,...e];return r.length===1&&r.push(`-a`),r.includes(`-v`)||r.splice(1,0,`-v`),{format:`utf-8`,commands:r,parser(e,r){return t?Xa(e,r).all[0]:to(e,n)}}}function co(){return{format:`utf-8`,commands:[`branch`,`-v`],parser(e){return to(e)}}}function lo(e,t=!1){return{format:`utf-8`,commands:[`branch`,`-v`,t?`-D`:`-d`,...e],parser(e,t){return Xa(e,t)},onError({exitCode:e,stdOut:t},n,r,i){if(!Ka(String(n),e))return i(n);r(t)}}}function uo(e,t=!1){let n={format:`utf-8`,commands:[`branch`,`-v`,t?`-D`:`-d`,e],parser(t,n){return Xa(t,n).branches[e]},onError({exitCode:e,stdErr:t,stdOut:r},i,a,o){if(!Ka(String(i),e))return o(i);throw new $e(n.parser(F(r),F(t)),String(i))}};return n}var fo=S({"src/lib/tasks/branch.ts"(){D(),Za(),io(),q()}});function po(e){let t=e.trim().replace(/^["']|["']$/g,``);return t&&a(t)}var mo,ho=S({"src/lib/responses/CheckIgnore.ts"(){mo=e=>e.split(/\n/g).map(po).filter(Boolean)}}),go={};C(go,{checkIgnoreTask:()=>_o});function _o(e){return{commands:[`check-ignore`,...e],format:`utf-8`,parser:mo}}var vo=S({"src/lib/tasks/check-ignore.ts"(){ho()}});function yo(e,t){return K({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},bo,[e,t])}var bo,xo=S({"src/lib/parsers/parse-fetch.ts"(){q(),bo=[new H(/From (.+)$/,(e,[t])=>{e.remote=t}),new H(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.branches.push({name:t,tracking:n})}),new H(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(e,[t,n])=>{e.tags.push({name:t,tracking:n})}),new H(/- \[deleted]\s+\S+\s*-> (.+)$/,(e,[t])=>{e.deleted.push({tracking:t})}),new H(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(e,[t,n,r,i])=>{e.updated.push({name:r,tracking:i,to:n,from:t})})]}}),So={};C(So,{fetchTask:()=>wo});function Co(e){return/^--upload-pack(=|$)/.test(e)}function wo(e,t,n){let r=[`fetch`,...n];return e&&t&&r.push(e,t),r.find(Co)?J(`git.fetch: potential exploit argument blocked.`):{commands:r,format:`utf-8`,parser:yo}}var To=S({"src/lib/tasks/fetch.ts"(){xo(),X()}});function Eo(e){return K({moves:[]},Do,e)}var Do,Oo=S({"src/lib/parsers/parse-move.ts"(){q(),Do=[new H(/^Renaming (.+) to (.+)$/,(e,[t,n])=>{e.moves.push({from:t,to:n})})]}}),ko={};C(ko,{moveTask:()=>Ao});function Ao(e,t){return{commands:[`mv`,`-v`,...j(e),t],format:`utf-8`,parser:Eo}}var jo=S({"src/lib/tasks/move.ts"(){Oo(),q()}}),Mo={};C(Mo,{pullTask:()=>No});function No(e,t,n){let r=[`pull`,...n];return e&&t&&r.splice(1,0,e,t),{commands:r,format:`utf-8`,parser(e,t){return Hi(e,t)},onError(e,t,n,r){let i=Fi(F(e.stdOut),F(e.stdErr));if(i)return r(new $e(i));r(t)}}}var Po=S({"src/lib/tasks/pull.ts"(){D(),Ui(),q()}});function Fo(e){let t={};return Lo(e,([e])=>t[e]={name:e}),Object.values(t)}function Io(e){let t={};return Lo(e,([e,n,r])=>{Object.hasOwn(t,e)||(t[e]={name:e,refs:{fetch:``,push:``}}),r&&n&&(t[e].refs[r.replace(/[^a-z]/g,``)]=n)}),Object.values(t)}function Lo(e,t){st(e,e=>t(e.split(/\s+/)))}var Ro=S({"src/lib/responses/GetRemoteSummary.ts"(){q()}}),zo={};C(zo,{addRemoteTask:()=>Bo,getRemotesTask:()=>Vo,listRemotesTask:()=>Ho,remoteTask:()=>Uo,removeRemoteTask:()=>Wo});function Bo(e,t,n){return Y([`remote`,`add`,...n,e,t])}function Vo(e){let t=[`remote`];return e&&t.push(`-v`),{commands:t,format:`utf-8`,parser:e?Io:Fo}}function Ho(e){let t=[...e];return t[0]!==`ls-remote`&&t.unshift(`ls-remote`),Y(t)}function Uo(e){let t=[...e];return t[0]!==`remote`&&t.unshift(`remote`),Y(t)}function Wo(e){return Y([`remote`,`remove`,e])}var Go=S({"src/lib/tasks/remote.ts"(){Ro(),X()}}),Ko={};C(Ko,{stashListTask:()=>qo});function qo(e={},t){let n=gi(e),r=[`stash`,`list`,...n.commands,...t],i=ii(n.splitter,n.fields,Wr(r));return fi(r)||{commands:r,format:`utf-8`,parser:i}}var Jo=S({"src/lib/tasks/stash-list.ts"(){qr(),li(),pi(),bi()}}),Yo={};C(Yo,{addSubModuleTask:()=>Xo,initSubModuleTask:()=>Zo,subModuleTask:()=>Qo,updateSubModuleTask:()=>$o});function Xo(e,t){return Qo([`add`,e,t])}function Zo(e){return Qo([`init`,...e])}function Qo(e){let t=[...e];return t[0]!==`submodule`&&t.unshift(`submodule`),Y(t)}function $o(e){return Qo([`update`,...e])}var es=S({"src/lib/tasks/sub-module.ts"(){X()}});function ts(e,t){let n=Number.isNaN(e);return n===Number.isNaN(t)?n?ns(e,t):0:n?1:-1}function ns(e,t){return e===t?0:e>t?1:-1}function rs(e){return e.trim()}function is(e){return typeof e==`string`&&parseInt(e.replace(/^\D+/g,``),10)||0}var as,os,ss=S({"src/lib/responses/TagList.ts"(){as=class{constructor(e,t){this.all=e,this.latest=t}},os=function(e,t=!1){let n=e.split(`
|
|
9
|
-
`).map(rs).filter(Boolean);t||n.sort(function(e,t){let n=e.split(`.`),r=t.split(`.`);if(n.length===1||r.length===1)return ts(is(n[0]),is(r[0]));for(let e=0,t=Math.max(n.length,r.length);e<t;e++){let t=ns(is(n[e]),is(r[e]));if(t)return t}return 0});let r=t?n[0]:[...n].reverse().find(e=>e.indexOf(`.`)>=0);return new as(n,r)}}}),cs={};C(cs,{addAnnotatedTagTask:()=>ds,addTagTask:()=>us,tagListTask:()=>ls});function ls(e=[]){let t=e.some(e=>/^--sort=/.test(e));return{format:`utf-8`,commands:[`tag`,`-l`,...e],parser(e){return os(e,t)}}}function us(e){return{format:`utf-8`,commands:[`tag`,e],parser(){return{name:e}}}}function ds(e,t){return{format:`utf-8`,commands:[`tag`,`-a`,`-m`,t,e],parser(){return{name:e}}}}var fs=S({"src/lib/tasks/tag.ts"(){ss()}}),ps=Ze({"src/git.js"(e,t){var{GitExecutor:n}=(fr(),w(ur)),{SimpleGitApi:r}=(Pa(),w(Ma)),{Scheduler:i}=(Ra(),w(Fa)),{adhocExecTask:a,configurationErrorTask:o}=(X(),w(en)),{asArray:s,filterArray:c,filterPrimitives:l,filterString:u,filterStringOrStringArray:d,filterType:f,getTrailingOptions:p,trailingFunctionArgument:m,trailingOptionsArgument:ee}=(q(),w(Rt)),{applyPatchTask:te}=(Va(),w(za)),{branchTask:ne,branchLocalTask:re,deleteBranchesTask:ie,deleteBranchTask:ae}=(fo(),w(ao)),{checkIgnoreTask:oe}=(vo(),w(go)),{checkIsRepoTask:se}=(qt(),w(zt)),{cleanWithOptionsTask:h,isCleanOptionsArray:ce}=(bn(),w(sn)),{diffSummaryTask:le}=(pi(),w(ui)),{fetchTask:ue}=(To(),w(So)),{moveTask:g}=(jo(),w(ko)),{pullTask:de}=(Po(),w(Mo)),{pushTagsTask:fe}=(ia(),w(ta)),{addRemoteTask:pe,getRemotesTask:me,listRemotesTask:he,remoteTask:ge,removeRemoteTask:_}=(Go(),w(zo)),{getResetMode:_e,resetTask:ve}=(Qn(),w(Kn)),{stashListTask:ye}=(Jo(),w(Ko)),{addSubModuleTask:be,initSubModuleTask:xe,subModuleTask:Se,updateSubModuleTask:Ce}=(es(),w(Yo)),{addAnnotatedTagTask:we,addTagTask:Te,tagListTask:Ee}=(fs(),w(cs)),{straightThroughBufferTask:De,straightThroughStringTask:v}=(X(),w(en));function y(e,t){this._plugins=t,this._executor=new n(e.baseDir,new i(e.maxConcurrentProcesses),t),this._trimmed=e.trimmed}(y.prototype=Object.create(r.prototype)).constructor=y,y.prototype.customBinary=function(e){return this._plugins.reconfigure(`binary`,e),this},y.prototype.env=function(e,t){return arguments.length===1&&typeof e==`object`?this._executor.env=e:(this._executor.env=this._executor.env||{})[e]=t,this},y.prototype.stashList=function(e){return this._runTask(ye(ee(arguments)||{},c(e)&&e||[]),m(arguments))},y.prototype.mv=function(e,t){return this._runTask(g(e,t),m(arguments))},y.prototype.checkoutLatestTag=function(e){var t=this;return this.pull(function(){t.tags(function(n,r){t.checkout(r.latest,e)})})},y.prototype.pull=function(e,t,n,r){return this._runTask(de(f(e,u),f(t,u),p(arguments)),m(arguments))},y.prototype.fetch=function(e,t){return this._runTask(ue(f(e,u),f(t,u),p(arguments)),m(arguments))},y.prototype.silent=function(e){return this._runTask(a(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},y.prototype.tags=function(e,t){return this._runTask(Ee(p(arguments)),m(arguments))},y.prototype.rebase=function(){return this._runTask(v([`rebase`,...p(arguments)]),m(arguments))},y.prototype.reset=function(e){return this._runTask(ve(_e(e),p(arguments)),m(arguments))},y.prototype.revert=function(e){let t=m(arguments);return typeof e==`string`?this._runTask(v([`revert`,...p(arguments,0,!0),e]),t):this._runTask(o(`Commit must be a string`),t)},y.prototype.addTag=function(e){let t=typeof e==`string`?Te(e):o(`Git.addTag requires a tag name`);return this._runTask(t,m(arguments))},y.prototype.addAnnotatedTag=function(e,t){return this._runTask(we(e,t),m(arguments))},y.prototype.deleteLocalBranch=function(e,t,n){return this._runTask(ae(e,typeof t==`boolean`?t:!1),m(arguments))},y.prototype.deleteLocalBranches=function(e,t,n){return this._runTask(ie(e,typeof t==`boolean`?t:!1),m(arguments))},y.prototype.branch=function(e,t){return this._runTask(ne(p(arguments)),m(arguments))},y.prototype.branchLocal=function(e){return this._runTask(re(),m(arguments))},y.prototype.raw=function(e){let t=!Array.isArray(e),n=[].slice.call(t?arguments:e,0);for(let e=0;e<n.length&&t;e++)if(!l(n[e])){n.splice(e,n.length-e);break}n.push(...p(arguments,0,!0));var r=m(arguments);return n.length?this._runTask(v(n,this._trimmed),r):this._runTask(o(`Raw: must supply one or more command to execute`),r)},y.prototype.submoduleAdd=function(e,t,n){return this._runTask(be(e,t),m(arguments))},y.prototype.submoduleUpdate=function(e,t){return this._runTask(Ce(p(arguments,!0)),m(arguments))},y.prototype.submoduleInit=function(e,t){return this._runTask(xe(p(arguments,!0)),m(arguments))},y.prototype.subModule=function(e,t){return this._runTask(Se(p(arguments)),m(arguments))},y.prototype.listRemote=function(){return this._runTask(he(p(arguments)),m(arguments))},y.prototype.addRemote=function(e,t,n){return this._runTask(pe(e,t,p(arguments)),m(arguments))},y.prototype.removeRemote=function(e,t){return this._runTask(_(e),m(arguments))},y.prototype.getRemotes=function(e,t){return this._runTask(me(e===!0),m(arguments))},y.prototype.remote=function(e,t){return this._runTask(ge(p(arguments)),m(arguments))},y.prototype.tag=function(e,t){let n=p(arguments);return n[0]!==`tag`&&n.unshift(`tag`),this._runTask(v(n),m(arguments))},y.prototype.updateServerInfo=function(e){return this._runTask(v([`update-server-info`]),m(arguments))},y.prototype.pushTags=function(e,t){let n=fe({remote:f(e,u)},p(arguments));return this._runTask(n,m(arguments))},y.prototype.rm=function(e){return this._runTask(v([`rm`,`-f`,...s(e)]),m(arguments))},y.prototype.rmKeepLocal=function(e){return this._runTask(v([`rm`,`--cached`,...s(e)]),m(arguments))},y.prototype.catFile=function(e,t){return this._catFile(`utf-8`,arguments)},y.prototype.binaryCatFile=function(){return this._catFile(`buffer`,arguments)},y.prototype._catFile=function(e,t){var n=m(t),r=[`cat-file`],i=t[0];if(typeof i==`string`)return this._runTask(o(`Git.catFile: options must be supplied as an array of strings`),n);Array.isArray(i)&&r.push.apply(r,i);let a=e===`buffer`?De(r):v(r);return this._runTask(a,n)},y.prototype.diff=function(e,t){let n=u(e)?o(`git.diff: supplying options as a single string is no longer supported, switch to an array of strings`):v([`diff`,...p(arguments)]);return this._runTask(n,m(arguments))},y.prototype.diffSummary=function(){return this._runTask(le(p(arguments,1)),m(arguments))},y.prototype.applyPatch=function(e){let t=d(e)?te(s(e),p([].slice.call(arguments,1))):o(`git.applyPatch requires one or more string patches as the first argument`);return this._runTask(t,m(arguments))},y.prototype.revparse=function(){let e=[`rev-parse`,...p(arguments,!0)];return this._runTask(v(e,!0),m(arguments))},y.prototype.clean=function(e,t,n){let r=ce(e),i=r&&e.join(``)||f(e,u)||``,a=p([].slice.call(arguments,+!!r));return this._runTask(h(i,a),m(arguments))},y.prototype.exec=function(e){return this._runTask({commands:[],format:`utf-8`,parser(){typeof e==`function`&&e()}})},y.prototype.clearQueue=function(){return this._runTask(a(()=>console.warn(`simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.`)))},y.prototype.checkIgnore=function(e,t){return this._runTask(oe(s(f(e,d,[]))),m(arguments))},y.prototype.checkIsRepo=function(e,t){return this._runTask(se(f(e,u)),m(arguments))},t.exports=y}});E();var ms=class extends T{constructor(e,t){super(void 0,t),this.config=e}};E(),E();var $=class extends T{constructor(e,t,n){super(e,n),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};D(),tt(),qt(),bn(),Nn(),Ln(),Gn(),Qn();function hs(e){if(e)return[{type:`spawn.before`,action(t,n){e.aborted&&n.kill(new $(void 0,`abort`,`Abort already signaled`))}},{type:`spawn.after`,action(t,n){function r(){n.kill(new $(void 0,`abort`,`Abort signal received`))}e.addEventListener(`abort`,r),n.spawned.on(`close`,()=>e.removeEventListener(`abort`,r))}}]}function gs(e={}){return{type:`spawn.args`,action(t,{env:n}){for(let r of Ke(t,n))if(e[r.category]!==!0)throw new $(void 0,`unsafe`,r.message);return t}}}q();function _s(e){let t=P(e,`-c`);return{type:`spawn.args`,action(e){return[...t,...e]}}}q();var vs=(0,g.deferred)().promise;function ys({onClose:e=!0,onExit:t=50}={}){function n(){let n=-1,i={close:(0,g.deferred)(),closeTimeout:(0,g.deferred)(),exit:(0,g.deferred)(),exitTimeout:(0,g.deferred)()},a=Promise.race([e===!1?vs:i.closeTimeout.promise,t===!1?vs:i.exitTimeout.promise]);return r(e,i.close,i.closeTimeout),r(t,i.exit,i.exitTimeout),{close(e){n=e,i.close.done()},exit(e){n=e,i.exit.done()},get exitCode(){return n},result:a}}function r(e,t,n){e!==!1&&(e===!0?t.promise:t.promise.then(()=>pt(e))).then(n.done)}return{type:`spawn.after`,async action(e,{spawned:t,close:r}){let i=n(),a=!0,o=()=>void(a=!1);t.stdout?.on(`data`,o),t.stderr?.on(`data`,o),t.on(`error`,o),t.on(`close`,e=>i.close(e)),t.on(`exit`,e=>i.exit(e));try{await i.result,a&&await pt(50),r(i.exitCode)}catch(e){r(i.exitCode,e)}}}}q();var bs=`Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings`,xs=`Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option`;function Ss(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(e)}function Cs(e,t){if(e.length<1||e.length>2)throw new $(void 0,`binary`,bs);if(e.some(Ss))if(t)console.warn(xs);else throw new $(void 0,`binary`,xs);let[n,r]=e;return{binary:n,prefix:r}}function ws(e,t=[`git`],n=!1){let r=Cs(j(t),n);e.on(`binary`,e=>{r=Cs(j(e),n)}),e.append(`spawn.binary`,()=>r.binary),e.append(`spawn.args`,e=>r.prefix?[r.prefix,...e]:e)}E();function Ts(e){return!!(e.exitCode&&e.stdErr.length)}function Es(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Ds(e=!1,t=Ts,n=Es){return(r,i)=>!e&&r||!t(i)?r:n(i)}function Os(e){return{type:`task.error`,action(t,n){let r=e(t.error,{stdErr:n.stdErr,stdOut:n.stdOut,exitCode:n.exitCode});return Buffer.isBuffer(r)?{error:new T(void 0,r.toString(`utf-8`))}:{error:r}}}}q();var ks=class{constructor(){this.plugins=new Set,this.events=new u}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let n=A(this.plugins,{type:e,action:t});return()=>this.plugins.delete(n)}add(e){let t=[];return j(e).forEach(e=>e&&this.plugins.add(A(t,e))),()=>{t.forEach(e=>this.plugins.delete(e))}}exec(e,t,n){let r=t,i=Object.freeze(Object.create(n));for(let t of this.plugins)t.type===e&&(r=t.action(r,i));return r}};q();function As(e){let t=`--progress`,n=[`checkout`,`clone`,`fetch`,`pull`,`push`];return[{type:`spawn.args`,action(e,r){return n.includes(r.method)?lt(e,t):e}},{type:`spawn.after`,action(n,r){r.commands.includes(t)&&r.spawned.stderr?.on(`data`,t=>{let n=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(t.toString(`utf8`));n&&e({method:r.method,stage:js(n[1]),progress:N(n[2]),processed:N(n[3]),total:N(n[4])})})}}]}function js(e){return String(e.toLowerCase().split(` `,1))||`unknown`}q();function Ms(e){let t=ft(e,[`uid`,`gid`]);return{type:`spawn.options`,action(e){return{...t,...e}}}}function Ns({block:e,stdErr:t=!0,stdOut:n=!0}){if(e>0)return{type:`spawn.after`,action(r,i){let a;function o(){a&&clearTimeout(a),a=setTimeout(c,e)}function s(){i.spawned.stdout?.off(`data`,o),i.spawned.stderr?.off(`data`,o),i.spawned.off(`exit`,s),i.spawned.off(`close`,s),a&&clearTimeout(a)}function c(){s(),i.kill(new $(void 0,`timeout`,`block timeout reached`))}n&&i.spawned.stdout?.on(`data`,o),t&&i.spawned.stderr?.on(`data`,o),i.spawned.on(`exit`,s),i.spawned.on(`close`,s),o()}}}function Ps(){return{type:`spawn.args`,action(e){let t=[],n;function r(e){(n||=[]).push(...e)}for(let n=0;n<e.length;n++){let i=e[n];if(h(i)){r(ce(i));continue}if(i===`--`){r(e.slice(n+1).flatMap(e=>h(e)&&ce(e)||e));break}t.push(i)}return n?[...t,`--`,...n.map(String)]:t}}}q();var Fs=ps();function Is(e,t){let n=new ks,r=kt(e&&(typeof e==`string`?{baseDir:e}:e)||{},t);if(!ct(r.baseDir))throw new ms(r,`Cannot use simple-git on a directory that does not exist`);return Array.isArray(r.config)&&n.add(_s(r.config)),n.add(gs(r.unsafe)),n.add(ys(r.completion)),r.abort&&n.add(hs(r.abort)),r.progress&&n.add(As(r.progress)),r.timeout&&n.add(Ns(r.timeout)),r.spawnOptions&&n.add(Ms(r.spawnOptions)),n.add(Ps()),n.add(Os(Ds(!0))),r.errors&&n.add(Os(r.errors)),ws(n,r.binary,r.unsafe?.allowUnsafeCustomBinary),new Fs(r,n)}D();var Ls=Is,Rs=Is;const zs=new class{_tail=Promise.resolve();enqueue(e){let t=this._tail.then(()=>e());return this._tail=t.catch(()=>void 0),t}};function Bs(e){return zs.enqueue(e)}function Vs(e){try{return s(e)&&c(e).isDirectory()}catch{return!1}}const Hs=[`HOME`,`USERPROFILE`,`HOMEDRIVE`,`HOMEPATH`,`APPDATA`,`LOCALAPPDATA`,`ProgramData`,`ALLUSERSPROFILE`,`SystemRoot`,`WINDIR`,`windir`,`ComSpec`,`TEMP`,`TMP`,`USERNAME`,`USERDOMAIN`,`PATHEXT`,`SSH_AUTH_SOCK`,`ELECTRON_RUN_AS_NODE`];function Us(e){let t={LANG:`C`,LC_ALL:`C`,GIT_TERMINAL_PROMPT:`0`,GIT_MERGE_AUTOEDIT:`no`};t.PATH=r(process.env.PATH??process.env.Path,{platform:process.platform,homeDir:l(),isDir:Vs,delimiter:i});for(let e of Hs){let n=process.env[e];n!==void 0&&(t[e]=n)}return e&&(t.OK_GH_TOKEN=e.token,t.OK_GH_TOKEN_HOST=e.host),t}function Ws(e,t){let n={...e.env};for(let[e,r]of Object.entries(t))r!==void 0&&(n[e]=r);return e.git.env(n)}function Gs(e,t={}){let{credentialArgs:n=[],gitIndexFile:r,ghToken:i,timeoutMs:a}=t,s=Us(i);return r&&(s.GIT_INDEX_FILE=o(e,r)),{git:Rs({baseDir:e,config:[`commit.gpgsign=false`,`core.autocrlf=false`,`credential.interactive=false`,...n.length>=2?[n[1]]:[]],unsafe:{allowUnsafeCredentialHelper:!0},...a===void 0?{}:{timeout:{block:a}}}).env(s),projectDir:e,credentialArgs:n,env:s}}export{Rs as a,Bs as i,Us as n,Ls as o,Gs as r,re as s,Ws as t};
|
|
10
|
-
//# sourceMappingURL=git-handle-
|
|
9
|
+
`).map(rs).filter(Boolean);t||n.sort(function(e,t){let n=e.split(`.`),r=t.split(`.`);if(n.length===1||r.length===1)return ts(is(n[0]),is(r[0]));for(let e=0,t=Math.max(n.length,r.length);e<t;e++){let t=ns(is(n[e]),is(r[e]));if(t)return t}return 0});let r=t?n[0]:[...n].reverse().find(e=>e.indexOf(`.`)>=0);return new as(n,r)}}}),cs={};C(cs,{addAnnotatedTagTask:()=>ds,addTagTask:()=>us,tagListTask:()=>ls});function ls(e=[]){let t=e.some(e=>/^--sort=/.test(e));return{format:`utf-8`,commands:[`tag`,`-l`,...e],parser(e){return os(e,t)}}}function us(e){return{format:`utf-8`,commands:[`tag`,e],parser(){return{name:e}}}}function ds(e,t){return{format:`utf-8`,commands:[`tag`,`-a`,`-m`,t,e],parser(){return{name:e}}}}var fs=S({"src/lib/tasks/tag.ts"(){ss()}}),ps=Ze({"src/git.js"(e,t){var{GitExecutor:n}=(fr(),w(ur)),{SimpleGitApi:r}=(Pa(),w(Ma)),{Scheduler:i}=(Ra(),w(Fa)),{adhocExecTask:a,configurationErrorTask:o}=(X(),w(en)),{asArray:s,filterArray:c,filterPrimitives:l,filterString:u,filterStringOrStringArray:d,filterType:f,getTrailingOptions:p,trailingFunctionArgument:m,trailingOptionsArgument:ee}=(q(),w(Rt)),{applyPatchTask:te}=(Va(),w(za)),{branchTask:ne,branchLocalTask:re,deleteBranchesTask:ie,deleteBranchTask:ae}=(fo(),w(ao)),{checkIgnoreTask:oe}=(vo(),w(go)),{checkIsRepoTask:se}=(qt(),w(zt)),{cleanWithOptionsTask:h,isCleanOptionsArray:ce}=(bn(),w(sn)),{diffSummaryTask:le}=(pi(),w(ui)),{fetchTask:ue}=(To(),w(So)),{moveTask:g}=(jo(),w(ko)),{pullTask:de}=(Po(),w(Mo)),{pushTagsTask:fe}=(ia(),w(ta)),{addRemoteTask:pe,getRemotesTask:me,listRemotesTask:he,remoteTask:ge,removeRemoteTask:_}=(Go(),w(zo)),{getResetMode:_e,resetTask:ve}=(Qn(),w(Kn)),{stashListTask:ye}=(Jo(),w(Ko)),{addSubModuleTask:be,initSubModuleTask:xe,subModuleTask:Se,updateSubModuleTask:Ce}=(es(),w(Yo)),{addAnnotatedTagTask:we,addTagTask:Te,tagListTask:Ee}=(fs(),w(cs)),{straightThroughBufferTask:De,straightThroughStringTask:v}=(X(),w(en));function y(e,t){this._plugins=t,this._executor=new n(e.baseDir,new i(e.maxConcurrentProcesses),t),this._trimmed=e.trimmed}(y.prototype=Object.create(r.prototype)).constructor=y,y.prototype.customBinary=function(e){return this._plugins.reconfigure(`binary`,e),this},y.prototype.env=function(e,t){return arguments.length===1&&typeof e==`object`?this._executor.env=e:(this._executor.env=this._executor.env||{})[e]=t,this},y.prototype.stashList=function(e){return this._runTask(ye(ee(arguments)||{},c(e)&&e||[]),m(arguments))},y.prototype.mv=function(e,t){return this._runTask(g(e,t),m(arguments))},y.prototype.checkoutLatestTag=function(e){var t=this;return this.pull(function(){t.tags(function(n,r){t.checkout(r.latest,e)})})},y.prototype.pull=function(e,t,n,r){return this._runTask(de(f(e,u),f(t,u),p(arguments)),m(arguments))},y.prototype.fetch=function(e,t){return this._runTask(ue(f(e,u),f(t,u),p(arguments)),m(arguments))},y.prototype.silent=function(e){return this._runTask(a(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},y.prototype.tags=function(e,t){return this._runTask(Ee(p(arguments)),m(arguments))},y.prototype.rebase=function(){return this._runTask(v([`rebase`,...p(arguments)]),m(arguments))},y.prototype.reset=function(e){return this._runTask(ve(_e(e),p(arguments)),m(arguments))},y.prototype.revert=function(e){let t=m(arguments);return typeof e==`string`?this._runTask(v([`revert`,...p(arguments,0,!0),e]),t):this._runTask(o(`Commit must be a string`),t)},y.prototype.addTag=function(e){let t=typeof e==`string`?Te(e):o(`Git.addTag requires a tag name`);return this._runTask(t,m(arguments))},y.prototype.addAnnotatedTag=function(e,t){return this._runTask(we(e,t),m(arguments))},y.prototype.deleteLocalBranch=function(e,t,n){return this._runTask(ae(e,typeof t==`boolean`?t:!1),m(arguments))},y.prototype.deleteLocalBranches=function(e,t,n){return this._runTask(ie(e,typeof t==`boolean`?t:!1),m(arguments))},y.prototype.branch=function(e,t){return this._runTask(ne(p(arguments)),m(arguments))},y.prototype.branchLocal=function(e){return this._runTask(re(),m(arguments))},y.prototype.raw=function(e){let t=!Array.isArray(e),n=[].slice.call(t?arguments:e,0);for(let e=0;e<n.length&&t;e++)if(!l(n[e])){n.splice(e,n.length-e);break}n.push(...p(arguments,0,!0));var r=m(arguments);return n.length?this._runTask(v(n,this._trimmed),r):this._runTask(o(`Raw: must supply one or more command to execute`),r)},y.prototype.submoduleAdd=function(e,t,n){return this._runTask(be(e,t),m(arguments))},y.prototype.submoduleUpdate=function(e,t){return this._runTask(Ce(p(arguments,!0)),m(arguments))},y.prototype.submoduleInit=function(e,t){return this._runTask(xe(p(arguments,!0)),m(arguments))},y.prototype.subModule=function(e,t){return this._runTask(Se(p(arguments)),m(arguments))},y.prototype.listRemote=function(){return this._runTask(he(p(arguments)),m(arguments))},y.prototype.addRemote=function(e,t,n){return this._runTask(pe(e,t,p(arguments)),m(arguments))},y.prototype.removeRemote=function(e,t){return this._runTask(_(e),m(arguments))},y.prototype.getRemotes=function(e,t){return this._runTask(me(e===!0),m(arguments))},y.prototype.remote=function(e,t){return this._runTask(ge(p(arguments)),m(arguments))},y.prototype.tag=function(e,t){let n=p(arguments);return n[0]!==`tag`&&n.unshift(`tag`),this._runTask(v(n),m(arguments))},y.prototype.updateServerInfo=function(e){return this._runTask(v([`update-server-info`]),m(arguments))},y.prototype.pushTags=function(e,t){let n=fe({remote:f(e,u)},p(arguments));return this._runTask(n,m(arguments))},y.prototype.rm=function(e){return this._runTask(v([`rm`,`-f`,...s(e)]),m(arguments))},y.prototype.rmKeepLocal=function(e){return this._runTask(v([`rm`,`--cached`,...s(e)]),m(arguments))},y.prototype.catFile=function(e,t){return this._catFile(`utf-8`,arguments)},y.prototype.binaryCatFile=function(){return this._catFile(`buffer`,arguments)},y.prototype._catFile=function(e,t){var n=m(t),r=[`cat-file`],i=t[0];if(typeof i==`string`)return this._runTask(o(`Git.catFile: options must be supplied as an array of strings`),n);Array.isArray(i)&&r.push.apply(r,i);let a=e===`buffer`?De(r):v(r);return this._runTask(a,n)},y.prototype.diff=function(e,t){let n=u(e)?o(`git.diff: supplying options as a single string is no longer supported, switch to an array of strings`):v([`diff`,...p(arguments)]);return this._runTask(n,m(arguments))},y.prototype.diffSummary=function(){return this._runTask(le(p(arguments,1)),m(arguments))},y.prototype.applyPatch=function(e){let t=d(e)?te(s(e),p([].slice.call(arguments,1))):o(`git.applyPatch requires one or more string patches as the first argument`);return this._runTask(t,m(arguments))},y.prototype.revparse=function(){let e=[`rev-parse`,...p(arguments,!0)];return this._runTask(v(e,!0),m(arguments))},y.prototype.clean=function(e,t,n){let r=ce(e),i=r&&e.join(``)||f(e,u)||``,a=p([].slice.call(arguments,+!!r));return this._runTask(h(i,a),m(arguments))},y.prototype.exec=function(e){return this._runTask({commands:[],format:`utf-8`,parser(){typeof e==`function`&&e()}})},y.prototype.clearQueue=function(){return this._runTask(a(()=>console.warn(`simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead.`)))},y.prototype.checkIgnore=function(e,t){return this._runTask(oe(s(f(e,d,[]))),m(arguments))},y.prototype.checkIsRepo=function(e,t){return this._runTask(se(f(e,u)),m(arguments))},t.exports=y}});E();var ms=class extends T{constructor(e,t){super(void 0,t),this.config=e}};E(),E();var $=class extends T{constructor(e,t,n){super(e,n),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};D(),tt(),qt(),bn(),Nn(),Ln(),Gn(),Qn();function hs(e){if(e)return[{type:`spawn.before`,action(t,n){e.aborted&&n.kill(new $(void 0,`abort`,`Abort already signaled`))}},{type:`spawn.after`,action(t,n){function r(){n.kill(new $(void 0,`abort`,`Abort signal received`))}e.addEventListener(`abort`,r),n.spawned.on(`close`,()=>e.removeEventListener(`abort`,r))}}]}function gs(e={}){return{type:`spawn.args`,action(t,{env:n}){for(let r of Ke(t,n))if(e[r.category]!==!0)throw new $(void 0,`unsafe`,r.message);return t}}}q();function _s(e){let t=P(e,`-c`);return{type:`spawn.args`,action(e){return[...t,...e]}}}q();var vs=(0,g.deferred)().promise;function ys({onClose:e=!0,onExit:t=50}={}){function n(){let n=-1,i={close:(0,g.deferred)(),closeTimeout:(0,g.deferred)(),exit:(0,g.deferred)(),exitTimeout:(0,g.deferred)()},a=Promise.race([e===!1?vs:i.closeTimeout.promise,t===!1?vs:i.exitTimeout.promise]);return r(e,i.close,i.closeTimeout),r(t,i.exit,i.exitTimeout),{close(e){n=e,i.close.done()},exit(e){n=e,i.exit.done()},get exitCode(){return n},result:a}}function r(e,t,n){e!==!1&&(e===!0?t.promise:t.promise.then(()=>pt(e))).then(n.done)}return{type:`spawn.after`,async action(e,{spawned:t,close:r}){let i=n(),a=!0,o=()=>void(a=!1);t.stdout?.on(`data`,o),t.stderr?.on(`data`,o),t.on(`error`,o),t.on(`close`,e=>i.close(e)),t.on(`exit`,e=>i.exit(e));try{await i.result,a&&await pt(50),r(i.exitCode)}catch(e){r(i.exitCode,e)}}}}q();var bs=`Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings`,xs=`Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option`;function Ss(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(e)}function Cs(e,t){if(e.length<1||e.length>2)throw new $(void 0,`binary`,bs);if(e.some(Ss))if(t)console.warn(xs);else throw new $(void 0,`binary`,xs);let[n,r]=e;return{binary:n,prefix:r}}function ws(e,t=[`git`],n=!1){let r=Cs(j(t),n);e.on(`binary`,e=>{r=Cs(j(e),n)}),e.append(`spawn.binary`,()=>r.binary),e.append(`spawn.args`,e=>r.prefix?[r.prefix,...e]:e)}E();function Ts(e){return!!(e.exitCode&&e.stdErr.length)}function Es(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function Ds(e=!1,t=Ts,n=Es){return(r,i)=>!e&&r||!t(i)?r:n(i)}function Os(e){return{type:`task.error`,action(t,n){let r=e(t.error,{stdErr:n.stdErr,stdOut:n.stdOut,exitCode:n.exitCode});return Buffer.isBuffer(r)?{error:new T(void 0,r.toString(`utf-8`))}:{error:r}}}}q();var ks=class{constructor(){this.plugins=new Set,this.events=new u}on(e,t){this.events.on(e,t)}reconfigure(e,t){this.events.emit(e,t)}append(e,t){let n=A(this.plugins,{type:e,action:t});return()=>this.plugins.delete(n)}add(e){let t=[];return j(e).forEach(e=>e&&this.plugins.add(A(t,e))),()=>{t.forEach(e=>this.plugins.delete(e))}}exec(e,t,n){let r=t,i=Object.freeze(Object.create(n));for(let t of this.plugins)t.type===e&&(r=t.action(r,i));return r}};q();function As(e){let t=`--progress`,n=[`checkout`,`clone`,`fetch`,`pull`,`push`];return[{type:`spawn.args`,action(e,r){return n.includes(r.method)?lt(e,t):e}},{type:`spawn.after`,action(n,r){r.commands.includes(t)&&r.spawned.stderr?.on(`data`,t=>{let n=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(t.toString(`utf8`));n&&e({method:r.method,stage:js(n[1]),progress:N(n[2]),processed:N(n[3]),total:N(n[4])})})}}]}function js(e){return String(e.toLowerCase().split(` `,1))||`unknown`}q();function Ms(e){let t=ft(e,[`uid`,`gid`]);return{type:`spawn.options`,action(e){return{...t,...e}}}}function Ns({block:e,stdErr:t=!0,stdOut:n=!0}){if(e>0)return{type:`spawn.after`,action(r,i){let a;function o(){a&&clearTimeout(a),a=setTimeout(c,e)}function s(){i.spawned.stdout?.off(`data`,o),i.spawned.stderr?.off(`data`,o),i.spawned.off(`exit`,s),i.spawned.off(`close`,s),a&&clearTimeout(a)}function c(){s(),i.kill(new $(void 0,`timeout`,`block timeout reached`))}n&&i.spawned.stdout?.on(`data`,o),t&&i.spawned.stderr?.on(`data`,o),i.spawned.on(`exit`,s),i.spawned.on(`close`,s),o()}}}function Ps(){return{type:`spawn.args`,action(e){let t=[],n;function r(e){(n||=[]).push(...e)}for(let n=0;n<e.length;n++){let i=e[n];if(h(i)){r(ce(i));continue}if(i===`--`){r(e.slice(n+1).flatMap(e=>h(e)&&ce(e)||e));break}t.push(i)}return n?[...t,`--`,...n.map(String)]:t}}}q();var Fs=ps();function Is(e,t){let n=new ks,r=kt(e&&(typeof e==`string`?{baseDir:e}:e)||{},t);if(!ct(r.baseDir))throw new ms(r,`Cannot use simple-git on a directory that does not exist`);return Array.isArray(r.config)&&n.add(_s(r.config)),n.add(gs(r.unsafe)),n.add(ys(r.completion)),r.abort&&n.add(hs(r.abort)),r.progress&&n.add(As(r.progress)),r.timeout&&n.add(Ns(r.timeout)),r.spawnOptions&&n.add(Ms(r.spawnOptions)),n.add(Ps()),n.add(Os(Ds(!0))),r.errors&&n.add(Os(r.errors)),ws(n,r.binary,r.unsafe?.allowUnsafeCustomBinary),new Fs(r,n)}D();var Ls=Is,Rs=Is;function zs(e){return e===``?`''`:/^[\w.\-/]+$/.test(e)?e:`'${e.replace(/'/g,`'\\''`)}'`}const Bs=new class{_tail=Promise.resolve();enqueue(e){let t=this._tail.then(()=>e());return this._tail=t.catch(()=>void 0),t}};function Vs(e){return Bs.enqueue(e)}function Hs(e){try{return s(e)&&c(e).isDirectory()}catch{return!1}}const Us=[`HOME`,`USERPROFILE`,`HOMEDRIVE`,`HOMEPATH`,`APPDATA`,`LOCALAPPDATA`,`ProgramData`,`ALLUSERSPROFILE`,`SystemRoot`,`WINDIR`,`windir`,`ComSpec`,`TEMP`,`TMP`,`USERNAME`,`USERDOMAIN`,`PATHEXT`,`SSH_AUTH_SOCK`,`ELECTRON_RUN_AS_NODE`];function Ws(e){let t={LANG:`C`,LC_ALL:`C`,GIT_TERMINAL_PROMPT:`0`,GIT_MERGE_AUTOEDIT:`no`};t.PATH=r(process.env.PATH??process.env.Path,{platform:process.platform,homeDir:l(),isDir:Hs,delimiter:i});for(let e of Us){let n=process.env[e];n!==void 0&&(t[e]=n)}return e&&(t.OK_GH_TOKEN=e.token,t.OK_GH_TOKEN_HOST=e.host),t}function Gs(e,t){let n={...e.env};for(let[e,r]of Object.entries(t))r!==void 0&&(n[e]=r);return e.git.env(n)}function Ks(e,t){let{credentialConfig:n,gitIndexFile:r,ghToken:i,timeoutMs:a}=t,s=Ws(i);return r&&(s.GIT_INDEX_FILE=o(e,r)),{git:Rs({baseDir:e,config:[`commit.gpgsign=false`,`core.autocrlf=false`,`credential.interactive=false`,...n],unsafe:{allowUnsafeCredentialHelper:!0},...a===void 0?{}:{timeout:{block:a}}}).env(s),projectDir:e,credentialConfig:n,env:s}}function qs(e,t){let n=`credential.helper=!${(e&&e.length>0?e:[`open-knowledge`]).map(zs).join(` `)} auth git-credential`;return t.resetAmbient?[`credential.helper=`,n]:[n]}export{Vs as a,Ls as c,Ks as i,re as l,Ws as n,zs as o,qs as r,Rs as s,Gs as t};
|
|
10
|
+
//# sourceMappingURL=git-handle-KDk0khh5.mjs.map
|
package/dist/index.mjs
CHANGED
|
@@ -178,7 +178,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
178
178
|
|
|
179
179
|
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Xi(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:$i(t,`input`,e.processors),output:$i(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function Zi(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return Zi(r.element,n);if(r.type===`set`)return Zi(r.valueType,n);if(r.type===`lazy`)return Zi(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return Zi(r.innerType,n);if(r.type===`intersection`)return Zi(r.left,n)||Zi(r.right,n);if(r.type===`record`||r.type===`map`)return Zi(r.keyType,n)||Zi(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:Zi(r.in,n)||Zi(r.out,n);if(r.type===`object`){for(let e in r.shape)if(Zi(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(Zi(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(Zi(e,n))return!0;return!!(r.rest&&Zi(r.rest,n))}return!1}const Qi=(e,t={})=>n=>{let r=qi({...n,processors:t});return Ji(e,r),Yi(r,e),Xi(r,e)},$i=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=qi({...i??{},target:a,io:t,processors:n});return Ji(e,o),Yi(o,e),Xi(o,e)},ea={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ta=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ea[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},na=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},ra=(e,t,n,r)=>{n.type=`boolean`},ia=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},aa=(e,t,n,r)=>{n.not={}},oa=(e,t,n,r)=>{let i=e._zod.def,a=sn(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},sa=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ca=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},la=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},ua=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=Ji(a.element,t,{...r,path:[...r.path,`items`]})},da=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=Ji(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=Ji(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},fa=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>Ji(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},pa=(e,t,n,r)=>{let i=e._zod.def,a=Ji(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=Ji(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},ma=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=Ji(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=Ji(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=Ji(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},ha=(e,t,n,r)=>{let i=e._zod.def,a=Ji(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ga=(e,t,n,r)=>{let i=e._zod.def;Ji(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_a=(e,t,n,r)=>{let i=e._zod.def;Ji(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},va=(e,t,n,r)=>{let i=e._zod.def;Ji(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},ya=(e,t,n,r)=>{let i=e._zod.def;Ji(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},ba=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;Ji(o,t,r);let s=t.seen.get(e);s.ref=o},xa=(e,t,n,r)=>{let i=e._zod.def;Ji(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Sa=(e,t,n,r)=>{let i=e._zod.def;Ji(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ca=(e,t,n,r)=>{let i=e._zod.innerType;Ji(i,t,r);let a=t.seen.get(e);a.ref=i},wa=P(`ZodISODateTime`,(e,t)=>{hte.init(e,t),Ya.init(e,t)});function Ta(e){return fi(wa,e)}const Ea=P(`ZodISODate`,(e,t)=>{gte.init(e,t),Ya.init(e,t)});function Da(e){return pi(Ea,e)}const Oa=P(`ZodISOTime`,(e,t)=>{_te.init(e,t),Ya.init(e,t)});function ka(e){return mi(Oa,e)}const Aa=P(`ZodISODuration`,(e,t)=>{vte.init(e,t),Ya.init(e,t)});function ja(e){return hi(Aa,e)}const Ma=P(`ZodError`,(e,t)=>{Mn.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Fn(e,t)},flatten:{value:t=>Pn(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,cn,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,cn,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Na=In(Ma),Pa=Ln(Ma),Fa=Rn(Ma),Ia=Bn(Ma),La=Hn(Ma),Ra=Un(Ma),za=Wn(Ma),Ba=Gn(Ma),Va=Kn(Ma),Ha=qn(Ma),Ua=Jn(Ma),Wa=Yn(Ma),Ga=new WeakMap;function Ka(e,t,n){let r=Object.getPrototypeOf(e),i=Ga.get(r);if(i||(i=new Set,Ga.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}const qa=P(`ZodType`,(e,t)=>(mr.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:$i(e,`input`),output:$i(e,`output`)}}),e.toJSONSchema=Qi(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Na(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Fa(e,t,n),e.parseAsync=async(t,n)=>Pa(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Ia(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>La(e,t,n),e.decode=(t,n)=>Ra(e,t,n),e.encodeAsync=async(t,n)=>za(e,t,n),e.decodeAsync=async(t,n)=>Ba(e,t,n),e.safeEncode=(t,n)=>Va(e,t,n),e.safeDecode=(t,n)=>Ha(e,t,n),e.safeEncodeAsync=async(t,n)=>Ua(e,t,n),e.safeDecodeAsync=async(t,n)=>Wa(e,t,n),Ka(e,`ZodType`,{check(...e){let t=this.def;return this.clone(gn(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Cn(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Rne(e,t))},superRefine(e,t){return this.check(zne(e,t))},overwrite(e){return this.check(Ii(e))},optional(){return mo(this)},exactOptional(){return Tne(this)},nullable(){return ho(this)},nullish(){return mo(ho(this))},nonoptional(e){return jne(this,e)},array(){return z(this)},or(e){return oo([this,e])},and(e){return co(this,e)},transform(e){return vo(this,fo(e))},default(e){return One(this,e)},prefault(e){return Ane(this,e)},catch(e){return Nne(this,e)},pipe(e){return vo(this,e)},readonly(){return Ine(this)},describe(e){let t=this.clone();return Hr.add(t,{description:e}),t},meta(...e){if(e.length===0)return Hr.get(this);let t=this.clone();return Hr.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return Hr.get(e)?.description},configurable:!0}),e)),Ja=P(`_ZodString`,(e,t)=>{hr.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ta(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Ka(e,`_ZodString`,{regex(...e){return this.check(Ai(...e))},includes(...e){return this.check(Ni(...e))},startsWith(...e){return this.check(Pi(...e))},endsWith(...e){return this.check(Fi(...e))},min(...e){return this.check(Oi(...e))},max(...e){return this.check(Di(...e))},length(...e){return this.check(ki(...e))},nonempty(...e){return this.check(Oi(1,...e))},lowercase(e){return this.check(ji(e))},uppercase(e){return this.check(Mi(e))},trim(){return this.check(Ri())},normalize(...e){return this.check(Li(...e))},toLowerCase(){return this.check(zi())},toUpperCase(){return this.check(Bi())},slugify(){return this.check(Vi())}})}),Yte=P(`ZodString`,(e,t)=>{hr.init(e,t),Ja.init(e,t),e.email=t=>e.check(Wr(Xte,t)),e.url=t=>e.check(Xr(Qa,t)),e.jwt=t=>e.check(di(fne,t)),e.emoji=t=>e.check(Zr(Qte,t)),e.guid=t=>e.check(Gr(Xa,t)),e.uuid=t=>e.check(Kr(Za,t)),e.uuidv4=t=>e.check(qr(Za,t)),e.uuidv6=t=>e.check(Jr(Za,t)),e.uuidv7=t=>e.check(Yr(Za,t)),e.nanoid=t=>e.check(Qr($te,t)),e.guid=t=>e.check(Gr(Xa,t)),e.cuid=t=>e.check($r(ene,t)),e.cuid2=t=>e.check(ei(tne,t)),e.ulid=t=>e.check(ti(nne,t)),e.base64=t=>e.check(ci(lne,t)),e.base64url=t=>e.check(li(une,t)),e.xid=t=>e.check(ni(rne,t)),e.ksuid=t=>e.check(ri(ine,t)),e.ipv4=t=>e.check(ii(ane,t)),e.ipv6=t=>e.check(ai(one,t)),e.cidrv4=t=>e.check(oi(sne,t)),e.cidrv6=t=>e.check(si(cne,t)),e.e164=t=>e.check(ui(dne,t)),e.datetime=t=>e.check(Ta(t)),e.date=t=>e.check(Da(t)),e.time=t=>e.check(ka(t)),e.duration=t=>e.check(ja(t))});function F(e){return Ur(Yte,e)}const Ya=P(`ZodStringFormat`,(e,t)=>{gr.init(e,t),Ja.init(e,t)}),Xte=P(`ZodEmail`,(e,t)=>{ote.init(e,t),Ya.init(e,t)}),Xa=P(`ZodGUID`,(e,t)=>{ite.init(e,t),Ya.init(e,t)}),Za=P(`ZodUUID`,(e,t)=>{ate.init(e,t),Ya.init(e,t)});function Zte(e){return Kr(Za,e)}const Qa=P(`ZodURL`,(e,t)=>{ste.init(e,t),Ya.init(e,t)});function $a(e){return Xr(Qa,e)}const Qte=P(`ZodEmoji`,(e,t)=>{cte.init(e,t),Ya.init(e,t)}),$te=P(`ZodNanoID`,(e,t)=>{lte.init(e,t),Ya.init(e,t)}),ene=P(`ZodCUID`,(e,t)=>{ute.init(e,t),Ya.init(e,t)}),tne=P(`ZodCUID2`,(e,t)=>{dte.init(e,t),Ya.init(e,t)}),nne=P(`ZodULID`,(e,t)=>{fte.init(e,t),Ya.init(e,t)}),rne=P(`ZodXID`,(e,t)=>{pte.init(e,t),Ya.init(e,t)}),ine=P(`ZodKSUID`,(e,t)=>{mte.init(e,t),Ya.init(e,t)}),ane=P(`ZodIPv4`,(e,t)=>{yte.init(e,t),Ya.init(e,t)}),one=P(`ZodIPv6`,(e,t)=>{bte.init(e,t),Ya.init(e,t)}),sne=P(`ZodCIDRv4`,(e,t)=>{xte.init(e,t),Ya.init(e,t)}),cne=P(`ZodCIDRv6`,(e,t)=>{Ste.init(e,t),Ya.init(e,t)}),lne=P(`ZodBase64`,(e,t)=>{Cte.init(e,t),Ya.init(e,t)}),une=P(`ZodBase64URL`,(e,t)=>{Tte.init(e,t),Ya.init(e,t)}),dne=P(`ZodE164`,(e,t)=>{Ete.init(e,t),Ya.init(e,t)}),fne=P(`ZodJWT`,(e,t)=>{Ote.init(e,t),Ya.init(e,t)}),eo=P(`ZodNumber`,(e,t)=>{vr.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>na(e,t,n,r),Ka(e,`ZodNumber`,{gt(e,t){return this.check(wi(e,t))},gte(e,t){return this.check(Ti(e,t))},min(e,t){return this.check(Ti(e,t))},lt(e,t){return this.check(Si(e,t))},lte(e,t){return this.check(Ci(e,t))},max(e,t){return this.check(Ci(e,t))},int(e){return this.check(to(e))},safe(e){return this.check(to(e))},positive(e){return this.check(wi(0,e))},nonnegative(e){return this.check(Ti(0,e))},negative(e){return this.check(Si(0,e))},nonpositive(e){return this.check(Ci(0,e))},multipleOf(e,t){return this.check(Ei(e,t))},step(e,t){return this.check(Ei(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function I(e){return gi(eo,e)}const pne=P(`ZodNumberFormat`,(e,t)=>{kte.init(e,t),eo.init(e,t)});function to(e){return _i(pne,e)}const mne=P(`ZodBoolean`,(e,t)=>{Ate.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ra(e,t,n,r)});function L(e){return vi(mne,e)}const hne=P(`ZodNull`,(e,t)=>{jte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ia(e,t,n,r)});function no(e){return yi(hne,e)}const gne=P(`ZodUnknown`,(e,t)=>{Mte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function R(){return bi(gne)}const _ne=P(`ZodNever`,(e,t)=>{Nte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aa(e,t,n,r)});function vne(e){return xi(_ne,e)}const yne=P(`ZodArray`,(e,t)=>{Pte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ua(e,t,n,r),e.element=t.element,Ka(e,`ZodArray`,{min(e,t){return this.check(Oi(e,t))},nonempty(e){return this.check(Oi(1,e))},max(e,t){return this.check(Di(e,t))},length(e,t){return this.check(ki(e,t))},unwrap(){return this.element}})});function z(e,t){return Hi(yne,e,t)}const ro=P(`ZodObject`,(e,t)=>{Ite.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>da(e,t,n,r),mn(e,`shape`,()=>t.shape),Ka(e,`ZodObject`,{keyof(){return H(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:R()})},loose(){return this.clone({...this._zod.def,catchall:R()})},strict(){return this.clone({...this._zod.def,catchall:vne()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return bee(this,e)},safeExtend(e){return xee(this,e)},merge(e){return See(this,e)},pick(e){return vee(this,e)},omit(e){return yee(this,e)},partial(...e){return Cee(po,this,e[0])},required(...e){return wee(go,this,e[0])}})});function B(e,t){return new ro({type:`object`,shape:e??{},...wn(t)})}function io(e,t){return new ro({type:`object`,shape:e,catchall:R(),...wn(t)})}const ao=P(`ZodUnion`,(e,t)=>{wr.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fa(e,t,n,r),e.options=t.options});function oo(e,t){return new ao({type:`union`,options:e,...wn(t)})}const bne=P(`ZodDiscriminatedUnion`,(e,t)=>{ao.init(e,t),Lte.init(e,t)});function so(e,t,n){return new bne({type:`union`,options:t,discriminator:e,...wn(n)})}const xne=P(`ZodIntersection`,(e,t)=>{Rte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pa(e,t,n,r)});function co(e,t){return new xne({type:`intersection`,left:e,right:t})}const lo=P(`ZodRecord`,(e,t)=>{zte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ma(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function V(e,t,n){return!t||!t._zod?new lo({type:`record`,keyType:F(),valueType:e,...wn(t)}):new lo({type:`record`,keyType:e,valueType:t,...wn(n)})}const uo=P(`ZodEnum`,(e,t)=>{Bte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oa(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new uo({...t,checks:[],...wn(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new uo({...t,checks:[],...wn(r),entries:i})}});function H(e,t){return new uo({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...wn(t)})}const Sne=P(`ZodLiteral`,(e,t)=>{Vte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sa(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function U(e,t){return new Sne({type:`literal`,values:Array.isArray(e)?e:[e],...wn(t)})}const Cne=P(`ZodTransform`,(e,t)=>{Hte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>la(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new rn(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(An(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(An(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function fo(e){return new Cne({type:`transform`,transform:e})}const po=P(`ZodOptional`,(e,t)=>{Or.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function mo(e){return new po({type:`optional`,innerType:e})}const wne=P(`ZodExactOptional`,(e,t)=>{Ute.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tne(e){return new wne({type:`optional`,innerType:e})}const Ene=P(`ZodNullable`,(e,t)=>{Wte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ha(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ho(e){return new Ene({type:`nullable`,innerType:e})}const Dne=P(`ZodDefault`,(e,t)=>{Gte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_a(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function One(e,t){return new Dne({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():xn(t)}})}const kne=P(`ZodPrefault`,(e,t)=>{Kte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>va(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ane(e,t){return new kne({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():xn(t)}})}const go=P(`ZodNonOptional`,(e,t)=>{qte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ga(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jne(e,t){return new go({type:`nonoptional`,innerType:e,...wn(t)})}const Mne=P(`ZodCatch`,(e,t)=>{Jte.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ya(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Nne(e,t){return new Mne({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}const _o=P(`ZodPipe`,(e,t)=>{jr.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ba(e,t,n,r),e.in=t.in,e.out=t.out});function vo(e,t){return new _o({type:`pipe`,in:e,out:t})}const Pne=P(`ZodPreprocess`,(e,t)=>{_o.init(e,t),Nr.init(e,t)}),Fne=P(`ZodReadonly`,(e,t)=>{Pr.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xa(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ine(e){return new Fne({type:`readonly`,innerType:e})}const Lne=P(`ZodLazy`,(e,t)=>{Ir.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ca(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function yo(e){return new Lne({type:`lazy`,getter:e})}const bo=P(`ZodCustom`,(e,t)=>{Lr.init(e,t),qa.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ca(e,t,n,r)});function xo(e,t){return Ui(bo,e??(()=>!0),t)}function Rne(e,t={}){return Wi(bo,e,t)}function zne(e,t){return Gi(e,t)}function So(e,t){return new Pne({type:`pipe`,in:fo(e),out:t})}const Bne=io({at:F(),transport:F(),outcome:F(),reference:F().optional(),error:F().optional()}),Vne=io({reason:F(),at:F()});io({version:I().int().catch(1),id:F(),createdAt:F(),bundleLevel:F(),zipBytes:I().int().nonnegative().catch(0),zipDeleted:L().optional(),state:F(),systemWide:L().optional(),projectSlug:F().nullable().optional(),reference:F().optional(),lastError:Vne.optional(),attempts:z(Bne).optional(),note:F().optional()});const Co=[{name:`macos-home-path`,regex:/\/Users\/[^/]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/]+\//g,replacement:`~/`},{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+/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]`}],Hne=Co.map(e=>e.name);function wo(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
180
180
|
`).map(e=>{let r=e,i=!1;for(let{name:e,regex:n,replacement:a}of Co)n.lastIndex=0,n.test(r)&&(t.add(e),i=!0,n.lastIndex=0,r=r.replace(n,a));return i&&n++,r}).join(`
|
|
181
|
-
`),patterns:[...t],lineCount:n}}function To(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Do(e.position):`start`in e||`end`in e?Do(e):`line`in e||`column`in e?Eo(e):``}function Eo(e){return Oo(e&&e.line)+`:`+Oo(e&&e.column)}function Do(e){return Eo(e&&e.start)+`-`+Eo(e&&e.end)}function Oo(e){return e&&typeof e==`number`?e:1}var ko=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=To(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}};ko.prototype.file=``,ko.prototype.name=``,ko.prototype.reason=``,ko.prototype.message=``,ko.prototype.stack=``,ko.prototype.column=void 0,ko.prototype.line=void 0,ko.prototype.ancestors=void 0,ko.prototype.cause=void 0,ko.prototype.fatal=void 0,ko.prototype.place=void 0,ko.prototype.ruleId=void 0,ko.prototype.source=void 0;const Une=[`off`,`follow`,`full`],Ao=`pull`,jo=[`off`,`follow`,`full`,Ao],Wne=[`follow`,`full`,Ao],Gne=new Set(Object.keys({sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,feature:`gherkin`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`})),Kne=new Set([`md`,`mdx`,`mmd`,`mermaid`]);new Set([...Gne,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!Kne.has(e)));const Mo=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],qne=[`video/mp4`,`video/webm`,`video/ogg`],Jne=[`audio/mpeg`,`audio/wav`,`audio/ogg`],Yne=[`application/pdf`],No=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Po=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Xne=new Set([`pdf`]),Fo=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),Io=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Lo=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),Zne=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),Ro=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),zo=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],Bo=[`mp4`,`webm`,`mov`,`m4v`],Vo=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],Ho=[`pdf`],Uo=[`json`,`toml`,`lock`];function Wo(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}Wo(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,zo,No),Wo(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,Bo,Po),Wo(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,Vo,Fo),Wo(`SIDEBAR_PDF_ASSET_EXTENSIONS`,Ho,Xne),Wo(`FILE_ATTACHMENT_EXTENSIONS`,[...Io],Ro),Wo(`WIKI_EMBED_EXTENSIONS`,[...Ro],Lo),new Set(zo),new Set(Bo),new Set(Vo),new Set(Ho),new Set(Uo),Wo(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...zo,...Bo,...Vo,...Ho,...Uo])],Zne);const Qne=new Set([`base`,`canvas`]),$ne=new Set([`mmd`,`mermaid`]),ere=new Set([`excalidraw`]),Go=new Set([...Lo,...Qne,...$ne,...ere]),Ko=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`,`ko`],tre=new Set([`ar`,`ur`]),nre=Ko.filter(e=>!tre.has(e)),rre=[`off`,`warning`,`error`],qo=`warning`,ire=[`error`,`warning`],Jo=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],are={base00:`default background`,base01:`alt background — cards, popovers, sidebar`,base02:`selection background, borders`,base03:`comments, invisibles`,base04:`secondary text`,base05:`default foreground`,base06:`light foreground`,base07:`lightest foreground`,base08:`red — variables, tags, diff deleted`,base09:`orange — numbers, constants`,base0A:`yellow — classes, search highlight`,base0B:`green — strings, diff inserted`,base0C:`cyan — support, escapes, quotes`,base0D:`blue — functions, headings, accent`,base0E:`magenta — keywords, storage`,base0F:`deprecated markers, embedded tags`},ore=/\P{White_Space}/u;function sre(e){return ore.test(e)}function cre(e){let t=e.palette;return{background:t.base00,foreground:t.base05,card:t.base01,"card-foreground":t.base05,popover:t.base01,"popover-foreground":t.base05,primary:t.base0D,"primary-foreground":t.base00,secondary:t.base01,"secondary-foreground":t.base05,muted:t.base01,"muted-foreground":t.base04,accent:t.base02,"accent-foreground":t.base05,destructive:t.base08,border:t.base02,input:t.base02,ring:t.base0D,"selection-soft":t.base02,"chart-1":t.base0D,"chart-2":t.base0B,"chart-3":t.base0A,"chart-4":t.base0E,"chart-5":t.base08,sidebar:t.base01,"sidebar-foreground":t.base05,"sidebar-primary":t.base0D,"sidebar-primary-foreground":t.base00,"sidebar-accent":t.base02,"sidebar-accent-foreground":t.base0D,"sidebar-hover":t.base02,"sidebar-border":t.base02,"sidebar-ring":t.base0D,"syntax-keyword":t.base0E,"syntax-tag":t.base08,"syntax-attr":t.base0D,"syntax-string":t.base0B,"syntax-number":t.base09,"syntax-atom":t.base0C,"syntax-comment":t.base03,"syntax-func":t.base0D,"syntax-var":t.base08,"syntax-type":t.base0A,"syntax-operator":t.base05,"syntax-meta":t.base0F,"syntax-bg":t.base01,"link-color":t.base0D,"broken-link-color":t.base08,"lint-warning-color":t.base0A,"lint-error-color":t.base08,"diff-added":t.base0B,"diff-removed":t.base08,"callout-note-color":t.base0D,"callout-info-color":t.base0D,"callout-todo-color":t.base0D,"callout-abstract-color":t.base0C,"callout-tip-color":t.base0B,"callout-success-color":t.base0B,"callout-important-color":t.base0E,"callout-example-color":t.base0E,"callout-question-color":t.base0E,"callout-warning-color":t.base0A,"callout-caution-color":t.base09,"callout-danger-color":t.base09,"callout-failure-color":t.base08,"callout-bug-color":t.base08,"callout-quote-color":t.base03,...ure(t)}}const Yo={black:`base00`,red:`base08`,green:`base0B`,yellow:`base0A`,blue:`base0D`,magenta:`base0E`,cyan:`base0C`,white:`base05`,brightBlack:`base03`,brightRed:`base08`,brightGreen:`base0B`,brightYellow:`base0A`,brightBlue:`base0D`,brightMagenta:`base0E`,brightCyan:`base0C`,brightWhite:`base07`},lre=Object.keys(Yo);function ure(e){let t={};for(let n of lre)t[`ansi-${dre(n)}`]=e[Yo[n]];return t}function dre(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}const fre={name:`Dracula`,author:`clach04 (https://github.com/clach04)`,variant:`dark`,palette:{base00:`#282a36`,base01:`#21222c`,base02:`#44475a`,base03:`#6272a4`,base04:`#9ea8c7`,base05:`#f8f8f2`,base06:`#f8f8f2`,base07:`#ffffff`,base08:`#ff5555`,base09:`#ffb86c`,base0A:`#f1fa8c`,base0B:`#50fa7b`,base0C:`#8be9fd`,base0D:`#bd93f9`,base0E:`#ff79c6`,base0F:`#993333`}},pre={name:`Catppuccin Frappé`,author:`https://github.com/catppuccin/catppuccin`,variant:`dark`,palette:{base00:`#303446`,base01:`#292c3c`,base02:`#414559`,base03:`#51576d`,base04:`#626880`,base05:`#c6d0f5`,base06:`#f2d5cf`,base07:`#babbf1`,base08:`#e78284`,base09:`#ef9f76`,base0A:`#e5c890`,base0B:`#a6d189`,base0C:`#81c8be`,base0D:`#8caaee`,base0E:`#ca9ee6`,base0F:`#eebebe`}},mre={name:`Catppuccin Latte`,author:`https://github.com/catppuccin/catppuccin`,variant:`light`,palette:{base00:`#eff1f5`,base01:`#e6e9ef`,base02:`#ccd0da`,base03:`#bcc0cc`,base04:`#acb0be`,base05:`#4c4f69`,base06:`#dc8a78`,base07:`#7287fd`,base08:`#d20f39`,base09:`#fe640b`,base0A:`#df8e1d`,base0B:`#40a02b`,base0C:`#179299`,base0D:`#1e66f5`,base0E:`#8839ef`,base0F:`#dd7878`}},hre={name:`Monokai`,author:`Wimer Hazenberg (http://www.monokai.nl)`,variant:`dark`,palette:{base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`}},gre={name:`Gruvbox dark, medium`,author:`Dawid Kurek, morhetz (https://github.com/morhetz/gruvbox)`,variant:`dark`,palette:{base00:`#282828`,base01:`#3c3836`,base02:`#504945`,base03:`#665c54`,base04:`#bdae93`,base05:`#d5c4a1`,base06:`#ebdbb2`,base07:`#fbf1c7`,base08:`#fb4934`,base09:`#fe8019`,base0A:`#fabd2f`,base0B:`#b8bb26`,base0C:`#8ec07c`,base0D:`#83a598`,base0E:`#d3869b`,base0F:`#d65d0e`}},_re={name:`Solarized Dark`,author:`Ethan Schoonover (modified by aramisgithub)`,variant:`dark`,palette:{base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`}};function Xo(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>cre(n)}}function Zo(e,t){return{id:e,label:t,kind:`system`}}const Qo=[Zo(`default`,`Default`),Xo(`dracula`,`Dracula`,fre),Xo(`catppuccin-frappe`,`Catppuccin Frappé`,pre),Xo(`catppuccin-latte`,`Catppuccin Latte`,mre),Xo(`monokai`,`Monokai`,hre),Xo(`gruvbox`,`Gruvbox`,gre),Xo(`solarized`,`Solarized`,_re),Zo(`custom`,`Custom`)],vre=Qo.map(e=>e.id),$o=/^[a-z0-9-]{1,32}$/;new Map(Qo.map(e=>[e.id,e]));const es=Symbol.for(`@inkeep/open-knowledge/field-registry`),ts=globalThis;ts[es]===void 0&&(ts[es]=Vr());const ns=ts[es];function yre(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=bre(t)?ns.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function bre(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function xre(){return Object.fromEntries(Jo.map(e=>[e,F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${are[e]}, as a #rrggbb hex string.`}).optional()]))}function rs(){return vre.filter(e=>e!==`default`&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}const is=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),as=52428800,ss=26214400,cs=12582912,ls=`https://api.openai.com/v1`,us=`text-embedding-3-small`,ds=Object.freeze([`127.0.0.1`]),Sre=/^[1-9]\d*(s|m|h)$/,fs=/^https?:\/\//;function ps(e){let t=e.trim();return t===``?`./`:t}function ms(e){let t=ps(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}const hs=io({content:io({dir:F().register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore. Read at server start; changing it requires a restart.`}).default(`.`),attachmentFolderPath:F().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'.`}).refine(ms,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:io({theme:H([`light`,`dark`,`system`]).register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),language:H([`system`,...Ko]).register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Interface language. 'system' follows the operating system. A personal preference (user scope) — not shared with the project, and never applied to document content.`}).optional(),colorThemeLight:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`IDE color palette applied in light mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${rs()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project.`}).regex($o,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorThemeDark:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`IDE color palette applied in dark mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${rs()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project.`}).regex($o,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorTheme:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Superseded by appearance.colorThemeLight / appearance.colorThemeDark. Read as the palette for both modes while neither of those is set. A short theme id (lowercase letters, digits, and hyphens; max 32 characters); an id no palette matches falls back to 'default'. A personal preference (user scope) — not shared with the project.`}).regex($o,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorThemeEnabled:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:io({name:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's author credit, carried through from an imported base16 scheme.`}).optional(),variant:H([`dark`,`light`]).register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted.`}).optional(),...xre()}).optional(),preview:io({autoOpen:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:io({showHiddenFiles:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showOnlyMarkdownFiles:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillsSection:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) — not shared with collaborators.`}).default(!0),showOkFolders:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) — not shared with collaborators.`}).default(!1)}).optional()}).default({preview:{autoOpen:!0}}),editor:io({wordWrap:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope).`}).default(!0),previewTabs:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:io({autoApproveOkTools:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:io({mode:H(jo).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`How this machine syncs this project with its git remote: 'off' (no sync), 'follow' (one-directional — pull remote changes, never push your own; 'pull' is accepted as a legacy alias), or 'full' (bidirectional pull and push). null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean.`}).nullable().default(null),enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:H(Wne).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared.`}).optional(),default:oo([L(),H(jo)]).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:io({enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync.`}).nullable().default(null)}).default({enabled:null}),slides:io({enabled:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."}).default(!1)}).default({enabled:!1}),telemetry:io({localSink:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:io({maxBytes:I().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB).`}).default(as)}).default({maxBytes:as}),logs:io({maxBytes:I().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB).`}).default(ss)}).default({maxBytes:ss}),attributeDenylist:z(F()).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist.`}).default([...is])}).default({enabled:!0,spans:{maxBytes:as},logs:{maxBytes:ss},attributeDenylist:[...is]}),skillInstallReports:io({enabled:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Report skill installs to skills.sh so a published skill shows an accurate install count. Sends the skill name, its source repo, and which agent tools it was installed for — never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off.`}).default(!0)}).default({enabled:!0})}).default({localSink:{enabled:!0,spans:{maxBytes:as},logs:{maxBytes:ss},attributeDenylist:[...is]},skillInstallReports:{enabled:!0}}),lossCapture:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:I().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB).`}).default(cs)}).default({enabled:!0,maxBytes:cs}),bridge:io({backgroundThrottle:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:io({semantic:io({enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."}).default(!1),baseUrl:F().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(ls),model:F().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions).`}).default(us),dimensions:I().int().positive().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response — that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus.`}).optional(),similarityFloor:I().min(0).max(1).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.`}).optional()}).default({enabled:!1,baseUrl:ls,model:us})}).default({semantic:{enabled:!1,baseUrl:ls,model:us}}),contentRules:io({markdownlint:B({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the markdownlint plugin (body rules) contributes diagnostics.`}).default(!1)}).default({enabled:!1}),frontmatter:B({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics.`}).default(!1),schemas:z(B({appliesTo:oo([F(),z(F())]).optional(),file:F(),enabled:L().optional()})).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path).`}).default([])}).default({enabled:!1,schemas:[]}),okf:B({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the OKF plugin (Open Knowledge Format portability + conformance rules) contributes diagnostics. Advisory warnings; never blocks a write.`}).default(!1),rules:V(F(),L()).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Per-rule opt-outs for the OKF plugin, keyed by rule id (e.g. no-wiki-links). Omit a rule to leave it enabled; set false to silence it while keeping the plugin on.`}).optional(),generate:B({index:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether OK generates and maintains a navigation index.md in every folder that contains Markdown, each listing the documents in that folder grouped by frontmatter type and linking to its subfolders. OK owns these files: edits to them are replaced on the next rebuild.`}).default(!1)}).default({index:!1})}).default({enabled:!1,generate:{index:!1}})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]},okf:{enabled:!1,generate:{index:!1}}}),validation:io({links:H(rre).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity.`}).default(qo),fileTreeIndicators:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:qo,fileTreeIndicators:!0}),linkPreviews:io({enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),remote:io({url:F().register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:"Superseded by server.externalUrl — read only while server.externalUrl (and its deprecated server.publicUrl spelling) is absent. Public URL your tunnel gives you, e.g. https://myproject.ngrok.app. Used only with `ok start --remote` (config alone never enables remote access); its host is admitted through the Host-header allowlist. There is no server-side auth, so restrict access at the tunnel (ngrok OAuth, Cloudflare Access, Tailscale ACLs)."}).optional(),port:I().int().min(1).max(65535).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Superseded by server.port — read only while server.port is absent. TCP port the server binds when remote access is enabled (default 24550). Fixed so the tunnel's port mapping survives restarts. Set it only on a conflict. An explicit --port still wins; the PORT env var is ignored in remote mode.`}).optional()}).default({}),server:io({port:I().int().min(1).max(65535).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`TCP port the server listens on. Unset by default: a local start picks a free port dynamically, and deployment platforms inject the PORT environment variable instead. Supersedes remote.port (still read while this key is absent). Read at server start; changing it requires a restart.`}).optional(),bind:z(F().min(1)).min(1).register(ns,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Addresses the server binds, e.g. [127.0.0.1] or [0.0.0.0]. Default loopback-only ([127.0.0.1]): nothing off this machine can connect. A non-loopback bind additionally requires the server.allowExternal consent interlock. Per-machine (project-local): a value committed to .ok/config.yml is ignored, so one machine exposing the server can never break local clones for the rest of the team — the exposing host sets it via OK_BIND, --bind, or .ok/local/config.yml. Lists replace, never merge. Read at server start; changing it requires a restart.`}).default([...ds]),externalUrl:$a({protocol:/^https?$/}).regex(fs).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Canonical external origin the server is reached at, e.g. https://kb.example.com — its host joins the Host/Origin allowlists (external-Host + CORS admission). Unset by default: the server admits only loopback Hosts. Setting it declares external exposure, which additionally requires the server.allowExternal consent interlock. Supersedes server.publicUrl (its former name) and remote.url — both still read while this key is absent. Read at server start; changing it requires a restart.`}).optional(),publicUrl:$a({protocol:/^https?$/}).regex(fs).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Deprecated alias of server.externalUrl (the former name of that key) — read only while server.externalUrl is absent, with identical semantics. Use server.externalUrl instead; if this config is committed and shared, keep both keys until every collaborator has upgraded (older versions read only server.publicUrl).`}).optional(),allowExternal:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Exposure consent interlock. Once the unified server boot lands, a non-loopback server.bind or a server.externalUrl without allowExternal: true will be refused at boot with a one-line fix. Default off. Per-machine (project-local) — consent never travels via git, clone, or share; containers consent via the environment instead.`}).default(!1),openBrowser:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Open the UI in a browser when the server starts. Default derived: true when every bind address is loopback (a laptop start pops the UI), false otherwise (a container or exposed bind is headless and must never try). Acts once at start. Per-machine (project-local) — not shared.`}).optional(),idleShutdown:oo([U(`off`),F().regex(Sre)]).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Shut the server down after this long with no activity: a duration like '30m' (positive integer with unit s, m, or h), or 'off'. Default derived: '30m' when every bind address is loopback, 'off' otherwise (an exposed or containerized server stays up). Reloadable — a valid change applies without a restart. Per-machine (project-local) — not shared.`}).optional()}).default({bind:[...ds],allowExternal:!1})});var gs,_s=n((()=>{gs=`1.9.1`}));function Cre(e){let t=new Set([e]),n=new Set,r=e.match(vs);if(!r)return()=>!1;let i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;let r=e.match(vs);if(!r)return a(e);let s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var vs,ys,wre=n((()=>{_s(),vs=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,ys=Cre(gs)}));function bs(e,t,n,r=!1){let i=Ts[ws]=Ts[ws]??{version:gs};if(!r&&i[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(t.stack||t.message),!1}if(i.version!==`1.9.1`){let t=Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${gs}`);return n.error(t.stack||t.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${gs}.`),!0}function xs(e){let t=Ts[ws]?.version;if(!(!t||!ys(t)))return Ts[ws]?.[e]}function Ss(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${gs}.`);let n=Ts[ws];n&&delete n[e]}var Cs,ws,Ts,Es=n((()=>{_s(),wre(),Cs=gs.split(`.`)[0],ws=Symbol.for(`opentelemetry.js.api.${Cs}`),Ts=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{}}));function Ds(e,t,n){let r=xs(`diag`);if(r)return r[e](t,...n)}var Os,Tre=n((()=>{Es(),Os=class{constructor(e){this._namespace=e.namespace||`DiagComponentLogger`}debug(...e){return Ds(`debug`,this._namespace,e)}error(...e){return Ds(`error`,this._namespace,e)}info(...e){return Ds(`info`,this._namespace,e)}warn(...e){return Ds(`warn`,this._namespace,e)}verbose(...e){return Ds(`verbose`,this._namespace,e)}}})),ks,As=n((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(ks||={})}));function Ere(e,t){e<ks.NONE?e=ks.NONE:e>ks.ALL&&(e=ks.ALL),t||={};function n(n,r){let i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,ks.ERROR),warn:n(`warn`,ks.WARN),info:n(`info`,ks.INFO),debug:n(`debug`,ks.DEBUG),verbose:n(`verbose`,ks.VERBOSE)}}var Dre=n((()=>{As()})),js,Ms,Ns=n((()=>{Tre(),Dre(),As(),Es(),js=`diag`,Ms=class e{static instance(){return this._instance||=new e,this._instance}constructor(){function e(e){return function(...t){let n=xs(`diag`);if(n)return n[e](...t)}}let t=this;t.setLogger=(e,n={logLevel:ks.INFO})=>{if(e===t){let e=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error(e.stack??e.message),!1}typeof n==`number`&&(n={logLevel:n});let r=xs(`diag`),i=Ere(n.logLevel??ks.INFO,e);if(r&&!n.suppressOverrideMessage){let e=Error().stack??`<failed to generate stacktrace>`;r.warn(`Current logger will be overwritten from ${e}`),i.warn(`Current logger will overwrite one already registered from ${e}`)}return bs(`diag`,i,t,!0)},t.disable=()=>{Ss(js,t)},t.createComponentLogger=e=>new Os(e),t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}}}));function Ore(e){return Symbol.for(e)}var Ps,Fs,Is=n((()=>{Ps=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=e=>n._currentContext.get(e),n.setValue=(t,r)=>{let i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=t=>{let r=new e(n._currentContext);return r._currentContext.delete(t),r}}},Fs=new Ps})),Ls,Rs=n((()=>{Is(),Ls=class{active(){return Fs}with(e,t,n,...r){return t.call(n,...r)}bind(e,t){return t}enable(){return this}disable(){return this}}})),zs,Bs,Vs,Hs=n((()=>{Rs(),Es(),Ns(),zs=`context`,Bs=new Ls,Vs=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalContextManager(e){return bs(zs,e,Ms.instance())}active(){return this._getContextManager().active()}with(e,t,n,...r){return this._getContextManager().with(e,t,n,...r)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return xs(zs)||Bs}disable(){this._getContextManager().disable(),Ss(zs,Ms.instance())}}})),Us,Ws=n((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(Us||={})})),Gs,Ks,qs,Js=n((()=>{Ws(),Gs=`0000000000000000`,Ks=`00000000000000000000000000000000`,qs={traceId:Ks,spanId:Gs,traceFlags:Us.NONE}})),Ys,Xs=n((()=>{Js(),Ys=class{constructor(e=qs){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}}));function Zs(e){return e.getValue(rc)||void 0}function Qs(){return Zs(Vs.getInstance().active())}function $s(e,t){return e.setValue(rc,t)}function ec(e){return e.deleteValue(rc)}function tc(e,t){return $s(e,new Ys(t))}function nc(e){return Zs(e)?.spanContext()}var rc,ic=n((()=>{Is(),Xs(),Hs(),rc=Ore(`OpenTelemetry Context Key SPAN`)}));function ac(e,t){if(typeof e!=`string`||e.length!==t)return!1;let n=0;for(let t=0;t<e.length;t+=4)n+=(uc[e.charCodeAt(t)]|0)+(uc[e.charCodeAt(t+1)]|0)+(uc[e.charCodeAt(t+2)]|0)+(uc[e.charCodeAt(t+3)]|0);return n===t}function oc(e){return ac(e,32)&&e!==`00000000000000000000000000000000`}function sc(e){return ac(e,16)&&e!==`0000000000000000`}function cc(e){return oc(e.traceId)&&sc(e.spanId)}function lc(e){return new Ys(e)}var uc,dc=n((()=>{Js(),Xs(),uc=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])}));function fc(e){return typeof e==`object`&&!!e&&`spanId`in e&&typeof e.spanId==`string`&&`traceId`in e&&typeof e.traceId==`string`&&`traceFlags`in e&&typeof e.traceFlags==`number`}var pc,mc,hc=n((()=>{Hs(),ic(),Xs(),dc(),pc=Vs.getInstance(),mc=class{startSpan(e,t,n=pc.active()){if(t?.root)return new Ys;let r=n&&nc(n);return fc(r)&&cc(r)?new Ys(r):new Ys}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??pc.active(),c=this.startSpan(e,i,s),l=$s(s,c);return pc.with(l,o,void 0,c)}}})),gc,_c,vc=n((()=>{hc(),gc=new mc,_c=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}startSpan(e,t,n){return this._getTracer().startSpan(e,t,n)}startActiveSpan(e,t,n,r){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):gc}}})),yc,bc=n((()=>{hc(),yc=class{getTracer(e,t,n){return new mc}}})),xc,Sc,Cc=n((()=>{vc(),bc(),xc=new yc,Sc=class{getTracer(e,t,n){return this.getDelegateTracer(e,t,n)??new _c(this,e,t,n)}getDelegate(){return this._delegate??xc}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,n){return this._delegate?.getTracer(e,t,n)}}})),wc,Tc=n((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(wc||={})})),Ec,Dc=n((()=>{Hs(),Ec=Vs.getInstance()})),Oc,kc,Ac=n((()=>{Es(),Cc(),dc(),ic(),Ns(),Oc=`trace`,kc=class e{constructor(){this._proxyTracerProvider=new Sc,this.wrapSpanContext=lc,this.isSpanContextValid=cc,this.deleteSpan=ec,this.getSpan=Zs,this.getActiveSpan=Qs,this.getSpanContext=nc,this.setSpan=$s,this.setSpanContext=tc}static getInstance(){return this._instance||=new e,this._instance}setGlobalTracerProvider(e){let t=bs(Oc,this._proxyTracerProvider,Ms.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return xs(Oc)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){Ss(Oc,Ms.instance()),this._proxyTracerProvider=new Sc}}})),jc,Mc=n((()=>{Ac(),jc=kc.getInstance()})),Nc=n((()=>{Ns(),Is(),As(),vc(),Cc(),Tc(),Ws(),dc(),Js(),Dc(),Mc()}));function Pc(e){let t=e;for(let e=0;e<16;e++){if(t==null||t?._zod?.def?.shape!==void 0)return t;let e=t?._zod?.def?.innerType;if(e===void 0)return t;t=e}return t}function Fc(e,t){let n=e;for(let e of t){n=Pc(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function Ic(e,t){let n=Fc(e,t);if(n!==void 0)return yre(n)}const Lc=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 Rc(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toUpperCase()}function zc(e){return`OK_${(e[0]===`server`?e.slice(1):e).map(Rc).join(`_`)}`}function Bc(e,t){if(t.length===0)return e.contents??null;let n=e.getIn(t,!0);if((0,Yt.isNode)(n))return n;for(let n=t.length-1;n>=0;n--){let r=e.getIn(t.slice(0,n),!0);if((0,Yt.isNode)(r))return r}return e.contents??null}function Vc(e,t){let n=1,r=1,i=Math.min(t,e.length);for(let t=0;t<i;t++)e.charCodeAt(t)===10?(n++,r=1):r++;return{line:n,column:r}}function Hc(e,t,n,r,i){let a=e.split(`
|
|
181
|
+
`),patterns:[...t],lineCount:n}}function To(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Do(e.position):`start`in e||`end`in e?Do(e):`line`in e||`column`in e?Eo(e):``}function Eo(e){return Oo(e&&e.line)+`:`+Oo(e&&e.column)}function Do(e){return Eo(e&&e.start)+`-`+Eo(e&&e.end)}function Oo(e){return e&&typeof e==`number`?e:1}var ko=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=To(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}};ko.prototype.file=``,ko.prototype.name=``,ko.prototype.reason=``,ko.prototype.message=``,ko.prototype.stack=``,ko.prototype.column=void 0,ko.prototype.line=void 0,ko.prototype.ancestors=void 0,ko.prototype.cause=void 0,ko.prototype.fatal=void 0,ko.prototype.place=void 0,ko.prototype.ruleId=void 0,ko.prototype.source=void 0;const Une=[`off`,`follow`,`full`],Ao=`pull`,jo=[`off`,`follow`,`full`,Ao],Wne=[`follow`,`full`,Ao],Gne=new Set(Object.keys({sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,feature:`gherkin`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`})),Kne=new Set([`md`,`mdx`,`mmd`,`mermaid`]);new Set([...Gne,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!Kne.has(e)));const Mo=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],qne=[`video/mp4`,`video/webm`,`video/ogg`],Jne=[`audio/mpeg`,`audio/wav`,`audio/ogg`],Yne=[`application/pdf`],No=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Po=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Xne=new Set([`pdf`]),Fo=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),Io=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Lo=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),Zne=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),Ro=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),zo=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],Bo=[`mp4`,`webm`,`mov`,`m4v`],Vo=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],Ho=[`pdf`],Uo=[`json`,`toml`,`lock`];function Wo(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}Wo(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,zo,No),Wo(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,Bo,Po),Wo(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,Vo,Fo),Wo(`SIDEBAR_PDF_ASSET_EXTENSIONS`,Ho,Xne),Wo(`FILE_ATTACHMENT_EXTENSIONS`,[...Io],Ro),Wo(`WIKI_EMBED_EXTENSIONS`,[...Ro],Lo),new Set(zo),new Set(Bo),new Set(Vo),new Set(Ho),new Set(Uo),Wo(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...zo,...Bo,...Vo,...Ho,...Uo])],Zne);const Qne=new Set([`base`,`canvas`]),$ne=new Set([`mmd`,`mermaid`]),ere=new Set([`excalidraw`]),Go=new Set([...Lo,...Qne,...$ne,...ere]),Ko=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`,`ko`],tre=new Set([`ar`,`ur`]),nre=Ko.filter(e=>!tre.has(e)),rre=[`off`,`warning`,`error`],qo=`warning`,ire=[`error`,`warning`],Jo=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],are={base00:`default background`,base01:`alt background — cards, popovers, sidebar`,base02:`selection background, borders`,base03:`comments, invisibles`,base04:`secondary text`,base05:`default foreground`,base06:`light foreground`,base07:`lightest foreground`,base08:`red — variables, tags, diff deleted`,base09:`orange — numbers, constants`,base0A:`yellow — classes, search highlight`,base0B:`green — strings, diff inserted`,base0C:`cyan — support, escapes, quotes`,base0D:`blue — functions, headings, accent`,base0E:`magenta — keywords, storage`,base0F:`deprecated markers, embedded tags`},ore=/\P{White_Space}/u;function sre(e){return ore.test(e)}function cre(e){let t=e.palette;return{background:t.base00,foreground:t.base05,card:t.base01,"card-foreground":t.base05,popover:t.base01,"popover-foreground":t.base05,primary:t.base0D,"primary-foreground":t.base00,secondary:t.base01,"secondary-foreground":t.base05,muted:t.base01,"muted-foreground":t.base04,accent:t.base02,"accent-foreground":t.base05,destructive:t.base08,border:t.base02,input:t.base02,ring:t.base0D,"selection-soft":t.base02,"chart-1":t.base0D,"chart-2":t.base0B,"chart-3":t.base0A,"chart-4":t.base0E,"chart-5":t.base08,sidebar:t.base01,"sidebar-foreground":t.base05,"sidebar-primary":t.base0D,"sidebar-primary-foreground":t.base00,"sidebar-accent":t.base02,"sidebar-accent-foreground":t.base0D,"sidebar-hover":t.base02,"sidebar-border":t.base02,"sidebar-ring":t.base0D,"syntax-keyword":t.base0E,"syntax-tag":t.base08,"syntax-attr":t.base0D,"syntax-string":t.base0B,"syntax-number":t.base09,"syntax-atom":t.base0C,"syntax-comment":t.base03,"syntax-func":t.base0D,"syntax-var":t.base08,"syntax-type":t.base0A,"syntax-operator":t.base05,"syntax-meta":t.base0F,"syntax-bg":t.base01,"link-color":t.base0D,"broken-link-color":t.base08,"lint-warning-color":t.base0A,"lint-error-color":t.base08,"diff-added":t.base0B,"diff-removed":t.base08,"callout-note-color":t.base0D,"callout-info-color":t.base0D,"callout-todo-color":t.base0D,"callout-abstract-color":t.base0C,"callout-tip-color":t.base0B,"callout-success-color":t.base0B,"callout-important-color":t.base0E,"callout-example-color":t.base0E,"callout-question-color":t.base0E,"callout-warning-color":t.base0A,"callout-caution-color":t.base09,"callout-danger-color":t.base09,"callout-failure-color":t.base08,"callout-bug-color":t.base08,"callout-quote-color":t.base03,...ure(t)}}const Yo={black:`base00`,red:`base08`,green:`base0B`,yellow:`base0A`,blue:`base0D`,magenta:`base0E`,cyan:`base0C`,white:`base05`,brightBlack:`base03`,brightRed:`base08`,brightGreen:`base0B`,brightYellow:`base0A`,brightBlue:`base0D`,brightMagenta:`base0E`,brightCyan:`base0C`,brightWhite:`base07`},lre=Object.keys(Yo);function ure(e){let t={};for(let n of lre)t[`ansi-${dre(n)}`]=e[Yo[n]];return t}function dre(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}const fre={name:`Dracula`,author:`clach04 (https://github.com/clach04)`,variant:`dark`,palette:{base00:`#282a36`,base01:`#21222c`,base02:`#44475a`,base03:`#6272a4`,base04:`#9ea8c7`,base05:`#f8f8f2`,base06:`#f8f8f2`,base07:`#ffffff`,base08:`#ff5555`,base09:`#ffb86c`,base0A:`#f1fa8c`,base0B:`#50fa7b`,base0C:`#8be9fd`,base0D:`#bd93f9`,base0E:`#ff79c6`,base0F:`#993333`}},pre={name:`Catppuccin Frappé`,author:`https://github.com/catppuccin/catppuccin`,variant:`dark`,palette:{base00:`#303446`,base01:`#292c3c`,base02:`#414559`,base03:`#51576d`,base04:`#626880`,base05:`#c6d0f5`,base06:`#f2d5cf`,base07:`#babbf1`,base08:`#e78284`,base09:`#ef9f76`,base0A:`#e5c890`,base0B:`#a6d189`,base0C:`#81c8be`,base0D:`#8caaee`,base0E:`#ca9ee6`,base0F:`#eebebe`}},mre={name:`Catppuccin Latte`,author:`https://github.com/catppuccin/catppuccin`,variant:`light`,palette:{base00:`#eff1f5`,base01:`#e6e9ef`,base02:`#ccd0da`,base03:`#bcc0cc`,base04:`#acb0be`,base05:`#4c4f69`,base06:`#dc8a78`,base07:`#7287fd`,base08:`#d20f39`,base09:`#fe640b`,base0A:`#df8e1d`,base0B:`#40a02b`,base0C:`#179299`,base0D:`#1d62ec`,base0E:`#8839ef`,base0F:`#dd7878`}},hre={name:`Monokai`,author:`Wimer Hazenberg (http://www.monokai.nl)`,variant:`dark`,palette:{base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`}},gre={name:`Gruvbox dark, medium`,author:`Dawid Kurek, morhetz (https://github.com/morhetz/gruvbox)`,variant:`dark`,palette:{base00:`#282828`,base01:`#3c3836`,base02:`#504945`,base03:`#665c54`,base04:`#bdae93`,base05:`#d5c4a1`,base06:`#ebdbb2`,base07:`#fbf1c7`,base08:`#fb4934`,base09:`#fe8019`,base0A:`#fabd2f`,base0B:`#b8bb26`,base0C:`#8ec07c`,base0D:`#83a598`,base0E:`#d3869b`,base0F:`#d65d0e`}},_re={name:`Solarized Dark`,author:`Ethan Schoonover (modified by aramisgithub)`,variant:`dark`,palette:{base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#2995e1`,base0E:`#6c71c4`,base0F:`#d33682`}};function Xo(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>cre(n)}}function Zo(e,t){return{id:e,label:t,kind:`system`}}const Qo=[Zo(`default`,`Default`),Xo(`dracula`,`Dracula`,fre),Xo(`catppuccin-frappe`,`Catppuccin Frappé`,pre),Xo(`catppuccin-latte`,`Catppuccin Latte`,mre),Xo(`monokai`,`Monokai`,hre),Xo(`gruvbox`,`Gruvbox`,gre),Xo(`solarized`,`Solarized`,_re),Zo(`custom`,`Custom`)],vre=Qo.map(e=>e.id),$o=/^[a-z0-9-]{1,32}$/;new Map(Qo.map(e=>[e.id,e]));const es=Symbol.for(`@inkeep/open-knowledge/field-registry`),ts=globalThis;ts[es]===void 0&&(ts[es]=Vr());const ns=ts[es];function yre(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=bre(t)?ns.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function bre(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function xre(){return Object.fromEntries(Jo.map(e=>[e,F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${are[e]}, as a #rrggbb hex string.`}).optional()]))}function rs(){return vre.filter(e=>e!==`default`&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}const is=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),as=52428800,ss=26214400,cs=12582912,ls=`https://api.openai.com/v1`,us=`text-embedding-3-small`,ds=Object.freeze([`127.0.0.1`]),Sre=/^[1-9]\d*(s|m|h)$/,fs=/^https?:\/\//;function ps(e){let t=e.trim();return t===``?`./`:t}function ms(e){let t=ps(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}const hs=io({content:io({dir:F().register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore. Read at server start; changing it requires a restart.`}).default(`.`),attachmentFolderPath:F().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'.`}).refine(ms,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:io({theme:H([`light`,`dark`,`system`]).register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),language:H([`system`,...Ko]).register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Interface language. 'system' follows the operating system. A personal preference (user scope) — not shared with the project, and never applied to document content.`}).optional(),colorThemeLight:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`IDE color palette applied in light mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${rs()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project.`}).regex($o,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorThemeDark:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`IDE color palette applied in dark mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${rs()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project.`}).regex($o,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorTheme:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Superseded by appearance.colorThemeLight / appearance.colorThemeDark. Read as the palette for both modes while neither of those is set. A short theme id (lowercase letters, digits, and hyphens; max 32 characters); an id no palette matches falls back to 'default'. A personal preference (user scope) — not shared with the project.`}).regex($o,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorThemeEnabled:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:io({name:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:F().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's author credit, carried through from an imported base16 scheme.`}).optional(),variant:H([`dark`,`light`]).register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted.`}).optional(),...xre()}).optional(),preview:io({autoOpen:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:io({showHiddenFiles:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showOnlyMarkdownFiles:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillsSection:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) — not shared with collaborators.`}).default(!0),showOkFolders:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) — not shared with collaborators.`}).default(!1)}).optional()}).default({preview:{autoOpen:!0}}),editor:io({wordWrap:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope).`}).default(!0),previewTabs:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:io({autoApproveOkTools:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:io({mode:H(jo).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`How this machine syncs this project with its git remote: 'off' (no sync), 'follow' (one-directional — pull remote changes, never push your own; 'pull' is accepted as a legacy alias), or 'full' (bidirectional pull and push). null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean.`}).nullable().default(null),enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:H(Wne).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared.`}).optional(),default:oo([L(),H(jo)]).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:io({enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync.`}).nullable().default(null)}).default({enabled:null}),slides:io({enabled:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."}).default(!1)}).default({enabled:!1}),telemetry:io({localSink:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:io({maxBytes:I().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB).`}).default(as)}).default({maxBytes:as}),logs:io({maxBytes:I().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB).`}).default(ss)}).default({maxBytes:ss}),attributeDenylist:z(F()).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist.`}).default([...is])}).default({enabled:!0,spans:{maxBytes:as},logs:{maxBytes:ss},attributeDenylist:[...is]}),skillInstallReports:io({enabled:L().register(ns,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Report skill installs to skills.sh so a published skill shows an accurate install count. Sends the skill name, its source repo, and which agent tools it was installed for — never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off.`}).default(!0)}).default({enabled:!0})}).default({localSink:{enabled:!0,spans:{maxBytes:as},logs:{maxBytes:ss},attributeDenylist:[...is]},skillInstallReports:{enabled:!0}}),lossCapture:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:I().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB).`}).default(cs)}).default({enabled:!0,maxBytes:cs}),bridge:io({backgroundThrottle:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:io({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:io({semantic:io({enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."}).default(!1),baseUrl:F().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(ls),model:F().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions).`}).default(us),dimensions:I().int().positive().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response — that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus.`}).optional(),similarityFloor:I().min(0).max(1).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.`}).optional()}).default({enabled:!1,baseUrl:ls,model:us})}).default({semantic:{enabled:!1,baseUrl:ls,model:us}}),contentRules:io({markdownlint:B({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the markdownlint plugin (body rules) contributes diagnostics.`}).default(!1)}).default({enabled:!1}),frontmatter:B({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics.`}).default(!1),schemas:z(B({appliesTo:oo([F(),z(F())]).optional(),file:F(),enabled:L().optional()})).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path).`}).default([])}).default({enabled:!1,schemas:[]}),okf:B({enabled:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the OKF plugin (Open Knowledge Format portability + conformance rules) contributes diagnostics. Advisory warnings; never blocks a write.`}).default(!1),rules:V(F(),L()).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Per-rule opt-outs for the OKF plugin, keyed by rule id (e.g. no-wiki-links). Omit a rule to leave it enabled; set false to silence it while keeping the plugin on.`}).optional(),generate:B({index:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether OK generates and maintains a navigation index.md in every folder that contains Markdown, each listing the documents in that folder grouped by frontmatter type and linking to its subfolders. OK owns these files: edits to them are replaced on the next rebuild.`}).default(!1)}).default({index:!1})}).default({enabled:!1,generate:{index:!1}})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]},okf:{enabled:!1,generate:{index:!1}}}),validation:io({links:H(rre).register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity.`}).default(qo),fileTreeIndicators:L().register(ns,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:qo,fileTreeIndicators:!0}),linkPreviews:io({enabled:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),remote:io({url:F().register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:"Superseded by server.externalUrl — read only while server.externalUrl (and its deprecated server.publicUrl spelling) is absent. Public URL your tunnel gives you, e.g. https://myproject.ngrok.app. Used only with `ok start --remote` (config alone never enables remote access); its host is admitted through the Host-header allowlist. There is no server-side auth, so restrict access at the tunnel (ngrok OAuth, Cloudflare Access, Tailscale ACLs)."}).optional(),port:I().int().min(1).max(65535).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Superseded by server.port — read only while server.port is absent. TCP port the server binds when remote access is enabled (default 24550). Fixed so the tunnel's port mapping survives restarts. Set it only on a conflict. An explicit --port still wins; the PORT env var is ignored in remote mode.`}).optional()}).default({}),server:io({port:I().int().min(1).max(65535).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`TCP port the server listens on. Unset by default: a local start picks a free port dynamically, and deployment platforms inject the PORT environment variable instead. Supersedes remote.port (still read while this key is absent). Read at server start; changing it requires a restart.`}).optional(),bind:z(F().min(1)).min(1).register(ns,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Addresses the server binds, e.g. [127.0.0.1] or [0.0.0.0]. Default loopback-only ([127.0.0.1]): nothing off this machine can connect. A non-loopback bind additionally requires the server.allowExternal consent interlock. Per-machine (project-local): a value committed to .ok/config.yml is ignored, so one machine exposing the server can never break local clones for the rest of the team — the exposing host sets it via OK_BIND, --bind, or .ok/local/config.yml. Lists replace, never merge. Read at server start; changing it requires a restart.`}).default([...ds]),externalUrl:$a({protocol:/^https?$/}).regex(fs).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Canonical external origin the server is reached at, e.g. https://kb.example.com — its host joins the Host/Origin allowlists (external-Host + CORS admission). Unset by default: the server admits only loopback Hosts. Setting it declares external exposure, which additionally requires the server.allowExternal consent interlock. Supersedes server.publicUrl (its former name) and remote.url — both still read while this key is absent. Read at server start; changing it requires a restart.`}).optional(),publicUrl:$a({protocol:/^https?$/}).regex(fs).register(ns,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Deprecated alias of server.externalUrl (the former name of that key) — read only while server.externalUrl is absent, with identical semantics. Use server.externalUrl instead; if this config is committed and shared, keep both keys until every collaborator has upgraded (older versions read only server.publicUrl).`}).optional(),allowExternal:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Exposure consent interlock. Once the unified server boot lands, a non-loopback server.bind or a server.externalUrl without allowExternal: true will be refused at boot with a one-line fix. Default off. Per-machine (project-local) — consent never travels via git, clone, or share; containers consent via the environment instead.`}).default(!1),openBrowser:L().register(ns,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Open the UI in a browser when the server starts. Default derived: true when every bind address is loopback (a laptop start pops the UI), false otherwise (a container or exposed bind is headless and must never try). Acts once at start. Per-machine (project-local) — not shared.`}).optional(),idleShutdown:oo([U(`off`),F().regex(Sre)]).register(ns,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Shut the server down after this long with no activity: a duration like '30m' (positive integer with unit s, m, or h), or 'off'. Default derived: '30m' when every bind address is loopback, 'off' otherwise (an exposed or containerized server stays up). Reloadable — a valid change applies without a restart. Per-machine (project-local) — not shared.`}).optional()}).default({bind:[...ds],allowExternal:!1})});var gs,_s=n((()=>{gs=`1.9.1`}));function Cre(e){let t=new Set([e]),n=new Set,r=e.match(vs);if(!r)return()=>!1;let i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(t){return t===e};function a(e){return n.add(e),!1}function o(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;let r=e.match(vs);if(!r)return a(e);let s={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return s.prerelease!=null||i.major!==s.major?a(e):i.major===0?i.minor===s.minor&&i.patch<=s.patch?o(e):a(e):i.minor<=s.minor?o(e):a(e)}}var vs,ys,wre=n((()=>{_s(),vs=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,ys=Cre(gs)}));function bs(e,t,n,r=!1){let i=Ts[ws]=Ts[ws]??{version:gs};if(!r&&i[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(t.stack||t.message),!1}if(i.version!==`1.9.1`){let t=Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${gs}`);return n.error(t.stack||t.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${gs}.`),!0}function xs(e){let t=Ts[ws]?.version;if(!(!t||!ys(t)))return Ts[ws]?.[e]}function Ss(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${gs}.`);let n=Ts[ws];n&&delete n[e]}var Cs,ws,Ts,Es=n((()=>{_s(),wre(),Cs=gs.split(`.`)[0],ws=Symbol.for(`opentelemetry.js.api.${Cs}`),Ts=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{}}));function Ds(e,t,n){let r=xs(`diag`);if(r)return r[e](t,...n)}var Os,Tre=n((()=>{Es(),Os=class{constructor(e){this._namespace=e.namespace||`DiagComponentLogger`}debug(...e){return Ds(`debug`,this._namespace,e)}error(...e){return Ds(`error`,this._namespace,e)}info(...e){return Ds(`info`,this._namespace,e)}warn(...e){return Ds(`warn`,this._namespace,e)}verbose(...e){return Ds(`verbose`,this._namespace,e)}}})),ks,As=n((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.ERROR=30]=`ERROR`,e[e.WARN=50]=`WARN`,e[e.INFO=60]=`INFO`,e[e.DEBUG=70]=`DEBUG`,e[e.VERBOSE=80]=`VERBOSE`,e[e.ALL=9999]=`ALL`})(ks||={})}));function Ere(e,t){e<ks.NONE?e=ks.NONE:e>ks.ALL&&(e=ks.ALL),t||={};function n(n,r){let i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,ks.ERROR),warn:n(`warn`,ks.WARN),info:n(`info`,ks.INFO),debug:n(`debug`,ks.DEBUG),verbose:n(`verbose`,ks.VERBOSE)}}var Dre=n((()=>{As()})),js,Ms,Ns=n((()=>{Tre(),Dre(),As(),Es(),js=`diag`,Ms=class e{static instance(){return this._instance||=new e,this._instance}constructor(){function e(e){return function(...t){let n=xs(`diag`);if(n)return n[e](...t)}}let t=this;t.setLogger=(e,n={logLevel:ks.INFO})=>{if(e===t){let e=Error(`Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation`);return t.error(e.stack??e.message),!1}typeof n==`number`&&(n={logLevel:n});let r=xs(`diag`),i=Ere(n.logLevel??ks.INFO,e);if(r&&!n.suppressOverrideMessage){let e=Error().stack??`<failed to generate stacktrace>`;r.warn(`Current logger will be overwritten from ${e}`),i.warn(`Current logger will overwrite one already registered from ${e}`)}return bs(`diag`,i,t,!0)},t.disable=()=>{Ss(js,t)},t.createComponentLogger=e=>new Os(e),t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}}}));function Ore(e){return Symbol.for(e)}var Ps,Fs,Is=n((()=>{Ps=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=e=>n._currentContext.get(e),n.setValue=(t,r)=>{let i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=t=>{let r=new e(n._currentContext);return r._currentContext.delete(t),r}}},Fs=new Ps})),Ls,Rs=n((()=>{Is(),Ls=class{active(){return Fs}with(e,t,n,...r){return t.call(n,...r)}bind(e,t){return t}enable(){return this}disable(){return this}}})),zs,Bs,Vs,Hs=n((()=>{Rs(),Es(),Ns(),zs=`context`,Bs=new Ls,Vs=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalContextManager(e){return bs(zs,e,Ms.instance())}active(){return this._getContextManager().active()}with(e,t,n,...r){return this._getContextManager().with(e,t,n,...r)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return xs(zs)||Bs}disable(){this._getContextManager().disable(),Ss(zs,Ms.instance())}}})),Us,Ws=n((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(Us||={})})),Gs,Ks,qs,Js=n((()=>{Ws(),Gs=`0000000000000000`,Ks=`00000000000000000000000000000000`,qs={traceId:Ks,spanId:Gs,traceFlags:Us.NONE}})),Ys,Xs=n((()=>{Js(),Ys=class{constructor(e=qs){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}}));function Zs(e){return e.getValue(rc)||void 0}function Qs(){return Zs(Vs.getInstance().active())}function $s(e,t){return e.setValue(rc,t)}function ec(e){return e.deleteValue(rc)}function tc(e,t){return $s(e,new Ys(t))}function nc(e){return Zs(e)?.spanContext()}var rc,ic=n((()=>{Is(),Xs(),Hs(),rc=Ore(`OpenTelemetry Context Key SPAN`)}));function ac(e,t){if(typeof e!=`string`||e.length!==t)return!1;let n=0;for(let t=0;t<e.length;t+=4)n+=(uc[e.charCodeAt(t)]|0)+(uc[e.charCodeAt(t+1)]|0)+(uc[e.charCodeAt(t+2)]|0)+(uc[e.charCodeAt(t+3)]|0);return n===t}function oc(e){return ac(e,32)&&e!==`00000000000000000000000000000000`}function sc(e){return ac(e,16)&&e!==`0000000000000000`}function cc(e){return oc(e.traceId)&&sc(e.spanId)}function lc(e){return new Ys(e)}var uc,dc=n((()=>{Js(),Xs(),uc=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])}));function fc(e){return typeof e==`object`&&!!e&&`spanId`in e&&typeof e.spanId==`string`&&`traceId`in e&&typeof e.traceId==`string`&&`traceFlags`in e&&typeof e.traceFlags==`number`}var pc,mc,hc=n((()=>{Hs(),ic(),Xs(),dc(),pc=Vs.getInstance(),mc=class{startSpan(e,t,n=pc.active()){if(t?.root)return new Ys;let r=n&&nc(n);return fc(r)&&cc(r)?new Ys(r):new Ys}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??pc.active(),c=this.startSpan(e,i,s),l=$s(s,c);return pc.with(l,o,void 0,c)}}})),gc,_c,vc=n((()=>{hc(),gc=new mc,_c=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}startSpan(e,t,n){return this._getTracer().startSpan(e,t,n)}startActiveSpan(e,t,n,r){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):gc}}})),yc,bc=n((()=>{hc(),yc=class{getTracer(e,t,n){return new mc}}})),xc,Sc,Cc=n((()=>{vc(),bc(),xc=new yc,Sc=class{getTracer(e,t,n){return this.getDelegateTracer(e,t,n)??new _c(this,e,t,n)}getDelegate(){return this._delegate??xc}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,n){return this._delegate?.getTracer(e,t,n)}}})),wc,Tc=n((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(wc||={})})),Ec,Dc=n((()=>{Hs(),Ec=Vs.getInstance()})),Oc,kc,Ac=n((()=>{Es(),Cc(),dc(),ic(),Ns(),Oc=`trace`,kc=class e{constructor(){this._proxyTracerProvider=new Sc,this.wrapSpanContext=lc,this.isSpanContextValid=cc,this.deleteSpan=ec,this.getSpan=Zs,this.getActiveSpan=Qs,this.getSpanContext=nc,this.setSpan=$s,this.setSpanContext=tc}static getInstance(){return this._instance||=new e,this._instance}setGlobalTracerProvider(e){let t=bs(Oc,this._proxyTracerProvider,Ms.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return xs(Oc)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){Ss(Oc,Ms.instance()),this._proxyTracerProvider=new Sc}}})),jc,Mc=n((()=>{Ac(),jc=kc.getInstance()})),Nc=n((()=>{Ns(),Is(),As(),vc(),Cc(),Tc(),Ws(),dc(),Js(),Dc(),Mc()}));function Pc(e){let t=e;for(let e=0;e<16;e++){if(t==null||t?._zod?.def?.shape!==void 0)return t;let e=t?._zod?.def?.innerType;if(e===void 0)return t;t=e}return t}function Fc(e,t){let n=e;for(let e of t){n=Pc(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function Ic(e,t){let n=Fc(e,t);if(n!==void 0)return yre(n)}const Lc=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 Rc(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).toUpperCase()}function zc(e){return`OK_${(e[0]===`server`?e.slice(1):e).map(Rc).join(`_`)}`}function Bc(e,t){if(t.length===0)return e.contents??null;let n=e.getIn(t,!0);if((0,Yt.isNode)(n))return n;for(let n=t.length-1;n>=0;n--){let r=e.getIn(t.slice(0,n),!0);if((0,Yt.isNode)(r))return r}return e.contents??null}function Vc(e,t){let n=1,r=1,i=Math.min(t,e.length);for(let t=0;t<i;t++)e.charCodeAt(t)===10?(n++,r=1):r++;return{line:n,column:r}}function Hc(e,t,n,r,i){let a=e.split(`
|
|
182
182
|
`),o=r-1;if(o<0||o>=a.length)return``;let s=a[o]??``,c=t-(i-1)+s.length,l=Math.max(1,Math.min(n,c)-t),u=[],d=String(o+2).length;for(let e=Math.max(0,o-1);e<=Math.min(a.length-1,o+1);e++){let t=e===o,n=t?`>`:` `,r=String(e+1).padStart(d,` `);if(u.push(`${n} ${r} | ${a[e]??``}`),t){let e=` `.repeat(2+d+3+i-1);u.push(`${e}${`^`.repeat(l)}`)}}return u.join(`
|
|
183
183
|
`)}function Uc(e){let t=Bc(e.doc,e.path);if(!t)return;let n=t.range;if(!n)return;let[r,,i=r]=n,{line:a,column:o}=Vc(e.source,r),s=(0,Yt.isCollection)(t)?Hc(e.source,r,r+1,a,o):Hc(e.source,r,i,a,o);return{file:e.file,line:a,column:o,snippet:s.length>0?s:void 0}}function Wc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Gc(e){let{value:t,file:n,source:r,doc:i}=e,a=[],o=(e,t)=>{if(t.length>0){let e=Ic(hs,t);if(e!==void 0){if(e.scope===`project-local`){let e=zc(t),o;i!=null&&r!=null&&n!=null&&(o=Uc({file:n,source:r,doc:i,path:t})),a.push({path:[...t],...Lc.has(e)?{envVar:e}:{},...o===void 0?{}:{source:o}})}return}}if(Wc(e))for(let[n,r]of Object.entries(e))o(r,[...t,n])};return o(t,[]),a}const Kc=B({file:F(),line:I().int().min(1),column:I().int().min(1),snippet:F().optional()}),qc=B({path:z(oo([F(),I()])),message:F(),issueCode:F(),params:V(F(),R()).optional(),source:Kc.optional()}),Jc=H([`user`,`project`,`project-local`,`either`]),Yc=H([`user`,`project`,`project-local`]),Xc=B({code:U(`YAML_PARSE`),detail:F()}),Zc=B({code:U(`UNREADABLE`),detail:F()}),Qc=B({code:U(`SCHEMA_INVALID`),issues:z(qc)}),$c=B({code:U(`REMOVED_KEY`),path:z(F()),redirect:F(),source:Kc.optional()}),el=so(`code`,[Xc,Qc,Zc,B({code:U(`SCOPE_VIOLATION`),path:z(F()),expectedScope:Jc,actualScope:Yc}),B({code:U(`NOT_AGENT_SETTABLE`),path:z(F())}),B({code:U(`MIXED_SCOPE`),paths:z(B({path:z(F()),scope:Yc}))}),$c,B({code:U(`WRITE_ERROR`),detail:F()}),B({code:U(`OKIGNORE_INVALID`),detail:F(),lineNumber:I().int().min(1).optional()}),B({code:U(`UNKNOWN`),message:F().optional()})]);so(`code`,[$c,Xc,Qc,Zc]),B({diagnostics:z(so(`code`,[B({code:U(`REMOVED_KEY`),scope:Yc,file:F(),path:z(F()),redirect:F()}),B({code:U(`YAML_PARSE`),scope:Yc,file:F()}),B({code:U(`SCHEMA_INVALID`),scope:Yc,file:F()}),B({code:U(`UNREADABLE`),scope:Yc,file:F()})]))});const tl=new Set(el.options.map(e=>e.shape.code.value)),nl=oo([el,io({code:F(),message:F().optional()})]);function rl(e){return tl.has(e.code)}function il(e){switch(e){case`user`:return`~/.ok/global.yml`;case`project`:return`.ok/config.yml`;case`project-local`:return`.ok/local/config.yml`;case`either`:return`.ok/config.yml or ~/.ok/global.yml`}}function al(e){switch(e){case`user`:return`personal to you, across all projects`;case`project`:return`shared with your team via git`;case`project-local`:return`this machine only, not shared`;case`either`:return`user or project`}}function ol(e){if(!rl(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`UNREADABLE`:return`Could not read the file: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
|
|
184
184
|
`))n.push(` ${e}`)}else n.push(` ${r}: ${t.message}`)}}return n.join(`
|
|
@@ -1520,6 +1520,6 @@ export default function okBridge(pi: {
|
|
|
1520
1520
|
`))}function A9(e,t){let n=S(e,`utf-8`);if(n.trim().length!==0)try{let r=O9(JSON.parse(n),t),i=n.endsWith(`
|
|
1521
1521
|
`)?`
|
|
1522
1522
|
`:``;ne(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=D9(n,t.contentDir);r!==n&&ne(e,r)}}function j9(e,t){let n=S(e,`utf-8`),r=D9(n,t.contentDir);r!==n&&ne(e,r)}function M9(e){try{return C(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>N(e,t.name))}catch{return[]}}const Fwe=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function N9(e){return/\.log\.\d+$/.test(e)}function Iwe(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||N9(e)}function Lwe(e){let t={contentDir:e.contentDir};for(let n of[`telemetry`,`logs`,`process`])for(let r of M9(N(e.stagingDir,n)))Iwe(r)?k9(r,t):r.endsWith(`.json`)?A9(r,t):j9(r,t);for(let n of M9(N(e.stagingDir,`state`))){let e=fe(n);n.endsWith(`.jsonl`)?k9(n,t):Fwe.has(e)?A9(n,t):j9(n,t)}}const P9=[`.ok`,`local`,`telemetry`],F9=[`.ok`,`local`,`logs`],I9=[`.ok`,`local`,`loss-capture`],L9=`spans-current.jsonl`,R9=`spans-prev.jsonl`,z9=`server-current.jsonl`,B9=`server-prev.jsonl`,V9=`loss-current.jsonl`,H9=`loss-prev.jsonl`;function Rwe(e){return N(e,...P9,L9)}function zwe(e){return N(e,...P9,R9)}function Bwe(e){return N(e,...F9,z9)}function Vwe(e){return N(e,...F9,B9)}function Hwe(e){return N(e,...I9,V9)}function Uwe(e){return N(e,...I9,H9)}const U9=1e3;async function Wwe(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(U9)});return t.ok?await t.text():null}catch{return null}}async function Gwe(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(U9)});return t.ok?await t.text():null}catch{return null}}async function Kwe(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(U9)});return t.ok?await t.text():null}catch{return null}}function qwe(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t.decisions;return Array.isArray(n)?n.length===0?``:`${n.map(e=>JSON.stringify(e)).join(`
|
|
1523
|
-
`)}\n`:null}catch{return null}}function Jwe(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=u(`git`,[`-C`,t,`log`,`--oneline`,`-50`],k3({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Ywe(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=u(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],k3({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function W9(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function Xwe(){return{nodeVersion:process.version,platform:k(),arch:ie()}}function Zwe(){return process.env.OTEL_SDK_DISABLED===`false`}function G9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function K9(e){if(!g(e))return{};let t;try{t=(0,Yt.parse)(S(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!G9(t))return{};let n=t.telemetry;if(!G9(n))return{};let r=n.localSink;return G9(r)?r:{}}function q9(e){return typeof e==`boolean`?e:void 0}function Qwe(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function J9(e){if(G9(e))return Qwe(e.maxBytes)}function $we(e){let t=K9(i$(`project`,e)),n=K9(i$(`project-local`,e));return{enabled:q9(n.enabled)??q9(t.enabled)??!0,spansMaxBytes:J9(n.spans)??J9(t.spans)??52428800,logsMaxBytes:J9(n.logs)??J9(t.logs)??26214400}}function eTe(e){return Ae(`sha256`).update(e).digest(`hex`)}function tTe(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function nTe(e){let t=S(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function Y9(e,t){if(!g(e))return!1;try{return v(pe(t),{recursive:!0}),m(e,t),!0}catch{return!1}}function X9(e){let t=[],n=e=>{let r=C(e,{withFileTypes:!0});for(let i of r){let r=N(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const rTe=new Set([`.jsonl`]);function Z9(e){let t=e.lastIndexOf(`.`);return t===-1?!1:rTe.has(e.slice(t))}const Q9=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function iTe(e){if(N9(e))return!0;let t=e.lastIndexOf(`.`);return t===-1?!1:Q9.has(e.slice(t))}function aTe(e){let t=[];for(let n of X9(e)){let r=$9(e,n);if(!iTe(r))continue;let{redacted:i,patterns:a,lineCount:o}=wo(S(n,`utf-8`));a.length!==0&&(ne(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function $9(e,t){return _e(e,t).split(ye).join(`/`)}async function oTe(e){let t=ve(e.contentDir),n=ve(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??Wwe,a=r.fetchAgentEffects??Gwe,o=r.fetchWatcherRecent??Kwe,s=r.readShadowHead??Jwe,c=r.readCheckpointRefs??Ywe,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.59.0-beta.
|
|
1523
|
+
`)}\n`:null}catch{return null}}function Jwe(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=u(`git`,[`-C`,t,`log`,`--oneline`,`-50`],k3({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Ywe(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=u(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],k3({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function W9(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function Xwe(){return{nodeVersion:process.version,platform:k(),arch:ie()}}function Zwe(){return process.env.OTEL_SDK_DISABLED===`false`}function G9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function K9(e){if(!g(e))return{};let t;try{t=(0,Yt.parse)(S(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!G9(t))return{};let n=t.telemetry;if(!G9(n))return{};let r=n.localSink;return G9(r)?r:{}}function q9(e){return typeof e==`boolean`?e:void 0}function Qwe(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function J9(e){if(G9(e))return Qwe(e.maxBytes)}function $we(e){let t=K9(i$(`project`,e)),n=K9(i$(`project-local`,e));return{enabled:q9(n.enabled)??q9(t.enabled)??!0,spansMaxBytes:J9(n.spans)??J9(t.spans)??52428800,logsMaxBytes:J9(n.logs)??J9(t.logs)??26214400}}function eTe(e){return Ae(`sha256`).update(e).digest(`hex`)}function tTe(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function nTe(e){let t=S(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function Y9(e,t){if(!g(e))return!1;try{return v(pe(t),{recursive:!0}),m(e,t),!0}catch{return!1}}function X9(e){let t=[],n=e=>{let r=C(e,{withFileTypes:!0});for(let i of r){let r=N(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const rTe=new Set([`.jsonl`]);function Z9(e){let t=e.lastIndexOf(`.`);return t===-1?!1:rTe.has(e.slice(t))}const Q9=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function iTe(e){if(N9(e))return!0;let t=e.lastIndexOf(`.`);return t===-1?!1:Q9.has(e.slice(t))}function aTe(e){let t=[];for(let n of X9(e)){let r=$9(e,n);if(!iTe(r))continue;let{redacted:i,patterns:a,lineCount:o}=wo(S(n,`utf-8`));a.length!==0&&(ne(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function $9(e,t){return _e(e,t).split(ye).join(`/`)}async function oTe(e){let t=ve(e.contentDir),n=ve(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??Wwe,a=r.fetchAgentEffects??Gwe,o=r.fetchWatcherRecent??Kwe,s=r.readShadowHead??Jwe,c=r.readCheckpointRefs??Ywe,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.59.0-beta.14`),d=r.readDesktopEnv??W9,f=r.readLanguage??E9,p=r.readRuntime??Xwe,h=r.isOtlpPushEnabled??Zwe,_=y(N(le(),`ok-bundle-`));try{v(N(_,`telemetry`),{recursive:!0}),v(N(_,`logs`),{recursive:!0}),v(N(_,`state`),{recursive:!0}),Y9(Rwe(n),N(_,`telemetry`,L9)),Y9(zwe(n),N(_,`telemetry`,R9)),Y9(Bwe(n),N(_,`logs`,z9)),Y9(Vwe(n),N(_,`logs`,B9));for(let t of e.userLogFiles??[])Y9(t,N(_,`logs`,fe(t)));let y=N(n,`.ok`,`local`),b=N(y,`server.lock`),x=`not-running`,C=`no server.lock`,w=null;if(g(b)){Y9(b,N(_,`state`,`server.lock`));try{let e=S(b,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?w=t.port:C=`lock present but no port`}catch{C=`lock present but unparseable`}}if(w!==null){let e=await i(w);e===null?C=`agent-presence endpoint at :${w} unreachable`:(ne(N(_,`state`,`agent-presence.json`),e),x=`running`,C=``);let t=await a(w);t!==null&&ne(N(_,`state`,`agent-effects.json`),t);let n=await o(w);if(n!==null){let e=qwe(n);e!==null&&ne(N(_,`state`,`watcher-recent.jsonl`),e)}}let T=s(t);T!==null&&ne(N(_,`state`,`shadow-head.txt`),T);let E=c(t);E!==null&&ne(N(_,`state`,`checkpoint-refs.txt`),E),Y9(Hwe(n),N(_,`state`,V9)),Y9(Uwe(n),N(_,`state`,H9)),Y9(N(y,`last-spawn-error.log`),N(_,`state`,`last-spawn-error.log`)),Y9(N(y,uX),N(_,`state`,uX)),Y9(N(y,dX),N(_,`state`,dX));let te=p(),re=d(),ie=f(),ae={ok:{version:u(),nodeVersion:te.nodeVersion,platform:te.platform,arch:te.arch},host:{desktop:re,language:ie}};ne(N(_,`state`,`runtime.json`),`${JSON.stringify(ae,null,2)}\n`);let oe=x===`running`?`running
|
|
1524
1524
|
`:`not-running (${C})\n`;if(ne(N(_,`state`,`server-status.txt`),oe),e.processDir&&g(e.processDir)){let t=N(_,`process`);v(t,{recursive:!0}),m(e.processDir,t,{recursive:!0})}let O=e.redact===!0;O&&Lwe({stagingDir:_,contentDir:t}),e.note&&ne(N(_,`note.txt`),e.note);let se=null;e.scrubSecrets===!0&&(se=aTe(_));for(let t of e.extraFiles??[])Y9(t.sourcePath,N(_,`extra`,t.zipName??fe(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let k=$we(n),ce=X9(_),le=[],ue=0,A=0;for(let e of ce){let t=$9(_,e),n=ee(e).size,r=Z9(t)?tTe(e):0;le.push({path:t,bytes:n,lines:r}),ue+=n,t.startsWith(`telemetry/`)&&Z9(t)&&(A+=nTe(e))}let j={applied:O};se!==null&&(j.secretScrub=se);let de={schemaVersion:2,createdAt:l().toISOString(),ok:{version:u(),nodeVersion:te.nodeVersion,platform:te.platform,arch:te.arch},host:{desktop:re,language:ie},contentDir:{pathSha256:eTe(t),absolutePath:O?`<CONTENT_DIR>`:t},telemetry:{localSink:k,otlpPushEnabled:h()},redaction:j,serverStatus:x,files:le};ne(N(_,`manifest.json`),`${JSON.stringify(de,null,2)}\n`);let pe=ce.some(e=>{try{return S(e,`utf-8`).includes(t)}catch{return!1}}),me={totalBytes:ue,fileCount:le.length,docNameCount:A,contentDirVisible:pe,redacted:O},M=!1;return{stagingDir:_,manifest:de,summary:me,cleanup:()=>{M||(M=!0,D(_,{recursive:!0,force:!0}))}}}catch(e){throw D(_,{recursive:!0,force:!0}),e}}async function sTe(e){let{collected:t,outputPath:n}=e,r=pe(n);if(!g(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new Fye.ZipFile,a=X9(t.stagingDir);for(let e of a){let n=$9(t.stagingDir,e);i.addFile(e,n)}i.end();let o=h(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function cTe(e,t){let n=N(e,`.ok`,`config.yml`);if(g(n))try{let t=(0,Yt.parse)(S(n,`utf-8`)),r=P7(t)?t.content:void 0,i=P7(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return ve(e,i)}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return ve(e)}async function lTe(e,t,n,r){let i=d9(t,e.logger),a=await oTe({contentDir:cTe(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...awe(i,e.userLogsDir??N(O(),`.ok`,`logs`)),...p9(e.cachesDir??N(O(),`Library`,`Caches`))],deps:{readDesktopEnv:n,readLanguage:r,logger:e.logger}});try{v(pe(e.outputPath),{recursive:!0}),await sTe({collected:a,outputPath:e.outputPath});let t=a.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:i,files:a.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:a.manifest.createdAt}}}finally{a.cleanup()}}async function uTe(e){let{projectDir:t}=e,n=e.readDesktopEnv??W9,r=e.readLanguage??E9;if(e.level===`full`&&t!==void 0)return lTe(e,t,n,r);let{zipPath:i,summary:a}=await lwe({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,shipItLogFiles:p9(e.cachesDir??N(O(),`Library`,`Caches`)),logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n(),language:r()});return{zipPath:i,summary:{level:e.level,systemWide:t===void 0,projectSlug:a.projectSlug,files:a.files,redactions:a.redactions,redactedLineCount:a.redactedLineCount,generatedAt:a.generatedAt}}}export{V5 as ALL_EDITOR_IDS,H5 as EDITOR_LABELS,c7 as EDITOR_TARGETS,uSe as HOSTS_WITH_USER_SKILL_DIR,YCe as LAUNCH_CONFIG_NAME,wwe as PATH_SHIM_BEGIN,Ewe as PATH_SHIM_BLOCK_RE,Twe as PATH_SHIM_END,OCe as addOkPathsToGitExclude,E7 as assertProjectPathSafe,Z5 as buildManagedServerEntry,hwe as buildMcpConfigDeclineEvent,gwe as buildMcpConfigMigrateEvent,l9 as classifyExistingMcpEntry,uTe as collectReportBundle,$t as createTokenStore,nwe as defaultBugReportZipPath,Be as detectGh,ewe as detectInstalledEditors,wSe as editorConfigPathDisplay,CSe as editorEntryLocator,U7 as formatTrackedRemediation,jCe as getExcludedOkPaths,DCe as getNativeTomlMcpEditor,V7 as getOkArtifactPaths,Y5 as isEntryUpToDate,Q5 as isOwnManagedEntry,xwe as loadConfig,fee as makeLazyProbeTokenStore,u9 as okBugReportsDir,S9 as parseGitHubBlobUrl,Swe as parseGitHubShareUrl,C9 as parseGitHubTreeUrl,x9 as parseGitUrl,Dwe as pathInstallMarkerPath,iCe as previewContent,twe as probeOwnManagedEditorMcpEntry,H7 as probeTrackedOkPaths,s9 as readExistingMcpEntry,ACe as readSharingMode,MCe as readSkillsShared,wo as redactContent,kCe as removeOkPathsFromGitExclude,dwe as removeOwnMcpEntry,gCe as removeProjectSkill,kwe as removeUserGlobalSkillBundle,fCe as resolveProjectRoot,ywe as runStop,NCe as setSkillsShared,v9 as truncatePriorEntry,T9 as userGlobalSkillBundleTargets,Cwe as validateLocalFolderForShare,o9 as writeEditorMcpConfig,Mwe as writeProjectAiIntegrations,k7 as writeProjectSkill,$Ce as writeUserMcpConfigs};
|
|
1525
1525
|
//# sourceMappingURL=index.mjs.map
|