@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
|
@@ -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
|
|
|
@@ -567,8 +571,16 @@ export const CreateProcessDefinitionPayloadSchema: z.ZodType = z
|
|
|
567
571
|
|
|
568
572
|
export const DSLChildWorkflowStepSchema: z.ZodType = z
|
|
569
573
|
.strictObject({
|
|
570
|
-
type: z.literal('workflow').meta({ description: '
|
|
574
|
+
type: z.literal('workflow').meta({ description: 'Identifies this step as a child workflow' }),
|
|
571
575
|
name: z.string(),
|
|
576
|
+
title: z
|
|
577
|
+
.string()
|
|
578
|
+
.meta({ description: 'Title of the child workflow to be displayed in the UI workflow builder' })
|
|
579
|
+
.optional(),
|
|
580
|
+
description: z
|
|
581
|
+
.string()
|
|
582
|
+
.meta({ description: 'Description of the child workflow displayed in the UI workflow builder' })
|
|
583
|
+
.optional(),
|
|
572
584
|
vars: z
|
|
573
585
|
.looseObject({})
|
|
574
586
|
.meta({
|
|
@@ -627,6 +639,7 @@ export const DSLWorkflowDefinitionSchema: z.ZodType = z
|
|
|
627
639
|
result: z.string().optional(),
|
|
628
640
|
debug_mode: z.boolean().optional(),
|
|
629
641
|
id: z.string().meta({ description: 'Unique identifier for the object' }),
|
|
642
|
+
edit_revision: EditRevisionSchema,
|
|
630
643
|
updated_by: z.string().meta({ description: 'Identifier of the user who last modified the object' }),
|
|
631
644
|
created_by: z.string().meta({ description: 'Identifier of the user who created the object' }),
|
|
632
645
|
created_at: z.string().meta({ description: 'ISO timestamp of when the object was created' }),
|
|
@@ -647,6 +660,7 @@ export const DSLWorkflowDefinitionResponseSchema: z.ZodType = z
|
|
|
647
660
|
result: z.string().optional(),
|
|
648
661
|
debug_mode: z.boolean().optional(),
|
|
649
662
|
id: z.string().meta({ description: 'Unique identifier for the object' }),
|
|
663
|
+
edit_revision: EditRevisionSchema,
|
|
650
664
|
updated_by: z.string().meta({ description: 'Identifier of the user who last modified the object' }),
|
|
651
665
|
created_by: z.string().meta({ description: 'Identifier of the user who created the object' }),
|
|
652
666
|
created_at: z.string().meta({ description: 'ISO timestamp of when the object was created' }),
|
|
@@ -755,6 +769,33 @@ export const WorkflowDefinitionPayloadSchema: z.ZodType = z
|
|
|
755
769
|
])
|
|
756
770
|
.meta({ id: 'WorkflowDefinitionPayload' });
|
|
757
771
|
|
|
772
|
+
export const UpdateWorkflowDefinitionPayloadWithActivitiesSchema: z.ZodType = z
|
|
773
|
+
.strictObject({
|
|
774
|
+
...dslWorkflowSpecBaseFields,
|
|
775
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
776
|
+
steps: z.array(z.lazy(() => DSLWorkflowStepSchema)).optional(),
|
|
777
|
+
activities: z.array(DSLActivitySpecSchema).meta(deprecatedActivitiesMeta),
|
|
778
|
+
spec_format: z.literal('activities'),
|
|
779
|
+
})
|
|
780
|
+
.meta({ id: 'UpdateWorkflowDefinitionPayloadWithActivities' });
|
|
781
|
+
|
|
782
|
+
export const UpdateWorkflowDefinitionPayloadWithStepsSchema: z.ZodType = z
|
|
783
|
+
.strictObject({
|
|
784
|
+
...dslWorkflowSpecBaseFields,
|
|
785
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
786
|
+
steps: z.array(z.lazy(() => DSLWorkflowStepSchema)),
|
|
787
|
+
activities: z.array(DSLActivitySpecSchema).meta(deprecatedActivitiesMeta).optional(),
|
|
788
|
+
spec_format: z.literal('steps'),
|
|
789
|
+
})
|
|
790
|
+
.meta({ id: 'UpdateWorkflowDefinitionPayloadWithSteps' });
|
|
791
|
+
|
|
792
|
+
export const UpdateWorkflowDefinitionPayloadSchema: z.ZodType = z
|
|
793
|
+
.discriminatedUnion('spec_format', [
|
|
794
|
+
UpdateWorkflowDefinitionPayloadWithStepsSchema as unknown as z.ZodObject,
|
|
795
|
+
UpdateWorkflowDefinitionPayloadWithActivitiesSchema as unknown as z.ZodObject,
|
|
796
|
+
])
|
|
797
|
+
.meta({ id: 'UpdateWorkflowDefinitionPayload' });
|
|
798
|
+
|
|
758
799
|
export const DSLWorkflowStepSchema: z.ZodType = z
|
|
759
800
|
.discriminatedUnion('type', [
|
|
760
801
|
DSLActivityStepSchema,
|
|
@@ -840,6 +881,7 @@ export const NodeDefinitionMapSchema: z.ZodType = z
|
|
|
840
881
|
export const ProcessDefinitionSchema: z.ZodType = z
|
|
841
882
|
.strictObject({
|
|
842
883
|
id: z.string(),
|
|
884
|
+
edit_revision: EditRevisionSchema,
|
|
843
885
|
account: z.string(),
|
|
844
886
|
project: z.string(),
|
|
845
887
|
name: z.string(),
|
|
@@ -876,6 +918,7 @@ export const ProcessDefinitionBodySchema: z.ZodType = z
|
|
|
876
918
|
|
|
877
919
|
export const UpdateProcessDefinitionPayloadSchema: z.ZodType = z
|
|
878
920
|
.strictObject({
|
|
921
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
879
922
|
name: z.string().optional(),
|
|
880
923
|
description: z.string().optional(),
|
|
881
924
|
status: ProcessDefinitionStatusSchema.meta({
|
|
@@ -927,3 +970,310 @@ export const RecordProcessRunPayloadSchema = z
|
|
|
927
970
|
started_by: z.string().optional(),
|
|
928
971
|
})
|
|
929
972
|
.meta({ id: 'RecordProcessRunPayload' });
|
|
973
|
+
|
|
974
|
+
export const ProcessTestRunStatusSchema = z
|
|
975
|
+
.enum(['pending', 'running', 'passed', 'failed', 'cancelled'])
|
|
976
|
+
.meta({ id: 'ProcessTestRunStatus' });
|
|
977
|
+
|
|
978
|
+
export const ProcessTestVirtualActorSchema = z
|
|
979
|
+
.strictObject({
|
|
980
|
+
id: z.string(),
|
|
981
|
+
label: z.string().optional(),
|
|
982
|
+
refs: z.array(z.string()),
|
|
983
|
+
permissions: z.array(PermissionSchema),
|
|
984
|
+
})
|
|
985
|
+
.meta({ id: 'ProcessTestVirtualActor' });
|
|
986
|
+
|
|
987
|
+
export const ProcessTestFixtureResultSchema = z
|
|
988
|
+
.strictObject({
|
|
989
|
+
kind: z.literal('result'),
|
|
990
|
+
output: z.unknown().optional(),
|
|
991
|
+
context_update: JSONObjectSchema.optional(),
|
|
992
|
+
transition_to: z.string().optional(),
|
|
993
|
+
skip_node: z.boolean().optional(),
|
|
994
|
+
})
|
|
995
|
+
.meta({ id: 'ProcessTestFixtureResult' });
|
|
996
|
+
|
|
997
|
+
export const ProcessTestFixtureErrorSchema = z
|
|
998
|
+
.strictObject({
|
|
999
|
+
kind: z.literal('error'),
|
|
1000
|
+
message: z.string(),
|
|
1001
|
+
retry: z.boolean(),
|
|
1002
|
+
})
|
|
1003
|
+
.meta({ id: 'ProcessTestFixtureError' });
|
|
1004
|
+
|
|
1005
|
+
export const ProcessTestFixtureResponseSchema = z
|
|
1006
|
+
.discriminatedUnion('kind', [ProcessTestFixtureResultSchema, ProcessTestFixtureErrorSchema])
|
|
1007
|
+
.meta({ id: 'ProcessTestFixtureResponse' });
|
|
1008
|
+
|
|
1009
|
+
export const ProcessTestNodeFixtureSchema = z
|
|
1010
|
+
.strictObject({
|
|
1011
|
+
node: z.string(),
|
|
1012
|
+
workflow_path: z.array(z.string()).optional(),
|
|
1013
|
+
responses: z.array(ProcessTestFixtureResponseSchema),
|
|
1014
|
+
guard_facts: JSONObjectSchema.optional(),
|
|
1015
|
+
})
|
|
1016
|
+
.meta({ id: 'ProcessTestNodeFixture' });
|
|
1017
|
+
|
|
1018
|
+
export const ProcessTestHumanActionSchema = z
|
|
1019
|
+
.strictObject({
|
|
1020
|
+
node: z.string(),
|
|
1021
|
+
workflow_path: z.array(z.string()).optional(),
|
|
1022
|
+
actor: z.string(),
|
|
1023
|
+
result: JSONObjectSchema,
|
|
1024
|
+
expect: z.enum(['accepted', 'forbidden']),
|
|
1025
|
+
})
|
|
1026
|
+
.meta({ id: 'ProcessTestHumanAction' });
|
|
1027
|
+
|
|
1028
|
+
export const ProcessTestAssertionsSchema = z
|
|
1029
|
+
.strictObject({
|
|
1030
|
+
status: z.enum(['completed', 'failed', 'cancelled']).optional(),
|
|
1031
|
+
path: z.array(z.string()).optional(),
|
|
1032
|
+
required_nodes: z.array(z.string()).optional(),
|
|
1033
|
+
forbidden_nodes: z.array(z.string()).optional(),
|
|
1034
|
+
context: JSONObjectSchema.optional(),
|
|
1035
|
+
fixture_calls: z.record(z.string(), z.number()).optional(),
|
|
1036
|
+
context_at_nodes: z.record(z.string(), JSONObjectSchema).optional(),
|
|
1037
|
+
})
|
|
1038
|
+
.meta({ id: 'ProcessTestAssertions' });
|
|
1039
|
+
|
|
1040
|
+
export const ProcessTestScenarioSchema = z
|
|
1041
|
+
.strictObject({
|
|
1042
|
+
id: z.string(),
|
|
1043
|
+
name: z.string(),
|
|
1044
|
+
description: z.string().optional(),
|
|
1045
|
+
initial_context: JSONObjectSchema,
|
|
1046
|
+
actors: z.array(ProcessTestVirtualActorSchema),
|
|
1047
|
+
fixtures: z.array(ProcessTestNodeFixtureSchema),
|
|
1048
|
+
human_actions: z.array(ProcessTestHumanActionSchema),
|
|
1049
|
+
assertions: ProcessTestAssertionsSchema,
|
|
1050
|
+
timeout_seconds: z.number().int().min(1).max(300).default(30),
|
|
1051
|
+
})
|
|
1052
|
+
.meta({ id: 'ProcessTestScenario' });
|
|
1053
|
+
|
|
1054
|
+
export const ProcessTestSuiteSchema = z
|
|
1055
|
+
.strictObject({
|
|
1056
|
+
id: z.string(),
|
|
1057
|
+
account: z.string(),
|
|
1058
|
+
project: z.string(),
|
|
1059
|
+
process_root_id: z.string(),
|
|
1060
|
+
name: z.string(),
|
|
1061
|
+
description: z.string().optional(),
|
|
1062
|
+
scenarios: z.array(ProcessTestScenarioSchema),
|
|
1063
|
+
created_by: z.string(),
|
|
1064
|
+
updated_by: z.string(),
|
|
1065
|
+
created_at: z.string().meta({ format: 'date-time' }),
|
|
1066
|
+
updated_at: z.string().meta({ format: 'date-time' }),
|
|
1067
|
+
})
|
|
1068
|
+
.meta({ id: 'ProcessTestSuite' });
|
|
1069
|
+
|
|
1070
|
+
export const ProcessTestSuiteArraySchema = z.array(ProcessTestSuiteSchema).meta({ id: 'ProcessTestSuiteArray' });
|
|
1071
|
+
|
|
1072
|
+
export const CreateProcessTestSuitePayloadSchema = z
|
|
1073
|
+
.strictObject({
|
|
1074
|
+
name: z.string(),
|
|
1075
|
+
description: z.string().optional(),
|
|
1076
|
+
scenarios: z.array(ProcessTestScenarioSchema),
|
|
1077
|
+
})
|
|
1078
|
+
.meta({ id: 'CreateProcessTestSuitePayload' });
|
|
1079
|
+
|
|
1080
|
+
export const UpdateProcessTestSuitePayloadSchema = CreateProcessTestSuitePayloadSchema.partial().meta({
|
|
1081
|
+
id: 'UpdateProcessTestSuitePayload',
|
|
1082
|
+
});
|
|
1083
|
+
|
|
1084
|
+
export const StartProcessTestRunPayloadSchema = z
|
|
1085
|
+
.strictObject({
|
|
1086
|
+
suite_id: z.string(),
|
|
1087
|
+
process_revision_id: z.string(),
|
|
1088
|
+
scenario_ids: z.array(z.string()).optional(),
|
|
1089
|
+
})
|
|
1090
|
+
.meta({ id: 'StartProcessTestRunPayload' });
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Identifies what a test run was executed against. Stored subjects carry the revision identity
|
|
1094
|
+
* of a persisted process definition; resolved subjects name an in-code process served by an app
|
|
1095
|
+
* package or built into the server; inline subjects carry no external identity at all — the
|
|
1096
|
+
* definition snapshot recorded on the run is the whole subject.
|
|
1097
|
+
*/
|
|
1098
|
+
export const ProcessTestStoredSubjectSchema = z
|
|
1099
|
+
.strictObject({
|
|
1100
|
+
kind: z.literal('stored'),
|
|
1101
|
+
process_root_id: z.string(),
|
|
1102
|
+
process_revision_id: z.string(),
|
|
1103
|
+
})
|
|
1104
|
+
.meta({ id: 'ProcessTestStoredSubject' });
|
|
1105
|
+
|
|
1106
|
+
export const ProcessTestResolvedSubjectSchema = z
|
|
1107
|
+
.strictObject({
|
|
1108
|
+
kind: z.literal('resolved'),
|
|
1109
|
+
/** The in-code process id that was resolved, such as `app:acme:invoice-review`. */
|
|
1110
|
+
process_id: z.string(),
|
|
1111
|
+
/** App package version pinned for the run, when the process came from an app package. */
|
|
1112
|
+
app_version: z.string().optional(),
|
|
1113
|
+
})
|
|
1114
|
+
.meta({ id: 'ProcessTestResolvedSubject' });
|
|
1115
|
+
|
|
1116
|
+
export const ProcessTestInlineSubjectSchema = z
|
|
1117
|
+
.strictObject({
|
|
1118
|
+
kind: z.literal('inline'),
|
|
1119
|
+
})
|
|
1120
|
+
.meta({ id: 'ProcessTestInlineSubject' });
|
|
1121
|
+
|
|
1122
|
+
export const ProcessTestSubjectSchema = z
|
|
1123
|
+
.discriminatedUnion('kind', [
|
|
1124
|
+
ProcessTestStoredSubjectSchema,
|
|
1125
|
+
ProcessTestResolvedSubjectSchema,
|
|
1126
|
+
ProcessTestInlineSubjectSchema,
|
|
1127
|
+
])
|
|
1128
|
+
.meta({ id: 'ProcessTestSubject' });
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Tests an in-code process by id — `app:<app>:<process>` or a built-in `sys:` process.
|
|
1132
|
+
* `app_version` pins the app package version for the whole run so it stays reproducible, and only
|
|
1133
|
+
* applies to an `app:` id.
|
|
1134
|
+
*/
|
|
1135
|
+
export const ProcessTestTargetByIdSchema = z
|
|
1136
|
+
.strictObject({
|
|
1137
|
+
id: z.string(),
|
|
1138
|
+
app_version: z.string().optional(),
|
|
1139
|
+
})
|
|
1140
|
+
.meta({ id: 'ProcessTestTargetById' });
|
|
1141
|
+
|
|
1142
|
+
/** Tests an ephemeral definition body that is not stored or served by an app. */
|
|
1143
|
+
export const ProcessTestTargetWithDefinitionSchema = z
|
|
1144
|
+
.strictObject({
|
|
1145
|
+
definition: ProcessDefinitionBodySchema,
|
|
1146
|
+
})
|
|
1147
|
+
.meta({ id: 'ProcessTestTargetWithDefinition' });
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* What to test: exactly one of an in-code process id or an inline definition body. Modelled as a
|
|
1151
|
+
* union rather than an object of optional properties so the published contract rejects an empty
|
|
1152
|
+
* target, a target carrying both, and `app_version` on an inline definition.
|
|
1153
|
+
*/
|
|
1154
|
+
export const ProcessTestTargetSchema = z
|
|
1155
|
+
.union([ProcessTestTargetByIdSchema, ProcessTestTargetWithDefinitionSchema])
|
|
1156
|
+
.meta({ id: 'ProcessTestTarget' });
|
|
1157
|
+
|
|
1158
|
+
export const SubmitProcessTestRunPayloadSchema = z
|
|
1159
|
+
.strictObject({
|
|
1160
|
+
process: ProcessTestTargetSchema,
|
|
1161
|
+
scenarios: z.array(ProcessTestScenarioSchema).min(1),
|
|
1162
|
+
})
|
|
1163
|
+
.meta({ id: 'SubmitProcessTestRunPayload' });
|
|
1164
|
+
|
|
1165
|
+
export const ProcessTestAssertionResultSchema = z
|
|
1166
|
+
.strictObject({
|
|
1167
|
+
assertion: z.string(),
|
|
1168
|
+
passed: z.boolean(),
|
|
1169
|
+
expected: z.unknown().optional(),
|
|
1170
|
+
actual: z.unknown().optional(),
|
|
1171
|
+
message: z.string().optional(),
|
|
1172
|
+
})
|
|
1173
|
+
.meta({ id: 'ProcessTestAssertionResult' });
|
|
1174
|
+
|
|
1175
|
+
export const ProcessTestActorDecisionSchema = z
|
|
1176
|
+
.strictObject({
|
|
1177
|
+
node: z.string(),
|
|
1178
|
+
actor: z.string(),
|
|
1179
|
+
decision: z.enum(['accepted', 'forbidden']),
|
|
1180
|
+
message: z.string().optional(),
|
|
1181
|
+
})
|
|
1182
|
+
.meta({ id: 'ProcessTestActorDecision' });
|
|
1183
|
+
|
|
1184
|
+
export const ProcessTestCoverageSchema = z
|
|
1185
|
+
.strictObject({
|
|
1186
|
+
nodes: z.array(z.string()),
|
|
1187
|
+
transitions: z.array(z.string()),
|
|
1188
|
+
node_percent: z.number(),
|
|
1189
|
+
transition_percent: z.number(),
|
|
1190
|
+
})
|
|
1191
|
+
.meta({ id: 'ProcessTestCoverage' });
|
|
1192
|
+
|
|
1193
|
+
export const ProcessTestChildTraceSchema = z
|
|
1194
|
+
.strictObject({
|
|
1195
|
+
workflow_path: z.array(z.string()),
|
|
1196
|
+
status: ProcessTestRunStatusSchema,
|
|
1197
|
+
error: z.string().optional(),
|
|
1198
|
+
process_state: ProcessStateSchema.optional(),
|
|
1199
|
+
node_history: z.array(NodeHistoryEntrySchema),
|
|
1200
|
+
coverage: ProcessTestCoverageSchema,
|
|
1201
|
+
fixture_calls: z.record(z.string(), z.number()),
|
|
1202
|
+
actor_decisions: z.array(ProcessTestActorDecisionSchema),
|
|
1203
|
+
})
|
|
1204
|
+
.meta({ id: 'ProcessTestChildTrace' });
|
|
1205
|
+
|
|
1206
|
+
export const ProcessTestScenarioResultSchema = z
|
|
1207
|
+
.strictObject({
|
|
1208
|
+
scenario_id: z.string(),
|
|
1209
|
+
name: z.string(),
|
|
1210
|
+
/** Immutable scenario input captured when the run is created. Absent on legacy run documents. */
|
|
1211
|
+
initial_context: JSONObjectSchema.optional(),
|
|
1212
|
+
status: ProcessTestRunStatusSchema,
|
|
1213
|
+
error: z.string().optional(),
|
|
1214
|
+
process_state: ProcessStateSchema.optional(),
|
|
1215
|
+
node_history: z.array(NodeHistoryEntrySchema),
|
|
1216
|
+
assertions: z.array(ProcessTestAssertionResultSchema),
|
|
1217
|
+
fixture_calls: z.record(z.string(), z.number()),
|
|
1218
|
+
actor_decisions: z.array(ProcessTestActorDecisionSchema),
|
|
1219
|
+
coverage: ProcessTestCoverageSchema,
|
|
1220
|
+
child_traces: z.array(ProcessTestChildTraceSchema),
|
|
1221
|
+
started_at: z.string().meta({ format: 'date-time' }),
|
|
1222
|
+
completed_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1223
|
+
})
|
|
1224
|
+
.meta({ id: 'ProcessTestScenarioResult' });
|
|
1225
|
+
|
|
1226
|
+
export const ProcessTestRunSchema = z
|
|
1227
|
+
.strictObject({
|
|
1228
|
+
id: z.string(),
|
|
1229
|
+
account: z.string(),
|
|
1230
|
+
project: z.string(),
|
|
1231
|
+
subject: ProcessTestSubjectSchema,
|
|
1232
|
+
/** Present only for `stored` subjects. */
|
|
1233
|
+
process_root_id: z.string().optional(),
|
|
1234
|
+
/** Present only for `stored` subjects. */
|
|
1235
|
+
process_revision_id: z.string().optional(),
|
|
1236
|
+
/** Present only for `stored` subjects — runs submitted directly carry their scenarios inline. */
|
|
1237
|
+
suite_id: z.string().optional(),
|
|
1238
|
+
definition_hash: z.string(),
|
|
1239
|
+
status: ProcessTestRunStatusSchema,
|
|
1240
|
+
/**
|
|
1241
|
+
* Whether the tested definition still matches the current head revision. Always false for
|
|
1242
|
+
* non-stored subjects, which have no later revision to drift from: for those,
|
|
1243
|
+
* `definition_hash` and `subject.app_version` serve reproducibility instead.
|
|
1244
|
+
*/
|
|
1245
|
+
stale: z.boolean(),
|
|
1246
|
+
process_definition_snapshot: ProcessDefinitionBodySchema,
|
|
1247
|
+
scenarios: z.array(ProcessTestScenarioResultSchema),
|
|
1248
|
+
created_by: z.string(),
|
|
1249
|
+
created_at: z.string().meta({ format: 'date-time' }),
|
|
1250
|
+
started_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1251
|
+
completed_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1252
|
+
})
|
|
1253
|
+
.meta({ id: 'ProcessTestRun' });
|
|
1254
|
+
|
|
1255
|
+
export const ProcessTestRunArraySchema = z.array(ProcessTestRunSchema).meta({ id: 'ProcessTestRunArray' });
|
|
1256
|
+
|
|
1257
|
+
export const ListProcessTestRunsQuerySchema = z
|
|
1258
|
+
.strictObject({
|
|
1259
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
1260
|
+
})
|
|
1261
|
+
.meta({ id: 'ListProcessTestRunsQuery' });
|
|
1262
|
+
|
|
1263
|
+
export const UpdateProcessTestScenarioPayloadSchema = z
|
|
1264
|
+
.strictObject({
|
|
1265
|
+
checkpoint_token: z.string(),
|
|
1266
|
+
scenario_id: z.string(),
|
|
1267
|
+
workflow_path: z.array(z.string()),
|
|
1268
|
+
status: ProcessTestRunStatusSchema,
|
|
1269
|
+
error: z.string().optional(),
|
|
1270
|
+
process_state: ProcessStateSchema.optional(),
|
|
1271
|
+
node_history: z.array(NodeHistoryEntrySchema),
|
|
1272
|
+
assertions: z.array(ProcessTestAssertionResultSchema),
|
|
1273
|
+
fixture_calls: z.record(z.string(), z.number()),
|
|
1274
|
+
actor_decisions: z.array(ProcessTestActorDecisionSchema),
|
|
1275
|
+
coverage: ProcessTestCoverageSchema,
|
|
1276
|
+
started_at: z.string().meta({ format: 'date-time' }),
|
|
1277
|
+
completed_at: z.string().meta({ format: 'date-time' }).optional(),
|
|
1278
|
+
})
|
|
1279
|
+
.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,56 @@ 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
|
+
webhook_secret: null,
|
|
102
|
+
}).valid,
|
|
103
|
+
).toBe(true);
|
|
104
|
+
expect(
|
|
105
|
+
validateApiResponse('ProjectIntegrationConfigResponse', {
|
|
106
|
+
integration: SupportedIntegrations.ask_user_webhook,
|
|
107
|
+
enabled: true,
|
|
108
|
+
webhook_url: 'https://example.test/hooks/ask-user',
|
|
109
|
+
webhook_secret: null,
|
|
110
|
+
}).valid,
|
|
111
|
+
).toBe(true);
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it('still requires webhook_url when the integration is being configured', () => {
|
|
115
|
+
// The request schema must not follow the response into optionality — you cannot set this
|
|
116
|
+
// integration up without a URL.
|
|
117
|
+
expect(
|
|
118
|
+
validateApiRequest('ProjectIntegrationConfigRequest', {
|
|
119
|
+
integration: SupportedIntegrations.ask_user_webhook,
|
|
120
|
+
enabled: true,
|
|
121
|
+
}).valid,
|
|
122
|
+
).toBe(false);
|
|
123
|
+
});
|
|
73
124
|
});
|
|
74
125
|
|
|
75
126
|
/**
|
|
@@ -186,6 +237,11 @@ describe('gate 2 — the closure is closed, bottom-up', () => {
|
|
|
186
237
|
expect(true).toBe(true);
|
|
187
238
|
});
|
|
188
239
|
|
|
240
|
+
it('uses the analysis model default for both content query planning and reranking', () => {
|
|
241
|
+
expect(SYSTEM_INTERACTION_CATEGORIES.ContentSearchAgent).toBe(SystemInteractionCategory.analysis);
|
|
242
|
+
expect(SYSTEM_INTERACTION_CATEGORIES.ContentSearchReranker).toBe(SystemInteractionCategory.analysis);
|
|
243
|
+
});
|
|
244
|
+
|
|
189
245
|
it('publishes the property-mapping map without the propertyNames z.record adds', () => {
|
|
190
246
|
// `Record<string, ProjectSearchPropertyMapping>` is inline in the interface and has no
|
|
191
247
|
// TypeScript name, so it never becomes a canonical alias — it stays canonical AND derived,
|
|
@@ -197,6 +253,10 @@ describe('gate 2 — the closure is closed, bottom-up', () => {
|
|
|
197
253
|
});
|
|
198
254
|
});
|
|
199
255
|
|
|
256
|
+
it('publishes geo_point as an explicit project property mapping type', () => {
|
|
257
|
+
expect(ApiSchemaComponents.ProjectSearchPropertyType.enum).toContain('geo_point');
|
|
258
|
+
});
|
|
259
|
+
|
|
200
260
|
it('enforces the browser-use configuration the deleted AJV schema only described', () => {
|
|
201
261
|
// A `JSONSchemaType<BrowserUseProjectConfiguration>` used to sit beside the interface with
|
|
202
262
|
// descriptions that had already drifted from the TSDoc, and nothing compiled it. This is the
|
|
@@ -335,6 +395,23 @@ describe('gate 4 — AJV validates the same canonical objects that are published
|
|
|
335
395
|
});
|
|
336
396
|
|
|
337
397
|
describe('gate 5 — runtime enforcement uses the published components', () => {
|
|
398
|
+
it('accepts decrypted integration credentials only on the response contract', () => {
|
|
399
|
+
expect(
|
|
400
|
+
validateApiResponse('ProjectIntegrationConfigResponse', {
|
|
401
|
+
integration: SupportedIntegrations.exa,
|
|
402
|
+
enabled: true,
|
|
403
|
+
api_key: 'agent-runtime-secret',
|
|
404
|
+
}).valid,
|
|
405
|
+
).toBe(true);
|
|
406
|
+
expect(
|
|
407
|
+
validateApiResponse('ProjectIntegrationConfigResponse', {
|
|
408
|
+
integration: SupportedIntegrations.ask_user_webhook,
|
|
409
|
+
enabled: true,
|
|
410
|
+
webhook_secret: 'agent-runtime-secret',
|
|
411
|
+
}).valid,
|
|
412
|
+
).toBe(true);
|
|
413
|
+
});
|
|
414
|
+
|
|
338
415
|
it('checks the shared count response the same way for every service that returns it', () => {
|
|
339
416
|
// Four slots across three resources and two servers, so this component had to move as a unit.
|
|
340
417
|
expect(validateApiResponse('CountResult', { count: 0 }).valid).toBe(true);
|