@happyvertical/smrt-svelte 0.53.1 → 0.53.2
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/package.json +15 -15
- package/dist/__tests__/app-state.test.js +0 -156
- package/dist/__tests__/data-surface-bridge.test.js +0 -351
- package/dist/__tests__/provider-mode-harness.svelte +0 -14
- package/dist/__tests__/provider-mode-harness.svelte.d.ts +0 -11
- package/dist/__tests__/provider-mode-harness.svelte.d.ts.map +0 -1
- package/dist/__tests__/provider-mode-probe.svelte +0 -13
- package/dist/__tests__/provider-mode-probe.svelte.d.ts +0 -8
- package/dist/__tests__/provider-mode-probe.svelte.d.ts.map +0 -1
- package/dist/__tests__/provider-webmcp-harness.svelte +0 -14
- package/dist/__tests__/provider-webmcp-harness.svelte.d.ts +0 -8
- package/dist/__tests__/provider-webmcp-harness.svelte.d.ts.map +0 -1
- package/dist/__tests__/success-never-text.test.js +0 -100
- package/dist/__tests__/warm-clients.test.js +0 -186
- package/dist/browser-ai/adapters/llm/bitgpu-inference-backend.test.js +0 -464
- package/dist/browser-ai/adapters/llm/webllm-inference-backend.test.js +0 -646
- package/dist/browser-ai/adapters/stt/browser-speech.test.js +0 -113
- package/dist/browser-ai/adapters/stt/dictation-source.test.js +0 -52
- package/dist/browser-ai/svelte/components/__tests__/ModelStatusControl.test.js +0 -172
- package/dist/components/board/__tests__/Board.test.js +0 -498
- package/dist/components/board/__tests__/BoardSsrHarness.svelte +0 -30
- package/dist/components/board/__tests__/BoardSsrHarness.svelte.d.ts +0 -19
- package/dist/components/board/__tests__/BoardSsrHarness.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/AddressInput.behavior.test.js +0 -216
- package/dist/components/forms/__tests__/CheckboxInput.test.js +0 -92
- package/dist/components/forms/__tests__/DateRangeInput.behavior.test.js +0 -135
- package/dist/components/forms/__tests__/DateTimeInput.behavior.test.js +0 -113
- package/dist/components/forms/__tests__/FileUpload.error-alert.test.js +0 -37
- package/dist/components/forms/__tests__/FileUpload.native-form.test.js +0 -249
- package/dist/components/forms/__tests__/FileUpload.test.js +0 -90
- package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte +0 -24
- package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte.d.ts +0 -10
- package/dist/components/forms/__tests__/FileUploadReset.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/Form.behavior.test.js +0 -137
- package/dist/components/forms/__tests__/Form.extraction.test.js +0 -68
- package/dist/components/forms/__tests__/Form.stt-error.test.js +0 -57
- package/dist/components/forms/__tests__/Form.test.js +0 -86
- package/dist/components/forms/__tests__/Form.ui-controls.test.js +0 -119
- package/dist/components/forms/__tests__/Form.webmcp.test.js +0 -2336
- package/dist/components/forms/__tests__/FormMicButton.test.js +0 -92
- package/dist/components/forms/__tests__/FormScope.test.js +0 -39
- package/dist/components/forms/__tests__/MeasurementInput.behavior.test.js +0 -129
- package/dist/components/forms/__tests__/MoneyInput.behavior.test.js +0 -124
- package/dist/components/forms/__tests__/NumberInput.behavior.test.js +0 -151
- package/dist/components/forms/__tests__/PhoneInput.behavior.test.js +0 -96
- package/dist/components/forms/__tests__/SearchInput.test.js +0 -79
- package/dist/components/forms/__tests__/SelectInput.behavior.test.js +0 -132
- package/dist/components/forms/__tests__/TextInput.behavior.test.js +0 -131
- package/dist/components/forms/__tests__/TextareaInput.behavior.test.js +0 -96
- package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte +0 -30
- package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte.d.ts +0 -7
- package/dist/components/forms/__tests__/async-invalid-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/async-validation-form.fixture.svelte +0 -19
- package/dist/components/forms/__tests__/async-validation-form.fixture.svelte.d.ts +0 -9
- package/dist/components/forms/__tests__/async-validation-form.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte +0 -21
- package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte.d.ts +0 -8
- package/dist/components/forms/__tests__/async-validation-snapshot-form.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/composite-inputs-a11y.test.js +0 -69
- package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte +0 -27
- package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte.d.ts +0 -9
- package/dist/components/forms/__tests__/compound-registration-wrapper.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte +0 -48
- package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte.d.ts +0 -10
- package/dist/components/forms/__tests__/custom-registration-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte +0 -26
- package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte.d.ts +0 -13
- package/dist/components/forms/__tests__/form-extraction-values.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte +0 -52
- package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte.d.ts +0 -16
- package/dist/components/forms/__tests__/form-registration-lifecycle.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-scope.fixture.svelte +0 -30
- package/dist/components/forms/__tests__/form-scope.fixture.svelte.d.ts +0 -10
- package/dist/components/forms/__tests__/form-scope.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-fields.fixture.svelte +0 -158
- package/dist/components/forms/__tests__/form-with-fields.fixture.svelte.d.ts +0 -51
- package/dist/components/forms/__tests__/form-with-fields.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte +0 -24
- package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte.d.ts +0 -11
- package/dist/components/forms/__tests__/form-with-policy-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte +0 -105
- package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte.d.ts +0 -42
- package/dist/components/forms/__tests__/form-with-structured-fields.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte +0 -84
- package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte.d.ts +0 -14
- package/dist/components/forms/__tests__/form-with-ui-controls.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte +0 -44
- package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte.d.ts +0 -9
- package/dist/components/forms/__tests__/legacy-form-context.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/mic-keyboard-a11y.test.js +0 -74
- package/dist/components/forms/__tests__/policy-field.fixture.svelte +0 -35
- package/dist/components/forms/__tests__/policy-field.fixture.svelte.d.ts +0 -8
- package/dist/components/forms/__tests__/policy-field.fixture.svelte.d.ts.map +0 -1
- package/dist/components/forms/__tests__/rich-inputs-a11y.test.js +0 -87
- package/dist/components/settings/__tests__/SettingsCatalog.test.js +0 -69
- package/dist/components/settings/__tests__/catalog.test.js +0 -46
- package/dist/components/workspace/__tests__/AdminShell.responsive.test.js +0 -597
- package/dist/components/workspace/__tests__/AdminShell.test.js +0 -572
- package/dist/components/workspace/__tests__/RoleShell.test.js +0 -772
- package/dist/components/workspace/__tests__/TenantNav.test.js +0 -208
- package/dist/components/workspace/__tests__/WorkspaceAccountMenu.test.js +0 -79
- package/dist/components/workspace/__tests__/WorkspaceShell.test.js +0 -630
- package/dist/components/workspace/__tests__/admin-shell-header-overflow.test.js +0 -25
- package/dist/components/workspace/__tests__/admin-shell-hotkeys.test.js +0 -34
- package/dist/components/workspace/__tests__/admin-shell-mobile.test.js +0 -217
- package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte +0 -52
- package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte.d.ts +0 -23
- package/dist/components/workspace/__tests__/admin-shell-mutation-effect-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/admin-shell-page-contracts.test.js +0 -30
- package/dist/components/workspace/__tests__/admin-shell-responsive-state.test.js +0 -184
- package/dist/components/workspace/__tests__/admin-shell-settings.test.js +0 -25
- package/dist/components/workspace/__tests__/admin-shell-state.test.js +0 -286
- package/dist/components/workspace/__tests__/admin-shell-theme-hooks.test.js +0 -36
- package/dist/components/workspace/__tests__/breadcrumbs-helpers.test.js +0 -141
- package/dist/components/workspace/__tests__/context-forwarding-harness.svelte +0 -45
- package/dist/components/workspace/__tests__/context-forwarding-harness.svelte.d.ts +0 -21
- package/dist/components/workspace/__tests__/context-forwarding-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/define-tools-dock.test.js +0 -1188
- package/dist/components/workspace/__tests__/harness.svelte +0 -25
- package/dist/components/workspace/__tests__/harness.svelte.d.ts +0 -14
- package/dist/components/workspace/__tests__/harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/index.test.js +0 -28
- package/dist/components/workspace/__tests__/legacy-index.test.js +0 -9
- package/dist/components/workspace/__tests__/manifest-nav-helpers.test.js +0 -24
- package/dist/components/workspace/__tests__/manifest-nav.test.js +0 -599
- package/dist/components/workspace/__tests__/nav-helpers.test.js +0 -95
- package/dist/components/workspace/__tests__/render-harness.svelte +0 -66
- package/dist/components/workspace/__tests__/render-harness.svelte.d.ts +0 -32
- package/dist/components/workspace/__tests__/render-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/render-tools-dock.test.js +0 -260
- package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte +0 -58
- package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte.d.ts +0 -16
- package/dist/components/workspace/__tests__/role-shell-bind-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte +0 -41
- package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte.d.ts +0 -13
- package/dist/components/workspace/__tests__/role-shell-switch-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/shell-chrome-components.test.js +0 -108
- package/dist/components/workspace/__tests__/system-feed.test.js +0 -327
- package/dist/components/workspace/__tests__/test-icon.svelte +0 -17
- package/dist/components/workspace/__tests__/test-icon.svelte.d.ts +0 -19
- package/dist/components/workspace/__tests__/test-icon.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte +0 -38
- package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte.d.ts +0 -22
- package/dist/components/workspace/__tests__/typed-tool-fixture/TypedTool.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.d.ts +0 -66
- package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/register-typed-tool.js +0 -115
- package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.d.ts +0 -15
- package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/typed-tool-fixture/typed-tool-types.js +0 -7
- package/dist/components/workspace/__tests__/typed-tool-fixture.test.js +0 -115
- package/dist/components/workspace/__tests__/use-harness-orphan.svelte +0 -9
- package/dist/components/workspace/__tests__/use-harness-orphan.svelte.d.ts +0 -19
- package/dist/components/workspace/__tests__/use-harness-orphan.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/use-harness.svelte +0 -23
- package/dist/components/workspace/__tests__/use-harness.svelte.d.ts +0 -8
- package/dist/components/workspace/__tests__/use-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/__tests__/use-tools-dock.test.js +0 -33
- package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte +0 -43
- package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte.d.ts +0 -11
- package/dist/components/workspace/__tests__/workspace-shell-bind-harness.svelte.d.ts.map +0 -1
- package/dist/components/workspace/server/__tests__/compose-availability.test.js +0 -383
- package/dist/components/workspace/server/__tests__/typed-context-fixture.d.ts +0 -78
- package/dist/components/workspace/server/__tests__/typed-context-fixture.d.ts.map +0 -1
- package/dist/components/workspace/server/__tests__/typed-context-fixture.js +0 -104
- package/dist/hooks/__tests__/stt-consumer.fixture.svelte +0 -25
- package/dist/hooks/__tests__/stt-consumer.fixture.svelte.d.ts +0 -15
- package/dist/hooks/__tests__/stt-consumer.fixture.svelte.d.ts.map +0 -1
- package/dist/hooks/__tests__/stt-ownership-harness.svelte +0 -42
- package/dist/hooks/__tests__/stt-ownership-harness.svelte.d.ts +0 -20
- package/dist/hooks/__tests__/stt-ownership-harness.svelte.d.ts.map +0 -1
- package/dist/hooks/__tests__/useSTT-ownership.test.js +0 -102
- package/dist/i18n/__tests__/server.spec.js +0 -57
- package/dist/internal/logger.test.js +0 -54
- package/dist/provider-mode.test.js +0 -86
- package/dist/provider-webmcp.test.js +0 -244
- package/dist/state/__tests__/app-state-ai-lifecycle.test.js +0 -240
- package/dist/state/__tests__/warm-clients.test.js +0 -40
- package/dist/web/__tests__/activity-feed-harness.svelte +0 -32
- package/dist/web/__tests__/activity-feed-harness.svelte.d.ts +0 -18
- package/dist/web/__tests__/activity-feed-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/activity-feed.integration.svelte.test.js +0 -190
- package/dist/web/__tests__/activity-feed.svelte.test.js +0 -235
- package/dist/web/__tests__/assistant-dock.integration.svelte.test.js +0 -204
- package/dist/web/__tests__/data-surface-conformance.integration.svelte.test.js +0 -1392
- package/dist/web/__tests__/harness.svelte +0 -25
- package/dist/web/__tests__/harness.svelte.d.ts +0 -15
- package/dist/web/__tests__/harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/list-data-surface.fixture.svelte +0 -59
- package/dist/web/__tests__/list-data-surface.fixture.svelte.d.ts +0 -14
- package/dist/web/__tests__/list-data-surface.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/list-data-surface.svelte.test.js +0 -106
- package/dist/web/__tests__/list-data-surface.test.js +0 -651
- package/dist/web/__tests__/list-sort-surface.fixture.svelte +0 -41
- package/dist/web/__tests__/list-sort-surface.fixture.svelte.d.ts +0 -15
- package/dist/web/__tests__/list-sort-surface.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/list-sort-surface.svelte.test.js +0 -59
- package/dist/web/__tests__/live-collection.svelte.test.js +0 -185
- package/dist/web/__tests__/provider-ui-registry.fixture.svelte +0 -43
- package/dist/web/__tests__/provider-ui-registry.fixture.svelte.d.ts +0 -13
- package/dist/web/__tests__/provider-ui-registry.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/provider-ui-registry.test.js +0 -235
- package/dist/web/__tests__/remote-query-harness.svelte +0 -27
- package/dist/web/__tests__/remote-query-harness.svelte.d.ts +0 -11
- package/dist/web/__tests__/remote-query-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/remote-query.svelte.test.js +0 -101
- package/dist/web/__tests__/surfaces.child.fixture.svelte +0 -69
- package/dist/web/__tests__/surfaces.child.fixture.svelte.d.ts +0 -16
- package/dist/web/__tests__/surfaces.child.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/surfaces.fixture.svelte +0 -26
- package/dist/web/__tests__/surfaces.fixture.svelte.d.ts +0 -18
- package/dist/web/__tests__/surfaces.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/surfaces.svelte.test.js +0 -140
- package/dist/web/__tests__/update-available-harness.svelte +0 -46
- package/dist/web/__tests__/update-available-harness.svelte.d.ts +0 -22
- package/dist/web/__tests__/update-available-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/update-available.svelte.test.js +0 -137
- package/dist/web/__tests__/view-intent-provider.fixture.svelte +0 -28
- package/dist/web/__tests__/view-intent-provider.fixture.svelte.d.ts +0 -13
- package/dist/web/__tests__/view-intent-provider.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/view-intent.fixture.svelte +0 -33
- package/dist/web/__tests__/view-intent.fixture.svelte.d.ts +0 -15
- package/dist/web/__tests__/view-intent.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/view-intent.intents.d.ts +0 -14
- package/dist/web/__tests__/view-intent.intents.d.ts.map +0 -1
- package/dist/web/__tests__/view-intent.intents.js +0 -38
- package/dist/web/__tests__/view-intent.svelte.test.js +0 -244
- package/dist/web/__tests__/webmcp-composed.child.fixture.svelte +0 -73
- package/dist/web/__tests__/webmcp-composed.child.fixture.svelte.d.ts +0 -8
- package/dist/web/__tests__/webmcp-composed.child.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-composed.fixture.svelte +0 -52
- package/dist/web/__tests__/webmcp-composed.fixture.svelte.d.ts +0 -12
- package/dist/web/__tests__/webmcp-composed.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-composed.integration.svelte.test.js +0 -251
- package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte +0 -16
- package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte.d.ts +0 -19
- package/dist/web/__tests__/webmcp-effects-reactivity.child.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte +0 -11
- package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte.d.ts +0 -8
- package/dist/web/__tests__/webmcp-effects-reactivity.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte +0 -20
- package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte.d.ts +0 -7
- package/dist/web/__tests__/webmcp-harness-reactive-samename.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-harness-unannotated.svelte +0 -14
- package/dist/web/__tests__/webmcp-harness-unannotated.svelte.d.ts +0 -19
- package/dist/web/__tests__/webmcp-harness-unannotated.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-harness.svelte +0 -18
- package/dist/web/__tests__/webmcp-harness.svelte.d.ts +0 -7
- package/dist/web/__tests__/webmcp-harness.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-ssr.fixture.svelte +0 -13
- package/dist/web/__tests__/webmcp-ssr.fixture.svelte.d.ts +0 -19
- package/dist/web/__tests__/webmcp-ssr.fixture.svelte.d.ts.map +0 -1
- package/dist/web/__tests__/webmcp-ui.test.js +0 -723
- package/dist/web/__tests__/webmcp.test.js +0 -234
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { DataSurfaceRegistry } from '@happyvertical/smrt-ui/data';
|
|
2
|
-
import type { ControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
3
|
-
import type { ViewIntent } from '@happyvertical/smrt-web';
|
|
4
|
-
import type { UseViewIntentOptions, ViewIntentIdentity } from '../view-intent.svelte.js';
|
|
5
|
-
type $$ComponentProps = {
|
|
6
|
-
intent: ViewIntent;
|
|
7
|
-
identity: ViewIntentIdentity;
|
|
8
|
-
controlRegistry?: ControlInteractionRegistry;
|
|
9
|
-
dataSurfaceRegistry?: DataSurfaceRegistry;
|
|
10
|
-
effects?: UseViewIntentOptions['effects'];
|
|
11
|
-
};
|
|
12
|
-
declare const ViewIntent: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
13
|
-
type ViewIntent = ReturnType<typeof ViewIntent>;
|
|
14
|
-
export default ViewIntent;
|
|
15
|
-
//# sourceMappingURL=view-intent.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"view-intent.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../src/web/__tests__/view-intent.fixture.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAGjC,KAAK,gBAAgB,GAAI;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,eAAe,CAAC,EAAE,0BAA0B,CAAC;IAC7C,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,OAAO,CAAC,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC3C,CAAC;AA4BF,QAAA,MAAM,UAAU,sDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A worked example of the `Foo.intents.ts` sidecar convention (#2588).
|
|
3
|
-
*
|
|
4
|
-
* Every declaration below is a module-scope `defineIntent({ ... })` call with
|
|
5
|
-
* a single object literal — no spreads, no conditionals, no computed values —
|
|
6
|
-
* in a `.ts` module, which is exactly the form #2591's scanner matches
|
|
7
|
-
* without evaluating this file.
|
|
8
|
-
*/
|
|
9
|
-
export declare const revealNotesIntent: import("@happyvertical/smrt-web").ViewIntent;
|
|
10
|
-
export declare const stageNotesIntent: import("@happyvertical/smrt-web").ViewIntent;
|
|
11
|
-
/** No `capability` at all — classifies fail-closed as destructive. */
|
|
12
|
-
export declare const clearNotesIntent: import("@happyvertical/smrt-web").ViewIntent;
|
|
13
|
-
export declare const nextPageIntent: import("@happyvertical/smrt-web").ViewIntent;
|
|
14
|
-
//# sourceMappingURL=view-intent.intents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"view-intent.intents.d.ts","sourceRoot":"","sources":["../../../src/web/__tests__/view-intent.intents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,iBAAiB,8CAK5B,CAAC;AAEH,eAAO,MAAM,gBAAgB,8CAU3B,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,8CAI3B,CAAC;AAEH,eAAO,MAAM,cAAc,8CAKzB,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A worked example of the `Foo.intents.ts` sidecar convention (#2588).
|
|
3
|
-
*
|
|
4
|
-
* Every declaration below is a module-scope `defineIntent({ ... })` call with
|
|
5
|
-
* a single object literal — no spreads, no conditionals, no computed values —
|
|
6
|
-
* in a `.ts` module, which is exactly the form #2591's scanner matches
|
|
7
|
-
* without evaluating this file.
|
|
8
|
-
*/
|
|
9
|
-
import { defineIntent } from '@happyvertical/smrt-web/intents';
|
|
10
|
-
export const revealNotesIntent = defineIntent({
|
|
11
|
-
id: 'fixture.reveal_notes',
|
|
12
|
-
description: 'Scroll the notes field into view',
|
|
13
|
-
capability: { effect: 'read', idempotent: true, openWorld: false },
|
|
14
|
-
target: { registry: 'control', action: 'reveal' },
|
|
15
|
-
});
|
|
16
|
-
export const stageNotesIntent = defineIntent({
|
|
17
|
-
id: 'fixture.stage_notes',
|
|
18
|
-
description: 'Propose a value for the notes field',
|
|
19
|
-
capability: { effect: 'write', idempotent: true, openWorld: false },
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: 'object',
|
|
22
|
-
properties: { value: { type: 'string' } },
|
|
23
|
-
required: ['value'],
|
|
24
|
-
},
|
|
25
|
-
target: { registry: 'control', action: 'stage' },
|
|
26
|
-
});
|
|
27
|
-
/** No `capability` at all — classifies fail-closed as destructive. */
|
|
28
|
-
export const clearNotesIntent = defineIntent({
|
|
29
|
-
id: 'fixture.clear_notes',
|
|
30
|
-
description: 'Clear the notes field',
|
|
31
|
-
target: { registry: 'control', action: 'clear' },
|
|
32
|
-
});
|
|
33
|
-
export const nextPageIntent = defineIntent({
|
|
34
|
-
id: 'fixture.next_page',
|
|
35
|
-
description: 'Advance the orders table by one page',
|
|
36
|
-
capability: { effect: 'read', idempotent: false, openWorld: false },
|
|
37
|
-
target: { registry: 'dataSurface', controlId: 'next-page', kind: 'table' },
|
|
38
|
-
});
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Svelte binding for declarative view intents (#2588).
|
|
3
|
-
*
|
|
4
|
-
* The contract, registry, and compilation are covered in
|
|
5
|
-
* `@happyvertical/smrt-web` (`src/intents.test.ts`). What is proven HERE is
|
|
6
|
-
* the binding: that a declared intent reaches WebMCP through the shared
|
|
7
|
-
* `useWebMcpTool` lifecycle and the Provider's exposure policy, and that
|
|
8
|
-
* executing it moves only mounted registry state.
|
|
9
|
-
*/
|
|
10
|
-
import { createDataSurfaceRegistry } from '@happyvertical/smrt-ui/data';
|
|
11
|
-
import { createControlInteractionRegistry } from '@happyvertical/smrt-ui/forms';
|
|
12
|
-
import { WebMcpToolNameCollisionError, webMcpToolNameOwner, } from '@happyvertical/smrt-web';
|
|
13
|
-
import { render } from '@testing-library/svelte';
|
|
14
|
-
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
15
|
-
const registerBespokeSpy = vi.hoisted(() => vi.fn());
|
|
16
|
-
vi.mock('@happyvertical/smrt-web', async (importOriginal) => {
|
|
17
|
-
const actual = await importOriginal();
|
|
18
|
-
registerBespokeSpy.mockImplementation(actual.registerWebMcpBespokeTool);
|
|
19
|
-
return { ...actual, registerWebMcpBespokeTool: registerBespokeSpy };
|
|
20
|
-
});
|
|
21
|
-
import Fixture from './view-intent.fixture.svelte';
|
|
22
|
-
import { clearNotesIntent, nextPageIntent, revealNotesIntent, stageNotesIntent, } from './view-intent.intents.js';
|
|
23
|
-
import ProviderFixture from './view-intent-provider.fixture.svelte';
|
|
24
|
-
function installModelContext() {
|
|
25
|
-
const registered = [];
|
|
26
|
-
document.modelContext = {
|
|
27
|
-
async registerTool(tool, options) {
|
|
28
|
-
registered.push({ ...tool, signal: options?.signal });
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
return registered;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* A Provider that enables the UI adapter also registers the six fixed
|
|
35
|
-
* `smrt_ui_*` tools into the same array, so every Provider-mounted assertion
|
|
36
|
-
* selects by NAME rather than by index or length — the pattern
|
|
37
|
-
* `webmcp-composed.integration.svelte.test.ts` already established.
|
|
38
|
-
*/
|
|
39
|
-
function toolNamed(registered, name) {
|
|
40
|
-
return registered.find((tool) => tool.name === name);
|
|
41
|
-
}
|
|
42
|
-
function mountedControlRegistry() {
|
|
43
|
-
const registry = createControlInteractionRegistry();
|
|
44
|
-
let value = 'before';
|
|
45
|
-
registry.register({
|
|
46
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
47
|
-
metadata: { kind: 'text', label: 'Notes', readable: true, writable: true },
|
|
48
|
-
getValue: () => value,
|
|
49
|
-
setValue: (next) => {
|
|
50
|
-
value = String(next);
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
return registry;
|
|
54
|
-
}
|
|
55
|
-
afterEach(() => {
|
|
56
|
-
document.modelContext = undefined;
|
|
57
|
-
registerBespokeSpy.mockClear();
|
|
58
|
-
vi.restoreAllMocks();
|
|
59
|
-
});
|
|
60
|
-
describe('useViewIntent', () => {
|
|
61
|
-
it('registers a declared intent on mount and deregisters on unmount', async () => {
|
|
62
|
-
const registered = installModelContext();
|
|
63
|
-
const view = render(Fixture, {
|
|
64
|
-
props: {
|
|
65
|
-
intent: revealNotesIntent,
|
|
66
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
67
|
-
controlRegistry: mountedControlRegistry(),
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
await vi.waitFor(() => expect(registered).toHaveLength(1));
|
|
71
|
-
expect(registered[0].name).toBe('fixture_reveal_notes');
|
|
72
|
-
expect(registered[0].annotations).toMatchObject({
|
|
73
|
-
readOnlyHint: true,
|
|
74
|
-
destructiveHint: false,
|
|
75
|
-
idempotentHint: true,
|
|
76
|
-
openWorldHint: false,
|
|
77
|
-
untrustedContentHint: true,
|
|
78
|
-
});
|
|
79
|
-
expect(registered[0].signal?.aborted).toBe(false);
|
|
80
|
-
view.unmount();
|
|
81
|
-
expect(registered[0].signal?.aborted).toBe(true);
|
|
82
|
-
});
|
|
83
|
-
it('routes through registerWebMcpBespokeTool, never document.modelContext directly', async () => {
|
|
84
|
-
installModelContext();
|
|
85
|
-
render(Fixture, {
|
|
86
|
-
props: {
|
|
87
|
-
intent: revealNotesIntent,
|
|
88
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
89
|
-
controlRegistry: mountedControlRegistry(),
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
await vi.waitFor(() => expect(registerBespokeSpy).toHaveBeenCalledTimes(1));
|
|
93
|
-
expect(registerBespokeSpy.mock.calls[0][0]).toMatchObject({
|
|
94
|
-
name: 'fixture_reveal_notes',
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
it('resolves the mounted registries from the nearest Provider', async () => {
|
|
98
|
-
const registered = installModelContext();
|
|
99
|
-
const registry = mountedControlRegistry();
|
|
100
|
-
render(ProviderFixture, {
|
|
101
|
-
props: {
|
|
102
|
-
intent: revealNotesIntent,
|
|
103
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
104
|
-
providerRegistry: registry,
|
|
105
|
-
},
|
|
106
|
-
});
|
|
107
|
-
await vi.waitFor(() => expect(toolNamed(registered, 'fixture_reveal_notes')).toBeDefined());
|
|
108
|
-
});
|
|
109
|
-
it("applies the Provider's effects policy to an intent", async () => {
|
|
110
|
-
const registered = installModelContext();
|
|
111
|
-
// `clearNotesIntent` declares no capability, so it classifies
|
|
112
|
-
// fail-closed as destructive and a read-only Provider excludes it.
|
|
113
|
-
render(ProviderFixture, {
|
|
114
|
-
props: {
|
|
115
|
-
intent: clearNotesIntent,
|
|
116
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
117
|
-
providerRegistry: mountedControlRegistry(),
|
|
118
|
-
effects: ['read'],
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
await vi.waitFor(() => expect(registerBespokeSpy).toHaveBeenCalledTimes(1));
|
|
122
|
-
// `owner: 'intent'` rides along on every intent registration so the
|
|
123
|
-
// tool-name lock blames the intent, not a bespoke tool (#2613).
|
|
124
|
-
expect(registerBespokeSpy.mock.calls[0][1]).toEqual({
|
|
125
|
-
effects: ['read'],
|
|
126
|
-
owner: 'intent',
|
|
127
|
-
});
|
|
128
|
-
// The six fixed `smrt_ui_*` tools register alongside it; only the intent
|
|
129
|
-
// must be absent.
|
|
130
|
-
expect(toolNamed(registered, 'fixture_clear_notes')).toBeUndefined();
|
|
131
|
-
});
|
|
132
|
-
it('executes by dispatching one agent-sourced registry command', async () => {
|
|
133
|
-
const registered = installModelContext();
|
|
134
|
-
const registry = mountedControlRegistry();
|
|
135
|
-
const executeSpy = vi.spyOn(registry, 'execute');
|
|
136
|
-
const fetchSpy = vi.spyOn(globalThis, 'fetch');
|
|
137
|
-
render(ProviderFixture, {
|
|
138
|
-
props: {
|
|
139
|
-
intent: stageNotesIntent,
|
|
140
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
141
|
-
providerRegistry: registry,
|
|
142
|
-
effects: ['read', 'write'],
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
await vi.waitFor(() => expect(toolNamed(registered, 'fixture_stage_notes')).toBeDefined());
|
|
146
|
-
const tool = toolNamed(registered, 'fixture_stage_notes');
|
|
147
|
-
if (!tool)
|
|
148
|
-
throw new Error('intent tool was not registered');
|
|
149
|
-
await tool.execute({ value: 'after' });
|
|
150
|
-
expect(fetchSpy).not.toHaveBeenCalled();
|
|
151
|
-
const staged = executeSpy.mock.calls.find(([command]) => command.action === 'stage');
|
|
152
|
-
if (!staged)
|
|
153
|
-
throw new Error('intent did not dispatch a stage command');
|
|
154
|
-
expect(staged[0]).toEqual({
|
|
155
|
-
action: 'stage',
|
|
156
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
157
|
-
value: 'after',
|
|
158
|
-
});
|
|
159
|
-
// Agent-staged values stay proposals: the command is dispatched as
|
|
160
|
-
// `source: 'agent'`, so StagedControlReview and the local-gesture
|
|
161
|
-
// requirement apply unchanged.
|
|
162
|
-
expect(staged[1]).toEqual({ source: 'agent' });
|
|
163
|
-
});
|
|
164
|
-
it('binds a data-surface intent to a mounted surface identity', async () => {
|
|
165
|
-
const registered = installModelContext();
|
|
166
|
-
const registry = createDataSurfaceRegistry();
|
|
167
|
-
const executeSpy = vi.spyOn(registry, 'execute');
|
|
168
|
-
render(Fixture, {
|
|
169
|
-
props: {
|
|
170
|
-
intent: nextPageIntent,
|
|
171
|
-
identity: { surfaceId: 'orders-table', kind: 'table' },
|
|
172
|
-
dataSurfaceRegistry: registry,
|
|
173
|
-
},
|
|
174
|
-
});
|
|
175
|
-
await vi.waitFor(() => expect(registered).toHaveLength(1));
|
|
176
|
-
expect(registered[0].name).toBe('fixture_next_page');
|
|
177
|
-
// Nothing is mounted under that identity, so the intent reports
|
|
178
|
-
// not_found rather than inventing a command.
|
|
179
|
-
expect(JSON.parse(String(await registered[0].execute({})))).toEqual({
|
|
180
|
-
ok: false,
|
|
181
|
-
reason: 'not_found',
|
|
182
|
-
});
|
|
183
|
-
expect(executeSpy).not.toHaveBeenCalled();
|
|
184
|
-
});
|
|
185
|
-
it('is a no-op with no Provider and no explicit registry', async () => {
|
|
186
|
-
const registered = installModelContext();
|
|
187
|
-
render(Fixture, {
|
|
188
|
-
props: {
|
|
189
|
-
intent: revealNotesIntent,
|
|
190
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
191
|
-
},
|
|
192
|
-
});
|
|
193
|
-
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
194
|
-
expect(registered).toHaveLength(0);
|
|
195
|
-
expect(registerBespokeSpy).not.toHaveBeenCalled();
|
|
196
|
-
});
|
|
197
|
-
it('reserves its tool name as `intent`, not `bespoke` (#2613)', async () => {
|
|
198
|
-
// This binding is the only shipped intent path — it reuses
|
|
199
|
-
// `useWebMcpTool` rather than calling `registerViewIntent`, because the
|
|
200
|
-
// WebMCP lifecycle must not be duplicated. A collision against a mounted
|
|
201
|
-
// intent must still blame the INTENT, or an author goes looking for a
|
|
202
|
-
// `useWebMcpTool` call that does not exist.
|
|
203
|
-
const registered = installModelContext();
|
|
204
|
-
const view = render(Fixture, {
|
|
205
|
-
props: {
|
|
206
|
-
intent: revealNotesIntent,
|
|
207
|
-
identity: { formId: 'order-form', controlId: 'notes' },
|
|
208
|
-
controlRegistry: mountedControlRegistry(),
|
|
209
|
-
},
|
|
210
|
-
});
|
|
211
|
-
await vi.waitFor(() => expect(registered).toHaveLength(1));
|
|
212
|
-
expect(registered[0].name).toBe('fixture_reveal_notes');
|
|
213
|
-
expect(webMcpToolNameOwner('fixture_reveal_notes')).toBe('intent');
|
|
214
|
-
let thrown;
|
|
215
|
-
try {
|
|
216
|
-
// What a generated model tool named `fixture_reveal_notes` would hit.
|
|
217
|
-
const { registerWebMcpBespokeTool } = await import('@happyvertical/smrt-web');
|
|
218
|
-
registerWebMcpBespokeTool({
|
|
219
|
-
name: 'fixture_reveal_notes',
|
|
220
|
-
description: 'x',
|
|
221
|
-
inputSchema: { type: 'object' },
|
|
222
|
-
annotations: { readOnlyHint: true },
|
|
223
|
-
execute: () => 'ok',
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
thrown = error;
|
|
228
|
-
}
|
|
229
|
-
expect(thrown).toBeInstanceOf(WebMcpToolNameCollisionError);
|
|
230
|
-
expect(thrown.owner).toBe('intent');
|
|
231
|
-
view.unmount();
|
|
232
|
-
expect(webMcpToolNameOwner('fixture_reveal_notes')).toBeUndefined();
|
|
233
|
-
});
|
|
234
|
-
it('rejects an identity that does not match the declared target registry', () => {
|
|
235
|
-
installModelContext();
|
|
236
|
-
expect(() => render(Fixture, {
|
|
237
|
-
props: {
|
|
238
|
-
intent: revealNotesIntent,
|
|
239
|
-
identity: { surfaceId: 'orders-table', kind: 'table' },
|
|
240
|
-
controlRegistry: mountedControlRegistry(),
|
|
241
|
-
},
|
|
242
|
-
})).toThrow(/needs a \{ formId, controlId \} identity/);
|
|
243
|
-
});
|
|
244
|
-
});
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { DataSurfaceRegistry } from '@happyvertical/smrt-ui/data';
|
|
3
|
-
import {
|
|
4
|
-
type DataSurfaceDescriptor,
|
|
5
|
-
DataTable,
|
|
6
|
-
} from '@happyvertical/smrt-ui/data';
|
|
7
|
-
import Form from '../../components/forms/Form.svelte';
|
|
8
|
-
import TextInput from '../../components/forms/TextInput.svelte';
|
|
9
|
-
import { useWebMcpTool } from '../webmcp.svelte.js';
|
|
10
|
-
|
|
11
|
-
let { dataSurfaceRegistry }: { dataSurfaceRegistry: DataSurfaceRegistry } =
|
|
12
|
-
$props();
|
|
13
|
-
|
|
14
|
-
useWebMcpTool(() => ({
|
|
15
|
-
name: 'fixture_component_preview',
|
|
16
|
-
description:
|
|
17
|
-
'Preview the composed fixture without changing application state.',
|
|
18
|
-
inputSchema: { type: 'object', properties: {} },
|
|
19
|
-
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
20
|
-
execute: () => JSON.stringify({ ok: true, source: 'bespoke-component' }),
|
|
21
|
-
}));
|
|
22
|
-
|
|
23
|
-
// No `annotations`: fail-closed classifies this destructive (#2586), so it
|
|
24
|
-
// must be excluded under the Provider's default read-only exposure policy
|
|
25
|
-
// and must never reach document.modelContext.registerTool.
|
|
26
|
-
useWebMcpTool(() => ({
|
|
27
|
-
name: 'fixture_component_unannotated',
|
|
28
|
-
description: 'A bespoke tool with no declared effect.',
|
|
29
|
-
inputSchema: { type: 'object', properties: {} },
|
|
30
|
-
execute: () =>
|
|
31
|
-
JSON.stringify({ ok: true, source: 'bespoke-component-unannotated' }),
|
|
32
|
-
}));
|
|
33
|
-
|
|
34
|
-
const tableDescriptor: DataSurfaceDescriptor = {
|
|
35
|
-
version: 1,
|
|
36
|
-
identity: { surfaceId: 'fixture-items', kind: 'table' },
|
|
37
|
-
schemaVersion: 1,
|
|
38
|
-
label: 'Fixture items',
|
|
39
|
-
rowKey: 'id',
|
|
40
|
-
columns: [
|
|
41
|
-
{ id: 'id', label: 'ID', capabilities: ['read', 'project'] },
|
|
42
|
-
{
|
|
43
|
-
id: 'name',
|
|
44
|
-
label: 'Name',
|
|
45
|
-
capabilities: ['read', 'search', 'filter', 'sort', 'project'],
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
query: { modes: ['rows', 'count'], projectableColumnIds: ['id', 'name'] },
|
|
49
|
-
controls: ['set-search', 'toggle-sorting'].map((id) => ({ id, label: id })),
|
|
50
|
-
actions: [],
|
|
51
|
-
limits: { maxQueryRows: 50, maxQueryBytes: 10_000, maxSelectionSize: 10 },
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const rows = [
|
|
55
|
-
{ id: 'item-1', name: 'First' },
|
|
56
|
-
{ id: 'item-2', name: 'Second' },
|
|
57
|
-
];
|
|
58
|
-
const columns = [
|
|
59
|
-
{ id: 'id', label: 'ID', accessor: 'id' },
|
|
60
|
-
{ id: 'name', label: 'Name', accessor: 'name', sortable: true },
|
|
61
|
-
];
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<Form formId="fixture-form">
|
|
65
|
-
<TextInput name="title" label="Title" />
|
|
66
|
-
</Form>
|
|
67
|
-
<DataTable
|
|
68
|
-
data={rows}
|
|
69
|
-
{columns}
|
|
70
|
-
rowKey="id"
|
|
71
|
-
sortable={true}
|
|
72
|
-
dataSurface={{ registry: dataSurfaceRegistry, descriptor: tableDescriptor }}
|
|
73
|
-
/>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { DataSurfaceRegistry } from '@happyvertical/smrt-ui/data';
|
|
2
|
-
type $$ComponentProps = {
|
|
3
|
-
dataSurfaceRegistry: DataSurfaceRegistry;
|
|
4
|
-
};
|
|
5
|
-
declare const WebmcpComposed: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
6
|
-
type WebmcpComposed = ReturnType<typeof WebmcpComposed>;
|
|
7
|
-
export default WebmcpComposed;
|
|
8
|
-
//# sourceMappingURL=webmcp-composed.child.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webmcp-composed.child.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../src/web/__tests__/webmcp-composed.child.fixture.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAStE,KAAK,gBAAgB,GAAI;IAAE,mBAAmB,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAoEvE,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { DataSurfaceRegistry } from '@happyvertical/smrt-ui/data';
|
|
3
|
-
import type {
|
|
4
|
-
RegisterWebMcpToolsOptions,
|
|
5
|
-
WebMcpToolDefinition,
|
|
6
|
-
} from '@happyvertical/smrt-web';
|
|
7
|
-
import Provider from '../../Provider.svelte';
|
|
8
|
-
import type { WebMcpProviderConfig } from '../webmcp-provider.js';
|
|
9
|
-
import Child from './webmcp-composed.child.fixture.svelte';
|
|
10
|
-
|
|
11
|
-
let {
|
|
12
|
-
dataSurfaceRegistry,
|
|
13
|
-
generatedDefinitions = [],
|
|
14
|
-
fetchFn,
|
|
15
|
-
showChild = true,
|
|
16
|
-
}: {
|
|
17
|
-
dataSurfaceRegistry: DataSurfaceRegistry;
|
|
18
|
-
generatedDefinitions?: readonly WebMcpToolDefinition[];
|
|
19
|
-
fetchFn?: RegisterWebMcpToolsOptions['fetchFn'];
|
|
20
|
-
showChild?: boolean;
|
|
21
|
-
} = $props();
|
|
22
|
-
|
|
23
|
-
let cachedDefinitions: readonly WebMcpToolDefinition[] | undefined;
|
|
24
|
-
let cachedFetchFn: RegisterWebMcpToolsOptions['fetchFn'] | undefined;
|
|
25
|
-
let cachedRegistry: DataSurfaceRegistry | undefined;
|
|
26
|
-
let cachedWebmcp: WebMcpProviderConfig | undefined;
|
|
27
|
-
const webmcp = $derived.by(() => {
|
|
28
|
-
if (
|
|
29
|
-
cachedWebmcp &&
|
|
30
|
-
cachedDefinitions === generatedDefinitions &&
|
|
31
|
-
cachedFetchFn === fetchFn &&
|
|
32
|
-
cachedRegistry === dataSurfaceRegistry
|
|
33
|
-
) {
|
|
34
|
-
return cachedWebmcp;
|
|
35
|
-
}
|
|
36
|
-
cachedDefinitions = generatedDefinitions;
|
|
37
|
-
cachedFetchFn = fetchFn;
|
|
38
|
-
cachedRegistry = dataSurfaceRegistry;
|
|
39
|
-
cachedWebmcp = {
|
|
40
|
-
definitions: generatedDefinitions,
|
|
41
|
-
...(fetchFn ? { fetchFn } : {}),
|
|
42
|
-
ui: { dataSurfaceRegistry },
|
|
43
|
-
};
|
|
44
|
-
return cachedWebmcp;
|
|
45
|
-
});
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<Provider {webmcp}>
|
|
49
|
-
{#if showChild}
|
|
50
|
-
<Child {dataSurfaceRegistry} />
|
|
51
|
-
{/if}
|
|
52
|
-
</Provider>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { DataSurfaceRegistry } from '@happyvertical/smrt-ui/data';
|
|
2
|
-
import type { RegisterWebMcpToolsOptions, WebMcpToolDefinition } from '@happyvertical/smrt-web';
|
|
3
|
-
type $$ComponentProps = {
|
|
4
|
-
dataSurfaceRegistry: DataSurfaceRegistry;
|
|
5
|
-
generatedDefinitions?: readonly WebMcpToolDefinition[];
|
|
6
|
-
fetchFn?: RegisterWebMcpToolsOptions['fetchFn'];
|
|
7
|
-
showChild?: boolean;
|
|
8
|
-
};
|
|
9
|
-
declare const WebmcpComposed: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
10
|
-
type WebmcpComposed = ReturnType<typeof WebmcpComposed>;
|
|
11
|
-
export default WebmcpComposed;
|
|
12
|
-
//# sourceMappingURL=webmcp-composed.fixture.svelte.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webmcp-composed.fixture.svelte.d.ts","sourceRoot":"","sources":["../../../src/web/__tests__/webmcp-composed.fixture.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EACV,0BAA0B,EAC1B,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAKhC,KAAK,gBAAgB,GAAI;IACxB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,oBAAoB,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACvD,OAAO,CAAC,EAAE,0BAA0B,CAAC,SAAS,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAgDF,QAAA,MAAM,cAAc,sDAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|