@skaile/workspaces 5.4.0 → 5.6.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 +98 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-3MVRNS5U.js → asset-feeds-4O2JK5S4.js} +27 -14
- package/dist/asset-feeds-4O2JK5S4.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +9 -9
- package/dist/asset-manager/index.js +18 -18
- package/dist/asset-manager/installer.js +11 -11
- package/dist/asset-manager/renderers.js +20 -2
- package/dist/asset-manager/src/index.d.ts +75 -24
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install-agent.d.ts +22 -14
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/install-instances.d.ts +55 -0
- package/dist/asset-manager/src/install-instances.d.ts.map +1 -0
- package/dist/asset-manager/src/installer.d.ts +30 -7
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/renderers.d.ts +29 -8
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +14 -14
- package/dist/bridge/drivers/codex.js +20 -14
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +11 -11
- package/dist/bridge/drivers/echo.js +3 -3
- package/dist/bridge/drivers/gemini.js +6 -6
- package/dist/bridge/drivers/goose.js +11 -11
- package/dist/bridge/drivers/omp.js +4 -4
- package/dist/bridge/drivers/opencode.js +11 -11
- package/dist/bridge/drivers/qwen.js +6 -6
- package/dist/bridge/index.js +15 -15
- package/dist/bridge/src/codex/native-policy.d.ts +1 -1
- package/dist/bridge/src/drivers/codex.d.ts +2 -1
- package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
- package/dist/{chunk-LUBS5DXY.js → chunk-27HS2DHB.js} +4 -4
- package/dist/{chunk-LUBS5DXY.js.map → chunk-27HS2DHB.js.map} +1 -1
- package/dist/{chunk-RD6GE4HU.js → chunk-2GRB5ITE.js} +4 -4
- package/dist/{chunk-RD6GE4HU.js.map → chunk-2GRB5ITE.js.map} +1 -1
- package/dist/{chunk-UKDFOOEG.js → chunk-2NYXQYHN.js} +4 -4
- package/dist/{chunk-UKDFOOEG.js.map → chunk-2NYXQYHN.js.map} +1 -1
- package/dist/{chunk-6IGFSUTE.js → chunk-2W4LBLIN.js} +388 -61
- package/dist/chunk-2W4LBLIN.js.map +1 -0
- package/dist/{chunk-OXE5A6H6.js → chunk-2XFUXGV6.js} +3 -3
- package/dist/{chunk-OXE5A6H6.js.map → chunk-2XFUXGV6.js.map} +1 -1
- package/dist/{chunk-ZDKJHQY2.js → chunk-3TXEJN4W.js} +2 -2
- package/dist/{chunk-ZDKJHQY2.js.map → chunk-3TXEJN4W.js.map} +1 -1
- package/dist/{chunk-QK756IRJ.js → chunk-436GRQC2.js} +15 -15
- package/dist/chunk-436GRQC2.js.map +1 -0
- package/dist/{chunk-JELTQ4H7.js → chunk-45VFGT7A.js} +3 -3
- package/dist/{chunk-JELTQ4H7.js.map → chunk-45VFGT7A.js.map} +1 -1
- package/dist/{chunk-XGIS325V.js → chunk-46OVMT76.js} +3 -3
- package/dist/{chunk-XGIS325V.js.map → chunk-46OVMT76.js.map} +1 -1
- package/dist/{chunk-37GBJLF5.js → chunk-47ZD34KB.js} +3 -3
- package/dist/{chunk-37GBJLF5.js.map → chunk-47ZD34KB.js.map} +1 -1
- package/dist/{chunk-BATL2CWI.js → chunk-4CTGEEN6.js} +297 -124
- package/dist/chunk-4CTGEEN6.js.map +1 -0
- package/dist/{chunk-DTV7HL5R.js → chunk-4GNJELPH.js} +2 -2
- package/dist/{chunk-DTV7HL5R.js.map → chunk-4GNJELPH.js.map} +1 -1
- package/dist/{chunk-AE42DHSH.js → chunk-5B5IZVEP.js} +2 -2
- package/dist/{chunk-AE42DHSH.js.map → chunk-5B5IZVEP.js.map} +1 -1
- package/dist/{chunk-BHUHGLNS.js → chunk-6NPINANG.js} +6 -6
- package/dist/{chunk-BHUHGLNS.js.map → chunk-6NPINANG.js.map} +1 -1
- package/dist/{chunk-SQBPE66C.js → chunk-7KLC4LZO.js} +8 -8
- package/dist/{chunk-SQBPE66C.js.map → chunk-7KLC4LZO.js.map} +1 -1
- package/dist/{chunk-SR4RFKHM.js → chunk-7ZHLYXTI.js} +3 -3
- package/dist/{chunk-SR4RFKHM.js.map → chunk-7ZHLYXTI.js.map} +1 -1
- package/dist/{chunk-WX74MVNA.js → chunk-AO7VJ6G6.js} +3 -24
- package/dist/chunk-AO7VJ6G6.js.map +1 -0
- package/dist/{chunk-UAAAERXI.js → chunk-AOAZCSDI.js} +4 -3
- package/dist/chunk-AOAZCSDI.js.map +1 -0
- package/dist/{chunk-JCATNLY3.js → chunk-BF33SCLY.js} +10 -5
- package/dist/chunk-BF33SCLY.js.map +1 -0
- package/dist/{chunk-VKSA2CDJ.js → chunk-BTISGSK4.js} +4 -4
- package/dist/{chunk-VKSA2CDJ.js.map → chunk-BTISGSK4.js.map} +1 -1
- package/dist/{chunk-TOSHZX4C.js → chunk-CPSIPIX7.js} +2 -2
- package/dist/chunk-CPSIPIX7.js.map +1 -0
- package/dist/{chunk-K2K7OF4P.js → chunk-DMLDYFDS.js} +23 -6
- package/dist/chunk-DMLDYFDS.js.map +1 -0
- package/dist/{chunk-A67BHJCH.js → chunk-DZM73WDN.js} +4 -4
- package/dist/{chunk-A67BHJCH.js.map → chunk-DZM73WDN.js.map} +1 -1
- package/dist/{chunk-QMWMSZQ4.js → chunk-FK6HPLQA.js} +3 -3
- package/dist/{chunk-QMWMSZQ4.js.map → chunk-FK6HPLQA.js.map} +1 -1
- package/dist/chunk-FRHE7FFB.js +655 -0
- package/dist/chunk-FRHE7FFB.js.map +1 -0
- package/dist/{chunk-37DN45RR.js → chunk-IPWR33AW.js} +181 -111
- package/dist/chunk-IPWR33AW.js.map +1 -0
- package/dist/{chunk-2XXAVTTO.js → chunk-KUFNKVBM.js} +3 -3
- package/dist/{chunk-2XXAVTTO.js.map → chunk-KUFNKVBM.js.map} +1 -1
- package/dist/{chunk-GCYD4EGY.js → chunk-KYXOGHY6.js} +4 -4
- package/dist/{chunk-GCYD4EGY.js.map → chunk-KYXOGHY6.js.map} +1 -1
- package/dist/{chunk-ZIYYMR6Y.js → chunk-LLKKLKZJ.js} +3 -3
- package/dist/{chunk-ZIYYMR6Y.js.map → chunk-LLKKLKZJ.js.map} +1 -1
- package/dist/{chunk-Y5OCUOXF.js → chunk-MX3UQXLU.js} +52 -35
- package/dist/chunk-MX3UQXLU.js.map +1 -0
- package/dist/{chunk-7KITVWXK.js → chunk-MX6LZE2C.js} +44 -13
- package/dist/chunk-MX6LZE2C.js.map +1 -0
- package/dist/{chunk-BNUZEYC3.js → chunk-NARITJS2.js} +3 -3
- package/dist/{chunk-BNUZEYC3.js.map → chunk-NARITJS2.js.map} +1 -1
- package/dist/{chunk-OANSNVCP.js → chunk-NLXIALVO.js} +5 -5
- package/dist/{chunk-OANSNVCP.js.map → chunk-NLXIALVO.js.map} +1 -1
- package/dist/{chunk-U6ORGQHZ.js → chunk-O5GDKC5I.js} +3 -3
- package/dist/{chunk-U6ORGQHZ.js.map → chunk-O5GDKC5I.js.map} +1 -1
- package/dist/{chunk-ZUZ5LLZ2.js → chunk-OGLDAJFL.js} +4 -4
- package/dist/{chunk-ZUZ5LLZ2.js.map → chunk-OGLDAJFL.js.map} +1 -1
- package/dist/chunk-OLLAQLFJ.js +17 -0
- package/dist/chunk-OLLAQLFJ.js.map +1 -0
- package/dist/{chunk-LFMX2UEF.js → chunk-PA7WLID3.js} +86 -69
- package/dist/chunk-PA7WLID3.js.map +1 -0
- package/dist/{chunk-UNRZCQD4.js → chunk-PJS2YWGG.js} +6 -6
- package/dist/{chunk-UNRZCQD4.js.map → chunk-PJS2YWGG.js.map} +1 -1
- package/dist/{chunk-VETH6MDG.js → chunk-RGXVQZOV.js} +6021 -3099
- package/dist/chunk-RGXVQZOV.js.map +1 -0
- package/dist/{chunk-JEA32KB6.js → chunk-S7QXEXKY.js} +19 -6
- package/dist/chunk-S7QXEXKY.js.map +1 -0
- package/dist/{chunk-JKWU6ULI.js → chunk-SDFROXSA.js} +3 -3
- package/dist/{chunk-JKWU6ULI.js.map → chunk-SDFROXSA.js.map} +1 -1
- package/dist/{chunk-XMQAV6T3.js → chunk-SX4UIDKT.js} +3 -3
- package/dist/{chunk-XMQAV6T3.js.map → chunk-SX4UIDKT.js.map} +1 -1
- package/dist/{chunk-QEXEHXX5.js → chunk-TZCQ7ZWQ.js} +83 -9
- package/dist/chunk-TZCQ7ZWQ.js.map +1 -0
- package/dist/{chunk-ONWTPXVU.js → chunk-UAP2XHRF.js} +10 -10
- package/dist/{chunk-ONWTPXVU.js.map → chunk-UAP2XHRF.js.map} +1 -1
- package/dist/{chunk-JF26V3BC.js → chunk-V7NN3HXR.js} +7 -12
- package/dist/chunk-V7NN3HXR.js.map +1 -0
- package/dist/{chunk-LAI7X6I2.js → chunk-VBBBZDI7.js} +3 -3
- package/dist/{chunk-LAI7X6I2.js.map → chunk-VBBBZDI7.js.map} +1 -1
- package/dist/{chunk-TNWXGHLD.js → chunk-VKSXST23.js} +51 -42
- package/dist/chunk-VKSXST23.js.map +1 -0
- package/dist/{chunk-HTKZ4AOW.js → chunk-VSQFGU5D.js} +3 -3
- package/dist/{chunk-HTKZ4AOW.js.map → chunk-VSQFGU5D.js.map} +1 -1
- package/dist/{chunk-IDUGP4V7.js → chunk-VX3INFBA.js} +4 -4
- package/dist/{chunk-IDUGP4V7.js.map → chunk-VX3INFBA.js.map} +1 -1
- package/dist/{chunk-Y7UBRRKG.js → chunk-XOGG7VDZ.js} +40 -31
- package/dist/chunk-XOGG7VDZ.js.map +1 -0
- package/dist/{chunk-JAJG4G5E.js → chunk-ZBBM6O6P.js} +3 -3
- package/dist/{chunk-JAJG4G5E.js.map → chunk-ZBBM6O6P.js.map} +1 -1
- package/dist/cli/index.js +5031 -3384
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +7 -7
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/connector.d.ts +2 -2
- package/dist/cli/src/commands/connector.d.ts.map +1 -1
- package/dist/cli/src/commands/diff.d.ts.map +1 -1
- package/dist/cli/src/commands/history.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/migrate-agents.d.ts +131 -0
- package/dist/cli/src/commands/migrate-agents.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate-assets.d.ts +54 -0
- package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate-files.d.ts +52 -0
- package/dist/cli/src/commands/migrate-files.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate-providers.d.ts +5 -8
- package/dist/cli/src/commands/migrate-providers.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate.d.ts +21 -0
- package/dist/cli/src/commands/migrate.d.ts.map +1 -0
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/patch.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 +13 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/rebuild.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/show.d.ts.map +1 -1
- package/dist/cli/src/commands/tree.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate-instances.d.ts +17 -0
- package/dist/cli/src/commands/validate-instances.d.ts.map +1 -0
- package/dist/cli/src/commands/validate.d.ts +14 -0
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/commands/why.d.ts.map +1 -1
- package/dist/cli/src/helpers.d.ts +10 -0
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/cli/src/open-registry.d.ts +13 -16
- package/dist/cli/src/open-registry.d.ts.map +1 -1
- package/dist/cli/src/type-guards.d.ts +3 -0
- package/dist/cli/src/type-guards.d.ts.map +1 -0
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +19 -19
- package/dist/{connectors-OB3OAZTK.js → connectors-HWENZFKW.js} +22 -22
- package/dist/{connectors-OB3OAZTK.js.map → connectors-HWENZFKW.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/driver-targets.js +1 -1
- package/dist/core/index.js +8 -8
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +6 -6
- package/dist/core/src/agent-instances.d.ts +93 -0
- package/dist/core/src/agent-instances.d.ts.map +1 -0
- package/dist/core/src/agent-prompt-sections.d.ts +90 -0
- package/dist/core/src/agent-prompt-sections.d.ts.map +1 -0
- package/dist/core/src/driver-targets.d.ts +4 -2
- package/dist/core/src/driver-targets.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +12 -8
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +71 -27
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +6 -92
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +54 -3
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/type-guards.d.ts +3 -0
- package/dist/core/src/type-guards.d.ts.map +1 -0
- package/dist/core/src/walker.d.ts +7 -3
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +19 -15
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +5 -5
- package/dist/deploy/index.js +8 -8
- package/dist/discovery/index.js +6 -6
- package/dist/discovery/src/builtin-providers.d.ts +5 -4
- package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
- package/dist/discovery/src/default-registry.d.ts +23 -0
- package/dist/discovery/src/default-registry.d.ts.map +1 -0
- package/dist/discovery/src/discover.d.ts +0 -6
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/index.d.ts +2 -1
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-Z3KKLEM6.js → ensure-sources-VCPKNPK2.js} +21 -21
- package/dist/{ensure-sources-Z3KKLEM6.js.map → ensure-sources-VCPKNPK2.js.map} +1 -1
- package/dist/factory-assets/README.md +3 -3
- package/dist/factory-assets/connectors/box.js +19 -19
- package/dist/factory-assets/connectors/deploy.js +19 -19
- package/dist/factory-assets/connectors/devserver.js +19 -19
- package/dist/factory-assets/connectors/flow/adapter.js +19 -19
- package/dist/factory-assets/connectors/flow/engine/flow-kind-provider.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +9 -9
- package/dist/factory-assets/connectors/flow/run-flow.js +21 -21
- package/dist/factory-assets/connectors/flow.js +19 -19
- package/dist/factory-assets/connectors/git.js +19 -19
- package/dist/factory-assets/connectors/gmail.js +19 -19
- package/dist/factory-assets/connectors/googledrive.js +19 -19
- package/dist/factory-assets/connectors/local.js +19 -19
- package/dist/factory-assets/connectors/mattermost.js +19 -19
- package/dist/factory-assets/connectors/memory.js +19 -19
- package/dist/factory-assets/connectors/minio.js +19 -19
- package/dist/factory-assets/connectors/postgres.js +19 -19
- package/dist/factory-assets/connectors/s3.js +19 -19
- package/dist/factory-assets/connectors/sharepoint.js +19 -19
- package/dist/factory-assets/connectors/sqlite.js +19 -19
- package/dist/factory-assets/connectors/static-server.js +19 -19
- package/dist/factory-assets/connectors/tunnel.js +19 -19
- package/dist/factory-assets/connectors/webdav.js +19 -19
- package/dist/factory-assets/connectors/xstate-store.js +19 -19
- package/dist/factory-assets/connectors/xstate.js +19 -19
- package/dist/factory-assets/index.js.map +1 -1
- package/dist/factory-assets/presets/workspaces-authoring/workspaces-authoring.preset.yaml +9 -0
- package/dist/factory-assets/skaile.manifest.yaml +2 -2
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +16 -12
- package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +8 -8
- package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +13 -11
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
- package/dist/{flows-DTADYIXH.js → flows-ENQY2DV7.js} +13 -13
- package/dist/{flows-DTADYIXH.js.map → flows-ENQY2DV7.js.map} +1 -1
- package/dist/helpers-IW36CEJX.js +34 -0
- package/dist/{helpers-F2RFRT5D.js.map → helpers-IW36CEJX.js.map} +1 -1
- package/dist/library/index.js +13 -13
- package/dist/library/install.js +3 -3
- package/dist/library/src/index.d.ts +2 -2
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/library.d.ts +2 -12
- package/dist/library/src/library.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +2 -2
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts +4 -1
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +11 -2
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
- package/dist/{library-publish-62RFU74A.js → library-publish-R3DQLMTD.js} +27 -27
- package/dist/{library-publish-62RFU74A.js.map → library-publish-R3DQLMTD.js.map} +1 -1
- package/dist/open-library-FAJZRDKE.js +40 -0
- package/dist/{open-library-NVG3CZUO.js.map → open-library-FAJZRDKE.js.map} +1 -1
- package/dist/open-registry-NVPCQPND.js +32 -0
- package/dist/{open-registry-IYH6W6CN.js.map → open-registry-NVPCQPND.js.map} +1 -1
- package/dist/paths-YUCP7K6U.js +22 -0
- package/dist/{paths-STQO4FYF.js.map → paths-YUCP7K6U.js.map} +1 -1
- package/dist/{plugin-store-2DTEIJTG.js → plugin-store-66QFBNEO.js} +10 -10
- package/dist/{plugin-store-2DTEIJTG.js.map → plugin-store-66QFBNEO.js.map} +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/src/asset-kind-provider.d.ts +14 -2
- package/dist/plugins/src/asset-kind-provider.d.ts.map +1 -1
- package/dist/plugins/src/catalog-source.d.ts +7 -0
- package/dist/plugins/src/catalog-source.d.ts.map +1 -1
- package/dist/plugins/src/index.d.ts +1 -1
- package/dist/plugins/src/index.d.ts.map +1 -1
- package/dist/project-ALJIVFHI.js +41 -0
- package/dist/{project-44LM6SRV.js.map → project-ALJIVFHI.js.map} +1 -1
- package/dist/resolver/index.js +9 -9
- package/dist/runner/index.js +34 -29
- package/dist/runner/src/agent-capabilities.d.ts +101 -0
- package/dist/runner/src/agent-capabilities.d.ts.map +1 -0
- package/dist/runner/src/agent.d.ts.map +1 -1
- package/dist/runner/src/agents/in-process-host.d.ts +56 -0
- package/dist/runner/src/agents/in-process-host.d.ts.map +1 -0
- package/dist/runner/src/agents/instances.d.ts +62 -0
- package/dist/runner/src/agents/instances.d.ts.map +1 -0
- package/dist/runner/src/agents/json-schema.d.ts +16 -0
- package/dist/runner/src/agents/json-schema.d.ts.map +1 -0
- package/dist/runner/src/agents/memory-run-store.d.ts +19 -0
- package/dist/runner/src/agents/memory-run-store.d.ts.map +1 -0
- package/dist/runner/src/agents/run-controller.d.ts +208 -0
- package/dist/runner/src/agents/run-controller.d.ts.map +1 -0
- package/dist/runner/src/agents/standalone-surface.d.ts +30 -0
- package/dist/runner/src/agents/standalone-surface.d.ts.map +1 -0
- package/dist/runner/src/capability-registry.d.ts.map +1 -1
- package/dist/runner/src/composition/bootstrap.d.ts +13 -51
- package/dist/runner/src/composition/bootstrap.d.ts.map +1 -1
- package/dist/runner/src/composition/compile.d.ts +43 -27
- package/dist/runner/src/composition/compile.d.ts.map +1 -1
- package/dist/runner/src/composition/content-source.d.ts +94 -0
- package/dist/runner/src/composition/content-source.d.ts.map +1 -0
- package/dist/runner/src/composition/dry-run.d.ts +34 -0
- package/dist/runner/src/composition/dry-run.d.ts.map +1 -0
- package/dist/runner/src/composition/errors.d.ts +41 -0
- package/dist/runner/src/composition/errors.d.ts.map +1 -0
- package/dist/runner/src/composition/index.d.ts +10 -3
- package/dist/runner/src/composition/index.d.ts.map +1 -1
- package/dist/runner/src/composition/prompt-sections.d.ts +31 -0
- package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -0
- package/dist/runner/src/composition/resolve-instance.d.ts +140 -0
- package/dist/runner/src/composition/resolve-instance.d.ts.map +1 -0
- package/dist/runner/src/composition/resolve.d.ts +43 -25
- package/dist/runner/src/composition/resolve.d.ts.map +1 -1
- package/dist/runner/src/composition/revision-hash.d.ts +58 -0
- package/dist/runner/src/composition/revision-hash.d.ts.map +1 -0
- package/dist/runner/src/composition/run-snapshot.d.ts +37 -0
- package/dist/runner/src/composition/run-snapshot.d.ts.map +1 -0
- package/dist/runner/src/composition/types.d.ts +79 -12
- package/dist/runner/src/composition/types.d.ts.map +1 -1
- package/dist/runner/src/index.d.ts +2 -0
- package/dist/runner/src/index.d.ts.map +1 -1
- package/dist/runner/src/manifest.d.ts +1 -1
- package/dist/runner/src/manifest.d.ts.map +1 -1
- package/dist/runner/src/mixin-resolver.d.ts +14 -15
- package/dist/runner/src/mixin-resolver.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +6 -0
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +35 -6
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +18 -18
- package/dist/sdk/bridge.js +15 -15
- package/dist/sdk/core.js +8 -8
- package/dist/sdk/flow.js +9 -9
- package/dist/sdk/index.js +34 -29
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +9 -9
- package/dist/sdk/runner.js +34 -29
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/secrets/index.js +2 -2
- package/dist/session/index.js +2 -2
- package/dist/{setup-4BV5ZWOZ.js → setup-35JXIA3N.js} +28 -28
- package/dist/{setup-4BV5ZWOZ.js.map → setup-35JXIA3N.js.map} +1 -1
- package/dist/skills-CS7NE5TT.js +26 -0
- package/dist/{skills-M7OU3WMP.js.map → skills-CS7NE5TT.js.map} +1 -1
- package/dist/source-ISR4KRZV.js +41 -0
- package/dist/{source-HTT6CXUP.js.map → source-ISR4KRZV.js.map} +1 -1
- package/dist/{source-manifest-publish-CPXUX3CL.js → source-manifest-publish-P22IPK5F.js} +27 -27
- package/dist/{source-manifest-publish-CPXUX3CL.js.map → source-manifest-publish-P22IPK5F.js.map} +1 -1
- package/dist/tui/index.js +34 -29
- package/dist/tui/index.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/agent-lifecycle.d.ts +402 -0
- package/dist/types/src/agent-lifecycle.d.ts.map +1 -0
- package/dist/types/src/capabilities.d.ts +0 -4
- package/dist/types/src/capabilities.d.ts.map +1 -1
- package/dist/types/src/delivery.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +66 -4
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/lifecycle.d.ts +21 -3
- package/dist/types/src/lifecycle.d.ts.map +1 -1
- package/dist/types/src/manifests/_shared.d.ts +1 -16
- package/dist/types/src/manifests/_shared.d.ts.map +1 -1
- package/dist/types/src/manifests/agent-composition.d.ts +44 -0
- package/dist/types/src/manifests/agent-composition.d.ts.map +1 -0
- package/dist/types/src/manifests/agent.d.ts +184 -6
- package/dist/types/src/manifests/agent.d.ts.map +1 -1
- package/dist/types/src/manifests/index.d.ts +6 -15
- package/dist/types/src/manifests/index.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +5 -5
- package/dist/types/src/version.d.ts +16 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +26 -26
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/asset-feeds-3MVRNS5U.js.map +0 -1
- package/dist/chunk-37DN45RR.js.map +0 -1
- package/dist/chunk-5CYEWBPB.js +0 -440
- package/dist/chunk-5CYEWBPB.js.map +0 -1
- package/dist/chunk-5NH3U6N5.js +0 -15
- package/dist/chunk-5NH3U6N5.js.map +0 -1
- package/dist/chunk-6IGFSUTE.js.map +0 -1
- package/dist/chunk-7KITVWXK.js.map +0 -1
- package/dist/chunk-BATL2CWI.js.map +0 -1
- package/dist/chunk-JCATNLY3.js.map +0 -1
- package/dist/chunk-JEA32KB6.js.map +0 -1
- package/dist/chunk-JF26V3BC.js.map +0 -1
- package/dist/chunk-K2K7OF4P.js.map +0 -1
- package/dist/chunk-LFMX2UEF.js.map +0 -1
- package/dist/chunk-QEXEHXX5.js.map +0 -1
- package/dist/chunk-QK756IRJ.js.map +0 -1
- package/dist/chunk-TNWXGHLD.js.map +0 -1
- package/dist/chunk-TOSHZX4C.js.map +0 -1
- package/dist/chunk-UAAAERXI.js.map +0 -1
- package/dist/chunk-VETH6MDG.js.map +0 -1
- package/dist/chunk-WX74MVNA.js.map +0 -1
- package/dist/chunk-Y5OCUOXF.js.map +0 -1
- package/dist/chunk-Y7UBRRKG.js.map +0 -1
- package/dist/factory-assets/bundles/workspaces-authoring/workspaces-authoring.bundle.yaml +0 -9
- package/dist/helpers-F2RFRT5D.js +0 -34
- package/dist/open-library-NVG3CZUO.js +0 -40
- package/dist/open-registry-IYH6W6CN.js +0 -32
- package/dist/paths-STQO4FYF.js +0 -22
- package/dist/project-44LM6SRV.js +0 -36
- package/dist/skills-M7OU3WMP.js +0 -26
- package/dist/source-HTT6CXUP.js +0 -41
- package/dist/types/src/manifests/mount.d.ts +0 -21
- package/dist/types/src/manifests/mount.d.ts.map +0 -1
|
@@ -1,22 +1,107 @@
|
|
|
1
|
-
import { getStoreManifestsDir } from './chunk-
|
|
2
|
-
import { readManifestSourceConfig, discoverAssetsInTree } from './chunk-
|
|
3
|
-
import { deployAll, removeAsset, canonicalEntryRef, createScaffold } from './chunk-
|
|
4
|
-
import { resolveConfiguredDriverTarget, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, verifyLock, mergeLockFile, extractForPatch, generatePatch, savePatch, applyPatch } from './chunk-QEXEHXX5.js';
|
|
5
|
-
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-JCATNLY3.js';
|
|
6
|
-
import { deployedBase, deployedDir, isDeployed } from './chunk-XGIS325V.js';
|
|
7
|
-
import { loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, resolveSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, coerceVersion, resolveAll, buildProvenanceIndex, ensureRepo, sourceShortName, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, readLinks, storeManifestSlug } from './chunk-6IGFSUTE.js';
|
|
8
|
-
import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-MFHKHXDE.js';
|
|
9
|
-
import { scanDirectory, parseRequires } from './chunk-LFMX2UEF.js';
|
|
10
|
-
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName } from './chunk-WX74MVNA.js';
|
|
1
|
+
import { getStoreManifestsDir } from './chunk-MX3UQXLU.js';
|
|
2
|
+
import { readManifestSourceConfig, discoverAssetsInTree } from './chunk-XOGG7VDZ.js';
|
|
3
|
+
import { installAgent, installTargetOf, deployAll, removeAsset, canonicalEntryRef, createScaffold } from './chunk-IPWR33AW.js';
|
|
11
4
|
import { appendHistory, getRecentHistory, clearHistory } from './chunk-KTBKW2FI.js';
|
|
12
5
|
import { commitChanges } from './chunk-UQ6LFBPZ.js';
|
|
6
|
+
import { driverTargetSupportsAgents, CODEX_IDENTITY_DIR } from './chunk-VKSXST23.js';
|
|
7
|
+
import { resolveConfiguredDriverTarget, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, verifyLock, mergeLockFile, extractForPatch, generatePatch, savePatch, applyPatch } from './chunk-TZCQ7ZWQ.js';
|
|
8
|
+
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-BF33SCLY.js';
|
|
9
|
+
import { deployedBase, deployedDir, isDeployed } from './chunk-46OVMT76.js';
|
|
10
|
+
import { resolveSkWorkspaceConfig, effectiveAgentInstances, resolveAgentDefinitionDir, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, coerceVersion, resolveAll, buildProvenanceIndex, ensureRepo, sourceShortName, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, readLinks, storeManifestSlug } from './chunk-2W4LBLIN.js';
|
|
11
|
+
import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-MFHKHXDE.js';
|
|
12
|
+
import { DRIVER_TARGETS } from './chunk-CPSIPIX7.js';
|
|
13
|
+
import { scanDirectory, parseRequires } from './chunk-PA7WLID3.js';
|
|
14
|
+
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName } from './chunk-AO7VJ6G6.js';
|
|
13
15
|
import { spawnSync } from 'child_process';
|
|
14
|
-
import { existsSync,
|
|
15
|
-
import path, { resolve,
|
|
16
|
+
import { existsSync, rmSync, readdirSync, lstatSync, unlinkSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
17
|
+
import path, { join, resolve, dirname, sep, posix } from 'path';
|
|
16
18
|
import { gt } from 'semver';
|
|
17
19
|
import { stringify, parse } from 'yaml';
|
|
18
20
|
import fs from 'fs/promises';
|
|
19
21
|
|
|
22
|
+
var ledgerPath = (projectDir) => join(projectDir, ".skaile", "agent-instances-managed.json");
|
|
23
|
+
function readLedger(projectDir) {
|
|
24
|
+
const p = ledgerPath(projectDir);
|
|
25
|
+
if (!existsSync(p)) return { version: 1, targets: {} };
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(readFileSync(p, "utf-8"));
|
|
28
|
+
return { version: 1, targets: parsed.targets ?? {} };
|
|
29
|
+
} catch {
|
|
30
|
+
return { version: 1, targets: {} };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function writeLedger(projectDir, ledger) {
|
|
34
|
+
const p = ledgerPath(projectDir);
|
|
35
|
+
mkdirSync(dirname(p), { recursive: true });
|
|
36
|
+
writeFileSync(p, `${JSON.stringify(ledger, null, 2)}
|
|
37
|
+
`, "utf-8");
|
|
38
|
+
}
|
|
39
|
+
function installAgentInstances(opts) {
|
|
40
|
+
const { projectDir, driverTarget, log } = opts;
|
|
41
|
+
const result = { instances: [], removed: [], warnings: [] };
|
|
42
|
+
if (!driverTargetSupportsAgents(driverTarget)) return result;
|
|
43
|
+
const wsConfig = opts.wsConfig ?? resolveSkWorkspaceConfig(projectDir);
|
|
44
|
+
const instances = effectiveAgentInstances(wsConfig);
|
|
45
|
+
const agentDeployDir = deployedBase("agent", driverTarget, false, projectDir);
|
|
46
|
+
const skillsRelDir = DRIVER_TARGETS[driverTarget]?.local.skill ?? "";
|
|
47
|
+
const ledger = readLedger(projectDir);
|
|
48
|
+
const previous = ledger.targets[driverTarget] ?? {};
|
|
49
|
+
const owned = {};
|
|
50
|
+
for (const [id, instance] of Object.entries(instances)) {
|
|
51
|
+
let srcDir;
|
|
52
|
+
try {
|
|
53
|
+
srcDir = resolveAgentDefinitionDir(projectDir, instance.ref);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
result.warnings.push(
|
|
56
|
+
`agent instance "${id}": ${err instanceof Error ? err.message : String(err)}`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
if (srcDir === void 0 || !existsSync(join(srcDir, "agent.yaml"))) {
|
|
60
|
+
if (srcDir !== void 0) {
|
|
61
|
+
result.warnings.push(
|
|
62
|
+
`agent instance "${id}": ${instance.ref} resolves to ${srcDir}, which has no agent.yaml`
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (previous[id]) owned[id] = previous[id];
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const rendered = installAgent(
|
|
69
|
+
srcDir,
|
|
70
|
+
agentDeployDir,
|
|
71
|
+
projectDir,
|
|
72
|
+
driverTarget,
|
|
73
|
+
skillsRelDir,
|
|
74
|
+
id,
|
|
75
|
+
/* includeSubAgents */
|
|
76
|
+
true,
|
|
77
|
+
/* @__PURE__ */ new Set(),
|
|
78
|
+
wsConfig,
|
|
79
|
+
log,
|
|
80
|
+
instance
|
|
81
|
+
);
|
|
82
|
+
result.warnings.push(...rendered.warnings);
|
|
83
|
+
const files = [...new Set(rendered.created)];
|
|
84
|
+
owned[id] = files;
|
|
85
|
+
result.instances.push({ id, files });
|
|
86
|
+
}
|
|
87
|
+
const claimed = new Set(Object.values(owned).flat());
|
|
88
|
+
const root = resolve(projectDir);
|
|
89
|
+
const removable = [resolve(agentDeployDir), resolve(dirname(agentDeployDir), CODEX_IDENTITY_DIR)];
|
|
90
|
+
for (const rel of Object.values(previous).flat()) {
|
|
91
|
+
if (claimed.has(rel)) continue;
|
|
92
|
+
const abs = resolve(root, rel);
|
|
93
|
+
if (!removable.some((dir) => abs.startsWith(dir + sep)) || !existsSync(abs)) continue;
|
|
94
|
+
rmSync(abs, { recursive: true, force: true });
|
|
95
|
+
result.removed.push(rel);
|
|
96
|
+
}
|
|
97
|
+
const nextTargets = { ...ledger.targets };
|
|
98
|
+
if (Object.keys(owned).length > 0) nextTargets[driverTarget] = owned;
|
|
99
|
+
else delete nextTargets[driverTarget];
|
|
100
|
+
if (JSON.stringify(nextTargets) !== JSON.stringify(ledger.targets)) {
|
|
101
|
+
writeLedger(projectDir, { version: 1, targets: nextTargets });
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
20
105
|
var TARGET_MCP_CONFIG = {
|
|
21
106
|
"claude-code": ".mcp.json"
|
|
22
107
|
};
|
|
@@ -199,7 +284,6 @@ function pinsBySlug(sources) {
|
|
|
199
284
|
var MD_BY_KIND = {
|
|
200
285
|
skill: "SKILL.md",
|
|
201
286
|
agent: "AGENT.md",
|
|
202
|
-
bundle: "BUNDLE.md",
|
|
203
287
|
"mcp-server": "MCP.md",
|
|
204
288
|
connector: "CONNECTOR.md",
|
|
205
289
|
prompt: "PROMPT.md",
|
|
@@ -211,19 +295,13 @@ function matchManifestPath(kind, paths) {
|
|
|
211
295
|
const hit = paths.find((p) => p.endsWith(exact));
|
|
212
296
|
if (hit) return hit;
|
|
213
297
|
}
|
|
298
|
+
if (kind === "preset") return paths.find((p) => p.endsWith(".preset.yaml"));
|
|
214
299
|
if (kind === "prompt") return paths.find((p) => p.endsWith(".prompt.md"));
|
|
215
300
|
if (kind === "flow") {
|
|
216
301
|
return paths.find((p) => p.endsWith(".flow.yaml") || p.endsWith(".flow.json"));
|
|
217
302
|
}
|
|
218
303
|
return void 0;
|
|
219
304
|
}
|
|
220
|
-
var NON_DEPLOYABLE_KINDS = /* @__PURE__ */ new Set([
|
|
221
|
-
"bundle",
|
|
222
|
-
"mcp-server",
|
|
223
|
-
"persona",
|
|
224
|
-
"ruleset",
|
|
225
|
-
"knowledge"
|
|
226
|
-
]);
|
|
227
305
|
function unscopedName(x) {
|
|
228
306
|
return x.includes("/") ? x.split("/").pop() : x;
|
|
229
307
|
}
|
|
@@ -254,7 +332,7 @@ function indexLockByKindName(lock) {
|
|
|
254
332
|
}
|
|
255
333
|
return lockByKindName;
|
|
256
334
|
}
|
|
257
|
-
function libraryDiskHashes(libPath, cache) {
|
|
335
|
+
function libraryDiskHashes(libPath, cache, registry) {
|
|
258
336
|
let hashes = cache.get(libPath);
|
|
259
337
|
if (!hashes) {
|
|
260
338
|
const sourceConfig = readManifestSourceConfig(libPath, "library") ?? {
|
|
@@ -265,7 +343,7 @@ function libraryDiskHashes(libPath, cache) {
|
|
|
265
343
|
dev_paths: []
|
|
266
344
|
};
|
|
267
345
|
hashes = new Map(
|
|
268
|
-
discoverAssetsInTree(libPath, { sourceConfig }).assets.map((a) => [
|
|
346
|
+
discoverAssetsInTree(libPath, { sourceConfig, registry }).assets.map((a) => [
|
|
269
347
|
`${a.kind}:${a.name}`,
|
|
270
348
|
a.sha256
|
|
271
349
|
])
|
|
@@ -420,6 +498,9 @@ var AssetManager = class {
|
|
|
420
498
|
driverTarget;
|
|
421
499
|
/** Whether this instance operates in global-install mode. */
|
|
422
500
|
global;
|
|
501
|
+
/** Asset-kind registry shared with the host (one instance per process). */
|
|
502
|
+
registry;
|
|
503
|
+
_knownKinds;
|
|
423
504
|
/** Explicit global-harness override (global mode only); else auto-resolved. */
|
|
424
505
|
harnessesOverride;
|
|
425
506
|
/** Injected catalog fetcher (tests / custom); falls back to a built one. */
|
|
@@ -430,15 +511,32 @@ var AssetManager = class {
|
|
|
430
511
|
catalogUrlOverride;
|
|
431
512
|
/** Injected index SQLite path override (tests); else the default index.db. */
|
|
432
513
|
indexPathOverride;
|
|
514
|
+
/** Sink for cross-library collision warnings; else `console.warn`. */
|
|
515
|
+
onLibraryCollision;
|
|
433
516
|
constructor(opts) {
|
|
434
517
|
this.projectDir = resolve(opts.projectDir);
|
|
435
518
|
this.global = opts.global ?? false;
|
|
519
|
+
this.registry = opts.registry;
|
|
436
520
|
this.driverTarget = opts.driverTarget ?? (this.global ? void 0 : resolveConfiguredDriverTarget(this.projectDir)) ?? "claude-code";
|
|
437
521
|
this.harnessesOverride = opts.harnesses ?? opts.backends;
|
|
438
522
|
this.injectedStoreFetcher = opts.storeFetcher;
|
|
439
523
|
this.injectedAssetFetcher = opts.assetFetcher;
|
|
440
524
|
this.catalogUrlOverride = opts.catalogUrl;
|
|
441
525
|
this.indexPathOverride = opts.indexPath;
|
|
526
|
+
this.onLibraryCollision = opts.onLibraryCollision;
|
|
527
|
+
}
|
|
528
|
+
/** Registered kind names — the `knownKinds` argument of the manifest scanners. */
|
|
529
|
+
get knownKinds() {
|
|
530
|
+
this._knownKinds ??= new Set(this.registry.getAllKinds());
|
|
531
|
+
return this._knownKinds;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* The harness component dir a kind installs into (its provider's
|
|
535
|
+
* `installTarget`), or `undefined` for composition-only kinds, which are only
|
|
536
|
+
* cached in the store cache and composed at session start.
|
|
537
|
+
*/
|
|
538
|
+
installTarget(kind) {
|
|
539
|
+
return installTargetOf(this.registry, kind);
|
|
442
540
|
}
|
|
443
541
|
/**
|
|
444
542
|
* Root for this manager's **state** — config SSOT, lock, cache, history.
|
|
@@ -490,7 +588,13 @@ var AssetManager = class {
|
|
|
490
588
|
/** Deploy options for one harness. In global mode, `driverTarget` is the
|
|
491
589
|
* fan-out target (not the constructor's `driverTarget`, which is project-only). */
|
|
492
590
|
deployOptsFor(target, link) {
|
|
493
|
-
return {
|
|
591
|
+
return {
|
|
592
|
+
registry: this.registry,
|
|
593
|
+
driverTarget: target,
|
|
594
|
+
global: this.global,
|
|
595
|
+
cwd: this.projectDir,
|
|
596
|
+
link: link === true
|
|
597
|
+
};
|
|
494
598
|
}
|
|
495
599
|
/**
|
|
496
600
|
* Render the project's declared MCP servers into the driver target's own
|
|
@@ -512,6 +616,29 @@ var AssetManager = class {
|
|
|
512
616
|
);
|
|
513
617
|
}
|
|
514
618
|
}
|
|
619
|
+
/**
|
|
620
|
+
* Render every agent instance of `skaile.yaml` into the driver target's native
|
|
621
|
+
* agent files (`.claude/agents/<id>.md`, …) and prune the renderings of
|
|
622
|
+
* instances that left the config. Runs after the skills deploy, so composed
|
|
623
|
+
* skills resolve. Project scope only. Never fails an install — a render error
|
|
624
|
+
* is warned and swallowed.
|
|
625
|
+
*/
|
|
626
|
+
renderAgentInstances() {
|
|
627
|
+
if (this.global) return {};
|
|
628
|
+
try {
|
|
629
|
+
const result = installAgentInstances({
|
|
630
|
+
projectDir: this.projectDir,
|
|
631
|
+
driverTarget: this.driverTarget
|
|
632
|
+
});
|
|
633
|
+
for (const w of result.warnings) console.warn(`skaile: ${w}`);
|
|
634
|
+
return { agentInstances: result.instances, agentFilesRemoved: result.removed };
|
|
635
|
+
} catch (err) {
|
|
636
|
+
console.warn(
|
|
637
|
+
`skaile: could not render agent instances for ${this.driverTarget}: ${err instanceof Error ? err.message : String(err)}`
|
|
638
|
+
);
|
|
639
|
+
return {};
|
|
640
|
+
}
|
|
641
|
+
}
|
|
515
642
|
loadConfig() {
|
|
516
643
|
const config = this.global ? resolveGlobalSkWorkspaceConfig() : resolveSkWorkspaceConfig(this.projectDir);
|
|
517
644
|
const sources = config.sources ?? [];
|
|
@@ -661,7 +788,7 @@ var AssetManager = class {
|
|
|
661
788
|
const isDefaultLib = new Map(roots.map((r) => [r.name, r.isDefault]));
|
|
662
789
|
for (const { name, dir } of roots) {
|
|
663
790
|
const publisher = readDeclaredPublisher(dir) ?? slugifyAssetName(name);
|
|
664
|
-
for (const entry of await scanDirectory(dir, publisher)) {
|
|
791
|
+
for (const entry of await scanDirectory(dir, publisher, { knownKinds: this.knownKinds })) {
|
|
665
792
|
const key = `${entry.kind}:@${entry.publisher}/${entry.name}`;
|
|
666
793
|
const list = byKey.get(key);
|
|
667
794
|
if (list) list.push({ entry, library: name });
|
|
@@ -710,10 +837,11 @@ var AssetManager = class {
|
|
|
710
837
|
const libraries = new Set(candidates.map((c) => c.library));
|
|
711
838
|
if (libraries.size < 2) return;
|
|
712
839
|
const held = candidates.map((c) => `${c.library} (${c.entry.version || "unversioned"})`);
|
|
713
|
-
const msg =
|
|
840
|
+
const msg = `${key} exists in ${libraries.size} libraries: ${held.join(", ")} \u2014 using ${chosen.library} (${chosen.entry.version || "unversioned"}). Highest version wins; an equal version goes to the default library, then by name. Pin a version (${key}#<version>) to choose another.`;
|
|
714
841
|
if (this.warnedLibraryCollisions.has(msg)) return;
|
|
715
842
|
this.warnedLibraryCollisions.add(msg);
|
|
716
|
-
|
|
843
|
+
if (this.onLibraryCollision) this.onLibraryCollision(msg);
|
|
844
|
+
else console.warn(`skaile: ${msg}`);
|
|
717
845
|
}
|
|
718
846
|
/**
|
|
719
847
|
* Open the local index and snapshot its libraries + asset definitions.
|
|
@@ -752,7 +880,7 @@ var AssetManager = class {
|
|
|
752
880
|
const publisher = e.publisher ?? "";
|
|
753
881
|
const def = newestLibraryDef(snap, name, { kind: e.kind, publisher, name: e.name });
|
|
754
882
|
const libPath = this.libraryPath(name, snap);
|
|
755
|
-
const sha256 = (libPath ? libraryDiskHashes(libPath, diskHashes).get(`${e.kind}:${e.name}`) : void 0) ?? def?.sha256;
|
|
883
|
+
const sha256 = (libPath ? libraryDiskHashes(libPath, diskHashes, this.registry).get(`${e.kind}:${e.name}`) : void 0) ?? def?.sha256;
|
|
756
884
|
return {
|
|
757
885
|
kind: e.kind,
|
|
758
886
|
publisher,
|
|
@@ -791,7 +919,7 @@ var AssetManager = class {
|
|
|
791
919
|
);
|
|
792
920
|
continue;
|
|
793
921
|
}
|
|
794
|
-
const found = (await scanDirectory(libPath, publisher)).find(
|
|
922
|
+
const found = (await scanDirectory(libPath, publisher, { knownKinds: this.knownKinds })).find(
|
|
795
923
|
(x) => x.kind === kind && x.name === name
|
|
796
924
|
);
|
|
797
925
|
if (!found) {
|
|
@@ -807,7 +935,7 @@ var AssetManager = class {
|
|
|
807
935
|
continue;
|
|
808
936
|
}
|
|
809
937
|
if (origin.sha256) {
|
|
810
|
-
const onDisk = libraryDiskHashes(libPath, diskHashes).get(`${kind}:${name}`);
|
|
938
|
+
const onDisk = libraryDiskHashes(libPath, diskHashes, this.registry).get(`${kind}:${name}`);
|
|
811
939
|
if (onDisk !== void 0 && onDisk !== origin.sha256) {
|
|
812
940
|
missing.push(
|
|
813
941
|
`${ref} (library "${origin.name}" content changed since lock \u2014 or the lock predates the one shared asset hash; re-lock with \`skaile install\`)`
|
|
@@ -853,7 +981,8 @@ var AssetManager = class {
|
|
|
853
981
|
overrides: opts.overrides,
|
|
854
982
|
stores: opts.stores,
|
|
855
983
|
storeFetcher: this.storeFetcherFor(opts.stores),
|
|
856
|
-
projectDir: this.projectDir
|
|
984
|
+
projectDir: this.projectDir,
|
|
985
|
+
knownKinds: this.knownKinds
|
|
857
986
|
});
|
|
858
987
|
if (first.missing.length === 0) return first;
|
|
859
988
|
const fallback = await this.globalStoreFallback(opts.stores);
|
|
@@ -865,7 +994,8 @@ var AssetManager = class {
|
|
|
865
994
|
overrides: opts.overrides,
|
|
866
995
|
stores,
|
|
867
996
|
storeFetcher: this.storeFetcherFor(stores),
|
|
868
|
-
projectDir: this.projectDir
|
|
997
|
+
projectDir: this.projectDir,
|
|
998
|
+
knownKinds: this.knownKinds
|
|
869
999
|
});
|
|
870
1000
|
return retry.missing.length < first.missing.length ? retry : first;
|
|
871
1001
|
} catch {
|
|
@@ -916,7 +1046,7 @@ var AssetManager = class {
|
|
|
916
1046
|
* Fetch + SHA-verify the bytes of every store-resolved candidate that needs
|
|
917
1047
|
* bytes on disk into `.skaile/cache/store/`, reusing the same verified-fetch
|
|
918
1048
|
* path the pointer-only `library.install` uses (`installFromManifest` flat
|
|
919
|
-
* mode).
|
|
1049
|
+
* mode). Every kind with bytes, composition-only kinds included.
|
|
920
1050
|
*
|
|
921
1051
|
* @returns Map of candidate key → staged primary-manifest path.
|
|
922
1052
|
*/
|
|
@@ -924,7 +1054,6 @@ var AssetManager = class {
|
|
|
924
1054
|
const staged = /* @__PURE__ */ new Map();
|
|
925
1055
|
let installFromManifest;
|
|
926
1056
|
for (const c of resolved) {
|
|
927
|
-
if (NON_DEPLOYABLE_KINDS.has(c.kind) && c.kind !== "mcp-server") continue;
|
|
928
1057
|
if (!c.files || c.files.length === 0 || !c.sourceUrl || !c.commit) continue;
|
|
929
1058
|
if (this.candidateHasLocalBytes(c, repositories)) continue;
|
|
930
1059
|
if (!installFromManifest) {
|
|
@@ -994,7 +1123,12 @@ var AssetManager = class {
|
|
|
994
1123
|
}
|
|
995
1124
|
/** Build a copy-deploy catalog entry pointing at staged store bytes. */
|
|
996
1125
|
stagedCandidateToEntry(c, stagedManifestPath) {
|
|
1126
|
+
const paths = (c.files ?? []).map((f) => f.path);
|
|
1127
|
+
const root = commonDirPrefix(paths);
|
|
1128
|
+
const manifestDir = posix.dirname(this.stagedManifestRel(c));
|
|
1129
|
+
const files = paths.map((p) => root && p.startsWith(`${root}/`) ? p.slice(root.length + 1) : p).map((p) => posix.relative(manifestDir, p)).filter((rel) => rel !== "" && !rel.startsWith(".."));
|
|
997
1130
|
const entry = {
|
|
1131
|
+
files,
|
|
998
1132
|
name: c.name,
|
|
999
1133
|
kind: c.kind,
|
|
1000
1134
|
description: c.description ?? "",
|
|
@@ -1036,13 +1170,17 @@ var AssetManager = class {
|
|
|
1036
1170
|
const cloneError = this.ensureSourceClones(repositories, sources);
|
|
1037
1171
|
if (cloneError) return cloneError;
|
|
1038
1172
|
const provenanceIndex = await buildProvenanceIndex(this.buildClones(repositories), {
|
|
1039
|
-
projectDir: this.projectDir
|
|
1040
|
-
|
|
1041
|
-
const { resolved, missing, overridesApplied } = await this.resolveWithStores(dependencies, {
|
|
1042
|
-
provenanceIndex,
|
|
1043
|
-
overrides,
|
|
1044
|
-
stores
|
|
1173
|
+
projectDir: this.projectDir,
|
|
1174
|
+
knownKinds: this.knownKinds
|
|
1045
1175
|
});
|
|
1176
|
+
const { resolved, missing, overridesApplied, presets } = await this.resolveWithStores(
|
|
1177
|
+
dependencies,
|
|
1178
|
+
{
|
|
1179
|
+
provenanceIndex,
|
|
1180
|
+
overrides,
|
|
1181
|
+
stores
|
|
1182
|
+
}
|
|
1183
|
+
);
|
|
1046
1184
|
const lib = await this.resolveLibraryEntries(missing);
|
|
1047
1185
|
const directLock = this.directInstallLockEntries();
|
|
1048
1186
|
const libraryLock = { ...directLock, ...await this.libraryLockEntries(lib) };
|
|
@@ -1056,6 +1194,7 @@ var AssetManager = class {
|
|
|
1056
1194
|
)
|
|
1057
1195
|
];
|
|
1058
1196
|
await this.renderDriverMcpConfig();
|
|
1197
|
+
const agentRender = this.renderAgentInstances();
|
|
1059
1198
|
const lockWritten = resolved.length > 0 || lib.entries.length > 0 || existsSync(this.lockPath);
|
|
1060
1199
|
if (lockWritten) {
|
|
1061
1200
|
writeLock(this.lockPath, buildLockFile(resolved, overridesApplied, libraryLock));
|
|
@@ -1063,7 +1202,16 @@ var AssetManager = class {
|
|
|
1063
1202
|
this.recordInstallHistory(deployed, removed);
|
|
1064
1203
|
const { npmInstalled, npmFailed } = await this.installRuntimeAssetDeps();
|
|
1065
1204
|
const stillMissing = missing.filter((m) => !lib.resolved.has(m));
|
|
1066
|
-
return {
|
|
1205
|
+
return {
|
|
1206
|
+
deployed,
|
|
1207
|
+
removed,
|
|
1208
|
+
missing: stillMissing,
|
|
1209
|
+
lockWritten,
|
|
1210
|
+
npmInstalled,
|
|
1211
|
+
npmFailed,
|
|
1212
|
+
presets,
|
|
1213
|
+
...agentRender
|
|
1214
|
+
};
|
|
1067
1215
|
}
|
|
1068
1216
|
/**
|
|
1069
1217
|
* Ensure all source clones are present/up to date. Returns an early
|
|
@@ -1176,11 +1324,27 @@ var AssetManager = class {
|
|
|
1176
1324
|
const src = new RemoteCatalogSource({ baseUrl: storeUrl });
|
|
1177
1325
|
try {
|
|
1178
1326
|
const m = await src.getInstallManifest(ref);
|
|
1327
|
+
let deps;
|
|
1328
|
+
let gap;
|
|
1329
|
+
try {
|
|
1330
|
+
let row = await src.resolve(ref);
|
|
1331
|
+
if (row === null && !src.cache.airGapped) row = await src.revalidate(ref);
|
|
1332
|
+
deps = row?.requires;
|
|
1333
|
+
if (row === null) gap = `has no catalog row for ${ref}`;
|
|
1334
|
+
else if (deps === void 0)
|
|
1335
|
+
gap = `has a cached catalog row for ${ref} without dependencies`;
|
|
1336
|
+
} catch (err) {
|
|
1337
|
+
gap = `dependency lookup for ${ref} failed \u2014 ${err}`;
|
|
1338
|
+
}
|
|
1339
|
+
if (gap) {
|
|
1340
|
+
console.warn(`skaile: store ${storeUrl} ${gap}; installing without its dependencies`);
|
|
1341
|
+
}
|
|
1179
1342
|
return {
|
|
1180
1343
|
sourceUrl: m.source.url,
|
|
1181
1344
|
commit: m.source.commitSha,
|
|
1182
1345
|
sha256: m.sha256,
|
|
1183
|
-
files: m.files
|
|
1346
|
+
files: m.files,
|
|
1347
|
+
deps
|
|
1184
1348
|
};
|
|
1185
1349
|
} catch (err) {
|
|
1186
1350
|
if (err instanceof CatalogHttpError && err.status === 404) return null;
|
|
@@ -1301,7 +1465,14 @@ var AssetManager = class {
|
|
|
1301
1465
|
)
|
|
1302
1466
|
];
|
|
1303
1467
|
await this.renderDriverMcpConfig();
|
|
1304
|
-
|
|
1468
|
+
const agentRender = this.renderAgentInstances();
|
|
1469
|
+
return {
|
|
1470
|
+
deployed,
|
|
1471
|
+
removed: [],
|
|
1472
|
+
missing: library.missing,
|
|
1473
|
+
lockWritten: false,
|
|
1474
|
+
...agentRender
|
|
1475
|
+
};
|
|
1305
1476
|
}
|
|
1306
1477
|
/**
|
|
1307
1478
|
* Add a single asset (and its transitive dependencies) to the workspace.
|
|
@@ -1324,7 +1495,8 @@ var AssetManager = class {
|
|
|
1324
1495
|
parseAssetRef(ref);
|
|
1325
1496
|
this.ensureSourceClonesQuiet(repositories, sources);
|
|
1326
1497
|
const provenanceIndex = await buildProvenanceIndex(this.buildClones(repositories), {
|
|
1327
|
-
projectDir: this.projectDir
|
|
1498
|
+
projectDir: this.projectDir,
|
|
1499
|
+
knownKinds: this.knownKinds
|
|
1328
1500
|
});
|
|
1329
1501
|
const { resolved, missing, overridesApplied } = await this.resolveWithStores([ref], {
|
|
1330
1502
|
provenanceIndex,
|
|
@@ -1354,6 +1526,7 @@ var AssetManager = class {
|
|
|
1354
1526
|
}
|
|
1355
1527
|
this.addDependencyToConfig(ref);
|
|
1356
1528
|
await this.renderDriverMcpConfig();
|
|
1529
|
+
this.renderAgentInstances();
|
|
1357
1530
|
if (resolved.length > 0 || lib.entries.length > 0) {
|
|
1358
1531
|
const fresh = buildLockFile(resolved, overridesApplied, await this.libraryLockEntries(lib));
|
|
1359
1532
|
writeLock(this.lockPath, mergeLockFile(this.tryReadLock(), fresh));
|
|
@@ -1397,37 +1570,37 @@ var AssetManager = class {
|
|
|
1397
1570
|
);
|
|
1398
1571
|
}
|
|
1399
1572
|
/**
|
|
1400
|
-
*
|
|
1401
|
-
* `ref` as
|
|
1402
|
-
* not a dependency: nothing here installs the
|
|
1573
|
+
* Presets in the configured sources (and the bundled factory source) that list
|
|
1574
|
+
* `ref` as an asset item, for the `skaile add` discoverability hint. Membership is
|
|
1575
|
+
* not a dependency: nothing here installs the preset or its siblings.
|
|
1403
1576
|
*
|
|
1404
1577
|
* Matches on kind + name, and on publisher only when both sides carry one, so
|
|
1405
|
-
* a bare `skill:x`
|
|
1578
|
+
* a bare `skill:x` item still matches `skill:@pub/x`. Presets already
|
|
1406
1579
|
* declared in `skaile.yaml` are left out. Best-effort: any failure yields `[]`,
|
|
1407
1580
|
* so it can never fail an `add` that succeeded.
|
|
1408
1581
|
*
|
|
1409
1582
|
* @param ref - The added asset ref (`kind:name`, `kind:@pub/name`, optionally pinned).
|
|
1410
|
-
* @returns One `{ name, ref }` per containing
|
|
1411
|
-
* the `skaile add` form (`
|
|
1583
|
+
* @returns One `{ name, ref }` per containing preset, deduped by `ref`; `ref` is
|
|
1584
|
+
* the `skaile add` form (`preset:@pub/name`, or `preset:name` without a publisher).
|
|
1412
1585
|
*/
|
|
1413
|
-
async
|
|
1586
|
+
async presetsContaining(ref) {
|
|
1414
1587
|
const target = memberIdentity(ref);
|
|
1415
|
-
if (!target || target.kind === "
|
|
1588
|
+
if (!target || target.kind === "preset") return [];
|
|
1416
1589
|
try {
|
|
1417
1590
|
const sameAsset = (id, want) => !!id && id.kind === want.kind && id.name === want.name && (!id.publisher || !want.publisher || id.publisher === want.publisher);
|
|
1418
1591
|
const declared = this.loadConfig().dependencies.map(memberIdentity);
|
|
1419
1592
|
const out = [];
|
|
1420
1593
|
const seen = /* @__PURE__ */ new Set();
|
|
1421
|
-
for (const
|
|
1422
|
-
const members = [...
|
|
1594
|
+
for (const p of await this.search(void 0, "preset")) {
|
|
1595
|
+
const members = [...p.dependencies, ...p.requires.map((d) => `${d.kind}:${d.name}`)];
|
|
1423
1596
|
if (!members.some((m) => sameAsset(memberIdentity(m), target))) continue;
|
|
1424
|
-
const publisher =
|
|
1425
|
-
const
|
|
1426
|
-
if (declared.some((d) => sameAsset(d,
|
|
1427
|
-
const
|
|
1428
|
-
if (seen.has(
|
|
1429
|
-
seen.add(
|
|
1430
|
-
out.push({ name:
|
|
1597
|
+
const publisher = p.publisher?.replace(/^@/, "");
|
|
1598
|
+
const presetId = { kind: "preset", name: p.name, publisher };
|
|
1599
|
+
if (declared.some((d) => sameAsset(d, presetId))) continue;
|
|
1600
|
+
const presetRef = publisher ? assetRefToStr({ kind: "preset", name: p.name, publisher }) : `preset:${p.name}`;
|
|
1601
|
+
if (seen.has(presetRef)) continue;
|
|
1602
|
+
seen.add(presetRef);
|
|
1603
|
+
out.push({ name: p.name, ref: presetRef });
|
|
1431
1604
|
}
|
|
1432
1605
|
return out;
|
|
1433
1606
|
} catch {
|
|
@@ -1609,10 +1782,12 @@ var AssetManager = class {
|
|
|
1609
1782
|
*
|
|
1610
1783
|
* @param ref - Asset ref in `kind:name` form (e.g. `skill:my-skill`).
|
|
1611
1784
|
* @returns `true` if the asset was found and removed, `false` if it was not deployed.
|
|
1785
|
+
* A `preset:` ref has no deployed files: it is found when declared in `skaile.yaml`, and
|
|
1786
|
+
* only its declaration goes — its expanded items leave with the next `skaile install`.
|
|
1612
1787
|
*/
|
|
1613
1788
|
remove(ref) {
|
|
1614
1789
|
const parsed = parseAssetRef(ref);
|
|
1615
|
-
let ok = false;
|
|
1790
|
+
let ok = parsed.kind === "preset" ? this.removeDependencyFromConfig(parsed) : false;
|
|
1616
1791
|
for (const t of this.targetHarnesses()) {
|
|
1617
1792
|
if (removeAsset(parsed.kind, parsed.name, this.deployOptsFor(t))) ok = true;
|
|
1618
1793
|
}
|
|
@@ -1663,7 +1838,7 @@ var AssetManager = class {
|
|
|
1663
1838
|
for (const [name, decl] of Object.entries(repositories)) {
|
|
1664
1839
|
const repoDir = this.resolveRepoDir(decl, name);
|
|
1665
1840
|
if (!repoDir) continue;
|
|
1666
|
-
all = [...all, ...await scanRepo(repoDir, name)];
|
|
1841
|
+
all = [...all, ...await scanRepo(repoDir, name, { knownKinds: this.knownKinds })];
|
|
1667
1842
|
}
|
|
1668
1843
|
if (kind) all = all.filter((e) => e.kind === kind);
|
|
1669
1844
|
if (query) {
|
|
@@ -1707,7 +1882,7 @@ var AssetManager = class {
|
|
|
1707
1882
|
for (const [name, decl] of Object.entries(repositories)) {
|
|
1708
1883
|
const repoDir = this.resolveRepoDir(decl, name);
|
|
1709
1884
|
if (!repoDir) continue;
|
|
1710
|
-
const entries = await scanRepo(repoDir, name);
|
|
1885
|
+
const entries = await scanRepo(repoDir, name, { knownKinds: this.knownKinds });
|
|
1711
1886
|
const match = entries.find(
|
|
1712
1887
|
(e) => e.kind === parsed.kind && e.name === parsed.name && (!parsed.publisher || e.publisher === parsed.publisher)
|
|
1713
1888
|
);
|
|
@@ -1726,7 +1901,11 @@ var AssetManager = class {
|
|
|
1726
1901
|
* @returns Shallow {@link CatalogEntry} objects (description and version will be empty).
|
|
1727
1902
|
*/
|
|
1728
1903
|
listDeployed(kind) {
|
|
1729
|
-
const kinds = kind ? [kind]
|
|
1904
|
+
const kinds = kind ? [this.installTarget(kind)].filter((k) => k !== void 0) : [
|
|
1905
|
+
...new Set(
|
|
1906
|
+
this.registry.getAllProviders().map((p) => p.installTarget).filter((t) => t !== void 0)
|
|
1907
|
+
)
|
|
1908
|
+
];
|
|
1730
1909
|
const result = [];
|
|
1731
1910
|
const seen = /* @__PURE__ */ new Set();
|
|
1732
1911
|
for (const k of kinds) {
|
|
@@ -1738,7 +1917,7 @@ var AssetManager = class {
|
|
|
1738
1917
|
if (item.isDirectory() || item.isSymbolicLink()) {
|
|
1739
1918
|
name = item.name;
|
|
1740
1919
|
} else if (item.isFile()) {
|
|
1741
|
-
name = item.name.replace(/\.prompt\.md$/, "").replace(/\.flow\.(yaml|json)$/, "").replace(/\.
|
|
1920
|
+
name = item.name.replace(/\.prompt\.md$/, "").replace(/\.flow\.(yaml|json)$/, "").replace(/\.(md|toml|yaml|json)$/, "");
|
|
1742
1921
|
} else {
|
|
1743
1922
|
continue;
|
|
1744
1923
|
}
|
|
@@ -1776,8 +1955,9 @@ var AssetManager = class {
|
|
|
1776
1955
|
if (this.global || this.driverTarget === "claude-code") return [];
|
|
1777
1956
|
const tracked = /* @__PURE__ */ new Map();
|
|
1778
1957
|
const track = (kind, name) => {
|
|
1779
|
-
|
|
1780
|
-
|
|
1958
|
+
const component = kind ? this.installTarget(kind) : void 0;
|
|
1959
|
+
if (kind && name && component) {
|
|
1960
|
+
tracked.set(`${kind}:${name}`, { kind, name, component });
|
|
1781
1961
|
}
|
|
1782
1962
|
};
|
|
1783
1963
|
const lock = this.tryReadLock();
|
|
@@ -1798,8 +1978,7 @@ var AssetManager = class {
|
|
|
1798
1978
|
} catch {
|
|
1799
1979
|
}
|
|
1800
1980
|
const out = [];
|
|
1801
|
-
for (const { kind, name } of tracked.values()) {
|
|
1802
|
-
const k = kind;
|
|
1981
|
+
for (const { kind, name, component: k } of tracked.values()) {
|
|
1803
1982
|
const legacy = deployedDir(k, name, "claude-code", false, this.projectDir);
|
|
1804
1983
|
if (legacy === deployedDir(k, name, this.driverTarget, false, this.projectDir)) continue;
|
|
1805
1984
|
if (isDeployed(k, name, "claude-code", false, this.projectDir)) {
|
|
@@ -1813,11 +1992,12 @@ var AssetManager = class {
|
|
|
1813
1992
|
* with a reconciliation {@link DeclaredState}:
|
|
1814
1993
|
*
|
|
1815
1994
|
* - `declared` — in `skaile.yaml`, not yet resolved into the lock.
|
|
1816
|
-
* - `installed` — declared + locked, and (for
|
|
1817
|
-
* disk. An `mcp-server` is instead checked against the
|
|
1818
|
-
* would actually wire (store-staged or materialized
|
|
1819
|
-
*
|
|
1820
|
-
* locked — they are resolved at session start with no
|
|
1995
|
+
* - `installed` — declared + locked, and (for kinds with an `installTarget`)
|
|
1996
|
+
* materialized on disk. An `mcp-server` is instead checked against the
|
|
1997
|
+
* declarations the runner would actually wire (store-staged or materialized
|
|
1998
|
+
* `MCP.md`); the remaining composition-only kinds (no `installTarget`) count as
|
|
1999
|
+
* installed once locked — they are resolved at session start with no harness
|
|
2000
|
+
* footprint here.
|
|
1821
2001
|
* - `drift` — declared + locked but the deployed files are missing on disk.
|
|
1822
2002
|
* - `invalid` — the `dependencies:` entry isn't a parseable canonical ref. Only
|
|
1823
2003
|
* surfaced in the unfiltered listing (a `kind` filter can't classify it).
|
|
@@ -1859,7 +2039,7 @@ var AssetManager = class {
|
|
|
1859
2039
|
continue;
|
|
1860
2040
|
}
|
|
1861
2041
|
if (kind && parsed.kind !== kind) continue;
|
|
1862
|
-
const locked = lockKeys.some(
|
|
2042
|
+
const locked = parsed.kind === "preset" ? lock !== null : lockKeys.some(
|
|
1863
2043
|
(k) => k.kind === parsed.kind && k.name === parsed.name && (!parsed.publisher || k.publisher === parsed.publisher)
|
|
1864
2044
|
);
|
|
1865
2045
|
let state;
|
|
@@ -1868,17 +2048,20 @@ var AssetManager = class {
|
|
|
1868
2048
|
} else if (parsed.kind === "mcp-server") {
|
|
1869
2049
|
const wired = await wiredMcpNames();
|
|
1870
2050
|
state = wired.has(parsed.name) || wired.has(unscopedName(parsed.name)) ? "installed" : "drift";
|
|
1871
|
-
} else if (NON_DEPLOYABLE_KINDS.has(parsed.kind)) {
|
|
1872
|
-
state = "installed";
|
|
1873
2051
|
} else {
|
|
1874
|
-
const
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
2052
|
+
const component = this.installTarget(parsed.kind);
|
|
2053
|
+
if (!component) {
|
|
2054
|
+
state = "installed";
|
|
2055
|
+
} else {
|
|
2056
|
+
const onDisk = isDeployed(
|
|
2057
|
+
component,
|
|
2058
|
+
parsed.name,
|
|
2059
|
+
this.driverTarget,
|
|
2060
|
+
this.global,
|
|
2061
|
+
this.projectDir
|
|
2062
|
+
);
|
|
2063
|
+
state = onDisk ? "installed" : "drift";
|
|
2064
|
+
}
|
|
1882
2065
|
}
|
|
1883
2066
|
out.push({ ref, kind: parsed.kind, name: parsed.name, state });
|
|
1884
2067
|
}
|
|
@@ -1921,18 +2104,16 @@ var AssetManager = class {
|
|
|
1921
2104
|
continue;
|
|
1922
2105
|
}
|
|
1923
2106
|
if (opts?.kind && parsed.kind !== opts.kind) continue;
|
|
1924
|
-
const locked = lockKeys.some(
|
|
2107
|
+
const locked = parsed.kind === "preset" ? lock !== null : lockKeys.some(
|
|
1925
2108
|
(k) => k.kind === parsed.kind && k.name === parsed.name && (!parsed.publisher || k.publisher === parsed.publisher)
|
|
1926
2109
|
);
|
|
1927
2110
|
for (const harness of harnesses) {
|
|
1928
2111
|
let state;
|
|
1929
2112
|
if (!locked) {
|
|
1930
2113
|
state = "declared";
|
|
1931
|
-
} else if (NON_DEPLOYABLE_KINDS.has(parsed.kind)) {
|
|
1932
|
-
state = "installed";
|
|
1933
2114
|
} else {
|
|
1934
|
-
const
|
|
1935
|
-
state =
|
|
2115
|
+
const component = this.installTarget(parsed.kind);
|
|
2116
|
+
state = !component || isDeployed(component, parsed.name, harness, true) ? "installed" : "drift";
|
|
1936
2117
|
}
|
|
1937
2118
|
out.push({ ref, kind: parsed.kind, name: parsed.name, state, harness });
|
|
1938
2119
|
}
|
|
@@ -2090,8 +2271,9 @@ var AssetManager = class {
|
|
|
2090
2271
|
for (const [ref, entry] of Object.entries(lock.assets)) {
|
|
2091
2272
|
if (reported.has(ref) || entry.library?.installed) continue;
|
|
2092
2273
|
const { publisher, kind, name, version } = parseCanonicalLockKey(ref);
|
|
2093
|
-
|
|
2094
|
-
if (
|
|
2274
|
+
const component = kind ? this.installTarget(kind) : void 0;
|
|
2275
|
+
if (!kind || !name || !component) continue;
|
|
2276
|
+
if (isDeployed(component, name, this.driverTarget, this.global, this.projectDir)) {
|
|
2095
2277
|
continue;
|
|
2096
2278
|
}
|
|
2097
2279
|
result.push({
|
|
@@ -2124,8 +2306,10 @@ var AssetManager = class {
|
|
|
2124
2306
|
const parsed = parseAssetRef(ref);
|
|
2125
2307
|
const entry = await this.info(ref);
|
|
2126
2308
|
if (!entry || !existsSync(entry.source)) return { status: "not-found" };
|
|
2309
|
+
const component = this.installTarget(parsed.kind);
|
|
2310
|
+
if (!component) return { status: "not-deployed" };
|
|
2127
2311
|
const deployedPath = join(
|
|
2128
|
-
deployedBase(
|
|
2312
|
+
deployedBase(component, this.driverTarget, this.global, this.projectDir),
|
|
2129
2313
|
parsed.name
|
|
2130
2314
|
);
|
|
2131
2315
|
if (!existsSync(deployedPath)) return { status: "not-deployed" };
|
|
@@ -2147,7 +2331,8 @@ var AssetManager = class {
|
|
|
2147
2331
|
const { repositories, sources, stores, dependencies, overrides } = this.loadConfig();
|
|
2148
2332
|
this.ensureSourceClonesQuiet(repositories, sources);
|
|
2149
2333
|
const provenanceIndex = await buildProvenanceIndex(this.buildClones(repositories), {
|
|
2150
|
-
projectDir: this.projectDir
|
|
2334
|
+
projectDir: this.projectDir,
|
|
2335
|
+
knownKinds: this.knownKinds
|
|
2151
2336
|
});
|
|
2152
2337
|
const { resolved, missing, overridesApplied } = await this.resolveWithStores(dependencies, {
|
|
2153
2338
|
provenanceIndex,
|
|
@@ -2262,18 +2447,11 @@ var AssetManager = class {
|
|
|
2262
2447
|
for (const req of full.requires) {
|
|
2263
2448
|
const dep = memberIdentity(`${req.kind}:${req.name}`);
|
|
2264
2449
|
if (!dep) continue;
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
dep.name,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
this.projectDir
|
|
2271
|
-
)) {
|
|
2272
|
-
const inRepos = await resolveAsset(
|
|
2273
|
-
{ kind: dep.kind, name: dep.name },
|
|
2274
|
-
repositories,
|
|
2275
|
-
this.reposDir
|
|
2276
|
-
) !== null;
|
|
2450
|
+
const depComponent = this.installTarget(dep.kind);
|
|
2451
|
+
if (depComponent && !isDeployed(depComponent, dep.name, this.driverTarget, this.global, this.projectDir)) {
|
|
2452
|
+
const inRepos = await resolveAsset({ kind: dep.kind, name: dep.name }, repositories, this.reposDir, {
|
|
2453
|
+
knownKinds: this.knownKinds
|
|
2454
|
+
}) !== null;
|
|
2277
2455
|
issues.push({
|
|
2278
2456
|
assetKind: entry.kind,
|
|
2279
2457
|
assetName: entry.name,
|
|
@@ -2291,7 +2469,7 @@ var AssetManager = class {
|
|
|
2291
2469
|
* Create a minimal asset scaffold directory (delegates to {@link createScaffold}).
|
|
2292
2470
|
*
|
|
2293
2471
|
* @param name - Asset name (also used as the directory name).
|
|
2294
|
-
* @param kind - Asset kind: `skill` | `agent` | `
|
|
2472
|
+
* @param kind - Asset kind: `skill` | `agent` | `preset` | `flow` | `prompt` | `contract`.
|
|
2295
2473
|
* @param destDir - Parent directory to create the asset in.
|
|
2296
2474
|
* @param opts - Optional scaffold content (`description`).
|
|
2297
2475
|
* @returns `{ ok: true, path }` on success, `{ ok: false, path: errorMessage }` if the
|
|
@@ -2352,14 +2530,9 @@ var AssetManager = class {
|
|
|
2352
2530
|
if (!lock) return removed;
|
|
2353
2531
|
for (const ref of Object.keys(lock.assets)) {
|
|
2354
2532
|
const { kind, name } = parseCanonicalLockKey(ref);
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
name,
|
|
2359
|
-
this.driverTarget,
|
|
2360
|
-
this.global,
|
|
2361
|
-
this.projectDir
|
|
2362
|
-
);
|
|
2533
|
+
const component = kind ? this.installTarget(kind) : void 0;
|
|
2534
|
+
if (!kind || !name || !component) continue;
|
|
2535
|
+
const dest = deployedDir(component, name, this.driverTarget, this.global, this.projectDir);
|
|
2363
2536
|
try {
|
|
2364
2537
|
const stat = lstatSync(dest);
|
|
2365
2538
|
if (stat.isSymbolicLink()) unlinkSync(dest);
|
|
@@ -2440,9 +2613,9 @@ var AssetManager = class {
|
|
|
2440
2613
|
*/
|
|
2441
2614
|
removeDependencyFromConfig(target) {
|
|
2442
2615
|
const configPath = join(this.stateRoot, "skaile.yaml");
|
|
2443
|
-
if (!existsSync(configPath)) return;
|
|
2616
|
+
if (!existsSync(configPath)) return false;
|
|
2444
2617
|
const raw = parse(readFileSync(configPath, "utf8")) ?? {};
|
|
2445
|
-
if (!Array.isArray(raw.dependencies)) return;
|
|
2618
|
+
if (!Array.isArray(raw.dependencies)) return false;
|
|
2446
2619
|
const wantPub = target.publisher?.replace(/^@/, "");
|
|
2447
2620
|
const idx = raw.dependencies.findIndex((dep) => {
|
|
2448
2621
|
if (typeof dep !== "string") return false;
|
|
@@ -2451,10 +2624,10 @@ var AssetManager = class {
|
|
|
2451
2624
|
const havePub = p.publisher?.replace(/^@/, "");
|
|
2452
2625
|
return wantPub === void 0 || havePub === void 0 || havePub === wantPub;
|
|
2453
2626
|
});
|
|
2454
|
-
if (idx
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2627
|
+
if (idx === -1) return false;
|
|
2628
|
+
raw.dependencies.splice(idx, 1);
|
|
2629
|
+
writeFileSync(configPath, stringify(raw, { lineWidth: 120 }));
|
|
2630
|
+
return true;
|
|
2458
2631
|
}
|
|
2459
2632
|
resolveRepoDir(decl, name) {
|
|
2460
2633
|
const links = readLinks(this.projectDir);
|
|
@@ -2473,6 +2646,6 @@ var AssetManager = class {
|
|
|
2473
2646
|
}
|
|
2474
2647
|
};
|
|
2475
2648
|
|
|
2476
|
-
export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError,
|
|
2477
|
-
//# sourceMappingURL=chunk-
|
|
2478
|
-
//# sourceMappingURL=chunk-
|
|
2649
|
+
export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, installAgentInstances, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName };
|
|
2650
|
+
//# sourceMappingURL=chunk-4CTGEEN6.js.map
|
|
2651
|
+
//# sourceMappingURL=chunk-4CTGEEN6.js.map
|