@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,256 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { logErr, logInfo, logWarn, logOk } from './chunk-
|
|
4
|
-
import { getKindRegistry } from './chunk-
|
|
5
|
-
import { validateFlowVersions } from './chunk-
|
|
6
|
-
import { loadFlow } from './chunk-
|
|
1
|
+
import { checkAgentInstances, unknownKeyWarnings, unknownHarnessErrors } from './chunk-LRBP3234.js';
|
|
2
|
+
import { registeredAssetKeys, unresolvedManifestDependencies, warnIgnoredDomainFiles, warnLegacyBundleFiles, removedDomainOption, rejectRemovedDomainOption, reportLibrarySymlinks, composeRefContext, assetEntryRef, manifestPublisherProblems, manifestRootProblems, manifestFilesProblems, manifestEntryNameProblems, manifestRequiresProblems, checkAssetFile, findEntryManifestFile, declaredVersion, manifestVersionMismatchMessage, MANIFEST_GLOBS, manifestParseErrorText, checkAsset, invalidPublisherMessage, invalidSemverText } from './chunk-2XM3ZH36.js';
|
|
3
|
+
import { logErr, logInfo, logWarn, logOk } from './chunk-T2VBPVWZ.js';
|
|
4
|
+
import { getKindRegistry } from './chunk-JJJ2G4K2.js';
|
|
5
|
+
import { validateFlowVersions } from './chunk-URCJIV7T.js';
|
|
6
|
+
import { loadFlow } from './chunk-PJJSBZZP.js';
|
|
7
7
|
import { flowSkillVersionPins } from './chunk-7RGTAEG6.js';
|
|
8
|
-
import { missingRootAssets, assertManifestEditable, scanUnlistedAssets, UNLISTED_SCAN_SKIP_DIRS } from './chunk-
|
|
9
|
-
import { parseManifestFile } from './chunk-
|
|
10
|
-
import { resolveRuntimeAssets } from './chunk-
|
|
11
|
-
import { decodeSkaileYaml,
|
|
12
|
-
import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest,
|
|
13
|
-
import { readAssetBody } from './chunk-
|
|
14
|
-
import { parseAssetRef, isValidPublisher, isValidAssetName, ASSET_NAME_HINT } from './chunk-
|
|
8
|
+
import { missingRootAssets, assertManifestEditable, scanUnlistedAssets, UNLISTED_SCAN_SKIP_DIRS } from './chunk-6CYKTHNT.js';
|
|
9
|
+
import { parseManifestFile } from './chunk-MAZ3UXJK.js';
|
|
10
|
+
import { resolveRuntimeAssets } from './chunk-QPWR3YMY.js';
|
|
11
|
+
import { decodeSkaileYaml, localConnectorMountDir, symlinkEscapeOfProject, isInsideProject } from './chunk-KJSC2ZD6.js';
|
|
12
|
+
import { SKAILE_MANIFEST_FILENAME, loadSkPublishManifest, isNonAssetPath } from './chunk-KPKGWXUJ.js';
|
|
13
|
+
import { withYamlQuotingHint, readAssetBody } from './chunk-JMIKGAUA.js';
|
|
14
|
+
import { parseAssetRef, isValidPublisher, isValidAssetName, ASSET_NAME_HINT } from './chunk-IZQOO6MN.js';
|
|
15
15
|
import { execFileSync } from 'child_process';
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import fs from 'fs';
|
|
17
|
+
import path from 'path';
|
|
18
18
|
import { Command } from 'commander';
|
|
19
19
|
import { parse } from 'yaml';
|
|
20
20
|
|
|
21
|
-
// cli/src/type-guards.ts
|
|
22
|
-
function isRecord(value) {
|
|
23
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// cli/src/commands/validate-instances.ts
|
|
27
|
-
var AGENT_MANIFEST_FILE = "agent.yaml";
|
|
28
|
-
var TRIGGER_REQUIRED_FIELDS = {
|
|
29
|
-
schedule: ["cron", "prompt"],
|
|
30
|
-
webhook: ["prompt"],
|
|
31
|
-
channel: ["when"],
|
|
32
|
-
event: ["event"]
|
|
33
|
-
};
|
|
34
|
-
var err = (code, message, at) => ({
|
|
35
|
-
code,
|
|
36
|
-
severity: "error",
|
|
37
|
-
message,
|
|
38
|
-
path: at
|
|
39
|
-
});
|
|
40
|
-
function readAssetFacts(manifest) {
|
|
41
|
-
const facts = {
|
|
42
|
-
lifecycle: manifest.lifecycle,
|
|
43
|
-
hasIo: manifest.io !== void 0 && manifest.io !== null,
|
|
44
|
-
connectorSlots: [],
|
|
45
|
-
otherSlots: [],
|
|
46
|
-
triggerIds: []
|
|
47
|
-
};
|
|
48
|
-
for (const item of Array.isArray(manifest.composes) ? manifest.composes : []) {
|
|
49
|
-
if (!isRecord(item) || typeof item.id !== "string") continue;
|
|
50
|
-
(item.kind === "connector" ? facts.connectorSlots : facts.otherSlots).push(item.id);
|
|
51
|
-
}
|
|
52
|
-
for (const t of Array.isArray(manifest.triggers) ? manifest.triggers : []) {
|
|
53
|
-
if (isRecord(t) && typeof t.id === "string") facts.triggerIds.push(t.id);
|
|
54
|
-
}
|
|
55
|
-
return facts;
|
|
56
|
-
}
|
|
57
|
-
function loadAsset(projectDir, id, ref) {
|
|
58
|
-
const at = `agents.${id}.ref`;
|
|
59
|
-
let dir;
|
|
60
|
-
try {
|
|
61
|
-
dir = resolveAgentDefinitionDir(projectDir, ref);
|
|
62
|
-
} catch (e) {
|
|
63
|
-
if (!(e instanceof AgentRefResolutionError)) throw e;
|
|
64
|
-
return { diagnostic: err("agent_ref_unresolved", `agents.${id}: ${e.message}`, at) };
|
|
65
|
-
}
|
|
66
|
-
if (dir === void 0) {
|
|
67
|
-
return {
|
|
68
|
-
diagnostic: err(
|
|
69
|
-
"agent_ref_unresolved",
|
|
70
|
-
`agents.${id}: ref "${ref}" cannot be resolved \u2014 no ai-assets/ directory above the project`,
|
|
71
|
-
at
|
|
72
|
-
)
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const manifestPath = path2.join(dir, AGENT_MANIFEST_FILE);
|
|
76
|
-
let text;
|
|
77
|
-
try {
|
|
78
|
-
text = fs2.readFileSync(manifestPath, "utf-8");
|
|
79
|
-
} catch {
|
|
80
|
-
return {
|
|
81
|
-
diagnostic: err(
|
|
82
|
-
"agent_ref_unresolved",
|
|
83
|
-
`agents.${id}: ref "${ref}" resolves to ${dir}, which has no ${AGENT_MANIFEST_FILE}`,
|
|
84
|
-
at
|
|
85
|
-
)
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
let manifest;
|
|
89
|
-
try {
|
|
90
|
-
manifest = parse(text);
|
|
91
|
-
} catch (e) {
|
|
92
|
-
return {
|
|
93
|
-
diagnostic: err(
|
|
94
|
-
"agent_manifest_invalid",
|
|
95
|
-
`agents.${id}: ${manifestPath} is not valid YAML: ${e instanceof Error ? e.message : String(e)}`,
|
|
96
|
-
at
|
|
97
|
-
)
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
if (!isRecord(manifest)) {
|
|
101
|
-
return {
|
|
102
|
-
diagnostic: err(
|
|
103
|
-
"agent_manifest_invalid",
|
|
104
|
-
`agents.${id}: ${manifestPath} is not a mapping`,
|
|
105
|
-
at
|
|
106
|
-
)
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
return { facts: readAssetFacts(manifest) };
|
|
110
|
-
}
|
|
111
|
-
function checkTriggers(id, triggers, assetTriggerIds) {
|
|
112
|
-
const out = [];
|
|
113
|
-
const seen = /* @__PURE__ */ new Set();
|
|
114
|
-
triggers.forEach((trigger, i) => {
|
|
115
|
-
const at = `agents.${id}.triggers[${i}]`;
|
|
116
|
-
if (seen.has(trigger.id)) {
|
|
117
|
-
out.push(
|
|
118
|
-
err(
|
|
119
|
-
"agent_trigger_duplicate",
|
|
120
|
-
`agents.${id}: trigger id "${trigger.id}" is declared twice`,
|
|
121
|
-
`${at}.id`
|
|
122
|
-
)
|
|
123
|
-
);
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
seen.add(trigger.id);
|
|
127
|
-
if (!assetTriggerIds || assetTriggerIds.includes(trigger.id)) return;
|
|
128
|
-
if (!trigger.kind) {
|
|
129
|
-
out.push(
|
|
130
|
-
err(
|
|
131
|
-
"agent_trigger_unknown",
|
|
132
|
-
`agents.${id}: trigger "${trigger.id}" is not declared by the agent asset (${assetTriggerIds.length > 0 ? `has: ${assetTriggerIds.join(", ")}` : "it declares no triggers"}) \u2014 add \`kind\` and the trigger's fields to declare a new one`,
|
|
133
|
-
`${at}.id`
|
|
134
|
-
)
|
|
135
|
-
);
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
const missing = TRIGGER_REQUIRED_FIELDS[trigger.kind].filter(
|
|
139
|
-
(field) => trigger[field] === void 0
|
|
140
|
-
);
|
|
141
|
-
if (missing.length > 0) {
|
|
142
|
-
out.push(
|
|
143
|
-
err(
|
|
144
|
-
"agent_trigger_incomplete",
|
|
145
|
-
`agents.${id}: trigger "${trigger.id}" (kind ${trigger.kind}) is not in the asset, so it must declare ${missing.join(", ")}`,
|
|
146
|
-
at
|
|
147
|
-
)
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
return out;
|
|
152
|
-
}
|
|
153
|
-
function checkConnectors(id, instance, facts, connectorIds) {
|
|
154
|
-
const out = [];
|
|
155
|
-
for (const [slot, connectorId] of Object.entries(instance.connectors ?? {})) {
|
|
156
|
-
const at = `agents.${id}.connectors.${slot}`;
|
|
157
|
-
if (!facts.connectorSlots.includes(slot)) {
|
|
158
|
-
const hint = facts.otherSlots.includes(slot) ? `"${slot}" is a slot of a non-connector item` : facts.connectorSlots.length > 0 ? `the asset's connector slots are: ${facts.connectorSlots.join(", ")}` : "the asset declares no connector slots";
|
|
159
|
-
out.push(
|
|
160
|
-
err(
|
|
161
|
-
"agent_connector_slot_unknown",
|
|
162
|
-
`agents.${id}: connectors.${slot} is not a connector slot id of the agent asset (${hint})`,
|
|
163
|
-
at
|
|
164
|
-
)
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
if (!connectorIds.includes(connectorId)) {
|
|
168
|
-
out.push(
|
|
169
|
-
err(
|
|
170
|
-
"agent_connector_unknown",
|
|
171
|
-
`agents.${id}: connectors.${slot} points at "${connectorId}", which is not in skaile.yaml connectors[]${connectorIds.length > 0 ? ` (has: ${connectorIds.join(", ")})` : ""}`,
|
|
172
|
-
at
|
|
173
|
-
)
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return out;
|
|
178
|
-
}
|
|
179
|
-
function checkAgentInstances(projectDir, parsed) {
|
|
180
|
-
const diagnostics = [];
|
|
181
|
-
const instances = normalizeAgentInstances(parsed.agents, diagnostics);
|
|
182
|
-
const agent = isRecord(parsed.agent) ? parsed.agent : void 0;
|
|
183
|
-
diagnostics.push(...agentBlockKeyDiagnostics(parsed.agent));
|
|
184
|
-
if (agent?.subagents !== void 0) {
|
|
185
|
-
diagnostics.push(
|
|
186
|
-
err(
|
|
187
|
-
"agent_subagents_removed",
|
|
188
|
-
"`agent.subagents` was removed \u2014 declare each subagent as an agent asset and bind it under `agents:` with `lifecycle: role`",
|
|
189
|
-
"agent.subagents"
|
|
190
|
-
)
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
if (agent?.instances !== void 0) {
|
|
194
|
-
diagnostics.push(
|
|
195
|
-
err(
|
|
196
|
-
"misplaced_agent_instances",
|
|
197
|
-
"`agent.instances` is not a skaile.yaml key \u2014 declare instances under root `agents:`",
|
|
198
|
-
"agent.instances"
|
|
199
|
-
)
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
diagnostics.push(
|
|
203
|
-
...agentInstanceDiagnostics({
|
|
204
|
-
agent: {
|
|
205
|
-
definition: typeof agent?.definition === "string" ? agent.definition : void 0,
|
|
206
|
-
instances
|
|
207
|
-
}
|
|
208
|
-
})
|
|
209
|
-
);
|
|
210
|
-
if (!instances) return diagnostics;
|
|
211
|
-
const connectorIds = (Array.isArray(parsed.connectors) ? parsed.connectors : []).flatMap(
|
|
212
|
-
(c) => isRecord(c) && typeof c.id === "string" ? [c.id] : []
|
|
213
|
-
);
|
|
214
|
-
for (const [id, instance] of Object.entries(instances)) {
|
|
215
|
-
const loaded = loadAsset(projectDir, id, instance.ref);
|
|
216
|
-
if ("diagnostic" in loaded) {
|
|
217
|
-
diagnostics.push(loaded.diagnostic, ...checkTriggers(id, instance.triggers ?? [], void 0));
|
|
218
|
-
continue;
|
|
219
|
-
}
|
|
220
|
-
const { facts } = loaded;
|
|
221
|
-
const lifecycle = instance.lifecycle ?? facts.lifecycle ?? "standing";
|
|
222
|
-
if (lifecycle === "role" && !facts.hasIo) {
|
|
223
|
-
diagnostics.push(
|
|
224
|
-
err(
|
|
225
|
-
"agent_role_missing_io",
|
|
226
|
-
`agents.${id}: lifecycle "role" needs the agent asset to declare \`io\` ({ input, output } JSON Schemas)`,
|
|
227
|
-
`agents.${id}.lifecycle`
|
|
228
|
-
)
|
|
229
|
-
);
|
|
230
|
-
}
|
|
231
|
-
diagnostics.push(...checkConnectors(id, instance, facts, connectorIds));
|
|
232
|
-
diagnostics.push(...checkTriggers(id, instance.triggers ?? [], facts.triggerIds));
|
|
233
|
-
}
|
|
234
|
-
return diagnostics;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// cli/src/commands/validate.ts
|
|
238
|
-
var MANIFEST_GLOBS = [
|
|
239
|
-
{ pattern: /\/SKILL\.md$/, kind: "skill" },
|
|
240
|
-
{ pattern: /\/agent\.yaml$/, kind: "agent" },
|
|
241
|
-
{ pattern: /\/AGENT\.md$/, kind: "agent" },
|
|
242
|
-
{ pattern: /\/CONTRACT\.md$/, kind: "contract" },
|
|
243
|
-
{ pattern: /\/PERSONA\.md$/, kind: "persona" },
|
|
244
|
-
{ pattern: /\/RULESET\.md$/, kind: "ruleset" },
|
|
245
|
-
{ pattern: /\.flow\.yaml$/, kind: "flow" },
|
|
246
|
-
{ pattern: /\.flow\.json$/, kind: "flow" },
|
|
247
|
-
{ pattern: /\/CONNECTOR\.md$/, kind: "connector" },
|
|
248
|
-
{ pattern: /\.prompt\.md$/, kind: "prompt" },
|
|
249
|
-
{ pattern: /\/MCP\.md$/, kind: "mcp-server" },
|
|
250
|
-
{ pattern: /\/knowledge\.yaml$/, kind: "knowledge" },
|
|
251
|
-
{ pattern: /\/knowledge\/index\.yaml$/, kind: "knowledge" },
|
|
252
|
-
{ pattern: /\.preset\.yaml$/, kind: "preset" }
|
|
253
|
-
];
|
|
254
21
|
var HARNESS_DIRS = /* @__PURE__ */ new Set([".claude", ".codex", ".omp"]);
|
|
255
22
|
var SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
256
23
|
"node_modules",
|
|
@@ -265,12 +32,12 @@ function findManifestCandidates(rootPath) {
|
|
|
265
32
|
function walk(dir) {
|
|
266
33
|
let entries;
|
|
267
34
|
try {
|
|
268
|
-
entries =
|
|
35
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
269
36
|
} catch {
|
|
270
37
|
return;
|
|
271
38
|
}
|
|
272
39
|
for (const entry of entries) {
|
|
273
|
-
const fullPath =
|
|
40
|
+
const fullPath = path.join(dir, entry.name);
|
|
274
41
|
if (entry.isDirectory()) {
|
|
275
42
|
if (!SKIP_DIRS.has(entry.name)) walk(fullPath);
|
|
276
43
|
} else if (entry.isFile()) {
|
|
@@ -287,10 +54,12 @@ function findManifestCandidates(rootPath) {
|
|
|
287
54
|
return candidates;
|
|
288
55
|
}
|
|
289
56
|
function parseManifestCandidate(c, absRoot) {
|
|
290
|
-
const content =
|
|
57
|
+
const content = fs.readFileSync(c.filePath, "utf-8");
|
|
291
58
|
const res = parseManifestFile(c.filePath, content);
|
|
292
59
|
if (!res.ok) {
|
|
293
|
-
logErr(
|
|
60
|
+
logErr(
|
|
61
|
+
`${path.relative(absRoot, c.filePath)} [${c.kind}] \u2014 ${manifestParseErrorText(res.reason)}`
|
|
62
|
+
);
|
|
294
63
|
return { kind: "error" };
|
|
295
64
|
}
|
|
296
65
|
return {
|
|
@@ -300,25 +69,25 @@ function parseManifestCandidate(c, absRoot) {
|
|
|
300
69
|
};
|
|
301
70
|
}
|
|
302
71
|
function libraryRootOf(absRoot) {
|
|
303
|
-
for (let dir = absRoot; ; dir =
|
|
304
|
-
if (
|
|
305
|
-
if (
|
|
72
|
+
for (let dir = absRoot; ; dir = path.dirname(dir)) {
|
|
73
|
+
if (fs.existsSync(path.join(dir, SKAILE_MANIFEST_FILENAME))) return dir;
|
|
74
|
+
if (path.dirname(dir) === dir) return absRoot;
|
|
306
75
|
}
|
|
307
76
|
}
|
|
308
77
|
function validateManifestCandidate(c, parsed, body, absRoot, registry, strictConformance, composeRefs) {
|
|
309
|
-
const relPath =
|
|
78
|
+
const relPath = path.relative(absRoot, c.filePath);
|
|
310
79
|
let errors = 0;
|
|
311
80
|
let warnings = 0;
|
|
312
|
-
const dirName =
|
|
81
|
+
const dirName = path.basename(path.dirname(c.filePath));
|
|
313
82
|
const checked = checkAsset(
|
|
314
83
|
c.kind,
|
|
315
84
|
parsed ?? {},
|
|
316
85
|
body,
|
|
317
86
|
dirName,
|
|
318
87
|
registry,
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
{ dir:
|
|
88
|
+
fs.readFileSync(c.filePath, "utf-8"),
|
|
89
|
+
path.basename(c.filePath),
|
|
90
|
+
{ dir: path.dirname(c.filePath), libraryRoot: libraryRootOf(absRoot), composeRefs }
|
|
322
91
|
);
|
|
323
92
|
for (const f of checked.errors) {
|
|
324
93
|
logErr(`${relPath} [${f.tag}] \u2014 ${f.text}`);
|
|
@@ -341,7 +110,7 @@ function scanIdentities(root) {
|
|
|
341
110
|
for (const c of findManifestCandidates(root)) {
|
|
342
111
|
let parsed;
|
|
343
112
|
try {
|
|
344
|
-
const res = parseManifestFile(c.filePath,
|
|
113
|
+
const res = parseManifestFile(c.filePath, fs.readFileSync(c.filePath, "utf-8"));
|
|
345
114
|
if (!res.ok) continue;
|
|
346
115
|
parsed = res.data;
|
|
347
116
|
} catch {
|
|
@@ -355,14 +124,14 @@ function scanIdentities(root) {
|
|
|
355
124
|
return identities;
|
|
356
125
|
}
|
|
357
126
|
function validateManifests(rootPath, strictConformance, registeredAssets = /* @__PURE__ */ new Set()) {
|
|
358
|
-
const absRoot =
|
|
359
|
-
if (!
|
|
127
|
+
const absRoot = path.resolve(rootPath);
|
|
128
|
+
if (!fs.existsSync(absRoot)) {
|
|
360
129
|
logErr(`Path does not exist: ${absRoot}`);
|
|
361
130
|
return { total: 0, errors: 1, warnings: 0 };
|
|
362
131
|
}
|
|
363
132
|
const registry = getKindRegistry();
|
|
364
133
|
const candidates = findManifestCandidates(absRoot);
|
|
365
|
-
const isLibrary =
|
|
134
|
+
const isLibrary = fs.existsSync(path.join(absRoot, SKAILE_MANIFEST_FILENAME));
|
|
366
135
|
let errors = reportLibrarySymlinks(absRoot, {
|
|
367
136
|
wholeTree: isLibrary,
|
|
368
137
|
skipDirs: isLibrary ? void 0 : HARNESS_DIRS
|
|
@@ -395,14 +164,14 @@ function validateManifests(rootPath, strictConformance, registeredAssets = /* @_
|
|
|
395
164
|
const obj = parseResult.parsed;
|
|
396
165
|
const identity = obj && typeof obj === "object" ? obj[c.kind === "flow" ? "id" : "name"] : null;
|
|
397
166
|
if (typeof identity === "string" && identity.length > 0) {
|
|
398
|
-
const dir =
|
|
167
|
+
const dir = path.dirname(c.filePath);
|
|
399
168
|
const key = `${c.kind}:${identity}`;
|
|
400
169
|
const first = seenIdentity.get(key);
|
|
401
170
|
if (first === void 0) {
|
|
402
171
|
seenIdentity.set(key, dir);
|
|
403
172
|
} else if (first !== dir) {
|
|
404
173
|
logErr(
|
|
405
|
-
`${
|
|
174
|
+
`${path.relative(absRoot, c.filePath)} [${c.kind}] \u2014 ${key} is also defined in ${path.relative(absRoot, first) || "."}; two directories cannot share a kind and name (\`skaile library index\` keeps only the first).`
|
|
406
175
|
);
|
|
407
176
|
errors++;
|
|
408
177
|
}
|
|
@@ -415,12 +184,12 @@ function findWorkspaceManifests(rootPath) {
|
|
|
415
184
|
function walk(dir) {
|
|
416
185
|
let entries;
|
|
417
186
|
try {
|
|
418
|
-
entries =
|
|
187
|
+
entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
419
188
|
} catch {
|
|
420
189
|
return;
|
|
421
190
|
}
|
|
422
191
|
for (const entry of entries) {
|
|
423
|
-
const full =
|
|
192
|
+
const full = path.join(dir, entry.name);
|
|
424
193
|
if (entry.isDirectory()) {
|
|
425
194
|
if (!SKIP_DIRS.has(entry.name)) walk(full);
|
|
426
195
|
} else if (entry.isFile() && /(^|\.)skaile\.yaml$/.test(entry.name)) {
|
|
@@ -500,7 +269,7 @@ function validateLocalConnectorMountPaths(projectDir, relPath, connectors) {
|
|
|
500
269
|
const dir = localConnectorMountDir(c, projectDir);
|
|
501
270
|
if (!dir) continue;
|
|
502
271
|
const escapesTo = symlinkEscapeOfProject(dir, projectDir);
|
|
503
|
-
if (!
|
|
272
|
+
if (!fs.existsSync(dir)) {
|
|
504
273
|
logErr(
|
|
505
274
|
`${relPath} [connectors] \u2014 connector_mount_path_missing: connectors.${c.id}.mountPath: ${dir} does not exist; create the directory or fix the path`
|
|
506
275
|
);
|
|
@@ -519,22 +288,33 @@ function validateLocalConnectorMountPaths(projectDir, relPath, connectors) {
|
|
|
519
288
|
return errors;
|
|
520
289
|
}
|
|
521
290
|
async function validateWorkspaceManifests(rootPath) {
|
|
522
|
-
const absRoot =
|
|
291
|
+
const absRoot = path.resolve(rootPath);
|
|
523
292
|
const files = findWorkspaceManifests(absRoot);
|
|
524
293
|
let errors = 0;
|
|
525
294
|
for (const file of files) {
|
|
526
|
-
const relPath =
|
|
295
|
+
const relPath = path.relative(absRoot, file);
|
|
527
296
|
let parsed;
|
|
297
|
+
let text = "";
|
|
528
298
|
try {
|
|
529
|
-
|
|
299
|
+
text = fs.readFileSync(file, "utf-8");
|
|
300
|
+
parsed = parse(text) ?? {};
|
|
530
301
|
} catch (e) {
|
|
531
|
-
|
|
302
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
303
|
+
logErr(`${relPath} \u2014 parse error: ${withYamlQuotingHint(message, text)}`);
|
|
304
|
+
errors++;
|
|
305
|
+
continue;
|
|
306
|
+
}
|
|
307
|
+
const unreadable = decodeSkaileYaml(text).diagnostics.find(
|
|
308
|
+
(d) => d.code === "non_object_root" || d.code === "invalid_value_shape"
|
|
309
|
+
);
|
|
310
|
+
if (unreadable) {
|
|
311
|
+
logErr(`${relPath} \u2014 parse error: ${unreadable.message}`);
|
|
532
312
|
errors++;
|
|
533
313
|
continue;
|
|
534
314
|
}
|
|
535
315
|
errors += validateWorkspaceRefs(collectWorkspaceRefFields(parsed), relPath);
|
|
536
316
|
errors += validateWorkspaceAssets(parsed, relPath);
|
|
537
|
-
for (const d of checkAgentInstances(
|
|
317
|
+
for (const d of checkAgentInstances(path.dirname(file), parsed)) {
|
|
538
318
|
const line = `${relPath} [agents] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`;
|
|
539
319
|
if (d.severity === "error") {
|
|
540
320
|
logErr(line);
|
|
@@ -543,7 +323,7 @@ async function validateWorkspaceManifests(rootPath) {
|
|
|
543
323
|
logWarn(line);
|
|
544
324
|
}
|
|
545
325
|
}
|
|
546
|
-
const decoded = decodeSkaileYaml(
|
|
326
|
+
const decoded = decodeSkaileYaml(fs.readFileSync(file, "utf-8"));
|
|
547
327
|
for (const d of decoded.diagnostics) {
|
|
548
328
|
if (!CONNECTOR_ERROR_CODES.includes(d.code)) continue;
|
|
549
329
|
logErr(`${relPath} [connectors] \u2014 ${d.code}: ${d.path ? `${d.path}: ` : ""}${d.message}`);
|
|
@@ -564,13 +344,18 @@ async function validateWorkspaceManifests(rootPath) {
|
|
|
564
344
|
logWarn(line);
|
|
565
345
|
}
|
|
566
346
|
}
|
|
347
|
+
for (const line of unknownKeyWarnings(decoded.diagnostics, relPath)) logWarn(line);
|
|
348
|
+
for (const line of await unknownHarnessErrors(path.dirname(file), decoded.config, relPath)) {
|
|
349
|
+
logErr(line);
|
|
350
|
+
errors++;
|
|
351
|
+
}
|
|
567
352
|
errors += validateLocalConnectorMountPaths(
|
|
568
|
-
|
|
353
|
+
path.dirname(file),
|
|
569
354
|
relPath,
|
|
570
355
|
decoded.config?.connectors ?? []
|
|
571
356
|
);
|
|
572
357
|
if ((decoded.config?.connectors ?? []).length > 0) {
|
|
573
|
-
const assets = await resolveRuntimeAssets(
|
|
358
|
+
const assets = await resolveRuntimeAssets(path.dirname(file));
|
|
574
359
|
if (!assets.warnings.some((w) => w.code === "repo_unavailable")) {
|
|
575
360
|
for (const w of assets.warnings) {
|
|
576
361
|
if (w.code !== "missing_driver" || !w.name) continue;
|
|
@@ -583,7 +368,7 @@ async function validateWorkspaceManifests(rootPath) {
|
|
|
583
368
|
return { total: files.length, errors };
|
|
584
369
|
}
|
|
585
370
|
function validatePublishManifestRoots(rootPath) {
|
|
586
|
-
const absRoot =
|
|
371
|
+
const absRoot = path.resolve(rootPath);
|
|
587
372
|
const manifest = loadSkPublishManifest(absRoot);
|
|
588
373
|
if (!manifest) return 0;
|
|
589
374
|
const missing = missingRootAssets(absRoot, manifest);
|
|
@@ -592,40 +377,37 @@ function validatePublishManifestRoots(rootPath) {
|
|
|
592
377
|
`${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${assetEntryRef(a, manifest)}: root "${a.root}" does not exist. Run \`skaile library index <library>\` to drop the entry, or restore the directory.`
|
|
593
378
|
);
|
|
594
379
|
}
|
|
595
|
-
|
|
596
|
-
if (!manifest.source) {
|
|
597
|
-
for (const a of manifest.assets ?? []) {
|
|
598
|
-
if (a.root || a.source || !Array.isArray(a.files) || a.files.length === 0) continue;
|
|
599
|
-
const patterns = a.files.map((f) => typeof f === "string" ? f : f.path).filter(Boolean);
|
|
600
|
-
const { unmatched } = expandManifestFiles(absRoot, patterns);
|
|
601
|
-
if (unmatched.length === 0) continue;
|
|
602
|
-
unmatchedEntries++;
|
|
603
|
-
logErr(
|
|
604
|
-
`${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${assetEntryRef(a, manifest)}: files: ${unmatched.join(", ")} not found. Fix the \`files:\` list or drop the entry.`
|
|
605
|
-
);
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
return missing.length + unmatchedEntries;
|
|
380
|
+
return missing.length;
|
|
609
381
|
}
|
|
610
382
|
async function validatePublishManifestUnlisted(rootPath) {
|
|
611
|
-
const absRoot =
|
|
383
|
+
const absRoot = path.resolve(rootPath);
|
|
612
384
|
const manifest = loadSkPublishManifest(absRoot);
|
|
613
385
|
if (!manifest) return 0;
|
|
386
|
+
const registry = getKindRegistry();
|
|
387
|
+
const libraryRoot = libraryRootOf(absRoot);
|
|
388
|
+
const composeRefs = composeRefContext(
|
|
389
|
+
scanIdentities(libraryRoot),
|
|
390
|
+
await registeredAssetKeys(libraryRoot),
|
|
391
|
+
manifest.publisher
|
|
392
|
+
);
|
|
614
393
|
const unlisted = (await scanUnlistedAssets(
|
|
615
394
|
absRoot,
|
|
616
|
-
manifest.publisher ??
|
|
617
|
-
|
|
395
|
+
manifest.publisher ?? path.basename(absRoot),
|
|
396
|
+
registry,
|
|
618
397
|
UNLISTED_SCAN_SKIP_DIRS
|
|
619
|
-
)).filter(
|
|
398
|
+
)).filter(
|
|
399
|
+
(u) => !u.registeredAt && !u.parseFailure && // a file that does not parse has its own parse error
|
|
400
|
+
checkAssetFile(u.entry.source, u.entry.kind, registry, absRoot, composeRefs).length === 0
|
|
401
|
+
);
|
|
620
402
|
for (const u of unlisted) {
|
|
621
403
|
logErr(
|
|
622
|
-
`${
|
|
404
|
+
`${path.relative(absRoot, u.entry.source)} [${u.entry.kind}] \u2014 ${u.entry.kind}:${u.entry.name} is on disk but not in ${SKAILE_MANIFEST_FILENAME}, so it is not published. Run \`skaile library index <library>\` to list it, or delete the directory.`
|
|
623
405
|
);
|
|
624
406
|
}
|
|
625
407
|
return unlisted.length;
|
|
626
408
|
}
|
|
627
409
|
function validatePublishManifestRequires(rootPath) {
|
|
628
|
-
const problems = manifestRequiresProblems(
|
|
410
|
+
const problems = manifestRequiresProblems(path.resolve(rootPath));
|
|
629
411
|
for (const p of problems) {
|
|
630
412
|
logErr(
|
|
631
413
|
`${SKAILE_MANIFEST_FILENAME} [assets] \u2014 ${p.asset}: ${p.message}. Use the \`kind:@<publisher>/name[#version]\` form.`
|
|
@@ -634,29 +416,30 @@ function validatePublishManifestRequires(rootPath) {
|
|
|
634
416
|
return problems.length;
|
|
635
417
|
}
|
|
636
418
|
function validatePublishManifestPublisherSlugs(rootPath) {
|
|
637
|
-
const problems = manifestPublisherProblems(
|
|
419
|
+
const problems = manifestPublisherProblems(path.resolve(rootPath));
|
|
638
420
|
for (const message of problems) logErr(message);
|
|
639
421
|
return problems.length;
|
|
640
422
|
}
|
|
641
423
|
function validatePublishManifestRootPaths(rootPath) {
|
|
642
424
|
const problems = [
|
|
643
|
-
...manifestRootProblems(
|
|
644
|
-
...
|
|
425
|
+
...manifestRootProblems(path.resolve(rootPath)),
|
|
426
|
+
...manifestFilesProblems(path.resolve(rootPath)),
|
|
427
|
+
...manifestEntryNameProblems(path.resolve(rootPath))
|
|
645
428
|
];
|
|
646
429
|
for (const message of problems) logErr(message);
|
|
647
430
|
return problems.length;
|
|
648
431
|
}
|
|
649
432
|
function validatePublishManifestParses(rootPath) {
|
|
650
433
|
try {
|
|
651
|
-
assertManifestEditable(
|
|
434
|
+
assertManifestEditable(path.resolve(rootPath));
|
|
652
435
|
return 0;
|
|
653
|
-
} catch (
|
|
654
|
-
logErr(
|
|
436
|
+
} catch (err) {
|
|
437
|
+
logErr(err instanceof Error ? err.message : String(err));
|
|
655
438
|
return 1;
|
|
656
439
|
}
|
|
657
440
|
}
|
|
658
441
|
function validatePublishManifestVersions(rootPath) {
|
|
659
|
-
const absRoot =
|
|
442
|
+
const absRoot = path.resolve(rootPath);
|
|
660
443
|
const manifest = loadSkPublishManifest(absRoot);
|
|
661
444
|
if (!manifest || manifest.source) return 0;
|
|
662
445
|
let warnings = 0;
|
|
@@ -664,7 +447,7 @@ function validatePublishManifestVersions(rootPath) {
|
|
|
664
447
|
if (a.source || !a.version) continue;
|
|
665
448
|
const file = findEntryManifestFile(absRoot, a);
|
|
666
449
|
if (!file) continue;
|
|
667
|
-
const res = parseManifestFile(file,
|
|
450
|
+
const res = parseManifestFile(file, fs.readFileSync(file, "utf-8"));
|
|
668
451
|
if (!res.ok) continue;
|
|
669
452
|
const fileVersion = declaredVersion(res.data);
|
|
670
453
|
if (fileVersion === void 0 || fileVersion === a.version) continue;
|
|
@@ -672,7 +455,7 @@ function validatePublishManifestVersions(rootPath) {
|
|
|
672
455
|
manifestVersionMismatchMessage(
|
|
673
456
|
assetEntryRef(a, manifest),
|
|
674
457
|
a.version,
|
|
675
|
-
toPosix(
|
|
458
|
+
toPosix(path.relative(absRoot, file)),
|
|
676
459
|
fileVersion
|
|
677
460
|
)
|
|
678
461
|
);
|
|
@@ -681,7 +464,7 @@ function validatePublishManifestVersions(rootPath) {
|
|
|
681
464
|
return warnings;
|
|
682
465
|
}
|
|
683
466
|
function validatePublishManifestPublishers(rootPath) {
|
|
684
|
-
const absRoot =
|
|
467
|
+
const absRoot = path.resolve(rootPath);
|
|
685
468
|
const manifest = loadSkPublishManifest(absRoot);
|
|
686
469
|
if (!manifest || manifest.source) return 0;
|
|
687
470
|
const bare = (p) => p.trim().replace(/^@/, "");
|
|
@@ -691,13 +474,13 @@ function validatePublishManifestPublishers(rootPath) {
|
|
|
691
474
|
if (a.source || !resolved) continue;
|
|
692
475
|
const file = findEntryManifestFile(absRoot, a);
|
|
693
476
|
if (!file) continue;
|
|
694
|
-
const res = parseManifestFile(file,
|
|
477
|
+
const res = parseManifestFile(file, fs.readFileSync(file, "utf-8"));
|
|
695
478
|
if (!res.ok) continue;
|
|
696
479
|
const meta = res.data.metadata;
|
|
697
480
|
const declared = meta !== null && typeof meta === "object" ? meta.publisher : null;
|
|
698
481
|
if (typeof declared !== "string" || bare(declared) === bare(resolved)) continue;
|
|
699
482
|
logWarn(
|
|
700
|
-
`${toPosix(
|
|
483
|
+
`${toPosix(path.relative(absRoot, file))} [publisher] \u2014 metadata.publisher "${bare(declared)}" differs from the manifest publisher "${bare(resolved)}" for ${assetEntryRef(a, manifest)}. The manifest wins and the file value is ignored: delete \`metadata.publisher\` from the file, or set the publisher in ${SKAILE_MANIFEST_FILENAME}.`
|
|
701
484
|
);
|
|
702
485
|
warnings++;
|
|
703
486
|
}
|
|
@@ -705,7 +488,7 @@ function validatePublishManifestPublishers(rootPath) {
|
|
|
705
488
|
}
|
|
706
489
|
var EXCLUDED_PATHS = ["skaileup-shared/", "external/", "docs/"];
|
|
707
490
|
function toPosix(p) {
|
|
708
|
-
return p.split(
|
|
491
|
+
return p.split(path.sep).join("/");
|
|
709
492
|
}
|
|
710
493
|
function isExcludedPath(relPath) {
|
|
711
494
|
const rel = toPosix(relPath);
|
|
@@ -721,9 +504,9 @@ var VERSIONED_KINDS = {
|
|
|
721
504
|
};
|
|
722
505
|
function readAssetVersion(c) {
|
|
723
506
|
const kind = c.kind;
|
|
724
|
-
const fileName =
|
|
725
|
-
const dirName =
|
|
726
|
-
const content =
|
|
507
|
+
const fileName = path.basename(c.filePath);
|
|
508
|
+
const dirName = path.basename(path.dirname(c.filePath));
|
|
509
|
+
const content = fs.readFileSync(c.filePath, "utf-8");
|
|
727
510
|
if (c.filePath.endsWith(".md")) {
|
|
728
511
|
const res = parseManifestFile(c.filePath, content);
|
|
729
512
|
const data = res.ok ? res.data : {};
|
|
@@ -756,26 +539,26 @@ function readAssetVersion(c) {
|
|
|
756
539
|
};
|
|
757
540
|
}
|
|
758
541
|
function collectAssetVersions(root) {
|
|
759
|
-
if (!
|
|
542
|
+
if (!fs.existsSync(root)) return [];
|
|
760
543
|
const assets = [];
|
|
761
544
|
for (const c of findManifestCandidates(root)) {
|
|
762
545
|
if (!VERSIONED_KINDS[c.kind]) continue;
|
|
763
546
|
if (c.filePath.endsWith(".flow.json")) continue;
|
|
764
|
-
if (isExcludedPath(
|
|
547
|
+
if (isExcludedPath(path.relative(root, c.filePath))) continue;
|
|
765
548
|
assets.push(readAssetVersion(c));
|
|
766
549
|
}
|
|
767
550
|
return assets;
|
|
768
551
|
}
|
|
769
552
|
function assetLocation(a, root) {
|
|
770
|
-
return toPosix(
|
|
553
|
+
return toPosix(path.relative(root, a.filePath));
|
|
771
554
|
}
|
|
772
555
|
function findChangelogUnit(assetRelPath, root) {
|
|
773
|
-
let dir =
|
|
556
|
+
let dir = path.posix.dirname(toPosix(assetRelPath));
|
|
774
557
|
for (; ; ) {
|
|
775
558
|
const candidate = dir === "." ? "CHANGELOG.md" : `${dir}/CHANGELOG.md`;
|
|
776
|
-
if (
|
|
559
|
+
if (fs.existsSync(path.join(root, candidate))) return candidate;
|
|
777
560
|
if (dir === ".") return null;
|
|
778
|
-
dir =
|
|
561
|
+
dir = path.posix.dirname(dir);
|
|
779
562
|
}
|
|
780
563
|
}
|
|
781
564
|
function checkChangelogUnits(modifiedFiles, root) {
|
|
@@ -825,7 +608,7 @@ function checkVersionBumps(assets, root) {
|
|
|
825
608
|
let warnings = 0;
|
|
826
609
|
for (const a of assets) {
|
|
827
610
|
if (!a.version) continue;
|
|
828
|
-
const relPath = toPosix(
|
|
611
|
+
const relPath = toPosix(path.relative(root, a.filePath));
|
|
829
612
|
try {
|
|
830
613
|
const headContent = execFileSync("git", ["show", `HEAD:./${relPath}`], {
|
|
831
614
|
cwd: root,
|
|
@@ -856,9 +639,9 @@ function checkFlowVersionPins(assets, root) {
|
|
|
856
639
|
let pins;
|
|
857
640
|
try {
|
|
858
641
|
pins = flowSkillVersionPins(loadFlow(f.filePath));
|
|
859
|
-
} catch (
|
|
642
|
+
} catch (err) {
|
|
860
643
|
logWarn(
|
|
861
|
-
`flow:${f.name} (${
|
|
644
|
+
`flow:${f.name} (${path.relative(root, f.filePath)}) \u2014 could not be read: ${err instanceof Error ? err.message : err}`
|
|
862
645
|
);
|
|
863
646
|
warnings++;
|
|
864
647
|
continue;
|
|
@@ -875,18 +658,32 @@ function checkFlowVersionPins(assets, root) {
|
|
|
875
658
|
return { errors, warnings };
|
|
876
659
|
}
|
|
877
660
|
function resolveCheckRoot(pathArg) {
|
|
661
|
+
let root = process.cwd();
|
|
878
662
|
if (pathArg) {
|
|
879
|
-
|
|
880
|
-
if (!
|
|
881
|
-
logErr(`Path does not exist: ${
|
|
663
|
+
root = path.resolve(pathArg);
|
|
664
|
+
if (!fs.existsSync(root)) {
|
|
665
|
+
logErr(`Path does not exist: ${root}`);
|
|
882
666
|
return null;
|
|
883
667
|
}
|
|
884
|
-
|
|
668
|
+
} else {
|
|
669
|
+
for (let dir = root; ; dir = path.dirname(dir)) {
|
|
670
|
+
if (fs.existsSync(path.join(dir, SKAILE_MANIFEST_FILENAME))) {
|
|
671
|
+
root = dir;
|
|
672
|
+
break;
|
|
673
|
+
}
|
|
674
|
+
if (path.dirname(dir) === dir) break;
|
|
675
|
+
}
|
|
885
676
|
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
677
|
+
if (!isCheckableRoot(root)) {
|
|
678
|
+
logErr(
|
|
679
|
+
`Nothing to check in ${root}: no ${SKAILE_MANIFEST_FILENAME} and no versioned asset (skill, agent, flow, prompt, contract or preset) found. Run it in a library or pass the library directory.`
|
|
680
|
+
);
|
|
681
|
+
return null;
|
|
889
682
|
}
|
|
683
|
+
return root;
|
|
684
|
+
}
|
|
685
|
+
function isCheckableRoot(root) {
|
|
686
|
+
return fs.existsSync(path.join(root, SKAILE_MANIFEST_FILENAME)) || collectAssetVersions(root).length > 0;
|
|
890
687
|
}
|
|
891
688
|
function isInGitWorkTree(root) {
|
|
892
689
|
try {
|
|
@@ -899,11 +696,28 @@ function isInGitWorkTree(root) {
|
|
|
899
696
|
return false;
|
|
900
697
|
}
|
|
901
698
|
}
|
|
699
|
+
function hasCommit(root) {
|
|
700
|
+
try {
|
|
701
|
+
execFileSync("git", ["rev-parse", "--verify", "--quiet", "HEAD"], {
|
|
702
|
+
cwd: root,
|
|
703
|
+
stdio: ["ignore", "ignore", "ignore"]
|
|
704
|
+
});
|
|
705
|
+
return true;
|
|
706
|
+
} catch {
|
|
707
|
+
return false;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
902
710
|
function changedFiles(root, ref, what, opts = {}) {
|
|
903
711
|
if (!isInGitWorkTree(root)) {
|
|
904
712
|
logErr(`${what} needs a git repository: ${root} is not inside a git work tree.`);
|
|
905
713
|
return null;
|
|
906
714
|
}
|
|
715
|
+
if (ref === "HEAD" && !hasCommit(root)) {
|
|
716
|
+
logErr(
|
|
717
|
+
`${what} compares with the last commit, and ${root} has no commit yet. Commit the library first (\`skaile library commit <name>\`), then run it again.`
|
|
718
|
+
);
|
|
719
|
+
return null;
|
|
720
|
+
}
|
|
907
721
|
try {
|
|
908
722
|
const out = execFileSync(
|
|
909
723
|
"git",
|
|
@@ -924,16 +738,16 @@ function changedFiles(root, ref, what, opts = {}) {
|
|
|
924
738
|
changed.push(...fresh.trim().split("\n").filter(Boolean));
|
|
925
739
|
}
|
|
926
740
|
return changed;
|
|
927
|
-
} catch (
|
|
928
|
-
const stderr =
|
|
929
|
-
const reason = (stderr || (
|
|
741
|
+
} catch (err) {
|
|
742
|
+
const stderr = err instanceof Error && "stderr" in err ? String(err.stderr).trim() : "";
|
|
743
|
+
const reason = (stderr || (err instanceof Error ? err.message : String(err))).split("\n")[0];
|
|
930
744
|
logErr(`git diff failed in ${root}: ${reason}`);
|
|
931
745
|
return null;
|
|
932
746
|
}
|
|
933
747
|
}
|
|
934
748
|
function assetOwnDir(a) {
|
|
935
|
-
const dir =
|
|
936
|
-
if (["skill", "agent", "contract"].includes(a.kind) ||
|
|
749
|
+
const dir = path.dirname(a.filePath);
|
|
750
|
+
if (["skill", "agent", "contract"].includes(a.kind) || path.basename(dir) === a.name) return dir;
|
|
937
751
|
return null;
|
|
938
752
|
}
|
|
939
753
|
function assetChanged(a, changedAbs) {
|
|
@@ -941,8 +755,8 @@ function assetChanged(a, changedAbs) {
|
|
|
941
755
|
const dir = assetOwnDir(a);
|
|
942
756
|
if (dir === null) return false;
|
|
943
757
|
for (const f of changedAbs) {
|
|
944
|
-
const rel =
|
|
945
|
-
if (rel.startsWith("..") ||
|
|
758
|
+
const rel = path.relative(dir, f);
|
|
759
|
+
if (rel.startsWith("..") || path.isAbsolute(rel)) continue;
|
|
946
760
|
if (!isNonAssetPath(toPosix(rel))) return true;
|
|
947
761
|
}
|
|
948
762
|
return false;
|
|
@@ -967,7 +781,7 @@ function runVersionsCheck(pathArg, opts) {
|
|
|
967
781
|
process.exit(1);
|
|
968
782
|
return;
|
|
969
783
|
}
|
|
970
|
-
const changedAbs = new Set(changed.map((f) =>
|
|
784
|
+
const changedAbs = new Set(changed.map((f) => path.resolve(root, f)));
|
|
971
785
|
assets = assets.filter((a) => assetChanged(a, changedAbs));
|
|
972
786
|
}
|
|
973
787
|
logInfo(`Checking versions in ${root}`);
|
|
@@ -1000,8 +814,8 @@ function makeValidateCommand() {
|
|
|
1000
814
|
"--strict-conformance",
|
|
1001
815
|
"Treat Agent Skills (agentskills.io) standard findings as errors"
|
|
1002
816
|
).action(async (targetPath, opts) => {
|
|
1003
|
-
const absPath =
|
|
1004
|
-
if (
|
|
817
|
+
const absPath = path.resolve(targetPath);
|
|
818
|
+
if (fs.existsSync(absPath) && !fs.statSync(absPath).isDirectory()) {
|
|
1005
819
|
logErr(`${absPath} is not a directory: nothing to validate. Pass the library directory.`);
|
|
1006
820
|
process.exit(1);
|
|
1007
821
|
return;
|
|
@@ -1029,7 +843,7 @@ function makeValidateCommand() {
|
|
|
1029
843
|
warnIgnoredDomainFiles(absPath);
|
|
1030
844
|
warnLegacyBundleFiles(absPath);
|
|
1031
845
|
logInfo(`Scanned ${total} asset manifest(s) and ${ws.total} skaile.yaml file(s)`);
|
|
1032
|
-
if (total === 0 && ws.total === 0 && totalErrors === 0 && !
|
|
846
|
+
if (total === 0 && ws.total === 0 && totalErrors === 0 && !fs.existsSync(path.join(absPath, SKAILE_MANIFEST_FILENAME))) {
|
|
1033
847
|
logErr(
|
|
1034
848
|
`Nothing to validate in ${absPath}: no asset manifest, skaile.yaml or ${SKAILE_MANIFEST_FILENAME} found.`
|
|
1035
849
|
);
|
|
@@ -1077,6 +891,6 @@ function makeValidateCommand() {
|
|
|
1077
891
|
return cmd;
|
|
1078
892
|
}
|
|
1079
893
|
|
|
1080
|
-
export {
|
|
1081
|
-
//# sourceMappingURL=chunk-
|
|
1082
|
-
//# sourceMappingURL=chunk-
|
|
894
|
+
export { makeValidateCommand, scanIdentities };
|
|
895
|
+
//# sourceMappingURL=chunk-Z3IRZBXB.js.map
|
|
896
|
+
//# sourceMappingURL=chunk-Z3IRZBXB.js.map
|