@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
|
@@ -300,27 +300,54 @@ export const EmbeddingMapSchema = z.object({}).catchall(EmbeddingSchema).meta({
|
|
|
300
300
|
* keeps emitting under the base's `id` and collides with it in the published document.
|
|
301
301
|
*/
|
|
302
302
|
const collectionPayloadFields = {
|
|
303
|
-
description: z.string().optional(),
|
|
304
|
-
skip_head_sync: z
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
303
|
+
description: z.string().meta({ description: 'Description of the collection and its purpose' }).optional(),
|
|
304
|
+
skip_head_sync: z
|
|
305
|
+
.boolean()
|
|
306
|
+
.meta({
|
|
307
|
+
description: 'When true the collection does not track and sync member HEAD revisions. Defaults to false.',
|
|
308
|
+
})
|
|
309
|
+
.optional(),
|
|
310
|
+
tags: z.array(z.string()).meta({ description: 'Categorization tags for the collection' }).optional(),
|
|
311
|
+
type: nullableStringSchema
|
|
312
|
+
.meta({ description: 'Default content type ID for documents in the collection' })
|
|
313
|
+
.optional(),
|
|
314
|
+
query: z
|
|
315
|
+
.looseObject({})
|
|
316
|
+
.meta({ description: 'MongoDB query that determines membership of a dynamic collection' })
|
|
317
|
+
.optional(),
|
|
318
|
+
properties: z.looseObject({}).meta({ description: 'Metadata properties attached to the collection' }).optional(),
|
|
319
|
+
parent: nullableStringSchema.meta({ description: 'Parent collection ID when the collection is nested' }).optional(),
|
|
310
320
|
table_layout: z
|
|
311
321
|
.array(ColumnLayoutSchema)
|
|
312
322
|
.nullable()
|
|
313
|
-
.meta({
|
|
323
|
+
.meta({
|
|
324
|
+
anyOf: undefined,
|
|
325
|
+
type: ['array', 'null'],
|
|
326
|
+
items: { $ref: 'ColumnLayout' },
|
|
327
|
+
description: 'Column layout used when listing collection members',
|
|
328
|
+
})
|
|
329
|
+
.optional(),
|
|
330
|
+
allowed_types: z
|
|
331
|
+
.array(z.string())
|
|
332
|
+
.meta({ description: 'Content type IDs allowed to be added to the collection' })
|
|
333
|
+
.optional(),
|
|
334
|
+
updated_by: z.string().meta({ description: 'Identity recorded as the updater of the collection' }).optional(),
|
|
335
|
+
shared_properties: z
|
|
336
|
+
.array(z.string())
|
|
337
|
+
.meta({ description: 'Names of collection properties whose values are propagated to member documents' })
|
|
314
338
|
.optional(),
|
|
315
|
-
allowed_types: z.array(z.string()).optional(),
|
|
316
|
-
updated_by: z.string().optional(),
|
|
317
|
-
shared_properties: z.array(z.string()).optional(),
|
|
318
339
|
sensitivity: z.number().meta({ description: 'BLP sensitivity level for member documents' }).optional(),
|
|
319
340
|
compartments: z.array(z.string()).meta({ description: 'Compartments for member documents' }).optional(),
|
|
320
341
|
};
|
|
321
342
|
|
|
322
343
|
export const CreateCollectionPayloadSchema = z
|
|
323
|
-
.strictObject({
|
|
344
|
+
.strictObject({
|
|
345
|
+
...collectionPayloadFields,
|
|
346
|
+
name: z.string().meta({ description: 'Name of the collection' }),
|
|
347
|
+
dynamic: z.boolean().meta({
|
|
348
|
+
description: 'When true, membership is determined by `query`; when false, members are added explicitly',
|
|
349
|
+
}),
|
|
350
|
+
})
|
|
324
351
|
.meta({ id: 'CreateCollectionPayload' });
|
|
325
352
|
|
|
326
353
|
/**
|
|
@@ -331,8 +358,13 @@ export const CreateCollectionPayloadSchema = z
|
|
|
331
358
|
export const UpdateCollectionPayloadSchema = z
|
|
332
359
|
.strictObject({
|
|
333
360
|
...collectionPayloadFields,
|
|
334
|
-
name: z.string().optional(),
|
|
335
|
-
dynamic: z
|
|
361
|
+
name: z.string().meta({ description: 'Name of the collection' }).optional(),
|
|
362
|
+
dynamic: z
|
|
363
|
+
.boolean()
|
|
364
|
+
.meta({
|
|
365
|
+
description: 'When true, membership is determined by `query`; when false, members are added explicitly',
|
|
366
|
+
})
|
|
367
|
+
.optional(),
|
|
336
368
|
})
|
|
337
369
|
.meta({ id: 'UpdateCollectionPayload', description: 'Fields to change on a collection. All optional.' });
|
|
338
370
|
|
|
@@ -780,6 +812,15 @@ export const ContentObjectApiResponseSchema = z
|
|
|
780
812
|
is_locked: z.boolean().optional(),
|
|
781
813
|
score: z.number().optional(),
|
|
782
814
|
user_permissions: ContentObjectUserPermissionsSchema.optional(),
|
|
815
|
+
searchTypeResult: z
|
|
816
|
+
.array(
|
|
817
|
+
z.strictObject({
|
|
818
|
+
type: z.string(),
|
|
819
|
+
score: z.number(),
|
|
820
|
+
rank: z.number(),
|
|
821
|
+
}),
|
|
822
|
+
)
|
|
823
|
+
.optional(),
|
|
783
824
|
text: z.string().optional(),
|
|
784
825
|
text_etag: z.string().optional(),
|
|
785
826
|
embeddings: EmbeddingMapSchema.optional(),
|
|
@@ -793,6 +834,7 @@ export const ContentObjectApiResponseSchema = z
|
|
|
793
834
|
description:
|
|
794
835
|
'BLP sensitivity level — set directly or inherited from collections (max across collections).',
|
|
795
836
|
})
|
|
837
|
+
.nullable()
|
|
796
838
|
.optional(),
|
|
797
839
|
compartments: z
|
|
798
840
|
.array(z.string())
|
|
@@ -804,6 +846,18 @@ export const ContentObjectApiResponseSchema = z
|
|
|
804
846
|
})
|
|
805
847
|
.meta({ id: 'ContentObjectApiResponse' });
|
|
806
848
|
|
|
849
|
+
/**
|
|
850
|
+
* Read shape for field-projected objects. Projection intentionally changes requiredness without
|
|
851
|
+
* weakening the full object or any create/update payload.
|
|
852
|
+
*/
|
|
853
|
+
export const ProjectedContentObjectApiResponseSchema = ContentObjectApiResponseSchema.partial().meta({
|
|
854
|
+
id: 'ProjectedContentObjectApiResponse',
|
|
855
|
+
});
|
|
856
|
+
|
|
857
|
+
export const ProjectedContentObjectApiResponseArraySchema = z
|
|
858
|
+
.array(ProjectedContentObjectApiResponseSchema)
|
|
859
|
+
.meta({ id: 'ProjectedContentObjectApiResponseArray' });
|
|
860
|
+
|
|
807
861
|
export const ComputeObjectFacetPayloadSchema = z
|
|
808
862
|
.strictObject({
|
|
809
863
|
facets: z.array(FacetSpecSchema),
|
|
@@ -841,6 +895,25 @@ export const ContentObjectItemApiResponseSchema = z
|
|
|
841
895
|
is_locked: z.boolean().optional(),
|
|
842
896
|
score: z.number().optional(),
|
|
843
897
|
user_permissions: ContentObjectUserPermissionsSchema.optional(),
|
|
898
|
+
searchTypeResult: z
|
|
899
|
+
.array(
|
|
900
|
+
z.strictObject({
|
|
901
|
+
type: z.string(),
|
|
902
|
+
score: z.number(),
|
|
903
|
+
rank: z.number(),
|
|
904
|
+
}),
|
|
905
|
+
)
|
|
906
|
+
.optional(),
|
|
907
|
+
text: z.string().optional(),
|
|
908
|
+
text_etag: z.string().optional(),
|
|
909
|
+
embeddings: EmbeddingMapSchema.optional(),
|
|
910
|
+
parts: z.array(z.string()).optional(),
|
|
911
|
+
parts_etag: z.string().optional(),
|
|
912
|
+
transcript: z.looseObject({}).optional(),
|
|
913
|
+
security: StringArrayMapSchema.optional(),
|
|
914
|
+
sensitivity: z.number().nullable().optional(),
|
|
915
|
+
compartments: z.array(z.string()).optional(),
|
|
916
|
+
inherited_properties: z.array(InheritedPropertyMetadataSchema).optional(),
|
|
844
917
|
})
|
|
845
918
|
.meta({ id: 'ContentObjectItemApiResponse' });
|
|
846
919
|
|
|
@@ -882,7 +955,7 @@ export const ContentObjectItemApiResponseArraySchema = z
|
|
|
882
955
|
|
|
883
956
|
export const ObjectSearchResponseSchema = z
|
|
884
957
|
.strictObject({
|
|
885
|
-
results: z.array(
|
|
958
|
+
results: z.array(ProjectedContentObjectApiResponseSchema),
|
|
886
959
|
facets: ComputedFacetResponseSchema,
|
|
887
960
|
aggregations: z.looseObject({}).optional(),
|
|
888
961
|
})
|
|
@@ -69,13 +69,23 @@ describe('dashboard request validation', () => {
|
|
|
69
69
|
);
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
it('
|
|
73
|
-
expect(validateApiRequest('UpdateDashboardPayload', {})).
|
|
74
|
-
expect(validateApiRequest('UpdateDashboardPayload', {
|
|
72
|
+
it('accepts legacy updates without a revision while rejecting undeclared fields', () => {
|
|
73
|
+
expect(validateApiRequest('UpdateDashboardPayload', {}).valid).toBe(true);
|
|
74
|
+
expect(validateApiRequest('UpdateDashboardPayload', { summary: 'Legacy update' }).valid).toBe(true);
|
|
75
|
+
expect(
|
|
76
|
+
validateApiRequest('UpdateDashboardPayload', {
|
|
77
|
+
expected_edit_revision: 1,
|
|
78
|
+
spec: { mark: 'line' },
|
|
79
|
+
}),
|
|
80
|
+
).toMatchObject({
|
|
75
81
|
valid: true,
|
|
76
82
|
});
|
|
77
|
-
expect(
|
|
78
|
-
|
|
83
|
+
expect(
|
|
84
|
+
validateApiRequest('UpdateDashboardPayload', { expected_edit_revision: 1, skip_versioning: true }),
|
|
85
|
+
).toMatchObject({ valid: true });
|
|
86
|
+
expect(validateApiRequest('UpdateDashboardPayload', { expected_edit_revision: 1, unknown: true }).valid).toBe(
|
|
87
|
+
false,
|
|
88
|
+
);
|
|
79
89
|
});
|
|
80
90
|
|
|
81
91
|
it('keeps the two bulk bodies as the free-form string-array map already published', () => {
|
|
@@ -88,6 +98,7 @@ describe('dashboard request validation', () => {
|
|
|
88
98
|
describe('dashboard response validation', () => {
|
|
89
99
|
const item = {
|
|
90
100
|
id: 'dashboard-1',
|
|
101
|
+
edit_revision: 1,
|
|
91
102
|
name: 'Revenue',
|
|
92
103
|
tags: [],
|
|
93
104
|
updated_by: 'user:editor',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DashboardStatus } from '../data-platform.js';
|
|
3
3
|
import { StringValueMapSchema } from './files.js';
|
|
4
|
+
import { EditRevisionSchema, ExpectedEditRevisionSchema } from './schema-primitives.js';
|
|
4
5
|
|
|
5
6
|
export const DashboardElasticsearchResultMappingSchema = z
|
|
6
7
|
.discriminatedUnion('type', [
|
|
@@ -179,6 +180,7 @@ export const DashboardVersionItemArraySchema = z
|
|
|
179
180
|
export const DashboardItemSchema = z
|
|
180
181
|
.strictObject({
|
|
181
182
|
id: z.string().meta({ description: 'Unique identifier for the object' }),
|
|
183
|
+
edit_revision: EditRevisionSchema,
|
|
182
184
|
name: z.string().meta({ description: 'Human-readable name or title' }),
|
|
183
185
|
description: z.string().meta({ description: 'Optional detailed description of the object' }).optional(),
|
|
184
186
|
tags: z.array(z.string()).meta({ description: 'Tags for organization' }),
|
|
@@ -345,6 +347,7 @@ export const CreateDashboardPayloadSchema = z
|
|
|
345
347
|
|
|
346
348
|
export const UpdateDashboardPayloadSchema = CreateDashboardPayloadSchema.partial()
|
|
347
349
|
.extend({
|
|
350
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
348
351
|
name: z.string().meta({ description: 'Dashboard name' }).optional(),
|
|
349
352
|
skip_versioning: z.boolean().meta({ description: 'Skip auto-version creation' }).optional(),
|
|
350
353
|
})
|
|
@@ -8,7 +8,12 @@ import * as AuditTrailSchemas from './audit-trail.js';
|
|
|
8
8
|
import { StringValueMapSchema } from './files.js';
|
|
9
9
|
import { ConversationVisibilitySchema, NumberValueMapSchema } from './interaction.js';
|
|
10
10
|
import { JsonLogicRuleSchema, ProcessDefinitionBodySchema, ProcessRunTypeSchema } from './process.js';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
EditRevisionSchema,
|
|
13
|
+
ExpectedEditRevisionSchema,
|
|
14
|
+
nullableNumberSchema,
|
|
15
|
+
nullableStringSchema,
|
|
16
|
+
} from './schema-primitives.js';
|
|
12
17
|
import { InteractionExecutionConfigurationSchema } from './store.js';
|
|
13
18
|
|
|
14
19
|
export const ServerSentEventsResponseSchema = z.string().meta({ id: 'ServerSentEventsResponse' });
|
|
@@ -151,6 +156,7 @@ export const EventDeliverySortFieldSchema = z
|
|
|
151
156
|
export const WorkflowRuleItemSchema = z
|
|
152
157
|
.strictObject({
|
|
153
158
|
id: z.string().meta({ description: 'Unique identifier for the object' }),
|
|
159
|
+
edit_revision: EditRevisionSchema,
|
|
154
160
|
name: z.string().meta({ description: 'Human-readable name or title' }),
|
|
155
161
|
description: z.string().meta({ description: 'Optional detailed description of the object' }).optional(),
|
|
156
162
|
tags: z.array(z.string()).meta({ description: 'Optional array of categorization tags' }).optional(),
|
|
@@ -236,6 +242,7 @@ export const EventDeliveryQueueSortFieldSchema = z
|
|
|
236
242
|
export const WorkflowRuleSchema = z
|
|
237
243
|
.strictObject({
|
|
238
244
|
id: z.string().meta({ description: 'Unique identifier for the object' }),
|
|
245
|
+
edit_revision: EditRevisionSchema,
|
|
239
246
|
name: z.string().meta({ description: 'Human-readable name or title' }),
|
|
240
247
|
description: z.string().meta({ description: 'Optional detailed description of the object' }).optional(),
|
|
241
248
|
tags: z.array(z.string()).meta({ description: 'Optional array of categorization tags' }).optional(),
|
|
@@ -319,6 +326,7 @@ export const CreateWorkflowRulePayloadSchema = z
|
|
|
319
326
|
*/
|
|
320
327
|
export const UpdateWorkflowRulePayloadSchema = z
|
|
321
328
|
.strictObject({
|
|
329
|
+
expected_edit_revision: ExpectedEditRevisionSchema,
|
|
322
330
|
...workflowRulePayloadFields,
|
|
323
331
|
endpoint: z.string().optional(),
|
|
324
332
|
name: z.string().meta({ description: 'Human-readable name or title' }).optional(),
|
package/src/api-schemas/files.ts
CHANGED
|
@@ -31,6 +31,7 @@ export const FileMetadataResponseSchema = z
|
|
|
31
31
|
contentType: z.string(),
|
|
32
32
|
contentDisposition: z.string().optional(),
|
|
33
33
|
etag: z.string().optional(),
|
|
34
|
+
generation: z.string().optional(),
|
|
34
35
|
customMetadata: StringValueMapSchema.optional(),
|
|
35
36
|
})
|
|
36
37
|
.meta({ id: 'FileMetadataResponse' });
|
|
@@ -157,3 +158,29 @@ export const BucketReadAccessStatusResponseSchema = z
|
|
|
157
158
|
hasAccess: z.boolean(),
|
|
158
159
|
})
|
|
159
160
|
.meta({ id: 'BucketReadAccessStatusResponse' });
|
|
161
|
+
|
|
162
|
+
export const BucketCreateAccessQuerySchema = z
|
|
163
|
+
.strictObject({
|
|
164
|
+
principal: z.string(),
|
|
165
|
+
})
|
|
166
|
+
.meta({ id: 'BucketCreateAccessQuery' });
|
|
167
|
+
|
|
168
|
+
export const EnsureBucketCreateAccessPayloadSchema = BucketCreateAccessQuerySchema.meta({
|
|
169
|
+
id: 'EnsureBucketCreateAccessPayload',
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
export const EnsureBucketCreateAccessResponseSchema = z
|
|
173
|
+
.strictObject({
|
|
174
|
+
bucket: z.string(),
|
|
175
|
+
principal: z.string(),
|
|
176
|
+
granted: z.boolean(),
|
|
177
|
+
})
|
|
178
|
+
.meta({ id: 'EnsureBucketCreateAccessResponse' });
|
|
179
|
+
|
|
180
|
+
export const BucketCreateAccessStatusResponseSchema = z
|
|
181
|
+
.strictObject({
|
|
182
|
+
bucket: z.string(),
|
|
183
|
+
principal: z.string(),
|
|
184
|
+
hasAccess: z.boolean(),
|
|
185
|
+
})
|
|
186
|
+
.meta({ id: 'BucketCreateAccessStatusResponse' });
|
package/src/api-schemas/group.ts
CHANGED
|
@@ -64,6 +64,16 @@ export const UserGroupSchema = z
|
|
|
64
64
|
*/
|
|
65
65
|
export const UserGroupArraySchema = z.array(UserGroupSchema).meta({ id: 'UserGroupArray' });
|
|
66
66
|
|
|
67
|
+
export const ListUserGroupsQuerySchema = z
|
|
68
|
+
.object({
|
|
69
|
+
search: z.string().optional(),
|
|
70
|
+
tags: z.array(z.string()).optional(),
|
|
71
|
+
limit: z.number().optional(),
|
|
72
|
+
offset: z.number().optional(),
|
|
73
|
+
project: z.string().optional(),
|
|
74
|
+
})
|
|
75
|
+
.meta({ id: 'ListUserGroupsQuery' });
|
|
76
|
+
|
|
67
77
|
/**
|
|
68
78
|
* Both payloads are picked from {@link UserGroupSchema}, for the same reason `UserRef` is: they are
|
|
69
79
|
* subsets of the group, not parallel shapes. What each `.pick()` leaves out is the whitelist —
|
package/src/api-schemas/index.ts
CHANGED
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
*/
|
|
12
12
|
export * from './account.js';
|
|
13
13
|
export * from './adapter.js';
|
|
14
|
+
export * from './agent-communication.js';
|
|
14
15
|
export * from './agent-runs.js';
|
|
15
16
|
export * from './analytics.js';
|
|
16
17
|
export * from './apikey.js';
|
|
17
18
|
export * from './app-runtime.js';
|
|
18
19
|
export * from './bulk-operation.js';
|
|
19
20
|
export * from './content.js';
|
|
21
|
+
export * from './content-query.js';
|
|
20
22
|
export * from './cost-analytics.js';
|
|
21
23
|
export * from './dashboard.js';
|
|
22
24
|
export * from './data-store.js';
|
|
@@ -26,10 +28,12 @@ export * from './environment.js';
|
|
|
26
28
|
export * from './events.js';
|
|
27
29
|
export * from './indexing.js';
|
|
28
30
|
export * from './integrations.js';
|
|
31
|
+
export * from './oauth-server.js';
|
|
29
32
|
export * from './parameters.js';
|
|
30
33
|
export * from './process.js';
|
|
31
34
|
export * from './quota.js';
|
|
32
35
|
export * from './registry.js';
|
|
33
36
|
export * from './secrets.js';
|
|
37
|
+
export { CreateContentObjectTypePayloadSchema, InteractionExecutionConfigurationSchema } from './store.js';
|
|
34
38
|
export * from './view-execution.js';
|
|
35
39
|
export * from './workflow-runs.js';
|
|
@@ -5,6 +5,11 @@ import { SupportedIntegrations } from '../integrations.js';
|
|
|
5
5
|
import { StringValueMapSchema } from './files.js';
|
|
6
6
|
import { DSLActivityOptionsSchema } from './process.js';
|
|
7
7
|
|
|
8
|
+
const agentOnlyDecryptedSecretSchema = z.string().meta({
|
|
9
|
+
description:
|
|
10
|
+
'Decrypted credential returned only to authenticated agent principals for runtime use. Human and service-account callers receive null; presence and hint fields report configuration status.',
|
|
11
|
+
});
|
|
12
|
+
|
|
8
13
|
export const SupportedIntegrations_ask_user_webhookSchema = z
|
|
9
14
|
.literal(SupportedIntegrations.ask_user_webhook)
|
|
10
15
|
.meta({ id: 'SupportedIntegrations_ask_user_webhook' });
|
|
@@ -45,9 +50,16 @@ export const AskUserWebhookConfigurationSchema = z
|
|
|
45
50
|
.strictObject({
|
|
46
51
|
integration: SupportedIntegrations_ask_user_webhookSchema,
|
|
47
52
|
enabled: z.boolean(),
|
|
48
|
-
|
|
53
|
+
// Optional on the RESPONSE only — `AskUserWebhookConfigurationInputSchema` still requires it,
|
|
54
|
+
// because you cannot configure the integration without one. `getIntegrationConfig` reads
|
|
55
|
+
// `integrations?.[integrationId] ?? {}`, so a project that never set this integration up
|
|
56
|
+
// legitimately answers with the discriminator and `enabled` alone, and a required
|
|
57
|
+
// `webhook_url` made that answer fail its own response contract on every call. Same defect
|
|
58
|
+
// and same fix as `AwsConfiguration.s3_role_arn`.
|
|
59
|
+
webhook_url: z.string().meta({ description: 'Webhook URL to receive ask_user events' }).optional(),
|
|
49
60
|
has_webhook_secret: z.boolean().optional(),
|
|
50
61
|
webhook_secret_hint: z.string().optional(),
|
|
62
|
+
webhook_secret: agentOnlyDecryptedSecretSchema.nullable(),
|
|
51
63
|
events: z
|
|
52
64
|
.array(z.enum(['requested', 'resolved']))
|
|
53
65
|
.meta({ description: "Which events to send: ['requested', 'resolved'] or subset (default: both)" })
|
|
@@ -68,6 +80,7 @@ export const ResendConfigurationSchema = z
|
|
|
68
80
|
enabled: z.boolean(),
|
|
69
81
|
has_api_key: z.boolean().optional(),
|
|
70
82
|
api_key_hint: z.string().optional(),
|
|
83
|
+
api_key: agentOnlyDecryptedSecretSchema.nullable(),
|
|
71
84
|
email_domain: z
|
|
72
85
|
.string()
|
|
73
86
|
.meta({ description: 'Domain for email (both sending and receiving). Must be verified in Resend.' }),
|
|
@@ -77,6 +90,7 @@ export const ResendConfigurationSchema = z
|
|
|
77
90
|
.optional(),
|
|
78
91
|
has_webhook_secret: z.boolean().optional(),
|
|
79
92
|
webhook_secret_hint: z.string().optional(),
|
|
93
|
+
webhook_secret: agentOnlyDecryptedSecretSchema.nullable(),
|
|
80
94
|
allowed_sender_domains: z
|
|
81
95
|
.array(z.string())
|
|
82
96
|
.meta({ description: 'Domains allowed to send emails TO start agents (for inbound validation)' })
|
|
@@ -98,6 +112,7 @@ export const LinkupConfigurationSchema = z
|
|
|
98
112
|
enabled: z.boolean(),
|
|
99
113
|
has_api_key: z.boolean().optional(),
|
|
100
114
|
api_key_hint: z.string().optional(),
|
|
115
|
+
api_key: agentOnlyDecryptedSecretSchema.nullable(),
|
|
101
116
|
})
|
|
102
117
|
.meta({ id: 'LinkupConfiguration' });
|
|
103
118
|
|
|
@@ -107,6 +122,7 @@ export const ExaConfigurationSchema = z
|
|
|
107
122
|
enabled: z.boolean(),
|
|
108
123
|
has_api_key: z.boolean().optional(),
|
|
109
124
|
api_key_hint: z.string().optional(),
|
|
125
|
+
api_key: agentOnlyDecryptedSecretSchema.nullable(),
|
|
110
126
|
})
|
|
111
127
|
.meta({ id: 'ExaConfiguration' });
|
|
112
128
|
|
|
@@ -116,6 +132,7 @@ export const SerperConfigurationSchema = z
|
|
|
116
132
|
enabled: z.boolean(),
|
|
117
133
|
has_api_key: z.boolean().optional(),
|
|
118
134
|
api_key_hint: z.string().optional(),
|
|
135
|
+
api_key: agentOnlyDecryptedSecretSchema.nullable(),
|
|
119
136
|
url: z.string().optional(),
|
|
120
137
|
})
|
|
121
138
|
.meta({ id: 'SerperConfiguration' });
|
|
@@ -145,6 +162,7 @@ export const GladiaConfigurationSchema = z
|
|
|
145
162
|
enabled: z.boolean(),
|
|
146
163
|
has_api_key: z.boolean().optional(),
|
|
147
164
|
api_key_hint: z.string().optional(),
|
|
165
|
+
api_key: agentOnlyDecryptedSecretSchema.nullable(),
|
|
148
166
|
url: z.string().optional(),
|
|
149
167
|
})
|
|
150
168
|
.meta({ id: 'GladiaConfiguration' });
|
|
@@ -269,7 +287,14 @@ export const AwsConfigurationSchema = z
|
|
|
269
287
|
.strictObject({
|
|
270
288
|
integration: SupportedIntegrations_awsSchema,
|
|
271
289
|
enabled: z.boolean(),
|
|
272
|
-
|
|
290
|
+
// Optional because "declared but not configured" is a real state, not legacy data:
|
|
291
|
+
// `getIntegrationConfig` reads `integrations?.[integrationId] ?? {}`, so a project that has
|
|
292
|
+
// never set up AWS answers `{ integration: 'aws', enabled: false }` with no role ARN at all.
|
|
293
|
+
// Requiring it here made that answer fail its own response contract. The consumers already
|
|
294
|
+
// agree it is optional — the server guards on `s3_role_arn` being present before assuming a
|
|
295
|
+
// role, and every sibling integration marks its config fields optional for the same reason
|
|
296
|
+
// (`github_app_id`, `url`, ...).
|
|
297
|
+
s3_role_arn: z.string().optional(),
|
|
273
298
|
})
|
|
274
299
|
.meta({ id: 'AwsConfiguration' });
|
|
275
300
|
|
|
@@ -1,8 +1,84 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
2
|
import type { AsyncConversationExecutionPayload } from '../interaction.js';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
AsyncConversationExecutionPayloadSchema,
|
|
5
|
+
ComputeRunFacetPayloadSchema,
|
|
6
|
+
ComputeRunFacetsResponseSchema,
|
|
7
|
+
ConversationStateSchema,
|
|
8
|
+
ExecutionRunRefSchema,
|
|
9
|
+
FindRunResultSchema,
|
|
10
|
+
InCodeInteractionSchema,
|
|
11
|
+
InteractionCreatePayloadSchema,
|
|
12
|
+
InteractionPromptSegmentInputSchema,
|
|
13
|
+
InteractionSchema,
|
|
14
|
+
InteractionUpdatePayloadSchema,
|
|
15
|
+
PromptSegmentDefSchema,
|
|
16
|
+
ResolvedCatalogInteractionSchema,
|
|
17
|
+
} from './interaction.js';
|
|
18
|
+
|
|
19
|
+
describe('conversation state contract', () => {
|
|
20
|
+
it('publishes the tool catalog storage scope used to resolve tool references', () => {
|
|
21
|
+
expect(ConversationStateSchema.shape.tool_catalog_storage_id.safeParse('process-run-1').success).toBe(true);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe('in-code interaction contract', () => {
|
|
26
|
+
it('retains prompt schemas when resolving a catalog interaction', () => {
|
|
27
|
+
const interaction = InCodeInteractionSchema.parse({
|
|
28
|
+
type: 'sys',
|
|
29
|
+
id: 'sys:GeneralAgent',
|
|
30
|
+
name: 'GeneralAgent',
|
|
31
|
+
title: 'General Agent',
|
|
32
|
+
tags: ['agent'],
|
|
33
|
+
agent_runner_options: { is_agent: true, request_template: '{{user_prompt}}' },
|
|
34
|
+
prompts: [
|
|
35
|
+
{
|
|
36
|
+
role: 'user',
|
|
37
|
+
content: '{{user_prompt}}',
|
|
38
|
+
content_type: 'handlebars',
|
|
39
|
+
schema: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: { user_prompt: { type: 'string', editor: 'textarea' } },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
expect(interaction.prompts[0]?.schema).toMatchObject({
|
|
48
|
+
properties: { user_prompt: { type: 'string' } },
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('requires normalized title and tags only on the resolved response', () => {
|
|
53
|
+
const authoringShape = {
|
|
54
|
+
type: 'sys',
|
|
55
|
+
id: 'sys:Untitled',
|
|
56
|
+
name: 'Untitled',
|
|
57
|
+
prompts: [],
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
expect(InCodeInteractionSchema.safeParse(authoringShape).success).toBe(true);
|
|
61
|
+
expect(ResolvedCatalogInteractionSchema.safeParse(authoringShape).success).toBe(false);
|
|
62
|
+
expect(
|
|
63
|
+
ResolvedCatalogInteractionSchema.safeParse({ ...authoringShape, title: 'Untitled', tags: [] }).success,
|
|
64
|
+
).toBe(true);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
4
67
|
|
|
5
68
|
describe('AsyncConversationExecutionPayload contract', () => {
|
|
69
|
+
it('accepts caller-provided metadata and enrichment controls', () => {
|
|
70
|
+
const payload: AsyncConversationExecutionPayload = {
|
|
71
|
+
type: 'conversation',
|
|
72
|
+
interaction: 'sys:AppTester',
|
|
73
|
+
title: 'Manual title',
|
|
74
|
+
topic: 'Manual topic',
|
|
75
|
+
generate_topic: false,
|
|
76
|
+
generate_lessons: false,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
expect(AsyncConversationExecutionPayloadSchema.parse(payload)).toMatchObject(payload);
|
|
80
|
+
});
|
|
81
|
+
|
|
6
82
|
it('retains an immutable app-version execution target', () => {
|
|
7
83
|
const payload: AsyncConversationExecutionPayload = {
|
|
8
84
|
type: 'conversation',
|
|
@@ -25,3 +101,130 @@ describe('AsyncConversationExecutionPayload contract', () => {
|
|
|
25
101
|
).toThrow();
|
|
26
102
|
});
|
|
27
103
|
});
|
|
104
|
+
|
|
105
|
+
describe('run facet contracts', () => {
|
|
106
|
+
const facets = [
|
|
107
|
+
{ name: 'environments', field: 'environment' },
|
|
108
|
+
{ name: 'interactions', field: 'interaction' },
|
|
109
|
+
{ name: 'models', field: 'modelId' },
|
|
110
|
+
{ name: 'statuses', field: 'status' },
|
|
111
|
+
{ name: 'finish_reason', field: 'finish_reason' },
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
it('accepts exactly the supported run facet pairs', () => {
|
|
115
|
+
expect(ComputeRunFacetPayloadSchema.parse({ facets })).toEqual({ facets });
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
it.each(['tags', 'created_by', 'start', 'end'])('rejects the removed %s facet', (field) => {
|
|
119
|
+
expect(ComputeRunFacetPayloadSchema.safeParse({ facets: [{ name: field, field }] }).success).toBe(false);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
it('rejects mismatched and additional facet names', () => {
|
|
123
|
+
expect(ComputeRunFacetPayloadSchema.safeParse({ facets: [{ name: 'models', field: 'status' }] }).success).toBe(
|
|
124
|
+
false,
|
|
125
|
+
);
|
|
126
|
+
expect(ComputeRunFacetPayloadSchema.safeParse({ facets: [{ name: 'custom', field: 'modelId' }] }).success).toBe(
|
|
127
|
+
false,
|
|
128
|
+
);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
it('keeps removed facet fields available as query filters', () => {
|
|
132
|
+
const query = {
|
|
133
|
+
tags: ['visible'],
|
|
134
|
+
created_by: 'user:123',
|
|
135
|
+
start: '2026-08-01T00:00:00.000Z',
|
|
136
|
+
end: '2026-08-02T00:00:00.000Z',
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
expect(ComputeRunFacetPayloadSchema.parse({ facets: [], query })).toEqual({ facets: [], query });
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
it('rejects removed and custom response facets', () => {
|
|
143
|
+
expect(ComputeRunFacetsResponseSchema.safeParse({ tags: [] }).success).toBe(false);
|
|
144
|
+
expect(ComputeRunFacetsResponseSchema.safeParse({ custom: [] }).success).toBe(false);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
describe('run response contracts', () => {
|
|
149
|
+
it('retains an environment ID when a run references a deleted environment', () => {
|
|
150
|
+
expect(ExecutionRunRefSchema.shape.environment.parse('env-deleted')).toBe('env-deleted');
|
|
151
|
+
expect(ExecutionRunRefSchema.shape.environment.parse(null)).toBeNull();
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
it('models the arbitrary stored-field projection returned by /runs/find', () => {
|
|
155
|
+
expect(
|
|
156
|
+
FindRunResultSchema.parse({
|
|
157
|
+
id: 'run-1',
|
|
158
|
+
environment: 'env-1',
|
|
159
|
+
account: 'account-1',
|
|
160
|
+
project: 'project-1',
|
|
161
|
+
interaction: 'interaction-1',
|
|
162
|
+
result: [],
|
|
163
|
+
parameters: { query: 'test' },
|
|
164
|
+
}),
|
|
165
|
+
).toMatchObject({ environment: 'env-1', account: 'account-1', project: 'project-1' });
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it('does not publish run persistence-only fields', () => {
|
|
169
|
+
expect(() => FindRunResultSchema.parse({ interaction_code: 'sys:Example' })).toThrow();
|
|
170
|
+
expect(() => FindRunResultSchema.parse({ tmp_prompt: [] })).toThrow();
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it('models enriched supported run facet buckets', () => {
|
|
174
|
+
expect(
|
|
175
|
+
ComputeRunFacetsResponseSchema.parse({
|
|
176
|
+
environments: [{ _id: 'env-1', count: 2, name: 'Default' }],
|
|
177
|
+
interactions: [{ _id: 'interaction-1', count: 1, name: 'Example', status: 'published', version: 3 }],
|
|
178
|
+
models: [{ _id: 'gpt', count: 2 }],
|
|
179
|
+
total: 2,
|
|
180
|
+
}),
|
|
181
|
+
).toMatchObject({ total: 2 });
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
describe('interaction contracts', () => {
|
|
186
|
+
const populatedPrompt = {
|
|
187
|
+
role: 'user',
|
|
188
|
+
content: 'Hello',
|
|
189
|
+
content_type: 'text',
|
|
190
|
+
id: 'prompt-1',
|
|
191
|
+
name: 'Greeting',
|
|
192
|
+
status: 'draft',
|
|
193
|
+
version: 1,
|
|
194
|
+
project: 'project-1',
|
|
195
|
+
created_by: 'user-1',
|
|
196
|
+
updated_by: 'user-1',
|
|
197
|
+
created_at: '2026-08-20T00:00:00.000Z',
|
|
198
|
+
updated_at: '2026-08-20T00:00:00.000Z',
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
it('accepts the media-result storage setting on interaction payloads and responses', () => {
|
|
202
|
+
expect(InteractionSchema.shape.store_media_results.parse(true)).toBe(true);
|
|
203
|
+
expect(InteractionCreatePayloadSchema.shape.store_media_results.parse(false)).toBe(false);
|
|
204
|
+
expect(InteractionUpdatePayloadSchema.shape.store_media_results.parse(true)).toBe(true);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
it('keeps legacy populated prompts valid in interaction write payloads', () => {
|
|
208
|
+
const segment = { type: 'template', template: populatedPrompt };
|
|
209
|
+
|
|
210
|
+
expect(InteractionPromptSegmentInputSchema.safeParse(segment).success).toBe(true);
|
|
211
|
+
expect(
|
|
212
|
+
InteractionPromptSegmentInputSchema.safeParse({
|
|
213
|
+
...segment,
|
|
214
|
+
template: { ...populatedPrompt, edit_revision: 3 },
|
|
215
|
+
}).success,
|
|
216
|
+
).toBe(true);
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it('still requires edit revisions on populated prompts returned by the API', () => {
|
|
220
|
+
const segment = { type: 'template', template: populatedPrompt };
|
|
221
|
+
|
|
222
|
+
expect(PromptSegmentDefSchema.safeParse(segment).success).toBe(false);
|
|
223
|
+
expect(
|
|
224
|
+
PromptSegmentDefSchema.safeParse({
|
|
225
|
+
...segment,
|
|
226
|
+
template: { ...populatedPrompt, edit_revision: 3 },
|
|
227
|
+
}).success,
|
|
228
|
+
).toBe(true);
|
|
229
|
+
});
|
|
230
|
+
});
|