@skaile/workspaces 5.6.1 → 5.7.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 +62 -0
- package/README.md +4 -2
- package/dist/{asset-feeds-LU7NHOAP.js → asset-feeds-K36CR52Q.js} +17 -17
- package/dist/{asset-feeds-LU7NHOAP.js.map → asset-feeds-K36CR52Q.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +9 -9
- package/dist/asset-manager/index.js +14 -14
- package/dist/asset-manager/installer.js +10 -10
- package/dist/asset-manager/renderers.js +9 -9
- package/dist/asset-manager/src/index.d.ts +106 -16
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +4 -1
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +11 -11
- package/dist/bridge/drivers/codex.js +10 -10
- package/dist/bridge/drivers/continue.js +12 -12
- package/dist/bridge/drivers/echo.js +1 -1
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +12 -12
- package/dist/bridge/drivers/omp.js +2 -2
- package/dist/bridge/drivers/opencode.js +12 -12
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +12 -12
- package/dist/{chunk-VX3INFBA.js → chunk-34C42MJX.js} +3 -3
- package/dist/{chunk-VX3INFBA.js.map → chunk-34C42MJX.js.map} +1 -1
- package/dist/{chunk-QD772CGQ.js → chunk-53MSCGR2.js} +5 -5
- package/dist/{chunk-QD772CGQ.js.map → chunk-53MSCGR2.js.map} +1 -1
- package/dist/chunk-6C654TFI.js +84 -0
- package/dist/chunk-6C654TFI.js.map +1 -0
- package/dist/{chunk-6NPINANG.js → chunk-6UFFKMVC.js} +5 -5
- package/dist/{chunk-6NPINANG.js.map → chunk-6UFFKMVC.js.map} +1 -1
- package/dist/{chunk-XOGG7VDZ.js → chunk-6VRJH4MR.js} +16 -24
- package/dist/chunk-6VRJH4MR.js.map +1 -0
- package/dist/{chunk-2KOKBTR4.js → chunk-74EEFB52.js} +15 -8
- package/dist/chunk-74EEFB52.js.map +1 -0
- package/dist/{chunk-OGLDAJFL.js → chunk-7FJQT3GT.js} +4 -4
- package/dist/{chunk-OGLDAJFL.js.map → chunk-7FJQT3GT.js.map} +1 -1
- package/dist/{chunk-VKSXST23.js → chunk-AVCUPPG6.js} +3 -3
- package/dist/{chunk-VKSXST23.js.map → chunk-AVCUPPG6.js.map} +1 -1
- package/dist/{chunk-5B5IZVEP.js → chunk-BTK7ECLH.js} +2 -2
- package/dist/{chunk-5B5IZVEP.js.map → chunk-BTK7ECLH.js.map} +1 -1
- package/dist/{chunk-GP6ZL7PE.js → chunk-BWZF2ZIF.js} +3 -3
- package/dist/{chunk-GP6ZL7PE.js.map → chunk-BWZF2ZIF.js.map} +1 -1
- package/dist/{chunk-PJS2YWGG.js → chunk-CWM3MYGX.js} +6 -6
- package/dist/{chunk-PJS2YWGG.js.map → chunk-CWM3MYGX.js.map} +1 -1
- package/dist/{chunk-PTO2YDDG.js → chunk-D5HOETOB.js} +410 -96
- package/dist/chunk-D5HOETOB.js.map +1 -0
- package/dist/{chunk-MX3UQXLU.js → chunk-DFFD4BFG.js} +96 -20
- package/dist/chunk-DFFD4BFG.js.map +1 -0
- package/dist/{chunk-KXTO7HON.js → chunk-EAZECHPM.js} +3 -3
- package/dist/{chunk-KXTO7HON.js.map → chunk-EAZECHPM.js.map} +1 -1
- package/dist/{chunk-ZBBM6O6P.js → chunk-EB4XN3KE.js} +3 -3
- package/dist/{chunk-ZBBM6O6P.js.map → chunk-EB4XN3KE.js.map} +1 -1
- package/dist/{chunk-WIHQWVWL.js → chunk-EU3Q5AQ4.js} +26 -18
- package/dist/chunk-EU3Q5AQ4.js.map +1 -0
- package/dist/{chunk-BTISGSK4.js → chunk-FAP63KV7.js} +4 -4
- package/dist/{chunk-BTISGSK4.js.map → chunk-FAP63KV7.js.map} +1 -1
- package/dist/{chunk-46OVMT76.js → chunk-G67BOI2J.js} +3 -3
- package/dist/{chunk-46OVMT76.js.map → chunk-G67BOI2J.js.map} +1 -1
- package/dist/{chunk-I4QBZLOR.js → chunk-GIC3G5YG.js} +6 -6
- package/dist/{chunk-I4QBZLOR.js.map → chunk-GIC3G5YG.js.map} +1 -1
- package/dist/{chunk-27HS2DHB.js → chunk-GWXFSLBK.js} +3 -3
- package/dist/{chunk-27HS2DHB.js.map → chunk-GWXFSLBK.js.map} +1 -1
- package/dist/{chunk-VSQFGU5D.js → chunk-ILFGVSTJ.js} +3 -3
- package/dist/{chunk-VSQFGU5D.js.map → chunk-ILFGVSTJ.js.map} +1 -1
- package/dist/{chunk-KYXOGHY6.js → chunk-IUUYRXT6.js} +4 -4
- package/dist/{chunk-KYXOGHY6.js.map → chunk-IUUYRXT6.js.map} +1 -1
- package/dist/{chunk-D2V42LUE.js → chunk-IZLQ4GDO.js} +63 -44
- package/dist/chunk-IZLQ4GDO.js.map +1 -0
- package/dist/{chunk-LLKKLKZJ.js → chunk-JLSCA5T5.js} +3 -3
- package/dist/{chunk-LLKKLKZJ.js.map → chunk-JLSCA5T5.js.map} +1 -1
- package/dist/{chunk-SX4UIDKT.js → chunk-KM7XWC4Y.js} +3 -3
- package/dist/{chunk-SX4UIDKT.js.map → chunk-KM7XWC4Y.js.map} +1 -1
- package/dist/{chunk-KUFNKVBM.js → chunk-KNWCFEWU.js} +3 -3
- package/dist/{chunk-KUFNKVBM.js.map → chunk-KNWCFEWU.js.map} +1 -1
- package/dist/{chunk-MFHKHXDE.js → chunk-L5VSIPQD.js} +5 -5
- package/dist/chunk-L5VSIPQD.js.map +1 -0
- package/dist/{chunk-AOAZCSDI.js → chunk-LBQ4BBX4.js} +3 -3
- package/dist/{chunk-AOAZCSDI.js.map → chunk-LBQ4BBX4.js.map} +1 -1
- package/dist/{chunk-2W4LBLIN.js → chunk-LCU5U5IW.js} +6 -6
- package/dist/{chunk-2W4LBLIN.js.map → chunk-LCU5U5IW.js.map} +1 -1
- package/dist/{chunk-65EYRFZJ.js → chunk-LXY4BUA3.js} +5 -5
- package/dist/{chunk-65EYRFZJ.js.map → chunk-LXY4BUA3.js.map} +1 -1
- package/dist/{chunk-7KLC4LZO.js → chunk-MKLBK7HI.js} +8 -8
- package/dist/{chunk-7KLC4LZO.js.map → chunk-MKLBK7HI.js.map} +1 -1
- package/dist/{chunk-4GNJELPH.js → chunk-N6FBTXQ5.js} +2 -2
- package/dist/{chunk-4GNJELPH.js.map → chunk-N6FBTXQ5.js.map} +1 -1
- package/dist/{chunk-2XFUXGV6.js → chunk-NWQB7UTY.js} +3 -3
- package/dist/{chunk-2XFUXGV6.js.map → chunk-NWQB7UTY.js.map} +1 -1
- package/dist/{chunk-SDFROXSA.js → chunk-O4Z7MAW7.js} +3 -3
- package/dist/{chunk-SDFROXSA.js.map → chunk-O4Z7MAW7.js.map} +1 -1
- package/dist/{chunk-AO7VJ6G6.js → chunk-O7VPNKYN.js} +8 -3
- package/dist/chunk-O7VPNKYN.js.map +1 -0
- package/dist/{chunk-TZCQ7ZWQ.js → chunk-OOLT6HGP.js} +10 -11
- package/dist/chunk-OOLT6HGP.js.map +1 -0
- package/dist/{chunk-2GRB5ITE.js → chunk-PSA6ONFB.js} +4 -4
- package/dist/{chunk-2GRB5ITE.js.map → chunk-PSA6ONFB.js.map} +1 -1
- package/dist/{chunk-45VFGT7A.js → chunk-RNPHRRLG.js} +3 -3
- package/dist/{chunk-45VFGT7A.js.map → chunk-RNPHRRLG.js.map} +1 -1
- package/dist/{chunk-7ZHLYXTI.js → chunk-RVIZQ5XD.js} +3 -3
- package/dist/{chunk-7ZHLYXTI.js.map → chunk-RVIZQ5XD.js.map} +1 -1
- package/dist/{chunk-BF33SCLY.js → chunk-SWO25LTO.js} +4 -4
- package/dist/{chunk-BF33SCLY.js.map → chunk-SWO25LTO.js.map} +1 -1
- package/dist/{chunk-UAP2XHRF.js → chunk-SZWRPEF7.js} +8 -8
- package/dist/{chunk-UAP2XHRF.js.map → chunk-SZWRPEF7.js.map} +1 -1
- package/dist/{chunk-VJENKWXF.js → chunk-THEJJBOU.js} +3 -3
- package/dist/{chunk-VJENKWXF.js.map → chunk-THEJJBOU.js.map} +1 -1
- package/dist/{chunk-PA7WLID3.js → chunk-TTPSDC2G.js} +33 -3
- package/dist/chunk-TTPSDC2G.js.map +1 -0
- package/dist/{chunk-VBBBZDI7.js → chunk-UX3K4RKE.js} +3 -3
- package/dist/{chunk-VBBBZDI7.js.map → chunk-UX3K4RKE.js.map} +1 -1
- package/dist/{chunk-RGXVQZOV.js → chunk-VOOI7B2L.js} +23 -21
- package/dist/chunk-VOOI7B2L.js.map +1 -0
- package/dist/{chunk-OLLAQLFJ.js → chunk-WIEC3ZE4.js} +5 -5
- package/dist/{chunk-OLLAQLFJ.js.map → chunk-WIEC3ZE4.js.map} +1 -1
- package/dist/cli/index.js +901 -589
- 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 +12 -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 +41 -4
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts +9 -0
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +8 -2
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts +3 -2
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +13 -4
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +4 -3
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts +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/skill-checks.d.ts +21 -10
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +15 -15
- package/dist/{connectors-HWENZFKW.js → connectors-SSOTIDHT.js} +18 -18
- package/dist/{connectors-HWENZFKW.js.map → connectors-SSOTIDHT.js.map} +1 -1
- package/dist/core/index.js +8 -8
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +6 -6
- package/dist/core/src/cache-paths.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +1 -1
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +3 -3
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +6 -1
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +8 -0
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +5 -5
- package/dist/deploy/index.js +8 -8
- package/dist/discovery/index.js +4 -4
- package/dist/discovery/src/index.d.ts +1 -1
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/source-config.d.ts +12 -0
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-DSTSXJWK.js → ensure-sources-277VI7R3.js} +17 -17
- package/dist/{ensure-sources-DSTSXJWK.js.map → ensure-sources-277VI7R3.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +15 -15
- package/dist/factory-assets/connectors/deploy.js +15 -15
- package/dist/factory-assets/connectors/devserver.js +15 -15
- package/dist/factory-assets/connectors/flow/adapter.js +15 -15
- package/dist/factory-assets/connectors/flow/engine.js +9 -9
- package/dist/factory-assets/connectors/flow/run-flow.js +17 -17
- package/dist/factory-assets/connectors/flow.js +15 -15
- package/dist/factory-assets/connectors/git.js +15 -15
- package/dist/factory-assets/connectors/gmail.js +15 -15
- package/dist/factory-assets/connectors/googledrive.js +15 -15
- package/dist/factory-assets/connectors/local.js +15 -15
- package/dist/factory-assets/connectors/mattermost.js +15 -15
- package/dist/factory-assets/connectors/memory.js +15 -15
- package/dist/factory-assets/connectors/minio.js +15 -15
- package/dist/factory-assets/connectors/postgres.js +15 -15
- package/dist/factory-assets/connectors/s3.js +15 -15
- package/dist/factory-assets/connectors/sharepoint.js +15 -15
- package/dist/factory-assets/connectors/sqlite.js +15 -15
- package/dist/factory-assets/connectors/static-server.js +15 -15
- package/dist/factory-assets/connectors/tunnel.js +15 -15
- package/dist/factory-assets/connectors/webdav.js +15 -15
- package/dist/factory-assets/connectors/xstate-store.js +15 -15
- package/dist/factory-assets/connectors/xstate.js +15 -15
- package/dist/{flows-ENQY2DV7.js → flows-J2UEU2QM.js} +13 -13
- package/dist/{flows-ENQY2DV7.js.map → flows-J2UEU2QM.js.map} +1 -1
- package/dist/{helpers-R44RUTDY.js → helpers-KC5O7CML.js} +17 -17
- package/dist/{helpers-R44RUTDY.js.map → helpers-KC5O7CML.js.map} +1 -1
- package/dist/library/index.js +11 -11
- package/dist/library/install.js +3 -3
- package/dist/library/src/index.d.ts +3 -3
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/local/library-manager.d.ts +6 -0
- package/dist/library/src/local/library-manager.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +5 -2
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts +23 -1
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts +12 -0
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/{library-publish-LFOJJVMK.js → library-publish-FGXF5TJO.js} +85 -41
- package/dist/library-publish-FGXF5TJO.js.map +1 -0
- package/dist/{open-library-4WUMQHES.js → open-library-P3D337NH.js} +20 -20
- package/dist/{open-library-4WUMQHES.js.map → open-library-P3D337NH.js.map} +1 -1
- package/dist/open-registry-Z3P2X2AB.js +32 -0
- package/dist/{open-registry-NVPCQPND.js.map → open-registry-Z3P2X2AB.js.map} +1 -1
- package/dist/paths-JKEKXM52.js +22 -0
- package/dist/{paths-YUCP7K6U.js.map → paths-JKEKXM52.js.map} +1 -1
- package/dist/{plugin-store-66QFBNEO.js → plugin-store-WI4MZJLP.js} +10 -10
- package/dist/{plugin-store-66QFBNEO.js.map → plugin-store-WI4MZJLP.js.map} +1 -1
- package/dist/project-WFUDVYNN.js +41 -0
- package/dist/{project-VMOHUXBD.js.map → project-WFUDVYNN.js.map} +1 -1
- package/dist/resolver/index.js +9 -9
- package/dist/runner/index.js +28 -28
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +14 -14
- package/dist/sdk/bridge.js +12 -12
- package/dist/sdk/core.js +8 -8
- package/dist/sdk/flow.js +9 -9
- package/dist/sdk/index.js +28 -28
- package/dist/sdk/resolver.js +9 -9
- package/dist/sdk/runner.js +28 -28
- package/dist/secrets/index.js +2 -2
- package/dist/{setup-PYY23HGZ.js → setup-RAMLTORM.js} +22 -22
- package/dist/{setup-PYY23HGZ.js.map → setup-RAMLTORM.js.map} +1 -1
- package/dist/skills-EOHZ2DZ4.js +26 -0
- package/dist/{skills-CS7NE5TT.js.map → skills-EOHZ2DZ4.js.map} +1 -1
- package/dist/{source-JCF6KSQN.js → source-FYVSFYEI.js} +21 -21
- package/dist/{source-JCF6KSQN.js.map → source-FYVSFYEI.js.map} +1 -1
- package/dist/{source-manifest-publish-O6P7G2M7.js → source-manifest-publish-4FPIPPLV.js} +23 -23
- package/dist/{source-manifest-publish-O6P7G2M7.js.map → source-manifest-publish-4FPIPPLV.js.map} +1 -1
- package/dist/tui/index.js +28 -28
- package/dist/workspace-plugin/adapters/mcp.js +22 -22
- 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-2KOKBTR4.js.map +0 -1
- package/dist/chunk-2NYXQYHN.js +0 -22
- package/dist/chunk-2NYXQYHN.js.map +0 -1
- package/dist/chunk-AO7VJ6G6.js.map +0 -1
- package/dist/chunk-D2V42LUE.js.map +0 -1
- package/dist/chunk-MFHKHXDE.js.map +0 -1
- package/dist/chunk-MX3UQXLU.js.map +0 -1
- package/dist/chunk-PA7WLID3.js.map +0 -1
- package/dist/chunk-PTO2YDDG.js.map +0 -1
- package/dist/chunk-RGXVQZOV.js.map +0 -1
- package/dist/chunk-TZCQ7ZWQ.js.map +0 -1
- package/dist/chunk-WIHQWVWL.js.map +0 -1
- package/dist/chunk-XOGG7VDZ.js.map +0 -1
- package/dist/library-publish-LFOJJVMK.js.map +0 -1
- package/dist/open-registry-NVPCQPND.js +0 -32
- package/dist/paths-YUCP7K6U.js +0 -22
- package/dist/project-VMOHUXBD.js +0 -41
- package/dist/skills-CS7NE5TT.js +0 -26
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { makeHttpPublisherClient } from './chunk-
|
|
2
|
-
import { sourceClonePath, resolveSourceArg } from './chunk-
|
|
3
|
-
import { isStoreAuthenticated, refFor, publishToStore, bareName } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import { logErr, S, logInfo, logOk, logWarn } from './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
1
|
+
import { makeHttpPublisherClient } from './chunk-BWZF2ZIF.js';
|
|
2
|
+
import { sourceClonePath, resolveSourceArg } from './chunk-IZLQ4GDO.js';
|
|
3
|
+
import { isStoreAuthenticated, refFor, publishToStore, bareName } from './chunk-LXY4BUA3.js';
|
|
4
|
+
import './chunk-GIC3G5YG.js';
|
|
5
|
+
import { logErr, S, logInfo, logOk, logWarn } from './chunk-THEJJBOU.js';
|
|
6
|
+
import './chunk-WIEC3ZE4.js';
|
|
7
|
+
import './chunk-LBQ4BBX4.js';
|
|
8
8
|
import './chunk-QZLWJETK.js';
|
|
9
9
|
import './chunk-NFGRW3L7.js';
|
|
10
10
|
import './chunk-QCI6D7E4.js';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
11
|
+
import './chunk-D5HOETOB.js';
|
|
12
|
+
import './chunk-DFFD4BFG.js';
|
|
13
|
+
import './chunk-6VRJH4MR.js';
|
|
14
|
+
import './chunk-FAP63KV7.js';
|
|
15
15
|
import './chunk-R7FOF242.js';
|
|
16
16
|
import './chunk-3TXEJN4W.js';
|
|
17
|
-
import './chunk-
|
|
17
|
+
import './chunk-74EEFB52.js';
|
|
18
18
|
import './chunk-CGYEHQOX.js';
|
|
19
19
|
import './chunk-KTBKW2FI.js';
|
|
20
20
|
import './chunk-UQ6LFBPZ.js';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-AVCUPPG6.js';
|
|
22
22
|
import './chunk-FRHE7FFB.js';
|
|
23
|
-
import { globalSettingsPath } from './chunk-
|
|
23
|
+
import { globalSettingsPath } from './chunk-OOLT6HGP.js';
|
|
24
24
|
import './chunk-4GY63JU6.js';
|
|
25
|
-
import './chunk-
|
|
26
|
-
import './chunk-
|
|
25
|
+
import './chunk-SWO25LTO.js';
|
|
26
|
+
import './chunk-G67BOI2J.js';
|
|
27
27
|
import './chunk-5BEFNLOR.js';
|
|
28
28
|
import './chunk-A2ULN3KX.js';
|
|
29
|
-
import { sourceCacheKey } from './chunk-
|
|
30
|
-
import './chunk-
|
|
29
|
+
import { sourceCacheKey } from './chunk-LCU5U5IW.js';
|
|
30
|
+
import './chunk-L5VSIPQD.js';
|
|
31
31
|
import './chunk-CPSIPIX7.js';
|
|
32
|
-
import { decodeSkaileManifest, encodeSkaileManifest } from './chunk-
|
|
32
|
+
import { decodeSkaileManifest, encodeSkaileManifest } from './chunk-RVIZQ5XD.js';
|
|
33
33
|
import './chunk-RVRB27AN.js';
|
|
34
|
-
import './chunk-
|
|
35
|
-
import './chunk-
|
|
34
|
+
import './chunk-TTPSDC2G.js';
|
|
35
|
+
import './chunk-O7VPNKYN.js';
|
|
36
36
|
import './chunk-ICSCSM5D.js';
|
|
37
37
|
import './chunk-JMKB7IB4.js';
|
|
38
38
|
import './chunk-MJHSLODD.js';
|
|
@@ -235,5 +235,5 @@ async function runYank(arg, opts, client) {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
export { getSidecarRepo, normalizePublishedManifest, pushSidecarManifest, runPublish, runYank, saveSidecarRepo };
|
|
238
|
-
//# sourceMappingURL=source-manifest-publish-
|
|
239
|
-
//# sourceMappingURL=source-manifest-publish-
|
|
238
|
+
//# sourceMappingURL=source-manifest-publish-4FPIPPLV.js.map
|
|
239
|
+
//# sourceMappingURL=source-manifest-publish-4FPIPPLV.js.map
|
package/dist/{source-manifest-publish-O6P7G2M7.js.map → source-manifest-publish-4FPIPPLV.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/commands/source-manifest-publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAM,yBAAA,GAA4B,sBAAA;AAW3B,SAAS,0BAAA,CACd,UACA,SAAA,EACmB;AACnB,EAAA,MAAM,UAAU,QAAA,CAAS,MAAA,IAAU,EAAC,EAAG,GAAA,CAAI,CAAC,CAAA,KAAM;AAChD,IAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,GAAG,MAAK,GAAI,CAAA;AACtC,IAAA,OAAO,IAAA;AAAA,EACT,CAAC,CAAA;AACD,EAAA,OAAO,EAAE,GAAG,QAAA,EAAU,SAAA,EAAW,WAAW,MAAA,EAAO;AACrD;AAUA,SAAS,YAAA,GAAuB;AAC9B,EAAA,OAAO,kBAAA,EAAmB;AAC5B;AAEA,SAAS,YAAA,GAAoC;AAC3C,EAAA,MAAM,OAAO,YAAA,EAAa;AAC1B,EAAA,IAAI,C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A;AAAA,IACnC,SAAS,GAAA,EAAK;AACZ,MAAA,OAAA;AAAA,QACE,CAAA,eAAA,EAAkB,CAAA,CAAE,IAAI,CAAA,CAAA,EAAI,CAAA,CAAE,IAAI,CAAA,EAAA,EAAK,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,MAAA,CAAO,GAAG,CAAC,CAAA;AAAA,OACzF;AAAA,IACF;AAAA,EACF;AAEA,EAAA,KAAA,CAAM,CAAA,OAAA,EAAU,MAAA,CAAO,MAAM,CAAA,UAAA,CAAY,CAAA;AACzC,EAAA,KAAA,MAAW,CAAA,IAAK,MAAA,EAAQ,OAAA,CAAQ,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAA;AAC1C","file":"source-manifest-publish-O6P7G2M7.js","sourcesContent":["/**\n * `skaile source manifest publish` / `yank` — the curator-publish flow. Takes a\n * locally-curated sidecar manifest (over a foreign public GitHub repo) and:\n *\n * 1. Pushes the curated `skaile.manifest.yaml` to the curator's OWN public\n * \"sidecar\" repo (bytes stay in the foreign source; the sidecar holds only\n * the manifest pointing at it).\n * 2. Registers the foreign source + the sidecar (url + pinned commit) with the\n * store, syncs it, and publishes each curated asset.\n *\n * `yank` is the inverse: unpublish each currently-published asset of the source.\n *\n * The store REST surface is reached through the injectable {@link PublisherClient}\n * (default HTTP client); git side-effects go through an injectable `spawn`. Both\n * seams keep the pure helpers + orchestration unit/integration-testable without a\n * live store or a real remote.\n *\n * @docLink cli/commands/source#manifest-publish\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport {\n decodeSkaileManifest,\n encodeSkaileManifest,\n globalSettingsPath,\n type SkPublishManifest,\n sourceCacheKey,\n} from \"@skaile/workspaces/core\";\nimport { logErr, logInfo, logOk, logWarn, S } from \"../helpers.ts\";\nimport { makeHttpPublisherClient, type PublisherClient } from \"../store-publisher.ts\";\nimport { isStoreAuthenticated } from \"../store-client.ts\";\nimport { bareName, publishToStore, refFor } from \"./publish-core.ts\";\nimport { sourceClonePath } from \"./source.ts\";\nimport { resolveSourceArg } from \"./source-manifest.ts\";\n\n/** The fixed filename a sidecar repo carries at its root. */\nconst SIDECAR_MANIFEST_FILENAME = \"skaile.manifest.yaml\";\n\n/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */\ntype SpawnLike = typeof spawnSync;\n\n/**\n * Return a copy of `manifest` normalized for publication under `namespace`:\n * the top-level `publisher` is set to `namespace` and every per-asset\n * `publisher` override is removed so all assets inherit the top-level one.\n * Pure — the input is not mutated.\n */\nexport function normalizePublishedManifest(\n manifest: SkPublishManifest,\n namespace: string,\n): SkPublishManifest {\n const assets = (manifest.assets ?? []).map((a) => {\n const { publisher: _drop, ...rest } = a;\n return rest;\n });\n return { ...manifest, publisher: namespace, assets };\n}\n\n// ── Sidecar-repo association (~/.skaile/settings.json) ────────────────────────\n\n/**\n * Path to the user settings file — the same `$SKAILE_HOME/settings.json`\n * (`~/.skaile/settings.json`) the store client reads tokens from, so the sidecar\n * association lives beside the store manifests and tests isolate through the\n * same `SKAILE_HOME` seam.\n */\nfunction settingsFile(): string {\n return globalSettingsPath();\n}\n\nfunction readSettings(): Record<string, any> {\n const file = settingsFile();\n if (!existsSync(file)) return {};\n try {\n return JSON.parse(readFileSync(file, \"utf-8\"));\n } catch {\n return {};\n }\n}\n\n/**\n * The sidecar repo URL previously associated with a source `slug`, if any.\n * Reads `settings.sidecarRepos?.[slug]?.repo`.\n */\nexport function getSidecarRepo(slug: string): string | undefined {\n const settings = readSettings();\n return settings.sidecarRepos?.[slug]?.repo;\n}\n\n/**\n * Persist the sidecar repo URL for a source `slug`, preserving every other\n * settings key. Stored as an object (`{ repo }`) so a `path` (or other fields)\n * can be added later without a schema migration.\n */\nexport function saveSidecarRepo(slug: string, repo: string): void {\n const file = settingsFile();\n mkdirSync(dirname(file), { recursive: true });\n const settings = readSettings();\n const sidecarRepos = { ...(settings.sidecarRepos ?? {}) };\n sidecarRepos[slug] = { ...(sidecarRepos[slug] ?? {}), repo };\n settings.sidecarRepos = sidecarRepos;\n writeFileSync(file, JSON.stringify(settings, null, 2), \"utf-8\");\n}\n\n// ── Sidecar push ──────────────────────────────────────────────────────────────\n\n/**\n * Run a git command in `cwd` via the injected spawn, throwing with the captured\n * stderr on failure. Returns trimmed stdout.\n */\nfunction git(spawn: SpawnLike, cwd: string, args: string[]): string {\n const res = spawn(\"git\", [\"-C\", cwd, ...args], { encoding: \"utf-8\" });\n if (res.status !== 0) {\n const stderr = (res.stderr ?? \"\").toString().trim();\n throw new Error(`git ${args.join(\" \")} failed: ${stderr || `exit ${res.status}`}`);\n }\n return (res.stdout ?? \"\").toString().trim();\n}\n\n/**\n * Clone the curator's sidecar repo, write the curated manifest at its root, and\n * commit + push. Returns the pushed commit sha (used to pin the store source).\n *\n * Idempotent re-publish: when the manifest is unchanged `git commit` fails with\n * \"nothing to commit\" — we swallow that and return the current HEAD so a no-op\n * re-run still yields a valid pin. Any push/auth failure surfaces as a thrown\n * Error carrying git's stderr.\n */\nexport function pushSidecarManifest(opts: {\n sidecarRepoUrl: string;\n manifestText: string;\n spawn?: SpawnLike;\n}): { commitSha: string } {\n const spawn = opts.spawn ?? spawnSync;\n // Dedicated dir next to the source clone cache; wipe any stale clone first so\n // a re-publish always starts from a clean shallow checkout of the remote.\n const cloneDir = `${sourceClonePath(sourceCacheKey(opts.sidecarRepoUrl))}-sidecar-push`;\n rmSync(cloneDir, { recursive: true, force: true });\n mkdirSync(dirname(cloneDir), { recursive: true });\n\n // The clone is scratch — always remove it afterwards (success or failure) so a\n // failed push never leaves a stale checkout in the cache dir.\n try {\n const cloneRes = spawn(\"git\", [\"clone\", \"--depth\", \"1\", opts.sidecarRepoUrl, cloneDir], {\n encoding: \"utf-8\",\n });\n if (cloneRes.status !== 0) {\n const stderr = (cloneRes.stderr ?? \"\").toString().trim();\n throw new Error(\n `git clone ${opts.sidecarRepoUrl} failed: ${stderr || `exit ${cloneRes.status}`}`,\n );\n }\n\n writeFileSync(join(cloneDir, SIDECAR_MANIFEST_FILENAME), opts.manifestText, \"utf-8\");\n git(spawn, cloneDir, [\"add\", SIDECAR_MANIFEST_FILENAME]);\n\n // Fixed bot identity via -c so the commit succeeds regardless of the curator's\n // git config (the sidecar push is a machine action, not authored work).\n const commitRes = spawn(\n \"git\",\n [\n \"-C\",\n cloneDir,\n \"-c\",\n \"user.email=publish@skaile.store\",\n \"-c\",\n \"user.name=skaile\",\n \"commit\",\n \"-m\",\n \"chore(sidecar): publish curated manifest\",\n ],\n { encoding: \"utf-8\" },\n );\n if (commitRes.status !== 0) {\n const out = `${commitRes.stdout ?? \"\"}${commitRes.stderr ?? \"\"}`;\n // Nothing changed → idempotent re-publish; keep the existing HEAD.\n if (!/nothing to commit/i.test(out)) {\n throw new Error(`git commit failed: ${out.trim() || `exit ${commitRes.status}`}`);\n }\n } else {\n // `push origin HEAD` (not a bare `push`) so a fresh sidecar repo with an\n // unborn/renamed default branch still gets its branch created on the remote.\n git(spawn, cloneDir, [\"push\", \"origin\", \"HEAD\"]);\n }\n\n return { commitSha: git(spawn, cloneDir, [\"rev-parse\", \"HEAD\"]) };\n } finally {\n rmSync(cloneDir, { recursive: true, force: true });\n }\n}\n\n// ── Orchestration ───────────────────────────────────────────────────────────\n\n/**\n * `source manifest publish <src>` — publish a curated sidecar manifest to the\n * store. See the module header for the full flow. Store calls go through\n * `client` (default HTTP); git side-effects through `spawn` (default\n * `spawnSync`). The auth gate is enforced only for the default HTTP client so\n * injected fakes bypass it.\n */\nexport async function runPublish(\n arg: string,\n opts: {\n projectDir: string;\n as?: string;\n sidecarRepo?: string;\n ref?: string;\n dryRun?: boolean;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug, manifestFile } = resolveSourceArg(arg, opts.projectDir);\n\n if (!existsSync(manifestFile)) {\n logErr(\n `No curated manifest for \"${slug}\" at ${S.dim(manifestFile)} — ` +\n \"run `skaile source manifest init` first.\",\n );\n process.exit(1);\n }\n\n const { manifest, diagnostics } = decodeSkaileManifest(readFileSync(manifestFile, \"utf-8\"));\n if (diagnostics.some((d) => d.severity === \"error\")) {\n for (const d of diagnostics.filter((x) => x.severity === \"error\")) {\n logErr(`${d.code}: ${d.message}`);\n }\n logErr(\n \"The curated manifest has errors — fix them with `skaile source manifest edit` / \" +\n \"`verify` before publishing.\",\n );\n process.exit(1);\n }\n\n // A real publish makes store calls (+ `me()` when `--as` is omitted), so it\n // needs a token. `--dry-run` is an offline preview: never gate it on auth.\n const authed = injected || isStoreAuthenticated();\n if (!opts.dryRun && !authed) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n // Namespace: `--as` wins; else the caller's verified identity. Prefer the\n // GitHub handle (`githubLogin`) over the store login (`username`) — for a user\n // whose login differs from their GitHub handle the login namespace may be\n // reserved (matches the CLI's `resolveLibraryPublisher` precedence). In an\n // unauthenticated dry-run we cannot call `me()`, so show a placeholder.\n let namespace: string;\n if (opts.as) namespace = opts.as;\n else if (authed) {\n const me = await pub.me();\n // `||` not `??`: an empty-string githubLogin (partially-connected account) is\n // not a usable namespace — fall back to the login rather than publish under \"\".\n namespace = me.githubLogin || me.username;\n } else namespace = \"<your store username>\";\n\n const normalized = normalizePublishedManifest(manifest, namespace);\n const publishedText = encodeSkaileManifest(normalized);\n\n const wouldBeRefs = (normalized.assets ?? []).map((a) =>\n refFor(a.kind, namespace, a.name, a.version ?? normalized.version),\n );\n\n if (opts.dryRun) {\n const sidecar = opts.sidecarRepo ?? getSidecarRepo(slug) ?? \"<none — pass --sidecar-repo>\";\n logInfo(`Publish plan for ${S.bold(slug)}:`);\n logInfo(` namespace: ${namespace}`);\n logInfo(` sidecar repo: ${sidecar}`);\n logInfo(` source ref: ${opts.ref ?? \"main\"}`);\n logInfo(` would publish ${wouldBeRefs.length} asset(s):`);\n for (const r of wouldBeRefs) logInfo(` ${r}`);\n return;\n }\n\n const sidecarRepoUrl = opts.sidecarRepo ?? getSidecarRepo(slug);\n if (!sidecarRepoUrl) {\n logErr(\n \"No sidecar repo associated with this source. Pass \" +\n `${S.cmd(\"--sidecar-repo https://github.com/<you>/<repo>\")} — it must be a ` +\n \"PUBLIC GitHub repo you own; the curated manifest is committed there and the \" +\n \"store pins to that commit.\",\n );\n process.exit(1);\n }\n if (opts.sidecarRepo) saveSidecarRepo(slug, sidecarRepoUrl);\n\n const { commitSha } = pushSidecarManifest({ sidecarRepoUrl, manifestText: publishedText, spawn });\n logOk(`Pushed curated manifest to ${S.dim(sidecarRepoUrl)} @ ${commitSha.slice(0, 10)}.`);\n\n // The FOREIGN repo's ref to ingest (branch/sha). Defaults to `main`.\n const sourceRef = opts.ref ?? \"main\";\n\n const { published } = await publishToStore({\n sourceUrl: url,\n ref: sourceRef,\n sidecar: { url: sidecarRepoUrl, ref: commitSha },\n manifest: normalized,\n client: pub,\n });\n\n if (published.length > 0) {\n logInfo(`Consumers can now install them with \\`skaile add ${published[0]}\\`.`);\n }\n}\n\n/**\n * `source manifest yank <src>` — unpublish the source's published assets (all,\n * or the single asset matching `opts.asset`'s name). Auth-gated like publish.\n */\nexport async function runYank(\n arg: string,\n opts: { projectDir: string; asset?: string },\n client?: PublisherClient,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug } = resolveSourceArg(arg, opts.projectDir);\n\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const rows = await pub.sourcesList();\n const source = rows.find((r) => r.url === url);\n if (!source) {\n logErr(`Source \"${slug}\" is not registered in the store — nothing to yank.`);\n process.exit(1);\n }\n\n // Optionally narrow to a single asset by name (accept a bare name or a ref).\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const candidates = (await pub.sourceCandidates(source.id)).filter(\n (c) => c.published && (!targetName || c.name === targetName),\n );\n if (candidates.length === 0) {\n logWarn(\"No published assets matched — nothing to yank.\");\n return;\n }\n\n const yanked: string[] = [];\n for (const c of candidates) {\n try {\n await pub.assetUnpublish(c.id);\n yanked.push(`${c.kind}:${c.name}`);\n } catch (err) {\n logWarn(\n `Failed to yank ${c.kind}:${c.name}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n logOk(`Yanked ${yanked.length} asset(s):`);\n for (const r of yanked) logInfo(` ${r}`);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../cli/src/commands/source-manifest-publish.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,IAAM,yBAAA,GAA4B,sBAAA;AAW3B,SAAS,0BAAA,CACd,UACA,SAAA,EACmB;AACnB,EAAA,MAAM,UAAU,QAAA,CAAS,MAAA,IAAU,EAAC,EAAG,GAAA,CAAI,CAAC,CAAA,KAAM;AAChD,IAAA,MAAM,EAAE,SAAA,EAAW,KAAA,EAAO,GAAG,MAAK,GAAI,CAAA;AACtC,IAAA,OAAO,IAAA;AAAA,EACT,CAAC,CAAA;AACD,EAAA,OAAO,EAAE,GAAG,QAAA,EAAU,SAAA,EAAW,WAAW,MAAA,EAAO;AACrD;AAUA,SAAS,YAAA,GAAuB;AAC9B,EAAA,OAAO,kBAAA,EAAmB;AAC5B;AAEA,SAAS,YAAA,GAAoC;AAC3C,EAAA,MAAM,OAAO,YAAA,EAAa;AAC1B,EAAA,IAAI,CAAC,UAAA,CAAW,IAAI,CAAA,SAAU,EAAC;AAC/B,EAAA,IAAI;AACF,IAAA,OAAO,IAAA,CAAK,KAAA,CAAM,YAAA,CAAa,IAAA,EAAM,OAAO,CAAC,CAAA;AAAA,EAC/C,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,EAAC;AAAA,EACV;AACF;AAMO,SAAS,eAAe,IAAA,EAAkC;AAC/D,EAAA,MAAM,WAAW,YAAA,EA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AAA,CAAM,CAAA,OAAA,EAAU,MAAA,CAAO,MAAM,CAAA,UAAA,CAAY,CAAA;AACzC,EAAA,KAAA,MAAW,CAAA,IAAK,MAAA,EAAQ,OAAA,CAAQ,CAAA,EAAA,EAAK,CAAC,CAAA,CAAE,CAAA;AAC1C","file":"source-manifest-publish-4FPIPPLV.js","sourcesContent":["/**\n * `skaile source manifest publish` / `yank` — the curator-publish flow. Takes a\n * locally-curated sidecar manifest (over a foreign public GitHub repo) and:\n *\n * 1. Pushes the curated `skaile.manifest.yaml` to the curator's OWN public\n * \"sidecar\" repo (bytes stay in the foreign source; the sidecar holds only\n * the manifest pointing at it).\n * 2. Registers the foreign source + the sidecar (url + pinned commit) with the\n * store, syncs it, and publishes each curated asset.\n *\n * `yank` is the inverse: unpublish each currently-published asset of the source.\n *\n * The store REST surface is reached through the injectable {@link PublisherClient}\n * (default HTTP client); git side-effects go through an injectable `spawn`. Both\n * seams keep the pure helpers + orchestration unit/integration-testable without a\n * live store or a real remote.\n *\n * @docLink cli/commands/source#manifest-publish\n */\n\nimport { spawnSync } from \"node:child_process\";\nimport { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport {\n decodeSkaileManifest,\n encodeSkaileManifest,\n globalSettingsPath,\n type SkPublishManifest,\n sourceCacheKey,\n} from \"@skaile/workspaces/core\";\nimport { logErr, logInfo, logOk, logWarn, S } from \"../helpers.ts\";\nimport { makeHttpPublisherClient, type PublisherClient } from \"../store-publisher.ts\";\nimport { isStoreAuthenticated } from \"../store-client.ts\";\nimport { bareName, publishToStore, refFor } from \"./publish-core.ts\";\nimport { sourceClonePath } from \"./source.ts\";\nimport { resolveSourceArg } from \"./source-manifest.ts\";\n\n/** The fixed filename a sidecar repo carries at its root. */\nconst SIDECAR_MANIFEST_FILENAME = \"skaile.manifest.yaml\";\n\n/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */\ntype SpawnLike = typeof spawnSync;\n\n/**\n * Return a copy of `manifest` normalized for publication under `namespace`:\n * the top-level `publisher` is set to `namespace` and every per-asset\n * `publisher` override is removed so all assets inherit the top-level one.\n * Pure — the input is not mutated.\n */\nexport function normalizePublishedManifest(\n manifest: SkPublishManifest,\n namespace: string,\n): SkPublishManifest {\n const assets = (manifest.assets ?? []).map((a) => {\n const { publisher: _drop, ...rest } = a;\n return rest;\n });\n return { ...manifest, publisher: namespace, assets };\n}\n\n// ── Sidecar-repo association (~/.skaile/settings.json) ────────────────────────\n\n/**\n * Path to the user settings file — the same `$SKAILE_HOME/settings.json`\n * (`~/.skaile/settings.json`) the store client reads tokens from, so the sidecar\n * association lives beside the store manifests and tests isolate through the\n * same `SKAILE_HOME` seam.\n */\nfunction settingsFile(): string {\n return globalSettingsPath();\n}\n\nfunction readSettings(): Record<string, any> {\n const file = settingsFile();\n if (!existsSync(file)) return {};\n try {\n return JSON.parse(readFileSync(file, \"utf-8\"));\n } catch {\n return {};\n }\n}\n\n/**\n * The sidecar repo URL previously associated with a source `slug`, if any.\n * Reads `settings.sidecarRepos?.[slug]?.repo`.\n */\nexport function getSidecarRepo(slug: string): string | undefined {\n const settings = readSettings();\n return settings.sidecarRepos?.[slug]?.repo;\n}\n\n/**\n * Persist the sidecar repo URL for a source `slug`, preserving every other\n * settings key. Stored as an object (`{ repo }`) so a `path` (or other fields)\n * can be added later without a schema migration.\n */\nexport function saveSidecarRepo(slug: string, repo: string): void {\n const file = settingsFile();\n mkdirSync(dirname(file), { recursive: true });\n const settings = readSettings();\n const sidecarRepos = { ...(settings.sidecarRepos ?? {}) };\n sidecarRepos[slug] = { ...(sidecarRepos[slug] ?? {}), repo };\n settings.sidecarRepos = sidecarRepos;\n writeFileSync(file, JSON.stringify(settings, null, 2), \"utf-8\");\n}\n\n// ── Sidecar push ──────────────────────────────────────────────────────────────\n\n/**\n * Run a git command in `cwd` via the injected spawn, throwing with the captured\n * stderr on failure. Returns trimmed stdout.\n */\nfunction git(spawn: SpawnLike, cwd: string, args: string[]): string {\n const res = spawn(\"git\", [\"-C\", cwd, ...args], { encoding: \"utf-8\" });\n if (res.status !== 0) {\n const stderr = (res.stderr ?? \"\").toString().trim();\n throw new Error(`git ${args.join(\" \")} failed: ${stderr || `exit ${res.status}`}`);\n }\n return (res.stdout ?? \"\").toString().trim();\n}\n\n/**\n * Clone the curator's sidecar repo, write the curated manifest at its root, and\n * commit + push. Returns the pushed commit sha (used to pin the store source).\n *\n * Idempotent re-publish: when the manifest is unchanged `git commit` fails with\n * \"nothing to commit\" — we swallow that and return the current HEAD so a no-op\n * re-run still yields a valid pin. Any push/auth failure surfaces as a thrown\n * Error carrying git's stderr.\n */\nexport function pushSidecarManifest(opts: {\n sidecarRepoUrl: string;\n manifestText: string;\n spawn?: SpawnLike;\n}): { commitSha: string } {\n const spawn = opts.spawn ?? spawnSync;\n // Dedicated dir next to the source clone cache; wipe any stale clone first so\n // a re-publish always starts from a clean shallow checkout of the remote.\n const cloneDir = `${sourceClonePath(sourceCacheKey(opts.sidecarRepoUrl))}-sidecar-push`;\n rmSync(cloneDir, { recursive: true, force: true });\n mkdirSync(dirname(cloneDir), { recursive: true });\n\n // The clone is scratch — always remove it afterwards (success or failure) so a\n // failed push never leaves a stale checkout in the cache dir.\n try {\n const cloneRes = spawn(\"git\", [\"clone\", \"--depth\", \"1\", opts.sidecarRepoUrl, cloneDir], {\n encoding: \"utf-8\",\n });\n if (cloneRes.status !== 0) {\n const stderr = (cloneRes.stderr ?? \"\").toString().trim();\n throw new Error(\n `git clone ${opts.sidecarRepoUrl} failed: ${stderr || `exit ${cloneRes.status}`}`,\n );\n }\n\n writeFileSync(join(cloneDir, SIDECAR_MANIFEST_FILENAME), opts.manifestText, \"utf-8\");\n git(spawn, cloneDir, [\"add\", SIDECAR_MANIFEST_FILENAME]);\n\n // Fixed bot identity via -c so the commit succeeds regardless of the curator's\n // git config (the sidecar push is a machine action, not authored work).\n const commitRes = spawn(\n \"git\",\n [\n \"-C\",\n cloneDir,\n \"-c\",\n \"user.email=publish@skaile.store\",\n \"-c\",\n \"user.name=skaile\",\n \"commit\",\n \"-m\",\n \"chore(sidecar): publish curated manifest\",\n ],\n { encoding: \"utf-8\" },\n );\n if (commitRes.status !== 0) {\n const out = `${commitRes.stdout ?? \"\"}${commitRes.stderr ?? \"\"}`;\n // Nothing changed → idempotent re-publish; keep the existing HEAD.\n if (!/nothing to commit/i.test(out)) {\n throw new Error(`git commit failed: ${out.trim() || `exit ${commitRes.status}`}`);\n }\n } else {\n // `push origin HEAD` (not a bare `push`) so a fresh sidecar repo with an\n // unborn/renamed default branch still gets its branch created on the remote.\n git(spawn, cloneDir, [\"push\", \"origin\", \"HEAD\"]);\n }\n\n return { commitSha: git(spawn, cloneDir, [\"rev-parse\", \"HEAD\"]) };\n } finally {\n rmSync(cloneDir, { recursive: true, force: true });\n }\n}\n\n// ── Orchestration ───────────────────────────────────────────────────────────\n\n/**\n * `source manifest publish <src>` — publish a curated sidecar manifest to the\n * store. See the module header for the full flow. Store calls go through\n * `client` (default HTTP); git side-effects through `spawn` (default\n * `spawnSync`). The auth gate is enforced only for the default HTTP client so\n * injected fakes bypass it.\n */\nexport async function runPublish(\n arg: string,\n opts: {\n projectDir: string;\n as?: string;\n sidecarRepo?: string;\n ref?: string;\n dryRun?: boolean;\n },\n client?: PublisherClient,\n spawn: SpawnLike = spawnSync,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug, manifestFile } = resolveSourceArg(arg, opts.projectDir);\n\n if (!existsSync(manifestFile)) {\n logErr(\n `No curated manifest for \"${slug}\" at ${S.dim(manifestFile)} — ` +\n \"run `skaile source manifest init` first.\",\n );\n process.exit(1);\n }\n\n const { manifest, diagnostics } = decodeSkaileManifest(readFileSync(manifestFile, \"utf-8\"));\n if (diagnostics.some((d) => d.severity === \"error\")) {\n for (const d of diagnostics.filter((x) => x.severity === \"error\")) {\n logErr(`${d.code}: ${d.message}`);\n }\n logErr(\n \"The curated manifest has errors — fix them with `skaile source manifest edit` / \" +\n \"`verify` before publishing.\",\n );\n process.exit(1);\n }\n\n // A real publish makes store calls (+ `me()` when `--as` is omitted), so it\n // needs a token. `--dry-run` is an offline preview: never gate it on auth.\n const authed = injected || isStoreAuthenticated();\n if (!opts.dryRun && !authed) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n // Namespace: `--as` wins; else the caller's verified identity. Prefer the\n // GitHub handle (`githubLogin`) over the store login (`username`) — for a user\n // whose login differs from their GitHub handle the login namespace may be\n // reserved (matches the CLI's `resolveLibraryPublisher` precedence). In an\n // unauthenticated dry-run we cannot call `me()`, so show a placeholder.\n let namespace: string;\n if (opts.as) namespace = opts.as;\n else if (authed) {\n const me = await pub.me();\n // `||` not `??`: an empty-string githubLogin (partially-connected account) is\n // not a usable namespace — fall back to the login rather than publish under \"\".\n namespace = me.githubLogin || me.username;\n } else namespace = \"<your store username>\";\n\n const normalized = normalizePublishedManifest(manifest, namespace);\n const publishedText = encodeSkaileManifest(normalized);\n\n const wouldBeRefs = (normalized.assets ?? []).map((a) =>\n refFor(a.kind, namespace, a.name, a.version ?? normalized.version),\n );\n\n if (opts.dryRun) {\n const sidecar = opts.sidecarRepo ?? getSidecarRepo(slug) ?? \"<none — pass --sidecar-repo>\";\n logInfo(`Publish plan for ${S.bold(slug)}:`);\n logInfo(` namespace: ${namespace}`);\n logInfo(` sidecar repo: ${sidecar}`);\n logInfo(` source ref: ${opts.ref ?? \"main\"}`);\n logInfo(` would publish ${wouldBeRefs.length} asset(s):`);\n for (const r of wouldBeRefs) logInfo(` ${r}`);\n return;\n }\n\n const sidecarRepoUrl = opts.sidecarRepo ?? getSidecarRepo(slug);\n if (!sidecarRepoUrl) {\n logErr(\n \"No sidecar repo associated with this source. Pass \" +\n `${S.cmd(\"--sidecar-repo https://github.com/<you>/<repo>\")} — it must be a ` +\n \"PUBLIC GitHub repo you own; the curated manifest is committed there and the \" +\n \"store pins to that commit.\",\n );\n process.exit(1);\n }\n if (opts.sidecarRepo) saveSidecarRepo(slug, sidecarRepoUrl);\n\n const { commitSha } = pushSidecarManifest({ sidecarRepoUrl, manifestText: publishedText, spawn });\n logOk(`Pushed curated manifest to ${S.dim(sidecarRepoUrl)} @ ${commitSha.slice(0, 10)}.`);\n\n // The FOREIGN repo's ref to ingest (branch/sha). Defaults to `main`.\n const sourceRef = opts.ref ?? \"main\";\n\n const { published } = await publishToStore({\n sourceUrl: url,\n ref: sourceRef,\n sidecar: { url: sidecarRepoUrl, ref: commitSha },\n manifest: normalized,\n client: pub,\n });\n\n if (published.length > 0) {\n logInfo(`Consumers can now install them with \\`skaile add ${published[0]}\\`.`);\n }\n}\n\n/**\n * `source manifest yank <src>` — unpublish the source's published assets (all,\n * or the single asset matching `opts.asset`'s name). Auth-gated like publish.\n */\nexport async function runYank(\n arg: string,\n opts: { projectDir: string; asset?: string },\n client?: PublisherClient,\n): Promise<void> {\n const injected = client !== undefined;\n const pub = client ?? makeHttpPublisherClient();\n\n const { url, slug } = resolveSourceArg(arg, opts.projectDir);\n\n if (!injected && !isStoreAuthenticated()) {\n logErr(\"Not signed in — run `skaile store login` first.\");\n process.exit(1);\n }\n\n const rows = await pub.sourcesList();\n const source = rows.find((r) => r.url === url);\n if (!source) {\n logErr(`Source \"${slug}\" is not registered in the store — nothing to yank.`);\n process.exit(1);\n }\n\n // Optionally narrow to a single asset by name (accept a bare name or a ref).\n const targetName = opts.asset ? bareName(opts.asset) : undefined;\n const candidates = (await pub.sourceCandidates(source.id)).filter(\n (c) => c.published && (!targetName || c.name === targetName),\n );\n if (candidates.length === 0) {\n logWarn(\"No published assets matched — nothing to yank.\");\n return;\n }\n\n const yanked: string[] = [];\n for (const c of candidates) {\n try {\n await pub.assetUnpublish(c.id);\n yanked.push(`${c.kind}:${c.name}`);\n } catch (err) {\n logWarn(\n `Failed to yank ${c.kind}:${c.name}: ${err instanceof Error ? err.message : String(err)}`,\n );\n }\n }\n\n logOk(`Yanked ${yanked.length} asset(s):`);\n for (const r of yanked) logInfo(` ${r}`);\n}\n"]}
|
package/dist/tui/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { createAgentSession } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
import { createAgentSession } from '../chunk-VOOI7B2L.js';
|
|
2
|
+
import '../chunk-N6FBTXQ5.js';
|
|
3
|
+
import '../chunk-6UFFKMVC.js';
|
|
4
|
+
import '../chunk-KM7XWC4Y.js';
|
|
5
5
|
import '../chunk-R6O6YWU7.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-IUUYRXT6.js';
|
|
7
|
+
import '../chunk-RNPHRRLG.js';
|
|
8
8
|
import '../chunk-4ZTPYIBE.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-NWQB7UTY.js';
|
|
10
10
|
import '../chunk-X5YPJV4N.js';
|
|
11
11
|
import '../chunk-O7SG5PC2.js';
|
|
12
12
|
import '../chunk-7QBNJTTQ.js';
|
|
@@ -15,51 +15,51 @@ import '../chunk-5LKOAX7I.js';
|
|
|
15
15
|
import '../chunk-32NA4TVC.js';
|
|
16
16
|
import '../chunk-W3UDISS2.js';
|
|
17
17
|
import '../chunk-HCYS7GFP.js';
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-MKLBK7HI.js';
|
|
19
19
|
import '../chunk-4R6DROGN.js';
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-EB4XN3KE.js';
|
|
21
|
+
import '../chunk-O4Z7MAW7.js';
|
|
22
22
|
import '../chunk-CT6NQSA4.js';
|
|
23
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-SZWRPEF7.js';
|
|
24
24
|
import '../chunk-FK6HPLQA.js';
|
|
25
|
-
import { loadConnectorDeclarations } from '../chunk-
|
|
26
|
-
import '../chunk-
|
|
27
|
-
import '../chunk-
|
|
25
|
+
import { loadConnectorDeclarations } from '../chunk-PSA6ONFB.js';
|
|
26
|
+
import '../chunk-34C42MJX.js';
|
|
27
|
+
import '../chunk-UX3K4RKE.js';
|
|
28
28
|
import '../chunk-EINLFFP6.js';
|
|
29
29
|
import '../chunk-LOO5CB5M.js';
|
|
30
30
|
import '../chunk-NARITJS2.js';
|
|
31
|
-
import '../chunk-
|
|
31
|
+
import '../chunk-GWXFSLBK.js';
|
|
32
32
|
import '../chunk-XBSQ4KMC.js';
|
|
33
33
|
import '../chunk-YROR332M.js';
|
|
34
|
-
import '../chunk-
|
|
34
|
+
import '../chunk-BTK7ECLH.js';
|
|
35
35
|
import '../chunk-6E6PKKAD.js';
|
|
36
36
|
import '../chunk-IFGTRL2I.js';
|
|
37
|
-
import '../chunk-
|
|
37
|
+
import '../chunk-LBQ4BBX4.js';
|
|
38
38
|
import '../chunk-37FTLYFP.js';
|
|
39
39
|
import '../chunk-QZLWJETK.js';
|
|
40
40
|
import '../chunk-XUUYAS3Z.js';
|
|
41
41
|
import '../chunk-NFGRW3L7.js';
|
|
42
42
|
import '../chunk-QCI6D7E4.js';
|
|
43
43
|
import '../chunk-DMLDYFDS.js';
|
|
44
|
-
import '../chunk-
|
|
45
|
-
import '../chunk-
|
|
46
|
-
import '../chunk-
|
|
44
|
+
import '../chunk-DFFD4BFG.js';
|
|
45
|
+
import '../chunk-6VRJH4MR.js';
|
|
46
|
+
import '../chunk-FAP63KV7.js';
|
|
47
47
|
import '../chunk-R7FOF242.js';
|
|
48
48
|
import '../chunk-3TXEJN4W.js';
|
|
49
49
|
import '../chunk-FRHE7FFB.js';
|
|
50
|
-
import { resolveSettings } from '../chunk-
|
|
50
|
+
import { resolveSettings } from '../chunk-OOLT6HGP.js';
|
|
51
51
|
import '../chunk-4GY63JU6.js';
|
|
52
|
-
import '../chunk-
|
|
53
|
-
import '../chunk-
|
|
52
|
+
import '../chunk-SWO25LTO.js';
|
|
53
|
+
import '../chunk-G67BOI2J.js';
|
|
54
54
|
import { DEFAULT_DRIVER_ID } from '../chunk-5BEFNLOR.js';
|
|
55
55
|
import '../chunk-A2ULN3KX.js';
|
|
56
|
-
import { resolveAgentDir } from '../chunk-
|
|
57
|
-
import '../chunk-
|
|
56
|
+
import { resolveAgentDir } from '../chunk-LCU5U5IW.js';
|
|
57
|
+
import '../chunk-L5VSIPQD.js';
|
|
58
58
|
import '../chunk-CPSIPIX7.js';
|
|
59
|
-
import '../chunk-
|
|
59
|
+
import '../chunk-RVIZQ5XD.js';
|
|
60
60
|
import '../chunk-RVRB27AN.js';
|
|
61
|
-
import '../chunk-
|
|
62
|
-
import '../chunk-
|
|
61
|
+
import '../chunk-TTPSDC2G.js';
|
|
62
|
+
import '../chunk-O7VPNKYN.js';
|
|
63
63
|
import '../chunk-ICSCSM5D.js';
|
|
64
64
|
import '../chunk-JMKB7IB4.js';
|
|
65
65
|
import '../chunk-MJHSLODD.js';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export { buildWorkspaceMcpServer, buildWorkspaceMcpStdioServer, buildWorkspaceToolDefs, runMcpServerStdio } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { buildWorkspaceMcpServer, buildWorkspaceMcpStdioServer, buildWorkspaceToolDefs, runMcpServerStdio } from '../../chunk-6UFFKMVC.js';
|
|
2
|
+
import '../../chunk-KM7XWC4Y.js';
|
|
3
3
|
import '../../chunk-R6O6YWU7.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-IUUYRXT6.js';
|
|
5
|
+
import '../../chunk-RNPHRRLG.js';
|
|
6
6
|
import '../../chunk-4ZTPYIBE.js';
|
|
7
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-NWQB7UTY.js';
|
|
8
8
|
import '../../chunk-X5YPJV4N.js';
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-EB4XN3KE.js';
|
|
10
|
+
import '../../chunk-O4Z7MAW7.js';
|
|
11
|
+
import '../../chunk-SZWRPEF7.js';
|
|
12
12
|
import '../../chunk-FK6HPLQA.js';
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-PSA6ONFB.js';
|
|
14
|
+
import '../../chunk-34C42MJX.js';
|
|
15
|
+
import '../../chunk-UX3K4RKE.js';
|
|
16
16
|
import '../../chunk-EINLFFP6.js';
|
|
17
17
|
import '../../chunk-LOO5CB5M.js';
|
|
18
18
|
import '../../chunk-NARITJS2.js';
|
|
19
|
-
import '../../chunk-
|
|
19
|
+
import '../../chunk-GWXFSLBK.js';
|
|
20
20
|
import '../../chunk-XBSQ4KMC.js';
|
|
21
21
|
import '../../chunk-YROR332M.js';
|
|
22
|
-
import '../../chunk-
|
|
22
|
+
import '../../chunk-BTK7ECLH.js';
|
|
23
23
|
import '../../chunk-6E6PKKAD.js';
|
|
24
24
|
import '../../chunk-IFGTRL2I.js';
|
|
25
|
-
import '../../chunk-
|
|
25
|
+
import '../../chunk-LBQ4BBX4.js';
|
|
26
26
|
import '../../chunk-37FTLYFP.js';
|
|
27
27
|
import '../../chunk-QZLWJETK.js';
|
|
28
28
|
import '../../chunk-XUUYAS3Z.js';
|
|
@@ -30,19 +30,19 @@ import '../../chunk-NFGRW3L7.js';
|
|
|
30
30
|
import '../../chunk-QCI6D7E4.js';
|
|
31
31
|
import '../../chunk-DMLDYFDS.js';
|
|
32
32
|
import '../../chunk-FRHE7FFB.js';
|
|
33
|
-
import '../../chunk-
|
|
33
|
+
import '../../chunk-OOLT6HGP.js';
|
|
34
34
|
import '../../chunk-4GY63JU6.js';
|
|
35
|
-
import '../../chunk-
|
|
36
|
-
import '../../chunk-
|
|
35
|
+
import '../../chunk-SWO25LTO.js';
|
|
36
|
+
import '../../chunk-G67BOI2J.js';
|
|
37
37
|
import '../../chunk-5BEFNLOR.js';
|
|
38
38
|
import '../../chunk-A2ULN3KX.js';
|
|
39
|
-
import '../../chunk-
|
|
40
|
-
import '../../chunk-
|
|
39
|
+
import '../../chunk-LCU5U5IW.js';
|
|
40
|
+
import '../../chunk-L5VSIPQD.js';
|
|
41
41
|
import '../../chunk-CPSIPIX7.js';
|
|
42
|
-
import '../../chunk-
|
|
42
|
+
import '../../chunk-RVIZQ5XD.js';
|
|
43
43
|
import '../../chunk-RVRB27AN.js';
|
|
44
|
-
import '../../chunk-
|
|
45
|
-
import '../../chunk-
|
|
44
|
+
import '../../chunk-TTPSDC2G.js';
|
|
45
|
+
import '../../chunk-O7VPNKYN.js';
|
|
46
46
|
import '../../chunk-ICSCSM5D.js';
|
|
47
47
|
import '../../chunk-JMKB7IB4.js';
|
|
48
48
|
import '../../chunk-MJHSLODD.js';
|
|
@@ -57,7 +57,7 @@ function buildOmpToolSet(plugin) {
|
|
|
57
57
|
description: "List all mounts declared in skaile.yaml with their mount status.",
|
|
58
58
|
parameters: {},
|
|
59
59
|
handler: async () => {
|
|
60
|
-
const { mountList } = await import('../../connectors-
|
|
60
|
+
const { mountList } = await import('../../connectors-SSOTIDHT.js');
|
|
61
61
|
return (await mountList(plugin.connectorManager)).content[0].text;
|
|
62
62
|
}
|
|
63
63
|
},
|
|
@@ -66,7 +66,7 @@ function buildOmpToolSet(plugin) {
|
|
|
66
66
|
description: "Sync a mount (pull latest from remote).",
|
|
67
67
|
parameters: { mount_id: { type: "string" } },
|
|
68
68
|
handler: async ({ mount_id }) => {
|
|
69
|
-
const { mountSync } = await import('../../connectors-
|
|
69
|
+
const { mountSync } = await import('../../connectors-SSOTIDHT.js');
|
|
70
70
|
return (await mountSync(plugin.connectorManager, mount_id)).content[0].text;
|
|
71
71
|
}
|
|
72
72
|
},
|
|
@@ -75,7 +75,7 @@ function buildOmpToolSet(plugin) {
|
|
|
75
75
|
description: "List all available flow definitions from ai-assets.",
|
|
76
76
|
parameters: {},
|
|
77
77
|
handler: async () => {
|
|
78
|
-
const { flowList } = await import('../../flows-
|
|
78
|
+
const { flowList } = await import('../../flows-J2UEU2QM.js');
|
|
79
79
|
return (await flowList(plugin.projectDir)).content[0].text;
|
|
80
80
|
}
|
|
81
81
|
},
|
|
@@ -84,7 +84,7 @@ function buildOmpToolSet(plugin) {
|
|
|
84
84
|
description: "List past flow run sessions for this workspace.",
|
|
85
85
|
parameters: {},
|
|
86
86
|
handler: async () => {
|
|
87
|
-
const { flowListSessions } = await import('../../flows-
|
|
87
|
+
const { flowListSessions } = await import('../../flows-J2UEU2QM.js');
|
|
88
88
|
return (await flowListSessions(plugin.projectDir)).content[0].text;
|
|
89
89
|
}
|
|
90
90
|
},
|
|
@@ -93,7 +93,7 @@ function buildOmpToolSet(plugin) {
|
|
|
93
93
|
description: "List all skills in the ai-assets catalog.",
|
|
94
94
|
parameters: {},
|
|
95
95
|
handler: async () => {
|
|
96
|
-
const { skillList } = await import('../../skills-
|
|
96
|
+
const { skillList } = await import('../../skills-EOHZ2DZ4.js');
|
|
97
97
|
return (await skillList(plugin.projectDir)).content[0].text;
|
|
98
98
|
}
|
|
99
99
|
},
|
|
@@ -102,7 +102,7 @@ function buildOmpToolSet(plugin) {
|
|
|
102
102
|
description: "Search skills by name, description, or keywords.",
|
|
103
103
|
parameters: { query: { type: "string" } },
|
|
104
104
|
handler: async ({ query }) => {
|
|
105
|
-
const { skillSearch } = await import('../../skills-
|
|
105
|
+
const { skillSearch } = await import('../../skills-EOHZ2DZ4.js');
|
|
106
106
|
return (await skillSearch(plugin.projectDir, query)).content[0].text;
|
|
107
107
|
}
|
|
108
108
|
},
|
|
@@ -111,7 +111,7 @@ function buildOmpToolSet(plugin) {
|
|
|
111
111
|
description: "Show the full SKILL.md content for a skill.",
|
|
112
112
|
parameters: { skill_id: { type: "string" } },
|
|
113
113
|
handler: async ({ skill_id }) => {
|
|
114
|
-
const { skillShow } = await import('../../skills-
|
|
114
|
+
const { skillShow } = await import('../../skills-EOHZ2DZ4.js');
|
|
115
115
|
return (await skillShow(plugin.projectDir, skill_id)).content[0].text;
|
|
116
116
|
}
|
|
117
117
|
},
|
|
@@ -120,7 +120,7 @@ function buildOmpToolSet(plugin) {
|
|
|
120
120
|
description: "List connectors declared in skaile.yaml as {connected, failed, notice?}. A host-managed mount in `connected` carries `health` {status: ok|stale|failed, errorClass, checkedAt}; if it is not ok, tell the user and do not write to it. `failed` holds connectors that did not connect this session, with the failure reason \u2014 their mount paths are dead directories, not synced workspaces.",
|
|
121
121
|
parameters: {},
|
|
122
122
|
handler: async () => {
|
|
123
|
-
const { connectorList } = await import('../../connectors-
|
|
123
|
+
const { connectorList } = await import('../../connectors-SSOTIDHT.js');
|
|
124
124
|
return (await connectorList(plugin.connectorManager)).content[0].text;
|
|
125
125
|
}
|
|
126
126
|
},
|
|
@@ -129,7 +129,7 @@ function buildOmpToolSet(plugin) {
|
|
|
129
129
|
description: "Read content from a connector by path.",
|
|
130
130
|
parameters: { connector_id: { type: "string" }, path: { type: "string" } },
|
|
131
131
|
handler: async ({ connector_id, path }) => {
|
|
132
|
-
const { connectorRead } = await import('../../connectors-
|
|
132
|
+
const { connectorRead } = await import('../../connectors-SSOTIDHT.js');
|
|
133
133
|
return (await connectorRead(plugin.connectorManager, connector_id, path)).content[0].text;
|
|
134
134
|
}
|
|
135
135
|
},
|
|
@@ -146,7 +146,7 @@ function buildOmpToolSet(plugin) {
|
|
|
146
146
|
operation,
|
|
147
147
|
args
|
|
148
148
|
}) => {
|
|
149
|
-
const { connectorExec } = await import('../../connectors-
|
|
149
|
+
const { connectorExec } = await import('../../connectors-SSOTIDHT.js');
|
|
150
150
|
return (await connectorExec(plugin.connectorManager, connector_id, operation, args ?? {})).content[0].text;
|
|
151
151
|
}
|
|
152
152
|
},
|
|
@@ -202,7 +202,7 @@ async function handleSlashCommand(plugin, group, args) {
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
async function handleFlowCommand(plugin, sub, rest) {
|
|
205
|
-
const { flowList, flowShow, flowListSessions, flowGetSession } = await import('../../flows-
|
|
205
|
+
const { flowList, flowShow, flowListSessions, flowGetSession } = await import('../../flows-J2UEU2QM.js');
|
|
206
206
|
if (!sub || sub === "list") return (await flowList(plugin.projectDir)).content[0].text;
|
|
207
207
|
if (sub === "show" && rest[0])
|
|
208
208
|
return (await flowShow(plugin.projectDir, rest[0])).content[0].text;
|
|
@@ -212,7 +212,7 @@ async function handleFlowCommand(plugin, sub, rest) {
|
|
|
212
212
|
return "Usage: /flow list | show <id> | sessions | session <runId>";
|
|
213
213
|
}
|
|
214
214
|
async function handleConnectorCommand(plugin, sub, rest) {
|
|
215
|
-
const { connectorList, connectorRead, connectorExec, connectorDescribe } = await import('../../connectors-
|
|
215
|
+
const { connectorList, connectorRead, connectorExec, connectorDescribe } = await import('../../connectors-SSOTIDHT.js');
|
|
216
216
|
if (!sub || sub === "list") return (await connectorList(plugin.connectorManager)).content[0].text;
|
|
217
217
|
if (sub === "read" && rest[0] && rest[1])
|
|
218
218
|
return (await connectorRead(plugin.connectorManager, rest[0], rest[1])).content[0].text;
|
|
@@ -231,7 +231,7 @@ async function handleConnectorCommand(plugin, sub, rest) {
|
|
|
231
231
|
return "Usage: /connector list | read <id> <path> | exec <id> <op> [json-args] | describe <id>";
|
|
232
232
|
}
|
|
233
233
|
async function handleSkillCommand(plugin, sub, rest) {
|
|
234
|
-
const { skillList, skillShow, skillSearch } = await import('../../skills-
|
|
234
|
+
const { skillList, skillShow, skillSearch } = await import('../../skills-EOHZ2DZ4.js');
|
|
235
235
|
if (sub === "run" && rest[0])
|
|
236
236
|
return (await skillShow(plugin.projectDir, rest[0])).content[0].text;
|
|
237
237
|
if (!sub || sub === "list") return (await skillList(plugin.projectDir)).content[0].text;
|
|
@@ -242,7 +242,7 @@ async function handleSkillCommand(plugin, sub, rest) {
|
|
|
242
242
|
return "Usage: /skill list | show <id> | search <query> | run <id>";
|
|
243
243
|
}
|
|
244
244
|
async function handleMountsCommand(plugin, sub, rest) {
|
|
245
|
-
const { mountList, mountSync, mountStatus } = await import('../../connectors-
|
|
245
|
+
const { mountList, mountSync, mountStatus } = await import('../../connectors-SSOTIDHT.js');
|
|
246
246
|
if (!sub || sub === "list") return (await mountList(plugin.connectorManager)).content[0].text;
|
|
247
247
|
if (sub === "sync" && rest[0])
|
|
248
248
|
return (await mountSync(plugin.connectorManager, rest[0])).content[0].text;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PluginStore, WorkspacePlugin, buildClaudePluginFiles, resolveProjectDir } from '../chunk-
|
|
1
|
+
export { PluginStore, WorkspacePlugin, buildClaudePluginFiles, resolveProjectDir } from '../chunk-N6FBTXQ5.js';
|
|
2
2
|
export { err, ok, okJson } from '../chunk-X5YPJV4N.js';
|
|
3
3
|
import '../chunk-5BEFNLOR.js';
|
|
4
4
|
import '../chunk-JMKB7IB4.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skaile/workspaces",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Skaile workspaces runtime — types, core, bridge, runner, store, connectors, and supporting layers as one publishable package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "bun@1.3.9",
|