@vertesia/common 1.5.0-dev.20260807.073259Z → 1.5.0-dev.20260901.005903Z
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/lib/access-control.d.ts +0 -14
- package/lib/access-control.d.ts.map +1 -1
- package/lib/access-control.js +0 -23
- package/lib/access-control.js.map +1 -1
- package/lib/account-values.d.ts +0 -10
- package/lib/account-values.d.ts.map +1 -1
- package/lib/account-values.js +0 -44
- package/lib/account-values.js.map +1 -1
- package/lib/api-contract/components.generated.json +40405 -0
- package/lib/api-contract/index.d.ts +186 -0
- package/lib/api-contract/index.d.ts.map +1 -0
- package/lib/api-contract/index.js +554 -0
- package/lib/api-contract/index.js.map +1 -0
- package/lib/api-schemas/agent-communication.d.ts +199 -0
- package/lib/api-schemas/agent-communication.d.ts.map +1 -0
- package/lib/api-schemas/agent-communication.js +150 -0
- package/lib/api-schemas/agent-communication.js.map +1 -0
- package/lib/api-schemas/agent-runs.d.ts +593 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -1
- package/lib/api-schemas/agent-runs.js +44 -2
- package/lib/api-schemas/agent-runs.js.map +1 -1
- package/lib/api-schemas/app-lifecycle.d.ts +19 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -1
- package/lib/api-schemas/app-lifecycle.js +34 -4
- package/lib/api-schemas/app-lifecycle.js.map +1 -1
- package/lib/api-schemas/app-runtime.d.ts +9871 -9257
- package/lib/api-schemas/app-runtime.d.ts.map +1 -1
- package/lib/api-schemas/app-runtime.js +7 -0
- package/lib/api-schemas/app-runtime.js.map +1 -1
- package/lib/api-schemas/apps.d.ts +1 -0
- package/lib/api-schemas/apps.d.ts.map +1 -1
- package/lib/api-schemas/apps.js +4 -3
- package/lib/api-schemas/apps.js.map +1 -1
- package/lib/api-schemas/content-query.d.ts +39 -0
- package/lib/api-schemas/content-query.d.ts.map +1 -0
- package/lib/api-schemas/content-query.js +30 -0
- package/lib/api-schemas/content-query.js.map +1 -0
- package/lib/api-schemas/content.d.ts +835 -29
- package/lib/api-schemas/content.d.ts.map +1 -1
- package/lib/api-schemas/content.js +82 -15
- package/lib/api-schemas/content.js.map +1 -1
- package/lib/api-schemas/dashboard.d.ts +4 -0
- package/lib/api-schemas/dashboard.d.ts.map +1 -1
- package/lib/api-schemas/dashboard.js +3 -0
- package/lib/api-schemas/dashboard.js.map +1 -1
- package/lib/api-schemas/document-processing.d.ts +333 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -1
- package/lib/api-schemas/events.d.ts +1007 -4
- package/lib/api-schemas/events.d.ts.map +1 -1
- package/lib/api-schemas/events.js +4 -1
- package/lib/api-schemas/events.js.map +1 -1
- package/lib/api-schemas/files.d.ts +17 -0
- package/lib/api-schemas/files.d.ts.map +1 -1
- package/lib/api-schemas/files.js +23 -0
- package/lib/api-schemas/files.js.map +1 -1
- package/lib/api-schemas/group.d.ts +7 -0
- package/lib/api-schemas/group.d.ts.map +1 -1
- package/lib/api-schemas/group.js +9 -0
- package/lib/api-schemas/group.js.map +1 -1
- package/lib/api-schemas/index.d.ts +4 -0
- package/lib/api-schemas/index.d.ts.map +1 -1
- package/lib/api-schemas/index.js +4 -0
- package/lib/api-schemas/index.js.map +1 -1
- package/lib/api-schemas/integrations.d.ts +19 -5
- package/lib/api-schemas/integrations.d.ts.map +1 -1
- package/lib/api-schemas/integrations.js +25 -2
- package/lib/api-schemas/integrations.js.map +1 -1
- package/lib/api-schemas/interaction.d.ts +8399 -1076
- package/lib/api-schemas/interaction.d.ts.map +1 -1
- package/lib/api-schemas/interaction.js +161 -9
- package/lib/api-schemas/interaction.js.map +1 -1
- package/lib/api-schemas/oauth-server.d.ts +131 -3
- package/lib/api-schemas/oauth-server.d.ts.map +1 -1
- package/lib/api-schemas/oauth-server.js +137 -3
- package/lib/api-schemas/oauth-server.js.map +1 -1
- package/lib/api-schemas/process.d.ts +1295 -0
- package/lib/api-schemas/process.d.ts.map +1 -1
- package/lib/api-schemas/process.js +318 -2
- package/lib/api-schemas/process.js.map +1 -1
- package/lib/api-schemas/project-configuration.d.ts +1118 -1
- package/lib/api-schemas/project-configuration.d.ts.map +1 -1
- package/lib/api-schemas/project-configuration.js +6 -2
- package/lib/api-schemas/project-configuration.js.map +1 -1
- package/lib/api-schemas/project.d.ts +1680 -6
- package/lib/api-schemas/project.d.ts.map +1 -1
- package/lib/api-schemas/registry.d.ts +87529 -69142
- package/lib/api-schemas/registry.d.ts.map +1 -1
- package/lib/api-schemas/registry.js +234 -413
- package/lib/api-schemas/registry.js.map +1 -1
- package/lib/api-schemas/schema-primitives.d.ts +4 -0
- package/lib/api-schemas/schema-primitives.d.ts.map +1 -1
- package/lib/api-schemas/schema-primitives.js +10 -0
- package/lib/api-schemas/schema-primitives.js.map +1 -1
- package/lib/api-schemas/store.d.ts +5596 -37
- package/lib/api-schemas/store.d.ts.map +1 -1
- package/lib/api-schemas/store.js +53 -8
- package/lib/api-schemas/store.js.map +1 -1
- package/lib/api-schemas/tools.d.ts +115 -0
- package/lib/api-schemas/tools.d.ts.map +1 -1
- package/lib/api-schemas/tools.js +55 -0
- package/lib/api-schemas/tools.js.map +1 -1
- package/lib/api-schemas/view-execution.d.ts +330 -854
- package/lib/api-schemas/view-execution.d.ts.map +1 -1
- package/lib/api-schemas/view-execution.js +26 -2
- package/lib/api-schemas/view-execution.js.map +1 -1
- package/lib/api-schemas/views.d.ts +452 -2562
- package/lib/api-schemas/views.d.ts.map +1 -1
- package/lib/api-schemas/views.js +119 -3
- package/lib/api-schemas/views.js.map +1 -1
- package/lib/api-schemas/workflow-runs.d.ts +344 -5
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
- package/lib/api-schemas/workflow-runs.js +9 -7
- package/lib/api-schemas/workflow-runs.js.map +1 -1
- package/lib/apps.d.ts +8 -145
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js +1 -54
- package/lib/apps.js.map +1 -1
- package/lib/ask-user.d.ts +2 -1
- package/lib/ask-user.d.ts.map +1 -1
- package/lib/audit-trail.d.ts +2 -2
- package/lib/audit-trail.d.ts.map +1 -1
- package/lib/audit-trail.js +2 -2
- package/lib/audit-trail.js.map +1 -1
- package/lib/browser-credentials.d.ts +2 -7
- package/lib/browser-credentials.d.ts.map +1 -1
- package/lib/common.d.ts +4 -1
- package/lib/common.d.ts.map +1 -1
- package/lib/content-query.d.ts +5 -0
- package/lib/content-query.d.ts.map +1 -0
- package/lib/content-query.js +2 -0
- package/lib/content-query.js.map +1 -0
- package/lib/data-platform.d.ts +4 -46
- package/lib/data-platform.d.ts.map +1 -1
- package/lib/data-platform.js.map +1 -1
- package/lib/email.d.ts +12 -18
- package/lib/email.d.ts.map +1 -1
- package/lib/email.js.map +1 -1
- package/lib/environment.d.ts +0 -10
- package/lib/environment.d.ts.map +1 -1
- package/lib/environment.js +1 -12
- package/lib/environment.js.map +1 -1
- package/lib/facets.d.ts +0 -4
- package/lib/facets.d.ts.map +1 -1
- package/lib/group.d.ts +2 -12
- package/lib/group.d.ts.map +1 -1
- package/lib/group.js.map +1 -1
- package/lib/index.d.ts +3 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -10
- package/lib/index.js.map +1 -1
- package/lib/integrations.d.ts +1 -27
- package/lib/integrations.d.ts.map +1 -1
- package/lib/integrations.js +0 -6
- package/lib/integrations.js.map +1 -1
- package/lib/interaction.d.ts +10 -222
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js +0 -31
- package/lib/interaction.js.map +1 -1
- package/lib/meters.d.ts +5 -10
- package/lib/meters.d.ts.map +1 -1
- package/lib/meters.js +1 -9
- package/lib/meters.js.map +1 -1
- package/lib/oauth-scopes.d.ts +2 -16
- package/lib/oauth-scopes.d.ts.map +1 -1
- package/lib/oauth-scopes.js +9 -49
- package/lib/oauth-scopes.js.map +1 -1
- package/lib/oauth-server.d.ts +16 -195
- package/lib/oauth-server.d.ts.map +1 -1
- package/lib/payload.d.ts +2 -5
- package/lib/payload.d.ts.map +1 -1
- package/lib/pending-asks.d.ts +9 -41
- package/lib/pending-asks.d.ts.map +1 -1
- package/lib/platform-event.d.ts +4 -142
- package/lib/platform-event.d.ts.map +1 -1
- package/lib/platform-event.js.map +1 -1
- package/lib/project.d.ts +7 -46
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js +2 -132
- package/lib/project.js.map +1 -1
- package/lib/prompt.d.ts +4 -7
- package/lib/prompt.d.ts.map +1 -1
- package/lib/prompt.js.map +1 -1
- package/lib/query.d.ts +0 -8
- package/lib/query.d.ts.map +1 -1
- package/lib/rate-limiter.d.ts +4 -3
- package/lib/rate-limiter.d.ts.map +1 -1
- package/lib/runs.d.ts +5 -1
- package/lib/runs.d.ts.map +1 -1
- package/lib/schema-for-extraction.d.ts +0 -1
- package/lib/schema-for-extraction.d.ts.map +1 -1
- package/lib/schema-for-extraction.js +1 -1
- package/lib/schema-for-extraction.js.map +1 -1
- package/lib/secrets.d.ts +2 -1
- package/lib/secrets.d.ts.map +1 -1
- package/lib/skill.d.ts +0 -13
- package/lib/skill.d.ts.map +1 -1
- package/lib/store/activity-catalog.d.ts +2 -0
- package/lib/store/activity-catalog.d.ts.map +1 -1
- package/lib/store/agent-approval.d.ts +0 -1
- package/lib/store/agent-approval.d.ts.map +1 -1
- package/lib/store/agent-approval.js +0 -3
- package/lib/store/agent-approval.js.map +1 -1
- package/lib/store/agent-run.d.ts +32 -69
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/collections.d.ts +2 -6
- package/lib/store/collections.d.ts.map +1 -1
- package/lib/store/collections.js.map +1 -1
- package/lib/store/conversation-state.d.ts +11 -12
- package/lib/store/conversation-state.d.ts.map +1 -1
- package/lib/store/conversation-state.js +0 -18
- package/lib/store/conversation-state.js.map +1 -1
- package/lib/store/doc-analyzer.d.ts +0 -22
- package/lib/store/doc-analyzer.d.ts.map +1 -1
- package/lib/store/dsl-workflow.d.ts +22 -5
- package/lib/store/dsl-workflow.d.ts.map +1 -1
- package/lib/store/dsl-workflow.js.map +1 -1
- package/lib/store/grounded-extraction.d.ts +0 -14
- package/lib/store/grounded-extraction.d.ts.map +1 -1
- package/lib/store/grounded-extraction.js +1 -7
- package/lib/store/grounded-extraction.js.map +1 -1
- package/lib/store/index.d.ts +0 -5
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +0 -6
- package/lib/store/index.js.map +1 -1
- package/lib/store/intake-policy-schema.generated.d.ts.map +1 -1
- package/lib/store/intake-policy-schema.generated.js +279 -1
- package/lib/store/intake-policy-schema.generated.js.map +1 -1
- package/lib/store/process.d.ts +43 -1
- package/lib/store/process.d.ts.map +1 -1
- package/lib/store/process.js.map +1 -1
- package/lib/store/rendering.d.ts +3 -5
- package/lib/store/rendering.d.ts.map +1 -1
- package/lib/store/rendering.js +0 -4
- package/lib/store/rendering.js.map +1 -1
- package/lib/store/schedule.d.ts +0 -16
- package/lib/store/schedule.d.ts.map +1 -1
- package/lib/store/schedule.js.map +1 -1
- package/lib/store/signals.d.ts +12 -0
- package/lib/store/signals.d.ts.map +1 -1
- package/lib/store/store.d.ts +80 -94
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +5 -25
- package/lib/store/store.js.map +1 -1
- package/lib/store/workflow.d.ts +35 -86
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +0 -47
- package/lib/store/workflow.js.map +1 -1
- package/lib/sts-errors.d.ts +0 -1
- package/lib/sts-errors.d.ts.map +1 -1
- package/lib/sts-token-types.d.ts +2 -8
- package/lib/sts-token-types.d.ts.map +1 -1
- package/lib/sts-token-types.js +1 -19
- package/lib/sts-token-types.js.map +1 -1
- package/lib/tools.d.ts +6 -1
- package/lib/tools.d.ts.map +1 -1
- package/lib/transient-tokens.d.ts +0 -2
- package/lib/transient-tokens.d.ts.map +1 -1
- package/lib/user.d.ts +0 -17
- package/lib/user.d.ts.map +1 -1
- package/lib/user.js.map +1 -1
- package/lib/utils/schemas.d.ts +2 -24
- package/lib/utils/schemas.d.ts.map +1 -1
- package/lib/utils/schemas.js +0 -151
- package/lib/utils/schemas.js.map +1 -1
- package/lib/vertesia-common.js +3 -4
- package/lib/vertesia-common.js.map +1 -1
- package/lib/views.d.ts +23 -27
- package/lib/views.d.ts.map +1 -1
- package/lib/views.js +5 -26
- package/lib/views.js.map +1 -1
- package/lib/workflow-analytics.d.ts +12 -34
- package/lib/workflow-analytics.d.ts.map +1 -1
- package/package.json +12 -6
- package/src/access-control.ts +0 -26
- package/src/account-values.ts +0 -49
- package/src/agent-resources.test.ts +1 -12
- package/src/api-contract/components.contract.test.ts +99 -0
- package/src/api-contract/components.generated.json +40405 -0
- package/src/api-contract/index.ts +664 -0
- package/src/api-schemas/agent-communication.contract.test.ts +90 -0
- package/src/api-schemas/agent-communication.ts +169 -0
- package/src/api-schemas/agent-runs.ts +46 -1
- package/src/api-schemas/api-discriminators.test.ts +101 -0
- package/src/api-schemas/app-lifecycle.ts +39 -4
- package/src/api-schemas/app-runtime.ts +8 -0
- package/src/api-schemas/apps.ts +4 -3
- package/src/api-schemas/content-query.ts +31 -0
- package/src/api-schemas/content.ts +88 -15
- package/src/api-schemas/dashboard.contract.test.ts +16 -5
- package/src/api-schemas/dashboard.ts +3 -0
- package/src/api-schemas/events.ts +9 -1
- package/src/api-schemas/files.ts +27 -0
- package/src/api-schemas/group.ts +10 -0
- package/src/api-schemas/index.ts +4 -0
- package/src/api-schemas/integrations.ts +27 -2
- package/src/api-schemas/interaction.contract.test.ts +204 -1
- package/src/api-schemas/interaction.ts +176 -8
- package/src/api-schemas/llumiverse.contract.test.ts +33 -2
- package/src/api-schemas/oauth-server.ts +152 -3
- package/src/api-schemas/oauth.contract.test.ts +64 -1
- package/src/api-schemas/process.ts +352 -2
- package/src/api-schemas/project-configuration.ts +11 -7
- package/src/api-schemas/project.contract.test.ts +83 -6
- package/src/api-schemas/registry.ts +290 -457
- package/src/api-schemas/schema-primitives.ts +13 -0
- package/src/api-schemas/store.contract.test.ts +30 -1
- package/src/api-schemas/store.ts +58 -11
- package/src/api-schemas/tools.ts +62 -0
- package/src/api-schemas/view-execution.ts +28 -2
- package/src/api-schemas/views.contract.test.ts +119 -0
- package/src/api-schemas/views.ts +142 -3
- package/src/api-schemas/workflow-runs.ts +9 -7
- package/src/api-schemas/zeno-response-contracts.test.ts +344 -0
- package/src/apps.test.ts +2 -40
- package/src/apps.ts +14 -181
- package/src/ask-user.ts +1 -1
- package/src/audit-trail.ts +3 -3
- package/src/browser-credentials.ts +3 -7
- package/src/common.ts +13 -1
- package/src/content-query.ts +5 -0
- package/src/data-platform.ts +4 -51
- package/src/email.ts +24 -18
- package/src/environment.ts +1 -14
- package/src/facets.ts +0 -6
- package/src/group.ts +2 -12
- package/src/index.ts +3 -15
- package/src/integrations.ts +1 -52
- package/src/interaction.ts +12 -271
- package/src/meters.ts +10 -11
- package/src/oauth-scopes.test.ts +15 -0
- package/src/oauth-scopes.ts +10 -64
- package/src/oauth-server.ts +28 -215
- package/src/payload.ts +1 -6
- package/src/pending-asks.ts +17 -42
- package/src/platform-event.ts +3 -156
- package/src/project.ts +12 -160
- package/src/prompt.ts +9 -8
- package/src/query.ts +0 -9
- package/src/rate-limiter.ts +3 -3
- package/src/runs.ts +8 -0
- package/src/schema-for-extraction.ts +1 -1
- package/src/secrets.ts +3 -0
- package/src/skill.ts +0 -15
- package/src/store/activity-catalog.ts +3 -0
- package/src/store/agent-approval.ts +0 -4
- package/src/store/agent-run.ts +39 -93
- package/src/store/collections.ts +3 -6
- package/src/store/conversation-state.ts +12 -25
- package/src/store/doc-analyzer.ts +0 -26
- package/src/store/dsl-workflow.ts +28 -5
- package/src/store/grounded-extraction.ts +0 -18
- package/src/store/index.ts +0 -6
- package/src/store/intake-policy-schema.generated.ts +293 -1
- package/src/store/process.ts +84 -0
- package/src/store/rendering.ts +3 -8
- package/src/store/schedule.ts +0 -19
- package/src/store/signals.ts +14 -0
- package/src/store/store.ts +118 -127
- package/src/store/workflow.ts +32 -120
- package/src/sts-errors.ts +0 -2
- package/src/sts-token-types.ts +3 -28
- package/src/tools.ts +15 -0
- package/src/transient-tokens.ts +0 -2
- package/src/user.ts +0 -20
- package/src/utils/schemas.ts +2 -159
- package/src/views.ts +50 -47
- package/src/workflow-analytics.ts +12 -40
- package/tsconfig.dist.json +4 -1
- package/lib/Progress.d.ts +0 -22
- package/lib/Progress.d.ts.map +0 -1
- package/lib/Progress.js +0 -57
- package/lib/Progress.js.map +0 -1
- package/lib/agent-request-template.d.ts +0 -4
- package/lib/agent-request-template.d.ts.map +0 -1
- package/lib/agent-request-template.js +0 -46
- package/lib/agent-request-template.js.map +0 -1
- package/lib/channels.d.ts +0 -22
- package/lib/channels.d.ts.map +0 -1
- package/lib/channels.js +0 -57
- package/lib/channels.js.map +0 -1
- package/lib/host-utils.d.ts +0 -8
- package/lib/host-utils.d.ts.map +0 -1
- package/lib/host-utils.js +0 -84
- package/lib/host-utils.js.map +0 -1
- package/lib/platform-event-validation.d.ts +0 -45
- package/lib/platform-event-validation.d.ts.map +0 -1
- package/lib/platform-event-validation.js +0 -336
- package/lib/platform-event-validation.js.map +0 -1
- package/lib/store/hive-memory.d.ts +0 -117
- package/lib/store/hive-memory.d.ts.map +0 -1
- package/lib/store/hive-memory.js +0 -2
- package/lib/store/hive-memory.js.map +0 -1
- package/lib/store/object-types.d.ts +0 -24
- package/lib/store/object-types.d.ts.map +0 -1
- package/lib/store/object-types.js +0 -95
- package/lib/store/object-types.js.map +0 -1
- package/lib/store/process-schema.d.ts +0 -561
- package/lib/store/process-schema.d.ts.map +0 -1
- package/lib/store/process-schema.js +0 -561
- package/lib/store/process-schema.js.map +0 -1
- package/lib/store/process-validation.d.ts +0 -17
- package/lib/store/process-validation.d.ts.map +0 -1
- package/lib/store/process-validation.js +0 -515
- package/lib/store/process-validation.js.map +0 -1
- package/lib/store/temporalio.d.ts +0 -17
- package/lib/store/temporalio.d.ts.map +0 -1
- package/lib/store/temporalio.js +0 -41
- package/lib/store/temporalio.js.map +0 -1
- package/lib/view-configuration-validation.d.ts +0 -15
- package/lib/view-configuration-validation.d.ts.map +0 -1
- package/lib/view-configuration-validation.js +0 -63
- package/lib/view-configuration-validation.js.map +0 -1
- package/lib/view-query-validation.d.ts +0 -13
- package/lib/view-query-validation.d.ts.map +0 -1
- package/lib/view-query-validation.js +0 -266
- package/lib/view-query-validation.js.map +0 -1
- package/lib/view-validation-helpers.d.ts +0 -15
- package/lib/view-validation-helpers.d.ts.map +0 -1
- package/lib/view-validation-helpers.js +0 -25
- package/lib/view-validation-helpers.js.map +0 -1
- package/lib/views-schema.d.ts +0 -1992
- package/lib/views-schema.d.ts.map +0 -1
- package/lib/views-schema.js +0 -674
- package/lib/views-schema.js.map +0 -1
- package/lib/views-validation.d.ts +0 -21
- package/lib/views-validation.d.ts.map +0 -1
- package/lib/views-validation.js +0 -164
- package/lib/views-validation.js.map +0 -1
- package/src/Progress.ts +0 -59
- package/src/agent-request-template.test.ts +0 -40
- package/src/agent-request-template.ts +0 -45
- package/src/channels.ts +0 -70
- package/src/host-utils.test.ts +0 -61
- package/src/host-utils.ts +0 -93
- package/src/platform-event-validation.test.ts +0 -251
- package/src/platform-event-validation.ts +0 -372
- package/src/project.test.ts +0 -44
- package/src/store/hive-memory.ts +0 -167
- package/src/store/object-types.ts +0 -123
- package/src/store/process-schema.test.ts +0 -149
- package/src/store/process-schema.ts +0 -564
- package/src/store/process-validation.test.ts +0 -635
- package/src/store/process-validation.ts +0 -646
- package/src/store/temporalio.ts +0 -54
- package/src/view-configuration-validation.ts +0 -74
- package/src/view-query-validation.test.ts +0 -21
- package/src/view-query-validation.ts +0 -319
- package/src/view-validation-helpers.ts +0 -28
- package/src/views-schema.test.ts +0 -372
- package/src/views-schema.ts +0 -689
- package/src/views-validation.ts +0 -234
package/src/views-schema.test.ts
DELETED
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
import Ajv from 'ajv';
|
|
2
|
-
import { assertType, describe, expect, it } from 'vitest';
|
|
3
|
-
import type { z } from 'zod';
|
|
4
|
-
import type { ViewExperienceConfigurationSchema } from './api-schemas/view-execution.js';
|
|
5
|
-
import { validateViewConfiguration } from './view-configuration-validation.js';
|
|
6
|
-
import { type ViewExperienceConfiguration, type ViewNavigationItem, viewExperienceRoute } from './views.js';
|
|
7
|
-
import {
|
|
8
|
-
PersistedViewExperienceConfigurationJsonSchema,
|
|
9
|
-
ViewExperienceConfigurationJsonSchema,
|
|
10
|
-
} from './views-schema.js';
|
|
11
|
-
import { parseAppViewExperienceId, validateViewExperienceId } from './views-validation.js';
|
|
12
|
-
|
|
13
|
-
type Equals<A, B> = (<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2 ? true : false;
|
|
14
|
-
|
|
15
|
-
function documentLibrary(): ViewExperienceConfiguration {
|
|
16
|
-
return {
|
|
17
|
-
name: 'Document Library',
|
|
18
|
-
layout: {
|
|
19
|
-
mode: 'browse',
|
|
20
|
-
navigation_position: 'sidebar',
|
|
21
|
-
},
|
|
22
|
-
scope: {
|
|
23
|
-
locations: ['/documents'],
|
|
24
|
-
head_only: true,
|
|
25
|
-
},
|
|
26
|
-
navigation: [
|
|
27
|
-
{
|
|
28
|
-
id: 'location',
|
|
29
|
-
label: 'Folders',
|
|
30
|
-
source: 'location',
|
|
31
|
-
roots: ['/documents'],
|
|
32
|
-
presentation: 'tree',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: 'brand',
|
|
36
|
-
label: 'Brand',
|
|
37
|
-
source: 'terms',
|
|
38
|
-
field: 'properties.brand.keyword',
|
|
39
|
-
size: 30,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: 'geography',
|
|
43
|
-
label: 'Geography',
|
|
44
|
-
source: 'hierarchy',
|
|
45
|
-
levels: [
|
|
46
|
-
{ id: 'state', label: 'State', field: 'properties.state' },
|
|
47
|
-
{ id: 'city', label: 'City', field: 'properties.city', sort: 'label' },
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 'project_size',
|
|
52
|
-
label: 'Project size',
|
|
53
|
-
source: 'range',
|
|
54
|
-
field: 'properties.project_size',
|
|
55
|
-
ranges: [
|
|
56
|
-
{ id: 'small', label: 'Small', to: 100 },
|
|
57
|
-
{ id: 'large', label: 'Large', from: 100 },
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
search: {
|
|
62
|
-
mode: 'agentic',
|
|
63
|
-
placeholder: 'Describe what you need',
|
|
64
|
-
fields: [
|
|
65
|
-
{
|
|
66
|
-
field: 'text',
|
|
67
|
-
description: 'Full ingested and OCR document text.',
|
|
68
|
-
type: 'text',
|
|
69
|
-
mode: 'full_text',
|
|
70
|
-
boost: 1.5,
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
key_terms: [{ id: 'client', label: 'Client', type: 'keyword' }],
|
|
74
|
-
agentic: {
|
|
75
|
-
interaction: 'sys:ContentSearchAgent',
|
|
76
|
-
config: {
|
|
77
|
-
environment: 'production-search',
|
|
78
|
-
model: 'openai:gpt-5-mini',
|
|
79
|
-
},
|
|
80
|
-
mode: 'query',
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
results: {
|
|
84
|
-
default_display: 'table',
|
|
85
|
-
allow_display_switch: true,
|
|
86
|
-
displays: [
|
|
87
|
-
{
|
|
88
|
-
id: 'table',
|
|
89
|
-
label: 'Table',
|
|
90
|
-
type: 'table',
|
|
91
|
-
columns: [
|
|
92
|
-
{
|
|
93
|
-
field: 'name',
|
|
94
|
-
label: 'Name',
|
|
95
|
-
sortable: true,
|
|
96
|
-
sort_option: 'name_asc',
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: 'cards',
|
|
102
|
-
label: 'Cards',
|
|
103
|
-
type: 'cards',
|
|
104
|
-
title: { field: 'name' },
|
|
105
|
-
fields: [{ field: 'properties.brand', label: 'Brand' }],
|
|
106
|
-
columns: 3,
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
default_sort: 'name_asc',
|
|
110
|
-
sort_options: [
|
|
111
|
-
{
|
|
112
|
-
id: 'name_asc',
|
|
113
|
-
label: 'Name',
|
|
114
|
-
sort: [{ field: 'name.keyword', order: 'asc' }],
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
describe('View Experience configuration schema', () => {
|
|
122
|
-
it('keeps the temporary named TypeScript bridge identical to the runtime schema', () => {
|
|
123
|
-
assertType<Equals<ViewExperienceConfiguration, z.infer<typeof ViewExperienceConfigurationSchema>>>(true);
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
it('accepts navigation, one agentic model, and visual result displays', () => {
|
|
127
|
-
const validate = new Ajv.default({ allErrors: true, strict: false }).compile(
|
|
128
|
-
ViewExperienceConfigurationJsonSchema,
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
expect(validate(documentLibrary())).toBe(true);
|
|
132
|
-
expect(validate.errors).toBeNull();
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
it('rejects malformed discriminated navigation and display entries', () => {
|
|
136
|
-
const validate = new Ajv.default({ allErrors: true, strict: false }).compile(
|
|
137
|
-
ViewExperienceConfigurationJsonSchema,
|
|
138
|
-
);
|
|
139
|
-
const invalid = documentLibrary() as unknown as Record<string, unknown>;
|
|
140
|
-
invalid.navigation = [{ id: 'brand', label: 'Brand', source: 'terms' }];
|
|
141
|
-
|
|
142
|
-
expect(validate(invalid)).toBe(false);
|
|
143
|
-
expect(validate.errors?.some((error) => error.instancePath.includes('/navigation/0'))).toBe(true);
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
it('advertises only executable version 1 options', () => {
|
|
147
|
-
const validate = new Ajv.default({ allErrors: true, strict: false }).compile(
|
|
148
|
-
ViewExperienceConfigurationJsonSchema,
|
|
149
|
-
);
|
|
150
|
-
const unsupported = [
|
|
151
|
-
{ name: 'Drawer', layout: { navigation_position: 'drawer' } },
|
|
152
|
-
{
|
|
153
|
-
name: 'Missing bucket',
|
|
154
|
-
navigation: [
|
|
155
|
-
{
|
|
156
|
-
id: 'brand',
|
|
157
|
-
label: 'Brand',
|
|
158
|
-
source: 'terms',
|
|
159
|
-
field: 'properties.brand',
|
|
160
|
-
missing_label: 'Unknown',
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
},
|
|
164
|
-
{ name: 'Rerank', search: { mode: 'agentic', agentic: { mode: 'rerank' } } },
|
|
165
|
-
{ name: 'Candidate limit', search: { mode: 'agentic', agentic: { candidate_limit: 50 } } },
|
|
166
|
-
{
|
|
167
|
-
name: 'Annotations',
|
|
168
|
-
search: { mode: 'agentic', agentic: { annotations: { mode: 'why_match' } } },
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
name: 'Board card renderer',
|
|
172
|
-
results: {
|
|
173
|
-
default_display: 'board',
|
|
174
|
-
displays: [
|
|
175
|
-
{
|
|
176
|
-
id: 'board',
|
|
177
|
-
label: 'Board',
|
|
178
|
-
type: 'board',
|
|
179
|
-
group_by: 'status',
|
|
180
|
-
card: { renderer: 'custom-card', title: { field: 'name' } },
|
|
181
|
-
},
|
|
182
|
-
],
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
];
|
|
186
|
-
|
|
187
|
-
unsupported.forEach((configuration) => {
|
|
188
|
-
expect(validate(configuration), JSON.stringify(validate.errors)).toBe(false);
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
it('matches the agentic timeout schema to the runtime budget', () => {
|
|
193
|
-
const validate = new Ajv.default({ allErrors: true, strict: false }).compile(
|
|
194
|
-
ViewExperienceConfigurationJsonSchema,
|
|
195
|
-
);
|
|
196
|
-
expect(validate({ name: 'Agentic', search: { mode: 'agentic', agentic: { timeout_ms: 60_000 } } })).toBe(true);
|
|
197
|
-
expect(validate({ name: 'Too short', search: { mode: 'agentic', agentic: { timeout_ms: 999 } } })).toBe(false);
|
|
198
|
-
expect(validate({ name: 'Too long', search: { mode: 'agentic', agentic: { timeout_ms: 60_001 } } })).toBe(
|
|
199
|
-
false,
|
|
200
|
-
);
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
it('requires a description only for persisted View resources', () => {
|
|
204
|
-
const validatePersisted = new Ajv.default({ allErrors: true, strict: false }).compile(
|
|
205
|
-
PersistedViewExperienceConfigurationJsonSchema,
|
|
206
|
-
);
|
|
207
|
-
|
|
208
|
-
expect(validatePersisted(documentLibrary())).toBe(false);
|
|
209
|
-
expect(
|
|
210
|
-
validatePersisted({
|
|
211
|
-
...documentLibrary(),
|
|
212
|
-
description: 'Browse the project document library by location and business metadata.',
|
|
213
|
-
}),
|
|
214
|
-
).toBe(true);
|
|
215
|
-
expect(validateViewConfiguration(documentLibrary())).toEqual([]);
|
|
216
|
-
const missingDescriptionIssues = validateViewConfiguration(documentLibrary(), 'persisted');
|
|
217
|
-
expect(missingDescriptionIssues).toHaveLength(1);
|
|
218
|
-
expect(missingDescriptionIssues[0]?.path).toBe('description');
|
|
219
|
-
expect(
|
|
220
|
-
validateViewConfiguration(
|
|
221
|
-
{
|
|
222
|
-
...documentLibrary(),
|
|
223
|
-
description: ' ',
|
|
224
|
-
},
|
|
225
|
-
'persisted',
|
|
226
|
-
),
|
|
227
|
-
).toContainEqual({
|
|
228
|
-
path: 'description',
|
|
229
|
-
message: 'must explain the View purpose',
|
|
230
|
-
});
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
describe('View Experience semantic validation', () => {
|
|
235
|
-
it('accepts a complete document library configuration', () => {
|
|
236
|
-
expect(validateViewConfiguration(documentLibrary())).toEqual([]);
|
|
237
|
-
expect(validateViewExperienceId('document-library')).toEqual([]);
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
it('reports invalid cross-references that JSON Schema cannot express', () => {
|
|
241
|
-
const invalid = documentLibrary();
|
|
242
|
-
if (invalid.results) {
|
|
243
|
-
invalid.results.default_display = 'missing';
|
|
244
|
-
invalid.results.displays.push({
|
|
245
|
-
id: 'table',
|
|
246
|
-
label: 'Duplicate table',
|
|
247
|
-
type: 'table',
|
|
248
|
-
columns: [{ field: 'name' }],
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
const issues = validateViewConfiguration(invalid);
|
|
253
|
-
|
|
254
|
-
expect(issues).toContainEqual({
|
|
255
|
-
path: 'results.default_display',
|
|
256
|
-
message: 'must reference a configured display',
|
|
257
|
-
});
|
|
258
|
-
expect(issues).toContainEqual({
|
|
259
|
-
path: 'results.displays[2].id',
|
|
260
|
-
message: 'must be unique',
|
|
261
|
-
});
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
it('rejects duplicate and incompatible search field definitions', () => {
|
|
265
|
-
const invalid = documentLibrary();
|
|
266
|
-
if (invalid.search) {
|
|
267
|
-
invalid.search.fields = [
|
|
268
|
-
{ field: 'properties.total', type: 'number', mode: 'full_text' },
|
|
269
|
-
{ field: 'properties.total', type: 'number' },
|
|
270
|
-
];
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
expect(validateViewConfiguration(invalid)).toEqual(
|
|
274
|
-
expect.arrayContaining([
|
|
275
|
-
{
|
|
276
|
-
path: 'search.fields[0].type',
|
|
277
|
-
message: 'must be text when mode is full_text',
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
path: 'search.fields[1].field',
|
|
281
|
-
message: 'must be unique',
|
|
282
|
-
},
|
|
283
|
-
]),
|
|
284
|
-
);
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
it('rejects ambiguous property hierarchies', () => {
|
|
288
|
-
const invalid = documentLibrary();
|
|
289
|
-
invalid.navigation = [
|
|
290
|
-
{
|
|
291
|
-
id: 'geography',
|
|
292
|
-
label: 'Geography',
|
|
293
|
-
source: 'hierarchy',
|
|
294
|
-
levels: [
|
|
295
|
-
{ id: 'state', label: 'State', field: 'properties.state' },
|
|
296
|
-
{ id: 'state', label: 'City', field: 'properties.state' },
|
|
297
|
-
],
|
|
298
|
-
} as ViewNavigationItem,
|
|
299
|
-
];
|
|
300
|
-
|
|
301
|
-
expect(validateViewConfiguration(invalid)).toEqual(
|
|
302
|
-
expect.arrayContaining([
|
|
303
|
-
{
|
|
304
|
-
path: 'navigation[0].levels[1].id',
|
|
305
|
-
message: 'must be unique within the hierarchy',
|
|
306
|
-
},
|
|
307
|
-
{
|
|
308
|
-
path: 'navigation[0].levels[1].field',
|
|
309
|
-
message: 'must be unique within the hierarchy',
|
|
310
|
-
},
|
|
311
|
-
]),
|
|
312
|
-
);
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
it('runs structural validation before semantic validation', () => {
|
|
316
|
-
const invalid = {
|
|
317
|
-
...documentLibrary(),
|
|
318
|
-
navigation: [
|
|
319
|
-
{
|
|
320
|
-
id: 'geography',
|
|
321
|
-
label: 'Geography',
|
|
322
|
-
source: 'hierarchy',
|
|
323
|
-
multi_select: true,
|
|
324
|
-
levels: [
|
|
325
|
-
{ id: 'state', label: 'State', field: 'properties.state' },
|
|
326
|
-
{ id: 'state', label: 'City', field: 'properties.state' },
|
|
327
|
-
],
|
|
328
|
-
},
|
|
329
|
-
],
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
const issues = validateViewConfiguration(invalid);
|
|
333
|
-
expect(issues.some((issue) => issue.path === 'navigation[0].multi_select')).toBe(true);
|
|
334
|
-
expect(issues.some((issue) => issue.message === 'must be unique within the hierarchy')).toBe(false);
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
it('normalizes required and array paths from JSON Schema errors', () => {
|
|
338
|
-
const issues = validateViewConfiguration({
|
|
339
|
-
name: 'Invalid',
|
|
340
|
-
navigation: [{ id: 'brand', label: 'Brand', source: 'terms' }],
|
|
341
|
-
});
|
|
342
|
-
|
|
343
|
-
expect(issues.some((issue) => issue.path === 'navigation[0].field')).toBe(true);
|
|
344
|
-
expect(issues.every((issue) => !issue.path.startsWith('/'))).toBe(true);
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
it('rejects fixed filters that the execution runtime cannot apply', () => {
|
|
348
|
-
const invalid = documentLibrary();
|
|
349
|
-
if (invalid.scope) {
|
|
350
|
-
invalid.scope.fixed_filter = { query_string: { query: '*' } };
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
expect(validateViewConfiguration(invalid)).toContainEqual({
|
|
354
|
-
path: 'scope.fixed_filter.query_string',
|
|
355
|
-
message: "query type 'query_string' is not supported",
|
|
356
|
-
});
|
|
357
|
-
});
|
|
358
|
-
|
|
359
|
-
it('parses canonical app View ids and rejects URL path material', () => {
|
|
360
|
-
expect(parseAppViewExperienceId('app:content:document-lib')).toEqual({
|
|
361
|
-
app_name: 'content',
|
|
362
|
-
local_id: 'document-lib',
|
|
363
|
-
});
|
|
364
|
-
expect(parseAppViewExperienceId('app:content:../../environments')).toBeUndefined();
|
|
365
|
-
expect(parseAppViewExperienceId('app:content:%2F..%2Fenvironments')).toBeUndefined();
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
it('builds the generic route without exposing path material from an id', () => {
|
|
369
|
-
expect(viewExperienceRoute('app:content:document-library')).toBe('/view/app%3Acontent%3Adocument-library');
|
|
370
|
-
expect(viewExperienceRoute('unsafe/id')).toBe('/view/unsafe%2Fid');
|
|
371
|
-
});
|
|
372
|
-
});
|