@skaile/workspaces 5.5.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 +84 -0
- package/dist/app-sdk/index.js +1 -1
- package/dist/{asset-feeds-KTFUB7EX.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 +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-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-5Y3L7XWH.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-MMC24L2W.js → chunk-4CTGEEN6.js} +274 -121
- package/dist/chunk-4CTGEEN6.js.map +1 -0
- 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-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-K2K7OF4P.js → chunk-DMLDYFDS.js} +23 -6
- package/dist/chunk-DMLDYFDS.js.map +1 -0
- package/dist/{chunk-EJYZ3MKJ.js → chunk-DZM73WDN.js} +4 -4
- package/dist/{chunk-EJYZ3MKJ.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-75EX5GY4.js → chunk-IPWR33AW.js} +181 -111
- package/dist/chunk-IPWR33AW.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-N3Y43LMZ.js → chunk-MX6LZE2C.js} +34 -11
- 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-3665M43C.js → chunk-NLXIALVO.js} +5 -5
- package/dist/{chunk-3665M43C.js.map → chunk-NLXIALVO.js.map} +1 -1
- package/dist/{chunk-UFS3FEBA.js → chunk-O5GDKC5I.js} +3 -3
- package/dist/{chunk-UFS3FEBA.js.map → chunk-O5GDKC5I.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-G2O2AARG.js → chunk-RGXVQZOV.js} +6021 -3099
- package/dist/chunk-RGXVQZOV.js.map +1 -0
- package/dist/{chunk-R4G7XI7A.js → chunk-S7QXEXKY.js} +4 -5
- 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-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-P6KFWTGP.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-JBPG5KQC.js → chunk-VX3INFBA.js} +4 -4
- package/dist/{chunk-JBPG5KQC.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 +4997 -3410
- 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-VCPKNPK2.js} +21 -21
- package/dist/{ensure-sources-QFRA46DJ.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-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-IW36CEJX.js} +21 -21
- package/dist/{helpers-PSROT7CU.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/sync/manifest-writeback.d.ts.map +1 -1
- package/dist/{library-publish-YAI7WOXC.js → library-publish-R3DQLMTD.js} +27 -27
- package/dist/{library-publish-YAI7WOXC.js.map → library-publish-R3DQLMTD.js.map} +1 -1
- package/dist/open-library-FAJZRDKE.js +40 -0
- package/dist/{open-library-Z5NJU4Z5.js.map → open-library-FAJZRDKE.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-ALJIVFHI.js +41 -0
- package/dist/{project-SVS4UMGL.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-IOEZGJNC.js → setup-35JXIA3N.js} +28 -28
- package/dist/{setup-IOEZGJNC.js.map → setup-35JXIA3N.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-ISR4KRZV.js +41 -0
- package/dist/{source-OKRJT53H.js.map → source-ISR4KRZV.js.map} +1 -1
- package/dist/{source-manifest-publish-MILEQDRD.js → source-manifest-publish-P22IPK5F.js} +27 -27
- package/dist/{source-manifest-publish-MILEQDRD.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-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
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent instance and run vocabulary shared by the protocol events and the
|
|
3
|
+
* `agent.*` capabilities.
|
|
4
|
+
*
|
|
5
|
+
* An *instance* is an agent asset bound into a workspace under an id
|
|
6
|
+
* (`skaile.yaml` `agents:`); a *run* is one execution of an instance started
|
|
7
|
+
* through `agent.run`. The run controller that owns the full run record builds
|
|
8
|
+
* on these types.
|
|
9
|
+
*
|
|
10
|
+
* @category Lifecycle
|
|
11
|
+
* @since 4.16.0
|
|
12
|
+
*/
|
|
13
|
+
/** Lifecycle of an agent instance: a long-running identity or a short-lived callable role. */
|
|
14
|
+
export type AgentInstanceLifecycleKind = "standing" | "role";
|
|
15
|
+
/** Where an instance's memory blocks live. */
|
|
16
|
+
export type AgentMemoryScopeKind = "instance" | "user" | "workspace" | "session";
|
|
17
|
+
/**
|
|
18
|
+
* Status of an `agent.run` run.
|
|
19
|
+
*
|
|
20
|
+
* `queued → running → (waiting_approval | waiting_children)* → succeeded | failed | cancelled`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const AGENT_RUN_STATUSES: readonly ["queued", "running", "waiting_approval", "waiting_children", "succeeded", "failed", "cancelled"];
|
|
23
|
+
export type AgentRunStatus = (typeof AGENT_RUN_STATUSES)[number];
|
|
24
|
+
/** A status no run leaves again. */
|
|
25
|
+
export declare const TERMINAL_AGENT_RUN_STATUSES: readonly AgentRunStatus[];
|
|
26
|
+
/**
|
|
27
|
+
* One agent instance of the workspace, as a client renders it in a picker.
|
|
28
|
+
* Carried on `session_init_ack.instances` and returned by `agent.list`.
|
|
29
|
+
*
|
|
30
|
+
* @category Lifecycle
|
|
31
|
+
* @since 4.16.0
|
|
32
|
+
*/
|
|
33
|
+
export type AgentInstanceSummary = {
|
|
34
|
+
/** Instance id (`default` for the primary `agent:`). */
|
|
35
|
+
id: string;
|
|
36
|
+
/** `agents.<id>.ref` as written. */
|
|
37
|
+
ref: string;
|
|
38
|
+
lifecycle: AgentInstanceLifecycleKind;
|
|
39
|
+
description?: string;
|
|
40
|
+
/** SHA-256 of the resolved instance; absent when the instance failed to resolve. */
|
|
41
|
+
revisionHash?: string;
|
|
42
|
+
/** Roles only: which JSON-Schema roots the agent declares. */
|
|
43
|
+
io?: {
|
|
44
|
+
input: boolean;
|
|
45
|
+
output: boolean;
|
|
46
|
+
};
|
|
47
|
+
/** `ready` = can be started; `unavailable` = the asset did not resolve (`error` says why). */
|
|
48
|
+
status: "ready" | "unavailable";
|
|
49
|
+
error?: string;
|
|
50
|
+
};
|
|
51
|
+
/** Why a call or a run did not succeed. */
|
|
52
|
+
export type AgentRunFailure = {
|
|
53
|
+
code: string;
|
|
54
|
+
message: string;
|
|
55
|
+
/** Validation problems (JSON-Schema paths) when `code` is `input_invalid` or `output_invalid`. */
|
|
56
|
+
issues?: string[];
|
|
57
|
+
};
|
|
58
|
+
/** The state of one run as `agent.run` / `agent.status` / `agent.result` report it. */
|
|
59
|
+
export type AgentRunReport = {
|
|
60
|
+
runId: string;
|
|
61
|
+
status: AgentRunStatus;
|
|
62
|
+
/** The role's output once `succeeded` (validated against `io.output`). */
|
|
63
|
+
output?: unknown;
|
|
64
|
+
error?: AgentRunFailure;
|
|
65
|
+
/** Set while `status` is `waiting_approval`: decide it with `approval.decide`. */
|
|
66
|
+
approvalId?: string;
|
|
67
|
+
/** Set with `approvalId`: the one operation the approval releases. */
|
|
68
|
+
operationId?: string;
|
|
69
|
+
};
|
|
70
|
+
/** A host's answer when a request fails as a domain error (unknown run, not allowed, store error). */
|
|
71
|
+
export type HostFailure = {
|
|
72
|
+
ok: false;
|
|
73
|
+
code: string;
|
|
74
|
+
message: string;
|
|
75
|
+
issues?: string[];
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Requests the runner sends to `host.agent_run`. The host spawns, tracks,
|
|
79
|
+
* cancels and approves runs; the runner has already checked that the
|
|
80
|
+
* instance exists and that `input` matches the role's `io.input`. The host
|
|
81
|
+
* MUST validate again, enforce `approval: "required"` (one approval per
|
|
82
|
+
* operation, replayable once), apply `budget`, and answer every `start` for
|
|
83
|
+
* the same `callId` with the same `runId`.
|
|
84
|
+
*/
|
|
85
|
+
export type HostAgentRunRequest = {
|
|
86
|
+
op: "start";
|
|
87
|
+
instanceId: string;
|
|
88
|
+
/** Revision of the resolved instance the runner saw; the host runs that revision or fails. */
|
|
89
|
+
revisionHash?: string;
|
|
90
|
+
input?: unknown;
|
|
91
|
+
/** `sync` answers when the run ends; `async` answers as soon as it is queued. */
|
|
92
|
+
mode: "sync" | "async";
|
|
93
|
+
budget?: {
|
|
94
|
+
max_turns?: number;
|
|
95
|
+
max_tokens?: number;
|
|
96
|
+
};
|
|
97
|
+
/** Capability-dispatch call id; the idempotency key of the start. */
|
|
98
|
+
callId: string;
|
|
99
|
+
callerSessionId: string;
|
|
100
|
+
callerInstanceId: string;
|
|
101
|
+
approval: "required" | "none";
|
|
102
|
+
} | {
|
|
103
|
+
op: "status" | "cancel";
|
|
104
|
+
runId: string;
|
|
105
|
+
callerSessionId: string;
|
|
106
|
+
} | {
|
|
107
|
+
op: "result";
|
|
108
|
+
runId: string;
|
|
109
|
+
wait: boolean;
|
|
110
|
+
callerSessionId: string;
|
|
111
|
+
} | {
|
|
112
|
+
op: "decide_approval";
|
|
113
|
+
approvalId: string;
|
|
114
|
+
decision: "approve" | "deny";
|
|
115
|
+
callerSessionId: string;
|
|
116
|
+
};
|
|
117
|
+
export type HostAgentRunReply = AgentRunReport | HostFailure;
|
|
118
|
+
/** A memory block as the runner declares it to the host store. */
|
|
119
|
+
export type HostMemoryBlockRef = {
|
|
120
|
+
name: string;
|
|
121
|
+
scope: AgentMemoryScopeKind;
|
|
122
|
+
maxChars: number;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Requests the runner sends to `host.memory_store`. The host owns storage,
|
|
126
|
+
* enforces `maxChars` and scope, and applies its own pending → confirmed policy.
|
|
127
|
+
*/
|
|
128
|
+
export type HostMemoryStoreRequest = {
|
|
129
|
+
op: "read";
|
|
130
|
+
instanceId: string;
|
|
131
|
+
block: HostMemoryBlockRef;
|
|
132
|
+
} | {
|
|
133
|
+
op: "write" | "append";
|
|
134
|
+
instanceId: string;
|
|
135
|
+
block: HostMemoryBlockRef;
|
|
136
|
+
content: string;
|
|
137
|
+
} | {
|
|
138
|
+
op: "list";
|
|
139
|
+
instanceId: string;
|
|
140
|
+
blocks: HostMemoryBlockRef[];
|
|
141
|
+
}
|
|
142
|
+
/** Current content of every block, read once when a session is built. */
|
|
143
|
+
| {
|
|
144
|
+
op: "snapshot";
|
|
145
|
+
instanceId: string;
|
|
146
|
+
blocks: HostMemoryBlockRef[];
|
|
147
|
+
};
|
|
148
|
+
export type HostMemoryStoreReply = {
|
|
149
|
+
ok: true;
|
|
150
|
+
/** `read`: the block's content. */
|
|
151
|
+
content?: string;
|
|
152
|
+
/** `write` / `append`: the block's size after the change. */
|
|
153
|
+
chars?: number;
|
|
154
|
+
/** `write` / `append`: `pending` when the host holds the change for review. */
|
|
155
|
+
status?: "confirmed" | "pending";
|
|
156
|
+
/** `list`: sizes of the blocks the host holds. */
|
|
157
|
+
blocks?: Array<{
|
|
158
|
+
name: string;
|
|
159
|
+
chars: number;
|
|
160
|
+
}>;
|
|
161
|
+
/** `snapshot`: block name → content. */
|
|
162
|
+
snapshot?: Record<string, string>;
|
|
163
|
+
} | HostFailure;
|
|
164
|
+
/** A trigger as the host schedules it. */
|
|
165
|
+
export type HostTrigger = {
|
|
166
|
+
id: string;
|
|
167
|
+
kind: "schedule" | "webhook" | "channel" | "event";
|
|
168
|
+
cron?: string;
|
|
169
|
+
prompt?: string;
|
|
170
|
+
timezone?: string;
|
|
171
|
+
/** `channel` triggers. */
|
|
172
|
+
when?: string;
|
|
173
|
+
/** `event` triggers. */
|
|
174
|
+
event?: string;
|
|
175
|
+
enabled: boolean;
|
|
176
|
+
/** `asset` = the agent asset's default, `workspace` = the instance's `skaile.yaml` entry, `runtime` = added through `trigger.upsert`. */
|
|
177
|
+
source: "asset" | "workspace" | "runtime";
|
|
178
|
+
nextRunAt?: string;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Requests the runner sends to `host.trigger_store`. `upsert` and `toggle`
|
|
182
|
+
* carry `approval: "required"`: the host MUST gate them behind a user approval.
|
|
183
|
+
*/
|
|
184
|
+
export type HostTriggerStoreRequest = {
|
|
185
|
+
op: "list";
|
|
186
|
+
instanceId: string;
|
|
187
|
+
} | {
|
|
188
|
+
op: "upsert";
|
|
189
|
+
instanceId: string;
|
|
190
|
+
trigger: Omit<HostTrigger, "source" | "nextRunAt" | "enabled"> & {
|
|
191
|
+
enabled?: boolean;
|
|
192
|
+
};
|
|
193
|
+
approval: "required";
|
|
194
|
+
} | {
|
|
195
|
+
op: "toggle";
|
|
196
|
+
instanceId: string;
|
|
197
|
+
triggerId: string;
|
|
198
|
+
enabled: boolean;
|
|
199
|
+
approval: "required";
|
|
200
|
+
};
|
|
201
|
+
export type HostTriggerStoreReply = {
|
|
202
|
+
ok: true;
|
|
203
|
+
triggers?: HostTrigger[];
|
|
204
|
+
trigger?: HostTrigger;
|
|
205
|
+
} | HostFailure;
|
|
206
|
+
/** Why a run left `running` for a `queued` that is not its first start. */
|
|
207
|
+
export type AgentRunResumeReason = "approval" | "children";
|
|
208
|
+
/**
|
|
209
|
+
* One execution of an agent instance, as the run controller records it.
|
|
210
|
+
*
|
|
211
|
+
* `attempt` is 1 for every run in this release; a retrying worker raises it.
|
|
212
|
+
* `sessionId` is the id of the run's own native session and is assigned when
|
|
213
|
+
* the run is created, so a session can be mapped back to its run before it exists.
|
|
214
|
+
*
|
|
215
|
+
* @category Lifecycle
|
|
216
|
+
* @since 4.16.0
|
|
217
|
+
*/
|
|
218
|
+
export type AgentRun = {
|
|
219
|
+
id: string;
|
|
220
|
+
workspaceId: string;
|
|
221
|
+
instanceId: string;
|
|
222
|
+
/** Revision of the resolved instance the run executes; `null` when the host resolves none. */
|
|
223
|
+
revisionHash: string | null;
|
|
224
|
+
/** The actor (user or service) the run is accountable to; set by the host, never by the model. */
|
|
225
|
+
requestedBy: string;
|
|
226
|
+
/** The run at the top of the delegation tree; its own id for a run started outside any run. */
|
|
227
|
+
rootRunId: string;
|
|
228
|
+
/** The run whose session started this one; `null` for a root run. */
|
|
229
|
+
parentRunId: string | null;
|
|
230
|
+
/** Session that dispatched the start; with `callId` the idempotency key of the start. */
|
|
231
|
+
callerSessionId: string | null;
|
|
232
|
+
callId: string | null;
|
|
233
|
+
sessionId: string;
|
|
234
|
+
/** Driver the run executed on; `null` until it is first launched. */
|
|
235
|
+
harness: string | null;
|
|
236
|
+
status: AgentRunStatus;
|
|
237
|
+
attempt: number;
|
|
238
|
+
/** What the next launch of a resumed run delivers; `null` for a run that was not suspended. */
|
|
239
|
+
resumeReason: AgentRunResumeReason | null;
|
|
240
|
+
budget?: {
|
|
241
|
+
max_turns?: number;
|
|
242
|
+
max_tokens?: number;
|
|
243
|
+
};
|
|
244
|
+
input: unknown;
|
|
245
|
+
output?: unknown;
|
|
246
|
+
error?: AgentRunFailure;
|
|
247
|
+
createdAt: string;
|
|
248
|
+
/** When the run first reached `running`; `null` while it has never started. */
|
|
249
|
+
startedAt: string | null;
|
|
250
|
+
updatedAt: string;
|
|
251
|
+
};
|
|
252
|
+
/** The fields of a run a transition may change. */
|
|
253
|
+
export type AgentRunPatch = Partial<Pick<AgentRun, "status" | "harness" | "resumeReason" | "startedAt" | "output" | "error">> & {
|
|
254
|
+
updatedAt: string;
|
|
255
|
+
};
|
|
256
|
+
/** `start` holds the run itself behind an approval; `operation` holds one capability call a running run made. */
|
|
257
|
+
export type AgentApprovalKind = "start" | "operation";
|
|
258
|
+
/** `pending → approved | denied`, or `pending → expired` when the run ends first. Never leaves a decided state. */
|
|
259
|
+
export type AgentApprovalState = "pending" | "approved" | "denied" | "expired";
|
|
260
|
+
/**
|
|
261
|
+
* A persisted approval: the one operation a decision releases.
|
|
262
|
+
*
|
|
263
|
+
* `args` are what executes on approval; `argsHash` (SHA-256 of their canonical
|
|
264
|
+
* JSON) is what a replay is checked against. `result` / `error` are set once the
|
|
265
|
+
* operation ran; `deliveredAt` once the session has been told.
|
|
266
|
+
*
|
|
267
|
+
* @category Lifecycle
|
|
268
|
+
* @since 4.16.0
|
|
269
|
+
*/
|
|
270
|
+
export type AgentApproval = {
|
|
271
|
+
id: string;
|
|
272
|
+
runId: string;
|
|
273
|
+
operationId: string;
|
|
274
|
+
kind: AgentApprovalKind;
|
|
275
|
+
/** Capability name of the held call (`agent.run` for a `start` approval). */
|
|
276
|
+
capability: string;
|
|
277
|
+
/** Capability-dispatch call id of the held call, when the session supplied one. */
|
|
278
|
+
callId: string | null;
|
|
279
|
+
args: unknown;
|
|
280
|
+
argsHash: string;
|
|
281
|
+
state: AgentApprovalState;
|
|
282
|
+
decidedBy: string | null;
|
|
283
|
+
decidedAt: string | null;
|
|
284
|
+
result?: unknown;
|
|
285
|
+
error?: AgentRunFailure;
|
|
286
|
+
executedAt: string | null;
|
|
287
|
+
deliveredAt: string | null;
|
|
288
|
+
createdAt: string;
|
|
289
|
+
};
|
|
290
|
+
/** The fields of an approval a decision or its follow-up may change. */
|
|
291
|
+
export type AgentApprovalPatch = Partial<Pick<AgentApproval, "state" | "decidedBy" | "decidedAt" | "result" | "error" | "executedAt" | "deliveredAt">>;
|
|
292
|
+
/**
|
|
293
|
+
* One row of a run's append-only event log (`agent_run_events`). A host
|
|
294
|
+
* persists these, broadcasts them after they are persisted, and replays
|
|
295
|
+
* those after a sequence cursor to a client that reconnects.
|
|
296
|
+
*
|
|
297
|
+
* @category Lifecycle
|
|
298
|
+
* @since 4.16.0
|
|
299
|
+
*/
|
|
300
|
+
export type AgentRunEvent = {
|
|
301
|
+
type: "run_state";
|
|
302
|
+
status: AgentRunStatus;
|
|
303
|
+
/** `null` for the run's creation. */
|
|
304
|
+
previous: AgentRunStatus | null;
|
|
305
|
+
instanceId: string;
|
|
306
|
+
rootRunId: string;
|
|
307
|
+
parentRunId: string | null;
|
|
308
|
+
attempt: number;
|
|
309
|
+
/** Set with `waiting_approval`: the approval the run waits on. */
|
|
310
|
+
approvalId?: string;
|
|
311
|
+
operationId?: string;
|
|
312
|
+
error?: AgentRunFailure;
|
|
313
|
+
} | {
|
|
314
|
+
type: "approval";
|
|
315
|
+
approvalId: string;
|
|
316
|
+
operationId: string;
|
|
317
|
+
kind: AgentApprovalKind;
|
|
318
|
+
capability: string;
|
|
319
|
+
state: AgentApprovalState;
|
|
320
|
+
decidedBy?: string;
|
|
321
|
+
} | {
|
|
322
|
+
type: "operation_result";
|
|
323
|
+
approvalId: string;
|
|
324
|
+
operationId: string;
|
|
325
|
+
outcome: "completed" | "failed";
|
|
326
|
+
};
|
|
327
|
+
/** An {@link AgentRunEvent} with the position the store gave it. `seq` counts from 1 within one run. */
|
|
328
|
+
export type AgentRunEventRecord = {
|
|
329
|
+
runId: string;
|
|
330
|
+
seq: number;
|
|
331
|
+
at: string;
|
|
332
|
+
event: AgentRunEvent;
|
|
333
|
+
};
|
|
334
|
+
/** Which runs {@link RunStore.listRuns} returns; every given field must match. */
|
|
335
|
+
export type AgentRunFilter = {
|
|
336
|
+
rootRunId?: string;
|
|
337
|
+
parentRunId?: string;
|
|
338
|
+
instanceId?: string;
|
|
339
|
+
statuses?: readonly AgentRunStatus[];
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Where the run controller keeps runs, their event log and approvals. A host
|
|
343
|
+
* with durable storage implements it over its database; {@link
|
|
344
|
+
* createInMemoryRunStore} (`@skaile/workspaces/runner`) is the in-process one
|
|
345
|
+
* for tests and the CLI.
|
|
346
|
+
*
|
|
347
|
+
* The two `transition*` methods are compare-and-set: they apply the patch only
|
|
348
|
+
* if the row is still in an expected state and answer `undefined` otherwise.
|
|
349
|
+
* That is what makes a decision, a cancel and a resume race-safe: of two
|
|
350
|
+
* concurrent attempts exactly one wins.
|
|
351
|
+
*
|
|
352
|
+
* @category Lifecycle
|
|
353
|
+
* @since 4.16.0
|
|
354
|
+
*/
|
|
355
|
+
export interface RunStore {
|
|
356
|
+
/** Insert a run; when its `(callerSessionId, callId)` pair already exists, answer that run with `created: false`. */
|
|
357
|
+
insertRun(run: AgentRun): Promise<{
|
|
358
|
+
run: AgentRun;
|
|
359
|
+
created: boolean;
|
|
360
|
+
}>;
|
|
361
|
+
getRun(id: string): Promise<AgentRun | undefined>;
|
|
362
|
+
/** Apply `patch` if the run's status is one of `from`; answer the updated run, or `undefined` when it was not. */
|
|
363
|
+
transitionRun(id: string, from: readonly AgentRunStatus[], patch: AgentRunPatch): Promise<AgentRun | undefined>;
|
|
364
|
+
findRunByDispatch(callerSessionId: string, callId: string): Promise<AgentRun | undefined>;
|
|
365
|
+
findRunBySession(sessionId: string): Promise<AgentRun | undefined>;
|
|
366
|
+
listRuns(filter: AgentRunFilter): Promise<AgentRun[]>;
|
|
367
|
+
/** Append to a run's log; the store assigns `seq`. */
|
|
368
|
+
appendEvent(runId: string, event: AgentRunEvent, at: string): Promise<AgentRunEventRecord>;
|
|
369
|
+
listEvents(runId: string, afterSeq?: number): Promise<AgentRunEventRecord[]>;
|
|
370
|
+
insertApproval(approval: AgentApproval): Promise<void>;
|
|
371
|
+
getApproval(id: string): Promise<AgentApproval | undefined>;
|
|
372
|
+
/** The approval a run's held call `callId` produced, if any. */
|
|
373
|
+
findApprovalByCall(runId: string, callId: string): Promise<AgentApproval | undefined>;
|
|
374
|
+
listApprovals(runId: string): Promise<AgentApproval[]>;
|
|
375
|
+
/** Apply `patch` if the approval's state is `from`; answer the updated approval, or `undefined` when it was not. */
|
|
376
|
+
transitionApproval(id: string, from: AgentApprovalState, patch: AgentApprovalPatch): Promise<AgentApproval | undefined>;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* What a suspended run's session is told when it resumes. It reaches the
|
|
380
|
+
* model as a host message through the ordinary prompt path.
|
|
381
|
+
*
|
|
382
|
+
* @category Lifecycle
|
|
383
|
+
* @since 4.16.0
|
|
384
|
+
*/
|
|
385
|
+
export type RunHostMessage = {
|
|
386
|
+
type: "approval_result";
|
|
387
|
+
operationId: string;
|
|
388
|
+
/** `completed`: the operation ran (`result`); `failed`: it threw (`error`); `denied`: it never ran. */
|
|
389
|
+
status: "completed" | "failed" | "denied";
|
|
390
|
+
result?: unknown;
|
|
391
|
+
error?: AgentRunFailure;
|
|
392
|
+
} | {
|
|
393
|
+
type: "children_finished";
|
|
394
|
+
children: Array<{
|
|
395
|
+
runId: string;
|
|
396
|
+
instanceId: string;
|
|
397
|
+
status: AgentRunStatus;
|
|
398
|
+
output?: unknown;
|
|
399
|
+
error?: AgentRunFailure;
|
|
400
|
+
}>;
|
|
401
|
+
};
|
|
402
|
+
//# sourceMappingURL=agent-lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-lifecycle.d.ts","sourceRoot":"","sources":["../../../types/src/agent-lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,8FAA8F;AAC9F,MAAM,MAAM,0BAA0B,GAAG,UAAU,GAAG,MAAM,CAAC;AAE7D,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,4GAQrB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,oCAAoC;AACpC,eAAO,MAAM,2BAA2B,EAAE,SAAS,cAAc,EAIhE,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,wDAAwD;IACxD,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,0BAA0B,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,YAAY,CAA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,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC7E,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IAC5D,gEAAgE;IAChE,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IACtF,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;IACvD,oHAAoH;IACpH,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;CACvC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,iBAAiB,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,uGAAuG;IACvG,MAAM,EAAE,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,GACD;IACE,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,cAAc,CAAC;QACvB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,eAAe,CAAC;KACzB,CAAC,CAAC;CACJ,CAAC"}
|
|
@@ -52,7 +52,6 @@ export type CapabilityAudience = "llm" | "user" | "runtime";
|
|
|
52
52
|
* - `skill`: from a skill's MCP surface
|
|
53
53
|
* - `mcp`: from a generic MCP server
|
|
54
54
|
* - `connector`: from a connector (e.g. `postgres.query`)
|
|
55
|
-
* - `mount`: surfaced by a filesystem mount
|
|
56
55
|
* - `app`: from an embedded, agent-controllable app (carries the originating
|
|
57
56
|
* `appId`). Handlers run in the app itself — see {@link Capability.side} `'app'`.
|
|
58
57
|
*
|
|
@@ -78,9 +77,6 @@ export type CapabilityOrigin = {
|
|
|
78
77
|
} | {
|
|
79
78
|
kind: "connector";
|
|
80
79
|
connectorId: string;
|
|
81
|
-
} | {
|
|
82
|
-
kind: "mount";
|
|
83
|
-
mountId: string;
|
|
84
80
|
} | {
|
|
85
81
|
kind: "app";
|
|
86
82
|
appId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../types/src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../types/src/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,gBAAgB,GACxB;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,KAAK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MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,KAAK,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,gBAAgB,CAAC;IACvB,6CAA6C;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,KAAK,EAAE,OAAO,CAAC;IACf,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../../types/src/delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,gBAAgB,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../../types/src/delivery.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAmGvE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAI3D"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* wrapped in a {@link Message} envelope by the host's persistence layer.
|
|
7
7
|
*/
|
|
8
8
|
import type { CapabilityDeregisterEvent, CapabilityInvokedEvent, CapabilityRegisterEvent, RenderInvokedEvent } from "./capabilities.js";
|
|
9
|
+
import type { AgentMemoryScopeKind, AgentRunStatus } from "./agent-lifecycle.js";
|
|
9
10
|
import type { IncompatibleProtocolEvent, ProtocolInfoEvent, SessionInitAckEvent, SessionInitMismatchEvent } from "./lifecycle.js";
|
|
10
11
|
import type { ContextUsageSnapshot } from "./context-usage.js";
|
|
11
12
|
import type { LogEntry } from "./logging.js";
|
|
@@ -18,7 +19,7 @@ import type { LogEntry } from "./logging.js";
|
|
|
18
19
|
*
|
|
19
20
|
* @docLink packages/types/events#agent-event
|
|
20
21
|
*/
|
|
21
|
-
export type AgentEvent = TextEvent | TextRetractEvent | ToolCallEvent | ToolResultEvent | QuestionEvent | QuestionReplyEvent | ErrorEvent | StatusEvent | DevServerEvent | FileChangeEvent | SubagentEvent | FinishedEvent | A2AMessageEvent | StateChangedEvent | HandoffEvent | ConnectorResponseEvent | ConnectorQueryResponseEvent | ConnectorMutateResponseEvent | PromptAckEvent | QueuedPromptsDroppedEvent | ConnectorsAvailableEvent | LifecycleCompleteEvent | TypingEvent | UserMessageEvent | SyncStatusEvent | SecretsReadyEvent | ConfiguredEvent | MountMountedEvent | MountUnmountedEvent | MountChangedEvent | MountSyncStatusEvent | DebugResultEvent | LogEntryEvent | ValidationWarningEvent | SkillsChangedEvent | CommandsAvailableEvent | FlowBreadcrumbEvent | FlowPromptEvent | SessionInfoEvent | ReactionAddedEvent | ReactionRemovedEvent | ResourceStatusEvent | ConnectorStatusEvent | CustomMessageEvent | SnapshotEvent | CompactionAttemptEvent | RuntimeSessionEvent | ResumeAttemptedEvent | ResumeFailedEvent | CapabilityRegisterEvent | CapabilityDeregisterEvent | CapabilityInvokedEvent | RenderInvokedEvent | ProtocolInfoEvent | IncompatibleProtocolEvent | SessionInitAckEvent | SessionInitMismatchEvent | SystemPromptComposedEvent | ContextUsageEvent | ProviderResponseSeenEvent | ProviderQuotaObservedEvent;
|
|
22
|
+
export type AgentEvent = TextEvent | TextRetractEvent | ToolCallEvent | ToolResultEvent | QuestionEvent | QuestionReplyEvent | ErrorEvent | StatusEvent | DevServerEvent | FileChangeEvent | SubagentEvent | MemoryChangedEvent | TriggerFiredEvent | FinishedEvent | A2AMessageEvent | StateChangedEvent | HandoffEvent | ConnectorResponseEvent | ConnectorQueryResponseEvent | ConnectorMutateResponseEvent | PromptAckEvent | QueuedPromptsDroppedEvent | ConnectorsAvailableEvent | LifecycleCompleteEvent | TypingEvent | UserMessageEvent | SyncStatusEvent | SecretsReadyEvent | ConfiguredEvent | MountMountedEvent | MountUnmountedEvent | MountChangedEvent | MountSyncStatusEvent | DebugResultEvent | LogEntryEvent | ValidationWarningEvent | SkillsChangedEvent | CommandsAvailableEvent | FlowBreadcrumbEvent | FlowPromptEvent | SessionInfoEvent | ReactionAddedEvent | ReactionRemovedEvent | ResourceStatusEvent | ConnectorStatusEvent | CustomMessageEvent | SnapshotEvent | CompactionAttemptEvent | RuntimeSessionEvent | ResumeAttemptedEvent | ResumeFailedEvent | CapabilityRegisterEvent | CapabilityDeregisterEvent | CapabilityInvokedEvent | RenderInvokedEvent | ProtocolInfoEvent | IncompatibleProtocolEvent | SessionInitAckEvent | SessionInitMismatchEvent | SystemPromptComposedEvent | ContextUsageEvent | ProviderResponseSeenEvent | ProviderQuotaObservedEvent;
|
|
22
23
|
/**
|
|
23
24
|
* A text message from the agent to the user.
|
|
24
25
|
*
|
|
@@ -292,13 +293,74 @@ export type SubagentEvent = {
|
|
|
292
293
|
description: string;
|
|
293
294
|
/** Flow node this subagent is executing (set by orchestrator) */
|
|
294
295
|
nodeId?: string;
|
|
295
|
-
/**
|
|
296
|
+
/**
|
|
297
|
+
* Structured output of a harness-native subagent (set on "finished"). Unchanged since 1.x;
|
|
298
|
+
* an `agent.run` run carries its output in {@link SubagentEvent.result} instead.
|
|
299
|
+
*/
|
|
296
300
|
output?: {
|
|
297
301
|
summary: string;
|
|
298
302
|
filesChanged: string[];
|
|
299
303
|
status: string;
|
|
300
304
|
concerns: string[];
|
|
301
305
|
};
|
|
306
|
+
/**
|
|
307
|
+
* Typed output of an `agent.run` run, validated against the role's `io.output` schema (set on
|
|
308
|
+
* "finished" when the run succeeded; since 4.16.0). Absent for a harness-native subagent.
|
|
309
|
+
*/
|
|
310
|
+
result?: unknown;
|
|
311
|
+
/** `agent.run` run this event belongs to (since 4.16.0). Absent for a harness-native subagent. */
|
|
312
|
+
runId?: string;
|
|
313
|
+
/** Instance the run executes (since 4.16.0). */
|
|
314
|
+
instanceId?: string;
|
|
315
|
+
/** The input the run was started with (set on "started"; since 4.16.0). */
|
|
316
|
+
input?: unknown;
|
|
317
|
+
/** Final status of the run (set on "finished"; since 4.16.0). */
|
|
318
|
+
runStatus?: AgentRunStatus;
|
|
319
|
+
/** Why the run did not succeed (set on "finished" when `runStatus` is not `succeeded`; since 4.16.0). */
|
|
320
|
+
error?: {
|
|
321
|
+
code: string;
|
|
322
|
+
message: string;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* A memory block of an agent instance changed.
|
|
327
|
+
*
|
|
328
|
+
* Emitted by the runner after a `memory.write` / `memory.append` call the host
|
|
329
|
+
* accepted, and by a host that changes a block by another route (a memory
|
|
330
|
+
* review, a consolidation). The block's content is not part of the event:
|
|
331
|
+
* read it with `memory.read` or from the host's store.
|
|
332
|
+
*
|
|
333
|
+
* @category Events
|
|
334
|
+
* @since 4.16.0
|
|
335
|
+
* @docLink packages/types/events#agent-event
|
|
336
|
+
*/
|
|
337
|
+
export type MemoryChangedEvent = {
|
|
338
|
+
type: "memory_changed";
|
|
339
|
+
/** Instance whose block changed. */
|
|
340
|
+
instanceId: string;
|
|
341
|
+
/** Block name, as declared in `memory.blocks`. */
|
|
342
|
+
block: string;
|
|
343
|
+
scope: AgentMemoryScopeKind;
|
|
344
|
+
/** Who made the change: the agent through a capability, a user, or the host itself. */
|
|
345
|
+
by: "agent" | "user" | "host";
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* A trigger of an agent instance fired and started (or queued) a run.
|
|
349
|
+
*
|
|
350
|
+
* The host schedules triggers (`schedule`, `webhook`, `channel`, `event`), so
|
|
351
|
+
* the host emits this event when it delivers the trigger's prompt; the
|
|
352
|
+
* runner defines the shape only. `source` reuses the trigger kinds of the
|
|
353
|
+
* asset (`schedule | webhook | channel | event`).
|
|
354
|
+
*
|
|
355
|
+
* @category Events
|
|
356
|
+
* @since 4.16.0
|
|
357
|
+
* @docLink packages/types/events#agent-event
|
|
358
|
+
*/
|
|
359
|
+
export type TriggerFiredEvent = {
|
|
360
|
+
type: "trigger_fired";
|
|
361
|
+
instanceId: string;
|
|
362
|
+
triggerId: string;
|
|
363
|
+
source: "schedule" | "webhook" | "channel" | "event";
|
|
302
364
|
};
|
|
303
365
|
/**
|
|
304
366
|
* Per-turn token usage reported by a driver.
|
|
@@ -1770,14 +1832,14 @@ export type SessionInfoEvent = {
|
|
|
1770
1832
|
/**
|
|
1771
1833
|
* One labeled section of the assembled system prompt, as broken down by
|
|
1772
1834
|
* the runner's session-builder. Single-entry labels (`context`, `prompt`,
|
|
1773
|
-
* `home`, `environment`, `resources`) appear once; multi-entry labels
|
|
1835
|
+
* `home`, `environment`, `resources`, `memory`) appear once; multi-entry labels
|
|
1774
1836
|
* (`prompt-extensions`, `composition`, `additional`) appear once per
|
|
1775
1837
|
* source.
|
|
1776
1838
|
*
|
|
1777
1839
|
* @since 2026-05
|
|
1778
1840
|
*/
|
|
1779
1841
|
export type SystemPromptSection = {
|
|
1780
|
-
label: "context" | "prompt" | "home" | "environment" | "resources" | "mcp-guidance" | "tool-activity" | "prompt-extensions" | "composition" | "additional";
|
|
1842
|
+
label: "context" | "prompt" | "home" | "environment" | "resources" | "mcp-guidance" | "tool-activity" | "memory" | "prompt-extensions" | "composition" | "additional";
|
|
1781
1843
|
value: string;
|
|
1782
1844
|
/** File path, block id, or descriptor — present for multi-entry labels. */
|
|
1783
1845
|
source?: string;
|