@vertesia/common 1.5.0-dev.20260807.073259Z → 1.5.0-dev.20260826.064249Z
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 +40303 -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 +583 -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 +9843 -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 +825 -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 +327 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -1
- package/lib/api-schemas/events.d.ts +989 -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 +5 -5
- package/lib/api-schemas/integrations.d.ts.map +1 -1
- package/lib/api-schemas/integrations.js +15 -2
- package/lib/api-schemas/integrations.js.map +1 -1
- package/lib/api-schemas/interaction.d.ts +8313 -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 +309 -1
- package/lib/api-schemas/process.js.map +1 -1
- package/lib/api-schemas/project-configuration.d.ts +1098 -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 +1650 -6
- package/lib/api-schemas/project.d.ts.map +1 -1
- package/lib/api-schemas/registry.d.ts +87211 -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 +5496 -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 +340 -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 +0 -26
- 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 +18 -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 +269 -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 +40303 -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 +15 -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 +18 -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 +343 -1
- package/src/api-schemas/project-configuration.ts +11 -7
- package/src/api-schemas/project.contract.test.ts +64 -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 +320 -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 +0 -51
- 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 +24 -5
- package/src/store/grounded-extraction.ts +0 -18
- package/src/store/index.ts +0 -6
- package/src/store/intake-policy-schema.generated.ts +283 -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
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
OAuthAuthorizationServerMetadataSchema,
|
|
4
|
+
OAuthDeviceAuthorizationResponseSchema,
|
|
5
|
+
OAuthGrantStatusSchema,
|
|
6
|
+
OAuthTokenResponseSchema,
|
|
7
|
+
} from './oauth-server.js';
|
|
3
8
|
import { ApiSchemaComponents, validateApiRequest, validateApiResponse } from './registry.js';
|
|
4
9
|
|
|
5
10
|
/**
|
|
@@ -101,6 +106,64 @@ describe('UpdateOAuthProviderPayload', () => {
|
|
|
101
106
|
});
|
|
102
107
|
});
|
|
103
108
|
|
|
109
|
+
describe('OAuth protocol response parsing', () => {
|
|
110
|
+
it('parses complete authorization-server metadata and ignores registered extensions', () => {
|
|
111
|
+
const result = OAuthAuthorizationServerMetadataSchema.safeParse({
|
|
112
|
+
issuer: 'https://sts.example.com',
|
|
113
|
+
authorization_endpoint: 'https://cloud.example.com/oauth/authorize',
|
|
114
|
+
token_endpoint: 'https://sts.example.com/oauth/token',
|
|
115
|
+
jwks_uri: 'https://sts.example.com/.well-known/jwks.json',
|
|
116
|
+
response_types_supported: ['code'],
|
|
117
|
+
grant_types_supported: ['authorization_code'],
|
|
118
|
+
code_challenge_methods_supported: ['S256'],
|
|
119
|
+
token_endpoint_auth_methods_supported: ['none'],
|
|
120
|
+
scopes_supported: ['openid'],
|
|
121
|
+
extension_parameter: 'ignored',
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
expect(result.success).toBe(true);
|
|
125
|
+
if (result.success) {
|
|
126
|
+
expect(result.data).not.toHaveProperty('extension_parameter');
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it('rejects incomplete device and token responses', () => {
|
|
131
|
+
expect(OAuthDeviceAuthorizationResponseSchema.safeParse({ device_code: 'device' }).success).toBe(false);
|
|
132
|
+
expect(
|
|
133
|
+
OAuthTokenResponseSchema.safeParse({
|
|
134
|
+
access_token: 'token',
|
|
135
|
+
token_type: 'Basic',
|
|
136
|
+
expires_in: 3600,
|
|
137
|
+
}).success,
|
|
138
|
+
).toBe(false);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('accepts RFC 6749 token responses with an omitted scope and case-insensitive bearer type', () => {
|
|
142
|
+
expect(
|
|
143
|
+
OAuthTokenResponseSchema.safeParse({
|
|
144
|
+
access_token: 'token',
|
|
145
|
+
token_type: 'bearer',
|
|
146
|
+
expires_in: 3600,
|
|
147
|
+
}).success,
|
|
148
|
+
).toBe(true);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('accepts OAuth token response extensions without widening the inferred contract', () => {
|
|
152
|
+
const result = OAuthTokenResponseSchema.safeParse({
|
|
153
|
+
access_token: 'token',
|
|
154
|
+
token_type: 'Bearer',
|
|
155
|
+
expires_in: 3600,
|
|
156
|
+
scope: 'openid',
|
|
157
|
+
extension_parameter: true,
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
expect(result.success).toBe(true);
|
|
161
|
+
if (result.success) {
|
|
162
|
+
expect(result.data).not.toHaveProperty('extension_parameter');
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
|
|
104
167
|
/**
|
|
105
168
|
* A component's `status` enum, as the registry emits it.
|
|
106
169
|
*
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// Runtime schemas for the process API domain.
|
|
2
2
|
|
|
3
|
-
import { JSONSchemaSchema } from '@llumiverse/common/schemas';
|
|
3
|
+
import { JSONObjectSchema, JSONSchemaSchema } from '@llumiverse/common/schemas';
|
|
4
4
|
import type { StringValue } from 'ms';
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
+
import { PermissionSchema } from './access-control.js';
|
|
6
7
|
import { StringValueMapSchema } from './files.js';
|
|
7
8
|
import { ConversationVisibilitySchema, RunSourceSchema } from './interaction.js';
|
|
9
|
+
import { EditRevisionSchema, ExpectedEditRevisionSchema } from './schema-primitives.js';
|
|
8
10
|
import { TaskFieldSchema } from './task.js';
|
|
9
11
|
|
|
10
12
|
export const DurationValueSchema = z
|
|
@@ -227,6 +229,7 @@ export const ProcessHistoryResponseSchema = z
|
|
|
227
229
|
.strictObject({
|
|
228
230
|
run_id: z.string(),
|
|
229
231
|
current_node: z.string(),
|
|
232
|
+
node_history: z.array(NodeHistoryEntrySchema),
|
|
230
233
|
node_history_ref: z
|
|
231
234
|
.strictObject({
|
|
232
235
|
path: z.string(),
|
|
@@ -241,6 +244,7 @@ export const ProcessContextResponseSchema = z
|
|
|
241
244
|
.strictObject({
|
|
242
245
|
run_id: z.string(),
|
|
243
246
|
current_node: z.string(),
|
|
247
|
+
context: JSONObjectSchema,
|
|
244
248
|
})
|
|
245
249
|
.meta({ id: 'ProcessContextResponse' });
|
|
246
250
|
|
|
@@ -627,6 +631,7 @@ export const DSLWorkflowDefinitionSchema: z.ZodType = z
|
|
|
627
631
|
result: z.string().optional(),
|
|
628
632
|
debug_mode: z.boolean().optional(),
|
|
629
633
|
id: z.string().meta({ description: 'Unique identifier for the object' }),
|
|
634
|
+
edit_revision: EditRevisionSchema,
|
|
630
635
|
updated_by: z.string().meta({ description: 'Identifier of the user who last modified the object' }),
|
|
631
636
|
created_by: z.string().meta({ description: 'Identifier of the user who created the object' }),
|
|
632
637
|
created_at: z.string().meta({ description: 'ISO timestamp of when the object was created' }),
|
|
@@ -647,6 +652,7 @@ export const DSLWorkflowDefinitionResponseSchema: z.ZodType = z
|
|
|
647
652
|
result: z.string().optional(),
|
|
648
653
|
debug_mode: z.boolean().optional(),
|
|
649
654
|
id: z.string().meta({ description: 'Unique identifier for the object' }),
|
|
655
|
+
edit_revision: EditRevisionSchema,
|
|
650
656
|
updated_by: z.string().meta({ description: 'Identifier of the user who last modified the object' }),
|
|
651
657
|
created_by: z.string().meta({ description: 'Identifier of the user who created the object' }),
|
|
652
658
|
created_at: z.string().meta({ description: 'ISO timestamp of when the object was created' }),
|
|
@@ -755,6 +761,33 @@ export const WorkflowDefinitionPayloadSchema: z.ZodType = z
|
|
|
755
761
|
])
|
|
756
762
|
.meta({ id: 'WorkflowDefinitionPayload' });
|
|
757
763
|
|
|
764
|
+
export const UpdateWorkflowDefinitionPayloadWithActivitiesSchema: z.ZodType = z
|
|
765
|
+
.strictObject({
|
|
766
|
+
...dslWorkflowSpecBaseFields,
|
|
767
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
768
|
+
steps: z.array(z.lazy(() => DSLWorkflowStepSchema)).optional(),
|
|
769
|
+
activities: z.array(DSLActivitySpecSchema).meta(deprecatedActivitiesMeta),
|
|
770
|
+
spec_format: z.literal('activities'),
|
|
771
|
+
})
|
|
772
|
+
.meta({ id: 'UpdateWorkflowDefinitionPayloadWithActivities' });
|
|
773
|
+
|
|
774
|
+
export const UpdateWorkflowDefinitionPayloadWithStepsSchema: z.ZodType = z
|
|
775
|
+
.strictObject({
|
|
776
|
+
...dslWorkflowSpecBaseFields,
|
|
777
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
778
|
+
steps: z.array(z.lazy(() => DSLWorkflowStepSchema)),
|
|
779
|
+
activities: z.array(DSLActivitySpecSchema).meta(deprecatedActivitiesMeta).optional(),
|
|
780
|
+
spec_format: z.literal('steps'),
|
|
781
|
+
})
|
|
782
|
+
.meta({ id: 'UpdateWorkflowDefinitionPayloadWithSteps' });
|
|
783
|
+
|
|
784
|
+
export const UpdateWorkflowDefinitionPayloadSchema: z.ZodType = z
|
|
785
|
+
.discriminatedUnion('spec_format', [
|
|
786
|
+
UpdateWorkflowDefinitionPayloadWithStepsSchema as unknown as z.ZodObject,
|
|
787
|
+
UpdateWorkflowDefinitionPayloadWithActivitiesSchema as unknown as z.ZodObject,
|
|
788
|
+
])
|
|
789
|
+
.meta({ id: 'UpdateWorkflowDefinitionPayload' });
|
|
790
|
+
|
|
758
791
|
export const DSLWorkflowStepSchema: z.ZodType = z
|
|
759
792
|
.discriminatedUnion('type', [
|
|
760
793
|
DSLActivityStepSchema,
|
|
@@ -840,6 +873,7 @@ export const NodeDefinitionMapSchema: z.ZodType = z
|
|
|
840
873
|
export const ProcessDefinitionSchema: z.ZodType = z
|
|
841
874
|
.strictObject({
|
|
842
875
|
id: z.string(),
|
|
876
|
+
edit_revision: EditRevisionSchema,
|
|
843
877
|
account: z.string(),
|
|
844
878
|
project: z.string(),
|
|
845
879
|
name: z.string(),
|
|
@@ -876,6 +910,7 @@ export const ProcessDefinitionBodySchema: z.ZodType = z
|
|
|
876
910
|
|
|
877
911
|
export const UpdateProcessDefinitionPayloadSchema: z.ZodType = z
|
|
878
912
|
.strictObject({
|
|
913
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
879
914
|
name: z.string().optional(),
|
|
880
915
|
description: z.string().optional(),
|
|
881
916
|
status: ProcessDefinitionStatusSchema.meta({
|
|
@@ -927,3 +962,310 @@ export const RecordProcessRunPayloadSchema = z
|
|
|
927
962
|
started_by: z.string().optional(),
|
|
928
963
|
})
|
|
929
964
|
.meta({ id: 'RecordProcessRunPayload' });
|
|
965
|
+
|
|
966
|
+
export const ProcessTestRunStatusSchema = z
|
|
967
|
+
.enum(['pending', 'running', 'passed', 'failed', 'cancelled'])
|
|
968
|
+
.meta({ id: 'ProcessTestRunStatus' });
|
|
969
|
+
|
|
970
|
+
export const ProcessTestVirtualActorSchema = z
|
|
971
|
+
.strictObject({
|
|
972
|
+
id: z.string(),
|
|
973
|
+
label: z.string().optional(),
|
|
974
|
+
refs: z.array(z.string()),
|
|
975
|
+
permissions: z.array(PermissionSchema),
|
|
976
|
+
})
|
|
977
|
+
.meta({ id: 'ProcessTestVirtualActor' });
|
|
978
|
+
|
|
979
|
+
export const ProcessTestFixtureResultSchema = z
|
|
980
|
+
.strictObject({
|
|
981
|
+
kind: z.literal('result'),
|
|
982
|
+
output: z.unknown().optional(),
|
|
983
|
+
context_update: JSONObjectSchema.optional(),
|
|
984
|
+
transition_to: z.string().optional(),
|
|
985
|
+
skip_node: z.boolean().optional(),
|
|
986
|
+
})
|
|
987
|
+
.meta({ id: 'ProcessTestFixtureResult' });
|
|
988
|
+
|
|
989
|
+
export const ProcessTestFixtureErrorSchema = z
|
|
990
|
+
.strictObject({
|
|
991
|
+
kind: z.literal('error'),
|
|
992
|
+
message: z.string(),
|
|
993
|
+
retry: z.boolean(),
|
|
994
|
+
})
|
|
995
|
+
.meta({ id: 'ProcessTestFixtureError' });
|
|
996
|
+
|
|
997
|
+
export const ProcessTestFixtureResponseSchema = z
|
|
998
|
+
.discriminatedUnion('kind', [ProcessTestFixtureResultSchema, ProcessTestFixtureErrorSchema])
|
|
999
|
+
.meta({ id: 'ProcessTestFixtureResponse' });
|
|
1000
|
+
|
|
1001
|
+
export const ProcessTestNodeFixtureSchema = z
|
|
1002
|
+
.strictObject({
|
|
1003
|
+
node: z.string(),
|
|
1004
|
+
workflow_path: z.array(z.string()).optional(),
|
|
1005
|
+
responses: z.array(ProcessTestFixtureResponseSchema),
|
|
1006
|
+
guard_facts: JSONObjectSchema.optional(),
|
|
1007
|
+
})
|
|
1008
|
+
.meta({ id: 'ProcessTestNodeFixture' });
|
|
1009
|
+
|
|
1010
|
+
export const ProcessTestHumanActionSchema = z
|
|
1011
|
+
.strictObject({
|
|
1012
|
+
node: z.string(),
|
|
1013
|
+
workflow_path: z.array(z.string()).optional(),
|
|
1014
|
+
actor: z.string(),
|
|
1015
|
+
result: JSONObjectSchema,
|
|
1016
|
+
expect: z.enum(['accepted', 'forbidden']),
|
|
1017
|
+
})
|
|
1018
|
+
.meta({ id: 'ProcessTestHumanAction' });
|
|
1019
|
+
|
|
1020
|
+
export const ProcessTestAssertionsSchema = z
|
|
1021
|
+
.strictObject({
|
|
1022
|
+
status: z.enum(['completed', 'failed', 'cancelled']).optional(),
|
|
1023
|
+
path: z.array(z.string()).optional(),
|
|
1024
|
+
required_nodes: z.array(z.string()).optional(),
|
|
1025
|
+
forbidden_nodes: z.array(z.string()).optional(),
|
|
1026
|
+
context: JSONObjectSchema.optional(),
|
|
1027
|
+
fixture_calls: z.record(z.string(), z.number()).optional(),
|
|
1028
|
+
context_at_nodes: z.record(z.string(), JSONObjectSchema).optional(),
|
|
1029
|
+
})
|
|
1030
|
+
.meta({ id: 'ProcessTestAssertions' });
|
|
1031
|
+
|
|
1032
|
+
export const ProcessTestScenarioSchema = z
|
|
1033
|
+
.strictObject({
|
|
1034
|
+
id: z.string(),
|
|
1035
|
+
name: z.string(),
|
|
1036
|
+
description: z.string().optional(),
|
|
1037
|
+
initial_context: JSONObjectSchema,
|
|
1038
|
+
actors: z.array(ProcessTestVirtualActorSchema),
|
|
1039
|
+
fixtures: z.array(ProcessTestNodeFixtureSchema),
|
|
1040
|
+
human_actions: z.array(ProcessTestHumanActionSchema),
|
|
1041
|
+
assertions: ProcessTestAssertionsSchema,
|
|
1042
|
+
timeout_seconds: z.number().int().min(1).max(300).default(30),
|
|
1043
|
+
})
|
|
1044
|
+
.meta({ id: 'ProcessTestScenario' });
|
|
1045
|
+
|
|
1046
|
+
export const ProcessTestSuiteSchema = z
|
|
1047
|
+
.strictObject({
|
|
1048
|
+
id: z.string(),
|
|
1049
|
+
account: z.string(),
|
|
1050
|
+
project: z.string(),
|
|
1051
|
+
process_root_id: z.string(),
|
|
1052
|
+
name: z.string(),
|
|
1053
|
+
description: z.string().optional(),
|
|
1054
|
+
scenarios: z.array(ProcessTestScenarioSchema),
|
|
1055
|
+
created_by: z.string(),
|
|
1056
|
+
updated_by: z.string(),
|
|
1057
|
+
created_at: z.string().meta({ format: 'date-time' }),
|
|
1058
|
+
updated_at: z.string().meta({ format: 'date-time' }),
|
|
1059
|
+
})
|
|
1060
|
+
.meta({ id: 'ProcessTestSuite' });
|
|
1061
|
+
|
|
1062
|
+
export const ProcessTestSuiteArraySchema = z.array(ProcessTestSuiteSchema).meta({ id: 'ProcessTestSuiteArray' });
|
|
1063
|
+
|
|
1064
|
+
export const CreateProcessTestSuitePayloadSchema = z
|
|
1065
|
+
.strictObject({
|
|
1066
|
+
name: z.string(),
|
|
1067
|
+
description: z.string().optional(),
|
|
1068
|
+
scenarios: z.array(ProcessTestScenarioSchema),
|
|
1069
|
+
})
|
|
1070
|
+
.meta({ id: 'CreateProcessTestSuitePayload' });
|
|
1071
|
+
|
|
1072
|
+
export const UpdateProcessTestSuitePayloadSchema = CreateProcessTestSuitePayloadSchema.partial().meta({
|
|
1073
|
+
id: 'UpdateProcessTestSuitePayload',
|
|
1074
|
+
});
|
|
1075
|
+
|
|
1076
|
+
export const StartProcessTestRunPayloadSchema = z
|
|
1077
|
+
.strictObject({
|
|
1078
|
+
suite_id: z.string(),
|
|
1079
|
+
process_revision_id: z.string(),
|
|
1080
|
+
scenario_ids: z.array(z.string()).optional(),
|
|
1081
|
+
})
|
|
1082
|
+
.meta({ id: 'StartProcessTestRunPayload' });
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Identifies what a test run was executed against. Stored subjects carry the revision identity
|
|
1086
|
+
* of a persisted process definition; resolved subjects name an in-code process served by an app
|
|
1087
|
+
* package or built into the server; inline subjects carry no external identity at all — the
|
|
1088
|
+
* definition snapshot recorded on the run is the whole subject.
|
|
1089
|
+
*/
|
|
1090
|
+
export const ProcessTestStoredSubjectSchema = z
|
|
1091
|
+
.strictObject({
|
|
1092
|
+
kind: z.literal('stored'),
|
|
1093
|
+
process_root_id: z.string(),
|
|
1094
|
+
process_revision_id: z.string(),
|
|
1095
|
+
})
|
|
1096
|
+
.meta({ id: 'ProcessTestStoredSubject' });
|
|
1097
|
+
|
|
1098
|
+
export const ProcessTestResolvedSubjectSchema = z
|
|
1099
|
+
.strictObject({
|
|
1100
|
+
kind: z.literal('resolved'),
|
|
1101
|
+
/** The in-code process id that was resolved, such as `app:acme:invoice-review`. */
|
|
1102
|
+
process_id: z.string(),
|
|
1103
|
+
/** App package version pinned for the run, when the process came from an app package. */
|
|
1104
|
+
app_version: z.string().optional(),
|
|
1105
|
+
})
|
|
1106
|
+
.meta({ id: 'ProcessTestResolvedSubject' });
|
|
1107
|
+
|
|
1108
|
+
export const ProcessTestInlineSubjectSchema = z
|
|
1109
|
+
.strictObject({
|
|
1110
|
+
kind: z.literal('inline'),
|
|
1111
|
+
})
|
|
1112
|
+
.meta({ id: 'ProcessTestInlineSubject' });
|
|
1113
|
+
|
|
1114
|
+
export const ProcessTestSubjectSchema = z
|
|
1115
|
+
.discriminatedUnion('kind', [
|
|
1116
|
+
ProcessTestStoredSubjectSchema,
|
|
1117
|
+
ProcessTestResolvedSubjectSchema,
|
|
1118
|
+
ProcessTestInlineSubjectSchema,
|
|
1119
|
+
])
|
|
1120
|
+
.meta({ id: 'ProcessTestSubject' });
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Tests an in-code process by id — `app:<app>:<process>` or a built-in `sys:` process.
|
|
1124
|
+
* `app_version` pins the app package version for the whole run so it stays reproducible, and only
|
|
1125
|
+
* applies to an `app:` id.
|
|
1126
|
+
*/
|
|
1127
|
+
export const ProcessTestTargetByIdSchema = z
|
|
1128
|
+
.strictObject({
|
|
1129
|
+
id: z.string(),
|
|
1130
|
+
app_version: z.string().optional(),
|
|
1131
|
+
})
|
|
1132
|
+
.meta({ id: 'ProcessTestTargetById' });
|
|
1133
|
+
|
|
1134
|
+
/** Tests an ephemeral definition body that is not stored or served by an app. */
|
|
1135
|
+
export const ProcessTestTargetWithDefinitionSchema = z
|
|
1136
|
+
.strictObject({
|
|
1137
|
+
definition: ProcessDefinitionBodySchema,
|
|
1138
|
+
})
|
|
1139
|
+
.meta({ id: 'ProcessTestTargetWithDefinition' });
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* What to test: exactly one of an in-code process id or an inline definition body. Modelled as a
|
|
1143
|
+
* union rather than an object of optional properties so the published contract rejects an empty
|
|
1144
|
+
* target, a target carrying both, and `app_version` on an inline definition.
|
|
1145
|
+
*/
|
|
1146
|
+
export const ProcessTestTargetSchema = z
|
|
1147
|
+
.union([ProcessTestTargetByIdSchema, ProcessTestTargetWithDefinitionSchema])
|
|
1148
|
+
.meta({ id: 'ProcessTestTarget' });
|
|
1149
|
+
|
|
1150
|
+
export const SubmitProcessTestRunPayloadSchema = z
|
|
1151
|
+
.strictObject({
|
|
1152
|
+
process: ProcessTestTargetSchema,
|
|
1153
|
+
scenarios: z.array(ProcessTestScenarioSchema).min(1),
|
|
1154
|
+
})
|
|
1155
|
+
.meta({ id: 'SubmitProcessTestRunPayload' });
|
|
1156
|
+
|
|
1157
|
+
export const ProcessTestAssertionResultSchema = z
|
|
1158
|
+
.strictObject({
|
|
1159
|
+
assertion: z.string(),
|
|
1160
|
+
passed: z.boolean(),
|
|
1161
|
+
expected: z.unknown().optional(),
|
|
1162
|
+
actual: z.unknown().optional(),
|
|
1163
|
+
message: z.string().optional(),
|
|
1164
|
+
})
|
|
1165
|
+
.meta({ id: 'ProcessTestAssertionResult' });
|
|
1166
|
+
|
|
1167
|
+
export const ProcessTestActorDecisionSchema = z
|
|
1168
|
+
.strictObject({
|
|
1169
|
+
node: z.string(),
|
|
1170
|
+
actor: z.string(),
|
|
1171
|
+
decision: z.enum(['accepted', 'forbidden']),
|
|
1172
|
+
message: z.string().optional(),
|
|
1173
|
+
})
|
|
1174
|
+
.meta({ id: 'ProcessTestActorDecision' });
|
|
1175
|
+
|
|
1176
|
+
export const ProcessTestCoverageSchema = z
|
|
1177
|
+
.strictObject({
|
|
1178
|
+
nodes: z.array(z.string()),
|
|
1179
|
+
transitions: z.array(z.string()),
|
|
1180
|
+
node_percent: z.number(),
|
|
1181
|
+
transition_percent: z.number(),
|
|
1182
|
+
})
|
|
1183
|
+
.meta({ id: 'ProcessTestCoverage' });
|
|
1184
|
+
|
|
1185
|
+
export const ProcessTestChildTraceSchema = z
|
|
1186
|
+
.strictObject({
|
|
1187
|
+
workflow_path: z.array(z.string()),
|
|
1188
|
+
status: ProcessTestRunStatusSchema,
|
|
1189
|
+
error: z.string().optional(),
|
|
1190
|
+
process_state: ProcessStateSchema.optional(),
|
|
1191
|
+
node_history: z.array(NodeHistoryEntrySchema),
|
|
1192
|
+
coverage: ProcessTestCoverageSchema,
|
|
1193
|
+
fixture_calls: z.record(z.string(), z.number()),
|
|
1194
|
+
actor_decisions: z.array(ProcessTestActorDecisionSchema),
|
|
1195
|
+
})
|
|
1196
|
+
.meta({ id: 'ProcessTestChildTrace' });
|
|
1197
|
+
|
|
1198
|
+
export const ProcessTestScenarioResultSchema = z
|
|
1199
|
+
.strictObject({
|
|
1200
|
+
scenario_id: z.string(),
|
|
1201
|
+
name: z.string(),
|
|
1202
|
+
/** Immutable scenario input captured when the run is created. Absent on legacy run documents. */
|
|
1203
|
+
initial_context: JSONObjectSchema.optional(),
|
|
1204
|
+
status: ProcessTestRunStatusSchema,
|
|
1205
|
+
error: z.string().optional(),
|
|
1206
|
+
process_state: ProcessStateSchema.optional(),
|
|
1207
|
+
node_history: z.array(NodeHistoryEntrySchema),
|
|
1208
|
+
assertions: z.array(ProcessTestAssertionResultSchema),
|
|
1209
|
+
fixture_calls: z.record(z.string(), z.number()),
|
|
1210
|
+
actor_decisions: z.array(ProcessTestActorDecisionSchema),
|
|
1211
|
+
coverage: ProcessTestCoverageSchema,
|
|
1212
|
+
child_traces: z.array(ProcessTestChildTraceSchema),
|
|
1213
|
+
started_at: z.string().meta({ format: 'date-time' }),
|
|
1214
|
+
completed_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1215
|
+
})
|
|
1216
|
+
.meta({ id: 'ProcessTestScenarioResult' });
|
|
1217
|
+
|
|
1218
|
+
export const ProcessTestRunSchema = z
|
|
1219
|
+
.strictObject({
|
|
1220
|
+
id: z.string(),
|
|
1221
|
+
account: z.string(),
|
|
1222
|
+
project: z.string(),
|
|
1223
|
+
subject: ProcessTestSubjectSchema,
|
|
1224
|
+
/** Present only for `stored` subjects. */
|
|
1225
|
+
process_root_id: z.string().optional(),
|
|
1226
|
+
/** Present only for `stored` subjects. */
|
|
1227
|
+
process_revision_id: z.string().optional(),
|
|
1228
|
+
/** Present only for `stored` subjects — runs submitted directly carry their scenarios inline. */
|
|
1229
|
+
suite_id: z.string().optional(),
|
|
1230
|
+
definition_hash: z.string(),
|
|
1231
|
+
status: ProcessTestRunStatusSchema,
|
|
1232
|
+
/**
|
|
1233
|
+
* Whether the tested definition still matches the current head revision. Always false for
|
|
1234
|
+
* non-stored subjects, which have no later revision to drift from: for those,
|
|
1235
|
+
* `definition_hash` and `subject.app_version` serve reproducibility instead.
|
|
1236
|
+
*/
|
|
1237
|
+
stale: z.boolean(),
|
|
1238
|
+
process_definition_snapshot: ProcessDefinitionBodySchema,
|
|
1239
|
+
scenarios: z.array(ProcessTestScenarioResultSchema),
|
|
1240
|
+
created_by: z.string(),
|
|
1241
|
+
created_at: z.string().meta({ format: 'date-time' }),
|
|
1242
|
+
started_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1243
|
+
completed_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1244
|
+
})
|
|
1245
|
+
.meta({ id: 'ProcessTestRun' });
|
|
1246
|
+
|
|
1247
|
+
export const ProcessTestRunArraySchema = z.array(ProcessTestRunSchema).meta({ id: 'ProcessTestRunArray' });
|
|
1248
|
+
|
|
1249
|
+
export const ListProcessTestRunsQuerySchema = z
|
|
1250
|
+
.strictObject({
|
|
1251
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
1252
|
+
})
|
|
1253
|
+
.meta({ id: 'ListProcessTestRunsQuery' });
|
|
1254
|
+
|
|
1255
|
+
export const UpdateProcessTestScenarioPayloadSchema = z
|
|
1256
|
+
.strictObject({
|
|
1257
|
+
checkpoint_token: z.string(),
|
|
1258
|
+
scenario_id: z.string(),
|
|
1259
|
+
workflow_path: z.array(z.string()),
|
|
1260
|
+
status: ProcessTestRunStatusSchema,
|
|
1261
|
+
error: z.string().optional(),
|
|
1262
|
+
process_state: ProcessStateSchema.optional(),
|
|
1263
|
+
node_history: z.array(NodeHistoryEntrySchema),
|
|
1264
|
+
assertions: z.array(ProcessTestAssertionResultSchema),
|
|
1265
|
+
fixture_calls: z.record(z.string(), z.number()),
|
|
1266
|
+
actor_decisions: z.array(ProcessTestActorDecisionSchema),
|
|
1267
|
+
coverage: ProcessTestCoverageSchema,
|
|
1268
|
+
started_at: z.string().meta({ format: 'date-time' }),
|
|
1269
|
+
completed_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1270
|
+
})
|
|
1271
|
+
.meta({ id: 'UpdateProcessTestScenarioPayload' });
|
|
@@ -66,12 +66,14 @@ export const ProjectSearchTierSchema = z.enum(['standard', 'performance']).meta(
|
|
|
66
66
|
|
|
67
67
|
export const ElasticsearchBackendSchema = z.enum(['serverless', 'hosted']).meta({ id: 'ElasticsearchBackend' });
|
|
68
68
|
|
|
69
|
-
export const ProjectSearchPropertyTypeSchema = z
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
export const ProjectSearchPropertyTypeSchema = z
|
|
70
|
+
.enum(['keyword', 'text', 'boolean', 'long', 'double', 'date', 'geo_point'])
|
|
71
|
+
.meta({
|
|
72
|
+
id: 'ProjectSearchPropertyType',
|
|
73
|
+
description:
|
|
74
|
+
'Elasticsearch field types that may be explicitly assigned to content-object properties. Paths are ' +
|
|
75
|
+
"relative to the object's `properties` field.",
|
|
76
|
+
});
|
|
75
77
|
|
|
76
78
|
export const ProjectSearchPropertyMappingSchema = z
|
|
77
79
|
.object({
|
|
@@ -90,7 +92,7 @@ export const ProjectSearchPropertyMappingSchema = z
|
|
|
90
92
|
.meta({
|
|
91
93
|
description:
|
|
92
94
|
'Skip malformed values instead of rejecting the whole document. Valid only for long, double, ' +
|
|
93
|
-
'and
|
|
95
|
+
'date, and geo_point mappings.',
|
|
94
96
|
}),
|
|
95
97
|
})
|
|
96
98
|
.meta({
|
|
@@ -416,6 +418,8 @@ export const ProjectIntakeConfigurationSchema = z
|
|
|
416
418
|
*/
|
|
417
419
|
export const ProjectConfigurationSchema = z
|
|
418
420
|
.strictObject({
|
|
421
|
+
default_environment: z.string().optional(),
|
|
422
|
+
default_model: z.string().optional(),
|
|
419
423
|
human_context: z.string().optional(),
|
|
420
424
|
defaults: ProjectModelDefaultsSchema.optional(),
|
|
421
425
|
default_visibility: ResourceVisibilitySchema.optional(),
|
|
@@ -13,12 +13,13 @@ import {
|
|
|
13
13
|
type SerperConfigurationInput,
|
|
14
14
|
SupportedIntegrations,
|
|
15
15
|
} from '../integrations.js';
|
|
16
|
-
import
|
|
17
|
-
ICreateProjectPayload,
|
|
18
|
-
ModelDefault,
|
|
19
|
-
Project,
|
|
20
|
-
ProjectPluginsUpdatePayload,
|
|
21
|
-
|
|
16
|
+
import {
|
|
17
|
+
type ICreateProjectPayload,
|
|
18
|
+
type ModelDefault,
|
|
19
|
+
type Project,
|
|
20
|
+
type ProjectPluginsUpdatePayload,
|
|
21
|
+
SYSTEM_INTERACTION_CATEGORIES,
|
|
22
|
+
type SystemDefaults,
|
|
22
23
|
SystemInteractionCategory,
|
|
23
24
|
} from '../project.js';
|
|
24
25
|
import type { JsonObject } from './adapter.js';
|
|
@@ -70,6 +71,54 @@ describe('gate 1 — the schema is the single source of truth for the converted
|
|
|
70
71
|
assertType<Equals<SerperConfigurationInput['integration'], SupportedIntegrations.serper>>(true);
|
|
71
72
|
expect(true).toBe(true);
|
|
72
73
|
});
|
|
74
|
+
|
|
75
|
+
it('accepts an AWS integration that is declared but not configured', () => {
|
|
76
|
+
// `getIntegrationConfig` reads `integrations?.[integrationId] ?? {}`, so a project that has
|
|
77
|
+
// never set up AWS answers with the discriminator and `enabled` alone. `s3_role_arn` was
|
|
78
|
+
// required, which made that answer fail its own response contract on every call.
|
|
79
|
+
expect(
|
|
80
|
+
validateApiResponse('ProjectIntegrationConfigResponse', {
|
|
81
|
+
integration: SupportedIntegrations.aws,
|
|
82
|
+
enabled: false,
|
|
83
|
+
}).valid,
|
|
84
|
+
).toBe(true);
|
|
85
|
+
expect(
|
|
86
|
+
validateApiResponse('ProjectIntegrationConfigResponse', {
|
|
87
|
+
integration: SupportedIntegrations.aws,
|
|
88
|
+
enabled: true,
|
|
89
|
+
s3_role_arn: 'arn:aws:iam::123456789012:role/vertesia',
|
|
90
|
+
}).valid,
|
|
91
|
+
).toBe(true);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('accepts an ask_user_webhook integration that is declared but not configured', () => {
|
|
95
|
+
// Same defect as the AWS case above: `webhook_url` was required on the response, so an
|
|
96
|
+
// unconfigured project failed its own contract on every GET of this integration.
|
|
97
|
+
expect(
|
|
98
|
+
validateApiResponse('ProjectIntegrationConfigResponse', {
|
|
99
|
+
integration: SupportedIntegrations.ask_user_webhook,
|
|
100
|
+
enabled: false,
|
|
101
|
+
}).valid,
|
|
102
|
+
).toBe(true);
|
|
103
|
+
expect(
|
|
104
|
+
validateApiResponse('ProjectIntegrationConfigResponse', {
|
|
105
|
+
integration: SupportedIntegrations.ask_user_webhook,
|
|
106
|
+
enabled: true,
|
|
107
|
+
webhook_url: 'https://example.test/hooks/ask-user',
|
|
108
|
+
}).valid,
|
|
109
|
+
).toBe(true);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('still requires webhook_url when the integration is being configured', () => {
|
|
113
|
+
// The request schema must not follow the response into optionality — you cannot set this
|
|
114
|
+
// integration up without a URL.
|
|
115
|
+
expect(
|
|
116
|
+
validateApiRequest('ProjectIntegrationConfigRequest', {
|
|
117
|
+
integration: SupportedIntegrations.ask_user_webhook,
|
|
118
|
+
enabled: true,
|
|
119
|
+
}).valid,
|
|
120
|
+
).toBe(false);
|
|
121
|
+
});
|
|
73
122
|
});
|
|
74
123
|
|
|
75
124
|
/**
|
|
@@ -186,6 +235,11 @@ describe('gate 2 — the closure is closed, bottom-up', () => {
|
|
|
186
235
|
expect(true).toBe(true);
|
|
187
236
|
});
|
|
188
237
|
|
|
238
|
+
it('uses the analysis model default for both content query planning and reranking', () => {
|
|
239
|
+
expect(SYSTEM_INTERACTION_CATEGORIES.ContentSearchAgent).toBe(SystemInteractionCategory.analysis);
|
|
240
|
+
expect(SYSTEM_INTERACTION_CATEGORIES.ContentSearchReranker).toBe(SystemInteractionCategory.analysis);
|
|
241
|
+
});
|
|
242
|
+
|
|
189
243
|
it('publishes the property-mapping map without the propertyNames z.record adds', () => {
|
|
190
244
|
// `Record<string, ProjectSearchPropertyMapping>` is inline in the interface and has no
|
|
191
245
|
// TypeScript name, so it never becomes a canonical alias — it stays canonical AND derived,
|
|
@@ -197,6 +251,10 @@ describe('gate 2 — the closure is closed, bottom-up', () => {
|
|
|
197
251
|
});
|
|
198
252
|
});
|
|
199
253
|
|
|
254
|
+
it('publishes geo_point as an explicit project property mapping type', () => {
|
|
255
|
+
expect(ApiSchemaComponents.ProjectSearchPropertyType.enum).toContain('geo_point');
|
|
256
|
+
});
|
|
257
|
+
|
|
200
258
|
it('enforces the browser-use configuration the deleted AJV schema only described', () => {
|
|
201
259
|
// A `JSONSchemaType<BrowserUseProjectConfiguration>` used to sit beside the interface with
|
|
202
260
|
// descriptions that had already drifted from the TSDoc, and nothing compiled it. This is the
|