@skaile/workspaces 5.3.0 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +8 -1
- package/dist/{asset-feeds-VIZXYDAO.js → asset-feeds-KTFUB7EX.js} +7 -7
- package/dist/{asset-feeds-VIZXYDAO.js.map → asset-feeds-KTFUB7EX.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +3 -3
- package/dist/asset-manager/index.js +6 -6
- package/dist/asset-manager/installer.js +4 -4
- package/dist/asset-manager/src/index.d.ts +19 -0
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +7 -0
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +5 -5
- package/dist/bridge/drivers/codex.js +5 -5
- package/dist/bridge/drivers/continue.js +6 -6
- package/dist/bridge/drivers/echo.js +1 -1
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +6 -6
- package/dist/bridge/drivers/omp.js +2 -2
- package/dist/bridge/drivers/opencode.js +6 -6
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +6 -6
- package/dist/{chunk-ZCSFGGLG.js → chunk-2D2P7HSR.js} +4 -4
- package/dist/{chunk-ZCSFGGLG.js.map → chunk-2D2P7HSR.js.map} +1 -1
- package/dist/{chunk-DECPI7DN.js → chunk-3665M43C.js} +5 -5
- package/dist/{chunk-DECPI7DN.js.map → chunk-3665M43C.js.map} +1 -1
- package/dist/{chunk-6GBQND2F.js → chunk-3JHFFIQ6.js} +4 -4
- package/dist/{chunk-6GBQND2F.js.map → chunk-3JHFFIQ6.js.map} +1 -1
- package/dist/{chunk-VLEWVR44.js → chunk-5Y3L7XWH.js} +10 -10
- package/dist/{chunk-VLEWVR44.js.map → chunk-5Y3L7XWH.js.map} +1 -1
- package/dist/{chunk-K2JVODQD.js → chunk-75EX5GY4.js} +5 -5
- package/dist/{chunk-K2JVODQD.js.map → chunk-75EX5GY4.js.map} +1 -1
- package/dist/{chunk-3ZVSINEV.js → chunk-AC2N5BRP.js} +44 -12
- package/dist/chunk-AC2N5BRP.js.map +1 -0
- package/dist/{chunk-OMD4TAJX.js → chunk-C4GF7RSQ.js} +3 -3
- package/dist/{chunk-OMD4TAJX.js.map → chunk-C4GF7RSQ.js.map} +1 -1
- package/dist/{chunk-QHIMMBJO.js → chunk-CODXK5L5.js} +4 -4
- package/dist/{chunk-QHIMMBJO.js.map → chunk-CODXK5L5.js.map} +1 -1
- package/dist/{chunk-LM5XEFNS.js → chunk-DPMKI26Y.js} +3 -3
- package/dist/{chunk-LM5XEFNS.js.map → chunk-DPMKI26Y.js.map} +1 -1
- package/dist/{chunk-YXNYBUQY.js → chunk-EJYZ3MKJ.js} +4 -4
- package/dist/{chunk-YXNYBUQY.js.map → chunk-EJYZ3MKJ.js.map} +1 -1
- package/dist/chunk-ES2FXWQ4.js +22 -0
- package/dist/chunk-ES2FXWQ4.js.map +1 -0
- package/dist/{chunk-D63AJVBW.js → chunk-G2O2AARG.js} +13 -13
- package/dist/{chunk-D63AJVBW.js.map → chunk-G2O2AARG.js.map} +1 -1
- package/dist/{chunk-FXN4PLRO.js → chunk-G474PBUQ.js} +3 -3
- package/dist/{chunk-FXN4PLRO.js.map → chunk-G474PBUQ.js.map} +1 -1
- package/dist/{chunk-7L4WFH3Y.js → chunk-JBPG5KQC.js} +3 -3
- package/dist/{chunk-7L4WFH3Y.js.map → chunk-JBPG5KQC.js.map} +1 -1
- package/dist/{chunk-A223FDDC.js → chunk-K2NUT3HO.js} +6 -6
- package/dist/{chunk-A223FDDC.js.map → chunk-K2NUT3HO.js.map} +1 -1
- package/dist/{chunk-ERCSHLTF.js → chunk-LCULZ4ED.js} +3 -3
- package/dist/{chunk-ERCSHLTF.js.map → chunk-LCULZ4ED.js.map} +1 -1
- package/dist/{chunk-FZGL7Z52.js → chunk-LFEGIZTW.js} +2 -2
- package/dist/{chunk-FZGL7Z52.js.map → chunk-LFEGIZTW.js.map} +1 -1
- package/dist/{chunk-WGNFDLHT.js → chunk-MMC24L2W.js} +84 -20
- package/dist/chunk-MMC24L2W.js.map +1 -0
- package/dist/{chunk-ZDMGMWK6.js → chunk-N3Y43LMZ.js} +30 -21
- package/dist/chunk-N3Y43LMZ.js.map +1 -0
- package/dist/chunk-NESV47MF.js +20 -0
- package/dist/chunk-NESV47MF.js.map +1 -0
- package/dist/{chunk-KBAE7PU7.js → chunk-ORUHADS6.js} +9 -6
- package/dist/chunk-ORUHADS6.js.map +1 -0
- package/dist/{chunk-TR7KFBIO.js → chunk-P6KFWTGP.js} +5 -5
- package/dist/{chunk-TR7KFBIO.js.map → chunk-P6KFWTGP.js.map} +1 -1
- package/dist/{chunk-WGN7Z36G.js → chunk-R4G7XI7A.js} +18 -4
- package/dist/chunk-R4G7XI7A.js.map +1 -0
- package/dist/{chunk-YTJZQ4HY.js → chunk-SNVOASTL.js} +3 -3
- package/dist/{chunk-YTJZQ4HY.js.map → chunk-SNVOASTL.js.map} +1 -1
- package/dist/{chunk-AWGQVAC5.js → chunk-UFS3FEBA.js} +3 -3
- package/dist/{chunk-AWGQVAC5.js.map → chunk-UFS3FEBA.js.map} +1 -1
- package/dist/{chunk-OOKFZW6H.js → chunk-UHLBDAJR.js} +7 -7
- package/dist/{chunk-OOKFZW6H.js.map → chunk-UHLBDAJR.js.map} +1 -1
- package/dist/{chunk-FTYM4VRZ.js → chunk-V7VDSFPS.js} +2 -2
- package/dist/{chunk-FTYM4VRZ.js.map → chunk-V7VDSFPS.js.map} +1 -1
- package/dist/{chunk-BUZ3K2PT.js → chunk-WHSQSVN2.js} +2 -2
- package/dist/{chunk-BUZ3K2PT.js.map → chunk-WHSQSVN2.js.map} +1 -1
- package/dist/{chunk-CZ35I4RK.js → chunk-X4GO3GJZ.js} +3 -3
- package/dist/{chunk-CZ35I4RK.js.map → chunk-X4GO3GJZ.js.map} +1 -1
- package/dist/{chunk-4257Q2LH.js → chunk-XBM5ND55.js} +6 -6
- package/dist/{chunk-4257Q2LH.js.map → chunk-XBM5ND55.js.map} +1 -1
- package/dist/{chunk-TVFSA5IQ.js → chunk-Y4QWHIHB.js} +4 -4
- package/dist/{chunk-TVFSA5IQ.js.map → chunk-Y4QWHIHB.js.map} +1 -1
- package/dist/{chunk-4SSKKFDF.js → chunk-YK7WJSTD.js} +3 -3
- package/dist/{chunk-4SSKKFDF.js.map → chunk-YK7WJSTD.js.map} +1 -1
- package/dist/cli/index.js +377 -176
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +33 -3
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +14 -0
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/helpers.d.ts +10 -0
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/cli/src/setup.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +21 -0
- package/dist/cli/src/skill-checks.d.ts.map +1 -0
- package/dist/cli/src/spinner.d.ts +24 -0
- package/dist/cli/src/spinner.d.ts.map +1 -0
- package/dist/connectors/config.js +2 -2
- package/dist/connectors/index.js +9 -9
- package/dist/{connectors-Z2FUGAJU.js → connectors-MPYCSQNG.js} +12 -12
- package/dist/{connectors-Z2FUGAJU.js.map → connectors-MPYCSQNG.js.map} +1 -1
- package/dist/core/index.js +3 -3
- package/dist/core/runtime-assets.js +2 -2
- package/dist/core/src/repo-manager.d.ts +7 -0
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/workspace-config.js +1 -1
- package/dist/deploy/index.js +3 -3
- package/dist/{ensure-sources-3IH5XHAP.js → ensure-sources-QFRA46DJ.js} +9 -9
- package/dist/{ensure-sources-3IH5XHAP.js.map → ensure-sources-QFRA46DJ.js.map} +1 -1
- package/dist/factory-assets/README.md +2 -2
- package/dist/factory-assets/connectors/box.js +9 -9
- package/dist/factory-assets/connectors/deploy.js +9 -9
- package/dist/factory-assets/connectors/devserver.js +9 -9
- package/dist/factory-assets/connectors/flow/adapter.js +9 -9
- package/dist/factory-assets/connectors/flow/engine.js +4 -4
- package/dist/factory-assets/connectors/flow/run-flow.js +10 -10
- package/dist/factory-assets/connectors/flow.js +9 -9
- package/dist/factory-assets/connectors/git.js +9 -9
- package/dist/factory-assets/connectors/gmail.js +9 -9
- package/dist/factory-assets/connectors/googledrive.js +9 -9
- package/dist/factory-assets/connectors/local.js +9 -9
- package/dist/factory-assets/connectors/mattermost.js +9 -9
- package/dist/factory-assets/connectors/memory.js +9 -9
- package/dist/factory-assets/connectors/minio.js +9 -9
- package/dist/factory-assets/connectors/postgres.js +9 -9
- package/dist/factory-assets/connectors/s3.js +9 -9
- package/dist/factory-assets/connectors/sharepoint.js +9 -9
- package/dist/factory-assets/connectors/sqlite.js +9 -9
- package/dist/factory-assets/connectors/static-server.js +9 -9
- package/dist/factory-assets/connectors/tunnel.js +9 -9
- package/dist/factory-assets/connectors/webdav.js +9 -9
- package/dist/factory-assets/connectors/xstate-store.js +9 -9
- package/dist/factory-assets/connectors/xstate.js +9 -9
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +17 -15
- package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +20 -17
- package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +82 -71
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +17 -11
- package/dist/factory-assets/skills/skailify/SKILL.md +8 -4
- package/dist/{flows-64OAOYLP.js → flows-KCARGXRT.js} +6 -6
- package/dist/{flows-64OAOYLP.js.map → flows-KCARGXRT.js.map} +1 -1
- package/dist/{helpers-HV5Y57CY.js → helpers-PSROT7CU.js} +9 -9
- package/dist/{helpers-HV5Y57CY.js.map → helpers-PSROT7CU.js.map} +1 -1
- package/dist/library/index.js +4 -4
- package/dist/library/src/local/install-library-asset.d.ts +3 -2
- package/dist/library/src/local/install-library-asset.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +11 -2
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/{library-publish-TVS3WQ4C.js → library-publish-YAI7WOXC.js} +36 -18
- package/dist/library-publish-YAI7WOXC.js.map +1 -0
- package/dist/{open-library-AT6RYQ5M.js → open-library-Z5NJU4Z5.js} +12 -12
- package/dist/{open-library-AT6RYQ5M.js.map → open-library-Z5NJU4Z5.js.map} +1 -1
- package/dist/{open-registry-F2Z4OLXJ.js → open-registry-TYUVN5SG.js} +8 -8
- package/dist/{open-registry-F2Z4OLXJ.js.map → open-registry-TYUVN5SG.js.map} +1 -1
- package/dist/{paths-P7ZXMDCX.js → paths-HKAXUR3W.js} +6 -6
- package/dist/{paths-P7ZXMDCX.js.map → paths-HKAXUR3W.js.map} +1 -1
- package/dist/{plugin-store-27KGLW4S.js → plugin-store-N6SI2TYM.js} +5 -5
- package/dist/{plugin-store-27KGLW4S.js.map → plugin-store-N6SI2TYM.js.map} +1 -1
- package/dist/plugins/src/catalog-source.d.ts +7 -0
- package/dist/plugins/src/catalog-source.d.ts.map +1 -1
- package/dist/{project-J2EROMBW.js → project-SVS4UMGL.js} +11 -10
- package/dist/{project-J2EROMBW.js.map → project-SVS4UMGL.js.map} +1 -1
- package/dist/resolver/index.js +3 -3
- package/dist/runner/index.js +15 -15
- package/dist/sdk/asset-manager.js +6 -6
- package/dist/sdk/bridge.js +6 -6
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/flow.js +4 -4
- package/dist/sdk/index.js +15 -15
- package/dist/sdk/resolver.js +3 -3
- package/dist/sdk/runner.js +15 -15
- package/dist/{setup-IFGA4NQA.js → setup-IOEZGJNC.js} +16 -15
- package/dist/setup-IOEZGJNC.js.map +1 -0
- package/dist/{skills-3T55L4YT.js → skills-HW6I6ZZ7.js} +5 -5
- package/dist/{skills-3T55L4YT.js.map → skills-HW6I6ZZ7.js.map} +1 -1
- package/dist/{source-HEAE43IL.js → source-OKRJT53H.js} +13 -13
- package/dist/{source-HEAE43IL.js.map → source-OKRJT53H.js.map} +1 -1
- package/dist/{source-manifest-publish-SCAHAYSQ.js → source-manifest-publish-MILEQDRD.js} +15 -15
- package/dist/{source-manifest-publish-SCAHAYSQ.js.map → source-manifest-publish-MILEQDRD.js.map} +1 -1
- package/dist/tui/index.js +15 -15
- package/dist/workspace-plugin/adapters/mcp.js +12 -12
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3ZVSINEV.js.map +0 -1
- package/dist/chunk-KBAE7PU7.js.map +0 -1
- package/dist/chunk-WGN7Z36G.js.map +0 -1
- package/dist/chunk-WGNFDLHT.js.map +0 -1
- package/dist/chunk-ZDMGMWK6.js.map +0 -1
- package/dist/library-publish-TVS3WQ4C.js.map +0 -1
- package/dist/setup-IFGA4NQA.js.map +0 -1
package/dist/cli/index.js
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-
|
|
3
|
-
import { makeSourceCommand, syncProjectSources } from '../chunk-
|
|
4
|
-
import { AI_RESOURCES } from '../chunk-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-3665M43C.js';
|
|
3
|
+
import { makeSourceCommand, syncProjectSources } from '../chunk-5Y3L7XWH.js';
|
|
4
|
+
import { AI_RESOURCES } from '../chunk-Y4QWHIHB.js';
|
|
5
|
+
import { checkSkillManifest } from '../chunk-ES2FXWQ4.js';
|
|
6
|
+
import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, assetEntryRef, refFor } from '../chunk-EJYZ3MKJ.js';
|
|
7
|
+
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-N3Y43LMZ.js';
|
|
8
|
+
import { createSpinner } from '../chunk-NESV47MF.js';
|
|
9
|
+
import { openCatalogSource, openLibraryManager, openLibrary } from '../chunk-P6KFWTGP.js';
|
|
10
|
+
import { logErr, S, logOk, logInfo, logWarn, TARGET_DEFAULT_HINT, deferredWarnings, warnLegacyClaudeCopies, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-R4G7XI7A.js';
|
|
11
|
+
import { createFullRegistry } from '../chunk-2D2P7HSR.js';
|
|
10
12
|
import { LocalSecretsProvider } from '../chunk-HTKZ4AOW.js';
|
|
11
|
-
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-
|
|
12
|
-
import { buildClaudePluginFiles } from '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
13
|
+
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-G2O2AARG.js';
|
|
14
|
+
import { buildClaudePluginFiles } from '../chunk-LFEGIZTW.js';
|
|
15
|
+
import '../chunk-CODXK5L5.js';
|
|
16
|
+
import '../chunk-WHSQSVN2.js';
|
|
15
17
|
import '../chunk-R6O6YWU7.js';
|
|
16
18
|
import '../chunk-GCYD4EGY.js';
|
|
17
19
|
import '../chunk-JELTQ4H7.js';
|
|
18
20
|
import '../chunk-4ZTPYIBE.js';
|
|
19
|
-
import '../chunk-
|
|
21
|
+
import '../chunk-SNVOASTL.js';
|
|
20
22
|
import '../chunk-X5YPJV4N.js';
|
|
21
23
|
import '../chunk-O7SG5PC2.js';
|
|
22
24
|
import '../chunk-7QBNJTTQ.js';
|
|
@@ -25,47 +27,47 @@ import '../chunk-5LKOAX7I.js';
|
|
|
25
27
|
import '../chunk-32NA4TVC.js';
|
|
26
28
|
import '../chunk-W3UDISS2.js';
|
|
27
29
|
import '../chunk-HCYS7GFP.js';
|
|
28
|
-
import { runFlow, resumeFlow } from '../chunk-
|
|
30
|
+
import { runFlow, resumeFlow } from '../chunk-XBM5ND55.js';
|
|
29
31
|
import '../chunk-4R6DROGN.js';
|
|
30
32
|
import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-JAJG4G5E.js';
|
|
31
33
|
import '../chunk-JKWU6ULI.js';
|
|
32
34
|
import '../chunk-CT6NQSA4.js';
|
|
33
|
-
import '../chunk-
|
|
35
|
+
import '../chunk-UHLBDAJR.js';
|
|
34
36
|
import '../chunk-QMWMSZQ4.js';
|
|
35
|
-
import '../chunk-
|
|
36
|
-
import '../chunk-
|
|
37
|
+
import '../chunk-X4GO3GJZ.js';
|
|
38
|
+
import '../chunk-JBPG5KQC.js';
|
|
37
39
|
import '../chunk-LAI7X6I2.js';
|
|
38
40
|
import '../chunk-EINLFFP6.js';
|
|
39
41
|
import '../chunk-LOO5CB5M.js';
|
|
40
42
|
import '../chunk-BNUZEYC3.js';
|
|
41
|
-
import '../chunk-
|
|
43
|
+
import '../chunk-LCULZ4ED.js';
|
|
42
44
|
import '../chunk-XBSQ4KMC.js';
|
|
43
45
|
import '../chunk-YROR332M.js';
|
|
44
|
-
import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-
|
|
46
|
+
import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-V7VDSFPS.js';
|
|
45
47
|
import '../chunk-6E6PKKAD.js';
|
|
46
48
|
import '../chunk-IFGTRL2I.js';
|
|
47
|
-
import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-
|
|
49
|
+
import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-DPMKI26Y.js';
|
|
48
50
|
import '../chunk-37FTLYFP.js';
|
|
49
51
|
import '../chunk-QZLWJETK.js';
|
|
50
52
|
import '../chunk-XUUYAS3Z.js';
|
|
51
53
|
import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-NFGRW3L7.js';
|
|
52
54
|
import '../chunk-QCI6D7E4.js';
|
|
53
55
|
import '../chunk-K2K7OF4P.js';
|
|
54
|
-
import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-
|
|
55
|
-
import { cloneOrInitGitRepo, ensureGitRepo, setManifestPublisher, syncManifestWithDisk, isGitRepo, assertManifestEditable, installLibraryAsset, missingRootAssets, stampManifestPublisher, upsertManifestAsset, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-
|
|
56
|
+
import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-MMC24L2W.js';
|
|
57
|
+
import { cloneOrInitGitRepo, ensureGitRepo, setManifestPublisher, syncManifestWithDisk, isGitRepo, assertManifestEditable, installLibraryAsset, missingRootAssets, stampManifestPublisher, upsertManifestAsset, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-AC2N5BRP.js';
|
|
56
58
|
import { parseManifestFile } from '../chunk-Y7UBRRKG.js';
|
|
57
59
|
import '../chunk-VKSA2CDJ.js';
|
|
58
60
|
import '../chunk-R7FOF242.js';
|
|
59
61
|
import '../chunk-ZDKJHQY2.js';
|
|
60
|
-
import '../chunk-
|
|
62
|
+
import '../chunk-75EX5GY4.js';
|
|
61
63
|
import '../chunk-CGYEHQOX.js';
|
|
62
|
-
import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-
|
|
64
|
+
import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, globalInstallDir, GLOBAL_INSTALL_DIR_NAME, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile, aiResourceRoots } from '../chunk-3JHFFIQ6.js';
|
|
63
65
|
import '../chunk-4GY63JU6.js';
|
|
64
|
-
import { factoryAssetRoots } from '../chunk-
|
|
66
|
+
import { factoryAssetRoots } from '../chunk-YK7WJSTD.js';
|
|
65
67
|
import '../chunk-XGIS325V.js';
|
|
66
68
|
import { DEFAULT_DRIVER_ID, DRIVER_DEFAULTS } from '../chunk-5BEFNLOR.js';
|
|
67
69
|
import { findKindDirs } from '../chunk-A2ULN3KX.js';
|
|
68
|
-
import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-
|
|
70
|
+
import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-ORUHADS6.js';
|
|
69
71
|
import { globalCacheRoot, globalSkaileDir, userConfigPath } from '../chunk-MFHKHXDE.js';
|
|
70
72
|
import { SUPPORTED_DRIVER_TARGETS } from '../chunk-TOSHZX4C.js';
|
|
71
73
|
import { loadSkPublishManifest, SKAILE_MANIFEST_FILENAME, decodeSkaileManifest } from '../chunk-SR4RFKHM.js';
|
|
@@ -80,7 +82,7 @@ import '../chunk-BOFL7GIF.js';
|
|
|
80
82
|
import '../chunk-KTBKW2FI.js';
|
|
81
83
|
import '../chunk-UQ6LFBPZ.js';
|
|
82
84
|
import '../chunk-TNWXGHLD.js';
|
|
83
|
-
import { validatePreset
|
|
85
|
+
import { validatePreset } from '../chunk-5CYEWBPB.js';
|
|
84
86
|
import '../chunk-NSBPE2FW.js';
|
|
85
87
|
import * as fs12 from 'fs';
|
|
86
88
|
import fs12__default, { readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, rmSync, readdirSync, statSync } from 'fs';
|
|
@@ -89,7 +91,7 @@ import path36__default, { resolve, join } from 'path';
|
|
|
89
91
|
import { fileURLToPath } from 'url';
|
|
90
92
|
import { Help, Command, Option } from 'commander';
|
|
91
93
|
import { rcompare } from 'semver';
|
|
92
|
-
import * as
|
|
94
|
+
import * as p4 from '@clack/prompts';
|
|
93
95
|
import pc5 from 'picocolors';
|
|
94
96
|
import { parse, stringify, parseDocument } from 'yaml';
|
|
95
97
|
import * as os from 'os';
|
|
@@ -127,11 +129,50 @@ function filterCatalogAssets(assets, query) {
|
|
|
127
129
|
(a) => a.name.toLowerCase().includes(q) || (a.description?.toLowerCase().includes(q) ?? false) || a.publisher.toLowerCase().includes(q)
|
|
128
130
|
);
|
|
129
131
|
}
|
|
132
|
+
function nearAssetKind(word) {
|
|
133
|
+
const w = word.toLowerCase();
|
|
134
|
+
let best;
|
|
135
|
+
for (const kind of ASSET_KINDS) {
|
|
136
|
+
const d = editDistance(w, kind);
|
|
137
|
+
const max = kind.length >= 7 ? 2 : 1;
|
|
138
|
+
if (d > 0 && d <= max && (!best || d < best.d)) best = { kind, d };
|
|
139
|
+
}
|
|
140
|
+
return best?.kind;
|
|
141
|
+
}
|
|
142
|
+
function editDistance(a, b) {
|
|
143
|
+
let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
144
|
+
for (let i = 1; i <= a.length; i++) {
|
|
145
|
+
const cur = [i];
|
|
146
|
+
for (let j = 1; j <= b.length; j++) {
|
|
147
|
+
cur[j] = Math.min(
|
|
148
|
+
prev[j] + 1,
|
|
149
|
+
cur[j - 1] + 1,
|
|
150
|
+
prev[j - 1] + (a[i - 1] === b[j - 1] ? 0 : 1)
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
prev = cur;
|
|
154
|
+
}
|
|
155
|
+
return prev[b.length];
|
|
156
|
+
}
|
|
130
157
|
async function runSearch(kind, query, opts) {
|
|
131
158
|
if (kind?.includes(":")) {
|
|
132
159
|
query = kind;
|
|
133
160
|
kind = void 0;
|
|
134
161
|
}
|
|
162
|
+
if (kind && query === void 0 && !ASSET_KINDS.includes(kind)) {
|
|
163
|
+
const near = nearAssetKind(kind);
|
|
164
|
+
if (near)
|
|
165
|
+
logInfo(S.dim(`Searching all kinds for "${kind}". To filter by kind: skaile search ${near}`));
|
|
166
|
+
query = kind;
|
|
167
|
+
kind = void 0;
|
|
168
|
+
}
|
|
169
|
+
if (kind && !ASSET_KINDS.includes(kind)) {
|
|
170
|
+
const near = nearAssetKind(kind);
|
|
171
|
+
logErr(
|
|
172
|
+
`Unknown asset kind "${kind}"${near ? ` (did you mean "${near}"?)` : ""}. Kinds: ${ASSET_KINDS.join(", ")}.`
|
|
173
|
+
);
|
|
174
|
+
process.exit(1);
|
|
175
|
+
}
|
|
135
176
|
const showLocal = !opts.store;
|
|
136
177
|
const showStore = !opts.local;
|
|
137
178
|
const { resolveConfig } = await import('../library/index.js');
|
|
@@ -144,7 +185,7 @@ async function runSearch(kind, query, opts) {
|
|
|
144
185
|
}
|
|
145
186
|
}
|
|
146
187
|
async function searchIndex(query, kind) {
|
|
147
|
-
const { openLibrary: openLibrary2 } = await import('../open-library-
|
|
188
|
+
const { openLibrary: openLibrary2 } = await import('../open-library-Z5NJU4Z5.js');
|
|
148
189
|
const library = await openLibrary2();
|
|
149
190
|
try {
|
|
150
191
|
const defs = await library.listAssetDefs(kind ? { kind } : {});
|
|
@@ -177,7 +218,7 @@ async function searchIndex(query, kind) {
|
|
|
177
218
|
}
|
|
178
219
|
async function searchFactory(projectDir, query, kind) {
|
|
179
220
|
const prefixes = factoryAssetRoots().map((r) => r.endsWith(path36__default.sep) ? r : r + path36__default.sep);
|
|
180
|
-
const isFactoryPath = (
|
|
221
|
+
const isFactoryPath = (p6) => prefixes.some((fp) => p6 === fp.slice(0, -1) || p6.startsWith(fp));
|
|
181
222
|
try {
|
|
182
223
|
const entries = await new AssetManager({ projectDir }).search(query, kind);
|
|
183
224
|
return entries.filter((e) => isFactoryPath(e.source));
|
|
@@ -197,7 +238,7 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
|
|
|
197
238
|
const factory = await searchFactory(projectDir, query, kind);
|
|
198
239
|
let entries = unionEntries(await searchIndex(query, kind), factory);
|
|
199
240
|
if (entries.length === 0 && !query && !kind && !airGapped) {
|
|
200
|
-
const { autoSyncForSearch } = await import('../source-
|
|
241
|
+
const { autoSyncForSearch } = await import('../source-OKRJT53H.js');
|
|
201
242
|
if (await autoSyncForSearch(projectDir)) {
|
|
202
243
|
entries = unionEntries(await searchIndex(query, kind), factory);
|
|
203
244
|
}
|
|
@@ -216,31 +257,70 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
|
|
|
216
257
|
}
|
|
217
258
|
printLocalEntries(entries);
|
|
218
259
|
}
|
|
260
|
+
var MIN_LOCAL_DESCRIPTION_WIDTH = 10;
|
|
261
|
+
function layoutLocalTable(rows, width, style = {}) {
|
|
262
|
+
const styleRef = style.ref ?? ((s) => s);
|
|
263
|
+
const styleVer = style.version ?? ((s) => s);
|
|
264
|
+
const gap = COLUMN_GAP.length;
|
|
265
|
+
const indent = 2;
|
|
266
|
+
const pad = " ".repeat(indent);
|
|
267
|
+
const nameW = Math.max(4, ...rows.map((r) => r.ref.length));
|
|
268
|
+
const verW = Math.max(0, ...rows.map((r) => r.version.length));
|
|
269
|
+
const verSpan = verW > 0 ? gap + verW : 0;
|
|
270
|
+
const refCell = (ref) => styleRef(ref) + " ".repeat(nameW - ref.length);
|
|
271
|
+
const lines = [];
|
|
272
|
+
const descW = width - (indent + nameW + gap + verSpan);
|
|
273
|
+
if (descW >= MIN_LOCAL_DESCRIPTION_WIDTH) {
|
|
274
|
+
for (const r of rows) {
|
|
275
|
+
const desc = truncateText(r.description, descW);
|
|
276
|
+
const descCell = verW > 0 ? desc.padEnd(descW) : desc;
|
|
277
|
+
lines.push(
|
|
278
|
+
`${pad}${refCell(r.ref)}${COLUMN_GAP}${descCell}${r.version ? `${COLUMN_GAP}${styleVer(r.version)}` : ""}`
|
|
279
|
+
);
|
|
280
|
+
}
|
|
281
|
+
return { ruleWidth: nameW + gap + descW + verSpan, lines };
|
|
282
|
+
}
|
|
283
|
+
if (indent + nameW + verSpan <= width) {
|
|
284
|
+
for (const r of rows) {
|
|
285
|
+
lines.push(
|
|
286
|
+
verW > 0 ? `${pad}${refCell(r.ref)}${r.version ? `${COLUMN_GAP}${styleVer(r.version)}` : ""}` : `${pad}${styleRef(r.ref)}`
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
return { ruleWidth: nameW + verSpan, lines };
|
|
290
|
+
}
|
|
291
|
+
const subPad = " ".repeat(indent + 2);
|
|
292
|
+
const subDescW = width - (indent + 2) - verSpan;
|
|
293
|
+
for (const r of rows) {
|
|
294
|
+
lines.push(`${pad}${styleRef(r.ref)}`);
|
|
295
|
+
const desc = subDescW >= MIN_LOCAL_DESCRIPTION_WIDTH ? truncateText(r.description, subDescW) : "";
|
|
296
|
+
const descCell = r.version && desc ? desc.padEnd(subDescW) : desc;
|
|
297
|
+
const parts = [descCell, r.version ? styleVer(r.version) : ""].filter((s) => s !== "");
|
|
298
|
+
if (parts.length > 0) lines.push(`${subPad}${parts.join(COLUMN_GAP)}`);
|
|
299
|
+
}
|
|
300
|
+
return { ruleWidth: Math.max(1, Math.min(nameW, width - indent)), lines };
|
|
301
|
+
}
|
|
219
302
|
function printLocalEntries(entries, width = terminalWidth()) {
|
|
220
303
|
const byKind = /* @__PURE__ */ new Map();
|
|
221
304
|
for (const e of entries) {
|
|
222
305
|
if (!byKind.has(e.kind)) byKind.set(e.kind, []);
|
|
223
306
|
byKind.get(e.kind).push(e);
|
|
224
307
|
}
|
|
225
|
-
const verOf = (e) => e.version ? `v${e.version}` : "";
|
|
226
308
|
for (const [k, items] of byKind) {
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
309
|
+
const { ruleWidth, lines } = layoutLocalTable(
|
|
310
|
+
items.map((e) => ({
|
|
311
|
+
ref: localEntryRef(e),
|
|
312
|
+
description: e.description,
|
|
313
|
+
version: e.version ? `v${e.version}` : ""
|
|
314
|
+
})),
|
|
315
|
+
width,
|
|
316
|
+
{ ref: S.cmd, version: S.dim }
|
|
317
|
+
);
|
|
231
318
|
console.log();
|
|
232
319
|
console.log(
|
|
233
320
|
` ${kindColor(k)} ${S.heading(`${k.toUpperCase()}S`)} ${S.dim(`(${items.length})`)}`
|
|
234
321
|
);
|
|
235
|
-
console.log(` ${S.rule(
|
|
236
|
-
for (const
|
|
237
|
-
const desc = truncateText(e.description, descW);
|
|
238
|
-
const ver = verOf(e);
|
|
239
|
-
const descCell = ver ? desc.padEnd(descW) : desc;
|
|
240
|
-
console.log(
|
|
241
|
-
` ${S.cmd(localEntryRef(e).padEnd(nameW))}${COLUMN_GAP}${descCell}${ver ? `${COLUMN_GAP}${S.dim(ver)}` : ""}`
|
|
242
|
-
);
|
|
243
|
-
}
|
|
322
|
+
console.log(` ${S.rule(Math.max(1, Math.min(ruleWidth, width - 2)))}`);
|
|
323
|
+
for (const line of lines) console.log(line);
|
|
244
324
|
}
|
|
245
325
|
console.log(`
|
|
246
326
|
${S.dim(`${entries.length} total`)}
|
|
@@ -267,7 +347,7 @@ async function searchStore(query, kind, opts, airGapped) {
|
|
|
267
347
|
logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
|
|
268
348
|
return;
|
|
269
349
|
}
|
|
270
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
350
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-Z5NJU4Z5.js');
|
|
271
351
|
try {
|
|
272
352
|
const remote = await openCatalogSource2({ projectDir: path36__default.resolve(opts.projectDir) });
|
|
273
353
|
const assets = await remote.listAssets(kind ? { kind } : {});
|
|
@@ -293,7 +373,7 @@ async function searchStore(query, kind, opts, airGapped) {
|
|
|
293
373
|
}
|
|
294
374
|
}
|
|
295
375
|
function makeSearchCommand() {
|
|
296
|
-
return new Command("search").description("Search across all repos").argument("[kind]", "Filter by asset kind").argument("[query]", "Search query").option("--project-dir <path>", "Project directory", process.cwd()).option("--store", "Search only the store").option("--local", "Search only local repos").action(async (kind, query, opts) => {
|
|
376
|
+
return new Command("search").description("Search across all repos").argument("[kind]", "Filter by asset kind (a single non-kind argument is the query)").argument("[query]", "Search query").option("--project-dir <path>", "Project directory", process.cwd()).option("--store", "Search only the store").option("--local", "Search only local repos").action(async (kind, query, opts) => {
|
|
297
377
|
await runSearch(kind, query, opts);
|
|
298
378
|
});
|
|
299
379
|
}
|
|
@@ -384,24 +464,31 @@ function makeAddCommand() {
|
|
|
384
464
|
process.exit(1);
|
|
385
465
|
}
|
|
386
466
|
const harnesses = parseHarnessFilter(opts.harness);
|
|
467
|
+
const warnings = deferredWarnings();
|
|
387
468
|
const am2 = new AssetManager({
|
|
388
469
|
projectDir: path36__default.resolve(opts.projectDir),
|
|
389
470
|
global: opts.global || harnesses !== void 0,
|
|
390
471
|
harnesses,
|
|
391
|
-
driverTarget: opts.target
|
|
472
|
+
driverTarget: opts.target,
|
|
473
|
+
onLibraryCollision: warnings.push
|
|
392
474
|
});
|
|
393
|
-
const
|
|
394
|
-
|
|
475
|
+
const spinner = createSpinner();
|
|
476
|
+
spinner.start(`Adding ${ref}`);
|
|
395
477
|
try {
|
|
396
|
-
const
|
|
397
|
-
|
|
478
|
+
const libraryOf = /* @__PURE__ */ new Map();
|
|
479
|
+
const added = await am2.add(ref, {
|
|
480
|
+
link: opts.link,
|
|
481
|
+
onLibraryOrigin: (deployedRef, library) => libraryOf.set(deployedRef, library)
|
|
482
|
+
});
|
|
483
|
+
spinner.stop("Done");
|
|
484
|
+
warnings.flush();
|
|
398
485
|
await promptSoftDepAdds(am2, ref, {
|
|
399
486
|
isTTY: !!process.stdin.isTTY,
|
|
400
487
|
link: opts.link,
|
|
401
488
|
withSoftDeps: opts.withSoftDeps,
|
|
402
489
|
noSoftDeps: opts.softDeps === false,
|
|
403
|
-
confirm: (message) =>
|
|
404
|
-
isCancel:
|
|
490
|
+
confirm: (message) => p4.confirm({ message, initialValue: false }),
|
|
491
|
+
isCancel: p4.isCancel,
|
|
405
492
|
onAdded: logOk,
|
|
406
493
|
onError: logErr,
|
|
407
494
|
onHint: (line) => logInfo(S.dim(line))
|
|
@@ -413,10 +500,16 @@ function makeAddCommand() {
|
|
|
413
500
|
`Recorded in skaile.yaml${kind === "mcp-server" ? " (bytes fetched + verified into .skaile/cache/store)" : ""}. ${kind} assets are not deployed into the driver target \u2014 they are wired when skaile runs the agent.`
|
|
414
501
|
);
|
|
415
502
|
else logInfo("Nothing to deploy (already up to date).");
|
|
416
|
-
} else
|
|
503
|
+
} else {
|
|
504
|
+
for (const a of added) {
|
|
505
|
+
const library = libraryOf.get(a);
|
|
506
|
+
logOk(library ? `${a} (library ${library})` : a);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
417
509
|
await reportBundleMembership(am2, ref, (line) => logInfo(S.dim(line)));
|
|
418
510
|
} catch (err) {
|
|
419
|
-
|
|
511
|
+
spinner.stop("Failed");
|
|
512
|
+
warnings.flush();
|
|
420
513
|
logErr(String(err));
|
|
421
514
|
process.exit(1);
|
|
422
515
|
}
|
|
@@ -443,8 +536,8 @@ function makeRemoveCommand() {
|
|
|
443
536
|
await promptSoftDepRemovals(am2, ref, {
|
|
444
537
|
isTTY: !!process.stdin.isTTY,
|
|
445
538
|
noSoftDeps: opts.softDeps === false,
|
|
446
|
-
confirm: (message) =>
|
|
447
|
-
isCancel:
|
|
539
|
+
confirm: (message) => p4.confirm({ message, initialValue: false }),
|
|
540
|
+
isCancel: p4.isCancel,
|
|
448
541
|
onRemoved: logOk,
|
|
449
542
|
onHint: (line) => logInfo(S.dim(line))
|
|
450
543
|
});
|
|
@@ -589,7 +682,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
589
682
|
return { entry: match ?? deployed };
|
|
590
683
|
}
|
|
591
684
|
const lookup = opts.storeLookup ?? (async (filter) => {
|
|
592
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
685
|
+
const { resolveCatalogSource } = await import('../open-library-Z5NJU4Z5.js');
|
|
593
686
|
const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
|
|
594
687
|
try {
|
|
595
688
|
return await source.listAssets(filter);
|
|
@@ -605,7 +698,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
605
698
|
);
|
|
606
699
|
return { entry: hit ? catalogAssetToEntry(hit) : null };
|
|
607
700
|
} catch (err) {
|
|
608
|
-
const { LocalCatalogDisabledError } = await import('../open-library-
|
|
701
|
+
const { LocalCatalogDisabledError } = await import('../open-library-Z5NJU4Z5.js');
|
|
609
702
|
const storeNote = err instanceof Error ? err.message : String(err);
|
|
610
703
|
const disabled = err instanceof LocalCatalogDisabledError || /catalog\.url/i.test(storeNote);
|
|
611
704
|
return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
|
|
@@ -706,7 +799,7 @@ async function indexLibrary(lib, index) {
|
|
|
706
799
|
}
|
|
707
800
|
}
|
|
708
801
|
function resolveLibraryPublisherDetailed(lib, opts, storeIdentity) {
|
|
709
|
-
const bare = (
|
|
802
|
+
const bare = (p6) => p6.startsWith("@") ? p6.slice(1) : p6;
|
|
710
803
|
if (opts.publisher?.trim()) return { publisher: bare(opts.publisher.trim()), source: "flag" };
|
|
711
804
|
const declared = loadSkPublishManifest(lib.path)?.publisher?.trim();
|
|
712
805
|
if (declared) return { publisher: bare(declared), source: "manifest" };
|
|
@@ -775,6 +868,39 @@ async function registerLibraryAsset(lib, index, input) {
|
|
|
775
868
|
for (const e of idx.errors) logWarn(e);
|
|
776
869
|
return { publisher, ref: refFor(input.kind, publisher, input.name, input.version) };
|
|
777
870
|
}
|
|
871
|
+
var LIBRARY_UPGRADE_DOCS = "https://github.com/skaile-ai/workspaces/blob/main/docs/sections/cli/commands/library.md#upgrading-a-4x-library";
|
|
872
|
+
var DOMAIN_REMOVED_HINT = `Domains were removed in 5.0 \u2014 delete DOMAIN.md files; group assets with .claude-plugin/marketplace.json. See ${LIBRARY_UPGRADE_DOCS}`;
|
|
873
|
+
function countDomainFiles(root) {
|
|
874
|
+
let count = 0;
|
|
875
|
+
const walk = (dir) => {
|
|
876
|
+
let entries;
|
|
877
|
+
try {
|
|
878
|
+
entries = fs12.readdirSync(dir, { withFileTypes: true });
|
|
879
|
+
} catch {
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
for (const entry of entries) {
|
|
883
|
+
if (entry.isDirectory()) {
|
|
884
|
+
if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
|
|
885
|
+
walk(path36.join(dir, entry.name));
|
|
886
|
+
}
|
|
887
|
+
} else if (entry.name === "DOMAIN.md") {
|
|
888
|
+
count++;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
};
|
|
892
|
+
walk(root);
|
|
893
|
+
return count;
|
|
894
|
+
}
|
|
895
|
+
function warnIgnoredDomainFiles(root) {
|
|
896
|
+
const count = countDomainFiles(root);
|
|
897
|
+
if (count > 0) {
|
|
898
|
+
logWarn(
|
|
899
|
+
`${count} DOMAIN.md file(s) are ignored since 5.0 (domains were removed) \u2014 delete them; group assets with .claude-plugin/marketplace.json. See ${LIBRARY_UPGRADE_DOCS}`
|
|
900
|
+
);
|
|
901
|
+
}
|
|
902
|
+
return count;
|
|
903
|
+
}
|
|
778
904
|
var DEFAULT_IMPORT_VERSION = "0.1.0";
|
|
779
905
|
var DEFAULT_IMPORT_STAGE = "alpha";
|
|
780
906
|
function claudeSkillRoots() {
|
|
@@ -872,9 +998,18 @@ async function resolveDefByRef(library, ref, opts) {
|
|
|
872
998
|
function withCanonicalRef(def) {
|
|
873
999
|
return { ref: catalogAssetRef(def), ...def };
|
|
874
1000
|
}
|
|
1001
|
+
function resolveLibraryOption(opts) {
|
|
1002
|
+
if (opts.library && opts.to && opts.library !== opts.to) {
|
|
1003
|
+
logErr(
|
|
1004
|
+
`Conflicting options: --library "${opts.library}" and --to "${opts.to}". Use --library.`
|
|
1005
|
+
);
|
|
1006
|
+
process.exit(1);
|
|
1007
|
+
}
|
|
1008
|
+
return opts.library ?? opts.to;
|
|
1009
|
+
}
|
|
875
1010
|
function makeAssetCommand() {
|
|
876
1011
|
const cmd = new Command("asset").description("Author and install AI assets");
|
|
877
|
-
cmd.command("import <name-or-path>").description("Import + skailify an existing coding-agent skill into a library").option("--
|
|
1012
|
+
cmd.command("import <name-or-path>").description("Import + skailify an existing coding-agent skill into a library").option("--library <library>", "Target library (default: auto / personal)").addOption(new Option("--to <library>", "Alias for --library").hideHelp()).option("--version <semver>", "Version to stamp when the skill ships none").option("--stage <stage>", "Lifecycle stage to stamp (default: alpha)").option("--no-normalize", "Copy verbatim \u2014 skip frontmatter normalization").option(
|
|
878
1013
|
"--publisher <name>",
|
|
879
1014
|
"Publisher for the imported skill (default: the library's, else your store login)"
|
|
880
1015
|
).option("--commit", "Auto-commit in git-backed libraries", false).action(
|
|
@@ -887,18 +1022,19 @@ function makeAssetCommand() {
|
|
|
887
1022
|
process.exit(1);
|
|
888
1023
|
}
|
|
889
1024
|
logInfo(`Source: ${S.dim(src.dir)} (${src.via})`);
|
|
1025
|
+
const libraryName = resolveLibraryOption(opts);
|
|
890
1026
|
const { manager, library, close } = await openLibraryManager();
|
|
891
1027
|
try {
|
|
892
1028
|
let target;
|
|
893
|
-
if (
|
|
894
|
-
target = await manager.requireLibrary(
|
|
1029
|
+
if (libraryName) {
|
|
1030
|
+
target = await manager.requireLibrary(libraryName);
|
|
895
1031
|
} else {
|
|
896
1032
|
const found = await manager.findDefaultLibrary();
|
|
897
1033
|
const def = found && found.ownership !== "reader" ? found : void 0;
|
|
898
1034
|
target = def ?? (await manager.ensurePersonalLibrary(resolveLibraryDir())).library;
|
|
899
1035
|
}
|
|
900
1036
|
if (target.ownership === "reader") {
|
|
901
|
-
logErr(`Library "${target.name}" is read-only (ownership=reader). Choose --
|
|
1037
|
+
logErr(`Library "${target.name}" is read-only (ownership=reader). Choose --library.`);
|
|
902
1038
|
process.exit(1);
|
|
903
1039
|
}
|
|
904
1040
|
try {
|
|
@@ -957,7 +1093,7 @@ function makeAssetCommand() {
|
|
|
957
1093
|
}
|
|
958
1094
|
}
|
|
959
1095
|
);
|
|
960
|
-
cmd.command("migrate <path>").description("Move/copy/link a workspace asset into a library").option("--
|
|
1096
|
+
cmd.command("migrate <path>").description("Move/copy/link a workspace asset into a library").option("--library <library>", "Target library (default: auto)").addOption(new Option("--to <library>", "Alias for --library").hideHelp()).option("--mode <mode>", "copy | move | link", "copy").option("--commit", "Auto-commit in git-backed libraries", false).action(
|
|
961
1097
|
async (srcPath, opts) => {
|
|
962
1098
|
if (!["copy", "move", "link"].includes(opts.mode)) {
|
|
963
1099
|
logErr(`Invalid --mode "${opts.mode}". Expected: copy | move | link.`);
|
|
@@ -967,11 +1103,12 @@ function makeAssetCommand() {
|
|
|
967
1103
|
logErr(`Source path does not exist: ${srcPath}`);
|
|
968
1104
|
process.exit(1);
|
|
969
1105
|
}
|
|
1106
|
+
const libraryName = resolveLibraryOption(opts);
|
|
970
1107
|
const { manager, close } = await openLibraryManager();
|
|
971
1108
|
try {
|
|
972
1109
|
let target;
|
|
973
|
-
if (
|
|
974
|
-
target = await manager.requireLibrary(
|
|
1110
|
+
if (libraryName) {
|
|
1111
|
+
target = await manager.requireLibrary(libraryName);
|
|
975
1112
|
} else {
|
|
976
1113
|
const found = await manager.findDefaultLibrary();
|
|
977
1114
|
const def = found && found.ownership !== "reader" ? found : void 0;
|
|
@@ -984,7 +1121,7 @@ function makeAssetCommand() {
|
|
|
984
1121
|
}
|
|
985
1122
|
if (target.ownership === "reader") {
|
|
986
1123
|
logErr(
|
|
987
|
-
`Library "${target.name}" is read-only (ownership=reader). Choose another with --
|
|
1124
|
+
`Library "${target.name}" is read-only (ownership=reader). Choose another with --library.`
|
|
988
1125
|
);
|
|
989
1126
|
process.exit(1);
|
|
990
1127
|
}
|
|
@@ -1078,7 +1215,7 @@ function makeAssetCommand() {
|
|
|
1078
1215
|
}
|
|
1079
1216
|
);
|
|
1080
1217
|
cmd.addCommand(makeListCommand());
|
|
1081
|
-
cmd.command("show <ref>").description("Show details for an asset by canonical ref").action(async (ref) => {
|
|
1218
|
+
cmd.command("show <ref>").description("Show details for an asset by canonical ref (prints JSON)").option("--json", "Print JSON (the default and only output format)").action(async (ref, _opts) => {
|
|
1082
1219
|
const { library, close } = await openLibraryManager();
|
|
1083
1220
|
try {
|
|
1084
1221
|
const def = await resolveDefByRef(library, ref);
|
|
@@ -1198,10 +1335,10 @@ function makeCacheCommand() {
|
|
|
1198
1335
|
return;
|
|
1199
1336
|
}
|
|
1200
1337
|
if (!opts.yes) {
|
|
1201
|
-
const ok = await
|
|
1338
|
+
const ok = await p4.confirm({
|
|
1202
1339
|
message: opts.global ? "Clear project AND global cache?" : "Clear project cache?"
|
|
1203
1340
|
});
|
|
1204
|
-
if (
|
|
1341
|
+
if (p4.isCancel(ok) || !ok) {
|
|
1205
1342
|
logInfo("Cancelled.");
|
|
1206
1343
|
return;
|
|
1207
1344
|
}
|
|
@@ -1259,7 +1396,7 @@ function makeCatalogCommand() {
|
|
|
1259
1396
|
return catalog;
|
|
1260
1397
|
}
|
|
1261
1398
|
async function runLocalCatalogTest(projectDir) {
|
|
1262
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
1399
|
+
const { resolveCatalogSource } = await import('../open-library-Z5NJU4Z5.js');
|
|
1263
1400
|
let resolved;
|
|
1264
1401
|
try {
|
|
1265
1402
|
resolved = await resolveCatalogSource({ projectDir });
|
|
@@ -1403,8 +1540,8 @@ async function scanLibraryFlowEntries() {
|
|
|
1403
1540
|
const indexPath = resolveIndexPath();
|
|
1404
1541
|
if (!existsSync(indexPath)) return entries;
|
|
1405
1542
|
const [{ authoringLibraries }, { createFullRegistry: createFullRegistry2 }] = await Promise.all([
|
|
1406
|
-
import('../open-library-
|
|
1407
|
-
import('../open-registry-
|
|
1543
|
+
import('../open-library-Z5NJU4Z5.js'),
|
|
1544
|
+
import('../open-registry-TYUVN5SG.js')
|
|
1408
1545
|
]);
|
|
1409
1546
|
const index = new LocalIndex({ indexPath });
|
|
1410
1547
|
try {
|
|
@@ -1546,12 +1683,12 @@ var API_KEY_PREFIX = "apiKey.";
|
|
|
1546
1683
|
function collectWorkspaceDefaults(projectDir) {
|
|
1547
1684
|
const wsDefaults = {};
|
|
1548
1685
|
const ws = resolveSkWorkspaceConfig(projectDir);
|
|
1549
|
-
const
|
|
1550
|
-
if (
|
|
1551
|
-
if (
|
|
1552
|
-
if (
|
|
1553
|
-
if (
|
|
1554
|
-
if (
|
|
1686
|
+
const p6 = ws.agent_config?.default ?? {};
|
|
1687
|
+
if (p6.driver) wsDefaults.driver = p6.driver;
|
|
1688
|
+
if (p6.model) wsDefaults.model = p6.model;
|
|
1689
|
+
if (p6.skills_dir) wsDefaults.skills_dir = p6.skills_dir;
|
|
1690
|
+
if (p6.agents_dir) wsDefaults.agents_dir = p6.agents_dir;
|
|
1691
|
+
if (p6.prompts_dir) wsDefaults.prompts_dir = p6.prompts_dir;
|
|
1555
1692
|
for (const [role, target] of Object.entries(ws.roles ?? {})) {
|
|
1556
1693
|
wsDefaults[`@${role}`] = target;
|
|
1557
1694
|
}
|
|
@@ -2364,7 +2501,7 @@ async function ensureTargetsRegistered(projectDir) {
|
|
|
2364
2501
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
2365
2502
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
2366
2503
|
if (config.plugins && config.plugins.length > 0) {
|
|
2367
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
2504
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-N6SI2TYM.js');
|
|
2368
2505
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
2369
2506
|
for (const f of result.failed) logWarn(f.error);
|
|
2370
2507
|
}
|
|
@@ -2589,10 +2726,10 @@ var MCP_SERVER_ENTRY = {
|
|
|
2589
2726
|
function pluginDir(projectDir) {
|
|
2590
2727
|
return path36__default.join(projectDir, ".claude", "plugins", "skaile");
|
|
2591
2728
|
}
|
|
2592
|
-
async function readJsonStrict(
|
|
2729
|
+
async function readJsonStrict(p6) {
|
|
2593
2730
|
let raw;
|
|
2594
2731
|
try {
|
|
2595
|
-
raw = await fs6.readFile(
|
|
2732
|
+
raw = await fs6.readFile(p6, "utf-8");
|
|
2596
2733
|
} catch {
|
|
2597
2734
|
return null;
|
|
2598
2735
|
}
|
|
@@ -2600,13 +2737,13 @@ async function readJsonStrict(p7) {
|
|
|
2600
2737
|
return JSON.parse(raw);
|
|
2601
2738
|
} catch (e) {
|
|
2602
2739
|
throw new Error(
|
|
2603
|
-
`cannot parse ${
|
|
2740
|
+
`cannot parse ${p6}: ${e instanceof Error ? e.message : String(e)}; please fix or remove`
|
|
2604
2741
|
);
|
|
2605
2742
|
}
|
|
2606
2743
|
}
|
|
2607
|
-
async function writeJson(
|
|
2608
|
-
await fs6.mkdir(path36__default.dirname(
|
|
2609
|
-
await fs6.writeFile(
|
|
2744
|
+
async function writeJson(p6, value) {
|
|
2745
|
+
await fs6.mkdir(path36__default.dirname(p6), { recursive: true });
|
|
2746
|
+
await fs6.writeFile(p6, `${JSON.stringify(value, null, 2)}
|
|
2610
2747
|
`);
|
|
2611
2748
|
}
|
|
2612
2749
|
async function copyDir(src, dest) {
|
|
@@ -2661,7 +2798,7 @@ async function uninstall(projectDir) {
|
|
|
2661
2798
|
let changed = false;
|
|
2662
2799
|
const settings = await readJsonStrict(settingsPath);
|
|
2663
2800
|
if (settings && Array.isArray(settings.plugins)) {
|
|
2664
|
-
const next = settings.plugins.filter((
|
|
2801
|
+
const next = settings.plugins.filter((p6) => p6 !== dir);
|
|
2665
2802
|
if (next.length !== settings.plugins.length) {
|
|
2666
2803
|
changed = true;
|
|
2667
2804
|
const updated = { ...settings, plugins: next };
|
|
@@ -2708,7 +2845,7 @@ async function enable(projectDir) {
|
|
|
2708
2845
|
const settings = await readJsonStrict(settingsPath) ?? {};
|
|
2709
2846
|
if (detected.method === "plugin") {
|
|
2710
2847
|
const disabled2 = settings.disabledPlugins ?? [];
|
|
2711
|
-
const next2 = disabled2.filter((
|
|
2848
|
+
const next2 = disabled2.filter((p6) => p6 !== detected.pluginPath);
|
|
2712
2849
|
if (next2.length === disabled2.length) return { changed: false };
|
|
2713
2850
|
const updated2 = { ...settings, disabledPlugins: next2 };
|
|
2714
2851
|
if (next2.length === 0) delete updated2.disabledPlugins;
|
|
@@ -2789,10 +2926,10 @@ function buildEntry(projectDir) {
|
|
|
2789
2926
|
env: { SKAILE_PROJECT_DIR: projectDir }
|
|
2790
2927
|
};
|
|
2791
2928
|
}
|
|
2792
|
-
async function readConfig(
|
|
2929
|
+
async function readConfig(p6) {
|
|
2793
2930
|
let raw;
|
|
2794
2931
|
try {
|
|
2795
|
-
raw = await fs6.readFile(
|
|
2932
|
+
raw = await fs6.readFile(p6, "utf-8");
|
|
2796
2933
|
} catch {
|
|
2797
2934
|
return null;
|
|
2798
2935
|
}
|
|
@@ -2800,41 +2937,41 @@ async function readConfig(p7) {
|
|
|
2800
2937
|
return parse$1(raw);
|
|
2801
2938
|
} catch (e) {
|
|
2802
2939
|
throw new Error(
|
|
2803
|
-
`cannot parse ${
|
|
2940
|
+
`cannot parse ${p6}: ${e instanceof Error ? e.message : String(e)}; please fix or remove`
|
|
2804
2941
|
);
|
|
2805
2942
|
}
|
|
2806
2943
|
}
|
|
2807
|
-
async function writeConfig(
|
|
2808
|
-
await fs6.mkdir(path36__default.dirname(
|
|
2944
|
+
async function writeConfig(p6, value) {
|
|
2945
|
+
await fs6.mkdir(path36__default.dirname(p6), { recursive: true });
|
|
2809
2946
|
const cleaned = {};
|
|
2810
2947
|
for (const [k, v] of Object.entries(value)) {
|
|
2811
2948
|
if (v === void 0) continue;
|
|
2812
2949
|
cleaned[k] = v;
|
|
2813
2950
|
}
|
|
2814
|
-
await fs6.writeFile(
|
|
2951
|
+
await fs6.writeFile(p6, stringify$1(cleaned));
|
|
2815
2952
|
}
|
|
2816
2953
|
function configPath(projectDir) {
|
|
2817
2954
|
return path36__default.join(projectDir, ".codex", "config.toml");
|
|
2818
2955
|
}
|
|
2819
2956
|
async function install2(projectDir) {
|
|
2820
|
-
const
|
|
2821
|
-
const cfg = await readConfig(
|
|
2957
|
+
const p6 = configPath(projectDir);
|
|
2958
|
+
const cfg = await readConfig(p6) ?? {};
|
|
2822
2959
|
const next = buildEntry(projectDir);
|
|
2823
2960
|
const servers = { ...cfg.mcp_servers ?? {} };
|
|
2824
2961
|
const previous = servers[SKAILE_MCP_NAME2];
|
|
2825
2962
|
const matches = previous && JSON.stringify(previous) === JSON.stringify(next);
|
|
2826
2963
|
let warning;
|
|
2827
2964
|
if (previous && !matches) {
|
|
2828
|
-
warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path36__default.relative(projectDir,
|
|
2965
|
+
warning = `overwrote existing ${SKAILE_MCP_NAME2} entry in ${path36__default.relative(projectDir, p6)}`;
|
|
2829
2966
|
}
|
|
2830
2967
|
if (matches) return { changed: false, method: "toml" };
|
|
2831
2968
|
servers[SKAILE_MCP_NAME2] = next;
|
|
2832
|
-
await writeConfig(
|
|
2969
|
+
await writeConfig(p6, { ...cfg, mcp_servers: servers });
|
|
2833
2970
|
return { changed: true, method: "toml", warning };
|
|
2834
2971
|
}
|
|
2835
2972
|
async function uninstall2(projectDir) {
|
|
2836
|
-
const
|
|
2837
|
-
const cfg = await readConfig(
|
|
2973
|
+
const p6 = configPath(projectDir);
|
|
2974
|
+
const cfg = await readConfig(p6);
|
|
2838
2975
|
if (!cfg?.mcp_servers || !(SKAILE_MCP_NAME2 in cfg.mcp_servers)) {
|
|
2839
2976
|
return { changed: false };
|
|
2840
2977
|
}
|
|
@@ -2842,15 +2979,15 @@ async function uninstall2(projectDir) {
|
|
|
2842
2979
|
const updated = { ...cfg, mcp_servers: rest };
|
|
2843
2980
|
if (Object.keys(rest).length === 0) delete updated.mcp_servers;
|
|
2844
2981
|
if (Object.keys(updated).length === 0) {
|
|
2845
|
-
await fs6.unlink(
|
|
2982
|
+
await fs6.unlink(p6);
|
|
2846
2983
|
} else {
|
|
2847
|
-
await writeConfig(
|
|
2984
|
+
await writeConfig(p6, updated);
|
|
2848
2985
|
}
|
|
2849
2986
|
return { changed: true };
|
|
2850
2987
|
}
|
|
2851
2988
|
async function status2(projectDir) {
|
|
2852
|
-
const
|
|
2853
|
-
const cfg = await readConfig(
|
|
2989
|
+
const p6 = configPath(projectDir);
|
|
2990
|
+
const cfg = await readConfig(p6);
|
|
2854
2991
|
const installed = !!(cfg?.mcp_servers && SKAILE_MCP_NAME2 in cfg.mcp_servers);
|
|
2855
2992
|
if (!installed) {
|
|
2856
2993
|
return {
|
|
@@ -2866,7 +3003,7 @@ async function status2(projectDir) {
|
|
|
2866
3003
|
installed: "yes",
|
|
2867
3004
|
enabled: "n/a",
|
|
2868
3005
|
method: "mcp",
|
|
2869
|
-
location: path36__default.relative(projectDir,
|
|
3006
|
+
location: path36__default.relative(projectDir, p6)
|
|
2870
3007
|
};
|
|
2871
3008
|
}
|
|
2872
3009
|
async function install3(projectDir) {
|
|
@@ -3083,7 +3220,7 @@ function printStatusTable(rows) {
|
|
|
3083
3220
|
const widths = cols.map(
|
|
3084
3221
|
(c) => Math.max(c.header.length, ...rows.map((r) => String(r[c.key] ?? "").length))
|
|
3085
3222
|
);
|
|
3086
|
-
const fmtRow = (parts) => parts.map((
|
|
3223
|
+
const fmtRow = (parts) => parts.map((p6, i) => p6.padEnd(widths[i] ?? p6.length)).join(" ");
|
|
3087
3224
|
console.log();
|
|
3088
3225
|
console.log(` ${S.heading(fmtRow(cols.map((c) => c.header)))}`);
|
|
3089
3226
|
for (const r of rows) {
|
|
@@ -3217,6 +3354,23 @@ function refuseGlobalInstallFolder(name, dir) {
|
|
|
3217
3354
|
process.exit(1);
|
|
3218
3355
|
}
|
|
3219
3356
|
}
|
|
3357
|
+
function readOriginTracking(dir) {
|
|
3358
|
+
if (!isGitRepo(dir)) return null;
|
|
3359
|
+
const origin = spawnSync("git", ["remote", "get-url", "origin"], { cwd: dir, encoding: "utf-8" });
|
|
3360
|
+
const url = origin.status === 0 ? origin.stdout.trim() : "";
|
|
3361
|
+
if (!url) return null;
|
|
3362
|
+
const head = spawnSync("git", ["symbolic-ref", "--short", "HEAD"], {
|
|
3363
|
+
cwd: dir,
|
|
3364
|
+
encoding: "utf-8"
|
|
3365
|
+
});
|
|
3366
|
+
return { url, branch: head.status === 0 && head.stdout.trim() || "main" };
|
|
3367
|
+
}
|
|
3368
|
+
function requireGitBackend(lib, verb) {
|
|
3369
|
+
if (lib.backend !== "git") {
|
|
3370
|
+
logErr(`\`library ${verb}\` only applies to git-backed libraries.`);
|
|
3371
|
+
process.exit(1);
|
|
3372
|
+
}
|
|
3373
|
+
}
|
|
3220
3374
|
function scaffoldLibraryFiles(dir, name) {
|
|
3221
3375
|
const readme = `# ${name}
|
|
3222
3376
|
|
|
@@ -3309,7 +3463,7 @@ function makeLibraryCommand() {
|
|
|
3309
3463
|
close();
|
|
3310
3464
|
}
|
|
3311
3465
|
});
|
|
3312
|
-
cmd.command("init <name>").description("Create (or adopt) a library \u2014 default location ~/.skaile/libraries/<name>").option("--git <url>", "Initialize as a git library tracking <url>").option("--path <dir>", "Register the library at <dir> (created if missing) instead").option("--owner", "Mark as owner (the default)").option("--contributor", "Mark as contributor (needs --git)").option("--reader", "Mark as reader (needs --git)").action(
|
|
3466
|
+
cmd.command("init <name>").description("Create (or adopt) a library \u2014 default location ~/.skaile/libraries/<name>").option("--git <url>", "Initialize as a git library tracking <url>").option("--path <dir>", "Register the library at <dir> (created if missing) instead").option("--owner", "Mark as owner (the default)").option("--contributor", "Mark as contributor (needs --git or an existing git clone)").option("--reader", "Mark as reader (needs --git or an existing git clone)").action(
|
|
3313
3467
|
async (name, opts) => {
|
|
3314
3468
|
const flagged = ["owner", "contributor", "reader"].filter((o) => opts[o]);
|
|
3315
3469
|
if (flagged.length > 1) {
|
|
@@ -3317,19 +3471,20 @@ function makeLibraryCommand() {
|
|
|
3317
3471
|
process.exit(1);
|
|
3318
3472
|
}
|
|
3319
3473
|
const ownership = flagged[0] ?? "owner";
|
|
3320
|
-
if (ownership !== "owner" && !opts.git) {
|
|
3321
|
-
logErr(
|
|
3322
|
-
`--${ownership} needs --git <url>: ownership only governs sync with a git remote, and a local library is always owned by you.`
|
|
3323
|
-
);
|
|
3324
|
-
process.exit(1);
|
|
3325
|
-
}
|
|
3326
3474
|
const libPath = opts.path ? path36.resolve(opts.path) : path36.join(resolveLibraryDir(), name);
|
|
3327
3475
|
refuseGlobalInstallFolder(name, libPath);
|
|
3328
3476
|
if (fs12.existsSync(libPath) && !fs12.statSync(libPath).isDirectory()) {
|
|
3329
3477
|
logErr(`${libPath} exists and is not a directory.`);
|
|
3330
3478
|
process.exit(1);
|
|
3331
3479
|
}
|
|
3332
|
-
const
|
|
3480
|
+
const adopted = opts.git ? null : readOriginTracking(libPath);
|
|
3481
|
+
if (ownership !== "owner" && !opts.git && !adopted) {
|
|
3482
|
+
logErr(
|
|
3483
|
+
`--${ownership} needs --git <url> or an existing git clone: ownership only governs sync with a git remote, and a local library is always owned by you.`
|
|
3484
|
+
);
|
|
3485
|
+
process.exit(1);
|
|
3486
|
+
}
|
|
3487
|
+
const { manager, library, close } = await openLibraryManager();
|
|
3333
3488
|
try {
|
|
3334
3489
|
if (await manager.getLibrary(name)) {
|
|
3335
3490
|
logErr(`A library named "${name}" is already registered.`);
|
|
@@ -3348,6 +3503,9 @@ function makeLibraryCommand() {
|
|
|
3348
3503
|
}
|
|
3349
3504
|
backend = "git";
|
|
3350
3505
|
backendConfig = { url: opts.git, branch, authHint: "ssh" };
|
|
3506
|
+
} else if (adopted) {
|
|
3507
|
+
backend = "git";
|
|
3508
|
+
backendConfig = { url: adopted.url, branch: adopted.branch, authHint: "ssh" };
|
|
3351
3509
|
} else {
|
|
3352
3510
|
fs12.mkdirSync(libPath, { recursive: true });
|
|
3353
3511
|
}
|
|
@@ -3366,6 +3524,23 @@ function makeLibraryCommand() {
|
|
|
3366
3524
|
`Library "${name}" ${blank ? "created" : "registered"} at ${libPath}${isDefault ? " (default)" : ""}`
|
|
3367
3525
|
);
|
|
3368
3526
|
if (scaffolded.length > 0) logInfo(`Scaffolded ${scaffolded.join(", ")}.`);
|
|
3527
|
+
if (adopted) {
|
|
3528
|
+
logInfo(
|
|
3529
|
+
`Adopted existing git clone as a git library tracking ${adopted.url} (ownership: ${ownership}).`
|
|
3530
|
+
);
|
|
3531
|
+
if (ownership === "owner") {
|
|
3532
|
+
logInfo(
|
|
3533
|
+
`\`library push\` / \`sync\` push to that origin. Not your library? Run \`skaile library set ${name} ownership=reader\` (or \`contributor\` to propose changes).`
|
|
3534
|
+
);
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3537
|
+
if (!blank) {
|
|
3538
|
+
const lib = await manager.requireLibrary(name);
|
|
3539
|
+
const res = await indexLibrary(lib, library);
|
|
3540
|
+
for (const e of res.errors) logWarn(e);
|
|
3541
|
+
logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
|
|
3542
|
+
warnIgnoredDomainFiles(libPath);
|
|
3543
|
+
}
|
|
3369
3544
|
} catch (err) {
|
|
3370
3545
|
exitOnSyncError(err);
|
|
3371
3546
|
} finally {
|
|
@@ -3547,11 +3722,11 @@ function makeLibraryCommand() {
|
|
|
3547
3722
|
const { manager, close } = await openLibraryManager();
|
|
3548
3723
|
try {
|
|
3549
3724
|
if (!opts.yes) {
|
|
3550
|
-
const confirmed = await
|
|
3725
|
+
const confirmed = await p4.confirm({
|
|
3551
3726
|
message: `Remove library "${name}"${opts.purge ? " AND delete its directory" : ""}?`,
|
|
3552
3727
|
initialValue: false
|
|
3553
3728
|
});
|
|
3554
|
-
if (!confirmed ||
|
|
3729
|
+
if (!confirmed || p4.isCancel(confirmed)) {
|
|
3555
3730
|
logInfo("Cancelled.");
|
|
3556
3731
|
return;
|
|
3557
3732
|
}
|
|
@@ -3566,10 +3741,11 @@ function makeLibraryCommand() {
|
|
|
3566
3741
|
const { manager, close } = await openLibraryManager();
|
|
3567
3742
|
try {
|
|
3568
3743
|
const lib = await manager.requireLibrary(name);
|
|
3744
|
+
requireGitBackend(lib, "sync");
|
|
3569
3745
|
const drv = manager.driverFor(lib.backend);
|
|
3570
3746
|
const pull = await drv.pull(lib);
|
|
3571
3747
|
logInfo(`Pulled: applied=${pull.applied}, conflicts=${pull.conflicts.length}`);
|
|
3572
|
-
if (lib.ownership === "owner"
|
|
3748
|
+
if (lib.ownership === "owner") {
|
|
3573
3749
|
const push = await drv.push(lib);
|
|
3574
3750
|
logInfo(`Pushed: ${push.pushed}`);
|
|
3575
3751
|
}
|
|
@@ -3599,6 +3775,7 @@ function makeLibraryCommand() {
|
|
|
3599
3775
|
const unparsable = res.errors.filter((e) => e.includes("ManifestSchemaError:"));
|
|
3600
3776
|
for (const e of res.errors) (unparsable.includes(e) ? logErr : logWarn)(e);
|
|
3601
3777
|
logOk(`Indexed ${res.assetsUpdated} asset(s) from ${name}.`);
|
|
3778
|
+
warnIgnoredDomainFiles(lib.path);
|
|
3602
3779
|
if (unparsable.length > 0) {
|
|
3603
3780
|
logErr(`${unparsable.length} asset(s) skipped: manifest could not be parsed.`);
|
|
3604
3781
|
process.exitCode = 1;
|
|
@@ -3611,6 +3788,7 @@ function makeLibraryCommand() {
|
|
|
3611
3788
|
const { manager, close } = await openLibraryManager();
|
|
3612
3789
|
try {
|
|
3613
3790
|
const lib = await manager.requireLibrary(name);
|
|
3791
|
+
requireGitBackend(lib, "pull");
|
|
3614
3792
|
const res = await manager.driverFor(lib.backend).pull(lib);
|
|
3615
3793
|
if (res.conflicts.length > 0) {
|
|
3616
3794
|
logWarn(`Conflicts: ${res.conflicts.map((c) => c.path).join(", ")}`);
|
|
@@ -3627,6 +3805,7 @@ function makeLibraryCommand() {
|
|
|
3627
3805
|
const { manager, close } = await openLibraryManager();
|
|
3628
3806
|
try {
|
|
3629
3807
|
const lib = await manager.requireLibrary(name);
|
|
3808
|
+
requireGitBackend(lib, "push");
|
|
3630
3809
|
const res = await manager.driverFor(lib.backend).push(lib, { force: opts.force });
|
|
3631
3810
|
logOk(`Pushed (${res.pushed}).`);
|
|
3632
3811
|
} catch (err) {
|
|
@@ -3651,10 +3830,7 @@ function makeLibraryCommand() {
|
|
|
3651
3830
|
const { manager, close } = await openLibraryManager();
|
|
3652
3831
|
try {
|
|
3653
3832
|
const lib = await manager.requireLibrary(name);
|
|
3654
|
-
|
|
3655
|
-
logErr("`library commit` only applies to git-backed libraries.");
|
|
3656
|
-
process.exit(1);
|
|
3657
|
-
}
|
|
3833
|
+
requireGitBackend(lib, "commit");
|
|
3658
3834
|
if (!isGitRepo(lib.path)) {
|
|
3659
3835
|
logErr(
|
|
3660
3836
|
`${lib.path} is not a git repository. Run \`skaile library link ${name} <url>\` to initialise it.`
|
|
@@ -3691,6 +3867,10 @@ function makeLibraryCommand() {
|
|
|
3691
3867
|
close();
|
|
3692
3868
|
}
|
|
3693
3869
|
});
|
|
3870
|
+
cmd.command("domain", { hidden: true }).description("Removed in 5.0 (domains were removed)").allowUnknownOption().allowExcessArguments().argument("[args...]").action(() => {
|
|
3871
|
+
logErr(DOMAIN_REMOVED_HINT);
|
|
3872
|
+
process.exit(1);
|
|
3873
|
+
});
|
|
3694
3874
|
cmd.command("git <name> [args...]").description("Pass-through: run arbitrary git commands inside the library").allowUnknownOption().passThroughOptions().action(async (name, rawArgs) => {
|
|
3695
3875
|
const args = rawArgs[0] === "--" ? rawArgs.slice(1) : rawArgs;
|
|
3696
3876
|
const { manager, close } = await openLibraryManager();
|
|
@@ -3711,16 +3891,16 @@ function makeLibraryCommand() {
|
|
|
3711
3891
|
"With --create-repo: create the repo private (the store only accepts public repos)"
|
|
3712
3892
|
).option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
|
|
3713
3893
|
async (lib, opts) => {
|
|
3714
|
-
const { runLibraryPublish } = await import('../library-publish-
|
|
3894
|
+
const { runLibraryPublish } = await import('../library-publish-YAI7WOXC.js');
|
|
3715
3895
|
await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
|
|
3716
3896
|
}
|
|
3717
3897
|
);
|
|
3718
3898
|
cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
|
|
3719
|
-
const { runLibraryRegister } = await import('../library-publish-
|
|
3899
|
+
const { runLibraryRegister } = await import('../library-publish-YAI7WOXC.js');
|
|
3720
3900
|
await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
|
|
3721
3901
|
});
|
|
3722
3902
|
cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
|
|
3723
|
-
const { runLibraryYank } = await import('../library-publish-
|
|
3903
|
+
const { runLibraryYank } = await import('../library-publish-YAI7WOXC.js');
|
|
3724
3904
|
await withStoreErrorHandling(() => runLibraryYank(lib, opts));
|
|
3725
3905
|
});
|
|
3726
3906
|
return cmd;
|
|
@@ -4380,7 +4560,7 @@ function scheduleSoftDepPreview() {
|
|
|
4380
4560
|
}
|
|
4381
4561
|
async function loadAssets() {
|
|
4382
4562
|
softDepPreviewCache.clear();
|
|
4383
|
-
const { gatherAssetFeeds } = await import('../asset-feeds-
|
|
4563
|
+
const { gatherAssetFeeds } = await import('../asset-feeds-KTFUB7EX.js');
|
|
4384
4564
|
const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
|
|
4385
4565
|
if (notes.length > 0) {
|
|
4386
4566
|
state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
|
|
@@ -4547,7 +4727,7 @@ function reconcileCollapsedSets(rows) {
|
|
|
4547
4727
|
async function loadSourcesAndLibraries() {
|
|
4548
4728
|
try {
|
|
4549
4729
|
const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
|
|
4550
|
-
import('../open-library-
|
|
4730
|
+
import('../open-library-Z5NJU4Z5.js'),
|
|
4551
4731
|
import('../core/index.js')
|
|
4552
4732
|
]);
|
|
4553
4733
|
const { manager, library, close } = await openLibraryManager2();
|
|
@@ -5897,18 +6077,18 @@ function makeNpxCommand() {
|
|
|
5897
6077
|
);
|
|
5898
6078
|
process.exit(1);
|
|
5899
6079
|
}
|
|
5900
|
-
const
|
|
6080
|
+
const spinner = createSpinner();
|
|
5901
6081
|
const key = sourceCacheKey(url);
|
|
5902
6082
|
const clonePath = path36__default.join(getGlobalCacheDir(), key);
|
|
5903
|
-
|
|
6083
|
+
spinner.start(`Cloning ${url}`);
|
|
5904
6084
|
try {
|
|
5905
6085
|
if (!existsSync(clonePath)) {
|
|
5906
6086
|
mkdirSync(path36__default.dirname(clonePath), { recursive: true });
|
|
5907
6087
|
execSync(`git clone ${url} ${clonePath}`, { stdio: "ignore" });
|
|
5908
6088
|
}
|
|
5909
|
-
|
|
6089
|
+
spinner.stop(`Cloned to ${key}`);
|
|
5910
6090
|
} catch (err) {
|
|
5911
|
-
|
|
6091
|
+
spinner.stop("Clone failed");
|
|
5912
6092
|
logErr(err instanceof Error ? err.message : String(err));
|
|
5913
6093
|
process.exit(1);
|
|
5914
6094
|
}
|
|
@@ -5927,11 +6107,18 @@ function makeNpxCommand() {
|
|
|
5927
6107
|
logInfo(`Resolved "${opts.skill}" \u2192 directory "${skillName}".`);
|
|
5928
6108
|
}
|
|
5929
6109
|
const skillRef = `skill:@${publisher}/${skillName}`;
|
|
5930
|
-
const
|
|
5931
|
-
|
|
6110
|
+
const warnings = deferredWarnings();
|
|
6111
|
+
const am2 = new AssetManager({
|
|
6112
|
+
projectDir,
|
|
6113
|
+
global: opts.global,
|
|
6114
|
+
driverTarget: opts.target,
|
|
6115
|
+
onLibraryCollision: warnings.push
|
|
6116
|
+
});
|
|
6117
|
+
spinner.start(`Installing ${skillRef}`);
|
|
5932
6118
|
try {
|
|
5933
6119
|
const added = await am2.add(skillRef);
|
|
5934
|
-
|
|
6120
|
+
spinner.stop("Done");
|
|
6121
|
+
warnings.flush();
|
|
5935
6122
|
if (added.length === 0) {
|
|
5936
6123
|
logInfo(`${opts.skill} already deployed or not found in source.`);
|
|
5937
6124
|
} else {
|
|
@@ -5939,7 +6126,8 @@ function makeNpxCommand() {
|
|
|
5939
6126
|
}
|
|
5940
6127
|
logInfo(`Source registered in skaile.yaml \u2014 manage via ${S.cmd("skaile source")}.`);
|
|
5941
6128
|
} catch (err) {
|
|
5942
|
-
|
|
6129
|
+
spinner.stop("Failed");
|
|
6130
|
+
warnings.flush();
|
|
5943
6131
|
logErr(err.message);
|
|
5944
6132
|
process.exit(1);
|
|
5945
6133
|
}
|
|
@@ -6085,7 +6273,7 @@ function action2(fn) {
|
|
|
6085
6273
|
};
|
|
6086
6274
|
}
|
|
6087
6275
|
async function reconcileAndReport(projectDir, plugins) {
|
|
6088
|
-
const { reconcilePlugins } = await import('../plugin-store-
|
|
6276
|
+
const { reconcilePlugins } = await import('../plugin-store-N6SI2TYM.js');
|
|
6089
6277
|
if (plugins.length === 0) {
|
|
6090
6278
|
logInfo("No plugins declared \u2014 nothing to reconcile.");
|
|
6091
6279
|
return;
|
|
@@ -6101,7 +6289,7 @@ async function reconcileAndReport(projectDir, plugins) {
|
|
|
6101
6289
|
async function runInstall2(spec, opts) {
|
|
6102
6290
|
const projectDir = path36__default.resolve(opts.projectDir);
|
|
6103
6291
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
6104
|
-
const { specName } = await import('../plugin-store-
|
|
6292
|
+
const { specName } = await import('../plugin-store-N6SI2TYM.js');
|
|
6105
6293
|
const yamlPath = path36__default.join(projectDir, "skaile.yaml");
|
|
6106
6294
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
6107
6295
|
const replaced = editor.addPlugin(spec, specName);
|
|
@@ -6113,7 +6301,7 @@ async function runInstall2(spec, opts) {
|
|
|
6113
6301
|
async function runRemove(name, opts) {
|
|
6114
6302
|
const projectDir = path36__default.resolve(opts.projectDir);
|
|
6115
6303
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
6116
|
-
const { specName } = await import('../plugin-store-
|
|
6304
|
+
const { specName } = await import('../plugin-store-N6SI2TYM.js');
|
|
6117
6305
|
const yamlPath = path36__default.join(projectDir, "skaile.yaml");
|
|
6118
6306
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
6119
6307
|
const removed = editor.removePlugin(name, specName);
|
|
@@ -6141,7 +6329,7 @@ async function runList(opts) {
|
|
|
6141
6329
|
const registry = createPluginRegistry();
|
|
6142
6330
|
if (declared.length > 0) {
|
|
6143
6331
|
try {
|
|
6144
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
6332
|
+
const { loadPlugins } = await import('../plugin-store-N6SI2TYM.js');
|
|
6145
6333
|
const result = await loadPlugins(projectDir, declared, registry);
|
|
6146
6334
|
for (const f of result.failed) logWarn(f.error);
|
|
6147
6335
|
} catch (err) {
|
|
@@ -7017,7 +7205,7 @@ function makeRunCommand() {
|
|
|
7017
7205
|
logErr("No flows available.");
|
|
7018
7206
|
process.exit(1);
|
|
7019
7207
|
}
|
|
7020
|
-
const selected = await
|
|
7208
|
+
const selected = await p4.select({
|
|
7021
7209
|
message: "Select a flow to run",
|
|
7022
7210
|
options: flows.map((f) => ({
|
|
7023
7211
|
value: f.id,
|
|
@@ -7025,8 +7213,8 @@ function makeRunCommand() {
|
|
|
7025
7213
|
hint: f.description
|
|
7026
7214
|
}))
|
|
7027
7215
|
});
|
|
7028
|
-
if (
|
|
7029
|
-
|
|
7216
|
+
if (p4.isCancel(selected)) {
|
|
7217
|
+
p4.cancel("Cancelled.");
|
|
7030
7218
|
process.exit(0);
|
|
7031
7219
|
}
|
|
7032
7220
|
flowId = selected;
|
|
@@ -7185,11 +7373,11 @@ function makeReplCommand() {
|
|
|
7185
7373
|
console.log();
|
|
7186
7374
|
logWarn(`No skaile.yaml found in ${S.cmd(userCwd)} or any parent directory.`);
|
|
7187
7375
|
console.log();
|
|
7188
|
-
const shouldCreate = await
|
|
7376
|
+
const shouldCreate = await p4.confirm({
|
|
7189
7377
|
message: "Create a temporary workspace? (session state in /tmp/)"
|
|
7190
7378
|
});
|
|
7191
|
-
if (
|
|
7192
|
-
|
|
7379
|
+
if (p4.isCancel(shouldCreate) || !shouldCreate) {
|
|
7380
|
+
p4.cancel("Cancelled.");
|
|
7193
7381
|
process.exit(0);
|
|
7194
7382
|
}
|
|
7195
7383
|
const tmpDir = fs12__default.mkdtempSync(path36__default.join(os2.tmpdir(), "skaile-repl-"));
|
|
@@ -7270,12 +7458,12 @@ function makeServeCommand() {
|
|
|
7270
7458
|
);
|
|
7271
7459
|
}
|
|
7272
7460
|
async function ensurePluginsLoadedForServe(projectDir) {
|
|
7273
|
-
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-
|
|
7461
|
+
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-PSROT7CU.js');
|
|
7274
7462
|
try {
|
|
7275
7463
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
7276
7464
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
7277
7465
|
if (!config.plugins || config.plugins.length === 0) return;
|
|
7278
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
7466
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-N6SI2TYM.js');
|
|
7279
7467
|
const { pluginRegistry } = await import('../plugin-registry/index.js');
|
|
7280
7468
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
7281
7469
|
if (result.loaded.length > 0) {
|
|
@@ -7289,14 +7477,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
|
|
|
7289
7477
|
}
|
|
7290
7478
|
}
|
|
7291
7479
|
async function runCompileTest(opts) {
|
|
7292
|
-
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-
|
|
7480
|
+
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-PSROT7CU.js');
|
|
7293
7481
|
const { tmpdir } = await import('os');
|
|
7294
7482
|
const { dirname: dirname3, join: join7, resolve: resolve5 } = await import('path');
|
|
7295
7483
|
const { fileURLToPath: fileURLToPath2 } = await import('url');
|
|
7296
7484
|
const { unlinkSync, existsSync: existsSync16 } = await import('fs');
|
|
7297
7485
|
const { spawn } = await import('child_process');
|
|
7298
7486
|
const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
|
|
7299
|
-
const { MONOREPO_ROOT } = await import('../paths-
|
|
7487
|
+
const { MONOREPO_ROOT } = await import('../paths-HKAXUR3W.js');
|
|
7300
7488
|
if (MONOREPO_ROOT === null) {
|
|
7301
7489
|
logErr2("--compile-test is only available inside the skaile-dev workspace.");
|
|
7302
7490
|
logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
|
|
@@ -8172,7 +8360,7 @@ function makeStoreCommand() {
|
|
|
8172
8360
|
process.exit(2);
|
|
8173
8361
|
});
|
|
8174
8362
|
store.command("search <query>").description("Search the AI Asset Store catalog by name, description, or publisher").option("--kind <kind>", "Filter by asset kind (skill, agent, prompt, flow, \u2026)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
|
|
8175
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
8363
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-Z5NJU4Z5.js');
|
|
8176
8364
|
try {
|
|
8177
8365
|
const remote = await openCatalogSource2({ projectDir: path36__default.resolve(opts.projectDir) });
|
|
8178
8366
|
const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
|
|
@@ -8200,8 +8388,8 @@ function makeStoreCommand() {
|
|
|
8200
8388
|
}
|
|
8201
8389
|
});
|
|
8202
8390
|
store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
|
|
8203
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
8204
|
-
const { supportsInstallManifest } = await import('../project-
|
|
8391
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-Z5NJU4Z5.js');
|
|
8392
|
+
const { supportsInstallManifest } = await import('../project-SVS4UMGL.js');
|
|
8205
8393
|
try {
|
|
8206
8394
|
const remote = await openCatalogSource2({ projectDir: path36__default.resolve(opts.projectDir) });
|
|
8207
8395
|
const asset = await remote.resolve(ref);
|
|
@@ -8348,7 +8536,7 @@ function makeUpdateCommand() {
|
|
|
8348
8536
|
return new Command("update").description("Refresh the Catalog cache and re-deploy outdated assets in the current project").argument("[name]", "Update a specific asset (kind:name)").option("--project-dir <path>", "Project directory", process.cwd()).option("--no-catalog", "Skip refreshing the catalog cache").option("--catalog-only", "Refresh the catalog cache only; do not re-deploy assets").option("--no-sync", "Skip syncing sources from upstream before re-deploying").option("-y, --yes", "Sync sources without the confirmation prompt").action(
|
|
8349
8537
|
async (_name, opts) => {
|
|
8350
8538
|
if (opts.catalog !== false) {
|
|
8351
|
-
const catalogSpinner =
|
|
8539
|
+
const catalogSpinner = createSpinner();
|
|
8352
8540
|
catalogSpinner.start("Refreshing catalog cache");
|
|
8353
8541
|
try {
|
|
8354
8542
|
const remote = await openCatalogSource({ projectDir: path36__default.resolve(opts.projectDir) });
|
|
@@ -8366,18 +8554,28 @@ function makeUpdateCommand() {
|
|
|
8366
8554
|
if (opts.catalogOnly) return;
|
|
8367
8555
|
const projectDir = path36__default.resolve(opts.projectDir);
|
|
8368
8556
|
if (await shouldSyncSources(opts)) {
|
|
8369
|
-
const syncSpinner =
|
|
8557
|
+
const syncSpinner = createSpinner();
|
|
8370
8558
|
syncSpinner.start("Syncing sources");
|
|
8371
8559
|
const { total, synced, failed } = await syncProjectSources(projectDir);
|
|
8372
8560
|
syncSpinner.stop(
|
|
8373
8561
|
total === 0 ? "No sources to sync." : `Synced ${S.heading(`${synced}/${total}`)} source(s)` + (failed ? ` (${failed} failed)` : "")
|
|
8374
8562
|
);
|
|
8375
8563
|
}
|
|
8376
|
-
const
|
|
8377
|
-
const
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8564
|
+
const warnings = deferredWarnings();
|
|
8565
|
+
const am2 = new AssetManager({ projectDir, onLibraryCollision: warnings.push });
|
|
8566
|
+
const spinner = createSpinner();
|
|
8567
|
+
spinner.start("Re-deploying assets");
|
|
8568
|
+
let result;
|
|
8569
|
+
try {
|
|
8570
|
+
result = await am2.install();
|
|
8571
|
+
} catch (err) {
|
|
8572
|
+
spinner.stop("Failed");
|
|
8573
|
+
warnings.flush();
|
|
8574
|
+
logErr(String(err));
|
|
8575
|
+
process.exit(1);
|
|
8576
|
+
}
|
|
8577
|
+
spinner.stop("Done");
|
|
8578
|
+
warnings.flush();
|
|
8381
8579
|
if (result.deployed.length > 0) {
|
|
8382
8580
|
for (const d of result.deployed) logOk(`Updated ${d}`);
|
|
8383
8581
|
} else {
|
|
@@ -8389,12 +8587,12 @@ function makeUpdateCommand() {
|
|
|
8389
8587
|
async function shouldSyncSources(opts) {
|
|
8390
8588
|
if (opts.sync === false) return false;
|
|
8391
8589
|
if (opts.yes || !process.stdin.isTTY) return true;
|
|
8392
|
-
const answer = await
|
|
8590
|
+
const answer = await p4.confirm({
|
|
8393
8591
|
message: "Sync sources from upstream before re-deploying?",
|
|
8394
8592
|
initialValue: true
|
|
8395
8593
|
});
|
|
8396
|
-
if (
|
|
8397
|
-
|
|
8594
|
+
if (p4.isCancel(answer)) {
|
|
8595
|
+
p4.cancel("Cancelled.");
|
|
8398
8596
|
process.exit(130);
|
|
8399
8597
|
}
|
|
8400
8598
|
return answer;
|
|
@@ -8484,10 +8682,9 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
|
|
|
8484
8682
|
}
|
|
8485
8683
|
if (c.kind === "skill" && parsed && typeof parsed === "object") {
|
|
8486
8684
|
const dirName = path36__default.basename(path36__default.dirname(c.filePath));
|
|
8487
|
-
const
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
if (strictConformance) {
|
|
8685
|
+
for (const f of checkSkillManifest(parsed, body, dirName)) {
|
|
8686
|
+
const line = `${relPath} [${f.tag}] \u2014 ${f.text}`;
|
|
8687
|
+
if (f.conformance && strictConformance) {
|
|
8491
8688
|
logErr(line);
|
|
8492
8689
|
errors++;
|
|
8493
8690
|
} else {
|
|
@@ -8496,10 +8693,6 @@ function validateManifestCandidate(c, parsed, body, absRoot, registry, strictCon
|
|
|
8496
8693
|
}
|
|
8497
8694
|
}
|
|
8498
8695
|
}
|
|
8499
|
-
if (c.kind === "skill" && body?.replace(/^#[^\n]*\n+/, "") === SKILL_BODY_PLACEHOLDER) {
|
|
8500
|
-
logWarn(`${relPath} [skill] \u2014 body is still the scaffold placeholder; write the skill prompt`);
|
|
8501
|
-
warnings++;
|
|
8502
|
-
}
|
|
8503
8696
|
const provider = registry.getProvider(c.kind);
|
|
8504
8697
|
if (!provider) {
|
|
8505
8698
|
logWarn(`${relPath} [${c.kind}] \u2014 kind "${c.kind}" is not registered, skipping validation`);
|
|
@@ -8647,8 +8840,8 @@ function validatePublishManifestRoots(rootPath) {
|
|
|
8647
8840
|
return missing.length;
|
|
8648
8841
|
}
|
|
8649
8842
|
var EXCLUDED_PATHS = ["skaileup-shared/", "external/", "docs/"];
|
|
8650
|
-
function toPosix(
|
|
8651
|
-
return
|
|
8843
|
+
function toPosix(p6) {
|
|
8844
|
+
return p6.split(path36__default.sep).join("/");
|
|
8652
8845
|
}
|
|
8653
8846
|
function isExcludedPath(relPath) {
|
|
8654
8847
|
const rel = toPosix(relPath);
|
|
@@ -8896,6 +9089,7 @@ function makeValidateCommand() {
|
|
|
8896
9089
|
const rootErrors = validatePublishManifestRoots(absPath);
|
|
8897
9090
|
const totalErrors = errors + ws.errors + rootErrors;
|
|
8898
9091
|
console.log();
|
|
9092
|
+
warnIgnoredDomainFiles(absPath);
|
|
8899
9093
|
logInfo(`Scanned ${total} asset manifest(s) and ${ws.total} skaile.yaml file(s)`);
|
|
8900
9094
|
if (warnings > 0) logWarn(`${warnings} warning(s)`);
|
|
8901
9095
|
if (totalErrors === 0) {
|
|
@@ -9305,7 +9499,7 @@ async function bootstrapUserConfig() {
|
|
|
9305
9499
|
}
|
|
9306
9500
|
async function hydrateInitSources(resolved, created) {
|
|
9307
9501
|
try {
|
|
9308
|
-
const { ensureSourcesCloned } = await import('../ensure-sources-
|
|
9502
|
+
const { ensureSourcesCloned } = await import('../ensure-sources-QFRA46DJ.js');
|
|
9309
9503
|
const hydrate = ensureSourcesCloned(resolved, { quiet: true });
|
|
9310
9504
|
for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
|
|
9311
9505
|
if (hydrate.failed.length > 0) {
|
|
@@ -9345,7 +9539,7 @@ function printInitSummary(resolved, projectDir, created) {
|
|
|
9345
9539
|
console.log();
|
|
9346
9540
|
}
|
|
9347
9541
|
program.command("setup").description("Interactive provider setup wizard").action(async () => {
|
|
9348
|
-
const { cmdSetup } = await import('../setup-
|
|
9542
|
+
const { cmdSetup } = await import('../setup-IOEZGJNC.js');
|
|
9349
9543
|
await cmdSetup([], { projectDir: process.cwd() });
|
|
9350
9544
|
});
|
|
9351
9545
|
program.addCommand(makeInstallCommand());
|
|
@@ -9419,6 +9613,13 @@ program.command("path").description("Show resolved paths (honours SKAILE_HOME an
|
|
|
9419
9613
|
console.log();
|
|
9420
9614
|
});
|
|
9421
9615
|
program.addCommand(makeCompleteCommand(program));
|
|
9422
|
-
|
|
9616
|
+
try {
|
|
9617
|
+
await program.parseAsync();
|
|
9618
|
+
} catch (err) {
|
|
9619
|
+
const { LibrarySyncError } = await import('../library/index.js');
|
|
9620
|
+
if (!(err instanceof LibrarySyncError)) throw err;
|
|
9621
|
+
logErr(err.message);
|
|
9622
|
+
process.exit(1);
|
|
9623
|
+
}
|
|
9423
9624
|
//# sourceMappingURL=index.js.map
|
|
9424
9625
|
//# sourceMappingURL=index.js.map
|