@inkeep/open-knowledge 0.88.10-beta.0 → 0.88.11-beta.0
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/{cli-UjiLdpRk.mjs → cli-CKiNxYDi.mjs} +57 -57
- package/dist/cli.mjs +1 -1
- package/dist/config-schema.json +25 -0
- package/dist/config.user.schema.json +25 -0
- package/dist/constants-COUZx5WC.mjs +1 -0
- package/dist/dist-BSNy29T3.mjs +2326 -0
- package/dist/dist-Bfg_JABr.mjs +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +343 -245
- package/dist/init-D4jlORuT.mjs +1 -0
- package/dist/{init-BJM0tqDo.mjs → init-DZf66ZMB.mjs} +8 -8
- package/dist/{launch-json-removal-DzsPe2PB.mjs → launch-json-removal-Bnn4Q8Q5.mjs} +1 -1
- package/dist/{loader-DIQF01bS.mjs → loader-CQWLo5wb.mjs} +1 -1
- package/dist/loader-CYqRMGXq.mjs +1 -0
- package/dist/{lzma-B6QS2aZK.mjs → lzma-Ciwelb1t.mjs} +2 -2
- package/dist/{md-manager-BGnqyqi1-B5Gyjk_N.mjs → md-manager-BGnqyqi1-DCCfgLfC.mjs} +142 -143
- package/dist/{open-browser-kL892VYi.mjs → open-browser-Bb2-wy79.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-CMjmNRLt.mjs +1 -0
- package/dist/{preview-DHNV39t9.mjs → preview-UtmI_Kbo.mjs} +1 -1
- package/dist/public/assets/{AccountSection-CxiGTQvT.js → AccountSection-92kzeYSz.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-CsJLWo7P.js → ActivityModeContent-c0yIlei6.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-DDSKy0hZ.js → AddPropertiesButton-CD7DFmk4.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-BTwm5dPg.js → AgentDiffPane-Qdw4whsW.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-D--8u15R.js → AttachmentsSection-DkrZOM4_.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-Ba_sHgAe.js → CodeMirrorPropInput-BGz-GQYy.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-CPWHfaPG.js → ContentRulesSection-Cp7WxUGq.js} +1 -1
- package/dist/public/assets/{DocumentContext-1lgfWMNj.js → DocumentContext-Oflbu4n0.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-Bo9FdfPJ.js → EditorModeToggle-DbRqwAo8.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-DT3l4Tga.js → ExcalidrawDocEditor-BB3VQ-A5.js} +1 -1
- package/dist/public/assets/FeedbackForm-BE3p6ea8.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-DTrqagnm.js → ImportSkillDialog-CgLt_Ckj.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-BWQDpXpm.js → LinkPreviewsSection-Ba0s74kx.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BF-mVtyQ.js → LintConfigEditor-BtsBpxqx.js} +1 -1
- package/dist/public/assets/{LintingSection-Cfhf0DPw.js → LintingSection-BWGxasTk.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DEfWLrVU.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-D54iCwKr.js → ManagedArtifactProperties-FdKNrPr-.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-jLrjFhuK.js → MermaidDocEditor-D_MVfawW.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-B3PxlFUV.js → NetworkAccessSection-x1p6MRDS.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-p7m1gH00.js → PropertyDisplayRow-hkfIbJsU.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-BldOZlur.js → PublishToGitHubDialog-CWp9_6sQ.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-CQPB_KVk.js → SchemaConfigEditor-DES1MqTn.js} +1 -1
- package/dist/public/assets/{SearchSection-FjgJ4pYB.js → SearchSection-DaAoqTaY.js} +1 -1
- package/dist/public/assets/{SessionsHost-C0CPsloP.js → SessionsHost-BWqLoT8o.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-DA80GTbj.js → SettingsDialogBody-_2UYxQzL.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-CwR5P3yc.js → ShareReceiveMissDialog-DsAhOXOf.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-C-BIZRfC.js → SkillToolbarControls-CxIhFxut.js} +1 -1
- package/dist/public/assets/{SourceEditor-C9fqzm-Y.js → SourceEditor-CmyXOjyo.js} +1 -1
- package/dist/public/assets/{SpellingSettings-BnekUXi0.js → SpellingSettings-aGM4YFpK.js} +1 -1
- package/dist/public/assets/{SyncSection-Bt4ojTQx.js → SyncSection-DKwcggD4.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-DaTGToC4.js → SyncStatusBadge-C3yXqn1g.js} +1 -1
- package/dist/public/assets/{TerminalSection-CYA0yx66.js → TerminalSection-Df2_OUq4.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-BH1UHA-h.js → TerminalWindowApp-BsaMrWLk.js} +1 -1
- package/dist/public/assets/{TextDocEditor-BjrgE8Or.js → TextDocEditor-lseiNuoW.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-htJshVsF.js → ThemePluginSection-DdSQUUtI.js} +1 -1
- package/dist/public/assets/{ThreadView-Cc9oztDV.js → ThreadView-OZ2uZOIE.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-Q8VQLhyd.js → TimelineDiffPane-WxFbMDQS.js} +1 -1
- package/dist/public/assets/{client-version-BhRx5eCh.js → client-version-CY6vMdzi.js} +1 -1
- package/dist/public/assets/{comment-chips-CLGtIfZO.js → comment-chips-CGZDgzW5.js} +1 -1
- package/dist/public/assets/config-provider-pJEK9WCI.js +4 -0
- package/dist/public/assets/config-schema-DM88r6Wp.js +1 -0
- package/dist/public/assets/{doc-undo-manager-C-fYUKyc.js → doc-undo-manager-BJwKYuHY.js} +1 -1
- package/dist/public/assets/{field-controls-uK27_e3u.js → field-controls-C_sis3h8.js} +1 -1
- package/dist/public/assets/field-controls-Cl0fMM5C.js +1 -0
- package/dist/public/assets/{index-CYBoRjkk.js → index-CUM2b-vl.js} +107 -107
- package/dist/public/assets/{lint-config-client-D7WzQSDg.js → lint-config-client-CZ22hfd5.js} +1 -1
- package/dist/public/assets/{lint-plugins-Cn2uC583.js → lint-plugins-C3d0yJ4F.js} +1 -1
- package/dist/public/assets/{markdown-lint-DwFRnZJ_.js → markdown-lint-D13AGXjm.js} +2 -2
- package/dist/public/assets/{markdownlint-rule-browser-DBy2EH_P.js → markdownlint-rule-browser-mf_8la30.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-fES-up-c.js → pending-receive-nav-store-CqX4bHwr.js} +1 -1
- package/dist/public/assets/{preferred-session-events-l03sDUdz.js → preferred-session-events-BYPsTTfd.js} +1 -1
- package/dist/public/assets/{progress-BPvowhCv.js → progress-ChjxM4dF.js} +1 -1
- package/dist/public/assets/saved-themes-client-B4QZmuf_.js +1 -0
- package/dist/public/assets/{schema-section-Cp00yQR2.js → schema-section-BaOibm8x.js} +1 -1
- package/dist/public/assets/{selection-context-BkLEsaBu.js → selection-context-Cub1fE1T.js} +1 -1
- package/dist/public/assets/{src-BeGsSfov.js → src-DewQmhy5.js} +1 -1
- package/dist/public/assets/{telemetry-impl-B1MY97_o.js → telemetry-impl-CaqdOBmg.js} +1 -1
- package/dist/public/assets/{telemetry-startup-Ch1mOkK0.js → telemetry-startup-DNHafhpO.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-xkhkpi6D.js → typing-burst-detector-C0UhTw8o.js} +1 -1
- package/dist/public/assets/{use-activity-panel-B7tFs2_j.js → use-activity-panel-BHSrXZXF.js} +1 -1
- package/dist/public/assets/{use-open-skill-7Fj64f1d.js → use-open-skill-DrtR4XOY.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-Dsp6_rSS.js → use-terminal-enabled-CSFlSWPT.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DZpZNVqQ.js → use-timeline-entry-diff-VsPbMLbd.js} +1 -1
- package/dist/public/index.html +22 -22
- package/dist/{registry-probes-ki_xxXZ3.mjs → registry-probes-DIqlo9h8.mjs} +2 -2
- package/dist/{removal-file-path-DwHGP18a.mjs → removal-file-path-wBKXFJo1.mjs} +1 -1
- package/dist/{repair-launch-json-tEr9u8zZ.mjs → repair-launch-json-24ZgLMF1.mjs} +1 -1
- package/dist/{repair-mcp-configs-DmDI3tPM.mjs → repair-mcp-configs-euqladvH.mjs} +1 -1
- package/dist/schemas/v0/config.user.schema.json +25 -0
- package/dist/src-DEXULBC-.mjs +1 -0
- package/dist/src-DKsIGYJ_.mjs +16 -0
- package/dist/{start-nOmb3qwo.mjs → start-9N2SMPQM.mjs} +3 -3
- package/dist/start-CJj6tAZ-.mjs +1 -0
- package/dist/{tar-MZQD7NO4-ljX84Spn.mjs → tar-MZQD7NO4-D-JBnhvQ.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-BJdBF6qC.mjs +0 -1
- package/dist/dist-By4Q8HCV.mjs +0 -2227
- package/dist/dist-Ttulen40.mjs +0 -1
- package/dist/init-NviVfKX0.mjs +0 -1
- package/dist/loader-BF6xIB9H.mjs +0 -1
- package/dist/preview-BJIs-Agv.mjs +0 -1
- package/dist/public/assets/FeedbackForm-DmOvYi4E.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-D27yWRpD.js +0 -1
- package/dist/public/assets/config-provider-4A-Qi_lD.js +0 -4
- package/dist/public/assets/config-schema-BFeDYLCd.js +0 -1
- package/dist/public/assets/field-controls-lq4qcuvr.js +0 -1
- package/dist/public/assets/saved-themes-client-DX5dCXi5.js +0 -1
- package/dist/src-CIcIgMv1.mjs +0 -16
- package/dist/src-aQblTkIp.mjs +0 -1
- package/dist/start-DQR1IbHI.mjs +0 -1
package/dist/src-CIcIgMv1.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-tZXQYakl.mjs";import{C as t,E as n,L as r,M as i,N as a,O as o,S as s,d as c,k as l,x as u}from"./constants-ok-dir-DZ25OS9-.mjs";import{Da as d,G as f,Gl as p,Kl as m,Oa as h,Qc as g,U as _,W as v,Yc as y,el as b,l as x,mf as S,nl as ee,tl as te,u as ne}from"./md-manager-BGnqyqi1-B5Gyjk_N.mjs";import{$r as C,As as w,Cs as T,Es as re,Hi as ie,Ia as E,Is as D,Nt as O,Os as ae,Qt as oe,Si as k,Ss as se,Vo as A,Wi as j,_a as M,bi as N,ci as P,fr as ce,js as F,ks as le,m as ue,ma as de,mi as fe,nr as I,ta as pe,wi as me,ws as he,xi as ge,xo as _e,xs as ve}from"./dist-By4Q8HCV.mjs";import{t as ye}from"./yazl-BBz29IQN.mjs";import{t as be,y as xe}from"./fs-find-project-root-BYV07wjn.mjs";import{ct as Se,gt as Ce,ht as we,mt as Te,pt as Ee,st as De,wt as Oe}from"./init-BJM0tqDo.mjs";import{o as ke}from"./token-store-Bmb3_0hU.mjs";import{c as Ae}from"./colors-r_owlCuY.mjs";import{t as je}from"./is-object-BGze3w87.mjs";import{l as Me,u as Ne}from"./registry-probes-ki_xxXZ3.mjs";import{n as Pe}from"./constants-BJdBF6qC.mjs";import"./loader-DIQF01bS.mjs";import"./preview-DHNV39t9.mjs";import{basename as L,dirname as R,isAbsolute as Fe,join as z,relative as Ie,resolve as B,sep as V,win32 as Le}from"node:path";import{closeSync as Re,cpSync as ze,createWriteStream as Be,existsSync as H,lstatSync as Ve,mkdirSync as U,mkdtempSync as He,openSync as Ue,readFileSync as W,readSync as We,readdirSync as G,readlinkSync as Ge,realpathSync as Ke,rmSync as qe,rmdirSync as Je,statSync as Ye,writeFileSync as K}from"node:fs";import{arch as Xe,freemem as Ze,homedir as q,hostname as Qe,platform as $e,release as et,tmpdir as tt,totalmem as nt,type as rt,uptime as it}from"node:os";import{readFile as at,readdir as ot,stat as st}from"node:fs/promises";import{createHash as ct}from"node:crypto";import{execFile as lt,execSync as ut,spawnSync as dt}from"node:child_process";function ft(e,t){let n=t.map(e=>[D(e),e]);for(let t of e){let e=D(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function pt(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=ft([t],i);if(e!==void 0)return{locale:e,source:`override`}}if(n!==void 0&&n!==`system`&&i.includes(n))return{locale:n,source:`explicit`};let o=ft(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}function mt(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return`unknown`;let r=Math.floor(Math.max(0,t-n)/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}const ht=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`audit`,`deinit`,`auth`]);function gt(e,t,n=be){if(e!==void 0&&!ht.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let _t=null;function vt(e){_t=e}function yt(){return _t??process.cwd()}const bt=`Open Knowledge`;function xt(e={}){let t=e.platformName??process.platform,n=e.productName??l().productName;return De(t).join(Se({...e,platformName:t}),n)}function St(e={}){let t=e.platformName??process.platform,n=e.home??q(),r=e.env??process.env,i=De(t),a;return a=t===`win32`?r.LOCALAPPDATA||i.join(n,`AppData`,`Local`):t===`darwin`?i.join(n,`Library`,`Caches`):r.XDG_CACHE_HOME||i.join(n,`.cache`),i.join(a,`${l().packageName.replaceAll(`/`,``)}-updater`)}function Ct(e){if(typeof e!=`object`||!e)return null;let t=e.recentProjects;if(!Array.isArray(t))return null;let n=[];for(let e of t){if(typeof e!=`object`||!e)continue;let t=e;typeof t.path==`string`&&typeof t.name==`string`&&n.push({path:t.path,name:t.name})}return n}function wt(e){let t=z(e,`state.json`);if(!H(t))return[];let n;try{n=JSON.parse(W(t,`utf-8`))}catch{return[]}return Ct(n)??[]}function Tt(e){let t=z(e,`state.json`);if(!H(t))return!1;try{return Ct(JSON.parse(W(t,`utf-8`)))!==null}catch{return!1}}const Et=8192;function Dt(e,t){if(e.outcome===`not-present`)return`not-present (no DiagnosticReports directory)`;if(e.outcome===`unreadable-directory`)return`unreadable (${e.directoryErrorCode??`unknown`} reading DiagnosticReports)`;let n=[`${e.windowDays}d`,`${e.foreignIgnored} other-process report(s) ignored`,`${e.unparseable} unparseable`];e.droppedOverCap>0&&n.push(`${e.droppedOverCap} older dropped over cap`);let r=e.files.length-t;return r>0&&n.push(`${r} vanished before staging`),e.outcome===`none-in-window`?`none found in window (${n.join(`; `)})`:`${t} collected (${n.join(`; `)})`}function Ot(e){return e.replace(/\\+\/?/g,e=>{if(!e.endsWith(`/`))return e;let t=e.length-1;return`${`\\`.repeat(t-t%2)}/`})}const kt=RegExp(`("(?:${[`crashReporterKey`,`bootSessionUUID`,`deviceIdentifierForVendor`].join(`|`)})"\\s*:\\s*)"[^"]*"`,`g`);function At(e){return e.replace(kt,`$1"[REDACTED-DEVICE-ID]"`)}function jt(e){return At(Ot(e))}const Mt=/^(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})(\.\d+)? ([+-]\d{2})(\d{2})$/;function Nt(e){if(typeof e!=`string`)return null;let t=Mt.exec(e.trim());if(t===null)return null;let[,n,r,i=``,a,o]=t,s=Date.parse(`${n}T${r}${i}${a}:${o}`);return Number.isNaN(s)?null:s}function Pt(e){let t=Ue(e,`r`);try{let e=Buffer.alloc(Et),n=0,r=!1;for(;n<Et;){let i=We(t,e,n,Et-n,n);if(i===0){r=!0;break}let a=n;n+=i;let o=e.subarray(0,n).indexOf(10,a);if(o!==-1)return e.subarray(0,o).toString(`utf-8`)}return r?e.subarray(0,n).toString(`utf-8`):null}finally{Re(t)}}function Ft(e){try{let t=Pt(e);if(t===null)return{kind:`unreadable`};let n=JSON.parse(t);if(typeof n!=`object`||!n)return{kind:`unreadable`};let{name:r,app_name:i,timestamp:a}=n,o=typeof r==`string`?r:typeof i==`string`?i:null;return o===null?{kind:`unreadable`}:{kind:`named`,name:o,timestampMs:Nt(a)}}catch{return{kind:`unreadable`}}}function It(e){return e===`OpenKnowledge`||e.startsWith(`OpenKnowledge `)}function Lt(e,t){let n={files:[],foreignIgnored:0,unparseable:0,droppedOverCap:0,windowDays:7},r;try{r=G(e,{withFileTypes:!0})}catch(e){let t=e.code;return t===`ENOENT`?{...n,outcome:`not-present`}:{...n,outcome:`unreadable-directory`,directoryErrorCode:t??`unknown`}}let i=t.getTime()-6048e5,a=[],o=0,s=0;for(let t of r){if(!t.isFile()||!t.name.endsWith(`.ips`))continue;let n=z(e,t.name),r;try{r=Ye(n).mtimeMs}catch{continue}if(r<i)continue;let c=Ft(n),l=c.kind===`named`&&c.timestampMs!==null?c.timestampMs:r;if(c.kind===`unreadable`){s+=1;continue}if(!It(c.name)){o+=1;continue}a.push({path:n,atMs:l})}a.sort((e,t)=>t.atMs-e.atMs);let c=a.slice(0,25),l={foreignIgnored:o,unparseable:s,droppedOverCap:a.length-c.length,windowDays:7};return c.length===0?{...l,files:[],outcome:`none-in-window`}:{...l,files:c.map(e=>e.path),outcome:`collected`}}const Rt=`state/os-termination-evidence.json`,zt=6048e5,Bt=/openknowledge/i,Vt=n.map(e=>a(t[e]));function Ht(e={}){return(t,n)=>new Promise(r=>{try{lt(t,n,{encoding:`utf8`,timeout:e.timeoutMs??15e3,maxBuffer:e.maxBuffer??16777216,windowsHide:!0},(e,t,n)=>{r({...Ut(e),stdout:t,stderr:n})})}catch(e){let t=e.code;r({status:null,stdout:``,stderr:``,errorCode:typeof t==`string`?t:`spawn-failed`})}})}function Ut(e){return e===null?{status:0}:typeof e.code==`string`?{status:null,errorCode:e.code}:typeof e.code==`number`?{status:e.code}:e.killed===!0?{status:null,errorCode:`ETIMEDOUT`}:e.signal?{status:null,signal:e.signal}:{status:null}}function Wt(e){if(e.errorCode!==void 0)return e.errorCode;if(e.signal!==void 0)return`signal ${e.signal}`;let t=(e.stderr.trim().split(`
|
|
2
|
-
`)[0]??``).replace(/\S*\/journal\/\S*/g,`<journal path>`).replace(/\b[0-9a-f]{32}\b/gi,`<id>`);return`exit ${e.status}${t===``?``:`: ${t}`}`}function J(e,t,n){return{schemaVersion:1,platform:e,source:t,outcome:`none-in-window`,readFrom:n,windowDays:7,foreignIgnored:0,unparseable:0,droppedOverCap:0,events:[]}}function Gt(e,t){return{...e,outcome:`unavailable`,unavailableReason:t}}function Kt(e){return{...e,outcome:e.events.length>0?`collected`:`none-in-window`}}function qt(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Jt(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function Yt(e,t){let n=t.indexOf(`
|
|
3
|
-
`);if(n===-1)return null;let r,i;try{r=Jt(JSON.parse(t.slice(0,n))),i=Jt(JSON.parse(t.slice(n+1)))}catch{return null}if(r===null||i===null||!Array.isArray(i.processes))return null;let a=[];for(let e of i.processes){let t=Jt(e);t===null||typeof t.name!=`string`||!It(t.name)||a.push({name:t.name,pid:qt(t.pid),killReason:typeof t.reason==`string`?t.reason:null,residentPages:qt(t.rpages),lifetimeMaxPages:qt(t.lifetimeMax)})}let o=Nt(r.timestamp);return{kind:`jetsam`,at:o===null?null:new Date(o).toISOString(),file:e,pageSize:qt(Jt(i.memoryStatus)?.pageSize),largestProcessOwned:typeof i.largestProcess==`string`?It(i.largestProcess):null,ownedProcesses:a}}const Xt=/^JetsamEvent-.*\.ips$/;function Zt(e,t,n,r){let i=e.flatMap(({file:e,mtimeMs:n})=>n!==null&&n>=t?[{file:e,mtimeMs:n}]:[]);return i.sort((e,t)=>r===`newest-first`?t.mtimeMs-e.mtimeMs:e.mtimeMs-t.mtimeMs),{files:i.slice(0,n).map(({file:e})=>e),statFailed:e.filter(({mtimeMs:e})=>e===null).length,droppedOverCap:Math.max(0,i.length-n)}}async function Qt(e,t){let n=J(`darwin`,`macos-jetsam`,[z(e,`JetsamEvent-*.ips`)]),r;try{r=await ot(e)}catch(e){return Gt(n,e.code??`unknown`)}let i=Zt(await Promise.all(r.filter(e=>Xt.test(e)).map(async t=>{try{return{file:t,mtimeMs:(await st(z(e,t))).mtimeMs}}catch{return{file:t,mtimeMs:null}}})),t.getTime()-zt,50,`newest-first`);n.unparseable+=i.statFailed,n.droppedOverCap=i.droppedOverCap;for(let t of i.files){let r=null;try{r=Yt(t,await at(z(e,t),`utf8`))}catch{}r===null?n.unparseable+=1:r.ownedProcesses.length===0?n.foreignIgnored+=1:n.events.push(r)}return Kt(n)}const $t=[`--no-pager`,`--output=short-iso-precise`,`--since=-7d`,`--grep=Out of memory|oom-kill|Killed process|Killed /|memory pressure`,`_TRANSPORT=kernel`,`+`,`_SYSTEMD_UNIT=systemd-oomd.service`],en=[`--user`,`--no-pager`,`--output=short-iso-precise`,`--since=-7d`,`--grep=Fatal Wayland communication error|Wayland protocol error|X IO error|Missing X server`],tn=/^(\S+) \S+ ([^:\s[]+)(?:\[\d+\])?: (.*)$/,nn=/\[(\d+)(?::\d+)?:\d{4}\/\d{6}\.\d+:[A-Z0-9]+:[^\]]*\]\s*(.*)$/,rn=/^desktop\.\d{4}-\d{2}-\d{2}\.log$/;async function an(e,t){let n=new Set,r;try{r=await ot(e)}catch{return{pids:n,unreadable:!0}}let i=!1;for(let a of r){if(!rn.test(a))continue;let r=z(e,a);try{if(t.getTime()-(await st(r)).mtimeMs>zt)continue;for(let e of(await at(r,`utf8`)).split(`
|
|
4
|
-
`)){if(!e.includes(`"event":"desktop.boot"`))continue;let t=/"pid":(\d+)/.exec(e)?.[1];t!==void 0&&n.add(Number(t))}}catch{i=!0}}return{pids:n,unreadable:i}}function on(e,t){if(e===`systemd-oomd`){let e=/^Killed (\S+)/.exec(t);if(e===null)return null;let n=e[1]?.split(`/`).pop()??``;return{origin:`systemd-oomd`,action:`oomd-kill`,pid:null,processName:null,unit:Bt.test(n)?n:null,trigger:/swap used/.test(t)?`swap`:/memory pressure/.test(t)?`memory-pressure`:null}}if(e!==`kernel`)return null;let n=/Killed process (\d+) \(([^)]+)\)/.exec(t);if(n!==null)return{origin:`kernel`,action:`oom-kill`,pid:Number(n[1]),processName:n[2]??null,unit:null,trigger:null};let r=/task=([^,]+),pid=(\d+)/.exec(t);if(r!==null)return{origin:`kernel`,action:`oom-kill`,pid:Number(r[2]),processName:r[1]??null,unit:null,trigger:null};let i=/^(\S+) invoked oom-killer/.exec(t);return i===null?null:{origin:`kernel`,action:`oom-invoked`,pid:null,processName:i[1]??null,unit:null,trigger:null}}function sn(e){let t=[],n=0,r=0;for(let i of e.split(`
|
|
5
|
-
`)){if(i.trim()===``||i.startsWith(`-- `))continue;let e=tn.exec(i);if(e===null){r+=1;continue}let[,a=``,o=``,s=``]=e;if(!Bt.test(s)){n+=1;continue}let c=on(o,s);if(c===null){r+=1;continue}t.push({kind:`journal`,at:a,...c})}return{events:t,foreignIgnored:n,unparseable:r}}function cn(e){let t=[],n=0,r=0;for(let i of e.split(`
|
|
6
|
-
`)){if(i.trim()===``||i.startsWith(`-- `))continue;let e=tn.exec(i);if(e===null){r+=1;continue}let[,a=``,,o=``]=e,s=nn.exec(o);if(s===null){n+=1;continue}t.push({at:a,pid:Number(s[1]),detail:(s[2]??``).slice(0,200)})}return{lines:t,foreignIgnored:n,unparseable:r}}async function ln(e,t,n){let r=cn(e);if(r.lines.length===0)return{...r,events:[],unattributed:null};let i=await an(t,n),a=[],o=0;for(let e of r.lines){if(!i.pids.has(e.pid)){o+=1;continue}a.push({kind:`journal`,at:e.at,origin:`chromium`,action:`display-connection-lost`,pid:e.pid,processName:null,unit:null,trigger:/Wayland/.test(e.detail)?`wayland`:`x11`,detail:e.detail})}let s=i.pids.size>0&&!i.unreadable;if(o>0&&!s){let e=i.unreadable?`desktop logs unreadable`:`no desktop.boot pid in desktop logs`;return{events:a,foreignIgnored:r.foreignIgnored,unparseable:r.unparseable,unattributed:`${o} Chromium display line(s) not attributed, ${e}`}}return{events:a,foreignIgnored:r.foreignIgnored+o,unparseable:r.unparseable,unattributed:null}}function un(e){return e.status===0||e.status===1&&/^-- No entries --$/m.test(e.stdout)}async function dn(e,t,n){let r=J(`linux`,`linux-journal`,[`journalctl ${$t.join(` `)}`,`journalctl ${en.join(` `)}`]),[i,a]=await Promise.all([e(`journalctl`,[...$t]),e(`journalctl`,[...en])]),o=[];if(un(i)){let e=sn(i.stdout);r.droppedOverCap+=Math.max(0,e.events.length-50),r.events.push(...e.events.slice(-50)),r.foreignIgnored+=e.foreignIgnored,r.unparseable+=e.unparseable,/not seeing messages from other users/i.test(`${i.stdout}\n${i.stderr}`)&&(r.restrictedToCurrentUser=!0)}else o.push(`system journal: ${Wt(i)}`);if(un(a)){let e=await ln(a.stdout,n,t);r.droppedOverCap+=Math.max(0,e.events.length-50),r.events.push(...e.events.slice(-50)),r.foreignIgnored+=e.foreignIgnored,r.unparseable+=e.unparseable,e.unattributed!==null&&o.push(`user journal: ${e.unattributed}`)}else o.push(`user journal: ${Wt(a)}`);return o.length===2?Gt(r,o.join(`; `)):o.length===1?{...r,outcome:`partial`,unavailableReason:o.join(`; `)}:Kt(r)}const fn={41:`Microsoft-Windows-Kernel-Power`,1074:`User32`,2004:`Microsoft-Windows-Resource-Exhaustion-Detector`,6008:`EventLog`},pn={1e3:`Application Error`,1001:`Windows Error Reporting`,1002:`Application Hang`};function mn(e){return e===`System`?fn:pn}function hn(e){let t=`System[(${Object.keys(mn(e)).map(e=>`EventID=${e}`).join(` or `)}) and TimeCreated[timediff(@SystemTime) <= ${zt}]]`;return e===`System`?`*[${t}]`:`*[${t} and EventData[${Vt.map(e=>`Data='${e}'`).join(` or `)}]]`}function gn(e){return[`qe`,e,`/q:${hn(e)}`,`/f:xml`,`/rd:true`,`/c:200`]}function _n(e){return Le.join(e??`C:\\Windows`,`System32`,`wevtutil.exe`)}function vn(e){return e.replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/&/g,`&`)}function yn(e){return/[\\/]/.test(e)||/^[a-z]:/i.test(e)}function bn(e,t){let n=RegExp(`<${t}(?:\\s[^>]*)?>([\\s\\S]*?)</${t}>`,`g`);return[...e.matchAll(n)].map(e=>vn(e[1]??``).trim())}function xn(e,t){let n=mn(e),r=[],i=0,a=0;for(let o of t.match(/<Event[\s>][\s\S]*?<\/Event>/g)??[]){let t=/<Provider\s+Name=['"]([^'"]+)['"]/.exec(o)?.[1],s=Number(/<EventID[^>]*>(\d+)<\/EventID>/.exec(o)?.[1]),c=/<TimeCreated\s+SystemTime=['"]([^'"]+)['"]/.exec(o)?.[1];if(t===void 0||!Number.isInteger(s)||c===void 0){a+=1;continue}if(n[s]!==t){i+=1;continue}let l=bn(o,`Data`),u=bn(o,`Name`),d=[...l,...u].some(e=>Bt.test(e));if(e===`Application`&&!d){i+=1;continue}r.push({kind:`windows-event`,at:c,log:e,provider:t,eventId:s,mentionsOpenKnowledge:d,data:e===`Application`?l.filter(e=>e!==``&&!yn(e)):[]})}return{events:r,foreignIgnored:i,unparseable:a}}async function Sn(e,t){let n=_n(t),r=[`System`,`Application`],i=J(`win32`,`windows-event-log`,r.map(e=>`${n} ${gn(e).join(` `)}`)),a=await Promise.all(r.map(async t=>({log:t,result:await e(n,gn(t))}))),o=[];for(let{log:e,result:t}of a){if(t.status!==0){o.push(`${e}: ${Wt(t)}`);continue}let n=xn(e,t.stdout);i.droppedOverCap+=Math.max(0,n.events.length-50),i.events.push(...n.events.slice(0,50)),i.foreignIgnored+=n.foreignIgnored,i.unparseable+=n.unparseable}return o.length===r.length?Gt(i,o.join(`; `)):o.length>0?{...i,outcome:`partial`,unavailableReason:o.join(`; `)}:Kt(i)}async function Cn(e={}){let t=e.platform??process.platform,n=e.runCommand??Ht(),r=(e.now??(()=>new Date))();switch(t){case`darwin`:return Qt(e.macosReportsDir??`/Library/Logs/DiagnosticReports`,r);case`linux`:return dn(n,r,e.desktopLogsDir??z(xe(),`logs`));case`win32`:return Sn(n,e.systemRoot??process.env.SystemRoot);default:return{...J(t,null,[]),outcome:`unsupported`}}}const wn={schemaVersion:1,outcome:`not-collected`};function Tn(e){return`${JSON.stringify(e??wn,null,2)}\n`}const En={"macos-jetsam":`macOS low-memory reports`,"linux-journal":`system and user journals`,"windows-event-log":`Windows event logs`};function Dn(e){let t=[`${e.windowDays}d`,`${e.events.length} kept`,`${e.foreignIgnored} other-process record(s) ignored`,`${e.unparseable} unparseable`];e.droppedOverCap>0&&t.push(`${e.droppedOverCap} older dropped over cap`);let n=e.source?` from ${En[e.source]}`:``,r=e.unavailableReason?`, ${e.unavailableReason}`:``;return`${e.outcome}${n}${r} (${t.join(`; `)})`}function On(){return z(xe(),`bug-reports`)}function kn(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=On(),r=`${t}-bugreport`,i=z(n,`${r}.zip`);for(let e=2;H(i);e+=1)i=z(n,`${r}-${e}.zip`);return i}function An(e,t){let{scrubbed:n}=e;return n!==void 0&&n.patterns.length>0?{file:t,lineCount:n.lineCount,patterns:[...n.patterns]}:null}function jn(e,t){let n=z(e,`.ok`,`config.yml`);if(H(n))try{let e=W(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return H(z(e,`.ok`))?ct(`sha256`).update(B(e)).digest(`hex`).slice(0,12):null}function Mn(){let e={timestamp:new Date().toISOString(),platform:$e(),osType:rt(),osRelease:et(),hostname:`[redacted]`,uptime:it(),freeMem:Ze(),totalMem:nt(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=ut(`sw_vers -productVersion 2>/dev/null`,A({encoding:`utf8`})).trim()}catch{}try{let t=z(__dirname,`..`,`..`,`package.json`);H(t)&&(e.okVersion=JSON.parse(W(t,`utf8`)).version)}catch{}return e}const Nn=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function Pn(e){let t=L(e);return Nn.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function Fn(e,t){return Bn(e,t).files}const In=[`ShipIt_stderr.log`,`ShipIt_stdout.log`];function Ln(e,t=Ne){let n=z(e,`${t}.ShipIt`);if(!H(n))return[];let r;try{r=G(n)}catch{return[]}return In.flatMap(e=>r.map(t=>{if(t===e)return{entry:t,suffix:-1};if(!t.startsWith(`${e}.`))return null;let n=t.slice(e.length+1);return/^\d+$/.test(n)?{entry:t,suffix:Number(n)}:null}).filter(e=>e!==null).map(e=>{let t=z(n,e.entry);return{path:t,suffix:e.suffix,mtimeMs:Rn(t)}}).sort((e,t)=>t.mtimeMs-e.mtimeMs||t.suffix-e.suffix).slice(0,4).map(e=>e.path))}function Rn(e){try{return Ye(e).mtimeMs}catch{return 0}}function zn(e){if(!H(e))return[];try{let t=new Map;for(let n of G(e).filter(e=>e.endsWith(`.yaml`)).sort()){let e=n.endsWith(`.sent.yaml`)?n.slice(0,-x.length):n.slice(0,-5),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return[...t.values()].slice(-25).flat().map(t=>z(e,t))}catch{return[]}}function Bn(e,t){if(!H(t))return{files:[],excludedByProjectSlug:0};let n=G(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>z(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(Pn),i=[],a=r.filter(t=>{try{return W(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!Pn(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function Vn(e){let t=z(e,`.ok`,`local`);return H(t)?{files:[`server.lock`,b,y].map(e=>z(t,e)).filter(e=>H(e))}:{files:[]}}function Hn(e,t,n){let r=re(e),i=[],a=[];for(let e of t){let t=z(r,e),o=z(n,e),s=H(t);s&&i.push(t),H(o)&&(s?a:i).push(o)}return{files:i,legacyFiles:a}}function Un(e){let t=0,n=new Map,r=e.replace(/("(?:docName|doc\.name|documentName)"\s*:\s*")((?:[^"\\]|\\.)*)"/g,(e,r,i)=>{t+=1;let a=n.get(i);return a===void 0&&(a=`doc#${ct(`sha256`).update(i).digest(`hex`).slice(0,12)}`,n.set(i,a)),`${r}${a}"`});for(let[e,i]of[...n].sort(([e],[t])=>t.length-e.length)){if(e.length===0||!r.includes(e))continue;let n=r.split(e);t+=n.length-1,r=n.join(i)}return{text:r,count:t}}function Wn(e){let t=e.revealDocNames?e.content:Un(e.content).text;if(e.redact){let{redacted:n,patterns:r,lineCount:i}=h(t);e.zipfile.addBuffer(Buffer.from(n,`utf8`),e.name),e.bundleFiles.push(e.name),r.length>0&&e.redactions.push({file:e.name,lineCount:i,patterns:r})}else e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name)}function Y(e){for(let t of e.files)try{let n=W(t,`utf8`);Wn({zipfile:e.zipfile,name:`${e.prefix}/${L(t)}`,content:t.endsWith(`.ips`)?jt(n):n,redact:e.redact,revealDocNames:e.revealDocNames,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function Gn(t){let{redact:n,outputPath:r,logger:i}=t,a=t.revealDocNames??!1,o=t.userLogsDir??z(xe(),`logs`),s=t.projectDir?jn(t.projectDir,i):null;U(R(r),{recursive:!0}),i?.info({projectSlug:s},`gathering diagnostic data`);let l=Mn();l.desktop=t.desktop??null,l.language=t.language??null;let{files:u,excludedByProjectSlug:f}=Bn(s,o),{files:p}=t.projectDir?Vn(t.projectDir):{files:[]},{files:m,legacyFiles:h}=t.projectDir?Hn(t.projectDir,[g.logsCurrent,g.logsPrevious],z(t.projectDir,`.ok`,`local`,`logs`)):{files:[],legacyFiles:[]},{files:_,legacyFiles:v}=t.projectDir?Hn(t.projectDir,[ee],z(t.projectDir,`.ok`,`local`)):{files:[],legacyFiles:[]},y=t.shipItLogFiles??[],b=t.diagnosticReports?.files??[];i?.info({logFileCount:u.length,logFilesExcludedByProjectSlug:f,lockFileCount:p.length+_.length+v.length,localSinkFileCount:m.length+h.length,shipItLogFileCount:y.length,diagnosticReportCount:b.length},`files collected`);let x=[],S=[],{ZipFile:te}=await import(`./yazl-BsCX6KWo.mjs`).then(t=>e(t.default,1)),C=new te;Y({zipfile:C,files:[...u,...y],prefix:`logs`,redact:n,revealDocNames:a,bundleFiles:S,redactions:x,logger:i}),Y({zipfile:C,files:[...p,..._],prefix:`lockdir`,redact:n,revealDocNames:a,bundleFiles:S,redactions:x,logger:i}),Y({zipfile:C,files:m,prefix:`local-logs`,redact:n,revealDocNames:a,bundleFiles:S,redactions:x,logger:i}),Y({zipfile:C,files:h,prefix:`legacy/local-logs`,redact:n,revealDocNames:a,bundleFiles:S,redactions:x,logger:i}),Y({zipfile:C,files:v,prefix:`legacy/lockdir`,redact:n,revealDocNames:a,bundleFiles:S,redactions:x,logger:i}),Y({zipfile:C,files:t.bugReportLedgerFiles??[],prefix:ne,redact:n,revealDocNames:a,bundleFiles:S,redactions:x,logger:i}),Y({zipfile:C,files:b,prefix:`diagnostic-reports`,redact:n,revealDocNames:a,bundleFiles:S,redactions:x,logger:i});for(let e of t.extraFiles??[])try{let t=W(e.sourcePath),n=`extra/${e.zipName??L(e.sourcePath)}`;C.addBuffer(t,n),S.push(n);let r=An(e,n);r!==null&&x.push(r)}catch(t){i?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Wn({zipfile:C,name:`note.txt`,content:t.note,redact:n,revealDocNames:a,bundleFiles:S,redactions:x});let w=new Set(b.map(e=>`diagnostic-reports/${L(e)}`)),T=S.filter(e=>w.has(e)),re=t.diagnosticReports===void 0?`not-collected (no collection attempted)`:Dt(t.diagnosticReports,T.length);C.addBuffer(Buffer.from(`${re}\n`,`utf8`),`state/diagnostic-reports-status.txt`),S.push(`state/diagnostic-reports-status.txt`),Wn({zipfile:C,name:Rt,content:Tn(t.osTerminationEvidence),redact:n,revealDocNames:!0,bundleFiles:S,redactions:x});let ie=JSON.stringify(l,null,2);C.addBuffer(Buffer.from(ie,`utf8`),`sysinfo.json`),S.push(`sysinfo.json`);let E={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:s,files:S,redactions:x,sysinfo:l};C.addBuffer(Buffer.from(JSON.stringify(E,null,2),`utf8`),`MANIFEST.json`);let D=x.reduce((e,t)=>e+t.lineCount,0),O=new Set(y.map(e=>`logs/${L(e)}`)),ae=S.filter(e=>O.has(e)),oe=new Set((t.bugReportLedgerFiles??[]).map(e=>`${ne}/${L(e)}`)),k=S.filter(e=>oe.has(e)),se=s?S.filter(e=>e.startsWith(`logs/`)&&!Pn(e)&&!O.has(e)):[],A=T.length>0?[`Crash reports under diagnostic-reports/ are rewritten on the way in,`,`independently of this setting: escaped path separators are normalised`,`so the scrub above can read them, and the identifiers that link this`,`machine's bundles to each other are replaced. Nothing else is changed;`,`they are not byte-identical to the files macOS wrote.`]:[],j=A.length>0?[`Redaction was disabled for this bundle; file contents are unmodified,`,`with one exception.`,...A]:[`Redaction was disabled for this bundle; file contents are unmodified.`],M=[`# Bug Report Bundle`,``,`Generated: ${E.generatedAt}`,`Project: ${s??`(unscoped)`}`,...t.projectDir?[`Project diagnostic source: ${c(`logs`,`projects`)} (current product only).`]:[],`Discipline version: ${E.disciplineVersion}`,``,`## Contents`,``,...S.map(e=>`- ${e}`),``,`## Privacy`,``,...se.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...se.map(e=>`- ${e}`),``]:[],...ae.length>0?[`Installer logs: written by the macOS update helper rather than by`,`OpenKnowledge itself, and machine-wide rather than scoped to any one`,`project. They record the install and update history of this app on`,`this machine. Only this app is collected, never other applications`,`that use the same update mechanism:`,...ae.map(e=>`- ${e}`),``]:[],...T.length>0?[`Crash reports: written by macOS itself rather than by OpenKnowledge,`,`and machine-wide rather than scoped to any one project. They record`,`why the operating system ended a process of this app — the signal or`,`exception, the code-signing verdict, and whatever text the process`,`left behind as it died. They also carry machine details the OS puts`,`in every report: the account uid, the Mac model, and the name of the`,`process that launched this app, which on a managed machine can be`,`internal tooling. The identifiers that would link this machine's`,`bundles to each other are replaced before bundling. Only this`,`app's own reports are collected, never another application's, though`,`a report of ours still names the processes it ran alongside:`,...T.map(e=>`- ${e}`),``]:[],...(t.osTerminationEvidence?.events.length??0)>0?[`Termination records: read from the operating system's own logs, covering`,`the last 7 days, to explain an exit the app could not record itself. On`,`macOS: the memory-pressure (jetsam) reports`,`that list processes of this app, with each one's memory use and whether`,`it was killed. On Linux: kernel and systemd-oomd out-of-memory kills of`,`this app, as structured fields with the machine name, cgroup paths and`,`user id left out, plus display-connection errors this app's desktop`,`process wrote to the user's own journal, with Chromium's message cut to`,`200 characters. On Windows: crash and hang records for this app with`,`file paths left out, plus the time of every shutdown, restart, power`,`loss and low-memory warning on the machine, whatever caused it:`,`- ${Rt}`,``]:[],...k.length>0?[`Send history: a small record for each bug report previously generated`,`on this machine — when it was generated, whether sending it`,`succeeded, and why it failed if it did. This is what makes a failed`,`send diagnosable at all. It is machine-wide rather than scoped to`,`this project, so it names the other projects reports were filed`,`from. It carries no document content:`,...k.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${d.join(`, `)}`,D>0?`${D} line(s) were scrubbed across ${x.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,...A,``,`This bundle is safe to attach to a GitHub issue.`]:j].join(`
|
|
7
|
-
`);C.addBuffer(Buffer.from(M,`utf8`),`README.md`),C.end();let N=Be(r);return C.outputStream.pipe(N),await new Promise((e,t)=>{N.on(`close`,e),N.on(`error`,t)}),i?.info({bundlePath:r,fileCount:S.length,redactionCount:D},`bundle written`),{zipPath:r,summary:{projectSlug:s,files:S,redactions:x,redactedLineCount:D,generatedAt:E.generatedAt}}}var Kn=u(),qn=e(ye(),1),X=e(Ae(),1);function Jn(e){let t=F(`user`,e,e);return le({absPath:t,sideline:!1,warn:()=>{}}).value.appearance?.language??`system`}function Yn({home:e=q(),env:t=process.env}={}){let n=Jn(e),{override:r,preferenceList:i}=w(t),{locale:a,source:o}=pt({override:r,storedPreference:n,supportedLocales:m,preferenceList:i,autoDetectableLocales:p});return{preference:n,locale:a,source:o,systemLanguages:i}}function Xn(e){let t=new Set([e]);try{t.add(Ke.native(e))}catch{return[e].filter(e=>e.length>0)}return[...t].filter(e=>e.length>0).sort((e,t)=>t.length-e.length)}function Zn(e,t){let n=e;for(let e of t)n.includes(e)&&(n=n.split(e).join(`<CONTENT_DIR>`));return n}function Qn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function $n(e,t){if(typeof e==`string`)return Zn(e,t.contentDirSpellings);if(Array.isArray(e))return e.map(e=>$n(e,t));if(!Qn(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=$n(i,t);return n}function er(e,t){let n=W(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
8
|
-
`),i=n.split(`
|
|
9
|
-
`),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(e!==i.length-1||n!==``){if(n.length===0){a.push(``);continue}try{let e=$n(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}let o=r?`${a.join(`
|
|
10
|
-
`)}\n`:a.join(`
|
|
11
|
-
`);K(e,o)}function tr(e,t){let n=W(e,`utf-8`);if(n.trim().length!==0)try{let r=$n(JSON.parse(n),t),i=n.endsWith(`
|
|
12
|
-
`)?`
|
|
13
|
-
`:``;K(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=Zn(n,t.contentDirSpellings);r!==n&&K(e,r)}}function nr(e,t){let n=W(e,`utf-8`),r=Zn(n,t.contentDirSpellings);r!==n&&K(e,r)}function rr(e){try{return G(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>z(e,t.name))}catch{return[]}}const ir=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function ar(e){return/\.log\.\d+$/.test(e)}function or(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||ar(e)}const sr=[`telemetry`,`logs`,`process`,`diagnostic-reports`];function cr(e){let t={contentDirSpellings:Xn(e.contentDir)};for(let n of sr)for(let r of rr(z(e.stagingDir,n)))or(r)?er(r,t):r.endsWith(`.json`)?tr(r,t):nr(r,t);for(let n of rr(z(e.stagingDir,`state`))){let e=L(n);n.endsWith(`.jsonl`)?er(n,t):ir.has(e)?tr(n,t):nr(n,t)}}const lr=[`.ok`,`local`,`telemetry`],ur=[`.ok`,`local`,`logs`],dr=[`.ok`,`local`,`loss-capture`],fr=g.spansCurrent,pr=g.spansPrevious,mr=g.logsCurrent,hr=g.logsPrevious,gr=`loss-current.jsonl`,_r=`loss-prev.jsonl`;function vr(e){return z(e,...dr,gr)}function yr(e){return z(e,...dr,_r)}const br=1e3;async function xr(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(br)});return t.ok?await t.text():null}catch{return null}}async function Sr(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(br)});return t.ok?await t.text():null}catch{return null}}async function Cr(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(br)});return t.ok?await t.text():null}catch{return null}}function wr(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(`
|
|
14
|
-
`)}\n`:null}catch{return null}}function Tr(e){let t=z(e,`.git`,`ok`);if(!H(t))return null;let n=dt(`git`,[`-C`,t,`log`,`--oneline`,`-50`],A({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Er(e){let t=z(e,`.git`,`ok`);if(!H(t))return null;let n=dt(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],A({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Dr(){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 Or(){return{nodeVersion:process.version,platform:$e(),arch:Xe()}}function kr(){return process.env.OTEL_SDK_DISABLED===`false`}function Ar(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function jr(e){if(!H(e))return{};let t;try{t=(0,Kn.parse)(W(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(!Ar(t))return{};let n=t.telemetry;if(!Ar(n))return{};let r=n.localSink;return Ar(r)?r:{}}function Mr(e){return typeof e==`boolean`?e:void 0}function Nr(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Pr(e){if(Ar(e))return Nr(e.maxBytes)}function Fr(e){let t=jr(F(`project`,e)),n=jr(F(`project-local`,e));return{enabled:Mr(n.enabled)??Mr(t.enabled)??!0,spansMaxBytes:Pr(n.spans)??Pr(t.spans)??52428800,logsMaxBytes:Pr(n.logs)??Pr(t.logs)??26214400}}function Ir(e){return ct(`sha256`).update(e).digest(`hex`)}function Lr(e){let t=W(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}const Rr=[`"doc.name"`,`"docName"`];function zr(e){let t=W(e,`utf-8`),n=0;for(let e of Rr){let r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length)}return n}function Z(e,t){if(!H(e))return!1;try{return U(R(t),{recursive:!0}),e.endsWith(`.ips`)?K(t,jt(W(e,`utf-8`))):ze(e,t),!0}catch{return!1}}function Q(e,t,n,r){let i=H(e);Z(e,z(n,r)),Z(t,i?z(n,`legacy`,r):z(n,r))}function Br(e){let t=[],n=e=>{let r=G(e,{withFileTypes:!0});for(let i of r){let r=z(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const Vr=new Set([`.jsonl`]);function Hr(e){let t=e.lastIndexOf(`.`);return t!==-1&&Vr.has(e.slice(t))}const Ur=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`,`.yaml`,`.yml`,`.ips`]);function Wr(e){if(ar(e))return!0;let t=e.lastIndexOf(`.`);return t!==-1&&Ur.has(e.slice(t))}function Gr(e){let t=[];for(let n of Br(e)){let r=Kr(e,n);if(!Wr(r))continue;let{redacted:i,patterns:a,lineCount:o}=h(W(n,`utf-8`));a.length!==0&&(K(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function Kr(e,t){return Ie(e,t).split(V).join(`/`)}async function qr(e){let t=B(e.contentDir),n=B(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??xr,a=r.fetchAgentEffects??Sr,o=r.fetchWatcherRecent??Cr,s=r.readShadowHead??Tr,l=r.readCheckpointRefs??Er,u=r.now??(()=>new Date),d=r.okVersion??(()=>Pe),f=r.readDesktopEnv??Dr,p=r.readLanguage??Yn,m=r.readRuntime??Or,h=r.isOtlpPushEnabled??kr,g=He(z(tt(),`ok-bundle-`));try{U(z(g,`telemetry`),{recursive:!0}),U(z(g,`logs`),{recursive:!0}),U(z(g,`state`),{recursive:!0}),Q(T(n),z(n,...lr,fr),g,z(`telemetry`,fr)),Q(he(n),z(n,...lr,pr),g,z(`telemetry`,pr)),Q(ve(n),z(n,...ur,mr),g,z(`logs`,mr)),Q(se(n),z(n,...ur,hr),g,z(`logs`,hr));for(let t of e.userLogFiles??[])Z(t,z(g,`logs`,L(t)));for(let t of e.userStateFiles??[])Z(t,z(g,ne,L(t)));let _=0;for(let t of e.diagnosticReports?.files??[])Z(t,z(g,`diagnostic-reports`,L(t)))&&(_+=1);let v=z(n,`.ok`,`local`),x=z(v,`server.lock`),S=`not-running`,C=`no server.lock`,w=null;if(H(x)){Z(x,z(g,`state`,`server.lock`));try{let e=W(x,`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`:(K(z(g,`state`,`agent-presence.json`),e),S=`running`,C=``);let t=await a(w);t!==null&&K(z(g,`state`,`agent-effects.json`),t);let n=await o(w);if(n!==null){let e=wr(n);e!==null&&K(z(g,`state`,`watcher-recent.jsonl`),e)}}let re=s(t);re!==null&&K(z(g,`state`,`shadow-head.txt`),re);let ie=l(t);ie!==null&&K(z(g,`state`,`checkpoint-refs.txt`),ie),Z(vr(n),z(g,`state`,gr)),Z(yr(n),z(g,`state`,_r)),Q(ae(n),z(v,ee),g,`state/last-spawn-error.log`),Z(z(v,te),z(g,`state`,te)),Z(z(v,b),z(g,`state`,b)),Z(z(v,y),z(g,`state`,y));let E=m(),D=f(),O=p(),oe={ok:{version:d(),nodeVersion:E.nodeVersion,platform:E.platform,arch:E.arch},host:{desktop:D,language:O}};K(z(g,`state`,`runtime.json`),`${JSON.stringify(oe,null,2)}\n`);let k=S===`running`?`running
|
|
15
|
-
`:`not-running (${C})\n`;K(z(g,`state`,`server-status.txt`),k);let A=e.diagnosticReports===void 0?`not-collected (no collection attempted)`:Dt(e.diagnosticReports,_);if(K(z(g,`state`,`diagnostic-reports-status.txt`),`${A}\n`),K(z(g,Rt),Tn(e.osTerminationEvidence)),e.processDir&&H(e.processDir)){let t=z(g,`process`);U(t,{recursive:!0}),ze(e.processDir,t,{recursive:!0})}let j=e.redact===!0;j&&(cr({stagingDir:g,contentDir:t}),cr({stagingDir:z(g,`legacy`),contentDir:t})),e.note&&K(z(g,`note.txt`),e.note);let M=null;e.scrubSecrets===!0&&(M=Gr(g));for(let t of e.extraFiles??[]){let e=t.zipName??L(t.sourcePath);if(!Z(t.sourcePath,z(g,`extra`,e))){r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);continue}let n=An(t,`extra/${e}`);n!==null&&(M??={redactions:[],redactedLineCount:0},M.redactions.push(n),M.redactedLineCount+=n.lineCount)}let N=Fr(n),P=Br(g),ce=[],F=0,le=0;for(let e of P){let t=Kr(g,e),n=Ye(e).size,r=Hr(t)?Lr(e):0;ce.push({path:t,bytes:n,lines:r}),F+=n;let i=t.startsWith(`legacy/`)?t.slice(7):t;(i.startsWith(`telemetry/`)||i.startsWith(`logs/`))&&(le+=zr(e))}let ue={applied:j};M!==null&&(ue.secretScrub=M);let de={schemaVersion:2,createdAt:u().toISOString(),ok:{version:d(),nodeVersion:E.nodeVersion,platform:E.platform,arch:E.arch},host:{desktop:D,language:O},contentDir:{pathSha256:Ir(t),absolutePath:j?`<CONTENT_DIR>`:t},telemetry:{localSink:{...N,directory:c(`logs`,`projects`)},otlpPushEnabled:h()},redaction:ue,serverStatus:S,files:ce};K(z(g,`manifest.json`),`${JSON.stringify(de,null,2)}\n`);let fe=Xn(t),I=P.some(e=>{try{let t=W(e,`utf-8`);return fe.some(e=>t.includes(e))}catch{return!1}}),pe={stagedDiagnosticReports:_,totalBytes:F,fileCount:ce.length,docNameCount:le,contentDirVisible:I,redacted:j},me=!1;return{stagingDir:g,manifest:de,summary:pe,cleanup:()=>{me||(me=!0,qe(g,{recursive:!0,force:!0}))}}}catch(e){throw qe(g,{recursive:!0,force:!0}),e}}async function Jr(e){let{collected:t,outputPath:n}=e,r=R(n);if(!H(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new qn.ZipFile,a=Br(t.stagingDir);for(let e of a){let n=Kr(t.stagingDir,e);i.addFile(e,n)}i.end();let o=Be(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 Yr(e,t){let n=z(e,`.ok`,`config.yml`);if(H(n))try{let t=(0,Kn.parse)(W(n,`utf-8`)),r=je(t)?t.content:void 0,i=je(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return B(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 B(e)}async function Xr(e,t,n,r,i,a){let o=jn(t,e.logger),s=await qr({contentDir:Yr(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...Fn(o,e.userLogsDir??z(xe(),`logs`)),...Ln(e.cachesDir??z(q(),`Library`,`Caches`))],userStateFiles:zn(e.bugReportsDir??On()),diagnosticReports:i,osTerminationEvidence:a,deps:{readDesktopEnv:n,readLanguage:r,logger:e.logger}});try{U(R(e.outputPath),{recursive:!0}),await Jr({collected:s,outputPath:e.outputPath});let t=s.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:o,files:s.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:s.manifest.createdAt}}}finally{s.cleanup()}}async function Zr(e){let{projectDir:t}=e,n=e.readDesktopEnv??Dr,r=e.readLanguage??Yn,i=()=>Lt(e.diagnosticReportsDir??z(q(),`Library`,`Logs`,`DiagnosticReports`),new Date);if(e.level===`full`&&t!==void 0)return Xr(e,t,n,r,i(),await Cn(e.osTerminationEvidenceDeps));let{zipPath:a,summary:o}=await Gn({projectDir:t,redact:e.redact,revealDocNames:e.level===`full`,outputPath:e.outputPath,userLogsDir:e.userLogsDir,shipItLogFiles:Ln(e.cachesDir??z(q(),`Library`,`Caches`)),bugReportLedgerFiles:zn(e.bugReportsDir??On()),diagnosticReports:e.level===`full`?i():void 0,osTerminationEvidence:e.level===`full`?await Cn(e.osTerminationEvidenceDeps):void 0,logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n(),language:r()});return{zipPath:a,summary:{level:e.level,systemWide:t===void 0,projectSlug:o.projectSlug,files:o.files,redactions:o.redactions,redactedLineCount:o.redactedLineCount,generatedAt:o.generatedAt}}}function $(e,t,n={}){let r=k(e,t),i;try{i=W(r,`utf-8`)}catch(e){return e&&typeof e==`object`&&`code`in e&&e.code===`ENOENT`?{status:`missing`,lockPath:r}:{status:`read-error`,lockPath:r,error:e instanceof Error?e.message:String(e)}}let a;try{a=JSON.parse(i)}catch{return{status:`corrupt`,lockPath:r,text:i}}let o=a&&typeof a==`object`?a:{},s=de(o),c=s&&!C(o,n);if(!a||typeof a!=`object`||!fe(a.pid))return{status:`corrupt`,lockPath:r,text:i,...c?{foreignHost:!0}:{}};let l=_e(a),{pid:u}=l;if(c)return{status:`foreign-host`,lockPath:r,lock:l};let d=oe(l,{isAlive:n.isAlive,readProcessStart:n.readProcessStart,readBootInstant:n.readBootInstant,sameMachine:s});switch(d.verdict){case`gone`:return{status:`dead-pid`,lockPath:r,lock:l,text:i};case`replaced`:return{status:`reused-pid`,lockPath:r,lock:l,text:i};case`unverified`:return d.cause===`unverified-owner`?{status:`unverified-owner`,lockPath:r,pid:u}:{status:`alive`,lockPath:r,lock:l};case`writer`:return{status:`alive`,lockPath:r,lock:l};default:return d}}function Qr(e){return`does not record its owning machine, and its recorded process ${e} is still running on this machine`}function $r(e){return typeof e.machineId==`string`?`records a machine ID different from the one in ${me()}`:`records only the host ${Me(e.hostname)}, not this machine's ${Qe()}`}function ei(e){return e===`win32`?`USERPROFILE`:`HOME`}function ti(e){return e.processStart===void 0?` This lock records no process start; a server started by this release records one, which lets \`${o()} stop\` confirm it from any home folder.`:``}function ni(e,t){let n=`\`${o()} stop\``;return`If the server was started on this machine from another account, run ${n} as that account. If it was started from this account with a different home folder, run ${n} with \`${ei(t)}\` set to that folder. Otherwise stop it from the machine that owns the lock.${ti(e)}`}function ri(e,t){let n=o();return`If the server was started on this machine from another account, run \`${n} stop\` as that account while it is running, or \`${n} clean\` once it has exited. If it was started from this account with a different home folder, run the same command with \`${ei(t)}\` set to that folder. Otherwise run the same command on the machine that owns the lock.${ti(e)}`}function ii(e){return`Confirm that no OpenKnowledge server is using this directory on the owning machine or any other machine sharing it. Only then remove the stale lock file at ${e} and retry cleanup.`}function ai(e,t=process.platform){let{lock:n,lockPath:r}=e;return`${typeof n.machineId==`string`?ri(n,t):`If ${Me(n.hostname)} is another machine, stop OpenKnowledge there; if it is an earlier name of this machine, stop OpenKnowledge here if it is still running.`} ${ii(r)}`}function oi(e,t=process.platform){let{lockPath:n}=e;return e.status===`unverified-owner`?`Cannot verify shutdown: the server lock at ${n} ${Qr(e.pid)}. Check whether process ${e.pid} is an OpenKnowledge server. If it is, stop it and retry. Do not remove the lock file while that process is running.`:e.status===`corrupt`?`Cannot verify shutdown: the server lock at ${n} records a machine ID or host name that is not this machine's, so its server may run on another machine, or on this one from another account, with a different home folder, or under an earlier host name. Stop OpenKnowledge wherever it was started. ${ii(n)}`:`Cannot verify shutdown: the server lock at ${n} ${$r(e.lock)}. ${ai(e,t)}`}function si(e){return e.replace(/:\d+$/,``)}function ci(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/(?:[^/?#]*@)?([^@/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:si(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[^/?#]*@)?([^@/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:si(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:si(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.\-~%]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}const li=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function ui(e,t=process.platform,n=process.env){return f(r(),e,t,n.XDG_CONFIG_HOME)}function di(){return v(r())}function fi(){let e=r();if(e===`stable`)return li;let t=_(e);return RegExp(`^# >>> ${t} >>>\\n[\\s\\S]*?^# <<< ${t} <<<\\n?`,`m`)}const pi={existsSync:e=>H(e),readFileSync:(e,t)=>W(e,t),lstatSync:e=>Ve(e),readlinkSync:e=>Ge(e)};function mi(e,t=pi,n=process.platform,i=process.env){let a=r(),o=ui(e,n,i),s=f(a,e),c=t.existsSync(o)?o:a===`stable`&&n===`linux`&&t.existsSync(s)?s:null;if(c===null)return null;try{let e=JSON.parse(t.readFileSync(c,`utf8`));return e?.version===1?e:null}catch{return null}}function hi(e){let t=e.replace(fi(),``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function gi(e,t,n=pi){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}const _i=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],vi=[...O.map(e=>ue[e]),`open-knowledge`];function yi(e){if(!Fe(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=B(e);if(t===V||R(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function bi(e,t){let n=Ie(e,t);if(n.startsWith(`..`)||Fe(n))return!1;let r=e;for(let e of n.split(V)){r=z(r,e);try{if(!Ve(r).isDirectory())return!1}catch{return!1}}return!0}function xi(e,t){try{return G(e).every(n=>t.has(z(e,n)))}catch{return!1}}function Si(e){let t=yi(e),n=[],r=[],i=new Set;for(let e of _i){let a=z(t,e.hostDir,`skills`);if(!bi(t,a))continue;let o=vi.map(e=>z(a,e)).filter(e=>H(e));n.push(...o);for(let e of o)i.add(e);let s=z(t,e.pruneRoot),c=a;for(;xi(c,i)&&(r.push(c),i.add(c),c!==s);){let e=R(c);if(e===c||e===t||!e.startsWith(t+V))break;c=e}}return{skillDirs:n,emptyDirs:r}}function Ci(e){try{if(!Ve(e).isDirectory())return!1;let t=G(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function wi(e){let t=new Set,n=new Set;for(let r of _i){let i=z(e,r.hostDir,`skills`);for(let e of vi)t.add(z(i,e));let a=z(e,r.pruneRoot),o=i;for(;n.add(o),o!==a;){let t=R(o);if(t===o||t===e||!t.startsWith(e+V))break;o=t}}return{skillDirs:t,emptyDirs:n}}function Ti(e,t){let n=yi(e),r=wi(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(bi(n,e)&&Ci(e))try{qe(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(bi(n,e))try{Je(e),a.push(e)}catch{}return a}function Ei(e){let t=yi(e),n=[];for(let e of O){let r=ue[e];n.push({path:z(t,`.agents`,`skills`,r),bundleId:e,scope:`central`});for(let i of S)n.push({path:z(t,i.skillsRoot,r),bundleId:e,scope:`host`,hostDir:i.hostDir})}return n}function Di(e,t){let n=[];for(let r of Ei(e))if(r.bundleId===t)try{qe(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}function Oi(e){if(!e||typeof e!=`object`)return String(e);let t=typeof e.readProcessStart;return`${we(e)} readProcessStart=${t}`}function ki(e,t={}){if(!Number.isSafeInteger(e)||e<=0||e>4294967295)return null;let n=t.arch??process.arch,r=(e,n,r)=>{Ee(n,r),t.onNativeFailure?.({kind:e,reason:Te(n,r)})};try{let i=!1,a=Ce(t.nativeResolver,(e,t)=>{i=!0,r(`unavailable`,e,t)});if(!a||typeof a!=`object`||!(`readProcessStart`in a)||typeof a.readProcessStart!=`function`){let e;return e=a==null?i?`no usable binding was returned`:`the addon was not found`:Oi(a),r(`unavailable`,`the Windows native addon (native-config.win32-${n}-msvc.node) did not load or does not export readProcessStart`,e),null}let o=a.readProcessStart(e);return typeof o==`number`&&Number.isSafeInteger(o)&&o>=0?o:(r(`unavailable`,`readProcessStart returned an invalid value`,we(o)),null)}catch(e){return r(`query-failed`,`readProcessStart failed`,e),null}}function Ai(e,t={}){return pe(e,{platform:t.platform,readNative:e=>ki(e,{onNativeFailure:t.onNativeFailure})})}function ji(e){let{platform:t,pid:n,nativeFailures:r,causeRecorded:i}=e,a=r.some(e=>{switch(e.kind){case`unavailable`:return!0;case`query-failed`:return!1;default:return e.kind}}),o=r.length===0?``:a?`Reinstall OpenKnowledge to restore the Windows component that verifies process identity. `:`The Windows component loaded but the operating system refused the query, so reinstalling will not help; retry from an account that can inspect that process. `;return(t===`linux`?`Linux reads the process start from /proc/${n}/stat and /proc/stat; restore read access to /proc and retry. `:t===`darwin`?`macOS reads the process start with ps, and that read failed, as it does inside some sandboxes; retry from a shell where ps can run. `:t===`win32`?o:``)+(r.length>0&&i?`The failure detail is recorded in the CLI log under ${c(`logs`)}. `:``)}function Mi(e){let t=new Set;return M(n=>{let r=[],i=ki(n,{onNativeFailure:e=>{r.push(e)}});for(let i of new Set(r.map(e=>e.kind)))t.has(i)||(t.add(i),(e??ke())?.warn({event:`process-start-native-failure`,lockPid:n,kind:i,reasons:r.filter(e=>e.kind===i).map(e=>e.reason)},`the Windows process-start query failed, so lock holders cannot be verified; later failures of this kind are not recorded again`));return i})}function Ni(e){return e!=null&&e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function Pi(e,t=Date.now()){if(e===null)return`—`;let n=mt(e,t);return n===`unknown`?`—`:n}function Fi(e){let t=R(e);return L(e)===`local`&&L(t)===`.ok`?R(t):L(e)===`.ok`?t:null}function Ii(e,t,n,r){if(t.status===`missing`||t.status===`corrupt`||t.status===`read-error`)return null;if(t.status===`unverified-owner`)return{directory:Fi(e),server:{port:null,status:t.status,pid:t.pid,startedAt:null,usage:null},ui:null,hostname:null,lockPath:t.lockPath,binary:null,command:null,isDesktop:!1};let i=t.lock,a=t.status===`alive`&&N(i)?{port:i.port,status:t.status,pid:i.pid,startedAt:i.startedAt,usage:r}:null;return{directory:i.worktreeRoot,server:{port:i.port,status:t.status,pid:i.pid,startedAt:i.startedAt,usage:r},ui:a,hostname:i.hostname,lockPath:t.lockPath,binary:n==null?null:ce(n),command:n,isDesktop:Ni(n)}}function Li(e){let t=e.server.status;switch(t){case`unverified-owner`:return`unverified`;case`alive`:return e.isDesktop?`desktop`:`running`;case`foreign-host`:return e.isDesktop?`desktop`:`foreign`;case`dead-pid`:case`reused-pid`:return`stale`;default:return t}}const Ri=new Set([`running`,`desktop`,`foreign`,`unverified`]);function zi(e){switch(e){case`running`:return X.default.green(e);case`desktop`:return X.default.blue(e);case`foreign`:return X.default.cyan(e);case`unverified`:case`stale`:return X.default.yellow(e)}}function Bi(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function Vi(e){return`${Bi(e.server.usage)} | ${Bi(e.ui?.usage??null)}`}function Hi(e){return`${e.server.port===null?`—`:e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null?`—`:String(e.ui.port)}`}function Ui(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>[e.directory??`—`,Hi(e),Vi(e),Li(e),String(e.server.pid),Pi(e.server.startedAt),e.binary??`—`]),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),s=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=zi(Li(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),c=X.default.dim(`To stop a server: ${o()} stop <port|pid|directory|all>`);return[a,...s,``,c].join(`
|
|
16
|
-
`)}async function Wi(e={}){let t=e.discover??I,n=e.inspect??(e=>$(e,`server`)),r=e.log??(e=>console.log(e)),i=e.resolveCommand??ie,a=e.resolveUsage??j,o=await t(),s=[];for(let e of o){let t=n(e),r=Ii(e,t,t.status===`missing`||t.status===`corrupt`||t.status===`read-error`||t.status===`unverified-owner`||t.status===`reused-pid`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`||t.status===`read-error`||t.status===`unverified-owner`||t.status===`reused-pid`?null:a(t.lock.pid));r!=null&&s.push(r)}if(e.json){let e=s.map(e=>({...e,displayStatus:Li(e)}));r(JSON.stringify(e,null,2));return}r(Ui(e.all?s:s.filter(e=>Ri.has(Li(e)))))}function Gi(){return new Oe(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale entries`).option(`--all`,`Include stale entries (foreign and unverified entries already show)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await Wi({all:t.all===!0||e===`all`,json:t.json===!0})})}async function Ki(e,t=ke()){let n=$(e,`server`);if(n.status!==`alive`&&n.status!==`foreign-host`)return null;let r=ge(n.lock);if(r===null)return null;try{let n=await fetch(`${r}/api/server-info`,{signal:AbortSignal.timeout(1500),redirect:`manual`});if(!n.ok)return t?.warn({lockDir:e,baseUrl:r,outcome:`http-error`,status:n.status},`stop client-probe failed`),null;let i=(await n.json())?.collabClients;return typeof i==`number`&&Number.isFinite(i)?i:(t?.warn({lockDir:e,baseUrl:r,outcome:`no-client-count`,received:typeof i},`stop client-probe failed`),null)}catch(n){return t?.warn({lockDir:e,baseUrl:r,outcome:`unreachable`,err:n},`stop client-probe failed`),null}}function qi(e,t={}){return ea(e,t.isAlive??P)?{targets:[{name:`server`,pid:e.lock.pid,port:e.lock.port}],lock:e.lock}:{targets:[]}}function Ji(e){try{return r()}catch(t){e?.warn({err:t},`stop channel check skipped: ${t instanceof Error?t.message:String(t)}`);return}}async function Yi(e){let t=e.inspect??(()=>$(e.lockDir,`server`)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),a=e.error??(e=>console.error(e)),c=e.probeClients??Ki,l=e.logger??ke(),u=e.platform??process.platform,d=t(),f=qi(d,{isAlive:e.isAlive}),{lock:p}=f,m=[],h=[],g=(t,n)=>{l?.warn({lockDir:e.lockDir,lockPath:n.lockPath,lockPid:n.pid,platform:u,cause:n.cause,...`nativeFailures`in n&&n.nativeFailures.length>0?{nativeFailures:n.nativeFailures}:{}},`stop declined: lock holder identity unverified`),h.push({target:t,error:Qi(n,l!==void 0),unverified:n})},_=()=>{if(m.length>0){let e=m.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);r(`Stopped: ${e}`)}if(l?.info({lockDir:e.lockDir,signalled:m.map(e=>({name:e.name,pid:e.pid,port:e.port})),failed:h.map(({target:e,error:t})=>({pid:e.pid,error:t})),forced:e.force===!0},`stop signalled processes`),h.length>0){let e=h.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `);a(`Failed to stop: ${e}`)}return{stopped:m,failed:h,hadTargets:!0}};if(d.status===`unverified-owner`){let{pid:e,lockPath:t}=d;return g({name:`server`,pid:e},{cause:`unverified-owner`,pid:e,lockPath:t}),_()}if(p===void 0)return r(`No running open-knowledge processes.`),l?.info({lockDir:e.lockDir,targets:0},`stop found nothing to signal`),{stopped:[],failed:[],hadTargets:!1};let v=d.status===`alive`||d.status===`foreign-host`?d.lock.channel:void 0;if(e.force!==!0&&typeof v==`string`&&v.length>0){let t=e.selfChannel??Ji(l);if(t!==void 0&&v!==t)return a(`Not stopping: the server at ${e.lockDir} belongs to ${i(v)}. `+(v===`dev`?`Stop it from that dev build, or run \`${s} stop\` with OK_CHANNEL=dev set, or re-run with --force to terminate anyway.`:`Stop it from that app or its CLI, or re-run with --force to terminate anyway.`)),l?.warn({lockDir:e.lockDir,holderChannel:v,selfChannel:t,pids:f.targets.map(e=>e.pid)},`stop declined: server belongs to another channel`),{stopped:[],failed:[],hadTargets:!0,declined:{otherChannel:v}}}if(e.force!==!0){let t=await c(e.lockDir,l);if(t!==null&&t>0)return a(`Not stopping: ${t} collaboration client${t===1?``:`s`} (editor window${t===1?``:`s`} or agents) still connected to the server at ${e.lockDir}. Close them, or re-run with --force to terminate anyway.`),l?.warn({lockDir:e.lockDir,clients:t,pids:f.targets.map(e=>e.pid)},`stop declined: live collaboration clients`),{stopped:[],failed:[],hadTargets:!0,declined:{clients:t}}}for(let t of f.targets){let i=[],s=(e.readProcessStart??Ai)(t.pid,{platform:u,onNativeFailure:e=>{i.push(e)}}),c=oe(p,{isAlive:e.isAlive??P,readProcessStart:()=>s,refuseHolderStartedAfterLock:e.refuseHolderStartedAfterLock,platform:u,readBootInstant:e.readBootInstant});switch(c.verdict){case`writer`:try{n(t.pid,`SIGTERM`),m.push(t)}catch(e){h.push({target:t,error:e instanceof Error?e.message:String(e)})}break;case`gone`:r(`${t.name} (pid=${t.pid}) had already exited`);break;case`replaced`:a(`Process ${t.pid} is no longer the server that wrote ${d.lockPath}; it was not signalled. Run \`${o()} clean\` to remove the stale lock.`);break;case`unverified`:g(t,Xi(c.cause,{pid:t.pid,lockPath:d.lockPath,lock:p,platform:u,nativeFailures:i}));break;default:return c}}return _()}function Xi(e,t){let{pid:n,lockPath:r}=t;switch(e){case`foreign-host`:return{cause:e,pid:n,lockPath:r,lock:t.lock,platform:t.platform};case`unverified-owner`:return{cause:e,pid:n,lockPath:r};default:return{cause:e,pid:n,lockPath:r,platform:t.platform,nativeFailures:t.nativeFailures}}}const Zi=`it was not signalled, and --force does not override this check.`;function Qi(e,t){let{pid:n,lockPath:r}=e;switch(e.cause){case`foreign-host`:{let{lock:t}=e;return typeof t.machineId==`string`?`The server lock at ${r} ${$r(t)}, so process ${n}, which is running on this machine, cannot be confirmed as the server that wrote it; ${Zi} ${ni(t,e.platform)}`:`The server lock at ${r} ${$r(t)}, and the start of process ${n}, which is running on this machine, does not confirm it as the server that wrote the lock; ${Zi} If ${Me(t.hostname)} is another machine, stop the server there. If it is an earlier name of this machine, confirm that process ${n} is an OpenKnowledge server before ending it yourself, and once no OpenKnowledge server is running for this project, remove ${r}.`}case`unverified-owner`:return`The server lock at ${r} ${Qr(n)}, so it cannot be confirmed as the server that wrote the lock; ${Zi} Check whether process ${n} is an OpenKnowledge server, and if it is, stop it yourself. Do not remove the lock file while that process is running.`;default:{let n=$i(e,Zi,`Once you have confirmed no OpenKnowledge server is running for this project, remove ${r}.`,t);return e.cause===`writer-identity-unrecorded`?`${n} A server you start again with this release records its machine ID, so \`${o()} stop\` can confirm it.`:n}}}function $i(e,t,n,r){let{pid:i,lockPath:a,platform:o,nativeFailures:s}=e,c=`Before ending process ${i} yourself, confirm that it is an OpenKnowledge server.`;switch(e.cause){case`process-start-unreadable`:return`Could not read when process ${i} started, so it cannot be confirmed as the server that wrote ${a}; ${t} `+ji({platform:o,pid:i,nativeFailures:s,causeRecorded:r})+`${c} ${n}`;case`process-start-incomparable`:return`The start of process ${i} cannot be compared with the start recorded in ${a}, so it cannot be confirmed as the server that wrote the lock; ${t} ${c} ${n}`;case`process-start-mismatch`:return`Process ${i} started before the start recorded in ${a}, so it cannot be confirmed as the server that wrote the lock; ${t} ${c} ${n}`;case`process-started-after-lock`:return`Process ${i} started after the server lock at ${a} was written, so it cannot be confirmed as the server that wrote the lock; ${t} ${c} ${n}`;case`recorded-start-in-future`:return`The server lock at ${a} records a start later than the current time on this machine, so process ${i} cannot be confirmed as the server that wrote it; ${t} ${c} ${n}`;case`writer-identity-unrecorded`:return`The server lock at ${a} records neither a machine ID nor a process start, as locks written by version 0.25.0 and earlier do, so process ${i} cannot be confirmed as the server that wrote it; ${t} ${c} ${n}`;default:return e.cause}}function ea(e,t){return e.status===`alive`||e.status===`foreign-host`&&t(e.lock.pid)}async function ta(e,t=P){let n=await I(),r=null;for(let i of n){let n=$(i,`server`);if(ea(n,t)){if(n.lock.port===e)return i;r===null&&n.lock.pid===e&&(r=i)}}return r}function na(e){(e.failed.length>0||e.declined!==void 0)&&(process.exitCode=1)}async function ra(e,t){let n=await Yi({lockDir:e,force:t});return na(n),n}function ia(e,t,n={}){return t===0?`Nothing was running for ${e}, and no other open-knowledge servers are running.`:`Nothing was running for ${e}. ${t} other open-knowledge server${t===1?` is`:`s are`} running${n.listingFollows===!0?``:` — run \`${o()} ps\` to list them`}.`}async function aa(e){let t=await I(),n=0;for(let r of t)r!==e&&ea($(r,`server`),P)&&n++;return n}function oa(e){return new Oe(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the enclosing project — run it from anywhere inside the project. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).option(`--force`,`Stop even when the server belongs to another OpenKnowledge app (Stable, Beta or a dev build run from source) or editor windows or agents are still connected to it`).action(async(t,n)=>{let r=n.force===!0,i=t.length===0?void 0:t.join(` `);if(i===void 0){e();let t=E(process.cwd()),n=[],i=await Yi({lockDir:t,force:r,log:e=>n.push(e)});if(i.hadTargets){for(let e of n)console.log(e);na(i)}else{let e=await aa(t);console.log(ia(process.cwd(),e,{listingFollows:e>0})),e>0&&await Wi({})}return}if(i===`all`){let e=await I();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e)ea($(n,`server`),P)&&(await ra(n,r),t++);t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(i)){let e=Number.parseInt(i,10),t=await ta(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}await ra(t,r);return}let a=B(yt(),i),o=E(a),s=[],c=await Yi({lockDir:o,force:r,log:e=>s.push(e)});if(na(c),c.hadTargets)for(let e of s)console.log(e);else console.log(ia(a,await aa(o)))})}export{Lt as A,Zr as C,On as D,kn as E,wt as F,Tt as I,yt as L,bt as M,St as N,Cn as O,xt as P,vt as R,$ as S,Jr as T,hi as _,Gi as a,$r as b,Ti as c,Ei as d,li as f,mi as g,di as h,oa as i,Dt as j,Dn as k,Si as l,ui as m,Ki as n,Ai as o,gi as p,Yi as r,Mi as s,$i as t,Di as u,ci as v,qr as w,oi as x,ai as y,gt as z};
|
package/dist/src-aQblTkIp.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./md-manager-BGnqyqi1-B5Gyjk_N.mjs";import"./src-CIcIgMv1.mjs";import"./init-BJM0tqDo.mjs";import"./token-store-Bmb3_0hU.mjs";import"./start-nOmb3qwo.mjs";import"./registry-probes-ki_xxXZ3.mjs";import{n as e}from"./loader-DIQF01bS.mjs";import"./preview-DHNV39t9.mjs";import"./repair-mcp-configs-DmDI3tPM.mjs";export{e as loadConfig};
|
package/dist/start-DQR1IbHI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{S as e,m as t,p as n,r}from"./start-nOmb3qwo.mjs";export{r as bootStartServer,n as resolveBundledReactShellDir,t as resolveHost,e as startCommand};
|