@skaile/workspaces 5.5.0 → 5.6.1
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 +95 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-KTFUB7EX.js → asset-feeds-LU7NHOAP.js} +27 -14
- package/dist/asset-feeds-LU7NHOAP.js.map +1 -0
- package/dist/asset-manager/catalog-deployer.js +9 -9
- package/dist/asset-manager/index.js +18 -18
- package/dist/asset-manager/installer.js +11 -11
- package/dist/asset-manager/renderers.js +20 -2
- package/dist/asset-manager/src/index.d.ts +66 -24
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/asset-manager/src/install-agent.d.ts +22 -14
- package/dist/asset-manager/src/install-agent.d.ts.map +1 -1
- package/dist/asset-manager/src/install-instances.d.ts +55 -0
- package/dist/asset-manager/src/install-instances.d.ts.map +1 -0
- package/dist/asset-manager/src/installer.d.ts +30 -7
- package/dist/asset-manager/src/installer.d.ts.map +1 -1
- package/dist/asset-manager/src/renderers.d.ts +29 -8
- package/dist/asset-manager/src/renderers.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +14 -14
- package/dist/bridge/drivers/codex.js +20 -14
- package/dist/bridge/drivers/codex.js.map +1 -1
- package/dist/bridge/drivers/continue.js +11 -11
- package/dist/bridge/drivers/echo.js +3 -3
- package/dist/bridge/drivers/gemini.js +6 -6
- package/dist/bridge/drivers/goose.js +11 -11
- package/dist/bridge/drivers/omp.js +4 -4
- package/dist/bridge/drivers/opencode.js +11 -11
- package/dist/bridge/drivers/qwen.js +6 -6
- package/dist/bridge/index.js +15 -15
- package/dist/bridge/src/codex/native-policy.d.ts +1 -1
- package/dist/bridge/src/drivers/codex.d.ts +2 -1
- package/dist/bridge/src/drivers/codex.d.ts.map +1 -1
- package/dist/{chunk-LCULZ4ED.js → chunk-27HS2DHB.js} +4 -4
- package/dist/{chunk-LCULZ4ED.js.map → chunk-27HS2DHB.js.map} +1 -1
- package/dist/{chunk-X4GO3GJZ.js → chunk-2GRB5ITE.js} +4 -4
- package/dist/{chunk-X4GO3GJZ.js.map → chunk-2GRB5ITE.js.map} +1 -1
- package/dist/{chunk-75EX5GY4.js → chunk-2KOKBTR4.js} +197 -118
- package/dist/chunk-2KOKBTR4.js.map +1 -0
- package/dist/{chunk-ES2FXWQ4.js → chunk-2NYXQYHN.js} +4 -4
- package/dist/{chunk-ES2FXWQ4.js.map → chunk-2NYXQYHN.js.map} +1 -1
- package/dist/{chunk-ORUHADS6.js → chunk-2W4LBLIN.js} +386 -60
- package/dist/chunk-2W4LBLIN.js.map +1 -0
- package/dist/{chunk-SNVOASTL.js → chunk-2XFUXGV6.js} +3 -3
- package/dist/{chunk-SNVOASTL.js.map → chunk-2XFUXGV6.js.map} +1 -1
- package/dist/{chunk-ZDKJHQY2.js → chunk-3TXEJN4W.js} +2 -2
- package/dist/{chunk-ZDKJHQY2.js.map → chunk-3TXEJN4W.js.map} +1 -1
- package/dist/{chunk-JELTQ4H7.js → chunk-45VFGT7A.js} +3 -3
- package/dist/{chunk-JELTQ4H7.js.map → chunk-45VFGT7A.js.map} +1 -1
- package/dist/{chunk-XGIS325V.js → chunk-46OVMT76.js} +3 -3
- package/dist/{chunk-XGIS325V.js.map → chunk-46OVMT76.js.map} +1 -1
- package/dist/{chunk-37GBJLF5.js → chunk-47ZD34KB.js} +3 -3
- package/dist/{chunk-37GBJLF5.js.map → chunk-47ZD34KB.js.map} +1 -1
- package/dist/{chunk-LFEGIZTW.js → chunk-4GNJELPH.js} +2 -2
- package/dist/{chunk-LFEGIZTW.js.map → chunk-4GNJELPH.js.map} +1 -1
- package/dist/{chunk-V7VDSFPS.js → chunk-5B5IZVEP.js} +2 -2
- package/dist/{chunk-V7VDSFPS.js.map → chunk-5B5IZVEP.js.map} +1 -1
- package/dist/{chunk-EJYZ3MKJ.js → chunk-65EYRFZJ.js} +4 -4
- package/dist/{chunk-EJYZ3MKJ.js.map → chunk-65EYRFZJ.js.map} +1 -1
- package/dist/{chunk-CODXK5L5.js → chunk-6NPINANG.js} +6 -6
- package/dist/{chunk-CODXK5L5.js.map → chunk-6NPINANG.js.map} +1 -1
- package/dist/{chunk-XBM5ND55.js → chunk-7KLC4LZO.js} +8 -8
- package/dist/{chunk-XBM5ND55.js.map → chunk-7KLC4LZO.js.map} +1 -1
- package/dist/{chunk-SR4RFKHM.js → chunk-7ZHLYXTI.js} +3 -3
- package/dist/{chunk-SR4RFKHM.js.map → chunk-7ZHLYXTI.js.map} +1 -1
- package/dist/{chunk-WX74MVNA.js → chunk-AO7VJ6G6.js} +3 -24
- package/dist/chunk-AO7VJ6G6.js.map +1 -0
- package/dist/{chunk-DPMKI26Y.js → chunk-AOAZCSDI.js} +4 -3
- package/dist/chunk-AOAZCSDI.js.map +1 -0
- package/dist/{chunk-YK7WJSTD.js → chunk-BF33SCLY.js} +10 -5
- package/dist/chunk-BF33SCLY.js.map +1 -0
- package/dist/{chunk-VKSA2CDJ.js → chunk-BTISGSK4.js} +4 -4
- package/dist/{chunk-VKSA2CDJ.js.map → chunk-BTISGSK4.js.map} +1 -1
- package/dist/{chunk-TOSHZX4C.js → chunk-CPSIPIX7.js} +2 -2
- package/dist/chunk-CPSIPIX7.js.map +1 -0
- package/dist/{chunk-5Y3L7XWH.js → chunk-D2V42LUE.js} +15 -15
- package/dist/chunk-D2V42LUE.js.map +1 -0
- package/dist/{chunk-K2K7OF4P.js → chunk-DMLDYFDS.js} +23 -6
- package/dist/chunk-DMLDYFDS.js.map +1 -0
- package/dist/{chunk-QMWMSZQ4.js → chunk-FK6HPLQA.js} +3 -3
- package/dist/{chunk-QMWMSZQ4.js.map → chunk-FK6HPLQA.js.map} +1 -1
- package/dist/chunk-FRHE7FFB.js +655 -0
- package/dist/chunk-FRHE7FFB.js.map +1 -0
- package/dist/{chunk-UFS3FEBA.js → chunk-GP6ZL7PE.js} +3 -3
- package/dist/{chunk-UFS3FEBA.js.map → chunk-GP6ZL7PE.js.map} +1 -1
- package/dist/{chunk-P6KFWTGP.js → chunk-I4QBZLOR.js} +7 -12
- package/dist/chunk-I4QBZLOR.js.map +1 -0
- package/dist/{chunk-C4GF7RSQ.js → chunk-KUFNKVBM.js} +3 -3
- package/dist/{chunk-C4GF7RSQ.js.map → chunk-KUFNKVBM.js.map} +1 -1
- package/dist/{chunk-GCYD4EGY.js → chunk-KYXOGHY6.js} +4 -4
- package/dist/{chunk-GCYD4EGY.js.map → chunk-KYXOGHY6.js.map} +1 -1
- package/dist/{chunk-G474PBUQ.js → chunk-LLKKLKZJ.js} +3 -3
- package/dist/{chunk-G474PBUQ.js.map → chunk-LLKKLKZJ.js.map} +1 -1
- package/dist/{chunk-AC2N5BRP.js → chunk-MX3UQXLU.js} +18 -30
- package/dist/chunk-MX3UQXLU.js.map +1 -0
- package/dist/{chunk-BNUZEYC3.js → chunk-NARITJS2.js} +3 -3
- package/dist/{chunk-BNUZEYC3.js.map → chunk-NARITJS2.js.map} +1 -1
- package/dist/{chunk-Y4QWHIHB.js → chunk-OGLDAJFL.js} +4 -4
- package/dist/{chunk-Y4QWHIHB.js.map → chunk-OGLDAJFL.js.map} +1 -1
- package/dist/chunk-OLLAQLFJ.js +17 -0
- package/dist/chunk-OLLAQLFJ.js.map +1 -0
- package/dist/{chunk-LFMX2UEF.js → chunk-PA7WLID3.js} +86 -69
- package/dist/chunk-PA7WLID3.js.map +1 -0
- package/dist/{chunk-K2NUT3HO.js → chunk-PJS2YWGG.js} +6 -6
- package/dist/{chunk-K2NUT3HO.js.map → chunk-PJS2YWGG.js.map} +1 -1
- package/dist/{chunk-MMC24L2W.js → chunk-PTO2YDDG.js} +286 -121
- package/dist/chunk-PTO2YDDG.js.map +1 -0
- package/dist/{chunk-3665M43C.js → chunk-QD772CGQ.js} +5 -5
- package/dist/{chunk-3665M43C.js.map → chunk-QD772CGQ.js.map} +1 -1
- package/dist/{chunk-G2O2AARG.js → chunk-RGXVQZOV.js} +6021 -3099
- package/dist/chunk-RGXVQZOV.js.map +1 -0
- package/dist/{chunk-JKWU6ULI.js → chunk-SDFROXSA.js} +3 -3
- package/dist/{chunk-JKWU6ULI.js.map → chunk-SDFROXSA.js.map} +1 -1
- package/dist/{chunk-WHSQSVN2.js → chunk-SX4UIDKT.js} +3 -3
- package/dist/{chunk-WHSQSVN2.js.map → chunk-SX4UIDKT.js.map} +1 -1
- package/dist/{chunk-3JHFFIQ6.js → chunk-TZCQ7ZWQ.js} +83 -9
- package/dist/chunk-TZCQ7ZWQ.js.map +1 -0
- package/dist/{chunk-UHLBDAJR.js → chunk-UAP2XHRF.js} +10 -10
- package/dist/{chunk-UHLBDAJR.js.map → chunk-UAP2XHRF.js.map} +1 -1
- package/dist/{chunk-LAI7X6I2.js → chunk-VBBBZDI7.js} +3 -3
- package/dist/{chunk-LAI7X6I2.js.map → chunk-VBBBZDI7.js.map} +1 -1
- package/dist/{chunk-R4G7XI7A.js → chunk-VJENKWXF.js} +4 -5
- package/dist/chunk-VJENKWXF.js.map +1 -0
- package/dist/{chunk-TNWXGHLD.js → chunk-VKSXST23.js} +51 -42
- package/dist/chunk-VKSXST23.js.map +1 -0
- package/dist/{chunk-HTKZ4AOW.js → chunk-VSQFGU5D.js} +3 -3
- package/dist/{chunk-HTKZ4AOW.js.map → chunk-VSQFGU5D.js.map} +1 -1
- package/dist/{chunk-JBPG5KQC.js → chunk-VX3INFBA.js} +4 -4
- package/dist/{chunk-JBPG5KQC.js.map → chunk-VX3INFBA.js.map} +1 -1
- package/dist/{chunk-N3Y43LMZ.js → chunk-WIHQWVWL.js} +34 -11
- package/dist/chunk-WIHQWVWL.js.map +1 -0
- package/dist/{chunk-Y7UBRRKG.js → chunk-XOGG7VDZ.js} +40 -31
- package/dist/chunk-XOGG7VDZ.js.map +1 -0
- package/dist/{chunk-JAJG4G5E.js → chunk-ZBBM6O6P.js} +3 -3
- package/dist/{chunk-JAJG4G5E.js.map → chunk-ZBBM6O6P.js.map} +1 -1
- package/dist/cli/index.js +5025 -3406
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/asset-feeds.d.ts.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +7 -7
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/connector.d.ts +2 -2
- package/dist/cli/src/commands/connector.d.ts.map +1 -1
- package/dist/cli/src/commands/diff.d.ts.map +1 -1
- package/dist/cli/src/commands/history.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/manage.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate-agents.d.ts +131 -0
- package/dist/cli/src/commands/migrate-agents.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate-assets.d.ts +54 -0
- package/dist/cli/src/commands/migrate-assets.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate-files.d.ts +52 -0
- package/dist/cli/src/commands/migrate-files.d.ts.map +1 -0
- package/dist/cli/src/commands/migrate-providers.d.ts +5 -8
- package/dist/cli/src/commands/migrate-providers.d.ts.map +1 -1
- package/dist/cli/src/commands/migrate.d.ts +21 -0
- package/dist/cli/src/commands/migrate.d.ts.map +1 -0
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/outdated.d.ts.map +1 -1
- package/dist/cli/src/commands/patch.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +13 -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/show.d.ts.map +1 -1
- package/dist/cli/src/commands/tree.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 +17 -0
- package/dist/cli/src/commands/validate-instances.d.ts.map +1 -0
- package/dist/cli/src/commands/validate.d.ts +14 -0
- 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/helpers.d.ts.map +1 -1
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/cli/src/open-registry.d.ts +13 -16
- package/dist/cli/src/open-registry.d.ts.map +1 -1
- package/dist/cli/src/type-guards.d.ts +3 -0
- package/dist/cli/src/type-guards.d.ts.map +1 -0
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +19 -19
- package/dist/{connectors-MPYCSQNG.js → connectors-HWENZFKW.js} +22 -22
- package/dist/{connectors-MPYCSQNG.js.map → connectors-HWENZFKW.js.map} +1 -1
- package/dist/connectors-shared/index.js +2 -2
- package/dist/core/driver-targets.js +1 -1
- package/dist/core/index.js +8 -8
- package/dist/core/manifest.js +2 -2
- package/dist/core/models.js +1 -1
- package/dist/core/publish-manifest.js +2 -2
- package/dist/core/ref.js +1 -1
- package/dist/core/runtime-assets.js +6 -6
- package/dist/core/src/agent-instances.d.ts +93 -0
- package/dist/core/src/agent-instances.d.ts.map +1 -0
- package/dist/core/src/agent-prompt-sections.d.ts +90 -0
- package/dist/core/src/agent-prompt-sections.d.ts.map +1 -0
- package/dist/core/src/driver-targets.d.ts +4 -2
- package/dist/core/src/driver-targets.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +12 -8
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/manifest.d.ts +71 -27
- package/dist/core/src/manifest.d.ts.map +1 -1
- package/dist/core/src/models.d.ts +6 -92
- package/dist/core/src/models.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +47 -3
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/type-guards.d.ts +3 -0
- package/dist/core/src/type-guards.d.ts.map +1 -0
- package/dist/core/src/walker.d.ts +7 -3
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-config.d.ts +19 -15
- package/dist/core/src/workspace-config.d.ts.map +1 -1
- package/dist/core/store.js +2 -2
- package/dist/core/workspace-config.js +5 -5
- package/dist/deploy/index.js +8 -8
- package/dist/discovery/index.js +6 -6
- package/dist/discovery/src/builtin-providers.d.ts +5 -4
- package/dist/discovery/src/builtin-providers.d.ts.map +1 -1
- package/dist/discovery/src/default-registry.d.ts +23 -0
- package/dist/discovery/src/default-registry.d.ts.map +1 -0
- package/dist/discovery/src/discover.d.ts +0 -6
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/index.d.ts +2 -1
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-QFRA46DJ.js → ensure-sources-DSTSXJWK.js} +21 -21
- package/dist/{ensure-sources-QFRA46DJ.js.map → ensure-sources-DSTSXJWK.js.map} +1 -1
- package/dist/factory-assets/README.md +3 -3
- package/dist/factory-assets/connectors/box.js +19 -19
- package/dist/factory-assets/connectors/deploy.js +19 -19
- package/dist/factory-assets/connectors/devserver.js +19 -19
- package/dist/factory-assets/connectors/flow/adapter.js +19 -19
- package/dist/factory-assets/connectors/flow/engine/flow-kind-provider.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +9 -9
- package/dist/factory-assets/connectors/flow/run-flow.js +21 -21
- package/dist/factory-assets/connectors/flow.js +19 -19
- package/dist/factory-assets/connectors/git.js +19 -19
- package/dist/factory-assets/connectors/gmail.js +19 -19
- package/dist/factory-assets/connectors/googledrive.js +19 -19
- package/dist/factory-assets/connectors/local.js +19 -19
- package/dist/factory-assets/connectors/mattermost.js +19 -19
- package/dist/factory-assets/connectors/memory.js +19 -19
- package/dist/factory-assets/connectors/minio.js +19 -19
- package/dist/factory-assets/connectors/postgres.js +19 -19
- package/dist/factory-assets/connectors/s3.js +19 -19
- package/dist/factory-assets/connectors/sharepoint.js +19 -19
- package/dist/factory-assets/connectors/sqlite.js +19 -19
- package/dist/factory-assets/connectors/static-server.js +19 -19
- package/dist/factory-assets/connectors/tunnel.js +19 -19
- package/dist/factory-assets/connectors/webdav.js +19 -19
- package/dist/factory-assets/connectors/xstate-store.js +19 -19
- package/dist/factory-assets/connectors/xstate.js +19 -19
- package/dist/factory-assets/index.js.map +1 -1
- package/dist/factory-assets/presets/workspaces-authoring/workspaces-authoring.preset.yaml +9 -0
- package/dist/factory-assets/skaile.manifest.yaml +2 -2
- package/dist/factory-assets/skills/authoring-skaile-assets/SKILL.md +16 -12
- package/dist/factory-assets/skills/authoring-skaile-manifests/SKILL.md +8 -8
- package/dist/factory-assets/skills/authoring-skaile-manifests/references/dependency-standard.md +13 -11
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
- package/dist/{flows-KCARGXRT.js → flows-ENQY2DV7.js} +13 -13
- package/dist/{flows-KCARGXRT.js.map → flows-ENQY2DV7.js.map} +1 -1
- package/dist/{helpers-PSROT7CU.js → helpers-R44RUTDY.js} +21 -21
- package/dist/{helpers-PSROT7CU.js.map → helpers-R44RUTDY.js.map} +1 -1
- package/dist/library/index.js +13 -13
- package/dist/library/install.js +3 -3
- package/dist/library/src/index.d.ts +2 -2
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/library.d.ts +2 -12
- package/dist/library/src/library.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +2 -2
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/manifest-writer.d.ts +4 -1
- package/dist/library/src/manifest-writer.d.ts.map +1 -1
- package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
- package/dist/{library-publish-YAI7WOXC.js → library-publish-LFOJJVMK.js} +27 -27
- package/dist/{library-publish-YAI7WOXC.js.map → library-publish-LFOJJVMK.js.map} +1 -1
- package/dist/open-library-4WUMQHES.js +40 -0
- package/dist/{open-library-Z5NJU4Z5.js.map → open-library-4WUMQHES.js.map} +1 -1
- package/dist/open-registry-NVPCQPND.js +32 -0
- package/dist/{open-registry-TYUVN5SG.js.map → open-registry-NVPCQPND.js.map} +1 -1
- package/dist/paths-YUCP7K6U.js +22 -0
- package/dist/{paths-HKAXUR3W.js.map → paths-YUCP7K6U.js.map} +1 -1
- package/dist/{plugin-store-N6SI2TYM.js → plugin-store-66QFBNEO.js} +10 -10
- package/dist/{plugin-store-N6SI2TYM.js.map → plugin-store-66QFBNEO.js.map} +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/src/asset-kind-provider.d.ts +14 -2
- package/dist/plugins/src/asset-kind-provider.d.ts.map +1 -1
- package/dist/plugins/src/index.d.ts +1 -1
- package/dist/plugins/src/index.d.ts.map +1 -1
- package/dist/project-VMOHUXBD.js +41 -0
- package/dist/{project-SVS4UMGL.js.map → project-VMOHUXBD.js.map} +1 -1
- package/dist/resolver/index.js +9 -9
- package/dist/runner/index.js +34 -29
- package/dist/runner/src/agent-capabilities.d.ts +101 -0
- package/dist/runner/src/agent-capabilities.d.ts.map +1 -0
- package/dist/runner/src/agent.d.ts.map +1 -1
- package/dist/runner/src/agents/in-process-host.d.ts +56 -0
- package/dist/runner/src/agents/in-process-host.d.ts.map +1 -0
- package/dist/runner/src/agents/instances.d.ts +62 -0
- package/dist/runner/src/agents/instances.d.ts.map +1 -0
- package/dist/runner/src/agents/json-schema.d.ts +16 -0
- package/dist/runner/src/agents/json-schema.d.ts.map +1 -0
- package/dist/runner/src/agents/memory-run-store.d.ts +19 -0
- package/dist/runner/src/agents/memory-run-store.d.ts.map +1 -0
- package/dist/runner/src/agents/run-controller.d.ts +208 -0
- package/dist/runner/src/agents/run-controller.d.ts.map +1 -0
- package/dist/runner/src/agents/standalone-surface.d.ts +30 -0
- package/dist/runner/src/agents/standalone-surface.d.ts.map +1 -0
- package/dist/runner/src/capability-registry.d.ts.map +1 -1
- package/dist/runner/src/composition/bootstrap.d.ts +13 -51
- package/dist/runner/src/composition/bootstrap.d.ts.map +1 -1
- package/dist/runner/src/composition/compile.d.ts +43 -27
- package/dist/runner/src/composition/compile.d.ts.map +1 -1
- package/dist/runner/src/composition/content-source.d.ts +94 -0
- package/dist/runner/src/composition/content-source.d.ts.map +1 -0
- package/dist/runner/src/composition/dry-run.d.ts +34 -0
- package/dist/runner/src/composition/dry-run.d.ts.map +1 -0
- package/dist/runner/src/composition/errors.d.ts +41 -0
- package/dist/runner/src/composition/errors.d.ts.map +1 -0
- package/dist/runner/src/composition/index.d.ts +10 -3
- package/dist/runner/src/composition/index.d.ts.map +1 -1
- package/dist/runner/src/composition/prompt-sections.d.ts +31 -0
- package/dist/runner/src/composition/prompt-sections.d.ts.map +1 -0
- package/dist/runner/src/composition/resolve-instance.d.ts +140 -0
- package/dist/runner/src/composition/resolve-instance.d.ts.map +1 -0
- package/dist/runner/src/composition/resolve.d.ts +43 -25
- package/dist/runner/src/composition/resolve.d.ts.map +1 -1
- package/dist/runner/src/composition/revision-hash.d.ts +58 -0
- package/dist/runner/src/composition/revision-hash.d.ts.map +1 -0
- package/dist/runner/src/composition/run-snapshot.d.ts +37 -0
- package/dist/runner/src/composition/run-snapshot.d.ts.map +1 -0
- package/dist/runner/src/composition/types.d.ts +79 -12
- package/dist/runner/src/composition/types.d.ts.map +1 -1
- package/dist/runner/src/index.d.ts +2 -0
- package/dist/runner/src/index.d.ts.map +1 -1
- package/dist/runner/src/manifest.d.ts +1 -1
- package/dist/runner/src/manifest.d.ts.map +1 -1
- package/dist/runner/src/mixin-resolver.d.ts +14 -15
- package/dist/runner/src/mixin-resolver.d.ts.map +1 -1
- package/dist/runner/src/serve.d.ts +6 -0
- package/dist/runner/src/serve.d.ts.map +1 -1
- package/dist/runner/src/session-builder.d.ts +35 -6
- package/dist/runner/src/session-builder.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +18 -18
- package/dist/sdk/bridge.js +15 -15
- package/dist/sdk/core.js +8 -8
- package/dist/sdk/flow.js +9 -9
- package/dist/sdk/index.js +34 -29
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/resolver.js +9 -9
- package/dist/sdk/runner.js +34 -29
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/secrets/index.js +2 -2
- package/dist/session/index.js +2 -2
- package/dist/{setup-IOEZGJNC.js → setup-PYY23HGZ.js} +28 -28
- package/dist/{setup-IOEZGJNC.js.map → setup-PYY23HGZ.js.map} +1 -1
- package/dist/skills-CS7NE5TT.js +26 -0
- package/dist/{skills-HW6I6ZZ7.js.map → skills-CS7NE5TT.js.map} +1 -1
- package/dist/source-JCF6KSQN.js +41 -0
- package/dist/{source-OKRJT53H.js.map → source-JCF6KSQN.js.map} +1 -1
- package/dist/{source-manifest-publish-MILEQDRD.js → source-manifest-publish-O6P7G2M7.js} +27 -27
- package/dist/{source-manifest-publish-MILEQDRD.js.map → source-manifest-publish-O6P7G2M7.js.map} +1 -1
- package/dist/tui/index.js +34 -29
- package/dist/tui/index.js.map +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/agent-lifecycle.d.ts +402 -0
- package/dist/types/src/agent-lifecycle.d.ts.map +1 -0
- package/dist/types/src/capabilities.d.ts +0 -4
- package/dist/types/src/capabilities.d.ts.map +1 -1
- package/dist/types/src/delivery.d.ts.map +1 -1
- package/dist/types/src/events.d.ts +66 -4
- package/dist/types/src/events.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/lifecycle.d.ts +21 -3
- package/dist/types/src/lifecycle.d.ts.map +1 -1
- package/dist/types/src/manifests/_shared.d.ts +1 -16
- package/dist/types/src/manifests/_shared.d.ts.map +1 -1
- package/dist/types/src/manifests/agent-composition.d.ts +44 -0
- package/dist/types/src/manifests/agent-composition.d.ts.map +1 -0
- package/dist/types/src/manifests/agent.d.ts +184 -6
- package/dist/types/src/manifests/agent.d.ts.map +1 -1
- package/dist/types/src/manifests/index.d.ts +6 -15
- package/dist/types/src/manifests/index.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +5 -5
- package/dist/types/src/version.d.ts +16 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +26 -26
- package/dist/workspace-plugin/adapters/omp.js +14 -14
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +3 -1
- package/dist/asset-feeds-KTFUB7EX.js.map +0 -1
- package/dist/chunk-2D2P7HSR.js +0 -15
- package/dist/chunk-2D2P7HSR.js.map +0 -1
- package/dist/chunk-3JHFFIQ6.js.map +0 -1
- package/dist/chunk-5CYEWBPB.js +0 -440
- package/dist/chunk-5CYEWBPB.js.map +0 -1
- package/dist/chunk-5Y3L7XWH.js.map +0 -1
- package/dist/chunk-75EX5GY4.js.map +0 -1
- package/dist/chunk-AC2N5BRP.js.map +0 -1
- package/dist/chunk-DPMKI26Y.js.map +0 -1
- package/dist/chunk-G2O2AARG.js.map +0 -1
- package/dist/chunk-K2K7OF4P.js.map +0 -1
- package/dist/chunk-LFMX2UEF.js.map +0 -1
- package/dist/chunk-MMC24L2W.js.map +0 -1
- package/dist/chunk-N3Y43LMZ.js.map +0 -1
- package/dist/chunk-ORUHADS6.js.map +0 -1
- package/dist/chunk-P6KFWTGP.js.map +0 -1
- package/dist/chunk-R4G7XI7A.js.map +0 -1
- package/dist/chunk-TNWXGHLD.js.map +0 -1
- package/dist/chunk-TOSHZX4C.js.map +0 -1
- package/dist/chunk-WX74MVNA.js.map +0 -1
- package/dist/chunk-Y7UBRRKG.js.map +0 -1
- package/dist/chunk-YK7WJSTD.js.map +0 -1
- package/dist/factory-assets/bundles/workspaces-authoring/workspaces-authoring.bundle.yaml +0 -9
- package/dist/open-library-Z5NJU4Z5.js +0 -40
- package/dist/open-registry-TYUVN5SG.js +0 -32
- package/dist/paths-HKAXUR3W.js +0 -22
- package/dist/project-SVS4UMGL.js +0 -36
- package/dist/skills-HW6I6ZZ7.js +0 -26
- package/dist/source-OKRJT53H.js +0 -41
- package/dist/types/src/manifests/mount.d.ts +0 -21
- package/dist/types/src/manifests/mount.d.ts.map +0 -1
|
@@ -1,22 +1,107 @@
|
|
|
1
|
-
import { getStoreManifestsDir } from './chunk-
|
|
2
|
-
import { readManifestSourceConfig, discoverAssetsInTree } from './chunk-
|
|
3
|
-
import { deployAll, removeAsset, canonicalEntryRef, createScaffold } from './chunk-
|
|
4
|
-
import { resolveConfiguredDriverTarget, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, verifyLock, mergeLockFile, extractForPatch, generatePatch, savePatch, applyPatch } from './chunk-3JHFFIQ6.js';
|
|
5
|
-
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-YK7WJSTD.js';
|
|
6
|
-
import { deployedBase, deployedDir, isDeployed } from './chunk-XGIS325V.js';
|
|
7
|
-
import { loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, resolveSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, coerceVersion, resolveAll, buildProvenanceIndex, ensureRepo, sourceShortName, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, readLinks, storeManifestSlug } from './chunk-ORUHADS6.js';
|
|
8
|
-
import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-MFHKHXDE.js';
|
|
9
|
-
import { scanDirectory, parseRequires } from './chunk-LFMX2UEF.js';
|
|
10
|
-
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName } from './chunk-WX74MVNA.js';
|
|
1
|
+
import { getStoreManifestsDir } from './chunk-MX3UQXLU.js';
|
|
2
|
+
import { readManifestSourceConfig, discoverAssetsInTree } from './chunk-XOGG7VDZ.js';
|
|
3
|
+
import { installAgent, installTargetOf, deployAll, removeAsset, canonicalEntryRef, createScaffold } from './chunk-2KOKBTR4.js';
|
|
11
4
|
import { appendHistory, getRecentHistory, clearHistory } from './chunk-KTBKW2FI.js';
|
|
12
5
|
import { commitChanges } from './chunk-UQ6LFBPZ.js';
|
|
6
|
+
import { driverTargetSupportsAgents, CODEX_IDENTITY_DIR } from './chunk-VKSXST23.js';
|
|
7
|
+
import { resolveConfiguredDriverTarget, GLOBAL_INSTALL_DIR_NAME, resolveLibraryDir, buildLibraryLockEntries, writeLock, buildLockFile, readLock, verifyLock, mergeLockFile, extractForPatch, generatePatch, savePatch, applyPatch } from './chunk-TZCQ7ZWQ.js';
|
|
8
|
+
import { resolveRuntimeAssets, factoryAssetRoots } from './chunk-BF33SCLY.js';
|
|
9
|
+
import { deployedBase, deployedDir, isDeployed } from './chunk-46OVMT76.js';
|
|
10
|
+
import { resolveSkWorkspaceConfig, effectiveAgentInstances, resolveAgentDefinitionDir, loadMcpServerDeclarations, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, getGlobalCacheDir, sourceCacheKey, getRepoCommit, matchPin, coerceVersion, resolveAll, buildProvenanceIndex, ensureRepo, sourceShortName, scanRepo, SKAILE_YAML_DEFAULT, checkRepoStatus, resolveAsset, readLinks, storeManifestSlug } from './chunk-2W4LBLIN.js';
|
|
11
|
+
import { globalSkaileDir, globalCacheRoot, migrateLegacyDir } from './chunk-MFHKHXDE.js';
|
|
12
|
+
import { DRIVER_TARGETS } from './chunk-CPSIPIX7.js';
|
|
13
|
+
import { scanDirectory, parseRequires } from './chunk-PA7WLID3.js';
|
|
14
|
+
import { parseAssetRef, parseAssetRefLoose, assetRefToStr, slugifyAssetName } from './chunk-AO7VJ6G6.js';
|
|
13
15
|
import { spawnSync } from 'child_process';
|
|
14
|
-
import { existsSync,
|
|
15
|
-
import path, { resolve,
|
|
16
|
+
import { existsSync, rmSync, readdirSync, lstatSync, unlinkSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
17
|
+
import path, { join, resolve, dirname, sep, posix } from 'path';
|
|
16
18
|
import { gt } from 'semver';
|
|
17
19
|
import { stringify, parse } from 'yaml';
|
|
18
20
|
import fs from 'fs/promises';
|
|
19
21
|
|
|
22
|
+
var ledgerPath = (projectDir) => join(projectDir, ".skaile", "agent-instances-managed.json");
|
|
23
|
+
function readLedger(projectDir) {
|
|
24
|
+
const p = ledgerPath(projectDir);
|
|
25
|
+
if (!existsSync(p)) return { version: 1, targets: {} };
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(readFileSync(p, "utf-8"));
|
|
28
|
+
return { version: 1, targets: parsed.targets ?? {} };
|
|
29
|
+
} catch {
|
|
30
|
+
return { version: 1, targets: {} };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function writeLedger(projectDir, ledger) {
|
|
34
|
+
const p = ledgerPath(projectDir);
|
|
35
|
+
mkdirSync(dirname(p), { recursive: true });
|
|
36
|
+
writeFileSync(p, `${JSON.stringify(ledger, null, 2)}
|
|
37
|
+
`, "utf-8");
|
|
38
|
+
}
|
|
39
|
+
function installAgentInstances(opts) {
|
|
40
|
+
const { projectDir, driverTarget, log } = opts;
|
|
41
|
+
const result = { instances: [], removed: [], warnings: [] };
|
|
42
|
+
if (!driverTargetSupportsAgents(driverTarget)) return result;
|
|
43
|
+
const wsConfig = opts.wsConfig ?? resolveSkWorkspaceConfig(projectDir);
|
|
44
|
+
const instances = effectiveAgentInstances(wsConfig);
|
|
45
|
+
const agentDeployDir = deployedBase("agent", driverTarget, false, projectDir);
|
|
46
|
+
const skillsRelDir = DRIVER_TARGETS[driverTarget]?.local.skill ?? "";
|
|
47
|
+
const ledger = readLedger(projectDir);
|
|
48
|
+
const previous = ledger.targets[driverTarget] ?? {};
|
|
49
|
+
const owned = {};
|
|
50
|
+
for (const [id, instance] of Object.entries(instances)) {
|
|
51
|
+
let srcDir;
|
|
52
|
+
try {
|
|
53
|
+
srcDir = resolveAgentDefinitionDir(projectDir, instance.ref);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
result.warnings.push(
|
|
56
|
+
`agent instance "${id}": ${err instanceof Error ? err.message : String(err)}`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
if (srcDir === void 0 || !existsSync(join(srcDir, "agent.yaml"))) {
|
|
60
|
+
if (srcDir !== void 0) {
|
|
61
|
+
result.warnings.push(
|
|
62
|
+
`agent instance "${id}": ${instance.ref} resolves to ${srcDir}, which has no agent.yaml`
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (previous[id]) owned[id] = previous[id];
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const rendered = installAgent(
|
|
69
|
+
srcDir,
|
|
70
|
+
agentDeployDir,
|
|
71
|
+
projectDir,
|
|
72
|
+
driverTarget,
|
|
73
|
+
skillsRelDir,
|
|
74
|
+
id,
|
|
75
|
+
/* includeSubAgents */
|
|
76
|
+
true,
|
|
77
|
+
/* @__PURE__ */ new Set(),
|
|
78
|
+
wsConfig,
|
|
79
|
+
log,
|
|
80
|
+
instance
|
|
81
|
+
);
|
|
82
|
+
result.warnings.push(...rendered.warnings);
|
|
83
|
+
const files = [...new Set(rendered.created)];
|
|
84
|
+
owned[id] = files;
|
|
85
|
+
result.instances.push({ id, files });
|
|
86
|
+
}
|
|
87
|
+
const claimed = new Set(Object.values(owned).flat());
|
|
88
|
+
const root = resolve(projectDir);
|
|
89
|
+
const removable = [resolve(agentDeployDir), resolve(dirname(agentDeployDir), CODEX_IDENTITY_DIR)];
|
|
90
|
+
for (const rel of Object.values(previous).flat()) {
|
|
91
|
+
if (claimed.has(rel)) continue;
|
|
92
|
+
const abs = resolve(root, rel);
|
|
93
|
+
if (!removable.some((dir) => abs.startsWith(dir + sep)) || !existsSync(abs)) continue;
|
|
94
|
+
rmSync(abs, { recursive: true, force: true });
|
|
95
|
+
result.removed.push(rel);
|
|
96
|
+
}
|
|
97
|
+
const nextTargets = { ...ledger.targets };
|
|
98
|
+
if (Object.keys(owned).length > 0) nextTargets[driverTarget] = owned;
|
|
99
|
+
else delete nextTargets[driverTarget];
|
|
100
|
+
if (JSON.stringify(nextTargets) !== JSON.stringify(ledger.targets)) {
|
|
101
|
+
writeLedger(projectDir, { version: 1, targets: nextTargets });
|
|
102
|
+
}
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
20
105
|
var TARGET_MCP_CONFIG = {
|
|
21
106
|
"claude-code": ".mcp.json"
|
|
22
107
|
};
|
|
@@ -199,7 +284,6 @@ function pinsBySlug(sources) {
|
|
|
199
284
|
var MD_BY_KIND = {
|
|
200
285
|
skill: "SKILL.md",
|
|
201
286
|
agent: "AGENT.md",
|
|
202
|
-
bundle: "BUNDLE.md",
|
|
203
287
|
"mcp-server": "MCP.md",
|
|
204
288
|
connector: "CONNECTOR.md",
|
|
205
289
|
prompt: "PROMPT.md",
|
|
@@ -211,19 +295,13 @@ function matchManifestPath(kind, paths) {
|
|
|
211
295
|
const hit = paths.find((p) => p.endsWith(exact));
|
|
212
296
|
if (hit) return hit;
|
|
213
297
|
}
|
|
298
|
+
if (kind === "preset") return paths.find((p) => p.endsWith(".preset.yaml"));
|
|
214
299
|
if (kind === "prompt") return paths.find((p) => p.endsWith(".prompt.md"));
|
|
215
300
|
if (kind === "flow") {
|
|
216
301
|
return paths.find((p) => p.endsWith(".flow.yaml") || p.endsWith(".flow.json"));
|
|
217
302
|
}
|
|
218
303
|
return void 0;
|
|
219
304
|
}
|
|
220
|
-
var NON_DEPLOYABLE_KINDS = /* @__PURE__ */ new Set([
|
|
221
|
-
"bundle",
|
|
222
|
-
"mcp-server",
|
|
223
|
-
"persona",
|
|
224
|
-
"ruleset",
|
|
225
|
-
"knowledge"
|
|
226
|
-
]);
|
|
227
305
|
function unscopedName(x) {
|
|
228
306
|
return x.includes("/") ? x.split("/").pop() : x;
|
|
229
307
|
}
|
|
@@ -239,6 +317,10 @@ function commonDirPrefix(paths) {
|
|
|
239
317
|
}
|
|
240
318
|
return common.join("/");
|
|
241
319
|
}
|
|
320
|
+
function filesUnderManifestDir(paths, manifestRel) {
|
|
321
|
+
const manifestDir = posix.dirname(manifestRel);
|
|
322
|
+
return paths.map((p) => posix.relative(manifestDir, p)).filter((rel) => rel !== "" && !rel.startsWith(".."));
|
|
323
|
+
}
|
|
242
324
|
function indexLockByKindName(lock) {
|
|
243
325
|
const lockByKindName = /* @__PURE__ */ new Map();
|
|
244
326
|
for (const [key, entry] of Object.entries(lock?.assets ?? {})) {
|
|
@@ -254,7 +336,7 @@ function indexLockByKindName(lock) {
|
|
|
254
336
|
}
|
|
255
337
|
return lockByKindName;
|
|
256
338
|
}
|
|
257
|
-
function libraryDiskHashes(libPath, cache) {
|
|
339
|
+
function libraryDiskHashes(libPath, cache, registry) {
|
|
258
340
|
let hashes = cache.get(libPath);
|
|
259
341
|
if (!hashes) {
|
|
260
342
|
const sourceConfig = readManifestSourceConfig(libPath, "library") ?? {
|
|
@@ -265,7 +347,7 @@ function libraryDiskHashes(libPath, cache) {
|
|
|
265
347
|
dev_paths: []
|
|
266
348
|
};
|
|
267
349
|
hashes = new Map(
|
|
268
|
-
discoverAssetsInTree(libPath, { sourceConfig }).assets.map((a) => [
|
|
350
|
+
discoverAssetsInTree(libPath, { sourceConfig, registry }).assets.map((a) => [
|
|
269
351
|
`${a.kind}:${a.name}`,
|
|
270
352
|
a.sha256
|
|
271
353
|
])
|
|
@@ -420,6 +502,9 @@ var AssetManager = class {
|
|
|
420
502
|
driverTarget;
|
|
421
503
|
/** Whether this instance operates in global-install mode. */
|
|
422
504
|
global;
|
|
505
|
+
/** Asset-kind registry shared with the host (one instance per process). */
|
|
506
|
+
registry;
|
|
507
|
+
_knownKinds;
|
|
423
508
|
/** Explicit global-harness override (global mode only); else auto-resolved. */
|
|
424
509
|
harnessesOverride;
|
|
425
510
|
/** Injected catalog fetcher (tests / custom); falls back to a built one. */
|
|
@@ -435,6 +520,7 @@ var AssetManager = class {
|
|
|
435
520
|
constructor(opts) {
|
|
436
521
|
this.projectDir = resolve(opts.projectDir);
|
|
437
522
|
this.global = opts.global ?? false;
|
|
523
|
+
this.registry = opts.registry;
|
|
438
524
|
this.driverTarget = opts.driverTarget ?? (this.global ? void 0 : resolveConfiguredDriverTarget(this.projectDir)) ?? "claude-code";
|
|
439
525
|
this.harnessesOverride = opts.harnesses ?? opts.backends;
|
|
440
526
|
this.injectedStoreFetcher = opts.storeFetcher;
|
|
@@ -443,6 +529,19 @@ var AssetManager = class {
|
|
|
443
529
|
this.indexPathOverride = opts.indexPath;
|
|
444
530
|
this.onLibraryCollision = opts.onLibraryCollision;
|
|
445
531
|
}
|
|
532
|
+
/** Registered kind names — the `knownKinds` argument of the manifest scanners. */
|
|
533
|
+
get knownKinds() {
|
|
534
|
+
this._knownKinds ??= new Set(this.registry.getAllKinds());
|
|
535
|
+
return this._knownKinds;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* The harness component dir a kind installs into (its provider's
|
|
539
|
+
* `installTarget`), or `undefined` for composition-only kinds, which are only
|
|
540
|
+
* cached in the store cache and composed at session start.
|
|
541
|
+
*/
|
|
542
|
+
installTarget(kind) {
|
|
543
|
+
return installTargetOf(this.registry, kind);
|
|
544
|
+
}
|
|
446
545
|
/**
|
|
447
546
|
* Root for this manager's **state** — config SSOT, lock, cache, history.
|
|
448
547
|
* `~/.skaile` in global mode (the cross-harness SSOT), else the project dir.
|
|
@@ -493,7 +592,13 @@ var AssetManager = class {
|
|
|
493
592
|
/** Deploy options for one harness. In global mode, `driverTarget` is the
|
|
494
593
|
* fan-out target (not the constructor's `driverTarget`, which is project-only). */
|
|
495
594
|
deployOptsFor(target, link) {
|
|
496
|
-
return {
|
|
595
|
+
return {
|
|
596
|
+
registry: this.registry,
|
|
597
|
+
driverTarget: target,
|
|
598
|
+
global: this.global,
|
|
599
|
+
cwd: this.projectDir,
|
|
600
|
+
link: link === true
|
|
601
|
+
};
|
|
497
602
|
}
|
|
498
603
|
/**
|
|
499
604
|
* Render the project's declared MCP servers into the driver target's own
|
|
@@ -515,6 +620,29 @@ var AssetManager = class {
|
|
|
515
620
|
);
|
|
516
621
|
}
|
|
517
622
|
}
|
|
623
|
+
/**
|
|
624
|
+
* Render every agent instance of `skaile.yaml` into the driver target's native
|
|
625
|
+
* agent files (`.claude/agents/<id>.md`, …) and prune the renderings of
|
|
626
|
+
* instances that left the config. Runs after the skills deploy, so composed
|
|
627
|
+
* skills resolve. Project scope only. Never fails an install — a render error
|
|
628
|
+
* is warned and swallowed.
|
|
629
|
+
*/
|
|
630
|
+
renderAgentInstances() {
|
|
631
|
+
if (this.global) return {};
|
|
632
|
+
try {
|
|
633
|
+
const result = installAgentInstances({
|
|
634
|
+
projectDir: this.projectDir,
|
|
635
|
+
driverTarget: this.driverTarget
|
|
636
|
+
});
|
|
637
|
+
for (const w of result.warnings) console.warn(`skaile: ${w}`);
|
|
638
|
+
return { agentInstances: result.instances, agentFilesRemoved: result.removed };
|
|
639
|
+
} catch (err) {
|
|
640
|
+
console.warn(
|
|
641
|
+
`skaile: could not render agent instances for ${this.driverTarget}: ${err instanceof Error ? err.message : String(err)}`
|
|
642
|
+
);
|
|
643
|
+
return {};
|
|
644
|
+
}
|
|
645
|
+
}
|
|
518
646
|
loadConfig() {
|
|
519
647
|
const config = this.global ? resolveGlobalSkWorkspaceConfig() : resolveSkWorkspaceConfig(this.projectDir);
|
|
520
648
|
const sources = config.sources ?? [];
|
|
@@ -594,6 +722,12 @@ var AssetManager = class {
|
|
|
594
722
|
) ?? c.files[0]?.path;
|
|
595
723
|
const source = mdRel ? join(cloneDir, mdRel) : cloneDir;
|
|
596
724
|
const entry = {
|
|
725
|
+
...mdRel ? {
|
|
726
|
+
files: filesUnderManifestDir(
|
|
727
|
+
c.files.map((f) => f.path),
|
|
728
|
+
mdRel
|
|
729
|
+
)
|
|
730
|
+
} : {},
|
|
597
731
|
name: c.name,
|
|
598
732
|
kind: c.kind,
|
|
599
733
|
description: c.description ?? "",
|
|
@@ -664,7 +798,7 @@ var AssetManager = class {
|
|
|
664
798
|
const isDefaultLib = new Map(roots.map((r) => [r.name, r.isDefault]));
|
|
665
799
|
for (const { name, dir } of roots) {
|
|
666
800
|
const publisher = readDeclaredPublisher(dir) ?? slugifyAssetName(name);
|
|
667
|
-
for (const entry of await scanDirectory(dir, publisher)) {
|
|
801
|
+
for (const entry of await scanDirectory(dir, publisher, { knownKinds: this.knownKinds })) {
|
|
668
802
|
const key = `${entry.kind}:@${entry.publisher}/${entry.name}`;
|
|
669
803
|
const list = byKey.get(key);
|
|
670
804
|
if (list) list.push({ entry, library: name });
|
|
@@ -756,7 +890,7 @@ var AssetManager = class {
|
|
|
756
890
|
const publisher = e.publisher ?? "";
|
|
757
891
|
const def = newestLibraryDef(snap, name, { kind: e.kind, publisher, name: e.name });
|
|
758
892
|
const libPath = this.libraryPath(name, snap);
|
|
759
|
-
const sha256 = (libPath ? libraryDiskHashes(libPath, diskHashes).get(`${e.kind}:${e.name}`) : void 0) ?? def?.sha256;
|
|
893
|
+
const sha256 = (libPath ? libraryDiskHashes(libPath, diskHashes, this.registry).get(`${e.kind}:${e.name}`) : void 0) ?? def?.sha256;
|
|
760
894
|
return {
|
|
761
895
|
kind: e.kind,
|
|
762
896
|
publisher,
|
|
@@ -795,7 +929,7 @@ var AssetManager = class {
|
|
|
795
929
|
);
|
|
796
930
|
continue;
|
|
797
931
|
}
|
|
798
|
-
const found = (await scanDirectory(libPath, publisher)).find(
|
|
932
|
+
const found = (await scanDirectory(libPath, publisher, { knownKinds: this.knownKinds })).find(
|
|
799
933
|
(x) => x.kind === kind && x.name === name
|
|
800
934
|
);
|
|
801
935
|
if (!found) {
|
|
@@ -811,7 +945,7 @@ var AssetManager = class {
|
|
|
811
945
|
continue;
|
|
812
946
|
}
|
|
813
947
|
if (origin.sha256) {
|
|
814
|
-
const onDisk = libraryDiskHashes(libPath, diskHashes).get(`${kind}:${name}`);
|
|
948
|
+
const onDisk = libraryDiskHashes(libPath, diskHashes, this.registry).get(`${kind}:${name}`);
|
|
815
949
|
if (onDisk !== void 0 && onDisk !== origin.sha256) {
|
|
816
950
|
missing.push(
|
|
817
951
|
`${ref} (library "${origin.name}" content changed since lock \u2014 or the lock predates the one shared asset hash; re-lock with \`skaile install\`)`
|
|
@@ -857,7 +991,8 @@ var AssetManager = class {
|
|
|
857
991
|
overrides: opts.overrides,
|
|
858
992
|
stores: opts.stores,
|
|
859
993
|
storeFetcher: this.storeFetcherFor(opts.stores),
|
|
860
|
-
projectDir: this.projectDir
|
|
994
|
+
projectDir: this.projectDir,
|
|
995
|
+
knownKinds: this.knownKinds
|
|
861
996
|
});
|
|
862
997
|
if (first.missing.length === 0) return first;
|
|
863
998
|
const fallback = await this.globalStoreFallback(opts.stores);
|
|
@@ -869,7 +1004,8 @@ var AssetManager = class {
|
|
|
869
1004
|
overrides: opts.overrides,
|
|
870
1005
|
stores,
|
|
871
1006
|
storeFetcher: this.storeFetcherFor(stores),
|
|
872
|
-
projectDir: this.projectDir
|
|
1007
|
+
projectDir: this.projectDir,
|
|
1008
|
+
knownKinds: this.knownKinds
|
|
873
1009
|
});
|
|
874
1010
|
return retry.missing.length < first.missing.length ? retry : first;
|
|
875
1011
|
} catch {
|
|
@@ -920,7 +1056,7 @@ var AssetManager = class {
|
|
|
920
1056
|
* Fetch + SHA-verify the bytes of every store-resolved candidate that needs
|
|
921
1057
|
* bytes on disk into `.skaile/cache/store/`, reusing the same verified-fetch
|
|
922
1058
|
* path the pointer-only `library.install` uses (`installFromManifest` flat
|
|
923
|
-
* mode).
|
|
1059
|
+
* mode). Every kind with bytes, composition-only kinds included.
|
|
924
1060
|
*
|
|
925
1061
|
* @returns Map of candidate key → staged primary-manifest path.
|
|
926
1062
|
*/
|
|
@@ -928,7 +1064,6 @@ var AssetManager = class {
|
|
|
928
1064
|
const staged = /* @__PURE__ */ new Map();
|
|
929
1065
|
let installFromManifest;
|
|
930
1066
|
for (const c of resolved) {
|
|
931
|
-
if (NON_DEPLOYABLE_KINDS.has(c.kind) && c.kind !== "mcp-server") continue;
|
|
932
1067
|
if (!c.files || c.files.length === 0 || !c.sourceUrl || !c.commit) continue;
|
|
933
1068
|
if (this.candidateHasLocalBytes(c, repositories)) continue;
|
|
934
1069
|
if (!installFromManifest) {
|
|
@@ -998,7 +1133,14 @@ var AssetManager = class {
|
|
|
998
1133
|
}
|
|
999
1134
|
/** Build a copy-deploy catalog entry pointing at staged store bytes. */
|
|
1000
1135
|
stagedCandidateToEntry(c, stagedManifestPath) {
|
|
1136
|
+
const paths = (c.files ?? []).map((f) => f.path);
|
|
1137
|
+
const root = commonDirPrefix(paths);
|
|
1138
|
+
const files = filesUnderManifestDir(
|
|
1139
|
+
paths.map((p) => root && p.startsWith(`${root}/`) ? p.slice(root.length + 1) : p),
|
|
1140
|
+
this.stagedManifestRel(c)
|
|
1141
|
+
);
|
|
1001
1142
|
const entry = {
|
|
1143
|
+
files,
|
|
1002
1144
|
name: c.name,
|
|
1003
1145
|
kind: c.kind,
|
|
1004
1146
|
description: c.description ?? "",
|
|
@@ -1040,13 +1182,17 @@ var AssetManager = class {
|
|
|
1040
1182
|
const cloneError = this.ensureSourceClones(repositories, sources);
|
|
1041
1183
|
if (cloneError) return cloneError;
|
|
1042
1184
|
const provenanceIndex = await buildProvenanceIndex(this.buildClones(repositories), {
|
|
1043
|
-
projectDir: this.projectDir
|
|
1044
|
-
|
|
1045
|
-
const { resolved, missing, overridesApplied } = await this.resolveWithStores(dependencies, {
|
|
1046
|
-
provenanceIndex,
|
|
1047
|
-
overrides,
|
|
1048
|
-
stores
|
|
1185
|
+
projectDir: this.projectDir,
|
|
1186
|
+
knownKinds: this.knownKinds
|
|
1049
1187
|
});
|
|
1188
|
+
const { resolved, missing, overridesApplied, presets } = await this.resolveWithStores(
|
|
1189
|
+
dependencies,
|
|
1190
|
+
{
|
|
1191
|
+
provenanceIndex,
|
|
1192
|
+
overrides,
|
|
1193
|
+
stores
|
|
1194
|
+
}
|
|
1195
|
+
);
|
|
1050
1196
|
const lib = await this.resolveLibraryEntries(missing);
|
|
1051
1197
|
const directLock = this.directInstallLockEntries();
|
|
1052
1198
|
const libraryLock = { ...directLock, ...await this.libraryLockEntries(lib) };
|
|
@@ -1060,6 +1206,7 @@ var AssetManager = class {
|
|
|
1060
1206
|
)
|
|
1061
1207
|
];
|
|
1062
1208
|
await this.renderDriverMcpConfig();
|
|
1209
|
+
const agentRender = this.renderAgentInstances();
|
|
1063
1210
|
const lockWritten = resolved.length > 0 || lib.entries.length > 0 || existsSync(this.lockPath);
|
|
1064
1211
|
if (lockWritten) {
|
|
1065
1212
|
writeLock(this.lockPath, buildLockFile(resolved, overridesApplied, libraryLock));
|
|
@@ -1067,7 +1214,16 @@ var AssetManager = class {
|
|
|
1067
1214
|
this.recordInstallHistory(deployed, removed);
|
|
1068
1215
|
const { npmInstalled, npmFailed } = await this.installRuntimeAssetDeps();
|
|
1069
1216
|
const stillMissing = missing.filter((m) => !lib.resolved.has(m));
|
|
1070
|
-
return {
|
|
1217
|
+
return {
|
|
1218
|
+
deployed,
|
|
1219
|
+
removed,
|
|
1220
|
+
missing: stillMissing,
|
|
1221
|
+
lockWritten,
|
|
1222
|
+
npmInstalled,
|
|
1223
|
+
npmFailed,
|
|
1224
|
+
presets,
|
|
1225
|
+
...agentRender
|
|
1226
|
+
};
|
|
1071
1227
|
}
|
|
1072
1228
|
/**
|
|
1073
1229
|
* Ensure all source clones are present/up to date. Returns an early
|
|
@@ -1321,7 +1477,14 @@ var AssetManager = class {
|
|
|
1321
1477
|
)
|
|
1322
1478
|
];
|
|
1323
1479
|
await this.renderDriverMcpConfig();
|
|
1324
|
-
|
|
1480
|
+
const agentRender = this.renderAgentInstances();
|
|
1481
|
+
return {
|
|
1482
|
+
deployed,
|
|
1483
|
+
removed: [],
|
|
1484
|
+
missing: library.missing,
|
|
1485
|
+
lockWritten: false,
|
|
1486
|
+
...agentRender
|
|
1487
|
+
};
|
|
1325
1488
|
}
|
|
1326
1489
|
/**
|
|
1327
1490
|
* Add a single asset (and its transitive dependencies) to the workspace.
|
|
@@ -1344,7 +1507,8 @@ var AssetManager = class {
|
|
|
1344
1507
|
parseAssetRef(ref);
|
|
1345
1508
|
this.ensureSourceClonesQuiet(repositories, sources);
|
|
1346
1509
|
const provenanceIndex = await buildProvenanceIndex(this.buildClones(repositories), {
|
|
1347
|
-
projectDir: this.projectDir
|
|
1510
|
+
projectDir: this.projectDir,
|
|
1511
|
+
knownKinds: this.knownKinds
|
|
1348
1512
|
});
|
|
1349
1513
|
const { resolved, missing, overridesApplied } = await this.resolveWithStores([ref], {
|
|
1350
1514
|
provenanceIndex,
|
|
@@ -1374,6 +1538,7 @@ var AssetManager = class {
|
|
|
1374
1538
|
}
|
|
1375
1539
|
this.addDependencyToConfig(ref);
|
|
1376
1540
|
await this.renderDriverMcpConfig();
|
|
1541
|
+
this.renderAgentInstances();
|
|
1377
1542
|
if (resolved.length > 0 || lib.entries.length > 0) {
|
|
1378
1543
|
const fresh = buildLockFile(resolved, overridesApplied, await this.libraryLockEntries(lib));
|
|
1379
1544
|
writeLock(this.lockPath, mergeLockFile(this.tryReadLock(), fresh));
|
|
@@ -1417,37 +1582,37 @@ var AssetManager = class {
|
|
|
1417
1582
|
);
|
|
1418
1583
|
}
|
|
1419
1584
|
/**
|
|
1420
|
-
*
|
|
1421
|
-
* `ref` as
|
|
1422
|
-
* not a dependency: nothing here installs the
|
|
1585
|
+
* Presets in the configured sources (and the bundled factory source) that list
|
|
1586
|
+
* `ref` as an asset item, for the `skaile add` discoverability hint. Membership is
|
|
1587
|
+
* not a dependency: nothing here installs the preset or its siblings.
|
|
1423
1588
|
*
|
|
1424
1589
|
* Matches on kind + name, and on publisher only when both sides carry one, so
|
|
1425
|
-
* a bare `skill:x`
|
|
1590
|
+
* a bare `skill:x` item still matches `skill:@pub/x`. Presets already
|
|
1426
1591
|
* declared in `skaile.yaml` are left out. Best-effort: any failure yields `[]`,
|
|
1427
1592
|
* so it can never fail an `add` that succeeded.
|
|
1428
1593
|
*
|
|
1429
1594
|
* @param ref - The added asset ref (`kind:name`, `kind:@pub/name`, optionally pinned).
|
|
1430
|
-
* @returns One `{ name, ref }` per containing
|
|
1431
|
-
* the `skaile add` form (`
|
|
1595
|
+
* @returns One `{ name, ref }` per containing preset, deduped by `ref`; `ref` is
|
|
1596
|
+
* the `skaile add` form (`preset:@pub/name`, or `preset:name` without a publisher).
|
|
1432
1597
|
*/
|
|
1433
|
-
async
|
|
1598
|
+
async presetsContaining(ref) {
|
|
1434
1599
|
const target = memberIdentity(ref);
|
|
1435
|
-
if (!target || target.kind === "
|
|
1600
|
+
if (!target || target.kind === "preset") return [];
|
|
1436
1601
|
try {
|
|
1437
1602
|
const sameAsset = (id, want) => !!id && id.kind === want.kind && id.name === want.name && (!id.publisher || !want.publisher || id.publisher === want.publisher);
|
|
1438
1603
|
const declared = this.loadConfig().dependencies.map(memberIdentity);
|
|
1439
1604
|
const out = [];
|
|
1440
1605
|
const seen = /* @__PURE__ */ new Set();
|
|
1441
|
-
for (const
|
|
1442
|
-
const members = [...
|
|
1606
|
+
for (const p of await this.search(void 0, "preset")) {
|
|
1607
|
+
const members = [...p.dependencies, ...p.requires.map((d) => `${d.kind}:${d.name}`)];
|
|
1443
1608
|
if (!members.some((m) => sameAsset(memberIdentity(m), target))) continue;
|
|
1444
|
-
const publisher =
|
|
1445
|
-
const
|
|
1446
|
-
if (declared.some((d) => sameAsset(d,
|
|
1447
|
-
const
|
|
1448
|
-
if (seen.has(
|
|
1449
|
-
seen.add(
|
|
1450
|
-
out.push({ name:
|
|
1609
|
+
const publisher = p.publisher?.replace(/^@/, "");
|
|
1610
|
+
const presetId = { kind: "preset", name: p.name, publisher };
|
|
1611
|
+
if (declared.some((d) => sameAsset(d, presetId))) continue;
|
|
1612
|
+
const presetRef = publisher ? assetRefToStr({ kind: "preset", name: p.name, publisher }) : `preset:${p.name}`;
|
|
1613
|
+
if (seen.has(presetRef)) continue;
|
|
1614
|
+
seen.add(presetRef);
|
|
1615
|
+
out.push({ name: p.name, ref: presetRef });
|
|
1451
1616
|
}
|
|
1452
1617
|
return out;
|
|
1453
1618
|
} catch {
|
|
@@ -1629,10 +1794,12 @@ var AssetManager = class {
|
|
|
1629
1794
|
*
|
|
1630
1795
|
* @param ref - Asset ref in `kind:name` form (e.g. `skill:my-skill`).
|
|
1631
1796
|
* @returns `true` if the asset was found and removed, `false` if it was not deployed.
|
|
1797
|
+
* A `preset:` ref has no deployed files: it is found when declared in `skaile.yaml`, and
|
|
1798
|
+
* only its declaration goes — its expanded items leave with the next `skaile install`.
|
|
1632
1799
|
*/
|
|
1633
1800
|
remove(ref) {
|
|
1634
1801
|
const parsed = parseAssetRef(ref);
|
|
1635
|
-
let ok = false;
|
|
1802
|
+
let ok = parsed.kind === "preset" ? this.removeDependencyFromConfig(parsed) : false;
|
|
1636
1803
|
for (const t of this.targetHarnesses()) {
|
|
1637
1804
|
if (removeAsset(parsed.kind, parsed.name, this.deployOptsFor(t))) ok = true;
|
|
1638
1805
|
}
|
|
@@ -1683,7 +1850,7 @@ var AssetManager = class {
|
|
|
1683
1850
|
for (const [name, decl] of Object.entries(repositories)) {
|
|
1684
1851
|
const repoDir = this.resolveRepoDir(decl, name);
|
|
1685
1852
|
if (!repoDir) continue;
|
|
1686
|
-
all = [...all, ...await scanRepo(repoDir, name)];
|
|
1853
|
+
all = [...all, ...await scanRepo(repoDir, name, { knownKinds: this.knownKinds })];
|
|
1687
1854
|
}
|
|
1688
1855
|
if (kind) all = all.filter((e) => e.kind === kind);
|
|
1689
1856
|
if (query) {
|
|
@@ -1727,7 +1894,7 @@ var AssetManager = class {
|
|
|
1727
1894
|
for (const [name, decl] of Object.entries(repositories)) {
|
|
1728
1895
|
const repoDir = this.resolveRepoDir(decl, name);
|
|
1729
1896
|
if (!repoDir) continue;
|
|
1730
|
-
const entries = await scanRepo(repoDir, name);
|
|
1897
|
+
const entries = await scanRepo(repoDir, name, { knownKinds: this.knownKinds });
|
|
1731
1898
|
const match = entries.find(
|
|
1732
1899
|
(e) => e.kind === parsed.kind && e.name === parsed.name && (!parsed.publisher || e.publisher === parsed.publisher)
|
|
1733
1900
|
);
|
|
@@ -1746,7 +1913,11 @@ var AssetManager = class {
|
|
|
1746
1913
|
* @returns Shallow {@link CatalogEntry} objects (description and version will be empty).
|
|
1747
1914
|
*/
|
|
1748
1915
|
listDeployed(kind) {
|
|
1749
|
-
const kinds = kind ? [kind]
|
|
1916
|
+
const kinds = kind ? [this.installTarget(kind)].filter((k) => k !== void 0) : [
|
|
1917
|
+
...new Set(
|
|
1918
|
+
this.registry.getAllProviders().map((p) => p.installTarget).filter((t) => t !== void 0)
|
|
1919
|
+
)
|
|
1920
|
+
];
|
|
1750
1921
|
const result = [];
|
|
1751
1922
|
const seen = /* @__PURE__ */ new Set();
|
|
1752
1923
|
for (const k of kinds) {
|
|
@@ -1758,7 +1929,7 @@ var AssetManager = class {
|
|
|
1758
1929
|
if (item.isDirectory() || item.isSymbolicLink()) {
|
|
1759
1930
|
name = item.name;
|
|
1760
1931
|
} else if (item.isFile()) {
|
|
1761
|
-
name = item.name.replace(/\.prompt\.md$/, "").replace(/\.flow\.(yaml|json)$/, "").replace(/\.
|
|
1932
|
+
name = item.name.replace(/\.prompt\.md$/, "").replace(/\.flow\.(yaml|json)$/, "").replace(/\.(md|toml|yaml|json)$/, "");
|
|
1762
1933
|
} else {
|
|
1763
1934
|
continue;
|
|
1764
1935
|
}
|
|
@@ -1796,8 +1967,9 @@ var AssetManager = class {
|
|
|
1796
1967
|
if (this.global || this.driverTarget === "claude-code") return [];
|
|
1797
1968
|
const tracked = /* @__PURE__ */ new Map();
|
|
1798
1969
|
const track = (kind, name) => {
|
|
1799
|
-
|
|
1800
|
-
|
|
1970
|
+
const component = kind ? this.installTarget(kind) : void 0;
|
|
1971
|
+
if (kind && name && component) {
|
|
1972
|
+
tracked.set(`${kind}:${name}`, { kind, name, component });
|
|
1801
1973
|
}
|
|
1802
1974
|
};
|
|
1803
1975
|
const lock = this.tryReadLock();
|
|
@@ -1818,8 +1990,7 @@ var AssetManager = class {
|
|
|
1818
1990
|
} catch {
|
|
1819
1991
|
}
|
|
1820
1992
|
const out = [];
|
|
1821
|
-
for (const { kind, name } of tracked.values()) {
|
|
1822
|
-
const k = kind;
|
|
1993
|
+
for (const { kind, name, component: k } of tracked.values()) {
|
|
1823
1994
|
const legacy = deployedDir(k, name, "claude-code", false, this.projectDir);
|
|
1824
1995
|
if (legacy === deployedDir(k, name, this.driverTarget, false, this.projectDir)) continue;
|
|
1825
1996
|
if (isDeployed(k, name, "claude-code", false, this.projectDir)) {
|
|
@@ -1833,11 +2004,12 @@ var AssetManager = class {
|
|
|
1833
2004
|
* with a reconciliation {@link DeclaredState}:
|
|
1834
2005
|
*
|
|
1835
2006
|
* - `declared` — in `skaile.yaml`, not yet resolved into the lock.
|
|
1836
|
-
* - `installed` — declared + locked, and (for
|
|
1837
|
-
* disk. An `mcp-server` is instead checked against the
|
|
1838
|
-
* would actually wire (store-staged or materialized
|
|
1839
|
-
*
|
|
1840
|
-
* locked — they are resolved at session start with no
|
|
2007
|
+
* - `installed` — declared + locked, and (for kinds with an `installTarget`)
|
|
2008
|
+
* materialized on disk. An `mcp-server` is instead checked against the
|
|
2009
|
+
* declarations the runner would actually wire (store-staged or materialized
|
|
2010
|
+
* `MCP.md`); the remaining composition-only kinds (no `installTarget`) count as
|
|
2011
|
+
* installed once locked — they are resolved at session start with no harness
|
|
2012
|
+
* footprint here.
|
|
1841
2013
|
* - `drift` — declared + locked but the deployed files are missing on disk.
|
|
1842
2014
|
* - `invalid` — the `dependencies:` entry isn't a parseable canonical ref. Only
|
|
1843
2015
|
* surfaced in the unfiltered listing (a `kind` filter can't classify it).
|
|
@@ -1879,7 +2051,7 @@ var AssetManager = class {
|
|
|
1879
2051
|
continue;
|
|
1880
2052
|
}
|
|
1881
2053
|
if (kind && parsed.kind !== kind) continue;
|
|
1882
|
-
const locked = lockKeys.some(
|
|
2054
|
+
const locked = parsed.kind === "preset" ? lock !== null : lockKeys.some(
|
|
1883
2055
|
(k) => k.kind === parsed.kind && k.name === parsed.name && (!parsed.publisher || k.publisher === parsed.publisher)
|
|
1884
2056
|
);
|
|
1885
2057
|
let state;
|
|
@@ -1888,17 +2060,20 @@ var AssetManager = class {
|
|
|
1888
2060
|
} else if (parsed.kind === "mcp-server") {
|
|
1889
2061
|
const wired = await wiredMcpNames();
|
|
1890
2062
|
state = wired.has(parsed.name) || wired.has(unscopedName(parsed.name)) ? "installed" : "drift";
|
|
1891
|
-
} else if (NON_DEPLOYABLE_KINDS.has(parsed.kind)) {
|
|
1892
|
-
state = "installed";
|
|
1893
2063
|
} else {
|
|
1894
|
-
const
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
2064
|
+
const component = this.installTarget(parsed.kind);
|
|
2065
|
+
if (!component) {
|
|
2066
|
+
state = "installed";
|
|
2067
|
+
} else {
|
|
2068
|
+
const onDisk = isDeployed(
|
|
2069
|
+
component,
|
|
2070
|
+
parsed.name,
|
|
2071
|
+
this.driverTarget,
|
|
2072
|
+
this.global,
|
|
2073
|
+
this.projectDir
|
|
2074
|
+
);
|
|
2075
|
+
state = onDisk ? "installed" : "drift";
|
|
2076
|
+
}
|
|
1902
2077
|
}
|
|
1903
2078
|
out.push({ ref, kind: parsed.kind, name: parsed.name, state });
|
|
1904
2079
|
}
|
|
@@ -1941,18 +2116,16 @@ var AssetManager = class {
|
|
|
1941
2116
|
continue;
|
|
1942
2117
|
}
|
|
1943
2118
|
if (opts?.kind && parsed.kind !== opts.kind) continue;
|
|
1944
|
-
const locked = lockKeys.some(
|
|
2119
|
+
const locked = parsed.kind === "preset" ? lock !== null : lockKeys.some(
|
|
1945
2120
|
(k) => k.kind === parsed.kind && k.name === parsed.name && (!parsed.publisher || k.publisher === parsed.publisher)
|
|
1946
2121
|
);
|
|
1947
2122
|
for (const harness of harnesses) {
|
|
1948
2123
|
let state;
|
|
1949
2124
|
if (!locked) {
|
|
1950
2125
|
state = "declared";
|
|
1951
|
-
} else if (NON_DEPLOYABLE_KINDS.has(parsed.kind)) {
|
|
1952
|
-
state = "installed";
|
|
1953
2126
|
} else {
|
|
1954
|
-
const
|
|
1955
|
-
state =
|
|
2127
|
+
const component = this.installTarget(parsed.kind);
|
|
2128
|
+
state = !component || isDeployed(component, parsed.name, harness, true) ? "installed" : "drift";
|
|
1956
2129
|
}
|
|
1957
2130
|
out.push({ ref, kind: parsed.kind, name: parsed.name, state, harness });
|
|
1958
2131
|
}
|
|
@@ -2110,8 +2283,9 @@ var AssetManager = class {
|
|
|
2110
2283
|
for (const [ref, entry] of Object.entries(lock.assets)) {
|
|
2111
2284
|
if (reported.has(ref) || entry.library?.installed) continue;
|
|
2112
2285
|
const { publisher, kind, name, version } = parseCanonicalLockKey(ref);
|
|
2113
|
-
|
|
2114
|
-
if (
|
|
2286
|
+
const component = kind ? this.installTarget(kind) : void 0;
|
|
2287
|
+
if (!kind || !name || !component) continue;
|
|
2288
|
+
if (isDeployed(component, name, this.driverTarget, this.global, this.projectDir)) {
|
|
2115
2289
|
continue;
|
|
2116
2290
|
}
|
|
2117
2291
|
result.push({
|
|
@@ -2144,8 +2318,10 @@ var AssetManager = class {
|
|
|
2144
2318
|
const parsed = parseAssetRef(ref);
|
|
2145
2319
|
const entry = await this.info(ref);
|
|
2146
2320
|
if (!entry || !existsSync(entry.source)) return { status: "not-found" };
|
|
2321
|
+
const component = this.installTarget(parsed.kind);
|
|
2322
|
+
if (!component) return { status: "not-deployed" };
|
|
2147
2323
|
const deployedPath = join(
|
|
2148
|
-
deployedBase(
|
|
2324
|
+
deployedBase(component, this.driverTarget, this.global, this.projectDir),
|
|
2149
2325
|
parsed.name
|
|
2150
2326
|
);
|
|
2151
2327
|
if (!existsSync(deployedPath)) return { status: "not-deployed" };
|
|
@@ -2167,7 +2343,8 @@ var AssetManager = class {
|
|
|
2167
2343
|
const { repositories, sources, stores, dependencies, overrides } = this.loadConfig();
|
|
2168
2344
|
this.ensureSourceClonesQuiet(repositories, sources);
|
|
2169
2345
|
const provenanceIndex = await buildProvenanceIndex(this.buildClones(repositories), {
|
|
2170
|
-
projectDir: this.projectDir
|
|
2346
|
+
projectDir: this.projectDir,
|
|
2347
|
+
knownKinds: this.knownKinds
|
|
2171
2348
|
});
|
|
2172
2349
|
const { resolved, missing, overridesApplied } = await this.resolveWithStores(dependencies, {
|
|
2173
2350
|
provenanceIndex,
|
|
@@ -2282,18 +2459,11 @@ var AssetManager = class {
|
|
|
2282
2459
|
for (const req of full.requires) {
|
|
2283
2460
|
const dep = memberIdentity(`${req.kind}:${req.name}`);
|
|
2284
2461
|
if (!dep) continue;
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
dep.name,
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
this.projectDir
|
|
2291
|
-
)) {
|
|
2292
|
-
const inRepos = await resolveAsset(
|
|
2293
|
-
{ kind: dep.kind, name: dep.name },
|
|
2294
|
-
repositories,
|
|
2295
|
-
this.reposDir
|
|
2296
|
-
) !== null;
|
|
2462
|
+
const depComponent = this.installTarget(dep.kind);
|
|
2463
|
+
if (depComponent && !isDeployed(depComponent, dep.name, this.driverTarget, this.global, this.projectDir)) {
|
|
2464
|
+
const inRepos = await resolveAsset({ kind: dep.kind, name: dep.name }, repositories, this.reposDir, {
|
|
2465
|
+
knownKinds: this.knownKinds
|
|
2466
|
+
}) !== null;
|
|
2297
2467
|
issues.push({
|
|
2298
2468
|
assetKind: entry.kind,
|
|
2299
2469
|
assetName: entry.name,
|
|
@@ -2311,7 +2481,7 @@ var AssetManager = class {
|
|
|
2311
2481
|
* Create a minimal asset scaffold directory (delegates to {@link createScaffold}).
|
|
2312
2482
|
*
|
|
2313
2483
|
* @param name - Asset name (also used as the directory name).
|
|
2314
|
-
* @param kind - Asset kind: `skill` | `agent` | `
|
|
2484
|
+
* @param kind - Asset kind: `skill` | `agent` | `preset` | `flow` | `prompt` | `contract`.
|
|
2315
2485
|
* @param destDir - Parent directory to create the asset in.
|
|
2316
2486
|
* @param opts - Optional scaffold content (`description`).
|
|
2317
2487
|
* @returns `{ ok: true, path }` on success, `{ ok: false, path: errorMessage }` if the
|
|
@@ -2372,14 +2542,9 @@ var AssetManager = class {
|
|
|
2372
2542
|
if (!lock) return removed;
|
|
2373
2543
|
for (const ref of Object.keys(lock.assets)) {
|
|
2374
2544
|
const { kind, name } = parseCanonicalLockKey(ref);
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
name,
|
|
2379
|
-
this.driverTarget,
|
|
2380
|
-
this.global,
|
|
2381
|
-
this.projectDir
|
|
2382
|
-
);
|
|
2545
|
+
const component = kind ? this.installTarget(kind) : void 0;
|
|
2546
|
+
if (!kind || !name || !component) continue;
|
|
2547
|
+
const dest = deployedDir(component, name, this.driverTarget, this.global, this.projectDir);
|
|
2383
2548
|
try {
|
|
2384
2549
|
const stat = lstatSync(dest);
|
|
2385
2550
|
if (stat.isSymbolicLink()) unlinkSync(dest);
|
|
@@ -2460,9 +2625,9 @@ var AssetManager = class {
|
|
|
2460
2625
|
*/
|
|
2461
2626
|
removeDependencyFromConfig(target) {
|
|
2462
2627
|
const configPath = join(this.stateRoot, "skaile.yaml");
|
|
2463
|
-
if (!existsSync(configPath)) return;
|
|
2628
|
+
if (!existsSync(configPath)) return false;
|
|
2464
2629
|
const raw = parse(readFileSync(configPath, "utf8")) ?? {};
|
|
2465
|
-
if (!Array.isArray(raw.dependencies)) return;
|
|
2630
|
+
if (!Array.isArray(raw.dependencies)) return false;
|
|
2466
2631
|
const wantPub = target.publisher?.replace(/^@/, "");
|
|
2467
2632
|
const idx = raw.dependencies.findIndex((dep) => {
|
|
2468
2633
|
if (typeof dep !== "string") return false;
|
|
@@ -2471,10 +2636,10 @@ var AssetManager = class {
|
|
|
2471
2636
|
const havePub = p.publisher?.replace(/^@/, "");
|
|
2472
2637
|
return wantPub === void 0 || havePub === void 0 || havePub === wantPub;
|
|
2473
2638
|
});
|
|
2474
|
-
if (idx
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2639
|
+
if (idx === -1) return false;
|
|
2640
|
+
raw.dependencies.splice(idx, 1);
|
|
2641
|
+
writeFileSync(configPath, stringify(raw, { lineWidth: 120 }));
|
|
2642
|
+
return true;
|
|
2478
2643
|
}
|
|
2479
2644
|
resolveRepoDir(decl, name) {
|
|
2480
2645
|
const links = readLinks(this.projectDir);
|
|
@@ -2493,6 +2658,6 @@ var AssetManager = class {
|
|
|
2493
2658
|
}
|
|
2494
2659
|
};
|
|
2495
2660
|
|
|
2496
|
-
export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError,
|
|
2497
|
-
//# sourceMappingURL=chunk-
|
|
2498
|
-
//# sourceMappingURL=chunk-
|
|
2661
|
+
export { AssetManager, FACTORY_SOURCE_URL, MissingManifestError, installAgentInstances, normalizeRepoUrl, parseCanonicalLockKey, parseRefTolerant, renderMcpServerConfig, softDepName };
|
|
2662
|
+
//# sourceMappingURL=chunk-PTO2YDDG.js.map
|
|
2663
|
+
//# sourceMappingURL=chunk-PTO2YDDG.js.map
|