@skaile/workspaces 6.1.0 → 6.3.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 +57 -0
- package/dist/ai-sdk.d.ts +2 -0
- package/dist/ai-sdk.js +111 -0
- package/dist/ai-sdk.js.map +1 -0
- package/dist/{asset-feeds-HJFV7UPW.js → asset-feeds-3YO2352Y.js} +26 -26
- package/dist/{asset-feeds-HJFV7UPW.js.map → asset-feeds-3YO2352Y.js.map} +1 -1
- package/dist/asset-manager/catalog-deployer.js +10 -10
- package/dist/asset-manager/fragments.js +1 -1
- package/dist/asset-manager/index.js +18 -18
- package/dist/asset-manager/installer.js +13 -13
- package/dist/asset-manager/renderers.js +11 -11
- package/dist/asset-manager/src/index.d.ts +149 -16
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/installer.d.ts +9 -0
- package/dist/asset-manager/src/installer.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 +16 -15
- package/dist/bridge/harnesses/claude-sdk.js.map +1 -1
- package/dist/bridge/harnesses/codex.js +25 -17
- package/dist/bridge/harnesses/codex.js.map +1 -1
- package/dist/bridge/harnesses/continue.js +15 -14
- package/dist/bridge/harnesses/continue.js.map +1 -1
- package/dist/bridge/harnesses/echo.js +5 -4
- package/dist/bridge/harnesses/echo.js.map +1 -1
- package/dist/bridge/harnesses/gemini.js +11 -10
- package/dist/bridge/harnesses/goose.js +15 -14
- package/dist/bridge/harnesses/goose.js.map +1 -1
- package/dist/bridge/harnesses/omp.js +16 -8
- package/dist/bridge/harnesses/omp.js.map +1 -1
- package/dist/bridge/harnesses/opencode.js +15 -14
- package/dist/bridge/harnesses/opencode.js.map +1 -1
- package/dist/bridge/harnesses/qwen.js +11 -10
- package/dist/bridge/harnesses/qwen.js.map +1 -1
- package/dist/bridge/index.js +21 -19
- package/dist/bridge/src/ai-sdk.d.ts +46 -0
- package/dist/bridge/src/ai-sdk.d.ts.map +1 -0
- package/dist/bridge/src/harness-model-check.d.ts +15 -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/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/provider-registry-load.d.ts +30 -0
- package/dist/bridge/src/provider-registry-load.d.ts.map +1 -0
- 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-SVTMNSPI.js → chunk-2TFKXSB5.js} +5 -5
- package/dist/{chunk-SVTMNSPI.js.map → chunk-2TFKXSB5.js.map} +1 -1
- package/dist/{chunk-NB7SYQYP.js → chunk-32FYVSSW.js} +9 -28
- package/dist/chunk-32FYVSSW.js.map +1 -0
- package/dist/{chunk-QAKUD6QN.js → chunk-4QRJBY2P.js} +3 -3
- package/dist/{chunk-QAKUD6QN.js.map → chunk-4QRJBY2P.js.map} +1 -1
- package/dist/{chunk-XFIEVEU7.js → chunk-6OHZUUR7.js} +5 -4
- package/dist/chunk-6OHZUUR7.js.map +1 -0
- package/dist/{chunk-ILLTBKDJ.js → chunk-6UP2EDFN.js} +4 -313
- package/dist/chunk-6UP2EDFN.js.map +1 -0
- package/dist/{chunk-ZDLUQLI6.js → chunk-6WH2WE4B.js} +15 -5
- package/dist/chunk-6WH2WE4B.js.map +1 -0
- package/dist/{chunk-HPMQRAIF.js → chunk-72NT2TJU.js} +8 -7
- package/dist/chunk-72NT2TJU.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-5Y2KGB4H.js → chunk-7MV3NHPT.js} +35 -9
- package/dist/chunk-7MV3NHPT.js.map +1 -0
- package/dist/{chunk-QEULL4Q3.js → chunk-7QG2WRSN.js} +77 -18
- package/dist/chunk-7QG2WRSN.js.map +1 -0
- package/dist/{chunk-6YR4ALVX.js → chunk-7RH6E332.js} +7 -7
- package/dist/{chunk-6YR4ALVX.js.map → chunk-7RH6E332.js.map} +1 -1
- package/dist/{chunk-BBBCJSSU.js → chunk-7TSNR5H5.js} +4 -4
- package/dist/{chunk-BBBCJSSU.js.map → chunk-7TSNR5H5.js.map} +1 -1
- package/dist/{chunk-3GMOPFWH.js → chunk-AMJ6KEV7.js} +4 -4
- package/dist/{chunk-3GMOPFWH.js.map → chunk-AMJ6KEV7.js.map} +1 -1
- package/dist/{chunk-X3YGUKCG.js → chunk-BPTWWKGF.js} +3 -3
- package/dist/{chunk-X3YGUKCG.js.map → chunk-BPTWWKGF.js.map} +1 -1
- package/dist/{chunk-Z7ZEZZB6.js → chunk-C5HFK34M.js} +3 -3
- package/dist/chunk-C5HFK34M.js.map +1 -0
- package/dist/{chunk-EJPMNDTP.js → chunk-COUJOTAJ.js} +3 -3
- package/dist/{chunk-EJPMNDTP.js.map → chunk-COUJOTAJ.js.map} +1 -1
- package/dist/{chunk-J72MO2WA.js → chunk-DU26AVK2.js} +10 -9
- package/dist/chunk-DU26AVK2.js.map +1 -0
- package/dist/{chunk-YLLVSR2U.js → chunk-E5NQRHEB.js} +30 -7
- package/dist/chunk-E5NQRHEB.js.map +1 -0
- package/dist/{chunk-XGULGQA3.js → chunk-ELSGFI3I.js} +5 -4
- package/dist/chunk-ELSGFI3I.js.map +1 -0
- package/dist/{chunk-IHFGPHCT.js → chunk-EQNIBBB6.js} +49 -25
- package/dist/chunk-EQNIBBB6.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-GNZBFSRB.js → chunk-H622YULS.js} +5 -4
- package/dist/chunk-H622YULS.js.map +1 -0
- package/dist/{chunk-FKQNBCDW.js → chunk-HDVLBEEX.js} +4 -4
- package/dist/{chunk-FKQNBCDW.js.map → chunk-HDVLBEEX.js.map} +1 -1
- package/dist/{chunk-AATHJRKL.js → chunk-HGOJEVHY.js} +4 -4
- package/dist/{chunk-AATHJRKL.js.map → chunk-HGOJEVHY.js.map} +1 -1
- package/dist/{chunk-CEKW3KXP.js → chunk-HH2H2ZV7.js} +18 -15
- package/dist/chunk-HH2H2ZV7.js.map +1 -0
- package/dist/{chunk-ZFUZ5AKM.js → chunk-HTGTNN2B.js} +3 -3
- package/dist/{chunk-ZFUZ5AKM.js.map → chunk-HTGTNN2B.js.map} +1 -1
- package/dist/{chunk-LSSYC5IC.js → chunk-IZQOO6MN.js} +2 -2
- package/dist/{chunk-LSSYC5IC.js.map → chunk-IZQOO6MN.js.map} +1 -1
- package/dist/{chunk-VMVDAZLA.js → chunk-J5JRGBKK.js} +108 -19
- package/dist/chunk-J5JRGBKK.js.map +1 -0
- package/dist/{chunk-7LP7RCZI.js → chunk-JGH7NB47.js} +5 -5
- package/dist/{chunk-7LP7RCZI.js.map → chunk-JGH7NB47.js.map} +1 -1
- package/dist/{chunk-RHN5MRQO.js → chunk-JMIKGAUA.js} +27 -5
- package/dist/chunk-JMIKGAUA.js.map +1 -0
- package/dist/{chunk-HWNK3F3X.js → chunk-KGHYXXXV.js} +588 -76
- package/dist/chunk-KGHYXXXV.js.map +1 -0
- package/dist/{chunk-7HX6FNKL.js → chunk-KIPCBIFJ.js} +41 -56
- package/dist/chunk-KIPCBIFJ.js.map +1 -0
- package/dist/{chunk-ZBHZLWV3.js → chunk-KPKGWXUJ.js} +4 -4
- package/dist/{chunk-ZBHZLWV3.js.map → chunk-KPKGWXUJ.js.map} +1 -1
- package/dist/{chunk-ABFPSVIS.js → chunk-LD6O6QKU.js} +31 -7
- package/dist/chunk-LD6O6QKU.js.map +1 -0
- package/dist/{chunk-AZ2H6R5I.js → chunk-LEJQAX7G.js} +74 -39
- package/dist/chunk-LEJQAX7G.js.map +1 -0
- package/dist/{chunk-ZAELRYKS.js → chunk-MD3FUZS3.js} +3 -3
- package/dist/{chunk-ZAELRYKS.js.map → chunk-MD3FUZS3.js.map} +1 -1
- package/dist/{chunk-NUA33BYO.js → chunk-MYXFR27L.js} +42 -15
- package/dist/chunk-MYXFR27L.js.map +1 -0
- package/dist/{chunk-KUQAJVYT.js → chunk-PHAMYCZH.js} +142 -28
- package/dist/chunk-PHAMYCZH.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-RDTLPOPD.js → chunk-PL52CI4U.js} +4 -4
- package/dist/{chunk-RDTLPOPD.js.map → chunk-PL52CI4U.js.map} +1 -1
- package/dist/{chunk-VYVTEMAW.js → chunk-PNUM7GUY.js} +3 -3
- package/dist/{chunk-VYVTEMAW.js.map → chunk-PNUM7GUY.js.map} +1 -1
- package/dist/{chunk-DIGFA7Z5.js → chunk-Q7CU5GQO.js} +13 -5
- package/dist/chunk-Q7CU5GQO.js.map +1 -0
- package/dist/chunk-QFFMFZIR.js +32 -0
- package/dist/chunk-QFFMFZIR.js.map +1 -0
- package/dist/{chunk-HMISULVD.js → chunk-QK7AG5AV.js} +4 -4
- package/dist/{chunk-HMISULVD.js.map → chunk-QK7AG5AV.js.map} +1 -1
- package/dist/{chunk-2LAPHLDH.js → chunk-QTLUZUF2.js} +45 -35
- package/dist/chunk-QTLUZUF2.js.map +1 -0
- package/dist/{chunk-4MUDQCBP.js → chunk-RFQONXET.js} +3 -3
- package/dist/{chunk-4MUDQCBP.js.map → chunk-RFQONXET.js.map} +1 -1
- package/dist/{chunk-AITJ7ELM.js → chunk-ROVZCGTN.js} +59 -23
- package/dist/chunk-ROVZCGTN.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-S6KZHPR4.js +315 -0
- package/dist/chunk-S6KZHPR4.js.map +1 -0
- package/dist/{chunk-EX3GLAL6.js → chunk-TGV2EWGL.js} +5 -5
- package/dist/{chunk-EX3GLAL6.js.map → chunk-TGV2EWGL.js.map} +1 -1
- package/dist/{chunk-QSYQOTWN.js → chunk-TO5SSMRI.js} +58 -5
- package/dist/chunk-TO5SSMRI.js.map +1 -0
- package/dist/{chunk-Z3VKUWAX.js → chunk-TSTRH4SM.js} +3 -3
- package/dist/{chunk-Z3VKUWAX.js.map → chunk-TSTRH4SM.js.map} +1 -1
- package/dist/{chunk-5J4NPGFM.js → chunk-U3SXCVR7.js} +5 -5
- package/dist/{chunk-5J4NPGFM.js.map → chunk-U3SXCVR7.js.map} +1 -1
- package/dist/{chunk-IRYKRKVQ.js → chunk-URCJIV7T.js} +3 -3
- package/dist/{chunk-IRYKRKVQ.js.map → chunk-URCJIV7T.js.map} +1 -1
- package/dist/{chunk-ASWTQQ7E.js → chunk-V5BPDB4J.js} +3 -3
- package/dist/{chunk-ASWTQQ7E.js.map → chunk-V5BPDB4J.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-4FVIT5DI.js → chunk-VUWRGMT6.js} +3 -3
- package/dist/{chunk-4FVIT5DI.js.map → chunk-VUWRGMT6.js.map} +1 -1
- package/dist/{chunk-ZHGKAZJ7.js → chunk-XBQTXGY4.js} +56 -8
- package/dist/chunk-XBQTXGY4.js.map +1 -0
- package/dist/{chunk-UI745XC3.js → chunk-XEVFSDIF.js} +13 -7
- package/dist/chunk-XEVFSDIF.js.map +1 -0
- package/dist/{chunk-S2XHGWQC.js → chunk-Y3I4KGLX.js} +44 -15
- package/dist/chunk-Y3I4KGLX.js.map +1 -0
- package/dist/{chunk-COYF6IG2.js → chunk-YW4ASEUP.js} +5 -5
- package/dist/{chunk-COYF6IG2.js.map → chunk-YW4ASEUP.js.map} +1 -1
- package/dist/{chunk-DGTI65OC.js → chunk-ZEH4WFEG.js} +17 -11
- package/dist/chunk-ZEH4WFEG.js.map +1 -0
- package/dist/{claude-code-RE46FJXI.js → claude-code-EUKDGOOO.js} +5 -5
- package/dist/{claude-code-RE46FJXI.js.map → claude-code-EUKDGOOO.js.map} +1 -1
- package/dist/cli/index.js +350 -141
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/config.d.ts.map +1 -1
- package/dist/cli/src/commands/diff.d.ts.map +1 -1
- package/dist/cli/src/commands/harness.d.ts.map +1 -1
- package/dist/cli/src/commands/integration.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-index.d.ts +8 -1
- package/dist/cli/src/commands/library-index.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.map +1 -1
- package/dist/cli/src/commands/providers.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/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/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 +23 -5
- package/dist/cli/src/config-checks.d.ts.map +1 -1
- 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 +2 -2
- package/dist/cli/src/skill-checks.d.ts.map +1 -1
- package/dist/connectors/config.js +5 -5
- package/dist/connectors/index.js +24 -22
- package/dist/connectors/src/connector-manager.d.ts.map +1 -1
- package/dist/connectors-XYPE2DCQ.js +50 -0
- package/dist/{connectors-7THEF7YA.js.map → connectors-XYPE2DCQ.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/framework.d.ts +5 -3
- package/dist/core/src/framework.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +2 -1
- 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 +15 -0
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +7 -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 +10 -1
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- 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/parse-manifest.d.ts.map +1 -1
- package/dist/{ensure-sources-IH7CHSJF.js → ensure-sources-IN3VKHUA.js} +37 -21
- package/dist/ensure-sources-IN3VKHUA.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +24 -22
- package/dist/factory-assets/connectors/deploy.js +24 -22
- package/dist/factory-assets/connectors/devserver.js +24 -22
- package/dist/factory-assets/connectors/flow/adapter.js +24 -22
- package/dist/factory-assets/connectors/flow/engine.js +10 -10
- package/dist/factory-assets/connectors/flow/run-flow.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/run-flow.js +26 -24
- package/dist/factory-assets/connectors/flow.js +24 -22
- package/dist/factory-assets/connectors/git.js +24 -22
- package/dist/factory-assets/connectors/gmail.js +24 -22
- package/dist/factory-assets/connectors/googledrive.js +24 -22
- package/dist/factory-assets/connectors/local.js +24 -22
- package/dist/factory-assets/connectors/mattermost.js +24 -22
- package/dist/factory-assets/connectors/memory.js +24 -22
- package/dist/factory-assets/connectors/minio.js +24 -22
- package/dist/factory-assets/connectors/postgres.js +24 -22
- package/dist/factory-assets/connectors/s3.js +24 -22
- package/dist/factory-assets/connectors/sharepoint.js +24 -22
- package/dist/factory-assets/connectors/sqlite.js +24 -22
- package/dist/factory-assets/connectors/static-server.js +24 -22
- package/dist/factory-assets/connectors/tunnel.js +24 -22
- package/dist/factory-assets/connectors/webdav.js +24 -22
- package/dist/factory-assets/connectors/xstate-store.js +24 -22
- package/dist/factory-assets/connectors/xstate.js +24 -22
- package/dist/flows-QAO63TDV.js +26 -0
- package/dist/{flows-4JZQ3XFK.js.map → flows-QAO63TDV.js.map} +1 -1
- package/dist/helpers-HDVGCF3M.js +54 -0
- package/dist/{helpers-JNMK3FC2.js.map → helpers-HDVGCF3M.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 +1 -1
- 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/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/remote/remote-catalog-source.d.ts +3 -1
- 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-I3UWXAHI.js → library-publish-62OWCNB5.js} +56 -55
- package/dist/library-publish-62OWCNB5.js.map +1 -0
- package/dist/model-endpoint/index.js +13 -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-TZ7OSDEJ.js +58 -0
- package/dist/{open-library-NKKUJLWA.js.map → open-library-TZ7OSDEJ.js.map} +1 -1
- package/dist/open-registry-RLZKTJG3.js +32 -0
- package/dist/{open-registry-BYAXSHUI.js.map → open-registry-RLZKTJG3.js.map} +1 -1
- package/dist/paths-D6LBQETQ.js +22 -0
- package/dist/{paths-UKWE35XS.js.map → paths-D6LBQETQ.js.map} +1 -1
- package/dist/plugin-store-A5J4TLCH.js +23 -0
- package/dist/{plugin-store-ABE35NRX.js.map → plugin-store-A5J4TLCH.js.map} +1 -1
- package/dist/project-4AVRES3M.js +88 -0
- package/dist/{project-BIPK47JK.js.map → project-4AVRES3M.js.map} +1 -1
- package/dist/resolver/index.js +10 -10
- package/dist/runner/index.js +41 -39
- 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/serve.d.ts +6 -5
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +18 -18
- package/dist/sdk/bridge.js +21 -19
- package/dist/sdk/core.js +9 -9
- package/dist/sdk/flow.js +10 -10
- package/dist/sdk/index.js +41 -39
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +10 -10
- package/dist/sdk/runner.js +41 -39
- 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-FLTIBTEX.js → serve-preflight-H2AYMGJ6.js} +65 -35
- package/dist/serve-preflight-H2AYMGJ6.js.map +1 -0
- package/dist/{setup-AG6NFHSN.js → setup-NSPQD4V4.js} +33 -31
- package/dist/setup-NSPQD4V4.js.map +1 -0
- package/dist/skills-B533SRVZ.js +26 -0
- package/dist/{skills-UQYUHVKO.js.map → skills-B533SRVZ.js.map} +1 -1
- package/dist/source-VTECABUO.js +87 -0
- package/dist/{source-ASEHI2XS.js.map → source-VTECABUO.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-IEVV3W6J.js → source-manifest-publish-YORI42MN.js} +56 -56
- package/dist/source-manifest-publish-YORI42MN.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 +49 -40
- 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/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 +31 -29
- package/dist/workspace-plugin/adapters/omp.js +15 -15
- package/dist/workspace-plugin/index.js +2 -2
- package/package.json +27 -1
- package/dist/chunk-2LAPHLDH.js.map +0 -1
- package/dist/chunk-5Y2KGB4H.js.map +0 -1
- package/dist/chunk-7HX6FNKL.js.map +0 -1
- package/dist/chunk-ABFPSVIS.js.map +0 -1
- package/dist/chunk-AITJ7ELM.js.map +0 -1
- package/dist/chunk-AZ2H6R5I.js.map +0 -1
- package/dist/chunk-BFMYYNDT.js.map +0 -1
- package/dist/chunk-CEKW3KXP.js.map +0 -1
- package/dist/chunk-DGTI65OC.js.map +0 -1
- package/dist/chunk-DIGFA7Z5.js.map +0 -1
- package/dist/chunk-E572OHGY.js.map +0 -1
- package/dist/chunk-GNZBFSRB.js.map +0 -1
- package/dist/chunk-HPMQRAIF.js.map +0 -1
- package/dist/chunk-HWNK3F3X.js.map +0 -1
- package/dist/chunk-IHFGPHCT.js.map +0 -1
- package/dist/chunk-ILLTBKDJ.js.map +0 -1
- package/dist/chunk-J72MO2WA.js.map +0 -1
- package/dist/chunk-KUQAJVYT.js.map +0 -1
- package/dist/chunk-LSI2IVFT.js.map +0 -1
- package/dist/chunk-NB7SYQYP.js.map +0 -1
- package/dist/chunk-NUA33BYO.js.map +0 -1
- package/dist/chunk-QEULL4Q3.js.map +0 -1
- package/dist/chunk-QSYQOTWN.js.map +0 -1
- package/dist/chunk-RHN5MRQO.js.map +0 -1
- package/dist/chunk-S2XHGWQC.js.map +0 -1
- package/dist/chunk-UI745XC3.js.map +0 -1
- package/dist/chunk-VMVDAZLA.js.map +0 -1
- package/dist/chunk-XFIEVEU7.js.map +0 -1
- package/dist/chunk-XGULGQA3.js.map +0 -1
- package/dist/chunk-YLLVSR2U.js.map +0 -1
- package/dist/chunk-Z7ZEZZB6.js.map +0 -1
- package/dist/chunk-ZDLUQLI6.js.map +0 -1
- package/dist/chunk-ZHGKAZJ7.js.map +0 -1
- package/dist/connectors-7THEF7YA.js +0 -48
- package/dist/ensure-sources-IH7CHSJF.js.map +0 -1
- package/dist/flows-4JZQ3XFK.js +0 -26
- package/dist/helpers-JNMK3FC2.js +0 -38
- package/dist/library-publish-I3UWXAHI.js.map +0 -1
- package/dist/open-library-NKKUJLWA.js +0 -42
- package/dist/open-registry-BYAXSHUI.js +0 -32
- package/dist/paths-UKWE35XS.js +0 -22
- package/dist/plugin-store-ABE35NRX.js +0 -23
- package/dist/project-BIPK47JK.js +0 -86
- package/dist/serve-preflight-FLTIBTEX.js.map +0 -1
- package/dist/setup-AG6NFHSN.js.map +0 -1
- package/dist/skills-UQYUHVKO.js +0 -26
- package/dist/source-ASEHI2XS.js +0 -85
- package/dist/source-fetch-github-ST4MFL3D.js +0 -4
- package/dist/source-manifest-publish-IEVV3W6J.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { unregisteredLibraryNames, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage,
|
|
2
|
-
import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-
|
|
1
|
+
import { unregisteredLibraryNames, renamedLibraryName, resolveConfig, RemoteCatalogSource, OfflineError, describeCatalogError, CatalogHttpError, scanUnlistedAssets, missingRootAssets, storeManifestFile, missingLibraryDirMessage, lastLibraryName, filesEntryPaths } from './chunk-Y3I4KGLX.js';
|
|
2
|
+
import { SEMVER_RE, invalidSemverMessage, flowFileNameError, computeDeterministicHash, readManifestSourceConfig, discoverAssetsInTree, isManifestMode } from './chunk-XEVFSDIF.js';
|
|
3
3
|
import { parseFlowDefinition } from './chunk-JRN5QF4C.js';
|
|
4
|
-
import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, assertNoLibrarySymlinks, deployAll, removeAsset, sourceComposedFiles, cachedComposedFiles, createScaffold, installAgent } from './chunk-
|
|
4
|
+
import { installTargetOf, readKeptLegacyCopies, writeKeptLegacyCopies, canonicalEntryRef, diffDeployedAgent, deployedAssetDrift, assertNoLibrarySymlinks, deployAll, removeAsset, composedDriftRefs, sourceComposedFiles, cachedComposedFiles, createScaffold, installAgent } from './chunk-MYXFR27L.js';
|
|
5
5
|
import { appendHistory, getRecentHistory, clearHistory } from './chunk-KTBKW2FI.js';
|
|
6
6
|
import { commitChanges } from './chunk-UQ6LFBPZ.js';
|
|
7
|
-
import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR } from './chunk-
|
|
8
|
-
import { isScaffoldBody, isScaffoldDescription } from './chunk-
|
|
9
|
-
import { resolveConfiguredHarnessName, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, computeHash, buildLockFile, readLock, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-
|
|
10
|
-
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-
|
|
7
|
+
import { harnessTargetSupportsAgents, CODEX_IDENTITY_DIR, agentRenderFiles } from './chunk-LD6O6QKU.js';
|
|
8
|
+
import { isScaffoldBody, isScaffoldDescription } from './chunk-76FLBODK.js';
|
|
9
|
+
import { resolveConfiguredHarnessName, FACTORY_SOURCE_URL, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, computeHash, buildLockFile, readLock, assertLockHashes, verifyLock, mergeLockFile, resyncLockSources, extractForPatch, generatePatch, savePatch, applyPatch, LOCK_SCHEMA_VERSION } from './chunk-J5JRGBKK.js';
|
|
10
|
+
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-6WH2WE4B.js';
|
|
11
11
|
import { deployedBase, isDeployed, deployedPaths, deployedDir } from './chunk-5KRMNUL4.js';
|
|
12
|
-
import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, MAX_PRESET_DEPTH, PresetDepthError, DEFAULT_AGENT_INSTANCE_ID } from './chunk-
|
|
12
|
+
import { resolveSkWorkspaceConfig, effectiveAgentInstances, mcpDeclarationFromMdContent, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, buildProvenanceIndex, coerceVersion, sourceShortName, readLinks, isCommitOnRemote, findWorkspaceRoot, resolveAll, agentSourceCacheDir, ensureRepo, resolveAgentDefinitionDir, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, MAX_PRESET_DEPTH, PresetDepthError, DEFAULT_AGENT_INSTANCE_ID } from './chunk-XBQTXGY4.js';
|
|
13
13
|
import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-L5VSIPQD.js';
|
|
14
14
|
import { HARNESS_TARGETS, SUPPORTED_HARNESSES } from './chunk-VTETQCR6.js';
|
|
15
|
-
import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, isNonAssetDir, isNonAssetFile } from './chunk-
|
|
16
|
-
import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-
|
|
17
|
-
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-
|
|
15
|
+
import { listAssetFiles, loadSkPublishManifest, decodeSkaileManifest, isNonAssetDir, isNonAssetFile } from './chunk-KPKGWXUJ.js';
|
|
16
|
+
import { scanDirectory, parseFrontmatter, parseRequires, dedupeRequirements, readAssetBody } from './chunk-JMIKGAUA.js';
|
|
17
|
+
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName, depToStr, parseDep } from './chunk-IZQOO6MN.js';
|
|
18
18
|
import { spawnSync } from 'child_process';
|
|
19
19
|
import { existsSync, rmSync, readFileSync, writeFileSync, readdirSync, lstatSync, statSync, unlinkSync, mkdirSync } from 'fs';
|
|
20
20
|
import { homedir } from 'os';
|
|
@@ -902,6 +902,10 @@ var libraryAssetCheck;
|
|
|
902
902
|
function setLibraryAssetCheck(check) {
|
|
903
903
|
libraryAssetCheck = check;
|
|
904
904
|
}
|
|
905
|
+
var renamedEntryLookup;
|
|
906
|
+
function setRenamedEntryLookup(lookup) {
|
|
907
|
+
renamedEntryLookup = lookup;
|
|
908
|
+
}
|
|
905
909
|
function isUnlistedLibraryAsset(entry, libPath) {
|
|
906
910
|
const manifest = loadSkPublishManifest(libPath);
|
|
907
911
|
const listed = manifest?.assets ?? [];
|
|
@@ -1100,6 +1104,13 @@ function parseCanonicalLockKey(key) {
|
|
|
1100
1104
|
};
|
|
1101
1105
|
}
|
|
1102
1106
|
}
|
|
1107
|
+
function labelDiffHeaders(diff, from, to) {
|
|
1108
|
+
const stamp = "\\t(?:\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)? [+-]\\d{4}|[A-Z][a-z]{2} [A-Z][a-z]{2} [ \\d]\\d \\d{2}:\\d{2}:\\d{2} \\d{4})";
|
|
1109
|
+
return diff.replace(
|
|
1110
|
+
new RegExp(`^(---|\\+\\+\\+) (.*?)${stamp}$`, "gm"),
|
|
1111
|
+
(_m, mark, file) => `${mark} ${file} (${mark === "---" ? from : to})`
|
|
1112
|
+
);
|
|
1113
|
+
}
|
|
1103
1114
|
function softDepName(ref) {
|
|
1104
1115
|
const at = ref.lastIndexOf("@");
|
|
1105
1116
|
const base = at > 0 ? ref.slice(0, at) : ref;
|
|
@@ -1190,6 +1201,9 @@ function relockedRefs(prev, next) {
|
|
|
1190
1201
|
}
|
|
1191
1202
|
return out;
|
|
1192
1203
|
}
|
|
1204
|
+
function planPaths(folders, renders, files) {
|
|
1205
|
+
return renders.length > 0 ? { folders: [], files: [], renders } : { folders, files, renders: [] };
|
|
1206
|
+
}
|
|
1193
1207
|
function libraryMoves(prev, next) {
|
|
1194
1208
|
if (!prev) return [];
|
|
1195
1209
|
const out = [];
|
|
@@ -1303,7 +1317,6 @@ function isSymlink(p) {
|
|
|
1303
1317
|
return false;
|
|
1304
1318
|
}
|
|
1305
1319
|
}
|
|
1306
|
-
var FACTORY_SOURCE_URL = "https://github.com/skaile-ai/ai-assets";
|
|
1307
1320
|
function resolveFactoryAssetsDir() {
|
|
1308
1321
|
for (const dir of factoryAssetRoots()) {
|
|
1309
1322
|
if (existsSync(join(dir, "skaile.manifest.yaml"))) return dir;
|
|
@@ -1554,6 +1567,78 @@ var AssetManager = class {
|
|
|
1554
1567
|
else raw[ENTRY_HARNESSES_KEY] = rows;
|
|
1555
1568
|
return true;
|
|
1556
1569
|
}
|
|
1570
|
+
/** The harness row of `kind:name` (publisher must agree when both sides have one) in the parsed `raw`. */
|
|
1571
|
+
harnessRowIn(raw, id) {
|
|
1572
|
+
const wantPub = id.publisher?.replace(/^@/, "");
|
|
1573
|
+
for (const [key, harnesses] of Object.entries(decodeEntryHarnesses(raw[ENTRY_HARNESSES_KEY]))) {
|
|
1574
|
+
const other = parseAssetRefLoose(key);
|
|
1575
|
+
if (!other || other.kind !== id.kind || other.name !== id.name) continue;
|
|
1576
|
+
const havePub = other.publisher?.replace(/^@/, "");
|
|
1577
|
+
if (wantPub === void 0 || havePub === void 0 || havePub === wantPub) return harnesses;
|
|
1578
|
+
}
|
|
1579
|
+
return void 0;
|
|
1580
|
+
}
|
|
1581
|
+
/**
|
|
1582
|
+
* The harness row `add --global --harness <requested>` leaves for `ref`: the recorded set plus
|
|
1583
|
+
* `requested`. An asset declared with no row goes to every global harness, so its set is that
|
|
1584
|
+
* default; `undefined` (no row) when `requested` is already part of it. A new asset gets
|
|
1585
|
+
* `requested` alone.
|
|
1586
|
+
*/
|
|
1587
|
+
widenedHarnessRow(raw, ref, requested, declared) {
|
|
1588
|
+
const id = parseAssetRefLoose(ref);
|
|
1589
|
+
if (!id) return [...requested];
|
|
1590
|
+
const recorded = this.harnessRowIn(raw, id);
|
|
1591
|
+
if (!recorded && !declared) return [...requested];
|
|
1592
|
+
const current = recorded ?? this.defaultGlobalHarnesses();
|
|
1593
|
+
const union = [.../* @__PURE__ */ new Set([...current, ...requested])];
|
|
1594
|
+
if (!recorded && union.length === current.length) return void 0;
|
|
1595
|
+
return union;
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* After `add --global --harness X`: widen the row of every other entry of the add that has one
|
|
1599
|
+
* (a requirement declared on its own with `--harness`), so the copy now deployed into X stays
|
|
1600
|
+
* managed. Entries with no row already go to every harness.
|
|
1601
|
+
*/
|
|
1602
|
+
widenDependencyRows(entries, requested) {
|
|
1603
|
+
const named = this.harnessesOverride;
|
|
1604
|
+
if (!this.global || !named?.length) return;
|
|
1605
|
+
const configPath = join(this.stateRoot, "skaile.yaml");
|
|
1606
|
+
if (!existsSync(configPath)) return;
|
|
1607
|
+
const raw = parse(readFileSync(configPath, "utf8")) ?? {};
|
|
1608
|
+
let changed = false;
|
|
1609
|
+
for (const e of entries) {
|
|
1610
|
+
if (!e.name || e.kind === requested.kind && e.name === requested.name) continue;
|
|
1611
|
+
const recorded = this.harnessRowIn(raw, e);
|
|
1612
|
+
if (!recorded) continue;
|
|
1613
|
+
const union = [.../* @__PURE__ */ new Set([...recorded, ...named])];
|
|
1614
|
+
if (union.length === recorded.length) continue;
|
|
1615
|
+
const publisher = e.publisher?.replace(/^@/, "");
|
|
1616
|
+
const ref = `${e.kind}:${publisher ? `@${publisher}/` : ""}${e.name}`;
|
|
1617
|
+
if (this.setEntryHarnessRow(raw, ref, union)) changed = true;
|
|
1618
|
+
}
|
|
1619
|
+
if (changed) writeFileSync(configPath, stringify(raw, { lineWidth: 120 }));
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* `add --global --harness X --only`: name each harness that leaves the asset's set but still
|
|
1623
|
+
* holds a copy. The copy stays on disk; `remove --global --harness <h>` deletes it.
|
|
1624
|
+
*/
|
|
1625
|
+
reportDroppedCopies(target, onDropped) {
|
|
1626
|
+
const named = this.harnessesOverride;
|
|
1627
|
+
const component = this.installTarget(target.kind);
|
|
1628
|
+
const configPath = join(this.stateRoot, "skaile.yaml");
|
|
1629
|
+
if (!named?.length || !component || !existsSync(configPath)) return;
|
|
1630
|
+
const raw = parse(readFileSync(configPath, "utf8")) ?? {};
|
|
1631
|
+
const publisher = target.publisher?.replace(/^@/, "");
|
|
1632
|
+
const ref = `${target.kind}:${publisher ? `@${publisher}/` : ""}${target.name}`;
|
|
1633
|
+
const declared = Array.isArray(raw.dependencies) && raw.dependencies.some((d) => this.sameDeclaredAsset(d, ref));
|
|
1634
|
+
if (!declared) return;
|
|
1635
|
+
const current = this.harnessRowIn(raw, target) ?? this.defaultGlobalHarnesses();
|
|
1636
|
+
for (const h of current) {
|
|
1637
|
+
if (named.includes(h) || !isDeployed(component, target.name, h, true)) continue;
|
|
1638
|
+
const where = deployedPaths(component, target.name, h, true)[0];
|
|
1639
|
+
onDropped(ref, h, where ?? deployedDir(component, target.name, h, true));
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1557
1642
|
/**
|
|
1558
1643
|
* Delete the copies a 5.12.0 global install left in `~/.omp/skills`, `~/.omp/agents`,
|
|
1559
1644
|
* `~/.omp/prompts` and `~/.omp/contracts` (omp reads `~/.omp/agent/<dir>`) for the assets just
|
|
@@ -1893,7 +1978,7 @@ var AssetManager = class {
|
|
|
1893
1978
|
);
|
|
1894
1979
|
continue;
|
|
1895
1980
|
}
|
|
1896
|
-
const commit = getRepoCommit(localPath) ?? "0".repeat(40);
|
|
1981
|
+
const commit = decl.factory ? "0".repeat(40) : getRepoCommit(localPath) ?? "0".repeat(40);
|
|
1897
1982
|
clones.push({
|
|
1898
1983
|
localPath,
|
|
1899
1984
|
sourceUrl: decl.url ?? localPath,
|
|
@@ -3011,6 +3096,29 @@ var AssetManager = class {
|
|
|
3011
3096
|
}
|
|
3012
3097
|
return { entries, missing, viaStore };
|
|
3013
3098
|
}
|
|
3099
|
+
/**
|
|
3100
|
+
* Whether a library-origin lock entry was restored from its lock url: its library is not
|
|
3101
|
+
* registered here, and the project's store cache holds the locked version (`install --locked`
|
|
3102
|
+
* fetched and SHA-verified it there against the sha256 the lock recorded). Such an entry is
|
|
3103
|
+
* as restorable as a source- or store-origin one: `check` and `doctor` read its requirements
|
|
3104
|
+
* from the deployed copy and do not ask for the library (OQ8, p1655). An unregistered library
|
|
3105
|
+
* that never restored anything here stays a gap.
|
|
3106
|
+
*/
|
|
3107
|
+
async restoredFromLockUrl(key, entry, snap) {
|
|
3108
|
+
const origin = entry.library;
|
|
3109
|
+
if (!origin || origin.installed || !origin.sha256 || !origin.version) return false;
|
|
3110
|
+
if (isPseudoVersion(origin.version)) return false;
|
|
3111
|
+
const { publisher, kind, name } = parseCanonicalLockKey(key);
|
|
3112
|
+
if (!publisher || !kind || !name) return false;
|
|
3113
|
+
if (this.lockedLibrary(origin, snap, { kind, publisher, name }).state !== "unregistered") {
|
|
3114
|
+
return false;
|
|
3115
|
+
}
|
|
3116
|
+
try {
|
|
3117
|
+
return readdirSync(join(this.storeCacheDir, publisher, kind, name, origin.version)).length > 0;
|
|
3118
|
+
} catch {
|
|
3119
|
+
return false;
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3014
3122
|
/**
|
|
3015
3123
|
* The store's copy of a library-origin lock entry whose library is not registered here: a
|
|
3016
3124
|
* store (project `stores:` or the global catalog) that serves `kind:@publisher/name#version`
|
|
@@ -3680,6 +3788,13 @@ var AssetManager = class {
|
|
|
3680
3788
|
}
|
|
3681
3789
|
});
|
|
3682
3790
|
if (intact) {
|
|
3791
|
+
const { restoreScriptModes } = await import('./library/index.js');
|
|
3792
|
+
restoreScriptModes(
|
|
3793
|
+
targetDir,
|
|
3794
|
+
c.files.map(
|
|
3795
|
+
(f) => root && f.path.startsWith(`${root}/`) ? f.path.slice(root.length + 1) : f.path
|
|
3796
|
+
)
|
|
3797
|
+
);
|
|
3683
3798
|
staged.set(this.candidateKey(c), join(targetDir, this.stagedManifestRel(c)));
|
|
3684
3799
|
continue;
|
|
3685
3800
|
}
|
|
@@ -3972,6 +4087,14 @@ var AssetManager = class {
|
|
|
3972
4087
|
lib.libraryOf
|
|
3973
4088
|
);
|
|
3974
4089
|
if (!opts?.force) this.assertNoUnrecordedAgentOverwrite(entries, prevLock, forceCommand);
|
|
4090
|
+
if (!opts?.force) {
|
|
4091
|
+
await this.assertNoHandEditsOverwritten(
|
|
4092
|
+
entries,
|
|
4093
|
+
prevLock,
|
|
4094
|
+
withKeptLockEntries(freshLock, kept),
|
|
4095
|
+
forceCommand
|
|
4096
|
+
);
|
|
4097
|
+
}
|
|
3975
4098
|
const inferredHarnesses = this.inferLegacyHarnessSubsets(entries);
|
|
3976
4099
|
const { removed, replaced } = this.reconcileRemovedAssets(
|
|
3977
4100
|
resolved,
|
|
@@ -4010,9 +4133,12 @@ var AssetManager = class {
|
|
|
4010
4133
|
let relocked = [];
|
|
4011
4134
|
let moved = [];
|
|
4012
4135
|
if (lockWanted) {
|
|
4013
|
-
const lockData = this.
|
|
4014
|
-
|
|
4015
|
-
|
|
4136
|
+
const lockData = this.withCopiedFiles(
|
|
4137
|
+
this.withRenderedAgents(
|
|
4138
|
+
withKeptLockEntries(freshLock, kept),
|
|
4139
|
+
opts?.moveLibraries ? void 0 : prevLock
|
|
4140
|
+
),
|
|
4141
|
+
prevLock
|
|
4016
4142
|
);
|
|
4017
4143
|
moved = libraryMoves(prevLock, libraryLock);
|
|
4018
4144
|
const movedRefs = new Set(moved.map((m) => m.ref));
|
|
@@ -4403,6 +4529,50 @@ Nothing was changed. Copy what you need, or run \`${forceCommand}\` to delete th
|
|
|
4403
4529
|
Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwrite the file.`
|
|
4404
4530
|
);
|
|
4405
4531
|
}
|
|
4532
|
+
/**
|
|
4533
|
+
* Stop a re-lock from replacing a hand edit of a deployed copy (OQ6, p1641): the asset is locked
|
|
4534
|
+
* already, its library or source now holds other content (`next` re-locks it), and a deployed
|
|
4535
|
+
* file differs from what the lock covers and from the new content. The deploy would replace
|
|
4536
|
+
* the file without a word. Throws one error naming each file and changes nothing; `--force`
|
|
4537
|
+
* (the caller skips this check) replaces them. An agent's rendered files are compared with the
|
|
4538
|
+
* hashes the lock records. A file the new content brings back byte for byte loses nothing.
|
|
4539
|
+
* Project mode only.
|
|
4540
|
+
*/
|
|
4541
|
+
async assertNoHandEditsOverwritten(entries, prevLock, next, forceCommand) {
|
|
4542
|
+
if (this.global || !prevLock) return;
|
|
4543
|
+
const relocked = relockedRefs(prevLock, next).map((k) => parseCanonicalLockKey(k));
|
|
4544
|
+
if (relocked.length === 0) return;
|
|
4545
|
+
const opts = this.deployOptsFor(this.harness);
|
|
4546
|
+
const lines = [];
|
|
4547
|
+
for (const d of await this.lockedCopyDrift()) {
|
|
4548
|
+
const id = parseCanonicalLockKey(d.key);
|
|
4549
|
+
if (!relocked.some(
|
|
4550
|
+
(r) => r.kind === id.kind && r.name === id.name && r.publisher === id.publisher
|
|
4551
|
+
)) {
|
|
4552
|
+
continue;
|
|
4553
|
+
}
|
|
4554
|
+
let files = d.modified;
|
|
4555
|
+
if (!d.rendered) {
|
|
4556
|
+
const component = id.kind ? this.installTarget(id.kind) : void 0;
|
|
4557
|
+
if (!id.kind || !id.name || !component) continue;
|
|
4558
|
+
const entry = entries.find((e) => e.kind === id.kind && e.name === id.name);
|
|
4559
|
+
const differs = entry ? deployedAssetDrift(entry, opts)?.modified : void 0;
|
|
4560
|
+
if (differs) files = files.filter((f) => differs.includes(f));
|
|
4561
|
+
const dir = relative(
|
|
4562
|
+
this.projectDir,
|
|
4563
|
+
deployedDir(component, id.name, this.harness, this.global, this.projectDir)
|
|
4564
|
+
).split(sep).join("/");
|
|
4565
|
+
files = files.map((f) => `${dir}/${f}`);
|
|
4566
|
+
}
|
|
4567
|
+
if (files.length > 0) lines.push(`${d.ref} (${files.join(", ")} was edited)`);
|
|
4568
|
+
}
|
|
4569
|
+
if (lines.length === 0) return;
|
|
4570
|
+
throw new Error(
|
|
4571
|
+
`Not re-locked: the new content would replace ${lines.length === 1 ? "a file" : "files"} you edited in the deployed copy:
|
|
4572
|
+
${lines.join("\n ")}
|
|
4573
|
+
Nothing was changed. Copy your edits away, or run \`${forceCommand}\` to replace them.`
|
|
4574
|
+
);
|
|
4575
|
+
}
|
|
4406
4576
|
/**
|
|
4407
4577
|
* Remove stale assets — those recorded in the old lock but absent from the
|
|
4408
4578
|
* newly resolved set (`resolved` source candidates plus `keep`, the canonical
|
|
@@ -4707,6 +4877,28 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4707
4877
|
assertFlowsLoad([...resolved, ...library.entries], "installed");
|
|
4708
4878
|
assertNoLibrarySymlinks([...resolved, ...library.entries], this.registry, repositories);
|
|
4709
4879
|
const inferredHarnesses = this.inferLegacyHarnessSubsets([...resolved, ...library.entries]);
|
|
4880
|
+
const composedPre = /* @__PURE__ */ new Set();
|
|
4881
|
+
if (!this.global) {
|
|
4882
|
+
for (const e of [...resolved, ...library.entries]) {
|
|
4883
|
+
if (this.installTarget(e.kind) !== "agent") continue;
|
|
4884
|
+
try {
|
|
4885
|
+
for (const composeRef of composedDriftRefs(e, this.deployOptsFor(this.harness))) {
|
|
4886
|
+
composedPre.add(this.composedDriftLine(canonicalEntryRef(e), composeRef));
|
|
4887
|
+
}
|
|
4888
|
+
} catch {
|
|
4889
|
+
}
|
|
4890
|
+
}
|
|
4891
|
+
}
|
|
4892
|
+
if (library.missing.length > 0 || composedPre.size > 0) {
|
|
4893
|
+
return {
|
|
4894
|
+
deployed: [],
|
|
4895
|
+
removed: [],
|
|
4896
|
+
missing: [...library.missing, ...composedPre],
|
|
4897
|
+
lockWritten: false,
|
|
4898
|
+
npmInstalled: [],
|
|
4899
|
+
npmFailed: []
|
|
4900
|
+
};
|
|
4901
|
+
}
|
|
4710
4902
|
const copyDrift = await this.lockedCopyDrift();
|
|
4711
4903
|
const missingCopies = await this.incompleteDeploys();
|
|
4712
4904
|
const unrecordedAgents = this.unrecordedAgentFiles(lock);
|
|
@@ -4737,13 +4929,17 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4737
4929
|
return p ? `${p.kind}:${p.name}` : m;
|
|
4738
4930
|
})
|
|
4739
4931
|
);
|
|
4932
|
+
const viaStoreIds = new Set(library.viaStore.map(gapIdentity));
|
|
4740
4933
|
const gaps = (await this.projectState()).gaps.filter((g) => {
|
|
4741
4934
|
if (g.type === "agent") return false;
|
|
4742
4935
|
if (g.unreadableSource) return false;
|
|
4743
|
-
if (g.type === "library" &&
|
|
4936
|
+
if ((g.type === "library" || g.type === "unresolved") && viaStoreIds.has(gapIdentity(g.ref))) {
|
|
4937
|
+
return false;
|
|
4938
|
+
}
|
|
4744
4939
|
const p = parseRefTolerant(g.ref);
|
|
4745
4940
|
return !(p && alreadyMissing.has(`${p.kind}:${p.name}`));
|
|
4746
4941
|
}).map((g) => g.message);
|
|
4942
|
+
const libraryNotices = this.lockUrlRestoreNotices(lock, library.viaStore);
|
|
4747
4943
|
const placeholderBodies = scaffoldBodyRefs(library.entries, deployed);
|
|
4748
4944
|
const placeholderDescriptions = scaffoldDescriptionRefs(library.entries, deployed);
|
|
4749
4945
|
return {
|
|
@@ -4756,9 +4952,30 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4756
4952
|
...inferredHarnesses.length > 0 ? { inferredHarnesses } : {},
|
|
4757
4953
|
...restored.length > 0 ? { restored } : {},
|
|
4758
4954
|
...rewritten.length > 0 ? { rewritten } : {},
|
|
4955
|
+
...libraryNotices.length > 0 ? { libraryNotices } : {},
|
|
4759
4956
|
...agentRender
|
|
4760
4957
|
};
|
|
4761
4958
|
}
|
|
4959
|
+
/**
|
|
4960
|
+
* One notice line per locked library that is not registered here and whose assets
|
|
4961
|
+
* `install --locked` restored from the lock url: names the library, how many assets came from
|
|
4962
|
+
* the url, and how to register the library to move the lock later (OQ8, p1655).
|
|
4963
|
+
*/
|
|
4964
|
+
lockUrlRestoreNotices(lock, viaStore) {
|
|
4965
|
+
const byLibrary = /* @__PURE__ */ new Map();
|
|
4966
|
+
for (const key of viaStore) {
|
|
4967
|
+
const origin = lock.assets[key]?.library;
|
|
4968
|
+
if (!origin) continue;
|
|
4969
|
+
const name = unregisteredLibraryName(origin);
|
|
4970
|
+
const row = byLibrary.get(name) ?? { ...origin.url ? { url: origin.url } : {}, refs: [] };
|
|
4971
|
+
row.refs.push(key);
|
|
4972
|
+
byLibrary.set(name, row);
|
|
4973
|
+
}
|
|
4974
|
+
return [...byLibrary].map(([name, { url, refs }]) => {
|
|
4975
|
+
const register = url ? `skaile library init ${name} --git ${url}` : `skaile library init ${name} --path <dir>`;
|
|
4976
|
+
return `Library "${name}" is not registered here: restored ${refs.length} asset${refs.length === 1 ? "" : "s"} from the lock url${url ? ` ${url}` : ""}. Register it with \`${register}\` to move the lock later.`;
|
|
4977
|
+
});
|
|
4978
|
+
}
|
|
4762
4979
|
/**
|
|
4763
4980
|
* The versions of `parsed`'s name that a source, a library or a store holds, newest first,
|
|
4764
4981
|
* for the `Asset not found` of a pinned ref. Empty for an unpinned ref (nothing was ruled
|
|
@@ -4800,6 +5017,40 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4800
5017
|
}
|
|
4801
5018
|
return found;
|
|
4802
5019
|
}
|
|
5020
|
+
/**
|
|
5021
|
+
* The `Did you mean agent:@pub/name?` sentence for a ref written without a kind (`@pub/name`,
|
|
5022
|
+
* which means `skill`) that names no asset: the refs of other kinds under the same name that
|
|
5023
|
+
* a source, a library, the lock or `skaile.yaml` holds (p1425). `undefined` when the ref has a
|
|
5024
|
+
* kind or nothing of another kind answers to it. `add`, `diff`, `update`, `info`, `remove` and
|
|
5025
|
+
* `why` end their not-found line with it.
|
|
5026
|
+
*/
|
|
5027
|
+
async otherKindHint(ref) {
|
|
5028
|
+
if (/^[^@/#\s]+:/.test(ref.trim())) return void 0;
|
|
5029
|
+
const parsed = parseRefTolerant(ref);
|
|
5030
|
+
if (!parsed) return void 0;
|
|
5031
|
+
const wantPublisher = parsed.publisher?.replace(/^@/, "");
|
|
5032
|
+
const found = new Set(await this.otherKindRefs(parsed));
|
|
5033
|
+
const note = (id) => {
|
|
5034
|
+
if (!id.kind || !id.name || id.kind === parsed.kind || id.name !== parsed.name) return;
|
|
5035
|
+
const publisher = id.publisher?.replace(/^@/, "");
|
|
5036
|
+
if (wantPublisher && publisher !== wantPublisher) return;
|
|
5037
|
+
found.add(
|
|
5038
|
+
assetRefToStr({ kind: id.kind, name: id.name, ...publisher ? { publisher } : {} })
|
|
5039
|
+
);
|
|
5040
|
+
};
|
|
5041
|
+
for (const key of Object.keys(this.tryReadLock()?.assets ?? {})) {
|
|
5042
|
+
note(parseCanonicalLockKey(key));
|
|
5043
|
+
}
|
|
5044
|
+
try {
|
|
5045
|
+
for (const dep of resolveSkWorkspaceConfig(this.projectDir).dependencies ?? []) {
|
|
5046
|
+
if (typeof dep === "string") note(parseRefTolerant(dep) ?? {});
|
|
5047
|
+
}
|
|
5048
|
+
} catch {
|
|
5049
|
+
}
|
|
5050
|
+
const refs = [...found].sort();
|
|
5051
|
+
if (refs.length === 0) return void 0;
|
|
5052
|
+
return refs.length === 1 ? `Did you mean ${refs[0]}?` : `Did you mean one of: ${refs.join(", ")}?`;
|
|
5053
|
+
}
|
|
4803
5054
|
/**
|
|
4804
5055
|
* What `add` would deploy for the resolved candidates and library entries, without touching
|
|
4805
5056
|
* the project: one item per asset with its origin, version, deploy folders and files.
|
|
@@ -4807,15 +5058,26 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4807
5058
|
planAddItems(resolved, lib, stores, parsed) {
|
|
4808
5059
|
const storeUrls = new Set(stores.map((s) => normalizeRepoUrl(s.url)));
|
|
4809
5060
|
const factoryUrl = normalizeRepoUrl(FACTORY_SOURCE_URL);
|
|
5061
|
+
const shownPath = (dir) => {
|
|
5062
|
+
const rel = relative(this.projectDir, dir);
|
|
5063
|
+
return this.global || rel.startsWith("..") ? dir.replace(homedir(), "~") : `${rel}${dir.endsWith(sep) ? sep : ""}`;
|
|
5064
|
+
};
|
|
4810
5065
|
const folders = (kind, name) => {
|
|
4811
5066
|
const component = this.installTarget(kind);
|
|
4812
5067
|
if (!component) return [];
|
|
4813
|
-
return this.targetHarnesses().map(
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
5068
|
+
return this.targetHarnesses().map(
|
|
5069
|
+
(t) => shownPath(deployedDir(component, name, t, this.global, this.projectDir))
|
|
5070
|
+
);
|
|
5071
|
+
};
|
|
5072
|
+
const renders = (kind, name) => {
|
|
5073
|
+
if (this.installTarget(kind) !== "agent") return [];
|
|
5074
|
+
return this.targetHarnesses().flatMap(
|
|
5075
|
+
(t) => agentRenderFiles(
|
|
5076
|
+
t,
|
|
5077
|
+
dirname(deployedDir("agent", name, t, this.global, this.projectDir)),
|
|
5078
|
+
name
|
|
5079
|
+
).map(shownPath)
|
|
5080
|
+
);
|
|
4819
5081
|
};
|
|
4820
5082
|
const asked = (kind, name, publisher) => kind === parsed.kind && name === parsed.name && (!parsed.publisher || (publisher ?? "").replace(/^@/, "") === parsed.publisher.replace(/^@/, ""));
|
|
4821
5083
|
const items = [];
|
|
@@ -4830,19 +5092,22 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4830
5092
|
version: c.version,
|
|
4831
5093
|
origin: storeUrls.has(url) ? `store ${c.sourceUrl}` : url === factoryUrl ? "factory" : `source ${sourceShortName(c.sourceUrl)}`,
|
|
4832
5094
|
requested: asked(c.kind, c.name, c.publisher),
|
|
4833
|
-
|
|
4834
|
-
|
|
5095
|
+
...planPaths(
|
|
5096
|
+
folders(c.kind, c.name),
|
|
5097
|
+
renders(c.kind, c.name),
|
|
5098
|
+
c.files.map((f) => f.path)
|
|
5099
|
+
)
|
|
4835
5100
|
});
|
|
4836
5101
|
}
|
|
4837
5102
|
for (const e of lib.entries) {
|
|
4838
5103
|
const id = this.entryIdentity(e);
|
|
4839
5104
|
items.push({
|
|
4840
|
-
ref: canonicalEntryRef
|
|
5105
|
+
// The ref is printed once: `canonicalEntryRef` carries the version as a pin, `version` has it.
|
|
5106
|
+
ref: canonicalEntryRef(e).replace(/#.*$/, ""),
|
|
4841
5107
|
version: e.version ?? "",
|
|
4842
5108
|
origin: `library ${lib.libraryOf.get(e) ?? ""}`.trim(),
|
|
4843
5109
|
requested: asked(e.kind, e.name, id.publisher),
|
|
4844
|
-
folders
|
|
4845
|
-
files: [...e.files ?? []]
|
|
5110
|
+
...planPaths(folders(e.kind, e.name), renders(e.kind, e.name), [...e.files ?? []])
|
|
4846
5111
|
});
|
|
4847
5112
|
}
|
|
4848
5113
|
return items.sort((a, b) => Number(b.requested) - Number(a.requested));
|
|
@@ -4982,6 +5247,25 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4982
5247
|
);
|
|
4983
5248
|
}
|
|
4984
5249
|
}
|
|
5250
|
+
if (renamedEntryLookup) {
|
|
5251
|
+
for (const l of snap?.libraries ?? []) {
|
|
5252
|
+
const libPath = this.libraryPath({ name: l.name }, snap);
|
|
5253
|
+
if (!libPath) continue;
|
|
5254
|
+
const renamed = renamedEntryLookup(libPath).find(
|
|
5255
|
+
(r) => r.kind === parsed.kind && r.name === parsed.name && (!parsed.publisher || bare(r.publisher) === bare(parsed.publisher))
|
|
5256
|
+
);
|
|
5257
|
+
if (renamed) {
|
|
5258
|
+
const shown = renamed.publisher ? assetRefToStr({
|
|
5259
|
+
kind: renamed.kind,
|
|
5260
|
+
name: renamed.name,
|
|
5261
|
+
publisher: bare(renamed.publisher)
|
|
5262
|
+
}) : `${renamed.kind}:${renamed.name}`;
|
|
5263
|
+
throw new Error(
|
|
5264
|
+
`${shown}: ${renamed.file} now names "${renamed.now}", so the library entry is a ref \`add\` cannot resolve. Run \`skaile library index ${l.name}\` to rename the entry, or restore the name.`
|
|
5265
|
+
);
|
|
5266
|
+
}
|
|
5267
|
+
}
|
|
5268
|
+
}
|
|
4985
5269
|
const unreachable = [...this.storeFailures.values()];
|
|
4986
5270
|
if (unreachable.length > 0) {
|
|
4987
5271
|
throw new Error(
|
|
@@ -4989,9 +5273,13 @@ Nothing was changed. Move your edits away, or run \`${forceCommand}\` to overwri
|
|
|
4989
5273
|
);
|
|
4990
5274
|
}
|
|
4991
5275
|
const available = await this.availableVersions(parsed, stores);
|
|
4992
|
-
const
|
|
5276
|
+
const otherKind = await this.otherKindHint(ref);
|
|
5277
|
+
const others = missing.filter((m) => {
|
|
5278
|
+
const id = parseRefTolerant(m);
|
|
5279
|
+
return !(id && id.kind === parsed.kind && id.name === parsed.name && (id.publisher ?? "") === (parsed.publisher ?? ""));
|
|
5280
|
+
});
|
|
4993
5281
|
throw new Error(
|
|
4994
|
-
`Asset not found: ${ref}${(await this.publisherChangeHints([ref]))[ref] ?? ""}${
|
|
5282
|
+
`Asset not found: ${ref}${(await this.publisherChangeHints([ref]))[ref] ?? ""}${others.length ? ` (missing: ${others.join(", ")})` : ""}${available.length ? `; ${parsed.name} has version(s): ${available.join(", ")}` : ""}` + (otherKind ? `. ${otherKind}` : "")
|
|
4995
5283
|
);
|
|
4996
5284
|
}
|
|
4997
5285
|
if (parsed.kind === "preset" && missing.length > 0) {
|
|
@@ -5114,6 +5402,14 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
5114
5402
|
const entries = [...await this.buildCatalogEntries(resolved, repositories), ...lib.entries];
|
|
5115
5403
|
assertFlowsLoad(entries, "added");
|
|
5116
5404
|
assertNoLibrarySymlinks(entries, this.registry, repositories, opts?.link === true);
|
|
5405
|
+
if (!opts?.force && !this.global && (resolved.length > 0 || lib.entries.length > 0)) {
|
|
5406
|
+
await this.assertNoHandEditsOverwritten(
|
|
5407
|
+
entries,
|
|
5408
|
+
this.tryReadLock(),
|
|
5409
|
+
buildLockFile(resolved, overridesApplied, await this.libraryLockEntries(lib)),
|
|
5410
|
+
opts?.preferLockedLibrary ? "skaile update --force" : `skaile add ${ref} --force`
|
|
5411
|
+
);
|
|
5412
|
+
}
|
|
5117
5413
|
if (parsed.kind === "mcp-server" && !this.global) {
|
|
5118
5414
|
const decls = await loadMcpServerDeclarations(this.projectDir, { alsoDeclared: [ref] });
|
|
5119
5415
|
const mine = decls.find(
|
|
@@ -5126,11 +5422,14 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
5126
5422
|
);
|
|
5127
5423
|
}
|
|
5128
5424
|
}
|
|
5425
|
+
const harnessNamed = this.global && (this.harnessesOverride?.length ?? 0) > 0;
|
|
5426
|
+
if (harnessNamed && opts?.only && opts.onDroppedCopy)
|
|
5427
|
+
this.reportDroppedCopies(parsed, opts.onDroppedCopy);
|
|
5129
5428
|
const deployed = [
|
|
5130
5429
|
...new Set(
|
|
5131
5430
|
this.targetHarnesses().flatMap(
|
|
5132
5431
|
(t) => deployAll(
|
|
5133
|
-
this.entriesForHarness(entries, t),
|
|
5432
|
+
harnessNamed ? entries : this.entriesForHarness(entries, t),
|
|
5134
5433
|
repositories,
|
|
5135
5434
|
patches,
|
|
5136
5435
|
this.deployOptsFor(t, opts?.link, opts?.onSecretFile, {
|
|
@@ -5157,7 +5456,8 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
5157
5456
|
for (const placeholder of scaffoldDescriptionRefs(lib.entries, deployed)) {
|
|
5158
5457
|
opts?.onPlaceholderDescription?.(placeholder);
|
|
5159
5458
|
}
|
|
5160
|
-
this.addDependencyToConfig(ref);
|
|
5459
|
+
this.addDependencyToConfig(ref, opts?.only === true);
|
|
5460
|
+
this.widenDependencyRows(entries, parsed);
|
|
5161
5461
|
await this.renderHarnessMcpConfig();
|
|
5162
5462
|
await this.renderAgentInstances();
|
|
5163
5463
|
if (resolved.length > 0 || lib.entries.length > 0) {
|
|
@@ -5172,7 +5472,9 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
5172
5472
|
}
|
|
5173
5473
|
writeLock(
|
|
5174
5474
|
this.lockPath,
|
|
5175
|
-
this.withInstanceRenderings(
|
|
5475
|
+
this.withInstanceRenderings(
|
|
5476
|
+
mergeLockFile(prevLock, this.withCopiedFiles(this.withRenderedAgents(fresh), prevLock))
|
|
5477
|
+
)
|
|
5176
5478
|
);
|
|
5177
5479
|
}
|
|
5178
5480
|
for (const d of deployed) {
|
|
@@ -5562,6 +5864,25 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
5562
5864
|
return kind ? { kind, name } : null;
|
|
5563
5865
|
}
|
|
5564
5866
|
}
|
|
5867
|
+
/**
|
|
5868
|
+
* The refs among `refs` (`skill:@publisher/name`, `skill:name`, with or without `#version`)
|
|
5869
|
+
* that are not deployed for this manager's harnesses and scope, judged as `check` judges a
|
|
5870
|
+
* requirement. A ref that does not parse or names a kind this build does not install is
|
|
5871
|
+
* never reported. `run <flow> --dry-run` names the node skills a flow still lacks (p1757).
|
|
5872
|
+
*/
|
|
5873
|
+
undeployedSkills(refs) {
|
|
5874
|
+
const out = [];
|
|
5875
|
+
for (const ref of refs) {
|
|
5876
|
+
const parsed = parseRefTolerant(ref);
|
|
5877
|
+
if (!parsed) continue;
|
|
5878
|
+
const component = this.installTarget(parsed.kind);
|
|
5879
|
+
if (!component) continue;
|
|
5880
|
+
if (!isDeployed(component, parsed.name, this.harness, this.global, this.projectDir)) {
|
|
5881
|
+
out.push(ref);
|
|
5882
|
+
}
|
|
5883
|
+
}
|
|
5884
|
+
return out;
|
|
5885
|
+
}
|
|
5565
5886
|
/**
|
|
5566
5887
|
* The reverse guard of {@link removeWithDependencies}: which other locked assets (and
|
|
5567
5888
|
* declared presets) require `target`. Their requirements are read the way {@link lockedGraph}
|
|
@@ -5935,18 +6256,18 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
5935
6256
|
}
|
|
5936
6257
|
/**
|
|
5937
6258
|
* Tracked assets (`skaile.lock.yaml` or declared in `skaile.yaml`) whose copy
|
|
5938
|
-
* still sits in the project
|
|
5939
|
-
*
|
|
5940
|
-
* project
|
|
5941
|
-
*
|
|
6259
|
+
* still sits in the project dirs of another harness (`.claude/…`, `.omp/…`,
|
|
6260
|
+
* `.codex/…`) although this manager deploys to {@link AssetManager.harness}.
|
|
6261
|
+
* A project that moved with `skaile harness set` holds orphans there that
|
|
6262
|
+
* `remove` / `clean` / `list` no longer look at.
|
|
5942
6263
|
*
|
|
5943
|
-
* Read-only: nothing is deleted. Empty for
|
|
5944
|
-
*
|
|
6264
|
+
* Read-only: nothing is deleted. Empty for global mode and for kinds whose
|
|
6265
|
+
* dir is shared with the active target (flows).
|
|
5945
6266
|
*
|
|
5946
|
-
* @returns One {@link
|
|
6267
|
+
* @returns One {@link StaleHarnessCopy} per stale copy, sorted by harness, kind, then name.
|
|
5947
6268
|
*/
|
|
5948
|
-
|
|
5949
|
-
if (this.global
|
|
6269
|
+
listStaleHarnessCopies() {
|
|
6270
|
+
if (this.global) return [];
|
|
5950
6271
|
const tracked = /* @__PURE__ */ new Map();
|
|
5951
6272
|
const track = (kind, name) => {
|
|
5952
6273
|
const component = kind ? this.installTarget(kind) : void 0;
|
|
@@ -5972,20 +6293,34 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
5972
6293
|
} catch {
|
|
5973
6294
|
}
|
|
5974
6295
|
const out = [];
|
|
5975
|
-
for (const
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
lstatSync(p);
|
|
5981
|
-
return true;
|
|
5982
|
-
} catch {
|
|
5983
|
-
return false;
|
|
6296
|
+
for (const other of SUPPORTED_HARNESSES) {
|
|
6297
|
+
if (other === this.harness) continue;
|
|
6298
|
+
for (const { kind, name, component: k } of tracked.values()) {
|
|
6299
|
+
if (deployedDir(k, name, other, false, this.projectDir) === deployedDir(k, name, this.harness, false, this.projectDir)) {
|
|
6300
|
+
continue;
|
|
5984
6301
|
}
|
|
5985
|
-
|
|
5986
|
-
|
|
6302
|
+
const found = deployedPaths(k, name, other, false, this.projectDir).find((p) => {
|
|
6303
|
+
try {
|
|
6304
|
+
lstatSync(p);
|
|
6305
|
+
return true;
|
|
6306
|
+
} catch {
|
|
6307
|
+
return false;
|
|
6308
|
+
}
|
|
6309
|
+
});
|
|
6310
|
+
if (found) out.push({ harness: other, kind, name, path: found });
|
|
6311
|
+
}
|
|
5987
6312
|
}
|
|
5988
|
-
return out.sort(
|
|
6313
|
+
return out.sort(
|
|
6314
|
+
(a, b) => a.harness.localeCompare(b.harness) || a.kind.localeCompare(b.kind) || a.name.localeCompare(b.name)
|
|
6315
|
+
);
|
|
6316
|
+
}
|
|
6317
|
+
/**
|
|
6318
|
+
* @deprecated Use {@link AssetManager.listStaleHarnessCopies}, which covers every
|
|
6319
|
+
* other harness folder. This returns only its `.claude/` rows (the old default
|
|
6320
|
+
* deploy dir), in the old shape.
|
|
6321
|
+
*/
|
|
6322
|
+
listLegacyClaudeDeployed() {
|
|
6323
|
+
return this.listStaleHarnessCopies().filter((c) => c.harness === "claude-code").map(({ kind, name, path: path2 }) => ({ kind, name, path: path2 }));
|
|
5989
6324
|
}
|
|
5990
6325
|
/**
|
|
5991
6326
|
* List the **declared** top-level dependencies from `skaile.yaml`, each tagged
|
|
@@ -6922,8 +7257,10 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
6922
7257
|
};
|
|
6923
7258
|
}
|
|
6924
7259
|
}
|
|
6925
|
-
const
|
|
7260
|
+
const libraryEntry = await this.lockedLibraryEntry(parsed);
|
|
7261
|
+
const entry = libraryEntry ?? this.lockedSourceEntry(parsed) ?? await this.info(ref);
|
|
6926
7262
|
if (!entry || !existsSync(entry.source)) return { status: "not-found" };
|
|
7263
|
+
const toLabel = libraryEntry ? "library" : "source";
|
|
6927
7264
|
const wantPublisher = parsed.publisher?.replace(/^@/, "");
|
|
6928
7265
|
if (wantPublisher) {
|
|
6929
7266
|
const lockedHere = Object.keys(this.tryReadLock()?.assets ?? {}).map(parseCanonicalLockKey).filter((id) => id.kind === parsed.kind && id.name === parsed.name);
|
|
@@ -6941,7 +7278,11 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
6941
7278
|
parts.push(diffDeployedAgent(entry, opts, inst));
|
|
6942
7279
|
}
|
|
6943
7280
|
if (parts.every((d) => d === null)) return { status: "not-deployed" };
|
|
6944
|
-
const diff =
|
|
7281
|
+
const diff = labelDiffHeaders(
|
|
7282
|
+
parts.filter((d) => d !== null).join(""),
|
|
7283
|
+
"deployed",
|
|
7284
|
+
"rendered"
|
|
7285
|
+
);
|
|
6945
7286
|
return diff === "" ? { status: "identical" } : { status: "differs", diff };
|
|
6946
7287
|
}
|
|
6947
7288
|
const deployedPath = join(
|
|
@@ -6962,7 +7303,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
6962
7303
|
);
|
|
6963
7304
|
}
|
|
6964
7305
|
}
|
|
6965
|
-
return diffs.length > 0 ? { status: "differs", diff: diffs.join("") } : { status: "identical" };
|
|
7306
|
+
return diffs.length > 0 ? { status: "differs", diff: labelDiffHeaders(diffs.join(""), "deployed", toLabel) } : { status: "identical" };
|
|
6966
7307
|
}
|
|
6967
7308
|
/**
|
|
6968
7309
|
* The agent instances of `skaile.yaml` whose `ref` names `want` (an `agent:` ref, matched on
|
|
@@ -7022,6 +7363,10 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7022
7363
|
for (const [key, entry] of Object.entries(lockData.assets)) {
|
|
7023
7364
|
const rendered = prior?.assets[key]?.rendered;
|
|
7024
7365
|
if (rendered) entry.rendered = rendered;
|
|
7366
|
+
const copied = prior?.assets[key]?.copied;
|
|
7367
|
+
if (copied && prior?.assets[key]?.library?.sha256 === entry.library?.sha256) {
|
|
7368
|
+
entry.copied = copied;
|
|
7369
|
+
}
|
|
7025
7370
|
const composed = prior?.assets[key]?.composed;
|
|
7026
7371
|
if (composed) entry.composed = composed;
|
|
7027
7372
|
}
|
|
@@ -7137,15 +7482,30 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7137
7482
|
const { kind, name, publisher } = parseCanonicalLockKey(key);
|
|
7138
7483
|
if (kind && name && publisher) lockedPublisher[`${kind}:${name}`] = publisher;
|
|
7139
7484
|
}
|
|
7485
|
+
let librarySnap;
|
|
7140
7486
|
for (const entry of deployed) {
|
|
7141
7487
|
const publisher = lockedPublisher[`${entry.kind}:${entry.name}`];
|
|
7142
7488
|
const full = await this.info(
|
|
7143
7489
|
publisher ? `${entry.kind}:@${publisher}/${entry.name}` : `${entry.kind}:${entry.name}`
|
|
7144
7490
|
);
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7491
|
+
let restorable = false;
|
|
7492
|
+
if (!full && publisher !== void 0) {
|
|
7493
|
+
for (const [key, e] of Object.entries(lock?.assets ?? {})) {
|
|
7494
|
+
const id = parseCanonicalLockKey(key);
|
|
7495
|
+
if (id.kind !== entry.kind || id.name !== entry.name || id.publisher !== publisher) {
|
|
7496
|
+
continue;
|
|
7497
|
+
}
|
|
7498
|
+
if (e.source !== void 0) {
|
|
7499
|
+
restorable = true;
|
|
7500
|
+
break;
|
|
7501
|
+
}
|
|
7502
|
+
librarySnap ??= { snap: await this.loadLibraryIndex() };
|
|
7503
|
+
if (await this.restoredFromLockUrl(key, e, librarySnap.snap)) {
|
|
7504
|
+
restorable = true;
|
|
7505
|
+
break;
|
|
7506
|
+
}
|
|
7507
|
+
}
|
|
7508
|
+
}
|
|
7149
7509
|
if (!full && !restorable) {
|
|
7150
7510
|
if (publisher) {
|
|
7151
7511
|
const canonical = `${entry.kind}:@${publisher}/${entry.name}`;
|
|
@@ -7328,7 +7688,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7328
7688
|
return want !== null && gaps.some((g) => g.type === "library" && sameAsset(g.ref, want));
|
|
7329
7689
|
};
|
|
7330
7690
|
gaps = gaps.filter((g) => !(g.type === "requires" && libraryHeld(g.ref)));
|
|
7331
|
-
for (const gap of this.undeployedLockGaps(lock, named)) {
|
|
7691
|
+
for (const gap of await this.undeployedLockGaps(lock, named)) {
|
|
7332
7692
|
gaps.push(gap);
|
|
7333
7693
|
named.add(gapIdentity(gap.ref));
|
|
7334
7694
|
}
|
|
@@ -7350,7 +7710,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7350
7710
|
}),
|
|
7351
7711
|
...d.extra.map((f) => `${f} is not part of the asset`)
|
|
7352
7712
|
];
|
|
7353
|
-
const reason = `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 run \`skaile install --locked\` to restore it`;
|
|
7713
|
+
const reason = d.libraryChanged ? `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 the library holds other content now: copy your edit away, then run \`skaile update --force\` to replace it` : `is locked, but its deployed copy differs from the lock (${parts.join("; ")}) \u2014 run \`skaile install --locked\` to restore it`;
|
|
7354
7714
|
gaps.push({ type: "modified", ref: d.ref, reason, message: `${d.ref} ${reason}` });
|
|
7355
7715
|
named.add(gapIdentity(d.ref));
|
|
7356
7716
|
}
|
|
@@ -7404,6 +7764,22 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7404
7764
|
)
|
|
7405
7765
|
};
|
|
7406
7766
|
}
|
|
7767
|
+
/**
|
|
7768
|
+
* The first `../` compose folder of the locked library agent `kind:name` whose library copy
|
|
7769
|
+
* changed since the lock, or `undefined` (project scope only). `install --locked` cannot
|
|
7770
|
+
* restore such an agent; `update` moves the lock to the library's copy.
|
|
7771
|
+
*/
|
|
7772
|
+
async lockedComposeDrift(lock, kind, name) {
|
|
7773
|
+
if (this.global) return void 0;
|
|
7774
|
+
const { entries } = await this.restoreLibraryLockEntries(lock);
|
|
7775
|
+
const entry = entries.find((x) => x.kind === kind && x.name === name);
|
|
7776
|
+
if (!entry) return void 0;
|
|
7777
|
+
try {
|
|
7778
|
+
return composedDriftRefs(entry, this.deployOptsFor(this.harness))[0];
|
|
7779
|
+
} catch {
|
|
7780
|
+
return void 0;
|
|
7781
|
+
}
|
|
7782
|
+
}
|
|
7407
7783
|
/**
|
|
7408
7784
|
* Why the `agent:` ref of agent instance `id` binds to nothing, as the phrase that follows
|
|
7409
7785
|
* the ref in a {@link LockGap}; see {@link AssetManager.unboundAgentAdvice}.
|
|
@@ -7427,6 +7803,15 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7427
7803
|
return k.kind === "agent" && k.name === parsedRef?.name && (!publisher || !k.publisher || k.publisher === publisher);
|
|
7428
7804
|
});
|
|
7429
7805
|
if (lockedAgentKey !== void 0) {
|
|
7806
|
+
const lock = this.tryReadLock();
|
|
7807
|
+
const locked = parseCanonicalLockKey(lockedAgentKey);
|
|
7808
|
+
const composeRef = lock && locked.kind && locked.name ? await this.lockedComposeDrift(lock, locked.kind, locked.name) : void 0;
|
|
7809
|
+
if (composeRef) {
|
|
7810
|
+
return {
|
|
7811
|
+
lead: `its agent composes ${composeRef}, whose library copy changed since the lock`,
|
|
7812
|
+
advice: `run \`skaile update\` (it moves the lock to the library's copy), ${drop}`
|
|
7813
|
+
};
|
|
7814
|
+
}
|
|
7430
7815
|
const libraryFix = await this.lockedAgentLibraryHolds(lockedAgentKey) ? void 0 : (await this.unresolvedFixes([ref])).get(ref);
|
|
7431
7816
|
if (libraryFix) {
|
|
7432
7817
|
const register = libraryFix.replace(
|
|
@@ -7610,6 +7995,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7610
7995
|
continue;
|
|
7611
7996
|
}
|
|
7612
7997
|
if (lookup.state === "unregistered") {
|
|
7998
|
+
if (await this.restoredFromLockUrl(key, entry, snap)) continue;
|
|
7613
7999
|
const reason2 = `is locked, but library "${unregisteredLibraryName(origin)}" is not registered (renamed or removed?) \u2014 ${unregisteredLibraryFix(origin, ref)}`;
|
|
7614
8000
|
gaps.push({ type: "library", ref, reason: reason2, message: `${ref} ${reason2}`, manualFix: true });
|
|
7615
8001
|
continue;
|
|
@@ -7653,11 +8039,13 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7653
8039
|
if (!url || entry.library || !GIT_URL.test(url)) continue;
|
|
7654
8040
|
if (inScope && !inScope.has(key)) continue;
|
|
7655
8041
|
if (normalizeRepoUrl(url) === normalizeRepoUrl(FACTORY_SOURCE_URL)) continue;
|
|
7656
|
-
const { publisher, kind, name } = parseCanonicalLockKey(key);
|
|
8042
|
+
const { publisher, kind, name, version } = parseCanonicalLockKey(key);
|
|
7657
8043
|
if (!publisher || !kind || !name) continue;
|
|
7658
8044
|
if (registered.has(sourceCacheKey(url))) continue;
|
|
7659
8045
|
const ref = `${kind}:@${publisher}/${name}`;
|
|
7660
|
-
|
|
8046
|
+
const locked = version ? `${ref}#${version}` : void 0;
|
|
8047
|
+
if (GITHUB_REPO_URL.test(url) && await this.storeListsRef(stores, ref, online, locked))
|
|
8048
|
+
continue;
|
|
7661
8049
|
const reason = `is locked, but its source ${url} is not in skaile.yaml sources: any more \u2014 register it again with \`skaile source add ${url}\`, or drop the dependency with \`skaile remove ${ref}\``;
|
|
7662
8050
|
out.set(key, { type: "source", ref, reason, message: `${ref} ${reason}`, manualFix: true });
|
|
7663
8051
|
}
|
|
@@ -7670,7 +8058,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7670
8058
|
* air-gapped, `--no-catalog`) may hold the ref; `check` never asks, so a store lists only what
|
|
7671
8059
|
* its cached catalog holds.
|
|
7672
8060
|
*/
|
|
7673
|
-
async storeListsRef(stores, ref, online) {
|
|
8061
|
+
async storeListsRef(stores, ref, online, lockedRef) {
|
|
7674
8062
|
for (const store of stores) {
|
|
7675
8063
|
try {
|
|
7676
8064
|
if (this.injectedStoreFetcher) {
|
|
@@ -7679,9 +8067,12 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7679
8067
|
}
|
|
7680
8068
|
const remote = this.remoteStore(store.url);
|
|
7681
8069
|
if (remote.holdsCached(ref)) return true;
|
|
7682
|
-
if (!online)
|
|
8070
|
+
if (!online) {
|
|
8071
|
+
if (lockedRef && remote.holdsCached(lockedRef)) return true;
|
|
8072
|
+
continue;
|
|
8073
|
+
}
|
|
7683
8074
|
if (this.catalogUrlOverride === "") return true;
|
|
7684
|
-
if (await remote.resolve(ref)) return true;
|
|
8075
|
+
if (await (lockedRef ? remote.revalidate(lockedRef) : remote.resolve(ref))) return true;
|
|
7685
8076
|
} catch {
|
|
7686
8077
|
if (online) return true;
|
|
7687
8078
|
}
|
|
@@ -7739,6 +8130,44 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7739
8130
|
}
|
|
7740
8131
|
return out;
|
|
7741
8132
|
}
|
|
8133
|
+
/**
|
|
8134
|
+
* Record, on every library-origin entry of `lock` that is copied into a harness folder, the
|
|
8135
|
+
* files of the deployed copy and their sha256 (`LockEntry.copied`), so a hand edit is named
|
|
8136
|
+
* even after the library moved past the lock (p1641). Call it after the deploy. An entry that
|
|
8137
|
+
* is unchanged since `prev` keeps its record, or stays without one: the deployed bytes may
|
|
8138
|
+
* carry an edit the deploy did not touch. Project mode only; a `--link` deploy and a patched
|
|
8139
|
+
* asset are not recorded.
|
|
8140
|
+
*/
|
|
8141
|
+
withCopiedFiles(lock, prev) {
|
|
8142
|
+
if (this.global) return lock;
|
|
8143
|
+
const { patches } = this.loadConfig();
|
|
8144
|
+
for (const [key, entry] of Object.entries(lock.assets)) {
|
|
8145
|
+
if (!entry.library || entry.library.installed) continue;
|
|
8146
|
+
const before = prev?.assets[key];
|
|
8147
|
+
if (before && before.library?.sha256 === entry.library.sha256) {
|
|
8148
|
+
if (before.copied) entry.copied = before.copied;
|
|
8149
|
+
else delete entry.copied;
|
|
8150
|
+
continue;
|
|
8151
|
+
}
|
|
8152
|
+
delete entry.copied;
|
|
8153
|
+
const { kind, name } = parseCanonicalLockKey(key);
|
|
8154
|
+
const component = kind ? this.installTarget(kind) : void 0;
|
|
8155
|
+
if (!kind || !name || !component || component === "agent") continue;
|
|
8156
|
+
if (patches[`${kind}:${name}`]) continue;
|
|
8157
|
+
const dest = deployedDir(component, name, this.harness, this.global, this.projectDir);
|
|
8158
|
+
try {
|
|
8159
|
+
const st = lstatSync(dest);
|
|
8160
|
+
if (st.isSymbolicLink() || !st.isDirectory()) continue;
|
|
8161
|
+
const rows = listAssetFiles(dest).map((path2) => ({
|
|
8162
|
+
path: path2,
|
|
8163
|
+
sha256: computeHash(join(dest, path2))
|
|
8164
|
+
}));
|
|
8165
|
+
if (rows.length > 0) entry.copied = rows.sort((a, b) => a.path.localeCompare(b.path));
|
|
8166
|
+
} catch {
|
|
8167
|
+
}
|
|
8168
|
+
}
|
|
8169
|
+
return lock;
|
|
8170
|
+
}
|
|
7742
8171
|
/**
|
|
7743
8172
|
* Record, on every agent entry of `lock` that has none, the files the agent's harness
|
|
7744
8173
|
* rendering occupies and their sha256. Call it after the deploy, so the bytes hashed are the
|
|
@@ -7948,6 +8377,73 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7948
8377
|
}
|
|
7949
8378
|
return out;
|
|
7950
8379
|
}
|
|
8380
|
+
/**
|
|
8381
|
+
* Hand edits in the deployed copy of a library asset whose library moved past the lock (a
|
|
8382
|
+
* version bump, or an in-place edit of the same version): {@link restoreLibraryLockEntries}
|
|
8383
|
+
* drops such an entry, so {@link lockedCopyDrift} would not see the edit and `update` would
|
|
8384
|
+
* replace the file without a word (p1641). `covered` holds the `kind:@publisher/name` of the
|
|
8385
|
+
* entries that were compared already. The lock's per-file record (`copied:`) names the edited
|
|
8386
|
+
* files; a lock without one (written before it existed) compares the deployed folder with the
|
|
8387
|
+
* one library hash and names the files that also differ from the library's new content.
|
|
8388
|
+
*/
|
|
8389
|
+
async changedLibraryCopyEdits(lock, covered, patches) {
|
|
8390
|
+
const out = [];
|
|
8391
|
+
let snap;
|
|
8392
|
+
const fileSets = /* @__PURE__ */ new Map();
|
|
8393
|
+
for (const [key, entry] of Object.entries(lock.assets)) {
|
|
8394
|
+
const origin = entry.library;
|
|
8395
|
+
if (!origin || origin.installed) continue;
|
|
8396
|
+
const { kind, name, publisher } = parseCanonicalLockKey(key);
|
|
8397
|
+
if (!kind || !name || !publisher) continue;
|
|
8398
|
+
const ref = `${kind}:@${publisher}/${name}`;
|
|
8399
|
+
if (covered.has(ref) || patches[`${kind}:${name}`]) continue;
|
|
8400
|
+
const component = this.installTarget(kind);
|
|
8401
|
+
if (!component || component === "agent") continue;
|
|
8402
|
+
const dest = deployedDir(component, name, this.harness, this.global, this.projectDir);
|
|
8403
|
+
try {
|
|
8404
|
+
const st = lstatSync(dest);
|
|
8405
|
+
if (st.isSymbolicLink() || !st.isDirectory()) continue;
|
|
8406
|
+
} catch {
|
|
8407
|
+
continue;
|
|
8408
|
+
}
|
|
8409
|
+
let modified = [];
|
|
8410
|
+
if (entry.copied && entry.copied.length > 0) {
|
|
8411
|
+
for (const f of entry.copied) {
|
|
8412
|
+
const file = join(dest, f.path);
|
|
8413
|
+
if (!existsSync(file)) continue;
|
|
8414
|
+
try {
|
|
8415
|
+
if (computeHash(file) !== f.sha256) modified.push(f.path);
|
|
8416
|
+
} catch {
|
|
8417
|
+
modified.push(f.path);
|
|
8418
|
+
}
|
|
8419
|
+
}
|
|
8420
|
+
} else if (origin.sha256) {
|
|
8421
|
+
snap ??= await this.loadLibraryIndex();
|
|
8422
|
+
const lookup = this.lockedLibrary(origin, snap, { kind, publisher, name });
|
|
8423
|
+
if (lookup.state !== "ok") continue;
|
|
8424
|
+
const found = (await scanDirectory(lookup.path, publisher, { knownKinds: this.knownKinds })).find((x) => x.kind === kind && x.name === name);
|
|
8425
|
+
if (!found) continue;
|
|
8426
|
+
const current = withLibraryFiles(found, lookup.path, fileSets, this.registry);
|
|
8427
|
+
const assetRoot = statSync(current.source).isDirectory() ? current.source : dirname(current.source);
|
|
8428
|
+
const hash = computeDeterministicHash(
|
|
8429
|
+
dest,
|
|
8430
|
+
listAssetFiles(dest),
|
|
8431
|
+
posix.normalize(relative(lookup.path, assetRoot).split(sep).join("/"))
|
|
8432
|
+
);
|
|
8433
|
+
if (hash === origin.sha256) continue;
|
|
8434
|
+
modified = deployedAssetDrift(current, {
|
|
8435
|
+
registry: this.registry,
|
|
8436
|
+
harness: this.harness,
|
|
8437
|
+
global: this.global,
|
|
8438
|
+
cwd: this.projectDir
|
|
8439
|
+
})?.modified ?? [];
|
|
8440
|
+
}
|
|
8441
|
+
if (modified.length > 0) {
|
|
8442
|
+
out.push({ ref, key, modified, extra: [], library: true, libraryChanged: true });
|
|
8443
|
+
}
|
|
8444
|
+
}
|
|
8445
|
+
return out;
|
|
8446
|
+
}
|
|
7951
8447
|
/**
|
|
7952
8448
|
* Locked assets whose deployed copy differs from the bytes the lock covers: a file edited by
|
|
7953
8449
|
* hand, or a file the asset does not ship. One row per asset, `ref` being `kind:@publisher/name`
|
|
@@ -7991,6 +8487,15 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
7991
8487
|
const ref = `${e.kind}:@${(e.publisher ?? "").replace(/^@/, "")}/${e.name}`;
|
|
7992
8488
|
out.push({ ref, key: keyOf.get(ref) ?? ref, ...drift, library: true });
|
|
7993
8489
|
}
|
|
8490
|
+
out.push(
|
|
8491
|
+
...await this.changedLibraryCopyEdits(
|
|
8492
|
+
lock,
|
|
8493
|
+
new Set(
|
|
8494
|
+
entries.map((e) => `${e.kind}:@${(e.publisher ?? "").replace(/^@/, "")}/${e.name}`)
|
|
8495
|
+
),
|
|
8496
|
+
patches
|
|
8497
|
+
)
|
|
8498
|
+
);
|
|
7994
8499
|
for (const [key, entry] of Object.entries(lock.assets)) {
|
|
7995
8500
|
if (!entry.source || entry.files.length === 0) continue;
|
|
7996
8501
|
const { kind, name } = parseCanonicalLockKey(key);
|
|
@@ -8065,7 +8570,7 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
8065
8570
|
*
|
|
8066
8571
|
* @param named - `kind:name` identities already reported; they are skipped.
|
|
8067
8572
|
*/
|
|
8068
|
-
undeployedLockGaps(lock, named) {
|
|
8573
|
+
async undeployedLockGaps(lock, named) {
|
|
8069
8574
|
const gaps = [];
|
|
8070
8575
|
for (const [key, entry] of Object.entries(lock?.assets ?? {})) {
|
|
8071
8576
|
if (entry.library?.installed) continue;
|
|
@@ -8084,7 +8589,8 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
8084
8589
|
this.global,
|
|
8085
8590
|
this.projectDir
|
|
8086
8591
|
).find((p) => isSymlink(p) && !existsSync(p));
|
|
8087
|
-
const
|
|
8592
|
+
const composeDrift = component === "agent" && !dangling && lock ? await this.lockedComposeDrift(lock, kind, name) : void 0;
|
|
8593
|
+
const reason = composeDrift ? `(composes ${composeDrift}: the library's copy changed since the lock; \`skaile update\` moves the lock to it)` : dangling ? `is locked but its deployed copy is a symlink to nothing (${relative(this.projectDir, dangling)}) \u2014 run \`skaile install --locked\`` : "is locked but its deployed copy is missing \u2014 run `skaile install --locked`";
|
|
8088
8594
|
gaps.push({ type: "drift", ref, reason, message: `${ref} ${reason}` });
|
|
8089
8595
|
}
|
|
8090
8596
|
return gaps;
|
|
@@ -8474,20 +8980,26 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
8474
8980
|
* user-scope SSOT `~/.skaile/skaile.yaml`, **bootstrapping** the file (and its
|
|
8475
8981
|
* parent dir) when absent so `skaile add --global` works on a fresh machine.
|
|
8476
8982
|
*/
|
|
8477
|
-
addDependencyToConfig(ref) {
|
|
8983
|
+
addDependencyToConfig(ref, only = false) {
|
|
8478
8984
|
const configPath = join(this.stateRoot, "skaile.yaml");
|
|
8479
|
-
const
|
|
8985
|
+
const requested = this.global && this.harnessesOverride?.length ? this.harnessesOverride : void 0;
|
|
8480
8986
|
if (!existsSync(configPath)) {
|
|
8481
8987
|
if (!this.global) return;
|
|
8482
8988
|
mkdirSync(this.stateRoot, { recursive: true });
|
|
8483
8989
|
const fresh = { dependencies: [ref] };
|
|
8484
|
-
if (
|
|
8990
|
+
if (requested) this.setEntryHarnessRow(fresh, ref, requested);
|
|
8485
8991
|
writeFileSync(configPath, stringify(fresh, { lineWidth: 120 }));
|
|
8486
8992
|
return;
|
|
8487
8993
|
}
|
|
8488
8994
|
const raw = parse(readFileSync(configPath, "utf8")) ?? {};
|
|
8489
8995
|
if (!Array.isArray(raw.dependencies)) raw.dependencies = [];
|
|
8490
8996
|
const deps = raw.dependencies;
|
|
8997
|
+
const limit = requested ? only ? requested : this.widenedHarnessRow(
|
|
8998
|
+
raw,
|
|
8999
|
+
ref,
|
|
9000
|
+
requested,
|
|
9001
|
+
deps.some((d) => this.sameDeclaredAsset(d, ref))
|
|
9002
|
+
) : void 0;
|
|
8491
9003
|
const limitChanged = this.global ? this.setEntryHarnessRow(raw, ref, limit) : false;
|
|
8492
9004
|
if (deps.includes(ref) && deps.filter((d) => this.sameDeclaredAsset(d, ref)).length === 1) {
|
|
8493
9005
|
if (limitChanged) writeFileSync(configPath, stringify(raw, { lineWidth: 120 }));
|
|
@@ -8654,6 +9166,6 @@ Fix the asset in the source repo, then run \`skaile source sync\` and add it aga
|
|
|
8654
9166
|
}
|
|
8655
9167
|
};
|
|
8656
9168
|
|
|
8657
|
-
export { AssetManager,
|
|
8658
|
-
//# sourceMappingURL=chunk-
|
|
8659
|
-
//# sourceMappingURL=chunk-
|
|
9169
|
+
export { AssetManager, LibraryEntryError, MissingManifestError, installAgentInstances, labelDiffHeaders, mcpNotRunnableReason, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, setLibraryAssetCheck, setRenamedEntryLookup, softDepName };
|
|
9170
|
+
//# sourceMappingURL=chunk-KGHYXXXV.js.map
|
|
9171
|
+
//# sourceMappingURL=chunk-KGHYXXXV.js.map
|