@inkeep/open-knowledge 0.33.0-beta.3 → 0.33.0-beta.4
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/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +7 -7
- package/dist/constants-BOgh7UxS.mjs +2 -0
- package/dist/{dist-0Mfowk3R.mjs → dist-DFesG7DS.mjs} +3 -3
- package/dist/{dist-ByqNBEyQ.mjs → dist-LzL927dF.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-ic_UDU3v.mjs → init-DVmTwFt9.mjs} +3 -3
- package/dist/init-gteB5OO0.mjs +1 -0
- package/dist/{launch-json-removal-BvKWwm8k.mjs → launch-json-removal-CK3m_KOj.mjs} +2 -2
- package/dist/loader-Cp_gB2wf.mjs +1 -0
- package/dist/{loader-DKQ2FTP1.mjs → loader-DQQQ7lKb.mjs} +2 -2
- package/dist/{open-browser-CZY2ZKg0.mjs → open-browser-3gSG96ZS.mjs} +2 -2
- package/dist/preview-Cohlvwo7.mjs +1 -0
- package/dist/{preview-DjlyRSjK.mjs → preview-i-hogfu4.mjs} +2 -2
- package/dist/public/assets/ReportBugDialogBody-C0pCt3Po.js +2 -0
- package/dist/public/assets/{index-DdzrGamH.js → index-D6hCtfGM.js} +3 -3
- package/dist/public/index.html +1 -1
- package/dist/{repair-launch-json-vcrj7uiO.mjs → repair-launch-json-CuiKRBgN.mjs} +2 -2
- package/dist/{repair-mcp-configs-B1n7zEfa.mjs → repair-mcp-configs-w04p1UDy.mjs} +2 -2
- package/dist/repair-skills-DADzcSUt.mjs +1 -0
- package/dist/{repair-skills-g00h1ESt.mjs → repair-skills-wxyzsDDA.mjs} +2 -2
- package/dist/{src-D2tKHT8d.mjs → src-BOXbBMoy.mjs} +2 -2
- package/dist/{start-B7Va2rEi.mjs → start-X8kJKYXc.mjs} +2 -2
- package/dist/start-vj717PKY.mjs +1 -0
- package/dist/{write-project-skill-D82uNxGO.mjs → write-project-skill-NLecUmFg.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-CEeGdLcl.mjs +0 -2
- package/dist/init-CbE68APD.mjs +0 -1
- package/dist/loader-B-UqtgFC.mjs +0 -1
- package/dist/preview-DxW6ov-D.mjs +0 -1
- package/dist/public/assets/ReportBugDialogBody-Dqm9xvl9.js +0 -2
- package/dist/repair-skills-BkNgLJzB.mjs +0 -1
- package/dist/start-D05ugJ18.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ei as e,Jn as t,Jt as n,Q as r,Qi as i,Sn as a,Un as o,_ as s,a as c,aa as l,b as u,c as d,f,g as p,gn as m,h,i as g,ka as _,kn as v,l as y,m as b,n as x,o as S,p as C,r as w,s as T,t as E,u as D,v as O,y as k}from"./server-lock-iLcBw_q0-DK2Tcu84.mjs";import{$ as A,$i as j,$n as M,$r as N,$t as P,A as F,Ai as I,An as L,Ar as R,At as z,B,Bi as V,Bn as H,Br as U,Bt as W,C as G,Ci as K,Cn as q,Cr as J,Ct as Y,D as X,Di as Z,Dn as Q,Dr as $,Dt as ee,E as te,Ei as ne,En as re,Er as ie,Et as ae,F as oe,Fi as se,Fn as ce,Fr as le,Ft as ue,G as de,Gi as fe,Gn as pe,Gr as me,Gt as he,H as ge,Hi as _e,Hn as ve,Hr as ye,Ht as be,I as xe,Ii as Se,In as Ce,Ir as we,It as Te,J as Ee,Ji as De,Jn as Oe,Jr as ke,Jt as Ae,K as je,Ki as Me,Kn as Ne,Kr as Pe,Kt as Fe,L as Ie,Li as Le,Ln as Re,Lr as ze,Lt as Be,M as Ve,Mi as He,Mn as Ue,Mr as We,Mt as Ge,N as Ke,Na as qe,Ni as Je,Nn as Ye,Nr as Xe,Nt as Ze,O as Qe,Oi as $e,On as et,Or as tt,Ot as nt,P as rt,Pa as it,Pi as at,Pn as ot,Pr as st,Pt as ct,Q as lt,Qi as ut,Qn as dt,Qr as ft,Qt as pt,R as mt,Ri as ht,Rn as gt,Rr as _t,Rt as vt,S as yt,Si as bt,Sn as xt,Sr as St,St as Ct,T as wt,Ti as Tt,Tn as Et,Tr as Dt,Tt as Ot,U as kt,Ui as At,Un as jt,Ur as Mt,Ut as Nt,V as Pt,Vi as Ft,Vn as It,Vr as Lt,Vt as Rt,W as zt,Wi as Bt,Wn as Vt,Wr as Ht,Wt as Ut,X as Wt,Xi as Gt,Xn as Kt,Xr as qt,Xt as Jt,Y as Yt,Yi as Xt,Yn as Zt,Yr as Qt,Yt as $t,Z as en,Zi as tn,Zn as nn,Zr as rn,Zt as an,_ as on,_i as sn,_n as cn,_r as ln,_t as un,a as dn,aa as fn,ai as pn,an as mn,ar as hn,at as gn,b as _n,bi as vn,bn as yn,br as bn,bt as xn,c as Sn,ca as Cn,ci as wn,cn as Tn,cr as En,ct as Dn,d as On,da as kn,di as An,dn as jn,dr as Mn,dt as Nn,ea as Pn,ei as Fn,en as In,er as Ln,et as Rn,f as zn,fa as Bn,fi as Vn,fn as Hn,fr as Un,ft as Wn,g as Gn,ga as Kn,gi as qn,gn as Jn,gr as Yn,gt as Xn,h as Zn,ha as Qn,hi as $n,hn as er,hr as tr,ht as nr,i as rr,ia as ir,ii as ar,in as or,ir as sr,it as cr,j as lr,ji as ur,jn as dr,jr as fr,jt as pr,k as mr,ki as hr,kn as gr,kr as _r,kt as vr,l as yr,la as br,li as xr,ln as Sr,lr as Cr,lt as wr,m as Tr,ma as Er,mi as Dr,mn as Or,mr as kr,mt as Ar,n as jr,na as Mr,ni as Nr,nn as Pr,nr as Fr,nt as Ir,o as Lr,oa as Rr,oi as zr,on as Br,or as Vr,ot as Hr,p as Ur,pa as Wr,pi as Gr,pn as Kr,pr as qr,pt as Jr,q as Yr,qi as Xr,qn as Zr,qr as Qr,qt as $r,r as ei,ra as ti,ri as ni,rn as ri,rr as ii,rt as ai,s as oi,sa as si,si as ci,sn as li,sr as ui,st as di,t as fi,ta as pi,ti as mi,tn as hi,tr as gi,tt as _i,u as vi,ua as yi,ui as bi,un as xi,ur as Si,ut as Ci,v as wi,vi as Ti,vn as Ei,vr as Di,vt as Oi,w as ki,wi as Ai,wn as ji,wr as Mi,wt as Ni,x as Pi,xi as Fi,xn as Ii,xr as Li,xt as Ri,y as zi,yi as Bi,yn as Vi,yr as Hi,yt as Ui,z as Wi,zi as Gi,zn as Ki,zr as qi,zt as Ji}from"./dist-0Mfowk3R.mjs";export{fi as AGENT_ID_MAX_LEN,jr as AGENT_ID_RE,ei as AGENT_WRITE_ORIGIN,rr as AgentFocusBroadcaster,dn as AgentPresenceBroadcaster,Lr as AgentSessionCapacityError,oi as AgentSessionManager,Sn as AutoStartDisabledError,yr as BUNDLE_IDS,vi as BUNDLE_SCOPE,On as BUNDLE_SKILL_NAME,zn as BacklinkIndex,Ur as CC1Broadcaster,r as CC1_CONTRACT_VERSION,Tr as CONFIG_FILENAME,Zn as CONFLICT_MARKER_RE,Gn as CURSOR_BUNDLE_PATHS_BY_PLATFORM,on as ConfigSchema,wi as DEFAULT_CHECKPOINT_RETENTION,zi as DEFAULT_EMBEDDINGS_DIMENSIONS,_n as DEFAULT_PACK_ID,Pi as EMBEDDINGS_API_KEY_ENV,yt as FILE_SYSTEM_WRITER,G as FILE_WATCHER_ORIGIN,ki as FileEmbeddingsBackend,wt as GIT_PREFLIGHT_FAIL_SPAN_NAME,te as GIT_UPSTREAM_WRITER,qe as GitDirAccessError,X as GitNotAvailableError,Qe as GitTooOldError,mr as HOCUSPOCUS_AUTH_REJECTION_REASONS,F as HocuspocusAuthRejection,lr as HocuspocusAuthTokenSchema,Ve as INSTALLED_AGENTS_SCHEMES,n as LINEAGE_EPOCH_KEY,Ke as LIVE_DERIVED_INDEX_DEBOUNCE_MS,rt as LOG_MD_TEMPLATE,oe as MANAGED_RENAME_ORIGIN,xe as MAX_AGENT_SESSIONS,Ie as MCP_CONNECTION_ID_HEADER,m as MCP_SERVER_NAME,mt as MIN_GIT_VERSION,Wi as MISSING_OK_CONFIG_MESSAGE,it as MalformedGitPointerError,B as McpLogger,Pt as MissingOkConfigError,ge as OBSERVER_SYNC_ORIGIN,kt as OK_OKIGNORE_TEMPLATE,a as ORPHAN_MODES,v as PROTOCOL_VERSION,zt as PinoLogger,E as ProcessLockCollisionError,de as ProjectGitInitError,je as ROLLBACK_ORIGIN,Yr as ROOT_GITIGNORE_TEMPLATE,x as RUNTIME_VERSION,Ee as SERVICE_WRITER,Yt as SKILL_INSTALL_EVENTS_FILE_REL,o as SKILL_STATE_TARGETS,Wt as STARTER_FOLDERS,en as STARTER_FOLDER_FRONTMATTER_FILENAME,lt as STARTER_PACKS,A as STARTER_PACK_IDS,Rn as STARTER_TEMPLATES,_i as STATE_MANIFEST_FILENAME,w as STATE_SCHEMA_VERSION,t as SYSTEM_DOC_NAME,Ir as SeedPrerequisiteError,ai as SeedRootDirError,g as ServerLockCollisionError,cr as SingleFileNotAFileError,gn as SingleFileNotFoundError,Hr as SingleFileNotMarkdownError,di as StateManifestError,Dn as TagIndex,wr as USER_GLOBAL_BUNDLE_IDS,Ci as UiLockCollisionError,Nn as __getShowAllWalkStatsForTesting,Wn as __resetShowAllWalkStatsForTesting,c as acquireProcessLock,S as acquireServerLock,Jr as acquireUiLock,Ar as applyAgentMarkdownWrite,nr as applyExternalChange,Xn as applySeed,un as assertCompatibleStateManifest,Oi as assertGitAvailable,Ui as assertNeverDiskEvent,xn as attachIdleShutdown,Ri as bootServer,Ct as buildAndOpenSkill,Y as buildConfigYmlContent,Ni as buildExecResult,Ot as buildSkillZip,ae as buildStarterFolderFrontmatterYaml,ee as buildWipTree,nt as bundleSkillMdPath,vr as classifyEvents,z as classifyFsPath,pr as clearContributors,Ge as clearEmbeddingsKeyFromAllBackends,Ze as coercePackId,e as colorFromSeed,ct as commitUpstreamImport,ue as commitWip,Te as commitWipFromTree,Be as compareSemver,vt as composeEffectiveLinterConfig,Ji as containsConflictMarkers,W as contentHash,Rt as contributorCount,be as countShadowObjects,Nt as countStaleAgentWipRefs,Ut as countWipRefs,he as createApiExtension,Fe as createAssetServeMiddleware,$r as createContentFilter,Ae as createContentFilterAsync,$t as createEmbeddingsSecretStore,Jt as createEphemeralProjectDir,an as createExternalChangeHandler,pt as createFileLogger,P as createLiveDerivedIndexExtension,In as createMcpHttpHandler,hi as createOsProbe,Pr as createPersistenceExtension,ri as createServer,or as createServerObserverExtension,mn as createStreamingErrorWriter,Br as createTestLogger,li as describeStoredEmbeddingsKey,Tn as detectClaudeDesktopPresence,Sr as detectGit,xi as detectProjectShape,jn as discoverLockDirs,Hn as discoverMarkdownlintConfig,Kr as emitPreflightFailureSpan,Or as encodeDocName,er as encodeFolderRoute,Jn as encodeSkillRoute,cn as ensureProjectGit,Ei as ensureProjectSkillGitignore,Vi as errorResponse,yn as evictStaleTrackerEntries,Ii as extractOkBinaryPath,xt as extractWikiLinksFromMarkdown,q as fallbackPaths,ji as findEnclosingGitRoot,Et as findEnclosingProjectRoot,re as findNativeMarkdownlintFile,Q as flushFileLogger,et as formatAuthRejectionWire,gr as formatContributors,L as formatContributorsFrom,dr as formatPackRationale,Ue as gcCheckpointRefs,Ye as getCurrentMcpLogger,ot as getLocalDir,ce as getLogFilePath,Ce as getLogger,Re as getLogsDir,T as getMachineId,gt as getMeter,Ki as getMetrics,H as getTracer,It as handleCollabSocketError,ve as handleSpawnCursor,jt as hasGcLogLatch,i as iconFromClientName,Vt as incrementCollabSocketFilteredError,pe as incrementServerObserverFire,Ne as initContent,Zr as initShadowRepo,Oe as initTelemetry,Zt as initToleranceTelemetryWriter,Kt as installPrettyZodErrors,nn as installTestLoggers,dt as installUserSkill,M as isAllowedApiOrigin,Ln as isAllowedWorkspaceHostHeader,gi as isConfigDoc,Fr as isHocuspocusAuthRejectionReason,ii as isKnownPackId,sr as isLinkIndexExcludedDoc,hn as isLoopbackAddress,Vr as isManagedArtifactDoc,l as isOrphanMode,ui as isPairedWriteOrigin,En as isPathWithinDir,d as isProcessAlive,Cr as isProjectRoot,Si as isProjectSkillManaged,Mn as isReservedForUserTree,Un as isSelfWrite,qr as isSystemDoc,kr as isToleranceTelemetryEnabled,y as isValidLockPid,tr as lastKnownHash,Yn as listRescueCheckpoints,ln as listStarterPacks,Di as loadPrincipal,D as lockFilePath,Hi as loggerFactory,bn as logsCurrentPath,Li as logsPreviousPath,St as makeLazyEmbeddingsKeyStore,f as markServerLockDraining,J as mountMcpAndApi,Mi as normalizeFsPath,Dt as originGitHubHost,ie as packageVersionMajorMinor,$ as parseAuthRejectionWire,tt as parseGitVersion,_r as parseHocuspocusAuthToken,R as parseKeepaliveConnectionId,fr as pathToDocName,We as planSeed,Xe as prepareSingleFileOpen,st as processCommand,le as processUsage,we as readAllTargets,ze as readBranchFromHead,_t as readBundleDecision,qi as readOwnNativeRules,C as readProcessLock,b as readProcessLockDetailed,U as readProjectLocalSemanticConfig,h as readServerLock,Lt as readServerPackageVersion,ye as readSkillInstallStateSnapshot,Mt as readSkillManagement,Ht as readStateManifest,me as readTargetRecordedAt,Pe as readTargetVersion,Qr as readUiLock,ke as reconcile,Qt as recordContributor,qt as recordSkillInstallEvent,rn as registerAllTools,ft as registerWrite,p as releaseProcessLock,s as releaseServerLock,N as releaseUiLock,Fn as removeLastKnownHash,mi as resetMetrics,_ as resolveBundleEnabled,Nr as resolveBundledSkillDir,ni as resolveContentDir,ar as resolveCursorBinaryDefault,pn as resolveCursorSpawnInvocation,zr as resolveEffectiveLinterConfig,ci as resolveLockDir,wn as resolveNativeConfigForDoc,xr as resolveNativeMarkdownlintConfig,bi as resolvePack,An as resolvePackageVersion,Vn as resolveUiInfo,Gr as restoreContributors,Dr as restoreLifecycleFromConflictsJson,$n as rewriteMarkdownLinksForDocumentRename,qn as rewriteWikiLinksForDocumentRename,sn as runAuthReposSubprocess,Ti as runAuthStatusSubprocess,Bi as runCloneSubprocess,vn as runDeviceFlowSubprocess,Fi as runWithMcpLogger,bt as safeContentPath,K as safeSubdir,Ai as safetyCheckpoint,Tt as sanitizeClientName,ne as saveInMemoryCheckpoint,Z as saveVersion,$e as seedBasenameIndex,hr as serializeError,I as setActiveSpanAttributes,ur as setupServerObservers,He as shadowGit,Je as shutdownTelemetry,at as skillManagementPath,se as spansCurrentPath,Se as spansPreviousPath,Le as spawnDetached,ht as splitMarkdownBlocks,Gi as startWatcher,V as streamingProblemEvent,Ft as swapContributors,_e as teardownToleranceTelemetryWriter,At as toBroadcasterKey,Bt as tracedAppendFileSync,fe as tracedLinkSync,Me as tracedMkdir,Xr as tracedMkdirSync,De as tracedRename,Xt as tracedRenameSync,Gt as tracedRmSync,tn as tracedRmdirSync,ut as tracedUnlinkSync,j as tracedWriteFile,Pn as tracedWriteFileSync,pi as untrackTrackedProjectSkillProjection,Mr as updateLastKnownHash,O as updateProcessLockPort,k as updateServerLockPort,ti as updateUiLockPort,ir as validateAgentId,fn as validateCloneInputs,Rr as validateSkillZip,u as waitForServerLockDrain,si as withHiddenWindowsConsole,Cn as withSpan,br as withSpanSync,yi as writeBundleDecision,kn as writeMarkdownlintRule,Bn as writeRootGitignoreForNewRepo,Wr as writeSkillManagement,Er as writeStateManifest,Qn as writeTargetVersion,Kn as writeTracker};
|
|
1
|
+
import{Ei as e,Jn as t,Jt as n,Q as r,Qi as i,Sn as a,Un as o,_ as s,a as c,aa as l,b as u,c as d,f,g as p,gn as m,h,i as g,ka as _,kn as v,l as y,m as b,n as x,o as S,p as C,r as w,s as T,t as E,u as D,v as O,y as k}from"./server-lock-iLcBw_q0-DK2Tcu84.mjs";import{$ as A,$i as j,$n as M,$r as N,$t as P,A as F,Ai as I,An as L,Ar as R,At as z,B,Bi as V,Bn as H,Br as U,Bt as W,C as G,Ci as K,Cn as q,Cr as J,Ct as Y,D as X,Di as Z,Dn as Q,Dr as $,Dt as ee,E as te,Ei as ne,En as re,Er as ie,Et as ae,F as oe,Fi as se,Fn as ce,Fr as le,Ft as ue,G as de,Gi as fe,Gn as pe,Gr as me,Gt as he,H as ge,Hi as _e,Hn as ve,Hr as ye,Ht as be,I as xe,Ii as Se,In as Ce,Ir as we,It as Te,J as Ee,Ji as De,Jn as Oe,Jr as ke,Jt as Ae,K as je,Ki as Me,Kn as Ne,Kr as Pe,Kt as Fe,L as Ie,Li as Le,Ln as Re,Lr as ze,Lt as Be,M as Ve,Mi as He,Mn as Ue,Mr as We,Mt as Ge,N as Ke,Na as qe,Ni as Je,Nn as Ye,Nr as Xe,Nt as Ze,O as Qe,Oi as $e,On as et,Or as tt,Ot as nt,P as rt,Pa as it,Pi as at,Pn as ot,Pr as st,Pt as ct,Q as lt,Qi as ut,Qn as dt,Qr as ft,Qt as pt,R as mt,Ri as ht,Rn as gt,Rr as _t,Rt as vt,S as yt,Si as bt,Sn as xt,Sr as St,St as Ct,T as wt,Ti as Tt,Tn as Et,Tr as Dt,Tt as Ot,U as kt,Ui as At,Un as jt,Ur as Mt,Ut as Nt,V as Pt,Vi as Ft,Vn as It,Vr as Lt,Vt as Rt,W as zt,Wi as Bt,Wn as Vt,Wr as Ht,Wt as Ut,X as Wt,Xi as Gt,Xn as Kt,Xr as qt,Xt as Jt,Y as Yt,Yi as Xt,Yn as Zt,Yr as Qt,Yt as $t,Z as en,Zi as tn,Zn as nn,Zr as rn,Zt as an,_ as on,_i as sn,_n as cn,_r as ln,_t as un,a as dn,aa as fn,ai as pn,an as mn,ar as hn,at as gn,b as _n,bi as vn,bn as yn,br as bn,bt as xn,c as Sn,ca as Cn,ci as wn,cn as Tn,cr as En,ct as Dn,d as On,da as kn,di as An,dn as jn,dr as Mn,dt as Nn,ea as Pn,ei as Fn,en as In,er as Ln,et as Rn,f as zn,fa as Bn,fi as Vn,fn as Hn,fr as Un,ft as Wn,g as Gn,ga as Kn,gi as qn,gn as Jn,gr as Yn,gt as Xn,h as Zn,ha as Qn,hi as $n,hn as er,hr as tr,ht as nr,i as rr,ia as ir,ii as ar,in as or,ir as sr,it as cr,j as lr,ji as ur,jn as dr,jr as fr,jt as pr,k as mr,ki as hr,kn as gr,kr as _r,kt as vr,l as yr,la as br,li as xr,ln as Sr,lr as Cr,lt as wr,m as Tr,ma as Er,mi as Dr,mn as Or,mr as kr,mt as Ar,n as jr,na as Mr,ni as Nr,nn as Pr,nr as Fr,nt as Ir,o as Lr,oa as Rr,oi as zr,on as Br,or as Vr,ot as Hr,p as Ur,pa as Wr,pi as Gr,pn as Kr,pr as qr,pt as Jr,q as Yr,qi as Xr,qn as Zr,qr as Qr,qt as $r,r as ei,ra as ti,ri as ni,rn as ri,rr as ii,rt as ai,s as oi,sa as si,si as ci,sn as li,sr as ui,st as di,t as fi,ta as pi,ti as mi,tn as hi,tr as gi,tt as _i,u as vi,ua as yi,ui as bi,un as xi,ur as Si,ut as Ci,v as wi,vi as Ti,vn as Ei,vr as Di,vt as Oi,w as ki,wi as Ai,wn as ji,wr as Mi,wt as Ni,x as Pi,xi as Fi,xn as Ii,xr as Li,xt as Ri,y as zi,yi as Bi,yn as Vi,yr as Hi,yt as Ui,z as Wi,zi as Gi,zn as Ki,zr as qi,zt as Ji}from"./dist-DFesG7DS.mjs";export{fi as AGENT_ID_MAX_LEN,jr as AGENT_ID_RE,ei as AGENT_WRITE_ORIGIN,rr as AgentFocusBroadcaster,dn as AgentPresenceBroadcaster,Lr as AgentSessionCapacityError,oi as AgentSessionManager,Sn as AutoStartDisabledError,yr as BUNDLE_IDS,vi as BUNDLE_SCOPE,On as BUNDLE_SKILL_NAME,zn as BacklinkIndex,Ur as CC1Broadcaster,r as CC1_CONTRACT_VERSION,Tr as CONFIG_FILENAME,Zn as CONFLICT_MARKER_RE,Gn as CURSOR_BUNDLE_PATHS_BY_PLATFORM,on as ConfigSchema,wi as DEFAULT_CHECKPOINT_RETENTION,zi as DEFAULT_EMBEDDINGS_DIMENSIONS,_n as DEFAULT_PACK_ID,Pi as EMBEDDINGS_API_KEY_ENV,yt as FILE_SYSTEM_WRITER,G as FILE_WATCHER_ORIGIN,ki as FileEmbeddingsBackend,wt as GIT_PREFLIGHT_FAIL_SPAN_NAME,te as GIT_UPSTREAM_WRITER,qe as GitDirAccessError,X as GitNotAvailableError,Qe as GitTooOldError,mr as HOCUSPOCUS_AUTH_REJECTION_REASONS,F as HocuspocusAuthRejection,lr as HocuspocusAuthTokenSchema,Ve as INSTALLED_AGENTS_SCHEMES,n as LINEAGE_EPOCH_KEY,Ke as LIVE_DERIVED_INDEX_DEBOUNCE_MS,rt as LOG_MD_TEMPLATE,oe as MANAGED_RENAME_ORIGIN,xe as MAX_AGENT_SESSIONS,Ie as MCP_CONNECTION_ID_HEADER,m as MCP_SERVER_NAME,mt as MIN_GIT_VERSION,Wi as MISSING_OK_CONFIG_MESSAGE,it as MalformedGitPointerError,B as McpLogger,Pt as MissingOkConfigError,ge as OBSERVER_SYNC_ORIGIN,kt as OK_OKIGNORE_TEMPLATE,a as ORPHAN_MODES,v as PROTOCOL_VERSION,zt as PinoLogger,E as ProcessLockCollisionError,de as ProjectGitInitError,je as ROLLBACK_ORIGIN,Yr as ROOT_GITIGNORE_TEMPLATE,x as RUNTIME_VERSION,Ee as SERVICE_WRITER,Yt as SKILL_INSTALL_EVENTS_FILE_REL,o as SKILL_STATE_TARGETS,Wt as STARTER_FOLDERS,en as STARTER_FOLDER_FRONTMATTER_FILENAME,lt as STARTER_PACKS,A as STARTER_PACK_IDS,Rn as STARTER_TEMPLATES,_i as STATE_MANIFEST_FILENAME,w as STATE_SCHEMA_VERSION,t as SYSTEM_DOC_NAME,Ir as SeedPrerequisiteError,ai as SeedRootDirError,g as ServerLockCollisionError,cr as SingleFileNotAFileError,gn as SingleFileNotFoundError,Hr as SingleFileNotMarkdownError,di as StateManifestError,Dn as TagIndex,wr as USER_GLOBAL_BUNDLE_IDS,Ci as UiLockCollisionError,Nn as __getShowAllWalkStatsForTesting,Wn as __resetShowAllWalkStatsForTesting,c as acquireProcessLock,S as acquireServerLock,Jr as acquireUiLock,Ar as applyAgentMarkdownWrite,nr as applyExternalChange,Xn as applySeed,un as assertCompatibleStateManifest,Oi as assertGitAvailable,Ui as assertNeverDiskEvent,xn as attachIdleShutdown,Ri as bootServer,Ct as buildAndOpenSkill,Y as buildConfigYmlContent,Ni as buildExecResult,Ot as buildSkillZip,ae as buildStarterFolderFrontmatterYaml,ee as buildWipTree,nt as bundleSkillMdPath,vr as classifyEvents,z as classifyFsPath,pr as clearContributors,Ge as clearEmbeddingsKeyFromAllBackends,Ze as coercePackId,e as colorFromSeed,ct as commitUpstreamImport,ue as commitWip,Te as commitWipFromTree,Be as compareSemver,vt as composeEffectiveLinterConfig,Ji as containsConflictMarkers,W as contentHash,Rt as contributorCount,be as countShadowObjects,Nt as countStaleAgentWipRefs,Ut as countWipRefs,he as createApiExtension,Fe as createAssetServeMiddleware,$r as createContentFilter,Ae as createContentFilterAsync,$t as createEmbeddingsSecretStore,Jt as createEphemeralProjectDir,an as createExternalChangeHandler,pt as createFileLogger,P as createLiveDerivedIndexExtension,In as createMcpHttpHandler,hi as createOsProbe,Pr as createPersistenceExtension,ri as createServer,or as createServerObserverExtension,mn as createStreamingErrorWriter,Br as createTestLogger,li as describeStoredEmbeddingsKey,Tn as detectClaudeDesktopPresence,Sr as detectGit,xi as detectProjectShape,jn as discoverLockDirs,Hn as discoverMarkdownlintConfig,Kr as emitPreflightFailureSpan,Or as encodeDocName,er as encodeFolderRoute,Jn as encodeSkillRoute,cn as ensureProjectGit,Ei as ensureProjectSkillGitignore,Vi as errorResponse,yn as evictStaleTrackerEntries,Ii as extractOkBinaryPath,xt as extractWikiLinksFromMarkdown,q as fallbackPaths,ji as findEnclosingGitRoot,Et as findEnclosingProjectRoot,re as findNativeMarkdownlintFile,Q as flushFileLogger,et as formatAuthRejectionWire,gr as formatContributors,L as formatContributorsFrom,dr as formatPackRationale,Ue as gcCheckpointRefs,Ye as getCurrentMcpLogger,ot as getLocalDir,ce as getLogFilePath,Ce as getLogger,Re as getLogsDir,T as getMachineId,gt as getMeter,Ki as getMetrics,H as getTracer,It as handleCollabSocketError,ve as handleSpawnCursor,jt as hasGcLogLatch,i as iconFromClientName,Vt as incrementCollabSocketFilteredError,pe as incrementServerObserverFire,Ne as initContent,Zr as initShadowRepo,Oe as initTelemetry,Zt as initToleranceTelemetryWriter,Kt as installPrettyZodErrors,nn as installTestLoggers,dt as installUserSkill,M as isAllowedApiOrigin,Ln as isAllowedWorkspaceHostHeader,gi as isConfigDoc,Fr as isHocuspocusAuthRejectionReason,ii as isKnownPackId,sr as isLinkIndexExcludedDoc,hn as isLoopbackAddress,Vr as isManagedArtifactDoc,l as isOrphanMode,ui as isPairedWriteOrigin,En as isPathWithinDir,d as isProcessAlive,Cr as isProjectRoot,Si as isProjectSkillManaged,Mn as isReservedForUserTree,Un as isSelfWrite,qr as isSystemDoc,kr as isToleranceTelemetryEnabled,y as isValidLockPid,tr as lastKnownHash,Yn as listRescueCheckpoints,ln as listStarterPacks,Di as loadPrincipal,D as lockFilePath,Hi as loggerFactory,bn as logsCurrentPath,Li as logsPreviousPath,St as makeLazyEmbeddingsKeyStore,f as markServerLockDraining,J as mountMcpAndApi,Mi as normalizeFsPath,Dt as originGitHubHost,ie as packageVersionMajorMinor,$ as parseAuthRejectionWire,tt as parseGitVersion,_r as parseHocuspocusAuthToken,R as parseKeepaliveConnectionId,fr as pathToDocName,We as planSeed,Xe as prepareSingleFileOpen,st as processCommand,le as processUsage,we as readAllTargets,ze as readBranchFromHead,_t as readBundleDecision,qi as readOwnNativeRules,C as readProcessLock,b as readProcessLockDetailed,U as readProjectLocalSemanticConfig,h as readServerLock,Lt as readServerPackageVersion,ye as readSkillInstallStateSnapshot,Mt as readSkillManagement,Ht as readStateManifest,me as readTargetRecordedAt,Pe as readTargetVersion,Qr as readUiLock,ke as reconcile,Qt as recordContributor,qt as recordSkillInstallEvent,rn as registerAllTools,ft as registerWrite,p as releaseProcessLock,s as releaseServerLock,N as releaseUiLock,Fn as removeLastKnownHash,mi as resetMetrics,_ as resolveBundleEnabled,Nr as resolveBundledSkillDir,ni as resolveContentDir,ar as resolveCursorBinaryDefault,pn as resolveCursorSpawnInvocation,zr as resolveEffectiveLinterConfig,ci as resolveLockDir,wn as resolveNativeConfigForDoc,xr as resolveNativeMarkdownlintConfig,bi as resolvePack,An as resolvePackageVersion,Vn as resolveUiInfo,Gr as restoreContributors,Dr as restoreLifecycleFromConflictsJson,$n as rewriteMarkdownLinksForDocumentRename,qn as rewriteWikiLinksForDocumentRename,sn as runAuthReposSubprocess,Ti as runAuthStatusSubprocess,Bi as runCloneSubprocess,vn as runDeviceFlowSubprocess,Fi as runWithMcpLogger,bt as safeContentPath,K as safeSubdir,Ai as safetyCheckpoint,Tt as sanitizeClientName,ne as saveInMemoryCheckpoint,Z as saveVersion,$e as seedBasenameIndex,hr as serializeError,I as setActiveSpanAttributes,ur as setupServerObservers,He as shadowGit,Je as shutdownTelemetry,at as skillManagementPath,se as spansCurrentPath,Se as spansPreviousPath,Le as spawnDetached,ht as splitMarkdownBlocks,Gi as startWatcher,V as streamingProblemEvent,Ft as swapContributors,_e as teardownToleranceTelemetryWriter,At as toBroadcasterKey,Bt as tracedAppendFileSync,fe as tracedLinkSync,Me as tracedMkdir,Xr as tracedMkdirSync,De as tracedRename,Xt as tracedRenameSync,Gt as tracedRmSync,tn as tracedRmdirSync,ut as tracedUnlinkSync,j as tracedWriteFile,Pn as tracedWriteFileSync,pi as untrackTrackedProjectSkillProjection,Mr as updateLastKnownHash,O as updateProcessLockPort,k as updateServerLockPort,ti as updateUiLockPort,ir as validateAgentId,fn as validateCloneInputs,Rr as validateSkillZip,u as waitForServerLockDrain,si as withHiddenWindowsConsole,Cn as withSpan,br as withSpanSync,yi as writeBundleDecision,kn as writeMarkdownlintRule,Bn as writeRootGitignoreForNewRepo,Wr as writeSkillManagement,Er as writeStateManifest,Qn as writeTargetVersion,Kn as writeTracker};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t,t as n}from"./gh-detect-DDO0PYTq.mjs";import{A as r,D as i,M as a,N as o,O as s,d as c,j as l,k as u,n as d,o as f,s as p,v as m,x as h,y as g}from"./init-
|
|
1
|
+
import{i as e,r as t,t as n}from"./gh-detect-DDO0PYTq.mjs";import{A as r,D as i,M as a,N as o,O as s,d as c,j as l,k as u,n as d,o as f,s as p,v as m,x as h,y as g}from"./init-DVmTwFt9.mjs";import{C as _,D as v,E as y,b,d as x,f as S,h as C,i as w,n as T,p as E,r as D,t as O,u as k,v as A,x as j,y as M}from"./src-BOXbBMoy.mjs";import{_ as N,a as P,d as F,f as I,g as L,i as R,o as z,r as B,s as V,t as H,u as U,v as W}from"./write-project-skill-NLecUmFg.mjs";import{n as G}from"./loader-DQQQ7lKb.mjs";import{n as K}from"./preview-i-hogfu4.mjs";import{n as q,t as J}from"./mcp-migrate-event-BNoOQpLB.mjs";export{V as ALL_EDITOR_IDS,U as EDITOR_LABELS,F as EDITOR_TARGETS,I as HOSTS_WITH_USER_SKILL_DIR,d as LAUNCH_CONFIG_NAME,x as PATH_SHIM_BEGIN,S as PATH_SHIM_BLOCK_RE,E as PATH_SHIM_END,i as addOkPathsToGitExclude,H as assertProjectPathSafe,L as buildManagedServerEntry,D as buildMcpConfigDeclineEvent,J as buildMcpConfigMigrateEvent,f as classifyExistingMcpEntry,_ as collectReportBundle,t as createTokenStore,y as defaultBugReportZipPath,n as detectGh,p as detectInstalledEditors,s as formatTrackedRemediation,u as getExcludedOkPaths,r as getOkArtifactPaths,N as isEntryUpToDate,W as isOwnManagedEntry,G as loadConfig,e as makeLazyProbeTokenStore,A as parseGitHubBlobUrl,M as parseGitHubShareUrl,b as parseGitHubTreeUrl,j as parseGitUrl,C as pathInstallMarkerPath,K as previewContent,l as probeTrackedOkPaths,c as readExistingMcpEntry,a as readSharingMode,v as redactContent,o as removeOkPathsFromGitExclude,k as removeOwnMcpEntry,B as removeProjectSkill,P as removeUserGlobalSkillBundle,h as resolveProjectRoot,w as runStop,q as truncatePriorEntry,z as userGlobalSkillBundleTargets,T as validateLocalFolderForShare,m as writeEditorMcpConfig,O as writeProjectAiIntegrations,R as writeProjectSkill,g as writeUserMcpConfigs};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,s as t,t as n}from"./chunk-C94x7I9S.mjs";import{Ht as r,Ot as i,ha as a,ps as o}from"./server-lock-iLcBw_q0-DK2Tcu84.mjs";import{Ca as s,D as c,Da as l,G as u,Ia as d,Kn as f,O as p,Oa as m,Qn as h,Ta as g,_n as _,d as v,fa as y,ja as b,lr as x,lt as S,sa as C,ta as ee,ua as te,vn as ne,wa as w}from"./dist-0Mfowk3R.mjs";import{r as re,t as ie}from"./esm-BNIW0EH8.mjs";import{t as ae}from"./constants-CEeGdLcl.mjs";import{t as T}from"./is-object-DAC-mmwo.mjs";import{a as oe,b as se,d as E,g as ce,h as le,i as ue,m as de,p as fe,s as pe,t as me}from"./write-project-skill-D82uNxGO.mjs";import{i as D,n as he,o as O,r as ge,s as k,t as A}from"./colors-DugpbXz6.mjs";import{t as _e}from"./preview-DjlyRSjK.mjs";import{createRequire as ve}from"node:module";import{execFileSync as ye}from"node:child_process";import be,{dirname as j,isAbsolute as M,join as N,relative as P,resolve as F,sep as xe}from"node:path";import I from"node:process";import{fileURLToPath as Se}from"node:url";import{existsSync as L,lstatSync as Ce,mkdirSync as we,readFileSync as R,readlinkSync as Te,realpathSync as Ee,statSync as De,writeFileSync as Oe}from"node:fs";import{homedir as ke}from"node:os";import{inspect as Ae,stripVTControlCharacters as je,styleText as z}from"node:util";import{AsyncLocalStorage as Me,AsyncResource as Ne}from"node:async_hooks";import*as Pe from"node:readline";const Fe=new Set([`emacs`,`vim`]);function Ie(e){return Fe.has(e)}function Le(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(Ie))):[]}const B=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,Re=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,ze=e=>e.name===`space`,Be=e=>e.name===`backspace`,Ve=e=>`1234567890`.includes(e.name),He=e=>e.name===`enter`||e.name===`return`;var Ue=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},We=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Ge=class extends Error{name=`ExitPromptError`},Ke=class extends Error{name=`HookError`},qe=class extends Error{name=`ValidationError`};const Je=new Me;function Ye(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function Xe(e,t){let n=Ye(e);return Je.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function V(){let e=Je.getStore();if(!e)throw new Ke(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function Ze(){return V().rl}function Qe(e){return Ne.bind((...t)=>{let n=V(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function $e(e){let t=V(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function et(){V().handleChange()}const H={queue(e){let t=V(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(Ze());if(r!=null&&typeof r!=`function`)throw new qe(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=V();Qe(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=V();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function tt(e){return typeof e==`function`}function U(e){return $e(t=>{let n=Ne.bind(function(e){t.get()!==e&&(t.set(e),et())});if(t.initialized)return[t.get(),n];let r=tt(e)?e():e;return t.set(r),[r,n]})}function nt(e,t){$e(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&H.queue(e),n.set(t)})}function rt(){return I.platform.startsWith(`win`)?!!I.env.CI||!!I.env.WT_SESSION||!!I.env.TERMINUS_SUBLIME||I.env.ConEmuTask===`{cmd::Cmder}`||I.env.TERM_PROGRAM===`Terminus-Sublime`||I.env.TERM_PROGRAM===`vscode`||I.env.TERM===`xterm-256color`||I.env.TERM===`alacritty`||I.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:I.env.TERM!==`linux`}const it={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},at={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},ot={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},st={...it,...at},ct={...it,...ot},W=rt()?st:ct;Object.entries(at);const lt={prefix:{idle:z(`blue`,`?`),done:z(`green`,W.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>z(`yellow`,e))},keybindings:[],style:{answer:e=>z(`cyan`,e),message:e=>z(`bold`,e),error:e=>z(`red`,`> ${e}`),defaultAnswer:e=>z(`dim`,`(${e})`),help:e=>z(`dim`,e),highlight:e=>z(`cyan`,e),key:e=>z(`cyan`,z(`bold`,`<${e}>`))}};function ut(){return{...lt,keybindings:Le()}}function dt(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ft(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=dt(n)&&dt(r)?ft(n,r):r}return t}function pt(...e){return ft(ut(),...e.filter(e=>e!=null))}function mt({status:e=`idle`,theme:t}){let[n,r]=U(!1),[i,a]=U(0),{prefix:o,spinner:s}=pt(t);return nt(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function ht(e,t){return $e(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function gt(e){return U({current:e})[0]}function _t(e){let t=gt(e);t.current=e,nt(e=>{let n=!1,r=Qe((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var vt=n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}));const yt=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),bt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,xt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,St=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Ct=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,wt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Tt=/\t{1,1000}/y,Et=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,Dt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Ot=/\p{M}+/gu,kt={limit:1/0,ellipsis:``},At=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?At(i,kt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[Dt,l],[St,0],[Ct,o],[Tt,s],[Et,c],[wt,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Ot,``)){let t=e.codePointAt(0)||0;if(S=bt(t)?2:xt(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===wt?yt(e.slice(p,n.lastIndex)):n===Et?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},jt={limit:1/0,ellipsis:``,ellipsisWidth:0},G=(e,t={})=>At(e,jt,t).width,Mt=`]8;;`,Nt=RegExp(`(?:\\[(?<code>\\d+)m|\\${Mt}(?<uri>.*))`,`y`),Pt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Ft=e=>`[${e}m`,It=e=>`${Mt}${e}`,Lt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:G(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=G(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(Mt,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Rt=e=>{let t=e.split(` `),n=t.length;for(;n&&!G(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},zt=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=G(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=G(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Lt(s,r,t),c=G(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Lt(s,r,t),c=G(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Lt(s,r,t),c=G(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Rt(e)));let l=s.join(`
|
|
1
|
+
import{a as e,s as t,t as n}from"./chunk-C94x7I9S.mjs";import{Ht as r,Ot as i,ha as a,ps as o}from"./server-lock-iLcBw_q0-DK2Tcu84.mjs";import{Ca as s,D as c,Da as l,G as u,Ia as d,Kn as f,O as p,Oa as m,Qn as h,Ta as g,_n as _,d as v,fa as y,ja as b,lr as x,lt as S,sa as C,ta as ee,ua as te,vn as ne,wa as w}from"./dist-DFesG7DS.mjs";import{r as re,t as ie}from"./esm-BNIW0EH8.mjs";import{t as ae}from"./constants-BOgh7UxS.mjs";import{t as T}from"./is-object-DAC-mmwo.mjs";import{a as oe,b as se,d as E,g as ce,h as le,i as ue,m as de,p as fe,s as pe,t as me}from"./write-project-skill-NLecUmFg.mjs";import{i as D,n as he,o as O,r as ge,s as k,t as A}from"./colors-DugpbXz6.mjs";import{t as _e}from"./preview-i-hogfu4.mjs";import{createRequire as ve}from"node:module";import{execFileSync as ye}from"node:child_process";import be,{dirname as j,isAbsolute as M,join as N,relative as P,resolve as F,sep as xe}from"node:path";import I from"node:process";import{fileURLToPath as Se}from"node:url";import{existsSync as L,lstatSync as Ce,mkdirSync as we,readFileSync as R,readlinkSync as Te,realpathSync as Ee,statSync as De,writeFileSync as Oe}from"node:fs";import{homedir as ke}from"node:os";import{inspect as Ae,stripVTControlCharacters as je,styleText as z}from"node:util";import{AsyncLocalStorage as Me,AsyncResource as Ne}from"node:async_hooks";import*as Pe from"node:readline";const Fe=new Set([`emacs`,`vim`]);function Ie(e){return Fe.has(e)}function Le(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(Ie))):[]}const B=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,Re=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,ze=e=>e.name===`space`,Be=e=>e.name===`backspace`,Ve=e=>`1234567890`.includes(e.name),He=e=>e.name===`enter`||e.name===`return`;var Ue=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},We=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Ge=class extends Error{name=`ExitPromptError`},Ke=class extends Error{name=`HookError`},qe=class extends Error{name=`ValidationError`};const Je=new Me;function Ye(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function Xe(e,t){let n=Ye(e);return Je.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function V(){let e=Je.getStore();if(!e)throw new Ke(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function Ze(){return V().rl}function Qe(e){return Ne.bind((...t)=>{let n=V(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function $e(e){let t=V(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function et(){V().handleChange()}const H={queue(e){let t=V(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(Ze());if(r!=null&&typeof r!=`function`)throw new qe(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=V();Qe(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=V();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function tt(e){return typeof e==`function`}function U(e){return $e(t=>{let n=Ne.bind(function(e){t.get()!==e&&(t.set(e),et())});if(t.initialized)return[t.get(),n];let r=tt(e)?e():e;return t.set(r),[r,n]})}function nt(e,t){$e(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&H.queue(e),n.set(t)})}function rt(){return I.platform.startsWith(`win`)?!!I.env.CI||!!I.env.WT_SESSION||!!I.env.TERMINUS_SUBLIME||I.env.ConEmuTask===`{cmd::Cmder}`||I.env.TERM_PROGRAM===`Terminus-Sublime`||I.env.TERM_PROGRAM===`vscode`||I.env.TERM===`xterm-256color`||I.env.TERM===`alacritty`||I.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:I.env.TERM!==`linux`}const it={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},at={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},ot={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},st={...it,...at},ct={...it,...ot},W=rt()?st:ct;Object.entries(at);const lt={prefix:{idle:z(`blue`,`?`),done:z(`green`,W.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>z(`yellow`,e))},keybindings:[],style:{answer:e=>z(`cyan`,e),message:e=>z(`bold`,e),error:e=>z(`red`,`> ${e}`),defaultAnswer:e=>z(`dim`,`(${e})`),help:e=>z(`dim`,e),highlight:e=>z(`cyan`,e),key:e=>z(`cyan`,z(`bold`,`<${e}>`))}};function ut(){return{...lt,keybindings:Le()}}function dt(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ft(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=dt(n)&&dt(r)?ft(n,r):r}return t}function pt(...e){return ft(ut(),...e.filter(e=>e!=null))}function mt({status:e=`idle`,theme:t}){let[n,r]=U(!1),[i,a]=U(0),{prefix:o,spinner:s}=pt(t);return nt(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function ht(e,t){return $e(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function gt(e){return U({current:e})[0]}function _t(e){let t=gt(e);t.current=e,nt(e=>{let n=!1,r=Qe((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var vt=n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}));const yt=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),bt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,xt=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,St=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Ct=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,wt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,Tt=/\t{1,1000}/y,Et=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,Dt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Ot=/\p{M}+/gu,kt={limit:1/0,ellipsis:``},At=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?At(i,kt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[Dt,l],[St,0],[Ct,o],[Tt,s],[Et,c],[wt,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Ot,``)){let t=e.codePointAt(0)||0;if(S=bt(t)?2:xt(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===wt?yt(e.slice(p,n.lastIndex)):n===Et?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},jt={limit:1/0,ellipsis:``,ellipsisWidth:0},G=(e,t={})=>At(e,jt,t).width,Mt=`]8;;`,Nt=RegExp(`(?:\\[(?<code>\\d+)m|\\${Mt}(?<uri>.*))`,`y`),Pt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Ft=e=>`[${e}m`,It=e=>`${Mt}${e}`,Lt=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:G(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=G(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(Mt,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Rt=e=>{let t=e.split(` `),n=t.length;for(;n&&!G(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},zt=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=G(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=G(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Lt(s,r,t),c=G(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Lt(s,r,t),c=G(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Lt(s,r,t),c=G(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Rt(e)));let l=s.join(`
|
|
2
2
|
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===``){Nt.lastIndex=e+1;let t=Nt.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
3
3
|
`){a&&(r+=It(``));let e=i?Pt(i):void 0;i&&e&&(r+=Ft(e))}else t===`
|
|
4
4
|
`&&(i&&Pt(i)&&(r+=Ft(i)),a&&(r+=It(a)))}return r},Bt=/\r?\n/;function Vt(e,t,n){return String(e).normalize().split(Bt).map(e=>zt(e,t,n)).join(`
|
|
@@ -634,6 +634,6 @@ export default function okBridge(pi: {
|
|
|
634
634
|
`));let f=`${a?``:``}${u}`;return f!==i&&m(e,f,{mode:J(e)}),{kind:l?`overwritten`:`written`}}const vi=e=>e!==`project`,yi=e=>e!==`user`;async function bi(){let e=await Kn({message:`Where should the MCP server be configured?
|
|
635
635
|
`,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 xi(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??bi)():`both`}async function Si(e){return Zn({message:`How do you want to handle OpenKnowledge config files (.ok/, .mcp.json, project skills)?`,default:e,choices:[{name:`Share with my team (commit alongside content)`,value:`shared`,description:`OK config gets committed alongside your project content.`},{name:`Local only (keep out of git via .git/info/exclude)`,value:`local-only`,description:"OK config stays on this machine only; teammates do not see it. Safe escape hatch via `ok config-sharing share`."}]})}async function Ci(e){if(e.sharing!==void 0)return e.sharing;let t=Tn(e.projectRoot)===`local-only`?`local-only`:`shared`;return e.isTTY??process.stdout.isTTY?(e.promptFn??Si)(t):t}var $=class extends Error{constructor(e){super(e),this.name=`ContentDirError`}};function wi(e){if(e===void 0||e===!0)return new Set(S);if(e===!1)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(S.filter(e=>t.includes(e)))}function Ti(e,t,n){let r=F(n,e),i;try{i=De(r)}catch(e){let t=e.code;throw t===`ENOENT`?new $(`--content-dir path does not exist: ${r}`):new $(`--content-dir path is not accessible (${t??`unknown error`}): ${r}`)}if(!i.isDirectory())throw new $(`--content-dir must be a directory: ${r}`);let a=P(Ei(t),Ei(r));if(a.startsWith(`..`)||M(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Ei(e){try{return Ee(e)}catch{return e}}const Di=`open-knowledge-ui`;function Oi(e,t,n){try{return L(e.detectPath?.(t,n)??j(e.configPath(t,n)))}catch{return!1}}function ki(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)}}let s=!n.skipAvailabilityCheck||e.offerOnlyWhenDetected===!0;if(!i&&s&&!Oi(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};if(i!==void 0)try{me(o,t)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),configScope:`project`}}if(e.format===`file`)return ji(e,o,a,n,{isProjectScope:i!==void 0});let c;try{c=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),...i===void 0?{}:{configScope:`project`}}}try{we(j(o),{recursive:!0})}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}let l={action:`written`},u;try{b(`${o}.lock`,()=>{let t=Kr(o).writePath;if(we(j(t),{recursive:!0}),e.format===`toml`){let n=gi(ei(),t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}if(e.format===`yaml`){let n=_i(t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}let n=hi(t,e.topLevelKey,a,c,e.serverMapSubKey);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason)},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){u=e instanceof Error?e:Error(String(e))}return u?{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:u.message,...i===void 0?{}:{configScope:`project`}}:l.action===`declined`?{editorId:e.id,label:e.label,action:`declined`,configPath:o,serverName:a,declineReason:l.declineReason,...i===void 0?{}:{configScope:`project`}}:{editorId:e.id,label:e.label,action:l.action,configPath:o,serverName:a,...i===void 0?{}:{configScope:`project`}}}const Ai={pi:Fr};function ji(e,t,n,r,i){let a=i.isProjectScope?{configScope:`project`}:{},o=r=>({editorId:e.id,label:e.label,action:`failed`,configPath:t,serverName:n,error:r instanceof Error?r.message:String(r),...a}),s=Ai[e.id];if(!s)return o(Error(`No managed-file builder registered for editor "${e.id}" (format: 'file' targets need a MANAGED_FILE_BUILDERS entry).`));let c;try{c=s(r)}catch(e){return o(e)}try{we(j(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{b(`${t}.lock`,()=>{let e=null;try{e=R(t,`utf-8`)}catch{e=null}if(e===c){l.action=`overwritten`;return}m(t,c,e===null?void 0:{mode:J(t)}),l.action=e===null?`written`:`overwritten`},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){return o(e)}return{editorId:e.id,label:e.label,action:l.action,configPath:t,serverName:n,...a}}function Mi(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!L(n)))return{editorId:e.id,label:e.label,path:n}}async function Ni(e){let t=se(e.editors).filter(e=>e.scope===`global`),n={mode:`published`,skipAvailabilityCheck:!0};return t.map(t=>ki(t,``,n,e.home))}function Pi(e,t,n,r){let i=Ii(e,t,n,r);return i.kind===`present`?i.entry:null}function Fi(e,t,n,r){let i=mi(e,t,r);if(!T(i))return{kind:`no-entry`};let a=i[n];return T(a)?{kind:`present`,entry:a}:{kind:`no-entry`}}function Ii(e,t,n,r){let i;try{i=r??e.configPath(t,n)}catch{return{kind:`absent`}}if(!L(i))return{kind:`absent`};try{if(De(i).size>li)return{kind:`decline`,reason:`oversize`}}catch{return{kind:`decline`,reason:`unparseable`}}let a;try{a=R(i,`utf-8`)}catch{return{kind:`decline`,reason:`unparseable`}}if(a.trim()===``)return{kind:`absent`};if(e.format===`file`)return{kind:`present`,entry:Pr(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=ei().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return Fi(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,ti.parseDocument)(a.charCodeAt(0)===65279?a.slice(1):a);return t.errors.length>0?{kind:`decline`,reason:`unparseable`}:Fi(t.toJS()??{},e.topLevelKey,o,e.serverMapSubKey)}let s=ii(a);return s?ai(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:Fi(w(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function Li(e={}){let t=F(e.cwd??process.cwd()),n=Rr(t,{homeDir:e.home}),r=n.projectRoot,i=!L(N(r,`.ok`)),a=n.gitRootPromoted?P(r,t):void 0,o=e.contentDir===void 0?n.defaultContentDir:Ti(e.contentDir,r,t);n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&i&&o===`.`&&process.stderr.write(`${k(`[ok] Content scope promoted to the git repo root: ${r}`)}\n Ran in ${a}/, but .ok/ lives at the git root (one .ok/ per git repo),\n so the whole repo is now the content scope. To narrow it, re-run with\n \`ok init --content-dir .\`, or set content.dir: ${a} in .ok/config.yml.\n`);let s={mode:e.devMcp?`dev`:`published`},c=await _(r),l;try{l=f(r,{contentDir:o})}catch(t){let i=E.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:c.didInit,rootGitignoreCreated:!1,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDirRequested:e.contentDir,contentScaffoldFailed:!0,mcpAction:`failed`,mcpPath:i,mcpError:`Content scaffolding failed: ${t instanceof Error?t.message:String(t)}`,sharing:{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:!1}}}let u=l.created.includes(ae),d=!1;if(c.didInit)try{d=y(r)===`created`}catch(e){console.warn(`[ok] Skipping .gitignore seed at ${r}: ${e instanceof Error?e.message:String(e)}`)}try{ne(r)}catch(e){console.warn(`[ok] Skipping project-skill .gitignore entry at ${r}: ${e instanceof Error?e.message:String(e)}`)}let p=await ee(r);p.kind===`untracked`&&console.warn(`[ok] Untracked the OpenKnowledge project skill (${p.dirs.join(`, `)}) — it is now local-only. Teammates will see this as a deletion on their next pull.`);let m=await xi({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),g=e.editors??Ui(r,e.home),b=e.editors??pe.filter(e=>E[e].projectConfigPath!==void 0||E[e].projectSkillPath!==void 0),x=se(g),C=se(b),w=e.mcp===!1||m===null,re=Array.from(new Map([...x,...w?[]:C].map(e=>[e.id,e])).values()),ie=x.filter(t=>Oi(t,r,e.home)),T=[],ce=[],le=new Set;for(let t of re){if(w){let n=``;try{n=t.configPath(r,e.home)}catch{}T.push({editorId:t.id,label:t.label,action:`skipped-flag`,configPath:n,serverName:t.serverName(r)});continue}if(vi(m)&&x.includes(t)&&t.scope===`global`&&T.push(ki(t,r,s,e.home)),yi(m)&&C.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=ki(t,r,s,e.home,n);T.push(i),(i.action===`written`||i.action===`overwritten`)&&le.add(n)}}let de=new Set;for(let t of C){let n=t.projectSkillPath?.(r);!n||de.has(n)||(de.add(n),ce.push(ue(t,r,{home:e.home})))}let fe=!w&&m!==null&&yi(m)?C.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,me=w?[]:ie.map(e=>Mi(e,r)).filter(e=>e!==void 0).filter(e=>!le.has(e.path)),D=e.installUserSkill??h,he=e.home??ke(),O=wi(e.skills),ge=!1,A=!1,_e=!1,ve=!1;for(let t of S){let n=O.has(t);if(await te(he,v[t],n).catch(()=>{}),n){ge=!0;let n=await D({home:e.home,bundleId:t,force:!0});n===`installed`?A=!0:n===`failed`?_e=!0:ve=!0}else try{oe(he,t)}catch{}}let ye=_e?`failed`:A?`installed`:ge&&ve?`skip-current`:`declined`,be=w?`skipped-flag`:`skipped-missing`,j=T.find(e=>e.editorId===`claude`)??T[0]??{action:be,configPath:E.claude.configPath(r,e.home)},M=await Ri({projectRoot:r,desiredMode:await Ci({sharing:e.sharing,projectRoot:r,isTTY:e.isTTY,promptFn:e.sharingPromptFn}),explicitFlag:e.sharing});return{projectRoot:r,contentCreated:l.created,contentUpdated:l.updated,contentSkipped:l.skipped,editors:T,projectSkills:ce,legacyProjectConfigs:me,skillInstall:ye,didGitInit:c.didInit,rootGitignoreCreated:d,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:u?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:j.action,mcpPath:j.configPath,mcpError:`error`in j?j.error:void 0,projectScopeUnsupportedLabels:fe,sharing:M}}async function Ri(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=Tn(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=Sn(t);if(n===`local-only`){let e=Cn(t,a);if(e.kind===`refused-tracked`){let t=e;return{kind:`refused-tracked`,tracked:t.tracked,remediation:t.remediation}}return e.kind===`no-exclude`?{kind:`no-exclude`,reason:e.reason,localOnlyRequested:r===`local-only`}:zi(t,e,`add`)}if(i===`shared`)return{kind:`applied`,mode:`shared`,action:`noop`,appended:[],alreadyPresent:[],removed:[]};let o=wn(t,a);return o.kind===`no-exclude`?{kind:`no-exclude`,reason:o.reason,localOnlyRequested:!1}:zi(t,o,`remove`)}function zi(e,t,n){let r=Tn(e);return n===`add`?{kind:`applied`,mode:r,action:t.appended.length>0?`added`:`noop`,appended:t.appended,alreadyPresent:t.alreadyPresent,removed:[]}:{kind:`applied`,mode:r,action:`removed`,appended:[],alreadyPresent:[],removed:t.removed}}function Bi(e){switch(e){case`oversize`:return`config too large to edit safely`;case`duplicate-container`:return`duplicate server block`;case`no-native-writer`:return`no format-preserving writer available`;default:return`config not readable`}}function Vi(e,t){let n=[],r=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),i=e.editors.some(e=>e.action===`failed`)||e.projectSkills.some(e=>e.action===`failed`),a=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`);e.didGitInit&&n.push(`Initialized git repo at ${t}/.git/ (default branch: main)`),e.rootGitignoreCreated&&n.push(`Seeded .gitignore at ${t}/.gitignore (.DS_Store)`);let s=N(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(A(`Content scaffolded at ${s}/`)),e.contentCreated.length>0&&n.push(` Created: ${e.contentCreated.join(`, `)}`),e.contentUpdated.length>0&&n.push(` Updated: ${e.contentUpdated.join(`, `)}`)):n.push(A(`Content already present at ${s}/`)),e.contentSkipped.length>0&&n.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),n.push(``),e.mcpError&&e.editors.length===0)n.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0)if(n.push(A(`MCP server configuration:`)),e.mcpAction===`skipped-flag`)n.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(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}else n.push(` No supported editor config directories detected; skipped MCP registration`);else if(a)n.push(`MCP config not written — use without --no-mcp to configure editors`);else if(o)n.push(A(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(A(`MCP server configuration:`));for(let r of e.editors){let e=r.configPath.startsWith(t)?P(t,r.configPath):r.configPath.replace(/^\/Users\/[^/]+/,`~`),i=r.serverName===`open-knowledge`?``:` (${r.serverName})`,a=r.configScope===`project`?` (project)`:``,o=`${r.label}${a}`,s=` `.repeat(Math.max(1,20-o.length)),c=r.editorId===`claude-desktop`&&(r.action===`written`||r.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(r.action){case`written`:n.push(` ${o}${s}${e} ${O(`registered`)}${i}${c}`);break;case`overwritten`:n.push(` ${o}${s}${e} ${O(`updated`)}${i}${c}`);break;case`skipped-missing`:n.push(` ${o}${s}${e} config root missing; skipped`);break;case`failed`:n.push(` ${o}${s}${e} ${ge(`FAILED`)}: ${r.error}`);break;case`declined`:n.push(` ${o}${s}${e} left unchanged (${Bi(r.declineReason)})`);break;case`skipped-flag`:break;default:r.action}}if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}}if(e.projectSkills.length>0){n.push(``),n.push(A(`Project-local skills:`));for(let r of e.projectSkills){let e=`${r.label} (project)`,i=` `.repeat(Math.max(1,20-e.length)),a=r.path?P(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${O(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${O(`updated`)}`);break;case`skipped-unsupported`:n.push(` ${e}${i}no known project skill surface; skipped`);break;case`skipped-prerequisite`:n.push(` ${e}${i}OpenKnowledge MCP is not configured; skipped`);break;case`failed`:n.push(` ${e}${i}${a} ${ge(`FAILED`)}: ${r.error}`);break}}}if(i&&(n.push(``),n.push(`For failed editors, add the MCP server entry or project skill manually. See:`),n.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){n.push(``),n.push(`Project MCP configs found:`);for(let r of e.legacyProjectConfigs)n.push(` ${r.label} ${P(t,r.path)}`);n.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(n.push(``),n.push(A(`User-global skill:`)),e.skillInstall){case`installed`:n.push(` open-knowledge ${O(`installed to detected agent hosts`)} via \`npx skills\``);break;case`skip-current`:n.push(` open-knowledge ${O(`already installed at current version`)}`);break;case`declined`:n.push(` open-knowledge ${he(`skipped (opted out via --no-skills)`)}`);break;case`failed`:n.push(` ${k(`open-knowledge install failed — MCP still configured; run manually:`)}`),n.push(` ${k(` npx skills@~1.5.0 add <bundled-path> --agent '*' -g -y --copy`)}`);break}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(k(`⚠ --content-dir ${e.contentDirRequested} ignored — .ok/config.yml already exists`)),n.push(` Edit .ok/config.yml → content.dir directly to change the content scope.`)):e.contentDir!==void 0&&e.contentDir!==`.`?(n.push(``),n.push(`Content scope set to ${e.contentDir}/ (content.dir in .ok/config.yml).`)):e.gitRootPromoted&&e.contentDir===`.`&&e.contentDirRequested===void 0&&(n.push(``),n.push(k(`⚠ Content scope promoted to the git repo root`)),n.push(` .ok/ was initialized at ${t} because it contains a .git folder (one .ok/ per git repo),`),n.push(` not the sub-folder you ran \`ok init\` in${e.promotedFromDir?` (${e.promotedFromDir})`:``}. The whole repo is now the content scope.`),e.promotedFromDir&&(n.push(" To scope to just that sub-folder, re-run `ok init --content-dir .` from there, or set"),n.push(` content.dir: ${e.promotedFromDir} in .ok/config.yml.`))),e.preview?(n.push(``),n.push(_e(e.preview,t))):e.previewWarning&&(n.push(``),n.push(`Content preview unavailable: ${e.previewWarning}`)),n.push(``),n.push(...Ki(e.sharing,t)),r){let t=new Set,r=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).filter(e=>!t.has(e.editorId)&&t.add(e.editorId)).map(e=>e.label);n.push(``),n.push(`${O(`✓`)} ${A(`Next steps:`)}`),n.push(` 1. Open your editor (${D(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${D(`ok seed`)} — empty repo, Karpathy 3-layer`),n.push(` - ${D(`mcp__open-knowledge__discover`)} — existing repo, extract conventions`),n.push(` 4. Use the MCP workflow tools as you build the wiki:`),n.push(` - ${D(`mcp__open-knowledge__ingest`)} — capture an external source`),n.push(` - ${D(`mcp__open-knowledge__research`)} — gather sources and write findings`),n.push(` - ${D(`mcp__open-knowledge__consolidate`)} — promote research to canonical articles`)}return n.join(`
|
|
636
636
|
`)}function Hi(e,t){return{projectRoot:e.projectRoot,gitRootPromoted:e.gitRootPromoted,promotedFromDir:e.promotedFromDir??null,contentDir:t.contentDir,contentDirRequested:e.contentDirRequested??null,contentDirApplied:e.contentDir!==void 0,contentFileCount:t.contentFileCount,previewError:e.previewWarning??null,didGitInit:e.didGitInit,mcpAction:e.mcpAction,editors:e.editors.map(e=>({editorId:e.editorId,label:e.label,action:e.action,configPath:e.configPath,scope:e.configScope===`project`?`project`:`user`}))}}function Ui(e,t){let n=[];for(let r of pe)Oi(E[r],e,t)&&n.push(r);return n}function Wi(){let e={log:console.log,info:console.info,debug:console.debug},t=(...e)=>{process.stderr.write(`${e.map(e=>typeof e==`string`?e:Ae(e)).join(` `)}\n`)};return console.log=t,console.info=t,console.debug=t,()=>{console.log=e.log,console.info=e.info,console.debug=e.debug}}function Gi(){return new ie(`init`).description(`Scaffold .ok/ 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 .ok/ 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`).option(`--content-dir <dir>`,`Limit content to <dir> instead of the whole project. <dir> is interpreted relative to your current directory (e.g. "." = the folder you run the command in), then saved to .ok/config.yml as content.dir.`).option(`--json`,`Emit a structured JSON summary to stdout (diagnostics stay on stderr)`).option(`--skills <ids>`,`Install only the named user-global skill bundles (comma list: discovery,write-skill)`).option(`--no-skills`,`Do not install any user-global skill bundles`).addOption(new re(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new re(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new re(`--local-only`,`Keep OK config out of git via .git/info/exclude (per-clone, not committed)`).conflicts(`shared`)).action(async e=>{let t=process.cwd(),n=e.shared?`shared`:e.localOnly?`local-only`:void 0,r=e.json?Wi():null;try{let r;try{r=await Li({cwd:t,mcp:e.mcp,devMcp:e.devMcp,scope:e.scope,sharing:n,contentDir:e.contentDir,skills:e.skills})}catch(e){if(e instanceof $){process.stderr.write(`${e.message}\n`),process.exitCode=64;return}if(e instanceof c||e instanceof p){process.stderr.write(`${e.message}\n`),process.exitCode=78;return}if(e instanceof u){process.stderr.write(`open-knowledge could not initialize a git repo for this project. Re-run, or run 'git init' yourself in the project folder.
|
|
637
|
-
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}let i=r.contentDir??`.`,a=null,{loadConfig:o}=await import(`./loader-
|
|
637
|
+
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}let i=r.contentDir??`.`,a=null,{loadConfig:o}=await import(`./loader-Cp_gB2wf.mjs`),{resolveContentDir:s}=await import(`./dist-LzL927dF.mjs`),l;try{l=o(r.projectRoot).config,i=l.content.dir}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}if(l)try{let{previewContent:e}=await import(`./preview-Cohlvwo7.mjs`),t=s(l,r.projectRoot);r.preview=e({projectDir:r.projectRoot,contentDir:t}),a=r.preview.totalCount}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}e.json?process.stdout.write(`${JSON.stringify(Hi(r,{contentDir:i,contentFileCount:a}),null,2)}\n`):process.stdout.write(`${Vi(r,r.projectRoot)}\n`),(r.editors.some(e=>e.action===`failed`)||r.mcpAction===`failed`)&&(process.exitCode=1)}finally{r?.()}})}function Ki(e,t){let n=[];switch(e.kind){case`applied`:return n.push(A(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?n.push(` ${O(`local-only`)} — appended ${e.appended.length} path(s) to ${A(`${t}/.git/info/exclude`)} (per-clone, not committed).`):e.action===`noop`&&e.alreadyPresent.length>0?n.push(` ${O(`local-only`)} — already excluded; nothing to do.`):n.push(` ${O(`local-only`)}`):e.action===`removed`?n.push(` ${O(`shared`)} — removed OK paths from ${A(`${t}/.git/info/exclude`)}; commit the files to share with teammates.`):n.push(` ${O(`shared`)} — OK config will be committed alongside content.`),n;case`refused-tracked`:n.push(k(`Sharing mode: switch to local-only deferred`));for(let t of e.remediation.split(`
|
|
638
638
|
`))n.push(t.length>0?` ${t}`:``);return n.push(` Re-run ${D(`ok config-sharing unshare`)} after resolving to complete the switch.`),n;case`no-exclude`:if(e.localOnlyRequested)n.push(k(`Sharing mode: --local-only requested but no git repo found — option ignored`)),n.push(` Run ${D(`git init`)} (or open this folder via OK Desktop, which can scaffold a repo) and then ${D(`ok config-sharing unshare`)}.`);else if(e.reason===`no-git`)return[];else n.push(k(`Sharing mode unavailable: ${e.reason}.`));return n}}export{Sn as A,He as B,Kn as C,Cn as D,Rn as E,cn as F,_t as I,mt as L,Tn as M,wn as N,On as O,xn as P,pt as R,Nr as S,Ln as T,fi as _,Hi as a,ei as b,Vi as c,Pi as d,wi as f,Li as g,Ci as h,Ri as i,Dn as j,En as k,Ki as l,Ti as m,Di as n,Ii as o,xi as p,Ai as r,Ui as s,$ as t,Gi as u,ki as v,J as w,Rr as x,Ni as y,U as z};
|
|
639
|
-
//# sourceMappingURL=init-
|
|
639
|
+
//# sourceMappingURL=init-DVmTwFt9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./init-DVmTwFt9.mjs";export{e as runInit};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Da as e,Oa as t,wa as n}from"./dist-
|
|
2
|
-
//# sourceMappingURL=launch-json-removal-
|
|
1
|
+
import{Da as e,Oa as t,wa as n}from"./dist-DFesG7DS.mjs";import{E as r,w as i}from"./init-DVmTwFt9.mjs";import{t as a}from"./is-object-DAC-mmwo.mjs";import{join as o}from"node:path";import{existsSync as s,readFileSync as c,rmSync as l}from"node:fs";const u={allowTrailingComma:!0,disallowComments:!1};function d(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function f(f){let p=o(f,`.claude`,`launch.json`);if(!s(p))return{kind:`not-present`};let m;try{m=c(p,`utf-8`)}catch{return{kind:`declined`}}let h=[],g=e(m,h,u)??void 0;if(h.some(e=>!d(e,m))||!g||g.type!==`object`)return{kind:`declined`};let _=n(g).configurations;if(!Array.isArray(_))return{kind:`not-present`};let v=_.findIndex(e=>a(e)&&e.name===`open-knowledge-ui`);if(v===-1)return{kind:`not-present`};if(_.length===1)return l(p,{force:!0}),{kind:`removed-file`};let{text:y,changed:b}=r(m,[`configurations`,v]);return b?(t(p,y,{mode:i(p)}),{kind:`removed`}):{kind:`not-present`}}export{f as t};
|
|
2
|
+
//# sourceMappingURL=launch-json-removal-CK3m_KOj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-DQQQ7lKb.mjs";export{e as loadConfig};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{So as e,_o as t,ps as n,vo as r}from"./server-lock-iLcBw_q0-DK2Tcu84.mjs";import{Aa as i,_ as a,ka as o}from"./dist-
|
|
1
|
+
import{So as e,_o as t,ps as n,vo as r}from"./server-lock-iLcBw_q0-DK2Tcu84.mjs";import{Aa as i,_ as a,ka as o}from"./dist-DFesG7DS.mjs";import{t as s}from"./constants-BOgh7UxS.mjs";import{t as c}from"./is-object-DAC-mmwo.mjs";import{resolve as l}from"node:path";import{existsSync as u,readFileSync as d}from"node:fs";import{realpath as f}from"node:fs/promises";async function p(e){let t=l(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}}var m=n();function h(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];c(a)&&c(i)?n[r]=h(i,a):a!==void 0&&(n[r]=a)}return n}function g(e){if(!u(e))return{value:null,path:e,source:null,doc:null};let t;try{t=d(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,m.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 c(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function _(t,n){return t.map(t=>{let r=t.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:t.message,issueCode:t.code};if(n.doc!==null&&n.source!==null){let t=e({file:n.path,source:n.source,doc:n.doc,path:r});if(t!==void 0)return{...i,source:t}}return i})}function v(e){let n=e??process.cwd(),c=[],u=i(`user`,n),d=o({absPath:u}),f={};d.valid&&d.source!==void 0?(f=h(f,d.value),c.push(u)):d.valid;let p=l(n,`.ok`,s),m=g(p);if(m.value!==null){let e=t({value:m.value,file:m.path,source:m.source,doc:m.doc});if(e.length>0)throw Error(e.map(r).join(`
|
|
2
2
|
|
|
3
3
|
`));f=h(f,m.value),c.push(p)}let v=a.safeParse(f);if(!v.success){let e={code:`SCHEMA_INVALID`,issues:_(v.error.issues,m)};throw Error(r(e))}return{config:v.data,sources:c}}function y(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??v,r=new Map,i=new Map,a=p(e.startupCwd);return async o=>{let s=await p(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{v as n,y as t};
|
|
4
|
-
//# sourceMappingURL=loader-
|
|
4
|
+
//# sourceMappingURL=loader-DQQQ7lKb.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{sa as e}from"./dist-
|
|
2
|
-
//# sourceMappingURL=open-browser-
|
|
1
|
+
import{sa as e}from"./dist-DFesG7DS.mjs";import{execFile as t}from"node:child_process";const n=new Set([`http:`,`https:`]),r=/[\u0000-\u0020\u007F-\u009F"'`\\&|<>^()$;{}[\]*?!~]/;function i(e,t){console.warn(`Could not auto-open browser (${t}); visit ${e} manually`)}function a(a){let o;try{o=new URL(a)}catch{i(a,`invalid URL`);return}if(!n.has(o.protocol)){i(a,`unsupported scheme '${o.protocol}'`);return}if(r.test(a)){i(a,`URL contains unsafe characters`);return}t(process.platform===`darwin`?`open`:process.platform===`win32`?`cmd`:`xdg-open`,process.platform===`win32`?[`/c`,`start`,``,a]:[a],e({}),e=>{e&&console.warn(`Could not auto-open browser (${e.message}); visit ${a} manually`)})}export{a as openBrowser};
|
|
2
|
+
//# sourceMappingURL=open-browser-3gSG96ZS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-i-hogfu4.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{qt as e}from"./dist-
|
|
1
|
+
import{qt as e}from"./dist-DFesG7DS.mjs";import"./constants-BOgh7UxS.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);return a.push(``),r(t(i,`.ok`,`config.yml`))?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-i-hogfu4.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{s as e}from"./chunk-Bj-mKKzh.js";import{n as t,r as n,t as r}from"./compiler-runtime-B6sxACDP.js";import{n as i,r as a}from"./dist-UKzQrqGt.js";import{n as o,t as s}from"./createLucideIcon-DkO1lL_8.js";import{a as c,c as l,i as u,n as d,o as f,s as p,t as m}from"./dialog-DFGKErvF.js";import{t as h}from"./checkbox-DbIYExtz.js";import{o as g}from"./dist-CurDB4OA.js";import{t as _}from"./check-YcLXnBws.js";import{n as v,r as y,t as b}from"./CopyButton-CMJPcMjt.js";import{t as ee}from"./loader-circle-CLDbHvUo.js";import{t as te}from"./triangle-alert-BRg1-EjD.js";import{t as ne}from"./input-C1P6Hf22.js";import{t as x}from"./external-link-BfiFPJEx.js";import{n as re}from"./clipboard-adapter-BHfhAZ-n.js";import{t as ie}from"./textarea-BdasFVsT.js";var ae=s(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),oe=s(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),se=r(),S=e(t(),1),C=n(),w=`support@inkeep.com`;function ce(e){return`mailto:${w}?subject=${encodeURIComponent(e)}`}function le(e){let t=(0,se.c)(7),{href:n}=e,r,i;t[0]===n?(r=t[1],i=t[2]):(r=e=>x(e,n),i=e=>x(e,n),t[0]=n,t[1]=r,t[2]=i);let a;return t[3]!==n||t[4]!==r||t[5]!==i?(a=(0,C.jsx)(`a`,{href:n,onClick:r,onAuxClick:i,className:`text-primary hover:underline`,children:w}),t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],a}function ue(e,t){let n=e.trim();if(t===void 0)return n===``?void 0:n;let r=t.join(`
|
|
2
|
+
`);return n===``?r:`${n}\n\n${r}`}function de(e){let t=[`Crash source: ${e.source}`];return e.docName!==void 0&&t.push(`Document: ${e.docName}`),e.errorMessage!==void 0&&t.push(`Error: ${e.errorMessage}`),t}function fe(e){return[`Crash source: ${e.kind===`render-process-gone`?`renderer process crash (reason: ${e.context.reason})`:e.kind===`child-process-gone`?`${e.context.processType} process crash (reason: ${e.context.reason})`:e.context.dirtyShutdown?`previous session ended without a clean quit`:`new crash dump found from the previous session`}`,`Crash event: ${e.eventId}`]}var pe={step:`compose`,creating:!1,createError:null};function me(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:e>=1024?`${Math.max(1,Math.round(e/1024))} KB`:`${e} B`}function T(e){return e.split(/[\\/]/).pop()??e}function he(e){return e.summary.files.some(e=>e.startsWith(`extra/`)&&e!==g)}function E(e){let t=(0,se.c)(91),{open:n,onOpenChange:r,systemWide:s,crashContext:g,crashInvite:x,screenshot:ae}=e,w=s===void 0?!1:s,T=ae===void 0?null:ae,{_:E}=a(),[D,O]=(0,S.useState)(pe),[k,ye]=(0,S.useState)(``),[A,be]=(0,S.useState)(g!==void 0||x!==void 0),[j,xe]=(0,S.useState)(!1),[M,Se]=(0,S.useState)(!0),[Ce,we]=(0,S.useState)(0),N=(0,S.useRef)(0),P=(0,S.useId)(),F=(0,S.useId)(),I=(0,S.useId)(),L=(0,S.useId)(),R=(0,S.useId)(),z=(0,S.useId)(),B=(0,S.useId)(),V=(0,S.useId)(),Te=(0,S.useId)(),Ee=(0,S.useId)(),De=(0,S.useId)(),H=D.step===`sending`,Oe;t[0]!==g||t[1]!==x?(Oe=g===void 0?x===void 0?void 0:fe(x):de(g),t[0]=g,t[1]=x,t[2]=Oe):Oe=t[2];let U=Oe,ke,Ae;t[3]===H?(ke=t[4],Ae=t[5]):(ke=()=>{if(!H)return;we(0);let e=Date.now(),t=setInterval(()=>{let t=(Date.now()-e)/1e3;we(Math.min(.9,1-Math.exp(-t/3)))},200);return()=>{clearInterval(t)}},Ae=[H],t[3]=H,t[4]=ke,t[5]=Ae),(0,S.useEffect)(ke,Ae);let je;t[6]!==g||t[7]!==x||t[8]!==r||t[9]!==D.step?(je=function(e){!e&&D.step===`sending`||(e||(N.current+=1,(D.step===`success`||D.step===`email`||D.step===`failure`)&&(ye(``),be(g!==void 0||x!==void 0),xe(!1),Se(!0)),O(pe)),r(e))},t[6]=g,t[7]=x,t[8]=r,t[9]=D.step,t[10]=je):je=t[10];let W=je,Me;t[11]!==E||t[12]!==x||t[13]!==A||t[14]!==j||t[15]!==M||t[16]!==k||t[17]!==U||t[18]!==T?(Me=async function(){let e=window.okDesktop?.bugReport;if(!e){O({step:`compose`,creating:!1,createError:E({id:`_0JUKX`})});return}let t=N.current+=1;O({step:`compose`,creating:!0,createError:null});let n=await e.create({level:A?`full`:`standard`,note:ue(k,U),...x===void 0?{}:{includeCrashDump:j},...T===null?{}:{includeScreenshot:M}});N.current===t&&(n.ok?O({step:`review`,report:{zipPath:n.zipPath,zipSizeBytes:n.zipSizeBytes,summary:n.summary}}):O({step:`compose`,creating:!1,createError:n.error}))},t[11]=E,t[12]=x,t[13]=A,t[14]=j,t[15]=M,t[16]=k,t[17]=U,t[18]=T,t[19]=Me):Me=t[19];let Ne=Me,Pe;t[20]!==k||t[21]!==U?(Pe=async function(e){let t=window.okDesktop?.bugReport;if(!t)return;let n=N.current+=1;O({step:`sending`,report:e});let r=await t.send({zipPath:e.zipPath,metadata:{level:e.summary.level,systemWide:e.summary.systemWide,projectSlug:e.summary.projectSlug,note:ue(k,U)}});N.current===n&&(r.ok?O({step:`success`,report:e,reference:r.reference}):r.reason===`email-draft`?O({step:`email`,report:e,mailtoUrl:r.fallback.mailtoUrl}):O({step:`failure`,report:e,mailtoUrl:r.fallback.mailtoUrl}))},t[20]=k,t[21]=U,t[22]=Pe):Pe=t[22];let G=Pe,Fe;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=function(e){N.current+=1,O({step:`review`,report:e})},t[23]=Fe):Fe=t[23];let Ie=Fe,Le;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(Le=function(e){window.okDesktop?.shell.showItemInFolder(e)},t[24]=Le):Le=t[24];let Re=Le,ze;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(ze=function(e){window.okDesktop?.shell.openExternal(e)},t[25]=ze):ze=t[25];let Be=ze,K;t[26]===Ce?K=t[27]:(K=Math.round(Ce*100),t[26]=Ce,t[27]=K);let Ve=K,He=!H,q;t[28]!==E||t[29]!==g||t[30]!==x||t[31]!==A||t[32]!==R||t[33]!==L||t[34]!==B||t[35]!==z||t[36]!==Ne||t[37]!==W||t[38]!==j||t[39]!==M||t[40]!==I||t[41]!==F||t[42]!==k||t[43]!==P||t[44]!==D.createError||t[45]!==D.creating||t[46]!==D.step||t[47]!==T||t[48]!==Te||t[49]!==V||t[50]!==w||t[51]!==De?(q=D.step===`compose`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(p,{children:[(0,C.jsx)(l,{children:(0,C.jsx)(i,{id:`cd5EXh`})}),x===void 0&&(0,C.jsx)(c,{children:(0,C.jsx)(i,{id:`rD-woT`})})]}),(0,C.jsxs)(d,{className:`flex flex-col gap-5`,children:[x!==void 0&&(0,C.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-md border border-chart-3/35 bg-chart-3/10 px-3 py-2.5 text-sm`,children:[(0,C.jsx)(te,{className:`mt-0.5 size-4 shrink-0 text-chart-3`,"aria-hidden":`true`}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`font-medium`,children:(0,C.jsx)(i,{id:`_IGfXZ`})}),(0,C.jsx)(c,{className:`mt-0.5 text-xs`,children:(0,C.jsx)(i,{id:`03wKPg`})})]})]}),D.createError!==null&&(0,C.jsxs)(`div`,{role:`alert`,className:`flex items-start gap-2.5 rounded-md border border-destructive/35 bg-destructive/10 px-3 py-2.5 text-sm`,children:[(0,C.jsx)(y,{className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":`true`}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`font-medium`,children:(0,C.jsx)(i,{id:`wVa83H`})}),(0,C.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:D.createError}),(0,C.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:(0,C.jsx)(i,{id:`5PHgV2`,components:{0:(0,C.jsx)(`code`,{className:`font-mono`})}})})]})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsxs)(`label`,{htmlFor:P,className:`text-sm font-medium`,children:[x===void 0?(0,C.jsx)(i,{id:`y_K0Dz`}):(0,C.jsx)(i,{id:`60vpJN`}),` `,(0,C.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:(0,C.jsx)(i,{id:`NzluOx`})})]}),(0,C.jsx)(ie,{id:P,value:k,onChange:e=>ye(e.target.value),placeholder:E(x===void 0?{id:`YLMBSd`}:{id:`T3j-7o`}),rows:3,className:`resize-none`,disabled:D.creating})]}),(0,C.jsxs)(`div`,{role:`group`,"aria-labelledby":De,className:`flex flex-col gap-3.5`,children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,C.jsx)(`p`,{id:De,className:`text-sm font-medium`,children:(0,C.jsx)(i,{id:`WJjviG`})}),x===void 0&&(0,C.jsx)(`p`,{className:`text-1sm text-muted-foreground`,children:g===void 0?(0,C.jsx)(i,{id:`2H43L8`}):(0,C.jsx)(i,{id:`GZzDqc`})})]}),(0,C.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,C.jsx)(h,{id:F,checked:!0,disabled:!0,"aria-describedby":I,className:`mt-0.5`}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsxs)(`label`,{htmlFor:F,className:`flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,C.jsx)(i,{id:`FgRAvd`}),(0,C.jsx)(v,{variant:`primary`,className:`text-2xs`,children:(0,C.jsx)(i,{id:`C0hoX6`})})]}),(0,C.jsx)(`p`,{id:I,className:`text-1sm text-muted-foreground`,children:w?(0,C.jsx)(i,{id:`ZoOlzR`}):(0,C.jsx)(i,{id:`2FnYUD`})})]})]}),(0,C.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,C.jsx)(h,{id:L,checked:A,onCheckedChange:e=>be(e===!0),"aria-describedby":R,disabled:D.creating,className:`mt-0.5`}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsx)(`label`,{htmlFor:L,className:`text-sm font-medium`,children:(0,C.jsx)(i,{id:`zvjCD4`})}),(0,C.jsx)(`p`,{id:R,className:`text-1sm text-muted-foreground`,children:(0,C.jsx)(i,{id:`ULRb5t`})})]})]}),T!==null&&(0,C.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,C.jsx)(h,{id:V,checked:M,onCheckedChange:e=>Se(e===!0),"aria-describedby":Te,disabled:D.creating,className:`mt-0.5`}),(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,C.jsx)(`label`,{htmlFor:V,className:`text-sm font-medium`,children:(0,C.jsx)(i,{id:`IxyZXD`})}),(0,C.jsx)(`p`,{id:Te,className:`text-1sm text-muted-foreground`,children:(0,C.jsx)(i,{id:`yzYE4B`})}),(0,C.jsx)(`div`,{className:`mt-0.5 overflow-hidden rounded-md border bg-muted/40`,children:(0,C.jsx)(`img`,{src:T.dataUrl,alt:E({id:`WuntOK`}),className:`block max-h-44 w-full object-contain transition-opacity motion-reduce:transition-none ${M?`opacity-100`:`opacity-40`}`})})]})]}),x!==void 0&&(0,C.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[(0,C.jsx)(h,{id:z,checked:j,onCheckedChange:e=>xe(e===!0),"aria-describedby":B,disabled:D.creating,className:`mt-0.5`}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsx)(`label`,{htmlFor:z,className:`text-sm font-medium`,children:(0,C.jsx)(i,{id:`8TvlHF`})}),(0,C.jsx)(`p`,{id:B,className:`text-1sm text-muted-foreground`,children:(0,C.jsx)(i,{id:`YIp4R0`})})]})]})]})]}),(0,C.jsxs)(f,{children:[(0,C.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>W(!1),children:x===void 0?(0,C.jsx)(i,{id:`dEgA5A`}):(0,C.jsx)(i,{id:`PBxg_E`})}),(0,C.jsxs)(o,{onClick:()=>void Ne(),disabled:D.creating,children:[D.creating&&(0,C.jsx)(ee,{className:`size-4 animate-spin motion-reduce:animate-none`,"aria-hidden":`true`}),(0,C.jsx)(i,{id:`Si7mIR`})]})]})]}),t[28]=E,t[29]=g,t[30]=x,t[31]=A,t[32]=R,t[33]=L,t[34]=B,t[35]=z,t[36]=Ne,t[37]=W,t[38]=j,t[39]=M,t[40]=I,t[41]=F,t[42]=k,t[43]=P,t[44]=D.createError,t[45]=D.creating,t[46]=D.step,t[47]=T,t[48]=Te,t[49]=V,t[50]=w,t[51]=De,t[52]=q):q=t[52];let J;t[53]!==G||t[54]!==D.report||t[55]!==D.step?(J=D.step===`review`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(p,{children:[(0,C.jsx)(l,{children:(0,C.jsx)(i,{id:`2AIVbm`})}),(0,C.jsx)(c,{children:(0,C.jsx)(i,{id:`3l_cXP`})})]}),(0,C.jsxs)(d,{className:`flex flex-col gap-4`,children:[(0,C.jsx)(ve,{zipPath:D.report.zipPath,zipSizeBytes:D.report.zipSizeBytes,fileCount:D.report.summary.files.length,rawDumpIncluded:he(D.report),onReveal:Re}),(0,C.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border bg-muted/50 px-3 py-2.5 text-xs text-muted-foreground`,children:[(0,C.jsx)(oe,{className:`size-3.5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,C.jsx)(`span`,{children:(0,C.jsx)(i,{id:`-o5XAG`})})]})]}),(0,C.jsxs)(f,{className:`sm:justify-between`,children:[(0,C.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>O(pe),children:(0,C.jsx)(i,{id:`iH8pgl`})}),(0,C.jsx)(o,{onClick:()=>void G(D.report),children:(0,C.jsx)(i,{id:`O9oQJS`})})]})]}),t[53]=G,t[54]=D.report,t[55]=D.step,t[56]=J):J=t[56];let Y;t[57]!==E||t[58]!==D.report||t[59]!==D.step||t[60]!==Ve?(Y=D.step===`sending`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(p,{children:[(0,C.jsx)(l,{children:(0,C.jsx)(i,{id:`M5_9s2`})}),(0,C.jsx)(c,{className:`sr-only`,children:(0,C.jsx)(i,{id:`MJqRO6`})})]}),(0,C.jsxs)(d,{className:`flex flex-col gap-3`,children:[(0,C.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2.5 text-sm`,children:[(0,C.jsx)(ee,{className:`size-4 shrink-0 animate-spin text-primary motion-reduce:animate-none`,"aria-hidden":`true`}),(0,C.jsx)(i,{id:`qmL1UG`}),(0,C.jsx)(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:(0,C.jsx)(i,{id:`JJcBCm`,values:{0:me(D.report.zipSizeBytes)}})})]}),(0,C.jsx)(`div`,{role:`progressbar`,"aria-label":E({id:`M5_9s2`}),className:`h-1.5 overflow-hidden rounded-full bg-secondary`,children:(0,C.jsx)(`div`,{className:`h-full rounded-full bg-primary`,style:{width:`${Ve}%`}})})]}),(0,C.jsxs)(f,{className:`sm:justify-between`,children:[(0,C.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>Ie(D.report),children:(0,C.jsx)(i,{id:`dEgA5A`})}),(0,C.jsx)(o,{disabled:!0,children:(0,C.jsx)(i,{id:`O9oQJS`})})]})]}),t[57]=E,t[58]=D.report,t[59]=D.step,t[60]=Ve,t[61]=Y):Y=t[61];let X;t[62]!==E||t[63]!==W||t[64]!==D.reference||t[65]!==D.step||t[66]!==Ee?(X=D.step===`success`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(d,{children:(0,C.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,C.jsxs)(`div`,{role:`status`,className:`flex flex-col gap-3`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(_,{className:`size-5 shrink-0 text-primary`,"aria-hidden":`true`}),(0,C.jsx)(l,{children:(0,C.jsx)(i,{id:`IYciRC`})})]}),(0,C.jsx)(c,{children:(0,C.jsx)(i,{id:`2myNzt`})})]}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,C.jsx)(`label`,{htmlFor:Ee,className:`text-sm font-medium`,children:(0,C.jsx)(i,{id:`M-IF14`})}),(0,C.jsxs)(`div`,{className:`relative`,children:[(0,C.jsx)(ne,{id:Ee,readOnly:!0,value:D.reference,onFocus:_e,onClick:ge,className:`select-all bg-muted pr-9 font-mono text-sm font-medium tracking-wide`}),(0,C.jsx)(`div`,{className:`absolute inset-y-0 right-1 flex items-center`,children:(0,C.jsx)(b,{copyContent:D.reference,clipboardWrite:re})})]})]}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,C.jsx)(i,{id:`fxJk_6`,components:{0:(0,C.jsx)(`span`,{className:`font-medium text-foreground`}),1:(0,C.jsx)(le,{href:ce(E({id:`qEEfPk`,values:{0:D.reference}}))})}})})]})}),(0,C.jsx)(f,{children:(0,C.jsx)(o,{onClick:()=>W(!1),children:(0,C.jsx)(i,{id:`DPfwMq`})})})]}),t[62]=E,t[63]=W,t[64]=D.reference,t[65]=D.step,t[66]=Ee,t[67]=X):X=t[67];let Z;t[68]!==W||t[69]!==D.mailtoUrl||t[70]!==D.report||t[71]!==D.step?(Z=D.step===`email`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(p,{children:[(0,C.jsx)(l,{children:(0,C.jsx)(i,{id:`6zzhQL`})}),(0,C.jsx)(c,{children:(0,C.jsx)(i,{id:`UTgWxm`})})]}),(0,C.jsxs)(d,{className:`flex flex-col gap-4`,children:[(0,C.jsx)(ve,{zipPath:D.report.zipPath,zipSizeBytes:D.report.zipSizeBytes,fileCount:D.report.summary.files.length,rawDumpIncluded:he(D.report),onReveal:Re}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,C.jsx)(i,{id:`9XIEYq`,components:{0:(0,C.jsx)(le,{href:D.mailtoUrl})}})})]}),(0,C.jsxs)(f,{className:`sm:justify-between`,children:[(0,C.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>W(!1),children:(0,C.jsx)(i,{id:`yz7wBu`})}),(0,C.jsx)(o,{onClick:()=>Be(D.mailtoUrl),children:(0,C.jsx)(i,{id:`GuaJb-`})})]})]}),t[68]=W,t[69]=D.mailtoUrl,t[70]=D.report,t[71]=D.step,t[72]=Z):Z=t[72];let Q;t[73]!==W||t[74]!==G||t[75]!==D.mailtoUrl||t[76]!==D.report||t[77]!==D.step?(Q=D.step===`failure`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(p,{children:[(0,C.jsx)(l,{children:(0,C.jsx)(i,{id:`Wi-VWy`})}),(0,C.jsx)(c,{className:`sr-only`,children:(0,C.jsx)(i,{id:`1OKzC_`})})]}),(0,C.jsxs)(d,{className:`flex flex-col gap-4`,children:[(0,C.jsxs)(`div`,{role:`alert`,className:`flex items-start gap-2.5 rounded-md border border-destructive/35 bg-destructive/10 px-3 py-2.5 text-sm`,children:[(0,C.jsx)(y,{className:`mt-0.5 size-4 shrink-0 text-destructive`,"aria-hidden":`true`}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`font-medium`,children:(0,C.jsx)(i,{id:`Oawo4U`})}),(0,C.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:(0,C.jsx)(i,{id:`2-CeZn`})})]})]}),(0,C.jsx)(ve,{zipPath:D.report.zipPath,zipSizeBytes:D.report.zipSizeBytes,fileCount:null,rawDumpIncluded:he(D.report),onReveal:Re}),(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,C.jsx)(i,{id:`9XIEYq`,components:{0:(0,C.jsx)(le,{href:D.mailtoUrl})}})})]}),(0,C.jsxs)(f,{className:`sm:justify-between`,children:[(0,C.jsx)(o,{variant:`ghost`,className:`font-mono uppercase`,onClick:()=>W(!1),children:(0,C.jsx)(i,{id:`yz7wBu`})}),(0,C.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row`,children:[(0,C.jsx)(o,{variant:`outline`,className:`font-mono uppercase`,onClick:()=>void G(D.report),children:(0,C.jsx)(i,{id:`KDw4GX`})}),(0,C.jsx)(o,{onClick:()=>Be(D.mailtoUrl),children:(0,C.jsx)(i,{id:`GuaJb-`})})]})]})]}),t[73]=W,t[74]=G,t[75]=D.mailtoUrl,t[76]=D.report,t[77]=D.step,t[78]=Q):Q=t[78];let $;t[79]!==He||t[80]!==q||t[81]!==J||t[82]!==Y||t[83]!==X||t[84]!==Z||t[85]!==Q?($=(0,C.jsxs)(u,{className:`sm:max-w-md`,showCloseButton:He,children:[q,J,Y,X,Z,Q]}),t[79]=He,t[80]=q,t[81]=J,t[82]=Y,t[83]=X,t[84]=Z,t[85]=Q,t[86]=$):$=t[86];let Ue;return t[87]!==W||t[88]!==n||t[89]!==$?(Ue=(0,C.jsx)(m,{open:n,onOpenChange:W,children:$}),t[87]=W,t[88]=n,t[89]=$,t[90]=Ue):Ue=t[90],Ue}function ge(e){return e.currentTarget.select()}function _e(e){return e.currentTarget.select()}function ve(e){let t=(0,se.c)(23),{zipPath:n,zipSizeBytes:r,fileCount:a,rawDumpIncluded:s,onReveal:c}=e,l;t[0]===n?l=t[1]:(l=T(n),t[0]=n,t[1]=l);let u=l,d;t[2]===r?d=t[3]:(d=me(r),t[2]=r,t[3]=d);let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,C.jsx)(`div`,{className:`flex items-center justify-center size-8 rounded-md bg-muted`,children:(0,C.jsx)(ae,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`})}),t[4]=p):p=t[4];let m;t[5]===u?m=t[6]:(m=(0,C.jsx)(`p`,{className:`truncate text-1sm`,title:u,children:u}),t[5]=u,t[6]=m);let h;t[7]!==a||t[8]!==s||t[9]!==f?(h=(0,C.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:a===null?s?(0,C.jsx)(i,{id:`_FLBbi`,values:{sizeText:f}}):(0,C.jsx)(i,{id:`89y7ar`,values:{sizeText:f}}):s?(0,C.jsx)(i,{id:`sn5BEU`,values:{sizeText:f,fileCount:a}}):(0,C.jsx)(i,{id:`3DJEEt`,values:{sizeText:f,fileCount:a}})}),t[7]=a,t[8]=s,t[9]=f,t[10]=h):h=t[10];let g;t[11]!==m||t[12]!==h?(g=(0,C.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[m,h]}),t[11]=m,t[12]=h,t[13]=g):g=t[13];let _;t[14]!==c||t[15]!==n?(_=()=>c(n),t[14]=c,t[15]=n,t[16]=_):_=t[16];let v;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,C.jsx)(i,{id:`LtSYdi`}),t[17]=v):v=t[17];let y;t[18]===_?y=t[19]:(y=(0,C.jsx)(o,{variant:`link`,className:`h-auto shrink-0 p-0 text-xs`,onClick:_,children:v}),t[18]=_,t[19]=y);let b;return t[20]!==g||t[21]!==y?(b=(0,C.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md border px-3 py-2.5`,children:[p,g,y]}),t[20]=g,t[21]=y,t[22]=b):b=t[22],b}export{E as default};
|