@vertesia/common 1.5.0-dev.20260725.083715Z → 1.5.0-dev.20260804.124748Z
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-values.d.ts +98 -0
- package/lib/access-control-values.d.ts.map +1 -0
- package/lib/access-control-values.js +101 -0
- package/lib/access-control-values.js.map +1 -0
- package/lib/access-control.d.ts +22 -119
- package/lib/access-control.d.ts.map +1 -1
- package/lib/access-control.js +6 -78
- package/lib/access-control.js.map +1 -1
- package/lib/account-values.d.ts +53 -0
- package/lib/account-values.d.ts.map +1 -0
- package/lib/account-values.js +91 -0
- package/lib/account-values.js.map +1 -0
- package/lib/analytics.d.ts +12 -38
- package/lib/analytics.d.ts.map +1 -1
- package/lib/api-schemas/access-control.d.ts +215 -0
- package/lib/api-schemas/access-control.d.ts.map +1 -0
- package/lib/api-schemas/access-control.js +165 -0
- package/lib/api-schemas/access-control.js.map +1 -0
- package/lib/api-schemas/account.d.ts +101 -0
- package/lib/api-schemas/account.d.ts.map +1 -0
- package/lib/api-schemas/account.js +136 -0
- package/lib/api-schemas/account.js.map +1 -0
- package/lib/api-schemas/adapter.d.ts +80 -0
- package/lib/api-schemas/adapter.d.ts.map +1 -0
- package/lib/api-schemas/adapter.js +726 -0
- package/lib/api-schemas/adapter.js.map +1 -0
- package/lib/api-schemas/agent-runs.d.ts +3781 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -0
- package/lib/api-schemas/agent-runs.js +991 -0
- package/lib/api-schemas/agent-runs.js.map +1 -0
- package/lib/api-schemas/analytics.d.ts +86 -0
- package/lib/api-schemas/analytics.d.ts.map +1 -0
- package/lib/api-schemas/analytics.js +58 -0
- package/lib/api-schemas/analytics.js.map +1 -0
- package/lib/api-schemas/apikey.d.ts +231 -0
- package/lib/api-schemas/apikey.d.ts.map +1 -0
- package/lib/api-schemas/apikey.js +172 -0
- package/lib/api-schemas/apikey.js.map +1 -0
- package/lib/api-schemas/app-lifecycle.d.ts +1114 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -0
- package/lib/api-schemas/app-lifecycle.js +750 -0
- package/lib/api-schemas/app-lifecycle.js.map +1 -0
- package/lib/api-schemas/app-runtime.d.ts +9056 -0
- package/lib/api-schemas/app-runtime.d.ts.map +1 -0
- package/lib/api-schemas/app-runtime.js +782 -0
- package/lib/api-schemas/app-runtime.js.map +1 -0
- package/lib/api-schemas/apps.d.ts +247 -0
- package/lib/api-schemas/apps.d.ts.map +1 -0
- package/lib/api-schemas/apps.js +366 -0
- package/lib/api-schemas/apps.js.map +1 -0
- package/lib/api-schemas/audit-trail.d.ts +465 -0
- package/lib/api-schemas/audit-trail.d.ts.map +1 -0
- package/lib/api-schemas/audit-trail.js +218 -0
- package/lib/api-schemas/audit-trail.js.map +1 -0
- package/lib/api-schemas/bulk-operation.d.ts +104 -0
- package/lib/api-schemas/bulk-operation.d.ts.map +1 -0
- package/lib/api-schemas/bulk-operation.js +66 -0
- package/lib/api-schemas/bulk-operation.js.map +1 -0
- package/lib/api-schemas/commands.d.ts +50 -0
- package/lib/api-schemas/commands.d.ts.map +1 -0
- package/lib/api-schemas/commands.js +58 -0
- package/lib/api-schemas/commands.js.map +1 -0
- package/lib/api-schemas/content.d.ts +3561 -0
- package/lib/api-schemas/content.d.ts.map +1 -0
- package/lib/api-schemas/content.js +842 -0
- package/lib/api-schemas/content.js.map +1 -0
- package/lib/api-schemas/cost-analytics.d.ts +300 -0
- package/lib/api-schemas/cost-analytics.d.ts.map +1 -0
- package/lib/api-schemas/cost-analytics.js +218 -0
- package/lib/api-schemas/cost-analytics.js.map +1 -0
- package/lib/api-schemas/dashboard.d.ts +408 -0
- package/lib/api-schemas/dashboard.d.ts.map +1 -0
- package/lib/api-schemas/dashboard.js +311 -0
- package/lib/api-schemas/dashboard.js.map +1 -0
- package/lib/api-schemas/data-store.d.ts +1650 -0
- package/lib/api-schemas/data-store.d.ts.map +1 -0
- package/lib/api-schemas/data-store.js +504 -0
- package/lib/api-schemas/data-store.js.map +1 -0
- package/lib/api-schemas/document-processing.d.ts +1501 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -0
- package/lib/api-schemas/document-processing.js +312 -0
- package/lib/api-schemas/document-processing.js.map +1 -0
- package/lib/api-schemas/embeddings.d.ts +184 -0
- package/lib/api-schemas/embeddings.d.ts.map +1 -0
- package/lib/api-schemas/embeddings.js +102 -0
- package/lib/api-schemas/embeddings.js.map +1 -0
- package/lib/api-schemas/environment.d.ts +412 -0
- package/lib/api-schemas/environment.d.ts.map +1 -0
- package/lib/api-schemas/environment.js +170 -0
- package/lib/api-schemas/environment.js.map +1 -0
- package/lib/api-schemas/events.d.ts +4880 -0
- package/lib/api-schemas/events.d.ts.map +1 -0
- package/lib/api-schemas/events.js +832 -0
- package/lib/api-schemas/events.js.map +1 -0
- package/lib/api-schemas/files.d.ts +107 -0
- package/lib/api-schemas/files.d.ts.map +1 -0
- package/lib/api-schemas/files.js +137 -0
- package/lib/api-schemas/files.js.map +1 -0
- package/lib/api-schemas/group.d.ts +122 -0
- package/lib/api-schemas/group.d.ts.map +1 -0
- package/lib/api-schemas/group.js +142 -0
- package/lib/api-schemas/group.js.map +1 -0
- package/lib/api-schemas/index.d.ts +36 -0
- package/lib/api-schemas/index.d.ts.map +1 -0
- package/lib/api-schemas/index.js +36 -0
- package/lib/api-schemas/index.js.map +1 -0
- package/lib/api-schemas/indexing.d.ts +144 -0
- package/lib/api-schemas/indexing.d.ts.map +1 -0
- package/lib/api-schemas/indexing.js +217 -0
- package/lib/api-schemas/indexing.js.map +1 -0
- package/lib/api-schemas/integrations.d.ts +269 -0
- package/lib/api-schemas/integrations.d.ts.map +1 -0
- package/lib/api-schemas/integrations.js +335 -0
- package/lib/api-schemas/integrations.js.map +1 -0
- package/lib/api-schemas/interaction.d.ts +22454 -0
- package/lib/api-schemas/interaction.d.ts.map +1 -0
- package/lib/api-schemas/interaction.js +2065 -0
- package/lib/api-schemas/interaction.js.map +1 -0
- package/lib/api-schemas/invites.d.ts +162 -0
- package/lib/api-schemas/invites.d.ts.map +1 -0
- package/lib/api-schemas/invites.js +106 -0
- package/lib/api-schemas/invites.js.map +1 -0
- package/lib/api-schemas/oauth-server.d.ts +415 -0
- package/lib/api-schemas/oauth-server.d.ts.map +1 -0
- package/lib/api-schemas/oauth-server.js +193 -0
- package/lib/api-schemas/oauth-server.js.map +1 -0
- package/lib/api-schemas/oauth.d.ts +150 -0
- package/lib/api-schemas/oauth.d.ts.map +1 -0
- package/lib/api-schemas/oauth.js +148 -0
- package/lib/api-schemas/oauth.js.map +1 -0
- package/lib/api-schemas/parameters.d.ts +64 -0
- package/lib/api-schemas/parameters.d.ts.map +1 -0
- package/lib/api-schemas/parameters.js +246 -0
- package/lib/api-schemas/parameters.js.map +1 -0
- package/lib/api-schemas/process.d.ts +499 -0
- package/lib/api-schemas/process.d.ts.map +1 -0
- package/lib/api-schemas/process.js +817 -0
- package/lib/api-schemas/process.js.map +1 -0
- package/lib/api-schemas/project-configuration.d.ts +4900 -0
- package/lib/api-schemas/project-configuration.d.ts.map +1 -0
- package/lib/api-schemas/project-configuration.js +425 -0
- package/lib/api-schemas/project-configuration.js.map +1 -0
- package/lib/api-schemas/project.d.ts +7247 -0
- package/lib/api-schemas/project.d.ts.map +1 -0
- package/lib/api-schemas/project.js +185 -0
- package/lib/api-schemas/project.js.map +1 -0
- package/lib/api-schemas/prompt.d.ts +70 -0
- package/lib/api-schemas/prompt.d.ts.map +1 -0
- package/lib/api-schemas/prompt.js +77 -0
- package/lib/api-schemas/prompt.js.map +1 -0
- package/lib/api-schemas/quota.d.ts +90 -0
- package/lib/api-schemas/quota.d.ts.map +1 -0
- package/lib/api-schemas/quota.js +95 -0
- package/lib/api-schemas/quota.js.map +1 -0
- package/lib/api-schemas/registry.d.ts +97458 -0
- package/lib/api-schemas/registry.d.ts.map +1 -0
- package/lib/api-schemas/registry.js +2586 -0
- package/lib/api-schemas/registry.js.map +1 -0
- package/lib/api-schemas/schema-primitives.d.ts +5 -0
- package/lib/api-schemas/schema-primitives.d.ts.map +1 -0
- package/lib/api-schemas/schema-primitives.js +11 -0
- package/lib/api-schemas/schema-primitives.js.map +1 -0
- package/lib/api-schemas/secrets.d.ts +497 -0
- package/lib/api-schemas/secrets.d.ts.map +1 -0
- package/lib/api-schemas/secrets.js +298 -0
- package/lib/api-schemas/secrets.js.map +1 -0
- package/lib/api-schemas/store.d.ts +22140 -0
- package/lib/api-schemas/store.d.ts.map +1 -0
- package/lib/api-schemas/store.js +557 -0
- package/lib/api-schemas/store.js.map +1 -0
- package/lib/api-schemas/sts.d.ts +156 -0
- package/lib/api-schemas/sts.d.ts.map +1 -0
- package/lib/api-schemas/sts.js +96 -0
- package/lib/api-schemas/sts.js.map +1 -0
- package/lib/api-schemas/task.d.ts +215 -0
- package/lib/api-schemas/task.d.ts.map +1 -0
- package/lib/api-schemas/task.js +95 -0
- package/lib/api-schemas/task.js.map +1 -0
- package/lib/api-schemas/tools.d.ts +111 -0
- package/lib/api-schemas/tools.d.ts.map +1 -0
- package/lib/api-schemas/tools.js +122 -0
- package/lib/api-schemas/tools.js.map +1 -0
- package/lib/api-schemas/user.d.ts +208 -0
- package/lib/api-schemas/user.d.ts.map +1 -0
- package/lib/api-schemas/user.js +180 -0
- package/lib/api-schemas/user.js.map +1 -0
- package/lib/api-schemas/view-execution.d.ts +3163 -0
- package/lib/api-schemas/view-execution.d.ts.map +1 -0
- package/lib/api-schemas/view-execution.js +172 -0
- package/lib/api-schemas/view-execution.js.map +1 -0
- package/lib/api-schemas/views.d.ts +5990 -0
- package/lib/api-schemas/views.d.ts.map +1 -0
- package/lib/api-schemas/views.js +396 -0
- package/lib/api-schemas/views.js.map +1 -0
- package/lib/api-schemas/workflow-runs.d.ts +2209 -0
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -0
- package/lib/api-schemas/workflow-runs.js +589 -0
- package/lib/api-schemas/workflow-runs.js.map +1 -0
- package/lib/apikey-values.d.ts +10 -0
- package/lib/apikey-values.d.ts.map +1 -0
- package/lib/apikey-values.js +11 -0
- package/lib/apikey-values.js.map +1 -0
- package/lib/apikey.d.ts +37 -36
- package/lib/apikey.d.ts.map +1 -1
- package/lib/apikey.js +5 -4
- package/lib/apikey.js.map +1 -1
- package/lib/apps.d.ts +107 -1151
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js.map +1 -1
- package/lib/ask-user.d.ts +8 -1
- package/lib/ask-user.d.ts.map +1 -1
- package/lib/audit-trail.d.ts +17 -128
- package/lib/audit-trail.d.ts.map +1 -1
- package/lib/audit-trail.js.map +1 -1
- package/lib/browser-credentials.d.ts +11 -106
- package/lib/browser-credentials.d.ts.map +1 -1
- package/lib/common.d.ts +59 -81
- package/lib/common.d.ts.map +1 -1
- package/lib/cost-analytics.d.ts +14 -167
- package/lib/cost-analytics.d.ts.map +1 -1
- package/lib/cost-analytics.js.map +1 -1
- package/lib/data-platform.d.ts +122 -786
- package/lib/data-platform.d.ts.map +1 -1
- package/lib/data-platform.js +41 -61
- package/lib/data-platform.js.map +1 -1
- package/lib/email.d.ts +5 -17
- package/lib/email.d.ts.map +1 -1
- package/lib/email.js +0 -3
- package/lib/email.js.map +1 -1
- package/lib/embeddings.d.ts +14 -56
- package/lib/embeddings.d.ts.map +1 -1
- package/lib/environment.d.ts +19 -115
- package/lib/environment.d.ts.map +1 -1
- package/lib/environment.js +3 -0
- package/lib/environment.js.map +1 -1
- package/lib/facets.d.ts +4 -7
- package/lib/facets.d.ts.map +1 -1
- package/lib/group.d.ts +33 -39
- package/lib/group.d.ts.map +1 -1
- package/lib/group.js +0 -1
- package/lib/group.js.map +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/integrations.d.ts +20 -108
- package/lib/integrations.d.ts.map +1 -1
- package/lib/integrations.js.map +1 -1
- package/lib/interaction-values.d.ts +11 -0
- package/lib/interaction-values.d.ts.map +1 -0
- package/lib/interaction-values.js +24 -0
- package/lib/interaction-values.js.map +1 -0
- package/lib/interaction.d.ts +88 -778
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js +8 -12
- package/lib/interaction.js.map +1 -1
- package/lib/meters.d.ts +11 -7
- package/lib/meters.d.ts.map +1 -1
- package/lib/meters.js.map +1 -1
- package/lib/oauth-server.d.ts +33 -119
- package/lib/oauth-server.d.ts.map +1 -1
- package/lib/oauth.d.ts +14 -96
- package/lib/oauth.d.ts.map +1 -1
- package/lib/oauth.js +0 -4
- package/lib/oauth.js.map +1 -1
- package/lib/payload.d.ts +15 -38
- package/lib/payload.d.ts.map +1 -1
- package/lib/platform-event.d.ts +49 -462
- package/lib/platform-event.d.ts.map +1 -1
- package/lib/platform-event.js.map +1 -1
- package/lib/principal-context.d.ts +10 -15
- package/lib/principal-context.d.ts.map +1 -1
- package/lib/project-values.d.ts +24 -0
- package/lib/project-values.d.ts.map +1 -0
- package/lib/project-values.js +42 -0
- package/lib/project-values.js.map +1 -0
- package/lib/project.d.ts +55 -503
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js +6 -76
- package/lib/project.js.map +1 -1
- package/lib/prompt.d.ts +20 -51
- package/lib/prompt.d.ts.map +1 -1
- package/lib/prompt.js.map +1 -1
- package/lib/query.d.ts +27 -88
- package/lib/query.d.ts.map +1 -1
- package/lib/rate-limiter.d.ts +19 -70
- package/lib/rate-limiter.d.ts.map +1 -1
- package/lib/rate-limiter.js +0 -3
- package/lib/rate-limiter.js.map +1 -1
- package/lib/refs.d.ts +3 -11
- package/lib/refs.d.ts.map +1 -1
- package/lib/refs.js.map +1 -1
- package/lib/roles/types.d.ts +14 -20
- package/lib/roles/types.d.ts.map +1 -1
- package/lib/roles/types.js +5 -9
- package/lib/roles/types.js.map +1 -1
- package/lib/runs.d.ts +6 -25
- package/lib/runs.d.ts.map +1 -1
- package/lib/secrets.d.ts +20 -105
- package/lib/secrets.d.ts.map +1 -1
- package/lib/store/agent-approval.d.ts +5 -14
- package/lib/store/agent-approval.d.ts.map +1 -1
- package/lib/store/agent-approval.js.map +1 -1
- package/lib/store/agent-run.d.ts +57 -358
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/collections.d.ts +11 -63
- package/lib/store/collections.d.ts.map +1 -1
- package/lib/store/collections.js.map +1 -1
- package/lib/store/conversation-state.d.ts +61 -61
- package/lib/store/conversation-state.d.ts.map +1 -1
- package/lib/store/conversation-state.js +2 -0
- package/lib/store/conversation-state.js.map +1 -1
- package/lib/store/doc-analyzer.d.ts +9 -32
- package/lib/store/doc-analyzer.d.ts.map +1 -1
- package/lib/store/dsl-workflow.d.ts +37 -151
- package/lib/store/dsl-workflow.d.ts.map +1 -1
- package/lib/store/dsl-workflow.js.map +1 -1
- package/lib/store/editing-policy-schema.generated.d.ts +3 -0
- package/lib/store/editing-policy-schema.generated.d.ts.map +1 -0
- package/lib/store/editing-policy-schema.generated.js +28 -0
- package/lib/store/editing-policy-schema.generated.js.map +1 -0
- package/lib/store/grounded-extraction.d.ts +7 -104
- package/lib/store/grounded-extraction.d.ts.map +1 -1
- package/lib/store/grounded-extraction.js.map +1 -1
- package/lib/store/index.d.ts +2 -0
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +3 -0
- package/lib/store/index.js.map +1 -1
- package/lib/store/intake-policy-schema.generated.d.ts +3 -0
- package/lib/store/intake-policy-schema.generated.d.ts.map +1 -0
- package/lib/store/intake-policy-schema.generated.js +1425 -0
- package/lib/store/intake-policy-schema.generated.js.map +1 -0
- package/lib/store/process-schema.d.ts +80 -0
- package/lib/store/process-schema.d.ts.map +1 -1
- package/lib/store/process-schema.js +79 -0
- package/lib/store/process-schema.js.map +1 -1
- package/lib/store/process-validation.d.ts.map +1 -1
- package/lib/store/process-validation.js +70 -2
- package/lib/store/process-validation.js.map +1 -1
- package/lib/store/process.d.ts +36 -125
- package/lib/store/process.d.ts.map +1 -1
- package/lib/store/process.js.map +1 -1
- package/lib/store/rendering.d.ts +9 -64
- package/lib/store/rendering.d.ts.map +1 -1
- package/lib/store/rendering.js.map +1 -1
- package/lib/store/store.d.ts +98 -700
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +4 -456
- package/lib/store/store.js.map +1 -1
- package/lib/store/task.d.ts +15 -59
- package/lib/store/task.d.ts.map +1 -1
- package/lib/store/task.js +0 -3
- package/lib/store/task.js.map +1 -1
- package/lib/store/workflow.d.ts +54 -518
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +23 -11
- package/lib/store/workflow.js.map +1 -1
- package/lib/sts-token-types.d.ts +12 -66
- package/lib/sts-token-types.d.ts.map +1 -1
- package/lib/sts-token-types.js.map +1 -1
- package/lib/tools.d.ts +8 -100
- package/lib/tools.d.ts.map +1 -1
- package/lib/transient-tokens-values.d.ts +11 -0
- package/lib/transient-tokens-values.d.ts.map +1 -0
- package/lib/transient-tokens-values.js +12 -0
- package/lib/transient-tokens-values.js.map +1 -0
- package/lib/transient-tokens.d.ts +15 -13
- package/lib/transient-tokens.d.ts.map +1 -1
- package/lib/transient-tokens.js +5 -5
- package/lib/transient-tokens.js.map +1 -1
- package/lib/user.d.ts +54 -155
- package/lib/user.d.ts.map +1 -1
- package/lib/user.js +1 -78
- package/lib/user.js.map +1 -1
- package/lib/versions.d.ts +24 -1
- package/lib/versions.d.ts.map +1 -1
- package/lib/versions.js +23 -0
- package/lib/versions.js.map +1 -1
- package/lib/vertesia-common.js +6 -2
- package/lib/vertesia-common.js.map +1 -1
- package/lib/views-schema.d.ts +4 -4
- package/lib/views.d.ts +56 -312
- package/lib/views.d.ts.map +1 -1
- package/lib/views.js.map +1 -1
- package/package.json +13 -4
- package/src/access-control-values.ts +113 -0
- package/src/access-control.ts +33 -138
- package/src/account-values.ts +95 -0
- package/src/analytics.ts +18 -42
- package/src/api-schemas/access-control.contract.test.ts +209 -0
- package/src/api-schemas/access-control.ts +208 -0
- package/src/api-schemas/account.contract.test.ts +318 -0
- package/src/api-schemas/account.ts +150 -0
- package/src/api-schemas/adapter-edge-cases.test.ts +480 -0
- package/src/api-schemas/adapter.ts +778 -0
- package/src/api-schemas/agent-runs.ts +1081 -0
- package/src/api-schemas/analytics.ts +65 -0
- package/src/api-schemas/apikey.contract.test.ts +270 -0
- package/src/api-schemas/apikey.ts +199 -0
- package/src/api-schemas/app-lifecycle.ts +841 -0
- package/src/api-schemas/app-runtime.ts +919 -0
- package/src/api-schemas/apps.ts +415 -0
- package/src/api-schemas/audit-trail.ts +243 -0
- package/src/api-schemas/bulk-operation.contract.test.ts +39 -0
- package/src/api-schemas/bulk-operation.ts +75 -0
- package/src/api-schemas/bundle-isolation.test.ts +80 -0
- package/src/api-schemas/commands.contract.test.ts +51 -0
- package/src/api-schemas/commands.ts +62 -0
- package/src/api-schemas/content.ts +939 -0
- package/src/api-schemas/cost-analytics.contract.test.ts +64 -0
- package/src/api-schemas/cost-analytics.ts +235 -0
- package/src/api-schemas/dashboard.contract.test.ts +127 -0
- package/src/api-schemas/dashboard.ts +351 -0
- package/src/api-schemas/data-store.contract.test.ts +91 -0
- package/src/api-schemas/data-store.ts +571 -0
- package/src/api-schemas/document-processing.contract.test.ts +76 -0
- package/src/api-schemas/document-processing.ts +344 -0
- package/src/api-schemas/embeddings.ts +113 -0
- package/src/api-schemas/environment.contract.test.ts +184 -0
- package/src/api-schemas/environment.ts +190 -0
- package/src/api-schemas/events.ts +921 -0
- package/src/api-schemas/files.ts +159 -0
- package/src/api-schemas/group.contract.test.ts +205 -0
- package/src/api-schemas/group.ts +155 -0
- package/src/api-schemas/index.ts +35 -0
- package/src/api-schemas/indexing.contract.test.ts +83 -0
- package/src/api-schemas/indexing.ts +234 -0
- package/src/api-schemas/integrations.ts +369 -0
- package/src/api-schemas/interaction.ts +2357 -0
- package/src/api-schemas/invites.contract.test.ts +268 -0
- package/src/api-schemas/invites.ts +127 -0
- package/src/api-schemas/llumiverse.contract.test.ts +108 -0
- package/src/api-schemas/oauth-server.ts +219 -0
- package/src/api-schemas/oauth.contract.test.ts +118 -0
- package/src/api-schemas/oauth.ts +166 -0
- package/src/api-schemas/parameters.test.ts +402 -0
- package/src/api-schemas/parameters.ts +310 -0
- package/src/api-schemas/process.ts +929 -0
- package/src/api-schemas/project-configuration.ts +478 -0
- package/src/api-schemas/project.contract.test.ts +365 -0
- package/src/api-schemas/project.ts +214 -0
- package/src/api-schemas/prompt.ts +88 -0
- package/src/api-schemas/pruning-limits.test.ts +189 -0
- package/src/api-schemas/quota.contract.test.ts +147 -0
- package/src/api-schemas/quota.ts +122 -0
- package/src/api-schemas/registry-groups.test.ts +91 -0
- package/src/api-schemas/registry.ts +3487 -0
- package/src/api-schemas/response-pruning.test.ts +260 -0
- package/src/api-schemas/schema-primitives.ts +12 -0
- package/src/api-schemas/secrets.ts +332 -0
- package/src/api-schemas/store.contract.test.ts +450 -0
- package/src/api-schemas/store.ts +604 -0
- package/src/api-schemas/sts.contract.test.ts +80 -0
- package/src/api-schemas/sts.ts +110 -0
- package/src/api-schemas/task.ts +104 -0
- package/src/api-schemas/tools.ts +140 -0
- package/src/api-schemas/user.contract.test.ts +191 -0
- package/src/api-schemas/user.ts +204 -0
- package/src/api-schemas/view-execution.ts +200 -0
- package/src/api-schemas/views.ts +437 -0
- package/src/api-schemas/workflow-runs.ts +653 -0
- package/src/apikey-values.ts +10 -0
- package/src/apikey.ts +49 -40
- package/src/apps.ts +234 -1213
- package/src/ask-user.ts +9 -1
- package/src/audit-trail.ts +45 -137
- package/src/browser-credentials.ts +21 -106
- package/src/common.ts +67 -78
- package/src/cost-analytics.ts +37 -176
- package/src/data-platform.ts +205 -776
- package/src/email.ts +5 -17
- package/src/embeddings.ts +22 -60
- package/src/environment.ts +52 -126
- package/src/facets.ts +4 -7
- package/src/group.ts +38 -42
- package/src/index.ts +11 -0
- package/src/integrations.ts +39 -129
- package/src/interaction-values.ts +23 -0
- package/src/interaction.ts +162 -902
- package/src/meters.ts +11 -7
- package/src/oauth-server.ts +58 -127
- package/src/oauth.ts +24 -108
- package/src/payload.ts +25 -40
- package/src/platform-event.ts +98 -484
- package/src/principal-context.ts +11 -15
- package/src/project-values.ts +41 -0
- package/src/project.ts +116 -588
- package/src/prompt.ts +34 -61
- package/src/query.ts +34 -93
- package/src/rate-limiter.ts +27 -75
- package/src/refs.ts +4 -11
- package/src/roles/types.ts +20 -20
- package/src/runs.ts +11 -24
- package/src/secrets.ts +38 -117
- package/src/store/agent-approval.ts +9 -14
- package/src/store/agent-run.ts +93 -450
- package/src/store/collections.ts +21 -63
- package/src/store/content-type-editing.test.ts +1 -1
- package/src/store/conversation-state.ts +75 -64
- package/src/store/doc-analyzer.ts +17 -33
- package/src/store/dsl-workflow.ts +62 -158
- package/src/store/editing-policy-schema.generated.ts +30 -0
- package/src/store/grounded-extraction.ts +13 -104
- package/src/store/index.ts +3 -0
- package/src/store/intake-policy-schema.generated.ts +1442 -0
- package/src/store/process-schema.test.ts +43 -0
- package/src/store/process-schema.ts +79 -0
- package/src/store/process-validation.test.ts +141 -0
- package/src/store/process-validation.ts +82 -2
- package/src/store/process.ts +70 -146
- package/src/store/rendering.ts +15 -64
- package/src/store/store.ts +197 -1204
- package/src/store/task.ts +25 -59
- package/src/store/workflow.ts +97 -557
- package/src/sts-token-types.ts +24 -75
- package/src/tools.ts +18 -97
- package/src/transient-tokens-values.ts +11 -0
- package/src/transient-tokens.ts +16 -13
- package/src/user.ts +74 -214
- package/src/versions.ts +24 -0
- package/src/views-schema.test.ts +9 -1
- package/src/views.ts +106 -329
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MarkdownRenditionFormat } from '../store/store.js';
|
|
3
|
+
import { WorkflowExecutionStatusValues } from '../store/workflow.js';
|
|
4
|
+
import { InteractionExecutionConfigurationSchema } from './store.js';
|
|
5
|
+
|
|
6
|
+
/** Zod's `.nullable()` emits `anyOf`; this annotation preserves the published type-array form. */
|
|
7
|
+
const nullableStringSchema: z.ZodType<string | null> = z.any().meta({ type: ['string', 'null'] });
|
|
8
|
+
|
|
9
|
+
export const WorkflowExecutionStatusSchema = z
|
|
10
|
+
.enum(WorkflowExecutionStatusValues)
|
|
11
|
+
.meta({ id: 'WorkflowExecutionStatus' });
|
|
12
|
+
|
|
13
|
+
export const GroundedAssistantResponseSchema = z
|
|
14
|
+
.strictObject({
|
|
15
|
+
agent_run_id: z.string().meta({ description: 'The AgentRun id to stream/render the conversation.' }),
|
|
16
|
+
workflow_id: z.string().meta({ description: 'The conversation workflow id backing the run.' }),
|
|
17
|
+
object_id: z.string().meta({ description: 'The object the assistant is scoped to.' }),
|
|
18
|
+
})
|
|
19
|
+
.meta({
|
|
20
|
+
id: 'GroundedAssistantResponse',
|
|
21
|
+
description:
|
|
22
|
+
'Response from starting the interactive grounded extraction assistant. The agent run + conversation workflow are launched server-side (recordRun -> stage the document into the agent space -> launch the interactive conversation); the client renders the conversation with `agent_run_id`.',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const GroundedExtractionRequestSchema = z
|
|
26
|
+
.strictObject({
|
|
27
|
+
schema: z
|
|
28
|
+
.looseObject({})
|
|
29
|
+
.meta({ description: 'JSON schema describing the data to extract. Takes precedence over type_ref.' })
|
|
30
|
+
.optional(),
|
|
31
|
+
type_ref: z
|
|
32
|
+
.string()
|
|
33
|
+
.meta({ description: 'Content type id or catalog ref whose object_schema drives the extraction.' })
|
|
34
|
+
.optional(),
|
|
35
|
+
interaction_name: z
|
|
36
|
+
.string()
|
|
37
|
+
.meta({ description: 'Interaction to use. Defaults to sys:ExtractInformationGrounded.' })
|
|
38
|
+
.optional(),
|
|
39
|
+
max_pages: z.number().meta({ description: 'Maximum number of pages to process.' }).optional(),
|
|
40
|
+
force_ocr: z.boolean().meta({ description: 'Run OCR on every page even when a text layer exists.' }).optional(),
|
|
41
|
+
refresh_ocr: z
|
|
42
|
+
.boolean()
|
|
43
|
+
.meta({ description: 'Re-run OCR on pages that need it instead of restoring the stored OCR result.' })
|
|
44
|
+
.optional(),
|
|
45
|
+
use_vision: z
|
|
46
|
+
.boolean()
|
|
47
|
+
.meta({
|
|
48
|
+
description:
|
|
49
|
+
'Attach clean page images for layout/semantic context; direct-vision pages also receive checkerboards.',
|
|
50
|
+
})
|
|
51
|
+
.optional(),
|
|
52
|
+
grid_cell_pt: z
|
|
53
|
+
.number()
|
|
54
|
+
.meta({
|
|
55
|
+
description:
|
|
56
|
+
'A1 locate-grid cell size in PDF points for vision pages (drives both the drawn grid and cell→box resolution). Smaller = finer grid / more cells. Default: 14.',
|
|
57
|
+
})
|
|
58
|
+
.optional(),
|
|
59
|
+
raster_mode: z
|
|
60
|
+
.enum(['vision', 'ocr'])
|
|
61
|
+
.meta({
|
|
62
|
+
description:
|
|
63
|
+
"How to read pages that have no digital text layer (scans / image-only pages). 'vision' (default): read them off the page image with the extraction model, skipping OCR entirely. 'ocr': legacy path — OCR those pages and block-ground on the (lossy) OCR text. Set to 'ocr' to revert to the pre-vision behavior.",
|
|
64
|
+
})
|
|
65
|
+
.optional(),
|
|
66
|
+
window_pages: z
|
|
67
|
+
.number()
|
|
68
|
+
.meta({
|
|
69
|
+
description: 'Maximum pages per extraction call; larger documents are split into sequential windows.',
|
|
70
|
+
})
|
|
71
|
+
.optional(),
|
|
72
|
+
agentic_extraction: z
|
|
73
|
+
.boolean()
|
|
74
|
+
.meta({
|
|
75
|
+
description:
|
|
76
|
+
'Extract with an autonomous agent (views the whole document at once) instead of the deterministic windowed pipeline. Sidesteps window-boundary splits on long documents. The workflow stages the artifacts into an agent space, runs a conversation agent that writes the extraction, then folds it back.',
|
|
77
|
+
})
|
|
78
|
+
.optional(),
|
|
79
|
+
extract_agent: z
|
|
80
|
+
.string()
|
|
81
|
+
.meta({ description: 'Agent interaction for agentic_extraction. Defaults to sys:GeneralAgent.' })
|
|
82
|
+
.optional(),
|
|
83
|
+
update_properties: z
|
|
84
|
+
.boolean()
|
|
85
|
+
.meta({ description: "Update the object's properties with the extracted data. Default: true." })
|
|
86
|
+
.optional(),
|
|
87
|
+
config: InteractionExecutionConfigurationSchema.meta({
|
|
88
|
+
description: 'LLM execution configuration (model, environment, ...) for the main pass.',
|
|
89
|
+
}).optional(),
|
|
90
|
+
hard_config: InteractionExecutionConfigurationSchema.meta({
|
|
91
|
+
description: 'Execution configuration used instead of `config` on hard content (scans, handwriting).',
|
|
92
|
+
}).optional(),
|
|
93
|
+
hardness_threshold: z
|
|
94
|
+
.number()
|
|
95
|
+
.meta({ description: 'Hardness score (0..1) at or above which `hard_config` is used. Default: 0.5.' })
|
|
96
|
+
.optional(),
|
|
97
|
+
review_config: InteractionExecutionConfigurationSchema.meta({
|
|
98
|
+
description: 'Execution configuration for the post-extraction review pass. No review runs when absent.',
|
|
99
|
+
}).optional(),
|
|
100
|
+
review_threshold: z
|
|
101
|
+
.number()
|
|
102
|
+
.meta({
|
|
103
|
+
description: 'Hardness score (0..1) at or above which the review runs. Defaults to hardness_threshold.',
|
|
104
|
+
})
|
|
105
|
+
.optional(),
|
|
106
|
+
coverage_review_threshold: z
|
|
107
|
+
.number()
|
|
108
|
+
.meta({
|
|
109
|
+
description: "Review triggers when any page's citation coverage falls below this floor. Default: 0.2.",
|
|
110
|
+
})
|
|
111
|
+
.optional(),
|
|
112
|
+
force_review: z
|
|
113
|
+
.boolean()
|
|
114
|
+
.meta({
|
|
115
|
+
description:
|
|
116
|
+
'Run the model review even when every citation was digitally verified. Requires review_config.',
|
|
117
|
+
})
|
|
118
|
+
.optional(),
|
|
119
|
+
operator_instructions: z
|
|
120
|
+
.string()
|
|
121
|
+
.meta({
|
|
122
|
+
description:
|
|
123
|
+
'Free-text operator guidance folded into the extraction prompt to steer a (re-)extraction, e.g. "part numbers are in the third column; some line items wrap onto the next row".',
|
|
124
|
+
})
|
|
125
|
+
.optional(),
|
|
126
|
+
user_prompt: z
|
|
127
|
+
.string()
|
|
128
|
+
.meta({
|
|
129
|
+
description:
|
|
130
|
+
"Interactive assistant only: the operator's opening message for the assistant conversation.",
|
|
131
|
+
})
|
|
132
|
+
.optional(),
|
|
133
|
+
})
|
|
134
|
+
.meta({
|
|
135
|
+
id: 'GroundedExtractionRequest',
|
|
136
|
+
description:
|
|
137
|
+
"Request body to start a grounded extraction on a content object. All fields are optional: with none set, the object's own content-type schema drives the extraction with default models and settings.",
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
export const GroundedVerificationBreakdownSchema = z
|
|
141
|
+
.strictObject({
|
|
142
|
+
total: z.number().meta({ description: 'Total number of cited values.' }),
|
|
143
|
+
digitally_verified: z
|
|
144
|
+
.number()
|
|
145
|
+
.meta({ description: "Values matched verbatim against the document's text (digital layer or OCR)." }),
|
|
146
|
+
ai_verified: z.number().meta({ description: 'Values the reviewer model confirmed against the page image.' }),
|
|
147
|
+
unverified: z
|
|
148
|
+
.number()
|
|
149
|
+
.meta({ description: 'Values read from the image but neither text-matched nor reviewer-confirmed.' }),
|
|
150
|
+
})
|
|
151
|
+
.meta({
|
|
152
|
+
id: 'GroundedVerificationBreakdown',
|
|
153
|
+
description:
|
|
154
|
+
"How each extracted value was verified. Two kinds, both trustworthy: digitally verified (matched the document's text — digital layer or OCR) and AI verified (the reviewer confirmed it against the page image — the primary signal for scanned or handwritten content, which has no text layer to match).",
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
export const GroundedExtractionVerdictSchema = z.enum(['good_to_go', 'needs_review']).meta({
|
|
158
|
+
id: 'GroundedExtractionVerdict',
|
|
159
|
+
description:
|
|
160
|
+
'Document-level trust verdict for a grounded extraction. `good_to_go` means the extracted content (after any review corrections) can be used without a human check; `needs_review` means a human should verify it. This reflects content correctness, not how many citation boxes rendered.',
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
export const DocProcessorOutputFormatSchema = z
|
|
164
|
+
.literal('markdown')
|
|
165
|
+
.meta({ id: 'DocProcessorOutputFormat', description: 'Output format for document processing workflows' });
|
|
166
|
+
|
|
167
|
+
export const DocAnalyzerProgressStatusSchema = z
|
|
168
|
+
.strictObject({
|
|
169
|
+
total: z.number(),
|
|
170
|
+
processed: z.number(),
|
|
171
|
+
success: z.number(),
|
|
172
|
+
failed: z.number(),
|
|
173
|
+
})
|
|
174
|
+
.meta({ id: 'DocAnalyzerProgressStatus' });
|
|
175
|
+
|
|
176
|
+
export const DocumentProcessingPhaseSchema = z
|
|
177
|
+
.enum(['markdown', 'grounded_extraction'])
|
|
178
|
+
.meta({ id: 'DocumentProcessingPhase' });
|
|
179
|
+
|
|
180
|
+
export const DocumentPrepOptionsSchema = z
|
|
181
|
+
.object({
|
|
182
|
+
features: z.array(z.string()).optional(),
|
|
183
|
+
debug: z.boolean().optional(),
|
|
184
|
+
output_format: DocProcessorOutputFormatSchema.optional(),
|
|
185
|
+
})
|
|
186
|
+
.catchall(z.unknown())
|
|
187
|
+
.meta({ id: 'DocumentPrepOptions' });
|
|
188
|
+
|
|
189
|
+
export const GroundedExtractionResultResponseSchema = z
|
|
190
|
+
.strictObject({
|
|
191
|
+
object_id: z.string(),
|
|
192
|
+
data: z.looseObject({}).meta({ description: 'The extracted data, shaped by the requested schema.' }),
|
|
193
|
+
verdict: GroundedExtractionVerdictSchema.meta({ description: 'Document-level trust verdict.' }).optional(),
|
|
194
|
+
verdict_reason: z.string().meta({ description: 'One-sentence rationale for the verdict.' }).optional(),
|
|
195
|
+
confidence: z.number().meta({ description: 'Mean citation confidence in [0,1].' }).optional(),
|
|
196
|
+
verification: GroundedVerificationBreakdownSchema.meta({ description: 'Per-value verification breakdown.' }),
|
|
197
|
+
review: z
|
|
198
|
+
.strictObject({
|
|
199
|
+
assessment: z.enum(['complete', 'issues_found']),
|
|
200
|
+
summary: z.string().optional(),
|
|
201
|
+
corrections_applied: z.number().optional(),
|
|
202
|
+
})
|
|
203
|
+
.meta({ description: 'Review outcome, when a review pass ran.' })
|
|
204
|
+
.optional(),
|
|
205
|
+
result_url: nullableStringSchema
|
|
206
|
+
.meta({
|
|
207
|
+
description: 'Signed download URL for the full grounded-extraction.json (data + citations + boxes).',
|
|
208
|
+
})
|
|
209
|
+
.optional(),
|
|
210
|
+
})
|
|
211
|
+
.meta({
|
|
212
|
+
id: 'GroundedExtractionResultResponse',
|
|
213
|
+
description:
|
|
214
|
+
'Completed grounded extraction result: the extracted data with its trust verdict and verification breakdown, plus a download URL for the full citations artifact.',
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
export const DocAnalyzerProgressSchema = z
|
|
218
|
+
.strictObject({
|
|
219
|
+
phase: DocumentProcessingPhaseSchema.optional(),
|
|
220
|
+
pages: DocAnalyzerProgressStatusSchema,
|
|
221
|
+
images: DocAnalyzerProgressStatusSchema,
|
|
222
|
+
tables: DocAnalyzerProgressStatusSchema,
|
|
223
|
+
visuals: DocAnalyzerProgressStatusSchema,
|
|
224
|
+
started_at: z.number().optional(),
|
|
225
|
+
percent: z.number(),
|
|
226
|
+
output_format: DocProcessorOutputFormatSchema.meta({
|
|
227
|
+
description: 'The output format being used for processing.',
|
|
228
|
+
}).optional(),
|
|
229
|
+
})
|
|
230
|
+
.meta({ id: 'DocAnalyzerProgress' });
|
|
231
|
+
|
|
232
|
+
export const DocAnalyzeRunStatusResponseSchema = z
|
|
233
|
+
.strictObject({
|
|
234
|
+
workflow_id: nullableStringSchema,
|
|
235
|
+
workflow_run_id: nullableStringSchema,
|
|
236
|
+
status: WorkflowExecutionStatusSchema,
|
|
237
|
+
phase: DocumentProcessingPhaseSchema.optional(),
|
|
238
|
+
progress: DocAnalyzerProgressSchema.optional(),
|
|
239
|
+
output_format: DocProcessorOutputFormatSchema.meta({
|
|
240
|
+
description: 'The output format being used for processing.',
|
|
241
|
+
}).optional(),
|
|
242
|
+
})
|
|
243
|
+
.meta({ id: 'DocAnalyzeRunStatusResponse', description: 'Represents a document analysis run status' });
|
|
244
|
+
|
|
245
|
+
export const MarkdownRenditionFormatSchema = z.enum(MarkdownRenditionFormat).meta({ id: 'MarkdownRenditionFormat' });
|
|
246
|
+
|
|
247
|
+
export const PdfRenderingMetadataSchema = z
|
|
248
|
+
.strictObject({
|
|
249
|
+
document_id: z.string().meta({ description: 'Document ID to display in footer' }).optional(),
|
|
250
|
+
agent_name: z.string().meta({ description: 'Agent name that generated the document' }).optional(),
|
|
251
|
+
agent_run_id: z.string().meta({ description: 'Agent run ID to display in footer' }).optional(),
|
|
252
|
+
subtitle: z.string().meta({ description: 'Document subtitle' }).optional(),
|
|
253
|
+
author: z.array(z.string()).meta({ description: 'Document author(s)' }).optional(),
|
|
254
|
+
date: z
|
|
255
|
+
.string()
|
|
256
|
+
.meta({ description: 'Document date (displayed in header and title page; defaults to today if omitted)' })
|
|
257
|
+
.optional(),
|
|
258
|
+
})
|
|
259
|
+
.meta({ id: 'PdfRenderingMetadata', description: 'Metadata for PDF rendering (displayed in header/footer)' });
|
|
260
|
+
|
|
261
|
+
export const RenderMarkdownPayloadSchema = z
|
|
262
|
+
.strictObject({
|
|
263
|
+
format: MarkdownRenditionFormatSchema.meta({ description: 'Output format' }),
|
|
264
|
+
object_id: z.string().meta({ description: 'Object ID to render (mutually exclusive with content)' }).optional(),
|
|
265
|
+
content: z
|
|
266
|
+
.string()
|
|
267
|
+
.meta({ description: 'Inline markdown content to render (mutually exclusive with object_id)' })
|
|
268
|
+
.optional(),
|
|
269
|
+
title: z
|
|
270
|
+
.string()
|
|
271
|
+
.meta({ description: 'Document title (used for filename when using inline content)' })
|
|
272
|
+
.optional(),
|
|
273
|
+
template_url: z
|
|
274
|
+
.string()
|
|
275
|
+
.meta({ description: 'URL to a template file for pandoc (DOCX reference doc or LaTeX template)' })
|
|
276
|
+
.optional(),
|
|
277
|
+
template_logo_url: z
|
|
278
|
+
.string()
|
|
279
|
+
.meta({ description: 'Optional logo URL for template variable `logo-path` (studio-hosted URL)' })
|
|
280
|
+
.optional(),
|
|
281
|
+
template_path: z
|
|
282
|
+
.string()
|
|
283
|
+
.meta({ description: 'Template file via artifact:/store: protocol (takes precedence over template_url)' })
|
|
284
|
+
.optional(),
|
|
285
|
+
logo_path: z
|
|
286
|
+
.string()
|
|
287
|
+
.meta({ description: 'Logo file via artifact:/store: protocol (takes precedence over template_logo_url)' })
|
|
288
|
+
.optional(),
|
|
289
|
+
use_default_template: z
|
|
290
|
+
.boolean()
|
|
291
|
+
.meta({ description: 'Use Vertesia default template if no template_url provided (default: true for pdf)' })
|
|
292
|
+
.optional(),
|
|
293
|
+
pandoc_options: z.array(z.string()).meta({ description: 'Additional pandoc command-line options' }).optional(),
|
|
294
|
+
artifact_run_id: z.string().meta({ description: 'Run ID for resolving artifact: and image: URLs' }).optional(),
|
|
295
|
+
metadata: PdfRenderingMetadataSchema.meta({
|
|
296
|
+
description: 'Document metadata for PDF footer/header',
|
|
297
|
+
}).optional(),
|
|
298
|
+
template_data_source: z
|
|
299
|
+
.string()
|
|
300
|
+
.meta({
|
|
301
|
+
description:
|
|
302
|
+
'Source reference for auto-wired template data: `store:<objectId>` or `artifact:<path-to-json>`',
|
|
303
|
+
})
|
|
304
|
+
.optional(),
|
|
305
|
+
output_path: z.string().meta({ description: 'Custom upload path for the rendered output' }).optional(),
|
|
306
|
+
})
|
|
307
|
+
.meta({
|
|
308
|
+
id: 'RenderMarkdownPayload',
|
|
309
|
+
description: 'Payload for rendering markdown to PDF or DOCX. Either object_id OR content must be provided.',
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
export const RenderMarkdownStartResponseSchema = z
|
|
313
|
+
.strictObject({
|
|
314
|
+
workflow_id: nullableStringSchema,
|
|
315
|
+
workflow_run_id: nullableStringSchema,
|
|
316
|
+
status: WorkflowExecutionStatusSchema,
|
|
317
|
+
format: MarkdownRenditionFormatSchema.meta({ description: 'Requested output format' }),
|
|
318
|
+
})
|
|
319
|
+
.meta({
|
|
320
|
+
id: 'RenderMarkdownStartResponse',
|
|
321
|
+
description:
|
|
322
|
+
'Initial response when starting a markdown rendering workflow. Clients should poll status using workflow_id/workflow_run_id.',
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
export const RenderMarkdownStatusResponseSchema = z
|
|
326
|
+
.strictObject({
|
|
327
|
+
workflow_id: nullableStringSchema,
|
|
328
|
+
workflow_run_id: nullableStringSchema,
|
|
329
|
+
status: WorkflowExecutionStatusSchema,
|
|
330
|
+
format: MarkdownRenditionFormatSchema.meta({ description: 'Requested output format (if known)' }).optional(),
|
|
331
|
+
download_url: z.string().meta({ description: 'Download URL for completed output' }).optional(),
|
|
332
|
+
file_uri: z.string().meta({ description: 'File URI in storage for completed output' }).optional(),
|
|
333
|
+
error: z.string().meta({ description: 'Error details for failed/terminated runs' }).optional(),
|
|
334
|
+
})
|
|
335
|
+
.meta({
|
|
336
|
+
id: 'RenderMarkdownStatusResponse',
|
|
337
|
+
description: 'Polled status response for markdown rendering workflow.',
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
/** Query components validate declared fields without rejecting unrelated query parameters. */
|
|
341
|
+
export const RenderMarkdownStatusQuerySchema = z.looseObject({
|
|
342
|
+
workflow_id: z.string(),
|
|
343
|
+
workflow_run_id: z.string(),
|
|
344
|
+
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { EmbeddingTaskTypeSchema } from '@llumiverse/common/schemas';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The request half of `POST /environments/:envId/embeddings`.
|
|
6
|
+
*
|
|
7
|
+
* The result half is llumiverse's — vectors and counts are already JSON, so `EmbeddingsResult` is
|
|
8
|
+
* the same object on both sides. The request is not: a driver consumes a `DataSource`, which is a
|
|
9
|
+
* stream, so the wire format carries a URL or base64 text instead and the server wraps it before
|
|
10
|
+
* handing the request on.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const EmbeddingsApiSourceSchema = z
|
|
14
|
+
.strictObject({
|
|
15
|
+
name: z.string().meta({ description: 'Display name for the source (defaults to "embedding-input").' }),
|
|
16
|
+
mime_type: z.string().meta({ description: 'MIME type of the binary content. Required for most providers.' }),
|
|
17
|
+
url: z.string().meta({
|
|
18
|
+
description:
|
|
19
|
+
'Provider-native URL the driver may pass through directly:\n' +
|
|
20
|
+
'- gs:// or https://storage.googleapis.com/ for Vertex AI\n' +
|
|
21
|
+
'- s3:// or https://*.amazonaws.com for Bedrock\n' +
|
|
22
|
+
'- https:// for fetch fallback Mutually exclusive with base64.',
|
|
23
|
+
}),
|
|
24
|
+
base64: z.string().meta({ description: 'Base64-encoded bytes. Mutually exclusive with url.' }),
|
|
25
|
+
})
|
|
26
|
+
.partial()
|
|
27
|
+
.meta({ id: 'EmbeddingsApiSource' });
|
|
28
|
+
|
|
29
|
+
export const EmbeddingsApiTextInputSchema = z
|
|
30
|
+
.strictObject({
|
|
31
|
+
type: z.literal('text'),
|
|
32
|
+
text: z.string(),
|
|
33
|
+
task_type: EmbeddingTaskTypeSchema.optional(),
|
|
34
|
+
title: z.string().optional(),
|
|
35
|
+
})
|
|
36
|
+
.meta({ id: 'EmbeddingsApiTextInput' });
|
|
37
|
+
|
|
38
|
+
export const EmbeddingsApiImageInputSchema = z
|
|
39
|
+
.strictObject({
|
|
40
|
+
type: z.literal('image'),
|
|
41
|
+
source: EmbeddingsApiSourceSchema,
|
|
42
|
+
})
|
|
43
|
+
.meta({ id: 'EmbeddingsApiImageInput' });
|
|
44
|
+
|
|
45
|
+
export const EmbeddingsApiVideoInputSchema = z
|
|
46
|
+
.strictObject({
|
|
47
|
+
type: z.literal('video'),
|
|
48
|
+
source: EmbeddingsApiSourceSchema,
|
|
49
|
+
start_sec: z.number().optional(),
|
|
50
|
+
length_sec: z.number().optional(),
|
|
51
|
+
interval_sec: z.number().optional(),
|
|
52
|
+
use_fixed_length_sec: z.boolean().optional(),
|
|
53
|
+
min_clip_sec: z.number().optional(),
|
|
54
|
+
embedding_option: z.array(z.enum(['visual-text', 'visual-image', 'audio'])).optional(),
|
|
55
|
+
})
|
|
56
|
+
.meta({ id: 'EmbeddingsApiVideoInput' });
|
|
57
|
+
|
|
58
|
+
export const EmbeddingsApiAudioInputSchema = z
|
|
59
|
+
.strictObject({
|
|
60
|
+
type: z.literal('audio'),
|
|
61
|
+
source: EmbeddingsApiSourceSchema,
|
|
62
|
+
start_sec: z.number().optional(),
|
|
63
|
+
length_sec: z.number().optional(),
|
|
64
|
+
})
|
|
65
|
+
.meta({ id: 'EmbeddingsApiAudioInput' });
|
|
66
|
+
|
|
67
|
+
export const EmbeddingsApiInputSchema = z
|
|
68
|
+
.discriminatedUnion('type', [
|
|
69
|
+
EmbeddingsApiTextInputSchema,
|
|
70
|
+
EmbeddingsApiImageInputSchema,
|
|
71
|
+
EmbeddingsApiVideoInputSchema,
|
|
72
|
+
EmbeddingsApiAudioInputSchema,
|
|
73
|
+
])
|
|
74
|
+
.meta({
|
|
75
|
+
id: 'EmbeddingsApiInput',
|
|
76
|
+
description:
|
|
77
|
+
'Wire-format inputs accepted by the studio-server embeddings endpoint. Mirror of ' +
|
|
78
|
+
"@llumiverse/common's EmbeddingInput, but binary modalities carry a JSON-friendly source " +
|
|
79
|
+
'(URL or base64) instead of a DataSource. The server wraps each source in a ' +
|
|
80
|
+
'Base64DataSource or URLDataSource before passing the request to the llumiverse driver.',
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const EmbeddingsApiRequestSchema = z
|
|
84
|
+
.strictObject({
|
|
85
|
+
inputs: z.array(EmbeddingsApiInputSchema),
|
|
86
|
+
model: z.string().optional(),
|
|
87
|
+
task_type: EmbeddingTaskTypeSchema.optional(),
|
|
88
|
+
dimensions: z.number().optional(),
|
|
89
|
+
})
|
|
90
|
+
.meta({ id: 'EmbeddingsApiRequest' });
|
|
91
|
+
|
|
92
|
+
export const EmbeddingsStatusResponseSchema = z
|
|
93
|
+
.strictObject({
|
|
94
|
+
status: z.string(),
|
|
95
|
+
embeddingRunsInProgress: z.number().optional(),
|
|
96
|
+
totalIndexableObjects: z.number().optional(),
|
|
97
|
+
embeddingsModels: z.array(z.string()).optional(),
|
|
98
|
+
objectsWithEmbeddings: z.number().optional(),
|
|
99
|
+
vectorIndex: z.strictObject({
|
|
100
|
+
status: z.enum(['READY', 'PENDING', 'DELETING', 'ABSENT']),
|
|
101
|
+
name: z.string().optional(),
|
|
102
|
+
type: z.string().optional(),
|
|
103
|
+
}),
|
|
104
|
+
})
|
|
105
|
+
.meta({ id: 'EmbeddingsStatusResponse' });
|
|
106
|
+
|
|
107
|
+
export const ProjectConfigurationEmbeddingEnablePayloadSchema = z
|
|
108
|
+
.strictObject({
|
|
109
|
+
environment: z.string(),
|
|
110
|
+
max_tokens: z.number().optional(),
|
|
111
|
+
model: z.string().optional(),
|
|
112
|
+
})
|
|
113
|
+
.meta({ id: 'ProjectConfigurationEmbeddingEnablePayload' });
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { SupportedProviders } from '../environment.js';
|
|
3
|
+
import { ApiSchemaComponents, validateApiRequest, validateApiResponse } from './registry.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The environment contracts, pinned where converting them changed what the document says or where
|
|
7
|
+
* the conversion had a choice to make.
|
|
8
|
+
*
|
|
9
|
+
* Thirty-six components, of which thirty-two re-emit byte-identically; what is asserted here is the
|
|
10
|
+
* four that do not, the two provider vocabularies that have to stay in step, and the secret boundary
|
|
11
|
+
* that is the reason the read and write shapes are separate objects.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
describe('the provider vocabulary', () => {
|
|
15
|
+
/**
|
|
16
|
+
* `SupportedProviders` is llumiverse's `Providers` merged with the three studio-only virtual
|
|
17
|
+
* providers, and the schema reads its members off that merged object rather than restating them.
|
|
18
|
+
* This is the assertion that it still does: a provider added on either side has to reach the
|
|
19
|
+
* document without anyone editing a list, which is the whole reason `z.enum()` takes the object.
|
|
20
|
+
*/
|
|
21
|
+
it('publishes every member of the merged provider object, in its order', () => {
|
|
22
|
+
expect(enumOf('SupportedProviders')).toEqual(Object.values(SupportedProviders));
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('includes the studio-only virtual providers, which llumiverse does not know about', () => {
|
|
26
|
+
expect(enumOf('SupportedProviders')).toEqual(
|
|
27
|
+
expect.arrayContaining(['virtual_lb', 'virtual_mediator', 'test']),
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('rejects a provider that is neither', () => {
|
|
32
|
+
expect(validateApiRequest('ExecutionEnvironmentCreatePayload', { name: 'e', provider: 'openai' }).valid).toBe(
|
|
33
|
+
true,
|
|
34
|
+
);
|
|
35
|
+
expect(validateApiRequest('ExecutionEnvironmentCreatePayload', { name: 'e', provider: 'gpt' }).valid).toBe(
|
|
36
|
+
false,
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe('the environment secret boundary', () => {
|
|
42
|
+
it('accepts an API key on create', () => {
|
|
43
|
+
expect(
|
|
44
|
+
validateApiRequest('ExecutionEnvironmentCreatePayload', {
|
|
45
|
+
name: 'vertex',
|
|
46
|
+
provider: 'vertexai',
|
|
47
|
+
apiKey: 'shhh',
|
|
48
|
+
}),
|
|
49
|
+
).toMatchObject({ valid: true });
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('publishes apiKey on the read shape, because what comes back is the masked value', () => {
|
|
53
|
+
// Unlike the OAuth providers, the read shape does NOT drop the field: `toEnvironmentResponse`
|
|
54
|
+
// overwrites it with `apikey_hint` or a masked form of the key, so the property a caller reads
|
|
55
|
+
// is a display hint rather than a credential. The response contract has to allow it, or every
|
|
56
|
+
// environment read would fail its own check.
|
|
57
|
+
const environment = {
|
|
58
|
+
id: '68b1779130afe5403a1589ba',
|
|
59
|
+
name: 'vertex',
|
|
60
|
+
provider: 'vertexai',
|
|
61
|
+
apiKey: 'AKIA...3xQf',
|
|
62
|
+
apikey_hint: 'AKIA...3xQf',
|
|
63
|
+
account: '69d4762f24d3048c99149d0b',
|
|
64
|
+
created_by: 'u1',
|
|
65
|
+
updated_by: 'u1',
|
|
66
|
+
created_at: '2026-01-01T00:00:00.000Z',
|
|
67
|
+
updated_at: '2026-01-01T00:00:00.000Z',
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
expect(validateApiResponse('ExecutionEnvironment', environment)).toMatchObject({ valid: true });
|
|
71
|
+
expect(validateApiResponse('ExecutionEnvironment', { ...environment, secret: 'x' }).valid).toBe(false);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
describe('ExecutionEnvironmentSettings', () => {
|
|
76
|
+
/**
|
|
77
|
+
* The one component in this closure published OPEN. It carried an index signature, so a setting
|
|
78
|
+
* for a provider this build has never heard of round-trips instead of being rejected — which is
|
|
79
|
+
* what the settings bag is for, and the reason it is absent from `STRICT_COMPONENTS`.
|
|
80
|
+
*/
|
|
81
|
+
it('accepts a setting it does not declare', () => {
|
|
82
|
+
expect(
|
|
83
|
+
validateApiRequest('ExecutionEnvironmentUpdatePayload', {
|
|
84
|
+
settings: { bucket_access_principal: 'sa@p.iam', some_future_driver_flag: true },
|
|
85
|
+
}),
|
|
86
|
+
).toMatchObject({ valid: true });
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('still rejects an undeclared property on the payload around it', () => {
|
|
90
|
+
expect(validateApiRequest('ExecutionEnvironmentUpdatePayload', { setttings: {} }).valid).toBe(false);
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
describe('the create and update payloads', () => {
|
|
95
|
+
/**
|
|
96
|
+
* They used to be `Omit<ExecutionEnvironment, ...>` and `Partial<Omit<...>>`. Both are stated
|
|
97
|
+
* where they are named now, from one shared field list — so the assertion that matters is that
|
|
98
|
+
* the two still describe the same fields, which the mapped types used to guarantee structurally.
|
|
99
|
+
*/
|
|
100
|
+
it('describe the same fields, one requiring name and provider and the other requiring nothing', () => {
|
|
101
|
+
expect(propertiesOf('ExecutionEnvironmentUpdatePayload')).toEqual(
|
|
102
|
+
propertiesOf('ExecutionEnvironmentCreatePayload'),
|
|
103
|
+
);
|
|
104
|
+
expect(requiredOf('ExecutionEnvironmentCreatePayload')).toEqual(['name', 'provider']);
|
|
105
|
+
expect(requiredOf('ExecutionEnvironmentUpdatePayload')).toEqual([]);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it('neither accepts a server-owned field', () => {
|
|
109
|
+
// `id`, `account` and the audit fields are on the read shape only. A payload carrying one used
|
|
110
|
+
// to be silently ignored; the write shapes not listing them is what makes it a 400.
|
|
111
|
+
for (const field of ['id', 'account', 'created_by', 'created_at', 'apikey_hint']) {
|
|
112
|
+
expect(
|
|
113
|
+
validateApiRequest('ExecutionEnvironmentCreatePayload', { name: 'e', provider: 'test', [field]: 'x' })
|
|
114
|
+
.valid,
|
|
115
|
+
).toBe(false);
|
|
116
|
+
expect(validateApiRequest('ExecutionEnvironmentUpdatePayload', { [field]: 'x' }).valid).toBe(false);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it('accepts an empty update body', () => {
|
|
121
|
+
expect(validateApiRequest('ExecutionEnvironmentUpdatePayload', {}).valid).toBe(true);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
describe('the model search query', () => {
|
|
126
|
+
/**
|
|
127
|
+
* `text` was published `required: true` and is optional now. The interface declared it
|
|
128
|
+
* non-optional, but `EnvironmentsApi.listModels(id, payload?)` takes the payload optionally and
|
|
129
|
+
* three existing call sites pass nothing — so enforcing the requirement the document stated would
|
|
130
|
+
* have 400'd the UI on a parameter the server never wanted.
|
|
131
|
+
*/
|
|
132
|
+
it('takes no required parameter', () => {
|
|
133
|
+
// The scanner expands this component into four query parameters, and a property the component
|
|
134
|
+
// does not require becomes a parameter the document does not require.
|
|
135
|
+
expect(requiredOf('ModelSearchPayload')).toEqual([]);
|
|
136
|
+
expect(validateApiRequest('ModelSearchPayload', {}).valid).toBe(true);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('still rejects a value outside the model-type vocabulary', () => {
|
|
140
|
+
expect(validateApiRequest('ModelSearchPayload', { type: 'text' }).valid).toBe(true);
|
|
141
|
+
expect(validateApiRequest('ModelSearchPayload', { type: 'spreadsheet' }).valid).toBe(false);
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
describe('the embeddings request', () => {
|
|
146
|
+
it('discriminates its four input shapes on type', () => {
|
|
147
|
+
expect(ApiSchemaComponents.EmbeddingsApiInput).toMatchObject({
|
|
148
|
+
discriminator: {
|
|
149
|
+
propertyName: 'type',
|
|
150
|
+
mapping: { text: expect.stringContaining('EmbeddingsApiTextInput') },
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it('accepts a text input and refuses one carrying an image source', () => {
|
|
156
|
+
const request = (input: unknown) => validateApiRequest('EmbeddingsApiRequest', { inputs: [input] });
|
|
157
|
+
|
|
158
|
+
expect(request({ type: 'text', text: 'hello' })).toMatchObject({ valid: true });
|
|
159
|
+
expect(request({ type: 'text', text: 'hello', source: { url: 'gs://b/o' } }).valid).toBe(false);
|
|
160
|
+
expect(request({ type: 'image', source: { url: 'gs://b/o' } })).toMatchObject({ valid: true });
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('accepts an empty inputs array, which the handler rejects rather than the schema', () => {
|
|
164
|
+
// `minItems` is deliberately not published: an empty batch is well-formed and useless, and
|
|
165
|
+
// adding the constraint would newly reject a request the document has always described.
|
|
166
|
+
expect(validateApiRequest('EmbeddingsApiRequest', { inputs: [] }).valid).toBe(true);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
function enumOf(component: 'SupportedProviders'): string[] {
|
|
171
|
+
const emitted = ApiSchemaComponents[component] as { enum?: unknown };
|
|
172
|
+
if (!Array.isArray(emitted?.enum)) throw new Error(`${component} is not published as an enum`);
|
|
173
|
+
return emitted.enum as string[];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function propertiesOf(component: string): string[] {
|
|
177
|
+
const emitted = ApiSchemaComponents[component] as { properties?: Record<string, unknown> };
|
|
178
|
+
return Object.keys(emitted?.properties ?? {});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function requiredOf(component: string): string[] {
|
|
182
|
+
const emitted = ApiSchemaComponents[component] as { required?: unknown };
|
|
183
|
+
return Array.isArray(emitted?.required) ? (emitted.required as string[]) : [];
|
|
184
|
+
}
|