@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":[],"names":[],"mappings":"","file":"project-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"project-VMOHUXBD.js"}
|
package/dist/resolver/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { buildRequiresPreamble, parseCompactionDirectives, parseSkillFrontmatter, parseSkillRequirements, validateConnectorRequirements, validateFlowVersions, validateRequirements } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { buildRequiresPreamble, parseCompactionDirectives, parseSkillFrontmatter, parseSkillRequirements, validateConnectorRequirements, validateFlowVersions, validateRequirements } from '../chunk-ZBBM6O6P.js';
|
|
2
|
+
import '../chunk-TZCQ7ZWQ.js';
|
|
3
3
|
import '../chunk-4GY63JU6.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-BF33SCLY.js';
|
|
5
|
+
import '../chunk-46OVMT76.js';
|
|
6
6
|
import '../chunk-5BEFNLOR.js';
|
|
7
7
|
import '../chunk-A2ULN3KX.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-2W4LBLIN.js';
|
|
9
9
|
import '../chunk-MFHKHXDE.js';
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
10
|
+
import '../chunk-CPSIPIX7.js';
|
|
11
|
+
import '../chunk-7ZHLYXTI.js';
|
|
12
12
|
import '../chunk-RVRB27AN.js';
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-PA7WLID3.js';
|
|
14
|
+
import '../chunk-AO7VJ6G6.js';
|
|
15
15
|
import '../chunk-ICSCSM5D.js';
|
|
16
16
|
import '../chunk-JMKB7IB4.js';
|
|
17
17
|
import '../chunk-MJHSLODD.js';
|
package/dist/runner/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CONNECTOR_MUTATE_NOT_READY, CapabilityRegistry, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_READ_MAX_CHUNK_BYTES, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MOUNT_WRITE_MAX_CHUNK_BYTES, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, WRITE_RANGE_PARTIAL_TTL_MS, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildStoreSnapshotReplay, builtinCapabilities, capabilityLogInstance, capabilitySignatureInputs, clearPreInitRingSink, clearSession, compileComposition, computeCapabilitySignature, computeDirectoryTotals, connectorRefreshKind, createAgentSession, createFlowConnectorReadiness, createManagedCodexSubpromptDriver, createSessionStimulusBus, defineCapability, deleteSession, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, driverActiveAfterTurnEnd, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hostOpResumeStimulus, installPreInitRingSink, isSessionRootPathAllowed, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, reconnectedRunNeedsAgentTurn, recreateKeepingLiveFlows, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore,
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
1
|
+
export { AgentRunError, CLAUDE_CODE_CREDENTIALS_KEY, COMPILE_MANIFEST_FILENAME, CONNECTOR_MUTATE_NOT_READY, CapabilityRegistry, CompileManifestEntrySchema, CompositionError, DEFAULT_CAPABILITY_CALL_TIMEOUT_MS, DEFAULT_COALESCE_MS, DEFAULT_FLOW_MUTATE_CONNECTOR_WAIT_MS, DEFAULT_MAX_FINISHED_TREES, DEFAULT_RUN_LIMITS, MOUNT_LIST_MAX_DEPTH, MOUNT_LIST_MAX_ENTRIES, MOUNT_READ_DEADLINE_FACTOR, MOUNT_READ_MAX_CHUNK_BYTES, MOUNT_STAT_BUDGET_MS, MOUNT_STAT_MAX_ENTRIES, MOUNT_TREE_OP_DEADLINE_FACTOR, MOUNT_WRITE_MAX_CHUNK_BYTES, MarkdownStreamer, PreInitRingSink, ResourceOperationError, SESSION_ROOT_WRITABLE_DIRS, SESSION_ROOT_WRITABLE_FILES, UnknownCompositionKindError, WRITE_RANGE_PARTIAL_TTL_MS, WS_AUTH_TOKEN_ENV, WS_AUTH_TOKEN_FILE_ENV, agentDefinitionExists, bootstrapCapabilityRegistry, bootstrapRunnerLogStore, buildAgentResources, buildClientCapabilityHandler, buildCompositionRunSnapshot, buildConnectorTokenMediator, buildContextSection, buildEnvironmentSection, buildResourcesAvailablePayload, buildRunnerAgentSections, buildStoreSnapshotReplay, builtinCapabilities, canonicalJson, capabilityLogInstance, capabilitySignatureInputs, clearPreInitRingSink, clearSession, compileComposition, compositionRunSnapshotPath, computeCapabilitySignature, computeDirectoryTotals, computeRevisionHash, connectorRefreshKind, createAgentSession, createCompositionContentSource, createFlowConnectorReadiness, createInMemoryRunStore, createManagedCodexSubpromptDriver, createRunController, createSessionStimulusBus, defineCapability, deleteSession, describeComposition, dispatchResourceRequest, dispatchRunnerCapabilityInvocation, driverActiveAfterTurnEnd, emitSystemPromptComposed, ensureClaudeSettingsDisablesConnectors, ensureGitConfigInclude, executeConnectorMutate, extractClaudeAiOauthExpiresAt, flowStartNeedsDriverRestart, getPreInitRingSink, handleMountResourceRequest, handleResourceRequest, handleSessionRootResourceRequest, hasNonTerminalFlow, hashAgentFiles, hashContent, hostOpResumeStimulus, installPreInitRingSink, instanceForSession, isCompositionError, isEmptyKnowledgeIndex, isSessionRootPathAllowed, listSessions, loadAgentManifest, loadCompileManifest, loadCompileManifestFromDir, loadCompositionRunSnapshot, loadKnowledgeDir, loadManagedCodexHostConfig, loadSession, loadSessionById, mcpAuthSecretKey, newSession, nulTailPaddingLength, pickChatFlowTarget, pickFlowToolTarget, pickRepointedManager, planFlowMutate, prepareCodexTools, reconcilePendingDecisions, reconnectedRunNeedsAgentTurn, recreateKeepingLiveFlows, registerActiveFlow, registerCompositionCapabilities, rejectCapabilityOnApprovalDeny, rejectPendingCapabilityCallsOnDisconnect, resetRunnerLogStore, resolveAgentInstance, resolveBinding, resolveCapabilityCallTimeoutMs, resolveCapabilityResult, resolveComposition, resolveFlowMutateConnectorWaitMs, resolveMixin, restoredRunHasWorkToResume, runAgentChat, saveCompositionRunSnapshot, saveSession, setCurrentSession, setUpFlowConnector, startAgentServer, stimulusFromMetas, stripFrontmatter, takeRunnerWsAuthToken, toActiveFlowTarget, touchSession, validateInputResponse, writeClaudeCodeCredentialsFile, writeRangeChunk, writeRangePartialPath } from '../chunk-RGXVQZOV.js';
|
|
2
|
+
import '../chunk-4GNJELPH.js';
|
|
3
|
+
import '../chunk-6NPINANG.js';
|
|
4
|
+
import '../chunk-SX4UIDKT.js';
|
|
5
5
|
import '../chunk-R6O6YWU7.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-KYXOGHY6.js';
|
|
7
|
+
import '../chunk-45VFGT7A.js';
|
|
8
8
|
import '../chunk-4ZTPYIBE.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-2XFUXGV6.js';
|
|
10
10
|
import '../chunk-X5YPJV4N.js';
|
|
11
11
|
import '../chunk-O7SG5PC2.js';
|
|
12
12
|
import '../chunk-7QBNJTTQ.js';
|
|
@@ -15,51 +15,56 @@ import '../chunk-5LKOAX7I.js';
|
|
|
15
15
|
import '../chunk-32NA4TVC.js';
|
|
16
16
|
export { assembleSystemPrompt, buildCapabilitiesPromptSection, buildLinkedPeersPromptSection } from '../chunk-W3UDISS2.js';
|
|
17
17
|
import '../chunk-HCYS7GFP.js';
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-7KLC4LZO.js';
|
|
19
19
|
import '../chunk-4R6DROGN.js';
|
|
20
|
-
import '../chunk-
|
|
21
|
-
import '../chunk-
|
|
20
|
+
import '../chunk-ZBBM6O6P.js';
|
|
21
|
+
import '../chunk-SDFROXSA.js';
|
|
22
22
|
import '../chunk-CT6NQSA4.js';
|
|
23
|
-
import '../chunk-
|
|
24
|
-
import '../chunk-
|
|
25
|
-
import '../chunk-
|
|
26
|
-
import '../chunk-
|
|
27
|
-
import '../chunk-
|
|
23
|
+
import '../chunk-UAP2XHRF.js';
|
|
24
|
+
import '../chunk-FK6HPLQA.js';
|
|
25
|
+
import '../chunk-2GRB5ITE.js';
|
|
26
|
+
import '../chunk-VX3INFBA.js';
|
|
27
|
+
import '../chunk-VBBBZDI7.js';
|
|
28
28
|
import '../chunk-EINLFFP6.js';
|
|
29
29
|
import '../chunk-LOO5CB5M.js';
|
|
30
|
-
import '../chunk-
|
|
31
|
-
import '../chunk-
|
|
30
|
+
import '../chunk-NARITJS2.js';
|
|
31
|
+
import '../chunk-27HS2DHB.js';
|
|
32
32
|
import '../chunk-XBSQ4KMC.js';
|
|
33
33
|
import '../chunk-YROR332M.js';
|
|
34
|
-
import '../chunk-
|
|
34
|
+
import '../chunk-5B5IZVEP.js';
|
|
35
35
|
import '../chunk-6E6PKKAD.js';
|
|
36
36
|
import '../chunk-IFGTRL2I.js';
|
|
37
|
-
import '../chunk-
|
|
37
|
+
import '../chunk-AOAZCSDI.js';
|
|
38
38
|
import '../chunk-37FTLYFP.js';
|
|
39
39
|
import '../chunk-QZLWJETK.js';
|
|
40
40
|
import '../chunk-XUUYAS3Z.js';
|
|
41
41
|
import '../chunk-NFGRW3L7.js';
|
|
42
42
|
import '../chunk-QCI6D7E4.js';
|
|
43
|
-
import '../chunk-
|
|
44
|
-
|
|
43
|
+
import '../chunk-DMLDYFDS.js';
|
|
44
|
+
import '../chunk-MX3UQXLU.js';
|
|
45
|
+
import '../chunk-XOGG7VDZ.js';
|
|
46
|
+
import '../chunk-BTISGSK4.js';
|
|
47
|
+
import '../chunk-R7FOF242.js';
|
|
48
|
+
import '../chunk-3TXEJN4W.js';
|
|
49
|
+
import '../chunk-FRHE7FFB.js';
|
|
50
|
+
export { globalSettingsPath, loadSettings, mapLegacyFields, projectSettingsPath, resolveSettings, saveSettings } from '../chunk-TZCQ7ZWQ.js';
|
|
45
51
|
import '../chunk-4GY63JU6.js';
|
|
46
|
-
import '../chunk-
|
|
47
|
-
import '../chunk-
|
|
52
|
+
import '../chunk-BF33SCLY.js';
|
|
53
|
+
import '../chunk-46OVMT76.js';
|
|
48
54
|
export { DRIVER_DEFAULTS, resolveDriverPaths } from '../chunk-5BEFNLOR.js';
|
|
49
55
|
import '../chunk-A2ULN3KX.js';
|
|
50
|
-
import '../chunk-
|
|
56
|
+
import '../chunk-2W4LBLIN.js';
|
|
51
57
|
import '../chunk-MFHKHXDE.js';
|
|
52
|
-
export { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS } from '../chunk-
|
|
53
|
-
import '../chunk-
|
|
58
|
+
export { DRIVER_TARGETS, SUPPORTED_DRIVER_TARGETS } from '../chunk-CPSIPIX7.js';
|
|
59
|
+
import '../chunk-7ZHLYXTI.js';
|
|
54
60
|
import '../chunk-RVRB27AN.js';
|
|
55
|
-
import '../chunk-
|
|
56
|
-
import '../chunk-
|
|
61
|
+
import '../chunk-PA7WLID3.js';
|
|
62
|
+
import '../chunk-AO7VJ6G6.js';
|
|
57
63
|
import '../chunk-ICSCSM5D.js';
|
|
58
64
|
import '../chunk-JMKB7IB4.js';
|
|
59
65
|
import '../chunk-MJHSLODD.js';
|
|
60
66
|
import '../chunk-C3CAXQMA.js';
|
|
61
67
|
import '../chunk-BOFL7GIF.js';
|
|
62
|
-
import '../chunk-5CYEWBPB.js';
|
|
63
68
|
import '../chunk-NSBPE2FW.js';
|
|
64
69
|
//# sourceMappingURL=index.js.map
|
|
65
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agent-capabilities.ts
|
|
3
|
+
*
|
|
4
|
+
* The agent composition capabilities of protocol v2 (framework origin,
|
|
5
|
+
* `agent` side): `agent.list|run|status|cancel|result`, `approval.decide`,
|
|
6
|
+
* `memory.read|write|append|list` and `trigger.list|upsert|toggle`.
|
|
7
|
+
*
|
|
8
|
+
* Switched on by what the host advertises in `session_init.capabilities`:
|
|
9
|
+
*
|
|
10
|
+
* | Host advertises | Registered |
|
|
11
|
+
* |----------------------|-------------------------------------------------------------|
|
|
12
|
+
* | `host.agent_run` | `agent.*` (host spawns the runs) + `approval.decide` |
|
|
13
|
+
* | `host.memory_store` | `memory.*` |
|
|
14
|
+
* | `host.trigger_store` | `trigger.*` |
|
|
15
|
+
* | none | `agent.*` + `approval.decide`, served in-process, only when |
|
|
16
|
+
* | | the workspace declares instances beyond the primary one; |
|
|
17
|
+
* | | no `memory.*`, no `trigger.*` |
|
|
18
|
+
*
|
|
19
|
+
* Host-backed calls travel over the outbound `host.*` capability channel; the
|
|
20
|
+
* request/reply contracts are in `@skaile/workspaces/types` (`Host*Request`).
|
|
21
|
+
* The runner checks what it can before the host sees a call (unknown
|
|
22
|
+
* instance, `io.input`, a block that is not declared) and checks the output
|
|
23
|
+
* of every finished run against `io.output` before the model sees it.
|
|
24
|
+
*
|
|
25
|
+
* @category Capabilities
|
|
26
|
+
* @since 4.16.0
|
|
27
|
+
*/
|
|
28
|
+
import type { AgentRunTarget } from "./agents/instances.js";
|
|
29
|
+
import type { CapabilityRegistry } from "./capability-registry.js";
|
|
30
|
+
import type { ResolvedMemoryBlock } from "./composition/resolve-instance.js";
|
|
31
|
+
import { type AgentEvent, type HostAgentRunReply, type HostAgentRunRequest, type Logger } from "@skaile/workspaces/types";
|
|
32
|
+
/** The runtime-audience capabilities a host advertises to switch the surface on. */
|
|
33
|
+
export declare const HOST_AGENT_RUN_CAPABILITY = "host.agent_run";
|
|
34
|
+
export declare const HOST_MEMORY_STORE_CAPABILITY = "host.memory_store";
|
|
35
|
+
export declare const HOST_TRIGGER_STORE_CAPABILITY = "host.trigger_store";
|
|
36
|
+
/** How long a synchronous run, or a wait for a result, may take on the host channel. */
|
|
37
|
+
export declare const AGENT_RUN_HOST_TIMEOUT_MS: number;
|
|
38
|
+
/** What the host advertised. */
|
|
39
|
+
export interface AgentSurfaceHosts {
|
|
40
|
+
agentRun: boolean;
|
|
41
|
+
memoryStore: boolean;
|
|
42
|
+
triggerStore: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Read the advertisement off the runtime-audience capability names of a `session_init`. */
|
|
45
|
+
export declare function hostsFromCapabilityNames(names: ReadonlySet<string>): AgentSurfaceHosts;
|
|
46
|
+
/** Runs a host-forwarded surface has seen; bounded, oldest first out. */
|
|
47
|
+
export interface AgentRunLedger {
|
|
48
|
+
get(runId: string): {
|
|
49
|
+
target: AgentRunTarget;
|
|
50
|
+
input: unknown;
|
|
51
|
+
} | undefined;
|
|
52
|
+
remember(runId: string, entry: {
|
|
53
|
+
target: AgentRunTarget;
|
|
54
|
+
input: unknown;
|
|
55
|
+
}): void;
|
|
56
|
+
isFinished(runId: string): boolean;
|
|
57
|
+
markFinished(runId: string): void;
|
|
58
|
+
}
|
|
59
|
+
export declare function createAgentRunLedger(): AgentRunLedger;
|
|
60
|
+
export interface AgentSurfaceDeps {
|
|
61
|
+
registry: CapabilityRegistry;
|
|
62
|
+
/** Session the capabilities belong to. */
|
|
63
|
+
sessionId: string;
|
|
64
|
+
/** The instance this session runs; its memory blocks are the ones `memory.*` addresses. */
|
|
65
|
+
instanceId: string;
|
|
66
|
+
/** Every instance a run can address (`loadAgentRunTargets`). */
|
|
67
|
+
targets: readonly AgentRunTarget[];
|
|
68
|
+
/** The running instance's memory blocks (`ResolvedAgentInstance.memoryBlocks`). */
|
|
69
|
+
memoryBlocks: readonly ResolvedMemoryBlock[];
|
|
70
|
+
hosts: AgentSurfaceHosts;
|
|
71
|
+
/** Outbound `host.*` invocation (over the transport). Required when any host capability is advertised. */
|
|
72
|
+
invokeHost?: (name: string, request: unknown, options?: {
|
|
73
|
+
timeoutMs?: number;
|
|
74
|
+
signal?: AbortSignal;
|
|
75
|
+
}) => Promise<unknown>;
|
|
76
|
+
/** Serves `host.agent_run` inside the runner; used when the host does not advertise it. */
|
|
77
|
+
localAgentRun?: (request: HostAgentRunRequest) => Promise<HostAgentRunReply>;
|
|
78
|
+
/** Event sink (`subagent`, `memory_changed`). */
|
|
79
|
+
emit: (event: AgentEvent) => void;
|
|
80
|
+
/**
|
|
81
|
+
* Which instance each run belongs to, and which runs already emitted `finished`.
|
|
82
|
+
* The surface is re-registered on every session build; the ledger outlives it, so a
|
|
83
|
+
* rebuild between `agent.run` and `agent.result` still validates `io.output` and emits once.
|
|
84
|
+
* Create it once per host (serve process); omitted = private to this registration.
|
|
85
|
+
*/
|
|
86
|
+
runLedger?: AgentRunLedger;
|
|
87
|
+
log?: Logger;
|
|
88
|
+
}
|
|
89
|
+
/** The `agent.*` surface is served in-process only when the workspace has something to run besides itself. */
|
|
90
|
+
export declare function hasRunnableInstances(targets: readonly AgentRunTarget[]): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Register the agent surface the host's advertisement and the workspace call
|
|
93
|
+
* for. Returns the registered names and a disposer; call it again after the
|
|
94
|
+
* advertisement or the instance set changes (it drops its own previous entries
|
|
95
|
+
* only through the returned disposer).
|
|
96
|
+
*/
|
|
97
|
+
export declare function registerAgentSurface(deps: AgentSurfaceDeps): {
|
|
98
|
+
names: string[];
|
|
99
|
+
dispose: () => void;
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=agent-capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-capabilities.d.ts","sourceRoot":"","sources":["../../../runner/src/agent-capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAE7E,OAAO,EACL,KAAK,UAAU,EAGf,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAOxB,KAAK,MAAM,EAEZ,MAAM,0BAA0B,CAAC;AAElC,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,mBAAmB,CAAC;AAC1D,eAAO,MAAM,4BAA4B,sBAAsB,CAAC;AAChE,eAAO,MAAM,6BAA6B,uBAAuB,CAAC;AAElE,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,QAAiB,CAAC;AAExD,gCAAgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,4FAA4F;AAC5F,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAMtF;AAED,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,MAAM,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IAC3E,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;QAAE,MAAM,EAAE,cAAc,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACjF,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAID,wBAAgB,oBAAoB,IAAI,cAAc,CAiBrD;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,mFAAmF;IACnF,YAAY,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC7C,KAAK,EAAE,iBAAiB,CAAC;IACzB,0GAA0G;IAC1G,UAAU,CAAC,EAAE,CACX,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,KACnD,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,2FAA2F;IAC3F,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC7E,iDAAiD;IACjD,IAAI,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,8GAA8G;AAC9G,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,OAAO,CAEhF;AA4CD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,GAAG;IAC5D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAueA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../runner/src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../runner/src/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,2BAA2B,CAAC;AAiB1E;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,2BAA2B;IAC3B,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA6BD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgGxE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agents/in-process-host.ts
|
|
3
|
+
*
|
|
4
|
+
* The `host.agent_run` contract served inside the runner, for a session whose
|
|
5
|
+
* host advertises none (plain `skaile run`, `skaile repl`, an embedded
|
|
6
|
+
* runner). It is the run controller (`run-controller.ts`) over an in-memory
|
|
7
|
+
* store, with a launcher that runs each run as a nested driver session of the
|
|
8
|
+
* role instance (`createAgentSession` with that `instanceId`), bounded by the
|
|
9
|
+
* instance's `max_turns`; the session's final reply is the run's output.
|
|
10
|
+
*
|
|
11
|
+
* It answers the same {@link HostAgentRunRequest}s a real host does, so the
|
|
12
|
+
* `agent.*` capabilities have one code path, and the run lifecycle (status
|
|
13
|
+
* machine, idempotent start, approvals, cancel) is the controller's, not
|
|
14
|
+
* re-implemented here. What it does not have: durable runs (they end with the
|
|
15
|
+
* process), a token budget (`budget.max_tokens` is not enforceable here), and
|
|
16
|
+
* delegation below one level (the nested session registers no `agent.*`
|
|
17
|
+
* capabilities).
|
|
18
|
+
*/
|
|
19
|
+
import type { AgentEvent as ProtocolEvent, HostAgentRunReply, HostAgentRunRequest, Logger } from "@skaile/workspaces/types";
|
|
20
|
+
import type { AgentSession, AgentSessionConfig } from "../session-builder.js";
|
|
21
|
+
import type { AgentRunTarget } from "./instances.js";
|
|
22
|
+
export interface InProcessAgentRunHostDeps {
|
|
23
|
+
/** The instances a run can address, read per request (the set can change on a session rebuild). */
|
|
24
|
+
getTargets: () => readonly AgentRunTarget[];
|
|
25
|
+
/** Build the nested session of one run; the caller layers the parent's config under these overrides. */
|
|
26
|
+
createSession: (overrides: Partial<AgentSessionConfig>) => Promise<AgentSession>;
|
|
27
|
+
/** Id of the session the runs belong to; a run is only visible to it. */
|
|
28
|
+
sessionId: string;
|
|
29
|
+
/** `AgentRun.workspaceId`; default `local`. */
|
|
30
|
+
workspaceId?: string;
|
|
31
|
+
/** Receives the `subagent` events of the runs (started, finished). */
|
|
32
|
+
emit?: (event: ProtocolEvent) => void;
|
|
33
|
+
log?: Logger;
|
|
34
|
+
}
|
|
35
|
+
export type InProcessAgentRunHost = ((request: HostAgentRunRequest) => Promise<HostAgentRunReply>) & {
|
|
36
|
+
/** Cancel every live run and dispose its session (session teardown). */
|
|
37
|
+
dispose: () => Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
/** What a role is asked: its input, and the shape its reply must have. */
|
|
40
|
+
export declare function buildRolePrompt(target: AgentRunTarget, input: unknown): string;
|
|
41
|
+
/**
|
|
42
|
+
* The JSON value in a role's reply: the whole reply, else the contents of a
|
|
43
|
+
* fenced block, else the span from the first opening to the last closing
|
|
44
|
+
* bracket. `undefined` when there is none.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractJsonOutput(text: string): unknown;
|
|
47
|
+
/**
|
|
48
|
+
* The parent session's config as a nested role session starts from it: same
|
|
49
|
+
* project, providers, credentials and model; none of what ties a session to
|
|
50
|
+
* its host (resume, watchers, the capability registry and hooks, the capability
|
|
51
|
+
* prompt), so a role run registers no `agent.*` of its own.
|
|
52
|
+
*/
|
|
53
|
+
export declare function nestedRoleSessionConfig(parent: AgentSessionConfig): AgentSessionConfig;
|
|
54
|
+
/** Build the in-process `host.agent_run` implementation: a run controller over an in-memory store. */
|
|
55
|
+
export declare function createInProcessAgentRunHost(deps: InProcessAgentRunHostDeps): InProcessAgentRunHost;
|
|
56
|
+
//# sourceMappingURL=in-process-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in-process-host.d.ts","sourceRoot":"","sources":["../../../../runner/src/agents/in-process-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,UAAU,IAAI,aAAa,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACP,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAUrD,MAAM,WAAW,yBAAyB;IACxC,mGAAmG;IACnG,UAAU,EAAE,MAAM,SAAS,cAAc,EAAE,CAAC;IAC5C,wGAAwG;IACxG,aAAa,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACjF,yEAAyE;IACzE,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,CACnC,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC,iBAAiB,CAAC,CAAC,GAAG;IACjC,wEAAwE;IACxE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAWF,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAgB9E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAqBvD;AA0CD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAmBtF;AA2ED,sGAAsG;AACtG,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,yBAAyB,GAC9B,qBAAqB,CA+DvB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agents/instances.ts
|
|
3
|
+
*
|
|
4
|
+
* The agent instances a session can see and run: the entries of `skaile.yaml`
|
|
5
|
+
* `agents:` (plus the primary `agent:` as `default`) and the `binding: run`
|
|
6
|
+
* sub-agents the running instance composes. Each one is resolved without a
|
|
7
|
+
* model and without a run snapshot (`dryRun`), so a target that does not
|
|
8
|
+
* resolve is reported as `unavailable` instead of failing the listing.
|
|
9
|
+
*
|
|
10
|
+
* Feeds `session_init_ack.instances`, `agent.list` and `agent.run`.
|
|
11
|
+
*/
|
|
12
|
+
import { type AgentInstanceConfig, type SkWorkspaceConfig } from "@skaile/workspaces/core";
|
|
13
|
+
import type { IAssetKindRegistry } from "@skaile/workspaces/plugins";
|
|
14
|
+
import type { AgentInstanceSummary, Logger } from "@skaile/workspaces/types";
|
|
15
|
+
import type { AgentIo } from "@skaile/workspaces/types/manifests";
|
|
16
|
+
import { type ResolvedAgentInstance, type ResolvedMemoryBlock } from "../composition/resolve-instance.js";
|
|
17
|
+
/** One instance (or composed `run` sub-agent) an `agent.run` call can address. */
|
|
18
|
+
export interface AgentRunTarget {
|
|
19
|
+
/** Instance id, or the alias (`composes[].as`) of a composed `run` sub-agent. */
|
|
20
|
+
id: string;
|
|
21
|
+
/** `workspace` = an `agents:` entry; `composed` = a `binding: run` item of the running instance. */
|
|
22
|
+
source: "workspace" | "composed";
|
|
23
|
+
/** `agents.<id>.ref`, or the composed item's `ref`, as written. */
|
|
24
|
+
ref: string;
|
|
25
|
+
lifecycle: "standing" | "role";
|
|
26
|
+
description?: string;
|
|
27
|
+
/** Resolved agent directory; empty when the target is unavailable. */
|
|
28
|
+
agentDir: string;
|
|
29
|
+
instance: AgentInstanceConfig;
|
|
30
|
+
io?: AgentIo;
|
|
31
|
+
/** Memory blocks of the instance (seeded content, no host content); empty when unavailable. */
|
|
32
|
+
memoryBlocks: ResolvedMemoryBlock[];
|
|
33
|
+
revisionHash?: string;
|
|
34
|
+
/** `agents.<id>.permissions.permission_mode`; `agent.run` asks for approval on `interactive`. */
|
|
35
|
+
permissionMode?: "auto" | "interactive";
|
|
36
|
+
/** Turn bound of a run: instance budget, then `permissions.max_turns`, then the asset's `runtime.max_turns`. */
|
|
37
|
+
maxTurns?: number;
|
|
38
|
+
maxTokens?: number;
|
|
39
|
+
status: "ready" | "unavailable";
|
|
40
|
+
error?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface LoadAgentRunTargetsOpts {
|
|
43
|
+
projectDir: string;
|
|
44
|
+
wsConfig: Pick<SkWorkspaceConfig, "agent">;
|
|
45
|
+
/** Kind registry for the content source; defaults to the built-in providers. */
|
|
46
|
+
registry?: IAssetKindRegistry;
|
|
47
|
+
/** Whether the driver has native sub-agents (decides the default binding of `kind: agent` items). */
|
|
48
|
+
nativeSubagents?: boolean;
|
|
49
|
+
/** Capability names the host provides (checked against `capabilities[]`, which only warns in a dry run). */
|
|
50
|
+
hostCapabilities?: readonly string[];
|
|
51
|
+
/** The instance this session runs: its `binding: run` sub-agents are targets too. */
|
|
52
|
+
current?: {
|
|
53
|
+
resolved: ResolvedAgentInstance;
|
|
54
|
+
agentDir: string;
|
|
55
|
+
} | null;
|
|
56
|
+
log?: Logger;
|
|
57
|
+
}
|
|
58
|
+
/** Every `agents:` instance of the workspace, then the composed `run` sub-agents of the running instance. */
|
|
59
|
+
export declare function loadAgentRunTargets(opts: LoadAgentRunTargetsOpts): Promise<AgentRunTarget[]>;
|
|
60
|
+
/** The picker view of the workspace's own instances (what `session_init_ack.instances` carries). */
|
|
61
|
+
export declare function summarizeInstances(targets: readonly AgentRunTarget[]): AgentInstanceSummary[];
|
|
62
|
+
//# sourceMappingURL=instances.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instances.d.ts","sourceRoot":"","sources":["../../../../runner/src/agents/instances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACL,KAAK,mBAAmB,EAIxB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EAEzB,MAAM,oCAAoC,CAAC;AAG5C,kFAAkF;AAClF,MAAM,WAAW,cAAc;IAC7B,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IACX,oGAAoG;IACpG,MAAM,EAAE,WAAW,GAAG,UAAU,CAAC;IACjC,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,UAAU,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,+FAA+F;IAC/F,YAAY,EAAE,mBAAmB,EAAE,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iGAAiG;IACjG,cAAc,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IACxC,gHAAgH;IAChH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,GAAG,aAAa,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAC3C,gFAAgF;IAChF,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,qGAAqG;IACrG,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4GAA4G;IAC5G,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,qFAAqF;IACrF,OAAO,CAAC,EAAE;QAAE,QAAQ,EAAE,qBAAqB,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACvE,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAsED,6GAA6G;AAC7G,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,cAAc,EAAE,CAAC,CAwC3B;AAED,oGAAoG;AACpG,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,oBAAoB,EAAE,CAe7F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agents/json-schema.ts
|
|
3
|
+
*
|
|
4
|
+
* JSON Schema validation for a role's `io.input` / `io.output`. A role's schema
|
|
5
|
+
* is data an asset author wrote, so a schema that does not compile is reported
|
|
6
|
+
* like a value that does not match: an issue list, never a throw.
|
|
7
|
+
*/
|
|
8
|
+
export type SchemaCheck = {
|
|
9
|
+
ok: true;
|
|
10
|
+
} | {
|
|
11
|
+
ok: false;
|
|
12
|
+
issues: string[];
|
|
13
|
+
};
|
|
14
|
+
/** Validate `value` against a JSON Schema object. */
|
|
15
|
+
export declare function checkAgainstSchema(schema: Record<string, unknown>, value: unknown): SchemaCheck;
|
|
16
|
+
//# sourceMappingURL=json-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../../../runner/src/agents/json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,WAAW,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AA0BzE,qDAAqD;AACrD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,CAK/F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agents/memory-run-store.ts
|
|
3
|
+
*
|
|
4
|
+
* The in-process {@link RunStore}: runs, run events and approvals in maps. The
|
|
5
|
+
* store `skaile run` uses (its runs end with the process) and the one tests
|
|
6
|
+
* hand to the run controller. A host with durable storage implements
|
|
7
|
+
* `RunStore` over its database instead.
|
|
8
|
+
*
|
|
9
|
+
* Every method is synchronous inside, so the compare-and-set `transition*`
|
|
10
|
+
* methods are atomic by construction.
|
|
11
|
+
*/
|
|
12
|
+
import type { RunStore } from "@skaile/workspaces/types";
|
|
13
|
+
/** Finished run trees an in-memory store keeps (results stay readable); older ones are evicted. */
|
|
14
|
+
export declare const DEFAULT_MAX_FINISHED_TREES = 200;
|
|
15
|
+
/** Build an empty in-memory {@link RunStore}. Rows are copied on the way in and out, so callers never alias stored state. */
|
|
16
|
+
export declare function createInMemoryRunStore(options?: {
|
|
17
|
+
maxFinishedTrees?: number;
|
|
18
|
+
}): RunStore;
|
|
19
|
+
//# sourceMappingURL=memory-run-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-run-store.d.ts","sourceRoot":"","sources":["../../../../runner/src/agents/memory-run-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAUV,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAElC,mGAAmG;AACnG,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAE9C,6HAA6H;AAC7H,wBAAgB,sBAAsB,CAAC,OAAO,GAAE;IAAE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,QAAQ,CA8I5F"}
|
|
@@ -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
|