@skaile/workspaces 0.29.1 → 0.31.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 +63 -0
- package/dist/{asset-feeds-2V7LZIG7.js → asset-feeds-6HZDZEIT.js} +14 -13
- package/dist/asset-feeds-6HZDZEIT.js.map +1 -0
- package/dist/asset-manager/index.js +12 -12
- package/dist/asset-manager/installer.js +11 -11
- package/dist/asset-manager/renderers.js +2 -2
- package/dist/asset-manager/src/index.d.ts +27 -0
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +1 -2
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +354 -224
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +3 -3
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +4 -4
- package/dist/bridge/drivers/echo.js +2 -2
- package/dist/bridge/drivers/echo.js.map +1 -1
- package/dist/bridge/drivers/gemini.js +5 -5
- package/dist/bridge/drivers/goose.js +4 -4
- package/dist/bridge/drivers/omp.js +3 -3
- package/dist/bridge/drivers/opencode.js +4 -4
- package/dist/bridge/drivers/qwen.js +5 -5
- package/dist/bridge/index.js +4 -4
- package/dist/bridge/src/drivers/claude-sdk.d.ts +68 -0
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/echo.d.ts +1 -1
- package/dist/bridge/src/drivers/echo.d.ts.map +1 -1
- package/dist/bridge/src/error-classifier.d.ts.map +1 -1
- package/dist/bridge/src/normalizer.d.ts +5 -0
- package/dist/bridge/src/normalizer.d.ts.map +1 -1
- package/dist/{chunk-LDUNTZB6.js → chunk-26L2B6P6.js} +2 -2
- package/dist/{chunk-LDUNTZB6.js.map → chunk-26L2B6P6.js.map} +1 -1
- package/dist/{chunk-DVMSGGCM.js → chunk-45RKEHPX.js} +158 -108
- package/dist/chunk-45RKEHPX.js.map +1 -0
- package/dist/{chunk-2FS4FPZ7.js → chunk-4AGIEU7V.js} +44 -62
- package/dist/chunk-4AGIEU7V.js.map +1 -0
- package/dist/{chunk-SF4GWVR5.js → chunk-4CRKROS5.js} +86 -55
- package/dist/chunk-4CRKROS5.js.map +1 -0
- package/dist/{chunk-ZONCCO5N.js → chunk-4R6DROGN.js} +30 -32
- package/dist/chunk-4R6DROGN.js.map +1 -0
- package/dist/{chunk-MBOR7D65.js → chunk-67MFR5LS.js} +3 -3
- package/dist/{chunk-MBOR7D65.js.map → chunk-67MFR5LS.js.map} +1 -1
- package/dist/{chunk-7GWYRVAX.js → chunk-6LW7Q53Z.js} +162 -165
- package/dist/chunk-6LW7Q53Z.js.map +1 -0
- package/dist/{chunk-QMONOHXT.js → chunk-74UKG2LA.js} +3 -3
- package/dist/{chunk-QMONOHXT.js.map → chunk-74UKG2LA.js.map} +1 -1
- package/dist/{chunk-AKSR434V.js → chunk-7FLLPKX3.js} +79 -56
- package/dist/chunk-7FLLPKX3.js.map +1 -0
- package/dist/{chunk-BZ2JU7IP.js → chunk-7KOBITAP.js} +5 -5
- package/dist/{chunk-BZ2JU7IP.js.map → chunk-7KOBITAP.js.map} +1 -1
- package/dist/{chunk-JIQLLZ65.js → chunk-7MANNJ3U.js} +534 -235
- package/dist/chunk-7MANNJ3U.js.map +1 -0
- package/dist/{chunk-7R6W5EQR.js → chunk-ACXLKNIM.js} +2 -2
- package/dist/{chunk-7R6W5EQR.js.map → chunk-ACXLKNIM.js.map} +1 -1
- package/dist/{chunk-UIZKIUC6.js → chunk-BRBOC53X.js} +3 -3
- package/dist/chunk-BRBOC53X.js.map +1 -0
- package/dist/{chunk-FWHOU3CX.js → chunk-CBIPUBUS.js} +6 -6
- package/dist/{chunk-FWHOU3CX.js.map → chunk-CBIPUBUS.js.map} +1 -1
- package/dist/{chunk-3QQSSRYN.js → chunk-DKAV43NI.js} +430 -346
- package/dist/chunk-DKAV43NI.js.map +1 -0
- package/dist/{chunk-M4KLIEIJ.js → chunk-G247J4MC.js} +3 -3
- package/dist/chunk-G247J4MC.js.map +1 -0
- package/dist/{chunk-TV72ZJYN.js → chunk-GXC3TYMQ.js} +60 -47
- package/dist/chunk-GXC3TYMQ.js.map +1 -0
- package/dist/{chunk-IERB3UXJ.js → chunk-H5YXL4KI.js} +83 -69
- package/dist/chunk-H5YXL4KI.js.map +1 -0
- package/dist/{chunk-2NOE4AGD.js → chunk-HH62ECJ7.js} +3 -3
- package/dist/{chunk-2NOE4AGD.js.map → chunk-HH62ECJ7.js.map} +1 -1
- package/dist/{chunk-QDJKE557.js → chunk-HRKB2ATT.js} +64 -64
- package/dist/chunk-HRKB2ATT.js.map +1 -0
- package/dist/{chunk-MLJKA3S6.js → chunk-IENYMRZ6.js} +1711 -1497
- package/dist/chunk-IENYMRZ6.js.map +1 -0
- package/dist/{chunk-24UIWON4.js → chunk-JB35MVBN.js} +167 -156
- package/dist/chunk-JB35MVBN.js.map +1 -0
- package/dist/{chunk-5YO3H5Q4.js → chunk-KY5NY7LB.js} +3 -3
- package/dist/chunk-KY5NY7LB.js.map +1 -0
- package/dist/{chunk-MIH45XPY.js → chunk-LA2YSXEE.js} +1974 -1919
- package/dist/chunk-LA2YSXEE.js.map +1 -0
- package/dist/{chunk-IEJ5IOC3.js → chunk-LFDZYCEO.js} +4 -2
- package/dist/chunk-LFDZYCEO.js.map +1 -0
- package/dist/{chunk-72IA6BTP.js → chunk-MWAEOCU7.js} +9 -9
- package/dist/{chunk-72IA6BTP.js.map → chunk-MWAEOCU7.js.map} +1 -1
- package/dist/{chunk-5V5KZQIC.js → chunk-NGE6PALH.js} +4 -4
- package/dist/{chunk-5V5KZQIC.js.map → chunk-NGE6PALH.js.map} +1 -1
- package/dist/{chunk-PAYAFNXG.js → chunk-NGJ6E344.js} +104 -74
- package/dist/chunk-NGJ6E344.js.map +1 -0
- package/dist/{chunk-UBCZVONU.js → chunk-NQC7ZUXE.js} +3 -3
- package/dist/{chunk-UBCZVONU.js.map → chunk-NQC7ZUXE.js.map} +1 -1
- package/dist/{chunk-ZEKWHJBB.js → chunk-OEXA7BBK.js} +3 -3
- package/dist/{chunk-ZEKWHJBB.js.map → chunk-OEXA7BBK.js.map} +1 -1
- package/dist/{chunk-5RBPPBEK.js → chunk-P72K36PU.js} +4 -4
- package/dist/{chunk-5RBPPBEK.js.map → chunk-P72K36PU.js.map} +1 -1
- package/dist/{chunk-OTFG5Q7H.js → chunk-QF6LBS2C.js} +4594 -4480
- package/dist/chunk-QF6LBS2C.js.map +1 -0
- package/dist/{chunk-HK5FRWG6.js → chunk-R6O6YWU7.js} +2 -2
- package/dist/{chunk-HK5FRWG6.js.map → chunk-R6O6YWU7.js.map} +1 -1
- package/dist/{chunk-PRLD7EXG.js → chunk-SBGHNXJD.js} +2 -2
- package/dist/{chunk-PRLD7EXG.js.map → chunk-SBGHNXJD.js.map} +1 -1
- package/dist/{chunk-CMG3GJ6B.js → chunk-VO7QQ76S.js} +4 -4
- package/dist/{chunk-CMG3GJ6B.js.map → chunk-VO7QQ76S.js.map} +1 -1
- package/dist/{chunk-Z3XXKR5E.js → chunk-WDMH4UMD.js} +4 -6
- package/dist/chunk-WDMH4UMD.js.map +1 -0
- package/dist/{chunk-W7W66MDZ.js → chunk-X46FY45B.js} +44 -42
- package/dist/chunk-X46FY45B.js.map +1 -0
- package/dist/{chunk-JKNWJ64A.js → chunk-XGCXFX7X.js} +2 -2
- package/dist/{chunk-JKNWJ64A.js.map → chunk-XGCXFX7X.js.map} +1 -1
- package/dist/{chunk-FQHHCICT.js → chunk-XVDXGQ55.js} +226 -226
- package/dist/chunk-XVDXGQ55.js.map +1 -0
- package/dist/{chunk-OKRUTSG7.js → chunk-ZDKJHQY2.js} +2 -2
- package/dist/{chunk-OKRUTSG7.js.map → chunk-ZDKJHQY2.js.map} +1 -1
- package/dist/{chunk-LD4QIVBY.js → chunk-ZM7UOJR2.js} +3 -3
- package/dist/{chunk-LD4QIVBY.js.map → chunk-ZM7UOJR2.js.map} +1 -1
- package/dist/cli/index.js +2811 -2662
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts +0 -9
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/deploy.d.ts.map +1 -1
- package/dist/cli/src/commands/integration.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +1 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/show.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/ensure-sources.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts.map +1 -1
- package/dist/cli/src/open-registry.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/index.d.ts +4 -6
- package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/paths.d.ts +0 -2
- package/dist/cli/src/plugin-store/paths.d.ts.map +1 -1
- package/dist/cli/src/setup.d.ts.map +1 -1
- package/dist/connectors/config.js +9 -9
- package/dist/connectors/index.js +12 -12
- package/dist/connectors/rclone.js +2 -2
- package/dist/connectors/src/connector-prompt.d.ts.map +1 -1
- package/dist/connectors/src/connector-registry.d.ts.map +1 -1
- package/dist/connectors/src/connector-types.d.ts +1 -1
- package/dist/connectors/src/connector-types.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +5 -5
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors/src/managed-gitconfig.d.ts.map +1 -1
- package/dist/{connectors-PTCSHCHZ.js → connectors-DY7UBBV5.js} +3 -3
- package/dist/{connectors-PTCSHCHZ.js.map → connectors-DY7UBBV5.js.map} +1 -1
- package/dist/connectors-shared/src/index.d.ts +1 -1
- package/dist/connectors-shared/src/index.d.ts.map +1 -1
- package/dist/core/index.js +8 -8
- package/dist/core/logging.js +1 -1
- 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/runtime-assets.js +5 -5
- package/dist/core/src/lock.d.ts +0 -9
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/logging/create-logger.d.ts.map +1 -1
- package/dist/core/src/logging/index.d.ts +11 -11
- package/dist/core/src/logging/index.d.ts.map +1 -1
- package/dist/core/src/logging/log-store.d.ts.map +1 -1
- package/dist/core/src/logging/sinks/no-op-sink.d.ts.map +1 -1
- package/dist/core/src/logging/sinks/sqlite-sink.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +6 -0
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +0 -12
- 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/store.d.ts +1 -1
- package/dist/core/src/store.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +8 -27
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/store.js +1 -1
- package/dist/core/workspace-config.js +4 -4
- package/dist/deploy/index.js +8 -8
- package/dist/discovery/index.js +6 -6
- package/dist/discovery/src/asset-kind-registry.d.ts +1 -1
- package/dist/discovery/src/asset-kind-registry.d.ts.map +1 -1
- package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
- package/dist/discovery/src/discover-manifest.d.ts +1 -1
- package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
- package/dist/discovery/src/discover.d.ts +30 -3
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/domains.d.ts +144 -0
- package/dist/discovery/src/domains.d.ts.map +1 -0
- package/dist/discovery/src/index.d.ts +9 -7
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/source-config.d.ts +1 -1
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts +13 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/ensure-sources-JWBUVDW6.js +84 -0
- package/dist/ensure-sources-JWBUVDW6.js.map +1 -0
- package/dist/factory-assets/connectors/deploy/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/deploy/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/deploy.js +12 -12
- package/dist/factory-assets/connectors/devserver/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/devserver/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/devserver.js +12 -12
- package/dist/factory-assets/connectors/flow/adapter.d.ts +16 -2
- package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/adapter.js +12 -12
- package/dist/factory-assets/connectors/flow/engine/flow-kind-provider.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/index.d.ts +3 -3
- package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +9 -9
- package/dist/factory-assets/connectors/flow/index.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/index.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +15 -15
- package/dist/factory-assets/connectors/flow.js +12 -12
- package/dist/factory-assets/connectors/git/driver.d.ts +32 -0
- package/dist/factory-assets/connectors/git/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +12 -12
- package/dist/factory-assets/connectors/gmail/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/gmail/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/gmail.js +12 -12
- package/dist/factory-assets/connectors/googledrive.js +12 -12
- package/dist/factory-assets/connectors/local/driver.d.ts +1 -2
- package/dist/factory-assets/connectors/local/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/local.js +12 -12
- package/dist/factory-assets/connectors/mattermost/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/mattermost/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/mattermost.js +12 -12
- package/dist/factory-assets/connectors/memory/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/memory.js +12 -12
- package/dist/factory-assets/connectors/minio/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/minio/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/minio.js +12 -12
- package/dist/factory-assets/connectors/postgres/adapter.d.ts +6 -1
- package/dist/factory-assets/connectors/postgres/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/postgres.js +12 -12
- package/dist/factory-assets/connectors/s3/driver.d.ts.map +1 -1
- package/dist/factory-assets/connectors/s3.js +12 -12
- package/dist/factory-assets/connectors/sharepoint.js +12 -12
- package/dist/factory-assets/connectors/sqlite/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/sqlite/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/sqlite.js +12 -12
- package/dist/factory-assets/connectors/static-server/adapter.d.ts +6 -1
- package/dist/factory-assets/connectors/static-server/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/static-server.js +12 -12
- package/dist/factory-assets/connectors/tunnel/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/tunnel/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/tunnel.js +12 -12
- package/dist/factory-assets/connectors/webdav.js +12 -12
- package/dist/factory-assets/connectors/xstate/adapter.d.ts +1 -1
- package/dist/factory-assets/connectors/xstate/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/xstate-store/adapter.d.ts +7 -0
- package/dist/factory-assets/connectors/xstate-store/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/xstate-store.js +12 -12
- package/dist/factory-assets/connectors/xstate.js +12 -12
- package/dist/flows-T6RCRKCX.js +7 -0
- package/dist/{flows-L3GHQD7F.js.map → flows-T6RCRKCX.js.map} +1 -1
- package/dist/library/index.js +13 -13
- package/dist/library/install.js +9 -9
- package/dist/library/src/config.d.ts +2 -2
- package/dist/library/src/config.d.ts.map +1 -1
- package/dist/library/src/index.d.ts +27 -27
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/install/index.d.ts +2 -2
- package/dist/library/src/install/index.d.ts.map +1 -1
- package/dist/library/src/install/install-from-manifest.d.ts +0 -21
- package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
- package/dist/library/src/knowledge/index.d.ts +2 -2
- package/dist/library/src/knowledge/index.d.ts.map +1 -1
- package/dist/library/src/knowledge/knowledge-kind-provider.d.ts.map +1 -1
- package/dist/library/src/local/library.d.ts +2 -2
- package/dist/library/src/local/library.d.ts.map +1 -1
- package/dist/library/src/local/store-paths.d.ts.map +1 -1
- package/dist/library/src/pin-resolver.d.ts.map +1 -1
- package/dist/library/src/preset/apply.d.ts +2 -2
- package/dist/library/src/preset/apply.d.ts.map +1 -1
- package/dist/library/src/preset/index.d.ts +10 -10
- package/dist/library/src/preset/index.d.ts.map +1 -1
- package/dist/library/src/preset/parse.d.ts.map +1 -1
- package/dist/library/src/preset/resolve-item.d.ts +1 -1
- package/dist/library/src/preset/resolve-item.d.ts.map +1 -1
- package/dist/library/src/preset/upgrade.d.ts +1 -1
- package/dist/library/src/preset/upgrade.d.ts.map +1 -1
- package/dist/library/src/remote/index.d.ts +5 -5
- package/dist/library/src/remote/index.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/library/src/remote/rest-catalog-source.d.ts +1 -1
- package/dist/library/src/remote/rest-catalog-source.d.ts.map +1 -1
- package/dist/library/src/sync/driver.d.ts +1 -1
- package/dist/library/src/sync/driver.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts +1 -1
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/library/src/sync/local-driver.d.ts +1 -1
- package/dist/library/src/sync/local-driver.d.ts.map +1 -1
- package/dist/library/src/workspace-config.d.ts +0 -9
- package/dist/library/src/workspace-config.d.ts.map +1 -1
- package/dist/open-library-ZXTSUPBJ.js +23 -0
- package/dist/{open-library-3VJY74LQ.js.map → open-library-ZXTSUPBJ.js.map} +1 -1
- package/dist/paths-F7RHQUFL.js +15 -0
- package/dist/{paths-CE66L3AL.js.map → paths-F7RHQUFL.js.map} +1 -1
- package/dist/plugin-registry/src/targets.d.ts +2 -3
- package/dist/plugin-registry/src/targets.d.ts.map +1 -1
- package/dist/{plugin-store-GL5VKYUA.js → plugin-store-BC3I36HA.js} +11 -14
- package/dist/plugin-store-BC3I36HA.js.map +1 -0
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/src/asset-kind-registry.d.ts +1 -1
- package/dist/plugins/src/asset-kind-registry.d.ts.map +1 -1
- package/dist/plugins/src/catalog-source.d.ts +5 -0
- package/dist/plugins/src/catalog-source.d.ts.map +1 -1
- package/dist/plugins/src/index.d.ts +5 -5
- package/dist/plugins/src/index.d.ts.map +1 -1
- package/dist/{provider-GAWKFQ3T.js → provider-ZPT443IX.js} +18 -16
- package/dist/provider-ZPT443IX.js.map +1 -0
- package/dist/resolver/index.js +1 -1
- package/dist/resolver/src/preamble.d.ts.map +1 -1
- package/dist/runner/index.js +17 -17
- package/dist/runner/src/builtin-capabilities.d.ts +12 -0
- package/dist/runner/src/builtin-capabilities.d.ts.map +1 -1
- package/dist/runner/src/capability-registry.d.ts.map +1 -1
- package/dist/runner/src/compaction/index.d.ts +0 -4
- package/dist/runner/src/compaction/index.d.ts.map +1 -1
- package/dist/runner/src/compaction/orchestrator.d.ts +23 -2
- package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
- package/dist/runner/src/composition/compile.d.ts.map +1 -1
- package/dist/runner/src/composition/index.d.ts +4 -4
- package/dist/runner/src/composition/index.d.ts.map +1 -1
- package/dist/runner/src/composition/resolve.d.ts.map +1 -1
- package/dist/runner/src/composition/types.d.ts +2 -2
- package/dist/runner/src/composition/types.d.ts.map +1 -1
- package/dist/runner/src/config.d.ts +2 -2
- package/dist/runner/src/config.d.ts.map +1 -1
- package/dist/runner/src/define-capability.d.ts +1 -1
- package/dist/runner/src/define-capability.d.ts.map +1 -1
- package/dist/runner/src/external-mcp.d.ts.map +1 -1
- package/dist/runner/src/index.d.ts +9 -9
- package/dist/runner/src/index.d.ts.map +1 -1
- package/dist/runner/src/logging-bootstrap.d.ts +1 -1
- package/dist/runner/src/logging-bootstrap.d.ts.map +1 -1
- package/dist/runner/src/manifest.d.ts.map +1 -1
- package/dist/runner/src/recipe-resolver.d.ts +32 -0
- package/dist/runner/src/recipe-resolver.d.ts.map +1 -1
- package/dist/runner/src/resource-handler.d.ts.map +1 -1
- package/dist/runner/src/resources.d.ts.map +1 -1
- package/dist/runner/src/runner-capabilities.d.ts +25 -0
- package/dist/runner/src/runner-capabilities.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +12 -12
- package/dist/sdk/bridge.js +4 -4
- package/dist/sdk/core.js +8 -8
- package/dist/sdk/flow.js +9 -9
- package/dist/sdk/index.js +92 -76
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +1 -1
- package/dist/sdk/runner.js +17 -17
- package/dist/sdk/session.js +1 -1
- package/dist/sdk/src/agent-session.d.ts +8 -0
- package/dist/sdk/src/agent-session.d.ts.map +1 -1
- package/dist/sdk/src/factory.d.ts.map +1 -1
- package/dist/sdk/src/index.d.ts +2 -2
- package/dist/sdk/src/index.d.ts.map +1 -1
- package/dist/sdk/store.js +1 -1
- package/dist/sdk/telemetry.js +1 -1
- package/dist/secrets/index.js +2 -2
- package/dist/secrets/src/index.d.ts +8 -8
- package/dist/secrets/src/index.d.ts.map +1 -1
- package/dist/secrets/src/lifecycle.d.ts +1 -2
- package/dist/secrets/src/lifecycle.d.ts.map +1 -1
- package/dist/secrets/src/providers/env.d.ts +1 -1
- package/dist/secrets/src/providers/env.d.ts.map +1 -1
- package/dist/secrets/src/providers/local.d.ts +1 -1
- package/dist/secrets/src/providers/local.d.ts.map +1 -1
- package/dist/secrets/src/router.d.ts +1 -1
- package/dist/secrets/src/router.d.ts.map +1 -1
- package/dist/session/index.js +1 -1
- package/dist/session/src/mentions.d.ts.map +1 -1
- package/dist/{sessions-2IUX4P3P.js → sessions-DICDEONJ.js} +3 -3
- package/dist/{sessions-2IUX4P3P.js.map → sessions-DICDEONJ.js.map} +1 -1
- package/dist/{setup-4YMN2BDU.js → setup-FQ3DE6J6.js} +198 -175
- package/dist/setup-FQ3DE6J6.js.map +1 -0
- package/dist/skills-BMI6H7HI.js +7 -0
- package/dist/{skills-6HJ3WINN.js.map → skills-BMI6H7HI.js.map} +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/src/index.d.ts +1 -1
- package/dist/store/src/index.d.ts.map +1 -1
- package/dist/store/src/resource-client.d.ts +1 -1
- package/dist/store/src/resource-client.d.ts.map +1 -1
- package/dist/store/src/vue.d.ts.map +1 -1
- package/dist/store/vue.js.map +1 -1
- package/dist/store-client-27YYEWMM.js +15 -0
- package/dist/{store-client-BCP5LCAZ.js.map → store-client-27YYEWMM.js.map} +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/telemetry/src/context.d.ts.map +1 -1
- package/dist/telemetry/src/index.d.ts +3 -3
- package/dist/telemetry/src/index.d.ts.map +1 -1
- package/dist/telemetry/src/otel/gen-ai.d.ts +1 -1
- package/dist/telemetry/src/otel/gen-ai.d.ts.map +1 -1
- package/dist/telemetry/src/otel/provider.d.ts.map +1 -1
- package/dist/transport/src/index.d.ts +1 -1
- package/dist/transport/src/index.d.ts.map +1 -1
- package/dist/tui/index.js +251 -218
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/src/index.d.ts +2 -2
- package/dist/tui/src/index.d.ts.map +1 -1
- package/dist/tui/src/repl-renderer.d.ts.map +1 -1
- package/dist/tui/src/repl-session.d.ts +1 -1
- package/dist/tui/src/repl-session.d.ts.map +1 -1
- package/dist/tui/src/repl.d.ts.map +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/envelope.d.ts +1 -1
- package/dist/types/src/envelope.d.ts.map +1 -1
- package/dist/types/src/manifests/agent.d.ts.map +1 -1
- package/dist/types/src/manifests/connector.d.ts.map +1 -1
- package/dist/types/src/manifests/contract.d.ts.map +1 -1
- package/dist/types/src/manifests/index.d.ts +16 -16
- package/dist/types/src/manifests/index.d.ts.map +1 -1
- package/dist/types/src/manifests/mcp-server.d.ts.map +1 -1
- package/dist/types/src/manifests/mount.d.ts.map +1 -1
- package/dist/types/src/manifests/persona.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +0 -18
- package/dist/types/src/manifests/preset.d.ts.map +1 -1
- package/dist/types/src/manifests/prompt.d.ts.map +1 -1
- package/dist/types/src/manifests/ruleset.d.ts.map +1 -1
- package/dist/types/src/manifests/skill.d.ts.map +1 -1
- package/dist/validator-VF5M764T.js +5 -0
- package/dist/{validator-47SQUW3J.js.map → validator-VF5M764T.js.map} +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +6 -6
- package/dist/workspace-plugin/adapters/omp.js +76 -69
- package/dist/workspace-plugin/adapters/omp.js.map +1 -1
- package/dist/workspace-plugin/index.js +2 -2
- package/dist/workspace-plugin/src/adapters/omp.d.ts.map +1 -1
- package/dist/workspace-plugin/src/tools/connectors.d.ts.map +1 -1
- package/dist/workspace-plugin/src/tools/flows.d.ts.map +1 -1
- package/dist/workspace-plugin/src/tools/sessions.d.ts.map +1 -1
- package/dist/workspace-plugin/src/tools/skills.d.ts.map +1 -1
- package/dist/workspace-plugin/src/tools/validator.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/asset-feeds-2V7LZIG7.js.map +0 -1
- package/dist/chunk-24UIWON4.js.map +0 -1
- package/dist/chunk-2FS4FPZ7.js.map +0 -1
- package/dist/chunk-3QQSSRYN.js.map +0 -1
- package/dist/chunk-5YO3H5Q4.js.map +0 -1
- package/dist/chunk-7GWYRVAX.js.map +0 -1
- package/dist/chunk-AKSR434V.js.map +0 -1
- package/dist/chunk-DVMSGGCM.js.map +0 -1
- package/dist/chunk-FQHHCICT.js.map +0 -1
- package/dist/chunk-IEJ5IOC3.js.map +0 -1
- package/dist/chunk-IERB3UXJ.js.map +0 -1
- package/dist/chunk-JIQLLZ65.js.map +0 -1
- package/dist/chunk-M4KLIEIJ.js.map +0 -1
- package/dist/chunk-MIH45XPY.js.map +0 -1
- package/dist/chunk-MLJKA3S6.js.map +0 -1
- package/dist/chunk-OTFG5Q7H.js.map +0 -1
- package/dist/chunk-PAYAFNXG.js.map +0 -1
- package/dist/chunk-QDJKE557.js.map +0 -1
- package/dist/chunk-SF4GWVR5.js.map +0 -1
- package/dist/chunk-TV72ZJYN.js.map +0 -1
- package/dist/chunk-UIZKIUC6.js.map +0 -1
- package/dist/chunk-W7W66MDZ.js.map +0 -1
- package/dist/chunk-Z3XXKR5E.js.map +0 -1
- package/dist/chunk-ZONCCO5N.js.map +0 -1
- package/dist/ensure-sources-BNSRO5G7.js +0 -74
- package/dist/ensure-sources-BNSRO5G7.js.map +0 -1
- package/dist/flows-L3GHQD7F.js +0 -7
- package/dist/open-library-3VJY74LQ.js +0 -23
- package/dist/paths-CE66L3AL.js +0 -15
- package/dist/plugin-store-GL5VKYUA.js.map +0 -1
- package/dist/provider-GAWKFQ3T.js.map +0 -1
- package/dist/setup-4YMN2BDU.js.map +0 -1
- package/dist/skills-6HJ3WINN.js +0 -7
- package/dist/store-client-BCP5LCAZ.js +0 -15
- package/dist/validator-47SQUW3J.js +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-
|
|
2
|
-
import { scanDirectory, parseFrontmatter, bundleDepRefs, fromMcpServerMd } from './chunk-
|
|
3
|
-
import { parseAssetRef, assetRefToStr } from './chunk-
|
|
1
|
+
import { decodeSkaileManifest, SKAILE_MANIFEST_FILENAME } from './chunk-H5YXL4KI.js';
|
|
2
|
+
import { scanDirectory, parseFrontmatter, bundleDepRefs, fromMcpServerMd } from './chunk-4AGIEU7V.js';
|
|
3
|
+
import { parseAssetRef, assetRefToStr } from './chunk-LFDZYCEO.js';
|
|
4
4
|
import { mkdirSync, existsSync, readFileSync, writeFileSync, lstatSync, symlinkSync, rmSync, readdirSync, cpSync } from 'fs';
|
|
5
5
|
import { homedir } from 'os';
|
|
6
6
|
import { join, resolve, relative, dirname, parse as parse$1, basename } from 'path';
|
|
@@ -106,65 +106,75 @@ function unlinkRepo(projectDir, repoName) {
|
|
|
106
106
|
return true;
|
|
107
107
|
}
|
|
108
108
|
function ensureRepo(decl, name, reposDir, opts) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (links[name]) {
|
|
112
|
-
const linked = links[name];
|
|
113
|
-
if (!existsSync(linked)) {
|
|
114
|
-
throw new Error(
|
|
115
|
-
`Linked path not found: ${linked}. Remove the .skaile/links.yaml entry to clear it.`
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
return linked;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
109
|
+
const linked = resolveLinkedOverride(name, opts?.projectDir);
|
|
110
|
+
if (linked) return linked;
|
|
121
111
|
if (decl.path) {
|
|
122
|
-
|
|
123
|
-
const resolved = resolve(projectDir, decl.path);
|
|
124
|
-
if (existsSync(resolved)) return resolved;
|
|
125
|
-
if (!decl.url) {
|
|
126
|
-
throw new Error(`Local repository path not found: ${decl.path} (resolved: ${resolved})`);
|
|
127
|
-
}
|
|
128
|
-
if (!cloneRepo(decl.url, decl.branch ?? "main", resolved)) {
|
|
129
|
-
throw new Error(`Failed to clone ${decl.url} into ${resolved}`);
|
|
130
|
-
}
|
|
131
|
-
if (opts?.pin) checkoutPin(resolved, opts.pin);
|
|
132
|
-
return resolved;
|
|
112
|
+
return ensureLocalPathRepo(decl, reposDir, opts);
|
|
133
113
|
}
|
|
134
114
|
if (decl.url) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
115
|
+
return ensureRemoteRepo(decl, name, reposDir, opts);
|
|
116
|
+
}
|
|
117
|
+
throw new Error(`Repository "${name}" has neither url nor path`);
|
|
118
|
+
}
|
|
119
|
+
function resolveLinkedOverride(name, projectDir) {
|
|
120
|
+
if (!projectDir) return null;
|
|
121
|
+
const links = readLinks(projectDir);
|
|
122
|
+
const linked = links[name];
|
|
123
|
+
if (!linked) return null;
|
|
124
|
+
if (!existsSync(linked)) {
|
|
125
|
+
throw new Error(
|
|
126
|
+
`Linked path not found: ${linked}. Remove the .skaile/links.yaml entry to clear it.`
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
return linked;
|
|
130
|
+
}
|
|
131
|
+
function ensureLocalPathRepo(decl, reposDir, opts) {
|
|
132
|
+
const projectDir = opts?.projectDir ?? resolve(reposDir, "..");
|
|
133
|
+
const resolved = resolve(projectDir, decl.path);
|
|
134
|
+
if (existsSync(resolved)) return resolved;
|
|
135
|
+
if (!decl.url) {
|
|
136
|
+
throw new Error(`Local repository path not found: ${decl.path} (resolved: ${resolved})`);
|
|
137
|
+
}
|
|
138
|
+
if (!cloneRepo(decl.url, decl.branch ?? "main", resolved)) {
|
|
139
|
+
throw new Error(`Failed to clone ${decl.url} into ${resolved}`);
|
|
140
|
+
}
|
|
141
|
+
if (opts?.pin) checkoutPin(resolved, opts.pin);
|
|
142
|
+
return resolved;
|
|
143
|
+
}
|
|
144
|
+
function ensureRemoteRepo(decl, name, reposDir, opts) {
|
|
145
|
+
const branch = decl.branch ?? "main";
|
|
146
|
+
const globalCache = getGlobalCacheDir();
|
|
147
|
+
const cacheDest = join(globalCache, name);
|
|
148
|
+
if (existsSync(join(cacheDest, ".git"))) {
|
|
149
|
+
if (!opts?.pin) pullRepo(cacheDest, branch);
|
|
150
|
+
} else {
|
|
151
|
+
if (!cloneRepo(decl.url, branch, cacheDest)) {
|
|
152
|
+
throw new Error(`Failed to clone ${decl.url} (branch: ${branch})`);
|
|
144
153
|
}
|
|
145
|
-
|
|
146
|
-
|
|
154
|
+
}
|
|
155
|
+
if (opts?.pin) {
|
|
156
|
+
checkoutPin(cacheDest, opts.pin);
|
|
157
|
+
}
|
|
158
|
+
linkCacheIntoProject(cacheDest, reposDir, name);
|
|
159
|
+
return cacheDest;
|
|
160
|
+
}
|
|
161
|
+
function linkCacheIntoProject(cacheDest, reposDir, name) {
|
|
162
|
+
const projectDest = join(reposDir, name);
|
|
163
|
+
const projectExists = existsSync(projectDest);
|
|
164
|
+
const isSymlink = projectExists && lstatSync(projectDest).isSymbolicLink();
|
|
165
|
+
if (!projectExists) {
|
|
166
|
+
mkdirSync(reposDir, { recursive: true });
|
|
167
|
+
try {
|
|
168
|
+
symlinkSync(cacheDest, projectDest);
|
|
169
|
+
} catch {
|
|
147
170
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
try {
|
|
154
|
-
symlinkSync(cacheDest, projectDest);
|
|
155
|
-
} catch {
|
|
156
|
-
return cacheDest;
|
|
157
|
-
}
|
|
158
|
-
} else if (!isSymlink) {
|
|
159
|
-
rmSync(projectDest, { recursive: true });
|
|
160
|
-
try {
|
|
161
|
-
symlinkSync(cacheDest, projectDest);
|
|
162
|
-
} catch {
|
|
163
|
-
}
|
|
171
|
+
} else if (!isSymlink) {
|
|
172
|
+
rmSync(projectDest, { recursive: true });
|
|
173
|
+
try {
|
|
174
|
+
symlinkSync(cacheDest, projectDest);
|
|
175
|
+
} catch {
|
|
164
176
|
}
|
|
165
|
-
return cacheDest;
|
|
166
177
|
}
|
|
167
|
-
throw new Error(`Repository "${name}" has neither url nor path`);
|
|
168
178
|
}
|
|
169
179
|
function repoSlugFromGitRemote(rootDir) {
|
|
170
180
|
const r = spawnSync("git", ["-C", rootDir, "config", "--get", "remote.origin.url"], {
|
|
@@ -291,37 +301,7 @@ async function resolveAll(deps, opts) {
|
|
|
291
301
|
if (seen.has(key)) return;
|
|
292
302
|
seen.add(key);
|
|
293
303
|
const sourceCandidates = opts.provenanceIndex.get(key) ?? [];
|
|
294
|
-
const storeCandidates =
|
|
295
|
-
if (opts.stores.length > 0 && opts.storeFetcher) {
|
|
296
|
-
const sourceVersions = sourceCandidates.map((c) => c.version);
|
|
297
|
-
const fetcher = opts.storeFetcher;
|
|
298
|
-
for (const store of opts.stores) {
|
|
299
|
-
let versionsHint = sourceVersions;
|
|
300
|
-
if (versionsHint.length === 0 && needsStoreVersionDiscovery(ref.pin) && fetcher.listVersions) {
|
|
301
|
-
versionsHint = await fetcher.listVersions(
|
|
302
|
-
store.url,
|
|
303
|
-
assetRefToStr({ ...ref, pin: void 0 })
|
|
304
|
-
);
|
|
305
|
-
}
|
|
306
|
-
const candidateVersions = enumerateVersionsForPin(ref.pin, versionsHint);
|
|
307
|
-
for (const v of candidateVersions) {
|
|
308
|
-
if (!v) continue;
|
|
309
|
-
const m = await fetcher.getInstallManifest(store.url, assetRefToStr({ ...ref, pin: v }));
|
|
310
|
-
if (m) {
|
|
311
|
-
storeCandidates.push({
|
|
312
|
-
publisher: ref.publisher,
|
|
313
|
-
kind: ref.kind,
|
|
314
|
-
name: ref.name,
|
|
315
|
-
version: v,
|
|
316
|
-
sourceUrl: m.sourceUrl,
|
|
317
|
-
commit: m.commit,
|
|
318
|
-
files: m.files,
|
|
319
|
-
sha256: m.sha256
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
304
|
+
const storeCandidates = await gatherStoreCandidates(ref, ref.publisher, sourceCandidates, opts);
|
|
325
305
|
const all = [...sourceCandidates, ...storeCandidates];
|
|
326
306
|
if (all.length === 0) {
|
|
327
307
|
missing.push(refStr);
|
|
@@ -336,36 +316,23 @@ async function resolveAll(deps, opts) {
|
|
|
336
316
|
const best = versions.sort((a, b) => semver.rcompare(coerceVersion(a), coerceVersion(b)))[0];
|
|
337
317
|
const finalists = filtered.filter((c) => c.version === best);
|
|
338
318
|
const canonicalRef = assetRefToStr({ ...ref, pin: best });
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
if (opts.storeFetcher && opts.stores.length > 0 && sourceCandidates.some((c) => c.version === best) && storeCandidates.some((c) => c.version === best)) {
|
|
358
|
-
for (const store of opts.stores) {
|
|
359
|
-
const d = await opts.storeFetcher.getCanonicalDigest(store.url, canonicalRef);
|
|
360
|
-
if (d && d.sha256 !== chosen.sha256) {
|
|
361
|
-
throw new CanonicalRefConflictError(
|
|
362
|
-
canonicalRef,
|
|
363
|
-
[...finalists, { ...chosen, sourceUrl: store.url, sha256: d.sha256 }],
|
|
364
|
-
[...depChain, refStr]
|
|
365
|
-
);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
}
|
|
319
|
+
const chosen = selectChosenCandidate(
|
|
320
|
+
finalists,
|
|
321
|
+
canonicalRef,
|
|
322
|
+
overridesByRef,
|
|
323
|
+
overridesApplied,
|
|
324
|
+
[...depChain, refStr]
|
|
325
|
+
);
|
|
326
|
+
await crossCheckStoreDigest(
|
|
327
|
+
chosen,
|
|
328
|
+
finalists,
|
|
329
|
+
canonicalRef,
|
|
330
|
+
best,
|
|
331
|
+
sourceCandidates,
|
|
332
|
+
storeCandidates,
|
|
333
|
+
opts,
|
|
334
|
+
[...depChain, refStr]
|
|
335
|
+
);
|
|
369
336
|
resolved.push(chosen);
|
|
370
337
|
resolvedBy.set(key, parent);
|
|
371
338
|
for (const depRef of chosen.deps ?? []) {
|
|
@@ -377,6 +344,72 @@ async function resolveAll(deps, opts) {
|
|
|
377
344
|
}
|
|
378
345
|
return { resolved, missing, resolvedBy, overridesApplied };
|
|
379
346
|
}
|
|
347
|
+
async function gatherStoreCandidates(ref, publisher, sourceCandidates, opts) {
|
|
348
|
+
const storeCandidates = [];
|
|
349
|
+
if (opts.stores.length === 0 || !opts.storeFetcher) return storeCandidates;
|
|
350
|
+
const sourceVersions = sourceCandidates.map((c) => c.version);
|
|
351
|
+
const fetcher = opts.storeFetcher;
|
|
352
|
+
for (const store of opts.stores) {
|
|
353
|
+
let versionsHint = sourceVersions;
|
|
354
|
+
if (versionsHint.length === 0 && needsStoreVersionDiscovery(ref.pin) && fetcher.listVersions) {
|
|
355
|
+
versionsHint = await fetcher.listVersions(
|
|
356
|
+
store.url,
|
|
357
|
+
assetRefToStr({ ...ref, pin: void 0 })
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
const candidateVersions = enumerateVersionsForPin(ref.pin, versionsHint);
|
|
361
|
+
for (const v of candidateVersions) {
|
|
362
|
+
if (!v) continue;
|
|
363
|
+
const m = await fetcher.getInstallManifest(store.url, assetRefToStr({ ...ref, pin: v }));
|
|
364
|
+
if (m) {
|
|
365
|
+
storeCandidates.push({
|
|
366
|
+
publisher,
|
|
367
|
+
kind: ref.kind,
|
|
368
|
+
name: ref.name,
|
|
369
|
+
version: v,
|
|
370
|
+
sourceUrl: m.sourceUrl,
|
|
371
|
+
commit: m.commit,
|
|
372
|
+
files: m.files,
|
|
373
|
+
sha256: m.sha256
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return storeCandidates;
|
|
379
|
+
}
|
|
380
|
+
function selectChosenCandidate(finalists, canonicalRef, overridesByRef, overridesApplied, conflictChain) {
|
|
381
|
+
const uniqueShas = Array.from(new Set(finalists.map((c) => c.sha256)));
|
|
382
|
+
if (uniqueShas.length > 1) {
|
|
383
|
+
const override = overridesByRef.get(canonicalRef);
|
|
384
|
+
if (!override) {
|
|
385
|
+
throw new CanonicalRefConflictError(canonicalRef, finalists, conflictChain);
|
|
386
|
+
}
|
|
387
|
+
const pick = finalists.find((c) => c.sourceUrl === override.source);
|
|
388
|
+
if (!pick) {
|
|
389
|
+
throw new Error(
|
|
390
|
+
`override for ${canonicalRef} points at ${override.source}, which is not among the resolved candidates`
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
overridesApplied.add(canonicalRef);
|
|
394
|
+
return pick;
|
|
395
|
+
}
|
|
396
|
+
return [...finalists].sort((a, b) => a.sourceUrl.localeCompare(b.sourceUrl))[0];
|
|
397
|
+
}
|
|
398
|
+
async function crossCheckStoreDigest(chosen, finalists, canonicalRef, best, sourceCandidates, storeCandidates, opts, conflictChain) {
|
|
399
|
+
if (!opts.storeFetcher || opts.stores.length === 0 || !sourceCandidates.some((c) => c.version === best) || !storeCandidates.some((c) => c.version === best)) {
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
for (const store of opts.stores) {
|
|
403
|
+
const d = await opts.storeFetcher.getCanonicalDigest(store.url, canonicalRef);
|
|
404
|
+
if (d && d.sha256 !== chosen.sha256) {
|
|
405
|
+
throw new CanonicalRefConflictError(
|
|
406
|
+
canonicalRef,
|
|
407
|
+
[...finalists, { ...chosen, sourceUrl: store.url, sha256: d.sha256 }],
|
|
408
|
+
conflictChain
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
380
413
|
function coerceVersion(v) {
|
|
381
414
|
return semver.valid(v) ? v : semver.coerce(v)?.version ?? "0.0.0";
|
|
382
415
|
}
|
|
@@ -534,51 +567,57 @@ function walkWithManifest(clone, manifestPath, index) {
|
|
|
534
567
|
}
|
|
535
568
|
const curatedSource = a.source ?? manifest.source;
|
|
536
569
|
const version = a.version ?? manifestVersion;
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
let commit;
|
|
540
|
-
let metadata;
|
|
541
|
-
let frontmatter;
|
|
542
|
-
if (curatedSource) {
|
|
543
|
-
files = granularFiles(a) ?? [];
|
|
544
|
-
sourceUrl = curatedSource.url;
|
|
545
|
-
commit = curatedSource.commit ?? clone.commit;
|
|
546
|
-
} else {
|
|
547
|
-
files = expandAssetFiles(repoRoot, a);
|
|
548
|
-
verifyNameMatch(repoRoot, files, a.name, a.kind);
|
|
549
|
-
metadata = readMetadata(repoRoot, files, a.kind);
|
|
550
|
-
frontmatter = readContentFrontmatter(repoRoot, files, a.kind);
|
|
551
|
-
sourceUrl = clone.sourceUrl;
|
|
552
|
-
commit = clone.commit;
|
|
553
|
-
}
|
|
570
|
+
const resolved = resolveAssetBytes(clone, repoRoot, a, curatedSource);
|
|
571
|
+
const { files } = resolved;
|
|
554
572
|
const candidate = {
|
|
555
573
|
publisher: assetPublisher,
|
|
556
574
|
kind: a.kind,
|
|
557
575
|
name: a.name,
|
|
558
576
|
version,
|
|
559
|
-
sourceUrl,
|
|
560
|
-
commit,
|
|
577
|
+
sourceUrl: resolved.sourceUrl,
|
|
578
|
+
commit: resolved.commit,
|
|
561
579
|
files,
|
|
562
580
|
sha256: a.sha256 ?? compositeSha256(files),
|
|
563
|
-
metadata,
|
|
581
|
+
metadata: resolved.metadata,
|
|
564
582
|
deps: a.dependencies ?? bundleDeps(repoRoot, files, a.kind)
|
|
565
583
|
};
|
|
566
|
-
|
|
567
|
-
const fmArr = (k) => Array.isArray(frontmatter?.[k]) ? frontmatter[k].filter((x) => typeof x === "string") : void 0;
|
|
568
|
-
const description = a.description ?? fmStr("description");
|
|
569
|
-
const keywords = a.keywords ?? fmArr("keywords");
|
|
570
|
-
const category = a.category ?? fmStr("category");
|
|
571
|
-
const license = a.license ?? manifest.license;
|
|
572
|
-
const homepage = a.homepage ?? manifest.homepage;
|
|
573
|
-
if (description) candidate.description = description;
|
|
574
|
-
if (keywords && keywords.length > 0) candidate.keywords = keywords;
|
|
575
|
-
if (category) candidate.category = category;
|
|
576
|
-
if (license) candidate.license = license;
|
|
577
|
-
if (homepage) candidate.homepage = homepage;
|
|
584
|
+
applyStoreListingMetadata(candidate, a, manifest, resolved.frontmatter);
|
|
578
585
|
push(index, `${assetPublisher}/${a.kind}:${a.name}`, candidate);
|
|
579
586
|
}
|
|
580
587
|
return true;
|
|
581
588
|
}
|
|
589
|
+
function resolveAssetBytes(clone, repoRoot, a, curatedSource) {
|
|
590
|
+
if (curatedSource) {
|
|
591
|
+
return {
|
|
592
|
+
files: granularFiles(a) ?? [],
|
|
593
|
+
sourceUrl: curatedSource.url,
|
|
594
|
+
commit: curatedSource.commit ?? clone.commit
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
const files = expandAssetFiles(repoRoot, a);
|
|
598
|
+
verifyNameMatch(repoRoot, files, a.name, a.kind);
|
|
599
|
+
return {
|
|
600
|
+
files,
|
|
601
|
+
sourceUrl: clone.sourceUrl,
|
|
602
|
+
commit: clone.commit,
|
|
603
|
+
metadata: readMetadata(repoRoot, files, a.kind),
|
|
604
|
+
frontmatter: readContentFrontmatter(repoRoot, files, a.kind)
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
function applyStoreListingMetadata(candidate, a, manifest, frontmatter) {
|
|
608
|
+
const fmStr = (k) => typeof frontmatter?.[k] === "string" ? frontmatter[k] : void 0;
|
|
609
|
+
const fmArr = (k) => Array.isArray(frontmatter?.[k]) ? frontmatter[k].filter((x) => typeof x === "string") : void 0;
|
|
610
|
+
const description = a.description ?? fmStr("description");
|
|
611
|
+
const keywords = a.keywords ?? fmArr("keywords");
|
|
612
|
+
const category = a.category ?? fmStr("category");
|
|
613
|
+
const license = a.license ?? manifest.license;
|
|
614
|
+
const homepage = a.homepage ?? manifest.homepage;
|
|
615
|
+
if (description) candidate.description = description;
|
|
616
|
+
if (keywords && keywords.length > 0) candidate.keywords = keywords;
|
|
617
|
+
if (category) candidate.category = category;
|
|
618
|
+
if (license) candidate.license = license;
|
|
619
|
+
if (homepage) candidate.homepage = homepage;
|
|
620
|
+
}
|
|
582
621
|
function globFiles(a) {
|
|
583
622
|
if (!Array.isArray(a.files)) return void 0;
|
|
584
623
|
const strings = a.files.filter((f) => typeof f === "string");
|
|
@@ -854,59 +893,8 @@ function mergeSkWorkspaceConfigs(base, overlay) {
|
|
|
854
893
|
connectors: mergeById(base.connectors ?? [], overlay.connectors ?? []),
|
|
855
894
|
// mcp_servers: by id — overlay wins
|
|
856
895
|
mcp_servers: mergeById(base.mcp_servers ?? [], overlay.mcp_servers ?? []),
|
|
857
|
-
agent:
|
|
858
|
-
|
|
859
|
-
context: overlay.agent?.context ?? base.agent?.context,
|
|
860
|
-
permissions: {
|
|
861
|
-
...base.agent?.permissions,
|
|
862
|
-
...stripUndefined(overlay.agent?.permissions),
|
|
863
|
-
deny_write: dedupe([
|
|
864
|
-
...base.agent?.permissions?.deny_write ?? [],
|
|
865
|
-
...overlay.agent?.permissions?.deny_write ?? []
|
|
866
|
-
]),
|
|
867
|
-
deny_read: dedupe([
|
|
868
|
-
...base.agent?.permissions?.deny_read ?? [],
|
|
869
|
-
...overlay.agent?.permissions?.deny_read ?? []
|
|
870
|
-
])
|
|
871
|
-
},
|
|
872
|
-
subagents: {
|
|
873
|
-
...base.agent?.subagents ?? {},
|
|
874
|
-
...overlay.agent?.subagents ?? {}
|
|
875
|
-
},
|
|
876
|
-
hooks: {
|
|
877
|
-
pre_flow: [
|
|
878
|
-
...base.agent?.hooks?.pre_flow ?? [],
|
|
879
|
-
...overlay.agent?.hooks?.pre_flow ?? []
|
|
880
|
-
],
|
|
881
|
-
post_flow: [
|
|
882
|
-
...base.agent?.hooks?.post_flow ?? [],
|
|
883
|
-
...overlay.agent?.hooks?.post_flow ?? []
|
|
884
|
-
],
|
|
885
|
-
pre_node: [
|
|
886
|
-
...base.agent?.hooks?.pre_node ?? [],
|
|
887
|
-
...overlay.agent?.hooks?.pre_node ?? []
|
|
888
|
-
],
|
|
889
|
-
post_node: [
|
|
890
|
-
...base.agent?.hooks?.post_node ?? [],
|
|
891
|
-
...overlay.agent?.hooks?.post_node ?? []
|
|
892
|
-
]
|
|
893
|
-
}
|
|
894
|
-
},
|
|
895
|
-
workspace: {
|
|
896
|
-
directories: dedupe([
|
|
897
|
-
...base.workspace?.directories ?? [],
|
|
898
|
-
...overlay.workspace?.directories ?? []
|
|
899
|
-
]),
|
|
900
|
-
git: {
|
|
901
|
-
init: overlay.workspace?.git?.init ?? base.workspace?.git?.init,
|
|
902
|
-
ignore: dedupe([
|
|
903
|
-
...base.workspace?.git?.ignore ?? [],
|
|
904
|
-
...overlay.workspace?.git?.ignore ?? []
|
|
905
|
-
])
|
|
906
|
-
},
|
|
907
|
-
setup: overlay.workspace?.setup ?? base.workspace?.setup,
|
|
908
|
-
container: overlay.workspace?.container ?? base.workspace?.container
|
|
909
|
-
},
|
|
896
|
+
agent: mergeAgentConfig(base.agent, overlay.agent),
|
|
897
|
+
workspace: mergeWorkspaceConfig(base.workspace, overlay.workspace),
|
|
910
898
|
// secrets: overlay wins entirely
|
|
911
899
|
secrets: overlay.secrets ?? base.secrets,
|
|
912
900
|
// telemetry: overlay wins entirely (raw pass-through)
|
|
@@ -925,6 +913,45 @@ function mergeSkWorkspaceConfigs(base, overlay) {
|
|
|
925
913
|
deploy: overlay.deploy ?? base.deploy
|
|
926
914
|
};
|
|
927
915
|
}
|
|
916
|
+
function mergeAgentConfig(base, overlay) {
|
|
917
|
+
return {
|
|
918
|
+
definition: overlay?.definition ?? base?.definition,
|
|
919
|
+
context: overlay?.context ?? base?.context,
|
|
920
|
+
permissions: {
|
|
921
|
+
...base?.permissions,
|
|
922
|
+
...stripUndefined(overlay?.permissions),
|
|
923
|
+
deny_write: dedupe([
|
|
924
|
+
...base?.permissions?.deny_write ?? [],
|
|
925
|
+
...overlay?.permissions?.deny_write ?? []
|
|
926
|
+
]),
|
|
927
|
+
deny_read: dedupe([
|
|
928
|
+
...base?.permissions?.deny_read ?? [],
|
|
929
|
+
...overlay?.permissions?.deny_read ?? []
|
|
930
|
+
])
|
|
931
|
+
},
|
|
932
|
+
subagents: {
|
|
933
|
+
...base?.subagents ?? {},
|
|
934
|
+
...overlay?.subagents ?? {}
|
|
935
|
+
},
|
|
936
|
+
hooks: {
|
|
937
|
+
pre_flow: [...base?.hooks?.pre_flow ?? [], ...overlay?.hooks?.pre_flow ?? []],
|
|
938
|
+
post_flow: [...base?.hooks?.post_flow ?? [], ...overlay?.hooks?.post_flow ?? []],
|
|
939
|
+
pre_node: [...base?.hooks?.pre_node ?? [], ...overlay?.hooks?.pre_node ?? []],
|
|
940
|
+
post_node: [...base?.hooks?.post_node ?? [], ...overlay?.hooks?.post_node ?? []]
|
|
941
|
+
}
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
function mergeWorkspaceConfig(base, overlay) {
|
|
945
|
+
return {
|
|
946
|
+
directories: dedupe([...base?.directories ?? [], ...overlay?.directories ?? []]),
|
|
947
|
+
git: {
|
|
948
|
+
init: overlay?.git?.init ?? base?.git?.init,
|
|
949
|
+
ignore: dedupe([...base?.git?.ignore ?? [], ...overlay?.git?.ignore ?? []])
|
|
950
|
+
},
|
|
951
|
+
setup: overlay?.setup ?? base?.setup,
|
|
952
|
+
container: overlay?.container ?? base?.container
|
|
953
|
+
};
|
|
954
|
+
}
|
|
928
955
|
var KNOWN_DRIVERS = ["omp", "claude-sdk", "codex"];
|
|
929
956
|
var KNOWN_PROVIDERS = [
|
|
930
957
|
"anthropic",
|
|
@@ -941,6 +968,7 @@ var KNOWN_PROVIDERS = [
|
|
|
941
968
|
"elevenlabs"
|
|
942
969
|
];
|
|
943
970
|
var KNOWN_ACCESS = ["read-only", "read-write"];
|
|
971
|
+
var KNOWN_LAUNCHERS = ["recipe", "package-runner", "path"];
|
|
944
972
|
var AGENT_PROFILE_FIELDS = [
|
|
945
973
|
"driver",
|
|
946
974
|
"provider",
|
|
@@ -958,11 +986,7 @@ function normalizeAgentConfig(raw) {
|
|
|
958
986
|
function normalizeConfig(raw) {
|
|
959
987
|
return normalizeConfigInternal(raw).config;
|
|
960
988
|
}
|
|
961
|
-
function
|
|
962
|
-
const config = {};
|
|
963
|
-
const diagnostics = [];
|
|
964
|
-
if (raw.name) config.name = String(raw.name);
|
|
965
|
-
if (raw.description) config.description = String(raw.description);
|
|
989
|
+
function normalizeAgentConfigSection(raw, config, diagnostics) {
|
|
966
990
|
let agentConfigRaw;
|
|
967
991
|
let agentConfigKey;
|
|
968
992
|
if (raw["agent-config"] !== void 0) {
|
|
@@ -975,31 +999,29 @@ function normalizeConfigInternal(raw) {
|
|
|
975
999
|
agentConfigRaw = raw.agentConfig;
|
|
976
1000
|
agentConfigKey = "agentConfig";
|
|
977
1001
|
}
|
|
978
|
-
if (agentConfigRaw
|
|
979
|
-
|
|
980
|
-
diagnostics.push({
|
|
981
|
-
code: "legacy_key_camelcase",
|
|
982
|
-
severity: "warning",
|
|
983
|
-
message: 'Non-canonical key "agentConfig" \u2014 use "agent-config".',
|
|
984
|
-
path: "agentConfig"
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
const { profiles, wrappedFlat } = normalizeAgentConfig(
|
|
988
|
-
agentConfigRaw
|
|
989
|
-
);
|
|
990
|
-
if (wrappedFlat) {
|
|
991
|
-
diagnostics.push({
|
|
992
|
-
code: "legacy_agent_config_flat",
|
|
993
|
-
severity: "warning",
|
|
994
|
-
message: 'Flat agent-config block wrapped as the "default" profile \u2014 nest fields under "default:".',
|
|
995
|
-
path: agentConfigKey
|
|
996
|
-
});
|
|
997
|
-
}
|
|
998
|
-
config.agent_config = profiles;
|
|
1002
|
+
if (!agentConfigRaw || typeof agentConfigRaw !== "object" || Array.isArray(agentConfigRaw)) {
|
|
1003
|
+
return;
|
|
999
1004
|
}
|
|
1000
|
-
if (
|
|
1001
|
-
|
|
1005
|
+
if (agentConfigKey === "agentConfig") {
|
|
1006
|
+
diagnostics.push({
|
|
1007
|
+
code: "legacy_key_camelcase",
|
|
1008
|
+
severity: "warning",
|
|
1009
|
+
message: 'Non-canonical key "agentConfig" \u2014 use "agent-config".',
|
|
1010
|
+
path: "agentConfig"
|
|
1011
|
+
});
|
|
1002
1012
|
}
|
|
1013
|
+
const { profiles, wrappedFlat } = normalizeAgentConfig(agentConfigRaw);
|
|
1014
|
+
if (wrappedFlat) {
|
|
1015
|
+
diagnostics.push({
|
|
1016
|
+
code: "legacy_agent_config_flat",
|
|
1017
|
+
severity: "warning",
|
|
1018
|
+
message: 'Flat agent-config block wrapped as the "default" profile \u2014 nest fields under "default:".',
|
|
1019
|
+
path: agentConfigKey
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
config.agent_config = profiles;
|
|
1023
|
+
}
|
|
1024
|
+
function assertNoLegacyTopLevelKeys(raw) {
|
|
1003
1025
|
if (raw.repositories !== void 0) {
|
|
1004
1026
|
throw new Error(
|
|
1005
1027
|
"skaile.yaml: unknown top-level key `repositories:`. The schema changed \u2014 see docs/concepts/manifest-schema.md, or ask your AI assistant to apply the `migrate-skaile-manifest` skill."
|
|
@@ -1017,37 +1039,49 @@ function normalizeConfigInternal(raw) {
|
|
|
1017
1039
|
);
|
|
1018
1040
|
}
|
|
1019
1041
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1042
|
+
}
|
|
1043
|
+
function normalizeOverrideEntry(item) {
|
|
1044
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) return null;
|
|
1045
|
+
const o = item;
|
|
1046
|
+
const ref = typeof o.ref === "string" ? o.ref : "";
|
|
1047
|
+
const source = typeof o.source === "string" ? o.source : "";
|
|
1048
|
+
if (!ref || !source) return null;
|
|
1049
|
+
if (typeof o.reason !== "string") {
|
|
1050
|
+
throw new Error(
|
|
1051
|
+
`skaile.yaml: overrides[] entry for ${ref}: reason is required and must be a non-empty string.`
|
|
1052
|
+
);
|
|
1030
1053
|
}
|
|
1031
|
-
if (
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1054
|
+
if (o.reason.trim().length === 0) {
|
|
1055
|
+
throw new Error(`skaile.yaml: overrides[] entry for ${ref}: reason must not be empty.`);
|
|
1056
|
+
}
|
|
1057
|
+
return { ref, source, reason: o.reason };
|
|
1058
|
+
}
|
|
1059
|
+
function normalizeStoresSection(raw, config) {
|
|
1060
|
+
if (!Array.isArray(raw.stores)) return;
|
|
1061
|
+
const entries = [];
|
|
1062
|
+
for (const item of raw.stores) {
|
|
1063
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) continue;
|
|
1064
|
+
const s = item;
|
|
1065
|
+
const url = typeof s.url === "string" ? s.url : "";
|
|
1066
|
+
if (!url) continue;
|
|
1067
|
+
entries.push({ url });
|
|
1068
|
+
}
|
|
1069
|
+
if (entries.length > 0) config.stores = entries;
|
|
1070
|
+
}
|
|
1071
|
+
function normalizeOverridesSection(raw, config) {
|
|
1072
|
+
if (!Array.isArray(raw.overrides)) return;
|
|
1073
|
+
const entries = [];
|
|
1074
|
+
for (const item of raw.overrides) {
|
|
1075
|
+
const entry = normalizeOverrideEntry(item);
|
|
1076
|
+
if (entry) entries.push(entry);
|
|
1050
1077
|
}
|
|
1078
|
+
if (entries.length > 0) config.overrides = entries;
|
|
1079
|
+
}
|
|
1080
|
+
function normalizeConsumptionSection(raw, config) {
|
|
1081
|
+
normalizeStoresSection(raw, config);
|
|
1082
|
+
normalizeOverridesSection(raw, config);
|
|
1083
|
+
}
|
|
1084
|
+
function normalizeStructuralSections(raw, config, diagnostics) {
|
|
1051
1085
|
if (Array.isArray(raw.mounts)) {
|
|
1052
1086
|
config.mounts = raw.mounts;
|
|
1053
1087
|
}
|
|
@@ -1055,7 +1089,19 @@ function normalizeConfigInternal(raw) {
|
|
|
1055
1089
|
config.connectors = raw.connectors;
|
|
1056
1090
|
}
|
|
1057
1091
|
if (Array.isArray(raw.mcp_servers)) {
|
|
1058
|
-
config.mcp_servers = raw.mcp_servers
|
|
1092
|
+
config.mcp_servers = raw.mcp_servers.map((entry) => {
|
|
1093
|
+
if (entry.launcher !== void 0 && !KNOWN_LAUNCHERS.includes(entry.launcher)) {
|
|
1094
|
+
diagnostics.push({
|
|
1095
|
+
code: "unknown_launcher",
|
|
1096
|
+
severity: "warning",
|
|
1097
|
+
message: `Unknown launcher "${entry.launcher}" on mcp_servers entry "${entry.id}" \u2014 expected one of: ${KNOWN_LAUNCHERS.join(", ")}.`,
|
|
1098
|
+
path: `mcp_servers.${entry.id}.launcher`
|
|
1099
|
+
});
|
|
1100
|
+
const { launcher: _dropped, ...rest } = entry;
|
|
1101
|
+
return rest;
|
|
1102
|
+
}
|
|
1103
|
+
return entry;
|
|
1104
|
+
});
|
|
1059
1105
|
}
|
|
1060
1106
|
if (Array.isArray(raw.plugins)) {
|
|
1061
1107
|
const specs = raw.plugins.filter((p) => typeof p === "string" && p.length > 0);
|
|
@@ -1079,6 +1125,8 @@ function normalizeConfigInternal(raw) {
|
|
|
1079
1125
|
if (raw.patches && typeof raw.patches === "object" && !Array.isArray(raw.patches)) {
|
|
1080
1126
|
config.patches = raw.patches;
|
|
1081
1127
|
}
|
|
1128
|
+
}
|
|
1129
|
+
function normalizeDependencySection(raw, config) {
|
|
1082
1130
|
if (Array.isArray(raw.dependencies)) {
|
|
1083
1131
|
config.dependencies = raw.dependencies.filter((d) => typeof d === "string");
|
|
1084
1132
|
}
|
|
@@ -1098,6 +1146,20 @@ function normalizeConfigInternal(raw) {
|
|
|
1098
1146
|
if (raw.telemetry && typeof raw.telemetry === "object" && !Array.isArray(raw.telemetry)) {
|
|
1099
1147
|
config.telemetry = raw.telemetry;
|
|
1100
1148
|
}
|
|
1149
|
+
}
|
|
1150
|
+
function normalizeConfigInternal(raw) {
|
|
1151
|
+
const config = {};
|
|
1152
|
+
const diagnostics = [];
|
|
1153
|
+
if (raw.name) config.name = String(raw.name);
|
|
1154
|
+
if (raw.description) config.description = String(raw.description);
|
|
1155
|
+
normalizeAgentConfigSection(raw, config, diagnostics);
|
|
1156
|
+
if (Array.isArray(raw.startup)) {
|
|
1157
|
+
config.startup = raw.startup;
|
|
1158
|
+
}
|
|
1159
|
+
assertNoLegacyTopLevelKeys(raw);
|
|
1160
|
+
normalizeConsumptionSection(raw, config);
|
|
1161
|
+
normalizeStructuralSections(raw, config, diagnostics);
|
|
1162
|
+
normalizeDependencySection(raw, config);
|
|
1101
1163
|
return { config, diagnostics };
|
|
1102
1164
|
}
|
|
1103
1165
|
function decodeSkaileYaml(text) {
|
|
@@ -1293,30 +1355,33 @@ function mcpDeclFromCatalogEntry(entry) {
|
|
|
1293
1355
|
}
|
|
1294
1356
|
if (entry.description) decl.description = entry.description;
|
|
1295
1357
|
if (m.recipe && typeof m.recipe === "object" && !Array.isArray(m.recipe)) {
|
|
1296
|
-
const
|
|
1297
|
-
|
|
1298
|
-
const rawAttr = typeof r.attr === "string" ? r.attr : void 0;
|
|
1299
|
-
const effectiveAttr = rawAttr ?? (hasFlake ? DEFAULT_RECIPE_ATTR : void 0);
|
|
1300
|
-
if (effectiveAttr !== void 0) {
|
|
1301
|
-
try {
|
|
1302
|
-
validateAssetRecipeAttr(effectiveAttr);
|
|
1303
|
-
if (hasFlake) {
|
|
1304
|
-
validateAssetRecipeFlake(r.flake);
|
|
1305
|
-
decl.recipe = { attr: effectiveAttr, flake: r.flake };
|
|
1306
|
-
if (typeof r.publisher === "string") decl.recipe.publisher = r.publisher;
|
|
1307
|
-
} else {
|
|
1308
|
-
decl.recipe = { attr: effectiveAttr };
|
|
1309
|
-
}
|
|
1310
|
-
} catch (err) {
|
|
1311
|
-
console.warn(
|
|
1312
|
-
`[workspace-config] mcpDeclFromCatalogEntry: invalid recipe for entry "${entry.name}": ${err instanceof Error ? err.message : String(err)}`
|
|
1313
|
-
);
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1358
|
+
const recipe = parseCatalogRecipe(m.recipe, entry.name);
|
|
1359
|
+
if (recipe) decl.recipe = recipe;
|
|
1316
1360
|
}
|
|
1317
1361
|
if (!decl.command && !decl.url) return null;
|
|
1318
1362
|
return decl;
|
|
1319
1363
|
}
|
|
1364
|
+
function parseCatalogRecipe(r, entryName) {
|
|
1365
|
+
const hasFlake = typeof r.flake === "string";
|
|
1366
|
+
const rawAttr = typeof r.attr === "string" ? r.attr : void 0;
|
|
1367
|
+
const effectiveAttr = rawAttr ?? (hasFlake ? DEFAULT_RECIPE_ATTR : void 0);
|
|
1368
|
+
if (effectiveAttr === void 0) return null;
|
|
1369
|
+
try {
|
|
1370
|
+
validateAssetRecipeAttr(effectiveAttr);
|
|
1371
|
+
if (hasFlake) {
|
|
1372
|
+
validateAssetRecipeFlake(r.flake);
|
|
1373
|
+
const recipe = { attr: effectiveAttr, flake: r.flake };
|
|
1374
|
+
if (typeof r.publisher === "string") recipe.publisher = r.publisher;
|
|
1375
|
+
return recipe;
|
|
1376
|
+
}
|
|
1377
|
+
return { attr: effectiveAttr };
|
|
1378
|
+
} catch (err) {
|
|
1379
|
+
console.warn(
|
|
1380
|
+
`[workspace-config] mcpDeclFromCatalogEntry: invalid recipe for entry "${entryName}": ${err instanceof Error ? err.message : String(err)}`
|
|
1381
|
+
);
|
|
1382
|
+
return null;
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1320
1385
|
function mergeMcpDeclarations(base, overlay) {
|
|
1321
1386
|
return {
|
|
1322
1387
|
id: overlay.id,
|
|
@@ -1332,6 +1397,28 @@ function mergeMcpDeclarations(base, overlay) {
|
|
|
1332
1397
|
};
|
|
1333
1398
|
}
|
|
1334
1399
|
var unscopedTail = (x) => x.includes("/") ? x.split("/").pop() : x;
|
|
1400
|
+
function foldInstanceEnv(decl, instancePath, name) {
|
|
1401
|
+
if (!existsSync(instancePath)) return;
|
|
1402
|
+
try {
|
|
1403
|
+
const instance = JSON.parse(readFileSync(instancePath, "utf8"));
|
|
1404
|
+
const env = { ...decl.env ?? {} };
|
|
1405
|
+
if (instance.config && typeof instance.config === "object") {
|
|
1406
|
+
for (const [k, v] of Object.entries(instance.config)) {
|
|
1407
|
+
if (typeof v === "string") env[k] = v;
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
if (instance.resolvedSecrets && typeof instance.resolvedSecrets === "object") {
|
|
1411
|
+
for (const [k, v] of Object.entries(instance.resolvedSecrets)) {
|
|
1412
|
+
if (typeof v === "string") env[k] = v;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
if (Object.keys(env).length > 0) decl.env = env;
|
|
1416
|
+
} catch (err) {
|
|
1417
|
+
console.warn(
|
|
1418
|
+
`[workspace-config] loadMaterializedMcpDeclarations: ignoring malformed ".instance.json" for "${name}": ${err instanceof Error ? err.message : String(err)}`
|
|
1419
|
+
);
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1335
1422
|
function loadMaterializedMcpDeclarations(projectDir) {
|
|
1336
1423
|
const dir = join(projectDir, ".skaile/assets/mcp-server");
|
|
1337
1424
|
if (!existsSync(dir)) return [];
|
|
@@ -1351,28 +1438,7 @@ function loadMaterializedMcpDeclarations(projectDir) {
|
|
|
1351
1438
|
const decl = mcpDeclFromCatalogEntry(entry);
|
|
1352
1439
|
if (!decl) continue;
|
|
1353
1440
|
decl.id = entry.name || name;
|
|
1354
|
-
|
|
1355
|
-
if (existsSync(instancePath)) {
|
|
1356
|
-
try {
|
|
1357
|
-
const instance = JSON.parse(readFileSync(instancePath, "utf8"));
|
|
1358
|
-
const env = { ...decl.env ?? {} };
|
|
1359
|
-
if (instance.config && typeof instance.config === "object") {
|
|
1360
|
-
for (const [k, v] of Object.entries(instance.config)) {
|
|
1361
|
-
if (typeof v === "string") env[k] = v;
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
if (instance.resolvedSecrets && typeof instance.resolvedSecrets === "object") {
|
|
1365
|
-
for (const [k, v] of Object.entries(instance.resolvedSecrets)) {
|
|
1366
|
-
if (typeof v === "string") env[k] = v;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
if (Object.keys(env).length > 0) decl.env = env;
|
|
1370
|
-
} catch (err) {
|
|
1371
|
-
console.warn(
|
|
1372
|
-
`[workspace-config] loadMaterializedMcpDeclarations: ignoring malformed ".instance.json" for "${name}": ${err instanceof Error ? err.message : String(err)}`
|
|
1373
|
-
);
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1441
|
+
foldInstanceEnv(decl, join(subDir, ".instance.json"), name);
|
|
1376
1442
|
result.push(decl);
|
|
1377
1443
|
} catch (err) {
|
|
1378
1444
|
console.warn(
|
|
@@ -1450,31 +1516,49 @@ function catalogEntryFromCandidate(c) {
|
|
|
1450
1516
|
if (c.homepage != null) entry.homepage = c.homepage;
|
|
1451
1517
|
return entry;
|
|
1452
1518
|
}
|
|
1453
|
-
function
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1519
|
+
function lookupMcpCandidate(provenanceIndex, ref) {
|
|
1520
|
+
let candidates;
|
|
1521
|
+
if (ref.publisher) {
|
|
1522
|
+
candidates = provenanceIndex.get(`${ref.publisher}/${ref.kind}:${ref.name}`);
|
|
1523
|
+
}
|
|
1524
|
+
if (!candidates) {
|
|
1525
|
+
for (const [key, arr] of provenanceIndex) {
|
|
1526
|
+
if (key.endsWith(`/${ref.kind}:${ref.name}`)) {
|
|
1527
|
+
candidates = arr;
|
|
1528
|
+
break;
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
return candidates?.[0];
|
|
1533
|
+
}
|
|
1534
|
+
function buildDeclaredMcpNames(explicit, mcpRefStrings) {
|
|
1535
|
+
return /* @__PURE__ */ new Set([
|
|
1536
|
+
...explicit.flatMap((e) => [e.id, unscopedTail(e.id)]),
|
|
1537
|
+
...mcpRefStrings.flatMap((refStr) => {
|
|
1538
|
+
try {
|
|
1539
|
+
const r = parseAssetRef(refStr);
|
|
1540
|
+
return [r.name, unscopedTail(r.name)];
|
|
1541
|
+
} catch {
|
|
1542
|
+
return [];
|
|
1543
|
+
}
|
|
1544
|
+
})
|
|
1545
|
+
]);
|
|
1546
|
+
}
|
|
1547
|
+
function collectMcpRefStrings(dependencies) {
|
|
1457
1548
|
const mcpRefStrings = [];
|
|
1458
|
-
for (const dep of
|
|
1549
|
+
for (const dep of dependencies ?? []) {
|
|
1459
1550
|
try {
|
|
1460
1551
|
const ref = parseAssetRef(dep);
|
|
1461
1552
|
if (ref.kind === "mcp-server") mcpRefStrings.push(dep);
|
|
1462
1553
|
} catch {
|
|
1463
1554
|
}
|
|
1464
1555
|
}
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
if (existing) {
|
|
1472
|
-
byId.set(decl.id, mergeMcpDeclarations(existing, decl));
|
|
1473
|
-
} else {
|
|
1474
|
-
byId.set(decl.id, decl);
|
|
1475
|
-
order.push(decl.id);
|
|
1476
|
-
}
|
|
1477
|
-
};
|
|
1556
|
+
return mcpRefStrings;
|
|
1557
|
+
}
|
|
1558
|
+
function buildMcpProvenanceIndex(sources, projectDir) {
|
|
1559
|
+
return sources.length > 0 ? buildProvenanceIndex(buildSourceClones(sources)) : /* @__PURE__ */ new Map();
|
|
1560
|
+
}
|
|
1561
|
+
function upsertCatalogMcpDecls(mcpRefStrings, provenanceIndex, upsert) {
|
|
1478
1562
|
const seen = /* @__PURE__ */ new Set();
|
|
1479
1563
|
for (const refStr of mcpRefStrings) {
|
|
1480
1564
|
let ref;
|
|
@@ -1485,37 +1569,16 @@ function loadMcpServerDeclarations(projectDir) {
|
|
|
1485
1569
|
}
|
|
1486
1570
|
if (seen.has(ref.name)) continue;
|
|
1487
1571
|
seen.add(ref.name);
|
|
1488
|
-
|
|
1489
|
-
if (ref.publisher) {
|
|
1490
|
-
candidates = provenanceIndex.get(`${ref.publisher}/${ref.kind}:${ref.name}`);
|
|
1491
|
-
}
|
|
1492
|
-
if (!candidates) {
|
|
1493
|
-
for (const [key, arr] of provenanceIndex) {
|
|
1494
|
-
if (key.endsWith(`/${ref.kind}:${ref.name}`)) {
|
|
1495
|
-
candidates = arr;
|
|
1496
|
-
break;
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
const candidate = candidates?.[0];
|
|
1572
|
+
const candidate = lookupMcpCandidate(provenanceIndex, ref);
|
|
1501
1573
|
if (!candidate) continue;
|
|
1502
1574
|
const catalogDecl = mcpDeclFromCatalogEntry(catalogEntryFromCandidate(candidate));
|
|
1503
1575
|
if (!catalogDecl) continue;
|
|
1504
1576
|
upsert(catalogDecl);
|
|
1505
1577
|
}
|
|
1506
|
-
|
|
1578
|
+
}
|
|
1579
|
+
function upsertMaterializedMcpDecls(materialized, explicit, mcpRefStrings, strictYaml, upsert) {
|
|
1507
1580
|
if (strictYaml) {
|
|
1508
|
-
const declaredNames =
|
|
1509
|
-
...explicit.flatMap((e) => [e.id, unscopedTail(e.id)]),
|
|
1510
|
-
...mcpRefStrings.flatMap((refStr) => {
|
|
1511
|
-
try {
|
|
1512
|
-
const r = parseAssetRef(refStr);
|
|
1513
|
-
return [r.name, unscopedTail(r.name)];
|
|
1514
|
-
} catch {
|
|
1515
|
-
return [];
|
|
1516
|
-
}
|
|
1517
|
-
})
|
|
1518
|
-
]);
|
|
1581
|
+
const declaredNames = buildDeclaredMcpNames(explicit, mcpRefStrings);
|
|
1519
1582
|
for (const decl of materialized) {
|
|
1520
1583
|
if (declaredNames.has(decl.id) || declaredNames.has(unscopedTail(decl.id))) upsert(decl);
|
|
1521
1584
|
}
|
|
@@ -1524,6 +1587,27 @@ function loadMcpServerDeclarations(projectDir) {
|
|
|
1524
1587
|
upsert(decl);
|
|
1525
1588
|
}
|
|
1526
1589
|
}
|
|
1590
|
+
}
|
|
1591
|
+
function loadMcpServerDeclarations(projectDir) {
|
|
1592
|
+
const config = resolveSkWorkspaceConfig(projectDir);
|
|
1593
|
+
const explicit = config.mcp_servers ?? [];
|
|
1594
|
+
const materialized = loadMaterializedMcpDeclarations(projectDir);
|
|
1595
|
+
const mcpRefStrings = collectMcpRefStrings(config.dependencies);
|
|
1596
|
+
const provenanceIndex = buildMcpProvenanceIndex(config.sources ?? []);
|
|
1597
|
+
const byId = /* @__PURE__ */ new Map();
|
|
1598
|
+
const order = [];
|
|
1599
|
+
const upsert = (decl) => {
|
|
1600
|
+
const existing = byId.get(decl.id);
|
|
1601
|
+
if (existing) {
|
|
1602
|
+
byId.set(decl.id, mergeMcpDeclarations(existing, decl));
|
|
1603
|
+
} else {
|
|
1604
|
+
byId.set(decl.id, decl);
|
|
1605
|
+
order.push(decl.id);
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
upsertCatalogMcpDecls(mcpRefStrings, provenanceIndex, upsert);
|
|
1609
|
+
const strictYaml = process.env.SKAILE_STRICT_YAML === "true";
|
|
1610
|
+
upsertMaterializedMcpDecls(materialized, explicit, mcpRefStrings, strictYaml, upsert);
|
|
1527
1611
|
for (const decl of explicit) {
|
|
1528
1612
|
upsert(decl);
|
|
1529
1613
|
}
|
|
@@ -1557,5 +1641,5 @@ function resolveAgentDir(projectDir) {
|
|
|
1557
1641
|
}
|
|
1558
1642
|
|
|
1559
1643
|
export { COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SKAILE_YAML_DEFAULT, SKAILE_YAML_SUFFIX, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, decodeSkaileYaml, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, isWorkspaceConfigFilename, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, mergeSkWorkspaceConfigs, normalizeConfig, pullRepo, readLinks, resolveAgentDir, resolveAll, resolveAsset, resolveSkWorkspaceConfig, saveSkWorkspaceConfig, scanRepo, stageMaterializedSkills, unlinkRepo, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, workspaceNameFromFilename, writeLinks };
|
|
1560
|
-
//# sourceMappingURL=chunk-
|
|
1561
|
-
//# sourceMappingURL=chunk-
|
|
1644
|
+
//# sourceMappingURL=chunk-DKAV43NI.js.map
|
|
1645
|
+
//# sourceMappingURL=chunk-DKAV43NI.js.map
|