@skaile/workspaces 5.4.0 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-3MVRNS5U.js → asset-feeds-4O2JK5S4.js} +27 -14
- package/dist/asset-feeds-4O2JK5S4.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 +75 -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-LUBS5DXY.js → chunk-27HS2DHB.js} +4 -4
- package/dist/{chunk-LUBS5DXY.js.map → chunk-27HS2DHB.js.map} +1 -1
- package/dist/{chunk-RD6GE4HU.js → chunk-2GRB5ITE.js} +4 -4
- package/dist/{chunk-RD6GE4HU.js.map → chunk-2GRB5ITE.js.map} +1 -1
- package/dist/{chunk-UKDFOOEG.js → chunk-2NYXQYHN.js} +4 -4
- package/dist/{chunk-UKDFOOEG.js.map → chunk-2NYXQYHN.js.map} +1 -1
- package/dist/{chunk-6IGFSUTE.js → chunk-2W4LBLIN.js} +388 -61
- package/dist/chunk-2W4LBLIN.js.map +1 -0
- package/dist/{chunk-OXE5A6H6.js → chunk-2XFUXGV6.js} +3 -3
- package/dist/{chunk-OXE5A6H6.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-QK756IRJ.js → chunk-436GRQC2.js} +15 -15
- package/dist/chunk-436GRQC2.js.map +1 -0
- 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-BATL2CWI.js → chunk-4CTGEEN6.js} +297 -124
- package/dist/chunk-4CTGEEN6.js.map +1 -0
- package/dist/{chunk-DTV7HL5R.js → chunk-4GNJELPH.js} +2 -2
- package/dist/{chunk-DTV7HL5R.js.map → chunk-4GNJELPH.js.map} +1 -1
- package/dist/{chunk-AE42DHSH.js → chunk-5B5IZVEP.js} +2 -2
- package/dist/{chunk-AE42DHSH.js.map → chunk-5B5IZVEP.js.map} +1 -1
- package/dist/{chunk-BHUHGLNS.js → chunk-6NPINANG.js} +6 -6
- package/dist/{chunk-BHUHGLNS.js.map → chunk-6NPINANG.js.map} +1 -1
- package/dist/{chunk-SQBPE66C.js → chunk-7KLC4LZO.js} +8 -8
- package/dist/{chunk-SQBPE66C.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-UAAAERXI.js → chunk-AOAZCSDI.js} +4 -3
- package/dist/chunk-AOAZCSDI.js.map +1 -0
- package/dist/{chunk-JCATNLY3.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-K2K7OF4P.js → chunk-DMLDYFDS.js} +23 -6
- package/dist/chunk-DMLDYFDS.js.map +1 -0
- package/dist/{chunk-A67BHJCH.js → chunk-DZM73WDN.js} +4 -4
- package/dist/{chunk-A67BHJCH.js.map → chunk-DZM73WDN.js.map} +1 -1
- 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-37DN45RR.js → chunk-IPWR33AW.js} +181 -111
- package/dist/chunk-IPWR33AW.js.map +1 -0
- package/dist/{chunk-2XXAVTTO.js → chunk-KUFNKVBM.js} +3 -3
- package/dist/{chunk-2XXAVTTO.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-ZIYYMR6Y.js → chunk-LLKKLKZJ.js} +3 -3
- package/dist/{chunk-ZIYYMR6Y.js.map → chunk-LLKKLKZJ.js.map} +1 -1
- package/dist/{chunk-Y5OCUOXF.js → chunk-MX3UQXLU.js} +52 -35
- package/dist/chunk-MX3UQXLU.js.map +1 -0
- package/dist/{chunk-7KITVWXK.js → chunk-MX6LZE2C.js} +44 -13
- package/dist/chunk-MX6LZE2C.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-OANSNVCP.js → chunk-NLXIALVO.js} +5 -5
- package/dist/{chunk-OANSNVCP.js.map → chunk-NLXIALVO.js.map} +1 -1
- package/dist/{chunk-U6ORGQHZ.js → chunk-O5GDKC5I.js} +3 -3
- package/dist/{chunk-U6ORGQHZ.js.map → chunk-O5GDKC5I.js.map} +1 -1
- package/dist/{chunk-ZUZ5LLZ2.js → chunk-OGLDAJFL.js} +4 -4
- package/dist/{chunk-ZUZ5LLZ2.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-UNRZCQD4.js → chunk-PJS2YWGG.js} +6 -6
- package/dist/{chunk-UNRZCQD4.js.map → chunk-PJS2YWGG.js.map} +1 -1
- package/dist/{chunk-VETH6MDG.js → chunk-RGXVQZOV.js} +6021 -3099
- package/dist/chunk-RGXVQZOV.js.map +1 -0
- package/dist/{chunk-JEA32KB6.js → chunk-S7QXEXKY.js} +19 -6
- package/dist/chunk-S7QXEXKY.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-XMQAV6T3.js → chunk-SX4UIDKT.js} +3 -3
- package/dist/{chunk-XMQAV6T3.js.map → chunk-SX4UIDKT.js.map} +1 -1
- package/dist/{chunk-QEXEHXX5.js → chunk-TZCQ7ZWQ.js} +83 -9
- package/dist/chunk-TZCQ7ZWQ.js.map +1 -0
- package/dist/{chunk-ONWTPXVU.js → chunk-UAP2XHRF.js} +10 -10
- package/dist/{chunk-ONWTPXVU.js.map → chunk-UAP2XHRF.js.map} +1 -1
- package/dist/{chunk-JF26V3BC.js → chunk-V7NN3HXR.js} +7 -12
- package/dist/chunk-V7NN3HXR.js.map +1 -0
- 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-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-IDUGP4V7.js → chunk-VX3INFBA.js} +4 -4
- package/dist/{chunk-IDUGP4V7.js.map → chunk-VX3INFBA.js.map} +1 -1
- 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 +5031 -3384
- 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 +10 -0
- 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-OB3OAZTK.js → connectors-HWENZFKW.js} +22 -22
- package/dist/{connectors-OB3OAZTK.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 +54 -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-Z3KKLEM6.js → ensure-sources-VCPKNPK2.js} +21 -21
- package/dist/{ensure-sources-Z3KKLEM6.js.map → ensure-sources-VCPKNPK2.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-DTADYIXH.js → flows-ENQY2DV7.js} +13 -13
- package/dist/{flows-DTADYIXH.js.map → flows-ENQY2DV7.js.map} +1 -1
- package/dist/helpers-IW36CEJX.js +34 -0
- package/dist/{helpers-F2RFRT5D.js.map → helpers-IW36CEJX.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/remote/remote-catalog-source.d.ts +11 -2
- package/dist/library/src/remote/remote-catalog-source.d.ts.map +1 -1
- package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
- package/dist/{library-publish-62RFU74A.js → library-publish-R3DQLMTD.js} +27 -27
- package/dist/{library-publish-62RFU74A.js.map → library-publish-R3DQLMTD.js.map} +1 -1
- package/dist/open-library-FAJZRDKE.js +40 -0
- package/dist/{open-library-NVG3CZUO.js.map → open-library-FAJZRDKE.js.map} +1 -1
- package/dist/open-registry-NVPCQPND.js +32 -0
- package/dist/{open-registry-IYH6W6CN.js.map → open-registry-NVPCQPND.js.map} +1 -1
- package/dist/paths-YUCP7K6U.js +22 -0
- package/dist/{paths-STQO4FYF.js.map → paths-YUCP7K6U.js.map} +1 -1
- package/dist/{plugin-store-2DTEIJTG.js → plugin-store-66QFBNEO.js} +10 -10
- package/dist/{plugin-store-2DTEIJTG.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/catalog-source.d.ts +7 -0
- package/dist/plugins/src/catalog-source.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-ALJIVFHI.js +41 -0
- package/dist/{project-44LM6SRV.js.map → project-ALJIVFHI.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-4BV5ZWOZ.js → setup-35JXIA3N.js} +28 -28
- package/dist/{setup-4BV5ZWOZ.js.map → setup-35JXIA3N.js.map} +1 -1
- package/dist/skills-CS7NE5TT.js +26 -0
- package/dist/{skills-M7OU3WMP.js.map → skills-CS7NE5TT.js.map} +1 -1
- package/dist/source-ISR4KRZV.js +41 -0
- package/dist/{source-HTT6CXUP.js.map → source-ISR4KRZV.js.map} +1 -1
- package/dist/{source-manifest-publish-CPXUX3CL.js → source-manifest-publish-P22IPK5F.js} +27 -27
- package/dist/{source-manifest-publish-CPXUX3CL.js.map → source-manifest-publish-P22IPK5F.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 +1 -1
- package/dist/asset-feeds-3MVRNS5U.js.map +0 -1
- package/dist/chunk-37DN45RR.js.map +0 -1
- package/dist/chunk-5CYEWBPB.js +0 -440
- package/dist/chunk-5CYEWBPB.js.map +0 -1
- package/dist/chunk-5NH3U6N5.js +0 -15
- package/dist/chunk-5NH3U6N5.js.map +0 -1
- package/dist/chunk-6IGFSUTE.js.map +0 -1
- package/dist/chunk-7KITVWXK.js.map +0 -1
- package/dist/chunk-BATL2CWI.js.map +0 -1
- package/dist/chunk-JCATNLY3.js.map +0 -1
- package/dist/chunk-JEA32KB6.js.map +0 -1
- package/dist/chunk-JF26V3BC.js.map +0 -1
- package/dist/chunk-K2K7OF4P.js.map +0 -1
- package/dist/chunk-LFMX2UEF.js.map +0 -1
- package/dist/chunk-QEXEHXX5.js.map +0 -1
- package/dist/chunk-QK756IRJ.js.map +0 -1
- package/dist/chunk-TNWXGHLD.js.map +0 -1
- package/dist/chunk-TOSHZX4C.js.map +0 -1
- package/dist/chunk-UAAAERXI.js.map +0 -1
- package/dist/chunk-VETH6MDG.js.map +0 -1
- package/dist/chunk-WX74MVNA.js.map +0 -1
- package/dist/chunk-Y5OCUOXF.js.map +0 -1
- package/dist/chunk-Y7UBRRKG.js.map +0 -1
- package/dist/factory-assets/bundles/workspaces-authoring/workspaces-authoring.bundle.yaml +0 -9
- package/dist/helpers-F2RFRT5D.js +0 -34
- package/dist/open-library-NVG3CZUO.js +0 -40
- package/dist/open-registry-IYH6W6CN.js +0 -32
- package/dist/paths-STQO4FYF.js +0 -22
- package/dist/project-44LM6SRV.js +0 -36
- package/dist/skills-M7OU3WMP.js +0 -26
- package/dist/source-HTT6CXUP.js +0 -41
- package/dist/types/src/manifests/mount.d.ts +0 -21
- package/dist/types/src/manifests/mount.d.ts.map +0 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agents/run-controller.ts
|
|
3
|
+
*
|
|
4
|
+
* The framework-owned lifecycle of `agent.run` runs, independent of the host
|
|
5
|
+
* that stores them and the driver that executes them.
|
|
6
|
+
*
|
|
7
|
+
* ```text
|
|
8
|
+
* ┌───────────── approve ─────────────┐
|
|
9
|
+
* queued ──► running ──► waiting_approval ◄── (a held capability call)
|
|
10
|
+
* ▲ │ └────► waiting_children ──┐ (children still live when the turn ends)
|
|
11
|
+
* └──────────┴───────── resume ◄─────────┘
|
|
12
|
+
* └──► succeeded | failed | cancelled (cancelled from any live state)
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* What it guarantees, whichever host drives it:
|
|
16
|
+
*
|
|
17
|
+
* - **Limits.** A run may delegate to a depth of {@link RunLimits.maxDepth}
|
|
18
|
+
* (a root run started outside any run is depth 1) and a root run has at most
|
|
19
|
+
* {@link RunLimits.maxConcurrentChildren} live descendants. A run whose
|
|
20
|
+
* turn ended with live children is `waiting_children` and holds no driver;
|
|
21
|
+
* the last child to finish resumes it with a host message.
|
|
22
|
+
* - **Serialization.** Runs of one `standing` instance execute one at a time
|
|
23
|
+
* (a queue, so memory writes never interleave); other instances and `role`
|
|
24
|
+
* instances run concurrently.
|
|
25
|
+
* - **Idempotent start.** A start with the same `(callerSessionId, callId)`
|
|
26
|
+
* answers the run the first one created.
|
|
27
|
+
* - **Persisted approvals.** A held capability call (`requestApproval`) or a
|
|
28
|
+
* held start parks the run in `waiting_approval`, its turn ends, and the
|
|
29
|
+
* approval row survives a restart. Deciding claims the row with a
|
|
30
|
+
* compare-and-set, so the stored operation executes at most once, with the
|
|
31
|
+
* `operationId` it was parked under; its result is persisted before the
|
|
32
|
+
* session is resumed with `{operationId, status, result}`. A decision on a
|
|
33
|
+
* consumed or expired approval, or on one whose stored args no longer hash
|
|
34
|
+
* to `argsHash`, is `approval_invalid`; so is re-requesting a call with
|
|
35
|
+
* changed args.
|
|
36
|
+
* - **Cancel** stops the run and every descendant; their pending approvals expire.
|
|
37
|
+
*
|
|
38
|
+
* The controller imports nothing of a host: storage is the injected
|
|
39
|
+
* {@link RunStore}, execution the injected {@link RunLauncher}, policy the
|
|
40
|
+
* injected `authorize`, and the held operation runs through the injected
|
|
41
|
+
* `execute`. Run state changes go to the store's event log and `onEvent`;
|
|
42
|
+
* `subagent` protocol events go to `emit`.
|
|
43
|
+
*/
|
|
44
|
+
import type { AgentRun, AgentRunEventRecord, AgentRunFailure, AgentRunReport, Logger, RunHostMessage, RunStore, SubagentEvent } from "@skaile/workspaces/types";
|
|
45
|
+
import type { AgentIo } from "@skaile/workspaces/types/manifests";
|
|
46
|
+
/** Who acts. Built by the host from its own authentication, never from a model payload. */
|
|
47
|
+
export interface RunActor {
|
|
48
|
+
/** User or service id; recorded as `AgentRun.requestedBy` on a start. */
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* The session the call comes from. When set, the run must belong to this
|
|
52
|
+
* session's delegation tree (the session, or a run it started, dispatched
|
|
53
|
+
* it); an agent never reaches a run outside its own tree. Absent for a
|
|
54
|
+
* host-level actor (a REST route): only `authorize` gates it.
|
|
55
|
+
*/
|
|
56
|
+
sessionId?: string;
|
|
57
|
+
}
|
|
58
|
+
export type RunAction = "start" | "read" | "cancel" | "decide" | "resume";
|
|
59
|
+
/** What the controller needs to know about an instance a run addresses. */
|
|
60
|
+
export interface RunInstanceInfo {
|
|
61
|
+
id: string;
|
|
62
|
+
lifecycle: "standing" | "role";
|
|
63
|
+
description?: string;
|
|
64
|
+
revisionHash?: string;
|
|
65
|
+
io?: AgentIo;
|
|
66
|
+
status: "ready" | "unavailable";
|
|
67
|
+
error?: string;
|
|
68
|
+
}
|
|
69
|
+
/** The delegation and concurrency bounds. */
|
|
70
|
+
export interface RunLimits {
|
|
71
|
+
/** Deepest run chain; a root run started outside any run is depth 1. Default 2. */
|
|
72
|
+
maxDepth: number;
|
|
73
|
+
/** Live descendants one root run may have. Default 4. */
|
|
74
|
+
maxConcurrentChildren: number;
|
|
75
|
+
}
|
|
76
|
+
export declare const DEFAULT_RUN_LIMITS: RunLimits;
|
|
77
|
+
export interface StartRunRequest {
|
|
78
|
+
instanceId: string;
|
|
79
|
+
/** Revision the caller saw; a different current revision is `revision_changed`. */
|
|
80
|
+
revisionHash?: string;
|
|
81
|
+
input?: unknown;
|
|
82
|
+
budget?: {
|
|
83
|
+
max_turns?: number;
|
|
84
|
+
max_tokens?: number;
|
|
85
|
+
};
|
|
86
|
+
/** Capability-dispatch call id; with the actor's session the idempotency key of the start. */
|
|
87
|
+
callId?: string;
|
|
88
|
+
/** `required` parks the run in `waiting_approval` until `decideApproval`. */
|
|
89
|
+
approval?: "required" | "none";
|
|
90
|
+
}
|
|
91
|
+
/** What one turn of a run's session is told to do. */
|
|
92
|
+
export type RunTurn = {
|
|
93
|
+
kind: "start";
|
|
94
|
+
input: unknown;
|
|
95
|
+
} | {
|
|
96
|
+
kind: "resume";
|
|
97
|
+
messages: RunHostMessage[];
|
|
98
|
+
};
|
|
99
|
+
/** How a turn ended. A run that is `waiting_approval` or `cancelled` after its turn ignores the outcome. */
|
|
100
|
+
export type RunTurnOutcome = {
|
|
101
|
+
kind: "completed";
|
|
102
|
+
output?: unknown;
|
|
103
|
+
} | {
|
|
104
|
+
kind: "failed";
|
|
105
|
+
error: AgentRunFailure;
|
|
106
|
+
};
|
|
107
|
+
/** The session a launcher built for one turn. */
|
|
108
|
+
export interface RunDriverHandle {
|
|
109
|
+
/** Name of the driver the run executes on (`AgentRun.harness`). */
|
|
110
|
+
harness: string;
|
|
111
|
+
/** Run the turn to its end. Must settle promptly once the launch `signal` aborts. */
|
|
112
|
+
turn(turn: RunTurn): Promise<RunTurnOutcome>;
|
|
113
|
+
abort(reason?: unknown): void;
|
|
114
|
+
/** Release the session's process. Called after every turn: a suspended run holds no driver. */
|
|
115
|
+
dispose(): Promise<void>;
|
|
116
|
+
}
|
|
117
|
+
/** Answer of {@link RunLaunchContext.requestApproval} to the session's capability call. */
|
|
118
|
+
export type RunOperationApproval = {
|
|
119
|
+
status: "pending_approval";
|
|
120
|
+
approvalId: string;
|
|
121
|
+
operationId: string;
|
|
122
|
+
} | {
|
|
123
|
+
status: "approved" | "denied" | "expired";
|
|
124
|
+
approvalId: string;
|
|
125
|
+
operationId: string;
|
|
126
|
+
result?: unknown;
|
|
127
|
+
error?: AgentRunFailure;
|
|
128
|
+
};
|
|
129
|
+
export interface RunLaunchContext {
|
|
130
|
+
run: AgentRun;
|
|
131
|
+
/** `true` when the run's native session (`run.sessionId`) already exists and is continued. */
|
|
132
|
+
resuming: boolean;
|
|
133
|
+
/** The identity calls from this run's session carry (`{ id: run.requestedBy, sessionId: run.sessionId }`). */
|
|
134
|
+
actor: RunActor;
|
|
135
|
+
/** Aborts when the run is cancelled. */
|
|
136
|
+
signal: AbortSignal;
|
|
137
|
+
/**
|
|
138
|
+
* For the session's capability bridge: hold a `requiresApproval` call
|
|
139
|
+
* instead of executing it. Hand the answer to the model as the call's
|
|
140
|
+
* result; the run's turn ends and the controller resumes it after the decision.
|
|
141
|
+
*/
|
|
142
|
+
requestApproval: (call: {
|
|
143
|
+
callId?: string;
|
|
144
|
+
capability: string;
|
|
145
|
+
args: unknown;
|
|
146
|
+
}) => Promise<RunOperationApproval>;
|
|
147
|
+
}
|
|
148
|
+
/** Builds the session for one turn of a run. */
|
|
149
|
+
export type RunLauncher = (ctx: RunLaunchContext) => Promise<RunDriverHandle>;
|
|
150
|
+
/** One held operation, handed to `execute` when its approval is granted. */
|
|
151
|
+
export interface ApprovedOperation {
|
|
152
|
+
runId: string;
|
|
153
|
+
/** Stable across redelivery: execute the effect under this id so a host can deduplicate. */
|
|
154
|
+
operationId: string;
|
|
155
|
+
capability: string;
|
|
156
|
+
args: unknown;
|
|
157
|
+
/** The run's own identity, as the capability call would have carried it. */
|
|
158
|
+
actor: RunActor;
|
|
159
|
+
}
|
|
160
|
+
export interface RunControllerDeps {
|
|
161
|
+
store: RunStore;
|
|
162
|
+
launch: RunLauncher;
|
|
163
|
+
/** Host policy. Throw to refuse; the controller reports `not_authorized`. */
|
|
164
|
+
authorize: (actor: RunActor, run: AgentRun, action: RunAction) => void | Promise<void>;
|
|
165
|
+
/** The instance a run addresses; `undefined` = unknown. */
|
|
166
|
+
getInstance: (instanceId: string) => RunInstanceInfo | undefined | Promise<RunInstanceInfo | undefined>;
|
|
167
|
+
/** Execute an approved operation (the capability call the run was held on). Its return value is persisted as the result. */
|
|
168
|
+
execute: (operation: ApprovedOperation) => Promise<unknown>;
|
|
169
|
+
workspaceId: string;
|
|
170
|
+
limits?: Partial<RunLimits>;
|
|
171
|
+
/** `subagent` protocol events (started when a run is created, finished when it ends). */
|
|
172
|
+
emit?: (event: SubagentEvent) => void;
|
|
173
|
+
/** Called after each event was appended to the store's log; broadcast from here. */
|
|
174
|
+
onEvent?: (record: AgentRunEventRecord) => void;
|
|
175
|
+
/** Id of a run's native session; default `<workspaceId>:run:<runId>`. */
|
|
176
|
+
sessionIdFor?: (runId: string) => string;
|
|
177
|
+
log?: Logger;
|
|
178
|
+
}
|
|
179
|
+
/** A refused or impossible request. `code` is stable and reaches the model and the host unchanged. */
|
|
180
|
+
export declare class AgentRunError extends Error {
|
|
181
|
+
readonly code: string;
|
|
182
|
+
readonly issues?: string[] | undefined;
|
|
183
|
+
constructor(code: string, message: string, issues?: string[] | undefined);
|
|
184
|
+
}
|
|
185
|
+
export interface RunController {
|
|
186
|
+
/** Create a run and queue it (or hold it behind an approval). Answers at once; see {@link waitForRun}. */
|
|
187
|
+
startRun(request: StartRunRequest, actor: RunActor): Promise<AgentRunReport>;
|
|
188
|
+
getRun(runId: string, actor: RunActor): Promise<AgentRun>;
|
|
189
|
+
getRunReport(runId: string, actor: RunActor): Promise<AgentRunReport>;
|
|
190
|
+
/** Resolve when the run ended or needs a decision (`waiting_approval`). */
|
|
191
|
+
waitForRun(runId: string, actor: RunActor): Promise<AgentRunReport>;
|
|
192
|
+
/** Cancel the run and all its descendants. */
|
|
193
|
+
cancelRun(runId: string, actor: RunActor): Promise<AgentRunReport>;
|
|
194
|
+
decideApproval(approvalId: string, decision: "approve" | "deny", actor: RunActor): Promise<AgentRunReport>;
|
|
195
|
+
/** Continue a run no driver of this process holds: re-queue it, or finish a delivery a restart cut short. */
|
|
196
|
+
resumeRun(runId: string, actor: RunActor): Promise<AgentRunReport>;
|
|
197
|
+
/** See {@link RunLaunchContext.requestApproval}. Trusted: the host's session bridge calls it, not the model. */
|
|
198
|
+
requestApproval(runId: string, call: {
|
|
199
|
+
callId?: string;
|
|
200
|
+
capability: string;
|
|
201
|
+
args: unknown;
|
|
202
|
+
}): Promise<RunOperationApproval>;
|
|
203
|
+
/** Cancel every run still live in this process and wait for their sessions to wind down. */
|
|
204
|
+
dispose(): Promise<void>;
|
|
205
|
+
}
|
|
206
|
+
/** Build a run controller over an injected store, launcher and authorizer. */
|
|
207
|
+
export declare function createRunController(deps: RunControllerDeps): RunController;
|
|
208
|
+
//# sourceMappingURL=run-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-controller.d.ts","sourceRoot":"","sources":["../../../../runner/src/agents/run-controller.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,KAAK,EAEV,QAAQ,EAER,mBAAmB,EACnB,eAAe,EAEf,cAAc,EAEd,MAAM,EACN,cAAc,EACd,QAAQ,EACR,aAAa,EACd,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAQlE,2FAA2F;AAC3F,MAA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B,CAAC,CAAC;IACjC,4FAA4F;IAC5F,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAiCD,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,CAk2B1E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agents/standalone-surface.ts
|
|
3
|
+
*
|
|
4
|
+
* The agent surface for a session that has no host and no `startAgentServer`
|
|
5
|
+
* around it (`skaile run "<prompt>"`, `skaile repl`): `agent.*` served by a
|
|
6
|
+
* nested driver session in this process, no `memory.*`, no `trigger.*`. Builds
|
|
7
|
+
* the capability registry, registers the surface, and hands back the
|
|
8
|
+
* `AgentSessionConfig` fields a session needs to expose it.
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentEvent, Logger } from "@skaile/workspaces/types";
|
|
11
|
+
import type { AgentSession, AgentSessionConfig } from "../session-builder.js";
|
|
12
|
+
export interface StandaloneAgentSurfaceOpts {
|
|
13
|
+
/** The session config the surface is for (its driver, model and agent dir seed the nested role sessions). */
|
|
14
|
+
config: AgentSessionConfig;
|
|
15
|
+
/** Receives the `subagent` events of role runs. */
|
|
16
|
+
onEvent?: (event: AgentEvent) => void;
|
|
17
|
+
log?: Logger;
|
|
18
|
+
/** Builds a nested role session; defaults to `createAgentSession` (a seam for tests). */
|
|
19
|
+
createSession: (config: AgentSessionConfig) => Promise<AgentSession>;
|
|
20
|
+
}
|
|
21
|
+
export interface StandaloneAgentSurface {
|
|
22
|
+
/** Fields to layer onto the session config; `undefined` when the workspace has no instance to run. */
|
|
23
|
+
sessionConfig: Partial<AgentSessionConfig> | undefined;
|
|
24
|
+
/** Re-resolve the instances once the session is built (its composed `run` sub-agents are known then). */
|
|
25
|
+
attach: (session: AgentSession) => Promise<void>;
|
|
26
|
+
dispose: () => Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/** Build the in-process agent surface for `config`'s workspace, or none when the workspace declares no instance beyond the primary. */
|
|
29
|
+
export declare function createStandaloneAgentSurface(opts: StandaloneAgentSurfaceOpts): Promise<StandaloneAgentSurface>;
|
|
30
|
+
//# sourceMappingURL=standalone-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standalone-surface.d.ts","sourceRoot":"","sources":["../../../../runner/src/agents/standalone-surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAUnE,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAI9E,MAAM,WAAW,0BAA0B;IACzC,6GAA6G;IAC7G,MAAM,EAAE,kBAAkB,CAAC;IAC3B,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yFAAyF;IACzF,aAAa,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,sBAAsB;IACrC,sGAAsG;IACtG,aAAa,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC;IACvD,yGAAyG;IACzG,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAQD,uIAAuI;AACvI,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,0BAA0B,GAC/B,OAAO,CAAC,sBAAsB,CAAC,CAiFjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-registry.d.ts","sourceRoot":"","sources":["../../../runner/src/capability-registry.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EACV,UAAU,EAEV,gBAAgB,EAChB,MAA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,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,EAAE,CAK/E"}
|
|
@@ -1,59 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* composition/bootstrap.ts
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* inline blocks (→ system prompt) and discoverable entries (→ capability
|
|
9
|
-
* registry)
|
|
10
|
-
* - `registerCompositionCapabilities()` — called by serve.ts to register
|
|
11
|
-
* discoverable entries as Protocol v2 capabilities
|
|
12
|
-
*
|
|
13
|
-
* Phase 1 limitation: the content loader uses `resolveMixin()` which only
|
|
14
|
-
* resolves local-path refs (./file.md, /abs/path). Scoped catalog refs
|
|
15
|
-
* (@publisher/name) require a populated RepoMap from workspace config, which
|
|
16
|
-
* Phase 2 / Library integration will provide. Unresolvable refs produce
|
|
17
|
-
* warnings but do not block session start.
|
|
4
|
+
* Registers resolved composition entries with the session's capability
|
|
5
|
+
* registry (`registerCompositionCapabilities`, called by serve.ts) and opens
|
|
6
|
+
* the optional asset index used to describe them. Resolution itself lives in
|
|
7
|
+
* `resolve-instance.ts` (`resolveAgentInstance`).
|
|
18
8
|
*/
|
|
19
|
-
import {
|
|
9
|
+
import type { IAssetIndex } from "@skaile/workspaces/library";
|
|
20
10
|
import type { Logger } from "@skaile/workspaces/types";
|
|
21
11
|
import type { CapabilityRegistry } from "../capability-registry.js";
|
|
22
|
-
import {
|
|
23
|
-
import type { DiscoverableEntry, ResolvedComposition } from "./types.js";
|
|
24
|
-
export type { ResolvedComposition };
|
|
25
|
-
/**
|
|
26
|
-
* Options for {@link resolveAgentComposition}.
|
|
27
|
-
*
|
|
28
|
-
* @docLink packages/runner/capabilities#resolve-agent-composition
|
|
29
|
-
*/
|
|
30
|
-
export interface ResolveAgentCompositionOpts {
|
|
31
|
-
/** Path to the agent definition directory (where agent.yaml lives) */
|
|
32
|
-
agentDir: string;
|
|
33
|
-
/** Parsed agent manifest (must have `composes` field) */
|
|
34
|
-
manifest: AgentManifest;
|
|
35
|
-
/**
|
|
36
|
-
* Project root — reserved for Phase 2 workspace config resolution.
|
|
37
|
-
* In Phase 1 this is unused but accepted so the call site doesn't
|
|
38
|
-
* need updating when Library integration lands.
|
|
39
|
-
*/
|
|
40
|
-
projectDir: string;
|
|
41
|
-
/** Pre-built repo map for catalog resolution. Empty in Phase 1. */
|
|
42
|
-
repos?: RepoMap;
|
|
43
|
-
/** Logger for composition resolution warnings */
|
|
44
|
-
log?: Logger;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Resolve an agent's `composes:` items into inline blocks and discoverable
|
|
48
|
-
* entries. Called by session-builder.ts during the session creation pipeline.
|
|
49
|
-
*
|
|
50
|
-
* Returns null when the manifest has no `composes:` items.
|
|
51
|
-
*
|
|
52
|
-
* @param opts - Resolution options including agentDir, manifest, and optional repos/log.
|
|
53
|
-
* @returns A {@link ResolvedComposition} or `null` when there are no composition items.
|
|
54
|
-
* @docLink packages/runner/capabilities#resolve-agent-composition
|
|
55
|
-
*/
|
|
56
|
-
export declare function resolveAgentComposition(opts: ResolveAgentCompositionOpts): Promise<ResolvedComposition | null>;
|
|
12
|
+
import type { DiscoverableEntry } from "./types.js";
|
|
57
13
|
/**
|
|
58
14
|
* Register discoverable composition entries as Protocol v2 capabilities.
|
|
59
15
|
*
|
|
@@ -66,8 +22,14 @@ export declare function resolveAgentComposition(opts: ResolveAgentCompositionOpt
|
|
|
66
22
|
* that compose many assets.
|
|
67
23
|
*
|
|
68
24
|
* @param registry - The session capability registry to register capabilities onto.
|
|
69
|
-
* @param entries - Discoverable entries from a prior {@link
|
|
25
|
+
* @param entries - Discoverable entries from a prior {@link resolveAgentInstance} call.
|
|
70
26
|
* @docLink packages/runner/capabilities#register-composition-capabilities
|
|
71
27
|
*/
|
|
72
28
|
export declare function registerCompositionCapabilities(registry: CapabilityRegistry, entries: DiscoverableEntry[]): void;
|
|
29
|
+
/**
|
|
30
|
+
* Try to open the LocalIndex SQLite store if it exists.
|
|
31
|
+
* Returns a stub when the library DB is missing (user hasn't synced yet)
|
|
32
|
+
* or when opening fails (e.g. corrupt DB).
|
|
33
|
+
*/
|
|
34
|
+
export declare function openLocalIndexIfAvailable(log?: Logger): Promise<IAssetIndex>;
|
|
73
35
|
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../../runner/src/composition/bootstrap.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../../runner/src/composition/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAMpD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,iBAAiB,EAAE,GAC3B,IAAI,CAsBN;AAwBD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA6BlF"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* composition/compile.ts
|
|
3
3
|
*
|
|
4
|
-
* Implements `skaile rebuild <agent>` —
|
|
5
|
-
*
|
|
4
|
+
* Implements `skaile rebuild <agent>` — resolves every `composes:` item through
|
|
5
|
+
* the content source, captures kind, resolved ref and bytes, bumps the prompt
|
|
6
|
+
* version and writes `<agent>/compile_manifest.json` (schema 2).
|
|
6
7
|
*
|
|
7
|
-
* The compile manifest
|
|
8
|
-
*
|
|
8
|
+
* The compile manifest is what an agent runs from: `inline-snapshot` serves its
|
|
9
|
+
* bytes and `discoverable` items hand out its bytes on invocation. A later
|
|
10
|
+
* change to a local file or to the catalog changes nothing until the next
|
|
11
|
+
* `skaile rebuild`.
|
|
9
12
|
*/
|
|
10
13
|
import type { AgentComposeItem } from "@skaile/workspaces/types/manifests";
|
|
14
|
+
import * as z from "zod";
|
|
15
|
+
import { type CompositionContentSource } from "./content-source.js";
|
|
11
16
|
import { type CompileManifest } from "./types.js";
|
|
12
17
|
/**
|
|
13
18
|
* Filename for the agent compile manifest written by `skaile rebuild`.
|
|
@@ -15,6 +20,23 @@ import { type CompileManifest } from "./types.js";
|
|
|
15
20
|
* @docLink packages/runner/capabilities#compile-composition
|
|
16
21
|
*/
|
|
17
22
|
export declare const COMPILE_MANIFEST_FILENAME = "compile_manifest.json";
|
|
23
|
+
/** One captured composition item, as stored in `compile_manifest.json` and in run snapshots. */
|
|
24
|
+
export declare const CompileManifestEntrySchema: z.ZodObject<{
|
|
25
|
+
asset_ref: z.ZodString;
|
|
26
|
+
kind: z.ZodString;
|
|
27
|
+
resolved_ref: z.ZodString;
|
|
28
|
+
version: z.ZodNullable<z.ZodString>;
|
|
29
|
+
hash: z.ZodString;
|
|
30
|
+
binding: z.ZodEnum<{
|
|
31
|
+
discoverable: "discoverable";
|
|
32
|
+
"inline-live": "inline-live";
|
|
33
|
+
"inline-snapshot": "inline-snapshot";
|
|
34
|
+
delegate: "delegate";
|
|
35
|
+
run: "run";
|
|
36
|
+
}>;
|
|
37
|
+
resolved_at: z.ZodString;
|
|
38
|
+
content: z.ZodString;
|
|
39
|
+
}, z.core.$strip>;
|
|
18
40
|
/**
|
|
19
41
|
* Options for {@link compileComposition}.
|
|
20
42
|
*
|
|
@@ -23,18 +45,10 @@ export declare const COMPILE_MANIFEST_FILENAME = "compile_manifest.json";
|
|
|
23
45
|
export interface CompileOpts {
|
|
24
46
|
/** Path to the agent directory (where agent.yaml and compile_manifest.json live) */
|
|
25
47
|
agentDir: string;
|
|
26
|
-
/** The agent's composes: items */
|
|
48
|
+
/** The agent's composes: items (may be empty — an empty composition is valid). */
|
|
27
49
|
items: AgentComposeItem[];
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
* Returns null if the content cannot be loaded.
|
|
31
|
-
*/
|
|
32
|
-
loadContent: (ref: string, kind: string) => Promise<string | null>;
|
|
33
|
-
/**
|
|
34
|
-
* Version extractor — given an asset ref, returns the resolved version string.
|
|
35
|
-
* Returns null if unknown.
|
|
36
|
-
*/
|
|
37
|
-
resolveVersion?: (ref: string) => Promise<string | null>;
|
|
50
|
+
/** Where composition bytes come from. */
|
|
51
|
+
source: CompositionContentSource;
|
|
38
52
|
}
|
|
39
53
|
/**
|
|
40
54
|
* Result returned by {@link compileComposition}.
|
|
@@ -46,29 +60,30 @@ export interface CompileResult {
|
|
|
46
60
|
manifest: CompileManifest;
|
|
47
61
|
/** Path to the written file */
|
|
48
62
|
manifestPath: string;
|
|
49
|
-
/** Number of entries
|
|
63
|
+
/** Number of entries written (every item resolves or the compile throws) */
|
|
50
64
|
resolvedCount: number;
|
|
51
|
-
/** Warnings for unresolvable items */
|
|
52
|
-
warnings: string[];
|
|
53
65
|
}
|
|
54
66
|
/**
|
|
55
67
|
* Compile (rebuild) the agent's composition.
|
|
56
68
|
*
|
|
57
|
-
* 1.
|
|
58
|
-
* 2.
|
|
59
|
-
* 3. Bumps prompt_version
|
|
60
|
-
* 4. Writes compile_manifest.json
|
|
69
|
+
* 1. Resolves ALL items through the content source (any unresolvable item throws)
|
|
70
|
+
* 2. Rejects sub-agent loops (`agent` items that compose their own ancestor)
|
|
71
|
+
* 3. Bumps prompt_version (continuing a schema-1 file's counter)
|
|
72
|
+
* 4. Writes compile_manifest.json atomically
|
|
61
73
|
*
|
|
62
|
-
* @param opts - Compile options including agentDir, items
|
|
63
|
-
* @returns A {@link CompileResult} with the written manifest
|
|
74
|
+
* @param opts - Compile options including agentDir, items and the content source.
|
|
75
|
+
* @returns A {@link CompileResult} with the written manifest.
|
|
76
|
+
* @throws {CompositionError} `composition_asset_missing` / `composition_conflict` for an item that cannot be served.
|
|
64
77
|
* @docLink packages/runner/capabilities#compile-composition
|
|
65
78
|
*/
|
|
66
79
|
export declare function compileComposition(opts: CompileOpts): Promise<CompileResult>;
|
|
67
80
|
/**
|
|
68
|
-
* Load an existing compile_manifest.json
|
|
81
|
+
* Load an existing compile_manifest.json.
|
|
69
82
|
*
|
|
70
83
|
* @param manifestPath - Absolute path to the manifest file.
|
|
71
|
-
* @returns The parsed {@link CompileManifest} or `undefined` when
|
|
84
|
+
* @returns The parsed {@link CompileManifest}, or `undefined` when the file does not exist.
|
|
85
|
+
* @throws {CompositionError} `composition_rebuild_required` for a schema-1 artifact or a malformed
|
|
86
|
+
* file; `composition_conflict` when an entry's `hash` no longer matches its `content`.
|
|
72
87
|
* @docLink packages/runner/capabilities#load-compile-manifest
|
|
73
88
|
*/
|
|
74
89
|
export declare function loadCompileManifest(manifestPath: string): Promise<CompileManifest | undefined>;
|
|
@@ -77,7 +92,8 @@ export declare function loadCompileManifest(manifestPath: string): Promise<Compi
|
|
|
77
92
|
* `<agentDir>/compile_manifest.json`.
|
|
78
93
|
*
|
|
79
94
|
* @param agentDir - Absolute path to the agent definition directory.
|
|
80
|
-
* @returns The parsed {@link CompileManifest} or `undefined` when
|
|
95
|
+
* @returns The parsed {@link CompileManifest} or `undefined` when the file does not exist.
|
|
96
|
+
* @throws {CompositionError} see {@link loadCompileManifest}.
|
|
81
97
|
* @docLink packages/runner/capabilities#load-compile-manifest-from-dir
|
|
82
98
|
*/
|
|
83
99
|
export declare function loadCompileManifestFromDir(agentDir: string): Promise<CompileManifest | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../runner/src/composition/compile.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../runner/src/composition/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,eAAe,EAA6C,MAAM,YAAY,CAAC;AAM7F;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,0BAA0B,CAAC;AAEjE,gGAAgG;AAChG,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;iBASrC,CAAC;AAoBH;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,yCAAyC;IACzC,MAAM,EAAE,wBAAwB,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,mCAAmC;IACnC,QAAQ,EAAE,eAAe,CAAC;IAC1B,+BAA+B;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAC;CACvB;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CA4ClF;AAMD;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CA6CtC;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAEtC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* composition/content-source.ts
|
|
3
|
+
*
|
|
4
|
+
* The one place composition bytes come from. A `composes:` ref resolves, in
|
|
5
|
+
* order, through
|
|
6
|
+
*
|
|
7
|
+
* 1. a local path (`./rules.md`, `/abs/RULES.md`, a directory holding the
|
|
8
|
+
* kind's manifest) read straight from disk;
|
|
9
|
+
* 2. the project lock (`skaile.lock.yaml`): a locked asset is served exactly
|
|
10
|
+
* as pinned, from the store cache or the catalog checkout, and its bytes
|
|
11
|
+
* are verified against the per-file hashes the lock recorded — the pin
|
|
12
|
+
* wins over whatever the catalog holds now;
|
|
13
|
+
* 3. the catalog: a discovery scan of the local catalog roots (the
|
|
14
|
+
* `ai-assets/` tree, source clones). Several distinct matches are an
|
|
15
|
+
* error, never a pick.
|
|
16
|
+
*
|
|
17
|
+
* Nothing here touches the network. A ref that cannot be served throws a
|
|
18
|
+
* {@link CompositionError}; an item is never dropped silently.
|
|
19
|
+
*/
|
|
20
|
+
import type { IAssetKindRegistry } from "@skaile/workspaces/plugins";
|
|
21
|
+
/**
|
|
22
|
+
* One composition asset as the content source served it.
|
|
23
|
+
*
|
|
24
|
+
* @docLink packages/runner/capabilities#composition-asset
|
|
25
|
+
*/
|
|
26
|
+
export interface CompositionAsset {
|
|
27
|
+
/**
|
|
28
|
+
* Where the bytes came from, in a stable spelling: `kind:@publisher/name#version`
|
|
29
|
+
* for a locked or catalog asset, `local:<path>` for a file on disk.
|
|
30
|
+
*/
|
|
31
|
+
canonicalRef: string;
|
|
32
|
+
/** Asset kind the item was loaded as. */
|
|
33
|
+
kind: string;
|
|
34
|
+
/** Resolved version; `null` for a local file (identified by its content hash only). */
|
|
35
|
+
version: string | null;
|
|
36
|
+
/** SHA-256 (hex) of `content`. */
|
|
37
|
+
sha256: string;
|
|
38
|
+
/** Prompt-injectable text (frontmatter stripped). */
|
|
39
|
+
content: string;
|
|
40
|
+
/**
|
|
41
|
+
* Absolute path of the primary file (or knowledge directory) the content
|
|
42
|
+
* was read from. Diagnostic and traversal aid; never part of the compile
|
|
43
|
+
* manifest.
|
|
44
|
+
*/
|
|
45
|
+
location?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Loads composition assets. One instance serves one agent directory (relative
|
|
49
|
+
* refs resolve against it).
|
|
50
|
+
*
|
|
51
|
+
* @docLink packages/runner/capabilities#composition-content-source
|
|
52
|
+
*/
|
|
53
|
+
export interface CompositionContentSource {
|
|
54
|
+
/**
|
|
55
|
+
* Load the asset a `composes:` ref names.
|
|
56
|
+
* @throws {CompositionError} `composition_asset_missing` when nothing serves the ref;
|
|
57
|
+
* `composition_conflict` when several candidates match or locked bytes drifted.
|
|
58
|
+
*/
|
|
59
|
+
load(ref: string, kind: string): Promise<CompositionAsset>;
|
|
60
|
+
/** A source for another agent directory (sub-agent traversal), sharing catalog scans. */
|
|
61
|
+
scoped(agentDir: string): CompositionContentSource;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Options for {@link createCompositionContentSource}.
|
|
65
|
+
*
|
|
66
|
+
* @docLink packages/runner/capabilities#composition-content-source
|
|
67
|
+
*/
|
|
68
|
+
export interface CompositionContentSourceOpts {
|
|
69
|
+
/** Agent definition directory — base of relative refs. */
|
|
70
|
+
agentDir: string;
|
|
71
|
+
/** Project root — holds `skaile.lock.yaml` and `.skaile/cache/store`. */
|
|
72
|
+
projectDir: string;
|
|
73
|
+
/** Kind registry used to recognise a kind's manifest file. Defaults to the built-in providers plus `knowledge`. */
|
|
74
|
+
registry?: IAssetKindRegistry;
|
|
75
|
+
/**
|
|
76
|
+
* Catalog roots to scan. Defaults to the `ai-assets/` tree above the project,
|
|
77
|
+
* the declared `sources:` clones and the project's source cache.
|
|
78
|
+
*/
|
|
79
|
+
catalogRoots?: readonly string[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Create the content source for one agent directory.
|
|
83
|
+
*
|
|
84
|
+
* @param opts - Agent dir, project dir and optional registry / catalog roots.
|
|
85
|
+
* @returns A {@link CompositionContentSource} that resolves local, lock-pinned and catalog refs.
|
|
86
|
+
* @docLink packages/runner/capabilities#composition-content-source
|
|
87
|
+
*/
|
|
88
|
+
export declare function createCompositionContentSource(opts: CompositionContentSourceOpts): CompositionContentSource;
|
|
89
|
+
/**
|
|
90
|
+
* Hash helper shared by the compile writer and the resolver: the hash a
|
|
91
|
+
* {@link CompositionAsset} / compile entry records for `content`.
|
|
92
|
+
*/
|
|
93
|
+
export declare function hashContent(content: string): string;
|
|
94
|
+
//# sourceMappingURL=content-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-source.d.ts","sourceRoot":"","sources":["../../../../runner/src/composition/content-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAgBH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAQrE;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC3D,yFAAyF;IACzF,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,wBAAwB,CAAC;CACpD;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,mHAAmH;IACnH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAoJD;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,4BAA4B,GACjC,wBAAwB,CAS1B;AA+VD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* composition/dry-run.ts
|
|
3
|
+
*
|
|
4
|
+
* What `skaile run --dry-run` prints for a single-shot agent run: the resolved
|
|
5
|
+
* composition items (ref, kind, binding, version, hash) and how each one
|
|
6
|
+
* reaches each supported harness. No model is spawned and no run snapshot is
|
|
7
|
+
* written.
|
|
8
|
+
*/
|
|
9
|
+
import { type DriverTarget } from "@skaile/workspaces/core";
|
|
10
|
+
import type { ResolvedAgentInstance } from "./resolve-instance.js";
|
|
11
|
+
/** One row of the dry-run report. */
|
|
12
|
+
export interface CompositionDryRunRow {
|
|
13
|
+
/** `composes[].ref` as written. */
|
|
14
|
+
ref: string;
|
|
15
|
+
kind: string;
|
|
16
|
+
binding: string;
|
|
17
|
+
/** Resolved version; `null` for a local file. */
|
|
18
|
+
version: string | null | undefined;
|
|
19
|
+
/** SHA256 of the composed bytes. */
|
|
20
|
+
hash: string | undefined;
|
|
21
|
+
/** Where the bytes came from. */
|
|
22
|
+
resolvedRef: string | undefined;
|
|
23
|
+
/** How the item reaches each harness. */
|
|
24
|
+
support: Record<DriverTarget, string>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Describe a resolved agent instance for `--dry-run`.
|
|
28
|
+
*
|
|
29
|
+
* @param resolved - The result of {@link resolveAgentInstance}; its manifest carries the effective `composes` (convention items first).
|
|
30
|
+
* @returns One row per effective composition item, in order.
|
|
31
|
+
* @docLink packages/runner/capabilities#composition-dry-run
|
|
32
|
+
*/
|
|
33
|
+
export declare function describeComposition(resolved: ResolvedAgentInstance): CompositionDryRunRow[];
|
|
34
|
+
//# sourceMappingURL=dry-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dry-run.d.ts","sourceRoot":"","sources":["../../../../runner/src/composition/dry-run.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,qCAAqC;AACrC,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,oCAAoC;IACpC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,iCAAiC;IACjC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;CACvC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,oBAAoB,EAAE,CAmB3F"}
|