@skaile/workspaces 0.22.0-beta.0 → 0.22.0-beta.2
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 +221 -0
- package/dist/{asset-feeds-PJDJ3QYI.js → asset-feeds-2M6UKEJ7.js} +13 -14
- package/dist/asset-feeds-2M6UKEJ7.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.d.ts +2 -0
- package/dist/asset-manager/contrib.d.ts +2 -0
- package/dist/asset-manager/fragments.d.ts +2 -0
- package/dist/asset-manager/history.d.ts +2 -0
- package/dist/asset-manager/index.d.ts +2 -0
- package/dist/asset-manager/index.js +7 -7
- package/dist/asset-manager/installer.d.ts +2 -0
- package/dist/asset-manager/installer.js +6 -6
- package/dist/asset-manager/renderers.d.ts +2 -0
- package/dist/asset-manager/src/index.d.ts +18 -7
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +3 -3
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/base-assets/connectors/deploy.d.ts +2 -0
- package/dist/base-assets/connectors/deploy.js +8 -8
- package/dist/base-assets/connectors/devserver.d.ts +2 -0
- package/dist/base-assets/connectors/devserver.js +8 -8
- package/dist/base-assets/connectors/flow/adapter.js +8 -8
- package/dist/base-assets/connectors/flow/engine.d.ts +2 -0
- package/dist/base-assets/connectors/flow/run-flow.js +9 -9
- package/dist/base-assets/connectors/flow.d.ts +2 -0
- package/dist/base-assets/connectors/flow.js +8 -8
- package/dist/base-assets/connectors/git/driver.d.ts.map +1 -1
- package/dist/base-assets/connectors/git.d.ts +2 -0
- package/dist/base-assets/connectors/git.js +8 -8
- package/dist/base-assets/connectors/gmail.d.ts +2 -0
- package/dist/base-assets/connectors/gmail.js +8 -8
- package/dist/base-assets/connectors/googledrive.d.ts +2 -0
- package/dist/base-assets/connectors/googledrive.js +8 -8
- package/dist/base-assets/connectors/local.d.ts +2 -0
- package/dist/base-assets/connectors/local.js +8 -8
- package/dist/base-assets/connectors/mattermost.d.ts +2 -0
- package/dist/base-assets/connectors/mattermost.js +8 -8
- package/dist/base-assets/connectors/memory.d.ts +2 -0
- package/dist/base-assets/connectors/memory.js +8 -8
- package/dist/base-assets/connectors/minio.d.ts +2 -0
- package/dist/base-assets/connectors/minio.js +8 -8
- package/dist/base-assets/connectors/postgres.d.ts +2 -0
- package/dist/base-assets/connectors/postgres.js +8 -8
- package/dist/base-assets/connectors/s3.d.ts +2 -0
- package/dist/base-assets/connectors/s3.js +8 -8
- package/dist/base-assets/connectors/sharepoint.d.ts +2 -0
- package/dist/base-assets/connectors/sharepoint.js +8 -8
- package/dist/base-assets/connectors/sqlite.d.ts +2 -0
- package/dist/base-assets/connectors/sqlite.js +8 -8
- package/dist/base-assets/connectors/static-server.d.ts +2 -0
- package/dist/base-assets/connectors/static-server.js +8 -8
- package/dist/base-assets/connectors/tunnel.d.ts +2 -0
- package/dist/base-assets/connectors/tunnel.js +8 -8
- package/dist/base-assets/connectors/webdav.d.ts +2 -0
- package/dist/base-assets/connectors/webdav.js +8 -8
- package/dist/base-assets/connectors/xstate-store.d.ts +2 -0
- package/dist/base-assets/connectors/xstate-store.js +8 -8
- package/dist/base-assets/connectors/xstate.d.ts +2 -0
- package/dist/base-assets/connectors/xstate.js +8 -8
- package/dist/bridge/drivers/claude-sdk.d.ts +2 -0
- package/dist/bridge/drivers/claude-sdk.js +2 -2
- package/dist/bridge/drivers/codex.d.ts +2 -0
- package/dist/bridge/drivers/codex.js +2 -2
- package/dist/bridge/drivers/echo.d.ts +2 -0
- package/dist/bridge/drivers/echo.js +2 -2
- package/dist/bridge/drivers/omp.d.ts +2 -0
- package/dist/bridge/drivers/omp.js +2 -2
- package/dist/bridge/index.d.ts +2 -0
- package/dist/bridge/index.js +3 -3
- package/dist/bridge/src/registry.d.ts +4 -2
- package/dist/bridge/src/registry.d.ts.map +1 -1
- package/dist/chunk-32NA4TVC.js +30 -0
- package/dist/chunk-32NA4TVC.js.map +1 -0
- package/dist/{chunk-CSDQBWE6.js → chunk-3KLWGHDE.js} +5 -5
- package/dist/{chunk-CSDQBWE6.js.map → chunk-3KLWGHDE.js.map} +1 -1
- package/dist/{chunk-UZRY5UI2.js → chunk-6E6PKKAD.js} +68 -3
- package/dist/chunk-6E6PKKAD.js.map +1 -0
- package/dist/{chunk-G6GKWGOW.js → chunk-6SA2SIOU.js} +26 -10
- package/dist/chunk-6SA2SIOU.js.map +1 -0
- package/dist/{chunk-IGQEXBBG.js → chunk-6VTG73UY.js} +13 -9
- package/dist/chunk-6VTG73UY.js.map +1 -0
- package/dist/{chunk-TTY56FQQ.js → chunk-74GTZ4TJ.js} +17 -5
- package/dist/chunk-74GTZ4TJ.js.map +1 -0
- package/dist/chunk-7QBNJTTQ.js +3 -0
- package/dist/{chunk-W2O5LWYU.js.map → chunk-7QBNJTTQ.js.map} +1 -1
- package/dist/{chunk-SL6JVGRD.js → chunk-CEUHU3C4.js} +3 -3
- package/dist/{chunk-SL6JVGRD.js.map → chunk-CEUHU3C4.js.map} +1 -1
- package/dist/{chunk-J2FCO6TM.js → chunk-FIHVQFXB.js} +2 -2
- package/dist/{chunk-J2FCO6TM.js.map → chunk-FIHVQFXB.js.map} +1 -1
- package/dist/{chunk-F3MGZ5E6.js → chunk-FVZLCBSX.js} +3 -3
- package/dist/{chunk-F3MGZ5E6.js.map → chunk-FVZLCBSX.js.map} +1 -1
- package/dist/{chunk-7PTP3SQJ.js → chunk-GTS2FODO.js} +32 -7
- package/dist/chunk-GTS2FODO.js.map +1 -0
- package/dist/{chunk-KA46DUM4.js → chunk-I5SGBFMM.js} +51 -3
- package/dist/chunk-I5SGBFMM.js.map +1 -0
- package/dist/{chunk-MO4JPTRD.js → chunk-LDLZFYLR.js} +5 -5
- package/dist/{chunk-MO4JPTRD.js.map → chunk-LDLZFYLR.js.map} +1 -1
- package/dist/{chunk-TKOLD2O7.js → chunk-LDYPQVRU.js} +516 -145
- package/dist/chunk-LDYPQVRU.js.map +1 -0
- package/dist/{chunk-GKM6MDUC.js → chunk-M5JDVO6D.js} +3 -3
- package/dist/{chunk-GKM6MDUC.js.map → chunk-M5JDVO6D.js.map} +1 -1
- package/dist/{chunk-XHFMUGDD.js → chunk-M5TE6YI5.js} +3 -3
- package/dist/{chunk-XHFMUGDD.js.map → chunk-M5TE6YI5.js.map} +1 -1
- package/dist/{chunk-NGC7ZQI4.js → chunk-NICAMYPV.js} +39 -45
- package/dist/chunk-NICAMYPV.js.map +1 -0
- package/dist/{chunk-WIR34WMU.js → chunk-NQL3T75I.js} +24 -59
- package/dist/chunk-NQL3T75I.js.map +1 -0
- package/dist/{chunk-RENHNO4J.js → chunk-P4FYHEHW.js} +206 -137
- package/dist/chunk-P4FYHEHW.js.map +1 -0
- package/dist/{chunk-2DNSSQ22.js → chunk-TWQPDBHB.js} +270 -173
- package/dist/chunk-TWQPDBHB.js.map +1 -0
- package/dist/{chunk-UZVHJ7LX.js → chunk-UBLTUFFI.js} +4 -4
- package/dist/{chunk-UZVHJ7LX.js.map → chunk-UBLTUFFI.js.map} +1 -1
- package/dist/{chunk-X5Y4EGZB.js → chunk-VUCPJBAG.js} +43 -10
- package/dist/chunk-VUCPJBAG.js.map +1 -0
- package/dist/{chunk-PBWMV5GM.js → chunk-WQ7DE5UC.js} +18 -4
- package/dist/chunk-WQ7DE5UC.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +258 -262
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/deploy.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +22 -31
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts +5 -3
- 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/source.d.ts +7 -0
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/ensure-sources.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -0
- package/dist/connectors/config.d.ts +2 -0
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.d.ts +2 -0
- package/dist/connectors/index.js +8 -8
- package/dist/connectors/rclone-config.d.ts +2 -0
- package/dist/connectors/rclone.d.ts +2 -0
- package/dist/connectors-shared/index.d.ts +2 -0
- package/dist/core/discovery.d.ts +2 -0
- package/dist/core/driver-targets.d.ts +2 -0
- package/dist/core/framework.d.ts +2 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.js +5 -5
- package/dist/core/logging.d.ts +2 -0
- package/dist/core/manifest.d.ts +2 -0
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.d.ts +2 -0
- package/dist/core/models.js +1 -1
- package/dist/core/runtime-assets.d.ts +2 -0
- package/dist/core/runtime-assets.js +4 -4
- package/dist/core/src/index.d.ts +7 -5
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +47 -26
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +61 -49
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +79 -36
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/runtime-assets.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts +52 -0
- package/dist/core/src/walker.d.ts.map +1 -0
- package/dist/core/src/workspace-config.d.ts +160 -45
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/src/workspace-yaml-editor.d.ts +33 -16
- package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
- package/dist/core/store.d.ts +2 -0
- package/dist/core/workspace-config.d.ts +2 -0
- package/dist/core/workspace-config.js +3 -3
- package/dist/deploy/index.d.ts +2 -0
- package/dist/deploy/index.js +167 -52
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/src/index.d.ts +4 -3
- package/dist/deploy/src/index.d.ts.map +1 -1
- package/dist/deploy/src/targets/container-runtime.d.ts +1 -0
- package/dist/deploy/src/targets/container-runtime.d.ts.map +1 -1
- package/dist/deploy/src/targets/docker.d.ts +1 -0
- package/dist/deploy/src/targets/docker.d.ts.map +1 -1
- package/dist/deploy/src/targets/local.d.ts.map +1 -1
- package/dist/deploy/src/targets/nix.d.ts +36 -0
- package/dist/deploy/src/targets/nix.d.ts.map +1 -0
- package/dist/deploy/src/targets/podman.d.ts +1 -0
- package/dist/deploy/src/targets/podman.d.ts.map +1 -1
- package/dist/deploy/src/targets/process-handle.d.ts +34 -0
- package/dist/deploy/src/targets/process-handle.d.ts.map +1 -0
- package/dist/discovery/index.d.ts +2 -0
- package/dist/discovery/index.js +3 -3
- package/dist/discovery/src/source-config.d.ts +2 -2
- package/dist/{ensure-sources-COGVKY44.js → ensure-sources-ALTI5PXR.js} +20 -16
- package/dist/ensure-sources-ALTI5PXR.js.map +1 -0
- package/dist/library/index.d.ts +2 -0
- package/dist/library/index.js +4 -4
- package/dist/library/src/remote/remote-catalog-source.d.ts +17 -0
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/open-library-EEGG6RDN.js +13 -0
- package/dist/{open-library-DWAQFUSQ.js.map → open-library-EEGG6RDN.js.map} +1 -1
- package/dist/plugin-registry/index.d.ts +2 -0
- package/dist/plugin-registry/index.js +1 -1
- package/dist/plugin-registry/src/context.d.ts +30 -1
- package/dist/plugin-registry/src/context.d.ts.map +1 -1
- package/dist/plugin-registry/src/deploy-handle.d.ts +17 -1
- package/dist/plugin-registry/src/deploy-handle.d.ts.map +1 -1
- package/dist/plugin-registry/src/deploy-helpers.d.ts +69 -0
- package/dist/plugin-registry/src/deploy-helpers.d.ts.map +1 -0
- package/dist/plugin-registry/src/index.d.ts +6 -4
- package/dist/plugin-registry/src/index.d.ts.map +1 -1
- package/dist/plugin-registry/src/internal.d.ts.map +1 -1
- package/dist/plugin-registry/src/registry.d.ts +1 -0
- package/dist/plugin-registry/src/registry.d.ts.map +1 -1
- package/dist/plugin-registry/src/targets.d.ts +4 -0
- package/dist/plugin-registry/src/targets.d.ts.map +1 -1
- package/dist/{plugin-store-6OENKNFW.js → plugin-store-G277ZX3B.js} +8 -8
- package/dist/{plugin-store-6OENKNFW.js.map → plugin-store-G277ZX3B.js.map} +1 -1
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/src/catalog-source.d.ts +5 -0
- package/dist/plugins/src/catalog-source.d.ts.map +1 -1
- package/dist/resolver/index.d.ts +2 -0
- package/dist/runner/index.d.ts +2 -0
- package/dist/runner/index.js +17 -16
- package/dist/runner/prompt-assembly.d.ts +2 -0
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +7 -0
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.d.ts +2 -0
- package/dist/sdk/asset-manager.js +7 -7
- package/dist/sdk/bridge.d.ts +2 -0
- package/dist/sdk/bridge.js +3 -3
- package/dist/sdk/client.d.ts +2 -0
- package/dist/sdk/core.d.ts +2 -0
- package/dist/sdk/core.js +5 -5
- package/dist/sdk/flow.d.ts +2 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/sdk/index.js +53 -19
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.d.ts +2 -0
- package/dist/sdk/runner.d.ts +2 -0
- package/dist/sdk/runner.js +17 -16
- package/dist/sdk/session.d.ts +2 -0
- package/dist/sdk/src/local-runtime.d.ts +8 -0
- package/dist/sdk/src/local-runtime.d.ts.map +1 -1
- package/dist/sdk/src/transport.d.ts +7 -1
- package/dist/sdk/src/transport.d.ts.map +1 -1
- package/dist/sdk/store.d.ts +2 -0
- package/dist/sdk/telemetry.d.ts +2 -0
- package/dist/sdk/transport/ws/client.d.ts +2 -0
- package/dist/sdk/transport/ws/client.js +2 -1
- package/dist/sdk/transport/ws/server.d.ts +2 -0
- package/dist/sdk/transport/ws/server.js +2 -1
- package/dist/sdk/transport/ws.d.ts +2 -0
- package/dist/sdk/transport/ws.js +4 -3
- package/dist/sdk/transport.d.ts +2 -0
- package/dist/sdk/transport.js +4 -3
- package/dist/sdk/types.d.ts +2 -0
- package/dist/secrets/index.d.ts +2 -0
- package/dist/session/index.d.ts +2 -0
- package/dist/{setup-ACMP3QZC.js → setup-REX4I5NE.js} +10 -10
- package/dist/{setup-ACMP3QZC.js.map → setup-REX4I5NE.js.map} +1 -1
- package/dist/store/index.d.ts +2 -0
- package/dist/store/react.d.ts +2 -0
- package/dist/store/vue.d.ts +2 -0
- package/dist/store-client-IX3Y67NK.js +14 -0
- package/dist/{store-client-ZSLNOOQG.js.map → store-client-IX3Y67NK.js.map} +1 -1
- package/dist/telemetry/index.d.ts +2 -0
- package/dist/transport/index.d.ts +2 -0
- package/dist/transport/index.js +4 -3
- package/dist/transport/src/ws/auth.d.ts +34 -0
- package/dist/transport/src/ws/auth.d.ts.map +1 -0
- package/dist/transport/src/ws/client.d.ts +4 -0
- package/dist/transport/src/ws/client.d.ts.map +1 -1
- package/dist/transport/src/ws/index.d.ts +3 -2
- package/dist/transport/src/ws/index.d.ts.map +1 -1
- package/dist/transport/src/ws/server.d.ts +5 -0
- package/dist/transport/src/ws/server.d.ts.map +1 -1
- package/dist/transport/ws/client.d.ts +2 -0
- package/dist/transport/ws/client.js +2 -1
- package/dist/transport/ws/server.d.ts +2 -0
- package/dist/transport/ws/server.js +2 -1
- package/dist/transport/ws.d.ts +2 -0
- package/dist/transport/ws.js +4 -3
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.js +17 -16
- package/dist/tui/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/manifests.d.ts +2 -0
- package/dist/workspace-plugin/adapters/mcp.d.ts +2 -0
- package/dist/workspace-plugin/adapters/omp.d.ts +2 -0
- package/dist/workspace-plugin/index.d.ts +2 -0
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +4 -2
- package/dist/asset-feeds-PJDJ3QYI.js.map +0 -1
- package/dist/chunk-2DNSSQ22.js.map +0 -1
- package/dist/chunk-7PTP3SQJ.js.map +0 -1
- package/dist/chunk-G6GKWGOW.js.map +0 -1
- package/dist/chunk-IGQEXBBG.js.map +0 -1
- package/dist/chunk-KA46DUM4.js.map +0 -1
- package/dist/chunk-NGC7ZQI4.js.map +0 -1
- package/dist/chunk-PBWMV5GM.js.map +0 -1
- package/dist/chunk-RENHNO4J.js.map +0 -1
- package/dist/chunk-TKOLD2O7.js.map +0 -1
- package/dist/chunk-TTY56FQQ.js.map +0 -1
- package/dist/chunk-UZRY5UI2.js.map +0 -1
- package/dist/chunk-W2O5LWYU.js +0 -3
- package/dist/chunk-WIR34WMU.js.map +0 -1
- package/dist/chunk-X5Y4EGZB.js.map +0 -1
- package/dist/ensure-sources-COGVKY44.js.map +0 -1
- package/dist/open-library-DWAQFUSQ.js +0 -13
- package/dist/store-client-ZSLNOOQG.js +0 -14
package/dist/cli/index.js
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { openCatalogSource, openLibrary, createFullRegistry, openLibraryManager } from '../chunk-UZVHJ7LX.js';
|
|
2
|
+
import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-UBLTUFFI.js';
|
|
4
3
|
import { logErr, S, logOk, colorRef, logInfo, logWarn, kindColorPad, kindColor, formatRelativeTime } from '../chunk-4NDWKA64.js';
|
|
5
|
-
import { getStoreConfig, storeFetch, saveStoreTokens, clearStoreTokens, isStoreAuthenticated } from '../chunk-
|
|
4
|
+
import { getStoreConfig, storeFetch, saveStoreTokens, clearStoreTokens, isStoreAuthenticated } from '../chunk-FVZLCBSX.js';
|
|
5
|
+
import { AI_RESOURCES } from '../chunk-2M3XTMOL.js';
|
|
6
6
|
import { LocalSecretsProvider } from '../chunk-JDX54X4Y.js';
|
|
7
|
-
import { resolveLibraryDir, LocalCatalogSource, skaileHomeDir } from '../chunk-
|
|
7
|
+
import { resolveLibraryDir, LocalCatalogSource, skaileHomeDir } from '../chunk-I5SGBFMM.js';
|
|
8
8
|
import '../chunk-R7FOF242.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-CEUHU3C4.js';
|
|
10
10
|
import '../chunk-OKRUTSG7.js';
|
|
11
|
-
import { runFlow, resumeFlow } from '../chunk-
|
|
11
|
+
import { runFlow, resumeFlow } from '../chunk-3KLWGHDE.js';
|
|
12
12
|
import '../chunk-GCJXPUHG.js';
|
|
13
13
|
import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-IPUYL6TD.js';
|
|
14
|
-
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-
|
|
15
|
-
import { buildClaudePluginFiles } from '../chunk-
|
|
14
|
+
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-NICAMYPV.js';
|
|
15
|
+
import { buildClaudePluginFiles } from '../chunk-FIHVQFXB.js';
|
|
16
16
|
import '../chunk-X5YPJV4N.js';
|
|
17
17
|
import '../chunk-O7SG5PC2.js';
|
|
18
|
-
import '../chunk-
|
|
19
|
-
import '../chunk-
|
|
20
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-7QBNJTTQ.js';
|
|
19
|
+
import '../chunk-GTS2FODO.js';
|
|
20
|
+
import '../chunk-WQ7DE5UC.js';
|
|
21
|
+
import '../chunk-32NA4TVC.js';
|
|
21
22
|
import '../chunk-W3UDISS2.js';
|
|
22
23
|
import '../chunk-TDSRLMDB.js';
|
|
23
|
-
import '../chunk-
|
|
24
|
+
import '../chunk-M5TE6YI5.js';
|
|
24
25
|
import '../chunk-DQWREFRQ.js';
|
|
25
26
|
import '../chunk-KOVLSBXK.js';
|
|
26
27
|
import '../chunk-RRVQAE5D.js';
|
|
27
|
-
import '../chunk-
|
|
28
|
-
import '../chunk-
|
|
29
|
-
import '../chunk-
|
|
28
|
+
import '../chunk-6VTG73UY.js';
|
|
29
|
+
import '../chunk-LV2HPH3C.js';
|
|
30
|
+
import '../chunk-6SA2SIOU.js';
|
|
31
|
+
import '../chunk-M5JDVO6D.js';
|
|
30
32
|
import '../chunk-6MB7CRME.js';
|
|
31
33
|
import '../chunk-QAVZOJCV.js';
|
|
32
|
-
import '../chunk-
|
|
34
|
+
import '../chunk-6E6PKKAD.js';
|
|
33
35
|
import { loadAllFlows } from '../chunk-ICS76R4T.js';
|
|
34
36
|
import '../chunk-GZWJGNNN.js';
|
|
35
37
|
import '../chunk-FVTV7M76.js';
|
|
36
|
-
import { AssetManager } from '../chunk-
|
|
37
|
-
import '../chunk-
|
|
38
|
-
import { readLock, resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor } from '../chunk-
|
|
38
|
+
import { AssetManager } from '../chunk-TWQPDBHB.js';
|
|
39
|
+
import '../chunk-LDLZFYLR.js';
|
|
40
|
+
import { readLock, resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, portableSpawn, portableSpawnSync, WorkspaceYamlEditor } from '../chunk-P4FYHEHW.js';
|
|
39
41
|
import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
|
|
40
42
|
import '../chunk-KLNL7QHN.js';
|
|
41
|
-
import '../chunk-
|
|
42
|
-
import { resolveSkWorkspaceConfig, resolveAgentDir, findWorkspaceRoot, workspaceConfigFilename } from '../chunk-
|
|
43
|
-
import '../chunk-
|
|
44
|
-
import { ASSET_KINDS } from '../chunk-
|
|
43
|
+
import '../chunk-74GTZ4TJ.js';
|
|
44
|
+
import { resolveSkWorkspaceConfig, resolveAgentDir, decodeSkaileYaml, findWorkspaceRoot, workspaceConfigFilename } from '../chunk-LDYPQVRU.js';
|
|
45
|
+
import { parseFrontmatter } from '../chunk-NQL3T75I.js';
|
|
46
|
+
import { ASSET_KINDS } from '../chunk-VUCPJBAG.js';
|
|
45
47
|
import '../chunk-JKNWJ64A.js';
|
|
46
48
|
import { SUPPORTED_DRIVER_TARGETS } from '../chunk-O4JH3KUE.js';
|
|
47
49
|
import { openSqlite } from '../chunk-24UIWON4.js';
|
|
@@ -50,10 +52,9 @@ import '../chunk-UQ6LFBPZ.js';
|
|
|
50
52
|
import '../chunk-6FNCZYJY.js';
|
|
51
53
|
import '../chunk-NELZIQ2E.js';
|
|
52
54
|
import '../chunk-CGYEHQOX.js';
|
|
53
|
-
import '../chunk-LV2HPH3C.js';
|
|
54
55
|
import '../chunk-NSBPE2FW.js';
|
|
55
56
|
import * as fs10 from 'fs';
|
|
56
|
-
import fs10__default, { readFileSync, existsSync, writeFileSync, rmSync, statSync } from 'fs';
|
|
57
|
+
import fs10__default, { readFileSync, existsSync, writeFileSync, readdirSync, rmSync, statSync } from 'fs';
|
|
57
58
|
import * as path14 from 'path';
|
|
58
59
|
import path14__default, { resolve, join } from 'path';
|
|
59
60
|
import { fileURLToPath } from 'url';
|
|
@@ -309,7 +310,7 @@ function makeSearchCommand() {
|
|
|
309
310
|
}
|
|
310
311
|
if (showStore) {
|
|
311
312
|
try {
|
|
312
|
-
const { getStoreConfig: getStoreConfig2, storeFetch: storeFetch2 } = await import('../store-client-
|
|
313
|
+
const { getStoreConfig: getStoreConfig2, storeFetch: storeFetch2 } = await import('../store-client-IX3Y67NK.js');
|
|
313
314
|
const config = getStoreConfig2();
|
|
314
315
|
const params = {};
|
|
315
316
|
if (query) params.q = query;
|
|
@@ -336,7 +337,7 @@ function makeSearchCommand() {
|
|
|
336
337
|
});
|
|
337
338
|
}
|
|
338
339
|
function makeAddCommand() {
|
|
339
|
-
return new Command("add").description("Add to skaile.yaml + deploy").argument("<ref>", "Asset reference (kind:name[@repo])").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Deploy to global dir (~/.claude)").option("--target <agent>", "Driver target", "claude-code").action((ref, opts) => {
|
|
340
|
+
return new Command("add").description("Add to skaile.yaml + deploy").argument("<ref>", "Asset reference (kind:name[@repo])").option("--project-dir <path>", "Project directory", process.cwd()).option("--global", "Deploy to global dir (~/.claude)").option("--target <agent>", "Driver target", "claude-code").action(async (ref, opts) => {
|
|
340
341
|
const am2 = new AssetManager({
|
|
341
342
|
projectDir: path14__default.resolve(opts.projectDir),
|
|
342
343
|
global: opts.global,
|
|
@@ -345,7 +346,7 @@ function makeAddCommand() {
|
|
|
345
346
|
const spinner5 = p5.spinner();
|
|
346
347
|
spinner5.start(`Adding ${ref}`);
|
|
347
348
|
try {
|
|
348
|
-
const added = am2.add(ref);
|
|
349
|
+
const added = await am2.add(ref);
|
|
349
350
|
spinner5.stop("Done");
|
|
350
351
|
if (added.length === 0) logInfo("Nothing added (already up to date or not found).");
|
|
351
352
|
else for (const a of added) logOk(a);
|
|
@@ -411,7 +412,7 @@ function makeInfoCommand() {
|
|
|
411
412
|
console.log(` kind: ${kindColor(entry.kind)}`);
|
|
412
413
|
if (entry.version) console.log(` version: ${entry.version}`);
|
|
413
414
|
if (entry.description) console.log(` description: ${entry.description}`);
|
|
414
|
-
if (entry.
|
|
415
|
+
if (entry.publisher) console.log(` repository: ${S.dim(entry.publisher)}`);
|
|
415
416
|
console.log(` source: ${S.dim(entry.source)}`);
|
|
416
417
|
if (entry.requires.length) {
|
|
417
418
|
console.log(` requires:`);
|
|
@@ -471,7 +472,7 @@ function makeCatalogCommand() {
|
|
|
471
472
|
const cfg = resolveConfig({ projectDir });
|
|
472
473
|
const baseUrl = opts.url ?? cfg.catalog.url;
|
|
473
474
|
if (isLocalCatalogUrl(baseUrl)) {
|
|
474
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
475
|
+
const { resolveCatalogSource } = await import('../open-library-EEGG6RDN.js');
|
|
475
476
|
let resolved;
|
|
476
477
|
try {
|
|
477
478
|
resolved = await resolveCatalogSource({ projectDir: opts.projectDir });
|
|
@@ -1432,7 +1433,7 @@ async function ensureTargetsRegistered(projectDir) {
|
|
|
1432
1433
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
1433
1434
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
1434
1435
|
if (config.plugins && config.plugins.length > 0) {
|
|
1435
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
1436
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-G277ZX3B.js');
|
|
1436
1437
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
1437
1438
|
for (const f of result.failed) logWarn(f.error);
|
|
1438
1439
|
}
|
|
@@ -1443,9 +1444,10 @@ async function runUp(opts) {
|
|
|
1443
1444
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
1444
1445
|
const { resolveDeployTarget, pluginRegistry } = await import('../plugin-registry/index.js');
|
|
1445
1446
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
1447
|
+
const overrideConfig = opts.target === config.deploy?.target ? config.deploy?.config : void 0;
|
|
1446
1448
|
const resolution = await resolveDeployTarget(
|
|
1447
1449
|
{ deploy: config.deploy },
|
|
1448
|
-
opts.target ? { target: opts.target, config:
|
|
1450
|
+
opts.target ? { target: opts.target, config: overrideConfig, reason: "cli --target" } : void 0,
|
|
1449
1451
|
pluginRegistry
|
|
1450
1452
|
);
|
|
1451
1453
|
const { ctx, controller } = await buildDeployContext(projectDir);
|
|
@@ -1493,8 +1495,15 @@ async function restoreFromHandle(projectDir) {
|
|
|
1493
1495
|
logErr(`unknown deploy target "${stored.targetId}" \u2014 is its plugin installed?`);
|
|
1494
1496
|
return null;
|
|
1495
1497
|
}
|
|
1498
|
+
const parsed = target.payloadSchema.safeParse(stored.payload);
|
|
1499
|
+
if (!parsed.success) {
|
|
1500
|
+
logErr(
|
|
1501
|
+
`deploy handle for "${stored.targetId}" is malformed: ${parsed.error.message}. Remove ${S.cmd(".skaile/deploy/handle.json")} to reset.`
|
|
1502
|
+
);
|
|
1503
|
+
return null;
|
|
1504
|
+
}
|
|
1496
1505
|
const { ctx } = await buildDeployContext(projectDir);
|
|
1497
|
-
const handle = await target.restore(
|
|
1506
|
+
const handle = await target.restore(parsed.data, ctx);
|
|
1498
1507
|
return { target, handle, ctx };
|
|
1499
1508
|
}
|
|
1500
1509
|
async function runDown(opts) {
|
|
@@ -2195,45 +2204,25 @@ var state = {
|
|
|
2195
2204
|
pendingAdds: /* @__PURE__ */ new Set(),
|
|
2196
2205
|
pendingRemoves: /* @__PURE__ */ new Set(),
|
|
2197
2206
|
collapsedSources: /* @__PURE__ */ new Set(),
|
|
2198
|
-
|
|
2207
|
+
collapsedRepos: /* @__PURE__ */ new Set(),
|
|
2199
2208
|
message: "",
|
|
2200
2209
|
cols: 80,
|
|
2201
2210
|
awaitingExitConfirm: false
|
|
2202
2211
|
};
|
|
2203
|
-
function buildVisibleRows(rows, collapsedSources,
|
|
2212
|
+
function buildVisibleRows(rows, collapsedSources, collapsedRepos) {
|
|
2204
2213
|
return rows.filter((row) => {
|
|
2205
|
-
if (row.type === "
|
|
2206
|
-
if (row.type === "header") {
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
const
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
});
|
|
2215
|
-
}
|
|
2216
|
-
function compareDomainPaths(a, b) {
|
|
2217
|
-
const A = a.split("/");
|
|
2218
|
-
const B = b.split("/");
|
|
2219
|
-
const len = Math.min(A.length, B.length);
|
|
2220
|
-
for (let i = 0; i < len; i++) {
|
|
2221
|
-
const c = A[i].localeCompare(B[i]);
|
|
2222
|
-
if (c !== 0) return c;
|
|
2223
|
-
}
|
|
2224
|
-
return A.length - B.length;
|
|
2225
|
-
}
|
|
2226
|
-
function hasCollapsedAncestor(source, domain, collapsedDomains, strict) {
|
|
2227
|
-
const segs = domain.split("/");
|
|
2228
|
-
const upper = strict ? segs.length : segs.length + 1;
|
|
2229
|
-
for (let i = 1; i < upper; i++) {
|
|
2230
|
-
const prefix = segs.slice(0, i).join("/");
|
|
2231
|
-
if (collapsedDomains.has(`${source}:${prefix}`)) return true;
|
|
2232
|
-
}
|
|
2233
|
-
return false;
|
|
2214
|
+
if (row.type === "publisher-header") return true;
|
|
2215
|
+
if (row.type === "repo-header") {
|
|
2216
|
+
return !collapsedSources.has(row.source);
|
|
2217
|
+
}
|
|
2218
|
+
const publisher = row.entry?.publisher || "other";
|
|
2219
|
+
if (collapsedSources.has(publisher)) return false;
|
|
2220
|
+
const repo = row.entry?.repo || "";
|
|
2221
|
+
return repo === "" || !collapsedRepos.has(`${publisher}:${repo}`);
|
|
2222
|
+
});
|
|
2234
2223
|
}
|
|
2235
|
-
function
|
|
2236
|
-
return rows.filter((r) => isAsset(r) &&
|
|
2224
|
+
function repoAssetRefs(rows, publisher, repo) {
|
|
2225
|
+
return rows.filter((r) => isAsset(r) && inRepo(r, publisher, repo)).map((r) => assetRefOf(r));
|
|
2237
2226
|
}
|
|
2238
2227
|
function sourceAssetRefs(rows, source) {
|
|
2239
2228
|
return rows.filter((r) => isAsset(r) && inSource(r, source)).map((r) => assetRefOf(r));
|
|
@@ -2242,12 +2231,11 @@ function isAsset(r) {
|
|
|
2242
2231
|
return r.type === "asset";
|
|
2243
2232
|
}
|
|
2244
2233
|
function inSource(r, source) {
|
|
2245
|
-
return (r.entry?.
|
|
2234
|
+
return (r.entry?.publisher || "other") === source;
|
|
2246
2235
|
}
|
|
2247
|
-
function
|
|
2248
|
-
if (!inSource(r,
|
|
2249
|
-
|
|
2250
|
-
return d === domain || d.startsWith(`${domain}/`);
|
|
2236
|
+
function inRepo(r, publisher, repo) {
|
|
2237
|
+
if (!inSource(r, publisher)) return false;
|
|
2238
|
+
return (r.entry?.repo || "") === repo;
|
|
2251
2239
|
}
|
|
2252
2240
|
function assetRefOf(r) {
|
|
2253
2241
|
if (!isAsset(r) || !r.entry) return null;
|
|
@@ -2289,48 +2277,38 @@ function bulkSelection(refs, action3) {
|
|
|
2289
2277
|
for (const ref of refs) setSelection(ref, action3);
|
|
2290
2278
|
}
|
|
2291
2279
|
function actOnHeader(row, action3) {
|
|
2292
|
-
if (row.type === "
|
|
2280
|
+
if (row.type === "publisher-header") {
|
|
2293
2281
|
bulkSelection(sourceAssetRefs(state.assetRows, row.source), action3);
|
|
2294
2282
|
return true;
|
|
2295
2283
|
}
|
|
2296
|
-
if (row.type === "header") {
|
|
2297
|
-
bulkSelection(
|
|
2284
|
+
if (row.type === "repo-header") {
|
|
2285
|
+
bulkSelection(repoAssetRefs(state.assetRows, row.source, row.repo), action3);
|
|
2298
2286
|
return true;
|
|
2299
2287
|
}
|
|
2300
2288
|
return false;
|
|
2301
2289
|
}
|
|
2302
2290
|
async function loadAssets() {
|
|
2303
|
-
const { gatherAssetFeeds } = await import('../asset-feeds-
|
|
2291
|
+
const { gatherAssetFeeds } = await import('../asset-feeds-2M6UKEJ7.js');
|
|
2304
2292
|
const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
|
|
2305
2293
|
if (notes.length > 0) {
|
|
2306
2294
|
state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
|
|
2307
2295
|
}
|
|
2308
2296
|
const installed = new Set(am.listDeployed().map((e) => `${e.kind}:${e.name}`));
|
|
2309
|
-
const
|
|
2297
|
+
const byPublisher = /* @__PURE__ */ new Map();
|
|
2310
2298
|
for (const e of entries) {
|
|
2311
|
-
const
|
|
2312
|
-
const
|
|
2313
|
-
if (!
|
|
2314
|
-
const
|
|
2315
|
-
if (!
|
|
2316
|
-
|
|
2299
|
+
const publisher = e.publisher || "other";
|
|
2300
|
+
const repo = e.repo || "";
|
|
2301
|
+
if (!byPublisher.has(publisher)) byPublisher.set(publisher, /* @__PURE__ */ new Map());
|
|
2302
|
+
const byRepo = byPublisher.get(publisher);
|
|
2303
|
+
if (!byRepo.has(repo)) byRepo.set(repo, []);
|
|
2304
|
+
byRepo.get(repo).push(e);
|
|
2317
2305
|
}
|
|
2318
2306
|
const rows = [];
|
|
2319
|
-
for (const [
|
|
2307
|
+
for (const [publisher, byRepo] of [...byPublisher.entries()].sort(
|
|
2320
2308
|
(a, b) => a[0].localeCompare(b[0])
|
|
2321
2309
|
)) {
|
|
2322
|
-
rows.push({ type: "
|
|
2323
|
-
const
|
|
2324
|
-
for (const [domain, items] of [...domainMap.entries()].sort(
|
|
2325
|
-
(a, b) => compareDomainPaths(a[0], b[0])
|
|
2326
|
-
)) {
|
|
2327
|
-
const segs = domain.split("/");
|
|
2328
|
-
for (let i = 1; i <= segs.length; i++) {
|
|
2329
|
-
const prefix = segs.slice(0, i).join("/");
|
|
2330
|
-
if (emittedHeaders.has(prefix)) continue;
|
|
2331
|
-
rows.push({ type: "header", source, domain: prefix, depth: i });
|
|
2332
|
-
emittedHeaders.add(prefix);
|
|
2333
|
-
}
|
|
2310
|
+
rows.push({ type: "publisher-header", source: publisher });
|
|
2311
|
+
const pushAssets = (items) => {
|
|
2334
2312
|
items.sort(
|
|
2335
2313
|
(a, b) => a.kind !== b.kind ? a.kind.localeCompare(b.kind) : a.name.localeCompare(b.name)
|
|
2336
2314
|
);
|
|
@@ -2338,26 +2316,34 @@ async function loadAssets() {
|
|
|
2338
2316
|
const ref = `${entry.kind}:${entry.name}`;
|
|
2339
2317
|
rows.push({ type: "asset", entry, installed: installed.has(ref) });
|
|
2340
2318
|
}
|
|
2319
|
+
};
|
|
2320
|
+
const noRepo = byRepo.get("");
|
|
2321
|
+
if (noRepo) pushAssets(noRepo);
|
|
2322
|
+
for (const [repo, items] of [...byRepo.entries()].filter(([r]) => r !== "").sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
2323
|
+
rows.push({ type: "repo-header", source: publisher, repo });
|
|
2324
|
+
pushAssets(items);
|
|
2341
2325
|
}
|
|
2342
2326
|
}
|
|
2343
2327
|
state.assetRows = rows;
|
|
2344
|
-
const newSources = new Set(
|
|
2328
|
+
const newSources = new Set(
|
|
2329
|
+
rows.filter((r) => r.type === "publisher-header").map((r) => r.source)
|
|
2330
|
+
);
|
|
2345
2331
|
for (const s of state.collapsedSources) {
|
|
2346
2332
|
if (!newSources.has(s)) state.collapsedSources.delete(s);
|
|
2347
2333
|
}
|
|
2348
|
-
const
|
|
2349
|
-
rows.filter((r) => r.type === "header").map((r) => `${r.source}:${r.
|
|
2334
|
+
const newRepoKeys = new Set(
|
|
2335
|
+
rows.filter((r) => r.type === "repo-header").map((r) => `${r.source}:${r.repo}`)
|
|
2350
2336
|
);
|
|
2351
|
-
for (const d of state.
|
|
2352
|
-
if (!
|
|
2337
|
+
for (const d of state.collapsedRepos) {
|
|
2338
|
+
if (!newRepoKeys.has(d)) state.collapsedRepos.delete(d);
|
|
2353
2339
|
}
|
|
2354
|
-
for (const d of
|
|
2340
|
+
for (const d of newRepoKeys) state.collapsedRepos.add(d);
|
|
2355
2341
|
rebuildVisible();
|
|
2356
2342
|
}
|
|
2357
2343
|
async function loadSourcesAndLibraries() {
|
|
2358
2344
|
try {
|
|
2359
2345
|
const [{ openLibraryManager: openLibraryManager2 }, { skaileHomeDir: skaileHomeDir2 }] = await Promise.all([
|
|
2360
|
-
import('../open-library-
|
|
2346
|
+
import('../open-library-EEGG6RDN.js'),
|
|
2361
2347
|
import('../library/index.js')
|
|
2362
2348
|
]);
|
|
2363
2349
|
const { manager, library, close } = await openLibraryManager2();
|
|
@@ -2396,7 +2382,7 @@ function rebuildVisible() {
|
|
|
2396
2382
|
state.visibleRows = buildVisibleRows(
|
|
2397
2383
|
state.assetRows,
|
|
2398
2384
|
state.collapsedSources,
|
|
2399
|
-
state.
|
|
2385
|
+
state.collapsedRepos
|
|
2400
2386
|
);
|
|
2401
2387
|
clampCursor();
|
|
2402
2388
|
}
|
|
@@ -2504,7 +2490,7 @@ function renderHeaderLine(opts) {
|
|
|
2504
2490
|
return opts.selected ? pc5.bgWhite(pc5.black(`${line} `.padEnd(state.cols))) : line;
|
|
2505
2491
|
}
|
|
2506
2492
|
function renderAssetRow(row, selected) {
|
|
2507
|
-
if (row.type === "
|
|
2493
|
+
if (row.type === "publisher-header") {
|
|
2508
2494
|
return renderHeaderLine({
|
|
2509
2495
|
indent: " ",
|
|
2510
2496
|
collapsed: state.collapsedSources.has(row.source),
|
|
@@ -2514,16 +2500,15 @@ function renderAssetRow(row, selected) {
|
|
|
2514
2500
|
selected
|
|
2515
2501
|
});
|
|
2516
2502
|
}
|
|
2517
|
-
if (row.type === "header") {
|
|
2518
|
-
const
|
|
2519
|
-
const
|
|
2520
|
-
const segment = segs[segs.length - 1];
|
|
2503
|
+
if (row.type === "repo-header") {
|
|
2504
|
+
const slug = row.repo;
|
|
2505
|
+
const bare = slug.includes("/") ? slug.slice(slug.indexOf("/") + 1) : slug;
|
|
2521
2506
|
return renderHeaderLine({
|
|
2522
|
-
indent: " ".repeat(
|
|
2523
|
-
collapsed: state.
|
|
2524
|
-
match: (r) => isAsset(r) &&
|
|
2525
|
-
refs:
|
|
2526
|
-
label: pc5.bold(
|
|
2507
|
+
indent: " ".repeat(3),
|
|
2508
|
+
collapsed: state.collapsedRepos.has(`${row.source}:${slug}`),
|
|
2509
|
+
match: (r) => isAsset(r) && inRepo(r, row.source, slug),
|
|
2510
|
+
refs: repoAssetRefs(state.assetRows, row.source, slug),
|
|
2511
|
+
label: pc5.bold(bare),
|
|
2527
2512
|
selected
|
|
2528
2513
|
});
|
|
2529
2514
|
}
|
|
@@ -2536,10 +2521,10 @@ function renderAssetRow(row, selected) {
|
|
|
2536
2521
|
else status4 = pc5.dim("\xB7 ");
|
|
2537
2522
|
const kind = kindColorPad(e.kind, 8);
|
|
2538
2523
|
const name = e.name.padEnd(30);
|
|
2524
|
+
const badge = e.category ? `${pc5.dim("[")}${pc5.cyan(e.category)}${pc5.dim("]")} ` : "";
|
|
2539
2525
|
const desc = e.description?.slice(0, state.cols - 52) ?? "";
|
|
2540
|
-
const
|
|
2541
|
-
const
|
|
2542
|
-
const line = `${indent}${status4} ${kind} ${name} ${pc5.dim(desc)}`;
|
|
2526
|
+
const indent = " ".repeat(e.repo ? 5 : 3);
|
|
2527
|
+
const line = `${indent}${status4} ${kind} ${name} ${badge}${pc5.dim(desc)}`;
|
|
2543
2528
|
return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
|
|
2544
2529
|
}
|
|
2545
2530
|
function renderSourceRow(row, selected) {
|
|
@@ -2654,7 +2639,7 @@ async function showInfo() {
|
|
|
2654
2639
|
console.log(` ${S.rule(50)}`);
|
|
2655
2640
|
if (e.version) console.log(` version: ${e.version}`);
|
|
2656
2641
|
if (e.description) console.log(` description: ${e.description}`);
|
|
2657
|
-
if (e.
|
|
2642
|
+
if (e.publisher) console.log(` source: ${pc5.dim(e.publisher)}`);
|
|
2658
2643
|
console.log(` manifest: ${pc5.dim(e.source)}`);
|
|
2659
2644
|
console.log(` installed: ${row.installed ? pc5.green("yes") : pc5.red("no")}`);
|
|
2660
2645
|
if (e.requires.length) {
|
|
@@ -2678,13 +2663,13 @@ async function showInfo() {
|
|
|
2678
2663
|
function expandUnderCursor() {
|
|
2679
2664
|
const row = state.visibleRows[state.cursor];
|
|
2680
2665
|
if (!row) return;
|
|
2681
|
-
if (row.type === "
|
|
2666
|
+
if (row.type === "publisher-header" && state.collapsedSources.has(row.source)) {
|
|
2682
2667
|
state.collapsedSources.delete(row.source);
|
|
2683
2668
|
rebuildVisible();
|
|
2684
|
-
} else if (row.type === "header") {
|
|
2685
|
-
const dk = `${row.source}:${row.
|
|
2686
|
-
if (state.
|
|
2687
|
-
state.
|
|
2669
|
+
} else if (row.type === "repo-header") {
|
|
2670
|
+
const dk = `${row.source}:${row.repo}`;
|
|
2671
|
+
if (state.collapsedRepos.has(dk)) {
|
|
2672
|
+
state.collapsedRepos.delete(dk);
|
|
2688
2673
|
rebuildVisible();
|
|
2689
2674
|
}
|
|
2690
2675
|
}
|
|
@@ -2692,23 +2677,23 @@ function expandUnderCursor() {
|
|
|
2692
2677
|
function collapseOrJumpUnderCursor() {
|
|
2693
2678
|
const row = state.visibleRows[state.cursor];
|
|
2694
2679
|
if (!row) return;
|
|
2695
|
-
if (row.type === "
|
|
2680
|
+
if (row.type === "publisher-header") {
|
|
2696
2681
|
if (!state.collapsedSources.has(row.source)) {
|
|
2697
2682
|
state.collapsedSources.add(row.source);
|
|
2698
2683
|
rebuildVisible();
|
|
2699
2684
|
}
|
|
2700
2685
|
return;
|
|
2701
2686
|
}
|
|
2702
|
-
if (row.type === "header") {
|
|
2703
|
-
const dk = `${row.source}:${row.
|
|
2704
|
-
if (!state.
|
|
2705
|
-
state.
|
|
2687
|
+
if (row.type === "repo-header") {
|
|
2688
|
+
const dk = `${row.source}:${row.repo}`;
|
|
2689
|
+
if (!state.collapsedRepos.has(dk)) {
|
|
2690
|
+
state.collapsedRepos.add(dk);
|
|
2706
2691
|
rebuildVisible();
|
|
2707
2692
|
} else {
|
|
2708
2693
|
const idx2 = findLastIndex(
|
|
2709
2694
|
state.visibleRows,
|
|
2710
2695
|
state.cursor,
|
|
2711
|
-
(r) => r.type === "
|
|
2696
|
+
(r) => r.type === "publisher-header"
|
|
2712
2697
|
);
|
|
2713
2698
|
if (idx2 >= 0) state.cursor = idx2;
|
|
2714
2699
|
}
|
|
@@ -2717,7 +2702,7 @@ function collapseOrJumpUnderCursor() {
|
|
|
2717
2702
|
const idx = findLastIndex(
|
|
2718
2703
|
state.visibleRows,
|
|
2719
2704
|
state.cursor,
|
|
2720
|
-
(r) => r.type === "header" || r.type === "
|
|
2705
|
+
(r) => r.type === "repo-header" || r.type === "publisher-header"
|
|
2721
2706
|
);
|
|
2722
2707
|
if (idx >= 0) state.cursor = idx;
|
|
2723
2708
|
}
|
|
@@ -2904,67 +2889,61 @@ function makeMcpServerCommand() {
|
|
|
2904
2889
|
function makeNpxCommand() {
|
|
2905
2890
|
const npx = new Command("npx").description("Compatibility shim for npx skills syntax");
|
|
2906
2891
|
const skills = npx.command("skills").description("Skill installation from external repos");
|
|
2907
|
-
skills.command("add <url>").description(
|
|
2892
|
+
skills.command("add <url>").description(
|
|
2893
|
+
"Clone a repo, register it in the project's skaile.yaml sources[], and install a skill from it"
|
|
2894
|
+
).requiredOption("--skill <name>", "Skill name to install from the repo").option("--project-dir <path>", "Project directory", process.cwd()).option("--target <agent>", "Agent framework", "claude-code").option("--global", "Deploy globally").action(async (url, opts) => {
|
|
2908
2895
|
const projectDir = path14__default.resolve(opts.projectDir);
|
|
2909
|
-
const
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
spinner5.stop(`Cloned to ${path14__default.basename(sourcePath)}`);
|
|
2920
|
-
} catch (err) {
|
|
2921
|
-
spinner5.stop("Clone failed");
|
|
2922
|
-
logErr(err instanceof Error ? err.message : String(err));
|
|
2923
|
-
process.exit(1);
|
|
2924
|
-
}
|
|
2925
|
-
} else {
|
|
2926
|
-
sourcePath = path14__default.resolve(url);
|
|
2927
|
-
if (!existsSync(sourcePath)) {
|
|
2928
|
-
logErr(`Path does not exist: ${sourcePath}`);
|
|
2929
|
-
process.exit(1);
|
|
2930
|
-
}
|
|
2896
|
+
const projYaml = path14__default.join(projectDir, "skaile.yaml");
|
|
2897
|
+
if (!existsSync(projYaml)) {
|
|
2898
|
+
logErr(`No skaile.yaml in ${projectDir} \u2014 run \`skaile init\` first.`);
|
|
2899
|
+
process.exit(1);
|
|
2900
|
+
}
|
|
2901
|
+
if (!/^(?:https?:|git@|git:)/.test(url)) {
|
|
2902
|
+
logErr(
|
|
2903
|
+
"npx skills add requires a git URL \u2014 resolution runs through the project's sources[]."
|
|
2904
|
+
);
|
|
2905
|
+
process.exit(1);
|
|
2931
2906
|
}
|
|
2932
|
-
const
|
|
2907
|
+
const spinner5 = p5.spinner();
|
|
2908
|
+
const slug = sourceSlug(url);
|
|
2909
|
+
const clonePath = path14__default.join(homedir(), ".skaile", "sources", slug);
|
|
2910
|
+
spinner5.start(`Cloning ${url}`);
|
|
2933
2911
|
try {
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
if (!source) {
|
|
2937
|
-
source = await library.addSource({
|
|
2938
|
-
backend: "local",
|
|
2939
|
-
name: path14__default.basename(sourcePath),
|
|
2940
|
-
path: sourcePath,
|
|
2941
|
-
ownership: "owner"
|
|
2942
|
-
});
|
|
2912
|
+
if (!existsSync(clonePath)) {
|
|
2913
|
+
execSync(`git clone ${url} ${clonePath}`, { stdio: "ignore" });
|
|
2943
2914
|
}
|
|
2944
|
-
spinner5.
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2915
|
+
spinner5.stop(`Cloned to ${slug}`);
|
|
2916
|
+
} catch (err) {
|
|
2917
|
+
spinner5.stop("Clone failed");
|
|
2918
|
+
logErr(err instanceof Error ? err.message : String(err));
|
|
2919
|
+
process.exit(1);
|
|
2920
|
+
}
|
|
2921
|
+
const editor = WorkspaceYamlEditor.load(projYaml);
|
|
2922
|
+
editor.setSource({ url });
|
|
2923
|
+
editor.save();
|
|
2924
|
+
const publisher = resolvePublisher(clonePath, url);
|
|
2925
|
+
if (!publisher) {
|
|
2926
|
+
logErr(
|
|
2927
|
+
`Could not determine the publisher for "${opts.skill}". Declare \`publisher:\` in the source's skaile.yaml, or use a github URL.`
|
|
2928
|
+
);
|
|
2929
|
+
process.exit(1);
|
|
2930
|
+
}
|
|
2931
|
+
const skillName = resolveSkillName(clonePath, opts.skill);
|
|
2932
|
+
if (skillName !== opts.skill) {
|
|
2933
|
+
logInfo(`Resolved "${opts.skill}" \u2192 directory "${skillName}".`);
|
|
2953
2934
|
}
|
|
2954
|
-
const skillRef = `skill:${
|
|
2935
|
+
const skillRef = `skill:${skillName}@${publisher}`;
|
|
2955
2936
|
const am2 = new AssetManager({ projectDir, global: opts.global, driverTarget: opts.target });
|
|
2956
2937
|
spinner5.start(`Installing ${skillRef}`);
|
|
2957
2938
|
try {
|
|
2958
|
-
const added = am2.add(skillRef);
|
|
2939
|
+
const added = await am2.add(skillRef);
|
|
2959
2940
|
spinner5.stop("Done");
|
|
2960
2941
|
if (added.length === 0) {
|
|
2961
2942
|
logInfo(`${opts.skill} already deployed or not found in source.`);
|
|
2962
2943
|
} else {
|
|
2963
2944
|
for (const a of added) logOk(a);
|
|
2964
2945
|
}
|
|
2965
|
-
logInfo(
|
|
2966
|
-
`Source registered at ${S.dim(sourcePath)} \u2014 manage via ${S.cmd("skaile source")}.`
|
|
2967
|
-
);
|
|
2946
|
+
logInfo(`Source registered in skaile.yaml \u2014 manage via ${S.cmd("skaile source")}.`);
|
|
2968
2947
|
} catch (err) {
|
|
2969
2948
|
spinner5.stop("Failed");
|
|
2970
2949
|
logErr(err.message);
|
|
@@ -2975,25 +2954,37 @@ function makeNpxCommand() {
|
|
|
2975
2954
|
skills.action(() => skills.help());
|
|
2976
2955
|
return npx;
|
|
2977
2956
|
}
|
|
2978
|
-
function
|
|
2979
|
-
const
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
}
|
|
2996
|
-
|
|
2957
|
+
function resolvePublisher(clonePath, url) {
|
|
2958
|
+
const yamlPath = path14__default.join(clonePath, "skaile.yaml");
|
|
2959
|
+
if (existsSync(yamlPath)) {
|
|
2960
|
+
try {
|
|
2961
|
+
const { config } = decodeSkaileYaml(readFileSync(yamlPath, "utf8"));
|
|
2962
|
+
if (typeof config.publisher === "string" && config.publisher.length > 0) {
|
|
2963
|
+
return config.publisher;
|
|
2964
|
+
}
|
|
2965
|
+
} catch {
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2968
|
+
return url.match(/github\.com[/:]([^/]+)\/[^/]+/)?.[1];
|
|
2969
|
+
}
|
|
2970
|
+
function resolveSkillName(clonePath, requested) {
|
|
2971
|
+
const skillsDir = path14__default.join(clonePath, "skills");
|
|
2972
|
+
if (existsSync(path14__default.join(skillsDir, requested, "SKILL.md"))) return requested;
|
|
2973
|
+
if (!existsSync(skillsDir)) return requested;
|
|
2974
|
+
for (const entry of readdirSync(skillsDir, { withFileTypes: true })) {
|
|
2975
|
+
if (!entry.isDirectory()) continue;
|
|
2976
|
+
const md = path14__default.join(skillsDir, entry.name, "SKILL.md");
|
|
2977
|
+
if (!existsSync(md)) continue;
|
|
2978
|
+
try {
|
|
2979
|
+
const { data } = parseFrontmatter(readFileSync(md, "utf8"));
|
|
2980
|
+
if (typeof data.name === "string" && data.name === requested) return entry.name;
|
|
2981
|
+
} catch {
|
|
2982
|
+
}
|
|
2983
|
+
}
|
|
2984
|
+
return requested;
|
|
2985
|
+
}
|
|
2986
|
+
function sourceSlug(url) {
|
|
2987
|
+
return url.replace(/\.git$/, "").split(/[/:]/).pop() ?? "source";
|
|
2997
2988
|
}
|
|
2998
2989
|
var SKAILE_MCP_NAME = "skaile-workspace";
|
|
2999
2990
|
var MCP_SERVER_ENTRY = {
|
|
@@ -3620,7 +3611,7 @@ function makeOutdatedCommand() {
|
|
|
3620
3611
|
console.log(` ${S.rule(nameW + 40)}`);
|
|
3621
3612
|
for (const e of filtered) {
|
|
3622
3613
|
console.log(
|
|
3623
|
-
` ${kindColorPad(e.kind)} ${e.name.padEnd(nameW)} ${S.dim(e.
|
|
3614
|
+
` ${kindColorPad(e.kind)} ${e.name.padEnd(nameW)} ${S.dim(e.publisher)} ${pc5.yellow(`${e.behind} commit(s) behind`)}`
|
|
3624
3615
|
);
|
|
3625
3616
|
}
|
|
3626
3617
|
console.log();
|
|
@@ -3683,7 +3674,7 @@ function action2(fn) {
|
|
|
3683
3674
|
};
|
|
3684
3675
|
}
|
|
3685
3676
|
async function reconcileAndReport(projectDir, plugins) {
|
|
3686
|
-
const { reconcilePlugins } = await import('../plugin-store-
|
|
3677
|
+
const { reconcilePlugins } = await import('../plugin-store-G277ZX3B.js');
|
|
3687
3678
|
if (plugins.length === 0) {
|
|
3688
3679
|
logInfo("No plugins declared \u2014 nothing to reconcile.");
|
|
3689
3680
|
return;
|
|
@@ -3699,7 +3690,7 @@ async function reconcileAndReport(projectDir, plugins) {
|
|
|
3699
3690
|
async function runInstall2(spec, opts) {
|
|
3700
3691
|
const projectDir = path14__default.resolve(opts.projectDir);
|
|
3701
3692
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
3702
|
-
const { specName } = await import('../plugin-store-
|
|
3693
|
+
const { specName } = await import('../plugin-store-G277ZX3B.js');
|
|
3703
3694
|
const yamlPath = path14__default.join(projectDir, "skaile.yaml");
|
|
3704
3695
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
3705
3696
|
const replaced = editor.addPlugin(spec, specName);
|
|
@@ -3711,7 +3702,7 @@ async function runInstall2(spec, opts) {
|
|
|
3711
3702
|
async function runRemove(name, opts) {
|
|
3712
3703
|
const projectDir = path14__default.resolve(opts.projectDir);
|
|
3713
3704
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
3714
|
-
const { specName } = await import('../plugin-store-
|
|
3705
|
+
const { specName } = await import('../plugin-store-G277ZX3B.js');
|
|
3715
3706
|
const yamlPath = path14__default.join(projectDir, "skaile.yaml");
|
|
3716
3707
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
3717
3708
|
const removed = editor.removePlugin(name, specName);
|
|
@@ -3739,7 +3730,7 @@ async function runList(opts) {
|
|
|
3739
3730
|
const registry = createPluginRegistry();
|
|
3740
3731
|
if (declared.length > 0) {
|
|
3741
3732
|
try {
|
|
3742
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
3733
|
+
const { loadPlugins } = await import('../plugin-store-G277ZX3B.js');
|
|
3743
3734
|
const result = await loadPlugins(projectDir, declared, registry);
|
|
3744
3735
|
for (const f of result.failed) logWarn(f.error);
|
|
3745
3736
|
} catch (err) {
|
|
@@ -3942,7 +3933,7 @@ function makeInstallCommand() {
|
|
|
3942
3933
|
const spinner6 = p5.spinner();
|
|
3943
3934
|
spinner6.start(`Installing ${ref}`);
|
|
3944
3935
|
try {
|
|
3945
|
-
const { openCatalogSource: openCatalogSource2, openLibrary: openLibrary2 } = await import('../open-library-
|
|
3936
|
+
const { openCatalogSource: openCatalogSource2, openLibrary: openLibrary2 } = await import('../open-library-EEGG6RDN.js');
|
|
3946
3937
|
const catalog = await openCatalogSource2({ projectDir: path14__default.resolve(opts.projectDir) });
|
|
3947
3938
|
if (!supportsInstallManifest(catalog)) {
|
|
3948
3939
|
throw new Error(
|
|
@@ -3974,7 +3965,7 @@ function makeInstallCommand() {
|
|
|
3974
3965
|
}
|
|
3975
3966
|
const projectDir = path14__default.resolve(opts.projectDir);
|
|
3976
3967
|
try {
|
|
3977
|
-
const { ensureSourcesCloned } = await import('../ensure-sources-
|
|
3968
|
+
const { ensureSourcesCloned } = await import('../ensure-sources-ALTI5PXR.js');
|
|
3978
3969
|
const hydrate = ensureSourcesCloned(projectDir, { quiet: true });
|
|
3979
3970
|
if (hydrate.cloned.length > 0) {
|
|
3980
3971
|
logOk(`Cloned source(s): ${hydrate.cloned.join(", ")}`);
|
|
@@ -4008,13 +3999,6 @@ function makeInstallCommand() {
|
|
|
4008
3999
|
if (result.missing.length > 0) {
|
|
4009
4000
|
for (const m of result.missing) logErr(`Missing: ${m}`);
|
|
4010
4001
|
}
|
|
4011
|
-
if (result.collisions.length > 0) {
|
|
4012
|
-
for (const c of result.collisions) {
|
|
4013
|
-
logWarn(
|
|
4014
|
-
`${c.key} resolved from ${S.bold(c.resolvedFrom)}, also found in: ${c.shadowedIn.join(", ")}. Use @repo qualifier to pin.`
|
|
4015
|
-
);
|
|
4016
|
-
}
|
|
4017
|
-
}
|
|
4018
4002
|
if (result.lockWritten) {
|
|
4019
4003
|
logInfo(`Lock file written: ${S.dim("skaile.lock.yaml")}`);
|
|
4020
4004
|
}
|
|
@@ -4439,7 +4423,7 @@ async function ensurePluginsLoadedForServe(projectDir) {
|
|
|
4439
4423
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
4440
4424
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
4441
4425
|
if (!config.plugins || config.plugins.length === 0) return;
|
|
4442
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
4426
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-G277ZX3B.js');
|
|
4443
4427
|
const { pluginRegistry } = await import('../plugin-registry/index.js');
|
|
4444
4428
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
4445
4429
|
if (result.loaded.length > 0) {
|
|
@@ -5295,6 +5279,14 @@ function sourceClonePath(name) {
|
|
|
5295
5279
|
function deriveSlug(url) {
|
|
5296
5280
|
return url.replace(/\.git$/, "").split(/[/:]/).pop() ?? "source";
|
|
5297
5281
|
}
|
|
5282
|
+
function normalizeSourceUrl(input) {
|
|
5283
|
+
const s = input.trim();
|
|
5284
|
+
if (/^(?:https?|git|ssh|file):\/\//.test(s) || /^git@/.test(s)) return s;
|
|
5285
|
+
const repo = s.replace(/\.git$/, "");
|
|
5286
|
+
if (/^[\w.-]+\/[\w.-]+$/.test(repo)) return `git@github.com:${repo}.git`;
|
|
5287
|
+
if (/^[\w.-]+$/.test(repo)) return `git@github.com:skaile-ai/${repo}.git`;
|
|
5288
|
+
return s;
|
|
5289
|
+
}
|
|
5298
5290
|
function requireProjectYamlPath() {
|
|
5299
5291
|
const root = findWorkspaceRoot(process.cwd());
|
|
5300
5292
|
if (!root) {
|
|
@@ -5315,13 +5307,14 @@ function readProjectSources(yamlPath) {
|
|
|
5315
5307
|
}
|
|
5316
5308
|
}
|
|
5317
5309
|
function ensureClone(entry, opts = {}) {
|
|
5318
|
-
const
|
|
5310
|
+
const slug = deriveSlug(entry.url);
|
|
5311
|
+
const dest = sourceClonePath(slug);
|
|
5319
5312
|
if (existsSync(dest)) {
|
|
5320
5313
|
if (!opts.force) return false;
|
|
5321
5314
|
rmSync(dest, { recursive: true, force: true });
|
|
5322
5315
|
}
|
|
5323
5316
|
const args = ["clone", entry.url, dest];
|
|
5324
|
-
if (entry.
|
|
5317
|
+
if (entry.pin) args.splice(1, 0, "--branch", entry.pin);
|
|
5325
5318
|
const clone = spawnSync("git", args, { stdio: "inherit" });
|
|
5326
5319
|
if (clone.status !== 0) {
|
|
5327
5320
|
logErr(`git clone failed for ${entry.url}`);
|
|
@@ -5332,13 +5325,14 @@ function ensureClone(entry, opts = {}) {
|
|
|
5332
5325
|
async function refreshManifestCache(entry, includeDev = false) {
|
|
5333
5326
|
const { manager, library, close } = await openLibraryManager();
|
|
5334
5327
|
try {
|
|
5335
|
-
const
|
|
5336
|
-
const
|
|
5328
|
+
const slug = deriveSlug(entry.url);
|
|
5329
|
+
const dest = sourceClonePath(slug);
|
|
5330
|
+
const existing = (await manager.listLibraries()).find((l) => l.name === slug);
|
|
5337
5331
|
const lib = existing ?? await manager.addLibrary({
|
|
5338
|
-
name:
|
|
5332
|
+
name: slug,
|
|
5339
5333
|
path: dest,
|
|
5340
5334
|
backend: "git",
|
|
5341
|
-
backendConfig: { url: entry.url, branch: entry.
|
|
5335
|
+
backendConfig: { url: entry.url, branch: entry.pin ?? "main", authHint: "ssh" },
|
|
5342
5336
|
ownership: "reader"
|
|
5343
5337
|
});
|
|
5344
5338
|
const catalog = new LocalCatalogSource(library, lib.id, dest, createFullRegistry());
|
|
@@ -5368,20 +5362,22 @@ function makeSourceCommand() {
|
|
|
5368
5362
|
const cmd = new Command("source").description(
|
|
5369
5363
|
"Manage github sources for the current project (recorded in skaile.yaml)"
|
|
5370
5364
|
);
|
|
5371
|
-
cmd.command("add <
|
|
5372
|
-
|
|
5365
|
+
cmd.command("add <source>").description(
|
|
5366
|
+
"Clone a github repo and register it in this project's skaile.yaml. <source> may be a full git URL, an owner/repo shorthand, or a bare name (\u2192 git@github.com:skaile-ai/<name>.git)."
|
|
5367
|
+
).option("--name <slug>", "[deprecated] no-op \u2014 the source entry stores only the URL").option("--pin <ref>", "Pin a branch, tag, or 40-char SHA").option("--branch <branch>", "[deprecated] alias for --pin").option("--force", "Remove an existing clone and re-clone", false).option("--dev", "Also index dev-only assets under the source's dev_paths", false).action(
|
|
5368
|
+
async (source, opts) => {
|
|
5369
|
+
const url = normalizeSourceUrl(source);
|
|
5373
5370
|
const yamlPath = requireProjectYamlPath();
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
const editor = WorkspaceYamlEditor.load(yamlPath);
|
|
5378
|
-
const existing = editor.getSources().find((s) => s.name === slug);
|
|
5379
|
-
if (existing && existing.url !== url) {
|
|
5380
|
-
logErr(
|
|
5381
|
-
`A source named "${slug}" already exists in ${yamlPath} with a different url (${existing.url}). Pass --name to use a different slug.`
|
|
5371
|
+
if (opts.name) {
|
|
5372
|
+
logWarn(
|
|
5373
|
+
"the --name flag is deprecated; the source entry now stores only the URL (the cache slug is derived from it)."
|
|
5382
5374
|
);
|
|
5383
|
-
process.exit(1);
|
|
5384
5375
|
}
|
|
5376
|
+
const pin = opts.pin ?? opts.branch;
|
|
5377
|
+
const slug = deriveSlug(url);
|
|
5378
|
+
const entry = { url };
|
|
5379
|
+
if (pin) entry.pin = pin;
|
|
5380
|
+
const editor = WorkspaceYamlEditor.load(yamlPath);
|
|
5385
5381
|
editor.setSource(entry);
|
|
5386
5382
|
editor.save();
|
|
5387
5383
|
const dest = sourceClonePath(slug);
|
|
@@ -5411,69 +5407,77 @@ function makeSourceCommand() {
|
|
|
5411
5407
|
console.log();
|
|
5412
5408
|
console.log(S.heading(" Sources"));
|
|
5413
5409
|
for (const s of sources) {
|
|
5414
|
-
const
|
|
5415
|
-
|
|
5410
|
+
const slug = deriveSlug(s.url);
|
|
5411
|
+
const cached = existsSync(sourceClonePath(slug)) ? "" : S.warn(" (not cached)");
|
|
5412
|
+
console.log(` ${S.cmd(slug.padEnd(24))} ${S.dim(s.url)}${cached}`);
|
|
5416
5413
|
}
|
|
5417
5414
|
console.log(`
|
|
5418
5415
|
${S.dim(`${sources.length} source(s)`)}
|
|
5419
5416
|
`);
|
|
5420
5417
|
});
|
|
5421
|
-
cmd.command("show <name>").description("Show details for a source").action(async (
|
|
5418
|
+
cmd.command("show <name-or-url>").description("Show details for a source (matched by URL or derived slug)").action(async (key) => {
|
|
5422
5419
|
const yamlPath = requireProjectYamlPath();
|
|
5423
|
-
const entry = readProjectSources(yamlPath).find(
|
|
5420
|
+
const entry = readProjectSources(yamlPath).find(
|
|
5421
|
+
(s) => s.url === key || deriveSlug(s.url) === key
|
|
5422
|
+
);
|
|
5424
5423
|
if (!entry) {
|
|
5425
|
-
logErr(`No source
|
|
5424
|
+
logErr(`No source matching "${key}" in ${yamlPath}.`);
|
|
5426
5425
|
process.exit(1);
|
|
5427
5426
|
}
|
|
5427
|
+
const slug = deriveSlug(entry.url);
|
|
5428
5428
|
console.log(
|
|
5429
5429
|
JSON.stringify(
|
|
5430
5430
|
{
|
|
5431
5431
|
...entry,
|
|
5432
|
-
|
|
5433
|
-
|
|
5432
|
+
slug,
|
|
5433
|
+
clonePath: sourceClonePath(slug),
|
|
5434
|
+
cached: existsSync(sourceClonePath(slug))
|
|
5434
5435
|
},
|
|
5435
5436
|
null,
|
|
5436
5437
|
2
|
|
5437
5438
|
)
|
|
5438
5439
|
);
|
|
5439
5440
|
});
|
|
5440
|
-
cmd.command("remove <name>").description("Remove a source from this project's skaile.yaml").option("--purge", "Also delete the cached clone from ~/.skaile/sources/", false).action(async (
|
|
5441
|
+
cmd.command("remove <name-or-url>").description("Remove a source from this project's skaile.yaml (matched by URL or slug)").option("--purge", "Also delete the cached clone from ~/.skaile/sources/", false).action(async (key, opts) => {
|
|
5441
5442
|
const yamlPath = requireProjectYamlPath();
|
|
5442
5443
|
const editor = WorkspaceYamlEditor.load(yamlPath);
|
|
5443
|
-
const
|
|
5444
|
-
if (!
|
|
5445
|
-
logErr(`No source
|
|
5444
|
+
const match = editor.getSources().find((s) => s.url === key || deriveSlug(s.url) === key);
|
|
5445
|
+
if (!match) {
|
|
5446
|
+
logErr(`No source matching "${key}" in ${yamlPath}.`);
|
|
5446
5447
|
process.exit(1);
|
|
5447
5448
|
}
|
|
5449
|
+
const slug = deriveSlug(match.url);
|
|
5450
|
+
editor.removeSource(match.url);
|
|
5448
5451
|
editor.save();
|
|
5449
|
-
await dropManifestCache(
|
|
5452
|
+
await dropManifestCache(slug, opts.purge);
|
|
5450
5453
|
logOk(
|
|
5451
|
-
opts.purge ? `Removed source "${
|
|
5454
|
+
opts.purge ? `Removed source "${slug}" and purged its clone.` : `Removed source "${slug}" from skaile.yaml (clone left in ~/.skaile/sources/).`
|
|
5452
5455
|
);
|
|
5453
5456
|
});
|
|
5454
|
-
cmd.command("sync [name]").description("Pull upstream changes and refresh the manifest cache").option("--dev", "Also index dev-only assets under each source's dev_paths", false).action(async (
|
|
5457
|
+
cmd.command("sync [name]").description("Pull upstream changes and refresh the manifest cache").option("--dev", "Also index dev-only assets under each source's dev_paths", false).action(async (key, opts) => {
|
|
5455
5458
|
const yamlPath = requireProjectYamlPath();
|
|
5456
5459
|
const all = readProjectSources(yamlPath);
|
|
5457
|
-
const targets =
|
|
5460
|
+
const targets = key ? all.filter((s) => s.url === key || deriveSlug(s.url) === key) : all;
|
|
5458
5461
|
if (targets.length === 0) {
|
|
5459
|
-
logInfo(
|
|
5462
|
+
logInfo(key ? `No source matching "${key}".` : "No sources in skaile.yaml.");
|
|
5460
5463
|
return;
|
|
5461
5464
|
}
|
|
5462
5465
|
for (const entry of targets) {
|
|
5463
|
-
const
|
|
5466
|
+
const slug = deriveSlug(entry.url);
|
|
5467
|
+
const dest = sourceClonePath(slug);
|
|
5464
5468
|
if (!existsSync(dest)) {
|
|
5465
5469
|
ensureClone(entry);
|
|
5466
|
-
logOk(`${
|
|
5470
|
+
logOk(`${slug}: cloned to ${dest}.`);
|
|
5467
5471
|
} else {
|
|
5468
5472
|
const pull = spawnSync("git", ["pull", "--ff-only"], { cwd: dest, stdio: "inherit" });
|
|
5469
5473
|
if (pull.status !== 0) {
|
|
5470
|
-
logWarn(`${
|
|
5474
|
+
logWarn(`${slug}: git pull failed, skipping manifest refresh.`);
|
|
5471
5475
|
continue;
|
|
5472
5476
|
}
|
|
5473
5477
|
}
|
|
5474
5478
|
const result = await refreshManifestCache(entry, opts.dev);
|
|
5475
|
-
logOk(`${
|
|
5476
|
-
for (const err of result.errors) logWarn(`${
|
|
5479
|
+
logOk(`${slug}: indexed ${result.assetsUpdated} of ${result.assetsFound} asset(s).`);
|
|
5480
|
+
for (const err of result.errors) logWarn(`${slug}: ${err}`);
|
|
5477
5481
|
}
|
|
5478
5482
|
});
|
|
5479
5483
|
cmd.command("patch <ref>").description("Extract an asset for editing against the source").action((_ref) => {
|
|
@@ -5696,13 +5700,6 @@ function makeUpdateCommand() {
|
|
|
5696
5700
|
} else {
|
|
5697
5701
|
logInfo("Nothing to update.");
|
|
5698
5702
|
}
|
|
5699
|
-
if (result.collisions.length > 0) {
|
|
5700
|
-
for (const c of result.collisions) {
|
|
5701
|
-
logWarn(
|
|
5702
|
-
`${c.key} resolved from ${S.heading(c.resolvedFrom)}, also found in: ${c.shadowedIn.join(", ")}`
|
|
5703
|
-
);
|
|
5704
|
-
}
|
|
5705
|
-
}
|
|
5706
5703
|
}
|
|
5707
5704
|
);
|
|
5708
5705
|
}
|
|
@@ -6241,7 +6238,7 @@ Advanced:
|
|
|
6241
6238
|
});
|
|
6242
6239
|
program.command("init [project-dir]").description("Initialize a project directory (defaults to current directory)").option("--backend <name>", "Coding-agent backend (claude-code | omp | codex)", "claude-code").option("--no-git", "Skip git init and .gitignore").action(async (projectDir, opts) => {
|
|
6243
6240
|
const { execSync: execSync3 } = await import('child_process');
|
|
6244
|
-
const { existsSync: existsSync12, mkdirSync: mkdirSync3, readFileSync:
|
|
6241
|
+
const { existsSync: existsSync12, mkdirSync: mkdirSync3, readFileSync: readFileSync6, writeFileSync: writeFileSync2 } = await import('fs');
|
|
6245
6242
|
const { stringify } = await import('yaml');
|
|
6246
6243
|
const { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS: SUPPORTED_DRIVER_TARGETS2 } = await import('../core/index.js');
|
|
6247
6244
|
const backend = opts.backend;
|
|
@@ -6284,8 +6281,7 @@ program.command("init [project-dir]").description("Initialize a project director
|
|
|
6284
6281
|
driver: "claude-sdk",
|
|
6285
6282
|
max_turns: 200
|
|
6286
6283
|
}
|
|
6287
|
-
}
|
|
6288
|
-
ai_resources: []
|
|
6284
|
+
}
|
|
6289
6285
|
})
|
|
6290
6286
|
);
|
|
6291
6287
|
created.push("skaile.yaml");
|
|
@@ -6300,12 +6296,12 @@ program.command("init [project-dir]").description("Initialize a project director
|
|
|
6300
6296
|
if (opts.git) {
|
|
6301
6297
|
const gitignorePath = path14__default.join(resolved, ".gitignore");
|
|
6302
6298
|
const entries = ["node_modules/", ".skaile/sessions/", "*.log", ".env", ".env.local"];
|
|
6303
|
-
const existing = existsSync12(gitignorePath) ?
|
|
6299
|
+
const existing = existsSync12(gitignorePath) ? readFileSync6(gitignorePath, "utf-8") : "";
|
|
6304
6300
|
const have = new Set(existing.split("\n").map((l) => l.trim()));
|
|
6305
6301
|
const append = entries.filter((e) => !have.has(e));
|
|
6306
6302
|
if (append.length > 0) {
|
|
6307
6303
|
const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
|
|
6308
|
-
writeFileSync2(gitignorePath, existing + prefix
|
|
6304
|
+
writeFileSync2(gitignorePath, `${existing + prefix}${append.join("\n")}
|
|
6309
6305
|
`);
|
|
6310
6306
|
if (!existing) created.push(".gitignore");
|
|
6311
6307
|
}
|
|
@@ -6336,7 +6332,7 @@ program.command("init [project-dir]").description("Initialize a project director
|
|
|
6336
6332
|
);
|
|
6337
6333
|
}
|
|
6338
6334
|
try {
|
|
6339
|
-
const { ensureSourcesCloned } = await import('../ensure-sources-
|
|
6335
|
+
const { ensureSourcesCloned } = await import('../ensure-sources-ALTI5PXR.js');
|
|
6340
6336
|
const hydrate = ensureSourcesCloned(resolved, { quiet: true });
|
|
6341
6337
|
for (const n of hydrate.cloned) created.push(`~/.skaile/sources/${n}/`);
|
|
6342
6338
|
if (hydrate.failed.length > 0) {
|
|
@@ -6362,7 +6358,7 @@ program.command("init [project-dir]").description("Initialize a project director
|
|
|
6362
6358
|
console.log();
|
|
6363
6359
|
});
|
|
6364
6360
|
program.command("setup").description("Interactive provider setup wizard").action(async () => {
|
|
6365
|
-
const { cmdSetup } = await import('../setup-
|
|
6361
|
+
const { cmdSetup } = await import('../setup-REX4I5NE.js');
|
|
6366
6362
|
await cmdSetup([], { projectDir: process.cwd() });
|
|
6367
6363
|
});
|
|
6368
6364
|
program.addCommand(makeInstallCommand());
|