@inkeep/open-knowledge 0.0.0-dev-20260429215316 → 0.0.0-dev-20260430043631
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/assets/skills/open-knowledge/SKILL.md +1 -1
- package/dist/{banner-BxI1wnW9.mjs → banner-rqmEWoKr.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-B8UnqY4U.mjs → chunk-TLSUDHID-_TMan7ee.mjs} +2 -2
- package/dist/cli.mjs +340 -337
- package/dist/colors-HBY_eaey.mjs +1 -0
- package/dist/{colors-DoPZvo1q.mjs → colors-ejF8AM2b.mjs} +1 -1
- package/dist/config-schema.json +247 -0
- package/dist/config.user.schema.json +189 -0
- package/dist/config.workspace.schema.json +219 -0
- package/dist/constants-CCnuxCJE.mjs +2 -0
- package/dist/{diff-HJF2MPDN-Yo3lE_58.mjs → diff-HJF2MPDN-DLvh6ibd.mjs} +1 -1
- package/dist/dist-BAXWuYIZ.mjs +322 -0
- package/dist/{dist-zf-BoTF_.mjs → dist-DuYysD9-.mjs} +20 -20
- package/dist/dist-d3vqEyC5.mjs +1 -0
- package/dist/{esm-BFkWzFey.mjs → esm-s2X3YAg-.mjs} +1 -1
- package/dist/{flag-coverage-QT4N2Z44-B8zntJyb.mjs → flag-coverage-QT4N2Z44-F9mV3xNy.mjs} +2 -2
- package/dist/{getMachineId-bsd-CPESl3L6.mjs → getMachineId-bsd-BCJXEJCn.mjs} +2 -2
- package/dist/{getMachineId-bsd-DEUypOXJ.mjs → getMachineId-bsd-D7C80Q-x.mjs} +2 -2
- package/dist/{getMachineId-bsd-C1M346yz.mjs → getMachineId-bsd-GIcY1fmf.mjs} +2 -2
- package/dist/{getMachineId-darwin-0hBTy7c8.mjs → getMachineId-darwin-C9wsuHP1.mjs} +2 -2
- package/dist/{getMachineId-darwin-CJK3eX9q.mjs → getMachineId-darwin-D9y6ky_l.mjs} +2 -2
- package/dist/{getMachineId-darwin-Vupnt-kR.mjs → getMachineId-darwin-DG876t7S.mjs} +2 -2
- package/dist/{getMachineId-linux-BGQn48cN.mjs → getMachineId-linux-BJESQahL.mjs} +2 -2
- package/dist/{getMachineId-linux-CIp07XEX.mjs → getMachineId-linux-Bt9mk0EE.mjs} +2 -2
- package/dist/{getMachineId-linux-B2nkqMir.mjs → getMachineId-linux-D9atImpV.mjs} +2 -2
- package/dist/{getMachineId-unsupported-CH1Q20xN.mjs → getMachineId-unsupported-DAbsbHrs.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DfSmC7Gy.mjs → getMachineId-unsupported-Dabs3aBp.mjs} +2 -2
- package/dist/{getMachineId-unsupported-BnsanXR2.mjs → getMachineId-unsupported-cApRznzG.mjs} +2 -2
- package/dist/{getMachineId-win-DlPRChXs.mjs → getMachineId-win-1MPHaim9.mjs} +2 -2
- package/dist/{getMachineId-win-JnMJbIaW.mjs → getMachineId-win-CH98qgwX.mjs} +2 -2
- package/dist/{getMachineId-win-BmmB_8yL.mjs → getMachineId-win-CU_iAQo9.mjs} +2 -2
- package/dist/index.d.mts +23 -26
- package/dist/index.mjs +1 -1
- package/dist/init-3zPu4r2d.mjs +1 -0
- package/dist/init-C9GuXJHx.mjs +1 -0
- package/dist/{init-DyzswSKQ.mjs → init-Cs4zbQzq.mjs} +26 -18
- package/dist/{init-BIyMdhLL.mjs → init-DR-RaetG.mjs} +6 -6
- package/dist/{is-object-BNVklKxg.mjs → is-object-7k010cEq.mjs} +1 -1
- package/dist/{libesm-DC4M2SkF.mjs → libesm-CE3v6NRY.mjs} +1 -1
- package/dist/loader-BkC_FZ7h.mjs +2 -0
- package/dist/loader-C7FUyr_0.mjs +1 -0
- package/dist/paths-2tkmjuzR.mjs +1 -0
- package/dist/paths-pA7JHYmH.mjs +2 -0
- package/dist/{preview-DSOaCD7f.mjs → preview-5SIgbwvp.mjs} +2 -2
- package/dist/preview-BUcB3nQ2.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-spvhVGSd.js → ActivityModeContent-BW6QUlpa.js} +2 -2
- package/dist/public/assets/DocumentContext-B1Fp4JCg.js +33 -0
- package/dist/public/assets/GraphPanel-CJAjFwlB.js +46 -0
- package/dist/public/assets/McpConsentDialogBody-DQ0fjmg5.js +1 -0
- package/dist/public/assets/SettingsPane-Cv7AhoVO.js +5 -0
- package/dist/public/assets/{SourceEditor-BeRKaESA.js → SourceEditor-CKxBGb1i.js} +1 -1
- package/dist/public/assets/circle-check-bKAq6pcI.js +1 -0
- package/dist/public/assets/clipboard-DcNdBOCD.js +5 -0
- package/dist/public/assets/config-validation-events-CpU7XuBS.js +1 -0
- package/dist/public/assets/{dist-DxKDMu0r.js → dist-C3u7R0q7.js} +1 -1
- package/dist/public/assets/{dist-DUCdsXly.js → dist-C82hC0q7.js} +1 -1
- package/dist/public/assets/{dist-5Xm_mb8k.js → dist-Dtie9-Ui.js} +1 -1
- package/dist/public/assets/{dist-BkmmA9Kx.js → dist-RVD4DzGH.js} +1 -1
- package/dist/public/assets/{dist-Bgq0sPT8.js → dist-dkPJvrfr.js} +1 -1
- package/dist/public/assets/{dist-CBfh7n1S.js → dist-mXs-_OvZ.js} +1 -1
- package/dist/public/assets/{dist-gwU6yV0l.js → dist-oNAFjGrp.js} +1 -1
- package/dist/public/assets/index-C5vN2roo.css +1 -0
- package/dist/public/assets/index-kRR5e5Fa.js +1843 -0
- package/dist/public/assets/propagation-api-LnD10wq2.js +1 -0
- package/dist/public/assets/target-navigation-intent-BgBCKYrO.js +1 -0
- package/dist/public/assets/telemetry-impl-DYBNNWwm.js +2 -0
- package/dist/public/assets/toggle-group-Czy0P9Ee.js +391 -0
- package/dist/public/assets/{tooltip-BaQG219g.js → tooltip-CrLpzBBL.js} +1 -1
- package/dist/public/assets/trace-api-CbLDdnQA.js +1 -0
- package/dist/public/index.html +16 -13
- package/dist/schemas/v0/config.user.schema.json +189 -0
- package/dist/schemas/v0/config.workspace.schema.json +219 -0
- package/dist/server-Dq2PmzsL.mjs +3 -0
- package/dist/src-CaoAADCF.mjs +1 -0
- package/dist/start-9VL8q17c.mjs +1 -0
- package/dist/start-CixsXnAG.mjs +2 -0
- package/package.json +5 -2
- package/scripts/build-config-schema.mjs +130 -0
- package/dist/colors-BnZ-i-vb.mjs +0 -1
- package/dist/constants-klIiSe5w.mjs +0 -2
- package/dist/dist-BCyi1oM7.mjs +0 -116
- package/dist/dist-CIeZOXfv.mjs +0 -202
- package/dist/dist-C_IerCyc.mjs +0 -1
- package/dist/init-8J2V1Tcs.mjs +0 -1
- package/dist/init-BJebZsh8.mjs +0 -1
- package/dist/loader-Cbt92LQl.mjs +0 -3
- package/dist/loader-cPhp7f3C.mjs +0 -1
- package/dist/paths-DHCHC69r.mjs +0 -2
- package/dist/paths-DVek6mWp.mjs +0 -1
- package/dist/preview-B4CVyYbD.mjs +0 -1
- package/dist/public/assets/DocumentContext-Xq_dn8Vf.js +0 -33
- package/dist/public/assets/GraphPanel-C36W-gM6.js +0 -46
- package/dist/public/assets/McpConsentDialogBody-CWm6JzA3.js +0 -1
- package/dist/public/assets/clipboard-0XbokP0-.js +0 -5
- package/dist/public/assets/index-D6aee36_.js +0 -1843
- package/dist/public/assets/index-ldPPE8aY.css +0 -1
- package/dist/public/assets/propagation-api-Bugyj7xy.js +0 -1
- package/dist/public/assets/target-navigation-intent-DlP83APM.js +0 -1
- package/dist/public/assets/telemetry-impl-D8K_lJGH.js +0 -2
- package/dist/public/assets/toggle-group-Cg6YuFV4.js +0 -281
- package/dist/src-BrGv1aC7.mjs +0 -1
- package/dist/start-9trF3lxw.mjs +0 -1
- package/dist/start-DUpc-bZp.mjs +0 -2
- /package/dist/public/assets/{ActivityPanelDiffView-D-EUyEh6.js → ActivityPanelDiffView-C1vRNF09.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-Dz2JgTKm.js → __vite-browser-external-B0s46rwe.js} +0 -0
- /package/dist/public/assets/{dialog-B7UAZUVJ.js → dialog-CJazZw1E.js} +0 -0
- /package/dist/public/assets/{go-DatQmDtN.js → go-DoDnGodl.js} +0 -0
- /package/dist/public/assets/{shell-7yok6dsz.js → shell-BXlbE6k8.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-CSlwavrd.js → w3c-keyname-B5t0fahT.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./dist-BAXWuYIZ.mjs";import{l as e,o as t}from"./server-lock-n3Y5JWNv-3o7br8XE.mjs";import{D as n,E as r,Kt as i,N as a,Ot as o,Z as s,_ as c,et as l,wt as u}from"./dist-DuYysD9-.mjs";export{c as ProjectGitInitError,r as UiLockCollisionError,n as acquireUiLock,a as bootServer,s as ensureProjectGit,l as getLogger,t as isProcessAlive,e as readServerLock,u as readUiLock,o as releaseUiLock,i as updateUiLockPort};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{n as e,r as t}from"./chunk-FK9Q3tQk.mjs";var n,r=e((()=>{n=`1.9.1`}));function i(e){let t=new Set([e]),n=new Set,r=e.match(a);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 o(e){return n.add(e),!1}function s(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(a);if(!r)return o(e);let c={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};return c.prerelease!=null||i.major!==c.major?o(e):i.major===0?i.minor===c.minor&&i.patch<=c.patch?s(e):o(e):i.minor<=c.minor?s(e):o(e)}}var a,o,s=e((()=>{r(),a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,o=i(n)}));function c(e,t,r,i=!1){let a=f[d]=f[d]??{version:n};if(!i&&a[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return r.error(t.stack||t.message),!1}if(a.version!==`1.9.1`){let t=Error(`@opentelemetry/api: Registration of version v${a.version} for ${e} does not match previously registered API v${n}`);return r.error(t.stack||t.message),!1}return a[e]=t,r.debug(`@opentelemetry/api: Registered a global for ${e} v${n}.`),!0}function l(e){let t=f[d]?.version;if(!(!t||!o(t)))return f[d]?.[e]}function u(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${n}.`);let r=f[d];r&&delete r[e]}var ee,d,f,p=e((()=>{r(),s(),ee=n.split(`.`)[0],d=Symbol.for(`opentelemetry.js.api.${ee}`),f=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{}}));function m(e,t,n){let r=l(`diag`);if(r)return r[e](t,...n)}var te,ne=e((()=>{p(),te=class{constructor(e){this._namespace=e.namespace||`DiagComponentLogger`}debug(...e){return m(`debug`,this._namespace,e)}error(...e){return m(`error`,this._namespace,e)}info(...e){return m(`info`,this._namespace,e)}warn(...e){return m(`warn`,this._namespace,e)}verbose(...e){return m(`verbose`,this._namespace,e)}}})),h,g=e((()=>{(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`})(h||={})}));function re(e,t){e<h.NONE?e=h.NONE:e>h.ALL&&(e=h.ALL),t||={};function n(n,r){let i=t[n];return typeof i==`function`&&e>=r?i.bind(t):function(){}}return{error:n(`error`,h.ERROR),warn:n(`warn`,h.WARN),info:n(`info`,h.INFO),debug:n(`debug`,h.DEBUG),verbose:n(`verbose`,h.VERBOSE)}}var ie=e((()=>{g()})),ae,_,v=e((()=>{ne(),ie(),g(),p(),ae=`diag`,_=class e{static instance(){return this._instance||=new e,this._instance}constructor(){function e(e){return function(...t){let n=l(`diag`);if(n)return n[e](...t)}}let t=this;t.setLogger=(e,n={logLevel:h.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=l(`diag`),i=re(n.logLevel??h.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 c(`diag`,i,t,!0)},t.disable=()=>{u(ae,t)},t.createComponentLogger=e=>new te(e),t.verbose=e(`verbose`),t.debug=e(`debug`),t.info=e(`info`),t.warn=e(`warn`),t.error=e(`error`)}}})),oe,se=e((()=>{oe=class e{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let e of t)n._entries.delete(e);return n}clear(){return new e}}})),ce,le=e((()=>{ce=Symbol(`BaggageEntryMetadata`)}));function ue(e={}){return new oe(new Map(Object.entries(e)))}function de(e){return typeof e!=`string`&&(fe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=``),{__TYPE__:ce,toString(){return e}}}var fe,pe=e((()=>{v(),se(),le(),fe=_.instance()}));function me(e){return Symbol.for(e)}var he,y,b=e((()=>{he=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}}},y=new he})),x,S,ge,_e=e((()=>{if(x=[{n:`error`,c:`error`},{n:`warn`,c:`warn`},{n:`info`,c:`info`},{n:`debug`,c:`debug`},{n:`verbose`,c:`trace`}],S={},typeof console<`u`)for(let e of[`error`,`warn`,`info`,`debug`,`trace`,`log`])typeof console[e]==`function`&&(S[e]=console[e]);ge=class{constructor(){function e(e){return function(...t){let n=S[e];if(typeof n!=`function`&&(n=S.log),typeof n!=`function`&&console&&(n=console[e],typeof n!=`function`&&(n=console.log)),typeof n==`function`)return n.apply(console,t)}}for(let t=0;t<x.length;t++)this[x[t].n]=e(x[t].c)}}}));function ve(){return T}var ye,C,be,xe,Se,Ce,w,we,Te,Ee,T,De,Oe,ke,Ae,je,Me,Ne,Pe=e((()=>{ye=class{constructor(){}createGauge(e,t){return Oe}createHistogram(e,t){return ke}createCounter(e,t){return De}createUpDownCounter(e,t){return Ae}createObservableGauge(e,t){return Me}createObservableCounter(e,t){return je}createObservableUpDownCounter(e,t){return Ne}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},C=class{},be=class extends C{add(e,t){}},xe=class extends C{add(e,t){}},Se=class extends C{record(e,t){}},Ce=class extends C{record(e,t){}},w=class{addCallback(e){}removeCallback(e){}},we=class extends w{},Te=class extends w{},Ee=class extends w{},T=new ye,De=new be,Oe=new Se,ke=new Ce,Ae=new xe,je=new we,Me=new Te,Ne=new Ee})),Fe,Ie=e((()=>{(function(e){e[e.INT=0]=`INT`,e[e.DOUBLE=1]=`DOUBLE`})(Fe||={})})),E,D,Le=e((()=>{E={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},D={set(e,t,n){e!=null&&(e[t]=n)}}})),Re,ze=e((()=>{b(),Re=class{active(){return y}with(e,t,n,...r){return t.call(n,...r)}bind(e,t){return t}enable(){return this}disable(){return this}}})),O,Be,k,A=e((()=>{ze(),p(),v(),O=`context`,Be=new Re,k=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalContextManager(e){return c(O,e,_.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 l(O)||Be}disable(){this._getContextManager().disable(),u(O,_.instance())}}})),j,Ve=e((()=>{(function(e){e[e.NONE=0]=`NONE`,e[e.SAMPLED=1]=`SAMPLED`})(j||={})})),M,N,P,F=e((()=>{Ve(),M=`0000000000000000`,N=`00000000000000000000000000000000`,P={traceId:N,spanId:M,traceFlags:j.NONE}})),I,L=e((()=>{F(),I=class{constructor(e=P){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 R(e){return e.getValue(z)||void 0}function He(){return R(k.getInstance().active())}function Ue(e,t){return e.setValue(z,t)}function We(e){return e.deleteValue(z)}function Ge(e,t){return Ue(e,new I(t))}function Ke(e){return R(e)?.spanContext()}var z,qe=e((()=>{b(),L(),A(),z=me(`OpenTelemetry Context Key SPAN`)}));function Je(e,t){if(typeof e!=`string`||e.length!==t)return!1;let n=0;for(let t=0;t<e.length;t+=4)n+=(V[e.charCodeAt(t)]|0)+(V[e.charCodeAt(t+1)]|0)+(V[e.charCodeAt(t+2)]|0)+(V[e.charCodeAt(t+3)]|0);return n===t}function Ye(e){return Je(e,32)&&e!==`00000000000000000000000000000000`}function Xe(e){return Je(e,16)&&e!==`0000000000000000`}function B(e){return Ye(e.traceId)&&Xe(e.spanId)}function Ze(e){return new I(e)}var V,Qe=e((()=>{F(),L(),V=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 $e(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 H,et,tt=e((()=>{A(),qe(),L(),Qe(),H=k.getInstance(),et=class{startSpan(e,t,n=H.active()){if(t?.root)return new I;let r=n&&Ke(n);return $e(r)&&B(r)?new I(r):new I}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??H.active(),c=this.startSpan(e,i,s),l=Ue(s,c);return H.with(l,o,void 0,c)}}})),nt,rt,it=e((()=>{tt(),nt=new et,rt=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):nt}}})),at,ot=e((()=>{tt(),at=class{getTracer(e,t,n){return new et}}})),st,U,ct=e((()=>{it(),ot(),st=new at,U=class{getTracer(e,t,n){return this.getDelegateTracer(e,t,n)??new rt(this,e,t,n)}getDelegate(){return this._delegate??st}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,n){return this._delegate?.getTracer(e,t,n)}}})),lt,ut=e((()=>{(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(lt||={})})),dt,ft=e((()=>{(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(dt||={})})),pt,mt=e((()=>{(function(e){e[e.UNSET=0]=`UNSET`,e[e.OK=1]=`OK`,e[e.ERROR=2]=`ERROR`})(pt||={})}));function ht(e){return yt.test(e)}function gt(e){return bt.test(e)&&!xt.test(e)}var W,_t,vt,yt,bt,xt,St=e((()=>{W=`[_0-9a-z-*/]`,_t=`[a-z]${W}{0,255}`,vt=`[a-z0-9]${W}{0,240}@[a-z]${W}{0,13}`,yt=RegExp(`^(?:${_t}|${vt})$`),bt=/^[ -~]{0,255}[!-~]$/,xt=/,|=/})),Ct,wt,Tt,Et,Dt,Ot=e((()=>{St(),Ct=32,wt=512,Tt=`,`,Et=`=`,Dt=class e{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return Array.from(this._internalState.keys()).reduceRight((e,t)=>(e.push(t+Et+this.get(t)),e),[]).join(Tt)}_parse(e){e.length>wt||(this._internalState=e.split(Tt).reduceRight((e,t)=>{let n=t.trim(),r=n.indexOf(Et);if(r!==-1){let i=n.slice(0,r),a=n.slice(r+1,t.length);ht(i)&>(a)&&e.set(i,a)}return e},new Map),this._internalState.size>Ct&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ct))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}}));function kt(e){return new Dt(e)}var At=e((()=>{Ot()})),G,jt=e((()=>{A(),G=k.getInstance()})),K,Mt=e((()=>{v(),K=_.instance()})),Nt,Pt,Ft=e((()=>{Pe(),Nt=class{getMeter(e,t,n){return T}},Pt=new Nt})),q,It,Lt=e((()=>{Ft(),p(),v(),q=`metrics`,It=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return c(q,e,_.instance())}getMeterProvider(){return l(q)||Pt}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){u(q,_.instance())}}})),J,Rt=e((()=>{Lt(),J=It.getInstance()})),zt,Bt=e((()=>{zt=class{inject(e,t){}extract(e,t){return e}fields(){return[]}}}));function Vt(e){return e.getValue(Y)||void 0}function Ht(){return Vt(k.getInstance().active())}function Ut(e,t){return e.setValue(Y,t)}function Wt(e){return e.deleteValue(Y)}var Y,Gt=e((()=>{A(),b(),Y=me(`OpenTelemetry Baggage Key`)})),X,Kt,qt,Jt=e((()=>{p(),Bt(),Le(),Gt(),pe(),v(),X=`propagation`,Kt=new zt,qt=class e{constructor(){this.createBaggage=ue,this.getBaggage=Vt,this.getActiveBaggage=Ht,this.setBaggage=Ut,this.deleteBaggage=Wt}static getInstance(){return this._instance||=new e,this._instance}setGlobalPropagator(e){return c(X,e,_.instance())}inject(e,t,n=D){return this._getGlobalPropagator().inject(e,t,n)}extract(e,t,n=E){return this._getGlobalPropagator().extract(e,t,n)}fields(){return this._getGlobalPropagator().fields()}disable(){u(X,_.instance())}_getGlobalPropagator(){return l(X)||Kt}}})),Z,Yt=e((()=>{Jt(),Z=qt.getInstance()})),Q,Xt,Zt=e((()=>{p(),ct(),Qe(),qe(),v(),Q=`trace`,Xt=class e{constructor(){this._proxyTracerProvider=new U,this.wrapSpanContext=Ze,this.isSpanContextValid=B,this.deleteSpan=We,this.getSpan=R,this.getActiveSpan=He,this.getSpanContext=Ke,this.setSpan=Ue,this.setSpanContext=Ge}static getInstance(){return this._instance||=new e,this._instance}setGlobalTracerProvider(e){let t=c(Q,this._proxyTracerProvider,_.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return l(Q)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){u(Q,_.instance()),this._proxyTracerProvider=new U}}})),$,Qt=e((()=>{Zt(),$=Xt.getInstance()})),$t=t({DiagConsoleLogger:()=>ge,DiagLogLevel:()=>h,INVALID_SPANID:()=>M,INVALID_SPAN_CONTEXT:()=>P,INVALID_TRACEID:()=>N,ProxyTracer:()=>rt,ProxyTracerProvider:()=>U,ROOT_CONTEXT:()=>y,SamplingDecision:()=>lt,SpanKind:()=>dt,SpanStatusCode:()=>pt,TraceFlags:()=>j,ValueType:()=>Fe,baggageEntryMetadataFromString:()=>de,context:()=>G,createContextKey:()=>me,createNoopMeter:()=>ve,createTraceState:()=>kt,default:()=>en,defaultTextMapGetter:()=>E,defaultTextMapSetter:()=>D,diag:()=>K,isSpanContextValid:()=>B,isValidSpanId:()=>Xe,isValidTraceId:()=>Ye,metrics:()=>J,propagation:()=>Z,trace:()=>$}),en,tn=e((()=>{pe(),b(),_e(),g(),Pe(),Ie(),Le(),it(),ct(),ut(),ft(),mt(),Ve(),At(),Qe(),F(),jt(),Mt(),Rt(),Yt(),Qt(),en={context:G,diag:K,metrics:J,propagation:Z,trace:$}}));export{J as a,pt as c,Z as i,dt as l,tn as n,K as o,$ as r,G as s,$t as t};
|
|
2
|
-
//# sourceMappingURL=esm-
|
|
2
|
+
//# sourceMappingURL=esm-s2X3YAg-.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-YNYSPYQ5-BpP11HXS.mjs";import"./chunk-CWQS3NFK-DFdwmFxJ.mjs";import"./chunk-DXB73IDG-C774okS0.mjs";import"./chunk-5QMZ5MUS-DWTkM0vM.mjs";import"./chunk-A5O5YHGN-C7BVq0eF.mjs";import"./chunk-24IMIIXA-Bz7rlZT3.mjs";import{i as e,n as t}from"./chunk-VOBGTVA6-BT7gUxqf.mjs";import{t as n}from"./chunk-OARHFVLG-CY8D2Qov.mjs";import{n as r}from"./chunk-QJ7O6ZN3-BH67tCjg.mjs";import{n as i}from"./chunk-ALLTKNUZ-BMiTDN50.mjs";import{n as ee,r as te}from"./chunk-D6CWQ5DW-B-J4LN9N.mjs";import{n as a}from"./chunk-TXBZCHCQ-l48TczF5.mjs";import{n as o}from"./chunk-4GTNDTRF-_OVmXcJ-.mjs";import{t as s}from"./chunk-LL3S3NLB-DxXgE3kY.mjs";import{n as c}from"./chunk-LWEGUNWT-BALY4RLC.mjs";import{n as l}from"./chunk-Z7JVV2SM-BzR-yvwK.mjs";import{n as u}from"./chunk-NUYSJFDK-D2NXm2ND.mjs";import{t as d}from"./chunk-SDNKECQQ-C3GEf3VZ.mjs";import{t as f}from"./chunk-D7MEQ3VN-Csvth_Ss.mjs";import{n as p}from"./chunk-TLSUDHID-
|
|
2
|
-
//# sourceMappingURL=flag-coverage-QT4N2Z44-
|
|
1
|
+
import"./chunk-YNYSPYQ5-BpP11HXS.mjs";import"./chunk-CWQS3NFK-DFdwmFxJ.mjs";import"./chunk-DXB73IDG-C774okS0.mjs";import"./chunk-5QMZ5MUS-DWTkM0vM.mjs";import"./chunk-A5O5YHGN-C7BVq0eF.mjs";import"./chunk-24IMIIXA-Bz7rlZT3.mjs";import{i as e,n as t}from"./chunk-VOBGTVA6-BT7gUxqf.mjs";import{t as n}from"./chunk-OARHFVLG-CY8D2Qov.mjs";import{n as r}from"./chunk-QJ7O6ZN3-BH67tCjg.mjs";import{n as i}from"./chunk-ALLTKNUZ-BMiTDN50.mjs";import{n as ee,r as te}from"./chunk-D6CWQ5DW-B-J4LN9N.mjs";import{n as a}from"./chunk-TXBZCHCQ-l48TczF5.mjs";import{n as o}from"./chunk-4GTNDTRF-_OVmXcJ-.mjs";import{t as s}from"./chunk-LL3S3NLB-DxXgE3kY.mjs";import{n as c}from"./chunk-LWEGUNWT-BALY4RLC.mjs";import{n as l}from"./chunk-Z7JVV2SM-BzR-yvwK.mjs";import{n as u}from"./chunk-NUYSJFDK-D2NXm2ND.mjs";import{t as d}from"./chunk-SDNKECQQ-C3GEf3VZ.mjs";import{t as f}from"./chunk-D7MEQ3VN-Csvth_Ss.mjs";import{n as p}from"./chunk-TLSUDHID-_TMan7ee.mjs";import{t as m}from"./chunk-4Q4SM6WR-DDQRsilN.mjs";import{n as h}from"./chunk-RPNGRAAP-BughPjdR.mjs";import{n as g}from"./chunk-GCTKCWKD-Deqi1D_N.mjs";import{n as _,r as v}from"./chunk-NAERJDUW-CX0lf-xx.mjs";import{n as y}from"./chunk-VJFXDYWH-IiUXkKX0.mjs";import{t as b}from"./chunk-YFG2CMIF-Csgr05KV.mjs";import{n as x}from"./chunk-CR5AFCPT-ROmyDFrB.mjs";import"./chunk-J642UCRS-DB77Y2Wt.mjs";import{t as S}from"./chunk-LPQPILI2-BXfU9TgM.mjs";import{t as C}from"./chunk-BRGMQKJV-CdrkqzRA.mjs";import"./chunk-SYMJJMQ4-CWTh95-4.mjs";import"./chunk-7TSDKFEO-a-GUGBTu.mjs";import"./chunk-BBXLRYSX-DURjrblE.mjs";import{n as w}from"./chunk-XORM457F-CRToN1RQ.mjs";import"./chunk-F55TLFGB-DqkrAMO5.mjs";import{t as T}from"./chunk-UNYNJIFU-DwPQMz0F.mjs";import{r as E}from"./chunk-HWBSOZZR-Dikp87Ww.mjs";import{n as D}from"./chunk-MDLLFABN-oBQf6bGE.mjs";import{n as O}from"./chunk-MLXIYONF-DB-C8Hx8.mjs";import{n as k}from"./chunk-A65PWWJC-D7J5l9eq.mjs";import{t as A}from"./chunk-MHTUABJP-dKmK6Hw7.mjs";import{n as j}from"./chunk-4HHKTUW3-Dm69hDaZ.mjs";import{n as M}from"./chunk-HJQJAYMS-Ci3vsKQW.mjs";import{n as N}from"./chunk-PP6PSHAB-DMC_XCfO.mjs";import{i as P,n as F,o as I}from"./chunk-LTZRCH7N-GAjTFNwG.mjs";import{t as L}from"./chunk-YTNYSM6T-DuBR2-TM.mjs";import{t as R}from"./chunk-Z6LRHWXI-DbRghyzT.mjs";import{n as z}from"./chunk-A7A2DBEE-PLfkXLI4.mjs";import{t as B}from"./chunk-APT7OOP2-CXHnSuct.mjs";import{n as V}from"./chunk-XKQRETAK-cVWA9gEB.mjs";import{n as H}from"./chunk-5V6VZH6T-BCr5_GDF.mjs";import{n as U,r as W}from"./chunk-R6QSAL5T-CtbJTvt9.mjs";import{n as G}from"./chunk-YCFVLTST-Ox9Z0Nk6.mjs";import{t as K}from"./chunk-GOV5EKKI-PN17n-Z0.mjs";import{t as q}from"./chunk-XVDPCNWR-CtK-Xs2O.mjs";import{n as J}from"./chunk-NCNPKYJZ-BFGan4lR.mjs";import{t as ne}from"./chunk-TOMNU26N-BcdbBQ2p.mjs";import{t as Y}from"./chunk-PYSFUGCK-CY7pclEB.mjs";import{t as X}from"./chunk-VYOJP4TV-BvibOnKG.mjs";import{t as Z}from"./chunk-MYE6AGBJ-B4pRo9ma.mjs";import{t as re}from"./chunk-A7ICOL4V-Drb3XsEL.mjs";import{t as ie}from"./chunk-55VFSPNA-DVZfQAzN.mjs";import{n as ae}from"./chunk-WKFATFPP-DCZdrA8x.mjs";import{n as oe}from"./chunk-JVPRLUMK-DnQCNjpq.mjs";import{t as se}from"./chunk-62RKD26F-D-luOa0m.mjs";import{t as ce}from"./chunk-QCDB2VPH-D1RuXtOm.mjs";import{t as le}from"./chunk-F23WWYKW-DST0dB7V.mjs";import{n as ue}from"./chunk-D4J545R4-C8nMOauR.mjs";import{t as de}from"./chunk-DCAAORBQ-BdrR5ttw.mjs";import{n as fe}from"./chunk-GXVXFKBA-993FoPmq.mjs";import{n as pe}from"./chunk-5QVNJEHU-BvsipSFW.mjs";import"./chunk-VLGZJRPG-D4NVKJYL.mjs";import{a as me,n as he,o as ge}from"./chunk-YS3AZT3J-BEZxz_aQ.mjs";import{n as _e}from"./chunk-NYQYO467-Degkom4D.mjs";import{n as ve}from"./chunk-OL3S66CO-Bmgu4tW4.mjs";import{t as ye}from"./chunk-KMEYNNUA-DfdK88O_.mjs";import{t as be}from"./chunk-MIZPJHVH-z-geAni9.mjs";import{n as xe}from"./chunk-A4JSPFCI-U-xWmMMC.mjs";import{t as Q}from"./chunk-PBXLG62G-lGjqkk78.mjs";import{t as Se}from"./chunk-A4HU7SVR-hefV_YmW.mjs";import{t as Ce}from"./chunk-HJWBQKYG-UZig4wUt.mjs";import{t as we}from"./chunk-64BAICW3-CTJNEx4Q.mjs";import{n as Te}from"./chunk-T56QNPHK-DlKQeuXU.mjs";import{n as Ee}from"./chunk-V7TAPXDL-CnKUp2df.mjs";import{n as De}from"./chunk-MDDMCKUK-D6GWoJsI.mjs";import{t as Oe}from"./chunk-OCS6LSEM-BHslttnj.mjs";import{n as ke}from"./chunk-OCLXQMOG-BMsyLQhm.mjs";var Ae=[g,a,Te,Ee,De,Oe,ke,be,u,xe,Q,o,Se,Ce,we,de,fe,pe,ge,he,me,_e,ve,n,ye,ae,l,d,oe,se,ce,le,ue,y,Y,X,Z,c,re,ie,S,i,m,q,h,_,v,e,t,J,ne,W,U,s,te,ee,G,r,p,f,K,L,R,z,b,B,V,H,x,D,O,k,A,j,M,N,P,F,I,C,w,T,E];function je(){return Ae}var $=new Map;for(let e of je())$.set(e.name,new Set(e.flags.map(e=>e.flag)));function Me(e,t,n){let r=$.get(t);if(!(!r||r.size===0))for(let i of n)r.has(i)&&e.hit(`cmd:flag:${t}:${i}`)}export{Me as emitFlagCoverage};
|
|
2
|
+
//# sourceMappingURL=flag-coverage-QT4N2Z44-F9mV3xNy.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-bsd-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";import{t as a}from"./execAsync-0jii24p9.mjs";var o=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let o=t(`fs`),s=a(),c=(r(),e(i));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=l}));export default o();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-bsd-BCJXEJCn.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-bsd-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";import{t as a}from"./execAsync-Czqc-yAz.mjs";var o=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let o=t(`fs`),s=a(),c=(r(),e(i));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=l}));export default o();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-bsd-D7C80Q-x.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-bsd-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";import{t as a}from"./execAsync-DgmLXmTx.mjs";var o=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let o=t(`fs`),s=a(),c=(r(),e(i));async function l(){try{return(await o.promises.readFile(`/etc/hostid`,{encoding:`utf8`})).trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}try{return(await(0,s.execAsync)(`kenv -q smbios.system.uuid`)).stdout.trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=l}));export default o();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-bsd-GIcY1fmf.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-
|
|
1
|
+
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-s2X3YAg-.mjs";import{t as i}from"./execAsync-Czqc-yAz.mjs";var a=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getMachineId=void 0;let a=i(),o=(n(),e(r));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}t.getMachineId=s}));export default a();export{};
|
|
3
|
-
//# sourceMappingURL=getMachineId-darwin-
|
|
3
|
+
//# sourceMappingURL=getMachineId-darwin-C9wsuHP1.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-
|
|
1
|
+
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-s2X3YAg-.mjs";import{t as i}from"./execAsync-0jii24p9.mjs";var a=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getMachineId=void 0;let a=i(),o=(n(),e(r));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}t.getMachineId=s}));export default a();export{};
|
|
3
|
-
//# sourceMappingURL=getMachineId-darwin-
|
|
3
|
+
//# sourceMappingURL=getMachineId-darwin-D9y6ky_l.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-
|
|
1
|
+
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-s2X3YAg-.mjs";import{t as i}from"./execAsync-DgmLXmTx.mjs";var a=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getMachineId=void 0;let a=i(),o=(n(),e(r));async function s(){try{let e=(await(0,a.execAsync)(`ioreg -rd1 -c "IOPlatformExpertDevice"`)).stdout.split(`
|
|
2
2
|
`).find(e=>e.includes(`IOPlatformUUID`));if(!e)return;let t=e.split(`" = "`);if(t.length===2)return t[1].slice(0,-1)}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}t.getMachineId=s}));export default a();export{};
|
|
3
|
-
//# sourceMappingURL=getMachineId-darwin-
|
|
3
|
+
//# sourceMappingURL=getMachineId-darwin-DG876t7S.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-linux-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";var a=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let a=t(`fs`),o=(r(),e(i));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=s}));export default a();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-linux-BJESQahL.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-linux-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";var a=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let a=t(`fs`),o=(r(),e(i));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=s}));export default a();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-linux-Bt9mk0EE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-linux-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";var a=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let a=t(`fs`),o=(r(),e(i));async function s(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{return(await a.promises.readFile(e,{encoding:`utf8`})).trim()}catch(e){o.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=s}));export default a();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-linux-D9atImpV.mjs.map
|
package/dist/{getMachineId-unsupported-CH1Q20xN.mjs → getMachineId-unsupported-DAbsbHrs.mjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-unsupported-
|
|
1
|
+
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-s2X3YAg-.mjs";var i=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getMachineId=void 0;let i=(n(),e(r));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}t.getMachineId=a}));export default i();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-unsupported-DAbsbHrs.mjs.map
|
package/dist/{getMachineId-unsupported-DfSmC7Gy.mjs → getMachineId-unsupported-Dabs3aBp.mjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-unsupported-
|
|
1
|
+
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-s2X3YAg-.mjs";var i=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getMachineId=void 0;let i=(n(),e(r));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}t.getMachineId=a}));export default i();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-unsupported-Dabs3aBp.mjs.map
|
package/dist/{getMachineId-unsupported-BnsanXR2.mjs → getMachineId-unsupported-cApRznzG.mjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-unsupported-
|
|
1
|
+
import{a as e,t}from"./chunk-FK9Q3tQk.mjs";import{n,t as r}from"./esm-s2X3YAg-.mjs";var i=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getMachineId=void 0;let i=(n(),e(r));async function a(){i.diag.debug(`could not read machine-id: unsupported platform`)}t.getMachineId=a}));export default i();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-unsupported-cApRznzG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-win-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";import{t as a}from"./execAsync-Czqc-yAz.mjs";var o=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let o=t(`process`),s=a(),c=(r(),e(i));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=l}));export default o();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-win-1MPHaim9.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-win-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";import{t as a}from"./execAsync-0jii24p9.mjs";var o=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let o=t(`process`),s=a(),c=(r(),e(i));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=l}));export default o();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-win-CH98qgwX.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-
|
|
2
|
-
//# sourceMappingURL=getMachineId-win-
|
|
1
|
+
import{a as e,i as t,t as n}from"./chunk-FK9Q3tQk.mjs";import{n as r,t as i}from"./esm-s2X3YAg-.mjs";import{t as a}from"./execAsync-DgmLXmTx.mjs";var o=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getMachineId=void 0;let o=t(`process`),s=a(),c=(r(),e(i));async function l(){let e=`%windir%\\System32\\REG.exe`;o.arch===`ia32`&&`PROCESSOR_ARCHITEW6432`in o.env&&(e=`%windir%\\sysnative\\cmd.exe /c `+e);try{let t=(await(0,s.execAsync)(`${e} QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`)).stdout.split(`REG_SZ`);if(t.length===2)return t[1].trim()}catch(e){c.diag.debug(`error reading machine id: ${e}`)}}n.getMachineId=l}));export default o();export{};
|
|
2
|
+
//# sourceMappingURL=getMachineId-win-CU_iAQo9.mjs.map
|
package/dist/index.d.mts
CHANGED
|
@@ -2246,57 +2246,54 @@ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadon
|
|
|
2246
2246
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2247
2247
|
//#endregion
|
|
2248
2248
|
//#region src/config/schema.d.ts
|
|
2249
|
+
type Config = CoreConfig;
|
|
2249
2250
|
declare const ConfigSchema: ZodObject<{
|
|
2250
2251
|
content: ZodDefault<ZodObject<{
|
|
2251
2252
|
dir: ZodDefault<ZodString>;
|
|
2252
2253
|
include: ZodDefault<ZodArray<ZodString>>;
|
|
2253
2254
|
exclude: ZodDefault<ZodArray<ZodString>>;
|
|
2254
|
-
}, $
|
|
2255
|
+
}, $loose>>;
|
|
2255
2256
|
github: ZodDefault<ZodObject<{
|
|
2256
2257
|
oauthAppClientId: ZodDefault<ZodString>;
|
|
2257
|
-
}, $
|
|
2258
|
-
sync: ZodDefault<ZodObject<{
|
|
2259
|
-
enabled: ZodOptional<ZodBoolean>;
|
|
2260
|
-
pushIntervalSeconds: ZodDefault<ZodNumber>;
|
|
2261
|
-
pullIntervalSeconds: ZodDefault<ZodNumber>;
|
|
2262
|
-
autoCommit: ZodDefault<ZodBoolean>;
|
|
2263
|
-
autoPush: ZodDefault<ZodBoolean>;
|
|
2264
|
-
autoPull: ZodDefault<ZodBoolean>;
|
|
2265
|
-
commitMessage: ZodDefault<ZodString>;
|
|
2266
|
-
}, $strip>>;
|
|
2258
|
+
}, $loose>>;
|
|
2267
2259
|
server: ZodDefault<ZodObject<{
|
|
2268
|
-
port: ZodDefault<ZodNumber>;
|
|
2269
2260
|
host: ZodDefault<ZodString>;
|
|
2270
2261
|
openOnAgentEdit: ZodDefault<ZodBoolean>;
|
|
2271
|
-
}, $
|
|
2272
|
-
persistence: ZodDefault<ZodObject<{
|
|
2273
|
-
debounceMs: ZodDefault<ZodNumber>;
|
|
2274
|
-
maxDebounceMs: ZodDefault<ZodNumber>;
|
|
2275
|
-
}, $strip>>;
|
|
2262
|
+
}, $loose>>;
|
|
2276
2263
|
preview: ZodDefault<ZodObject<{
|
|
2277
2264
|
baseUrl: ZodOptional<ZodURL>;
|
|
2278
|
-
}, $
|
|
2265
|
+
}, $loose>>;
|
|
2279
2266
|
folders: ZodDefault<ZodArray<ZodObject<{
|
|
2280
2267
|
match: ZodString;
|
|
2281
2268
|
frontmatter: ZodObject<{
|
|
2282
2269
|
title: ZodOptional<ZodString>;
|
|
2283
2270
|
description: ZodOptional<ZodString>;
|
|
2284
2271
|
tags: ZodOptional<ZodArray<ZodString>>;
|
|
2285
|
-
}, $
|
|
2286
|
-
}, $
|
|
2272
|
+
}, $loose>;
|
|
2273
|
+
}, $loose>>>;
|
|
2287
2274
|
mcp: ZodDefault<ZodObject<{
|
|
2288
2275
|
autoStart: ZodDefault<ZodBoolean>;
|
|
2289
2276
|
tools: ZodDefault<ZodObject<{
|
|
2290
2277
|
read_document: ZodDefault<ZodObject<{
|
|
2291
2278
|
historyDepth: ZodDefault<ZodNumber>;
|
|
2292
|
-
}, $
|
|
2279
|
+
}, $loose>>;
|
|
2293
2280
|
search: ZodDefault<ZodObject<{
|
|
2294
2281
|
maxResults: ZodDefault<ZodNumber>;
|
|
2295
|
-
}, $
|
|
2296
|
-
}, $
|
|
2297
|
-
}, $
|
|
2298
|
-
|
|
2299
|
-
|
|
2282
|
+
}, $loose>>;
|
|
2283
|
+
}, $loose>>;
|
|
2284
|
+
}, $loose>>;
|
|
2285
|
+
appearance: ZodDefault<ZodObject<{
|
|
2286
|
+
theme: ZodOptional<ZodEnum<{
|
|
2287
|
+
light: "light";
|
|
2288
|
+
dark: "dark";
|
|
2289
|
+
system: "system";
|
|
2290
|
+
}>>;
|
|
2291
|
+
editorModeDefault: ZodOptional<ZodEnum<{
|
|
2292
|
+
wysiwyg: "wysiwyg";
|
|
2293
|
+
source: "source";
|
|
2294
|
+
}>>;
|
|
2295
|
+
}, $loose>>;
|
|
2296
|
+
}, $loose>;
|
|
2300
2297
|
//#endregion
|
|
2301
2298
|
//#region src/config/loader.d.ts
|
|
2302
2299
|
interface LoadConfigResult {
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as e,r as t}from"./loader-BkC_FZ7h.mjs";import{c as n,i as r,l as i,s as a,t as o,u as s}from"./init-DR-RaetG.mjs";import"./src-CaoAADCF.mjs";export{i as ALL_EDITOR_IDS,t as ConfigSchema,s as EDITOR_TARGETS,o as detectInstalledEditors,e as loadConfig,r as readExistingMcpEntry,a as writeEditorMcpConfig,n as writeUserMcpConfigs};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./init-DR-RaetG.mjs";export{e as runInit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./init-Cs4zbQzq.mjs";export{e as initContent};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Q as e,Y as t}from"./dist-BAXWuYIZ.mjs";import{i as n,n as r,t as i}from"./constants-CCnuxCJE.mjs";import{join as a,resolve as o}from"node:path";import{existsSync as s,mkdirSync as c,readFileSync as l,writeFileSync as u}from"node:fs";function d(n){return`# yaml-language-server: $schema=https://unpkg.com/@inkeep/open-knowledge@latest/dist/schemas/${t}/config.workspace.schema.json
|
|
2
|
+
# Open Knowledge — workspace configuration
|
|
2
3
|
#
|
|
3
4
|
# This file overrides built-in defaults for this workspace. Every key below
|
|
4
5
|
# is commented out and shows its current default value. Uncomment any key
|
|
@@ -6,15 +7,15 @@ import{n as e,t}from"./constants-klIiSe5w.mjs";import{h as n}from"./dist-CIeZOXf
|
|
|
6
7
|
#
|
|
7
8
|
# Precedence (lowest -> highest):
|
|
8
9
|
# Built-in defaults
|
|
9
|
-
# -> ~/${
|
|
10
|
-
# -> ./${
|
|
10
|
+
# -> ~/${e}/config.yml (user defaults)
|
|
11
|
+
# -> ./${e}/config.yml (this file)
|
|
11
12
|
#
|
|
12
13
|
# Schema reference: packages/cli/src/config/schema.ts
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
# --- Content ---------------------------------------------------------------
|
|
16
17
|
# dir: where the CRDT editor reads/writes documents. Relative to the project
|
|
17
|
-
# root (the directory containing ${
|
|
18
|
+
# root (the directory containing ${e}/), NOT to this file.
|
|
18
19
|
#
|
|
19
20
|
# include/exclude: glob patterns for tracked content files. Relative to the
|
|
20
21
|
# content directory (content.dir).
|
|
@@ -48,22 +49,29 @@ import{n as e,t}from"./constants-klIiSe5w.mjs";import{h as n}from"./dist-CIeZOXf
|
|
|
48
49
|
# --- Server ----------------------------------------------------------------
|
|
49
50
|
# HTTP/WebSocket listener for the Hocuspocus server + static React app.
|
|
50
51
|
#
|
|
52
|
+
# host: bind interface for the HTTP server (\`localhost\` for loopback;
|
|
53
|
+
# \`0.0.0.0\` for LAN). Override per-process with the \`HOST\` env var or the
|
|
54
|
+
# \`--host\` CLI flag. Port is per-machine only — set via \`PORT\` env or the
|
|
55
|
+
# \`--port\` CLI flag (no schema field).
|
|
56
|
+
#
|
|
51
57
|
# openOnAgentEdit: when true, the browser opens automatically the first time
|
|
52
58
|
# an agent writes to the knowledge base in this server session. Debounced to
|
|
53
59
|
# one open per boot. Useful for pairing with Claude Code — you see the edit
|
|
54
60
|
# land live. Leave false for headless/CI.
|
|
55
61
|
#
|
|
56
62
|
# server:
|
|
57
|
-
# port: 3000
|
|
58
63
|
# host: localhost
|
|
59
64
|
# openOnAgentEdit: false
|
|
60
65
|
|
|
61
66
|
|
|
62
|
-
# ---
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
+
# --- Appearance ------------------------------------------------------------
|
|
68
|
+
# Theme + default editor mode for new docs. Both default UNSET so the
|
|
69
|
+
# existing localStorage cache (\`ok-theme-v1\` / \`ok-editor-mode-v1\`) keeps
|
|
70
|
+
# powering FOUC-free first paint until you explicitly write here.
|
|
71
|
+
#
|
|
72
|
+
# appearance:
|
|
73
|
+
# theme: system # 'light' | 'dark' | 'system'
|
|
74
|
+
# editorModeDefault: wysiwyg # 'wysiwyg' | 'source'
|
|
67
75
|
|
|
68
76
|
|
|
69
77
|
# --- Folders: per-folder frontmatter defaults -------------------------------
|
|
@@ -110,16 +118,16 @@ import{n as e,t}from"./constants-klIiSe5w.mjs";import{h as n}from"./dist-CIeZOXf
|
|
|
110
118
|
# title: Articles
|
|
111
119
|
# description: Canonical knowledge committed after a team decision. Produced by the \`consolidate\` tool with a \`supersedes:\` chain tying back to the research that preceded it.
|
|
112
120
|
# tags: [article, canonical, layer-consolidate]
|
|
113
|
-
|
|
114
|
-
`).map(e=>e.trim()).filter(e=>e.length>0&&!e.startsWith(`#`)),r=
|
|
115
|
-
`).map(e=>e.trim())),
|
|
121
|
+
`}function f(e,t){return s(e)?!1:(u(e,t,`utf-8`),!0)}function p(e,t){if(!s(e))return u(e,t,`utf-8`),`created`;let n=t.split(`
|
|
122
|
+
`).map(e=>e.trim()).filter(e=>e.length>0&&!e.startsWith(`#`)),r=l(e,`utf-8`),i=new Set(r.split(`
|
|
123
|
+
`).map(e=>e.trim())),a=n.filter(e=>!i.has(e));return a.length===0?`unchanged`:(u(e,`${r}${r.length===0||r.endsWith(`
|
|
116
124
|
`)?``:`
|
|
117
|
-
`}${
|
|
118
|
-
`)}\n`,`utf-8`),`updated`)}const
|
|
125
|
+
`}${a.join(`
|
|
126
|
+
`)}\n`,`utf-8`),`updated`)}const m=`# Per-machine runtime state — never commit. All Open Knowledge ignore rules
|
|
119
127
|
# live here so the project root .gitignore stays free of OK-internal paths.
|
|
120
128
|
|
|
121
129
|
# Derived caches
|
|
122
|
-
${
|
|
130
|
+
${i}/
|
|
123
131
|
|
|
124
132
|
# Per-process locks
|
|
125
133
|
server.lock
|
|
@@ -131,5 +139,5 @@ principal.json
|
|
|
131
139
|
|
|
132
140
|
# MCP spawn diagnostics
|
|
133
141
|
last-spawn-error.log
|
|
134
|
-
`;function
|
|
135
|
-
//# sourceMappingURL=init-
|
|
142
|
+
`;function h(t){let s=o(t,e),l=[],u=[],h=[];c(s,{recursive:!0}),c(a(s,i),{recursive:!0});let g=p(a(s,`.gitignore`),m);return g===`created`?l.push(`.gitignore`):g===`updated`?u.push(`.gitignore`):h.push(`.gitignore`),f(a(s,`config.yml`),d(n))?l.push(r):h.push(r),{created:l,updated:u,skipped:h}}export{h as n,d as t};
|
|
143
|
+
//# sourceMappingURL=init-Cs4zbQzq.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./esm-wByiX8MO.mjs";import{
|
|
1
|
+
import{n as e,t}from"./esm-wByiX8MO.mjs";import{Q as n}from"./dist-BAXWuYIZ.mjs";import{r}from"./constants-CCnuxCJE.mjs";import{Y as i,Z as a,_ as o,lt as s}from"./dist-DuYysD9-.mjs";import{t as c}from"./is-object-7k010cEq.mjs";import{n as l}from"./init-Cs4zbQzq.mjs";import{t as u}from"./preview-5SIgbwvp.mjs";import{s as d,t as f}from"./colors-ejF8AM2b.mjs";import{basename as p,dirname as m,join as h,posix as g,relative as _,resolve as v,sep as y,win32 as b}from"node:path";import{existsSync as x,mkdirSync as S,readFileSync as C,writeFileSync as w}from"node:fs";import{homedir as T}from"node:os";import E from"@inquirer/checkbox";
|
|
2
2
|
/*!
|
|
3
3
|
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -247,9 +247,9 @@ let F=/^[a-z0-9-_]+$/i;function I(e){let t=typeof e;if(t===`object`){if(Array.is
|
|
|
247
247
|
`)+z(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=R(t[c],e,r,i),a+=`
|
|
248
248
|
`}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function Se(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(I(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=z(0,e,``,t,n);return r[r.length-1]===`
|
|
249
249
|
`?r:r+`
|
|
250
|
-
`}const B=[`claude`,`claude-desktop`,`cursor`,`vscode`,`windsurf`,`codex`],Ce=[`@inkeep/open-knowledge`,`mcp`],we={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`};function V(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=v(e);if(p(t)===`cli.mjs`&&p(m(t))===`dist`)return t;let n=t.split(y),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return h(i.length===0?y:i.join(y),`packages`,`cli`,`dist`,`cli.mjs`)}function H(e={}){if(e.cliPath)return{command:e.cliPath,args:[`mcp`]};if(e.mode===`pinned`){let t=e.cliEntryPath??process.argv[1];if(!t)throw Error("Cannot pin MCP entry — process.argv[1] is empty. Pass --no-pin to use the default `npx` entry.");return{command:`node`,args:[v(t),`mcp`]}}return e.mode===`dev`?{command:`node`,args:[V(e.cliEntryPath),`mcp`],env:{...we}}:{command:`npx`,args:[...Ce]}}function U(e){return e===`win32`?b:g}function Te(e={}){let t=e.platformName??process.platform,n=e.home??T(),r=e.env??process.env,i=U(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function Ee(e={}){let t=e.platformName??process.platform,n=e.home??T();return U(t).join(n,`.claude.json`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??T(),r=e.env??process.env;if(t===`darwin`)return g.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??b.join(n,`AppData`,`Roaming`);return b.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function De(e={}){let t=e.platformName??process.platform,n=e.home??T();return U(t).join(n,`.cursor`,`mcp.json`)}function Oe(e={}){return U(e.platformName??process.platform).join(Te(e),`Code`,`User`,`mcp.json`)}function ke(e={}){let t=e.platformName??process.platform,n=e.home??T();return U(t).join(n,`.codeium`,`windsurf`,`mcp_config.json`)}function Ae(e={}){let t=e.platformName??process.platform,n=e.home??T();return(e.env??process.env).CODEX_HOME??U(t).join(n,`.codex`)}function je(e={}){return U(e.platformName??process.platform).join(Ae(e),`config.toml`)}function G(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>G(e,t[n]));if(
|
|
250
|
+
`}const B=[`claude`,`claude-desktop`,`cursor`,`vscode`,`windsurf`,`codex`],Ce=[`@inkeep/open-knowledge`,`mcp`],we={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`};function V(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=v(e);if(p(t)===`cli.mjs`&&p(m(t))===`dist`)return t;let n=t.split(y),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return h(i.length===0?y:i.join(y),`packages`,`cli`,`dist`,`cli.mjs`)}function H(e={}){if(e.cliPath)return{command:e.cliPath,args:[`mcp`]};if(e.mode===`pinned`){let t=e.cliEntryPath??process.argv[1];if(!t)throw Error("Cannot pin MCP entry — process.argv[1] is empty. Pass --no-pin to use the default `npx` entry.");return{command:`node`,args:[v(t),`mcp`]}}return e.mode===`dev`?{command:`node`,args:[V(e.cliEntryPath),`mcp`],env:{...we}}:{command:`npx`,args:[...Ce]}}function U(e){return e===`win32`?b:g}function Te(e={}){let t=e.platformName??process.platform,n=e.home??T(),r=e.env??process.env,i=U(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function Ee(e={}){let t=e.platformName??process.platform,n=e.home??T();return U(t).join(n,`.claude.json`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??T(),r=e.env??process.env;if(t===`darwin`)return g.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??b.join(n,`AppData`,`Roaming`);return b.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function De(e={}){let t=e.platformName??process.platform,n=e.home??T();return U(t).join(n,`.cursor`,`mcp.json`)}function Oe(e={}){return U(e.platformName??process.platform).join(Te(e),`Code`,`User`,`mcp.json`)}function ke(e={}){let t=e.platformName??process.platform,n=e.home??T();return U(t).join(n,`.codeium`,`windsurf`,`mcp_config.json`)}function Ae(e={}){let t=e.platformName??process.platform,n=e.home??T();return(e.env??process.env).CODEX_HOME??U(t).join(n,`.codex`)}function je(e={}){return U(e.platformName??process.platform).join(Ae(e),`config.toml`)}function G(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>G(e,t[n]));if(c(e)&&c(t)){let n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((e,t)=>e===r[t])&&n.every(n=>G(e[n],t[n]))}return!1}function Me(e,t){return Object.entries(t).every(([t,n])=>G(e[t],n))}function Ne(e,t){return{...e,...t}}function K(e){return{...e,isCompatible(t,n,r){return Me(t,e.buildEntry(n,r))},mergeManagedFields(t,n,r){return Ne(t,e.buildEntry(n,r))}}}const q={claude:K({id:`claude`,label:`Claude Code`,configPath:(e,t)=>Ee({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>H(t),scope:`global`,detectPath:(e,t)=>h(t??T(),`.claude`),projectConfigPath:e=>h(e,`.mcp.json`)}),"claude-desktop":K({id:`claude-desktop`,label:`Claude Desktop`,configPath:(e,t)=>W({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>H(t),scope:`global`,detectPath:(e,t)=>m(W({home:t}))}),cursor:K({id:`cursor`,label:`Cursor`,configPath:(e,t)=>De({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>H(t),scope:`global`,detectPath:(e,t)=>m(De({home:t})),projectConfigPath:e=>h(e,`.cursor`,`mcp.json`)}),vscode:K({id:`vscode`,label:`VS Code`,configPath:(e,t)=>Oe({home:t}),format:`json`,topLevelKey:`servers`,serverName:()=>r,buildEntry:(e,t)=>({type:`stdio`,...H(t)}),scope:`global`,detectPath:(e,t)=>m(Oe({home:t})),projectConfigPath:e=>h(e,`.vscode`,`mcp.json`)}),windsurf:K({id:`windsurf`,label:`Windsurf`,configPath:(e,t)=>ke({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>r,buildEntry:(e,t)=>H(t),scope:`global`,detectPath:(e,t)=>m(ke({home:t}))}),codex:K({id:`codex`,label:`Codex`,configPath:(e,t)=>je({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>r,buildEntry:(e,t)=>H(t),scope:`global`,detectPath:(e,t)=>m(je({home:t})),projectConfigPath:e=>h(e,`.codex`,`config.toml`)})};function J(e){let t=e.filter(e=>!(e in q));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${B.join(`, `)}`);return e.map(e=>q[e])}function Pe(e){if(!x(e))return{};let t=C(e,`utf-8`).trim();if(t===``)return{};try{let n=JSON.parse(t);if(c(n))return n;throw Error(`${e} root must be a JSON object`)}catch(t){throw t instanceof SyntaxError?Error(`${e} contains invalid JSON: ${t.message}`):t}}function Fe(e){if(!x(e))return{};let t=C(e,`utf-8`).trim();if(t===``)return{};try{let n=_e(t);if(c(n))return n;throw Error(`${e} root must be a TOML table`)}catch(t){throw Error(`${e} contains invalid TOML: ${t instanceof Error?t.message:String(t)}`)}}function Ie(e,t){S(m(e),{recursive:!0}),w(e,`${JSON.stringify(t,null,2)}\n`,`utf-8`)}function Le(e,t){S(m(e),{recursive:!0});let n=Se(t);w(e,n.endsWith(`
|
|
251
251
|
`)?n:`${n}\n`,`utf-8`)}const Re=e=>e!==`project`,Y=e=>e!==`user`;async function ze(){let e=await E({message:`Where should the MCP server be configured?
|
|
252
|
-
`,required:!1,theme:{icon:{checked:`[x]`,unchecked:`[ ]`}},choices:[{name:`User-level (~/.claude.json, ~/.cursor/mcp.json, …)`,value:`user`,checked:!0},{name:`Project-level (.mcp.json, .cursor/mcp.json, …)`,value:`project`,checked:!0}]});return e.includes(`user`)&&e.includes(`project`)?`both`:e.includes(`user`)?`user`:e.includes(`project`)?`project`:null}async function Be(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??ze)():`both`}const Ve=`0.0.1`,X=`open-knowledge-ui`;function He(e,t={}){let n=h(e,`.claude`,`launch.json`),r=t.mode===`dev`?{name:X,runtimeExecutable:`node`,runtimeArgs:[V(t.cliEntryPath),`ui`],port:3e3}:{name:X,runtimeExecutable:`npx`,runtimeArgs:[`@inkeep/open-knowledge`,`ui`],port:3e3};try{if(!x(n))return S(m(n),{recursive:!0}),w(n,`${JSON.stringify({version:Ve,configurations:[r]},null,2)}\n`,`utf-8`),{action:`created`,configPath:n};let e=C(n,`utf-8`).trim(),t=e?JSON.parse(e):{};if(!
|
|
253
|
-
`)}function $(e,t){let n=[];for(let r of B)Z(q[r],e,t)&&n.push(r);return n}function Je(){return new t(`init`).description(`Scaffold ${
|
|
254
|
-
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}try{let{previewContent:e}=await import(`./preview-
|
|
255
|
-
//# sourceMappingURL=init-
|
|
252
|
+
`,required:!1,theme:{icon:{checked:`[x]`,unchecked:`[ ]`}},choices:[{name:`User-level (~/.claude.json, ~/.cursor/mcp.json, …)`,value:`user`,checked:!0},{name:`Project-level (.mcp.json, .cursor/mcp.json, …)`,value:`project`,checked:!0}]});return e.includes(`user`)&&e.includes(`project`)?`both`:e.includes(`user`)?`user`:e.includes(`project`)?`project`:null}async function Be(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??ze)():`both`}const Ve=`0.0.1`,X=`open-knowledge-ui`;function He(e,t={}){let n=h(e,`.claude`,`launch.json`),r=t.mode===`dev`?{name:X,runtimeExecutable:`node`,runtimeArgs:[V(t.cliEntryPath),`ui`],port:3e3}:{name:X,runtimeExecutable:`npx`,runtimeArgs:[`@inkeep/open-knowledge`,`ui`],port:3e3};try{if(!x(n))return S(m(n),{recursive:!0}),w(n,`${JSON.stringify({version:Ve,configurations:[r]},null,2)}\n`,`utf-8`),{action:`created`,configPath:n};let e=C(n,`utf-8`).trim(),t=e?JSON.parse(e):{};if(!c(t))return{action:`failed`,configPath:n,error:`launch.json root is not an object`};let i=Array.isArray(t.configurations)?t.configurations:[],a=i.findIndex(e=>c(e)&&e.name===X);a>=0?i[a]=r:i.push(r);let o={...t,version:t.version??Ve,configurations:i};return w(n,`${JSON.stringify(o,null,2)}\n`,`utf-8`),{action:a>=0?`merged`:`created`,configPath:n}}catch(e){return{action:`failed`,configPath:n,error:e instanceof Error?e.message:String(e)}}}function Z(e,t,n){try{return x(e.detectPath?.(t,n)??m(e.configPath(t,n)))}catch{return!1}}function Q(e,t,n,r,i){let a=e.serverName(t),o;try{o=i??e.configPath(t,r)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:``,serverName:a,error:t instanceof Error?t.message:String(t)}}if(!i&&!n.skipAvailabilityCheck&&!Z(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};let s;try{s=e.format===`toml`?Fe(o):Pe(o)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t)}}let c=s[e.topLevelKey]??{},l=c[a],u;try{u=e.buildEntry(t,n)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t)}}let d={...s,[e.topLevelKey]:{...c,[a]:u}};try{e.format===`toml`?Le(o,d):Ie(o,d)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t)}}return{editorId:e.id,label:e.label,action:l===void 0?`written`:`overwritten`,configPath:o,serverName:a,...i===void 0?{}:{configScope:`project`}}}function Ue(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!x(n)))return{editorId:e.id,label:e.label,path:n}}async function We(e){let t=J(e.editors),n={mode:`published`,cliPath:e.cliPath,skipAvailabilityCheck:!0};return t.map(t=>Q(t,``,n,e.home))}function Ge(e,t,n){let r;try{r=e.configPath(t,n)}catch{return null}let i;try{i=e.format===`toml`?Fe(r):Pe(r)}catch{return null}let a=i[e.topLevelKey];if(!c(a))return null;let o=a[e.serverName(t)];return c(o)?o:null}async function Ke(e={}){let t=v(e.cwd??process.cwd()),n={mode:e.pin?`pinned`:e.devMcp?`dev`:`published`,cliEntryPath:e.cliEntryPath},r=await a(t),o;try{o=l(t)}catch(n){let i=q.claude.configPath(t,e.home);return{contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],legacyProjectConfigs:[],didGitInit:r.didInit,claudeDesktopDetected:!1,mcpAction:`failed`,mcpPath:i,mcpError:`Content scaffolding failed: ${n instanceof Error?n.message:String(n)}`}}let c=await Be({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),u=e.editors??$(t,e.home),d=e.editors??B.filter(e=>q[e].projectConfigPath!==void 0),f=J(u),p=J(d),m=e.mcp===!1||c===null,h=Array.from(new Map([...f,...m?[]:p].map(e=>[e.id,e])).values()),g=f.filter(n=>Z(n,t,e.home)),_=[],y=new Set;for(let r of h){if(m){let n=``;try{n=r.configPath(t,e.home)}catch{}_.push({editorId:r.id,label:r.label,action:`skipped-flag`,configPath:n,serverName:r.serverName(t)});continue}if(Re(c)&&f.includes(r)&&_.push(Q(r,t,n,e.home)),Y(c)&&p.includes(r)&&r.projectConfigPath){let i=r.projectConfigPath(t),a=Q(r,t,n,e.home,i);_.push(a),(a.action===`written`||a.action===`overwritten`)&&y.add(i)}}let b=!m&&c!==null&&Y(c)?p.filter(e=>!e.projectConfigPath).map(e=>e.label):void 0,x=m?[]:g.map(e=>Ue(e,t)).filter(e=>e!==void 0).filter(e=>!y.has(e.path)),S=g.some(e=>e.id===`claude`)&&!m?He(t,n):void 0,C=await(e.installUserSkill??s)({home:e.home}),w=i({home:e.home}),T=m?`skipped-flag`:`skipped-missing`,E=_.find(e=>e.editorId===`claude`)??_[0]??{action:T,configPath:q.claude.configPath(t,e.home)};return{contentCreated:o.created,contentUpdated:o.updated,contentSkipped:o.skipped,editors:_,legacyProjectConfigs:x,launchJson:S,skillInstall:C,didGitInit:r.didInit,claudeDesktopDetected:w,mcpAction:E.action,mcpPath:E.configPath,mcpError:`error`in E?E.error:void 0,projectScopeUnsupportedLabels:b}}function qe(e,t){let r=[],i=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),a=e.editors.some(e=>e.action===`failed`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),s=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`),c=e=>{let n=e.configPath.startsWith(t)?_(t,e.configPath):e.configPath;switch(e.action){case`created`:return` app preview server ${n} configured for Claude Code Desktop embedded browser`;case`merged`:return` app preview server ${n} updated for Claude Code Desktop embedded browser`;case`failed`:return` app preview server ${n} FAILED: ${e.error}`}};e.didGitInit&&r.push(`Initialized git repo at ${t}/.git/ (default branch: main)`);let l=h(t,n);if(e.contentCreated.length>0||e.contentUpdated.length>0?(r.push(`Content scaffolded at ${l}/`),e.contentCreated.length>0&&r.push(` Created: ${e.contentCreated.join(`, `)}`),e.contentUpdated.length>0&&r.push(` Updated: ${e.contentUpdated.join(`, `)}`)):r.push(`Content already present at ${l}/`),e.contentSkipped.length>0&&r.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),r.push(``),e.mcpError&&e.editors.length===0)r.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0)if(r.push(`MCP server configuration:`),e.mcpAction===`skipped-flag`)r.push(` MCP config not written — use without --no-mcp to configure editors`);else if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),n=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;r.push(` ${t} ${n} not support project-level config; skipped`)}else r.push(` No supported editor config directories detected; skipped MCP registration`);else if(o)r.push(`MCP config not written — use without --no-mcp to configure editors`);else if(s)r.push(`MCP server configuration:`),r.push(` No supported editor config directories detected; skipped MCP registration`);else{r.push(`MCP server configuration:`);for(let n of e.editors){let i=n.configPath.startsWith(t)?_(t,n.configPath):n.configPath.replace(/^\/Users\/[^/]+/,`~`),a=n.serverName===`open-knowledge`?``:` (${n.serverName})`,o=n.configScope===`project`?` (project)`:``,s=`${n.label}${o}`,l=` `.repeat(Math.max(1,20-s.length)),u=n.editorId===`claude-desktop`&&(n.action===`written`||n.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(n.action){case`written`:r.push(` ${s}${l}${i} registered${a}${u}`);break;case`overwritten`:r.push(` ${s}${l}${i} updated${a}${u}`);break;case`skipped-missing`:r.push(` ${s}${l}${i} config root missing; skipped`);break;case`failed`:r.push(` ${s}${l}${i} FAILED: ${n.error}`);break;case`skipped-flag`:break}n.editorId===`claude`&&e.launchJson&&r.push(c(e.launchJson))}if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),n=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;r.push(` ${t} ${n} not support project-level config; skipped`)}}if(a&&(r.push(``),r.push(`For failed editors, add the MCP server entry manually. See:`),r.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){r.push(``),r.push(`Project MCP configs found:`);for(let n of e.legacyProjectConfigs)r.push(` ${n.label} ${_(t,n.path)}`);r.push(` These project-local files may override the global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(r.push(``),r.push(`User-global skill:`),e.skillInstall){case`installed`:r.push(" open-knowledge installed to detected agent hosts via `npx skills`");break;case`skip-current`:r.push(` open-knowledge already installed at current version`);break;case`failed`:r.push(` ${d(`open-knowledge install failed — MCP still configured; run manually:`)}`),r.push(` ${d(` npx skills@~1.5.0 add <bundled-path> --agent '*' -g -y --copy`)}`);break}if(e.claudeDesktopDetected&&(r.push(``),r.push(`Claude Desktop App detected. To enable in Claude Chat & Cowork, run: ${f(`ok install-skill`)}`)),e.preview?(r.push(``),r.push(u(e.preview,t))):e.previewWarning&&(r.push(``),r.push(`Content preview unavailable: ${e.previewWarning}`)),i){let t=new Set,n=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).filter(e=>!t.has(e.editorId)&&t.add(e.editorId)).map(e=>e.label);r.push(``),r.push(`Next steps:`),r.push(` 1. Open your editor (${n.join(` / `)})`),r.push(` 2. Approve the MCP server when prompted`),r.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),r.push(` - ok seed`),r.push(` 4. Use the three MCP workflow tools as you build the wiki:`),r.push(` - mcp__open-knowledge__ingest — capture an external source`),r.push(` - mcp__open-knowledge__research — gather sources and write findings`),r.push(` - mcp__open-knowledge__consolidate — promote research to canonical articles`)}return r.join(`
|
|
253
|
+
`)}function $(e,t){let n=[];for(let r of B)Z(q[r],e,t)&&n.push(r);return n}function Je(){return new t(`init`).description(`Scaffold ${n}/ in the current directory and register the MCP server for your editor(s)`).option(`--mcp`,`Register the MCP server for selected editors (default: true)`,!0).option(`--no-mcp`,`Scaffold the ${n}/ directory but do not touch MCP config`).option(`--dev-mcp`,`Register a local dev MCP entry using node + packages/cli/dist/cli.mjs with debug logging`).addOption(new e(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).option(`--pin`,"Pin the MCP entry to the absolute path of the current CLI binary instead of `npx`. Use a stable shim like /usr/local/bin/ok for upgrade-safe pinning; npx-cache or worktree paths will go stale on reinstall.").option(`--no-pin`,"Use the default unpinned `npx @inkeep/open-knowledge mcp` MCP entry").action(async e=>{let t=process.cwd(),n;try{n=await Ke({cwd:t,mcp:e.mcp,devMcp:e.devMcp,scope:e.scope,pin:e.pin})}catch(e){if(e instanceof o){process.stderr.write(`open-knowledge requires git to initialize a parent repo. Install git or run 'git init' yourself, then re-run.
|
|
254
|
+
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}try{let{previewContent:e}=await import(`./preview-BUcB3nQ2.mjs`),{loadConfig:r}=await import(`./loader-C7FUyr_0.mjs`),{resolveContentDir:i}=await import(`./paths-2tkmjuzR.mjs`),{config:a}=r(t),o=i(a,t);n.preview=e({projectDir:t,contentDir:o,include:a.content.include,exclude:a.content.exclude})}catch(e){n.previewWarning=e instanceof Error?e.message:String(e)}process.stdout.write(`${qe(n,t)}\n`),(n.editors.some(e=>e.action===`failed`)||n.mcpAction===`failed`)&&(process.exitCode=1)})}export{Be as a,We as c,Ge as i,B as l,qe as n,Ke as o,Je as r,Q as s,$ as t,q as u};
|
|
255
|
+
//# sourceMappingURL=init-DR-RaetG.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{e as t};
|
|
2
|
-
//# sourceMappingURL=is-object-
|
|
2
|
+
//# sourceMappingURL=is-object-7k010cEq.mjs.map
|
|
@@ -11,4 +11,4 @@ var e=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&
|
|
|
11
11
|
`),n=e.split(`
|
|
12
12
|
`).map(e=>e+`
|
|
13
13
|
`);return t?n.pop():n.push(n.pop().slice(0,-1)),n}export{w as n,_ as r,T as t};
|
|
14
|
-
//# sourceMappingURL=libesm-
|
|
14
|
+
//# sourceMappingURL=libesm-CE3v6NRY.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{F as e,Lt as t,Q as n,X as r,tt as i}from"./dist-BAXWuYIZ.mjs";import{n as a}from"./constants-CCnuxCJE.mjs";import{r as o}from"./server-Dq2PmzsL.mjs";import{t as s}from"./is-object-7k010cEq.mjs";import{resolve as c}from"node:path";import{existsSync as l,readFileSync as u}from"node:fs";import{homedir as d}from"node:os";import{realpath as f}from"node:fs/promises";async function p(e){let t=c(e);try{return await f(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}const m=r;var h=t();function g(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];s(a)&&s(i)?n[r]=g(i,a):a!==void 0&&(n[r]=a)}return n}function _(e){if(!l(e))return{value:null,path:e,source:null,doc:null};let t;try{t=u(e,`utf-8`)}catch(t){return console.warn(`[config] Failed to read ${e}: ${t instanceof Error?t.message:t}`),{value:null,path:e,source:null,doc:null}}let n=(0,h.parseDocument)(t);if(n.errors.length>0)return console.warn(`[config] Failed to parse ${e}: ${n.errors.map(e=>e.message).join(`; `)}`),{value:null,path:e,source:t,doc:null};let r=n.toJSON();return s(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function v(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),r={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=i({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...r,source:e}}return r})}function y(t){let r=t??process.cwd(),i=[],s=c(d(),n,a),l=o({absPath:s}),u={};l.valid&&l.source!==void 0?(u=g(u,l.value),i.push(s)):l.valid;let f=c(r,n,a),p=_(f);p.value!==null&&(u=g(u,p.value),i.push(f));let h=m.safeParse(u);if(!h.success){let t={code:`SCHEMA_INVALID`,issues:v(h.error.issues,p)};throw Error(e(t))}return{config:h.data,sources:i}}function b(e,t=process.env){let n=e;return t.HOST&&(n={...n,server:{...n.server,host:t.HOST}}),n}function x(e){let t=e.env??process.env,n=e.cacheMs??1e3,r=e.loadConfigFn??y,i=new Map,a=new Map,o=p(e.startupCwd);return async s=>{let c=await p(s??e.startupCwd),l=Date.now(),u=i.get(c);if(u&&u.expiresAt>l)return u.config;let d=a.get(c);if(d)return await d;let f=(async()=>{if(c===await o){let r=b(e.startupConfig,t);return i.set(c,{config:r,expiresAt:Date.now()+n}),r}let a=b(r(c).config,t);return i.set(c,{config:a,expiresAt:Date.now()+n}),a})();a.set(c,f);try{return await f}finally{a.delete(c)}}}export{p as i,y as n,m as r,x as t};
|
|
2
|
+
//# sourceMappingURL=loader-BkC_FZ7h.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-BkC_FZ7h.mjs";export{e as loadConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./paths-pA7JHYmH.mjs";export{t as resolveContentDir,e as resolveLockDir};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{Q as e}from"./dist-BAXWuYIZ.mjs";import"./constants-CCnuxCJE.mjs";import{W as t}from"./dist-DuYysD9-.mjs";import{join as n,relative as r}from"node:path";import{existsSync as i,lstatSync as a,readdirSync as o,realpathSync as s,statSync as c}from"node:fs";function l(e){let{projectDir:i,contentDir:l,include:u,exclude:d,sampleCap:f=5}=e,p=[],m=[];try{a(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,include:u,exclude:d,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let h;try{h=t({projectDir:i,contentDir:l,includePatterns:u,excludePatterns:d})}catch(e){return{totalCount:0,sample:[],contentDir:l,include:u,exclude:d,warnings:[e instanceof Error?e.message:String(e)]}}function g(e){let t;try{t=o(e,{withFileTypes:!0})}catch(t){let n=t instanceof Error?t.message:String(t);p.push(`could not read directory ${r(l,e)||`.`}: ${n}`);return}for(let i of t){let t=n(e,i.name);if(i.isSymbolicLink()){let e;try{e=s(t)}catch(e){let n=e.code;n===`ENOENT`||n===`ELOOP`?p.push(`broken or cyclic symlink: ${r(l,t)}`):p.push(`cannot resolve symlink ${r(l,t)}: ${n??`unknown error`}`);continue}let n;try{n=c(e)}catch{continue}if(n.isDirectory()){let e=r(l,t);if(h.isDirExcluded(e))continue;g(t)}else if(n.isFile()){let e=r(l,t);if(h.isExcluded(e))continue;m.push(e)}}else if(i.isDirectory()){let e=r(l,t);if(h.isDirExcluded(e))continue;g(t)}else if(i.isFile()){let e=r(l,t);if(h.isExcluded(e))continue;m.push(e)}}}return g(l),{totalCount:m.length,sample:m.slice(0,f),contentDir:l,include:u,exclude:d,warnings:p}}function u(t,a){let o=[],s=r(a,t.contentDir),c=s===``?`./`:`./${s}`;o.push(`Content:`),o.push(` Found ${t.totalCount} markdown files in ${c}`);let l=t.include.join(`, `),u=t.exclude.length>0?t.exclude.join(`, `):`(none)`;if(o.push(` Scope: include=${l} exclude=${u}`),t.sample.length>0){let e=t.sample.join(`, `),n=t.totalCount>t.sample.length?`, …`:``;o.push(` Sample: ${e}${n}`)}if(t.warnings.length>0)for(let e of t.warnings)o.push(` Warning: ${e}`);return o.push(``),i(n(a,`.open-knowledge`,`config.yml`))?(o.push(` To adjust, edit ${e}/config.yml:`),o.push(` content:`),o.push(` include: ${JSON.stringify(t.include)}`),o.push(` exclude: ${JSON.stringify(t.exclude)}`)):(o.push(" Run `open-knowledge init` to scaffold config, then adjust:"),o.push(` ${e}/config.yml → content.include / content.exclude`)),o.push(``),o.push(` Re-check anytime: open-knowledge preview`),o.join(`
|
|
2
2
|
`)}export{l as n,u as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-5SIgbwvp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-5SIgbwvp.mjs";export{t as formatPreviewBlock,e as previewContent};
|