@skaile/workspaces 4.39.0 → 5.0.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 +21 -0
- package/dist/{asset-feeds-KXL45ALC.js → asset-feeds-HIWT4DVT.js} +24 -96
- package/dist/asset-feeds-HIWT4DVT.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +10 -9
- package/dist/asset-manager/index.js +15 -14
- package/dist/asset-manager/installer.js +10 -9
- package/dist/asset-manager/src/catalog-deployer.d.ts +1 -3
- package/dist/asset-manager/src/catalog-deployer.d.ts.map +1 -1
- package/dist/asset-manager/src/index.d.ts +6 -8
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +23 -11
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +11 -10
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +12 -11
- package/dist/bridge/drivers/continue.js.map +1 -1
- package/dist/bridge/drivers/echo.js +2 -2
- package/dist/bridge/drivers/gemini.js +6 -6
- package/dist/bridge/drivers/goose.js +12 -11
- package/dist/bridge/drivers/goose.js.map +1 -1
- package/dist/bridge/drivers/omp.js +3 -3
- package/dist/bridge/drivers/opencode.js +12 -11
- package/dist/bridge/drivers/opencode.js.map +1 -1
- package/dist/bridge/drivers/qwen.js +6 -6
- package/dist/bridge/index.js +13 -12
- package/dist/bridge/src/drivers/claude-sdk.d.ts +4 -0
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/types.d.ts +7 -0
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/{chunk-7RC37XFW.js → chunk-22DN3DB2.js} +59 -12
- package/dist/chunk-22DN3DB2.js.map +1 -0
- package/dist/{chunk-SM6EUQMY.js → chunk-32DMH2GD.js} +8 -8
- package/dist/{chunk-SM6EUQMY.js.map → chunk-32DMH2GD.js.map} +1 -1
- package/dist/{chunk-A5EDMBFG.js → chunk-43ZBF3WH.js} +5 -8
- package/dist/chunk-43ZBF3WH.js.map +1 -0
- package/dist/{chunk-5RWL4L3X.js → chunk-53WMBXSL.js} +60 -14
- package/dist/chunk-53WMBXSL.js.map +1 -0
- package/dist/{chunk-YCMZHL4T.js → chunk-7QMRP6BC.js} +4 -4
- package/dist/{chunk-YCMZHL4T.js.map → chunk-7QMRP6BC.js.map} +1 -1
- package/dist/chunk-A2ULN3KX.js +40 -0
- package/dist/chunk-A2ULN3KX.js.map +1 -0
- package/dist/{chunk-DSB6X25D.js → chunk-AG44ZJ7W.js} +3 -3
- package/dist/{chunk-DSB6X25D.js.map → chunk-AG44ZJ7W.js.map} +1 -1
- package/dist/{chunk-SSCPTAFJ.js → chunk-CFL5IJHV.js} +3 -3
- package/dist/{chunk-SSCPTAFJ.js.map → chunk-CFL5IJHV.js.map} +1 -1
- package/dist/{chunk-36ML6SFP.js → chunk-CGJ7B6MZ.js} +4 -4
- package/dist/{chunk-36ML6SFP.js.map → chunk-CGJ7B6MZ.js.map} +1 -1
- package/dist/{chunk-6X4DHKHP.js → chunk-CT6NQSA4.js} +3 -3
- package/dist/{chunk-6X4DHKHP.js.map → chunk-CT6NQSA4.js.map} +1 -1
- package/dist/{chunk-5K2VT6E2.js → chunk-DXUQCMVT.js} +3 -3
- package/dist/{chunk-5K2VT6E2.js.map → chunk-DXUQCMVT.js.map} +1 -1
- package/dist/{chunk-B4IAZTZZ.js → chunk-EB6OPURC.js} +3 -3
- package/dist/{chunk-B4IAZTZZ.js.map → chunk-EB6OPURC.js.map} +1 -1
- package/dist/{chunk-252TK4RU.js → chunk-GFPG27HK.js} +12 -14
- package/dist/chunk-GFPG27HK.js.map +1 -0
- package/dist/{chunk-2EL2PBRC.js → chunk-H4EGUQ7M.js} +3 -3
- package/dist/{chunk-2EL2PBRC.js.map → chunk-H4EGUQ7M.js.map} +1 -1
- package/dist/{chunk-YQEF36D5.js → chunk-H5G3OYY6.js} +4 -4
- package/dist/{chunk-YQEF36D5.js.map → chunk-H5G3OYY6.js.map} +1 -1
- package/dist/{chunk-C75VKXAM.js → chunk-HD5K3BYW.js} +3 -3
- package/dist/{chunk-C75VKXAM.js.map → chunk-HD5K3BYW.js.map} +1 -1
- package/dist/{chunk-VJNTB4DN.js → chunk-HTBGJCKP.js} +4 -4
- package/dist/{chunk-VJNTB4DN.js.map → chunk-HTBGJCKP.js.map} +1 -1
- package/dist/{chunk-JEPSP6XK.js → chunk-HWE3FXF4.js} +17 -11
- package/dist/chunk-HWE3FXF4.js.map +1 -0
- package/dist/{chunk-QVLQGXT6.js → chunk-I3ITSUWS.js} +5 -5
- package/dist/{chunk-QVLQGXT6.js.map → chunk-I3ITSUWS.js.map} +1 -1
- package/dist/{chunk-H7N6RWNF.js → chunk-I7Z4FN52.js} +4 -4
- package/dist/{chunk-H7N6RWNF.js.map → chunk-I7Z4FN52.js.map} +1 -1
- package/dist/{chunk-WCWFS36P.js → chunk-IGXKUCLI.js} +3 -3
- package/dist/{chunk-WCWFS36P.js.map → chunk-IGXKUCLI.js.map} +1 -1
- package/dist/{chunk-VXPFSZDT.js → chunk-JFVEX4G5.js} +6 -6
- package/dist/{chunk-VXPFSZDT.js.map → chunk-JFVEX4G5.js.map} +1 -1
- package/dist/{chunk-YYH5EVPM.js → chunk-JUXQUZOQ.js} +12 -4
- package/dist/{chunk-YYH5EVPM.js.map → chunk-JUXQUZOQ.js.map} +1 -1
- package/dist/{chunk-M7GPCWEV.js → chunk-KREXWKVX.js} +3 -3
- package/dist/{chunk-M7GPCWEV.js.map → chunk-KREXWKVX.js.map} +1 -1
- package/dist/{chunk-TQ6XNACF.js → chunk-LHFZTVIM.js} +23 -24
- package/dist/chunk-LHFZTVIM.js.map +1 -0
- package/dist/{chunk-YV3YI3TA.js → chunk-MBVNMPG7.js} +4 -4
- package/dist/{chunk-YV3YI3TA.js.map → chunk-MBVNMPG7.js.map} +1 -1
- package/dist/{chunk-3C3ODIDE.js → chunk-MX7IRKTO.js} +6 -6
- package/dist/{chunk-3C3ODIDE.js.map → chunk-MX7IRKTO.js.map} +1 -1
- package/dist/{chunk-UDFWBALP.js → chunk-NFGRW3L7.js} +3 -3
- package/dist/{chunk-UDFWBALP.js.map → chunk-NFGRW3L7.js.map} +1 -1
- package/dist/{chunk-5LF27VUB.js → chunk-ODT7HSLI.js} +16 -15
- package/dist/chunk-ODT7HSLI.js.map +1 -0
- package/dist/{chunk-QBQITQAM.js → chunk-PV4OBVA3.js} +3 -3
- package/dist/{chunk-QBQITQAM.js.map → chunk-PV4OBVA3.js.map} +1 -1
- package/dist/{chunk-ORH2BZEM.js → chunk-QCI6D7E4.js} +69 -22
- package/dist/chunk-QCI6D7E4.js.map +1 -0
- package/dist/{chunk-DIQDYNXZ.js → chunk-QZLWJETK.js} +3 -3
- package/dist/{chunk-DIQDYNXZ.js.map → chunk-QZLWJETK.js.map} +1 -1
- package/dist/{chunk-TSVRKUGV.js → chunk-RP4B4HVX.js} +11 -2
- package/dist/chunk-RP4B4HVX.js.map +1 -0
- package/dist/{chunk-X4DKUGV4.js → chunk-RSHMAEK3.js} +7 -13
- package/dist/chunk-RSHMAEK3.js.map +1 -0
- package/dist/chunk-RVRB27AN.js +64 -0
- package/dist/chunk-RVRB27AN.js.map +1 -0
- package/dist/{chunk-5NYBY6ZE.js → chunk-TVOODIZE.js} +3 -3
- package/dist/{chunk-5NYBY6ZE.js.map → chunk-TVOODIZE.js.map} +1 -1
- package/dist/{chunk-FTPKMJFD.js → chunk-TVYLXZTT.js} +2 -2
- package/dist/{chunk-FTPKMJFD.js.map → chunk-TVYLXZTT.js.map} +1 -1
- package/dist/{chunk-EOKAFBJ7.js → chunk-TYUJB336.js} +3 -3
- package/dist/{chunk-EOKAFBJ7.js.map → chunk-TYUJB336.js.map} +1 -1
- package/dist/{chunk-OLMNDIAU.js → chunk-UVOJSWD2.js} +95 -320
- package/dist/chunk-UVOJSWD2.js.map +1 -0
- package/dist/{chunk-DOVURNRK.js → chunk-VDJKWKH2.js} +3 -3
- package/dist/chunk-VDJKWKH2.js.map +1 -0
- package/dist/{chunk-VDBP6Y5M.js → chunk-WCQMXBO5.js} +21 -47
- package/dist/chunk-WCQMXBO5.js.map +1 -0
- package/dist/{chunk-NLKIW2VI.js → chunk-WOJ4AK3Q.js} +3 -3
- package/dist/{chunk-NLKIW2VI.js.map → chunk-WOJ4AK3Q.js.map} +1 -1
- package/dist/{chunk-XU7JET5Z.js → chunk-X7MHVL4R.js} +16 -100
- package/dist/chunk-X7MHVL4R.js.map +1 -0
- package/dist/{chunk-K3IBZ2UZ.js → chunk-XUUYAS3Z.js} +3 -3
- package/dist/{chunk-K3IBZ2UZ.js.map → chunk-XUUYAS3Z.js.map} +1 -1
- package/dist/{chunk-BCUVRJXV.js → chunk-XWLEXD34.js} +3 -3
- package/dist/{chunk-BCUVRJXV.js.map → chunk-XWLEXD34.js.map} +1 -1
- package/dist/{chunk-P7BU6DAC.js → chunk-YOWFUJO7.js} +69 -31
- package/dist/chunk-YOWFUJO7.js.map +1 -0
- package/dist/{chunk-OQRB7JUS.js → chunk-YV4J7V53.js} +3 -3
- package/dist/{chunk-OQRB7JUS.js.map → chunk-YV4J7V53.js.map} +1 -1
- package/dist/{chunk-JXT46QFC.js → chunk-ZDKJHQY2.js} +2 -2
- package/dist/{chunk-JXT46QFC.js.map → chunk-ZDKJHQY2.js.map} +1 -1
- package/dist/cli/index.js +375 -699
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts +1 -8
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +5 -12
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +74 -58
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/show.d.ts +1 -1
- package/dist/cli/src/commands/skailify-lib.d.ts +0 -31
- package/dist/cli/src/commands/skailify-lib.d.ts.map +1 -1
- package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts +20 -2
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts +2 -2
- package/dist/cli/src/hooks/pre-commit-version.d.ts +1 -1
- package/dist/cli/src/skill-walker.d.ts +7 -10
- package/dist/cli/src/skill-walker.d.ts.map +1 -1
- package/dist/connectors/config.js +6 -5
- package/dist/connectors/index.js +21 -20
- package/dist/core/discovery.js +1 -1
- package/dist/core/index.js +9 -8
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/plugin-groupings.d.ts +2 -0
- package/dist/core/plugin-groupings.js +4 -0
- package/dist/core/plugin-groupings.js.map +1 -0
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +6 -5
- package/dist/core/src/discovery.d.ts +11 -51
- package/dist/core/src/discovery.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +3 -2
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +6 -33
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/plugin-groupings.d.ts +31 -0
- package/dist/core/src/plugin-groupings.d.ts.map +1 -0
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/settings.d.ts +1 -1
- package/dist/core/src/workspace-config.d.ts +1 -1
- package/dist/core/workspace-config.js +5 -4
- package/dist/deploy/index.js +9 -8
- package/dist/deploy/index.js.map +1 -1
- package/dist/discovery/index.js +6 -5
- package/dist/discovery/src/discover.d.ts +9 -25
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/index.d.ts +0 -2
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/source-config.d.ts +13 -9
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts +6 -11
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-J5CDTQ36.js → ensure-sources-G4FXTJDB.js} +18 -17
- package/dist/ensure-sources-G4FXTJDB.js.map +1 -0
- package/dist/factory-assets/README.md +1 -1
- package/dist/factory-assets/connectors/box.js +21 -20
- package/dist/factory-assets/connectors/deploy.js +21 -20
- package/dist/factory-assets/connectors/devserver.js +21 -20
- package/dist/factory-assets/connectors/flow/CONNECTOR.md +6 -1
- package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/adapter.js +21 -20
- package/dist/factory-assets/connectors/flow/contract/flow.v2.schema.json +13 -3
- package/dist/factory-assets/connectors/flow/contract/index.d.ts +1 -0
- package/dist/factory-assets/connectors/flow/contract/index.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts +21 -5
- package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract/schema.d.ts +2 -0
- package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract/sub-flow-output.d.ts +20 -0
- package/dist/factory-assets/connectors/flow/contract/sub-flow-output.d.ts.map +1 -0
- package/dist/factory-assets/connectors/flow/contract.js +4 -4
- package/dist/factory-assets/connectors/flow/engine/bindings.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts +12 -0
- package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts.map +1 -0
- package/dist/factory-assets/connectors/flow/engine/index.d.ts +1 -0
- package/dist/factory-assets/connectors/flow/engine/index.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/loader.d.ts +3 -3
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts +2 -2
- package/dist/factory-assets/connectors/flow/engine/locate.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/types.d.ts +0 -2
- package/dist/factory-assets/connectors/flow/engine/types.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +13 -12
- package/dist/factory-assets/connectors/flow/inline-sub-flow-host.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/prompt-fragments.js +3 -3
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +23 -22
- package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts +6 -5
- package/dist/factory-assets/connectors/flow/sub-flow-runner.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow.js +21 -20
- package/dist/factory-assets/connectors/git.js +21 -20
- package/dist/factory-assets/connectors/gmail.js +21 -20
- package/dist/factory-assets/connectors/googledrive.js +21 -20
- package/dist/factory-assets/connectors/local.js +21 -20
- package/dist/factory-assets/connectors/mattermost.js +21 -20
- package/dist/factory-assets/connectors/memory.js +21 -20
- package/dist/factory-assets/connectors/minio.js +21 -20
- package/dist/factory-assets/connectors/postgres.js +21 -20
- package/dist/factory-assets/connectors/s3.js +21 -20
- package/dist/factory-assets/connectors/sharepoint.js +21 -20
- package/dist/factory-assets/connectors/sqlite.js +21 -20
- package/dist/factory-assets/connectors/static-server.js +21 -20
- package/dist/factory-assets/connectors/tunnel.js +21 -20
- package/dist/factory-assets/connectors/webdav.js +21 -20
- package/dist/factory-assets/connectors/xstate-store.js +21 -20
- package/dist/factory-assets/connectors/xstate.js +21 -20
- package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +37 -26
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +2 -2
- package/dist/factory-assets/skills/skailify/SKILL.md +10 -19
- package/dist/{flows-PX53XFV7.js → flows-7E2GVW5L.js} +14 -13
- package/dist/{flows-PX53XFV7.js.map → flows-7E2GVW5L.js.map} +1 -1
- package/dist/{helpers-EP6H3O3S.js → helpers-EVPKJXGS.js} +18 -17
- package/dist/{helpers-EP6H3O3S.js.map → helpers-EVPKJXGS.js.map} +1 -1
- package/dist/library/index.js +13 -12
- package/dist/library/install.js +2 -2
- package/dist/library/src/index.d.ts +1 -1
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/local/db.d.ts.map +1 -1
- package/dist/library/src/local/library-manager.d.ts.map +1 -1
- package/dist/library/src/local/library.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +0 -9
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/local/schema.d.ts +1 -20
- package/dist/library/src/local/schema.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +1 -11
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/library/src/sync/manifest-writeback.d.ts +5 -5
- package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
- package/dist/library/src/user-library.d.ts +1 -9
- package/dist/library/src/user-library.d.ts.map +1 -1
- package/dist/{library-publish-KKT73FJK.js → library-publish-SBEWWTPM.js} +25 -24
- package/dist/library-publish-SBEWWTPM.js.map +1 -0
- package/dist/open-library-UAZIGZUQ.js +39 -0
- package/dist/{open-library-R62UBL6E.js.map → open-library-UAZIGZUQ.js.map} +1 -1
- package/dist/paths-U7TA7MTE.js +22 -0
- package/dist/{paths-W4LDORQQ.js.map → paths-U7TA7MTE.js.map} +1 -1
- package/dist/{plugin-store-D45CREMJ.js → plugin-store-TT45MGQZ.js} +11 -10
- package/dist/plugin-store-TT45MGQZ.js.map +1 -0
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/src/catalog-source.d.ts +4 -55
- 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-GCW5DFAB.js → project-JLD5RCVK.js} +19 -18
- package/dist/{project-GCW5DFAB.js.map → project-JLD5RCVK.js.map} +1 -1
- package/dist/resolver/index.js +10 -9
- package/dist/runner/index.js +32 -31
- package/dist/runner/src/compaction/orchestrator.d.ts +2 -1
- package/dist/runner/src/compaction/orchestrator.d.ts.map +1 -1
- package/dist/runner/src/compaction-gate.d.ts +13 -0
- package/dist/runner/src/compaction-gate.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +15 -14
- package/dist/sdk/bridge.js +13 -12
- package/dist/sdk/core.js +9 -8
- package/dist/sdk/flow.js +13 -12
- package/dist/sdk/index.js +32 -31
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +10 -9
- package/dist/sdk/runner.js +32 -31
- package/dist/secrets/index.js +2 -2
- package/dist/{setup-Q3LXY5AE.js → setup-PGZM4SOO.js} +23 -22
- package/dist/setup-PGZM4SOO.js.map +1 -0
- package/dist/skills-7QVYPIXI.js +26 -0
- package/dist/{skills-R3RPIPWP.js.map → skills-7QVYPIXI.js.map} +1 -1
- package/dist/source-SDZYXVVV.js +40 -0
- package/dist/{source-CFQESKJU.js.map → source-SDZYXVVV.js.map} +1 -1
- package/dist/{source-manifest-publish-3TCBA2RV.js → source-manifest-publish-UDLTYV6Y.js} +26 -25
- package/dist/source-manifest-publish-UDLTYV6Y.js.map +1 -0
- package/dist/tui/index.js +32 -31
- package/dist/tui/index.js.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +16 -15
- package/dist/workspace-plugin/adapters/omp.js +13 -13
- package/dist/workspace-plugin/adapters/omp.js.map +1 -1
- package/dist/workspace-plugin/index.js +1 -1
- package/dist/workspace-plugin/src/adapters/mcp.d.ts +4 -4
- package/dist/workspace-plugin/src/adapters/mcp.d.ts.map +1 -1
- package/dist/workspace-plugin/src/adapters/omp.d.ts +2 -2
- package/dist/workspace-plugin/src/tools/skills.d.ts +5 -17
- package/dist/workspace-plugin/src/tools/skills.d.ts.map +1 -1
- package/package.json +7 -1
- package/dist/asset-feeds-KXL45ALC.js.map +0 -1
- package/dist/chunk-252TK4RU.js.map +0 -1
- package/dist/chunk-5LF27VUB.js.map +0 -1
- package/dist/chunk-5RWL4L3X.js.map +0 -1
- package/dist/chunk-7RC37XFW.js.map +0 -1
- package/dist/chunk-A5EDMBFG.js.map +0 -1
- package/dist/chunk-DOVURNRK.js.map +0 -1
- package/dist/chunk-JEPSP6XK.js.map +0 -1
- package/dist/chunk-OLMNDIAU.js.map +0 -1
- package/dist/chunk-ORH2BZEM.js.map +0 -1
- package/dist/chunk-P7BU6DAC.js.map +0 -1
- package/dist/chunk-QVZA2MDT.js +0 -81
- package/dist/chunk-QVZA2MDT.js.map +0 -1
- package/dist/chunk-TQ6XNACF.js.map +0 -1
- package/dist/chunk-TSVRKUGV.js.map +0 -1
- package/dist/chunk-VDBP6Y5M.js.map +0 -1
- package/dist/chunk-X4DKUGV4.js.map +0 -1
- package/dist/chunk-XU7JET5Z.js.map +0 -1
- package/dist/discovery/src/domains.d.ts +0 -149
- package/dist/discovery/src/domains.d.ts.map +0 -1
- package/dist/ensure-sources-J5CDTQ36.js.map +0 -1
- package/dist/library-publish-KKT73FJK.js.map +0 -1
- package/dist/open-library-R62UBL6E.js +0 -38
- package/dist/paths-W4LDORQQ.js +0 -21
- package/dist/plugin-store-D45CREMJ.js.map +0 -1
- package/dist/setup-Q3LXY5AE.js.map +0 -1
- package/dist/skills-R3RPIPWP.js +0 -25
- package/dist/source-CFQESKJU.js +0 -39
- package/dist/source-manifest-publish-3TCBA2RV.js.map +0 -1
package/dist/cli/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { AI_RESOURCES } from '../chunk-
|
|
3
|
-
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-
|
|
4
|
-
import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-
|
|
8
|
-
import { logErr, S, logOk, logInfo, logWarn, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-
|
|
9
|
-
import { LocalSecretsProvider } from '../chunk-
|
|
10
|
-
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-
|
|
11
|
-
import { buildClaudePluginFiles } from '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
15
|
-
import '../chunk-
|
|
2
|
+
import { AI_RESOURCES } from '../chunk-HTBGJCKP.js';
|
|
3
|
+
import { makeInstallCommand, makeCheckCommand, makeCleanCommand, reportInstalledSoftDeps } from '../chunk-32DMH2GD.js';
|
|
4
|
+
import { makeProvidersCommand, loadRegistryView, addProviderEntry, ProviderRegistryWriteError } from '../chunk-I3ITSUWS.js';
|
|
5
|
+
import { makeSourceCommand, syncProjectSources } from '../chunk-ODT7HSLI.js';
|
|
6
|
+
import { getStoreConfig, storeFetch, deviceLogin, loadStoreAuthConfig, logout, hasStoredAuth, isStoreAuthenticated, getStoreToken, getStoreIdentity, refFor } from '../chunk-I7Z4FN52.js';
|
|
7
|
+
import { openCatalogSource, openLibraryManager, createFullRegistry, openLibrary } from '../chunk-MX7IRKTO.js';
|
|
8
|
+
import { logErr, S, logOk, logInfo, logWarn, kindColorPad, kindColor, colorRef, formatSoftDepSection, bareSoftDepName, formatSoftDepHint, formatRelativeTime, formatSoftDepRemovePreview, formatSoftDepAddPreview, fitWidth, KIND_COL_WIDTH } from '../chunk-WOJ4AK3Q.js';
|
|
9
|
+
import { LocalSecretsProvider } from '../chunk-EB6OPURC.js';
|
|
10
|
+
import { runAgentChat, loadSessionById, loadSession, listSessions, setCurrentSession, deleteSession, clearSession, loadAgentManifest, compileComposition, MarkdownStreamer, resolveMixin } from '../chunk-YOWFUJO7.js';
|
|
11
|
+
import { buildClaudePluginFiles } from '../chunk-TVYLXZTT.js';
|
|
12
|
+
import '../chunk-RSHMAEK3.js';
|
|
13
|
+
import '../chunk-PV4OBVA3.js';
|
|
14
|
+
import '../chunk-R6O6YWU7.js';
|
|
15
|
+
import '../chunk-WCQMXBO5.js';
|
|
16
|
+
import '../chunk-TYUJB336.js';
|
|
16
17
|
import '../chunk-4ZTPYIBE.js';
|
|
17
18
|
import '../chunk-35G4M33T.js';
|
|
18
|
-
import '../chunk-R6O6YWU7.js';
|
|
19
19
|
import '../chunk-X5YPJV4N.js';
|
|
20
20
|
import '../chunk-O7SG5PC2.js';
|
|
21
21
|
import '../chunk-7QBNJTTQ.js';
|
|
@@ -24,54 +24,55 @@ import '../chunk-5LKOAX7I.js';
|
|
|
24
24
|
import '../chunk-32NA4TVC.js';
|
|
25
25
|
import '../chunk-W3UDISS2.js';
|
|
26
26
|
import '../chunk-HCYS7GFP.js';
|
|
27
|
-
import { runFlow, resumeFlow } from '../chunk-
|
|
27
|
+
import { runFlow, resumeFlow } from '../chunk-GFPG27HK.js';
|
|
28
28
|
import '../chunk-4R6DROGN.js';
|
|
29
|
-
import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-
|
|
30
|
-
import '../chunk-
|
|
31
|
-
import '../chunk-
|
|
32
|
-
import '../chunk-
|
|
29
|
+
import { validateFlowVersions, parseSkillFrontmatter } from '../chunk-YV4J7V53.js';
|
|
30
|
+
import '../chunk-VDJKWKH2.js';
|
|
31
|
+
import '../chunk-CT6NQSA4.js';
|
|
32
|
+
import '../chunk-53WMBXSL.js';
|
|
33
33
|
import '../chunk-KC3OF6B2.js';
|
|
34
|
-
import '../chunk-
|
|
35
|
-
import '../chunk-
|
|
36
|
-
import '../chunk-
|
|
34
|
+
import '../chunk-H5G3OYY6.js';
|
|
35
|
+
import '../chunk-KREXWKVX.js';
|
|
36
|
+
import '../chunk-TVOODIZE.js';
|
|
37
37
|
import '../chunk-EINLFFP6.js';
|
|
38
38
|
import '../chunk-LOO5CB5M.js';
|
|
39
39
|
import '../chunk-RDYI4MML.js';
|
|
40
|
-
import '../chunk-
|
|
40
|
+
import '../chunk-IGXKUCLI.js';
|
|
41
41
|
import '../chunk-XBSQ4KMC.js';
|
|
42
42
|
import '../chunk-YROR332M.js';
|
|
43
|
-
import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-
|
|
43
|
+
import { getProviderPreset, AI_PROVIDER_PRESETS } from '../chunk-RP4B4HVX.js';
|
|
44
44
|
import '../chunk-6E6PKKAD.js';
|
|
45
45
|
import '../chunk-IFGTRL2I.js';
|
|
46
|
-
import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-
|
|
47
|
-
import '../chunk-
|
|
48
|
-
import '../chunk-
|
|
49
|
-
import '../chunk-
|
|
50
|
-
import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-
|
|
51
|
-
import '../chunk-
|
|
46
|
+
import { projectAiAssetsRoots, loadFlow, loadAllFlowEntries, findFlowFileInRoots } from '../chunk-22DN3DB2.js';
|
|
47
|
+
import '../chunk-JUXQUZOQ.js';
|
|
48
|
+
import '../chunk-QZLWJETK.js';
|
|
49
|
+
import '../chunk-XUUYAS3Z.js';
|
|
50
|
+
import { nodeLabel, nodeSkillAsset, nodeIsInert, nodeIsOptional, nodeRunKind, flowSkillVersionPins } from '../chunk-NFGRW3L7.js';
|
|
51
|
+
import '../chunk-QCI6D7E4.js';
|
|
52
52
|
import '../chunk-IDEA6CYI.js';
|
|
53
|
-
import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-
|
|
54
|
-
import { cloneOrInitGitRepo, ensureGitRepo, isGitRepo, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-
|
|
55
|
-
import
|
|
56
|
-
import '../chunk-
|
|
53
|
+
import { AssetManager, NON_DEPLOYABLE_KINDS, MissingManifestError, parseRefTolerant, normalizeRepoUrl, FACTORY_SOURCE_URL } from '../chunk-LHFZTVIM.js';
|
|
54
|
+
import { cloneOrInitGitRepo, ensureGitRepo, isGitRepo, getStoreManifestsDir, getDefaultValue, isSecretPlaceholder } from '../chunk-X7MHVL4R.js';
|
|
55
|
+
import '../chunk-UVOJSWD2.js';
|
|
56
|
+
import '../chunk-H4EGUQ7M.js';
|
|
57
57
|
import '../chunk-R7FOF242.js';
|
|
58
|
-
import '../chunk-
|
|
59
|
-
import '../chunk-
|
|
58
|
+
import '../chunk-ZDKJHQY2.js';
|
|
59
|
+
import '../chunk-7QMRP6BC.js';
|
|
60
60
|
import '../chunk-CGYEHQOX.js';
|
|
61
|
-
import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, aiResourceRoots, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-
|
|
61
|
+
import { resolveSettings, globalSettingsPath, projectSettingsPath, loadSettings, saveSettings, WorkspaceYamlEditor, resolveLibraryDir, checkAgentSkillConformance, aiResourceRoots, readLock, workspaceProviderRegistryPath, userProviderRegistryPath, loadProviderRegistryFile } from '../chunk-MBVNMPG7.js';
|
|
62
62
|
import '../chunk-4GY63JU6.js';
|
|
63
|
-
import { factoryAssetRoots } from '../chunk-
|
|
63
|
+
import { factoryAssetRoots } from '../chunk-CGJ7B6MZ.js';
|
|
64
64
|
import '../chunk-KAJH3XPW.js';
|
|
65
65
|
import { DRIVER_DEFAULTS } from '../chunk-K5GBV4SA.js';
|
|
66
|
-
import {
|
|
67
|
-
import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-
|
|
66
|
+
import { findKindDirs } from '../chunk-A2ULN3KX.js';
|
|
67
|
+
import { sourceCacheKey, getGlobalCacheDir, resolveAgentDir, AgentRefResolutionError, matchPin, coerceVersion, loadSkWorkspaceConfig, resolveSkWorkspaceConfig, storeManifestSlug, isWorkspaceConfigFilename } from '../chunk-HWE3FXF4.js';
|
|
68
68
|
import { globalCacheRoot, globalSkaileDir } from '../chunk-TLKM4M47.js';
|
|
69
69
|
import { SUPPORTED_DRIVER_TARGETS } from '../chunk-EB4ZTESQ.js';
|
|
70
|
-
import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
70
|
+
import { SKAILE_MANIFEST_FILENAME, decodeSkaileManifest, loadSkPublishManifest, saveSkPublishManifest } from '../chunk-AG44ZJ7W.js';
|
|
71
|
+
import { pluginTitle } from '../chunk-RVRB27AN.js';
|
|
72
|
+
import { parseFrontmatter, scanDirectory } from '../chunk-DXUQCMVT.js';
|
|
73
|
+
import { parseAssetRef, ASSET_KINDS, isValidAssetName, slugifyAssetName, ASSET_NAME_HINT, assetRefToStr } from '../chunk-43ZBF3WH.js';
|
|
74
74
|
import { portableSpawn, portableSpawnSync } from '../chunk-ICSCSM5D.js';
|
|
75
|
+
import { openSqlite } from '../chunk-JMKB7IB4.js';
|
|
75
76
|
import { parseModelRef, resolveEntryBaseUrl } from '../chunk-MJHSLODD.js';
|
|
76
77
|
import '../chunk-C3CAXQMA.js';
|
|
77
78
|
import '../chunk-BOFL7GIF.js';
|
|
@@ -142,7 +143,7 @@ async function runSearch(kind, query, opts) {
|
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
145
|
async function searchIndex(query, kind) {
|
|
145
|
-
const { openLibrary: openLibrary2 } = await import('../open-library-
|
|
146
|
+
const { openLibrary: openLibrary2 } = await import('../open-library-UAZIGZUQ.js');
|
|
146
147
|
const library = await openLibrary2();
|
|
147
148
|
try {
|
|
148
149
|
const defs = await library.listAssetDefs(kind ? { kind } : {});
|
|
@@ -195,7 +196,7 @@ async function searchLocal(query, kind, opts, showStore, airGapped) {
|
|
|
195
196
|
const factory = await searchFactory(projectDir, query, kind);
|
|
196
197
|
let entries = unionEntries(await searchIndex(query, kind), factory);
|
|
197
198
|
if (entries.length === 0 && !query && !kind && !airGapped) {
|
|
198
|
-
const { autoSyncForSearch } = await import('../source-
|
|
199
|
+
const { autoSyncForSearch } = await import('../source-SDZYXVVV.js');
|
|
199
200
|
if (await autoSyncForSearch(projectDir)) {
|
|
200
201
|
entries = unionEntries(await searchIndex(query, kind), factory);
|
|
201
202
|
}
|
|
@@ -265,7 +266,7 @@ async function searchStore(query, kind, opts, airGapped) {
|
|
|
265
266
|
logInfo("air-gapped (cache_ttl: 0) \u2014 local sources only");
|
|
266
267
|
return;
|
|
267
268
|
}
|
|
268
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
269
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
|
|
269
270
|
try {
|
|
270
271
|
const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
|
|
271
272
|
const assets = await remote.listAssets(kind ? { kind } : {});
|
|
@@ -561,7 +562,7 @@ function catalogAssetToEntry(a) {
|
|
|
561
562
|
// `repository: @admin` for a store hit and `admin` for a local one.
|
|
562
563
|
publisher: a.publisher.replace(/^@/, ""),
|
|
563
564
|
repo: a.repo,
|
|
564
|
-
|
|
565
|
+
plugin: a.plugin,
|
|
565
566
|
category: a.category,
|
|
566
567
|
version: a.version,
|
|
567
568
|
requires: [],
|
|
@@ -583,7 +584,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
583
584
|
return { entry: match ?? deployed };
|
|
584
585
|
}
|
|
585
586
|
const lookup = opts.storeLookup ?? (async (filter) => {
|
|
586
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
587
|
+
const { resolveCatalogSource } = await import('../open-library-UAZIGZUQ.js');
|
|
587
588
|
const { source, close } = await resolveCatalogSource({ projectDir: opts.projectDir });
|
|
588
589
|
try {
|
|
589
590
|
return await source.listAssets(filter);
|
|
@@ -599,7 +600,7 @@ async function resolveInfoEntry(am2, ref, opts) {
|
|
|
599
600
|
);
|
|
600
601
|
return { entry: hit ? catalogAssetToEntry(hit) : null };
|
|
601
602
|
} catch (err) {
|
|
602
|
-
const { LocalCatalogDisabledError } = await import('../open-library-
|
|
603
|
+
const { LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
|
|
603
604
|
const storeNote = err instanceof Error ? err.message : String(err);
|
|
604
605
|
const disabled = err instanceof LocalCatalogDisabledError || /catalog\.url/i.test(storeNote);
|
|
605
606
|
return { entry: null, storeNote, ...disabled ? { storeDisabled: true } : {} };
|
|
@@ -757,52 +758,6 @@ ${body}
|
|
|
757
758
|
const changed = notes.length > 0;
|
|
758
759
|
return { content, name, originalName, changed, notes };
|
|
759
760
|
}
|
|
760
|
-
var DOMAIN_TEMPLATE = (slug, publisher, description) => {
|
|
761
|
-
const fm = stringify({ slug, title: slug, publisher, description }).trimEnd();
|
|
762
|
-
return `---
|
|
763
|
-
${fm}
|
|
764
|
-
---
|
|
765
|
-
|
|
766
|
-
# ${slug}
|
|
767
|
-
|
|
768
|
-
${description}
|
|
769
|
-
`;
|
|
770
|
-
};
|
|
771
|
-
function ensureDomain(libraryPath, domain, opts = {}) {
|
|
772
|
-
const dir = path35.join(libraryPath, domain);
|
|
773
|
-
const domainFile = path35.join(dir, "DOMAIN.md");
|
|
774
|
-
if (fs11.existsSync(domainFile)) {
|
|
775
|
-
const existing = readDomainMd(libraryPath, domain);
|
|
776
|
-
return {
|
|
777
|
-
dir,
|
|
778
|
-
publisher: existing?.publisher ?? opts.publisher ?? slugifyAssetName(domain),
|
|
779
|
-
created: false
|
|
780
|
-
};
|
|
781
|
-
}
|
|
782
|
-
if (!isValidDomainSlug(domain)) {
|
|
783
|
-
throw new Error(
|
|
784
|
-
`Invalid domain name "${domain}": use lowercase a-z, 0-9 and single hyphens (max 39 chars), e.g. "my-domain".`
|
|
785
|
-
);
|
|
786
|
-
}
|
|
787
|
-
const publisher = opts.publisher ?? slugifyAssetName(domain);
|
|
788
|
-
fs11.mkdirSync(dir, { recursive: true });
|
|
789
|
-
const description = opts.description ?? `The ${domain} domain.`;
|
|
790
|
-
fs11.writeFileSync(domainFile, DOMAIN_TEMPLATE(domain, publisher, description), "utf8");
|
|
791
|
-
return { dir, publisher, created: true };
|
|
792
|
-
}
|
|
793
|
-
function readDomainMd(libraryPath, domain) {
|
|
794
|
-
const domainFile = path35.join(libraryPath, domain, "DOMAIN.md");
|
|
795
|
-
try {
|
|
796
|
-
const { data } = parseFrontmatter(fs11.readFileSync(domainFile, "utf8"));
|
|
797
|
-
return parseDomainMd(`${domain}/DOMAIN.md`, data);
|
|
798
|
-
} catch {
|
|
799
|
-
return void 0;
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
function listDomains(libraryPath) {
|
|
803
|
-
if (!fs11.existsSync(libraryPath)) return [];
|
|
804
|
-
return fs11.readdirSync(libraryPath, { withFileTypes: true }).filter((e) => e.isDirectory() && fs11.existsSync(path35.join(libraryPath, e.name, "DOMAIN.md"))).map((e) => e.name).sort();
|
|
805
|
-
}
|
|
806
761
|
function upsertManifestAsset(libraryPath, input) {
|
|
807
762
|
const manifest = loadSkPublishManifest(libraryPath) ?? { assets: [] };
|
|
808
763
|
const assets = Array.isArray(manifest.assets) ? [...manifest.assets] : [];
|
|
@@ -850,7 +805,7 @@ function withCanonicalRef(def) {
|
|
|
850
805
|
}
|
|
851
806
|
function makeAssetCommand() {
|
|
852
807
|
const cmd = new Command("asset").description("Author and install AI assets");
|
|
853
|
-
cmd.command("import <name-or-path>").description("Import + skailify an existing coding-agent skill into a library").option("--to <library>", "Target library (default: auto / personal)").option("--
|
|
808
|
+
cmd.command("import <name-or-path>").description("Import + skailify an existing coding-agent skill into a library").option("--to <library>", "Target library (default: auto / personal)").option("--version <semver>", "Version to stamp when the skill ships none").option("--stage <stage>", "Lifecycle stage to stamp (default: alpha)").option("--no-normalize", "Copy verbatim \u2014 skip frontmatter normalization").option("--commit", "Auto-commit in git-backed libraries", false).action(
|
|
854
809
|
async (nameOrPath, opts) => {
|
|
855
810
|
const src = resolveImportSource(nameOrPath);
|
|
856
811
|
if (!src) {
|
|
@@ -885,22 +840,7 @@ function makeAssetCommand() {
|
|
|
885
840
|
`Name "${norm.name}" is not canonical (kebab-case); \`skaile validate\` will reject this manifest entry. Drop --no-normalize to slugify it.`
|
|
886
841
|
);
|
|
887
842
|
}
|
|
888
|
-
|
|
889
|
-
let publisher;
|
|
890
|
-
if (opts.domain) {
|
|
891
|
-
let dom;
|
|
892
|
-
try {
|
|
893
|
-
dom = ensureDomain(target.path, opts.domain);
|
|
894
|
-
} catch (err) {
|
|
895
|
-
logErr(err instanceof Error ? err.message : String(err));
|
|
896
|
-
process.exit(1);
|
|
897
|
-
}
|
|
898
|
-
if (dom.created) logOk(`Scaffolded domain ${S.cmd(opts.domain)} \u2192 ${dom.dir}`);
|
|
899
|
-
destParent = path35.join(dom.dir, "skills");
|
|
900
|
-
publisher = dom.publisher;
|
|
901
|
-
}
|
|
902
|
-
fs11.mkdirSync(destParent, { recursive: true });
|
|
903
|
-
const destDir = path35.join(destParent, norm.name);
|
|
843
|
+
const destDir = path35.join(target.path, norm.name);
|
|
904
844
|
if (fs11.existsSync(destDir)) {
|
|
905
845
|
logErr(`Destination already exists: ${destDir}`);
|
|
906
846
|
process.exit(1);
|
|
@@ -920,7 +860,6 @@ function makeAssetCommand() {
|
|
|
920
860
|
name: norm.name,
|
|
921
861
|
root,
|
|
922
862
|
version: opts.version,
|
|
923
|
-
publisher,
|
|
924
863
|
description
|
|
925
864
|
});
|
|
926
865
|
logOk(`${up.added ? "Added" : "Updated"} manifest entry skill:${norm.name}`);
|
|
@@ -942,7 +881,7 @@ function makeAssetCommand() {
|
|
|
942
881
|
}
|
|
943
882
|
}
|
|
944
883
|
);
|
|
945
|
-
cmd.command("migrate <path>").description("Move/copy/link a workspace asset into a library").option("--to <library>", "Target library (default: auto)").option("--
|
|
884
|
+
cmd.command("migrate <path>").description("Move/copy/link a workspace asset into a library").option("--to <library>", "Target library (default: auto)").option("--mode <mode>", "copy | move | link", "copy").option("--commit", "Auto-commit in git-backed libraries", false).action(
|
|
946
885
|
async (srcPath, opts) => {
|
|
947
886
|
if (!["copy", "move", "link"].includes(opts.mode)) {
|
|
948
887
|
logErr(`Invalid --mode "${opts.mode}". Expected: copy | move | link.`);
|
|
@@ -974,7 +913,7 @@ function makeAssetCommand() {
|
|
|
974
913
|
process.exit(1);
|
|
975
914
|
}
|
|
976
915
|
const basename2 = path35.basename(srcPath);
|
|
977
|
-
const destDir = target.
|
|
916
|
+
const destDir = target.path;
|
|
978
917
|
fs11.mkdirSync(destDir, { recursive: true });
|
|
979
918
|
const destPath = path35.join(destDir, basename2);
|
|
980
919
|
if (fs11.existsSync(destPath)) {
|
|
@@ -1246,7 +1185,7 @@ function makeCatalogCommand() {
|
|
|
1246
1185
|
return catalog;
|
|
1247
1186
|
}
|
|
1248
1187
|
async function runLocalCatalogTest(projectDir) {
|
|
1249
|
-
const { resolveCatalogSource } = await import('../open-library-
|
|
1188
|
+
const { resolveCatalogSource } = await import('../open-library-UAZIGZUQ.js');
|
|
1250
1189
|
let resolved;
|
|
1251
1190
|
try {
|
|
1252
1191
|
resolved = await resolveCatalogSource({ projectDir });
|
|
@@ -1380,11 +1319,11 @@ function discoverFlows(projectDir) {
|
|
|
1380
1319
|
function findFlowFile(flowId, priorityRoots = [], projectDir) {
|
|
1381
1320
|
return findFlowFileInRoots(flowId, [...priorityRoots, ...aiResourceRoots(projectDir)]);
|
|
1382
1321
|
}
|
|
1383
|
-
function findSkills(
|
|
1322
|
+
function findSkills() {
|
|
1384
1323
|
const found = [];
|
|
1385
1324
|
for (const root of aiResourceRoots()) {
|
|
1386
|
-
for (const
|
|
1387
|
-
|
|
1325
|
+
for (const dir of findKindDirs(root, "skills")) {
|
|
1326
|
+
walkSkills(dir, found);
|
|
1388
1327
|
}
|
|
1389
1328
|
}
|
|
1390
1329
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -1396,15 +1335,15 @@ function findSkills(domain) {
|
|
|
1396
1335
|
}
|
|
1397
1336
|
return deduped;
|
|
1398
1337
|
}
|
|
1399
|
-
function walkSkills(dir,
|
|
1338
|
+
function walkSkills(dir, out) {
|
|
1400
1339
|
for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
|
|
1401
1340
|
const full = path35__default.join(dir, entry.name);
|
|
1402
1341
|
if (entry.isDirectory()) {
|
|
1403
1342
|
const skillMd = path35__default.join(full, "SKILL.md");
|
|
1404
1343
|
if (fs11__default.existsSync(skillMd)) {
|
|
1405
|
-
out.push({ name: entry.name, path: full, skillPath: skillMd
|
|
1344
|
+
out.push({ name: entry.name, path: full, skillPath: skillMd });
|
|
1406
1345
|
} else {
|
|
1407
|
-
walkSkills(full,
|
|
1346
|
+
walkSkills(full, out);
|
|
1408
1347
|
}
|
|
1409
1348
|
}
|
|
1410
1349
|
}
|
|
@@ -2300,7 +2239,7 @@ async function ensureTargetsRegistered(projectDir) {
|
|
|
2300
2239
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
2301
2240
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
2302
2241
|
if (config.plugins && config.plugins.length > 0) {
|
|
2303
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
2242
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-TT45MGQZ.js');
|
|
2304
2243
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
2305
2244
|
for (const f of result.failed) logWarn(f.error);
|
|
2306
2245
|
}
|
|
@@ -3138,15 +3077,10 @@ async function indexLibrary(lib, index) {
|
|
|
3138
3077
|
if (!index) own.close();
|
|
3139
3078
|
}
|
|
3140
3079
|
}
|
|
3141
|
-
function
|
|
3142
|
-
return readDomainMd(libraryPath, domain)?.publisher;
|
|
3143
|
-
}
|
|
3144
|
-
function resolveLibraryPublisher(lib, opts, domain, storeIdentity) {
|
|
3080
|
+
function resolveLibraryPublisher(lib, opts, storeIdentity) {
|
|
3145
3081
|
if (opts.publisher?.trim()) return opts.publisher.trim();
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
if (fromDomain) return fromDomain;
|
|
3149
|
-
}
|
|
3082
|
+
const declared = loadSkPublishManifest(lib.path)?.publisher?.trim();
|
|
3083
|
+
if (declared) return declared.startsWith("@") ? declared.slice(1) : declared;
|
|
3150
3084
|
const identity = (storeIdentity?.githubLogin ?? storeIdentity?.username)?.trim();
|
|
3151
3085
|
if (identity) return identity;
|
|
3152
3086
|
try {
|
|
@@ -3251,7 +3185,6 @@ function makeLibraryCommand() {
|
|
|
3251
3185
|
console.log(` ${S.label("backend")} ${l.backend}`);
|
|
3252
3186
|
console.log(` ${S.label("ownership")} ${l.ownership}`);
|
|
3253
3187
|
console.log(` ${S.label("path")} ${l.path}`);
|
|
3254
|
-
console.log(` ${S.label("structure")} ${l.structure ?? "(undetected)"}`);
|
|
3255
3188
|
console.log(` ${S.label("isDefault")} ${l.isDefault}`);
|
|
3256
3189
|
console.log(` ${S.label("manifestGen")} ${l.manifestGenerated}`);
|
|
3257
3190
|
console.log(` ${S.label("backendConfig")} ${JSON.stringify(l.backendConfig)}`);
|
|
@@ -3309,7 +3242,6 @@ function makeLibraryCommand() {
|
|
|
3309
3242
|
backend,
|
|
3310
3243
|
backendConfig,
|
|
3311
3244
|
ownership,
|
|
3312
|
-
structure: backend === "local" && blank ? "domain" : void 0,
|
|
3313
3245
|
isDefault
|
|
3314
3246
|
});
|
|
3315
3247
|
const scaffolded = blank ? scaffoldLibraryFiles(libPath, name) : [];
|
|
@@ -3379,8 +3311,7 @@ function makeLibraryCommand() {
|
|
|
3379
3311
|
"Description is a TODO placeholder \u2014 edit it (what the skill does and when to use it) or `skaile validate` will fail."
|
|
3380
3312
|
);
|
|
3381
3313
|
}
|
|
3382
|
-
const
|
|
3383
|
-
const publisher = resolveLibraryPublisher(target, opts, domain2, getStoreIdentity());
|
|
3314
|
+
const publisher = resolveLibraryPublisher(target, opts, getStoreIdentity());
|
|
3384
3315
|
stampAssetPublisher(res.path, publisher);
|
|
3385
3316
|
ensureManifestPublisher(target.path, publisher);
|
|
3386
3317
|
upsertManifestAsset(target.path, {
|
|
@@ -3400,7 +3331,6 @@ function makeLibraryCommand() {
|
|
|
3400
3331
|
}
|
|
3401
3332
|
}
|
|
3402
3333
|
);
|
|
3403
|
-
const domain = cmd.command("domain").description("Manage domains (publisher namespaces) inside a library");
|
|
3404
3334
|
async function resolveTargetLibrary(manager, libraryName) {
|
|
3405
3335
|
if (libraryName) return manager.requireLibrary(libraryName);
|
|
3406
3336
|
const def = await manager.findDefaultLibrary();
|
|
@@ -3412,72 +3342,6 @@ function makeLibraryCommand() {
|
|
|
3412
3342
|
logErr("No default library set. Run `skaile library default <name>` or pass --library.");
|
|
3413
3343
|
process.exit(1);
|
|
3414
3344
|
}
|
|
3415
|
-
domain.command("create <name>").description("Scaffold a domain dir + DOMAIN.md inside a library").option("--library <name>", "Target library (default: the default-marked one)").option("--publisher <p>", "Publisher slug (default: the domain name kebab-cased)").option("--description <text>", "Domain description for DOMAIN.md").action(
|
|
3416
|
-
async (name, opts) => {
|
|
3417
|
-
const { manager, close } = await openLibraryManager();
|
|
3418
|
-
try {
|
|
3419
|
-
const target = await resolveTargetLibrary(manager, opts.library);
|
|
3420
|
-
if (target.ownership === "reader") {
|
|
3421
|
-
logErr(`Library "${target.name}" is read-only (ownership=reader).`);
|
|
3422
|
-
process.exit(1);
|
|
3423
|
-
}
|
|
3424
|
-
let res;
|
|
3425
|
-
try {
|
|
3426
|
-
res = ensureDomain(target.path, name, {
|
|
3427
|
-
publisher: opts.publisher,
|
|
3428
|
-
description: opts.description
|
|
3429
|
-
});
|
|
3430
|
-
} catch (err) {
|
|
3431
|
-
logErr(err instanceof Error ? err.message : String(err));
|
|
3432
|
-
process.exit(1);
|
|
3433
|
-
}
|
|
3434
|
-
if (target.structure !== "domain") {
|
|
3435
|
-
await manager.updateLibrary(target.id, { structure: "domain" });
|
|
3436
|
-
}
|
|
3437
|
-
if (res.created) {
|
|
3438
|
-
logOk(`Created domain ${S.cmd(name)} (publisher @${res.publisher}) \u2192 ${res.dir}`);
|
|
3439
|
-
} else {
|
|
3440
|
-
logInfo(`Domain ${S.cmd(name)} already exists at ${res.dir}`);
|
|
3441
|
-
}
|
|
3442
|
-
} finally {
|
|
3443
|
-
close();
|
|
3444
|
-
}
|
|
3445
|
-
}
|
|
3446
|
-
);
|
|
3447
|
-
domain.command("list").description("List domains in a library").option("--library <name>", "Target library (default: the default-marked one)").option("--json", "Output as JSON").action(async (opts) => {
|
|
3448
|
-
const { manager, close } = await openLibraryManager();
|
|
3449
|
-
try {
|
|
3450
|
-
const target = await resolveTargetLibrary(manager, opts.library);
|
|
3451
|
-
const domains = listDomains(target.path);
|
|
3452
|
-
if (opts.json) return console.log(JSON.stringify(domains, null, 2));
|
|
3453
|
-
if (domains.length === 0) {
|
|
3454
|
-
logInfo(
|
|
3455
|
-
`No domains in "${target.name}". Create one: \`skaile library domain create <name>\`.`
|
|
3456
|
-
);
|
|
3457
|
-
return;
|
|
3458
|
-
}
|
|
3459
|
-
for (const d of domains) console.log(` ${S.cmd(d)}`);
|
|
3460
|
-
console.log(`
|
|
3461
|
-
${S.dim(`${domains.length} domain(s) in ${target.name}`)}
|
|
3462
|
-
`);
|
|
3463
|
-
} finally {
|
|
3464
|
-
close();
|
|
3465
|
-
}
|
|
3466
|
-
});
|
|
3467
|
-
domain.command("show <name>").description("Print a domain's DOMAIN.md").option("--library <name>", "Target library (default: the default-marked one)").action(async (name, opts) => {
|
|
3468
|
-
const { manager, close } = await openLibraryManager();
|
|
3469
|
-
try {
|
|
3470
|
-
const target = await resolveTargetLibrary(manager, opts.library);
|
|
3471
|
-
const domainFile = path35.join(target.path, name, "DOMAIN.md");
|
|
3472
|
-
if (!existsSync(domainFile)) {
|
|
3473
|
-
logErr(`Domain "${name}" not found in "${target.name}" (no ${domainFile}).`);
|
|
3474
|
-
process.exit(1);
|
|
3475
|
-
}
|
|
3476
|
-
console.log(fs11.readFileSync(domainFile, "utf8"));
|
|
3477
|
-
} finally {
|
|
3478
|
-
close();
|
|
3479
|
-
}
|
|
3480
|
-
});
|
|
3481
3345
|
cmd.command("default <name>").description("Set <name> as the default library").action(async (name) => {
|
|
3482
3346
|
const { manager, close } = await openLibraryManager();
|
|
3483
3347
|
try {
|
|
@@ -3504,9 +3368,7 @@ function makeLibraryCommand() {
|
|
|
3504
3368
|
close();
|
|
3505
3369
|
}
|
|
3506
3370
|
});
|
|
3507
|
-
cmd.command("set <name> <field=value>").description(
|
|
3508
|
-
"Update a single library field (ownership, structure, isDefault, path, backendConfig.<key>)"
|
|
3509
|
-
).action(async (name, expr) => {
|
|
3371
|
+
cmd.command("set <name> <field=value>").description("Update a single library field (ownership, isDefault, path, backendConfig.<key>)").action(async (name, expr) => {
|
|
3510
3372
|
const [field, ...rest] = expr.split("=");
|
|
3511
3373
|
const value = rest.join("=");
|
|
3512
3374
|
const { manager, close } = await openLibraryManager();
|
|
@@ -3514,7 +3376,6 @@ function makeLibraryCommand() {
|
|
|
3514
3376
|
const lib = await manager.requireLibrary(name);
|
|
3515
3377
|
const patch = {};
|
|
3516
3378
|
if (field === "ownership") patch.ownership = value;
|
|
3517
|
-
else if (field === "structure") patch.structure = value;
|
|
3518
3379
|
else if (field === "isDefault") patch.isDefault = value === "true";
|
|
3519
3380
|
else if (field === "path") {
|
|
3520
3381
|
const dir = path35.resolve(value);
|
|
@@ -3700,16 +3561,16 @@ function makeLibraryCommand() {
|
|
|
3700
3561
|
"With --create-repo: create the repo private (the store only accepts public repos)"
|
|
3701
3562
|
).option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; push nothing and call no store endpoint").action(
|
|
3702
3563
|
async (lib, opts) => {
|
|
3703
|
-
const { runLibraryPublish } = await import('../library-publish-
|
|
3564
|
+
const { runLibraryPublish } = await import('../library-publish-SBEWWTPM.js');
|
|
3704
3565
|
await withStoreErrorHandling(() => runLibraryPublish(lib, opts));
|
|
3705
3566
|
}
|
|
3706
3567
|
);
|
|
3707
3568
|
cmd.command("register <lib>").description("Register the library's manifest without pushing (bytes already on github)").option("--asset <ref>", "Publish only the single asset matching this ref/name").option("--ref <gitref>", "Git ref to ingest (default: the library branch or main)").option("--dry-run", "Print the plan; call no store endpoint").action(async (lib, opts) => {
|
|
3708
|
-
const { runLibraryRegister } = await import('../library-publish-
|
|
3569
|
+
const { runLibraryRegister } = await import('../library-publish-SBEWWTPM.js');
|
|
3709
3570
|
await withStoreErrorHandling(() => runLibraryRegister(lib, opts));
|
|
3710
3571
|
});
|
|
3711
3572
|
cmd.command("yank <lib>").description("Retract the library's published assets from the store").option("--asset <ref>", "Yank only the single asset matching this ref/name").action(async (lib, opts) => {
|
|
3712
|
-
const { runLibraryYank } = await import('../library-publish-
|
|
3573
|
+
const { runLibraryYank } = await import('../library-publish-SBEWWTPM.js');
|
|
3713
3574
|
await withStoreErrorHandling(() => runLibraryYank(lib, opts));
|
|
3714
3575
|
});
|
|
3715
3576
|
return cmd;
|
|
@@ -3760,24 +3621,17 @@ function ensureManifestPublisher(libraryPath, publisher) {
|
|
|
3760
3621
|
async function syncManifestWithDisk(lib) {
|
|
3761
3622
|
const libraryPath = lib.path;
|
|
3762
3623
|
if (!loadSkPublishManifest(libraryPath)?.publisher) {
|
|
3763
|
-
ensureManifestPublisher(
|
|
3764
|
-
libraryPath,
|
|
3765
|
-
resolveLibraryPublisher(lib, {}, void 0, getStoreIdentity())
|
|
3766
|
-
);
|
|
3624
|
+
ensureManifestPublisher(libraryPath, resolveLibraryPublisher(lib, {}, getStoreIdentity()));
|
|
3767
3625
|
}
|
|
3768
3626
|
const manifest = loadSkPublishManifest(libraryPath);
|
|
3769
3627
|
const repoName = manifest?.publisher ?? slugifyAssetName(lib.name);
|
|
3770
3628
|
for (const e of await scanDirectory(libraryPath, repoName)) {
|
|
3771
3629
|
const root = path35.relative(libraryPath, path35.dirname(e.source)) || e.name;
|
|
3772
|
-
const existing = manifest?.assets?.find((a) => a.kind === e.kind && a.name === e.name);
|
|
3773
|
-
const segments = root.split(/[\\/]/);
|
|
3774
|
-
const publisher = existing?.publisher || segments.length < 2 ? void 0 : domainPublisher(libraryPath, segments[0]);
|
|
3775
3630
|
upsertManifestAsset(libraryPath, {
|
|
3776
3631
|
kind: e.kind,
|
|
3777
3632
|
name: e.name,
|
|
3778
3633
|
root,
|
|
3779
|
-
version: e.version
|
|
3780
|
-
publisher
|
|
3634
|
+
version: e.version
|
|
3781
3635
|
});
|
|
3782
3636
|
}
|
|
3783
3637
|
}
|
|
@@ -4038,29 +3892,41 @@ var ORIGIN_META = {
|
|
|
4038
3892
|
};
|
|
4039
3893
|
var ORIGIN_ORDER = ["library", "source", "factory", "store"];
|
|
4040
3894
|
var srcKey = (origin, publisher) => `${origin}:${publisher}`;
|
|
4041
|
-
var
|
|
3895
|
+
var pluginKey = (origin, group, plugin) => `${origin}:${group}:plugin:${plugin}`;
|
|
4042
3896
|
var repoKey = (org, repo) => `${org}/${repo}`;
|
|
4043
|
-
var
|
|
4044
|
-
var
|
|
4045
|
-
var
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
3897
|
+
var srcPluginKey = (org, repo, plugin) => `${org}/${repo}:plugin:${plugin}`;
|
|
3898
|
+
var libPluginKey = (group, plugin) => `${group}:plugin:${plugin}`;
|
|
3899
|
+
var OTHER_PLUGIN = "(other)";
|
|
3900
|
+
function pluginLabel(plugin) {
|
|
3901
|
+
return plugin === OTHER_PLUGIN ? "Other" : pluginTitle(plugin);
|
|
3902
|
+
}
|
|
3903
|
+
function layoutPluginBand(items, pluginOf, emit) {
|
|
3904
|
+
const byPlugin = /* @__PURE__ */ new Map();
|
|
3905
|
+
const unlisted = [];
|
|
3906
|
+
for (const item of items) {
|
|
3907
|
+
const plugin = pluginOf(item);
|
|
3908
|
+
if (!plugin) {
|
|
3909
|
+
unlisted.push(item);
|
|
3910
|
+
continue;
|
|
3911
|
+
}
|
|
3912
|
+
const members = byPlugin.get(plugin);
|
|
3913
|
+
if (members) members.push(item);
|
|
3914
|
+
else byPlugin.set(plugin, [item]);
|
|
3915
|
+
}
|
|
3916
|
+
const plugins = [...byPlugin.keys()].sort(
|
|
3917
|
+
(a, b) => pluginTitle(a).localeCompare(pluginTitle(b)) || a.localeCompare(b)
|
|
3918
|
+
);
|
|
3919
|
+
for (const plugin of plugins) {
|
|
3920
|
+
emit.header(plugin);
|
|
3921
|
+
for (const item of byPlugin.get(plugin)) emit.item(item, plugin);
|
|
3922
|
+
}
|
|
3923
|
+
if (plugins.length === 0) {
|
|
3924
|
+
for (const item of unlisted) emit.item(item, void 0);
|
|
3925
|
+
return;
|
|
3926
|
+
}
|
|
3927
|
+
if (unlisted.length === 0) return;
|
|
3928
|
+
emit.header(OTHER_PLUGIN);
|
|
3929
|
+
for (const item of unlisted) emit.item(item, OTHER_PLUGIN);
|
|
4064
3930
|
}
|
|
4065
3931
|
var am;
|
|
4066
3932
|
var state = {
|
|
@@ -4078,18 +3944,15 @@ var state = {
|
|
|
4078
3944
|
pendingRemoves: /* @__PURE__ */ new Set(),
|
|
4079
3945
|
collapsedOrigins: /* @__PURE__ */ new Set(),
|
|
4080
3946
|
collapsedSources: /* @__PURE__ */ new Set(),
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
seenDomains: /* @__PURE__ */ new Set(),
|
|
3947
|
+
collapsedPlugins: /* @__PURE__ */ new Set(),
|
|
3948
|
+
seenPlugins: /* @__PURE__ */ new Set(),
|
|
4084
3949
|
collapsedSourceOrgs: /* @__PURE__ */ new Set(),
|
|
4085
3950
|
collapsedSourceRepos: /* @__PURE__ */ new Set(),
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
seenSourceDomains: /* @__PURE__ */ new Set(),
|
|
3951
|
+
collapsedSourcePlugins: /* @__PURE__ */ new Set(),
|
|
3952
|
+
seenSourcePlugins: /* @__PURE__ */ new Set(),
|
|
4089
3953
|
collapsedLibraryGroups: /* @__PURE__ */ new Set(),
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
seenLibraryDomains: /* @__PURE__ */ new Set(),
|
|
3954
|
+
collapsedLibraryPlugins: /* @__PURE__ */ new Set(),
|
|
3955
|
+
seenLibraryPlugins: /* @__PURE__ */ new Set(),
|
|
4093
3956
|
seenOrigins: /* @__PURE__ */ new Set(),
|
|
4094
3957
|
originFilter: null,
|
|
4095
3958
|
query: "",
|
|
@@ -4098,27 +3961,27 @@ var state = {
|
|
|
4098
3961
|
cols: 80,
|
|
4099
3962
|
awaitingExitConfirm: false
|
|
4100
3963
|
};
|
|
4101
|
-
function buildVisibleRows(rows, collapsedOrigins, collapsedSources,
|
|
3964
|
+
function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedPlugins, originFilter = null, query = "") {
|
|
4102
3965
|
const q = query.trim().toLowerCase();
|
|
4103
3966
|
if (q) {
|
|
4104
3967
|
const origins = /* @__PURE__ */ new Set();
|
|
4105
3968
|
const groups = /* @__PURE__ */ new Set();
|
|
4106
|
-
const
|
|
3969
|
+
const plugins = /* @__PURE__ */ new Set();
|
|
4107
3970
|
for (const row of rows) {
|
|
4108
3971
|
if (row.type !== "asset" || !matchesQuery(row, q)) continue;
|
|
4109
3972
|
const origin = rowOrigin(row);
|
|
4110
3973
|
if (originFilter && origin !== originFilter) continue;
|
|
4111
3974
|
origins.add(origin);
|
|
4112
3975
|
groups.add(srcKey(origin, rowGroup(row)));
|
|
4113
|
-
|
|
3976
|
+
if (row.plugin !== void 0) plugins.add(pluginKey(origin, rowGroup(row), row.plugin));
|
|
4114
3977
|
}
|
|
4115
3978
|
return rows.filter((row) => {
|
|
4116
3979
|
const origin = rowOrigin(row);
|
|
4117
3980
|
if (originFilter && origin !== originFilter) return false;
|
|
4118
3981
|
if (row.type === "origin-header") return origins.has(origin);
|
|
4119
3982
|
if (row.type === "publisher-header") return groups.has(srcKey(origin, row.source));
|
|
4120
|
-
if (row.type === "
|
|
4121
|
-
return
|
|
3983
|
+
if (row.type === "plugin-header") {
|
|
3984
|
+
return plugins.has(pluginKey(origin, row.source, row.plugin));
|
|
4122
3985
|
}
|
|
4123
3986
|
return row.type === "asset" && matchesQuery(row, q);
|
|
4124
3987
|
});
|
|
@@ -4130,12 +3993,9 @@ function buildVisibleRows(rows, collapsedOrigins, collapsedSources, collapsedDom
|
|
|
4130
3993
|
if (collapsedOrigins.has(origin)) return false;
|
|
4131
3994
|
if (row.type === "publisher-header") return true;
|
|
4132
3995
|
if (collapsedSources.has(srcKey(origin, rowGroup(row)))) return false;
|
|
4133
|
-
if (row.type === "
|
|
4134
|
-
if (row.
|
|
4135
|
-
return !
|
|
4136
|
-
}
|
|
4137
|
-
if (row.underDomain) {
|
|
4138
|
-
return !collapsedDomains.has(domainKey(origin, rowGroup(row), rowDomain(row)));
|
|
3996
|
+
if (row.type === "plugin-header") return true;
|
|
3997
|
+
if (row.plugin !== void 0) {
|
|
3998
|
+
return !collapsedPlugins.has(pluginKey(origin, rowGroup(row), row.plugin));
|
|
4139
3999
|
}
|
|
4140
4000
|
return true;
|
|
4141
4001
|
});
|
|
@@ -4164,8 +4024,8 @@ function splitKeys(chunk) {
|
|
|
4164
4024
|
function originAssetRefs(rows, origin) {
|
|
4165
4025
|
return refsOf(rows.filter((r) => isAsset(r) && rowOrigin(r) === origin));
|
|
4166
4026
|
}
|
|
4167
|
-
function
|
|
4168
|
-
return refsOf(rows.filter((r) => isAsset(r) &&
|
|
4027
|
+
function pluginAssetRefs(rows, origin, group, plugin) {
|
|
4028
|
+
return refsOf(rows.filter((r) => isAsset(r) && inPlugin(r, origin, group, plugin)));
|
|
4169
4029
|
}
|
|
4170
4030
|
function sourceAssetRefs(rows, origin, source) {
|
|
4171
4031
|
return refsOf(rows.filter((r) => isAsset(r) && inSource(r, origin, source)));
|
|
@@ -4175,17 +4035,12 @@ function buildSourceTreeRows(assetRows, registered = []) {
|
|
|
4175
4035
|
const ensure = (org, repo) => {
|
|
4176
4036
|
if (!byOrg.has(org)) byOrg.set(org, /* @__PURE__ */ new Map());
|
|
4177
4037
|
const byRepo = byOrg.get(org);
|
|
4178
|
-
if (!byRepo.has(repo)) byRepo.set(repo,
|
|
4038
|
+
if (!byRepo.has(repo)) byRepo.set(repo, []);
|
|
4179
4039
|
return byRepo.get(repo);
|
|
4180
4040
|
};
|
|
4181
4041
|
for (const r of assetRows) {
|
|
4182
4042
|
if (!isAsset(r) || rowOrigin(r) !== "source") continue;
|
|
4183
|
-
|
|
4184
|
-
const repo = rowGroup(r);
|
|
4185
|
-
const slug = rowDomain(r);
|
|
4186
|
-
const byDomain = ensure(org, repo);
|
|
4187
|
-
if (!byDomain.has(slug)) byDomain.set(slug, []);
|
|
4188
|
-
byDomain.get(slug).push(r);
|
|
4043
|
+
ensure(rowOrg(r), rowGroup(r)).push(r);
|
|
4189
4044
|
}
|
|
4190
4045
|
for (const { org, repo } of registered) ensure(org, repo);
|
|
4191
4046
|
if (byOrg.size === 0) return [];
|
|
@@ -4195,34 +4050,24 @@ function buildSourceTreeRows(assetRows, registered = []) {
|
|
|
4195
4050
|
const byRepo = byOrg.get(org);
|
|
4196
4051
|
for (const repo of [...byRepo.keys()].sort((a, b) => a.localeCompare(b))) {
|
|
4197
4052
|
rows.push({ type: "repo-header", origin: "source", org, source: repo });
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
const meta = domainRegistry.get(slug);
|
|
4203
|
-
rows.push({ type: "domain-header", origin: "source", org, source: repo, domainSlug: slug });
|
|
4204
|
-
if (meta?.description) {
|
|
4205
|
-
rows.push({ type: "domain-info", origin: "source", org, source: repo, domainSlug: slug });
|
|
4206
|
-
}
|
|
4207
|
-
for (const a of byDomain.get(slug)) rows.push({ ...a, org });
|
|
4208
|
-
}
|
|
4053
|
+
layoutPluginBand(byRepo.get(repo), (a) => a.entry?.plugin, {
|
|
4054
|
+
header: (plugin) => rows.push({ type: "plugin-header", origin: "source", org, source: repo, plugin }),
|
|
4055
|
+
item: (a, plugin) => rows.push({ ...a, org, plugin })
|
|
4056
|
+
});
|
|
4209
4057
|
}
|
|
4210
4058
|
}
|
|
4211
4059
|
return rows;
|
|
4212
4060
|
}
|
|
4213
|
-
function buildVisibleSourceRows(rows, collapsedOrgs, collapsedRepos,
|
|
4061
|
+
function buildVisibleSourceRows(rows, collapsedOrgs, collapsedRepos, collapsedPlugins) {
|
|
4214
4062
|
return rows.filter((row) => {
|
|
4215
4063
|
if (row.type === "source-root" || row.type === "org-header") return true;
|
|
4216
4064
|
const org = row.org ?? UNKNOWN_ORG;
|
|
4217
4065
|
if (collapsedOrgs.has(org)) return false;
|
|
4218
4066
|
if (row.type === "repo-header") return true;
|
|
4219
4067
|
if (collapsedRepos.has(repoKey(org, row.source))) return false;
|
|
4220
|
-
if (row.type === "
|
|
4221
|
-
if (row.
|
|
4222
|
-
return !
|
|
4223
|
-
}
|
|
4224
|
-
if (row.underDomain) {
|
|
4225
|
-
return !collapsedDomains.has(srcDomainKey(org, rowGroup(row), rowDomain(row)));
|
|
4068
|
+
if (row.type === "plugin-header") return true;
|
|
4069
|
+
if (row.plugin !== void 0) {
|
|
4070
|
+
return !collapsedPlugins.has(srcPluginKey(org, rowGroup(row), row.plugin));
|
|
4226
4071
|
}
|
|
4227
4072
|
return true;
|
|
4228
4073
|
});
|
|
@@ -4237,57 +4082,43 @@ function sourceRepoRefs(rows, org, repo) {
|
|
|
4237
4082
|
)
|
|
4238
4083
|
);
|
|
4239
4084
|
}
|
|
4240
|
-
function
|
|
4085
|
+
function sourcePluginRefs(rows, org, repo, plugin) {
|
|
4241
4086
|
return refsOf(
|
|
4242
4087
|
rows.filter(
|
|
4243
|
-
(r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo &&
|
|
4088
|
+
(r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo && r.plugin === plugin
|
|
4244
4089
|
)
|
|
4245
4090
|
);
|
|
4246
4091
|
}
|
|
4247
4092
|
function buildLibraryTreeRows(assetRows, registered = []) {
|
|
4248
4093
|
const byGroup = /* @__PURE__ */ new Map();
|
|
4249
4094
|
const ensure = (group) => {
|
|
4250
|
-
if (!byGroup.has(group)) byGroup.set(group,
|
|
4095
|
+
if (!byGroup.has(group)) byGroup.set(group, []);
|
|
4251
4096
|
return byGroup.get(group);
|
|
4252
4097
|
};
|
|
4253
4098
|
for (const r of assetRows) {
|
|
4254
4099
|
if (!isAsset(r) || rowOrigin(r) !== "library") continue;
|
|
4255
|
-
|
|
4256
|
-
const slug = rowDomain(r);
|
|
4257
|
-
const byDomain = ensure(group);
|
|
4258
|
-
if (!byDomain.has(slug)) byDomain.set(slug, []);
|
|
4259
|
-
byDomain.get(slug).push(r);
|
|
4100
|
+
ensure(rowGroup(r)).push(r);
|
|
4260
4101
|
}
|
|
4261
4102
|
for (const group of registered) ensure(group);
|
|
4262
4103
|
if (byGroup.size === 0) return [];
|
|
4263
4104
|
const rows = [{ type: "library-root" }];
|
|
4264
4105
|
for (const group of [...byGroup.keys()].sort((a, b) => a.localeCompare(b))) {
|
|
4265
4106
|
rows.push({ type: "library-header", origin: "library", source: group });
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
const meta = domainRegistry.get(slug);
|
|
4271
|
-
rows.push({ type: "domain-header", origin: "library", source: group, domainSlug: slug });
|
|
4272
|
-
if (meta?.description) {
|
|
4273
|
-
rows.push({ type: "domain-info", origin: "library", source: group, domainSlug: slug });
|
|
4274
|
-
}
|
|
4275
|
-
for (const a of byDomain.get(slug)) rows.push({ ...a });
|
|
4276
|
-
}
|
|
4107
|
+
layoutPluginBand(byGroup.get(group), (a) => a.entry?.plugin, {
|
|
4108
|
+
header: (plugin) => rows.push({ type: "plugin-header", origin: "library", source: group, plugin }),
|
|
4109
|
+
item: (a, plugin) => rows.push({ ...a, plugin })
|
|
4110
|
+
});
|
|
4277
4111
|
}
|
|
4278
4112
|
return rows;
|
|
4279
4113
|
}
|
|
4280
|
-
function buildVisibleLibraryRows(rows, collapsedGroups,
|
|
4114
|
+
function buildVisibleLibraryRows(rows, collapsedGroups, collapsedPlugins) {
|
|
4281
4115
|
return rows.filter((row) => {
|
|
4282
4116
|
if (row.type === "library-root" || row.type === "library-header") return true;
|
|
4283
4117
|
const group = row.source ?? rowGroup(row);
|
|
4284
4118
|
if (collapsedGroups.has(group)) return false;
|
|
4285
|
-
if (row.type === "
|
|
4286
|
-
if (row.
|
|
4287
|
-
return !
|
|
4288
|
-
}
|
|
4289
|
-
if (row.underDomain) {
|
|
4290
|
-
return !collapsedDomains.has(libDomainKey(rowGroup(row), rowDomain(row)));
|
|
4119
|
+
if (row.type === "plugin-header") return true;
|
|
4120
|
+
if (row.plugin !== void 0) {
|
|
4121
|
+
return !collapsedPlugins.has(libPluginKey(rowGroup(row), row.plugin));
|
|
4291
4122
|
}
|
|
4292
4123
|
return true;
|
|
4293
4124
|
});
|
|
@@ -4309,9 +4140,6 @@ function rowPublisher(r) {
|
|
|
4309
4140
|
function rowGroup(r) {
|
|
4310
4141
|
return r.source ?? rowPublisher(r);
|
|
4311
4142
|
}
|
|
4312
|
-
function rowDomain(r) {
|
|
4313
|
-
return r.entry?.domainSlug || NO_DOMAIN;
|
|
4314
|
-
}
|
|
4315
4143
|
function matchesQuery(r, q) {
|
|
4316
4144
|
const e = r.entry;
|
|
4317
4145
|
if (!e) return false;
|
|
@@ -4330,9 +4158,8 @@ function refsOf(rows) {
|
|
|
4330
4158
|
function inSource(r, origin, source) {
|
|
4331
4159
|
return rowOrigin(r) === origin && rowGroup(r) === source;
|
|
4332
4160
|
}
|
|
4333
|
-
function
|
|
4334
|
-
|
|
4335
|
-
return rowDomain(r) === slug;
|
|
4161
|
+
function inPlugin(r, origin, group, plugin) {
|
|
4162
|
+
return inSource(r, origin, group) && r.plugin === plugin;
|
|
4336
4163
|
}
|
|
4337
4164
|
function assetRefOf(r) {
|
|
4338
4165
|
if (!isAsset(r) || !r.entry?.publisher) return null;
|
|
@@ -4386,7 +4213,14 @@ function actOnHeader(row, action3) {
|
|
|
4386
4213
|
bulkSelection(sourceAssetRefs(state.assetRows, rowOrigin(row), row.source), action3);
|
|
4387
4214
|
return true;
|
|
4388
4215
|
}
|
|
4389
|
-
|
|
4216
|
+
if (row.type === "plugin-header") {
|
|
4217
|
+
bulkSelection(
|
|
4218
|
+
pluginAssetRefs(state.assetRows, rowOrigin(row), row.source, row.plugin),
|
|
4219
|
+
action3
|
|
4220
|
+
);
|
|
4221
|
+
return true;
|
|
4222
|
+
}
|
|
4223
|
+
return false;
|
|
4390
4224
|
}
|
|
4391
4225
|
var softDepPreviewCache = /* @__PURE__ */ new Map();
|
|
4392
4226
|
function softDepCacheKeyUnderCursor() {
|
|
@@ -4448,15 +4282,13 @@ function scheduleSoftDepPreview() {
|
|
|
4448
4282
|
}
|
|
4449
4283
|
async function loadAssets() {
|
|
4450
4284
|
softDepPreviewCache.clear();
|
|
4451
|
-
const { gatherAssetFeeds } = await import('../asset-feeds-
|
|
4452
|
-
const { entries,
|
|
4285
|
+
const { gatherAssetFeeds } = await import('../asset-feeds-HIWT4DVT.js');
|
|
4286
|
+
const { entries, notes } = await gatherAssetFeeds(am, am.projectDir);
|
|
4453
4287
|
if (notes.length > 0) {
|
|
4454
4288
|
state.message = notes.map((n) => `[${n.feed}] ${n.message}`).join(" \u2022 ");
|
|
4455
4289
|
}
|
|
4456
|
-
domainRegistry = new Map(domains.map((d) => [d.slug, d]));
|
|
4457
4290
|
const installed = new Set(am.listDeployed().map((e) => `${e.kind}:${e.name}`));
|
|
4458
|
-
const
|
|
4459
|
-
const rows = buildAssetRowsFromGroups(byOrigin, installed);
|
|
4291
|
+
const rows = buildAssetRows(entries, installed);
|
|
4460
4292
|
state.assetRows = rows;
|
|
4461
4293
|
reconcileCollapsedSets(rows);
|
|
4462
4294
|
rebuildVisible();
|
|
@@ -4479,35 +4311,32 @@ function reconcileSourceCollapsedSets(rows) {
|
|
|
4479
4311
|
const repoKeys = new Set(
|
|
4480
4312
|
rows.filter((r) => r.type === "repo-header").map((r) => repoKey(r.org, r.source))
|
|
4481
4313
|
);
|
|
4482
|
-
const
|
|
4483
|
-
rows.filter((r) => r.type === "
|
|
4314
|
+
const pluginKeys = new Set(
|
|
4315
|
+
rows.filter((r) => r.type === "plugin-header").map((r) => srcPluginKey(r.org, r.source, r.plugin))
|
|
4484
4316
|
);
|
|
4485
4317
|
for (const k of state.collapsedSourceOrgs)
|
|
4486
4318
|
if (!orgKeys.has(k)) state.collapsedSourceOrgs.delete(k);
|
|
4487
4319
|
for (const k of state.collapsedSourceRepos) {
|
|
4488
4320
|
if (!repoKeys.has(k)) state.collapsedSourceRepos.delete(k);
|
|
4489
4321
|
}
|
|
4490
|
-
for (const k of
|
|
4491
|
-
if (!state.
|
|
4492
|
-
state.
|
|
4493
|
-
state.
|
|
4322
|
+
for (const k of pluginKeys) {
|
|
4323
|
+
if (!state.seenSourcePlugins.has(k)) {
|
|
4324
|
+
state.collapsedSourcePlugins.add(k);
|
|
4325
|
+
state.seenSourcePlugins.add(k);
|
|
4494
4326
|
}
|
|
4495
4327
|
}
|
|
4496
|
-
for (const k of state.
|
|
4497
|
-
if (!
|
|
4498
|
-
}
|
|
4499
|
-
for (const k of state.expandedSourceDomainInfo) {
|
|
4500
|
-
if (!domainKeys.has(k)) state.expandedSourceDomainInfo.delete(k);
|
|
4328
|
+
for (const k of state.collapsedSourcePlugins) {
|
|
4329
|
+
if (!pluginKeys.has(k)) state.collapsedSourcePlugins.delete(k);
|
|
4501
4330
|
}
|
|
4502
|
-
for (const k of state.
|
|
4503
|
-
if (!
|
|
4331
|
+
for (const k of state.seenSourcePlugins)
|
|
4332
|
+
if (!pluginKeys.has(k)) state.seenSourcePlugins.delete(k);
|
|
4504
4333
|
}
|
|
4505
4334
|
function rebuildVisibleSources() {
|
|
4506
4335
|
state.visibleSourceRows = buildVisibleSourceRows(
|
|
4507
4336
|
state.sourceTreeRows,
|
|
4508
4337
|
state.collapsedSourceOrgs,
|
|
4509
4338
|
state.collapsedSourceRepos,
|
|
4510
|
-
state.
|
|
4339
|
+
state.collapsedSourcePlugins
|
|
4511
4340
|
);
|
|
4512
4341
|
clampCursor();
|
|
4513
4342
|
}
|
|
@@ -4521,95 +4350,64 @@ function rebuildLibraryTree() {
|
|
|
4521
4350
|
}
|
|
4522
4351
|
function reconcileLibraryCollapsedSets(rows) {
|
|
4523
4352
|
const groupKeys = new Set(rows.filter((r) => r.type === "library-header").map((r) => r.source));
|
|
4524
|
-
const
|
|
4525
|
-
rows.filter((r) => r.type === "
|
|
4353
|
+
const pluginKeys = new Set(
|
|
4354
|
+
rows.filter((r) => r.type === "plugin-header").map((r) => libPluginKey(r.source, r.plugin))
|
|
4526
4355
|
);
|
|
4527
4356
|
for (const k of state.collapsedLibraryGroups)
|
|
4528
4357
|
if (!groupKeys.has(k)) state.collapsedLibraryGroups.delete(k);
|
|
4529
|
-
for (const k of
|
|
4530
|
-
if (!state.
|
|
4531
|
-
state.
|
|
4532
|
-
state.
|
|
4358
|
+
for (const k of pluginKeys) {
|
|
4359
|
+
if (!state.seenLibraryPlugins.has(k)) {
|
|
4360
|
+
state.collapsedLibraryPlugins.add(k);
|
|
4361
|
+
state.seenLibraryPlugins.add(k);
|
|
4533
4362
|
}
|
|
4534
4363
|
}
|
|
4535
|
-
for (const k of state.
|
|
4536
|
-
if (!
|
|
4537
|
-
}
|
|
4538
|
-
for (const k of state.expandedLibraryDomainInfo) {
|
|
4539
|
-
if (!domainKeys.has(k)) state.expandedLibraryDomainInfo.delete(k);
|
|
4364
|
+
for (const k of state.collapsedLibraryPlugins) {
|
|
4365
|
+
if (!pluginKeys.has(k)) state.collapsedLibraryPlugins.delete(k);
|
|
4540
4366
|
}
|
|
4541
|
-
for (const k of state.
|
|
4542
|
-
if (!
|
|
4367
|
+
for (const k of state.seenLibraryPlugins)
|
|
4368
|
+
if (!pluginKeys.has(k)) state.seenLibraryPlugins.delete(k);
|
|
4543
4369
|
}
|
|
4544
4370
|
function rebuildVisibleLibraries() {
|
|
4545
4371
|
state.visibleLibraryRows = buildVisibleLibraryRows(
|
|
4546
4372
|
state.libraryTreeRows,
|
|
4547
4373
|
state.collapsedLibraryGroups,
|
|
4548
|
-
state.
|
|
4374
|
+
state.collapsedLibraryPlugins
|
|
4549
4375
|
);
|
|
4550
4376
|
clampCursor();
|
|
4551
4377
|
}
|
|
4552
|
-
function
|
|
4378
|
+
function buildAssetRows(entries, installed) {
|
|
4553
4379
|
const byOrigin = /* @__PURE__ */ new Map();
|
|
4554
4380
|
for (const { origin, entry, group } of entries) {
|
|
4555
4381
|
const publisher = group || entry.publisher || "other";
|
|
4556
|
-
const slug = entry.domainSlug || NO_DOMAIN;
|
|
4557
4382
|
if (!byOrigin.has(origin)) byOrigin.set(origin, /* @__PURE__ */ new Map());
|
|
4558
4383
|
const byPublisher = byOrigin.get(origin);
|
|
4559
|
-
if (!byPublisher.has(publisher)) byPublisher.set(publisher,
|
|
4560
|
-
|
|
4561
|
-
if (!byDomain.has(slug)) byDomain.set(slug, []);
|
|
4562
|
-
byDomain.get(slug).push(entry);
|
|
4384
|
+
if (!byPublisher.has(publisher)) byPublisher.set(publisher, []);
|
|
4385
|
+
byPublisher.get(publisher).push(entry);
|
|
4563
4386
|
}
|
|
4564
|
-
return byOrigin;
|
|
4565
|
-
}
|
|
4566
|
-
function sortedDomainSlugs(slugs) {
|
|
4567
|
-
return slugs.filter((s) => s !== NO_DOMAIN).sort((a, b) => {
|
|
4568
|
-
const oa = domainRegistry.get(a)?.order ?? Number.MAX_SAFE_INTEGER;
|
|
4569
|
-
const ob = domainRegistry.get(b)?.order ?? Number.MAX_SAFE_INTEGER;
|
|
4570
|
-
return oa !== ob ? oa - ob : a.localeCompare(b);
|
|
4571
|
-
});
|
|
4572
|
-
}
|
|
4573
|
-
function buildAssetRowsFromGroups(byOrigin, installed) {
|
|
4574
4387
|
const rows = [];
|
|
4575
4388
|
const sortItems = (items) => items.sort(
|
|
4576
4389
|
(a, b) => a.kind !== b.kind ? a.kind.localeCompare(b.kind) : a.name.localeCompare(b.name)
|
|
4577
4390
|
);
|
|
4578
|
-
const pushAsset = (origin, group, entry, underDomain, seq) => {
|
|
4579
|
-
const ref = `${entry.kind}:${entry.name}`;
|
|
4580
|
-
rows.push({
|
|
4581
|
-
type: "asset",
|
|
4582
|
-
origin,
|
|
4583
|
-
source: group,
|
|
4584
|
-
org: entry.repo?.includes("/") ? entry.repo.slice(0, entry.repo.indexOf("/")) : void 0,
|
|
4585
|
-
entry,
|
|
4586
|
-
installed: installed.has(ref),
|
|
4587
|
-
underDomain,
|
|
4588
|
-
seq
|
|
4589
|
-
});
|
|
4590
|
-
};
|
|
4591
4391
|
for (const origin of ORIGIN_ORDER) {
|
|
4592
4392
|
const byGroup = byOrigin.get(origin);
|
|
4593
4393
|
if (!byGroup || byGroup.size === 0) continue;
|
|
4594
4394
|
rows.push({ type: "origin-header", origin });
|
|
4595
|
-
for (const [group,
|
|
4596
|
-
(a, b) => a[0].localeCompare(b[0])
|
|
4597
|
-
)) {
|
|
4395
|
+
for (const [group, items] of [...byGroup.entries()].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
4598
4396
|
rows.push({ type: "publisher-header", origin, source: group });
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4397
|
+
layoutPluginBand(sortItems(items), (entry) => entry.plugin, {
|
|
4398
|
+
header: (plugin) => rows.push({ type: "plugin-header", origin, source: group, plugin }),
|
|
4399
|
+
item: (entry, plugin) => {
|
|
4400
|
+
rows.push({
|
|
4401
|
+
type: "asset",
|
|
4402
|
+
origin,
|
|
4403
|
+
source: group,
|
|
4404
|
+
org: entry.repo?.includes("/") ? entry.repo.slice(0, entry.repo.indexOf("/")) : void 0,
|
|
4405
|
+
entry,
|
|
4406
|
+
installed: installed.has(`${entry.kind}:${entry.name}`),
|
|
4407
|
+
plugin
|
|
4408
|
+
});
|
|
4606
4409
|
}
|
|
4607
|
-
|
|
4608
|
-
const sequenced = meta?.relation === "sequence";
|
|
4609
|
-
items.forEach(
|
|
4610
|
-
(entry, i) => pushAsset(origin, group, entry, true, sequenced ? i + 1 : void 0)
|
|
4611
|
-
);
|
|
4612
|
-
}
|
|
4410
|
+
});
|
|
4613
4411
|
}
|
|
4614
4412
|
}
|
|
4615
4413
|
return rows;
|
|
@@ -4632,29 +4430,26 @@ function reconcileCollapsedSets(rows) {
|
|
|
4632
4430
|
for (const s of state.collapsedSources) {
|
|
4633
4431
|
if (!newSources.has(s)) state.collapsedSources.delete(s);
|
|
4634
4432
|
}
|
|
4635
|
-
const
|
|
4636
|
-
rows.filter((r) => r.type === "
|
|
4433
|
+
const newPluginKeys = new Set(
|
|
4434
|
+
rows.filter((r) => r.type === "plugin-header").map((r) => pluginKey(rowOrigin(r), r.source, r.plugin))
|
|
4637
4435
|
);
|
|
4638
|
-
for (const k of
|
|
4639
|
-
if (!state.
|
|
4640
|
-
state.
|
|
4641
|
-
state.
|
|
4436
|
+
for (const k of newPluginKeys) {
|
|
4437
|
+
if (!state.seenPlugins.has(k)) {
|
|
4438
|
+
state.collapsedPlugins.add(k);
|
|
4439
|
+
state.seenPlugins.add(k);
|
|
4642
4440
|
}
|
|
4643
4441
|
}
|
|
4644
|
-
for (const
|
|
4645
|
-
if (!
|
|
4442
|
+
for (const k of state.collapsedPlugins) {
|
|
4443
|
+
if (!newPluginKeys.has(k)) state.collapsedPlugins.delete(k);
|
|
4646
4444
|
}
|
|
4647
|
-
for (const
|
|
4648
|
-
if (!
|
|
4649
|
-
}
|
|
4650
|
-
for (const d of state.seenDomains) {
|
|
4651
|
-
if (!newDomainKeys.has(d)) state.seenDomains.delete(d);
|
|
4445
|
+
for (const k of state.seenPlugins) {
|
|
4446
|
+
if (!newPluginKeys.has(k)) state.seenPlugins.delete(k);
|
|
4652
4447
|
}
|
|
4653
4448
|
}
|
|
4654
4449
|
async function loadSourcesAndLibraries() {
|
|
4655
4450
|
try {
|
|
4656
4451
|
const [{ openLibraryManager: openLibraryManager2 }, { getGlobalCacheDir: getGlobalCacheDir2, globalSkaileDir: globalSkaileDir2 }] = await Promise.all([
|
|
4657
|
-
import('../open-library-
|
|
4452
|
+
import('../open-library-UAZIGZUQ.js'),
|
|
4658
4453
|
import('../core/index.js')
|
|
4659
4454
|
]);
|
|
4660
4455
|
const { manager, library, close } = await openLibraryManager2();
|
|
@@ -4697,7 +4492,7 @@ function rebuildVisible() {
|
|
|
4697
4492
|
state.assetRows,
|
|
4698
4493
|
state.collapsedOrigins,
|
|
4699
4494
|
state.collapsedSources,
|
|
4700
|
-
state.
|
|
4495
|
+
state.collapsedPlugins,
|
|
4701
4496
|
state.originFilter,
|
|
4702
4497
|
state.query
|
|
4703
4498
|
);
|
|
@@ -4723,7 +4518,7 @@ var TABS = {
|
|
|
4723
4518
|
rowCount: () => state.visibleRows.length,
|
|
4724
4519
|
selectableCount: () => state.assetRows.filter(isAsset).length,
|
|
4725
4520
|
renderRow: (i, sel) => renderAssetRow(state.visibleRows[i], sel),
|
|
4726
|
-
footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [
|
|
4521
|
+
footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [/] search [i] info [1]lib [2]src [3]factory [4]store [0]all Tab [q] quit"
|
|
4727
4522
|
},
|
|
4728
4523
|
sources: {
|
|
4729
4524
|
label: "Sources",
|
|
@@ -4731,7 +4526,7 @@ var TABS = {
|
|
|
4731
4526
|
selectableCount: () => state.sourceTreeRows.filter(isAsset).length,
|
|
4732
4527
|
emptyMsg: " No sources registered. Run `skaile source add <git-url>` from the shell to track a github repo.",
|
|
4733
4528
|
renderRow: (i, sel) => renderSourceTreeRow(state.visibleSourceRows[i], sel),
|
|
4734
|
-
footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [
|
|
4529
|
+
footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [i] info Tab [q] quit"
|
|
4735
4530
|
},
|
|
4736
4531
|
libraries: {
|
|
4737
4532
|
label: "Libraries",
|
|
@@ -4739,7 +4534,7 @@ var TABS = {
|
|
|
4739
4534
|
selectableCount: () => state.libraryTreeRows.filter(isAsset).length,
|
|
4740
4535
|
emptyMsg: " No libraries registered. Run `skaile library init <name>` from the shell to author your own.",
|
|
4741
4536
|
renderRow: (i, sel) => renderLibraryTreeRow(state.visibleLibraryRows[i], sel),
|
|
4742
|
-
footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [
|
|
4537
|
+
footer: " \u2191\u2193/jk nav PgUp/PgDn/Home/End jump \u2190/\u2192 collapse/expand [space/+/-] select [a/\u21B5] apply [i] info Tab [q] quit"
|
|
4743
4538
|
},
|
|
4744
4539
|
pending: {
|
|
4745
4540
|
label: "Pending",
|
|
@@ -4831,37 +4626,23 @@ function renderAssetRow(row, selected) {
|
|
|
4831
4626
|
selected
|
|
4832
4627
|
});
|
|
4833
4628
|
}
|
|
4834
|
-
if (row.type === "
|
|
4629
|
+
if (row.type === "plugin-header") {
|
|
4835
4630
|
const origin = rowOrigin(row);
|
|
4836
|
-
const
|
|
4837
|
-
const meta = domainRegistry.get(slug);
|
|
4838
|
-
const title = meta?.title || slug || "(no domain)";
|
|
4839
|
-
const badge = relationBadge(meta?.relation);
|
|
4840
|
-
const label = `${pc5.magenta("\u25C8")} ${pc5.bold(title)}${badge ? ` ${badge}` : ""}`;
|
|
4631
|
+
const plugin = row.plugin;
|
|
4841
4632
|
return renderHeaderLine({
|
|
4842
4633
|
indent: " ".repeat(5),
|
|
4843
|
-
collapsed: state.
|
|
4844
|
-
match: (r) => isAsset(r) &&
|
|
4845
|
-
refs:
|
|
4846
|
-
label,
|
|
4634
|
+
collapsed: state.collapsedPlugins.has(pluginKey(origin, row.source, plugin)),
|
|
4635
|
+
match: (r) => isAsset(r) && inPlugin(r, origin, row.source, plugin),
|
|
4636
|
+
refs: pluginAssetRefs(state.assetRows, origin, row.source, plugin),
|
|
4637
|
+
label: pluginHeaderLabel(plugin),
|
|
4847
4638
|
selected
|
|
4848
4639
|
});
|
|
4849
4640
|
}
|
|
4850
|
-
if (row.type === "domain-info") {
|
|
4851
|
-
const origin = rowOrigin(row);
|
|
4852
|
-
const slug = row.domainSlug ?? NO_DOMAIN;
|
|
4853
|
-
const key = domainKey(origin, row.source, slug);
|
|
4854
|
-
const line = renderDomainInfoLine(
|
|
4855
|
-
domainRegistry.get(slug),
|
|
4856
|
-
origin,
|
|
4857
|
-
row.source,
|
|
4858
|
-
slug,
|
|
4859
|
-
state.expandedDomainInfo.has(key)
|
|
4860
|
-
);
|
|
4861
|
-
return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
|
|
4862
|
-
}
|
|
4863
4641
|
return renderAssetLeaf(row, selected);
|
|
4864
4642
|
}
|
|
4643
|
+
function pluginHeaderLabel(plugin) {
|
|
4644
|
+
return `${pc5.magenta("\u25C8")} ${pc5.bold(pluginLabel(plugin))}`;
|
|
4645
|
+
}
|
|
4865
4646
|
function renderAssetLeaf(row, selected, looseIndent = 5) {
|
|
4866
4647
|
const e = row.entry;
|
|
4867
4648
|
const ref = assetRefOf(row) ?? "";
|
|
@@ -4870,12 +4651,6 @@ function renderAssetLeaf(row, selected, looseIndent = 5) {
|
|
|
4870
4651
|
else if (state.pendingRemoves.has(ref)) status4 = pc5.red("- ");
|
|
4871
4652
|
else if (row.installed) status4 = pc5.green("\u2713 ");
|
|
4872
4653
|
else status4 = pc5.dim("\xB7 ");
|
|
4873
|
-
const dm = row.underDomain ? domainRegistry.get(rowDomain(row)) : void 0;
|
|
4874
|
-
const recommended = !!dm?.recommendedRef && dm.recommendedRef === ref;
|
|
4875
|
-
const hintStr = [relationGlyph(dm?.relation, row.seq), recommended ? pc5.yellow("\u2605") : ""].filter(Boolean).join(" ");
|
|
4876
|
-
const hintWidthText = [relationGlyphText(dm?.relation, row.seq), recommended ? "\u2605" : ""].filter(Boolean).join(" ");
|
|
4877
|
-
const hint = hintStr ? `${hintStr} ` : "";
|
|
4878
|
-
const hintWidth = hintWidthText ? hintWidthText.length + 1 : 0;
|
|
4879
4654
|
const kind = kindColorPad(e.kind);
|
|
4880
4655
|
const name = fitWidth(e.name, 30);
|
|
4881
4656
|
const badge = e.category ? `${pc5.dim("[")}${pc5.cyan(e.category)}${pc5.dim("]")} ` : "";
|
|
@@ -4883,9 +4658,9 @@ function renderAssetLeaf(row, selected, looseIndent = 5) {
|
|
|
4883
4658
|
const repoBare = e.repo ? e.repo.includes("/") ? e.repo.slice(e.repo.indexOf("/") + 1) : e.repo : "";
|
|
4884
4659
|
const repoBadge = repoBare ? pc5.dim(` \xB7${repoBare}`) : "";
|
|
4885
4660
|
const repoWidth = repoBare ? repoBare.length + 2 : 0;
|
|
4886
|
-
const desc = e.description?.slice(0, Math.max(0, state.cols - 56 - badgeWidth -
|
|
4887
|
-
const indent = " ".repeat(looseIndent + (row.
|
|
4888
|
-
const line = `${indent}${status4} ${
|
|
4661
|
+
const desc = e.description?.slice(0, Math.max(0, state.cols - 56 - badgeWidth - repoWidth)) ?? "";
|
|
4662
|
+
const indent = " ".repeat(looseIndent + (row.plugin !== void 0 ? 2 : 0));
|
|
4663
|
+
const line = `${indent}${status4} ${kind} ${name} ${badge}${pc5.dim(desc)}${repoBadge}`;
|
|
4889
4664
|
return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
|
|
4890
4665
|
}
|
|
4891
4666
|
function renderSourceTreeRow(row, selected) {
|
|
@@ -4920,32 +4695,20 @@ function renderSourceTreeRow(row, selected) {
|
|
|
4920
4695
|
rows: state.sourceTreeRows
|
|
4921
4696
|
});
|
|
4922
4697
|
}
|
|
4923
|
-
if (row.type === "
|
|
4698
|
+
if (row.type === "plugin-header") {
|
|
4924
4699
|
const org = row.org;
|
|
4925
4700
|
const repo = row.source;
|
|
4926
|
-
const
|
|
4927
|
-
const meta = domainRegistry.get(slug);
|
|
4928
|
-
const title = meta?.title || slug || "(no domain)";
|
|
4929
|
-
const badge = relationBadge(meta?.relation);
|
|
4930
|
-
const label = `${pc5.magenta("\u25C8")} ${pc5.bold(title)}${badge ? ` ${badge}` : ""}`;
|
|
4701
|
+
const plugin = row.plugin;
|
|
4931
4702
|
return renderHeaderLine({
|
|
4932
4703
|
indent: " ".repeat(7),
|
|
4933
|
-
collapsed: state.
|
|
4934
|
-
match: (r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo &&
|
|
4935
|
-
refs:
|
|
4936
|
-
label,
|
|
4704
|
+
collapsed: state.collapsedSourcePlugins.has(srcPluginKey(org, repo, plugin)),
|
|
4705
|
+
match: (r) => isAsset(r) && rowOrigin(r) === "source" && rowOrg(r) === org && rowGroup(r) === repo && r.plugin === plugin,
|
|
4706
|
+
refs: sourcePluginRefs(state.sourceTreeRows, org, repo, plugin),
|
|
4707
|
+
label: pluginHeaderLabel(plugin),
|
|
4937
4708
|
selected,
|
|
4938
4709
|
rows: state.sourceTreeRows
|
|
4939
4710
|
});
|
|
4940
4711
|
}
|
|
4941
|
-
if (row.type === "domain-info") {
|
|
4942
|
-
const slug = row.domainSlug ?? NO_DOMAIN;
|
|
4943
|
-
const meta = domainRegistry.get(slug);
|
|
4944
|
-
const members = sourceDomainRefs(state.sourceTreeRows, row.org, row.source, slug).length;
|
|
4945
|
-
const key = srcDomainKey(row.org, row.source, slug);
|
|
4946
|
-
const line = renderSourceDomainInfoLine(meta, members, state.expandedSourceDomainInfo.has(key));
|
|
4947
|
-
return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
|
|
4948
|
-
}
|
|
4949
4712
|
return renderAssetLeaf(row, selected, 7);
|
|
4950
4713
|
}
|
|
4951
4714
|
function renderLibraryTreeRow(row, selected) {
|
|
@@ -4967,71 +4730,21 @@ function renderLibraryTreeRow(row, selected) {
|
|
|
4967
4730
|
rows: state.libraryTreeRows
|
|
4968
4731
|
});
|
|
4969
4732
|
}
|
|
4970
|
-
if (row.type === "
|
|
4733
|
+
if (row.type === "plugin-header") {
|
|
4971
4734
|
const group = row.source;
|
|
4972
|
-
const
|
|
4973
|
-
const meta = domainRegistry.get(slug);
|
|
4974
|
-
const title = meta?.title || slug || "(no domain)";
|
|
4975
|
-
const badge = relationBadge(meta?.relation);
|
|
4976
|
-
const label = `${pc5.magenta("\u25C8")} ${pc5.bold(title)}${badge ? ` ${badge}` : ""}`;
|
|
4735
|
+
const plugin = row.plugin;
|
|
4977
4736
|
return renderHeaderLine({
|
|
4978
4737
|
indent: " ".repeat(5),
|
|
4979
|
-
collapsed: state.
|
|
4980
|
-
match: (r) => isAsset(r) &&
|
|
4981
|
-
refs:
|
|
4982
|
-
label,
|
|
4738
|
+
collapsed: state.collapsedLibraryPlugins.has(libPluginKey(group, plugin)),
|
|
4739
|
+
match: (r) => isAsset(r) && inPlugin(r, "library", group, plugin),
|
|
4740
|
+
refs: pluginAssetRefs(state.libraryTreeRows, "library", group, plugin),
|
|
4741
|
+
label: pluginHeaderLabel(plugin),
|
|
4983
4742
|
selected,
|
|
4984
4743
|
rows: state.libraryTreeRows
|
|
4985
4744
|
});
|
|
4986
4745
|
}
|
|
4987
|
-
if (row.type === "domain-info") {
|
|
4988
|
-
const group = row.source;
|
|
4989
|
-
const slug = row.domainSlug ?? NO_DOMAIN;
|
|
4990
|
-
const meta = domainRegistry.get(slug);
|
|
4991
|
-
const members = domainAssetRefs(state.libraryTreeRows, "library", group, slug).length;
|
|
4992
|
-
const key = libDomainKey(group, slug);
|
|
4993
|
-
const line = renderSourceDomainInfoLine(
|
|
4994
|
-
meta,
|
|
4995
|
-
members,
|
|
4996
|
-
state.expandedLibraryDomainInfo.has(key)
|
|
4997
|
-
);
|
|
4998
|
-
return selected ? pc5.inverse(line.padEnd(state.cols)) : line;
|
|
4999
|
-
}
|
|
5000
4746
|
return renderAssetLeaf(row, selected, 5);
|
|
5001
4747
|
}
|
|
5002
|
-
function renderSourceDomainInfoLine(meta, members, expanded) {
|
|
5003
|
-
const indent = " ".repeat(9);
|
|
5004
|
-
const desc = meta?.description ?? "";
|
|
5005
|
-
if (!expanded) {
|
|
5006
|
-
const budget2 = Math.max(0, state.cols - indent.length - 12);
|
|
5007
|
-
const shown2 = desc.length > budget2 ? `${desc.slice(0, Math.max(0, budget2 - 1))}\u2026` : desc;
|
|
5008
|
-
return pc5.dim(`${indent}\u24D8 ${shown2} [d]`);
|
|
5009
|
-
}
|
|
5010
|
-
const parts = [desc, `${members} members`];
|
|
5011
|
-
if (meta?.recommendedRef) parts.push(`\u2605 ${meta.recommendedRef}`);
|
|
5012
|
-
if (meta?.sidecarSource) parts.push(`sidecar ${meta.sidecarSource}`);
|
|
5013
|
-
const full = parts.join(" \xB7 ");
|
|
5014
|
-
const budget = Math.max(0, state.cols - indent.length - 3);
|
|
5015
|
-
const shown = full.length > budget ? `${full.slice(0, Math.max(0, budget - 1))}\u2026` : full;
|
|
5016
|
-
return pc5.dim(`${indent}\u24D8 ${shown}`);
|
|
5017
|
-
}
|
|
5018
|
-
function renderDomainInfoLine(meta, origin, publisher, slug, expanded) {
|
|
5019
|
-
const indent = " ".repeat(7);
|
|
5020
|
-
const desc = meta?.description ?? "";
|
|
5021
|
-
if (!expanded) {
|
|
5022
|
-
const budget2 = Math.max(0, state.cols - indent.length - 12);
|
|
5023
|
-
const shown2 = desc.length > budget2 ? `${desc.slice(0, Math.max(0, budget2 - 1))}\u2026` : desc;
|
|
5024
|
-
return pc5.dim(`${indent}\u24D8 ${shown2} [d]`);
|
|
5025
|
-
}
|
|
5026
|
-
const members = domainAssetRefs(state.assetRows, origin, publisher, slug).length;
|
|
5027
|
-
const parts = [desc, `${members} members`];
|
|
5028
|
-
if (meta?.recommendedRef) parts.push(`\u2605 ${meta.recommendedRef}`);
|
|
5029
|
-
if (meta?.sidecarSource) parts.push(`sidecar ${meta.sidecarSource}`);
|
|
5030
|
-
const full = parts.join(" \xB7 ");
|
|
5031
|
-
const budget = Math.max(0, state.cols - indent.length - 3);
|
|
5032
|
-
const shown = full.length > budget ? `${full.slice(0, Math.max(0, budget - 1))}\u2026` : full;
|
|
5033
|
-
return pc5.dim(`${indent}\u24D8 ${shown}`);
|
|
5034
|
-
}
|
|
5035
4748
|
function computeMaxBodyRows() {
|
|
5036
4749
|
const pendingLines = state.pendingAdds.size > 0 || state.pendingRemoves.size > 0 ? 1 + (state.pendingAdds.size > 0 ? 1 : 0) + (state.pendingRemoves.size > 0 ? 1 : 0) : 0;
|
|
5037
4750
|
const msgLines = state.message ? 2 : 0;
|
|
@@ -5211,10 +4924,10 @@ function expandUnderCursor() {
|
|
|
5211
4924
|
} else if (row.type === "publisher-header" && state.collapsedSources.has(srcKey(origin, row.source))) {
|
|
5212
4925
|
state.collapsedSources.delete(srcKey(origin, row.source));
|
|
5213
4926
|
rebuildVisible();
|
|
5214
|
-
} else if (row.type === "
|
|
5215
|
-
const
|
|
5216
|
-
if (state.
|
|
5217
|
-
state.
|
|
4927
|
+
} else if (row.type === "plugin-header") {
|
|
4928
|
+
const pk = pluginKey(origin, row.source, row.plugin);
|
|
4929
|
+
if (state.collapsedPlugins.has(pk)) {
|
|
4930
|
+
state.collapsedPlugins.delete(pk);
|
|
5218
4931
|
rebuildVisible();
|
|
5219
4932
|
}
|
|
5220
4933
|
}
|
|
@@ -5245,10 +4958,10 @@ function collapseOrJumpUnderCursor() {
|
|
|
5245
4958
|
}
|
|
5246
4959
|
return;
|
|
5247
4960
|
}
|
|
5248
|
-
if (row.type === "
|
|
5249
|
-
const
|
|
5250
|
-
if (!state.
|
|
5251
|
-
state.
|
|
4961
|
+
if (row.type === "plugin-header") {
|
|
4962
|
+
const pk = pluginKey(origin, row.source, row.plugin);
|
|
4963
|
+
if (!state.collapsedPlugins.has(pk)) {
|
|
4964
|
+
state.collapsedPlugins.add(pk);
|
|
5252
4965
|
rebuildVisible();
|
|
5253
4966
|
} else {
|
|
5254
4967
|
const idx2 = findLastIndex(
|
|
@@ -5263,28 +4976,10 @@ function collapseOrJumpUnderCursor() {
|
|
|
5263
4976
|
const idx = findLastIndex(
|
|
5264
4977
|
state.visibleRows,
|
|
5265
4978
|
state.cursor,
|
|
5266
|
-
(r) => r.type === "
|
|
4979
|
+
(r) => r.type === "plugin-header" || r.type === "publisher-header" || r.type === "origin-header"
|
|
5267
4980
|
);
|
|
5268
4981
|
if (idx >= 0) state.cursor = idx;
|
|
5269
4982
|
}
|
|
5270
|
-
function toggleDomainInfoUnderCursor() {
|
|
5271
|
-
const row = state.visibleRows[state.cursor];
|
|
5272
|
-
if (!row) return;
|
|
5273
|
-
const origin = rowOrigin(row);
|
|
5274
|
-
let key = null;
|
|
5275
|
-
if (row.type === "domain-header" || row.type === "domain-info") {
|
|
5276
|
-
key = domainKey(origin, row.source, row.domainSlug ?? NO_DOMAIN);
|
|
5277
|
-
} else if (row.type === "asset" && row.underDomain) {
|
|
5278
|
-
key = domainKey(origin, rowPublisher(row), rowDomain(row));
|
|
5279
|
-
}
|
|
5280
|
-
if (!key) {
|
|
5281
|
-
state.message = pc5.dim("No domain here \u2014 [d] opens a domain's info region.");
|
|
5282
|
-
return;
|
|
5283
|
-
}
|
|
5284
|
-
if (state.expandedDomainInfo.has(key)) state.expandedDomainInfo.delete(key);
|
|
5285
|
-
else state.expandedDomainInfo.add(key);
|
|
5286
|
-
rebuildVisible();
|
|
5287
|
-
}
|
|
5288
4983
|
function actOnSourceHeader(row, action3) {
|
|
5289
4984
|
if (row.type === "org-header") {
|
|
5290
4985
|
bulkSelection(sourceOrgRefs(state.sourceTreeRows, row.org), action3);
|
|
@@ -5294,7 +4989,14 @@ function actOnSourceHeader(row, action3) {
|
|
|
5294
4989
|
bulkSelection(sourceRepoRefs(state.sourceTreeRows, row.org, row.source), action3);
|
|
5295
4990
|
return true;
|
|
5296
4991
|
}
|
|
5297
|
-
|
|
4992
|
+
if (row.type === "plugin-header") {
|
|
4993
|
+
bulkSelection(
|
|
4994
|
+
sourcePluginRefs(state.sourceTreeRows, row.org, row.source, row.plugin),
|
|
4995
|
+
action3
|
|
4996
|
+
);
|
|
4997
|
+
return true;
|
|
4998
|
+
}
|
|
4999
|
+
return row.type === "source-root";
|
|
5298
5000
|
}
|
|
5299
5001
|
function selectSourceUnderCursor(action3) {
|
|
5300
5002
|
const row = state.visibleSourceRows[state.cursor];
|
|
@@ -5322,10 +5024,10 @@ function expandSourceUnderCursor() {
|
|
|
5322
5024
|
state.collapsedSourceRepos.delete(k);
|
|
5323
5025
|
rebuildVisibleSources();
|
|
5324
5026
|
}
|
|
5325
|
-
} else if (row.type === "
|
|
5326
|
-
const k =
|
|
5327
|
-
if (state.
|
|
5328
|
-
state.
|
|
5027
|
+
} else if (row.type === "plugin-header") {
|
|
5028
|
+
const k = srcPluginKey(row.org, row.source, row.plugin);
|
|
5029
|
+
if (state.collapsedSourcePlugins.has(k)) {
|
|
5030
|
+
state.collapsedSourcePlugins.delete(k);
|
|
5329
5031
|
rebuildVisibleSources();
|
|
5330
5032
|
}
|
|
5331
5033
|
}
|
|
@@ -5355,10 +5057,10 @@ function collapseOrJumpSourceUnderCursor() {
|
|
|
5355
5057
|
}
|
|
5356
5058
|
return;
|
|
5357
5059
|
}
|
|
5358
|
-
if (row.type === "
|
|
5359
|
-
const k =
|
|
5360
|
-
if (!state.
|
|
5361
|
-
state.
|
|
5060
|
+
if (row.type === "plugin-header") {
|
|
5061
|
+
const k = srcPluginKey(row.org, row.source, row.plugin);
|
|
5062
|
+
if (!state.collapsedSourcePlugins.has(k)) {
|
|
5063
|
+
state.collapsedSourcePlugins.add(k);
|
|
5362
5064
|
rebuildVisibleSources();
|
|
5363
5065
|
} else {
|
|
5364
5066
|
const idx2 = findLastIndex(
|
|
@@ -5373,33 +5075,23 @@ function collapseOrJumpSourceUnderCursor() {
|
|
|
5373
5075
|
const idx = findLastIndex(
|
|
5374
5076
|
state.visibleSourceRows,
|
|
5375
5077
|
state.cursor,
|
|
5376
|
-
(r) => r.type === "
|
|
5078
|
+
(r) => r.type === "plugin-header" || r.type === "repo-header" || r.type === "org-header"
|
|
5377
5079
|
);
|
|
5378
5080
|
if (idx >= 0) state.cursor = idx;
|
|
5379
5081
|
}
|
|
5380
|
-
function toggleSourceDomainInfoUnderCursor() {
|
|
5381
|
-
const row = state.visibleSourceRows[state.cursor];
|
|
5382
|
-
if (!row) return;
|
|
5383
|
-
let key = null;
|
|
5384
|
-
if (row.type === "domain-header" || row.type === "domain-info") {
|
|
5385
|
-
key = srcDomainKey(row.org, row.source, row.domainSlug ?? NO_DOMAIN);
|
|
5386
|
-
} else if (row.type === "asset" && row.underDomain) {
|
|
5387
|
-
key = srcDomainKey(rowOrg(row), rowGroup(row), rowDomain(row));
|
|
5388
|
-
}
|
|
5389
|
-
if (!key) {
|
|
5390
|
-
state.message = pc5.dim("No domain here \u2014 [d] opens a domain's info region.");
|
|
5391
|
-
return;
|
|
5392
|
-
}
|
|
5393
|
-
if (state.expandedSourceDomainInfo.has(key)) state.expandedSourceDomainInfo.delete(key);
|
|
5394
|
-
else state.expandedSourceDomainInfo.add(key);
|
|
5395
|
-
rebuildVisibleSources();
|
|
5396
|
-
}
|
|
5397
5082
|
function actOnLibraryHeader(row, action3) {
|
|
5398
5083
|
if (row.type === "library-header") {
|
|
5399
5084
|
bulkSelection(libraryGroupRefs(state.libraryTreeRows, row.source), action3);
|
|
5400
5085
|
return true;
|
|
5401
5086
|
}
|
|
5402
|
-
|
|
5087
|
+
if (row.type === "plugin-header") {
|
|
5088
|
+
bulkSelection(
|
|
5089
|
+
pluginAssetRefs(state.libraryTreeRows, "library", row.source, row.plugin),
|
|
5090
|
+
action3
|
|
5091
|
+
);
|
|
5092
|
+
return true;
|
|
5093
|
+
}
|
|
5094
|
+
return row.type === "library-root";
|
|
5403
5095
|
}
|
|
5404
5096
|
function selectLibraryUnderCursor(action3) {
|
|
5405
5097
|
const row = state.visibleLibraryRows[state.cursor];
|
|
@@ -5421,10 +5113,10 @@ function expandLibraryUnderCursor() {
|
|
|
5421
5113
|
if (row.type === "library-header" && state.collapsedLibraryGroups.has(row.source)) {
|
|
5422
5114
|
state.collapsedLibraryGroups.delete(row.source);
|
|
5423
5115
|
rebuildVisibleLibraries();
|
|
5424
|
-
} else if (row.type === "
|
|
5425
|
-
const k =
|
|
5426
|
-
if (state.
|
|
5427
|
-
state.
|
|
5116
|
+
} else if (row.type === "plugin-header") {
|
|
5117
|
+
const k = libPluginKey(row.source, row.plugin);
|
|
5118
|
+
if (state.collapsedLibraryPlugins.has(k)) {
|
|
5119
|
+
state.collapsedLibraryPlugins.delete(k);
|
|
5428
5120
|
rebuildVisibleLibraries();
|
|
5429
5121
|
}
|
|
5430
5122
|
}
|
|
@@ -5446,10 +5138,10 @@ function collapseOrJumpLibraryUnderCursor() {
|
|
|
5446
5138
|
}
|
|
5447
5139
|
return;
|
|
5448
5140
|
}
|
|
5449
|
-
if (row.type === "
|
|
5450
|
-
const k =
|
|
5451
|
-
if (!state.
|
|
5452
|
-
state.
|
|
5141
|
+
if (row.type === "plugin-header") {
|
|
5142
|
+
const k = libPluginKey(row.source, row.plugin);
|
|
5143
|
+
if (!state.collapsedLibraryPlugins.has(k)) {
|
|
5144
|
+
state.collapsedLibraryPlugins.add(k);
|
|
5453
5145
|
rebuildVisibleLibraries();
|
|
5454
5146
|
} else {
|
|
5455
5147
|
const idx2 = findLastIndex(
|
|
@@ -5464,27 +5156,10 @@ function collapseOrJumpLibraryUnderCursor() {
|
|
|
5464
5156
|
const idx = findLastIndex(
|
|
5465
5157
|
state.visibleLibraryRows,
|
|
5466
5158
|
state.cursor,
|
|
5467
|
-
(r) => r.type === "
|
|
5159
|
+
(r) => r.type === "plugin-header" || r.type === "library-header"
|
|
5468
5160
|
);
|
|
5469
5161
|
if (idx >= 0) state.cursor = idx;
|
|
5470
5162
|
}
|
|
5471
|
-
function toggleLibraryDomainInfoUnderCursor() {
|
|
5472
|
-
const row = state.visibleLibraryRows[state.cursor];
|
|
5473
|
-
if (!row) return;
|
|
5474
|
-
let key = null;
|
|
5475
|
-
if (row.type === "domain-header" || row.type === "domain-info") {
|
|
5476
|
-
key = libDomainKey(row.source, row.domainSlug ?? NO_DOMAIN);
|
|
5477
|
-
} else if (row.type === "asset" && row.underDomain) {
|
|
5478
|
-
key = libDomainKey(rowGroup(row), rowDomain(row));
|
|
5479
|
-
}
|
|
5480
|
-
if (!key) {
|
|
5481
|
-
state.message = pc5.dim("No domain here \u2014 [d] opens a domain's info region.");
|
|
5482
|
-
return;
|
|
5483
|
-
}
|
|
5484
|
-
if (state.expandedLibraryDomainInfo.has(key)) state.expandedLibraryDomainInfo.delete(key);
|
|
5485
|
-
else state.expandedLibraryDomainInfo.add(key);
|
|
5486
|
-
rebuildVisibleLibraries();
|
|
5487
|
-
}
|
|
5488
5163
|
function findLastIndex(arr, endExclusive, pred) {
|
|
5489
5164
|
for (let i = Math.min(endExclusive, arr.length) - 1; i >= 0; i--) {
|
|
5490
5165
|
if (pred(arr[i])) return i;
|
|
@@ -5585,14 +5260,12 @@ var KEYMAP = [
|
|
|
5585
5260
|
{ keys: [" "], when: TAB_SOURCES, run: () => selectSourceUnderCursor("toggle") },
|
|
5586
5261
|
{ keys: ["a", "\r", "\n"], when: TAB_SOURCES, run: applyChanges },
|
|
5587
5262
|
{ keys: ["i"], when: TAB_SOURCES, run: showInfo },
|
|
5588
|
-
{ keys: ["d"], when: TAB_SOURCES, run: toggleSourceDomainInfoUnderCursor },
|
|
5589
5263
|
// Libraries tab: + / - / space select (asset leaf or library bulk header).
|
|
5590
5264
|
{ keys: ["+"], when: TAB_LIBRARIES, run: () => selectLibraryUnderCursor("add") },
|
|
5591
5265
|
{ keys: ["-"], when: TAB_LIBRARIES, run: () => selectLibraryUnderCursor("remove") },
|
|
5592
5266
|
{ keys: [" "], when: TAB_LIBRARIES, run: () => selectLibraryUnderCursor("toggle") },
|
|
5593
5267
|
{ keys: ["a", "\r", "\n"], when: TAB_LIBRARIES, run: applyChanges },
|
|
5594
5268
|
{ keys: ["i"], when: TAB_LIBRARIES, run: showInfo },
|
|
5595
|
-
{ keys: ["d"], when: TAB_LIBRARIES, run: toggleLibraryDomainInfoUnderCursor },
|
|
5596
5269
|
// - : assets → bulk-remove or single-remove toggle
|
|
5597
5270
|
{
|
|
5598
5271
|
keys: ["-"],
|
|
@@ -5628,8 +5301,6 @@ var KEYMAP = [
|
|
|
5628
5301
|
{ keys: ["\r", "\n"], when: TAB_ASSETS, run: applyChanges },
|
|
5629
5302
|
// Info — assets only
|
|
5630
5303
|
{ keys: ["i"], when: TAB_ASSETS, run: showInfo },
|
|
5631
|
-
// Domain info region — assets only. Toggles the ⓘ line truncated ↔ full.
|
|
5632
|
-
{ keys: ["d"], when: TAB_ASSETS, run: toggleDomainInfoUnderCursor },
|
|
5633
5304
|
// / — assets only. Opens the incremental search prompt (see handleSearchKey).
|
|
5634
5305
|
{
|
|
5635
5306
|
keys: ["/"],
|
|
@@ -6309,7 +5980,7 @@ function action2(fn) {
|
|
|
6309
5980
|
};
|
|
6310
5981
|
}
|
|
6311
5982
|
async function reconcileAndReport(projectDir, plugins) {
|
|
6312
|
-
const { reconcilePlugins } = await import('../plugin-store-
|
|
5983
|
+
const { reconcilePlugins } = await import('../plugin-store-TT45MGQZ.js');
|
|
6313
5984
|
if (plugins.length === 0) {
|
|
6314
5985
|
logInfo("No plugins declared \u2014 nothing to reconcile.");
|
|
6315
5986
|
return;
|
|
@@ -6325,7 +5996,7 @@ async function reconcileAndReport(projectDir, plugins) {
|
|
|
6325
5996
|
async function runInstall2(spec, opts) {
|
|
6326
5997
|
const projectDir = path35__default.resolve(opts.projectDir);
|
|
6327
5998
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
6328
|
-
const { specName } = await import('../plugin-store-
|
|
5999
|
+
const { specName } = await import('../plugin-store-TT45MGQZ.js');
|
|
6329
6000
|
const yamlPath = path35__default.join(projectDir, "skaile.yaml");
|
|
6330
6001
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
6331
6002
|
const replaced = editor.addPlugin(spec, specName);
|
|
@@ -6337,7 +6008,7 @@ async function runInstall2(spec, opts) {
|
|
|
6337
6008
|
async function runRemove(name, opts) {
|
|
6338
6009
|
const projectDir = path35__default.resolve(opts.projectDir);
|
|
6339
6010
|
const { WorkspaceYamlEditor: WorkspaceYamlEditor2 } = await import('../core/index.js');
|
|
6340
|
-
const { specName } = await import('../plugin-store-
|
|
6011
|
+
const { specName } = await import('../plugin-store-TT45MGQZ.js');
|
|
6341
6012
|
const yamlPath = path35__default.join(projectDir, "skaile.yaml");
|
|
6342
6013
|
const editor = WorkspaceYamlEditor2.load(yamlPath);
|
|
6343
6014
|
const removed = editor.removePlugin(name, specName);
|
|
@@ -6365,7 +6036,7 @@ async function runList(opts) {
|
|
|
6365
6036
|
const registry = createPluginRegistry();
|
|
6366
6037
|
if (declared.length > 0) {
|
|
6367
6038
|
try {
|
|
6368
|
-
const { loadPlugins } = await import('../plugin-store-
|
|
6039
|
+
const { loadPlugins } = await import('../plugin-store-TT45MGQZ.js');
|
|
6369
6040
|
const result = await loadPlugins(projectDir, declared, registry);
|
|
6370
6041
|
for (const f of result.failed) logWarn(f.error);
|
|
6371
6042
|
} catch (err) {
|
|
@@ -7490,12 +7161,12 @@ function makeServeCommand() {
|
|
|
7490
7161
|
);
|
|
7491
7162
|
}
|
|
7492
7163
|
async function ensurePluginsLoadedForServe(projectDir) {
|
|
7493
|
-
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-
|
|
7164
|
+
const { logInfo: logInfo2, logWarn: logWarn2 } = await import('../helpers-EVPKJXGS.js');
|
|
7494
7165
|
try {
|
|
7495
7166
|
const { resolveSkWorkspaceConfig: resolveSkWorkspaceConfig2 } = await import('../core/index.js');
|
|
7496
7167
|
const config = resolveSkWorkspaceConfig2(projectDir);
|
|
7497
7168
|
if (!config.plugins || config.plugins.length === 0) return;
|
|
7498
|
-
const { ensurePluginsLoaded } = await import('../plugin-store-
|
|
7169
|
+
const { ensurePluginsLoaded } = await import('../plugin-store-TT45MGQZ.js');
|
|
7499
7170
|
const { pluginRegistry } = await import('../plugin-registry/index.js');
|
|
7500
7171
|
const result = await ensurePluginsLoaded(projectDir, config.plugins, pluginRegistry);
|
|
7501
7172
|
if (result.loaded.length > 0) {
|
|
@@ -7509,14 +7180,14 @@ async function ensurePluginsLoadedForServe(projectDir) {
|
|
|
7509
7180
|
}
|
|
7510
7181
|
}
|
|
7511
7182
|
async function runCompileTest(opts) {
|
|
7512
|
-
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-
|
|
7183
|
+
const { logOk: logOk2, logErr: logErr2, logInfo: logInfo2, S: S2 } = await import('../helpers-EVPKJXGS.js');
|
|
7513
7184
|
const { tmpdir } = await import('os');
|
|
7514
7185
|
const { dirname: dirname4, join: join6, resolve: resolve5 } = await import('path');
|
|
7515
7186
|
const { fileURLToPath: fileURLToPath2 } = await import('url');
|
|
7516
7187
|
const { unlinkSync, existsSync: existsSync14 } = await import('fs');
|
|
7517
7188
|
const { spawn } = await import('child_process');
|
|
7518
7189
|
const { portableSpawnSync: portableSpawnSync2 } = await import('../core/index.js');
|
|
7519
|
-
const { MONOREPO_ROOT } = await import('../paths-
|
|
7190
|
+
const { MONOREPO_ROOT } = await import('../paths-U7TA7MTE.js');
|
|
7520
7191
|
if (MONOREPO_ROOT === null) {
|
|
7521
7192
|
logErr2("--compile-test is only available inside the skaile-dev workspace.");
|
|
7522
7193
|
logInfo2("Run it from a checkout of skaile-ai/skaile-dev (the monorepo shell).");
|
|
@@ -8280,12 +7951,12 @@ function printOverviewRepos(repos) {
|
|
|
8280
7951
|
console.log(` ${icon} ${S.cmd(r.name)} ${pc5.dim(`[${r.kind}]`)} ${status4}`);
|
|
8281
7952
|
}
|
|
8282
7953
|
}
|
|
8283
|
-
function
|
|
8284
|
-
const nameW = Math.max(4, ...[...
|
|
7954
|
+
function printOverviewPublishers(byPublisher) {
|
|
7955
|
+
const nameW = Math.max(4, ...[...byPublisher.values()].flat().map((e) => e.name.length));
|
|
8285
7956
|
const kindW = 8;
|
|
8286
|
-
for (const [
|
|
7957
|
+
for (const [publisher, entries] of byPublisher) {
|
|
8287
7958
|
console.log();
|
|
8288
|
-
console.log(` ${S.heading(
|
|
7959
|
+
console.log(` ${S.heading(publisher)} ${pc5.dim(`(${entries.length})`)}`);
|
|
8289
7960
|
console.log(` ${S.rule(nameW + kindW + 20)}`);
|
|
8290
7961
|
for (const e of entries) {
|
|
8291
7962
|
const sync = SYNC_ICONS[e.syncStatus] ?? SYNC_ICONS.unknown;
|
|
@@ -8303,7 +7974,7 @@ function showOverview(am2) {
|
|
|
8303
7974
|
console.log();
|
|
8304
7975
|
console.log(S.heading(" Asset Overview"));
|
|
8305
7976
|
printOverviewRepos(result.repos);
|
|
8306
|
-
|
|
7977
|
+
printOverviewPublishers(result.byPublisher);
|
|
8307
7978
|
console.log();
|
|
8308
7979
|
console.log(` ${pc5.dim(`${result.total} assets deployed`)}`);
|
|
8309
7980
|
console.log();
|
|
@@ -8392,7 +8063,7 @@ function makeStoreCommand() {
|
|
|
8392
8063
|
process.exit(2);
|
|
8393
8064
|
});
|
|
8394
8065
|
store.command("search <query>").description("Search the AI Asset Store catalog by name, description, or publisher").option("--kind <kind>", "Filter by asset kind (skill, agent, prompt, flow, \u2026)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (query, opts) => {
|
|
8395
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
8066
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
|
|
8396
8067
|
try {
|
|
8397
8068
|
const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
|
|
8398
8069
|
const assets = await remote.listAssets(opts.kind ? { kind: opts.kind } : {});
|
|
@@ -8420,8 +8091,8 @@ function makeStoreCommand() {
|
|
|
8420
8091
|
}
|
|
8421
8092
|
});
|
|
8422
8093
|
store.command("show <ref>").description("Show a store asset's details + provenance (source, files, integrity)").option("-C, --project-dir <dir>", "Project directory (catalog config overlay)", process.cwd()).action(async (ref, opts) => {
|
|
8423
|
-
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-
|
|
8424
|
-
const { supportsInstallManifest } = await import('../project-
|
|
8094
|
+
const { openCatalogSource: openCatalogSource2, LocalCatalogDisabledError } = await import('../open-library-UAZIGZUQ.js');
|
|
8095
|
+
const { supportsInstallManifest } = await import('../project-JLD5RCVK.js');
|
|
8425
8096
|
try {
|
|
8426
8097
|
const remote = await openCatalogSource2({ projectDir: path35__default.resolve(opts.projectDir) });
|
|
8427
8098
|
const asset = await remote.resolve(ref);
|
|
@@ -8865,33 +8536,28 @@ function validateWorkspaceManifests(rootPath) {
|
|
|
8865
8536
|
}
|
|
8866
8537
|
return { total: files.length, errors };
|
|
8867
8538
|
}
|
|
8868
|
-
var
|
|
8539
|
+
var EXCLUDED_PATHS = ["skaileup-shared/", "external/", "docs/"];
|
|
8540
|
+
function toPosix(p7) {
|
|
8541
|
+
return p7.split(path35__default.sep).join("/");
|
|
8542
|
+
}
|
|
8543
|
+
function isExcludedPath(relPath) {
|
|
8544
|
+
const rel = toPosix(relPath);
|
|
8545
|
+
return EXCLUDED_PATHS.some((prefix) => rel.startsWith(prefix));
|
|
8546
|
+
}
|
|
8869
8547
|
function collectAssetVersions() {
|
|
8870
8548
|
const assets = [];
|
|
8871
8549
|
if (!fs11__default.existsSync(AI_RESOURCES)) return assets;
|
|
8872
|
-
const
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
collectAgentVersions(agentsDir, d.name, assets);
|
|
8882
|
-
}
|
|
8883
|
-
const flowsDir = path35__default.join(domainDir, "flows");
|
|
8884
|
-
if (fs11__default.existsSync(flowsDir)) {
|
|
8885
|
-
collectFlowVersions(flowsDir, d.name, assets);
|
|
8886
|
-
}
|
|
8887
|
-
const promptsDir = path35__default.join(domainDir, "prompts");
|
|
8888
|
-
if (fs11__default.existsSync(promptsDir)) {
|
|
8889
|
-
collectPromptVersions(promptsDir, d.name, assets);
|
|
8890
|
-
}
|
|
8891
|
-
}
|
|
8892
|
-
return assets;
|
|
8550
|
+
const kindDirs = (kindDirName) => findKindDirs(AI_RESOURCES, kindDirName).filter(
|
|
8551
|
+
(dir) => !isExcludedPath(path35__default.relative(AI_RESOURCES, dir))
|
|
8552
|
+
);
|
|
8553
|
+
for (const dir of kindDirs("skills")) collectSkillVersions(dir, assets);
|
|
8554
|
+
for (const dir of kindDirs("agents")) collectAgentVersions(dir, assets);
|
|
8555
|
+
for (const dir of kindDirs("flows")) collectFlowVersions(dir, assets);
|
|
8556
|
+
for (const dir of kindDirs("prompts")) collectPromptVersions(dir, assets);
|
|
8557
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8558
|
+
return assets.filter((a) => !seen.has(a.filePath) && seen.add(a.filePath));
|
|
8893
8559
|
}
|
|
8894
|
-
function collectFlowVersions(dir,
|
|
8560
|
+
function collectFlowVersions(dir, out) {
|
|
8895
8561
|
for (const f of fs11__default.readdirSync(dir)) {
|
|
8896
8562
|
if (!f.endsWith(".flow.yaml")) continue;
|
|
8897
8563
|
const fp = path35__default.join(dir, f);
|
|
@@ -8900,13 +8566,12 @@ function collectFlowVersions(dir, domain, out) {
|
|
|
8900
8566
|
out.push({
|
|
8901
8567
|
kind: "flow",
|
|
8902
8568
|
name: parsed?.id ?? f.replace(".flow.yaml", ""),
|
|
8903
|
-
domain,
|
|
8904
8569
|
version: parsed?.version ?? "",
|
|
8905
8570
|
filePath: fp
|
|
8906
8571
|
});
|
|
8907
8572
|
}
|
|
8908
8573
|
}
|
|
8909
|
-
function collectPromptVersions(dir,
|
|
8574
|
+
function collectPromptVersions(dir, out) {
|
|
8910
8575
|
for (const f of fs11__default.readdirSync(dir)) {
|
|
8911
8576
|
if (!f.endsWith(".prompt.md")) continue;
|
|
8912
8577
|
const fp = path35__default.join(dir, f);
|
|
@@ -8915,13 +8580,12 @@ function collectPromptVersions(dir, domain, out) {
|
|
|
8915
8580
|
out.push({
|
|
8916
8581
|
kind: "prompt",
|
|
8917
8582
|
name: fm?.name ?? f.replace(".prompt.md", ""),
|
|
8918
|
-
domain,
|
|
8919
8583
|
version: fm?.metadata?.version ?? "",
|
|
8920
8584
|
filePath: fp
|
|
8921
8585
|
});
|
|
8922
8586
|
}
|
|
8923
8587
|
}
|
|
8924
|
-
function collectSkillVersions(dir,
|
|
8588
|
+
function collectSkillVersions(dir, out) {
|
|
8925
8589
|
for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
|
|
8926
8590
|
if (!entry.isDirectory()) continue;
|
|
8927
8591
|
const full = path35__default.join(dir, entry.name);
|
|
@@ -8932,16 +8596,15 @@ function collectSkillVersions(dir, domain, out) {
|
|
|
8932
8596
|
out.push({
|
|
8933
8597
|
kind: "skill",
|
|
8934
8598
|
name: fm?.name ?? entry.name,
|
|
8935
|
-
domain,
|
|
8936
8599
|
version: fm?.metadata?.version ?? "",
|
|
8937
8600
|
filePath: skillMd
|
|
8938
8601
|
});
|
|
8939
8602
|
} else {
|
|
8940
|
-
collectSkillVersions(full,
|
|
8603
|
+
collectSkillVersions(full, out);
|
|
8941
8604
|
}
|
|
8942
8605
|
}
|
|
8943
8606
|
}
|
|
8944
|
-
function collectAgentVersions(dir,
|
|
8607
|
+
function collectAgentVersions(dir, out) {
|
|
8945
8608
|
for (const entry of fs11__default.readdirSync(dir, { withFileTypes: true })) {
|
|
8946
8609
|
if (!entry.isDirectory()) continue;
|
|
8947
8610
|
const agentYaml = path35__default.join(dir, entry.name, "agent.yaml");
|
|
@@ -8951,12 +8614,38 @@ function collectAgentVersions(dir, domain, out) {
|
|
|
8951
8614
|
out.push({
|
|
8952
8615
|
kind: "agent",
|
|
8953
8616
|
name: parsed?.name ?? entry.name,
|
|
8954
|
-
domain,
|
|
8955
8617
|
version: parsed?.version ?? "",
|
|
8956
8618
|
filePath: agentYaml
|
|
8957
8619
|
});
|
|
8958
8620
|
}
|
|
8959
8621
|
}
|
|
8622
|
+
function assetLocation(a) {
|
|
8623
|
+
return toPosix(path35__default.relative(AI_RESOURCES, a.filePath));
|
|
8624
|
+
}
|
|
8625
|
+
function findChangelogUnit(assetRelPath, root) {
|
|
8626
|
+
let dir = path35__default.posix.dirname(toPosix(assetRelPath));
|
|
8627
|
+
for (; ; ) {
|
|
8628
|
+
const candidate = dir === "." ? "CHANGELOG.md" : `${dir}/CHANGELOG.md`;
|
|
8629
|
+
if (fs11__default.existsSync(path35__default.join(root, candidate))) return candidate;
|
|
8630
|
+
if (dir === ".") return null;
|
|
8631
|
+
dir = path35__default.posix.dirname(dir);
|
|
8632
|
+
}
|
|
8633
|
+
}
|
|
8634
|
+
function checkChangelogUnits(modifiedFiles, root) {
|
|
8635
|
+
const modified = new Set(modifiedFiles.map(toPosix));
|
|
8636
|
+
const assetPattern = /(SKILL\.md|agent\.yaml|\.flow\.yaml|\.prompt\.md)$/;
|
|
8637
|
+
const units = /* @__PURE__ */ new Set();
|
|
8638
|
+
const orphans = [];
|
|
8639
|
+
for (const f of modified) {
|
|
8640
|
+
if (!assetPattern.test(f) || isExcludedPath(f)) continue;
|
|
8641
|
+
const unit = findChangelogUnit(f, root);
|
|
8642
|
+
if (unit) units.add(unit);
|
|
8643
|
+
else orphans.push(f);
|
|
8644
|
+
}
|
|
8645
|
+
const updated = [...units].filter((u) => modified.has(u));
|
|
8646
|
+
const stale = [...units].filter((u) => !modified.has(u));
|
|
8647
|
+
return { updated, stale, orphans };
|
|
8648
|
+
}
|
|
8960
8649
|
function isValidSemver(v) {
|
|
8961
8650
|
return /^\d+\.\d+\.\d+(-[\w.]+)?(\+[\w.]+)?$/.test(v);
|
|
8962
8651
|
}
|
|
@@ -8990,10 +8679,12 @@ function checkAssetVersions(assets) {
|
|
|
8990
8679
|
let warnings = 0;
|
|
8991
8680
|
for (const a of assets) {
|
|
8992
8681
|
if (!a.version) {
|
|
8993
|
-
logErr(`${a.kind}:${a.name} (${a
|
|
8682
|
+
logErr(`${a.kind}:${a.name} (${assetLocation(a)}) \u2014 missing version`);
|
|
8994
8683
|
errors++;
|
|
8995
8684
|
} else if (!isValidSemver(a.version)) {
|
|
8996
|
-
logWarn(
|
|
8685
|
+
logWarn(
|
|
8686
|
+
`${a.kind}:${a.name} (${assetLocation(a)}) \u2014 version "${a.version}" is not valid semver`
|
|
8687
|
+
);
|
|
8997
8688
|
warnings++;
|
|
8998
8689
|
}
|
|
8999
8690
|
}
|
|
@@ -9012,7 +8703,7 @@ function checkVersionBumps(assets) {
|
|
|
9012
8703
|
const headVersion = extractVersionFromContent(a.filePath, headContent);
|
|
9013
8704
|
if (headVersion && headVersion === a.version) {
|
|
9014
8705
|
logWarn(
|
|
9015
|
-
`${a.kind}:${a.name} (${a
|
|
8706
|
+
`${a.kind}:${a.name} (${assetLocation(a)}) \u2014 file changed but version not bumped (${a.version})`
|
|
9016
8707
|
);
|
|
9017
8708
|
warnings++;
|
|
9018
8709
|
}
|
|
@@ -9052,7 +8743,7 @@ function checkFlowVersionPins(assets) {
|
|
|
9052
8743
|
return { errors, warnings };
|
|
9053
8744
|
}
|
|
9054
8745
|
function runVersionsCheck(opts) {
|
|
9055
|
-
let assets = collectAssetVersions()
|
|
8746
|
+
let assets = collectAssetVersions();
|
|
9056
8747
|
if (opts.changedOnly) {
|
|
9057
8748
|
assets = filterToChangedAssets(assets);
|
|
9058
8749
|
}
|
|
@@ -9103,13 +8794,13 @@ function makeValidateCommand() {
|
|
|
9103
8794
|
process.exit(1);
|
|
9104
8795
|
}
|
|
9105
8796
|
});
|
|
9106
|
-
cmd.command("versions").description("Check version fields and flow version pins").option("--
|
|
8797
|
+
cmd.command("versions").description("Check version fields and flow version pins").option("--changed-only", "Only check assets modified since last commit").option("--strict", "Exit 1 on warnings (for CI)").action((opts) => {
|
|
9107
8798
|
runVersionsCheck(opts);
|
|
9108
8799
|
});
|
|
9109
|
-
cmd.command("changelog").description("Check that modified
|
|
8800
|
+
cmd.command("changelog").description("Check that modified assets have an updated nearest CHANGELOG.md").option("--base <ref>", "Git base ref for diff", "HEAD").action((opts) => {
|
|
9110
8801
|
let diffOutput;
|
|
9111
8802
|
try {
|
|
9112
|
-
diffOutput = execSync(`git diff --name-only ${opts.base}`, {
|
|
8803
|
+
diffOutput = execSync(`git diff --name-only --relative ${opts.base}`, {
|
|
9113
8804
|
cwd: AI_RESOURCES,
|
|
9114
8805
|
encoding: "utf-8"
|
|
9115
8806
|
});
|
|
@@ -9119,32 +8810,17 @@ function makeValidateCommand() {
|
|
|
9119
8810
|
return;
|
|
9120
8811
|
}
|
|
9121
8812
|
const modifiedFiles = diffOutput.trim().split("\n").filter(Boolean);
|
|
9122
|
-
const
|
|
9123
|
-
|
|
9124
|
-
const modifiedDomains = /* @__PURE__ */ new Set();
|
|
9125
|
-
for (const f of modifiedAssets) {
|
|
9126
|
-
const parts = f.split("/");
|
|
9127
|
-
if (parts.length >= 1 && !EXCLUDED_DOMAINS.has(parts[0])) {
|
|
9128
|
-
modifiedDomains.add(parts[0]);
|
|
9129
|
-
}
|
|
9130
|
-
}
|
|
9131
|
-
if (modifiedDomains.size === 0) {
|
|
8813
|
+
const { updated, stale, orphans } = checkChangelogUnits(modifiedFiles, AI_RESOURCES);
|
|
8814
|
+
if (updated.length + stale.length + orphans.length === 0) {
|
|
9132
8815
|
logOk("No modified assets found");
|
|
9133
8816
|
return;
|
|
9134
8817
|
}
|
|
9135
|
-
|
|
9136
|
-
for (const
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
);
|
|
9140
|
-
if (changelogModified) {
|
|
9141
|
-
logOk(`${domain}/CHANGELOG.md updated`);
|
|
9142
|
-
} else {
|
|
9143
|
-
logErr(`${domain}/CHANGELOG.md not updated (assets were modified)`);
|
|
9144
|
-
errors++;
|
|
9145
|
-
}
|
|
8818
|
+
for (const unit of updated) logOk(`${unit} updated`);
|
|
8819
|
+
for (const unit of stale) logErr(`${unit} not updated (assets were modified)`);
|
|
8820
|
+
for (const asset of orphans) {
|
|
8821
|
+
logErr(`${asset} \u2014 no CHANGELOG.md in any ancestor directory up to the asset root`);
|
|
9146
8822
|
}
|
|
9147
|
-
if (
|
|
8823
|
+
if (stale.length + orphans.length > 0) process.exit(1);
|
|
9148
8824
|
});
|
|
9149
8825
|
return cmd;
|
|
9150
8826
|
}
|
|
@@ -9297,7 +8973,7 @@ Assets (skill, agent, prompt, flow, bundle, contract):
|
|
|
9297
8973
|
add <ref> [--global] Add to skaile.yaml + deploy
|
|
9298
8974
|
remove <ref> [--global] Remove from skaile.yaml + undeploy
|
|
9299
8975
|
list [kind] List deployed assets
|
|
9300
|
-
show Installed assets by
|
|
8976
|
+
show Installed assets by publisher with sync status
|
|
9301
8977
|
show <kind> <name> Print raw asset content
|
|
9302
8978
|
search [kind] [query] Search across all repos
|
|
9303
8979
|
info <ref> Metadata, deps, deploy status
|
|
@@ -9345,7 +9021,7 @@ Execution:
|
|
|
9345
9021
|
Validation:
|
|
9346
9022
|
validate [path] Check manifest schemas + canonical asset names/refs
|
|
9347
9023
|
validate versions Check asset version fields and flow pins
|
|
9348
|
-
validate changelog Check
|
|
9024
|
+
validate changelog Check each modified asset's nearest CHANGELOG.md was updated
|
|
9349
9025
|
|
|
9350
9026
|
Sources (github repos of AI assets):
|
|
9351
9027
|
source add <git-url> Clone + register a github source
|
|
@@ -9360,7 +9036,7 @@ Libraries (your authoring workspaces):
|
|
|
9360
9036
|
library create <kind> <name> Scaffold a new asset in a library
|
|
9361
9037
|
library list / show / status Library inspection
|
|
9362
9038
|
library default <name> Set the default library
|
|
9363
|
-
library
|
|
9039
|
+
library index Re-index assets
|
|
9364
9040
|
library rename / set / remove
|
|
9365
9041
|
library commit / pull / push / propose / git Git ops (git backend only)
|
|
9366
9042
|
library sync <name> Pull then push (as backend permits)
|
|
@@ -9397,7 +9073,7 @@ program.command("init [project-dir]").description("Initialize a project director
|
|
|
9397
9073
|
(projectDir, opts) => runInit(projectDir, opts)
|
|
9398
9074
|
);
|
|
9399
9075
|
async function runInit(projectDir, opts) {
|
|
9400
|
-
const { mkdirSync:
|
|
9076
|
+
const { mkdirSync: mkdirSync4, writeFileSync: writeFileSync5 } = await import('fs');
|
|
9401
9077
|
const { stringify: stringify2 } = await import('yaml');
|
|
9402
9078
|
const { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS: SUPPORTED_DRIVER_TARGETS2 } = await import('../core/index.js');
|
|
9403
9079
|
const harness = opts.harness;
|
|
@@ -9411,28 +9087,28 @@ async function runInit(projectDir, opts) {
|
|
|
9411
9087
|
const created = [];
|
|
9412
9088
|
const { existsSync: existsSync14 } = await import('fs');
|
|
9413
9089
|
if (!existsSync14(resolved)) {
|
|
9414
|
-
|
|
9090
|
+
mkdirSync4(resolved, { recursive: true });
|
|
9415
9091
|
created.push(".");
|
|
9416
9092
|
}
|
|
9417
9093
|
const skaileDir = path35__default.join(resolved, ".skaile");
|
|
9418
9094
|
if (!existsSync14(skaileDir)) {
|
|
9419
|
-
|
|
9095
|
+
mkdirSync4(path35__default.join(skaileDir, "sessions"), { recursive: true });
|
|
9420
9096
|
created.push(".skaile/");
|
|
9421
9097
|
}
|
|
9422
9098
|
const settingsPath = path35__default.join(skaileDir, "settings.json");
|
|
9423
9099
|
if (!existsSync14(settingsPath)) {
|
|
9424
|
-
|
|
9100
|
+
writeFileSync5(settingsPath, "{}\n");
|
|
9425
9101
|
created.push(".skaile/settings.json");
|
|
9426
9102
|
}
|
|
9427
9103
|
const wsConfigPath = path35__default.join(resolved, "skaile.yaml");
|
|
9428
9104
|
if (!existsSync14(wsConfigPath)) {
|
|
9429
|
-
|
|
9105
|
+
writeFileSync5(wsConfigPath, stringify2(buildInitWorkspaceConfig(projectName, harness)));
|
|
9430
9106
|
created.push("skaile.yaml");
|
|
9431
9107
|
}
|
|
9432
9108
|
for (const dir of new Set(Object.values(DRIVER_TARGETS[harness].local))) {
|
|
9433
9109
|
const full = path35__default.join(resolved, dir);
|
|
9434
9110
|
if (!existsSync14(full)) {
|
|
9435
|
-
|
|
9111
|
+
mkdirSync4(full, { recursive: true });
|
|
9436
9112
|
created.push(`${dir}/`);
|
|
9437
9113
|
}
|
|
9438
9114
|
}
|
|
@@ -9461,7 +9137,7 @@ function buildInitWorkspaceConfig(projectName, harness) {
|
|
|
9461
9137
|
}
|
|
9462
9138
|
async function initGitScaffold(resolved, created) {
|
|
9463
9139
|
const { execSync: execSync3 } = await import('child_process');
|
|
9464
|
-
const { existsSync: existsSync14, readFileSync:
|
|
9140
|
+
const { existsSync: existsSync14, readFileSync: readFileSync9, writeFileSync: writeFileSync5 } = await import('fs');
|
|
9465
9141
|
const gitignorePath = path35__default.join(resolved, ".gitignore");
|
|
9466
9142
|
const entries = [
|
|
9467
9143
|
"node_modules/",
|
|
@@ -9479,12 +9155,12 @@ async function initGitScaffold(resolved, created) {
|
|
|
9479
9155
|
".env",
|
|
9480
9156
|
".env.local"
|
|
9481
9157
|
];
|
|
9482
|
-
const existing = existsSync14(gitignorePath) ?
|
|
9158
|
+
const existing = existsSync14(gitignorePath) ? readFileSync9(gitignorePath, "utf-8") : "";
|
|
9483
9159
|
const have = new Set(existing.split("\n").map((l) => l.trim()));
|
|
9484
9160
|
const append = entries.filter((e) => !have.has(e));
|
|
9485
9161
|
if (append.length > 0) {
|
|
9486
9162
|
const prefix = existing && !existing.endsWith("\n") ? "\n" : "";
|
|
9487
|
-
|
|
9163
|
+
writeFileSync5(gitignorePath, `${existing + prefix}${append.join("\n")}
|
|
9488
9164
|
`);
|
|
9489
9165
|
if (!existing) created.push(".gitignore");
|
|
9490
9166
|
}
|
|
@@ -9518,7 +9194,7 @@ async function bootstrapUserConfig() {
|
|
|
9518
9194
|
}
|
|
9519
9195
|
async function hydrateInitSources(resolved, created) {
|
|
9520
9196
|
try {
|
|
9521
|
-
const { ensureSourcesCloned } = await import('../ensure-sources-
|
|
9197
|
+
const { ensureSourcesCloned } = await import('../ensure-sources-G4FXTJDB.js');
|
|
9522
9198
|
const hydrate = ensureSourcesCloned(resolved, { quiet: true });
|
|
9523
9199
|
for (const n of hydrate.cloned) created.push(`~/.skaile/cache/sources/${n}/`);
|
|
9524
9200
|
if (hydrate.failed.length > 0) {
|
|
@@ -9558,7 +9234,7 @@ function printInitSummary(resolved, projectDir, created) {
|
|
|
9558
9234
|
console.log();
|
|
9559
9235
|
}
|
|
9560
9236
|
program.command("setup").description("Interactive provider setup wizard").action(async () => {
|
|
9561
|
-
const { cmdSetup } = await import('../setup-
|
|
9237
|
+
const { cmdSetup } = await import('../setup-PGZM4SOO.js');
|
|
9562
9238
|
await cmdSetup([], { projectDir: process.cwd() });
|
|
9563
9239
|
});
|
|
9564
9240
|
program.addCommand(makeInstallCommand());
|