@skaile/workspaces 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -0
- package/dist/{asset-feeds-PXUWCXVI.js → asset-feeds-KPKCE64E.js} +31 -23
- package/dist/asset-feeds-KPKCE64E.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +10 -10
- package/dist/asset-manager/fragments.js +1 -1
- package/dist/asset-manager/index.js +19 -19
- package/dist/asset-manager/installer.js +13 -13
- package/dist/asset-manager/renderers.js +11 -11
- package/dist/asset-manager/src/index.d.ts +339 -19
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +40 -0
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/mcp-config.d.ts +21 -0
- package/dist/asset-manager/src/mcp-config.d.ts.map +1 -1
- package/dist/asset-manager/src/renderers.d.ts +7 -0
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/harnesses/claude-sdk.js +18 -22
- package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
- package/dist/bridge/harnesses/codex.js +24 -17
- package/dist/bridge/harnesses/codex.js.map +1 -1
- package/dist/bridge/harnesses/continue.js +14 -14
- package/dist/bridge/harnesses/echo.js +4 -4
- package/dist/bridge/harnesses/gemini.js +10 -10
- package/dist/bridge/harnesses/goose.js +14 -14
- package/dist/bridge/harnesses/omp.js +15 -8
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +14 -14
- package/dist/bridge/harnesses/qwen.js +10 -10
- package/dist/bridge/index.js +19 -19
- package/dist/bridge/src/claude-sdk-surface.d.ts +17 -0
- package/dist/bridge/src/claude-sdk-surface.d.ts.map +1 -0
- package/dist/bridge/src/harness-model-check.d.ts +30 -0
- package/dist/bridge/src/harness-model-check.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/_subprocess-cli.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/claude-sdk.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/codex.d.ts.map +1 -1
- package/dist/bridge/src/harnesses/omp.d.ts.map +1 -1
- package/dist/bridge/src/index.d.ts +2 -1
- package/dist/bridge/src/index.d.ts.map +1 -1
- package/dist/bridge/src/normalizer.d.ts +3 -1
- package/dist/bridge/src/normalizer.d.ts.map +1 -1
- package/dist/bridge/src/runner-private-env.d.ts +7 -0
- package/dist/bridge/src/runner-private-env.d.ts.map +1 -1
- package/dist/{chunk-HK7HMEPT.js → chunk-27SXN33H.js} +13 -5
- package/dist/chunk-27SXN33H.js.map +1 -0
- package/dist/{chunk-TKHJXPSB.js → chunk-2XM3ZH36.js} +183 -33
- package/dist/chunk-2XM3ZH36.js.map +1 -0
- package/dist/{chunk-E3GPGTW3.js → chunk-3HACK2Z7.js} +142 -28
- package/dist/chunk-3HACK2Z7.js.map +1 -0
- package/dist/{chunk-T2BDID2J.js → chunk-5JPW27BI.js} +10 -9
- package/dist/chunk-5JPW27BI.js.map +1 -0
- package/dist/{chunk-2UUKCROR.js → chunk-5LQ62LNT.js} +4 -4
- package/dist/{chunk-2UUKCROR.js.map → chunk-5LQ62LNT.js.map} +1 -1
- package/dist/{chunk-UL22SDGR.js → chunk-6CYKTHNT.js} +194 -127
- package/dist/chunk-6CYKTHNT.js.map +1 -0
- package/dist/{chunk-XFIEVEU7.js → chunk-6OHZUUR7.js} +5 -4
- package/dist/chunk-6OHZUUR7.js.map +1 -0
- package/dist/{chunk-E572OHGY.js → chunk-76FLBODK.js} +4 -3
- package/dist/chunk-76FLBODK.js.map +1 -0
- package/dist/{chunk-GN4VVSAA.js → chunk-7DRFKAJZ.js} +7 -7
- package/dist/{chunk-GN4VVSAA.js.map → chunk-7DRFKAJZ.js.map} +1 -1
- package/dist/chunk-7H6XRCPG.js +31 -0
- package/dist/chunk-7H6XRCPG.js.map +1 -0
- package/dist/{chunk-MCUJTNY5.js → chunk-7Y6S4XLL.js} +3 -3
- package/dist/{chunk-MCUJTNY5.js.map → chunk-7Y6S4XLL.js.map} +1 -1
- package/dist/{chunk-DHYSUJ3H.js → chunk-BEYNH2LS.js} +4 -4
- package/dist/{chunk-DHYSUJ3H.js.map → chunk-BEYNH2LS.js.map} +1 -1
- package/dist/{chunk-GEQSUC6U.js → chunk-BOT64P3U.js} +4 -4
- package/dist/{chunk-GEQSUC6U.js.map → chunk-BOT64P3U.js.map} +1 -1
- package/dist/{chunk-L4YKW5AY.js → chunk-BRK5QZKI.js} +121 -20
- package/dist/chunk-BRK5QZKI.js.map +1 -0
- package/dist/{chunk-YGRZNFRO.js → chunk-BY5WIRCU.js} +58 -5
- package/dist/chunk-BY5WIRCU.js.map +1 -0
- package/dist/{chunk-Z7ZEZZB6.js → chunk-C5HFK34M.js} +3 -3
- package/dist/chunk-C5HFK34M.js.map +1 -0
- package/dist/{chunk-DUMTLYSO.js → chunk-COAFAYBS.js} +31 -7
- package/dist/chunk-COAFAYBS.js.map +1 -0
- package/dist/{chunk-7XSAW5OC.js → chunk-E5NQRHEB.js} +30 -7
- package/dist/chunk-E5NQRHEB.js.map +1 -0
- package/dist/{chunk-BFMYYNDT.js → chunk-F3D25RGM.js} +11 -3
- package/dist/chunk-F3D25RGM.js.map +1 -0
- package/dist/{chunk-VBI7HGHB.js → chunk-GF5JXQIZ.js} +3 -3
- package/dist/{chunk-VBI7HGHB.js.map → chunk-GF5JXQIZ.js.map} +1 -1
- package/dist/{chunk-ZFUZ5AKM.js → chunk-I7LC5TDY.js} +3 -3
- package/dist/{chunk-ZFUZ5AKM.js.map → chunk-I7LC5TDY.js.map} +1 -1
- package/dist/{chunk-3IXIEHUB.js → chunk-ICSGNT5P.js} +7 -7
- package/dist/{chunk-3IXIEHUB.js.map → chunk-ICSGNT5P.js.map} +1 -1
- package/dist/{chunk-WEH33JSG.js → chunk-ITFCWMOY.js} +93 -29
- package/dist/chunk-ITFCWMOY.js.map +1 -0
- package/dist/{chunk-WDXZA7QW.js → chunk-IZQOO6MN.js} +2 -2
- package/dist/{chunk-WDXZA7QW.js.map → chunk-IZQOO6MN.js.map} +1 -1
- package/dist/{chunk-WDAIWDLK.js → chunk-JFLQICIU.js} +5 -5
- package/dist/{chunk-WDAIWDLK.js.map → chunk-JFLQICIU.js.map} +1 -1
- package/dist/{chunk-ARWKK325.js → chunk-JJJ2G4K2.js} +5 -5
- package/dist/{chunk-ARWKK325.js.map → chunk-JJJ2G4K2.js.map} +1 -1
- package/dist/{chunk-GOCWM7FN.js → chunk-JMIKGAUA.js} +43 -4
- package/dist/chunk-JMIKGAUA.js.map +1 -0
- package/dist/{chunk-X3RMRJNR.js → chunk-JRN5QF4C.js} +8 -3
- package/dist/chunk-JRN5QF4C.js.map +1 -0
- package/dist/{chunk-SNEE6UGY.js → chunk-K3R2UKG7.js} +18 -12
- package/dist/chunk-K3R2UKG7.js.map +1 -0
- package/dist/{chunk-VXEYX73S.js → chunk-KB56WBQ3.js} +4 -4
- package/dist/{chunk-VXEYX73S.js.map → chunk-KB56WBQ3.js.map} +1 -1
- package/dist/{chunk-OHNKYHRR.js → chunk-KJSC2ZD6.js} +264 -18
- package/dist/chunk-KJSC2ZD6.js.map +1 -0
- package/dist/{chunk-UQ33Y4DM.js → chunk-KPKGWXUJ.js} +4 -4
- package/dist/{chunk-UQ33Y4DM.js.map → chunk-KPKGWXUJ.js.map} +1 -1
- package/dist/{chunk-AF432MS3.js → chunk-KXJMQTOU.js} +3 -3
- package/dist/{chunk-AF432MS3.js.map → chunk-KXJMQTOU.js.map} +1 -1
- package/dist/chunk-LRBP3234.js +302 -0
- package/dist/chunk-LRBP3234.js.map +1 -0
- package/dist/{chunk-UVVVR4XO.js → chunk-M4OG2YN4.js} +4 -4
- package/dist/{chunk-UVVVR4XO.js.map → chunk-M4OG2YN4.js.map} +1 -1
- package/dist/{chunk-QOM5Z62G.js → chunk-MAZ3UXJK.js} +17 -24
- package/dist/chunk-MAZ3UXJK.js.map +1 -0
- package/dist/{chunk-Y2TO2U7W.js → chunk-MM4YO3EL.js} +3 -3
- package/dist/{chunk-Y2TO2U7W.js.map → chunk-MM4YO3EL.js.map} +1 -1
- package/dist/{chunk-OULSJRXV.js → chunk-OCQNUV4T.js} +7 -7
- package/dist/{chunk-OULSJRXV.js.map → chunk-OCQNUV4T.js.map} +1 -1
- package/dist/{chunk-SZXGRHQQ.js → chunk-PJJSBZZP.js} +4 -4
- package/dist/{chunk-SZXGRHQQ.js.map → chunk-PJJSBZZP.js.map} +1 -1
- package/dist/{chunk-OAHVKSQJ.js → chunk-PKBLJI23.js} +1471 -126
- package/dist/chunk-PKBLJI23.js.map +1 -0
- package/dist/{chunk-NOA6EJXE.js → chunk-PKE3PXOK.js} +3 -3
- package/dist/{chunk-NOA6EJXE.js.map → chunk-PKE3PXOK.js.map} +1 -1
- package/dist/{chunk-WYHQUCHR.js → chunk-PMWRM4EJ.js} +109 -48
- package/dist/chunk-PMWRM4EJ.js.map +1 -0
- package/dist/{chunk-H6UVIKQ2.js → chunk-PNUM7GUY.js} +3 -3
- package/dist/{chunk-H6UVIKQ2.js.map → chunk-PNUM7GUY.js.map} +1 -1
- package/dist/{chunk-SRODW6M2.js → chunk-Q5RN4PWV.js} +3 -3
- package/dist/{chunk-SRODW6M2.js.map → chunk-Q5RN4PWV.js.map} +1 -1
- package/dist/{chunk-LN6QB7XI.js → chunk-QIHL3YPL.js} +4 -4
- package/dist/{chunk-LN6QB7XI.js.map → chunk-QIHL3YPL.js.map} +1 -1
- package/dist/{chunk-U56GGCC2.js → chunk-QK7AG5AV.js} +4 -4
- package/dist/{chunk-U56GGCC2.js.map → chunk-QK7AG5AV.js.map} +1 -1
- package/dist/{chunk-OTIB4D2K.js → chunk-QPWR3YMY.js} +15 -5
- package/dist/chunk-QPWR3YMY.js.map +1 -0
- package/dist/{chunk-4DWBSTYA.js → chunk-QXKUFROW.js} +22 -5
- package/dist/chunk-QXKUFROW.js.map +1 -0
- package/dist/{chunk-4XWLB7JB.js → chunk-RQMIZONH.js} +95 -35
- package/dist/chunk-RQMIZONH.js.map +1 -0
- package/dist/{chunk-LSI2IVFT.js → chunk-RXGPFAMN.js} +4 -3
- package/dist/chunk-RXGPFAMN.js.map +1 -0
- package/dist/{chunk-3JKGY2YC.js → chunk-S2H3RBK7.js} +182 -33
- package/dist/chunk-S2H3RBK7.js.map +1 -0
- package/dist/{chunk-VJRTDKXS.js → chunk-SJNZ4WPA.js} +165 -106
- package/dist/chunk-SJNZ4WPA.js.map +1 -0
- package/dist/{chunk-KX2PT5Q4.js → chunk-T2VBPVWZ.js} +77 -18
- package/dist/chunk-T2VBPVWZ.js.map +1 -0
- package/dist/{chunk-6Z5KTFJT.js → chunk-TSTRH4SM.js} +3 -3
- package/dist/{chunk-6Z5KTFJT.js.map → chunk-TSTRH4SM.js.map} +1 -1
- package/dist/{chunk-7CV3HFWJ.js → chunk-TZERN27L.js} +5 -5
- package/dist/{chunk-7CV3HFWJ.js.map → chunk-TZERN27L.js.map} +1 -1
- package/dist/{chunk-JDR6ILCW.js → chunk-U673DB5U.js} +4 -4
- package/dist/{chunk-JDR6ILCW.js.map → chunk-U673DB5U.js.map} +1 -1
- package/dist/{chunk-FKU57Q5Q.js → chunk-URCJIV7T.js} +3 -3
- package/dist/{chunk-FKU57Q5Q.js.map → chunk-URCJIV7T.js.map} +1 -1
- package/dist/{chunk-ADPM6AYF.js → chunk-VSX2G7LA.js} +3 -3
- package/dist/{chunk-ADPM6AYF.js.map → chunk-VSX2G7LA.js.map} +1 -1
- package/dist/{chunk-F2GOZMRA.js → chunk-X37JUNEW.js} +49 -49
- package/dist/chunk-X37JUNEW.js.map +1 -0
- package/dist/{chunk-NMI2TWMH.js → chunk-Z3IRZBXB.js} +158 -344
- package/dist/chunk-Z3IRZBXB.js.map +1 -0
- package/dist/{chunk-7TPYPVAH.js → chunk-ZWJCRHP3.js} +3 -3
- package/dist/{chunk-7TPYPVAH.js.map → chunk-ZWJCRHP3.js.map} +1 -1
- package/dist/{claude-code-VJGYBXQR.js → claude-code-BBMNVH2J.js} +5 -5
- package/dist/{claude-code-VJGYBXQR.js.map → claude-code-BBMNVH2J.js.map} +1 -1
- package/dist/cli/index.js +964 -501
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/agent-pins.d.ts +11 -0
- package/dist/cli/src/agent-pins.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 +1 -1
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/diff.d.ts.map +1 -1
- package/dist/cli/src/commands/harness.d.ts +24 -0
- package/dist/cli/src/commands/harness.d.ts.map +1 -0
- package/dist/cli/src/commands/integration.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +28 -3
- package/dist/cli/src/commands/library-index.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/plugin-registry-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +19 -1
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/rebuild.d.ts.map +1 -1
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/serve-preflight.d.ts +31 -1
- package/dist/cli/src/commands/serve-preflight.d.ts.map +1 -1
- package/dist/cli/src/commands/serve.d.ts +10 -0
- package/dist/cli/src/commands/serve.d.ts.map +1 -1
- package/dist/cli/src/commands/session-logs/local-query.d.ts +2 -0
- package/dist/cli/src/commands/session-logs/local-query.d.ts.map +1 -1
- package/dist/cli/src/commands/source-manifest-publish.d.ts.map +1 -1
- package/dist/cli/src/commands/source-manifest.d.ts +19 -7
- package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +9 -2
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/store.d.ts.map +1 -1
- package/dist/cli/src/commands/update.d.ts.map +1 -1
- package/dist/cli/src/commands/validate-instances.d.ts.map +1 -1
- package/dist/cli/src/commands/validate.d.ts.map +1 -1
- package/dist/cli/src/commands/why.d.ts.map +1 -1
- package/dist/cli/src/config-checks.d.ts +55 -0
- package/dist/cli/src/config-checks.d.ts.map +1 -0
- package/dist/cli/src/harness-error.d.ts +12 -1
- package/dist/cli/src/harness-error.d.ts.map +1 -1
- package/dist/cli/src/helpers.d.ts +18 -8
- package/dist/cli/src/helpers.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/index.d.ts +10 -1
- package/dist/cli/src/plugin-store/index.d.ts.map +1 -1
- package/dist/cli/src/plugin-store/spec.d.ts +8 -0
- package/dist/cli/src/plugin-store/spec.d.ts.map +1 -1
- package/dist/cli/src/skill-checks.d.ts +27 -0
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/cli/src/store-addable.d.ts +11 -0
- package/dist/cli/src/store-addable.d.ts.map +1 -1
- package/dist/connectors/config.js +5 -5
- package/dist/connectors/index.js +23 -23
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors-47EM6C2P.js +48 -0
- package/dist/{connectors-CXZLXAFZ.js.map → connectors-47EM6C2P.js.map} +1 -1
- package/dist/core/framework.js +1 -1
- package/dist/core/index.js +9 -9
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/provider-registry-credentials.js +2 -2
- package/dist/core/provider-registry.js +1 -1
- package/dist/core/publish-manifest.js +3 -3
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +5 -5
- package/dist/core/src/agent-instances.d.ts.map +1 -1
- package/dist/core/src/config-key-diagnostics.d.ts +9 -0
- package/dist/core/src/config-key-diagnostics.d.ts.map +1 -0
- package/dist/core/src/framework.d.ts +5 -3
- package/dist/core/src/framework.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/lock.d.ts +12 -0
- package/dist/core/src/lock.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +25 -0
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +15 -0
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/provider-registry.d.ts +6 -0
- package/dist/core/src/provider-registry.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +18 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/src/workspace-yaml-editor.d.ts +9 -2
- package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
- package/dist/core/workspace-config.js +4 -4
- package/dist/deploy/index.js +9 -9
- package/dist/discovery/index.js +5 -5
- package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
- package/dist/discovery/src/parse-manifest.d.ts.map +1 -1
- package/dist/{ensure-sources-UPTHZKGF.js → ensure-sources-K5EFNC3L.js} +36 -22
- package/dist/ensure-sources-K5EFNC3L.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +23 -23
- package/dist/factory-assets/connectors/deploy.js +23 -23
- package/dist/factory-assets/connectors/devserver.js +23 -23
- package/dist/factory-assets/connectors/flow/adapter.js +23 -23
- package/dist/factory-assets/connectors/flow/contract/normalize.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/contract.js +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +11 -11
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +25 -25
- package/dist/factory-assets/connectors/flow.js +23 -23
- package/dist/factory-assets/connectors/git.js +23 -23
- package/dist/factory-assets/connectors/gmail.js +23 -23
- package/dist/factory-assets/connectors/googledrive.js +23 -23
- package/dist/factory-assets/connectors/local.js +23 -23
- package/dist/factory-assets/connectors/mattermost.js +23 -23
- package/dist/factory-assets/connectors/memory.js +23 -23
- package/dist/factory-assets/connectors/minio.js +23 -23
- package/dist/factory-assets/connectors/postgres.js +23 -23
- package/dist/factory-assets/connectors/s3.js +23 -23
- package/dist/factory-assets/connectors/sharepoint.js +23 -23
- package/dist/factory-assets/connectors/sqlite.js +23 -23
- package/dist/factory-assets/connectors/static-server.js +23 -23
- package/dist/factory-assets/connectors/tunnel.js +23 -23
- package/dist/factory-assets/connectors/webdav.js +23 -23
- package/dist/factory-assets/connectors/xstate-store.js +23 -23
- package/dist/factory-assets/connectors/xstate.js +23 -23
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +1 -1
- package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +2 -2
- package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +3 -3
- package/dist/flows-KLBNSKLO.js +26 -0
- package/dist/{flows-TJQIMGUX.js.map → flows-KLBNSKLO.js.map} +1 -1
- package/dist/helpers-LUSV2ICC.js +52 -0
- package/dist/{helpers-DE53KG3E.js.map → helpers-LUSV2ICC.js.map} +1 -1
- package/dist/library/index.js +14 -14
- package/dist/library/install.js +5 -5
- package/dist/library/src/index.d.ts +2 -2
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/install/index.d.ts +1 -1
- package/dist/library/src/install/index.d.ts.map +1 -1
- package/dist/library/src/install/install-from-manifest.d.ts +13 -0
- package/dist/library/src/install/install-from-manifest.d.ts.map +1 -1
- package/dist/library/src/install/source-fetch-github.d.ts.map +1 -1
- package/dist/library/src/local/library-dir.d.ts +22 -5
- package/dist/library/src/local/library-dir.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +8 -0
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/library/src/remote/rest-catalog-source.d.ts +3 -2
- package/dist/library/src/remote/rest-catalog-source.d.ts.map +1 -1
- package/dist/{library-publish-KKQ2ULLX.js → library-publish-XMRCKRNR.js} +59 -58
- package/dist/library-publish-XMRCKRNR.js.map +1 -0
- package/dist/model-endpoint/index.js +12 -12
- package/dist/model-endpoint/src/openai-chat.d.ts +7 -2
- package/dist/model-endpoint/src/openai-chat.d.ts.map +1 -1
- package/dist/model-endpoint/src/openai-shared.d.ts +8 -0
- package/dist/model-endpoint/src/openai-shared.d.ts.map +1 -1
- package/dist/model-endpoint/src/server.d.ts.map +1 -1
- package/dist/model-endpoint/src/types.d.ts +1 -1
- package/dist/model-endpoint/src/types.d.ts.map +1 -1
- package/dist/model-endpoint/src/usage-cost.d.ts +23 -0
- package/dist/model-endpoint/src/usage-cost.d.ts.map +1 -0
- package/dist/open-library-XBR46DJL.js +56 -0
- package/dist/{open-library-RJGJIW5H.js.map → open-library-XBR46DJL.js.map} +1 -1
- package/dist/open-registry-W562DCDL.js +32 -0
- package/dist/{open-registry-3QS3J7KO.js.map → open-registry-W562DCDL.js.map} +1 -1
- package/dist/paths-2AZXB3QL.js +22 -0
- package/dist/{paths-QAV4C3KX.js.map → paths-2AZXB3QL.js.map} +1 -1
- package/dist/plugin-store-36SIL4TV.js +23 -0
- package/dist/{plugin-store-MSH6GK6T.js.map → plugin-store-36SIL4TV.js.map} +1 -1
- package/dist/project-D7GN7WLS.js +86 -0
- package/dist/{project-HZW2MZPA.js.map → project-D7GN7WLS.js.map} +1 -1
- package/dist/resolver/index.js +10 -10
- package/dist/runner/index.js +40 -40
- package/dist/runner/src/capability-roundtrip.d.ts +7 -6
- package/dist/runner/src/capability-roundtrip.d.ts.map +1 -1
- package/dist/runner/src/composition/content-source.d.ts.map +1 -1
- package/dist/runner/src/composition/errors.d.ts +16 -1
- package/dist/runner/src/composition/errors.d.ts.map +1 -1
- package/dist/runner/src/credential-notice.d.ts +3 -3
- package/dist/runner/src/credential-notice.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +20 -7
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +19 -19
- package/dist/sdk/bridge.js +19 -19
- package/dist/sdk/core.js +9 -9
- package/dist/sdk/flow.js +11 -11
- package/dist/sdk/index.js +40 -40
- package/dist/sdk/resolver.js +10 -10
- package/dist/sdk/runner.js +40 -40
- package/dist/sdk/transport/ws/server.js +10 -10
- package/dist/sdk/transport/ws.js +10 -10
- package/dist/sdk/transport.js +10 -10
- package/dist/serve-preflight-CGA5G3AE.js +135 -0
- package/dist/serve-preflight-CGA5G3AE.js.map +1 -0
- package/dist/{setup-AGYB4PKR.js → setup-IBDNJAOU.js} +32 -32
- package/dist/{setup-AGYB4PKR.js.map → setup-IBDNJAOU.js.map} +1 -1
- package/dist/skills-CTTO7SZK.js +26 -0
- package/dist/{skills-2LMQ2IAD.js.map → skills-CTTO7SZK.js.map} +1 -1
- package/dist/source-2DJ5KNOI.js +85 -0
- package/dist/{source-GBMYD3RO.js.map → source-2DJ5KNOI.js.map} +1 -1
- package/dist/source-fetch-github-RWHV4I5Z.js +4 -0
- package/dist/{source-fetch-github-ST4MFL3D.js.map → source-fetch-github-RWHV4I5Z.js.map} +1 -1
- package/dist/{source-manifest-publish-FK22TVQT.js → source-manifest-publish-IYWUMUCY.js} +55 -57
- package/dist/source-manifest-publish-IYWUMUCY.js.map +1 -0
- package/dist/transport/index.js +10 -10
- package/dist/transport/ws/server.js +10 -10
- package/dist/transport/ws.js +10 -10
- package/dist/tui/index.js +48 -41
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/src/repl.d.ts.map +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/install-manifest.d.ts +1 -1
- package/dist/types/src/install-manifest.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/scaffold-body.d.ts +2 -0
- package/dist/types/src/manifests/scaffold-body.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +30 -30
- package/dist/workspace-plugin/adapters/omp.js +15 -15
- package/dist/workspace-plugin/index.js +2 -2
- package/package.json +1 -1
- package/dist/asset-feeds-PXUWCXVI.js.map +0 -1
- package/dist/chunk-3JKGY2YC.js.map +0 -1
- package/dist/chunk-4DWBSTYA.js.map +0 -1
- package/dist/chunk-4XWLB7JB.js.map +0 -1
- package/dist/chunk-7XSAW5OC.js.map +0 -1
- package/dist/chunk-BFMYYNDT.js.map +0 -1
- package/dist/chunk-DUMTLYSO.js.map +0 -1
- package/dist/chunk-E3GPGTW3.js.map +0 -1
- package/dist/chunk-E572OHGY.js.map +0 -1
- package/dist/chunk-F2GOZMRA.js.map +0 -1
- package/dist/chunk-GOCWM7FN.js.map +0 -1
- package/dist/chunk-HK7HMEPT.js.map +0 -1
- package/dist/chunk-KX2PT5Q4.js.map +0 -1
- package/dist/chunk-L4YKW5AY.js.map +0 -1
- package/dist/chunk-LSI2IVFT.js.map +0 -1
- package/dist/chunk-NMI2TWMH.js.map +0 -1
- package/dist/chunk-OAHVKSQJ.js.map +0 -1
- package/dist/chunk-OHNKYHRR.js.map +0 -1
- package/dist/chunk-OTIB4D2K.js.map +0 -1
- package/dist/chunk-PUK7TQT4.js +0 -13
- package/dist/chunk-PUK7TQT4.js.map +0 -1
- package/dist/chunk-QOM5Z62G.js.map +0 -1
- package/dist/chunk-SNEE6UGY.js.map +0 -1
- package/dist/chunk-T2BDID2J.js.map +0 -1
- package/dist/chunk-TKHJXPSB.js.map +0 -1
- package/dist/chunk-UL22SDGR.js.map +0 -1
- package/dist/chunk-VJRTDKXS.js.map +0 -1
- package/dist/chunk-WEH33JSG.js.map +0 -1
- package/dist/chunk-WYHQUCHR.js.map +0 -1
- package/dist/chunk-X3RMRJNR.js.map +0 -1
- package/dist/chunk-XFIEVEU7.js.map +0 -1
- package/dist/chunk-YGRZNFRO.js.map +0 -1
- package/dist/chunk-Z7ZEZZB6.js.map +0 -1
- package/dist/connectors-CXZLXAFZ.js +0 -48
- package/dist/ensure-sources-UPTHZKGF.js.map +0 -1
- package/dist/flows-TJQIMGUX.js +0 -26
- package/dist/helpers-DE53KG3E.js +0 -38
- package/dist/library-publish-KKQ2ULLX.js.map +0 -1
- package/dist/open-library-RJGJIW5H.js +0 -42
- package/dist/open-registry-3QS3J7KO.js +0 -32
- package/dist/paths-QAV4C3KX.js +0 -22
- package/dist/plugin-store-MSH6GK6T.js +0 -23
- package/dist/project-HZW2MZPA.js +0 -84
- package/dist/serve-preflight-L4POEHNQ.js +0 -108
- package/dist/serve-preflight-L4POEHNQ.js.map +0 -1
- package/dist/skills-2LMQ2IAD.js +0 -26
- package/dist/source-GBMYD3RO.js +0 -85
- package/dist/source-fetch-github-ST4MFL3D.js +0 -4
- package/dist/source-manifest-publish-FK22TVQT.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { readManifestSourceConfig, discoverAssetsInTree, barePublisher, createDefaultKindRegistry, sharesItsFolder, SEMVER_RE, invalidSemverMessage, parseManifestFile } 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, priorStoreManifestSlugs, resolveSourcePublisher } from './chunk-
|
|
1
|
+
import { readManifestSourceConfig, discoverAssetsInTree, barePublisher, createDefaultKindRegistry, sharesItsFolder, SEMVER_RE, invalidSemverMessage, parseManifestFile } from './chunk-MAZ3UXJK.js';
|
|
2
|
+
import { installFromManifest, assertSafeManifestPath } from './chunk-E5NQRHEB.js';
|
|
3
|
+
import { PresetManifestSchema } from './chunk-76FLBODK.js';
|
|
4
|
+
import { defaultLibraryDir, resolveLibraryDir, GLOBAL_INSTALL_DIR_NAME, readLock, buildLibraryLockEntries, writeLock, mergeLockFile, buildLockFile, ManifestYamlEditor } from './chunk-BRK5QZKI.js';
|
|
5
|
+
import { getGlobalCacheDir, storeManifestSlug, priorStoreManifestSlugs, resolveSourcePublisher } from './chunk-KJSC2ZD6.js';
|
|
6
6
|
import { userConfigPath, globalSkaileDir, mergeLegacyEntriesInto, migrateLegacyDir, globalCacheRoot } from './chunk-L5VSIPQD.js';
|
|
7
|
-
import { encodeSkaileManifest, expandManifestFiles, SKAILE_MANIFEST_FILENAME, librarySymlinkMessage, loadSkPublishManifest } from './chunk-
|
|
8
|
-
import { scanDirectory } from './chunk-
|
|
9
|
-
import { parseAssetRef, assetRefToStr, isValidAssetName } from './chunk-
|
|
7
|
+
import { encodeSkaileManifest, expandManifestFiles, SKAILE_MANIFEST_FILENAME, librarySymlinkMessage, loadSkPublishManifest } from './chunk-KPKGWXUJ.js';
|
|
8
|
+
import { scanDirectory } from './chunk-JMIKGAUA.js';
|
|
9
|
+
import { parseAssetRef, assetRefToStr, isValidAssetName } from './chunk-IZQOO6MN.js';
|
|
10
10
|
import { __export } from './chunk-NSBPE2FW.js';
|
|
11
|
-
import * as
|
|
11
|
+
import * as fs12 from 'fs';
|
|
12
12
|
import { existsSync, mkdirSync, symlinkSync, copyFileSync, cpSync } from 'fs';
|
|
13
13
|
import * as path16 from 'path';
|
|
14
14
|
import { resolve, relative, sep, join, dirname } from 'path';
|
|
@@ -121,9 +121,9 @@ function projectConfigPath(projectDir) {
|
|
|
121
121
|
return path16.join(projectDir, ".skaile", CONFIG_FILENAME);
|
|
122
122
|
}
|
|
123
123
|
function loadConfigFile(filePath) {
|
|
124
|
-
if (!
|
|
124
|
+
if (!fs12.existsSync(filePath)) return null;
|
|
125
125
|
try {
|
|
126
|
-
const content =
|
|
126
|
+
const content = fs12.readFileSync(filePath, "utf-8");
|
|
127
127
|
const raw = parse(content);
|
|
128
128
|
if (!raw || typeof raw !== "object") return null;
|
|
129
129
|
return SkaileConfigSchema.partial().parse(raw);
|
|
@@ -172,10 +172,10 @@ function resolveConfig(opts) {
|
|
|
172
172
|
}
|
|
173
173
|
function saveConfig(filePath, config) {
|
|
174
174
|
const dir = path16.dirname(filePath);
|
|
175
|
-
if (!
|
|
176
|
-
|
|
175
|
+
if (!fs12.existsSync(dir)) {
|
|
176
|
+
fs12.mkdirSync(dir, { recursive: true });
|
|
177
177
|
}
|
|
178
|
-
|
|
178
|
+
fs12.writeFileSync(filePath, stringify(config, { indent: 2 }), "utf-8");
|
|
179
179
|
}
|
|
180
180
|
var KnowledgeManifestSchema = z3.looseObject({
|
|
181
181
|
name: z3.string().optional(),
|
|
@@ -202,9 +202,9 @@ function validateKnowledge(data) {
|
|
|
202
202
|
// library/src/knowledge/knowledge-kind-provider.ts
|
|
203
203
|
function collectDirRecursive(baseDir, relativeDir) {
|
|
204
204
|
const full = path16.join(baseDir, relativeDir);
|
|
205
|
-
if (!
|
|
205
|
+
if (!fs12.existsSync(full) || !fs12.statSync(full).isDirectory()) return [];
|
|
206
206
|
const results = [];
|
|
207
|
-
for (const entry of
|
|
207
|
+
for (const entry of fs12.readdirSync(full, { withFileTypes: true })) {
|
|
208
208
|
const rel = path16.posix.join(relativeDir, entry.name);
|
|
209
209
|
if (entry.isDirectory()) {
|
|
210
210
|
results.push(...collectDirRecursive(baseDir, rel));
|
|
@@ -312,7 +312,7 @@ var assignments = sqliteTable("assignments", {
|
|
|
312
312
|
assignedAt: text("assigned_at").notNull()
|
|
313
313
|
});
|
|
314
314
|
function isClone(dir) {
|
|
315
|
-
return
|
|
315
|
+
return fs12.existsSync(path16.join(dir, ".git"));
|
|
316
316
|
}
|
|
317
317
|
function getSidecarRoot() {
|
|
318
318
|
const home = globalSkaileDir();
|
|
@@ -346,9 +346,9 @@ function deriveSlug(sourceConfig, sourcePath, existingSlugs) {
|
|
|
346
346
|
}
|
|
347
347
|
function listSidecarSlugsOnDisk() {
|
|
348
348
|
const root = getSidecarRoot();
|
|
349
|
-
if (!
|
|
349
|
+
if (!fs12.existsSync(root)) return [];
|
|
350
350
|
const out = [];
|
|
351
|
-
for (const entry of
|
|
351
|
+
for (const entry of fs12.readdirSync(root, { withFileTypes: true })) {
|
|
352
352
|
if (!entry.isDirectory()) continue;
|
|
353
353
|
if (entry.name.startsWith(".")) continue;
|
|
354
354
|
out.push(entry.name);
|
|
@@ -369,16 +369,16 @@ function getStoreManifestsDir() {
|
|
|
369
369
|
function storeManifestFile(sourceUrl) {
|
|
370
370
|
const dir = getStoreManifestsDir();
|
|
371
371
|
const current = path16.join(dir, `${storeManifestSlug(sourceUrl)}.yaml`);
|
|
372
|
-
if (
|
|
372
|
+
if (fs12.existsSync(current)) return current;
|
|
373
373
|
for (const slug of priorStoreManifestSlugs(sourceUrl)) {
|
|
374
374
|
const old = path16.join(dir, `${slug}.yaml`);
|
|
375
|
-
if (
|
|
375
|
+
if (fs12.existsSync(old)) return old;
|
|
376
376
|
}
|
|
377
377
|
return current;
|
|
378
378
|
}
|
|
379
379
|
function curatedManifestOverlay(sourceUrl) {
|
|
380
380
|
const file = storeManifestFile(sourceUrl);
|
|
381
|
-
return
|
|
381
|
+
return fs12.existsSync(file) ? file : void 0;
|
|
382
382
|
}
|
|
383
383
|
function commitStoreManifest(file, message) {
|
|
384
384
|
const root = getStoreRoot();
|
|
@@ -410,14 +410,14 @@ function migratedMarkerPath() {
|
|
|
410
410
|
}
|
|
411
411
|
function collectSidecarMigrationCandidates(sidecarRoot) {
|
|
412
412
|
const candidates = [];
|
|
413
|
-
if (
|
|
414
|
-
for (const entry of
|
|
413
|
+
if (fs12.existsSync(sidecarRoot)) {
|
|
414
|
+
for (const entry of fs12.readdirSync(sidecarRoot, { withFileTypes: true })) {
|
|
415
415
|
if (!entry.isDirectory()) continue;
|
|
416
416
|
if (entry.name.startsWith(".")) continue;
|
|
417
417
|
const sidecarDir = path16.join(sidecarRoot, entry.name);
|
|
418
418
|
const current = path16.join(sidecarDir, "skaile.manifest.yaml");
|
|
419
419
|
const legacy = path16.join(sidecarDir, ".skaile-source.yaml");
|
|
420
|
-
const src =
|
|
420
|
+
const src = fs12.existsSync(current) ? current : fs12.existsSync(legacy) ? legacy : void 0;
|
|
421
421
|
if (src) candidates.push({ src, slug: entry.name });
|
|
422
422
|
}
|
|
423
423
|
}
|
|
@@ -427,9 +427,9 @@ function moveSidecarManifests(candidates, manifestsDir) {
|
|
|
427
427
|
let migrated = 0;
|
|
428
428
|
for (const { src, slug } of candidates) {
|
|
429
429
|
const dest = path16.join(manifestsDir, `${slug}.yaml`);
|
|
430
|
-
if (
|
|
430
|
+
if (fs12.existsSync(dest)) continue;
|
|
431
431
|
try {
|
|
432
|
-
|
|
432
|
+
fs12.renameSync(src, dest);
|
|
433
433
|
migrated++;
|
|
434
434
|
} catch (err) {
|
|
435
435
|
process.stderr.write(
|
|
@@ -441,10 +441,10 @@ function moveSidecarManifests(candidates, manifestsDir) {
|
|
|
441
441
|
return migrated;
|
|
442
442
|
}
|
|
443
443
|
function initStoreGitRepo(storeRoot) {
|
|
444
|
-
if (
|
|
444
|
+
if (fs12.existsSync(path16.join(storeRoot, ".git"))) return;
|
|
445
445
|
try {
|
|
446
446
|
spawnSync("git", ["init", "--quiet"], { cwd: storeRoot, stdio: "ignore" });
|
|
447
|
-
|
|
447
|
+
fs12.writeFileSync(
|
|
448
448
|
path16.join(storeRoot, ".gitignore"),
|
|
449
449
|
"# Remote-store cache \u2014 local to this machine.\nremote-cache/\n",
|
|
450
450
|
"utf8"
|
|
@@ -455,14 +455,14 @@ function initStoreGitRepo(storeRoot) {
|
|
|
455
455
|
function migrateSidecarsToStoreIfNeeded() {
|
|
456
456
|
const storeRoot = getStoreRoot();
|
|
457
457
|
const marker = migratedMarkerPath();
|
|
458
|
-
if (
|
|
458
|
+
if (fs12.existsSync(marker)) return { migrated: 0, storeRoot };
|
|
459
459
|
const sidecarRoot = getSidecarRoot();
|
|
460
460
|
const manifestsDir = getStoreManifestsDir();
|
|
461
461
|
const candidates = collectSidecarMigrationCandidates(sidecarRoot);
|
|
462
|
-
|
|
462
|
+
fs12.mkdirSync(manifestsDir, { recursive: true });
|
|
463
463
|
const migrated = moveSidecarManifests(candidates, manifestsDir);
|
|
464
464
|
initStoreGitRepo(storeRoot);
|
|
465
|
-
|
|
465
|
+
fs12.writeFileSync(marker, (/* @__PURE__ */ new Date()).toISOString(), "utf8");
|
|
466
466
|
return { migrated, storeRoot };
|
|
467
467
|
}
|
|
468
468
|
|
|
@@ -707,7 +707,7 @@ async function purgeOrphanedAssetDefinitions(client) {
|
|
|
707
707
|
await client.execute(`PRAGMA user_version = ${ORPHAN_PURGE_VERSION}`);
|
|
708
708
|
}
|
|
709
709
|
function assertNoLegacyLibDb(newDbPath) {
|
|
710
|
-
if (
|
|
710
|
+
if (fs12.existsSync(newDbPath)) return;
|
|
711
711
|
const parent = path16.dirname(newDbPath);
|
|
712
712
|
const skaileHome = globalSkaileDir();
|
|
713
713
|
const defaultIndexPath2 = path16.join(skaileHome, "index.db");
|
|
@@ -723,7 +723,7 @@ function assertNoLegacyLibDb(newDbPath) {
|
|
|
723
723
|
candidates.push(path16.join(path16.dirname(parent), "library", "lib.db"));
|
|
724
724
|
}
|
|
725
725
|
for (const legacy of candidates) {
|
|
726
|
-
if (!
|
|
726
|
+
if (!fs12.existsSync(legacy)) continue;
|
|
727
727
|
throw new Error(
|
|
728
728
|
`Found legacy index database at ${legacy}. The lib.db \u2192 index.db relocation ran for one release and has been removed. Move the file manually to ${newDbPath} (and any -wal / -shm siblings), then retry.`
|
|
729
729
|
);
|
|
@@ -898,12 +898,12 @@ var LocalIndex = class {
|
|
|
898
898
|
dbPath = resolveIndexPath();
|
|
899
899
|
this._kindRegistry = optionsOrDir?.kindRegistry;
|
|
900
900
|
}
|
|
901
|
-
if (!
|
|
902
|
-
|
|
901
|
+
if (!fs12.existsSync(dir)) {
|
|
902
|
+
fs12.mkdirSync(dir, { recursive: true });
|
|
903
903
|
}
|
|
904
904
|
const dbParent = path16.dirname(dbPath);
|
|
905
|
-
if (!
|
|
906
|
-
|
|
905
|
+
if (!fs12.existsSync(dbParent)) {
|
|
906
|
+
fs12.mkdirSync(dbParent, { recursive: true });
|
|
907
907
|
}
|
|
908
908
|
this.libraryDir = dir;
|
|
909
909
|
this.dbPath = dbPath;
|
|
@@ -1250,17 +1250,20 @@ var LocalIndex = class {
|
|
|
1250
1250
|
var UNREGISTERED_FILE = ".unregistered-libraries";
|
|
1251
1251
|
function libraryDirMissing(lib) {
|
|
1252
1252
|
try {
|
|
1253
|
-
return !
|
|
1253
|
+
return !fs12.statSync(lib.path).isDirectory();
|
|
1254
1254
|
} catch {
|
|
1255
1255
|
return true;
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
1258
|
function missingLibraryDirMessage(lib) {
|
|
1259
|
-
|
|
1259
|
+
const cfg = lib.backendConfig;
|
|
1260
|
+
const cloneUrl = lib.ownership === "reader" && cfg && typeof cfg === "object" && "url" in cfg ? String(cfg.url) : void 0;
|
|
1261
|
+
const head = `library "${lib.name}" is registered but its directory ${lib.path} is missing - `;
|
|
1262
|
+
return cloneUrl ? `${head}it is the clone of the source ${cloneUrl}: run skaile source sync in a project that declares it, or skaile library remove ${lib.name}` : `${head}run skaile library init ${lib.name} --path <dir> or skaile library remove ${lib.name}`;
|
|
1260
1263
|
}
|
|
1261
1264
|
function realDir(dir) {
|
|
1262
1265
|
try {
|
|
1263
|
-
return
|
|
1266
|
+
return fs12.realpathSync(dir);
|
|
1264
1267
|
} catch {
|
|
1265
1268
|
return path16.resolve(dir);
|
|
1266
1269
|
}
|
|
@@ -1268,7 +1271,7 @@ function realDir(dir) {
|
|
|
1268
1271
|
function unregisteredLibraryNames() {
|
|
1269
1272
|
try {
|
|
1270
1273
|
return new Set(
|
|
1271
|
-
|
|
1274
|
+
fs12.readFileSync(path16.join(resolveLibraryDir(), UNREGISTERED_FILE), "utf8").split("\n").map((l) => l.trim()).filter(Boolean)
|
|
1272
1275
|
);
|
|
1273
1276
|
} catch {
|
|
1274
1277
|
return /* @__PURE__ */ new Set();
|
|
@@ -1279,8 +1282,8 @@ function markLibraryUnregistered(lib) {
|
|
|
1279
1282
|
const known = unregisteredLibraryNames();
|
|
1280
1283
|
const add = [.../* @__PURE__ */ new Set([lib.name, path16.basename(lib.path)])].filter((n) => !known.has(n));
|
|
1281
1284
|
if (add.length === 0) return;
|
|
1282
|
-
|
|
1283
|
-
|
|
1285
|
+
fs12.mkdirSync(resolveLibraryDir(), { recursive: true });
|
|
1286
|
+
fs12.appendFileSync(
|
|
1284
1287
|
path16.join(resolveLibraryDir(), UNREGISTERED_FILE),
|
|
1285
1288
|
`${add.join("\n")}
|
|
1286
1289
|
`,
|
|
@@ -1297,62 +1300,80 @@ function clearLibraryUnregistered(lib) {
|
|
|
1297
1300
|
const keep = [...known].filter((n) => !drop.has(n));
|
|
1298
1301
|
if (keep.length === known.size) return;
|
|
1299
1302
|
const file = path16.join(resolveLibraryDir(), UNREGISTERED_FILE);
|
|
1300
|
-
if (keep.length === 0)
|
|
1301
|
-
else
|
|
1303
|
+
if (keep.length === 0) fs12.rmSync(file, { force: true });
|
|
1304
|
+
else fs12.writeFileSync(file, `${keep.join("\n")}
|
|
1302
1305
|
`, "utf8");
|
|
1303
1306
|
}
|
|
1304
1307
|
var RENAMED_FILE = ".renamed-libraries";
|
|
1305
|
-
function
|
|
1308
|
+
function readAllRenames() {
|
|
1306
1309
|
const out = /* @__PURE__ */ new Map();
|
|
1307
1310
|
try {
|
|
1308
|
-
for (const line of
|
|
1309
|
-
const [from, to] = line.split(" ").map((s) => s.trim());
|
|
1310
|
-
if (from && to && from !== to) out.set(from, to);
|
|
1311
|
+
for (const line of fs12.readFileSync(path16.join(resolveLibraryDir(), RENAMED_FILE), "utf8").split("\n")) {
|
|
1312
|
+
const [from, to, flag] = line.split(" ").map((s) => s.trim());
|
|
1313
|
+
if (from && to && from !== to) out.set(from, { to, gone: flag === "gone" });
|
|
1311
1314
|
}
|
|
1312
1315
|
} catch {
|
|
1313
1316
|
}
|
|
1314
1317
|
return out;
|
|
1315
1318
|
}
|
|
1316
|
-
function
|
|
1319
|
+
function writeAllRenames(renames) {
|
|
1317
1320
|
const file = path16.join(resolveLibraryDir(), RENAMED_FILE);
|
|
1318
1321
|
if (renames.size === 0) {
|
|
1319
|
-
|
|
1322
|
+
fs12.rmSync(file, { force: true });
|
|
1320
1323
|
return;
|
|
1321
1324
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1325
|
+
fs12.mkdirSync(resolveLibraryDir(), { recursive: true });
|
|
1326
|
+
fs12.writeFileSync(
|
|
1324
1327
|
file,
|
|
1325
|
-
`${[...renames].map(([from,
|
|
1328
|
+
`${[...renames].map(([from, r]) => `${from} ${r.to}${r.gone ? " gone" : ""}`).join("\n")}
|
|
1326
1329
|
`,
|
|
1327
1330
|
"utf8"
|
|
1328
1331
|
);
|
|
1329
1332
|
}
|
|
1330
1333
|
function recordLibraryRename(from, to) {
|
|
1331
1334
|
if (from === to) return;
|
|
1332
|
-
const renames =
|
|
1333
|
-
for (const [k,
|
|
1335
|
+
const renames = readAllRenames();
|
|
1336
|
+
for (const [k, r] of renames) if (r.to === from && !r.gone) renames.set(k, { to, gone: false });
|
|
1334
1337
|
renames.delete(to);
|
|
1335
|
-
renames.set(from, to);
|
|
1336
|
-
for (const [k,
|
|
1337
|
-
|
|
1338
|
+
renames.set(from, { to, gone: false });
|
|
1339
|
+
for (const [k, r] of renames) if (k === r.to) renames.delete(k);
|
|
1340
|
+
writeAllRenames(renames);
|
|
1338
1341
|
}
|
|
1339
1342
|
function renamedLibraryName(name) {
|
|
1340
|
-
|
|
1343
|
+
const r = readAllRenames().get(name);
|
|
1344
|
+
return r && !r.gone ? r.to : void 0;
|
|
1345
|
+
}
|
|
1346
|
+
function lastLibraryName(name) {
|
|
1347
|
+
const renames = readAllRenames();
|
|
1348
|
+
let at = name;
|
|
1349
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1350
|
+
for (let next = renames.get(at); next && !seen.has(at); next = renames.get(at)) {
|
|
1351
|
+
seen.add(at);
|
|
1352
|
+
at = next.to;
|
|
1353
|
+
}
|
|
1354
|
+
return at === name ? void 0 : at;
|
|
1341
1355
|
}
|
|
1342
1356
|
function clearLibraryRenamed(name) {
|
|
1343
|
-
const renames =
|
|
1344
|
-
|
|
1357
|
+
const renames = readAllRenames();
|
|
1358
|
+
let changed = renames.delete(name);
|
|
1359
|
+
for (const [from, r] of renames) {
|
|
1360
|
+
if (r.gone && r.to === name) {
|
|
1361
|
+
renames.delete(from);
|
|
1362
|
+
changed = true;
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
if (changed) writeAllRenames(renames);
|
|
1345
1366
|
}
|
|
1346
1367
|
function dropLibraryRenamesTo(name) {
|
|
1347
|
-
const renames =
|
|
1368
|
+
const renames = readAllRenames();
|
|
1348
1369
|
let changed = false;
|
|
1349
|
-
for (const [from,
|
|
1350
|
-
if (to === name) {
|
|
1351
|
-
renames.
|
|
1370
|
+
for (const [from, r] of renames) {
|
|
1371
|
+
if (r.to === name && !r.gone) {
|
|
1372
|
+
renames.set(from, { to: name, gone: true });
|
|
1352
1373
|
changed = true;
|
|
1353
1374
|
}
|
|
1354
1375
|
}
|
|
1355
|
-
if (changed)
|
|
1376
|
+
if (changed) writeAllRenames(renames);
|
|
1356
1377
|
}
|
|
1357
1378
|
|
|
1358
1379
|
// library/src/user-library.ts
|
|
@@ -1886,8 +1907,8 @@ var LibraryManager = class {
|
|
|
1886
1907
|
async removeLibrary(nameOrId, opts = {}) {
|
|
1887
1908
|
const lib = await this.requireLibrary(nameOrId);
|
|
1888
1909
|
await this.lib.removeSource(lib.id);
|
|
1889
|
-
if (opts.purge &&
|
|
1890
|
-
|
|
1910
|
+
if (opts.purge && fs12.existsSync(lib.path)) {
|
|
1911
|
+
fs12.rmSync(lib.path, { recursive: true, force: true });
|
|
1891
1912
|
}
|
|
1892
1913
|
dropLibraryRenamesTo(lib.name);
|
|
1893
1914
|
if (!opts.purge) markLibraryUnregistered(lib);
|
|
@@ -1906,7 +1927,7 @@ var LibraryManager = class {
|
|
|
1906
1927
|
);
|
|
1907
1928
|
if (writableDefault) return { library: writableDefault, created: false };
|
|
1908
1929
|
const personalPath = path16.join(librariesDir, "personal");
|
|
1909
|
-
|
|
1930
|
+
fs12.mkdirSync(personalPath, { recursive: true });
|
|
1910
1931
|
const lib = await this.addLibrary({
|
|
1911
1932
|
name: "personal",
|
|
1912
1933
|
path: personalPath,
|
|
@@ -2089,12 +2110,20 @@ var LocalCatalogSource = class {
|
|
|
2089
2110
|
}
|
|
2090
2111
|
const keepRefs = assets.map((a) => a.ref);
|
|
2091
2112
|
let pruned = [];
|
|
2092
|
-
if (!syncOpts?.only && result.assets.length > 0) {
|
|
2113
|
+
if (!syncOpts?.only && (result.assets.length > 0 || isReadableDirectory(this.rootPath))) {
|
|
2093
2114
|
pruned = await this.library.pruneAssetDefs(this.sourceId, keepRefs);
|
|
2094
2115
|
}
|
|
2095
2116
|
return { assetsFound: assets.length, assetsUpdated, errors, advisories, pruned };
|
|
2096
2117
|
}
|
|
2097
2118
|
};
|
|
2119
|
+
function isReadableDirectory(dir) {
|
|
2120
|
+
try {
|
|
2121
|
+
fs12.readdirSync(dir);
|
|
2122
|
+
return true;
|
|
2123
|
+
} catch {
|
|
2124
|
+
return false;
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2098
2127
|
function defToCatalogAsset(def) {
|
|
2099
2128
|
return {
|
|
2100
2129
|
id: def.id,
|
|
@@ -2231,11 +2260,11 @@ var SidecarGit = class {
|
|
|
2231
2260
|
* @docLink packages/library/concepts#sidecar-git
|
|
2232
2261
|
*/
|
|
2233
2262
|
async ensureInitialized() {
|
|
2234
|
-
if (!
|
|
2235
|
-
|
|
2263
|
+
if (!fs12.existsSync(this.rootDir)) {
|
|
2264
|
+
fs12.mkdirSync(this.rootDir, { recursive: true });
|
|
2236
2265
|
}
|
|
2237
2266
|
const gitDir = path16.join(this.rootDir, ".git");
|
|
2238
|
-
const freshRepo = !
|
|
2267
|
+
const freshRepo = !fs12.existsSync(gitDir);
|
|
2239
2268
|
if (freshRepo) {
|
|
2240
2269
|
const init = this.spawn(["init", "-b", "main"]);
|
|
2241
2270
|
if (init.exitCode !== 0) {
|
|
@@ -2243,9 +2272,9 @@ var SidecarGit = class {
|
|
|
2243
2272
|
}
|
|
2244
2273
|
}
|
|
2245
2274
|
const attrsPath = path16.join(this.rootDir, ".gitattributes");
|
|
2246
|
-
if (!
|
|
2275
|
+
if (!fs12.existsSync(attrsPath)) fs12.writeFileSync(attrsPath, GITATTRIBUTES, "utf-8");
|
|
2247
2276
|
const readmePath = path16.join(this.rootDir, "README.md");
|
|
2248
|
-
if (!
|
|
2277
|
+
if (!fs12.existsSync(readmePath)) fs12.writeFileSync(readmePath, ROOT_README, "utf-8");
|
|
2249
2278
|
if (!this.hasGlobalGitConfig("user.name")) {
|
|
2250
2279
|
this.spawn(["config", "user.name", FALLBACK_USER_NAME]);
|
|
2251
2280
|
}
|
|
@@ -2271,7 +2300,7 @@ var SidecarGit = class {
|
|
|
2271
2300
|
async commit(slug, message, opts) {
|
|
2272
2301
|
if (opts?.skip) return;
|
|
2273
2302
|
const slugDir = path16.join(this.rootDir, slug);
|
|
2274
|
-
if (
|
|
2303
|
+
if (fs12.existsSync(slugDir)) {
|
|
2275
2304
|
this.spawn(["add", "--", slug]);
|
|
2276
2305
|
} else {
|
|
2277
2306
|
this.spawn(["add", "-A"]);
|
|
@@ -2332,10 +2361,10 @@ ${result.stderr}`;
|
|
|
2332
2361
|
function migrateWorkspaceConfig(dir, opts) {
|
|
2333
2362
|
const filename = opts?.filename ?? "skaile.yaml";
|
|
2334
2363
|
const filePath = path16.join(dir, filename);
|
|
2335
|
-
if (!
|
|
2364
|
+
if (!fs12.existsSync(filePath)) {
|
|
2336
2365
|
return { migrated: false, version: 1, warnings: ["No skaile.yaml found"] };
|
|
2337
2366
|
}
|
|
2338
|
-
const content =
|
|
2367
|
+
const content = fs12.readFileSync(filePath, "utf-8");
|
|
2339
2368
|
const raw = parse(content);
|
|
2340
2369
|
if (!raw || typeof raw !== "object") {
|
|
2341
2370
|
return { migrated: false, version: 1, warnings: ["Invalid YAML content"] };
|
|
@@ -2367,7 +2396,7 @@ function migrateWorkspaceConfig(dir, opts) {
|
|
|
2367
2396
|
} else {
|
|
2368
2397
|
doc.set("version", 2);
|
|
2369
2398
|
}
|
|
2370
|
-
|
|
2399
|
+
fs12.writeFileSync(filePath, doc.toString(), "utf-8");
|
|
2371
2400
|
}
|
|
2372
2401
|
return {
|
|
2373
2402
|
migrated: !opts?.dryRun,
|
|
@@ -3261,17 +3290,17 @@ var CatalogCache = class {
|
|
|
3261
3290
|
/** Read a cached tarball from disk if present, otherwise `null`. */
|
|
3262
3291
|
readTarball(sha256) {
|
|
3263
3292
|
const p = this.tarballPath(sha256);
|
|
3264
|
-
if (!
|
|
3265
|
-
return
|
|
3293
|
+
if (!fs12.existsSync(p)) return null;
|
|
3294
|
+
return fs12.readFileSync(p);
|
|
3266
3295
|
}
|
|
3267
3296
|
/** Persist a tarball blob to disk (atomic write). */
|
|
3268
3297
|
writeTarball(sha256, bytes) {
|
|
3269
3298
|
const dir = path16.join(this.dir, TARBALL_DIR);
|
|
3270
|
-
if (!
|
|
3299
|
+
if (!fs12.existsSync(dir)) fs12.mkdirSync(dir, { recursive: true });
|
|
3271
3300
|
const finalPath = this.tarballPath(sha256);
|
|
3272
3301
|
const tmpPath = `${finalPath}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
3273
|
-
|
|
3274
|
-
|
|
3302
|
+
fs12.writeFileSync(tmpPath, bytes);
|
|
3303
|
+
fs12.renameSync(tmpPath, finalPath);
|
|
3275
3304
|
}
|
|
3276
3305
|
// ── public: invalidation ────────────────────────────────────────────────
|
|
3277
3306
|
/**
|
|
@@ -3291,8 +3320,8 @@ var CatalogCache = class {
|
|
|
3291
3320
|
invalidateEverything() {
|
|
3292
3321
|
this.invalidateAll();
|
|
3293
3322
|
const tarballDir = path16.join(this.dir, TARBALL_DIR);
|
|
3294
|
-
if (
|
|
3295
|
-
|
|
3323
|
+
if (fs12.existsSync(tarballDir)) {
|
|
3324
|
+
fs12.rmSync(tarballDir, { recursive: true, force: true });
|
|
3296
3325
|
}
|
|
3297
3326
|
}
|
|
3298
3327
|
/** Return whether `ttlMs` is zero (air-gapped mode). */
|
|
@@ -3301,9 +3330,9 @@ var CatalogCache = class {
|
|
|
3301
3330
|
}
|
|
3302
3331
|
// ── private ─────────────────────────────────────────────────────────────
|
|
3303
3332
|
ensureDir() {
|
|
3304
|
-
if (!
|
|
3333
|
+
if (!fs12.existsSync(this.dir)) fs12.mkdirSync(this.dir, { recursive: true });
|
|
3305
3334
|
const tarballDir = path16.join(this.dir, TARBALL_DIR);
|
|
3306
|
-
if (!
|
|
3335
|
+
if (!fs12.existsSync(tarballDir)) fs12.mkdirSync(tarballDir, { recursive: true });
|
|
3307
3336
|
}
|
|
3308
3337
|
indexPath() {
|
|
3309
3338
|
return path16.join(this.dir, INDEX_FILE);
|
|
@@ -3311,12 +3340,12 @@ var CatalogCache = class {
|
|
|
3311
3340
|
loadIndex() {
|
|
3312
3341
|
if (this.index) return this.index;
|
|
3313
3342
|
const p = this.indexPath();
|
|
3314
|
-
if (!
|
|
3343
|
+
if (!fs12.existsSync(p)) {
|
|
3315
3344
|
this.index = { version: 1, resolve: {}, list: {} };
|
|
3316
3345
|
return this.index;
|
|
3317
3346
|
}
|
|
3318
3347
|
try {
|
|
3319
|
-
const raw = JSON.parse(
|
|
3348
|
+
const raw = JSON.parse(fs12.readFileSync(p, "utf-8"));
|
|
3320
3349
|
if (raw && typeof raw === "object" && raw.version === 1) {
|
|
3321
3350
|
this.index = {
|
|
3322
3351
|
version: 1,
|
|
@@ -3334,8 +3363,8 @@ var CatalogCache = class {
|
|
|
3334
3363
|
this.index = idx;
|
|
3335
3364
|
const p = this.indexPath();
|
|
3336
3365
|
const tmp = `${p}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
3337
|
-
|
|
3338
|
-
|
|
3366
|
+
fs12.writeFileSync(tmp, JSON.stringify(idx, null, 2), "utf-8");
|
|
3367
|
+
fs12.renameSync(tmp, p);
|
|
3339
3368
|
}
|
|
3340
3369
|
};
|
|
3341
3370
|
function filterKey(filter) {
|
|
@@ -3489,6 +3518,21 @@ var RemoteCatalogSource = class {
|
|
|
3489
3518
|
(a) => (!filter.kind || a.kind === filter.kind) && (!filter.publisher || bare(a.publisher) === bare(filter.publisher)) && (!filter.prefix || `${bare(a.publisher)}/${a.name}`.startsWith(filter.prefix))
|
|
3490
3519
|
).map(cachedAsset);
|
|
3491
3520
|
}
|
|
3521
|
+
/**
|
|
3522
|
+
* `true` when the cached catalog (a resolved row or the cached list, fresh or stale) holds
|
|
3523
|
+
* `ref`. Never touches the network: `check` and `doctor` use it to tell a store-supplied
|
|
3524
|
+
* lock entry from one whose source is gone (p1062). Pass the locked ref with its version
|
|
3525
|
+
* (`kind:@pub/name#1.0.0`): `add` caches the row under the ref it asked for, so an
|
|
3526
|
+
* unversioned lookup alone misses it (p380).
|
|
3527
|
+
*/
|
|
3528
|
+
holdsCached(ref) {
|
|
3529
|
+
if (this.cache.getResolveStale(ref)?.value) return true;
|
|
3530
|
+
try {
|
|
3531
|
+
return this.cachedListedAsset(ref) !== null;
|
|
3532
|
+
} catch {
|
|
3533
|
+
return false;
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3492
3536
|
/**
|
|
3493
3537
|
* Fetch `ref` from the store, bypassing the resolve cache, and cache the answer.
|
|
3494
3538
|
* For a caller that knows the cached answer is wrong, e.g. a cached miss for an
|
|
@@ -4103,8 +4147,9 @@ var RestCatalogSource = class {
|
|
|
4103
4147
|
}
|
|
4104
4148
|
// ── extension API ───────────────────────────────────────────────────────
|
|
4105
4149
|
/**
|
|
4106
|
-
* Force a metadata-cache refresh.
|
|
4107
|
-
*
|
|
4150
|
+
* Force a metadata-cache refresh. Re-fetches `listAssets()` (no filter), then wipes all
|
|
4151
|
+
* resolve/list entries and stores the fresh list. When the fetch fails the old entries stay,
|
|
4152
|
+
* so a failed `skaile update` keeps the warm cache for offline reads (p960).
|
|
4108
4153
|
*
|
|
4109
4154
|
* Driven by `skaile update`. Tarballs (content-addressed) are not touched.
|
|
4110
4155
|
*
|
|
@@ -4115,7 +4160,6 @@ var RestCatalogSource = class {
|
|
|
4115
4160
|
* error then reads `no answer from <url> within <n> s`.
|
|
4116
4161
|
*/
|
|
4117
4162
|
async refresh(opts) {
|
|
4118
|
-
this.cache.invalidateAll();
|
|
4119
4163
|
let items;
|
|
4120
4164
|
try {
|
|
4121
4165
|
items = await this.fetchListNetwork(void 0, opts?.timeoutMs);
|
|
@@ -4126,6 +4170,7 @@ var RestCatalogSource = class {
|
|
|
4126
4170
|
}
|
|
4127
4171
|
throw err;
|
|
4128
4172
|
}
|
|
4173
|
+
this.cache.invalidateAll();
|
|
4129
4174
|
this.cache.setList(void 0, items);
|
|
4130
4175
|
for (const item of items) {
|
|
4131
4176
|
this.cache.setResolve(item.id, item);
|
|
@@ -4314,15 +4359,15 @@ function discoveredToAssetEntry(asset, repoPublisher, inheritPublisher) {
|
|
|
4314
4359
|
}
|
|
4315
4360
|
function writeCuratedManifest(input) {
|
|
4316
4361
|
const manifestPath = input.manifestFile;
|
|
4317
|
-
if (
|
|
4362
|
+
if (fs12.existsSync(manifestPath) && !input.force) {
|
|
4318
4363
|
return { wrote: false, manifestPath, assetCount: 0 };
|
|
4319
4364
|
}
|
|
4320
4365
|
const publisher = input.publisher.startsWith("@") ? input.publisher.slice(1) : input.publisher;
|
|
4321
4366
|
const inheritPublisher = input.inheritPublisher ?? false;
|
|
4322
4367
|
const assets = input.assets.map((a) => discoveredToAssetEntry(a, publisher, inheritPublisher)).sort((a, b) => `${a.kind}:${a.name}`.localeCompare(`${b.kind}:${b.name}`));
|
|
4323
4368
|
const manifest = { publisher, assets };
|
|
4324
|
-
|
|
4325
|
-
|
|
4369
|
+
fs12.mkdirSync(path16.dirname(manifestPath), { recursive: true });
|
|
4370
|
+
fs12.writeFileSync(manifestPath, encodeSkaileManifest(manifest), "utf-8");
|
|
4326
4371
|
return { wrote: true, manifestPath, assetCount: assets.length };
|
|
4327
4372
|
}
|
|
4328
4373
|
function filesEntryPaths(libraryPath, entry) {
|
|
@@ -4336,8 +4381,8 @@ var DEFAULT_ASSET_VERSION = "0.1.0";
|
|
|
4336
4381
|
function openManifest(libraryPath) {
|
|
4337
4382
|
const dir = path16.resolve(libraryPath);
|
|
4338
4383
|
const file = path16.join(dir, SKAILE_MANIFEST_FILENAME);
|
|
4339
|
-
if (!
|
|
4340
|
-
|
|
4384
|
+
if (!fs12.existsSync(file)) {
|
|
4385
|
+
fs12.mkdirSync(dir, { recursive: true });
|
|
4341
4386
|
return { editor: ManifestYamlEditor.create(file), created: true };
|
|
4342
4387
|
}
|
|
4343
4388
|
const editor = ManifestYamlEditor.load(file);
|
|
@@ -4347,14 +4392,14 @@ function openManifest(libraryPath) {
|
|
|
4347
4392
|
}
|
|
4348
4393
|
function assertManifestEditable(libraryPath) {
|
|
4349
4394
|
const file = path16.join(path16.resolve(libraryPath), SKAILE_MANIFEST_FILENAME);
|
|
4350
|
-
if (!
|
|
4395
|
+
if (!fs12.existsSync(file)) return;
|
|
4351
4396
|
openManifest(libraryPath);
|
|
4352
4397
|
}
|
|
4353
4398
|
function assetRootProblem(libraryPath, root) {
|
|
4354
4399
|
const libDir = path16.resolve(libraryPath);
|
|
4355
4400
|
let realLib;
|
|
4356
4401
|
try {
|
|
4357
|
-
realLib =
|
|
4402
|
+
realLib = fs12.realpathSync(libDir);
|
|
4358
4403
|
} catch {
|
|
4359
4404
|
return void 0;
|
|
4360
4405
|
}
|
|
@@ -4373,12 +4418,12 @@ function assetRootProblem(libraryPath, root) {
|
|
|
4373
4418
|
walked.push(part);
|
|
4374
4419
|
let stat;
|
|
4375
4420
|
try {
|
|
4376
|
-
stat =
|
|
4421
|
+
stat = fs12.lstatSync(current);
|
|
4377
4422
|
} catch {
|
|
4378
4423
|
return void 0;
|
|
4379
4424
|
}
|
|
4380
4425
|
if (stat.isSymbolicLink()) {
|
|
4381
|
-
return librarySymlinkMessage({ path: walked.join("/"), target:
|
|
4426
|
+
return librarySymlinkMessage({ path: walked.join("/"), target: fs12.readlinkSync(current) });
|
|
4382
4427
|
}
|
|
4383
4428
|
}
|
|
4384
4429
|
return void 0;
|
|
@@ -4393,7 +4438,7 @@ function existingRootConflict(libraryPath, existing, root) {
|
|
|
4393
4438
|
if (!existing?.root || existing.source) return void 0;
|
|
4394
4439
|
const existingAbs = path16.resolve(libraryPath, existing.root);
|
|
4395
4440
|
if (existingAbs === path16.resolve(libraryPath, root)) return void 0;
|
|
4396
|
-
const stat =
|
|
4441
|
+
const stat = fs12.statSync(existingAbs, { throwIfNoEntry: false });
|
|
4397
4442
|
return stat?.isDirectory() ? existing.root : void 0;
|
|
4398
4443
|
}
|
|
4399
4444
|
function upsertManifestAsset(libraryPath, input) {
|
|
@@ -4429,7 +4474,7 @@ function missingRootAssets(libraryPath, manifest) {
|
|
|
4429
4474
|
return (manifest.assets ?? []).filter((a) => {
|
|
4430
4475
|
if (a.source || manifest.source || !a.root) return false;
|
|
4431
4476
|
const dir = path16.resolve(libraryPath, a.root);
|
|
4432
|
-
return !(
|
|
4477
|
+
return !(fs12.existsSync(dir) && fs12.statSync(dir).isDirectory());
|
|
4433
4478
|
});
|
|
4434
4479
|
}
|
|
4435
4480
|
function pruneMissingRootAssets(libraryPath) {
|
|
@@ -4484,6 +4529,7 @@ function reconcileEntryNames(libraryPath, scanned, refused) {
|
|
|
4484
4529
|
const holders = parsable.filter(
|
|
4485
4530
|
(s) => s.kind === entry.kind && path16.resolve(path16.dirname(s.source)) === dir
|
|
4486
4531
|
);
|
|
4532
|
+
if (holders.some((s) => declaresInvalidName(s.source, s.kind))) continue;
|
|
4487
4533
|
if (holders.length === 0) {
|
|
4488
4534
|
const renamedAway = refused.some(
|
|
4489
4535
|
(s) => s.kind === entry.kind && s.name !== entry.name && path16.resolve(path16.dirname(s.source)) === dir
|
|
@@ -4562,6 +4608,16 @@ async function syncManifestWithDisk(libraryPath, defaultPublisher, registry, opt
|
|
|
4562
4608
|
});
|
|
4563
4609
|
continue;
|
|
4564
4610
|
}
|
|
4611
|
+
if (declaresInvalidName(e.source, e.kind)) {
|
|
4612
|
+
failed.push({
|
|
4613
|
+
kind: e.kind,
|
|
4614
|
+
name: e.name,
|
|
4615
|
+
file: path16.relative(libraryPath, e.source),
|
|
4616
|
+
findings: opts.check?.(e) ?? [],
|
|
4617
|
+
inManifest: false
|
|
4618
|
+
});
|
|
4619
|
+
continue;
|
|
4620
|
+
}
|
|
4565
4621
|
if (e.version && !SEMVER_RE.test(e.version)) {
|
|
4566
4622
|
skipped.push({
|
|
4567
4623
|
kind: e.kind,
|
|
@@ -4663,19 +4719,30 @@ async function unparsableAssetFiles(libraryPath, registry) {
|
|
|
4663
4719
|
}
|
|
4664
4720
|
function isParsable(file) {
|
|
4665
4721
|
try {
|
|
4666
|
-
return parseManifestFile(file,
|
|
4722
|
+
return parseManifestFile(file, fs12.readFileSync(file, "utf-8")).ok;
|
|
4667
4723
|
} catch {
|
|
4668
4724
|
return false;
|
|
4669
4725
|
}
|
|
4670
4726
|
}
|
|
4671
4727
|
function parseFailureOf(file) {
|
|
4672
4728
|
try {
|
|
4673
|
-
const res = parseManifestFile(file,
|
|
4729
|
+
const res = parseManifestFile(file, fs12.readFileSync(file, "utf-8"));
|
|
4674
4730
|
return res.ok ? void 0 : res.reason;
|
|
4675
4731
|
} catch (err) {
|
|
4676
4732
|
return err instanceof Error ? err.message : String(err);
|
|
4677
4733
|
}
|
|
4678
4734
|
}
|
|
4735
|
+
function declaresInvalidName(file, kind) {
|
|
4736
|
+
try {
|
|
4737
|
+
const res = parseManifestFile(file, fs12.readFileSync(file, "utf-8"));
|
|
4738
|
+
if (!res.ok) return false;
|
|
4739
|
+
const declared = kind === "flow" ? res.data.id : res.data.name;
|
|
4740
|
+
if (declared === void 0 || declared === null || declared === "") return false;
|
|
4741
|
+
return typeof declared !== "string" || !isValidAssetName(declared);
|
|
4742
|
+
} catch {
|
|
4743
|
+
return false;
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4679
4746
|
var PinPolicySchema = z3.enum(PIN_POLICIES);
|
|
4680
4747
|
var LibraryInstanceRefSchema = z3.object({
|
|
4681
4748
|
id: z3.string().uuid(),
|
|
@@ -4729,8 +4796,8 @@ function parseWorkspaceV2(raw) {
|
|
|
4729
4796
|
}
|
|
4730
4797
|
function loadWorkspaceV2(dir, filename = "skaile.yaml") {
|
|
4731
4798
|
const filePath = path16.join(dir, filename);
|
|
4732
|
-
if (!
|
|
4733
|
-
const content =
|
|
4799
|
+
if (!fs12.existsSync(filePath)) return null;
|
|
4800
|
+
const content = fs12.readFileSync(filePath, "utf-8");
|
|
4734
4801
|
const raw = parse(content);
|
|
4735
4802
|
if (!raw || typeof raw !== "object") return null;
|
|
4736
4803
|
return parseWorkspaceV2(raw);
|
|
@@ -4738,23 +4805,23 @@ function loadWorkspaceV2(dir, filename = "skaile.yaml") {
|
|
|
4738
4805
|
function saveWorkspaceV2(dir, v2, filename = "skaile.yaml") {
|
|
4739
4806
|
const filePath = path16.join(dir, filename);
|
|
4740
4807
|
let existing = {};
|
|
4741
|
-
if (
|
|
4742
|
-
const content =
|
|
4808
|
+
if (fs12.existsSync(filePath)) {
|
|
4809
|
+
const content = fs12.readFileSync(filePath, "utf-8");
|
|
4743
4810
|
existing = parse(content) ?? {};
|
|
4744
4811
|
}
|
|
4745
4812
|
existing.version = 2;
|
|
4746
4813
|
if (v2.library !== void 0) existing.library = v2.library;
|
|
4747
4814
|
if (v2.presets_applied !== void 0) existing.presets_applied = v2.presets_applied;
|
|
4748
|
-
if (!
|
|
4749
|
-
|
|
4815
|
+
if (!fs12.existsSync(dir)) {
|
|
4816
|
+
fs12.mkdirSync(dir, { recursive: true });
|
|
4750
4817
|
}
|
|
4751
|
-
|
|
4818
|
+
fs12.writeFileSync(filePath, stringify(existing, { indent: 2 }), "utf-8");
|
|
4752
4819
|
}
|
|
4753
4820
|
var LOCK_FILENAME = "skaile.lock.yaml";
|
|
4754
4821
|
function loadLockFile(dir) {
|
|
4755
4822
|
const filePath = path16.join(dir, LOCK_FILENAME);
|
|
4756
|
-
if (!
|
|
4757
|
-
const content =
|
|
4823
|
+
if (!fs12.existsSync(filePath)) return null;
|
|
4824
|
+
const content = fs12.readFileSync(filePath, "utf-8");
|
|
4758
4825
|
const raw = parse(content);
|
|
4759
4826
|
if (raw !== null && !("assignments" in raw) && "subscriptions" in raw) {
|
|
4760
4827
|
const legacySubs = raw.subscriptions;
|
|
@@ -4771,10 +4838,10 @@ function loadLockFile(dir) {
|
|
|
4771
4838
|
}
|
|
4772
4839
|
function saveLockFile(dir, lock) {
|
|
4773
4840
|
const filePath = path16.join(dir, LOCK_FILENAME);
|
|
4774
|
-
if (!
|
|
4775
|
-
|
|
4841
|
+
if (!fs12.existsSync(dir)) {
|
|
4842
|
+
fs12.mkdirSync(dir, { recursive: true });
|
|
4776
4843
|
}
|
|
4777
|
-
|
|
4844
|
+
fs12.writeFileSync(
|
|
4778
4845
|
filePath,
|
|
4779
4846
|
`# Auto-generated by skaile. Do not edit manually.
|
|
4780
4847
|
${stringify(lock, { indent: 2 })}`,
|
|
@@ -4792,13 +4859,13 @@ function createEmptyLockFile() {
|
|
|
4792
4859
|
}
|
|
4793
4860
|
function detectWorkspaceVersion(dir, filename = "skaile.yaml") {
|
|
4794
4861
|
const filePath = path16.join(dir, filename);
|
|
4795
|
-
if (!
|
|
4796
|
-
const content =
|
|
4862
|
+
if (!fs12.existsSync(filePath)) return null;
|
|
4863
|
+
const content = fs12.readFileSync(filePath, "utf-8");
|
|
4797
4864
|
const raw = parse(content);
|
|
4798
4865
|
if (!raw || typeof raw !== "object") return null;
|
|
4799
4866
|
return raw.version === 2 ? 2 : 1;
|
|
4800
4867
|
}
|
|
4801
4868
|
|
|
4802
|
-
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, UNLISTED_SCAN_SKIP_DIRS, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, assertManifestEditable, assertValidLibraryName, assetRootProblem, classifyRef, cloneOrInitGitRepo, commitStoreManifest, conflictingAssetRoot, createEmptyLockFile, curatedManifestOverlay, deriveSlug, describeCatalogError, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, ensureGitRepo, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filesEntryPaths, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, installLibraryAsset, interpolate, isGitRepo, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, libraryDirMissing, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, markLibraryUnregistered, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, missingLibraryDirMessage, missingRootAssets, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, pruneMissingRootAssets, queryInstancePickerChoices, recordLibraryRename, renamedLibraryName, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, scanAuthoringLibraries, scanLibraryRoot, scanUnlistedAssets, setManifestPublisher, setOriginUrl, sha256Hex, stampManifestPublisher, storeManifestFile, storeSecrets, syncManifestWithDisk, trackOriginBranch, trpcGetUrl, unparsableAssetFiles, unregisteredLibraryNames, upsertManifestAsset, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeCuratedManifest };
|
|
4803
|
-
//# sourceMappingURL=chunk-
|
|
4804
|
-
//# sourceMappingURL=chunk-
|
|
4869
|
+
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, UNLISTED_SCAN_SKIP_DIRS, UserLibraryNotFoundError, WorkspaceConfigV2Schema, applyNonStructuralUpgrade, applyPreset, applyPresetFromData, assertManifestEditable, assertValidLibraryName, assetRootProblem, classifyRef, cloneOrInitGitRepo, commitStoreManifest, conflictingAssetRoot, createEmptyLockFile, curatedManifestOverlay, deriveSlug, describeCatalogError, detectChanges, detectNestedPresetRefs, detectWorkspaceVersion, ensureGitRepo, evaluateUpgrade, extractLibraryInstanceId, extractReferencedKeys, filesEntryPaths, filterKey, getConfigDefaults, getDefaultValue, getSidecarRoot, getStoreManifestsDir, getStoreRoot, hasInterpolationTokens, installLibraryAsset, interpolate, isGitRepo, isLocalCatalogUrl, isSecretPlaceholder, knowledgeKindProvider, lastLibraryName, libraryDirMissing, listSidecarSlugsOnDisk, loadLockFile, loadWorkspaceV2, markLibraryUnregistered, migrateSidecarsToStoreIfNeeded, migrateWorkspaceConfig, missingLibraryDirMessage, missingRootAssets, parsePreset, parsePresetYaml, parseWorkspaceV2, projectConfigPath, pruneMissingRootAssets, queryInstancePickerChoices, recordLibraryRename, renamedLibraryName, resolveAllItems, resolveConfig, resolveIndexPath, resolveItem, resolvePin, resolveSidecarPaths, saveConfig, saveLockFile, saveWorkspaceV2, scanAuthoringLibraries, scanLibraryRoot, scanUnlistedAssets, setManifestPublisher, setOriginUrl, sha256Hex, stampManifestPublisher, storeManifestFile, storeSecrets, syncManifestWithDisk, trackOriginBranch, trpcGetUrl, unparsableAssetFiles, unregisteredLibraryNames, upsertManifestAsset, validateAllPlaceholders, validateKnowledge, validateNestingDepth, validatePlaceholder, writeCuratedManifest };
|
|
4870
|
+
//# sourceMappingURL=chunk-6CYKTHNT.js.map
|
|
4871
|
+
//# sourceMappingURL=chunk-6CYKTHNT.js.map
|