@skaile/workspaces 5.6.1 → 5.8.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 +176 -0
- package/README.md +4 -2
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-LU7NHOAP.js → asset-feeds-EYRZR4K5.js} +55 -31
- package/dist/asset-feeds-EYRZR4K5.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +10 -10
- package/dist/asset-manager/index.js +16 -16
- package/dist/asset-manager/installer.js +12 -12
- package/dist/asset-manager/renderers.js +11 -11
- package/dist/asset-manager/src/index.d.ts +364 -30
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install-agent.d.ts +11 -0
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +6 -3
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +148 -212
- package/dist/bridge/drivers/claude-sdk.js.map +1 -1
- package/dist/bridge/drivers/codex.js +91 -67
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +16 -17
- package/dist/bridge/drivers/continue.js.map +1 -1
- package/dist/bridge/drivers/echo.js +4 -4
- package/dist/bridge/drivers/gemini.js +8 -8
- package/dist/bridge/drivers/goose.js +16 -17
- package/dist/bridge/drivers/goose.js.map +1 -1
- package/dist/bridge/drivers/omp.js +68 -104
- package/dist/bridge/drivers/omp.js.map +1 -1
- package/dist/bridge/drivers/opencode.js +16 -17
- package/dist/bridge/drivers/opencode.js.map +1 -1
- package/dist/bridge/drivers/qwen.js +8 -8
- package/dist/bridge/index.js +17 -18
- package/dist/bridge/src/codex/managed-driver.d.ts +13 -10
- package/dist/bridge/src/codex/managed-driver.d.ts.map +1 -1
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts +12 -2
- package/dist/bridge/src/drivers/_subprocess-cli.d.ts.map +1 -1
- package/dist/bridge/src/drivers/claude-sdk.d.ts +37 -62
- package/dist/bridge/src/drivers/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/drivers/codex.d.ts +26 -10
- package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
- package/dist/bridge/src/drivers/continue.d.ts +2 -2
- package/dist/bridge/src/drivers/continue.d.ts.map +1 -1
- package/dist/bridge/src/drivers/gemini.d.ts +2 -2
- package/dist/bridge/src/drivers/gemini.d.ts.map +1 -1
- package/dist/bridge/src/drivers/goose.d.ts +2 -2
- package/dist/bridge/src/drivers/goose.d.ts.map +1 -1
- package/dist/bridge/src/drivers/omp.d.ts +24 -35
- package/dist/bridge/src/drivers/omp.d.ts.map +1 -1
- package/dist/bridge/src/drivers/opencode.d.ts +2 -2
- package/dist/bridge/src/drivers/opencode.d.ts.map +1 -1
- package/dist/bridge/src/drivers/recovery-policy.d.ts +79 -0
- package/dist/bridge/src/drivers/recovery-policy.d.ts.map +1 -0
- package/dist/bridge/src/index.d.ts +1 -0
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/reconfigure-ledger.d.ts +117 -0
- package/dist/bridge/src/reconfigure-ledger.d.ts.map +1 -0
- package/dist/bridge/src/types.d.ts +57 -6
- package/dist/bridge/src/types.d.ts.map +1 -1
- package/dist/{chunk-OLLAQLFJ.js → chunk-2FRUUDZY.js} +5 -5
- package/dist/{chunk-OLLAQLFJ.js.map → chunk-2FRUUDZY.js.map} +1 -1
- package/dist/{chunk-SDFROXSA.js → chunk-2LWYNQK7.js} +3 -3
- package/dist/{chunk-SDFROXSA.js.map → chunk-2LWYNQK7.js.map} +1 -1
- package/dist/{chunk-TZCQ7ZWQ.js → chunk-36AFURKZ.js} +10 -11
- package/dist/chunk-36AFURKZ.js.map +1 -0
- package/dist/{chunk-MX3UQXLU.js → chunk-4MQS7CAF.js} +256 -92
- package/dist/chunk-4MQS7CAF.js.map +1 -0
- package/dist/{chunk-45VFGT7A.js → chunk-4PTSR4UU.js} +3 -3
- package/dist/{chunk-45VFGT7A.js.map → chunk-4PTSR4UU.js.map} +1 -1
- package/dist/{chunk-VX3INFBA.js → chunk-6GRX5L6A.js} +5 -5
- package/dist/{chunk-VX3INFBA.js.map → chunk-6GRX5L6A.js.map} +1 -1
- package/dist/{chunk-NFGRW3L7.js → chunk-7RGTAEG6.js} +3 -3
- package/dist/{chunk-NFGRW3L7.js.map → chunk-7RGTAEG6.js.map} +1 -1
- package/dist/{chunk-5B5IZVEP.js → chunk-AWQYXZVG.js} +15 -6
- package/dist/chunk-AWQYXZVG.js.map +1 -0
- package/dist/{chunk-XBSQ4KMC.js → chunk-B4X2N7JQ.js} +205 -3
- package/dist/chunk-B4X2N7JQ.js.map +1 -0
- package/dist/{chunk-FRHE7FFB.js → chunk-B6GIW55K.js} +5 -3
- package/dist/chunk-B6GIW55K.js.map +1 -0
- package/dist/{chunk-LLKKLKZJ.js → chunk-BJNUNQAW.js} +3 -3
- package/dist/{chunk-LLKKLKZJ.js.map → chunk-BJNUNQAW.js.map} +1 -1
- package/dist/{chunk-7ZHLYXTI.js → chunk-BTE2V4IW.js} +3 -3
- package/dist/{chunk-7ZHLYXTI.js.map → chunk-BTE2V4IW.js.map} +1 -1
- package/dist/{chunk-ZBBM6O6P.js → chunk-CGT45WN7.js} +3 -3
- package/dist/{chunk-ZBBM6O6P.js.map → chunk-CGT45WN7.js.map} +1 -1
- package/dist/{chunk-47ZD34KB.js → chunk-CIFS5K6T.js} +3 -3
- package/dist/{chunk-47ZD34KB.js.map → chunk-CIFS5K6T.js.map} +1 -1
- package/dist/{chunk-BTISGSK4.js → chunk-CKQEIY43.js} +4 -4
- package/dist/{chunk-BTISGSK4.js.map → chunk-CKQEIY43.js.map} +1 -1
- package/dist/{chunk-KXTO7HON.js → chunk-EAZECHPM.js} +3 -3
- package/dist/{chunk-KXTO7HON.js.map → chunk-EAZECHPM.js.map} +1 -1
- package/dist/{chunk-VKSXST23.js → chunk-EF7NPDDU.js} +4 -4
- package/dist/{chunk-VKSXST23.js.map → chunk-EF7NPDDU.js.map} +1 -1
- package/dist/chunk-EPBKISS5.js +84 -0
- package/dist/chunk-EPBKISS5.js.map +1 -0
- package/dist/{chunk-VJENKWXF.js → chunk-F2EKONM7.js} +3 -3
- package/dist/{chunk-VJENKWXF.js.map → chunk-F2EKONM7.js.map} +1 -1
- package/dist/{chunk-DMLDYFDS.js → chunk-F3RDEH5U.js} +7 -4
- package/dist/chunk-F3RDEH5U.js.map +1 -0
- package/dist/{chunk-UAP2XHRF.js → chunk-FTJJO3EM.js} +39 -29
- package/dist/chunk-FTJJO3EM.js.map +1 -0
- package/dist/{chunk-2GRB5ITE.js → chunk-FVJK4QWM.js} +4 -4
- package/dist/{chunk-2GRB5ITE.js.map → chunk-FVJK4QWM.js.map} +1 -1
- package/dist/{chunk-AOAZCSDI.js → chunk-FZNG4V4J.js} +16 -30
- package/dist/chunk-FZNG4V4J.js.map +1 -0
- package/dist/{chunk-BF33SCLY.js → chunk-GB7WDMH2.js} +4 -4
- package/dist/{chunk-BF33SCLY.js.map → chunk-GB7WDMH2.js.map} +1 -1
- package/dist/{chunk-NARITJS2.js → chunk-GCICGXDD.js} +3 -3
- package/dist/{chunk-NARITJS2.js.map → chunk-GCICGXDD.js.map} +1 -1
- package/dist/{chunk-PA7WLID3.js → chunk-GTILM2CI.js} +56 -5
- package/dist/chunk-GTILM2CI.js.map +1 -0
- package/dist/{chunk-WIHQWVWL.js → chunk-GXXFLBUQ.js} +26 -27
- package/dist/chunk-GXXFLBUQ.js.map +1 -0
- package/dist/{chunk-PTO2YDDG.js → chunk-H7QUDDKH.js} +1337 -168
- package/dist/chunk-H7QUDDKH.js.map +1 -0
- package/dist/{chunk-I4QBZLOR.js → chunk-HG34RNTK.js} +7 -13
- package/dist/chunk-HG34RNTK.js.map +1 -0
- package/dist/{chunk-65EYRFZJ.js → chunk-HYDRDNKN.js} +10 -6
- package/dist/chunk-HYDRDNKN.js.map +1 -0
- package/dist/{chunk-4GNJELPH.js → chunk-I6NLLJHZ.js} +2 -2
- package/dist/{chunk-4GNJELPH.js.map → chunk-I6NLLJHZ.js.map} +1 -1
- package/dist/{chunk-VSQFGU5D.js → chunk-ILFGVSTJ.js} +3 -3
- package/dist/{chunk-VSQFGU5D.js.map → chunk-ILFGVSTJ.js.map} +1 -1
- package/dist/{chunk-2XFUXGV6.js → chunk-IONAUNWB.js} +3 -3
- package/dist/{chunk-2XFUXGV6.js.map → chunk-IONAUNWB.js.map} +1 -1
- package/dist/{chunk-CT6NQSA4.js → chunk-ISHJITXJ.js} +3 -3
- package/dist/{chunk-CT6NQSA4.js.map → chunk-ISHJITXJ.js.map} +1 -1
- package/dist/chunk-IZCR27MU.js +60 -0
- package/dist/chunk-IZCR27MU.js.map +1 -0
- package/dist/{chunk-2W4LBLIN.js → chunk-JAKOMFC6.js} +68 -20
- package/dist/chunk-JAKOMFC6.js.map +1 -0
- package/dist/{chunk-MFHKHXDE.js → chunk-L5VSIPQD.js} +5 -5
- package/dist/chunk-L5VSIPQD.js.map +1 -0
- package/dist/{chunk-RGXVQZOV.js → chunk-LEMHVDET.js} +89 -67
- package/dist/chunk-LEMHVDET.js.map +1 -0
- package/dist/{chunk-37FTLYFP.js → chunk-LNFKL23K.js} +3 -3
- package/dist/{chunk-37FTLYFP.js.map → chunk-LNFKL23K.js.map} +1 -1
- package/dist/{chunk-6NPINANG.js → chunk-LSXHED6I.js} +6 -6
- package/dist/{chunk-6NPINANG.js.map → chunk-LSXHED6I.js.map} +1 -1
- package/dist/{chunk-XUUYAS3Z.js → chunk-M3WPBTGJ.js} +3 -3
- package/dist/{chunk-XUUYAS3Z.js.map → chunk-M3WPBTGJ.js.map} +1 -1
- package/dist/{chunk-QZLWJETK.js → chunk-MGGFBZWA.js} +3 -3
- package/dist/{chunk-QZLWJETK.js.map → chunk-MGGFBZWA.js.map} +1 -1
- package/dist/{chunk-QD772CGQ.js → chunk-NPLPCRW5.js} +5 -5
- package/dist/{chunk-QD772CGQ.js.map → chunk-NPLPCRW5.js.map} +1 -1
- package/dist/{chunk-QCI6D7E4.js → chunk-NUELZWCF.js} +266 -170
- package/dist/chunk-NUELZWCF.js.map +1 -0
- package/dist/{chunk-GP6ZL7PE.js → chunk-OFBIWVCR.js} +3 -3
- package/dist/{chunk-GP6ZL7PE.js.map → chunk-OFBIWVCR.js.map} +1 -1
- package/dist/{chunk-D2V42LUE.js → chunk-P23M65LB.js} +93 -52
- package/dist/chunk-P23M65LB.js.map +1 -0
- package/dist/{chunk-46OVMT76.js → chunk-PMECEZK3.js} +16 -10
- package/dist/chunk-PMECEZK3.js.map +1 -0
- package/dist/{chunk-27HS2DHB.js → chunk-PTSGWKHR.js} +4 -4
- package/dist/{chunk-27HS2DHB.js.map → chunk-PTSGWKHR.js.map} +1 -1
- package/dist/{chunk-OKGUDNDT.js → chunk-Q6E6FM7P.js} +35 -33
- package/dist/chunk-Q6E6FM7P.js.map +1 -0
- package/dist/{chunk-PJS2YWGG.js → chunk-QOP6KDFR.js} +8 -9
- package/dist/chunk-QOP6KDFR.js.map +1 -0
- package/dist/{chunk-AO7VJ6G6.js → chunk-QVNRCDTV.js} +29 -8
- package/dist/chunk-QVNRCDTV.js.map +1 -0
- package/dist/{chunk-VBBBZDI7.js → chunk-S53LOR7B.js} +3 -3
- package/dist/{chunk-VBBBZDI7.js.map → chunk-S53LOR7B.js.map} +1 -1
- package/dist/{chunk-KUFNKVBM.js → chunk-SH5D7U7N.js} +20 -7
- package/dist/{chunk-KUFNKVBM.js.map → chunk-SH5D7U7N.js.map} +1 -1
- package/dist/{chunk-SX4UIDKT.js → chunk-UAROCOXF.js} +3 -3
- package/dist/{chunk-SX4UIDKT.js.map → chunk-UAROCOXF.js.map} +1 -1
- package/dist/{chunk-JMKB7IB4.js → chunk-UMVKJM4Q.js} +4 -4
- package/dist/chunk-UMVKJM4Q.js.map +1 -0
- package/dist/{chunk-HCYS7GFP.js → chunk-V2DXZYBB.js} +3 -3
- package/dist/{chunk-HCYS7GFP.js.map → chunk-V2DXZYBB.js.map} +1 -1
- package/dist/{chunk-KYXOGHY6.js → chunk-W5DWWE4Y.js} +4 -4
- package/dist/{chunk-KYXOGHY6.js.map → chunk-W5DWWE4Y.js.map} +1 -1
- package/dist/{chunk-FK6HPLQA.js → chunk-WTQ3TATB.js} +3 -3
- package/dist/{chunk-FK6HPLQA.js.map → chunk-WTQ3TATB.js.map} +1 -1
- package/dist/{chunk-OGLDAJFL.js → chunk-Y4N2NUZD.js} +4 -4
- package/dist/{chunk-OGLDAJFL.js.map → chunk-Y4N2NUZD.js.map} +1 -1
- package/dist/{chunk-XOGG7VDZ.js → chunk-Y7QA2OLD.js} +17 -25
- package/dist/chunk-Y7QA2OLD.js.map +1 -0
- package/dist/{chunk-2KOKBTR4.js → chunk-YSHVQGUS.js} +123 -28
- package/dist/chunk-YSHVQGUS.js.map +1 -0
- package/dist/chunk-ZAOGFXDO.js +112 -0
- package/dist/chunk-ZAOGFXDO.js.map +1 -0
- package/dist/{chunk-7KLC4LZO.js → chunk-ZKSJMZKD.js} +17 -13
- package/dist/chunk-ZKSJMZKD.js.map +1 -0
- package/dist/cli/index.js +1169 -672
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts +5 -2
- 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/catalog.d.ts +27 -5
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +49 -4
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts +9 -0
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts +8 -2
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts +10 -4
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +15 -4
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/publish-core.d.ts +10 -1
- package/dist/cli/src/commands/publish-core.d.ts.map +1 -1
- package/dist/cli/src/commands/session.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +18 -3
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/tree.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/flow-discovery.d.ts +8 -5
- package/dist/cli/src/flow-discovery.d.ts.map +1 -1
- package/dist/cli/src/open-library.d.ts +0 -11
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +30 -10
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +26 -27
- package/dist/connectors/src/access-policy.d.ts +33 -0
- package/dist/connectors/src/access-policy.d.ts.map +1 -0
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors/src/index.d.ts +2 -0
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors-O6Y6VESP.js +44 -0
- package/dist/{connectors-HWENZFKW.js.map → connectors-O6Y6VESP.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/index.js +9 -9
- package/dist/core/logging.js +1 -1
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +6 -6
- package/dist/core/src/cache-paths.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +4 -4
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/lock.d.ts +3 -3
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/logging/config.d.ts +9 -1
- package/dist/core/src/logging/config.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +17 -2
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +22 -6
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +41 -6
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/store.d.ts +16 -2
- package/dist/core/src/store.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +10 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +5 -5
- package/dist/deploy/index.js +9 -9
- package/dist/discovery/index.js +5 -5
- package/dist/discovery/src/index.d.ts +1 -1
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/source-config.d.ts +12 -0
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-DSTSXJWK.js → ensure-sources-SKLNM4UZ.js} +19 -19
- package/dist/{ensure-sources-DSTSXJWK.js.map → ensure-sources-SKLNM4UZ.js.map} +1 -1
- package/dist/factory-assets/connectors/box.js +26 -27
- package/dist/factory-assets/connectors/deploy.js +26 -27
- package/dist/factory-assets/connectors/devserver.js +26 -27
- package/dist/factory-assets/connectors/flow/adapter.d.ts +6 -0
- package/dist/factory-assets/connectors/flow/adapter.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/adapter.js +26 -27
- package/dist/factory-assets/connectors/flow/contract/expression.d.ts +3 -0
- package/dist/factory-assets/connectors/flow/contract/expression.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts +1 -1
- package/dist/factory-assets/connectors/flow/contract/output-fields.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract/schema.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract.js +4 -4
- package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts +4 -3
- package/dist/factory-assets/connectors/flow/engine/flow-output.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts +6 -1
- package/dist/factory-assets/connectors/flow/engine/output-schema.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +13 -13
- 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 +28 -29
- package/dist/factory-assets/connectors/flow.js +26 -27
- package/dist/factory-assets/connectors/git/config.d.ts.map +1 -1
- package/dist/factory-assets/connectors/git.js +26 -27
- package/dist/factory-assets/connectors/gmail.js +26 -27
- package/dist/factory-assets/connectors/googledrive.js +26 -27
- package/dist/factory-assets/connectors/local.js +26 -27
- package/dist/factory-assets/connectors/mattermost.js +26 -27
- package/dist/factory-assets/connectors/memory.js +26 -27
- package/dist/factory-assets/connectors/minio.js +26 -27
- package/dist/factory-assets/connectors/postgres.js +26 -27
- package/dist/factory-assets/connectors/s3.js +26 -27
- package/dist/factory-assets/connectors/sharepoint.js +26 -27
- package/dist/factory-assets/connectors/sqlite.js +26 -27
- package/dist/factory-assets/connectors/static-server.js +26 -27
- package/dist/factory-assets/connectors/tunnel.js +26 -27
- package/dist/factory-assets/connectors/webdav.js +26 -27
- package/dist/factory-assets/connectors/xstate-store.js +26 -27
- package/dist/factory-assets/connectors/xstate.js +26 -27
- package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +10 -7
- package/dist/flows-CBYRSAGS.js +26 -0
- package/dist/{flows-ENQY2DV7.js.map → flows-CBYRSAGS.js.map} +1 -1
- package/dist/{helpers-R44RUTDY.js → helpers-MWZDRBLD.js} +19 -19
- package/dist/{helpers-R44RUTDY.js.map → helpers-MWZDRBLD.js.map} +1 -1
- package/dist/library/index.js +13 -13
- package/dist/library/install.js +3 -3
- package/dist/library/src/index.d.ts +5 -3
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/local/library-manager.d.ts +6 -0
- package/dist/library/src/local/library-manager.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +5 -2
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/local/scan-authoring-libraries.d.ts +43 -0
- package/dist/library/src/local/scan-authoring-libraries.d.ts.map +1 -0
- package/dist/library/src/manifest-writer.d.ts +46 -1
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts +12 -0
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/{library-publish-LFOJJVMK.js → library-publish-PICMDSB2.js} +129 -49
- package/dist/library-publish-PICMDSB2.js.map +1 -0
- package/dist/open-library-OG457THY.js +40 -0
- package/dist/{open-library-4WUMQHES.js.map → open-library-OG457THY.js.map} +1 -1
- package/dist/open-registry-ZUZJ7MS7.js +32 -0
- package/dist/{open-registry-NVPCQPND.js.map → open-registry-ZUZJ7MS7.js.map} +1 -1
- package/dist/paths-FQ64OLJG.js +22 -0
- package/dist/{paths-YUCP7K6U.js.map → paths-FQ64OLJG.js.map} +1 -1
- package/dist/{plugin-store-66QFBNEO.js → plugin-store-MPAMD5OT.js} +11 -11
- package/dist/{plugin-store-66QFBNEO.js.map → plugin-store-MPAMD5OT.js.map} +1 -1
- package/dist/project-2GFT5LEZ.js +41 -0
- package/dist/{project-VMOHUXBD.js.map → project-2GFT5LEZ.js.map} +1 -1
- package/dist/resolver/index.js +10 -10
- package/dist/runner/index.js +41 -42
- package/dist/runner/src/logging-bootstrap.d.ts +6 -0
- package/dist/runner/src/logging-bootstrap.d.ts.map +1 -1
- package/dist/runner/src/reconfigure-handler.d.ts +38 -17
- package/dist/runner/src/reconfigure-handler.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-capability-wiring.d.ts +0 -2
- package/dist/runner/src/session-capability-wiring.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +16 -16
- package/dist/sdk/bridge.js +17 -18
- package/dist/sdk/core.js +9 -9
- package/dist/sdk/flow.js +13 -13
- package/dist/sdk/index.js +69 -46
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +10 -10
- package/dist/sdk/runner.js +41 -42
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/src/agent-session.d.ts +8 -0
- package/dist/sdk/src/agent-session.d.ts.map +1 -1
- package/dist/sdk/store.js +2 -1
- package/dist/sdk/types.js +1 -1
- package/dist/secrets/index.js +2 -2
- package/dist/session/index.js +2 -2
- package/dist/{setup-PYY23HGZ.js → setup-WHMCSIF2.js} +27 -28
- package/dist/setup-WHMCSIF2.js.map +1 -0
- package/dist/skills-TVO26Y4V.js +26 -0
- package/dist/{skills-CS7NE5TT.js.map → skills-TVO26Y4V.js.map} +1 -1
- package/dist/source-LKOFTOEK.js +41 -0
- package/dist/{source-JCF6KSQN.js.map → source-LKOFTOEK.js.map} +1 -1
- package/dist/{source-manifest-publish-O6P7G2M7.js → source-manifest-publish-L5J3QXER.js} +28 -28
- package/dist/{source-manifest-publish-O6P7G2M7.js.map → source-manifest-publish-L5J3QXER.js.map} +1 -1
- package/dist/store/index.js +2 -1
- package/dist/store/src/store.d.ts +8 -5
- package/dist/store/src/store.d.ts.map +1 -1
- package/dist/tui/index.js +41 -42
- package/dist/tui/index.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/ask-slots.d.ts +68 -0
- package/dist/types/src/ask-slots.d.ts.map +1 -0
- package/dist/types/src/delivery.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +29 -1
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/manifests/index.d.ts +1 -1
- package/dist/types/src/manifests/index.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +4 -0
- package/dist/types/src/manifests/preset.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +12 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +33 -34
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +2 -2
- package/package.json +1 -1
- package/dist/asset-feeds-LU7NHOAP.js.map +0 -1
- package/dist/chunk-2KOKBTR4.js.map +0 -1
- package/dist/chunk-2NYXQYHN.js +0 -22
- package/dist/chunk-2NYXQYHN.js.map +0 -1
- package/dist/chunk-2W4LBLIN.js.map +0 -1
- package/dist/chunk-46OVMT76.js.map +0 -1
- package/dist/chunk-5B5IZVEP.js.map +0 -1
- package/dist/chunk-65EYRFZJ.js.map +0 -1
- package/dist/chunk-7KLC4LZO.js.map +0 -1
- package/dist/chunk-AO7VJ6G6.js.map +0 -1
- package/dist/chunk-AOAZCSDI.js.map +0 -1
- package/dist/chunk-D2V42LUE.js.map +0 -1
- package/dist/chunk-DMLDYFDS.js.map +0 -1
- package/dist/chunk-EINLFFP6.js +0 -59
- package/dist/chunk-EINLFFP6.js.map +0 -1
- package/dist/chunk-FRHE7FFB.js.map +0 -1
- package/dist/chunk-I4QBZLOR.js.map +0 -1
- package/dist/chunk-JMKB7IB4.js.map +0 -1
- package/dist/chunk-MFHKHXDE.js.map +0 -1
- package/dist/chunk-MX3UQXLU.js.map +0 -1
- package/dist/chunk-OKGUDNDT.js.map +0 -1
- package/dist/chunk-PA7WLID3.js.map +0 -1
- package/dist/chunk-PJS2YWGG.js.map +0 -1
- package/dist/chunk-PTO2YDDG.js.map +0 -1
- package/dist/chunk-QCI6D7E4.js.map +0 -1
- package/dist/chunk-RGXVQZOV.js.map +0 -1
- package/dist/chunk-TZCQ7ZWQ.js.map +0 -1
- package/dist/chunk-UAP2XHRF.js.map +0 -1
- package/dist/chunk-WIHQWVWL.js.map +0 -1
- package/dist/chunk-XBSQ4KMC.js.map +0 -1
- package/dist/chunk-XOGG7VDZ.js.map +0 -1
- package/dist/connectors-HWENZFKW.js +0 -45
- package/dist/flows-ENQY2DV7.js +0 -26
- package/dist/library-publish-LFOJJVMK.js.map +0 -1
- package/dist/open-library-4WUMQHES.js +0 -40
- package/dist/open-registry-NVPCQPND.js +0 -32
- package/dist/paths-YUCP7K6U.js +0 -22
- package/dist/project-VMOHUXBD.js +0 -41
- package/dist/setup-PYY23HGZ.js.map +0 -1
- package/dist/skills-CS7NE5TT.js +0 -26
- package/dist/source-JCF6KSQN.js +0 -41
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { readManifestSourceConfig, discoverAssetsInTree, barePublisher, createDefaultKindRegistry, sharesItsFolder } from './chunk-
|
|
2
|
-
import { installFromManifest, assertSafeManifestPath } from './chunk-
|
|
3
|
-
import { PresetManifestSchema } from './chunk-
|
|
4
|
-
import { defaultLibraryDir, resolveLibraryDir, GLOBAL_INSTALL_DIR_NAME, readLock, buildLibraryLockEntries, writeLock, mergeLockFile, buildLockFile, ManifestYamlEditor } from './chunk-
|
|
5
|
-
import { getGlobalCacheDir, storeManifestSlug, resolveSourcePublisher } from './chunk-
|
|
6
|
-
import { userConfigPath, globalSkaileDir, mergeLegacyEntriesInto, migrateLegacyDir, globalCacheRoot } from './chunk-
|
|
7
|
-
import { encodeSkaileManifest, loadSkPublishManifest, SKAILE_MANIFEST_FILENAME } from './chunk-
|
|
8
|
-
import { scanDirectory } from './chunk-
|
|
9
|
-
import { parseAssetRef, assetRefToStr } from './chunk-
|
|
1
|
+
import { readManifestSourceConfig, discoverAssetsInTree, barePublisher, createDefaultKindRegistry, sharesItsFolder, SEMVER_RE, parseManifestFile } from './chunk-Y7QA2OLD.js';
|
|
2
|
+
import { installFromManifest, assertSafeManifestPath } from './chunk-CKQEIY43.js';
|
|
3
|
+
import { PresetManifestSchema } from './chunk-B6GIW55K.js';
|
|
4
|
+
import { defaultLibraryDir, resolveLibraryDir, GLOBAL_INSTALL_DIR_NAME, readLock, buildLibraryLockEntries, writeLock, mergeLockFile, buildLockFile, ManifestYamlEditor } from './chunk-36AFURKZ.js';
|
|
5
|
+
import { getGlobalCacheDir, storeManifestSlug, resolveSourcePublisher } from './chunk-JAKOMFC6.js';
|
|
6
|
+
import { userConfigPath, globalSkaileDir, mergeLegacyEntriesInto, migrateLegacyDir, globalCacheRoot } from './chunk-L5VSIPQD.js';
|
|
7
|
+
import { encodeSkaileManifest, loadSkPublishManifest, SKAILE_MANIFEST_FILENAME } from './chunk-BTE2V4IW.js';
|
|
8
|
+
import { scanDirectory } from './chunk-GTILM2CI.js';
|
|
9
|
+
import { parseAssetRef, assetRefToStr } from './chunk-QVNRCDTV.js';
|
|
10
10
|
import { __export } from './chunk-NSBPE2FW.js';
|
|
11
11
|
import * as fs10 from 'fs';
|
|
12
12
|
import { existsSync, mkdirSync, symlinkSync, copyFileSync, cpSync } from 'fs';
|
|
13
|
-
import * as
|
|
13
|
+
import * as path15 from 'path';
|
|
14
14
|
import { resolve, relative, sep, join, dirname } from 'path';
|
|
15
15
|
import { stringify, parse, parseDocument } from 'yaml';
|
|
16
16
|
import * as z3 from 'zod';
|
|
@@ -103,10 +103,10 @@ var SkaileConfigSchema = z3.object({
|
|
|
103
103
|
library: LibraryConfigSchema.optional()
|
|
104
104
|
});
|
|
105
105
|
function defaultIndexPath() {
|
|
106
|
-
return
|
|
106
|
+
return path15.join(globalSkaileDir(), "index.db");
|
|
107
107
|
}
|
|
108
108
|
function resolveIndexPath() {
|
|
109
|
-
if (process.env.SKAILE_INDEX_PATH) return process.env.SKAILE_INDEX_PATH;
|
|
109
|
+
if (process.env.SKAILE_INDEX_PATH) return path15.resolve(process.env.SKAILE_INDEX_PATH);
|
|
110
110
|
return defaultIndexPath();
|
|
111
111
|
}
|
|
112
112
|
function getConfigDefaults() {
|
|
@@ -117,7 +117,7 @@ function getConfigDefaults() {
|
|
|
117
117
|
}
|
|
118
118
|
var CONFIG_FILENAME = "config.yaml";
|
|
119
119
|
function projectConfigPath(projectDir) {
|
|
120
|
-
return
|
|
120
|
+
return path15.join(projectDir, ".skaile", CONFIG_FILENAME);
|
|
121
121
|
}
|
|
122
122
|
function loadConfigFile(filePath) {
|
|
123
123
|
if (!fs10.existsSync(filePath)) return null;
|
|
@@ -170,7 +170,7 @@ function resolveConfig(opts) {
|
|
|
170
170
|
return resolved;
|
|
171
171
|
}
|
|
172
172
|
function saveConfig(filePath, config) {
|
|
173
|
-
const dir =
|
|
173
|
+
const dir = path15.dirname(filePath);
|
|
174
174
|
if (!fs10.existsSync(dir)) {
|
|
175
175
|
fs10.mkdirSync(dir, { recursive: true });
|
|
176
176
|
}
|
|
@@ -200,11 +200,11 @@ function validateKnowledge(data) {
|
|
|
200
200
|
|
|
201
201
|
// library/src/knowledge/knowledge-kind-provider.ts
|
|
202
202
|
function collectDirRecursive(baseDir, relativeDir) {
|
|
203
|
-
const full =
|
|
203
|
+
const full = path15.join(baseDir, relativeDir);
|
|
204
204
|
if (!fs10.existsSync(full) || !fs10.statSync(full).isDirectory()) return [];
|
|
205
205
|
const results = [];
|
|
206
206
|
for (const entry of fs10.readdirSync(full, { withFileTypes: true })) {
|
|
207
|
-
const rel =
|
|
207
|
+
const rel = path15.posix.join(relativeDir, entry.name);
|
|
208
208
|
if (entry.isDirectory()) {
|
|
209
209
|
results.push(...collectDirRecursive(baseDir, rel));
|
|
210
210
|
} else if (entry.isFile()) {
|
|
@@ -231,8 +231,8 @@ var knowledgeKindProvider = {
|
|
|
231
231
|
return validateKnowledge(data);
|
|
232
232
|
},
|
|
233
233
|
defaultFileFilter(manifestPath) {
|
|
234
|
-
const dir =
|
|
235
|
-
const manifestName =
|
|
234
|
+
const dir = path15.dirname(manifestPath);
|
|
235
|
+
const manifestName = path15.basename(manifestPath);
|
|
236
236
|
const files = [manifestName];
|
|
237
237
|
files.push(...collectDirRecursive(dir, "documents"));
|
|
238
238
|
files.sort();
|
|
@@ -311,30 +311,30 @@ var assignments = sqliteTable("assignments", {
|
|
|
311
311
|
assignedAt: text("assigned_at").notNull()
|
|
312
312
|
});
|
|
313
313
|
function isClone(dir) {
|
|
314
|
-
return fs10.existsSync(
|
|
314
|
+
return fs10.existsSync(path15.join(dir, ".git"));
|
|
315
315
|
}
|
|
316
316
|
function getSidecarRoot() {
|
|
317
317
|
const home = globalSkaileDir();
|
|
318
|
-
const sidecars =
|
|
319
|
-
const legacy =
|
|
318
|
+
const sidecars = path15.join(home, "sidecars");
|
|
319
|
+
const legacy = path15.join(home, "sources");
|
|
320
320
|
mergeLegacyEntriesInto(getGlobalCacheDir(), legacy, isClone);
|
|
321
321
|
mergeLegacyEntriesInto(sidecars, legacy, (p) => !isClone(p));
|
|
322
322
|
return sidecars;
|
|
323
323
|
}
|
|
324
324
|
function resolveSidecarPaths(slug) {
|
|
325
325
|
const rootDir = getSidecarRoot();
|
|
326
|
-
const sidecarDir =
|
|
326
|
+
const sidecarDir = path15.join(rootDir, slug);
|
|
327
327
|
return {
|
|
328
328
|
rootDir,
|
|
329
329
|
sidecarDir,
|
|
330
|
-
manifestFile:
|
|
331
|
-
readmeFile:
|
|
332
|
-
lockFile:
|
|
330
|
+
manifestFile: path15.join(sidecarDir, "skaile.manifest.yaml"),
|
|
331
|
+
readmeFile: path15.join(sidecarDir, "README.md"),
|
|
332
|
+
lockFile: path15.join(sidecarDir, "skaile.manifest.lock.json")
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
function deriveSlug(sourceConfig, sourcePath, existingSlugs) {
|
|
336
336
|
const fromConfig = sourceConfig && typeof sourceConfig.name === "string" ? sourceConfig.name : void 0;
|
|
337
|
-
const base = fromConfig && fromConfig.length > 0 ? slugify(fromConfig) : slugify(
|
|
337
|
+
const base = fromConfig && fromConfig.length > 0 ? slugify(fromConfig) : slugify(path15.basename(sourcePath || "")) || "unnamed-source";
|
|
338
338
|
const taken = new Set(existingSlugs);
|
|
339
339
|
if (!taken.has(base)) return base;
|
|
340
340
|
for (let i = 2; i < 1e3; i++) {
|
|
@@ -360,17 +360,17 @@ function slugify(input) {
|
|
|
360
360
|
|
|
361
361
|
// library/src/local/store-paths.ts
|
|
362
362
|
function getStoreRoot() {
|
|
363
|
-
return
|
|
363
|
+
return path15.join(globalSkaileDir(), "store");
|
|
364
364
|
}
|
|
365
365
|
function getStoreManifestsDir() {
|
|
366
|
-
return
|
|
366
|
+
return path15.join(getStoreRoot(), "manifests");
|
|
367
367
|
}
|
|
368
368
|
function curatedManifestOverlay(sourceUrl) {
|
|
369
|
-
const file =
|
|
369
|
+
const file = path15.join(getStoreManifestsDir(), `${storeManifestSlug(sourceUrl)}.yaml`);
|
|
370
370
|
return fs10.existsSync(file) ? file : void 0;
|
|
371
371
|
}
|
|
372
372
|
function migratedMarkerPath() {
|
|
373
|
-
return
|
|
373
|
+
return path15.join(getStoreRoot(), ".migrated");
|
|
374
374
|
}
|
|
375
375
|
function collectSidecarMigrationCandidates(sidecarRoot) {
|
|
376
376
|
const candidates = [];
|
|
@@ -378,9 +378,9 @@ function collectSidecarMigrationCandidates(sidecarRoot) {
|
|
|
378
378
|
for (const entry of fs10.readdirSync(sidecarRoot, { withFileTypes: true })) {
|
|
379
379
|
if (!entry.isDirectory()) continue;
|
|
380
380
|
if (entry.name.startsWith(".")) continue;
|
|
381
|
-
const sidecarDir =
|
|
382
|
-
const current =
|
|
383
|
-
const legacy =
|
|
381
|
+
const sidecarDir = path15.join(sidecarRoot, entry.name);
|
|
382
|
+
const current = path15.join(sidecarDir, "skaile.manifest.yaml");
|
|
383
|
+
const legacy = path15.join(sidecarDir, ".skaile-source.yaml");
|
|
384
384
|
const src = fs10.existsSync(current) ? current : fs10.existsSync(legacy) ? legacy : void 0;
|
|
385
385
|
if (src) candidates.push({ src, slug: entry.name });
|
|
386
386
|
}
|
|
@@ -390,7 +390,7 @@ function collectSidecarMigrationCandidates(sidecarRoot) {
|
|
|
390
390
|
function moveSidecarManifests(candidates, manifestsDir) {
|
|
391
391
|
let migrated = 0;
|
|
392
392
|
for (const { src, slug } of candidates) {
|
|
393
|
-
const dest =
|
|
393
|
+
const dest = path15.join(manifestsDir, `${slug}.yaml`);
|
|
394
394
|
if (fs10.existsSync(dest)) continue;
|
|
395
395
|
try {
|
|
396
396
|
fs10.renameSync(src, dest);
|
|
@@ -405,11 +405,11 @@ function moveSidecarManifests(candidates, manifestsDir) {
|
|
|
405
405
|
return migrated;
|
|
406
406
|
}
|
|
407
407
|
function initStoreGitRepo(storeRoot) {
|
|
408
|
-
if (fs10.existsSync(
|
|
408
|
+
if (fs10.existsSync(path15.join(storeRoot, ".git"))) return;
|
|
409
409
|
try {
|
|
410
410
|
spawnSync("git", ["init", "--quiet"], { cwd: storeRoot, stdio: "ignore" });
|
|
411
411
|
fs10.writeFileSync(
|
|
412
|
-
|
|
412
|
+
path15.join(storeRoot, ".gitignore"),
|
|
413
413
|
"# Remote-store cache \u2014 local to this machine.\nremote-cache/\n",
|
|
414
414
|
"utf8"
|
|
415
415
|
);
|
|
@@ -507,7 +507,7 @@ async function librariesPresent(client) {
|
|
|
507
507
|
return rs.rows.length > 0;
|
|
508
508
|
}
|
|
509
509
|
function slugify2(p) {
|
|
510
|
-
const base =
|
|
510
|
+
const base = path15.basename(p) || "lib";
|
|
511
511
|
return base.toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-|-$/g, "") || "lib";
|
|
512
512
|
}
|
|
513
513
|
async function runLibrariesMigration(client) {
|
|
@@ -672,19 +672,19 @@ async function purgeOrphanedAssetDefinitions(client) {
|
|
|
672
672
|
}
|
|
673
673
|
function assertNoLegacyLibDb(newDbPath) {
|
|
674
674
|
if (fs10.existsSync(newDbPath)) return;
|
|
675
|
-
const parent =
|
|
675
|
+
const parent = path15.dirname(newDbPath);
|
|
676
676
|
const skaileHome = globalSkaileDir();
|
|
677
|
-
const defaultIndexPath2 =
|
|
677
|
+
const defaultIndexPath2 = path15.join(skaileHome, "index.db");
|
|
678
678
|
const candidates = [];
|
|
679
|
-
if (
|
|
680
|
-
candidates.push(
|
|
679
|
+
if (path15.basename(newDbPath) === "index.db") {
|
|
680
|
+
candidates.push(path15.join(parent, "lib.db"));
|
|
681
681
|
}
|
|
682
682
|
if (newDbPath === defaultIndexPath2) {
|
|
683
|
-
candidates.push(
|
|
684
|
-
candidates.push(
|
|
683
|
+
candidates.push(path15.join(skaileHome, "libraries", "lib.db"));
|
|
684
|
+
candidates.push(path15.join(skaileHome, "library", "lib.db"));
|
|
685
685
|
}
|
|
686
|
-
if (
|
|
687
|
-
candidates.push(
|
|
686
|
+
if (path15.basename(parent) === "libraries") {
|
|
687
|
+
candidates.push(path15.join(path15.dirname(parent), "library", "lib.db"));
|
|
688
688
|
}
|
|
689
689
|
for (const legacy of candidates) {
|
|
690
690
|
if (!fs10.existsSync(legacy)) continue;
|
|
@@ -846,14 +846,14 @@ var LocalIndex = class {
|
|
|
846
846
|
let dbPath;
|
|
847
847
|
if (typeof optionsOrDir === "string") {
|
|
848
848
|
dir = optionsOrDir;
|
|
849
|
-
dbPath =
|
|
849
|
+
dbPath = path15.join(dir, "index.db");
|
|
850
850
|
} else if (optionsOrDir?.indexPath) {
|
|
851
851
|
dbPath = optionsOrDir.indexPath;
|
|
852
852
|
dir = optionsOrDir.libraryDir ?? resolveLibraryDir();
|
|
853
853
|
this._kindRegistry = optionsOrDir.kindRegistry;
|
|
854
854
|
} else if (optionsOrDir?.libraryDir) {
|
|
855
855
|
dir = optionsOrDir.libraryDir;
|
|
856
|
-
dbPath =
|
|
856
|
+
dbPath = path15.join(dir, "index.db");
|
|
857
857
|
this._kindRegistry = optionsOrDir.kindRegistry;
|
|
858
858
|
} else {
|
|
859
859
|
dir = resolveLibraryDir();
|
|
@@ -863,7 +863,7 @@ var LocalIndex = class {
|
|
|
863
863
|
if (!fs10.existsSync(dir)) {
|
|
864
864
|
fs10.mkdirSync(dir, { recursive: true });
|
|
865
865
|
}
|
|
866
|
-
const dbParent =
|
|
866
|
+
const dbParent = path15.dirname(dbPath);
|
|
867
867
|
if (!fs10.existsSync(dbParent)) {
|
|
868
868
|
fs10.mkdirSync(dbParent, { recursive: true });
|
|
869
869
|
}
|
|
@@ -1085,7 +1085,7 @@ var LocalIndex = class {
|
|
|
1085
1085
|
* @returns The created Instance plus its on-disk install path.
|
|
1086
1086
|
*/
|
|
1087
1087
|
async install(manifest, opts) {
|
|
1088
|
-
const libraryRoot = opts?.libraryRoot ??
|
|
1088
|
+
const libraryRoot = opts?.libraryRoot ?? path15.join(this.libraryDir, GLOBAL_INSTALL_DIR_NAME);
|
|
1089
1089
|
const { installPath } = await installFromManifest({
|
|
1090
1090
|
manifest,
|
|
1091
1091
|
libraryRoot,
|
|
@@ -1242,7 +1242,7 @@ function git(cwd, args) {
|
|
|
1242
1242
|
return spawnSync("git", args, { cwd, encoding: "utf-8" });
|
|
1243
1243
|
}
|
|
1244
1244
|
function isGitRepo(libPath) {
|
|
1245
|
-
return existsSync(
|
|
1245
|
+
return existsSync(path15.join(libPath, ".git"));
|
|
1246
1246
|
}
|
|
1247
1247
|
function spawnGit(cwd, args, action) {
|
|
1248
1248
|
const r = git(cwd, args);
|
|
@@ -1269,6 +1269,18 @@ function ensureGitRepo(libPath, url, branch) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
setOriginUrl(libPath, url);
|
|
1271
1271
|
}
|
|
1272
|
+
function trackOriginBranch(libPath, branch, opts) {
|
|
1273
|
+
spawnGit(libPath, ["config", `branch.${branch}.remote`, "origin"], "config");
|
|
1274
|
+
spawnGit(libPath, ["config", `branch.${branch}.merge`, `refs/heads/${branch}`], "config");
|
|
1275
|
+
if (opts?.fetch) {
|
|
1276
|
+
spawnSync("git", ["fetch", "--quiet", "origin", branch], {
|
|
1277
|
+
cwd: libPath,
|
|
1278
|
+
encoding: "utf-8",
|
|
1279
|
+
timeout: 2e4,
|
|
1280
|
+
env: { ...process.env, GIT_TERMINAL_PROMPT: "0" }
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1272
1284
|
function cloneOrInitGitRepo(libPath, url, branch) {
|
|
1273
1285
|
mkdirSync(libPath, { recursive: true });
|
|
1274
1286
|
const clone = spawnSync("git", ["clone", "--", url, libPath], {
|
|
@@ -1364,8 +1376,27 @@ var GitSyncDriver = class {
|
|
|
1364
1376
|
const r = git(lib.path, args);
|
|
1365
1377
|
if (r.status !== 0) {
|
|
1366
1378
|
if (/couldn't find remote ref/i.test(r.stderr)) return { applied: 0, conflicts: [] };
|
|
1367
|
-
if (/non-fast-forward|
|
|
1368
|
-
return {
|
|
1379
|
+
if (/not possible to fast-forward|non-fast-forward|diverg/i.test(r.stderr)) {
|
|
1380
|
+
return {
|
|
1381
|
+
applied: 0,
|
|
1382
|
+
conflicts: [
|
|
1383
|
+
{
|
|
1384
|
+
path: "(branch)",
|
|
1385
|
+
reason: `local and remote both changed; run skaile library git ${lib.name} pull --rebase origin ${cfg.branch}`
|
|
1386
|
+
}
|
|
1387
|
+
]
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
if (opts?.rebase && /conflict/i.test(r.stderr)) {
|
|
1391
|
+
return {
|
|
1392
|
+
applied: 0,
|
|
1393
|
+
conflicts: [
|
|
1394
|
+
{
|
|
1395
|
+
path: "(branch)",
|
|
1396
|
+
reason: `rebase stopped on conflicts; resolve them, then run skaile library git ${lib.name} rebase --continue (or --abort)`
|
|
1397
|
+
}
|
|
1398
|
+
]
|
|
1399
|
+
};
|
|
1369
1400
|
}
|
|
1370
1401
|
throw new LibrarySyncError(`git pull failed: ${r.stderr.trim()}`, "remote_error");
|
|
1371
1402
|
}
|
|
@@ -1385,7 +1416,14 @@ var GitSyncDriver = class {
|
|
|
1385
1416
|
if (opts?.force) args.push("--force-with-lease");
|
|
1386
1417
|
const local = `refs/heads/${cfg.branch}`;
|
|
1387
1418
|
const pushed = countCommits(lib.path, `refs/remotes/origin/${cfg.branch}..${local}`) ?? countCommits(lib.path, local) ?? 0;
|
|
1388
|
-
|
|
1419
|
+
const pushRes = git(lib.path, args);
|
|
1420
|
+
if (pushRes.status !== 0 && /non-fast-forward|fetch first|updates were rejected/i.test(pushRes.stderr)) {
|
|
1421
|
+
throw new LibrarySyncError(
|
|
1422
|
+
`local and remote both changed; run skaile library git ${lib.name} pull --rebase origin ${cfg.branch}`,
|
|
1423
|
+
"remote_error"
|
|
1424
|
+
);
|
|
1425
|
+
}
|
|
1426
|
+
ok(pushRes, "push");
|
|
1389
1427
|
return { pushed };
|
|
1390
1428
|
}
|
|
1391
1429
|
async propose(lib, opts) {
|
|
@@ -1489,6 +1527,14 @@ function rowToLibrary2(row) {
|
|
|
1489
1527
|
updatedAt: new Date(row.updatedAt)
|
|
1490
1528
|
};
|
|
1491
1529
|
}
|
|
1530
|
+
var LIBRARY_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
1531
|
+
function assertValidLibraryName(name) {
|
|
1532
|
+
if (!LIBRARY_NAME_PATTERN.test(name)) {
|
|
1533
|
+
throw new Error(
|
|
1534
|
+
`Invalid library name "${name}": use letters, digits, "_" or "-", starting with a letter or digit.`
|
|
1535
|
+
);
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1492
1538
|
var LibraryManager = class {
|
|
1493
1539
|
constructor(lib) {
|
|
1494
1540
|
this.lib = lib;
|
|
@@ -1506,6 +1552,7 @@ var LibraryManager = class {
|
|
|
1506
1552
|
}
|
|
1507
1553
|
}
|
|
1508
1554
|
async addLibrary(input) {
|
|
1555
|
+
assertValidLibraryName(input.name);
|
|
1509
1556
|
const db = await this.lib.dbHandle();
|
|
1510
1557
|
const existing = await db.select().from(libraries).where(eq(libraries.name, input.name)).get();
|
|
1511
1558
|
if (existing) throw new DuplicateLibraryNameError(input.name);
|
|
@@ -1548,6 +1595,7 @@ var LibraryManager = class {
|
|
|
1548
1595
|
}
|
|
1549
1596
|
async updateLibrary(nameOrId, patch) {
|
|
1550
1597
|
const lib = await this.requireLibrary(nameOrId);
|
|
1598
|
+
if (patch.name !== void 0 && patch.name !== lib.name) assertValidLibraryName(patch.name);
|
|
1551
1599
|
const db = await this.lib.dbHandle();
|
|
1552
1600
|
const updates = {
|
|
1553
1601
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -1604,7 +1652,7 @@ var LibraryManager = class {
|
|
|
1604
1652
|
(l) => l.isDefault && (l.ownership === "owner" || l.ownership === "contributor")
|
|
1605
1653
|
);
|
|
1606
1654
|
if (writableDefault) return { library: writableDefault, created: false };
|
|
1607
|
-
const personalPath =
|
|
1655
|
+
const personalPath = path15.join(librariesDir, "personal");
|
|
1608
1656
|
fs10.mkdirSync(personalPath, { recursive: true });
|
|
1609
1657
|
const lib = await this.addLibrary({
|
|
1610
1658
|
name: "personal",
|
|
@@ -1636,7 +1684,7 @@ function describeSyncError(err) {
|
|
|
1636
1684
|
return parts.join(": ");
|
|
1637
1685
|
}
|
|
1638
1686
|
function scanLibraryRoot(rootPath, registry, scanOpts) {
|
|
1639
|
-
const fallbackPublisher = resolveSourcePublisher(rootPath) ?? (
|
|
1687
|
+
const fallbackPublisher = resolveSourcePublisher(rootPath) ?? (path15.basename(rootPath) || "unknown");
|
|
1640
1688
|
const opts = {
|
|
1641
1689
|
registry,
|
|
1642
1690
|
sidecarManifestFile: scanOpts?.sidecarManifestFile,
|
|
@@ -1726,12 +1774,16 @@ var LocalCatalogSource = class {
|
|
|
1726
1774
|
*
|
|
1727
1775
|
* @param syncOpts - When `includeDev` is set, assets under the source
|
|
1728
1776
|
* config's `dev_paths` (e.g. `ai-assets-dev/`) are discovered and cached
|
|
1729
|
-
* too. Defaults to excluding them (a normal run).
|
|
1777
|
+
* too. Defaults to excluding them (a normal run). `exclude` drops every
|
|
1778
|
+
* asset it returns `true` for — never upserted, and any row an earlier sync
|
|
1779
|
+
* left behind is pruned (`library index` leaves out a non-semver version).
|
|
1730
1780
|
* @returns Discovery statistics, fatal `errors`, and non-fatal `advisories`
|
|
1731
1781
|
* (missing sha256, unknown kind) — the latter never signal a failed index.
|
|
1732
1782
|
*/
|
|
1733
1783
|
async sync(syncOpts) {
|
|
1734
1784
|
const result = this.scan(syncOpts);
|
|
1785
|
+
const exclude = syncOpts?.exclude;
|
|
1786
|
+
const assets = exclude ? result.assets.filter((a) => !exclude(a)) : result.assets;
|
|
1735
1787
|
let assetsUpdated = 0;
|
|
1736
1788
|
const errors = [];
|
|
1737
1789
|
const softDepsByRef = /* @__PURE__ */ new Map();
|
|
@@ -1741,7 +1793,7 @@ var LocalCatalogSource = class {
|
|
|
1741
1793
|
if (list) list.push(e.to);
|
|
1742
1794
|
else softDepsByRef.set(e.from, [e.to]);
|
|
1743
1795
|
}
|
|
1744
|
-
for (const asset of
|
|
1796
|
+
for (const asset of assets) {
|
|
1745
1797
|
const softDeps = softDepsByRef.get(asset.ref) ?? [];
|
|
1746
1798
|
try {
|
|
1747
1799
|
await this.library.upsertAssetDef({
|
|
@@ -1782,9 +1834,9 @@ var LocalCatalogSource = class {
|
|
|
1782
1834
|
`${missingSha256Count} asset(s): sha256 not pinned \u2014 auto-computed locally (pin only for store publish)`
|
|
1783
1835
|
);
|
|
1784
1836
|
}
|
|
1785
|
-
const keepRefs =
|
|
1786
|
-
if (
|
|
1787
|
-
return { assetsFound:
|
|
1837
|
+
const keepRefs = assets.map((a) => a.ref);
|
|
1838
|
+
if (result.assets.length > 0) await this.library.pruneAssetDefs(this.sourceId, keepRefs);
|
|
1839
|
+
return { assetsFound: assets.length, assetsUpdated, errors, advisories };
|
|
1788
1840
|
}
|
|
1789
1841
|
};
|
|
1790
1842
|
function defToCatalogAsset(def) {
|
|
@@ -1859,6 +1911,26 @@ function installLibraryAsset(opts) {
|
|
|
1859
1911
|
writeLock(lockPath, mergeLockFile(prevLock, buildLockFile([], /* @__PURE__ */ new Set(), lockEntries)));
|
|
1860
1912
|
return { installPath, lockKey: Object.keys(lockEntries)[0] ?? ref, sha256: found.sha256 };
|
|
1861
1913
|
}
|
|
1914
|
+
function authoringLibraries(libs) {
|
|
1915
|
+
const newRoot = getGlobalCacheDir();
|
|
1916
|
+
const legacyRoot = path15.join(globalSkaileDir(), "sources");
|
|
1917
|
+
return libs.filter((l) => !l.path.startsWith(newRoot) && !l.path.startsWith(legacyRoot));
|
|
1918
|
+
}
|
|
1919
|
+
async function scanAuthoringLibraries(index, registry) {
|
|
1920
|
+
const libraries2 = authoringLibraries(await index.listSources()).sort(
|
|
1921
|
+
(a, b) => b.createdAt.getTime() - a.createdAt.getTime()
|
|
1922
|
+
);
|
|
1923
|
+
return libraries2.map((library) => {
|
|
1924
|
+
if (!existsSync(library.path)) {
|
|
1925
|
+
return { library, assets: [], error: `library path does not exist: ${library.path}` };
|
|
1926
|
+
}
|
|
1927
|
+
try {
|
|
1928
|
+
return { library, assets: scanLibraryRoot(library.path, registry).assets };
|
|
1929
|
+
} catch (err) {
|
|
1930
|
+
return { library, assets: [], error: describeSyncError(err) };
|
|
1931
|
+
}
|
|
1932
|
+
});
|
|
1933
|
+
}
|
|
1862
1934
|
var FALLBACK_USER_NAME = "Skaile CLI";
|
|
1863
1935
|
var FALLBACK_USER_EMAIL = "skaile-cli@local";
|
|
1864
1936
|
var ROOT_README = `# Skaile Sidecar Manifests
|
|
@@ -1906,7 +1978,7 @@ var SidecarGit = class {
|
|
|
1906
1978
|
if (!fs10.existsSync(this.rootDir)) {
|
|
1907
1979
|
fs10.mkdirSync(this.rootDir, { recursive: true });
|
|
1908
1980
|
}
|
|
1909
|
-
const gitDir =
|
|
1981
|
+
const gitDir = path15.join(this.rootDir, ".git");
|
|
1910
1982
|
const freshRepo = !fs10.existsSync(gitDir);
|
|
1911
1983
|
if (freshRepo) {
|
|
1912
1984
|
const init = this.spawn(["init", "-b", "main"]);
|
|
@@ -1914,9 +1986,9 @@ var SidecarGit = class {
|
|
|
1914
1986
|
throw new Error(`git init failed: ${init.stderr || init.stdout}`);
|
|
1915
1987
|
}
|
|
1916
1988
|
}
|
|
1917
|
-
const attrsPath =
|
|
1989
|
+
const attrsPath = path15.join(this.rootDir, ".gitattributes");
|
|
1918
1990
|
if (!fs10.existsSync(attrsPath)) fs10.writeFileSync(attrsPath, GITATTRIBUTES, "utf-8");
|
|
1919
|
-
const readmePath =
|
|
1991
|
+
const readmePath = path15.join(this.rootDir, "README.md");
|
|
1920
1992
|
if (!fs10.existsSync(readmePath)) fs10.writeFileSync(readmePath, ROOT_README, "utf-8");
|
|
1921
1993
|
if (!this.hasGlobalGitConfig("user.name")) {
|
|
1922
1994
|
this.spawn(["config", "user.name", FALLBACK_USER_NAME]);
|
|
@@ -1942,7 +2014,7 @@ var SidecarGit = class {
|
|
|
1942
2014
|
*/
|
|
1943
2015
|
async commit(slug, message, opts) {
|
|
1944
2016
|
if (opts?.skip) return;
|
|
1945
|
-
const slugDir =
|
|
2017
|
+
const slugDir = path15.join(this.rootDir, slug);
|
|
1946
2018
|
if (fs10.existsSync(slugDir)) {
|
|
1947
2019
|
this.spawn(["add", "--", slug]);
|
|
1948
2020
|
} else {
|
|
@@ -2003,7 +2075,7 @@ ${result.stderr}`;
|
|
|
2003
2075
|
};
|
|
2004
2076
|
function migrateWorkspaceConfig(dir, opts) {
|
|
2005
2077
|
const filename = opts?.filename ?? "skaile.yaml";
|
|
2006
|
-
const filePath =
|
|
2078
|
+
const filePath = path15.join(dir, filename);
|
|
2007
2079
|
if (!fs10.existsSync(filePath)) {
|
|
2008
2080
|
return { migrated: false, version: 1, warnings: ["No skaile.yaml found"] };
|
|
2009
2081
|
}
|
|
@@ -2228,8 +2300,8 @@ function resolveTemplate(template, context) {
|
|
|
2228
2300
|
});
|
|
2229
2301
|
return { value: result, hasSecret: false };
|
|
2230
2302
|
}
|
|
2231
|
-
function setNestedValue(obj,
|
|
2232
|
-
const parts =
|
|
2303
|
+
function setNestedValue(obj, path17, value) {
|
|
2304
|
+
const parts = path17.split(".");
|
|
2233
2305
|
let current = obj;
|
|
2234
2306
|
for (let i = 0; i < parts.length - 1; i++) {
|
|
2235
2307
|
const key = parts[i];
|
|
@@ -2834,8 +2906,8 @@ function deepEqual(a, b) {
|
|
|
2834
2906
|
function defaultCatalogCacheDir() {
|
|
2835
2907
|
const home = globalSkaileDir();
|
|
2836
2908
|
return migrateLegacyDir(
|
|
2837
|
-
|
|
2838
|
-
|
|
2909
|
+
path15.join(globalCacheRoot(), "catalog"),
|
|
2910
|
+
path15.join(home, "catalog-cache")
|
|
2839
2911
|
);
|
|
2840
2912
|
}
|
|
2841
2913
|
var INDEX_FILE = "index.json";
|
|
@@ -2908,7 +2980,7 @@ var CatalogCache = class {
|
|
|
2908
2980
|
// ── public: tarball cache ───────────────────────────────────────────────
|
|
2909
2981
|
/** Absolute path where a tarball with `sha256` would be cached. */
|
|
2910
2982
|
tarballPath(sha256) {
|
|
2911
|
-
return
|
|
2983
|
+
return path15.join(this.dir, TARBALL_DIR, `${sha256}.tgz`);
|
|
2912
2984
|
}
|
|
2913
2985
|
/** Read a cached tarball from disk if present, otherwise `null`. */
|
|
2914
2986
|
readTarball(sha256) {
|
|
@@ -2918,7 +2990,7 @@ var CatalogCache = class {
|
|
|
2918
2990
|
}
|
|
2919
2991
|
/** Persist a tarball blob to disk (atomic write). */
|
|
2920
2992
|
writeTarball(sha256, bytes) {
|
|
2921
|
-
const dir =
|
|
2993
|
+
const dir = path15.join(this.dir, TARBALL_DIR);
|
|
2922
2994
|
if (!fs10.existsSync(dir)) fs10.mkdirSync(dir, { recursive: true });
|
|
2923
2995
|
const finalPath = this.tarballPath(sha256);
|
|
2924
2996
|
const tmpPath = `${finalPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
@@ -2942,7 +3014,7 @@ var CatalogCache = class {
|
|
|
2942
3014
|
*/
|
|
2943
3015
|
invalidateEverything() {
|
|
2944
3016
|
this.invalidateAll();
|
|
2945
|
-
const tarballDir =
|
|
3017
|
+
const tarballDir = path15.join(this.dir, TARBALL_DIR);
|
|
2946
3018
|
if (fs10.existsSync(tarballDir)) {
|
|
2947
3019
|
fs10.rmSync(tarballDir, { recursive: true, force: true });
|
|
2948
3020
|
}
|
|
@@ -2954,11 +3026,11 @@ var CatalogCache = class {
|
|
|
2954
3026
|
// ── private ─────────────────────────────────────────────────────────────
|
|
2955
3027
|
ensureDir() {
|
|
2956
3028
|
if (!fs10.existsSync(this.dir)) fs10.mkdirSync(this.dir, { recursive: true });
|
|
2957
|
-
const tarballDir =
|
|
3029
|
+
const tarballDir = path15.join(this.dir, TARBALL_DIR);
|
|
2958
3030
|
if (!fs10.existsSync(tarballDir)) fs10.mkdirSync(tarballDir, { recursive: true });
|
|
2959
3031
|
}
|
|
2960
3032
|
indexPath() {
|
|
2961
|
-
return
|
|
3033
|
+
return path15.join(this.dir, INDEX_FILE);
|
|
2962
3034
|
}
|
|
2963
3035
|
loadIndex() {
|
|
2964
3036
|
if (this.index) return this.index;
|
|
@@ -3822,7 +3894,7 @@ var defaultFetch2 = async (url, init) => {
|
|
|
3822
3894
|
});
|
|
3823
3895
|
};
|
|
3824
3896
|
function discoveredToAssetEntry(asset, repoPublisher, inheritPublisher) {
|
|
3825
|
-
const root =
|
|
3897
|
+
const root = path15.posix.dirname(asset.relativePath.replace(/\\/g, "/"));
|
|
3826
3898
|
const entry = {
|
|
3827
3899
|
kind: asset.kind,
|
|
3828
3900
|
name: asset.name,
|
|
@@ -3846,13 +3918,13 @@ function writeCuratedManifest(input) {
|
|
|
3846
3918
|
const inheritPublisher = input.inheritPublisher ?? false;
|
|
3847
3919
|
const assets = input.assets.map((a) => discoveredToAssetEntry(a, publisher, inheritPublisher)).sort((a, b) => `${a.kind}:${a.name}`.localeCompare(`${b.kind}:${b.name}`));
|
|
3848
3920
|
const manifest = { publisher, assets };
|
|
3849
|
-
fs10.mkdirSync(
|
|
3921
|
+
fs10.mkdirSync(path15.dirname(manifestPath), { recursive: true });
|
|
3850
3922
|
fs10.writeFileSync(manifestPath, encodeSkaileManifest(manifest), "utf-8");
|
|
3851
3923
|
return { wrote: true, manifestPath, assetCount: assets.length };
|
|
3852
3924
|
}
|
|
3853
3925
|
function openManifest(libraryPath) {
|
|
3854
|
-
const dir =
|
|
3855
|
-
const file =
|
|
3926
|
+
const dir = path15.resolve(libraryPath);
|
|
3927
|
+
const file = path15.join(dir, SKAILE_MANIFEST_FILENAME);
|
|
3856
3928
|
if (!fs10.existsSync(file)) {
|
|
3857
3929
|
fs10.mkdirSync(dir, { recursive: true });
|
|
3858
3930
|
return { editor: ManifestYamlEditor.create(file), created: true };
|
|
@@ -3865,7 +3937,23 @@ function openManifest(libraryPath) {
|
|
|
3865
3937
|
function assertManifestEditable(libraryPath) {
|
|
3866
3938
|
openManifest(libraryPath);
|
|
3867
3939
|
}
|
|
3940
|
+
function conflictingAssetRoot(libraryPath, kind, name, root) {
|
|
3941
|
+
const existing = loadSkPublishManifest(path15.resolve(libraryPath))?.assets?.find(
|
|
3942
|
+
(a) => a.kind === kind && a.name === name
|
|
3943
|
+
);
|
|
3944
|
+
return existingRootConflict(libraryPath, existing, root);
|
|
3945
|
+
}
|
|
3946
|
+
function existingRootConflict(libraryPath, existing, root) {
|
|
3947
|
+
if (!existing?.root || existing.source) return void 0;
|
|
3948
|
+
const existingAbs = path15.resolve(libraryPath, existing.root);
|
|
3949
|
+
if (existingAbs === path15.resolve(libraryPath, root)) return void 0;
|
|
3950
|
+
const stat = fs10.statSync(existingAbs, { throwIfNoEntry: false });
|
|
3951
|
+
return stat?.isDirectory() ? existing.root : void 0;
|
|
3952
|
+
}
|
|
3868
3953
|
function upsertManifestAsset(libraryPath, input) {
|
|
3954
|
+
if (input.root.split(/[\\/]+/).includes("..")) {
|
|
3955
|
+
throw new Error(`Asset root "${input.root}" must stay inside the library (no "..").`);
|
|
3956
|
+
}
|
|
3869
3957
|
const { editor } = openManifest(libraryPath);
|
|
3870
3958
|
const declared = editor.getPublisher();
|
|
3871
3959
|
const topLevel = declared === void 0 ? void 0 : barePublisher(declared);
|
|
@@ -3876,6 +3964,12 @@ function upsertManifestAsset(libraryPath, input) {
|
|
|
3876
3964
|
if (input.description) entry.description = input.description;
|
|
3877
3965
|
if (input.keywords && input.keywords.length > 0) entry.keywords = input.keywords;
|
|
3878
3966
|
const existing = editor.getAssets().find((a) => a.kind === input.kind && a.name === input.name);
|
|
3967
|
+
const conflict = existingRootConflict(libraryPath, existing, input.root);
|
|
3968
|
+
if (conflict) {
|
|
3969
|
+
throw new Error(
|
|
3970
|
+
`${input.kind}:${input.name} is already registered at "${conflict}" \u2014 "${input.root}" would re-point it and orphan the first asset. Remove or rename one of them.`
|
|
3971
|
+
);
|
|
3972
|
+
}
|
|
3879
3973
|
const next = existing ? { ...existing, ...entry } : entry;
|
|
3880
3974
|
if (existing && input.publisher && !overridesTopLevel) delete next.publisher;
|
|
3881
3975
|
if (!existing || !isDeepStrictEqual(existing, next)) {
|
|
@@ -3887,7 +3981,7 @@ function upsertManifestAsset(libraryPath, input) {
|
|
|
3887
3981
|
function missingRootAssets(libraryPath, manifest) {
|
|
3888
3982
|
return (manifest.assets ?? []).filter((a) => {
|
|
3889
3983
|
if (a.source || manifest.source || !a.root) return false;
|
|
3890
|
-
const dir =
|
|
3984
|
+
const dir = path15.resolve(libraryPath, a.root);
|
|
3891
3985
|
return !(fs10.existsSync(dir) && fs10.statSync(dir).isDirectory());
|
|
3892
3986
|
});
|
|
3893
3987
|
}
|
|
@@ -3901,6 +3995,16 @@ function pruneMissingRootAssets(libraryPath) {
|
|
|
3901
3995
|
if (removed.length > 0) editor.save();
|
|
3902
3996
|
return removed;
|
|
3903
3997
|
}
|
|
3998
|
+
function pruneUnknownKindAssets(libraryPath, knownKinds) {
|
|
3999
|
+
const manifest = loadSkPublishManifest(libraryPath);
|
|
4000
|
+
if (!manifest) return [];
|
|
4001
|
+
const unknown = (manifest.assets ?? []).filter((a) => !knownKinds.has(a.kind));
|
|
4002
|
+
if (unknown.length === 0) return [];
|
|
4003
|
+
const { editor } = openManifest(libraryPath);
|
|
4004
|
+
const removed = unknown.filter((a) => editor.removeAsset(a.kind, a.name));
|
|
4005
|
+
if (removed.length > 0) editor.save();
|
|
4006
|
+
return removed;
|
|
4007
|
+
}
|
|
3904
4008
|
function stampManifestPublisher(libraryPath, publisher) {
|
|
3905
4009
|
const { editor, created } = openManifest(libraryPath);
|
|
3906
4010
|
if (editor.getPublisher()) return false;
|
|
@@ -3919,19 +4023,79 @@ function setManifestPublisher(libraryPath, publisher) {
|
|
|
3919
4023
|
}
|
|
3920
4024
|
async function syncManifestWithDisk(libraryPath, defaultPublisher, registry) {
|
|
3921
4025
|
stampManifestPublisher(libraryPath, defaultPublisher);
|
|
4026
|
+
const knownKinds = new Set(registry.getAllKinds());
|
|
4027
|
+
const unknownKind = pruneUnknownKindAssets(libraryPath, knownKinds);
|
|
3922
4028
|
const removed = pruneMissingRootAssets(libraryPath);
|
|
4029
|
+
const skipped = [];
|
|
3923
4030
|
const publisher = loadSkPublishManifest(libraryPath)?.publisher ?? defaultPublisher;
|
|
3924
|
-
|
|
3925
|
-
knownKinds
|
|
3926
|
-
|
|
4031
|
+
const scanned = await scanDirectory(libraryPath, publisher, {
|
|
4032
|
+
knownKinds,
|
|
4033
|
+
keepDuplicates: true
|
|
4034
|
+
});
|
|
4035
|
+
const rootOf = (e) => path15.relative(libraryPath, path15.dirname(e.source)) || e.name;
|
|
4036
|
+
const copiesOf = /* @__PURE__ */ new Map();
|
|
4037
|
+
for (const e of scanned) {
|
|
4038
|
+
const key = `${e.kind}:${e.name}`;
|
|
4039
|
+
copiesOf.set(key, [...copiesOf.get(key) ?? [], e]);
|
|
4040
|
+
}
|
|
4041
|
+
const unclaimed = /* @__PURE__ */ new Set();
|
|
4042
|
+
for (const [key, copies] of copiesOf) {
|
|
4043
|
+
const claimed = copies.some(
|
|
4044
|
+
(c) => conflictingAssetRoot(libraryPath, c.kind, c.name, rootOf(c))
|
|
4045
|
+
);
|
|
4046
|
+
if (copies.length > 1 && !claimed) unclaimed.add(key);
|
|
4047
|
+
}
|
|
4048
|
+
for (const e of scanned) {
|
|
4049
|
+
if (!isParsable(e.source)) {
|
|
4050
|
+
skipped.push({
|
|
4051
|
+
kind: e.kind,
|
|
4052
|
+
name: e.name,
|
|
4053
|
+
reason: "unparsable",
|
|
4054
|
+
detail: "manifest file could not be parsed",
|
|
4055
|
+
file: path15.relative(libraryPath, e.source)
|
|
4056
|
+
});
|
|
4057
|
+
continue;
|
|
4058
|
+
}
|
|
4059
|
+
if (e.version && !SEMVER_RE.test(e.version)) {
|
|
4060
|
+
skipped.push({
|
|
4061
|
+
kind: e.kind,
|
|
4062
|
+
name: e.name,
|
|
4063
|
+
reason: "invalid-version",
|
|
4064
|
+
detail: `version "${e.version}" is not valid semver`,
|
|
4065
|
+
file: path15.relative(libraryPath, e.source)
|
|
4066
|
+
});
|
|
4067
|
+
continue;
|
|
4068
|
+
}
|
|
4069
|
+
const key = `${e.kind}:${e.name}`;
|
|
4070
|
+
const root = rootOf(e);
|
|
4071
|
+
const registered = conflictingAssetRoot(libraryPath, e.kind, e.name, root);
|
|
4072
|
+
const others = (copiesOf.get(key) ?? []).filter((c) => c !== e);
|
|
4073
|
+
const conflict = unclaimed.has(key) ? `also found in ${others.map((c) => `"${rootOf(c)}"`).join(", ")}` : registered && `already registered at "${registered}"`;
|
|
4074
|
+
if (conflict) {
|
|
4075
|
+
skipped.push({
|
|
4076
|
+
kind: e.kind,
|
|
4077
|
+
name: e.name,
|
|
4078
|
+
reason: "duplicate",
|
|
4079
|
+
detail: conflict,
|
|
4080
|
+
file: path15.relative(libraryPath, e.source)
|
|
4081
|
+
});
|
|
4082
|
+
continue;
|
|
4083
|
+
}
|
|
3927
4084
|
upsertManifestAsset(libraryPath, {
|
|
3928
4085
|
kind: e.kind,
|
|
3929
4086
|
name: e.name,
|
|
3930
|
-
root
|
|
4087
|
+
root,
|
|
3931
4088
|
version: e.version
|
|
3932
4089
|
});
|
|
3933
4090
|
}
|
|
3934
|
-
return removed;
|
|
4091
|
+
return { removed, unknownKind, skipped };
|
|
4092
|
+
}
|
|
4093
|
+
function isParsable(file) {
|
|
4094
|
+
try {
|
|
4095
|
+
return parseManifestFile(file, fs10.readFileSync(file, "utf-8")).ok;
|
|
4096
|
+
} catch {
|
|
4097
|
+
return false;
|
|
4098
|
+
}
|
|
3935
4099
|
}
|
|
3936
4100
|
var PinPolicySchema = z3.enum(PIN_POLICIES);
|
|
3937
4101
|
var LibraryInstanceRefSchema = z3.object({
|
|
@@ -3985,7 +4149,7 @@ function parseWorkspaceV2(raw) {
|
|
|
3985
4149
|
return WorkspaceConfigV2Schema.parse(raw);
|
|
3986
4150
|
}
|
|
3987
4151
|
function loadWorkspaceV2(dir, filename = "skaile.yaml") {
|
|
3988
|
-
const filePath =
|
|
4152
|
+
const filePath = path15.join(dir, filename);
|
|
3989
4153
|
if (!fs10.existsSync(filePath)) return null;
|
|
3990
4154
|
const content = fs10.readFileSync(filePath, "utf-8");
|
|
3991
4155
|
const raw = parse(content);
|
|
@@ -3993,7 +4157,7 @@ function loadWorkspaceV2(dir, filename = "skaile.yaml") {
|
|
|
3993
4157
|
return parseWorkspaceV2(raw);
|
|
3994
4158
|
}
|
|
3995
4159
|
function saveWorkspaceV2(dir, v2, filename = "skaile.yaml") {
|
|
3996
|
-
const filePath =
|
|
4160
|
+
const filePath = path15.join(dir, filename);
|
|
3997
4161
|
let existing = {};
|
|
3998
4162
|
if (fs10.existsSync(filePath)) {
|
|
3999
4163
|
const content = fs10.readFileSync(filePath, "utf-8");
|
|
@@ -4009,7 +4173,7 @@ function saveWorkspaceV2(dir, v2, filename = "skaile.yaml") {
|
|
|
4009
4173
|
}
|
|
4010
4174
|
var LOCK_FILENAME = "skaile.lock.yaml";
|
|
4011
4175
|
function loadLockFile(dir) {
|
|
4012
|
-
const filePath =
|
|
4176
|
+
const filePath = path15.join(dir, LOCK_FILENAME);
|
|
4013
4177
|
if (!fs10.existsSync(filePath)) return null;
|
|
4014
4178
|
const content = fs10.readFileSync(filePath, "utf-8");
|
|
4015
4179
|
const raw = parse(content);
|
|
@@ -4027,7 +4191,7 @@ function loadLockFile(dir) {
|
|
|
4027
4191
|
return LockFileSchema.parse(raw);
|
|
4028
4192
|
}
|
|
4029
4193
|
function saveLockFile(dir, lock) {
|
|
4030
|
-
const filePath =
|
|
4194
|
+
const filePath = path15.join(dir, LOCK_FILENAME);
|
|
4031
4195
|
if (!fs10.existsSync(dir)) {
|
|
4032
4196
|
fs10.mkdirSync(dir, { recursive: true });
|
|
4033
4197
|
}
|
|
@@ -4048,7 +4212,7 @@ function createEmptyLockFile() {
|
|
|
4048
4212
|
};
|
|
4049
4213
|
}
|
|
4050
4214
|
function detectWorkspaceVersion(dir, filename = "skaile.yaml") {
|
|
4051
|
-
const filePath =
|
|
4215
|
+
const filePath = path15.join(dir, filename);
|
|
4052
4216
|
if (!fs10.existsSync(filePath)) return null;
|
|
4053
4217
|
const content = fs10.readFileSync(filePath, "utf-8");
|
|
4054
4218
|
const raw = parse(content);
|
|
@@ -4056,6 +4220,6 @@ function detectWorkspaceVersion(dir, filename = "skaile.yaml") {
|
|
|
4056
4220
|
return raw.version === 2 ? 2 : 1;
|
|
4057
4221
|
}
|
|
4058
4222
|
|
|
4059
|
-
export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, assertManifestEditable, classifyRef, cloneOrInitGitRepo, createEmptyLockFile, curatedManifestOverlay, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, ensureGitRepo, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, installLibraryAsset, interpolate, isGitRepo, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, missingRootAssets, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, pruneMissingRootAssets, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, scanLibraryRoot, setManifestPublisher, setOriginUrl, sha256Hex, stampManifestPublisher, storeSecrets, syncManifestWithDisk, trpcGetUrl, upsertManifestAsset, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeCuratedManifest };
|
|
4060
|
-
//# sourceMappingURL=chunk-
|
|
4061
|
-
//# sourceMappingURL=chunk-
|
|
4223
|
+
export { AssignmentNotFoundError, CatalogCache, CatalogConfigSchema, CatalogHttpError, DuplicateAssignmentError, DuplicateLibraryNameError, GitSyncDriver, InstanceHasConsumersError, InstanceNotFoundError, InterpolationError, KnowledgeManifestSchema, LIBRARY_BACKENDS, LIBRARY_OWNERSHIPS, LOCAL_CATALOG_URL, LibraryConfigSchema, LibraryError, LibraryInstanceRefSchema, LibraryManager, LibrarySectionSchema, LibrarySyncError, LocalCatalogSource, LocalIndex, LocalSyncDriver, LockAssignmentSchema, LockFileSchema, OfflineError, OperationNotPermittedError, PIN_POLICIES, PinPolicySchema, PresetAppliedSchema, PresetExpandedSchema, RemoteCatalogSource, RequiresEdgeSchema, RestCatalogSource, SidecarGit, SkaileConfigSchema, SourceNotFoundError, TarballHashMismatchError, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, assertManifestEditable, assertValidLibraryName, classifyRef, cloneOrInitGitRepo, conflictingAssetRoot, createEmptyLockFile, curatedManifestOverlay, deriveSlug, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, ensureGitRepo, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, installLibraryAsset, interpolate, isGitRepo, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, missingRootAssets, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, pruneMissingRootAssets, queryInstancePickerChoices, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, scanAuthoringLibraries, scanLibraryRoot, setManifestPublisher, setOriginUrl, sha256Hex, stampManifestPublisher, storeSecrets, syncManifestWithDisk, trackOriginBranch, trpcGetUrl, upsertManifestAsset, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeCuratedManifest };
|
|
4224
|
+
//# sourceMappingURL=chunk-4MQS7CAF.js.map
|
|
4225
|
+
//# sourceMappingURL=chunk-4MQS7CAF.js.map
|