@mcpview/compose 0.0.0-stage → 0.11.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 +268 -0
- package/LICENSE +21 -0
- package/README.md +524 -2
- package/esm/_dnt.polyfills.d.ts +18 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -0
- package/esm/_dnt.polyfills.js +15 -0
- package/esm/_dnt.shims.d.ts +2 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +57 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_chars.d.ts +33 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_chars.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_chars.js +48 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_dumper_state.d.ts +106 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_dumper_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_dumper_state.js +636 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_loader_state.d.ts +67 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_loader_state.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_loader_state.js +1393 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_schema.d.ts +44 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_schema.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_schema.js +117 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/binary.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/binary.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/binary.js +103 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/bool.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/bool.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/bool.js +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/float.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/float.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/float.js +96 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/int.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/int.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/int.js +159 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/map.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/map.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/map.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/merge.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/merge.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/merge.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/nil.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/nil.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/nil.js +22 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/omap.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/omap.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/omap.js +29 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/pairs.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/pairs.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/pairs.js +19 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/regexp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/regexp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/regexp.js +30 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/seq.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/seq.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/seq.js +10 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/set.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/set.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/set.js +14 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/str.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/str.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/str.js +9 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/timestamp.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/timestamp.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/timestamp.js +81 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/undefined.d.ts +3 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/undefined.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type/undefined.js +20 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type.d.ts +32 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_type.js +6 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_utils.d.ts +4 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_utils.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/_utils.js +13 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/mod.d.ts +51 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/mod.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/mod.js +53 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/parse.d.ts +79 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/parse.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/parse.js +91 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/stringify.d.ts +108 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/stringify.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/stringify.js +33 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/types.d.ts +111 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/types.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/yaml/1.3.0/types.js +104 -0
- package/esm/mod.d.ts +49 -0
- package/esm/mod.d.ts.map +1 -0
- package/esm/mod.js +42 -0
- package/esm/package.json +3 -0
- package/esm/src/core/collector/collector.d.ts +58 -0
- package/esm/src/core/collector/collector.d.ts.map +1 -0
- package/esm/src/core/collector/collector.js +60 -0
- package/esm/src/core/collector/extractor.d.ts +33 -0
- package/esm/src/core/collector/extractor.d.ts.map +1 -0
- package/esm/src/core/collector/extractor.js +53 -0
- package/esm/src/core/collector/mod.d.ts +9 -0
- package/esm/src/core/collector/mod.d.ts.map +1 -0
- package/esm/src/core/collector/mod.js +7 -0
- package/esm/src/core/components/components.d.ts +4 -0
- package/esm/src/core/components/components.d.ts.map +1 -0
- package/esm/src/core/components/components.js +28 -0
- package/esm/src/core/components/mod.d.ts +2 -0
- package/esm/src/core/components/mod.d.ts.map +1 -0
- package/esm/src/core/components/mod.js +1 -0
- package/esm/src/core/composer/composer.d.ts +35 -0
- package/esm/src/core/composer/composer.d.ts.map +1 -0
- package/esm/src/core/composer/composer.js +72 -0
- package/esm/src/core/composer/mod.d.ts +7 -0
- package/esm/src/core/composer/mod.d.ts.map +1 -0
- package/esm/src/core/composer/mod.js +6 -0
- package/esm/src/core/mod.d.ts +15 -0
- package/esm/src/core/mod.d.ts.map +1 -0
- package/esm/src/core/mod.js +16 -0
- package/esm/src/core/sync/mod.d.ts +9 -0
- package/esm/src/core/sync/mod.d.ts.map +1 -0
- package/esm/src/core/sync/mod.js +7 -0
- package/esm/src/core/sync/resolver.d.ts +51 -0
- package/esm/src/core/sync/resolver.d.ts.map +1 -0
- package/esm/src/core/sync/resolver.js +88 -0
- package/esm/src/core/sync/validator.d.ts +39 -0
- package/esm/src/core/sync/validator.d.ts.map +1 -0
- package/esm/src/core/sync/validator.js +65 -0
- package/esm/src/core/types/components.d.ts +46 -0
- package/esm/src/core/types/components.d.ts.map +1 -0
- package/esm/src/core/types/components.js +2 -0
- package/esm/src/core/types/descriptor.d.ts +47 -0
- package/esm/src/core/types/descriptor.d.ts.map +1 -0
- package/esm/src/core/types/descriptor.js +6 -0
- package/esm/src/core/types/errors.d.ts +69 -0
- package/esm/src/core/types/errors.d.ts.map +1 -0
- package/esm/src/core/types/errors.js +32 -0
- package/esm/src/core/types/layout.d.ts +100 -0
- package/esm/src/core/types/layout.d.ts.map +1 -0
- package/esm/src/core/types/layout.js +49 -0
- package/esm/src/core/types/mcp-apps.d.ts +56 -0
- package/esm/src/core/types/mcp-apps.d.ts.map +1 -0
- package/esm/src/core/types/mcp-apps.js +16 -0
- package/esm/src/core/types/mod.d.ts +17 -0
- package/esm/src/core/types/mod.d.ts.map +1 -0
- package/esm/src/core/types/mod.js +7 -0
- package/esm/src/core/types/orchestration.d.ts +37 -0
- package/esm/src/core/types/orchestration.d.ts.map +1 -0
- package/esm/src/core/types/orchestration.js +6 -0
- package/esm/src/core/types/resources.d.ts +37 -0
- package/esm/src/core/types/resources.d.ts.map +1 -0
- package/esm/src/core/types/resources.js +1 -0
- package/esm/src/core/types/sync-rules.d.ts +80 -0
- package/esm/src/core/types/sync-rules.d.ts.map +1 -0
- package/esm/src/core/types/sync-rules.js +6 -0
- package/esm/src/deploy/mod.d.ts +12 -0
- package/esm/src/deploy/mod.d.ts.map +1 -0
- package/esm/src/deploy/mod.js +11 -0
- package/esm/src/deploy/types.d.ts +119 -0
- package/esm/src/deploy/types.d.ts.map +1 -0
- package/esm/src/deploy/types.js +19 -0
- package/esm/src/host/components-contract.d.ts +6 -0
- package/esm/src/host/components-contract.d.ts.map +1 -0
- package/esm/src/host/components-contract.js +5 -0
- package/esm/src/host/mod.d.ts +15 -0
- package/esm/src/host/mod.d.ts.map +1 -0
- package/esm/src/host/mod.js +14 -0
- package/esm/src/host/renderer/css/base.d.ts +23 -0
- package/esm/src/host/renderer/css/base.d.ts.map +1 -0
- package/esm/src/host/renderer/css/base.js +48 -0
- package/esm/src/host/renderer/css/layouts.d.ts +31 -0
- package/esm/src/host/renderer/css/layouts.d.ts.map +1 -0
- package/esm/src/host/renderer/css/layouts.js +129 -0
- package/esm/src/host/renderer/html-generator.d.ts +36 -0
- package/esm/src/host/renderer/html-generator.d.ts.map +1 -0
- package/esm/src/host/renderer/html-generator.js +227 -0
- package/esm/src/host/renderer/js/event-bus.d.ts +33 -0
- package/esm/src/host/renderer/js/event-bus.d.ts.map +1 -0
- package/esm/src/host/renderer/js/event-bus.js +592 -0
- package/esm/src/host/renderer/mod.d.ts +9 -0
- package/esm/src/host/renderer/mod.d.ts.map +1 -0
- package/esm/src/host/renderer/mod.js +7 -0
- package/esm/src/host/renderer/options.d.ts +126 -0
- package/esm/src/host/renderer/options.d.ts.map +1 -0
- package/esm/src/host/renderer/options.js +1 -0
- package/esm/src/host/serve.d.ts +55 -0
- package/esm/src/host/serve.d.ts.map +1 -0
- package/esm/src/host/serve.js +89 -0
- package/esm/src/host/types.d.ts +42 -0
- package/esm/src/host/types.d.ts.map +1 -0
- package/esm/src/host/types.js +9 -0
- package/esm/src/runtime/cluster.d.ts +92 -0
- package/esm/src/runtime/cluster.d.ts.map +1 -0
- package/esm/src/runtime/cluster.js +887 -0
- package/esm/src/runtime/compose.d.ts +67 -0
- package/esm/src/runtime/compose.d.ts.map +1 -0
- package/esm/src/runtime/compose.js +288 -0
- package/esm/src/runtime/host-dashboard-types.d.ts +79 -0
- package/esm/src/runtime/host-dashboard-types.d.ts.map +1 -0
- package/esm/src/runtime/host-dashboard-types.js +9 -0
- package/esm/src/runtime/host-dashboard.d.ts +29 -0
- package/esm/src/runtime/host-dashboard.d.ts.map +1 -0
- package/esm/src/runtime/host-dashboard.js +559 -0
- package/esm/src/runtime/manifest.d.ts +58 -0
- package/esm/src/runtime/manifest.d.ts.map +1 -0
- package/esm/src/runtime/manifest.js +144 -0
- package/esm/src/runtime/mod.d.ts +18 -0
- package/esm/src/runtime/mod.d.ts.map +1 -0
- package/esm/src/runtime/mod.js +21 -0
- package/esm/src/runtime/template.d.ts +79 -0
- package/esm/src/runtime/template.d.ts.map +1 -0
- package/esm/src/runtime/template.js +287 -0
- package/esm/src/runtime/types.d.ts +345 -0
- package/esm/src/runtime/types.d.ts.map +1 -0
- package/esm/src/runtime/types.js +28 -0
- package/esm/src/sdk/compose-events.d.ts +130 -0
- package/esm/src/sdk/compose-events.d.ts.map +1 -0
- package/esm/src/sdk/compose-events.js +127 -0
- package/esm/src/sdk/composition-validator.d.ts +97 -0
- package/esm/src/sdk/composition-validator.d.ts.map +1 -0
- package/esm/src/sdk/composition-validator.js +178 -0
- package/esm/src/sdk/mcp-sdk.d.ts +92 -0
- package/esm/src/sdk/mcp-sdk.d.ts.map +1 -0
- package/esm/src/sdk/mcp-sdk.js +54 -0
- package/esm/src/sdk/mod.d.ts +15 -0
- package/esm/src/sdk/mod.d.ts.map +1 -0
- package/esm/src/sdk/mod.js +10 -0
- package/esm/src/sdk/ui-meta-builder.d.ts +99 -0
- package/esm/src/sdk/ui-meta-builder.d.ts.map +1 -0
- package/esm/src/sdk/ui-meta-builder.js +53 -0
- package/esm/src/version.d.ts +30 -0
- package/esm/src/version.d.ts.map +1 -0
- package/esm/src/version.js +29 -0
- package/package.json +58 -4
- package/script/_dnt.polyfills.d.ts +18 -0
- package/script/_dnt.polyfills.d.ts.map +1 -0
- package/script/_dnt.polyfills.js +16 -0
- package/script/_dnt.shims.d.ts +2 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +60 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_chars.d.ts +33 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_chars.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_chars.js +55 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_dumper_state.d.ts +106 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_dumper_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_dumper_state.js +640 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_loader_state.d.ts +67 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_loader_state.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_loader_state.js +1397 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_schema.d.ts +44 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_schema.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_schema.js +121 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/binary.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/binary.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/binary.js +106 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/bool.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/bool.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/bool.js +35 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/float.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/float.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/float.js +99 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/int.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/int.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/int.js +162 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/map.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/map.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/map.js +17 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/merge.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/merge.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/merge.js +13 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/nil.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/nil.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/nil.js +25 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/omap.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/omap.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/omap.js +32 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/pairs.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/pairs.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/pairs.js +22 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/regexp.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/regexp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/regexp.js +33 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/seq.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/seq.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/seq.js +13 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/set.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/set.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/set.js +17 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/str.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/str.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/str.js +12 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/timestamp.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/timestamp.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/timestamp.js +84 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/undefined.d.ts +3 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/undefined.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type/undefined.js +23 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type.d.ts +32 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_type.js +7 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_utils.d.ts +4 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_utils.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/_utils.js +18 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/mod.d.ts +51 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/mod.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/mod.js +69 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/parse.d.ts +79 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/parse.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/parse.js +95 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/stringify.d.ts +108 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/stringify.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/stringify.js +36 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/types.d.ts +111 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/types.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/yaml/1.3.0/types.js +108 -0
- package/script/mod.d.ts +49 -0
- package/script/mod.d.ts.map +1 -0
- package/script/mod.js +60 -0
- package/script/package.json +3 -0
- package/script/src/core/collector/collector.d.ts +58 -0
- package/script/src/core/collector/collector.d.ts.map +1 -0
- package/script/src/core/collector/collector.js +63 -0
- package/script/src/core/collector/extractor.d.ts +33 -0
- package/script/src/core/collector/extractor.d.ts.map +1 -0
- package/script/src/core/collector/extractor.js +56 -0
- package/script/src/core/collector/mod.d.ts +9 -0
- package/script/src/core/collector/mod.d.ts.map +1 -0
- package/script/src/core/collector/mod.js +12 -0
- package/script/src/core/components/components.d.ts +4 -0
- package/script/src/core/components/components.d.ts.map +1 -0
- package/script/src/core/components/components.js +31 -0
- package/script/src/core/components/mod.d.ts +2 -0
- package/script/src/core/components/mod.d.ts.map +1 -0
- package/script/src/core/components/mod.js +5 -0
- package/script/src/core/composer/composer.d.ts +35 -0
- package/script/src/core/composer/composer.d.ts.map +1 -0
- package/script/src/core/composer/composer.js +75 -0
- package/script/src/core/composer/mod.d.ts +7 -0
- package/script/src/core/composer/mod.d.ts.map +1 -0
- package/script/src/core/composer/mod.js +10 -0
- package/script/src/core/mod.d.ts +15 -0
- package/script/src/core/mod.d.ts.map +1 -0
- package/script/src/core/mod.js +30 -0
- package/script/src/core/sync/mod.d.ts +9 -0
- package/script/src/core/sync/mod.d.ts.map +1 -0
- package/script/src/core/sync/mod.js +12 -0
- package/script/src/core/sync/resolver.d.ts +51 -0
- package/script/src/core/sync/resolver.d.ts.map +1 -0
- package/script/src/core/sync/resolver.js +91 -0
- package/script/src/core/sync/validator.d.ts +39 -0
- package/script/src/core/sync/validator.d.ts.map +1 -0
- package/script/src/core/sync/validator.js +68 -0
- package/script/src/core/types/components.d.ts +46 -0
- package/script/src/core/types/components.d.ts.map +1 -0
- package/script/src/core/types/components.js +3 -0
- package/script/src/core/types/descriptor.d.ts +47 -0
- package/script/src/core/types/descriptor.d.ts.map +1 -0
- package/script/src/core/types/descriptor.js +7 -0
- package/script/src/core/types/errors.d.ts +69 -0
- package/script/src/core/types/errors.d.ts.map +1 -0
- package/script/src/core/types/errors.js +35 -0
- package/script/src/core/types/layout.d.ts +100 -0
- package/script/src/core/types/layout.d.ts.map +1 -0
- package/script/src/core/types/layout.js +55 -0
- package/script/src/core/types/mcp-apps.d.ts +56 -0
- package/script/src/core/types/mcp-apps.d.ts.map +1 -0
- package/script/src/core/types/mcp-apps.js +17 -0
- package/script/src/core/types/mod.d.ts +17 -0
- package/script/src/core/types/mod.d.ts.map +1 -0
- package/script/src/core/types/mod.js +15 -0
- package/script/src/core/types/orchestration.d.ts +37 -0
- package/script/src/core/types/orchestration.d.ts.map +1 -0
- package/script/src/core/types/orchestration.js +7 -0
- package/script/src/core/types/resources.d.ts +37 -0
- package/script/src/core/types/resources.d.ts.map +1 -0
- package/script/src/core/types/resources.js +2 -0
- package/script/src/core/types/sync-rules.d.ts +80 -0
- package/script/src/core/types/sync-rules.d.ts.map +1 -0
- package/script/src/core/types/sync-rules.js +7 -0
- package/script/src/deploy/mod.d.ts +12 -0
- package/script/src/deploy/mod.d.ts.map +1 -0
- package/script/src/deploy/mod.js +15 -0
- package/script/src/deploy/types.d.ts +119 -0
- package/script/src/deploy/types.d.ts.map +1 -0
- package/script/src/deploy/types.js +22 -0
- package/script/src/host/components-contract.d.ts +6 -0
- package/script/src/host/components-contract.d.ts.map +1 -0
- package/script/src/host/components-contract.js +8 -0
- package/script/src/host/mod.d.ts +15 -0
- package/script/src/host/mod.d.ts.map +1 -0
- package/script/src/host/mod.js +21 -0
- package/script/src/host/renderer/css/base.d.ts +23 -0
- package/script/src/host/renderer/css/base.d.ts.map +1 -0
- package/script/src/host/renderer/css/base.js +51 -0
- package/script/src/host/renderer/css/layouts.d.ts +31 -0
- package/script/src/host/renderer/css/layouts.d.ts.map +1 -0
- package/script/src/host/renderer/css/layouts.js +132 -0
- package/script/src/host/renderer/html-generator.d.ts +36 -0
- package/script/src/host/renderer/html-generator.d.ts.map +1 -0
- package/script/src/host/renderer/html-generator.js +231 -0
- package/script/src/host/renderer/js/event-bus.d.ts +33 -0
- package/script/src/host/renderer/js/event-bus.d.ts.map +1 -0
- package/script/src/host/renderer/js/event-bus.js +595 -0
- package/script/src/host/renderer/mod.d.ts +9 -0
- package/script/src/host/renderer/mod.d.ts.map +1 -0
- package/script/src/host/renderer/mod.js +12 -0
- package/script/src/host/renderer/options.d.ts +126 -0
- package/script/src/host/renderer/options.d.ts.map +1 -0
- package/script/src/host/renderer/options.js +2 -0
- package/script/src/host/serve.d.ts +55 -0
- package/script/src/host/serve.d.ts.map +1 -0
- package/script/src/host/serve.js +92 -0
- package/script/src/host/types.d.ts +42 -0
- package/script/src/host/types.d.ts.map +1 -0
- package/script/src/host/types.js +10 -0
- package/script/src/runtime/cluster.d.ts +92 -0
- package/script/src/runtime/cluster.d.ts.map +1 -0
- package/script/src/runtime/cluster.js +892 -0
- package/script/src/runtime/compose.d.ts +67 -0
- package/script/src/runtime/compose.d.ts.map +1 -0
- package/script/src/runtime/compose.js +292 -0
- package/script/src/runtime/host-dashboard-types.d.ts +79 -0
- package/script/src/runtime/host-dashboard-types.d.ts.map +1 -0
- package/script/src/runtime/host-dashboard-types.js +10 -0
- package/script/src/runtime/host-dashboard.d.ts +29 -0
- package/script/src/runtime/host-dashboard.d.ts.map +1 -0
- package/script/src/runtime/host-dashboard.js +563 -0
- package/script/src/runtime/manifest.d.ts +58 -0
- package/script/src/runtime/manifest.d.ts.map +1 -0
- package/script/src/runtime/manifest.js +150 -0
- package/script/src/runtime/mod.d.ts +18 -0
- package/script/src/runtime/mod.d.ts.map +1 -0
- package/script/src/runtime/mod.js +41 -0
- package/script/src/runtime/template.d.ts +79 -0
- package/script/src/runtime/template.d.ts.map +1 -0
- package/script/src/runtime/template.js +295 -0
- package/script/src/runtime/types.d.ts +345 -0
- package/script/src/runtime/types.d.ts.map +1 -0
- package/script/src/runtime/types.js +31 -0
- package/script/src/sdk/compose-events.d.ts +130 -0
- package/script/src/sdk/compose-events.d.ts.map +1 -0
- package/script/src/sdk/compose-events.js +154 -0
- package/script/src/sdk/composition-validator.d.ts +97 -0
- package/script/src/sdk/composition-validator.d.ts.map +1 -0
- package/script/src/sdk/composition-validator.js +181 -0
- package/script/src/sdk/mcp-sdk.d.ts +92 -0
- package/script/src/sdk/mcp-sdk.d.ts.map +1 -0
- package/script/src/sdk/mcp-sdk.js +57 -0
- package/script/src/sdk/mod.d.ts +15 -0
- package/script/src/sdk/mod.d.ts.map +1 -0
- package/script/src/sdk/mod.js +18 -0
- package/script/src/sdk/ui-meta-builder.d.ts +99 -0
- package/script/src/sdk/ui-meta-builder.d.ts.map +1 -0
- package/script/src/sdk/ui-meta-builder.js +56 -0
- package/script/src/version.d.ts +30 -0
- package/script/src/version.d.ts.map +1 -0
- package/script/src/version.js +33 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Sync rule validator — checks rules for structural issues.
|
|
4
|
+
*
|
|
5
|
+
* @module sync/validator
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.validateSyncRules = validateSyncRules;
|
|
9
|
+
const errors_js_1 = require("../types/errors.js");
|
|
10
|
+
/**
|
|
11
|
+
* Validate sync rules against known tool sources.
|
|
12
|
+
*
|
|
13
|
+
* Checks for:
|
|
14
|
+
* - Orphan references (tool names not in `knownSources`)
|
|
15
|
+
* - Circular routes (`from === to` for non-broadcast rules)
|
|
16
|
+
*
|
|
17
|
+
* @param rules - Sync rules to validate
|
|
18
|
+
* @param knownSources - Known tool names from collected resources
|
|
19
|
+
* @returns Validation result with any issues found
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const result = validateSyncRules(
|
|
24
|
+
* [{ from: "a", event: "click", to: "b", action: "update" }],
|
|
25
|
+
* ["a", "b"],
|
|
26
|
+
* );
|
|
27
|
+
* // result.valid === true
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example Detecting orphan references
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const result = validateSyncRules(
|
|
33
|
+
* [{ from: "unknown", event: "click", to: "a", action: "update" }],
|
|
34
|
+
* ["a"],
|
|
35
|
+
* );
|
|
36
|
+
* // result.valid === false
|
|
37
|
+
* // result.issues[0].code === ErrorCode.ORPHAN_SYNC_REFERENCE
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function validateSyncRules(rules, knownSources) {
|
|
41
|
+
const known = new Set(knownSources);
|
|
42
|
+
const issues = [];
|
|
43
|
+
for (let i = 0; i < rules.length; i++) {
|
|
44
|
+
const rule = rules[i];
|
|
45
|
+
if (!known.has(rule.from)) {
|
|
46
|
+
issues.push({
|
|
47
|
+
code: errors_js_1.ErrorCode.ORPHAN_SYNC_REFERENCE,
|
|
48
|
+
message: `Sync rule references unknown source "${rule.from}"`,
|
|
49
|
+
path: `sync[${i}].from`,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (rule.to !== "*" && !known.has(rule.to)) {
|
|
53
|
+
issues.push({
|
|
54
|
+
code: errors_js_1.ErrorCode.ORPHAN_SYNC_REFERENCE,
|
|
55
|
+
message: `Sync rule references unknown target "${rule.to}"`,
|
|
56
|
+
path: `sync[${i}].to`,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (rule.to !== "*" && rule.from === rule.to) {
|
|
60
|
+
issues.push({
|
|
61
|
+
code: errors_js_1.ErrorCode.CIRCULAR_SYNC_RULE,
|
|
62
|
+
message: `Sync rule has circular route: "${rule.from}" -> "${rule.to}"`,
|
|
63
|
+
path: `sync[${i}]`,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return { valid: issues.length === 0, issues };
|
|
68
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Declarative small-component surface contracts for composed MCP Apps. */
|
|
2
|
+
export type SurfaceLayoutType = "stack" | "row" | "grid";
|
|
3
|
+
export type SurfaceGap = "none" | "xs" | "sm" | "md" | "lg";
|
|
4
|
+
export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
|
|
5
|
+
readonly [key: string]: JsonValue;
|
|
6
|
+
};
|
|
7
|
+
export interface ComponentSurfaceLayout {
|
|
8
|
+
readonly type: SurfaceLayoutType;
|
|
9
|
+
readonly columns?: number;
|
|
10
|
+
readonly gap?: SurfaceGap;
|
|
11
|
+
}
|
|
12
|
+
export interface ComponentSurfaceItem {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly component: string;
|
|
15
|
+
readonly area?: string;
|
|
16
|
+
readonly props?: Readonly<Record<string, JsonValue>>;
|
|
17
|
+
}
|
|
18
|
+
export interface ComponentSurface {
|
|
19
|
+
readonly layout: ComponentSurfaceLayout;
|
|
20
|
+
readonly components: readonly ComponentSurfaceItem[];
|
|
21
|
+
}
|
|
22
|
+
export interface ViewComponentEventPorts {
|
|
23
|
+
readonly emits?: readonly string[];
|
|
24
|
+
readonly accepts?: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
export interface ViewComponentDescriptor {
|
|
27
|
+
readonly title: string;
|
|
28
|
+
readonly description?: string;
|
|
29
|
+
readonly events?: ViewComponentEventPorts;
|
|
30
|
+
}
|
|
31
|
+
export interface AdvertisedComponentCatalog {
|
|
32
|
+
readonly components: Readonly<Record<string, ViewComponentDescriptor>>;
|
|
33
|
+
readonly defaultSurface?: ComponentSurface;
|
|
34
|
+
}
|
|
35
|
+
export interface ReadyComponentSurface {
|
|
36
|
+
readonly status: "ready";
|
|
37
|
+
readonly source: "requested" | "default";
|
|
38
|
+
readonly surface: ComponentSurface;
|
|
39
|
+
}
|
|
40
|
+
export interface UnresolvedComponentSurface {
|
|
41
|
+
readonly status: "unresolved";
|
|
42
|
+
readonly reason: "surface-required" | "unknown-components";
|
|
43
|
+
readonly missingComponents?: readonly string[];
|
|
44
|
+
}
|
|
45
|
+
export type ComponentSurfaceResolution = ReadyComponentSurface | UnresolvedComponentSurface;
|
|
46
|
+
//# sourceMappingURL=components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/src/core/types/components.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAE3E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5D,MAAM,MAAM,SAAS,GACjB,IAAI,GACJ,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,SAAS,EAAE,GACpB;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAE1C,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,GAAG,CAAC,EAAE,UAAU,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACtD;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC3C;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC;IACvE,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACpC;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,oBAAoB,CAAC;IAC3D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChD;AAED,MAAM,MAAM,0BAA0B,GAClC,qBAAqB,GACrB,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composite UI descriptor types.
|
|
3
|
+
*
|
|
4
|
+
* @module types/descriptor
|
|
5
|
+
*/
|
|
6
|
+
import type { UiLayout } from "./layout.js";
|
|
7
|
+
import type { ResolvedSyncRule, UiPortSyncRule } from "./sync-rules.js";
|
|
8
|
+
import type { CollectedUiResource } from "./resources.js";
|
|
9
|
+
/**
|
|
10
|
+
* Composite UI descriptor — the output of the composer.
|
|
11
|
+
*
|
|
12
|
+
* Contains all collected UI resources and resolved sync rules
|
|
13
|
+
* for rendering a multi-UI composite layout.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const composite: CompositeUiDescriptor = {
|
|
18
|
+
* type: "composite",
|
|
19
|
+
* resourceUri: "ui://mcp-compose/workflow/abc-123",
|
|
20
|
+
* layout: "split",
|
|
21
|
+
* children: [
|
|
22
|
+
* { source: "postgres:query", resourceUri: "ui://postgres/table/1", slot: 0 },
|
|
23
|
+
* { source: "viz:render", resourceUri: "ui://viz/chart/2", slot: 1 },
|
|
24
|
+
* ],
|
|
25
|
+
* sync: [{ from: 0, event: "filter", to: 1, action: "update" }],
|
|
26
|
+
* };
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export interface CompositeUiDescriptor {
|
|
30
|
+
/** Type discriminant. Always `"composite"`. */
|
|
31
|
+
type: "composite";
|
|
32
|
+
/** URI of this composite UI resource. */
|
|
33
|
+
resourceUri: string;
|
|
34
|
+
/** Layout mode for arranging children. */
|
|
35
|
+
layout: UiLayout;
|
|
36
|
+
/** Child UI resources in slot order. */
|
|
37
|
+
children: CollectedUiResource[];
|
|
38
|
+
/** Resolved sync rules (tool names replaced with slot indices). */
|
|
39
|
+
sync: ResolvedSyncRule[];
|
|
40
|
+
/** Dynamic policies resolved from the currently active component ports. */
|
|
41
|
+
portSync: UiPortSyncRule[];
|
|
42
|
+
/** Shared context injected into all child UIs. */
|
|
43
|
+
sharedContext?: Record<string, unknown>;
|
|
44
|
+
/** Mapping of source name to area name (for areas layout). */
|
|
45
|
+
areaMap?: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../../../src/src/core/types/descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,qBAAqB;IACpC,+CAA+C;IAC/C,IAAI,EAAE,WAAW,CAAC;IAElB,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IAEpB,0CAA0C;IAC1C,MAAM,EAAE,QAAQ,CAAC;IAEjB,wCAAwC;IACxC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAEhC,mEAAmE;IACnE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAEzB,2EAA2E;IAC3E,QAAQ,EAAE,cAAc,EAAE,CAAC;IAE3B,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured error types with machine-readable codes.
|
|
3
|
+
*
|
|
4
|
+
* @module types/errors
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Error codes for mcp-compose operations.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { ErrorCode } from "@mcpview/compose";
|
|
12
|
+
*
|
|
13
|
+
* if (issue.code === ErrorCode.ORPHAN_SYNC_REFERENCE) {
|
|
14
|
+
* console.log("Sync rule references unknown tool:", issue.message);
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare enum ErrorCode {
|
|
19
|
+
/** A sync rule references a tool name not present in collected resources. */
|
|
20
|
+
ORPHAN_SYNC_REFERENCE = "ORPHAN_SYNC_REFERENCE",
|
|
21
|
+
/** A sync rule creates a circular route (from === to). */
|
|
22
|
+
CIRCULAR_SYNC_RULE = "CIRCULAR_SYNC_RULE",
|
|
23
|
+
/** Invalid layout value. */
|
|
24
|
+
INVALID_LAYOUT = "INVALID_LAYOUT",
|
|
25
|
+
/** Tool result does not contain valid UI metadata. */
|
|
26
|
+
NO_UI_METADATA = "NO_UI_METADATA",
|
|
27
|
+
/** Missing required resourceUri in UI metadata. */
|
|
28
|
+
MISSING_RESOURCE_URI = "MISSING_RESOURCE_URI",
|
|
29
|
+
/** No resources provided to composer. */
|
|
30
|
+
EMPTY_RESOURCES = "EMPTY_RESOURCES"
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Structured validation issue.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* const issue: ValidationIssue = {
|
|
38
|
+
* code: ErrorCode.ORPHAN_SYNC_REFERENCE,
|
|
39
|
+
* message: 'Sync rule references unknown tool "unknown:tool"',
|
|
40
|
+
* path: "sync[0].from",
|
|
41
|
+
* };
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export interface ValidationIssue {
|
|
45
|
+
/** Machine-readable error code. */
|
|
46
|
+
code: ErrorCode;
|
|
47
|
+
/** Human-readable description. */
|
|
48
|
+
message: string;
|
|
49
|
+
/** Path to the problematic value (e.g., `"sync[0].from"`). */
|
|
50
|
+
path?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Result of sync rule validation.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const result: ValidationResult = {
|
|
58
|
+
* valid: false,
|
|
59
|
+
* issues: [{ code: ErrorCode.ORPHAN_SYNC_REFERENCE, message: "..." }],
|
|
60
|
+
* };
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
export interface ValidationResult {
|
|
64
|
+
/** Whether all rules are valid. */
|
|
65
|
+
valid: boolean;
|
|
66
|
+
/** List of validation issues found. */
|
|
67
|
+
issues: ValidationIssue[];
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/src/core/types/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;GAWG;AACH,oBAAY,SAAS;IACnB,6EAA6E;IAC7E,qBAAqB,0BAA0B;IAC/C,0DAA0D;IAC1D,kBAAkB,uBAAuB;IACzC,4BAA4B;IAC5B,cAAc,mBAAmB;IACjC,sDAAsD;IACtD,cAAc,mBAAmB;IACjC,mDAAmD;IACnD,oBAAoB,yBAAyB;IAC7C,yCAAyC;IACzC,eAAe,oBAAoB;CACpC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,IAAI,EAAE,SAAS,CAAC;IAEhB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,KAAK,EAAE,OAAO,CAAC;IAEf,uCAAuC;IACvC,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Structured error types with machine-readable codes.
|
|
4
|
+
*
|
|
5
|
+
* @module types/errors
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ErrorCode = void 0;
|
|
9
|
+
/**
|
|
10
|
+
* Error codes for mcp-compose operations.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { ErrorCode } from "@mcpview/compose";
|
|
15
|
+
*
|
|
16
|
+
* if (issue.code === ErrorCode.ORPHAN_SYNC_REFERENCE) {
|
|
17
|
+
* console.log("Sync rule references unknown tool:", issue.message);
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
var ErrorCode;
|
|
22
|
+
(function (ErrorCode) {
|
|
23
|
+
/** A sync rule references a tool name not present in collected resources. */
|
|
24
|
+
ErrorCode["ORPHAN_SYNC_REFERENCE"] = "ORPHAN_SYNC_REFERENCE";
|
|
25
|
+
/** A sync rule creates a circular route (from === to). */
|
|
26
|
+
ErrorCode["CIRCULAR_SYNC_RULE"] = "CIRCULAR_SYNC_RULE";
|
|
27
|
+
/** Invalid layout value. */
|
|
28
|
+
ErrorCode["INVALID_LAYOUT"] = "INVALID_LAYOUT";
|
|
29
|
+
/** Tool result does not contain valid UI metadata. */
|
|
30
|
+
ErrorCode["NO_UI_METADATA"] = "NO_UI_METADATA";
|
|
31
|
+
/** Missing required resourceUri in UI metadata. */
|
|
32
|
+
ErrorCode["MISSING_RESOURCE_URI"] = "MISSING_RESOURCE_URI";
|
|
33
|
+
/** No resources provided to composer. */
|
|
34
|
+
ErrorCode["EMPTY_RESOURCES"] = "EMPTY_RESOURCES";
|
|
35
|
+
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout types for composite UI arrangement.
|
|
3
|
+
*
|
|
4
|
+
* Supports simple presets (a single string) and agent-composed
|
|
5
|
+
* area grids (a structured object with named regions).
|
|
6
|
+
*
|
|
7
|
+
* @module types/layout
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Simple layout presets.
|
|
11
|
+
*
|
|
12
|
+
* - `"split"` — Side-by-side panels
|
|
13
|
+
* - `"tabs"` — Tabbed interface
|
|
14
|
+
* - `"grid"` — Auto-fit grid
|
|
15
|
+
* - `"stack"` — Vertical stack
|
|
16
|
+
*/
|
|
17
|
+
export type UiLayoutPreset = "split" | "tabs" | "grid" | "stack";
|
|
18
|
+
/**
|
|
19
|
+
* Gap between panels.
|
|
20
|
+
*
|
|
21
|
+
* - `"none"` — 0
|
|
22
|
+
* - `"compact"` — 4px
|
|
23
|
+
* - `"normal"` — 8px
|
|
24
|
+
* - `"spacious"` — 16px
|
|
25
|
+
*/
|
|
26
|
+
export type UiLayoutGap = "none" | "compact" | "normal" | "spacious";
|
|
27
|
+
/**
|
|
28
|
+
* Agent-composed area grid layout.
|
|
29
|
+
*
|
|
30
|
+
* The agent describes the dashboard as a 2D grid of named regions
|
|
31
|
+
* with optional proportional sizing. No CSS knowledge required.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const layout: UiLayoutAreas = {
|
|
36
|
+
* areas: [
|
|
37
|
+
* ["filter", "list", "detail"],
|
|
38
|
+
* ["filter", "chart", "chart" ],
|
|
39
|
+
* ],
|
|
40
|
+
* columns: [1, 2, 2],
|
|
41
|
+
* rows: [3, 1],
|
|
42
|
+
* gap: "normal",
|
|
43
|
+
* };
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export interface UiLayoutAreas {
|
|
47
|
+
/** 2D grid of source IDs. Repeated names span multiple cells. */
|
|
48
|
+
areas: string[][];
|
|
49
|
+
/** Column proportions (default: equal). */
|
|
50
|
+
columns?: number[];
|
|
51
|
+
/** Row proportions (default: equal). */
|
|
52
|
+
rows?: number[];
|
|
53
|
+
/** Gap between panels (default: "normal"). */
|
|
54
|
+
gap?: UiLayoutGap;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Layout configuration — either a simple preset or an agent-composed grid.
|
|
58
|
+
*
|
|
59
|
+
* @example Simple preset
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const layout: UiLayout = "split";
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example Agent-composed grid
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const layout: UiLayout = {
|
|
67
|
+
* areas: [
|
|
68
|
+
* ["sidebar", "main"],
|
|
69
|
+
* ["sidebar", "bottom"],
|
|
70
|
+
* ],
|
|
71
|
+
* columns: [1, 3],
|
|
72
|
+
* gap: "compact",
|
|
73
|
+
* };
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export type UiLayout = UiLayoutPreset | UiLayoutAreas;
|
|
77
|
+
/**
|
|
78
|
+
* All valid layout preset values for runtime validation.
|
|
79
|
+
*/
|
|
80
|
+
export declare const UI_LAYOUT_PRESETS: readonly UiLayoutPreset[];
|
|
81
|
+
/**
|
|
82
|
+
* Check if a value is a valid UiLayout (preset string or areas object).
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* isValidLayout("split"); // true
|
|
87
|
+
* isValidLayout({ areas: [["a", "b"]] }); // true
|
|
88
|
+
* isValidLayout("unknown"); // false
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export declare function isValidLayout(value: unknown): value is UiLayout;
|
|
92
|
+
/**
|
|
93
|
+
* Check if a layout is a preset string.
|
|
94
|
+
*/
|
|
95
|
+
export declare function isLayoutPreset(layout: UiLayout): layout is UiLayoutPreset;
|
|
96
|
+
/**
|
|
97
|
+
* Check if a layout is an areas grid.
|
|
98
|
+
*/
|
|
99
|
+
export declare function isLayoutAreas(layout: UiLayout): layout is UiLayoutAreas;
|
|
100
|
+
//# sourceMappingURL=layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/src/core/types/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjE;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC;IAClB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,8CAA8C;IAC9C,GAAG,CAAC,EAAE,WAAW,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,QAAQ,GAAG,cAAc,GAAG,aAAa,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,cAAc,EAK7C,CAAC;AAEX;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAS/D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,IAAI,cAAc,CAEzE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,MAAM,IAAI,aAAa,CAEvE"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Layout types for composite UI arrangement.
|
|
4
|
+
*
|
|
5
|
+
* Supports simple presets (a single string) and agent-composed
|
|
6
|
+
* area grids (a structured object with named regions).
|
|
7
|
+
*
|
|
8
|
+
* @module types/layout
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.UI_LAYOUT_PRESETS = void 0;
|
|
12
|
+
exports.isValidLayout = isValidLayout;
|
|
13
|
+
exports.isLayoutPreset = isLayoutPreset;
|
|
14
|
+
exports.isLayoutAreas = isLayoutAreas;
|
|
15
|
+
/**
|
|
16
|
+
* All valid layout preset values for runtime validation.
|
|
17
|
+
*/
|
|
18
|
+
exports.UI_LAYOUT_PRESETS = [
|
|
19
|
+
"split",
|
|
20
|
+
"tabs",
|
|
21
|
+
"grid",
|
|
22
|
+
"stack",
|
|
23
|
+
];
|
|
24
|
+
/**
|
|
25
|
+
* Check if a value is a valid UiLayout (preset string or areas object).
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* isValidLayout("split"); // true
|
|
30
|
+
* isValidLayout({ areas: [["a", "b"]] }); // true
|
|
31
|
+
* isValidLayout("unknown"); // false
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
function isValidLayout(value) {
|
|
35
|
+
if (typeof value === "string") {
|
|
36
|
+
return exports.UI_LAYOUT_PRESETS.includes(value);
|
|
37
|
+
}
|
|
38
|
+
if (typeof value === "object" && value !== null && "areas" in value) {
|
|
39
|
+
const areas = value.areas;
|
|
40
|
+
return Array.isArray(areas) && areas.length > 0 && areas.every(Array.isArray);
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a layout is a preset string.
|
|
46
|
+
*/
|
|
47
|
+
function isLayoutPreset(layout) {
|
|
48
|
+
return typeof layout === "string";
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a layout is an areas grid.
|
|
52
|
+
*/
|
|
53
|
+
function isLayoutAreas(layout) {
|
|
54
|
+
return typeof layout === "object" && "areas" in layout;
|
|
55
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Apps specification types (SEP-1865 / spec 2026-01-26).
|
|
3
|
+
*
|
|
4
|
+
* Types from the MCP Apps protocol, sourced directly from
|
|
5
|
+
* `@modelcontextprotocol/ext-apps` to stay in lock-step with the official spec.
|
|
6
|
+
* Compose consumes these types only — no runtime dependency on the ext-apps
|
|
7
|
+
* `App` or `AppBridge` classes (those target a 1-iframe-per-client model
|
|
8
|
+
* incompatible with compose's multi-iframe routing).
|
|
9
|
+
*
|
|
10
|
+
* Legacy aliases (`McpUiCsp`, `McpUiPermissions`) are preserved for backwards
|
|
11
|
+
* compatibility and map to the official names (`McpUiResourceCsp`,
|
|
12
|
+
* `McpUiResourcePermissions`). Prefer the official names in new code.
|
|
13
|
+
*
|
|
14
|
+
* @module types/mcp-apps
|
|
15
|
+
*/
|
|
16
|
+
import type { McpUiResourceCsp, McpUiResourceMeta, McpUiResourcePermissions, McpUiToolMeta } from "@modelcontextprotocol/ext-apps";
|
|
17
|
+
export type { McpUiResourceCsp, McpUiResourceMeta, McpUiResourcePermissions, McpUiToolMeta };
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Renamed upstream to `McpUiResourceCsp`. Import the new name from
|
|
20
|
+
* `@modelcontextprotocol/ext-apps` or this module. Alias kept for backwards
|
|
21
|
+
* compatibility and will be removed in a future major version.
|
|
22
|
+
*/
|
|
23
|
+
export type McpUiCsp = McpUiResourceCsp;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Renamed upstream to `McpUiResourcePermissions`. Import the new
|
|
26
|
+
* name from `@modelcontextprotocol/ext-apps` or this module. Alias kept for
|
|
27
|
+
* backwards compatibility and will be removed in a future major version.
|
|
28
|
+
*/
|
|
29
|
+
export type McpUiPermissions = McpUiResourcePermissions;
|
|
30
|
+
/**
|
|
31
|
+
* Shape of an MCP tool call result that may contain UI metadata.
|
|
32
|
+
*
|
|
33
|
+
* Structural subset used by the compose collector to extract `_meta.ui`
|
|
34
|
+
* without pulling the full `@modelcontextprotocol/client` `CallToolResult` type.
|
|
35
|
+
* Kept compose-local on purpose: the collector is intentionally loose
|
|
36
|
+
* (`content?: unknown[]`) to accept any SDK shape.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const result: McpToolResult = {
|
|
41
|
+
* content: [{ type: "text", text: "Query executed" }],
|
|
42
|
+
* _meta: {
|
|
43
|
+
* ui: { resourceUri: "ui://postgres/table/abc123" },
|
|
44
|
+
* },
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export interface McpToolResult {
|
|
49
|
+
content?: unknown[];
|
|
50
|
+
_meta?: {
|
|
51
|
+
ui?: McpUiToolMeta;
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=mcp-apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-apps.d.ts","sourceRoot":"","sources":["../../../../src/src/core/types/mcp-apps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,aAAa,EACd,MAAM,gCAAgC,CAAC;AAExC,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,aAAa,EAAE,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AAExC;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAExD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE;QACN,EAAE,CAAC,EAAE,aAAa,CAAC;QACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MCP Apps specification types (SEP-1865 / spec 2026-01-26).
|
|
4
|
+
*
|
|
5
|
+
* Types from the MCP Apps protocol, sourced directly from
|
|
6
|
+
* `@modelcontextprotocol/ext-apps` to stay in lock-step with the official spec.
|
|
7
|
+
* Compose consumes these types only — no runtime dependency on the ext-apps
|
|
8
|
+
* `App` or `AppBridge` classes (those target a 1-iframe-per-client model
|
|
9
|
+
* incompatible with compose's multi-iframe routing).
|
|
10
|
+
*
|
|
11
|
+
* Legacy aliases (`McpUiCsp`, `McpUiPermissions`) are preserved for backwards
|
|
12
|
+
* compatibility and map to the official names (`McpUiResourceCsp`,
|
|
13
|
+
* `McpUiResourcePermissions`). Prefer the official names in new code.
|
|
14
|
+
*
|
|
15
|
+
* @module types/mcp-apps
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for mcp-compose.
|
|
3
|
+
*
|
|
4
|
+
* @module types
|
|
5
|
+
*/
|
|
6
|
+
export type { UiLayout } from "./layout.js";
|
|
7
|
+
export { isLayoutAreas, isLayoutPreset, isValidLayout, UI_LAYOUT_PRESETS } from "./layout.js";
|
|
8
|
+
export type { UiLayoutAreas, UiLayoutGap, UiLayoutPreset } from "./layout.js";
|
|
9
|
+
export type { ResolvedSyncRule, UiPortSyncRule, UiSyncRule } from "./sync-rules.js";
|
|
10
|
+
export type { UiOrchestration } from "./orchestration.js";
|
|
11
|
+
export type { CollectedUiResource } from "./resources.js";
|
|
12
|
+
export type { AdvertisedComponentCatalog, ComponentSurface, ComponentSurfaceItem, ComponentSurfaceLayout, ComponentSurfaceResolution, JsonValue, ReadyComponentSurface, SurfaceGap, SurfaceLayoutType, UnresolvedComponentSurface, ViewComponentDescriptor, ViewComponentEventPorts, } from "./components.js";
|
|
13
|
+
export type { CompositeUiDescriptor } from "./descriptor.js";
|
|
14
|
+
export type { McpToolResult, McpUiCsp, McpUiPermissions, McpUiResourceMeta, McpUiToolMeta, } from "./mcp-apps.js";
|
|
15
|
+
export { ErrorCode } from "./errors.js";
|
|
16
|
+
export type { ValidationIssue, ValidationResult } from "./errors.js";
|
|
17
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/core/types/mod.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9F,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE9E,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEpF,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,YAAY,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,SAAS,EACT,qBAAqB,EACrB,UAAU,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,YAAY,EACV,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Type definitions for mcp-compose.
|
|
4
|
+
*
|
|
5
|
+
* @module types
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ErrorCode = exports.UI_LAYOUT_PRESETS = exports.isValidLayout = exports.isLayoutPreset = exports.isLayoutAreas = void 0;
|
|
9
|
+
var layout_js_1 = require("./layout.js");
|
|
10
|
+
Object.defineProperty(exports, "isLayoutAreas", { enumerable: true, get: function () { return layout_js_1.isLayoutAreas; } });
|
|
11
|
+
Object.defineProperty(exports, "isLayoutPreset", { enumerable: true, get: function () { return layout_js_1.isLayoutPreset; } });
|
|
12
|
+
Object.defineProperty(exports, "isValidLayout", { enumerable: true, get: function () { return layout_js_1.isValidLayout; } });
|
|
13
|
+
Object.defineProperty(exports, "UI_LAYOUT_PRESETS", { enumerable: true, get: function () { return layout_js_1.UI_LAYOUT_PRESETS; } });
|
|
14
|
+
var errors_js_1 = require("./errors.js");
|
|
15
|
+
Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return errors_js_1.ErrorCode; } });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestration configuration combining layout, sync rules, and shared context.
|
|
3
|
+
*
|
|
4
|
+
* @module types/orchestration
|
|
5
|
+
*/
|
|
6
|
+
import type { UiLayout } from "./layout.js";
|
|
7
|
+
import type { UiPortSyncRule, UiSyncRule } from "./sync-rules.js";
|
|
8
|
+
/**
|
|
9
|
+
* Declarative UI orchestration configuration.
|
|
10
|
+
*
|
|
11
|
+
* Specifies how UI components should be arranged and synchronized.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const orchestration: UiOrchestration = {
|
|
16
|
+
* layout: "split",
|
|
17
|
+
* sync: [
|
|
18
|
+
* { from: "postgres:query", event: "filter", to: "viz:render", action: "update" },
|
|
19
|
+
* ],
|
|
20
|
+
* sharedContext: ["workflowId", "userId"],
|
|
21
|
+
* };
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export interface UiOrchestration {
|
|
25
|
+
/** Layout mode for arranging UI components. */
|
|
26
|
+
layout: UiLayout;
|
|
27
|
+
/** Sync rules for cross-UI event routing. When omitted, UIs operate independently. */
|
|
28
|
+
sync?: UiSyncRule[];
|
|
29
|
+
/** Policies dynamically connected through active mcp-view component ports. */
|
|
30
|
+
portSync?: UiPortSyncRule[];
|
|
31
|
+
/**
|
|
32
|
+
* Keys to extract from collected UI contexts for shared injection.
|
|
33
|
+
* Values are extracted from each resource's context and merged (first wins).
|
|
34
|
+
*/
|
|
35
|
+
sharedContext?: string[];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=orchestration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestration.d.ts","sourceRoot":"","sources":["../../../../src/src/core/types/orchestration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,MAAM,EAAE,QAAQ,CAAC;IAEjB,sFAAsF;IACtF,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IAEpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAE5B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ComponentSurface } from "./components.js";
|
|
2
|
+
/**
|
|
3
|
+
* Collected UI resource types.
|
|
4
|
+
*
|
|
5
|
+
* @module types/resources
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* UI resource collected from an MCP tool response.
|
|
9
|
+
*
|
|
10
|
+
* When a tool call returns `_meta.ui.resourceUri`, the collector
|
|
11
|
+
* captures it for later composition into a composite UI.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const resource: CollectedUiResource = {
|
|
16
|
+
* source: "postgres:query",
|
|
17
|
+
* resourceUri: "ui://postgres/table/abc123",
|
|
18
|
+
* context: { query: "SELECT * FROM sales" },
|
|
19
|
+
* slot: 0,
|
|
20
|
+
* };
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface CollectedUiResource {
|
|
24
|
+
/** Stable instance identity. Unlike `source`, this distinguishes repeated tool calls. */
|
|
25
|
+
componentId?: string;
|
|
26
|
+
/** Tool that produced this UI resource (e.g., `"postgres:query"`). */
|
|
27
|
+
source: string;
|
|
28
|
+
/** URI of the UI resource (from `_meta.ui.resourceUri`). */
|
|
29
|
+
resourceUri: string;
|
|
30
|
+
/** Optional context data for the UI. */
|
|
31
|
+
context?: Record<string, unknown>;
|
|
32
|
+
/** Optional inner surface assembled from components advertised by this App. */
|
|
33
|
+
surface?: ComponentSurface;
|
|
34
|
+
/** Slot index (0-based execution order). */
|
|
35
|
+
slot: number;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=resources.d.ts.map
|