@skaile/workspaces 1.16.0 → 2.1.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 +309 -0
- package/dist/{asset-feeds-WIBEP37F.js → asset-feeds-FBGBQEYD.js} +25 -24
- package/dist/asset-feeds-FBGBQEYD.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +13 -1
- package/dist/asset-manager/index.js +10 -9
- package/dist/asset-manager/installer.js +7 -6
- package/dist/asset-manager/src/catalog-deployer.d.ts +70 -5
- package/dist/asset-manager/src/catalog-deployer.d.ts.map +1 -1
- package/dist/asset-manager/src/index.d.ts +41 -17
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/mcp-config.d.ts +58 -0
- package/dist/asset-manager/src/mcp-config.d.ts.map +1 -0
- package/dist/bridge/drivers/claude-sdk.js +108 -56
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +3 -2
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +4 -3
- package/dist/bridge/drivers/continue.js.map +1 -1
- package/dist/bridge/drivers/echo.js +3 -2
- package/dist/bridge/drivers/echo.js.map +1 -1
- package/dist/bridge/drivers/gemini.js +5 -4
- package/dist/bridge/drivers/goose.js +4 -3
- package/dist/bridge/drivers/goose.js.map +1 -1
- package/dist/bridge/drivers/omp.js +3 -2
- package/dist/bridge/drivers/omp.js.map +1 -1
- package/dist/bridge/drivers/opencode.js +4 -3
- package/dist/bridge/drivers/opencode.js.map +1 -1
- package/dist/bridge/drivers/qwen.js +5 -4
- package/dist/bridge/drivers/qwen.js.map +1 -1
- package/dist/bridge/index.js +4 -3
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/scrub-transcript.d.ts +21 -1
- package/dist/bridge/src/drivers/scrub-transcript.d.ts.map +1 -1
- package/dist/{chunk-MO43URUI.js → chunk-2BSXXTUP.js} +7 -7
- package/dist/{chunk-MO43URUI.js.map → chunk-2BSXXTUP.js.map} +1 -1
- package/dist/{chunk-FIUGSIKC.js → chunk-43TAGQ3Z.js} +19 -11
- package/dist/chunk-43TAGQ3Z.js.map +1 -0
- package/dist/{chunk-7J7LQP6T.js → chunk-5BGEYZ7I.js} +31 -19
- package/dist/chunk-5BGEYZ7I.js.map +1 -0
- package/dist/chunk-7GOCNYUV.js +300 -0
- package/dist/chunk-7GOCNYUV.js.map +1 -0
- package/dist/{chunk-KY5NY7LB.js → chunk-BCTU4TN7.js} +11 -11
- package/dist/chunk-BCTU4TN7.js.map +1 -0
- package/dist/chunk-BEAIJRVF.js +159 -0
- package/dist/chunk-BEAIJRVF.js.map +1 -0
- package/dist/{chunk-2TSSCHCQ.js → chunk-BHLNQ4L5.js} +5 -5
- package/dist/{chunk-2TSSCHCQ.js.map → chunk-BHLNQ4L5.js.map} +1 -1
- package/dist/chunk-BK3WL3QK.js +10 -0
- package/dist/chunk-BK3WL3QK.js.map +1 -0
- package/dist/{chunk-TFIFNDT2.js → chunk-BTR3ZJ7S.js} +4 -4
- package/dist/{chunk-TFIFNDT2.js.map → chunk-BTR3ZJ7S.js.map} +1 -1
- package/dist/{chunk-BI2NKPA4.js → chunk-CA5CWLGN.js} +3 -2
- package/dist/chunk-CA5CWLGN.js.map +1 -0
- package/dist/{chunk-STQOPWPS.js → chunk-CTWE7I7Z.js} +4 -4
- package/dist/{chunk-STQOPWPS.js.map → chunk-CTWE7I7Z.js.map} +1 -1
- package/dist/{chunk-GXC3TYMQ.js → chunk-CZZRDYT4.js} +70 -32
- package/dist/chunk-CZZRDYT4.js.map +1 -0
- package/dist/chunk-DYMWJAL4.js +552 -0
- package/dist/chunk-DYMWJAL4.js.map +1 -0
- package/dist/{chunk-ACXLKNIM.js → chunk-E7HKNQTH.js} +10 -4
- package/dist/chunk-E7HKNQTH.js.map +1 -0
- package/dist/{chunk-2BQBWWFX.js → chunk-GUKMNUQK.js} +6 -6
- package/dist/chunk-GUKMNUQK.js.map +1 -0
- package/dist/{chunk-6POODADP.js → chunk-HOL5KD7U.js} +453 -250
- package/dist/chunk-HOL5KD7U.js.map +1 -0
- package/dist/{chunk-C4KVFALU.js → chunk-L26NGI43.js} +3 -3
- package/dist/{chunk-C4KVFALU.js.map → chunk-L26NGI43.js.map} +1 -1
- package/dist/{chunk-MZV6WCF3.js → chunk-MAN7AGQJ.js} +3 -3
- package/dist/{chunk-MZV6WCF3.js.map → chunk-MAN7AGQJ.js.map} +1 -1
- package/dist/{chunk-YULV7UTU.js → chunk-MLYV6WEM.js} +10 -10
- package/dist/{chunk-YULV7UTU.js.map → chunk-MLYV6WEM.js.map} +1 -1
- package/dist/{chunk-O5VCUU6D.js → chunk-N6TYW6EB.js} +4 -4
- package/dist/{chunk-O5VCUU6D.js.map → chunk-N6TYW6EB.js.map} +1 -1
- package/dist/{chunk-EPWY2ABE.js → chunk-PSVF3LDU.js} +5 -5
- package/dist/{chunk-EPWY2ABE.js.map → chunk-PSVF3LDU.js.map} +1 -1
- package/dist/{chunk-M5GJT3D7.js → chunk-PYYL5XMA.js} +3 -3
- package/dist/{chunk-M5GJT3D7.js.map → chunk-PYYL5XMA.js.map} +1 -1
- package/dist/{chunk-BG4XVMG2.js → chunk-RBOPTTTK.js} +286 -151
- package/dist/chunk-RBOPTTTK.js.map +1 -0
- package/dist/{chunk-2IJFUAZB.js → chunk-RK3HU3H3.js} +123 -18
- package/dist/chunk-RK3HU3H3.js.map +1 -0
- package/dist/{chunk-5NZ56R63.js → chunk-RTLQAZAE.js} +18 -6
- package/dist/chunk-RTLQAZAE.js.map +1 -0
- package/dist/{chunk-MNKUZUN2.js → chunk-SGLGA2AZ.js} +3 -3
- package/dist/{chunk-MNKUZUN2.js.map → chunk-SGLGA2AZ.js.map} +1 -1
- package/dist/{chunk-JB35MVBN.js → chunk-U5POE4BA.js} +4 -298
- package/dist/chunk-U5POE4BA.js.map +1 -0
- package/dist/{chunk-A22KZ7GZ.js → chunk-VPXBAEWE.js} +274 -40
- package/dist/chunk-VPXBAEWE.js.map +1 -0
- package/dist/{chunk-ACWCVB5Q.js → chunk-WVPL4OGD.js} +3 -3
- package/dist/{chunk-ACWCVB5Q.js.map → chunk-WVPL4OGD.js.map} +1 -1
- package/dist/{chunk-MB6563TL.js → chunk-XQVP6XWR.js} +3 -3
- package/dist/{chunk-MB6563TL.js.map → chunk-XQVP6XWR.js.map} +1 -1
- package/dist/{chunk-344DEXZS.js → chunk-XSIXGVH6.js} +4 -4
- package/dist/{chunk-344DEXZS.js.map → chunk-XSIXGVH6.js.map} +1 -1
- package/dist/{chunk-BYS6JDZB.js → chunk-Y6VSFX2A.js} +3 -3
- package/dist/{chunk-BYS6JDZB.js.map → chunk-Y6VSFX2A.js.map} +1 -1
- package/dist/{chunk-ISA7R7PK.js → chunk-YODP3STD.js} +90 -40
- package/dist/chunk-YODP3STD.js.map +1 -0
- package/dist/{chunk-WSTY3AWY.js → chunk-ZWFLEMI4.js} +4 -4
- package/dist/{chunk-WSTY3AWY.js.map → chunk-ZWFLEMI4.js.map} +1 -1
- package/dist/cli/index.js +347 -127
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts +2 -2
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +51 -2
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/connector.d.ts +1 -1
- package/dist/cli/src/commands/connector.d.ts.map +1 -1
- package/dist/cli/src/commands/logs.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +30 -3
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +5 -2
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/connectors/config.js +7 -6
- package/dist/connectors/index.js +8 -7
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/watcher.d.ts.map +1 -1
- package/dist/connectors/src/worktree.d.ts +20 -2
- package/dist/connectors/src/worktree.d.ts.map +1 -1
- package/dist/core/index.js +6 -5
- package/dist/core/logging.js +2 -1
- package/dist/core/manifest.js +2 -1
- package/dist/core/runtime-assets.js +4 -3
- package/dist/core/src/fs-deadline.d.ts +84 -0
- package/dist/core/src/fs-deadline.d.ts.map +1 -0
- package/dist/core/src/index.d.ts +4 -3
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +142 -18
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +2 -2
- 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/subprocess.d.ts +33 -1
- package/dist/core/src/subprocess.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts +1 -1
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +19 -2
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/workspace-config.js +3 -2
- package/dist/deploy/index.js +12 -7
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/src/targets/container-runtime.d.ts.map +1 -1
- package/dist/discovery/index.js +3 -2
- package/dist/{ensure-sources-RSTZONIE.js → ensure-sources-AVCVX7CV.js} +13 -12
- package/dist/ensure-sources-AVCVX7CV.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +8 -7
- package/dist/factory-assets/connectors/deploy/CONNECTOR.md +19 -0
- package/dist/factory-assets/connectors/deploy/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/deploy.js +8 -7
- package/dist/factory-assets/connectors/devserver/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/devserver.js +8 -7
- package/dist/factory-assets/connectors/flow/adapter.js +8 -7
- package/dist/factory-assets/connectors/flow/engine.js +6 -5
- package/dist/factory-assets/connectors/flow/run-flow.js +10 -9
- package/dist/factory-assets/connectors/flow.js +8 -7
- package/dist/factory-assets/connectors/git/driver.d.ts +12 -1
- package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +8 -7
- package/dist/factory-assets/connectors/gmail.js +8 -7
- package/dist/factory-assets/connectors/googledrive.js +8 -7
- package/dist/factory-assets/connectors/local/driver.d.ts +25 -1
- package/dist/factory-assets/connectors/local/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/local.js +8 -7
- package/dist/factory-assets/connectors/mattermost.js +8 -7
- package/dist/factory-assets/connectors/memory.js +8 -7
- package/dist/factory-assets/connectors/minio.js +8 -7
- package/dist/factory-assets/connectors/postgres.js +8 -7
- package/dist/factory-assets/connectors/s3/driver.d.ts +15 -0
- package/dist/factory-assets/connectors/s3/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/s3.js +8 -7
- package/dist/factory-assets/connectors/sharepoint.js +8 -7
- package/dist/factory-assets/connectors/sqlite/adapter.d.ts +8 -1
- package/dist/factory-assets/connectors/sqlite/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/sqlite.js +8 -7
- package/dist/factory-assets/connectors/static-server/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/static-server.js +8 -7
- package/dist/factory-assets/connectors/tunnel.js +8 -7
- package/dist/factory-assets/connectors/webdav.js +8 -7
- package/dist/factory-assets/connectors/xstate/adapter.d.ts +6 -0
- package/dist/factory-assets/connectors/xstate/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/xstate-store.js +8 -7
- package/dist/factory-assets/connectors/xstate.js +8 -7
- package/dist/flows-CXVFGR27.js +20 -0
- package/dist/{flows-FHWBCLXF.js.map → flows-CXVFGR27.js.map} +1 -1
- package/dist/{helpers-GUUWPPAX.js → helpers-M5SXB4LL.js} +13 -12
- package/dist/{helpers-GUUWPPAX.js.map → helpers-M5SXB4LL.js.map} +1 -1
- package/dist/library/index.js +8 -7
- package/dist/library/install.js +6 -5
- package/dist/{library-publish-UKKSJP7V.js → library-publish-HVIIQMI6.js} +16 -15
- package/dist/library-publish-HVIIQMI6.js.map +1 -0
- package/dist/{open-library-VALRYGFV.js → open-library-EJQISBWV.js} +14 -13
- package/dist/{open-library-VALRYGFV.js.map → open-library-EJQISBWV.js.map} +1 -1
- package/dist/{paths-5QJJBAND.js → paths-2HMHL25W.js} +11 -10
- package/dist/{paths-5QJJBAND.js.map → paths-2HMHL25W.js.map} +1 -1
- package/dist/plugin-registry/src/deploy-helpers.d.ts +1 -1
- package/dist/{plugin-store-ZBJZ7F6D.js → plugin-store-TLBQ5XRS.js} +8 -7
- package/dist/plugin-store-TLBQ5XRS.js.map +1 -0
- package/dist/{project-IRUJLIVX.js → project-M2COJFPZ.js} +14 -13
- package/dist/{project-IRUJLIVX.js.map → project-M2COJFPZ.js.map} +1 -1
- package/dist/resolver/index.js +13 -1
- package/dist/resolver/src/types.d.ts +7 -0
- package/dist/resolver/src/types.d.ts.map +1 -1
- package/dist/resolver/src/validator.d.ts +8 -1
- package/dist/resolver/src/validator.d.ts.map +1 -1
- package/dist/runner/index.js +13 -12
- package/dist/runner/src/external-mcp.d.ts +1 -1
- package/dist/runner/src/external-mcp.d.ts.map +1 -1
- package/dist/runner/src/mcp-prompt.d.ts +7 -3
- package/dist/runner/src/mcp-prompt.d.ts.map +1 -1
- package/dist/runner/src/mcp-runtime-handlers.d.ts +12 -0
- package/dist/runner/src/mcp-runtime-handlers.d.ts.map +1 -1
- package/dist/runner/src/mixin-resolver.d.ts.map +1 -1
- package/dist/runner/src/recipe-resolver.d.ts +20 -6
- package/dist/runner/src/recipe-resolver.d.ts.map +1 -1
- package/dist/runner/src/resource-handler.d.ts +43 -0
- package/dist/runner/src/resource-handler.d.ts.map +1 -1
- package/dist/runner/src/resources.d.ts +12 -5
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +31 -5
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +9 -0
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/runner/src/session-capability-wiring.d.ts +5 -0
- package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
- package/dist/runner/src/workspace-migration.d.ts +37 -3
- package/dist/runner/src/workspace-migration.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +10 -9
- package/dist/sdk/bridge.js +4 -3
- package/dist/sdk/core.js +6 -5
- package/dist/sdk/flow.js +6 -5
- package/dist/sdk/index.js +13 -12
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +13 -1
- package/dist/sdk/runner.js +13 -12
- package/dist/sdk/session.js +1 -1
- package/dist/sdk/store.js +1 -1
- package/dist/session/index.js +1 -1
- package/dist/session/src/dispatcher.d.ts.map +1 -1
- package/dist/{setup-WJPNUE32.js → setup-GWXEG3G2.js} +10 -9
- package/dist/setup-GWXEG3G2.js.map +1 -0
- package/dist/skills-YTMGG23D.js +20 -0
- package/dist/{skills-BMI6H7HI.js.map → skills-YTMGG23D.js.map} +1 -1
- package/dist/{source-5KDURFBS.js → source-WMXH2OBW.js} +15 -14
- package/dist/{source-5KDURFBS.js.map → source-WMXH2OBW.js.map} +1 -1
- package/dist/{source-manifest-publish-DPQI44D3.js → source-manifest-publish-MTHUGBAY.js} +17 -16
- package/dist/source-manifest-publish-MTHUGBAY.js.map +1 -0
- package/dist/store/index.js +1 -1
- package/dist/store/src/store.d.ts +9 -0
- package/dist/store/src/store.d.ts.map +1 -1
- package/dist/tui/index.js +13 -12
- package/dist/tui/index.js.map +1 -1
- package/dist/validator-RN64BKFW.js +5 -0
- package/dist/{validator-VF5M764T.js.map → validator-RN64BKFW.js.map} +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +18 -5
- package/dist/workspace-plugin/adapters/mcp.js.map +1 -1
- package/dist/workspace-plugin/adapters/omp.js +10 -10
- package/dist/workspace-plugin/index.js +3 -2
- package/dist/workspace-plugin/src/tools/validator.d.ts.map +1 -1
- package/dist/workspace-plugin/src/utils/ai-assets.d.ts +11 -6
- package/dist/workspace-plugin/src/utils/ai-assets.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/asset-feeds-WIBEP37F.js.map +0 -1
- package/dist/chunk-2BQBWWFX.js.map +0 -1
- package/dist/chunk-2IJFUAZB.js.map +0 -1
- package/dist/chunk-5NZ56R63.js.map +0 -1
- package/dist/chunk-6POODADP.js.map +0 -1
- package/dist/chunk-7J7LQP6T.js.map +0 -1
- package/dist/chunk-A22KZ7GZ.js.map +0 -1
- package/dist/chunk-ACXLKNIM.js.map +0 -1
- package/dist/chunk-BG4XVMG2.js.map +0 -1
- package/dist/chunk-BI2NKPA4.js.map +0 -1
- package/dist/chunk-BQCGFPHW.js +0 -345
- package/dist/chunk-BQCGFPHW.js.map +0 -1
- package/dist/chunk-FIUGSIKC.js.map +0 -1
- package/dist/chunk-GXC3TYMQ.js.map +0 -1
- package/dist/chunk-ISA7R7PK.js.map +0 -1
- package/dist/chunk-JB35MVBN.js.map +0 -1
- package/dist/chunk-KY5NY7LB.js.map +0 -1
- package/dist/chunk-LV2HPH3C.js +0 -73
- package/dist/chunk-LV2HPH3C.js.map +0 -1
- package/dist/chunk-XCBG2KDC.js +0 -23
- package/dist/chunk-XCBG2KDC.js.map +0 -1
- package/dist/ensure-sources-RSTZONIE.js.map +0 -1
- package/dist/flows-FHWBCLXF.js +0 -7
- package/dist/library-publish-UKKSJP7V.js.map +0 -1
- package/dist/plugin-store-ZBJZ7F6D.js.map +0 -1
- package/dist/setup-WJPNUE32.js.map +0 -1
- package/dist/skills-BMI6H7HI.js +0 -7
- package/dist/source-manifest-publish-DPQI44D3.js.map +0 -1
- package/dist/validator-VF5M764T.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { softDepName } from './chunk-
|
|
1
|
+
import { softDepName } from './chunk-VPXBAEWE.js';
|
|
2
2
|
import pc from 'picocolors';
|
|
3
3
|
|
|
4
4
|
var S = {
|
|
@@ -94,5 +94,5 @@ function formatRelativeTime(date) {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export { KIND_COL_WIDTH, S, bareSoftDepName, colorRef, fitWidth, formatRelativeTime, formatSoftDepAddPreview, formatSoftDepHint, formatSoftDepRemovePreview, formatSoftDepSection, kindColor, kindColorPad, logErr, logInfo, logOk, logWarn };
|
|
97
|
-
//# sourceMappingURL=chunk-
|
|
98
|
-
//# sourceMappingURL=chunk-
|
|
97
|
+
//# sourceMappingURL=chunk-Y6VSFX2A.js.map
|
|
98
|
+
//# sourceMappingURL=chunk-Y6VSFX2A.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/helpers.ts"],"names":[],"mappings":";;;AAQO,IAAM,CAAA,GAAI;AAAA,EACf,KAAA,EAAO,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,EAAA,CAAG,IAAA,CAAK,CAAC,CAAC,CAAA;AAAA,EACxC,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EAC7B,OAAA,EAAS,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EACjC,IAAA,EAAM,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EAC9B,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,IAAI,CAAC,CAAA;AAAA,EAC5B,EAAA,EAAI,CAAC,CAAA,KAAc,EAAA,CAAG,MAAM,CAAC,CAAA;AAAA,EAC7B,IAAA,EAAM,CAAC,CAAA,KAAc,EAAA,CAAG,OAAO,CAAC,CAAA;AAAA,EAChC,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,IAAI,CAAC,CAAA;AAAA,EAC5B,KAAA,EAAO,CAAC,CAAA,KAAc,EAAA,CAAG,IAAI,CAAC,CAAA;AAAA,EAC9B,IAAA,EAAM,CAAC,CAAA,GAAI,EAAA,KAAO,GAAG,GAAA,CAAI,QAAA,CAAI,MAAA,CAAO,CAAC,CAAC;AACxC;AAEA,IAAM,WA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AM,IAAA,GAAO,GAAI,CAAA;AACtC,EAAA,IAAI,OAAA,GAAU,IAAI,OAAO,UAAA;AACzB,EAAA,MAAM,OAAA,GAAU,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAA;AACvC,EAAA,IAAI,OAAA,GAAU,EAAA,EAAI,OAAO,CAAA,EAAG,OAAO,CAAA,KAAA,CAAA;AACnC,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAA;AACrC,EAAA,IAAI,KAAA,GAAQ,EAAA,EAAI,OAAO,CAAA,EAAG,KAAK,CAAA,KAAA,CAAA;AAC/B,EAAA,MAAM,IAAA,GAAO,IAAA,CAAK,KAAA,CAAM,KAAA,GAAQ,EAAE,CAAA;AAClC,EAAA,OAAO,GAAG,IAAI,CAAA,KAAA,CAAA;AAChB","file":"chunk-BYS6JDZB.js","sourcesContent":["import { softDepName } from \"@skaile/workspaces/asset-manager\";\nimport pc from \"picocolors\";\n\n/**\n * Terminal styling helpers used across all CLI commands.\n *\n * @docLink cli/dev-guide#helpers\n */\nexport const S = {\n brand: (s: string) => pc.cyan(pc.bold(s)),\n cmd: (s: string) => pc.cyan(s),\n heading: (s: string) => pc.bold(s),\n bold: (s: string) => pc.bold(s),\n dim: (s: string) => pc.dim(s),\n ok: (s: string) => pc.green(s),\n warn: (s: string) => pc.yellow(s),\n err: (s: string) => pc.red(s),\n label: (s: string) => pc.dim(s),\n rule: (w = 40) => pc.dim(\"─\".repeat(w)),\n};\n\nconst KIND_COLORS: Record<string, (s: string) => string> = {\n skill: pc.blue,\n agent: pc.magenta,\n prompt: pc.yellow,\n flow: pc.green,\n bundle: pc.cyan,\n contract: pc.red,\n connector: pc.green,\n mount: pc.green,\n knowledge: pc.cyan,\n persona: pc.cyan,\n ruleset: pc.cyan,\n \"mcp-server\": pc.magenta,\n};\n\n/**\n * Fit a plain (ANSI-free) string into exactly `width` columns: truncate with a\n * trailing `…` when too long, pad with spaces when too short. Keeps fixed-width\n * columns from overflowing the row when a value (e.g. an asset name) is wider\n * than its budget.\n */\nexport function fitWidth(s: string, width: number): string {\n if (width <= 0) return \"\";\n if (s.length > width) return width === 1 ? \"…\" : `${s.slice(0, width - 1)}…`;\n return s.padEnd(width);\n}\n\n/** Color-code an asset kind string. */\nexport function kindColor(kind: string): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(kind);\n}\n\n/**\n * Widest kind label (`mcp-server`); the default kind-column width fits it so\n * long kinds don't shove the rest of the row out of alignment.\n */\nexport const KIND_COL_WIDTH = 10;\n\n/**\n * Color-code an asset kind string fit to exactly `width` columns — pads short\n * kinds, truncates over-long ones (via {@link fitWidth}) so the column can never\n * overflow and break row alignment.\n */\nexport function kindColorPad(kind: string, width = KIND_COL_WIDTH): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(fitWidth(kind, width));\n}\n\n/** Color-code a \"kind:name\" reference string. */\nexport function colorRef(ref: string): string {\n const colonIdx = ref.indexOf(\":\");\n if (colonIdx === -1) return ref;\n const kind = ref.slice(0, colonIdx);\n const rest = ref.slice(colonIdx);\n return `${kindColor(kind)}${rest}`;\n}\n\n/**\n * Print a success line prefixed with a green check mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logOk(msg: string) {\n console.log(` ${pc.green(\"✓\")} ${msg}`);\n}\n/**\n * Print an error line prefixed with a red cross to stderr.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logErr(msg: string) {\n console.error(` ${pc.red(\"✗\")} ${msg}`);\n}\n/**\n * Print a warning line prefixed with a yellow exclamation mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logWarn(msg: string) {\n console.log(` ${pc.yellow(\"!\")} ${msg}`);\n}\n/**\n * Print an info line prefixed with a dim dot.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logInfo(msg: string) {\n console.log(` ${pc.dim(\"·\")} ${msg}`);\n}\n\n/**\n * Bare asset name of a canonical soft-dep target ref (`@pub/name@ver` → `name`),\n * for compact rendering in `info` / `tree` / `why`. Delegates to the asset-manager\n * parser (the soft-dep read surface) so the two never diverge.\n */\nexport function bareSoftDepName(ref: string): string {\n return softDepName(ref);\n}\n\n/**\n * The report-only soft-dep hint line shared by the `add` no-TTY branch and the\n * `install` surface, so the two user-facing wordings can't drift. Appends a\n * runnable `skaile add` suffix only when the target has a parseable ref.\n */\nexport function formatSoftDepHint(edge: { from: string; to: string; toRef?: string }): string {\n const suffix = edge.toRef ? ` — run \\`skaile add ${edge.toRef}\\` to include it.` : \"\";\n return `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${suffix}`;\n}\n\n/**\n * Build the \"Soft dependencies (inferred)\" section for `skaile info`. Returns one\n * header line plus one line per soft-dep target, each marked `(soft)` to read\n * differently from a typed `requires`. Empty array when there are no soft deps,\n * so the caller prints nothing.\n */\nexport function formatSoftDepSection(targets: string[]): string[] {\n if (targets.length === 0) return [];\n const out = [` ${S.label(\"Soft dependencies (inferred)\")}:`];\n for (const t of targets) out.push(` ${S.dim(\"·\")} ${t} ${S.dim(\"(soft)\")}`);\n return out;\n}\n\n/**\n * Footer line previewing the soft deps that *adding* the highlighted asset would\n * reference (manage TUI). \"references\" + \"not auto-added\" makes clear the pull is\n * report-only. Empty string when there are no targets, so the caller clears.\n */\nexport function formatSoftDepAddPreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`${name} references ${targets.join(\", \")} (soft dep, not auto-added)`);\n}\n\n/**\n * Footer line previewing the soft deps that *removing* the highlighted asset\n * would orphan (manage TUI) — symmetric with {@link formatSoftDepAddPreview}.\n * Empty string when nothing would be orphaned, so the caller clears.\n */\nexport function formatSoftDepRemovePreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`removing ${name} would orphan ${targets.join(\", \")} (soft dep)`);\n}\n\n/** Format a Date as a human-readable relative time string (e.g. \"5m ago\"). */\nexport function formatRelativeTime(date: Date): string {\n const diff = Date.now() - date.getTime();\n const seconds = Math.floor(diff / 1000);\n if (seconds < 60) return \"just now\";\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.floor(hours / 24);\n return `${days}d ago`;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../cli/src/helpers.ts"],"names":[],"mappings":";;;AAQO,IAAM,CAAA,GAAI;AAAA,EACf,KAAA,EAAO,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,EAAA,CAAG,IAAA,CAAK,CAAC,CAAC,CAAA;AAAA,EACxC,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EAC7B,OAAA,EAAS,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EACjC,IAAA,EAAM,CAAC,CAAA,KAAc,EAAA,CAAG,KAAK,CAAC,CAAA;AAAA,EAC9B,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,IAAI,CAAC,CAAA;AAAA,EAC5B,EAAA,EAAI,CAAC,CAAA,KAAc,EAAA,CAAG,MAAM,CAAC,CAAA;AAAA,EAC7B,IAAA,EAAM,CAAC,CAAA,KAAc,EAAA,CAAG,OAAO,CAAC,CAAA;AAAA,EAChC,GAAA,EAAK,CAAC,CAAA,KAAc,EAAA,CAAG,IAAI,CAAC,CAAA;AAAA,EAC5B,KAAA,EAAO,CAAC,CAAA,KAAc,EAAA,CAAG,IAAI,CAAC,CAAA;AAAA,EAC9B,IAAA,EAAM,CAAC,CAAA,GAAI,EAAA,KAAO,GAAG,GAAA,CAAI,QAAA,CAAI,MAAA,CAAO,CAAC,CAAC;AACxC;AAEA,IAAM,WAAA,GAAqD;AAAA,EACzD,OAAO,EAAA,CAAG,IAAA;AAAA,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AAU,IAAI,OAAO,UAAA;AACzB,EAAA,MAAM,OAAA,GAAU,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAA;AACvC,EAAA,IAAI,OAAA,GAAU,EAAA,EAAI,OAAO,CAAA,EAAG,OAAO,CAAA,KAAA,CAAA;AACnC,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,OAAA,GAAU,EAAE,CAAA;AACrC,EAAA,IAAI,KAAA,GAAQ,EAAA,EAAI,OAAO,CAAA,EAAG,KAAK,CAAA,KAAA,CAAA;AAC/B,EAAA,MAAM,IAAA,GAAO,IAAA,CAAK,KAAA,CAAM,KAAA,GAAQ,EAAE,CAAA;AAClC,EAAA,OAAO,GAAG,IAAI,CAAA,KAAA,CAAA;AAChB","file":"chunk-Y6VSFX2A.js","sourcesContent":["import { softDepName } from \"@skaile/workspaces/asset-manager\";\nimport pc from \"picocolors\";\n\n/**\n * Terminal styling helpers used across all CLI commands.\n *\n * @docLink cli/dev-guide#helpers\n */\nexport const S = {\n brand: (s: string) => pc.cyan(pc.bold(s)),\n cmd: (s: string) => pc.cyan(s),\n heading: (s: string) => pc.bold(s),\n bold: (s: string) => pc.bold(s),\n dim: (s: string) => pc.dim(s),\n ok: (s: string) => pc.green(s),\n warn: (s: string) => pc.yellow(s),\n err: (s: string) => pc.red(s),\n label: (s: string) => pc.dim(s),\n rule: (w = 40) => pc.dim(\"─\".repeat(w)),\n};\n\nconst KIND_COLORS: Record<string, (s: string) => string> = {\n skill: pc.blue,\n agent: pc.magenta,\n prompt: pc.yellow,\n flow: pc.green,\n bundle: pc.cyan,\n contract: pc.red,\n connector: pc.green,\n mount: pc.green,\n knowledge: pc.cyan,\n persona: pc.cyan,\n ruleset: pc.cyan,\n \"mcp-server\": pc.magenta,\n};\n\n/**\n * Fit a plain (ANSI-free) string into exactly `width` columns: truncate with a\n * trailing `…` when too long, pad with spaces when too short. Keeps fixed-width\n * columns from overflowing the row when a value (e.g. an asset name) is wider\n * than its budget.\n */\nexport function fitWidth(s: string, width: number): string {\n if (width <= 0) return \"\";\n if (s.length > width) return width === 1 ? \"…\" : `${s.slice(0, width - 1)}…`;\n return s.padEnd(width);\n}\n\n/** Color-code an asset kind string. */\nexport function kindColor(kind: string): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(kind);\n}\n\n/**\n * Widest kind label (`mcp-server`); the default kind-column width fits it so\n * long kinds don't shove the rest of the row out of alignment.\n */\nexport const KIND_COL_WIDTH = 10;\n\n/**\n * Color-code an asset kind string fit to exactly `width` columns — pads short\n * kinds, truncates over-long ones (via {@link fitWidth}) so the column can never\n * overflow and break row alignment.\n */\nexport function kindColorPad(kind: string, width = KIND_COL_WIDTH): string {\n const colorFn = KIND_COLORS[kind] ?? pc.dim;\n return colorFn(fitWidth(kind, width));\n}\n\n/** Color-code a \"kind:name\" reference string. */\nexport function colorRef(ref: string): string {\n const colonIdx = ref.indexOf(\":\");\n if (colonIdx === -1) return ref;\n const kind = ref.slice(0, colonIdx);\n const rest = ref.slice(colonIdx);\n return `${kindColor(kind)}${rest}`;\n}\n\n/**\n * Print a success line prefixed with a green check mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logOk(msg: string) {\n console.log(` ${pc.green(\"✓\")} ${msg}`);\n}\n/**\n * Print an error line prefixed with a red cross to stderr.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logErr(msg: string) {\n console.error(` ${pc.red(\"✗\")} ${msg}`);\n}\n/**\n * Print a warning line prefixed with a yellow exclamation mark.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logWarn(msg: string) {\n console.log(` ${pc.yellow(\"!\")} ${msg}`);\n}\n/**\n * Print an info line prefixed with a dim dot.\n *\n * @param msg - Message to display.\n * @docLink cli/dev-guide#helpers\n */\nexport function logInfo(msg: string) {\n console.log(` ${pc.dim(\"·\")} ${msg}`);\n}\n\n/**\n * Bare asset name of a canonical soft-dep target ref (`@pub/name@ver` → `name`),\n * for compact rendering in `info` / `tree` / `why`. Delegates to the asset-manager\n * parser (the soft-dep read surface) so the two never diverge.\n */\nexport function bareSoftDepName(ref: string): string {\n return softDepName(ref);\n}\n\n/**\n * The report-only soft-dep hint line shared by the `add` no-TTY branch and the\n * `install` surface, so the two user-facing wordings can't drift. Appends a\n * runnable `skaile add` suffix only when the target has a parseable ref.\n */\nexport function formatSoftDepHint(edge: { from: string; to: string; toRef?: string }): string {\n const suffix = edge.toRef ? ` — run \\`skaile add ${edge.toRef}\\` to include it.` : \"\";\n return `${bareSoftDepName(edge.from)} references ${bareSoftDepName(edge.to)} (soft dependency)${suffix}`;\n}\n\n/**\n * Build the \"Soft dependencies (inferred)\" section for `skaile info`. Returns one\n * header line plus one line per soft-dep target, each marked `(soft)` to read\n * differently from a typed `requires`. Empty array when there are no soft deps,\n * so the caller prints nothing.\n */\nexport function formatSoftDepSection(targets: string[]): string[] {\n if (targets.length === 0) return [];\n const out = [` ${S.label(\"Soft dependencies (inferred)\")}:`];\n for (const t of targets) out.push(` ${S.dim(\"·\")} ${t} ${S.dim(\"(soft)\")}`);\n return out;\n}\n\n/**\n * Footer line previewing the soft deps that *adding* the highlighted asset would\n * reference (manage TUI). \"references\" + \"not auto-added\" makes clear the pull is\n * report-only. Empty string when there are no targets, so the caller clears.\n */\nexport function formatSoftDepAddPreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`${name} references ${targets.join(\", \")} (soft dep, not auto-added)`);\n}\n\n/**\n * Footer line previewing the soft deps that *removing* the highlighted asset\n * would orphan (manage TUI) — symmetric with {@link formatSoftDepAddPreview}.\n * Empty string when nothing would be orphaned, so the caller clears.\n */\nexport function formatSoftDepRemovePreview(name: string, targets: string[]): string {\n if (targets.length === 0) return \"\";\n return S.dim(`removing ${name} would orphan ${targets.join(\", \")} (soft dep)`);\n}\n\n/** Format a Date as a human-readable relative time string (e.g. \"5m ago\"). */\nexport function formatRelativeTime(date: Date): string {\n const diff = Date.now() - date.getTime();\n const seconds = Math.floor(diff / 1000);\n if (seconds < 60) return \"just now\";\n const minutes = Math.floor(seconds / 60);\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.floor(hours / 24);\n return `${days}d ago`;\n}\n"]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-P4VHQA4N.js';
|
|
2
|
-
import { scanDirectory, parseFrontmatter, bundleDepRefs, fromMcpServerMdContent } from './chunk-
|
|
2
|
+
import { scanDirectory, parseFrontmatter, bundleDepRefs, fromMcpServerMdContent, withFsDeadline, tryWithFsDeadline, fsDeadlineMs } from './chunk-DYMWJAL4.js';
|
|
3
3
|
import { isValidAssetName, slugifyAssetName, parseAssetRef, assetRefToStr } from './chunk-GEEW6SY2.js';
|
|
4
4
|
import { SUPPORTED_DRIVER_TARGETS, globalBackendRoot } from './chunk-MENCWIHW.js';
|
|
5
|
-
import { existsSync, mkdirSync, renameSync, readdirSync, rmdirSync, readFileSync, writeFileSync, rmSync, lstatSync, symlinkSync
|
|
5
|
+
import { existsSync, mkdirSync, renameSync, readdirSync, rmdirSync, readFileSync, writeFileSync, rmSync, lstatSync, symlinkSync } from 'fs';
|
|
6
|
+
import { readdir, stat, cp } from 'fs/promises';
|
|
6
7
|
import { homedir } from 'os';
|
|
7
8
|
import { join, dirname, relative, resolve, parse as parse$1, basename } from 'path';
|
|
8
9
|
import { parse, stringify } from 'yaml';
|
|
@@ -110,25 +111,25 @@ var KIND_DIRS = [
|
|
|
110
111
|
var MD_FILE_BY_KIND = Object.fromEntries(
|
|
111
112
|
KIND_DIRS.map((k) => [k.kind, k.mdName])
|
|
112
113
|
);
|
|
113
|
-
function buildProvenanceIndex(clones, _opts) {
|
|
114
|
+
async function buildProvenanceIndex(clones, _opts) {
|
|
114
115
|
const index = /* @__PURE__ */ new Map();
|
|
115
|
-
for (const clone of clones) walkOne(clone, index);
|
|
116
|
+
for (const clone of clones) await walkOne(clone, index);
|
|
116
117
|
return index;
|
|
117
118
|
}
|
|
118
|
-
function walkOne(clone, index) {
|
|
119
|
+
async function walkOne(clone, index) {
|
|
119
120
|
if (clone.overlayManifestPath && existsSync(clone.overlayManifestPath)) {
|
|
120
|
-
if (walkWithManifest(clone, clone.overlayManifestPath, index)) return;
|
|
121
|
+
if (await walkWithManifest(clone, clone.overlayManifestPath, index)) return;
|
|
121
122
|
}
|
|
122
123
|
const manifestPaths = findManifestFiles(clone.localPath);
|
|
123
124
|
if (manifestPaths.length === 0) {
|
|
124
|
-
walkFilenameConvention(clone, index);
|
|
125
|
+
await walkFilenameConvention(clone, index);
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
127
128
|
let produced = false;
|
|
128
129
|
for (const p of manifestPaths) {
|
|
129
|
-
if (walkWithManifest(clone, p, index)) produced = true;
|
|
130
|
+
if (await walkWithManifest(clone, p, index)) produced = true;
|
|
130
131
|
}
|
|
131
|
-
if (!produced) walkFilenameConvention(clone, index);
|
|
132
|
+
if (!produced) await walkFilenameConvention(clone, index);
|
|
132
133
|
}
|
|
133
134
|
function findManifestFiles(root) {
|
|
134
135
|
const found = [];
|
|
@@ -144,7 +145,7 @@ function findManifestFiles(root) {
|
|
|
144
145
|
walk(root);
|
|
145
146
|
return found;
|
|
146
147
|
}
|
|
147
|
-
function walkWithManifest(clone, manifestPath, index) {
|
|
148
|
+
async function walkWithManifest(clone, manifestPath, index) {
|
|
148
149
|
const { manifest } = decodeSkaileManifest(readFileSync(manifestPath, "utf8"));
|
|
149
150
|
const repoRoot = clone.localPath;
|
|
150
151
|
const manifestPublisher = manifest.publisher ?? publisherFromGithubUrl(clone.sourceUrl);
|
|
@@ -173,7 +174,7 @@ function walkWithManifest(clone, manifestPath, index) {
|
|
|
173
174
|
files,
|
|
174
175
|
sha256: a.sha256 ?? compositeSha256(files),
|
|
175
176
|
metadata: resolved.metadata,
|
|
176
|
-
deps: a.dependencies ?? manifestDeps(repoRoot, files, a.kind)
|
|
177
|
+
deps: a.dependencies ?? await manifestDeps(repoRoot, files, a.kind)
|
|
177
178
|
};
|
|
178
179
|
applyStoreListingMetadata(candidate, a, manifest, resolved.frontmatter);
|
|
179
180
|
push(index, `${assetPublisher}/${a.kind}:${name}`, candidate);
|
|
@@ -267,7 +268,7 @@ var DIR_SCOPED_KINDS = /* @__PURE__ */ new Set([
|
|
|
267
268
|
"connector",
|
|
268
269
|
"knowledge"
|
|
269
270
|
]);
|
|
270
|
-
function walkFilenameConvention(clone, index) {
|
|
271
|
+
async function walkFilenameConvention(clone, index) {
|
|
271
272
|
const publisher = publisherFromGithubUrl(clone.sourceUrl);
|
|
272
273
|
if (!publisher) {
|
|
273
274
|
throw new Error(
|
|
@@ -275,7 +276,7 @@ function walkFilenameConvention(clone, index) {
|
|
|
275
276
|
);
|
|
276
277
|
}
|
|
277
278
|
const version = (clone.tag ? clone.tag.replace(/^v/, "") : void 0) ?? syntheticVersion(clone.commit);
|
|
278
|
-
for (const e of scanDirectory(clone.localPath, publisher)) {
|
|
279
|
+
for (const e of await scanDirectory(clone.localPath, publisher)) {
|
|
279
280
|
const manifestAbs = e.source;
|
|
280
281
|
const files = [];
|
|
281
282
|
if (DIR_SCOPED_KINDS.has(e.kind)) {
|
|
@@ -293,7 +294,7 @@ function walkFilenameConvention(clone, index) {
|
|
|
293
294
|
files,
|
|
294
295
|
sha256: compositeSha256(files),
|
|
295
296
|
metadata: readMetadata(clone.localPath, files, e.kind),
|
|
296
|
-
deps: manifestDeps(clone.localPath, files, e.kind)
|
|
297
|
+
deps: await manifestDeps(clone.localPath, files, e.kind)
|
|
297
298
|
};
|
|
298
299
|
push(index, `${publisher}/${e.kind}:${e.name}`, candidate);
|
|
299
300
|
}
|
|
@@ -329,11 +330,11 @@ function readContentFrontmatter(repoRoot, files, kind) {
|
|
|
329
330
|
return void 0;
|
|
330
331
|
}
|
|
331
332
|
}
|
|
332
|
-
function manifestDeps(repoRoot, files, kind) {
|
|
333
|
+
async function manifestDeps(repoRoot, files, kind) {
|
|
333
334
|
const ext = kind === "bundle" ? [".bundle.yaml", "BUNDLE.md"] : kind === "flow" ? [".flow.yaml", ".flow.json"] : null;
|
|
334
335
|
if (!ext) return void 0;
|
|
335
336
|
const mf = files.find((f) => ext.some((e) => f.path.endsWith(e)));
|
|
336
|
-
return mf ? bundleDepRefs(join(repoRoot, mf.path)) : void 0;
|
|
337
|
+
return mf ? await bundleDepRefs(join(repoRoot, mf.path)) : void 0;
|
|
337
338
|
}
|
|
338
339
|
function push(index, key, candidate) {
|
|
339
340
|
const arr = index.get(key) ?? [];
|
|
@@ -581,16 +582,16 @@ function resolveSourcePublisher(repoDir) {
|
|
|
581
582
|
const org = repoSlugFromGitRemote(repoDir)?.split("/")[0];
|
|
582
583
|
return org ? normalizeGithubOrg(org) : void 0;
|
|
583
584
|
}
|
|
584
|
-
function scanRepo(repoDir, repoName) {
|
|
585
|
+
async function scanRepo(repoDir, repoName) {
|
|
585
586
|
const repo = repoSlugFromGitRemote(repoDir);
|
|
586
587
|
const publisher = resolveSourcePublisher(repoDir) ?? repoName;
|
|
587
|
-
return scanDirectory(repoDir, repoName).map((e) => ({
|
|
588
|
+
return (await scanDirectory(repoDir, repoName)).map((e) => ({
|
|
588
589
|
...e,
|
|
589
590
|
publisher,
|
|
590
591
|
...repo ? { repo } : {}
|
|
591
592
|
}));
|
|
592
593
|
}
|
|
593
|
-
function resolveAsset(ref, repositories, reposDir, opts) {
|
|
594
|
+
async function resolveAsset(ref, repositories, reposDir, opts) {
|
|
594
595
|
let repoNames;
|
|
595
596
|
if (ref.publisher) {
|
|
596
597
|
repoNames = [ref.publisher];
|
|
@@ -605,7 +606,7 @@ function resolveAsset(ref, repositories, reposDir, opts) {
|
|
|
605
606
|
if (!decl) continue;
|
|
606
607
|
const repoDir = resolveRepoDir(decl, repoName, reposDir, opts?.projectDir);
|
|
607
608
|
if (!repoDir || !existsSync(repoDir)) continue;
|
|
608
|
-
const entries = scanRepo(repoDir, repoName);
|
|
609
|
+
const entries = await scanRepo(repoDir, repoName);
|
|
609
610
|
const match = entries.find((e) => e.kind === ref.kind && e.name === ref.name);
|
|
610
611
|
if (match) return match;
|
|
611
612
|
}
|
|
@@ -1596,7 +1597,10 @@ function mergeMcpDeclarations(base, overlay) {
|
|
|
1596
1597
|
headers: overlay.headers ? base.headers ? { ...base.headers, ...overlay.headers } : overlay.headers : base.headers,
|
|
1597
1598
|
description: overlay.description ?? base.description,
|
|
1598
1599
|
tags: overlay.tags ?? base.tags,
|
|
1599
|
-
recipe: overlay.recipe ?? base.recipe
|
|
1600
|
+
recipe: overlay.recipe ?? base.recipe,
|
|
1601
|
+
// Sticky: once either side carried folded `.instance.json` secrets, the
|
|
1602
|
+
// merged `env` does too — the flag must not be lost by an overlay.
|
|
1603
|
+
instanceSecretsFolded: overlay.instanceSecretsFolded ?? base.instanceSecretsFolded
|
|
1600
1604
|
};
|
|
1601
1605
|
}
|
|
1602
1606
|
var unscopedTail = (x) => x.includes("/") ? x.split("/").pop() : x;
|
|
@@ -1612,7 +1616,10 @@ function foldInstanceEnv(decl, instancePath, name) {
|
|
|
1612
1616
|
}
|
|
1613
1617
|
if (instance.resolvedSecrets && typeof instance.resolvedSecrets === "object") {
|
|
1614
1618
|
for (const [k, v] of Object.entries(instance.resolvedSecrets)) {
|
|
1615
|
-
if (typeof v === "string")
|
|
1619
|
+
if (typeof v === "string") {
|
|
1620
|
+
env[k] = v;
|
|
1621
|
+
decl.instanceSecretsFolded = true;
|
|
1622
|
+
}
|
|
1616
1623
|
}
|
|
1617
1624
|
}
|
|
1618
1625
|
if (Object.keys(env).length > 0) decl.env = env;
|
|
@@ -1660,13 +1667,43 @@ function loadMaterializedMcpDeclarations(projectDir) {
|
|
|
1660
1667
|
}
|
|
1661
1668
|
return result;
|
|
1662
1669
|
}
|
|
1663
|
-
function
|
|
1670
|
+
function subdirNames(dir) {
|
|
1671
|
+
try {
|
|
1672
|
+
return readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name);
|
|
1673
|
+
} catch {
|
|
1674
|
+
return [];
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
function loadStoreStagedMcpDeclarations(projectDir) {
|
|
1678
|
+
const root = join(projectDir, ".skaile/cache/store");
|
|
1679
|
+
if (!existsSync(root)) return [];
|
|
1680
|
+
const result = [];
|
|
1681
|
+
for (const publisher of subdirNames(root)) {
|
|
1682
|
+
const kindDir = join(root, publisher, "mcp-server");
|
|
1683
|
+
for (const name of subdirNames(kindDir)) {
|
|
1684
|
+
const nameDir = join(kindDir, name);
|
|
1685
|
+
const versions = subdirNames(nameDir).sort(
|
|
1686
|
+
(a, b) => a.localeCompare(b, "en", { numeric: true })
|
|
1687
|
+
);
|
|
1688
|
+
for (const version of versions) {
|
|
1689
|
+
const decl = deriveSingleMaterializedMcpDeclaration(join(nameDir, version), name);
|
|
1690
|
+
if (decl) result.push(decl);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
return result;
|
|
1695
|
+
}
|
|
1696
|
+
var TREE_COPY_DEADLINE_FACTOR = 4;
|
|
1697
|
+
async function stageMaterializedSkills(projectDir, skillsDir, opts) {
|
|
1664
1698
|
const dir = join(projectDir, ".skaile/assets/skill");
|
|
1665
|
-
if (!existsSync(dir)) return [];
|
|
1666
1699
|
const staged = [];
|
|
1667
1700
|
let subdirs;
|
|
1668
1701
|
try {
|
|
1669
|
-
|
|
1702
|
+
const entries = await withFsDeadline(
|
|
1703
|
+
`readdir ${dir}`,
|
|
1704
|
+
() => readdir(dir, { withFileTypes: true })
|
|
1705
|
+
);
|
|
1706
|
+
subdirs = entries.filter((e) => e.isDirectory()).map((e) => e.name);
|
|
1670
1707
|
} catch {
|
|
1671
1708
|
return [];
|
|
1672
1709
|
}
|
|
@@ -1676,15 +1713,27 @@ function stageMaterializedSkills(projectDir, skillsDir, opts) {
|
|
|
1676
1713
|
}
|
|
1677
1714
|
for (const name of subdirs) {
|
|
1678
1715
|
const src = join(dir, name);
|
|
1679
|
-
if (!existsSync(join(src, "SKILL.md"))) continue;
|
|
1680
1716
|
if (declaredSet && !declaredSet.has(name) && !declaredSet.has(unscopedTail(name))) continue;
|
|
1717
|
+
const hasSkillMd = await tryWithFsDeadline(
|
|
1718
|
+
`stat ${join(src, "SKILL.md")}`,
|
|
1719
|
+
async () => {
|
|
1720
|
+
await stat(join(src, "SKILL.md"));
|
|
1721
|
+
return true;
|
|
1722
|
+
},
|
|
1723
|
+
false
|
|
1724
|
+
);
|
|
1725
|
+
if (!hasSkillMd) continue;
|
|
1681
1726
|
const dest = join(projectDir, skillsDir, name);
|
|
1682
1727
|
try {
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1728
|
+
await withFsDeadline(
|
|
1729
|
+
`cp ${src} -> ${dest}`,
|
|
1730
|
+
() => cp(src, dest, {
|
|
1731
|
+
recursive: true,
|
|
1732
|
+
force: true,
|
|
1733
|
+
filter: (source) => basename(source) !== ".instance.json"
|
|
1734
|
+
}),
|
|
1735
|
+
fsDeadlineMs() * TREE_COPY_DEADLINE_FACTOR
|
|
1736
|
+
);
|
|
1688
1737
|
staged.push(name);
|
|
1689
1738
|
} catch (err) {
|
|
1690
1739
|
console.warn(
|
|
@@ -1763,8 +1812,8 @@ function collectMcpRefStrings(dependencies) {
|
|
|
1763
1812
|
}
|
|
1764
1813
|
return mcpRefStrings;
|
|
1765
1814
|
}
|
|
1766
|
-
function buildMcpProvenanceIndex(sources, projectDir) {
|
|
1767
|
-
return sources.length > 0 ? buildProvenanceIndex(buildSourceClones(sources)) : /* @__PURE__ */ new Map();
|
|
1815
|
+
async function buildMcpProvenanceIndex(sources, projectDir) {
|
|
1816
|
+
return sources.length > 0 ? await buildProvenanceIndex(buildSourceClones(sources)) : /* @__PURE__ */ new Map();
|
|
1768
1817
|
}
|
|
1769
1818
|
function upsertCatalogMcpDecls(mcpRefStrings, provenanceIndex, upsert) {
|
|
1770
1819
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -1784,18 +1833,18 @@ function upsertCatalogMcpDecls(mcpRefStrings, provenanceIndex, upsert) {
|
|
|
1784
1833
|
upsert(catalogDecl);
|
|
1785
1834
|
}
|
|
1786
1835
|
}
|
|
1787
|
-
function
|
|
1836
|
+
function upsertGatedMcpDecls(decls, explicit, mcpRefStrings, upsert) {
|
|
1788
1837
|
const declaredNames = buildDeclaredMcpNames(explicit, mcpRefStrings);
|
|
1789
|
-
for (const decl of
|
|
1838
|
+
for (const decl of decls) {
|
|
1790
1839
|
if (declaredNames.has(decl.id) || declaredNames.has(unscopedTail(decl.id))) upsert(decl);
|
|
1791
1840
|
}
|
|
1792
1841
|
}
|
|
1793
|
-
function loadMcpServerDeclarations(projectDir) {
|
|
1842
|
+
async function loadMcpServerDeclarations(projectDir) {
|
|
1794
1843
|
const config = resolveSkWorkspaceConfig(projectDir);
|
|
1795
1844
|
const explicit = config.mcp_servers ?? [];
|
|
1796
1845
|
const materialized = loadMaterializedMcpDeclarations(projectDir);
|
|
1797
1846
|
const mcpRefStrings = collectMcpRefStrings(config.dependencies);
|
|
1798
|
-
const provenanceIndex = buildMcpProvenanceIndex(config.sources ?? []);
|
|
1847
|
+
const provenanceIndex = await buildMcpProvenanceIndex(config.sources ?? []);
|
|
1799
1848
|
const byId = /* @__PURE__ */ new Map();
|
|
1800
1849
|
const order = [];
|
|
1801
1850
|
const upsert = (decl) => {
|
|
@@ -1808,7 +1857,8 @@ function loadMcpServerDeclarations(projectDir) {
|
|
|
1808
1857
|
}
|
|
1809
1858
|
};
|
|
1810
1859
|
upsertCatalogMcpDecls(mcpRefStrings, provenanceIndex, upsert);
|
|
1811
|
-
|
|
1860
|
+
upsertGatedMcpDecls(loadStoreStagedMcpDeclarations(projectDir), explicit, mcpRefStrings, upsert);
|
|
1861
|
+
upsertGatedMcpDecls(materialized, explicit, mcpRefStrings, upsert);
|
|
1812
1862
|
for (const decl of explicit) {
|
|
1813
1863
|
upsert(decl);
|
|
1814
1864
|
}
|
|
@@ -1842,5 +1892,5 @@ function resolveAgentDir(projectDir) {
|
|
|
1842
1892
|
}
|
|
1843
1893
|
|
|
1844
1894
|
export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SKAILE_YAML_DEFAULT, SKAILE_YAML_SUFFIX, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, __resetCacheMigrationMemo, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, cloudConfigFromProfile, coerceVersion, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, globalCacheRoot, globalSkaileDir, isWorkspaceConfigFilename, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, matchPin, mergeLegacyEntriesInto, mergeLegacyEntriesKeyed, mergeSkWorkspaceConfigs, migrateLegacyDir, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveGlobalBackends, resolveGlobalSkWorkspaceConfig, resolveSkWorkspaceConfig, resolveSourcePublisher, saveSkWorkspaceConfig, scanRepo, sourceCacheKey, sourceShortName, stageMaterializedSkills, storeManifestSlug, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, workspaceNameFromFilename, writeLinks };
|
|
1845
|
-
//# sourceMappingURL=chunk-
|
|
1846
|
-
//# sourceMappingURL=chunk-
|
|
1895
|
+
//# sourceMappingURL=chunk-YODP3STD.js.map
|
|
1896
|
+
//# sourceMappingURL=chunk-YODP3STD.js.map
|