@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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../cli/src/skill-checks.ts"],"names":[],"mappings":";;;;AAwBO,SAAS,kBAAA,CACd,MAAA,EACA,IAAA,EACA,OAAA,EACgB;AAChB,EAAA,MAAM,MAAsB,EAAC;AAC7B,EAAA,KAAA,MAAW,KAAK,0BAAA,CAA2B,MAAA,EAAQ,EAAE,OAAA,EAAS,CAAA,EAAG;AAC/D,IAAA,GAAA,CAAI,IAAA,CAAK,EAAE,GAAA,EAAK,mBAAA,EAAqB,MAAM,CAAA,EAAG,CAAA,CAAE,KAAK,CAAA,EAAA,EAAK,CAAA,CAAE,OAAO,CAAA,CAAA,EAAI,WAAA,EAAa,MAAM,CAAA;AAAA,EAC5F;AAGA,EAAA,IAAI,IAAA,EAAM,OAAA,CAAQ,aAAA,EAAe,EAAE,MAAM,sBAAA,EAAwB;AAC/D,IAAA,GAAA,CAAI,IAAA,CAAK;AAAA,MACP,GAAA,EAAK,OAAA;AAAA,MACL,IAAA,EAAM,gEAAA;AAAA,MACN,WAAA,EAAa;AAAA,KACd,CAAA;AAAA,EACH;AACA,EAAA,OAAO,GAAA;AACT","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../cli/src/skill-checks.ts"],"names":[],"mappings":";;;;AAwBO,SAAS,kBAAA,CACd,MAAA,EACA,IAAA,EACA,OAAA,EACgB;AAChB,EAAA,MAAM,MAAsB,EAAC;AAC7B,EAAA,KAAA,MAAW,KAAK,0BAAA,CAA2B,MAAA,EAAQ,EAAE,OAAA,EAAS,CAAA,EAAG;AAC/D,IAAA,GAAA,CAAI,IAAA,CAAK,EAAE,GAAA,EAAK,mBAAA,EAAqB,MAAM,CAAA,EAAG,CAAA,CAAE,KAAK,CAAA,EAAA,EAAK,CAAA,CAAE,OAAO,CAAA,CAAA,EAAI,WAAA,EAAa,MAAM,CAAA;AAAA,EAC5F;AAGA,EAAA,IAAI,IAAA,EAAM,OAAA,CAAQ,aAAA,EAAe,EAAE,MAAM,sBAAA,EAAwB;AAC/D,IAAA,GAAA,CAAI,IAAA,CAAK;AAAA,MACP,GAAA,EAAK,OAAA;AAAA,MACL,IAAA,EAAM,gEAAA;AAAA,MACN,WAAA,EAAa;AAAA,KACd,CAAA;AAAA,EACH;AACA,EAAA,OAAO,GAAA;AACT","file":"chunk-2NYXQYHN.js","sourcesContent":["/**\n * Per-skill advisory checks shared by `skaile validate` and the `library publish`\n * plan, so both surface the same warning for the same `SKILL.md`.\n */\n\nimport { checkAgentSkillConformance } from \"@skaile/workspaces/core\";\nimport { SKILL_BODY_PLACEHOLDER } from \"@skaile/workspaces/types/manifests\";\n\n/** One advisory finding, printed as `<file> [<tag>] — <text>`. */\nexport interface SkillFinding {\n tag: \"skill conformance\" | \"skill\";\n text: string;\n /** `true` for an agentskills.io conformance finding (`--strict-conformance` escalates these). */\n conformance: boolean;\n}\n\n/**\n * Run the skill-only checks on a parsed `SKILL.md`: agentskills.io conformance and the\n * untouched `library create skill` placeholder body.\n *\n * @param parsed Parsed SKILL.md frontmatter.\n * @param body The markdown body after the frontmatter (`undefined` when unavailable).\n * @param dirName The SKILL.md's parent folder name (enables the name==dir rule).\n */\nexport function checkSkillManifest(\n parsed: Record<string, unknown>,\n body: string | undefined,\n dirName: string,\n): SkillFinding[] {\n const out: SkillFinding[] = [];\n for (const f of checkAgentSkillConformance(parsed, { dirName })) {\n out.push({ tag: \"skill conformance\", text: `${f.field}: ${f.message}`, conformance: true });\n }\n // `library create skill` writes a placeholder body under a `# <name>` heading;\n // shipping it untouched is never intended.\n if (body?.replace(/^#[^\\n]*\\n+/, \"\") === SKILL_BODY_PLACEHOLDER) {\n out.push({\n tag: \"skill\",\n text: \"body is still the scaffold placeholder; write the skill prompt\",\n conformance: false,\n });\n }\n return out;\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { globalCacheRoot, globalSkaileDir, mergeLegacyEntriesInto, mergeLegacyEntriesKeyed } from './chunk-MFHKHXDE.js';
|
|
2
|
-
import { SUPPORTED_DRIVER_TARGETS, globalHarnessRoot } from './chunk-
|
|
3
|
-
import { decodeSkaileManifest, compositeSha256, listAssetFiles, SKAILE_MANIFEST_FILENAME, sha256Hex } from './chunk-
|
|
2
|
+
import { SUPPORTED_DRIVER_TARGETS, globalHarnessRoot } from './chunk-CPSIPIX7.js';
|
|
3
|
+
import { decodeSkaileManifest, compositeSha256, listAssetFiles, SKAILE_MANIFEST_FILENAME, sha256Hex } from './chunk-7ZHLYXTI.js';
|
|
4
4
|
import { readPluginGroupings } from './chunk-RVRB27AN.js';
|
|
5
|
-
import { scanDirectory, parseFrontmatter,
|
|
6
|
-
import { isValidAssetName, slugifyAssetName, parseAssetRef, assetRefToStr } from './chunk-
|
|
5
|
+
import { scanDirectory, parseFrontmatter, assetDepRefs, fromMcpServerMdContent, withFsDeadline, tryWithFsDeadline, fsDeadlineMs } from './chunk-PA7WLID3.js';
|
|
6
|
+
import { isValidAssetName, slugifyAssetName, parseAssetRef, assetRefToStr } from './chunk-AO7VJ6G6.js';
|
|
7
7
|
import { isRetentionValue } from './chunk-C3CAXQMA.js';
|
|
8
8
|
import { existsSync, readFileSync, mkdirSync, writeFileSync, lstatSync, symlinkSync, rmSync, readdirSync, constants, statSync } from 'fs';
|
|
9
9
|
import { readdir, stat, cp, rm, open, readFile } from 'fs/promises';
|
|
@@ -13,6 +13,247 @@ import { spawnSync } from 'child_process';
|
|
|
13
13
|
import semver from 'semver';
|
|
14
14
|
import fg from 'fast-glob';
|
|
15
15
|
|
|
16
|
+
// core/src/type-guards.ts
|
|
17
|
+
function isRecord(value) {
|
|
18
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// core/src/agent-instances.ts
|
|
22
|
+
var AGENT_INSTANCE_ID_PATTERN = /^[a-z][a-z0-9_-]*$/;
|
|
23
|
+
var DEFAULT_AGENT_INSTANCE_ID = "default";
|
|
24
|
+
var AGENT_INSTANCE_LIFECYCLES = ["standing", "role"];
|
|
25
|
+
var AGENT_INSTANCE_MEMORY_SCOPES = ["instance", "user", "workspace", "none"];
|
|
26
|
+
var AGENT_INSTANCE_TRIGGER_KINDS = ["schedule", "webhook", "channel", "event"];
|
|
27
|
+
var INSTANCE_KEYS = {
|
|
28
|
+
ref: true,
|
|
29
|
+
lifecycle: true,
|
|
30
|
+
model: true,
|
|
31
|
+
permissions: true,
|
|
32
|
+
memory: true,
|
|
33
|
+
triggers: true,
|
|
34
|
+
connectors: true,
|
|
35
|
+
budget: true
|
|
36
|
+
};
|
|
37
|
+
function normalizeAgentInstances(raw, diagnostics) {
|
|
38
|
+
if (raw === void 0 || raw === null) return void 0;
|
|
39
|
+
if (!isRecord(raw)) {
|
|
40
|
+
diagnostics.push({
|
|
41
|
+
code: "invalid_agents_section",
|
|
42
|
+
severity: "error",
|
|
43
|
+
message: "`agents:` must be a mapping of instance id \u2192 { ref, \u2026 }.",
|
|
44
|
+
path: "agents"
|
|
45
|
+
});
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
const out = {};
|
|
49
|
+
for (const [id, value] of Object.entries(raw)) {
|
|
50
|
+
const path = `agents.${id}`;
|
|
51
|
+
if (!AGENT_INSTANCE_ID_PATTERN.test(id)) {
|
|
52
|
+
diagnostics.push({
|
|
53
|
+
code: "invalid_agent_instance_id",
|
|
54
|
+
severity: "error",
|
|
55
|
+
message: `Agent instance id "${id}" must match [a-z][a-z0-9_-]* (lowercase, starts with a letter).`,
|
|
56
|
+
path
|
|
57
|
+
});
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (!isRecord(value) || typeof value.ref !== "string" || value.ref.trim() === "") {
|
|
61
|
+
diagnostics.push({
|
|
62
|
+
code: "invalid_agent_instance",
|
|
63
|
+
severity: "error",
|
|
64
|
+
message: `Agent instance "${id}" needs a non-empty string \`ref\` (e.g. "agent:@publisher/name" or a local path).`,
|
|
65
|
+
path: `${path}.ref`
|
|
66
|
+
});
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
out[id] = normalizeInstance(id, value, value.ref, diagnostics);
|
|
70
|
+
}
|
|
71
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
72
|
+
}
|
|
73
|
+
function normalizeInstance(id, raw, ref, diagnostics) {
|
|
74
|
+
const path = `agents.${id}`;
|
|
75
|
+
const instance = { ref };
|
|
76
|
+
for (const key of Object.keys(raw)) {
|
|
77
|
+
if (INSTANCE_KEYS[key]) continue;
|
|
78
|
+
diagnostics.push({
|
|
79
|
+
code: "unknown_agent_instance_key",
|
|
80
|
+
severity: "warning",
|
|
81
|
+
message: `Unknown key "${key}" on agent instance "${id}" is ignored \u2014 expected one of: ${Object.keys(INSTANCE_KEYS).join(", ")}.`,
|
|
82
|
+
path: `${path}.${key}`
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (raw.lifecycle !== void 0) {
|
|
86
|
+
if (AGENT_INSTANCE_LIFECYCLES.includes(raw.lifecycle)) {
|
|
87
|
+
instance.lifecycle = raw.lifecycle;
|
|
88
|
+
} else {
|
|
89
|
+
diagnostics.push({
|
|
90
|
+
code: "invalid_agent_instance_lifecycle",
|
|
91
|
+
severity: "error",
|
|
92
|
+
message: `Agent instance "${id}": lifecycle "${String(raw.lifecycle)}" \u2014 expected one of: ${AGENT_INSTANCE_LIFECYCLES.join(", ")}.`,
|
|
93
|
+
path: `${path}.lifecycle`
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (isRecord(raw.model)) {
|
|
98
|
+
const model = {};
|
|
99
|
+
if (typeof raw.model.preferred === "string") model.preferred = raw.model.preferred;
|
|
100
|
+
if (Array.isArray(raw.model.fallback)) {
|
|
101
|
+
model.fallback = raw.model.fallback.filter((m) => typeof m === "string");
|
|
102
|
+
}
|
|
103
|
+
if (Object.keys(model).length > 0) instance.model = model;
|
|
104
|
+
}
|
|
105
|
+
if (isRecord(raw.permissions)) instance.permissions = raw.permissions;
|
|
106
|
+
if (raw.memory !== void 0) {
|
|
107
|
+
const scope = isRecord(raw.memory) ? raw.memory.scope : void 0;
|
|
108
|
+
if (AGENT_INSTANCE_MEMORY_SCOPES.includes(scope)) {
|
|
109
|
+
instance.memory = { scope };
|
|
110
|
+
} else {
|
|
111
|
+
diagnostics.push({
|
|
112
|
+
code: "invalid_agent_instance_memory_scope",
|
|
113
|
+
severity: "error",
|
|
114
|
+
message: `Agent instance "${id}": memory.scope ${scope === void 0 ? "is required" : `"${String(scope)}" is unknown`} \u2014 expected one of: ${AGENT_INSTANCE_MEMORY_SCOPES.join(", ")}.`,
|
|
115
|
+
path: `${path}.memory.scope`
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (Array.isArray(raw.triggers)) {
|
|
120
|
+
const triggers = normalizeTriggers(id, raw.triggers, diagnostics);
|
|
121
|
+
if (triggers.length > 0) instance.triggers = triggers;
|
|
122
|
+
} else if (raw.triggers !== void 0) {
|
|
123
|
+
diagnostics.push({
|
|
124
|
+
code: "invalid_agent_instance_triggers",
|
|
125
|
+
severity: "error",
|
|
126
|
+
message: `Agent instance "${id}": triggers must be a list of { id, \u2026 } entries.`,
|
|
127
|
+
path: `${path}.triggers`
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
if (isRecord(raw.connectors)) {
|
|
131
|
+
const connectors = {};
|
|
132
|
+
for (const [slot, connectorId] of Object.entries(raw.connectors)) {
|
|
133
|
+
if (typeof connectorId === "string" && connectorId !== "") {
|
|
134
|
+
connectors[slot] = connectorId;
|
|
135
|
+
} else {
|
|
136
|
+
diagnostics.push({
|
|
137
|
+
code: "invalid_agent_instance_connector",
|
|
138
|
+
severity: "error",
|
|
139
|
+
message: `Agent instance "${id}": connectors.${slot} must name a skaile.yaml connectors[].id.`,
|
|
140
|
+
path: `${path}.connectors.${slot}`
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (Object.keys(connectors).length > 0) instance.connectors = connectors;
|
|
145
|
+
} else if (raw.connectors !== void 0) {
|
|
146
|
+
diagnostics.push({
|
|
147
|
+
code: "invalid_agent_instance_connector",
|
|
148
|
+
severity: "error",
|
|
149
|
+
message: `Agent instance "${id}": connectors must map compose slot ids to connectors[].id.`,
|
|
150
|
+
path: `${path}.connectors`
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
if (isRecord(raw.budget)) {
|
|
154
|
+
const budget = {};
|
|
155
|
+
if (typeof raw.budget.max_turns === "number") budget.max_turns = raw.budget.max_turns;
|
|
156
|
+
if (typeof raw.budget.max_tokens === "number") budget.max_tokens = raw.budget.max_tokens;
|
|
157
|
+
if (Object.keys(budget).length > 0) instance.budget = budget;
|
|
158
|
+
}
|
|
159
|
+
return instance;
|
|
160
|
+
}
|
|
161
|
+
function normalizeTriggers(instanceId, raw, diagnostics) {
|
|
162
|
+
const out = [];
|
|
163
|
+
raw.forEach((item, i) => {
|
|
164
|
+
const path = `agents.${instanceId}.triggers[${i}]`;
|
|
165
|
+
if (!isRecord(item) || typeof item.id !== "string" || !AGENT_INSTANCE_ID_PATTERN.test(item.id)) {
|
|
166
|
+
diagnostics.push({
|
|
167
|
+
code: "invalid_agent_instance_trigger",
|
|
168
|
+
severity: "error",
|
|
169
|
+
message: `Agent instance "${instanceId}": trigger ${i} needs an \`id\` matching [a-z][a-z0-9_-]*.`,
|
|
170
|
+
path: `${path}.id`
|
|
171
|
+
});
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (item.kind !== void 0 && !AGENT_INSTANCE_TRIGGER_KINDS.includes(item.kind)) {
|
|
175
|
+
diagnostics.push({
|
|
176
|
+
code: "invalid_agent_instance_trigger",
|
|
177
|
+
severity: "error",
|
|
178
|
+
message: `Agent instance "${instanceId}": trigger "${item.id}" kind "${String(item.kind)}" \u2014 expected one of: ${AGENT_INSTANCE_TRIGGER_KINDS.join(", ")}.`,
|
|
179
|
+
path: `${path}.kind`
|
|
180
|
+
});
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
out.push({ ...item });
|
|
184
|
+
});
|
|
185
|
+
return out;
|
|
186
|
+
}
|
|
187
|
+
function definedEntries(obj) {
|
|
188
|
+
const out = {};
|
|
189
|
+
for (const [key, value] of Object.entries(obj ?? {})) {
|
|
190
|
+
if (value !== void 0) out[key] = value;
|
|
191
|
+
}
|
|
192
|
+
return out;
|
|
193
|
+
}
|
|
194
|
+
function mergeAgentPermissions(base, overlay) {
|
|
195
|
+
return {
|
|
196
|
+
...base,
|
|
197
|
+
...definedEntries(overlay),
|
|
198
|
+
deny_write: [.../* @__PURE__ */ new Set([...base?.deny_write ?? [], ...overlay?.deny_write ?? []])],
|
|
199
|
+
deny_read: [.../* @__PURE__ */ new Set([...base?.deny_read ?? [], ...overlay?.deny_read ?? []])]
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
function mergeTriggers(base, overlay) {
|
|
203
|
+
const byId = /* @__PURE__ */ new Map();
|
|
204
|
+
for (const t of [...base ?? [], ...overlay ?? []]) {
|
|
205
|
+
byId.set(t.id, { ...byId.get(t.id), ...definedEntries(t) });
|
|
206
|
+
}
|
|
207
|
+
return [...byId.values()];
|
|
208
|
+
}
|
|
209
|
+
function mergeInstance(base, overlay) {
|
|
210
|
+
const merged = { ref: overlay.ref };
|
|
211
|
+
const lifecycle = overlay.lifecycle ?? base.lifecycle;
|
|
212
|
+
if (lifecycle) merged.lifecycle = lifecycle;
|
|
213
|
+
if (base.model || overlay.model)
|
|
214
|
+
merged.model = { ...base.model, ...definedEntries(overlay.model) };
|
|
215
|
+
if (base.permissions || overlay.permissions) {
|
|
216
|
+
merged.permissions = mergeAgentPermissions(base.permissions, overlay.permissions);
|
|
217
|
+
}
|
|
218
|
+
const memory = overlay.memory ?? base.memory;
|
|
219
|
+
if (memory) merged.memory = memory;
|
|
220
|
+
if (base.triggers || overlay.triggers)
|
|
221
|
+
merged.triggers = mergeTriggers(base.triggers, overlay.triggers);
|
|
222
|
+
if (base.connectors || overlay.connectors) {
|
|
223
|
+
merged.connectors = { ...base.connectors, ...overlay.connectors };
|
|
224
|
+
}
|
|
225
|
+
if (base.budget || overlay.budget)
|
|
226
|
+
merged.budget = { ...base.budget, ...definedEntries(overlay.budget) };
|
|
227
|
+
return merged;
|
|
228
|
+
}
|
|
229
|
+
function mergeAgentInstances(base, overlay) {
|
|
230
|
+
if (!base && !overlay) return void 0;
|
|
231
|
+
const out = { ...base };
|
|
232
|
+
for (const [id, instance] of Object.entries(overlay ?? {})) {
|
|
233
|
+
const existing = out[id];
|
|
234
|
+
out[id] = existing ? mergeInstance(existing, instance) : instance;
|
|
235
|
+
}
|
|
236
|
+
return out;
|
|
237
|
+
}
|
|
238
|
+
function effectiveAgentInstances(config) {
|
|
239
|
+
const out = { ...config.agent?.instances };
|
|
240
|
+
const definition = config.agent?.definition;
|
|
241
|
+
if (definition) out[DEFAULT_AGENT_INSTANCE_ID] = { ref: definition };
|
|
242
|
+
return out;
|
|
243
|
+
}
|
|
244
|
+
function agentInstanceDiagnostics(config) {
|
|
245
|
+
if (config.agent?.definition && config.agent.instances?.[DEFAULT_AGENT_INSTANCE_ID]) {
|
|
246
|
+
return [
|
|
247
|
+
{
|
|
248
|
+
code: "agent_default_conflict",
|
|
249
|
+
severity: "error",
|
|
250
|
+
message: "`agent:` and `agents.default` both declare the primary agent \u2014 `agent:` is the default instance. Remove one of them.",
|
|
251
|
+
path: `agents.${DEFAULT_AGENT_INSTANCE_ID}`
|
|
252
|
+
}
|
|
253
|
+
];
|
|
254
|
+
}
|
|
255
|
+
return [];
|
|
256
|
+
}
|
|
16
257
|
function fileSha256(p) {
|
|
17
258
|
return sha256Hex(readFileSync(p));
|
|
18
259
|
}
|
|
@@ -29,7 +270,6 @@ function syntheticVersion(commit) {
|
|
|
29
270
|
var KIND_DIRS = [
|
|
30
271
|
{ dir: "skills", kind: "skill", mdName: "SKILL.md" },
|
|
31
272
|
{ dir: "agents", kind: "agent", mdName: "AGENT.md" },
|
|
32
|
-
{ dir: "bundles", kind: "bundle", mdName: "BUNDLE.md" },
|
|
33
273
|
{ dir: "mcp-servers", kind: "mcp-server", mdName: "MCP.md" },
|
|
34
274
|
{ dir: "connectors", kind: "connector", mdName: "CONNECTOR.md" },
|
|
35
275
|
{ dir: "prompts", kind: "prompt", mdName: "PROMPT.md" },
|
|
@@ -38,25 +278,25 @@ var KIND_DIRS = [
|
|
|
38
278
|
var MD_FILE_BY_KIND = Object.fromEntries(
|
|
39
279
|
KIND_DIRS.map((k) => [k.kind, k.mdName])
|
|
40
280
|
);
|
|
41
|
-
async function buildProvenanceIndex(clones,
|
|
281
|
+
async function buildProvenanceIndex(clones, opts) {
|
|
42
282
|
const index = /* @__PURE__ */ new Map();
|
|
43
|
-
for (const clone of clones) await walkOne(clone, index);
|
|
283
|
+
for (const clone of clones) await walkOne(clone, index, opts.knownKinds);
|
|
44
284
|
return index;
|
|
45
285
|
}
|
|
46
|
-
async function walkOne(clone, index) {
|
|
286
|
+
async function walkOne(clone, index, knownKinds) {
|
|
47
287
|
if (clone.overlayManifestPath && existsSync(clone.overlayManifestPath)) {
|
|
48
288
|
if (await walkWithManifest(clone, clone.overlayManifestPath, index)) return;
|
|
49
289
|
}
|
|
50
290
|
const manifestPaths = findManifestFiles(clone.localPath);
|
|
51
291
|
if (manifestPaths.length === 0) {
|
|
52
|
-
await walkFilenameConvention(clone, index);
|
|
292
|
+
await walkFilenameConvention(clone, index, knownKinds);
|
|
53
293
|
return;
|
|
54
294
|
}
|
|
55
295
|
let produced = false;
|
|
56
296
|
for (const p of manifestPaths) {
|
|
57
297
|
if (await walkWithManifest(clone, p, index)) produced = true;
|
|
58
298
|
}
|
|
59
|
-
if (!produced) await walkFilenameConvention(clone, index);
|
|
299
|
+
if (!produced) await walkFilenameConvention(clone, index, knownKinds);
|
|
60
300
|
}
|
|
61
301
|
function findManifestFiles(root) {
|
|
62
302
|
const found = [];
|
|
@@ -101,7 +341,7 @@ async function walkWithManifest(clone, manifestPath, index) {
|
|
|
101
341
|
files,
|
|
102
342
|
sha256: a.sha256 ?? compositeSha256(files),
|
|
103
343
|
metadata: resolved.metadata,
|
|
104
|
-
deps: a.dependencies
|
|
344
|
+
...a.dependencies ? { deps: a.dependencies } : await manifestDeps(repoRoot, files, a.kind)
|
|
105
345
|
};
|
|
106
346
|
applyStoreListingMetadata(candidate, a, manifest, resolved.frontmatter);
|
|
107
347
|
push(index, `${assetPublisher}/${a.kind}:${name}`, candidate);
|
|
@@ -190,7 +430,7 @@ var DIR_SCOPED_KINDS = /* @__PURE__ */ new Set([
|
|
|
190
430
|
"connector",
|
|
191
431
|
"knowledge"
|
|
192
432
|
]);
|
|
193
|
-
async function walkFilenameConvention(clone, index) {
|
|
433
|
+
async function walkFilenameConvention(clone, index, knownKinds) {
|
|
194
434
|
const publisher = publisherFromGithubUrl(clone.sourceUrl);
|
|
195
435
|
if (!publisher) {
|
|
196
436
|
throw new Error(
|
|
@@ -198,7 +438,7 @@ async function walkFilenameConvention(clone, index) {
|
|
|
198
438
|
);
|
|
199
439
|
}
|
|
200
440
|
const version = (clone.tag ? clone.tag.replace(/^v/, "") : void 0) ?? syntheticVersion(clone.commit);
|
|
201
|
-
for (const e of await scanDirectory(clone.localPath, publisher)) {
|
|
441
|
+
for (const e of await scanDirectory(clone.localPath, publisher, { knownKinds })) {
|
|
202
442
|
const manifestAbs = e.source;
|
|
203
443
|
const manifestRel = relative(clone.localPath, manifestAbs).replace(/\\/g, "/");
|
|
204
444
|
const files = DIR_SCOPED_KINDS.has(e.kind) ? hashedFilesUnder(clone.localPath, posix.dirname(manifestRel)) : [{ path: manifestRel, sha256: fileSha256(manifestAbs) }];
|
|
@@ -212,7 +452,7 @@ async function walkFilenameConvention(clone, index) {
|
|
|
212
452
|
files,
|
|
213
453
|
sha256: compositeSha256(files),
|
|
214
454
|
metadata: readMetadata(clone.localPath, files, e.kind),
|
|
215
|
-
|
|
455
|
+
...await manifestDeps(clone.localPath, files, e.kind)
|
|
216
456
|
};
|
|
217
457
|
push(index, `${publisher}/${e.kind}:${e.name}`, candidate);
|
|
218
458
|
}
|
|
@@ -249,10 +489,12 @@ function readContentFrontmatter(repoRoot, files, kind) {
|
|
|
249
489
|
}
|
|
250
490
|
}
|
|
251
491
|
async function manifestDeps(repoRoot, files, kind) {
|
|
252
|
-
const ext = kind === "
|
|
253
|
-
if (!ext) return
|
|
492
|
+
const ext = kind === "preset" ? [".preset.yaml"] : kind === "flow" ? [".flow.yaml", ".flow.json"] : null;
|
|
493
|
+
if (!ext) return {};
|
|
254
494
|
const mf = files.find((f) => ext.some((e) => f.path.endsWith(e)));
|
|
255
|
-
|
|
495
|
+
if (!mf) return {};
|
|
496
|
+
const { refs, skipped } = await assetDepRefs(join(repoRoot, mf.path));
|
|
497
|
+
return kind === "preset" ? { deps: refs, skippedItems: skipped } : { deps: refs };
|
|
256
498
|
}
|
|
257
499
|
function push(index, key, candidate) {
|
|
258
500
|
const arr = index.get(key) ?? [];
|
|
@@ -535,11 +777,11 @@ function resolveSourcePublisher(repoDir) {
|
|
|
535
777
|
const org = repoSlugFromGitRemote(repoDir)?.split("/")[0];
|
|
536
778
|
return org ? normalizeGithubOrg(org) : void 0;
|
|
537
779
|
}
|
|
538
|
-
async function scanRepo(repoDir, repoName) {
|
|
780
|
+
async function scanRepo(repoDir, repoName, options) {
|
|
539
781
|
const repo = repoSlugFromGitRemote(repoDir);
|
|
540
782
|
const publisher = resolveSourcePublisher(repoDir) ?? repoName;
|
|
541
783
|
const groupings = readPluginGroupings(repoDir);
|
|
542
|
-
return (await scanDirectory(repoDir, repoName)).map((e) => {
|
|
784
|
+
return (await scanDirectory(repoDir, repoName, options)).map((e) => {
|
|
543
785
|
const plugin = groupings.get(relative(repoDir, dirname(e.source)).split(sep).join("/"));
|
|
544
786
|
return {
|
|
545
787
|
...e,
|
|
@@ -553,7 +795,7 @@ async function resolveAsset(ref, repositories, reposDir, opts) {
|
|
|
553
795
|
let repoNames;
|
|
554
796
|
if (ref.publisher) {
|
|
555
797
|
repoNames = [ref.publisher];
|
|
556
|
-
} else if (opts
|
|
798
|
+
} else if (opts.preferRepo && opts.preferRepo in repositories) {
|
|
557
799
|
const rest = Object.keys(repositories).filter((n) => n !== opts.preferRepo);
|
|
558
800
|
repoNames = [opts.preferRepo, ...rest];
|
|
559
801
|
} else {
|
|
@@ -562,9 +804,9 @@ async function resolveAsset(ref, repositories, reposDir, opts) {
|
|
|
562
804
|
for (const repoName of repoNames) {
|
|
563
805
|
const decl = repositories[repoName];
|
|
564
806
|
if (!decl) continue;
|
|
565
|
-
const repoDir = resolveRepoDir(decl, repoName, reposDir, opts
|
|
807
|
+
const repoDir = resolveRepoDir(decl, repoName, reposDir, opts.projectDir);
|
|
566
808
|
if (!repoDir || !existsSync(repoDir)) continue;
|
|
567
|
-
const entries = await scanRepo(repoDir, repoName);
|
|
809
|
+
const entries = await scanRepo(repoDir, repoName, { knownKinds: opts.knownKinds });
|
|
568
810
|
const match = entries.find((e) => e.kind === ref.kind && e.name === ref.name);
|
|
569
811
|
if (match) return match;
|
|
570
812
|
}
|
|
@@ -621,6 +863,43 @@ var CanonicalRefConflictError = class extends Error {
|
|
|
621
863
|
candidates;
|
|
622
864
|
depChain;
|
|
623
865
|
};
|
|
866
|
+
var MAX_PRESET_DEPTH = 3;
|
|
867
|
+
var PresetDepthError = class extends Error {
|
|
868
|
+
constructor(reason, ref, depChain) {
|
|
869
|
+
super(
|
|
870
|
+
`preset_depth_exceeded: ${reason === "cycle" ? `preset ${ref} lists itself (cycle)` : `preset ${ref} nests deeper than ${MAX_PRESET_DEPTH} presets`} \u2014 via ${depChain.join(" \u2192 ")}`
|
|
871
|
+
);
|
|
872
|
+
this.reason = reason;
|
|
873
|
+
this.ref = ref;
|
|
874
|
+
this.depChain = depChain;
|
|
875
|
+
this.name = "PresetDepthError";
|
|
876
|
+
}
|
|
877
|
+
reason;
|
|
878
|
+
ref;
|
|
879
|
+
depChain;
|
|
880
|
+
code = "preset_depth_exceeded";
|
|
881
|
+
};
|
|
882
|
+
var REMOVED_KIND_REPLACEMENTS = { bundle: "preset", mount: "connector" };
|
|
883
|
+
var UnknownAssetKindError = class extends Error {
|
|
884
|
+
constructor(kind, ref, replacement) {
|
|
885
|
+
super(
|
|
886
|
+
replacement ? `unknown_asset_kind: asset kind "${kind}" (in "${ref}") no longer exists \u2014 use \`${ref.replace(`${kind}:`, `${replacement}:`)}\` (\`${replacement}:\`) instead` : `unknown_asset_kind: asset kind "${kind}" (in "${ref}") is not registered`
|
|
887
|
+
);
|
|
888
|
+
this.kind = kind;
|
|
889
|
+
this.ref = ref;
|
|
890
|
+
this.replacement = replacement;
|
|
891
|
+
this.name = "UnknownAssetKindError";
|
|
892
|
+
}
|
|
893
|
+
kind;
|
|
894
|
+
ref;
|
|
895
|
+
replacement;
|
|
896
|
+
code = "unknown_asset_kind";
|
|
897
|
+
};
|
|
898
|
+
function assertKnownKind(ref, refStr, knownKinds) {
|
|
899
|
+
const replacement = Object.hasOwn(REMOVED_KIND_REPLACEMENTS, ref.kind) ? REMOVED_KIND_REPLACEMENTS[ref.kind] : void 0;
|
|
900
|
+
if (replacement !== void 0) throw new UnknownAssetKindError(ref.kind, refStr, replacement);
|
|
901
|
+
if (knownKinds && !knownKinds.has(ref.kind)) throw new UnknownAssetKindError(ref.kind, refStr);
|
|
902
|
+
}
|
|
624
903
|
var SHA_PIN_RE = /^[0-9a-f]{40}$/i;
|
|
625
904
|
function qualifyPublisher(ref, fallback) {
|
|
626
905
|
const hashIdx = ref.indexOf("#");
|
|
@@ -639,10 +918,19 @@ async function resolveAll(deps, opts) {
|
|
|
639
918
|
const resolvedBy = /* @__PURE__ */ new Map();
|
|
640
919
|
const overridesApplied = /* @__PURE__ */ new Set();
|
|
641
920
|
const overridesByRef = new Map(opts.overrides.map((o) => [o.ref, o]));
|
|
642
|
-
|
|
921
|
+
const presets = [];
|
|
922
|
+
async function visit(refStr, parent, depChain, presetChain) {
|
|
643
923
|
const ref = parseAssetRef(refStr);
|
|
644
924
|
if (!ref.publisher) throw new Error(`dep "${refStr}" missing publisher`);
|
|
925
|
+
assertKnownKind(ref, refStr, opts.knownKinds);
|
|
645
926
|
const key = `${ref.publisher}/${ref.kind}:${ref.name}`;
|
|
927
|
+
if (ref.kind === "preset") {
|
|
928
|
+
if (presetChain.includes(key))
|
|
929
|
+
throw new PresetDepthError("cycle", refStr, [...depChain, refStr]);
|
|
930
|
+
if (presetChain.length >= MAX_PRESET_DEPTH) {
|
|
931
|
+
throw new PresetDepthError("depth", refStr, [...depChain, refStr]);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
646
934
|
if (seen.has(key)) return;
|
|
647
935
|
seen.add(key);
|
|
648
936
|
const sourceCandidates = opts.provenanceIndex.get(key) ?? [];
|
|
@@ -678,16 +966,32 @@ async function resolveAll(deps, opts) {
|
|
|
678
966
|
opts,
|
|
679
967
|
[...depChain, refStr]
|
|
680
968
|
);
|
|
681
|
-
|
|
969
|
+
const isPreset = chosen.kind === "preset";
|
|
970
|
+
if (isPreset) {
|
|
971
|
+
const members = chosen.deps ?? [];
|
|
972
|
+
presets.push({
|
|
973
|
+
ref: canonicalRef,
|
|
974
|
+
assets: members.filter((m) => !m.startsWith("preset:")).length,
|
|
975
|
+
skipped: chosen.skippedItems ?? 0
|
|
976
|
+
});
|
|
977
|
+
} else {
|
|
978
|
+
resolved.push(chosen);
|
|
979
|
+
}
|
|
682
980
|
resolvedBy.set(key, parent);
|
|
981
|
+
const childPresets = isPreset ? [...presetChain, key] : presetChain;
|
|
683
982
|
for (const depRef of chosen.deps ?? []) {
|
|
684
|
-
await visit(
|
|
983
|
+
await visit(
|
|
984
|
+
qualifyPublisher(depRef, chosen.publisher),
|
|
985
|
+
key,
|
|
986
|
+
[...depChain, refStr],
|
|
987
|
+
childPresets
|
|
988
|
+
);
|
|
685
989
|
}
|
|
686
990
|
}
|
|
687
991
|
for (const dep of deps) {
|
|
688
|
-
await visit(dep, "direct", []);
|
|
992
|
+
await visit(dep, "direct", [], []);
|
|
689
993
|
}
|
|
690
|
-
return { resolved, missing, resolvedBy, overridesApplied };
|
|
994
|
+
return { resolved, missing, resolvedBy, overridesApplied, presets };
|
|
691
995
|
}
|
|
692
996
|
async function gatherStoreCandidates(ref, publisher, sourceCandidates, opts) {
|
|
693
997
|
const storeCandidates = [];
|
|
@@ -1075,22 +1379,8 @@ function mergeAgentConfig(base, overlay) {
|
|
|
1075
1379
|
context: overlay?.context ?? base?.context,
|
|
1076
1380
|
// Whole-block overlay: a partial file list merged across scopes would change caps silently.
|
|
1077
1381
|
...overlay?.home ?? base?.home ? { home: overlay?.home ?? base?.home } : {},
|
|
1078
|
-
permissions:
|
|
1079
|
-
|
|
1080
|
-
...stripUndefined(overlay?.permissions),
|
|
1081
|
-
deny_write: dedupe([
|
|
1082
|
-
...base?.permissions?.deny_write ?? [],
|
|
1083
|
-
...overlay?.permissions?.deny_write ?? []
|
|
1084
|
-
]),
|
|
1085
|
-
deny_read: dedupe([
|
|
1086
|
-
...base?.permissions?.deny_read ?? [],
|
|
1087
|
-
...overlay?.permissions?.deny_read ?? []
|
|
1088
|
-
])
|
|
1089
|
-
},
|
|
1090
|
-
subagents: {
|
|
1091
|
-
...base?.subagents ?? {},
|
|
1092
|
-
...overlay?.subagents ?? {}
|
|
1093
|
-
},
|
|
1382
|
+
permissions: mergeAgentPermissions(base?.permissions, overlay?.permissions),
|
|
1383
|
+
...base?.instances ?? overlay?.instances ? { instances: mergeAgentInstances(base?.instances, overlay?.instances) } : {},
|
|
1094
1384
|
hooks: {
|
|
1095
1385
|
pre_flow: [...base?.hooks?.pre_flow ?? [], ...overlay?.hooks?.pre_flow ?? []],
|
|
1096
1386
|
post_flow: [...base?.hooks?.post_flow ?? [], ...overlay?.hooks?.post_flow ?? []],
|
|
@@ -1257,6 +1547,11 @@ function assertNoLegacyTopLevelKeys(raw) {
|
|
|
1257
1547
|
);
|
|
1258
1548
|
}
|
|
1259
1549
|
}
|
|
1550
|
+
if (isRecord(raw.agent) && raw.agent.subagents !== void 0) {
|
|
1551
|
+
throw new Error(
|
|
1552
|
+
"skaile.yaml: `agent.subagents:` was removed \u2014 inline prompt-only subagents had no driver consumer. Declare each one as an agent asset (`.skaile/agents/<name>/agent.yaml`) and bind it under the root `agents:` map (`agents.<name>: { ref: ./.skaile/agents/<name>, lifecycle: role }`). See MIGRATION.md."
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1260
1555
|
}
|
|
1261
1556
|
function normalizeOverrideEntry(item) {
|
|
1262
1557
|
if (!item || typeof item !== "object" || Array.isArray(item)) return null;
|
|
@@ -1299,6 +1594,23 @@ function normalizeConsumptionSection(raw, config) {
|
|
|
1299
1594
|
normalizeStoresSection(raw, config);
|
|
1300
1595
|
normalizeOverridesSection(raw, config);
|
|
1301
1596
|
}
|
|
1597
|
+
function normalizeAgentSection(raw, config, diagnostics) {
|
|
1598
|
+
if (raw.agent) {
|
|
1599
|
+
config.agent = isRecord(raw.agent) ? { ...raw.agent } : raw.agent;
|
|
1600
|
+
}
|
|
1601
|
+
if (config.agent?.instances !== void 0) {
|
|
1602
|
+
diagnostics.push({
|
|
1603
|
+
code: "misplaced_agent_instances",
|
|
1604
|
+
severity: "error",
|
|
1605
|
+
message: "`agent.instances` is not a skaile.yaml key \u2014 declare instances under root `agents:`.",
|
|
1606
|
+
path: "agent.instances"
|
|
1607
|
+
});
|
|
1608
|
+
delete config.agent.instances;
|
|
1609
|
+
}
|
|
1610
|
+
const instances = normalizeAgentInstances(raw.agents, diagnostics);
|
|
1611
|
+
if (instances) config.agent = { ...config.agent, instances };
|
|
1612
|
+
diagnostics.push(...agentInstanceDiagnostics(config));
|
|
1613
|
+
}
|
|
1302
1614
|
function normalizeStructuralSections(raw, config, diagnostics) {
|
|
1303
1615
|
if (Array.isArray(raw.mounts)) {
|
|
1304
1616
|
config.mounts = raw.mounts;
|
|
@@ -1332,7 +1644,7 @@ function normalizeStructuralSections(raw, config, diagnostics) {
|
|
|
1332
1644
|
if (d.config !== void 0) config.deploy.config = d.config;
|
|
1333
1645
|
}
|
|
1334
1646
|
}
|
|
1335
|
-
|
|
1647
|
+
normalizeAgentSection(raw, config, diagnostics);
|
|
1336
1648
|
if (raw.workspace) config.workspace = raw.workspace;
|
|
1337
1649
|
if (raw.secrets && typeof raw.secrets === "object") {
|
|
1338
1650
|
config.secrets = raw.secrets;
|
|
@@ -1509,14 +1821,23 @@ function validateConfigValues(config, diagnostics) {
|
|
|
1509
1821
|
checkUnavailable(c, diagnostics);
|
|
1510
1822
|
}
|
|
1511
1823
|
for (const m of config.mounts ?? []) checkAccess(m.access, `mounts.${m.id}.access`);
|
|
1512
|
-
const
|
|
1513
|
-
|
|
1824
|
+
const networks = [
|
|
1825
|
+
[config.agent?.permissions?.network, "agent.permissions.network"],
|
|
1826
|
+
...Object.entries(config.agent?.instances ?? {}).map(
|
|
1827
|
+
([id, instance]) => [
|
|
1828
|
+
instance.permissions?.network,
|
|
1829
|
+
`agents.${id}.permissions.network`
|
|
1830
|
+
]
|
|
1831
|
+
)
|
|
1832
|
+
];
|
|
1833
|
+
for (const [network, path] of networks) {
|
|
1834
|
+
if (!network) continue;
|
|
1514
1835
|
if (network.mode && !KNOWN_NETWORK_MODES.includes(network.mode)) {
|
|
1515
1836
|
diagnostics.push({
|
|
1516
1837
|
code: "unknown_network_mode",
|
|
1517
1838
|
severity: "warning",
|
|
1518
1839
|
message: `Unknown network mode "${network.mode}" \u2014 expected one of: ${KNOWN_NETWORK_MODES.join(", ")}.`,
|
|
1519
|
-
path:
|
|
1840
|
+
path: `${path}.mode`
|
|
1520
1841
|
});
|
|
1521
1842
|
}
|
|
1522
1843
|
if (network.allowlist && network.allowlist.length > 0 && network.mode !== "allowlist") {
|
|
@@ -1524,7 +1845,7 @@ function validateConfigValues(config, diagnostics) {
|
|
|
1524
1845
|
code: "unexpected_network_allowlist",
|
|
1525
1846
|
severity: "warning",
|
|
1526
1847
|
message: `network.allowlist is set but mode is "${network.mode}" \u2014 the allowlist is ignored unless mode is "allowlist".`,
|
|
1527
|
-
path:
|
|
1848
|
+
path: `${path}.allowlist`
|
|
1528
1849
|
});
|
|
1529
1850
|
}
|
|
1530
1851
|
}
|
|
@@ -1576,6 +1897,12 @@ function toCanonicalObject(config) {
|
|
|
1576
1897
|
const emit = (key) => {
|
|
1577
1898
|
const value = config[key];
|
|
1578
1899
|
if (value === void 0) return;
|
|
1900
|
+
if (key === "agent") {
|
|
1901
|
+
const { instances, ...agent } = config.agent ?? {};
|
|
1902
|
+
if (Object.keys(agent).length > 0) out.agent = agent;
|
|
1903
|
+
if (instances) out.agents = instances;
|
|
1904
|
+
return;
|
|
1905
|
+
}
|
|
1579
1906
|
out[CONFIG_KEY_TO_YAML[key] ?? key] = value;
|
|
1580
1907
|
};
|
|
1581
1908
|
for (const key of CANONICAL_KEY_ORDER) emit(key);
|
|
@@ -1618,14 +1945,6 @@ function mergeById(base, overlay) {
|
|
|
1618
1945
|
for (const r of overlay) map.set(r.id, r);
|
|
1619
1946
|
return [...map.values()];
|
|
1620
1947
|
}
|
|
1621
|
-
function stripUndefined(obj) {
|
|
1622
|
-
if (!obj) return {};
|
|
1623
|
-
const result = {};
|
|
1624
|
-
for (const [k, v] of Object.entries(obj)) {
|
|
1625
|
-
if (v !== void 0) result[k] = v;
|
|
1626
|
-
}
|
|
1627
|
-
return result;
|
|
1628
|
-
}
|
|
1629
1948
|
function mcpDeclFromCatalogEntry(entry) {
|
|
1630
1949
|
const m = entry.metadata;
|
|
1631
1950
|
if (!m) return null;
|
|
@@ -2027,8 +2346,12 @@ function collectMcpRefStrings(dependencies) {
|
|
|
2027
2346
|
}
|
|
2028
2347
|
return mcpRefStrings;
|
|
2029
2348
|
}
|
|
2349
|
+
var MCP_LOOKUP_KINDS = /* @__PURE__ */ new Set(["mcp-server"]);
|
|
2030
2350
|
async function buildMcpProvenanceIndex(sources, projectDir) {
|
|
2031
|
-
return sources.length > 0 ? await buildProvenanceIndex(buildSourceClones(sources)
|
|
2351
|
+
return sources.length > 0 ? await buildProvenanceIndex(buildSourceClones(sources), {
|
|
2352
|
+
// Only `mcp-server` refs are looked up in this index.
|
|
2353
|
+
knownKinds: MCP_LOOKUP_KINDS
|
|
2354
|
+
}) : /* @__PURE__ */ new Map();
|
|
2032
2355
|
}
|
|
2033
2356
|
function upsertCatalogMcpDecls(mcpRefStrings, provenanceIndex, upsert) {
|
|
2034
2357
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -2205,6 +2528,9 @@ function resolveAgentDir(projectDir) {
|
|
|
2205
2528
|
const config = resolveSkWorkspaceConfig(projectDir);
|
|
2206
2529
|
const definition = config.agent?.definition;
|
|
2207
2530
|
if (!definition) return void 0;
|
|
2531
|
+
return resolveAgentDefinitionDir(projectDir, definition);
|
|
2532
|
+
}
|
|
2533
|
+
function resolveAgentDefinitionDir(projectDir, definition) {
|
|
2208
2534
|
if (definition.startsWith("ai-assets://")) {
|
|
2209
2535
|
const relPath = definition.slice("ai-assets://".length);
|
|
2210
2536
|
const aiAssetsDir = findAiAssetsDir(projectDir);
|
|
@@ -2217,6 +2543,6 @@ function resolveAgentDir(projectDir) {
|
|
|
2217
2543
|
return resolve(projectDir, definition);
|
|
2218
2544
|
}
|
|
2219
2545
|
|
|
2220
|
-
export { AgentRefResolutionError, COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_RECIPE_ATTR, SKAILE_YAML_DEFAULT, SKAILE_YAML_SUFFIX, SKILL_ALLOWLIST_FILE, SKILL_ALLOWLIST_VERSION, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, STAGED_SKILL_MARKER, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, coerceVersion, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, isStagedSkillMarkerFor, isWorkspaceConfigFilename, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, matchPin, mergeSkWorkspaceConfigs, normalizeConfig, pullRepo, pullRepoResult, readLinks, readSkillAllowList, resolveAgentDir, resolveAll, resolveAsset, resolveCompactionThresholdPercent, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, resolveSkWorkspaceConfig, resolveSourcePublisher, saveSkWorkspaceConfig, scanRepo, sourceCacheKey, sourceShortName, stageMaterializedSkills, stagedSkillMarkerState, storeManifestSlug, unlinkRepo, unstageSkill, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, workspaceNameFromFilename, writeLinks };
|
|
2221
|
-
//# sourceMappingURL=chunk-
|
|
2222
|
-
//# sourceMappingURL=chunk-
|
|
2546
|
+
export { AGENT_INSTANCE_ID_PATTERN, AGENT_INSTANCE_LIFECYCLES, AGENT_INSTANCE_MEMORY_SCOPES, AGENT_INSTANCE_TRIGGER_KINDS, AgentRefResolutionError, COMPACTION_DEFAULTS, CanonicalRefConflictError, DEFAULT_AGENT_INSTANCE_ID, DEFAULT_RECIPE_ATTR, PresetDepthError, SKAILE_YAML_DEFAULT, SKAILE_YAML_SUFFIX, SKILL_ALLOWLIST_FILE, SKILL_ALLOWLIST_VERSION, SK_WORKSPACE_DEFAULT_NAME, SK_WORKSPACE_SUFFIX, STAGED_SKILL_MARKER, UnknownAssetKindError, agentInstanceDiagnostics, buildProvenanceIndex, checkRepoStatus, checkoutPin, cloneRepo, coerceVersion, decodeSkaileYaml, deriveSingleMaterializedMcpDeclaration, effectiveAgentInstances, encodeSkaileYaml, ensureRepo, findWorkspaceRoot, getGlobalCacheDir, getRepoCommit, isStagedSkillMarkerFor, isWorkspaceConfigFilename, linkRepo, listSkWorkspaceConfigs, loadMcpServerDeclarations, loadSkWorkspaceConfig, matchPin, mergeAgentInstances, mergeAgentPermissions, mergeSkWorkspaceConfigs, normalizeAgentInstances, normalizeConfig, pullRepo, pullRepoResult, readLinks, readSkillAllowList, resolveAgentDefinitionDir, resolveAgentDir, resolveAll, resolveAsset, resolveCompactionThresholdPercent, resolveGlobalHarnesses, resolveGlobalSkWorkspaceConfig, resolveSkWorkspaceConfig, resolveSourcePublisher, saveSkWorkspaceConfig, scanRepo, sourceCacheKey, sourceShortName, stageMaterializedSkills, stagedSkillMarkerState, storeManifestSlug, unlinkRepo, unstageSkill, validateAssetRecipeAttr, validateAssetRecipeFlake, workspaceConfigFilename, workspaceNameFromFilename, writeLinks };
|
|
2547
|
+
//# sourceMappingURL=chunk-2W4LBLIN.js.map
|
|
2548
|
+
//# sourceMappingURL=chunk-2W4LBLIN.js.map
|