@inkeep/open-knowledge 0.33.0-beta.4 → 0.33.0-beta.5
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-DJC5MEix.mjs +2 -0
- package/dist/{dist-DFesG7DS.mjs → dist-0Mfowk3R.mjs} +3 -3
- package/dist/{dist-LzL927dF.mjs → dist-ByqNBEyQ.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-DVmTwFt9.mjs → init-CUBRtkez.mjs} +3 -3
- package/dist/init-D_2w4_8n.mjs +1 -0
- package/dist/{launch-json-removal-CK3m_KOj.mjs → launch-json-removal--BmJqT87.mjs} +2 -2
- package/dist/{loader-DQQQ7lKb.mjs → loader-DRR095Jj.mjs} +2 -2
- package/dist/loader-QudPqlKw.mjs +1 -0
- package/dist/{open-browser-3gSG96ZS.mjs → open-browser-CZY2ZKg0.mjs} +2 -2
- package/dist/{preview-i-hogfu4.mjs → preview-BUUT3N0t.mjs} +2 -2
- package/dist/preview-eYrC9lP5.mjs +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-pMX0Xi8a.js → ManagedArtifactProperties-BfEt7bIb.js} +1 -1
- package/dist/public/assets/{PropertyPanel-BO5wswVJ.js → PropertyPanel-DpYcGGW2.js} +1 -1
- package/dist/public/assets/{index-D6hCtfGM.js → index-CzUR_TnM.js} +102 -102
- package/dist/public/index.html +2 -2
- package/dist/{repair-launch-json-CuiKRBgN.mjs → repair-launch-json-jpDBAb4m.mjs} +2 -2
- package/dist/{repair-mcp-configs-w04p1UDy.mjs → repair-mcp-configs-Bid881e6.mjs} +2 -2
- package/dist/repair-skills-BkNgLJzB.mjs +1 -0
- package/dist/{repair-skills-wxyzsDDA.mjs → repair-skills-g00h1ESt.mjs} +2 -2
- package/dist/{src-BOXbBMoy.mjs → src-DyEoJGw7.mjs} +2 -2
- package/dist/start-BZ29iacu.mjs +1 -0
- package/dist/{start-X8kJKYXc.mjs → start-CC6n9G3S.mjs} +2 -2
- package/dist/{write-project-skill-NLecUmFg.mjs → write-project-skill-D82uNxGO.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-BOgh7UxS.mjs +0 -2
- package/dist/init-gteB5OO0.mjs +0 -1
- package/dist/loader-Cp_gB2wf.mjs +0 -1
- package/dist/preview-Cohlvwo7.mjs +0 -1
- package/dist/repair-skills-DADzcSUt.mjs +0 -1
- package/dist/start-vj717PKY.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-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};
|
|
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};
|
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-CUBRtkez.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-DyEoJGw7.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-D82uNxGO.mjs";import{n as G}from"./loader-DRR095Jj.mjs";import{n as K}from"./preview-BUUT3N0t.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-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(`
|
|
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-DJC5MEix.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-BUUT3N0t.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-QudPqlKw.mjs`),{resolveContentDir:s}=await import(`./dist-ByqNBEyQ.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-eYrC9lP5.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-CUBRtkez.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./init-CUBRtkez.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-0Mfowk3R.mjs";import{E as r,w as i}from"./init-CUBRtkez.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--BmJqT87.mjs.map
|
|
@@ -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-0Mfowk3R.mjs";import{t as s}from"./constants-DJC5MEix.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-DRR095Jj.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-DRR095Jj.mjs";export{e as loadConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{sa as e}from"./dist-
|
|
2
|
-
//# sourceMappingURL=open-browser-
|
|
1
|
+
import{sa as e}from"./dist-0Mfowk3R.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-CZY2ZKg0.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{qt as e}from"./dist-
|
|
1
|
+
import{qt as e}from"./dist-0Mfowk3R.mjs";import"./constants-DJC5MEix.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-BUUT3N0t.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-BUUT3N0t.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1 +1 @@
|
|
|
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{ct as i,n as a,ot as o}from"./DocumentContext-ogFq9Apo.js";import{n as s,r as c}from"./dist-UKzQrqGt.js";import{n as l,t as u,u as d}from"./createLucideIcon-DkO1lL_8.js";import{c as f,s as p}from"./skills-api-ChqmqNEn.js";import{Er as m,Fr as h,Gt as g,Mt as _,St as v,xr as y}from"./dist-CurDB4OA.js";import{f as b,n as x,t as S}from"./PropertyPanel-BO5wswVJ.js";import{c as C,i as w,s as T}from"./workspace-paths-DGpjh0_R.js";import{i as E,t as D}from"./open-managed-artifact-tab-jUT5uxaf.js";import{n as O}from"./dist-DyPw7rC6.js";import{t as ee}from"./input-C1P6Hf22.js";import{t as te}from"./textarea-BdasFVsT.js";var ne=u(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),k=r(),A=e(t(),1),j=n(),M=[`name`];function N(e){let t=(0,k.c)(46),{provider:n,name:r,scopeControl:i,onRename:a,nameError:o,onNameDraftChange:u,nameEditable:f}=e,p=f===void 0?!0:f,{_:m}=c(),h=(0,A.useId)(),g=(0,A.useId)(),_=C(),[y,x]=(0,A.useState)(r),T,E;t[0]===r?(T=t[1],E=t[2]):(T=()=>x(r),E=[r],t[0]=r,t[1]=T,t[2]=E),(0,A.useEffect)(T,E);let D,O;t[3]===y?(D=t[4],O=t[5]):(O=y.trim(),D=O!==``&&!v.test(O),t[3]=y,t[4]=D,t[5]=O);let te=D,N;t[6]!==r||t[7]!==te||t[8]!==a||t[9]!==O?(N=function(){a&&(te||O===``||O===r||a(O))},t[6]=r,t[7]=te,t[8]=a,t[9]=O,t[10]=N):N=t[10];let F=N,I=te||!!o,L;t[11]!==m||t[12]!==i||t[13]!==g||t[14]!==_?(L=i?(0,j.jsx)(re,{icon:(0,j.jsx)(ne,{className:`size-3.5`}),label:m({id:`oCHfGC`}),htmlFor:g,children:(0,j.jsxs)(`fieldset`,{id:g,className:`m-0 inline-flex items-center gap-1 rounded-full border-0 bg-muted/60 p-0.5`,children:[(0,j.jsx)(`legend`,{className:`sr-only`,children:m({id:`KszKI_`})}),w.map(e=>{let t=i.scope===e;return(0,j.jsx)(l,{type:`button`,"aria-pressed":t,variant:`ghost`,size:`sm`,onClick:()=>{t||i.onScopeChange(e)},className:d(`h-6 rounded-full px-3 text-xs font-medium`,t?e===`global`?`bg-violet-700 text-white hover:bg-violet-700 hover:text-white`:`bg-sky-700 text-white hover:bg-sky-700 hover:text-white`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),children:_[e]},e)})]})}):null,t[11]=m,t[12]=i,t[13]=g,t[14]=_,t[15]=L):L=t[15];let ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,j.jsx)(b,{className:`size-3.5`}),t[16]=ie):ie=t[16];let R;t[17]===m?R=t[18]:(R=m({id:`XmJfZT`}),t[17]=m,t[18]=R);let z=!p,B;t[19]===u?B=t[20]:(B=e=>{let t=e.target.value;x(t),u?.(t)},t[19]=u,t[20]=B);let V=I?`${h}-error`:void 0,H;t[21]!==F||t[22]!==y||t[23]!==h||t[24]!==I||t[25]!==B||t[26]!==V||t[27]!==z?(H=(0,j.jsx)(ee,{id:h,"data-testid":`skill-name-input`,value:y,readOnly:z,onChange:B,onBlur:F,onKeyDown:P,"aria-invalid":I,"aria-describedby":V,className:`h-7 rounded-sm border-transparent bg-transparent px-2 font-mono text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 dark:bg-transparent`}),t[21]=F,t[22]=y,t[23]=h,t[24]=I,t[25]=B,t[26]=V,t[27]=z,t[28]=H):H=t[28];let U;t[29]!==o||t[30]!==h||t[31]!==I?(U=I?(0,j.jsx)(`p`,{id:`${h}-error`,className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`A50vr3`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`1hvhf0`})}),t[29]=o,t[30]=h,t[31]=I,t[32]=U):U=t[32];let W;t[33]!==h||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,j.jsxs)(re,{icon:ie,label:R,htmlFor:h,children:[H,U]}),t[33]=h,t[34]=H,t[35]=U,t[36]=R,t[37]=W):W=t[37];let G;t[38]!==W||t[39]!==L?(G=(0,j.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[L,W]}),t[38]=W,t[39]=L,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,j.jsx)(S,{provider:n,reservedKeys:M}),t[41]=n,t[42]=K);let q;return t[43]!==G||t[44]!==K?(q=(0,j.jsxs)(`div`,{className:`flex flex-col`,children:[G,K]}),t[43]=G,t[44]=K,t[45]=q):q=t[45],q}function P(e){e.key===`Enter`&&e.currentTarget.blur()}function re(e){let t=(0,k.c)(14),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,j.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),t[0]=o):o=t[0];let s;t[1]===n?s=t[2]:(s=(0,j.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:n}),t[1]=n,t[2]=s);let c;t[3]!==i||t[4]!==r?(c=(0,j.jsx)(`label`,{htmlFor:i,className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:r}),t[3]=i,t[4]=r,t[5]=c):c=t[5];let l;t[6]!==s||t[7]!==c?(l=(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[9]=a,t[10]=u);let d;return t[11]!==l||t[12]!==u?(d=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[o,l,u]}),t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function I(e,t){let n=(0,k.c)(15),[r,i]=(0,A.useState)(null),a;n[0]!==t||n[1]!==e?(a=()=>{let n=g(e),r=F(n,t);return n.dispose(),r},n[0]=t,n[1]=e,n[2]=a):a=n[2];let[o,s]=(0,A.useState)(a),c=(0,A.useRef)(!1),l,u;n[3]!==t||n[4]!==e?(l=()=>{let n=g(e);i(n),s(F(n,t));let r=n.subscribe(()=>{c.current||s(F(n,t))});return()=>{r(),n.dispose(),i(e=>e===n?null:e)}},u=[e,t],n[3]=t,n[4]=e,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,A.useEffect)(l,u);let d;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c.current=!0},n[7]=d):d=n[7];let f;n[8]!==r||n[9]!==t||n[10]!==o?(f=()=>{c.current=!1,r&&o!==F(r,t)&&r.patch({[t]:o})},n[8]=r,n[9]=t,n[10]=o,n[11]=f):f=n[11];let p;return n[12]!==f||n[13]!==o?(p={value:o,setValue:s,onFocus:d,onBlur:f},n[12]=f,n[13]=o,n[14]=p):p=n[14],p}function L(e){let t=(0,k.c)(76),{provider:n,name:r,folder:i,onRename:a,nameError:o}=e,{_:l}=c(),u=(0,A.useId)(),d=(0,A.useId)(),f=(0,A.useId)(),p=(0,A.useId)(),m=I(n,`title`),h=I(n,`description`),[g,v]=(0,A.useState)(r),y,S;t[0]===r?(y=t[1],S=t[2]):(y=()=>v(r),S=[r],t[0]=r,t[1]=y,t[2]=S),(0,A.useEffect)(y,S);let C,w;t[3]===g?(C=t[4],w=t[5]):(w=g.trim(),C=w!==``&&!_.test(w),t[3]=g,t[4]=C,t[5]=w);let T=C,E;t[6]!==r||t[7]!==T||t[8]!==a||t[9]!==w?(E=function(){a&&(T||w===``||w===r||a(w))},t[6]=r,t[7]=T,t[8]=a,t[9]=w,t[10]=E):E=t[10];let D=E,O=T||!!o,M;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,j.jsx)(s,{id:`l_UFPv`}),t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,j.jsx)(ne,{className:`size-3.5`}),t[12]=N):N=t[12];let P;t[13]===l?P=t[14]:(P=l({id:`ugoTXs`}),t[13]=l,t[14]=P);let re=i||`/`,F;t[15]!==p||t[16]!==re?(F=(0,j.jsx)(ee,{id:p,value:re,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=re,t[17]=F):F=t[17];let L;t[18]!==p||t[19]!==P||t[20]!==F?(L=(0,j.jsx)(R,{icon:N,label:P,htmlFor:p,children:F}),t[18]=p,t[19]=P,t[20]=F,t[21]=L):L=t[21];let z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,j.jsx)(b,{className:`size-3.5`}),t[22]=z):z=t[22];let B;t[23]===l?B=t[24]:(B=l({id:`XmJfZT`}),t[23]=l,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>v(e.target.value),t[25]=V):V=t[25];let H;t[26]!==D||t[27]!==g||t[28]!==u||t[29]!==O?(H=(0,j.jsx)(ee,{id:u,"data-testid":`template-name-input`,value:g,onChange:V,onBlur:D,onKeyDown:ie,"aria-invalid":O,className:`h-8 border-input bg-transparent px-2 font-mono shadow-none focus-visible:bg-muted/30`}),t[26]=D,t[27]=g,t[28]=u,t[29]=O,t[30]=H):H=t[30];let U;t[31]!==o||t[32]!==O?(U=O?(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`lI0Td2`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`}),1:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`QfFBdJ`})}),t[31]=o,t[32]=O,t[33]=U):U=t[33];let W;t[34]!==u||t[35]!==B||t[36]!==H||t[37]!==U?(W=(0,j.jsxs)(R,{icon:z,label:B,htmlFor:u,children:[H,U]}),t[34]=u,t[35]=B,t[36]=H,t[37]=U,t[38]=W):W=t[38];let G;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,j.jsx)(b,{className:`size-3.5`}),t[39]=G):G=t[39];let K;t[40]===l?K=t[41]:(K=l({id:`q7F5am`}),t[40]=l,t[41]=K);let q;t[42]===m?q=t[43]:(q=e=>m.setValue(e.target.value),t[42]=m,t[43]=q);let J;t[44]!==q||t[45]!==m.onBlur||t[46]!==m.onFocus||t[47]!==m.value||t[48]!==d?(J=(0,j.jsx)(ee,{id:d,"data-testid":`template-title-input`,value:m.value,onChange:q,onFocus:m.onFocus,onBlur:m.onBlur,className:`h-8 border-input bg-transparent px-2 shadow-none focus-visible:bg-muted/30`}),t[44]=q,t[45]=m.onBlur,t[46]=m.onFocus,t[47]=m.value,t[48]=d,t[49]=J):J=t[49];let ae;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`5e1Dri`})}),t[50]=ae):ae=t[50];let Y;t[51]!==K||t[52]!==J||t[53]!==d?(Y=(0,j.jsxs)(R,{icon:G,label:K,htmlFor:d,children:[J,ae]}),t[51]=K,t[52]=J,t[53]=d,t[54]=Y):Y=t[54];let oe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,j.jsx)(b,{className:`size-3.5`}),t[55]=oe):oe=t[55];let X;t[56]===l?X=t[57]:(X=l({id:`eTsJYJ`}),t[56]=l,t[57]=X);let Z;t[58]===h?Z=t[59]:(Z=e=>h.setValue(e.target.value),t[58]=h,t[59]=Z);let Q;t[60]!==h.onBlur||t[61]!==h.onFocus||t[62]!==h.value||t[63]!==f||t[64]!==Z?(Q=(0,j.jsx)(te,{id:f,"data-testid":`template-description-input`,value:h.value,onChange:Z,onFocus:h.onFocus,onBlur:h.onBlur,className:`min-h-16 resize-none border-input bg-transparent px-2 py-1.5 shadow-none focus-visible:bg-muted/30`}),t[60]=h.onBlur,t[61]=h.onFocus,t[62]=h.value,t[63]=f,t[64]=Z,t[65]=Q):Q=t[65];let se;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`sFhaTJ`})}),t[66]=se):se=t[66];let $;t[67]!==f||t[68]!==X||t[69]!==Q?($=(0,j.jsxs)(R,{icon:oe,label:X,htmlFor:f,children:[Q,se]}),t[67]=f,t[68]=X,t[69]=Q,t[70]=$):$=t[70];let ce;return t[71]!==L||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,j.jsxs)(x,{title:M,className:`pt-4 pb-2`,children:[L,W,Y,$]}),t[71]=L,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function ie(e){e.key===`Enter`&&e.currentTarget.blur()}function R(e){let t=(0,k.c)(13),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,j.jsx)(`span`,{className:`truncate text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,j.jsxs)(`label`,{htmlFor:i,className:`flex w-32 shrink-0 items-center gap-1 pt-1.5`,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===a?l=t[9]:(l=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[8]=a,t[9]=l);let u;return t[10]!==c||t[11]!==l?(u=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function z(e){let t=(0,k.c)(18),{docName:n,provider:r}=e,i;t[0]===n?i=t[1]:(i=y(n),t[0]=n,t[1]=i);let a=i;if(a?.kind===`skill`){let e;return t[2]!==n||t[3]!==a.name||t[4]!==a.scope||t[5]!==r?(e=(0,j.jsx)(V,{provider:r,docName:n,scope:a.scope,name:a.name}),t[2]=n,t[3]=a.name,t[4]=a.scope,t[5]=r,t[6]=e):e=t[6],e}if(a?.kind===`template`){let e;return t[7]!==n||t[8]!==a.folder||t[9]!==a.name||t[10]!==r?(e=(0,j.jsx)(U,{provider:r,docName:n,folder:a.folder,name:a.name}),t[7]=n,t[8]=a.folder,t[9]=a.name,t[10]=r,t[11]=e):e=t[11],e}let s;t[12]===n?s=t[13]:(s=o(n),t[12]=n,t[13]=s);let c=s;if(c){let e;return t[14]!==n||t[15]!==c||t[16]!==r?(e=(0,j.jsx)(H,{provider:r,docName:n,name:c}),t[14]=n,t[15]=c,t[16]=r,t[17]=e):e=t[17],e}return null}function B(){let e=(0,k.c)(2),{closeDocument:t}=a(),n;return e[0]===t?n=e[1]:(n=(e,n)=>{e!==n&&(D(n),t(e))},e[0]=t,e[1]=n),n}function V(e){let t=(0,k.c)(24),{provider:n,docName:r,scope:i,name:a}=e,{_:o}=c(),s=T(),l=B(),[u,d]=(0,A.useState)(null),[m,g]=(0,A.useState)(!1),_;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(_=async function(e){d(null);let t=await p({scope:i,fromName:a,toName:e});if(!t.ok){d(t.error),O.error(o({id:`sHrqDx`,values:{0:t.error}}));return}O.success(o({id:`_hPpdX`})),l(r,h(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=_):_=t[5];let v=_,y;t[6]!==o||t[7]!==r||t[8]!==m||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==s?(y=async function(e){if(e===i||m)return;g(!0);let t=await f({name:a,fromScope:i,toScope:e});if(g(!1),!t.ok){O.error(o({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(o({id:`DhK_hZ`,values:{0:s[e],name:a,skipped:n}})):O.success(o({id:`UQMMvx`,values:{0:s[e],name:a}})),l(r,h(e,a))},t[6]=o,t[7]=r,t[8]=m,t[9]=a,t[10]=l,t[11]=i,t[12]=s,t[13]=y):y=t[13];let b=y,x=!m,S;t[14]!==b||t[15]!==i?(S={scope:i,onScopeChange:b},t[14]=b,t[15]=i,t[16]=S):S=t[16];let C;return t[17]!==v||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==x||t[22]!==S?(C=(0,j.jsx)(N,{provider:n,name:a,onRename:v,nameError:u,nameEditable:x,scopeControl:S}),t[17]=v,t[18]=a,t[19]=n,t[20]=u,t[21]=x,t[22]=S,t[23]=C):C=t[23],C}function H(e){let t=(0,k.c)(21),{provider:n,docName:r,name:i}=e,{_:a}=c(),o=T(),s=B(),[l,u]=(0,A.useState)(null),[d,g]=(0,A.useState)(!1),_;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==s?(_=async function(e){u(null);let t=await p({scope:`project`,fromName:i,toName:e});if(!t.ok){u(t.error),O.error(a({id:`sHrqDx`,values:{0:t.error}}));return}O.success(a({id:`_hPpdX`})),s(r,m(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=s,t[4]=_):_=t[4];let v=_,y;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==s||t[10]!==o?(y=async function(e){if(e===`project`||d)return;g(!0);let t=await f({name:i,fromScope:`project`,toScope:e});if(g(!1),!t.ok){O.error(a({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(a({id:`DhK_hZ`,values:{0:o[e],name:i,skipped:n}})):O.success(a({id:`UQMMvx`,values:{0:o[e],name:i}})),s(r,h(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=s,t[10]=o,t[11]=y):y=t[11];let b=y,x=!d,S;t[12]===b?S=t[13]:(S={scope:`project`,onScopeChange:b},t[12]=b,t[13]=S);let C;return t[14]!==v||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==x||t[19]!==S?(C=(0,j.jsx)(N,{provider:n,name:i,onRename:v,nameError:l,nameEditable:x,scopeControl:S}),t[14]=v,t[15]=i,t[16]=n,t[17]=l,t[18]=x,t[19]=S,t[20]=C):C=t[20],C}function U(e){let t=(0,k.c)(12),{provider:n,docName:r,folder:a,name:o}=e,{_:s}=c(),l=B(),[u,d]=(0,A.useState)(null),f;t[0]!==s||t[1]!==r||t[2]!==a||t[3]!==o||t[4]!==l?(f=async function(e){d(null);let t=await E({fromFolder:a,fromName:o,toFolder:a,toName:e});if(!t.ok){d(t.error),O.error(s({id:`gk_-qj`,values:{0:t.error}}));return}O.success(s({id:`YKLP_-`})),l(r,i(a,e))},t[0]=s,t[1]=r,t[2]=a,t[3]=o,t[4]=l,t[5]=f):f=t[5];let p=f,m;return t[6]!==a||t[7]!==p||t[8]!==o||t[9]!==n||t[10]!==u?(m=(0,j.jsx)(L,{provider:n,name:o,folder:a,onRename:p,nameError:u}),t[6]=a,t[7]=p,t[8]=o,t[9]=n,t[10]=u,t[11]=m):m=t[11],m}export{z as ManagedArtifactProperties};
|
|
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{ct as i,n as a,ot as o}from"./DocumentContext-ogFq9Apo.js";import{n as s,r as c}from"./dist-UKzQrqGt.js";import{n as l,t as u,u as d}from"./createLucideIcon-DkO1lL_8.js";import{c as f,s as p}from"./skills-api-ChqmqNEn.js";import{Er as m,Fr as h,Gt as g,Mt as _,St as v,xr as y}from"./dist-CurDB4OA.js";import{h as b,r as x,t as S}from"./PropertyPanel-DpYcGGW2.js";import{c as C,i as w,s as T}from"./workspace-paths-DGpjh0_R.js";import{i as E,t as D}from"./open-managed-artifact-tab-jUT5uxaf.js";import{n as O}from"./dist-DyPw7rC6.js";import{t as ee}from"./input-C1P6Hf22.js";import{t as te}from"./textarea-BdasFVsT.js";var ne=u(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),k=r(),A=e(t(),1),j=n(),M=[`name`];function N(e){let t=(0,k.c)(46),{provider:n,name:r,scopeControl:i,onRename:a,nameError:o,onNameDraftChange:u,nameEditable:f}=e,p=f===void 0?!0:f,{_:m}=c(),h=(0,A.useId)(),g=(0,A.useId)(),_=C(),[y,x]=(0,A.useState)(r),T,E;t[0]===r?(T=t[1],E=t[2]):(T=()=>x(r),E=[r],t[0]=r,t[1]=T,t[2]=E),(0,A.useEffect)(T,E);let D,O;t[3]===y?(D=t[4],O=t[5]):(O=y.trim(),D=O!==``&&!v.test(O),t[3]=y,t[4]=D,t[5]=O);let te=D,N;t[6]!==r||t[7]!==te||t[8]!==a||t[9]!==O?(N=function(){a&&(te||O===``||O===r||a(O))},t[6]=r,t[7]=te,t[8]=a,t[9]=O,t[10]=N):N=t[10];let F=N,I=te||!!o,L;t[11]!==m||t[12]!==i||t[13]!==g||t[14]!==_?(L=i?(0,j.jsx)(re,{icon:(0,j.jsx)(ne,{className:`size-3.5`}),label:m({id:`oCHfGC`}),htmlFor:g,children:(0,j.jsxs)(`fieldset`,{id:g,className:`m-0 inline-flex items-center gap-1 rounded-full border-0 bg-muted/60 p-0.5`,children:[(0,j.jsx)(`legend`,{className:`sr-only`,children:m({id:`KszKI_`})}),w.map(e=>{let t=i.scope===e;return(0,j.jsx)(l,{type:`button`,"aria-pressed":t,variant:`ghost`,size:`sm`,onClick:()=>{t||i.onScopeChange(e)},className:d(`h-6 rounded-full px-3 text-xs font-medium`,t?e===`global`?`bg-violet-700 text-white hover:bg-violet-700 hover:text-white`:`bg-sky-700 text-white hover:bg-sky-700 hover:text-white`:`text-muted-foreground hover:bg-transparent hover:text-foreground`),children:_[e]},e)})]})}):null,t[11]=m,t[12]=i,t[13]=g,t[14]=_,t[15]=L):L=t[15];let ie;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,j.jsx)(b,{className:`size-3.5`}),t[16]=ie):ie=t[16];let R;t[17]===m?R=t[18]:(R=m({id:`XmJfZT`}),t[17]=m,t[18]=R);let z=!p,B;t[19]===u?B=t[20]:(B=e=>{let t=e.target.value;x(t),u?.(t)},t[19]=u,t[20]=B);let V=I?`${h}-error`:void 0,H;t[21]!==F||t[22]!==y||t[23]!==h||t[24]!==I||t[25]!==B||t[26]!==V||t[27]!==z?(H=(0,j.jsx)(ee,{id:h,"data-testid":`skill-name-input`,value:y,readOnly:z,onChange:B,onBlur:F,onKeyDown:P,"aria-invalid":I,"aria-describedby":V,className:`h-7 rounded-sm border-transparent bg-transparent px-2 font-mono text-sm shadow-none focus-visible:border-transparent focus-visible:bg-muted focus-visible:ring-0 dark:bg-transparent`}),t[21]=F,t[22]=y,t[23]=h,t[24]=I,t[25]=B,t[26]=V,t[27]=z,t[28]=H):H=t[28];let U;t[29]!==o||t[30]!==h||t[31]!==I?(U=I?(0,j.jsx)(`p`,{id:`${h}-error`,className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`A50vr3`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`1hvhf0`})}),t[29]=o,t[30]=h,t[31]=I,t[32]=U):U=t[32];let W;t[33]!==h||t[34]!==H||t[35]!==U||t[36]!==R?(W=(0,j.jsxs)(re,{icon:ie,label:R,htmlFor:h,children:[H,U]}),t[33]=h,t[34]=H,t[35]=U,t[36]=R,t[37]=W):W=t[37];let G;t[38]!==W||t[39]!==L?(G=(0,j.jsxs)(`div`,{className:`editor-content-aligned gap-0.5 pt-4`,children:[L,W]}),t[38]=W,t[39]=L,t[40]=G):G=t[40];let K;t[41]===n?K=t[42]:(K=(0,j.jsx)(S,{provider:n,reservedKeys:M}),t[41]=n,t[42]=K);let q;return t[43]!==G||t[44]!==K?(q=(0,j.jsxs)(`div`,{className:`flex flex-col`,children:[G,K]}),t[43]=G,t[44]=K,t[45]=q):q=t[45],q}function P(e){e.key===`Enter`&&e.currentTarget.blur()}function re(e){let t=(0,k.c)(14),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,j.jsx)(`span`,{"aria-hidden":!0,className:`h-7 w-4 shrink-0`}),t[0]=o):o=t[0];let s;t[1]===n?s=t[2]:(s=(0,j.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:n}),t[1]=n,t[2]=s);let c;t[3]!==i||t[4]!==r?(c=(0,j.jsx)(`label`,{htmlFor:i,className:`flex h-7 w-32 shrink-0 items-center truncate px-2 text-sm text-muted-foreground`,children:r}),t[3]=i,t[4]=r,t[5]=c):c=t[5];let l;t[6]!==s||t[7]!==c?(l=(0,j.jsxs)(`div`,{className:`flex items-center gap-1`,children:[s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===a?u=t[10]:(u=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[9]=a,t[10]=u);let d;return t[11]!==l||t[12]!==u?(d=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[o,l,u]}),t[11]=l,t[12]=u,t[13]=d):d=t[13],d}function F(e,t){let n=e.current().map[t];return typeof n==`string`?n:``}function I(e,t){let n=(0,k.c)(15),[r,i]=(0,A.useState)(null),a;n[0]!==t||n[1]!==e?(a=()=>{let n=g(e),r=F(n,t);return n.dispose(),r},n[0]=t,n[1]=e,n[2]=a):a=n[2];let[o,s]=(0,A.useState)(a),c=(0,A.useRef)(!1),l,u;n[3]!==t||n[4]!==e?(l=()=>{let n=g(e);i(n),s(F(n,t));let r=n.subscribe(()=>{c.current||s(F(n,t))});return()=>{r(),n.dispose(),i(e=>e===n?null:e)}},u=[e,t],n[3]=t,n[4]=e,n[5]=l,n[6]=u):(l=n[5],u=n[6]),(0,A.useEffect)(l,u);let d;n[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=()=>{c.current=!0},n[7]=d):d=n[7];let f;n[8]!==r||n[9]!==t||n[10]!==o?(f=()=>{c.current=!1,r&&o!==F(r,t)&&r.patch({[t]:o})},n[8]=r,n[9]=t,n[10]=o,n[11]=f):f=n[11];let p;return n[12]!==f||n[13]!==o?(p={value:o,setValue:s,onFocus:d,onBlur:f},n[12]=f,n[13]=o,n[14]=p):p=n[14],p}function L(e){let t=(0,k.c)(76),{provider:n,name:r,folder:i,onRename:a,nameError:o}=e,{_:l}=c(),u=(0,A.useId)(),d=(0,A.useId)(),f=(0,A.useId)(),p=(0,A.useId)(),m=I(n,`title`),h=I(n,`description`),[g,v]=(0,A.useState)(r),y,S;t[0]===r?(y=t[1],S=t[2]):(y=()=>v(r),S=[r],t[0]=r,t[1]=y,t[2]=S),(0,A.useEffect)(y,S);let C,w;t[3]===g?(C=t[4],w=t[5]):(w=g.trim(),C=w!==``&&!_.test(w),t[3]=g,t[4]=C,t[5]=w);let T=C,E;t[6]!==r||t[7]!==T||t[8]!==a||t[9]!==w?(E=function(){a&&(T||w===``||w===r||a(w))},t[6]=r,t[7]=T,t[8]=a,t[9]=w,t[10]=E):E=t[10];let D=E,O=T||!!o,M;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,j.jsx)(s,{id:`l_UFPv`}),t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,j.jsx)(ne,{className:`size-3.5`}),t[12]=N):N=t[12];let P;t[13]===l?P=t[14]:(P=l({id:`ugoTXs`}),t[13]=l,t[14]=P);let re=i||`/`,F;t[15]!==p||t[16]!==re?(F=(0,j.jsx)(ee,{id:p,value:re,readOnly:!0,className:`h-8 border-input bg-transparent px-2 font-mono text-muted-foreground shadow-none`}),t[15]=p,t[16]=re,t[17]=F):F=t[17];let L;t[18]!==p||t[19]!==P||t[20]!==F?(L=(0,j.jsx)(R,{icon:N,label:P,htmlFor:p,children:F}),t[18]=p,t[19]=P,t[20]=F,t[21]=L):L=t[21];let z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,j.jsx)(b,{className:`size-3.5`}),t[22]=z):z=t[22];let B;t[23]===l?B=t[24]:(B=l({id:`XmJfZT`}),t[23]=l,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>v(e.target.value),t[25]=V):V=t[25];let H;t[26]!==D||t[27]!==g||t[28]!==u||t[29]!==O?(H=(0,j.jsx)(ee,{id:u,"data-testid":`template-name-input`,value:g,onChange:V,onBlur:D,onKeyDown:ie,"aria-invalid":O,className:`h-8 border-input bg-transparent px-2 font-mono shadow-none focus-visible:bg-muted/30`}),t[26]=D,t[27]=g,t[28]=u,t[29]=O,t[30]=H):H=t[30];let U;t[31]!==o||t[32]!==O?(U=O?(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-destructive`,children:o||(0,j.jsx)(s,{id:`lI0Td2`,components:{0:(0,j.jsx)(`code`,{className:`font-mono`}),1:(0,j.jsx)(`code`,{className:`font-mono`})}})}):(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`QfFBdJ`})}),t[31]=o,t[32]=O,t[33]=U):U=t[33];let W;t[34]!==u||t[35]!==B||t[36]!==H||t[37]!==U?(W=(0,j.jsxs)(R,{icon:z,label:B,htmlFor:u,children:[H,U]}),t[34]=u,t[35]=B,t[36]=H,t[37]=U,t[38]=W):W=t[38];let G;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,j.jsx)(b,{className:`size-3.5`}),t[39]=G):G=t[39];let K;t[40]===l?K=t[41]:(K=l({id:`q7F5am`}),t[40]=l,t[41]=K);let q;t[42]===m?q=t[43]:(q=e=>m.setValue(e.target.value),t[42]=m,t[43]=q);let J;t[44]!==q||t[45]!==m.onBlur||t[46]!==m.onFocus||t[47]!==m.value||t[48]!==d?(J=(0,j.jsx)(ee,{id:d,"data-testid":`template-title-input`,value:m.value,onChange:q,onFocus:m.onFocus,onBlur:m.onBlur,className:`h-8 border-input bg-transparent px-2 shadow-none focus-visible:bg-muted/30`}),t[44]=q,t[45]=m.onBlur,t[46]=m.onFocus,t[47]=m.value,t[48]=d,t[49]=J):J=t[49];let ae;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`5e1Dri`})}),t[50]=ae):ae=t[50];let Y;t[51]!==K||t[52]!==J||t[53]!==d?(Y=(0,j.jsxs)(R,{icon:G,label:K,htmlFor:d,children:[J,ae]}),t[51]=K,t[52]=J,t[53]=d,t[54]=Y):Y=t[54];let oe;t[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,j.jsx)(b,{className:`size-3.5`}),t[55]=oe):oe=t[55];let X;t[56]===l?X=t[57]:(X=l({id:`eTsJYJ`}),t[56]=l,t[57]=X);let Z;t[58]===h?Z=t[59]:(Z=e=>h.setValue(e.target.value),t[58]=h,t[59]=Z);let Q;t[60]!==h.onBlur||t[61]!==h.onFocus||t[62]!==h.value||t[63]!==f||t[64]!==Z?(Q=(0,j.jsx)(te,{id:f,"data-testid":`template-description-input`,value:h.value,onChange:Z,onFocus:h.onFocus,onBlur:h.onBlur,className:`min-h-16 resize-none border-input bg-transparent px-2 py-1.5 shadow-none focus-visible:bg-muted/30`}),t[60]=h.onBlur,t[61]=h.onFocus,t[62]=h.value,t[63]=f,t[64]=Z,t[65]=Q):Q=t[65];let se;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,j.jsx)(`p`,{className:`px-1 pt-0.5 text-[11px] text-muted-foreground`,children:(0,j.jsx)(s,{id:`sFhaTJ`})}),t[66]=se):se=t[66];let $;t[67]!==f||t[68]!==X||t[69]!==Q?($=(0,j.jsxs)(R,{icon:oe,label:X,htmlFor:f,children:[Q,se]}),t[67]=f,t[68]=X,t[69]=Q,t[70]=$):$=t[70];let ce;return t[71]!==L||t[72]!==W||t[73]!==Y||t[74]!==$?(ce=(0,j.jsxs)(x,{title:M,className:`pt-4 pb-2`,children:[L,W,Y,$]}),t[71]=L,t[72]=W,t[73]=Y,t[74]=$,t[75]=ce):ce=t[75],ce}function ie(e){e.key===`Enter`&&e.currentTarget.blur()}function R(e){let t=(0,k.c)(13),{icon:n,label:r,htmlFor:i,children:a}=e,o;t[0]===n?o=t[1]:(o=(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:n}),t[0]=n,t[1]=o);let s;t[2]===r?s=t[3]:(s=(0,j.jsx)(`span`,{className:`truncate text-muted-foreground`,children:r}),t[2]=r,t[3]=s);let c;t[4]!==i||t[5]!==o||t[6]!==s?(c=(0,j.jsxs)(`label`,{htmlFor:i,className:`flex w-32 shrink-0 items-center gap-1 pt-1.5`,children:[o,s]}),t[4]=i,t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===a?l=t[9]:(l=(0,j.jsx)(`div`,{className:`min-w-0 flex-1`,children:a}),t[8]=a,t[9]=l);let u;return t[10]!==c||t[11]!==l?(u=(0,j.jsxs)(`div`,{className:`flex items-start gap-1 py-0.5`,children:[c,l]}),t[10]=c,t[11]=l,t[12]=u):u=t[12],u}function z(e){let t=(0,k.c)(18),{docName:n,provider:r}=e,i;t[0]===n?i=t[1]:(i=y(n),t[0]=n,t[1]=i);let a=i;if(a?.kind===`skill`){let e;return t[2]!==n||t[3]!==a.name||t[4]!==a.scope||t[5]!==r?(e=(0,j.jsx)(V,{provider:r,docName:n,scope:a.scope,name:a.name}),t[2]=n,t[3]=a.name,t[4]=a.scope,t[5]=r,t[6]=e):e=t[6],e}if(a?.kind===`template`){let e;return t[7]!==n||t[8]!==a.folder||t[9]!==a.name||t[10]!==r?(e=(0,j.jsx)(U,{provider:r,docName:n,folder:a.folder,name:a.name}),t[7]=n,t[8]=a.folder,t[9]=a.name,t[10]=r,t[11]=e):e=t[11],e}let s;t[12]===n?s=t[13]:(s=o(n),t[12]=n,t[13]=s);let c=s;if(c){let e;return t[14]!==n||t[15]!==c||t[16]!==r?(e=(0,j.jsx)(H,{provider:r,docName:n,name:c}),t[14]=n,t[15]=c,t[16]=r,t[17]=e):e=t[17],e}return null}function B(){let e=(0,k.c)(2),{closeDocument:t}=a(),n;return e[0]===t?n=e[1]:(n=(e,n)=>{e!==n&&(D(n),t(e))},e[0]=t,e[1]=n),n}function V(e){let t=(0,k.c)(24),{provider:n,docName:r,scope:i,name:a}=e,{_:o}=c(),s=T(),l=B(),[u,d]=(0,A.useState)(null),[m,g]=(0,A.useState)(!1),_;t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==l||t[4]!==i?(_=async function(e){d(null);let t=await p({scope:i,fromName:a,toName:e});if(!t.ok){d(t.error),O.error(o({id:`sHrqDx`,values:{0:t.error}}));return}O.success(o({id:`_hPpdX`})),l(r,h(i,e))},t[0]=o,t[1]=r,t[2]=a,t[3]=l,t[4]=i,t[5]=_):_=t[5];let v=_,y;t[6]!==o||t[7]!==r||t[8]!==m||t[9]!==a||t[10]!==l||t[11]!==i||t[12]!==s?(y=async function(e){if(e===i||m)return;g(!0);let t=await f({name:a,fromScope:i,toScope:e});if(g(!1),!t.ok){O.error(o({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(o({id:`DhK_hZ`,values:{0:s[e],name:a,skipped:n}})):O.success(o({id:`UQMMvx`,values:{0:s[e],name:a}})),l(r,h(e,a))},t[6]=o,t[7]=r,t[8]=m,t[9]=a,t[10]=l,t[11]=i,t[12]=s,t[13]=y):y=t[13];let b=y,x=!m,S;t[14]!==b||t[15]!==i?(S={scope:i,onScopeChange:b},t[14]=b,t[15]=i,t[16]=S):S=t[16];let C;return t[17]!==v||t[18]!==a||t[19]!==n||t[20]!==u||t[21]!==x||t[22]!==S?(C=(0,j.jsx)(N,{provider:n,name:a,onRename:v,nameError:u,nameEditable:x,scopeControl:S}),t[17]=v,t[18]=a,t[19]=n,t[20]=u,t[21]=x,t[22]=S,t[23]=C):C=t[23],C}function H(e){let t=(0,k.c)(21),{provider:n,docName:r,name:i}=e,{_:a}=c(),o=T(),s=B(),[l,u]=(0,A.useState)(null),[d,g]=(0,A.useState)(!1),_;t[0]!==a||t[1]!==r||t[2]!==i||t[3]!==s?(_=async function(e){u(null);let t=await p({scope:`project`,fromName:i,toName:e});if(!t.ok){u(t.error),O.error(a({id:`sHrqDx`,values:{0:t.error}}));return}O.success(a({id:`_hPpdX`})),s(r,m(e))},t[0]=a,t[1]=r,t[2]=i,t[3]=s,t[4]=_):_=t[4];let v=_,y;t[5]!==a||t[6]!==r||t[7]!==d||t[8]!==i||t[9]!==s||t[10]!==o?(y=async function(e){if(e===`project`||d)return;g(!0);let t=await f({name:i,fromScope:`project`,toScope:e});if(g(!1),!t.ok){O.error(a({id:`07eGJB`,values:{0:t.error}}));return}let n=t.skippedBinaryFiles?.length??0;n>0?O.warning(a({id:`DhK_hZ`,values:{0:o[e],name:i,skipped:n}})):O.success(a({id:`UQMMvx`,values:{0:o[e],name:i}})),s(r,h(e,i))},t[5]=a,t[6]=r,t[7]=d,t[8]=i,t[9]=s,t[10]=o,t[11]=y):y=t[11];let b=y,x=!d,S;t[12]===b?S=t[13]:(S={scope:`project`,onScopeChange:b},t[12]=b,t[13]=S);let C;return t[14]!==v||t[15]!==i||t[16]!==n||t[17]!==l||t[18]!==x||t[19]!==S?(C=(0,j.jsx)(N,{provider:n,name:i,onRename:v,nameError:l,nameEditable:x,scopeControl:S}),t[14]=v,t[15]=i,t[16]=n,t[17]=l,t[18]=x,t[19]=S,t[20]=C):C=t[20],C}function U(e){let t=(0,k.c)(12),{provider:n,docName:r,folder:a,name:o}=e,{_:s}=c(),l=B(),[u,d]=(0,A.useState)(null),f;t[0]!==s||t[1]!==r||t[2]!==a||t[3]!==o||t[4]!==l?(f=async function(e){d(null);let t=await E({fromFolder:a,fromName:o,toFolder:a,toName:e});if(!t.ok){d(t.error),O.error(s({id:`gk_-qj`,values:{0:t.error}}));return}O.success(s({id:`YKLP_-`})),l(r,i(a,e))},t[0]=s,t[1]=r,t[2]=a,t[3]=o,t[4]=l,t[5]=f):f=t[5];let p=f,m;return t[6]!==a||t[7]!==p||t[8]!==o||t[9]!==n||t[10]!==u?(m=(0,j.jsx)(L,{provider:n,name:o,folder:a,onRename:p,nameError:u}),t[6]=a,t[7]=p,t[8]=o,t[9]=n,t[10]=u,t[11]=m):m=t[11],m}export{z as ManagedArtifactProperties};
|