@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,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Ported from js-yaml v3.13.1:
|
|
3
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
6
|
+
// This module is browser compatible.
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.parse = parse;
|
|
9
|
+
exports.parseAll = parseAll;
|
|
10
|
+
const _chars_js_1 = require("./_chars.js");
|
|
11
|
+
const _loader_state_js_1 = require("./_loader_state.js");
|
|
12
|
+
const _schema_js_1 = require("./_schema.js");
|
|
13
|
+
function sanitizeInput(input) {
|
|
14
|
+
input = String(input);
|
|
15
|
+
if (input.length > 0) {
|
|
16
|
+
// Add trailing `\n` if not exists
|
|
17
|
+
if (!(0, _chars_js_1.isEOL)(input.charCodeAt(input.length - 1)))
|
|
18
|
+
input += "\n";
|
|
19
|
+
// Strip BOM
|
|
20
|
+
if (input.charCodeAt(0) === 0xfeff)
|
|
21
|
+
input = input.slice(1);
|
|
22
|
+
}
|
|
23
|
+
return input;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Parse and return a YAML string as a parsed YAML document object.
|
|
27
|
+
*
|
|
28
|
+
* Note: This does not support functions. Untrusted data is safe to parse.
|
|
29
|
+
*
|
|
30
|
+
* @example Usage
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { parse } from "@std/yaml/parse";
|
|
33
|
+
* import { assertEquals } from "@std/assert";
|
|
34
|
+
*
|
|
35
|
+
* const data = parse(`
|
|
36
|
+
* id: 1
|
|
37
|
+
* name: Alice
|
|
38
|
+
* `);
|
|
39
|
+
*
|
|
40
|
+
* assertEquals(data, { id: 1, name: "Alice" });
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @throws {YamlSyntaxError} Throws if the YAML is invalid or contains more
|
|
44
|
+
* than one document.
|
|
45
|
+
* @param content YAML string to parse.
|
|
46
|
+
* @param options Parsing options.
|
|
47
|
+
* @returns Parsed document.
|
|
48
|
+
*/
|
|
49
|
+
function parse(content, options = {}) {
|
|
50
|
+
content = sanitizeInput(content);
|
|
51
|
+
const state = new _loader_state_js_1.LoaderState(content, {
|
|
52
|
+
...options,
|
|
53
|
+
schema: _schema_js_1.SCHEMA_MAP.get(options.schema),
|
|
54
|
+
});
|
|
55
|
+
const documents = state.readDocuments({ singleDocument: true });
|
|
56
|
+
const document = documents.next().value;
|
|
57
|
+
documents.next();
|
|
58
|
+
return document ?? null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Same as {@linkcode parse}, but understands multi-document YAML sources, and
|
|
62
|
+
* returns multiple parsed YAML document objects.
|
|
63
|
+
*
|
|
64
|
+
* @example Usage
|
|
65
|
+
* ```ts
|
|
66
|
+
* import { parseAll } from "@std/yaml/parse";
|
|
67
|
+
* import { assertEquals } from "@std/assert";
|
|
68
|
+
*
|
|
69
|
+
* const data = parseAll(`
|
|
70
|
+
* ---
|
|
71
|
+
* id: 1
|
|
72
|
+
* name: Alice
|
|
73
|
+
* ---
|
|
74
|
+
* id: 2
|
|
75
|
+
* name: Bob
|
|
76
|
+
* ---
|
|
77
|
+
* id: 3
|
|
78
|
+
* name: Eve
|
|
79
|
+
* `);
|
|
80
|
+
* assertEquals(data, [ { id: 1, name: "Alice" }, { id: 2, name: "Bob" }, { id: 3, name: "Eve" }]);
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* @throws {YamlSyntaxError} Throws if the YAML is invalid.
|
|
84
|
+
* @param content YAML string to parse.
|
|
85
|
+
* @param options Parsing options.
|
|
86
|
+
* @returns Array of parsed documents.
|
|
87
|
+
*/
|
|
88
|
+
function parseAll(content, options = {}) {
|
|
89
|
+
content = sanitizeInput(content);
|
|
90
|
+
const state = new _loader_state_js_1.LoaderState(content, {
|
|
91
|
+
...options,
|
|
92
|
+
schema: _schema_js_1.SCHEMA_MAP.get(options.schema),
|
|
93
|
+
});
|
|
94
|
+
return [...state.readDocuments()];
|
|
95
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { type SchemaType } from "./_schema.js";
|
|
2
|
+
import type { StyleVariant } from "./_type.js";
|
|
3
|
+
export type { SchemaType, StyleVariant };
|
|
4
|
+
/** Options for {@linkcode stringify}. */
|
|
5
|
+
export type StringifyOptions = {
|
|
6
|
+
/**
|
|
7
|
+
* Indentation width to use (in spaces).
|
|
8
|
+
*
|
|
9
|
+
* @default {2}
|
|
10
|
+
*/
|
|
11
|
+
indent?: number;
|
|
12
|
+
/**
|
|
13
|
+
* When true, adds an indentation level to array elements.
|
|
14
|
+
*
|
|
15
|
+
* @default {true}
|
|
16
|
+
*/
|
|
17
|
+
arrayIndent?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Do not throw on invalid types (like function in the safe schema) and skip
|
|
20
|
+
* pairs and single values with such types.
|
|
21
|
+
*
|
|
22
|
+
* @default {false}
|
|
23
|
+
*/
|
|
24
|
+
skipInvalid?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies level of nesting, when to switch from block to flow style for
|
|
27
|
+
* collections. `-1` means block style everywhere.
|
|
28
|
+
*
|
|
29
|
+
* @default {-1}
|
|
30
|
+
*/
|
|
31
|
+
flowLevel?: number;
|
|
32
|
+
/** Each tag may have own set of styles. - "tag" => "style" map. */
|
|
33
|
+
styles?: Record<string, StyleVariant>;
|
|
34
|
+
/**
|
|
35
|
+
* Name of the schema to use.
|
|
36
|
+
*
|
|
37
|
+
* @default {"default"}
|
|
38
|
+
*/
|
|
39
|
+
schema?: SchemaType;
|
|
40
|
+
/**
|
|
41
|
+
* If true, sort keys when dumping YAML in ascending, ASCII character order.
|
|
42
|
+
* If a function, use the function to sort the keys.
|
|
43
|
+
* If a function is specified, the function must return a negative value
|
|
44
|
+
* if first argument is less than second argument, zero if they're equal
|
|
45
|
+
* and a positive value otherwise.
|
|
46
|
+
*
|
|
47
|
+
* @default {false}
|
|
48
|
+
*/
|
|
49
|
+
sortKeys?: boolean | ((a: string, b: string, depth: number) => number);
|
|
50
|
+
/**
|
|
51
|
+
* Set max line width.
|
|
52
|
+
*
|
|
53
|
+
* @default {80}
|
|
54
|
+
*/
|
|
55
|
+
lineWidth?: number;
|
|
56
|
+
/**
|
|
57
|
+
* If false, don't convert duplicate objects into references.
|
|
58
|
+
*
|
|
59
|
+
* @default {true}
|
|
60
|
+
*/
|
|
61
|
+
useAnchors?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* If false don't try to be compatible with older yaml versions.
|
|
64
|
+
* Currently: don't quote "yes", "no" and so on,
|
|
65
|
+
* as required for YAML 1.1.
|
|
66
|
+
*
|
|
67
|
+
* @default {true}
|
|
68
|
+
*/
|
|
69
|
+
compatMode?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* If true flow sequences will be condensed, omitting the
|
|
72
|
+
* space between `key: value` or `a, b`. Eg. `'[a,b]'` or `{a:{b:c}}`.
|
|
73
|
+
* Can be useful when using yaml for pretty URL query params
|
|
74
|
+
* as spaces are %-encoded.
|
|
75
|
+
*
|
|
76
|
+
* @default {false}
|
|
77
|
+
*/
|
|
78
|
+
condenseFlow?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Strings will be quoted using this quoting style.
|
|
81
|
+
* If you specify single quotes, double quotes will still be used
|
|
82
|
+
* for non-printable characters.
|
|
83
|
+
*
|
|
84
|
+
* @default {`'`}
|
|
85
|
+
*/
|
|
86
|
+
quoteStyle?: "'" | '"';
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Converts a JavaScript object or value to a YAML document string.
|
|
90
|
+
*
|
|
91
|
+
* @example Usage
|
|
92
|
+
* ```ts
|
|
93
|
+
* import { stringify } from "@std/yaml/stringify";
|
|
94
|
+
* import { assertEquals } from "@std/assert";
|
|
95
|
+
*
|
|
96
|
+
* const data = { id: 1, name: "Alice" };
|
|
97
|
+
* const yaml = stringify(data);
|
|
98
|
+
*
|
|
99
|
+
* assertEquals(yaml, "id: 1\nname: Alice\n");
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @throws {TypeError} If `data` contains invalid types.
|
|
103
|
+
* @param data The data to serialize.
|
|
104
|
+
* @param options The options for serialization.
|
|
105
|
+
* @returns A YAML string.
|
|
106
|
+
*/
|
|
107
|
+
export declare function stringify(data: unknown, options?: StringifyOptions): string;
|
|
108
|
+
//# sourceMappingURL=stringify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.3.0/stringify.ts"],"names":[],"mappings":"AAOA,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAEzC,yCAAyC;AACzC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IACvE;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,gBAAqB,GAC7B,MAAM,CAMR"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Ported from js-yaml v3.13.1:
|
|
3
|
+
// https://github.com/nodeca/js-yaml/commit/665aadda42349dcae869f12040d9b10ef18d12da
|
|
4
|
+
// Copyright 2011-2015 by Vitaly Puzrin. All rights reserved. MIT license.
|
|
5
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
6
|
+
// This module is browser compatible.
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.stringify = stringify;
|
|
9
|
+
const _dumper_state_js_1 = require("./_dumper_state.js");
|
|
10
|
+
const _schema_js_1 = require("./_schema.js");
|
|
11
|
+
/**
|
|
12
|
+
* Converts a JavaScript object or value to a YAML document string.
|
|
13
|
+
*
|
|
14
|
+
* @example Usage
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { stringify } from "@std/yaml/stringify";
|
|
17
|
+
* import { assertEquals } from "@std/assert";
|
|
18
|
+
*
|
|
19
|
+
* const data = { id: 1, name: "Alice" };
|
|
20
|
+
* const yaml = stringify(data);
|
|
21
|
+
*
|
|
22
|
+
* assertEquals(yaml, "id: 1\nname: Alice\n");
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @throws {TypeError} If `data` contains invalid types.
|
|
26
|
+
* @param data The data to serialize.
|
|
27
|
+
* @param options The options for serialization.
|
|
28
|
+
* @returns A YAML string.
|
|
29
|
+
*/
|
|
30
|
+
function stringify(data, options = {}) {
|
|
31
|
+
const state = new _dumper_state_js_1.DumperState({
|
|
32
|
+
...options,
|
|
33
|
+
schema: _schema_js_1.SCHEMA_MAP.get(options.schema),
|
|
34
|
+
});
|
|
35
|
+
return state.stringify(data);
|
|
36
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the YAML parser.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Position information for error reporting.
|
|
8
|
+
*
|
|
9
|
+
* `line` and `column` are 1-indexed; `offset` is the 0-indexed character
|
|
10
|
+
* offset into the source string.
|
|
11
|
+
*/
|
|
12
|
+
export interface YamlPosition {
|
|
13
|
+
/** Line number (1-indexed). */
|
|
14
|
+
readonly line: number;
|
|
15
|
+
/** Column number (1-indexed). */
|
|
16
|
+
readonly column: number;
|
|
17
|
+
/** Character offset in the input (0-indexed). */
|
|
18
|
+
readonly offset: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error thrown when YAML parsing fails.
|
|
22
|
+
*
|
|
23
|
+
* Subclass of {@linkcode SyntaxError}, so existing
|
|
24
|
+
* `instanceof SyntaxError` checks keep working. Carries structured
|
|
25
|
+
* position information so consumers do not have to parse the message.
|
|
26
|
+
*
|
|
27
|
+
* @example Usage
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { parse, YamlSyntaxError } from "@std/yaml";
|
|
30
|
+
* import { assertInstanceOf } from "@std/assert";
|
|
31
|
+
*
|
|
32
|
+
* try {
|
|
33
|
+
* parse(`"`);
|
|
34
|
+
* } catch (error) {
|
|
35
|
+
* assertInstanceOf(error, YamlSyntaxError);
|
|
36
|
+
* assertInstanceOf(error, SyntaxError);
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class YamlSyntaxError extends SyntaxError {
|
|
41
|
+
/**
|
|
42
|
+
* The line number where the error occurred (1-indexed).
|
|
43
|
+
*
|
|
44
|
+
* @example Usage
|
|
45
|
+
* ```ts
|
|
46
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
47
|
+
* import { assertEquals } from "@std/assert";
|
|
48
|
+
*
|
|
49
|
+
* const error = new YamlSyntaxError("Test", { line: 5, column: 10, offset: 50 });
|
|
50
|
+
* assertEquals(error.line, 5);
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
readonly line: number;
|
|
54
|
+
/**
|
|
55
|
+
* The column number where the error occurred (1-indexed).
|
|
56
|
+
*
|
|
57
|
+
* @example Usage
|
|
58
|
+
* ```ts
|
|
59
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
60
|
+
* import { assertEquals } from "@std/assert";
|
|
61
|
+
*
|
|
62
|
+
* const error = new YamlSyntaxError("Test", { line: 5, column: 10, offset: 50 });
|
|
63
|
+
* assertEquals(error.column, 10);
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
readonly column: number;
|
|
67
|
+
/**
|
|
68
|
+
* The character offset where the error occurred (0-indexed).
|
|
69
|
+
*
|
|
70
|
+
* @example Usage
|
|
71
|
+
* ```ts
|
|
72
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
73
|
+
* import { assertEquals } from "@std/assert";
|
|
74
|
+
*
|
|
75
|
+
* const error = new YamlSyntaxError("Test", { line: 5, column: 10, offset: 50 });
|
|
76
|
+
* assertEquals(error.offset, 50);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
readonly offset: number;
|
|
80
|
+
/**
|
|
81
|
+
* A formatted snippet of the source around the error, including a caret
|
|
82
|
+
* line indicating the column. Undefined when the source is empty.
|
|
83
|
+
*
|
|
84
|
+
* @example Usage
|
|
85
|
+
* ```ts
|
|
86
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
87
|
+
* import { assertEquals } from "@std/assert";
|
|
88
|
+
*
|
|
89
|
+
* const snippet = " foo: bar\n ^";
|
|
90
|
+
* const error = new YamlSyntaxError(
|
|
91
|
+
* "Test",
|
|
92
|
+
* { line: 1, column: 6, offset: 5 },
|
|
93
|
+
* snippet,
|
|
94
|
+
* );
|
|
95
|
+
* assertEquals(error.snippet, snippet);
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
readonly snippet?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Constructs a new YamlSyntaxError.
|
|
101
|
+
*
|
|
102
|
+
* The constructed `message` is `${message} at line ${line}, column ${column}`,
|
|
103
|
+
* with `:\n${snippet}` appended when a snippet is provided.
|
|
104
|
+
*
|
|
105
|
+
* @param message The error message describing the syntax issue.
|
|
106
|
+
* @param position The position in the YAML source where the error occurred.
|
|
107
|
+
* @param snippet Optional formatted snippet of the source around the error.
|
|
108
|
+
*/
|
|
109
|
+
constructor(message: string, position: YamlPosition, snippet?: string);
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/yaml/1.3.0/types.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;OASG;gBACS,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,MAAM;CAWtE"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2026 the Deno authors. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.YamlSyntaxError = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Error thrown when YAML parsing fails.
|
|
8
|
+
*
|
|
9
|
+
* Subclass of {@linkcode SyntaxError}, so existing
|
|
10
|
+
* `instanceof SyntaxError` checks keep working. Carries structured
|
|
11
|
+
* position information so consumers do not have to parse the message.
|
|
12
|
+
*
|
|
13
|
+
* @example Usage
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { parse, YamlSyntaxError } from "@std/yaml";
|
|
16
|
+
* import { assertInstanceOf } from "@std/assert";
|
|
17
|
+
*
|
|
18
|
+
* try {
|
|
19
|
+
* parse(`"`);
|
|
20
|
+
* } catch (error) {
|
|
21
|
+
* assertInstanceOf(error, YamlSyntaxError);
|
|
22
|
+
* assertInstanceOf(error, SyntaxError);
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
class YamlSyntaxError extends SyntaxError {
|
|
27
|
+
/**
|
|
28
|
+
* The line number where the error occurred (1-indexed).
|
|
29
|
+
*
|
|
30
|
+
* @example Usage
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
33
|
+
* import { assertEquals } from "@std/assert";
|
|
34
|
+
*
|
|
35
|
+
* const error = new YamlSyntaxError("Test", { line: 5, column: 10, offset: 50 });
|
|
36
|
+
* assertEquals(error.line, 5);
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
line;
|
|
40
|
+
/**
|
|
41
|
+
* The column number where the error occurred (1-indexed).
|
|
42
|
+
*
|
|
43
|
+
* @example Usage
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
46
|
+
* import { assertEquals } from "@std/assert";
|
|
47
|
+
*
|
|
48
|
+
* const error = new YamlSyntaxError("Test", { line: 5, column: 10, offset: 50 });
|
|
49
|
+
* assertEquals(error.column, 10);
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
column;
|
|
53
|
+
/**
|
|
54
|
+
* The character offset where the error occurred (0-indexed).
|
|
55
|
+
*
|
|
56
|
+
* @example Usage
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
59
|
+
* import { assertEquals } from "@std/assert";
|
|
60
|
+
*
|
|
61
|
+
* const error = new YamlSyntaxError("Test", { line: 5, column: 10, offset: 50 });
|
|
62
|
+
* assertEquals(error.offset, 50);
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
offset;
|
|
66
|
+
/**
|
|
67
|
+
* A formatted snippet of the source around the error, including a caret
|
|
68
|
+
* line indicating the column. Undefined when the source is empty.
|
|
69
|
+
*
|
|
70
|
+
* @example Usage
|
|
71
|
+
* ```ts
|
|
72
|
+
* import { YamlSyntaxError } from "@std/yaml";
|
|
73
|
+
* import { assertEquals } from "@std/assert";
|
|
74
|
+
*
|
|
75
|
+
* const snippet = " foo: bar\n ^";
|
|
76
|
+
* const error = new YamlSyntaxError(
|
|
77
|
+
* "Test",
|
|
78
|
+
* { line: 1, column: 6, offset: 5 },
|
|
79
|
+
* snippet,
|
|
80
|
+
* );
|
|
81
|
+
* assertEquals(error.snippet, snippet);
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
snippet;
|
|
85
|
+
/**
|
|
86
|
+
* Constructs a new YamlSyntaxError.
|
|
87
|
+
*
|
|
88
|
+
* The constructed `message` is `${message} at line ${line}, column ${column}`,
|
|
89
|
+
* with `:\n${snippet}` appended when a snippet is provided.
|
|
90
|
+
*
|
|
91
|
+
* @param message The error message describing the syntax issue.
|
|
92
|
+
* @param position The position in the YAML source where the error occurred.
|
|
93
|
+
* @param snippet Optional formatted snippet of the source around the error.
|
|
94
|
+
*/
|
|
95
|
+
constructor(message, position, snippet) {
|
|
96
|
+
let fullMessage = `${message} at line ${position.line}, column ${position.column}`;
|
|
97
|
+
if (snippet)
|
|
98
|
+
fullMessage += `:\n${snippet}`;
|
|
99
|
+
super(fullMessage);
|
|
100
|
+
this.name = "YamlSyntaxError";
|
|
101
|
+
this.line = position.line;
|
|
102
|
+
this.column = position.column;
|
|
103
|
+
this.offset = position.offset;
|
|
104
|
+
if (snippet !== undefined)
|
|
105
|
+
this.snippet = snippet;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.YamlSyntaxError = YamlSyntaxError;
|
package/script/mod.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp-compose — MCP Apps UI Orchestrator
|
|
3
|
+
*
|
|
4
|
+
* Lightweight library for composing and synchronizing multiple MCP Apps UIs
|
|
5
|
+
* into composite dashboards.
|
|
6
|
+
*
|
|
7
|
+
* Pipeline: Collector -> Composer -> Renderer
|
|
8
|
+
*
|
|
9
|
+
* @module mcp-compose
|
|
10
|
+
*
|
|
11
|
+
* @example Basic usage
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { createCollector, buildCompositeUi, renderComposite } from "@mcpview/compose";
|
|
14
|
+
*
|
|
15
|
+
* // 1. Collect UI resources from MCP tool results
|
|
16
|
+
* const collector = createCollector();
|
|
17
|
+
* collector.collect("postgres:query", toolResult1, { query: "SELECT *" });
|
|
18
|
+
* collector.collect("viz:render", toolResult2);
|
|
19
|
+
*
|
|
20
|
+
* // 2. Compose into a descriptor
|
|
21
|
+
* const descriptor = buildCompositeUi(collector.getResources(), {
|
|
22
|
+
* layout: "split",
|
|
23
|
+
* sync: [{ from: "postgres:query", event: "filter", to: "viz:render", action: "update" }],
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* // 3. Render to HTML
|
|
27
|
+
* const html = renderComposite(descriptor);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
import "./_dnt.polyfills.js";
|
|
31
|
+
export type { AdvertisedComponentCatalog, CollectedUiResource, ComponentSurface, ComponentSurfaceItem, ComponentSurfaceLayout, ComponentSurfaceResolution, CompositeUiDescriptor, JsonValue, McpToolResult, McpUiCsp, McpUiPermissions, McpUiResourceMeta, McpUiToolMeta, ReadyComponentSurface, ResolvedSyncRule, SurfaceGap, SurfaceLayoutType, UiLayout, UiOrchestration, UiPortSyncRule, UiSyncRule, UnresolvedComponentSurface, ValidationIssue, ValidationResult, ViewComponentDescriptor, ViewComponentEventPorts, } from "./src/core/types/mod.js";
|
|
32
|
+
export { ErrorCode, isValidLayout, UI_LAYOUT_PRESETS } from "./src/core/types/mod.js";
|
|
33
|
+
export { createCollector, extractUiMeta } from "./src/core/collector/mod.js";
|
|
34
|
+
export type { UiCollector } from "./src/core/collector/mod.js";
|
|
35
|
+
export { resolveSyncRules, validateSyncRules } from "./src/core/sync/mod.js";
|
|
36
|
+
export type { ResolutionResult } from "./src/core/sync/mod.js";
|
|
37
|
+
export { buildCompositeUi } from "./src/core/composer/mod.js";
|
|
38
|
+
export { resolveComponentSurface } from "./src/core/components/mod.js";
|
|
39
|
+
export { renderComposite } from "./src/host/renderer/mod.js";
|
|
40
|
+
export { createMcpSdkCollector } from "./src/sdk/mod.js";
|
|
41
|
+
export type { McpSdkCallToolResult, McpSdkCollector } from "./src/sdk/mod.js";
|
|
42
|
+
export { uiMeta } from "./src/sdk/mod.js";
|
|
43
|
+
export type { UiMetaOptions, UiMetaResult, UiMetaUi } from "./src/sdk/mod.js";
|
|
44
|
+
export { validateComposition } from "./src/sdk/mod.js";
|
|
45
|
+
export type { CompositionIssue, CompositionIssueCode, CompositionValidationResult, } from "./src/sdk/mod.js";
|
|
46
|
+
export { COMPOSE_EVENT_METHOD, composeEvents } from "./src/sdk/mod.js";
|
|
47
|
+
export type { ComposeEventHandler, ComposeEventPayload, ComposeEvents, ComposeSource, ComposeTarget, } from "./src/sdk/mod.js";
|
|
48
|
+
export type { CompositeUiHost, HostConfig } from "./src/host/mod.js";
|
|
49
|
+
//# sourceMappingURL=mod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,qBAAqB,CAAC;AAE7B,YAAY,EACV,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,qBAAqB,EACrB,SAAS,EACT,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,cAAc,EACd,UAAU,EACV,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC7E,YAAY,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACvE,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,aAAa,GACd,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC"}
|
package/script/mod.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* mcp-compose — MCP Apps UI Orchestrator
|
|
4
|
+
*
|
|
5
|
+
* Lightweight library for composing and synchronizing multiple MCP Apps UIs
|
|
6
|
+
* into composite dashboards.
|
|
7
|
+
*
|
|
8
|
+
* Pipeline: Collector -> Composer -> Renderer
|
|
9
|
+
*
|
|
10
|
+
* @module mcp-compose
|
|
11
|
+
*
|
|
12
|
+
* @example Basic usage
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { createCollector, buildCompositeUi, renderComposite } from "@mcpview/compose";
|
|
15
|
+
*
|
|
16
|
+
* // 1. Collect UI resources from MCP tool results
|
|
17
|
+
* const collector = createCollector();
|
|
18
|
+
* collector.collect("postgres:query", toolResult1, { query: "SELECT *" });
|
|
19
|
+
* collector.collect("viz:render", toolResult2);
|
|
20
|
+
*
|
|
21
|
+
* // 2. Compose into a descriptor
|
|
22
|
+
* const descriptor = buildCompositeUi(collector.getResources(), {
|
|
23
|
+
* layout: "split",
|
|
24
|
+
* sync: [{ from: "postgres:query", event: "filter", to: "viz:render", action: "update" }],
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* // 3. Render to HTML
|
|
28
|
+
* const html = renderComposite(descriptor);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.composeEvents = exports.COMPOSE_EVENT_METHOD = exports.validateComposition = exports.uiMeta = exports.createMcpSdkCollector = exports.renderComposite = exports.resolveComponentSurface = exports.buildCompositeUi = exports.validateSyncRules = exports.resolveSyncRules = exports.extractUiMeta = exports.createCollector = exports.UI_LAYOUT_PRESETS = exports.isValidLayout = exports.ErrorCode = void 0;
|
|
33
|
+
// Core — types, collector, sync, composer, renderer
|
|
34
|
+
require("./_dnt.polyfills.js");
|
|
35
|
+
var mod_js_1 = require("./src/core/types/mod.js");
|
|
36
|
+
Object.defineProperty(exports, "ErrorCode", { enumerable: true, get: function () { return mod_js_1.ErrorCode; } });
|
|
37
|
+
Object.defineProperty(exports, "isValidLayout", { enumerable: true, get: function () { return mod_js_1.isValidLayout; } });
|
|
38
|
+
Object.defineProperty(exports, "UI_LAYOUT_PRESETS", { enumerable: true, get: function () { return mod_js_1.UI_LAYOUT_PRESETS; } });
|
|
39
|
+
var mod_js_2 = require("./src/core/collector/mod.js");
|
|
40
|
+
Object.defineProperty(exports, "createCollector", { enumerable: true, get: function () { return mod_js_2.createCollector; } });
|
|
41
|
+
Object.defineProperty(exports, "extractUiMeta", { enumerable: true, get: function () { return mod_js_2.extractUiMeta; } });
|
|
42
|
+
var mod_js_3 = require("./src/core/sync/mod.js");
|
|
43
|
+
Object.defineProperty(exports, "resolveSyncRules", { enumerable: true, get: function () { return mod_js_3.resolveSyncRules; } });
|
|
44
|
+
Object.defineProperty(exports, "validateSyncRules", { enumerable: true, get: function () { return mod_js_3.validateSyncRules; } });
|
|
45
|
+
var mod_js_4 = require("./src/core/composer/mod.js");
|
|
46
|
+
Object.defineProperty(exports, "buildCompositeUi", { enumerable: true, get: function () { return mod_js_4.buildCompositeUi; } });
|
|
47
|
+
var mod_js_5 = require("./src/core/components/mod.js");
|
|
48
|
+
Object.defineProperty(exports, "resolveComponentSurface", { enumerable: true, get: function () { return mod_js_5.resolveComponentSurface; } });
|
|
49
|
+
var mod_js_6 = require("./src/host/renderer/mod.js");
|
|
50
|
+
Object.defineProperty(exports, "renderComposite", { enumerable: true, get: function () { return mod_js_6.renderComposite; } });
|
|
51
|
+
// SDK — MCP client adapters (optional convenience wrappers)
|
|
52
|
+
var mod_js_7 = require("./src/sdk/mod.js");
|
|
53
|
+
Object.defineProperty(exports, "createMcpSdkCollector", { enumerable: true, get: function () { return mod_js_7.createMcpSdkCollector; } });
|
|
54
|
+
var mod_js_8 = require("./src/sdk/mod.js");
|
|
55
|
+
Object.defineProperty(exports, "uiMeta", { enumerable: true, get: function () { return mod_js_8.uiMeta; } });
|
|
56
|
+
var mod_js_9 = require("./src/sdk/mod.js");
|
|
57
|
+
Object.defineProperty(exports, "validateComposition", { enumerable: true, get: function () { return mod_js_9.validateComposition; } });
|
|
58
|
+
var mod_js_10 = require("./src/sdk/mod.js");
|
|
59
|
+
Object.defineProperty(exports, "COMPOSE_EVENT_METHOD", { enumerable: true, get: function () { return mod_js_10.COMPOSE_EVENT_METHOD; } });
|
|
60
|
+
Object.defineProperty(exports, "composeEvents", { enumerable: true, get: function () { return mod_js_10.composeEvents; } });
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI resource collector — inspects MCP tool results and accumulates UI resources.
|
|
3
|
+
*
|
|
4
|
+
* @module collector/collector
|
|
5
|
+
*/
|
|
6
|
+
import type { CollectedUiResource } from "../types/resources.js";
|
|
7
|
+
import type { ComponentSurface } from "../types/components.js";
|
|
8
|
+
/**
|
|
9
|
+
* Collector interface for accumulating UI resources from MCP tool results.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const collector = createCollector();
|
|
14
|
+
* collector.collect("postgres:query", toolResult);
|
|
15
|
+
* collector.collect("viz:render", vizResult);
|
|
16
|
+
* const resources = collector.getResources();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface UiCollector {
|
|
20
|
+
/** Inspect a tool result and collect any UI resource. Returns the resource or `null`. */
|
|
21
|
+
collect(toolName: string, result: unknown, context?: Record<string, unknown>, options?: {
|
|
22
|
+
readonly componentId?: string;
|
|
23
|
+
readonly surface?: ComponentSurface;
|
|
24
|
+
}): CollectedUiResource | null;
|
|
25
|
+
/** Get all collected resources in slot order. */
|
|
26
|
+
getResources(): CollectedUiResource[];
|
|
27
|
+
/** Reset collected resources. */
|
|
28
|
+
clear(): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create a new UI resource collector.
|
|
32
|
+
*
|
|
33
|
+
* The collector inspects MCP tool call results for `_meta.ui.resourceUri`
|
|
34
|
+
* and accumulates them with auto-incrementing slot indices.
|
|
35
|
+
*
|
|
36
|
+
* @returns A new `UiCollector` instance
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const collector = createCollector();
|
|
41
|
+
*
|
|
42
|
+
* const r1 = collector.collect("postgres:query", {
|
|
43
|
+
* content: [{ type: "text", text: "OK" }],
|
|
44
|
+
* _meta: { ui: { resourceUri: "ui://pg/table/1" } },
|
|
45
|
+
* });
|
|
46
|
+
* // r1 === { source: "postgres:query", resourceUri: "ui://pg/table/1", slot: 0 }
|
|
47
|
+
*
|
|
48
|
+
* const r2 = collector.collect("viz:render", {
|
|
49
|
+
* content: [{ type: "text", text: "Chart" }],
|
|
50
|
+
* _meta: { ui: { resourceUri: "ui://viz/chart/2" } },
|
|
51
|
+
* });
|
|
52
|
+
* // r2.slot === 1
|
|
53
|
+
*
|
|
54
|
+
* collector.getResources().length; // 2
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function createCollector(): UiCollector;
|
|
58
|
+
//# sourceMappingURL=collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../../../src/src/core/collector/collector.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW;IAC1B,yFAAyF;IACzF,OAAO,CACL,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;KACrC,GACA,mBAAmB,GAAG,IAAI,CAAC;IAE9B,iDAAiD;IACjD,YAAY,IAAI,mBAAmB,EAAE,CAAC;IAEtC,iCAAiC;IACjC,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,IAAI,WAAW,CAuC7C"}
|