@vertesia/common 1.5.0-dev.20260722.120446Z → 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 +116 -1121
- 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 -113
- 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 +116 -734
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js +56 -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 +63 -342
- 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 +63 -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 -693
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +4 -443
- 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 +56 -516
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +28 -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 +14 -5
- package/src/access-control-values.ts +113 -0
- package/src/access-control.ts +33 -138
- package/src/account-values.ts +95 -0
- package/src/agent-resources.test.ts +100 -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 +249 -1179
- 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 -124
- 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 +231 -841
- 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 +106 -434
- package/src/store/collections.ts +21 -63
- package/src/store/content-type-editing.test.ts +17 -0
- package/src/store/conversation-state.ts +78 -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 -1182
- package/src/store/task.ts +25 -59
- package/src/store/workflow.ts +103 -554
- 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,415 @@
|
|
|
1
|
+
import { JSONObjectSchema } from '@llumiverse/common/schemas';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import type { AppUINavItem } from '../apps.js';
|
|
4
|
+
// From the values modules, for the reason `./apikey.js` gives: the enum's members are already
|
|
5
|
+
// declared once as a runtime list, and a second spelling here would be the drift this removes.
|
|
6
|
+
import { APP_CAPABILITIES, PREFERRED_SECTIONS } from '../apps.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Runtime API schemas for app manifests and their nested definitions.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export const AppCapabilitiesSchema = z.enum(APP_CAPABILITIES).meta({ id: 'AppCapabilities' });
|
|
13
|
+
|
|
14
|
+
export const AppAvailableInSchema = z.enum(['app_portal', 'composite_app']).meta({ id: 'AppAvailableIn' });
|
|
15
|
+
|
|
16
|
+
export const AppAccessControlSchema = z.enum(['all', 'ui', 'none']).meta({
|
|
17
|
+
id: 'AppAccessControl',
|
|
18
|
+
description:
|
|
19
|
+
'Access control policy for an app installation. Declares which access surfaces are gated by ' +
|
|
20
|
+
"per-user ACEs.\n\n- 'all' (default): every surface (UI portal, tool/endpoint use, contributions) " +
|
|
21
|
+
"requires an explicit app_member ACE — the historical behavior.\n- 'ui': UI portal visibility " +
|
|
22
|
+
'requires an ACE, but tool/endpoint use and contributions are open to anyone in the project.\n' +
|
|
23
|
+
"- 'none': fully open within the project — no ACE required for any surface.\n\nDeclared on the " +
|
|
24
|
+
"manifest as the app's default. May be overridden per-installation.",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// Recursive: a navigation item nests items of its own shape. The getter is Zod's form for a
|
|
28
|
+
// self-reference and emits `{"$ref": "#"}`, which the adapter rewrites to this component's own name —
|
|
29
|
+
// the same path `JSONSchema` takes. It is annotated rather than inferred for the same reason too:
|
|
30
|
+
// `z.infer` bottoms out at depth here, so `AppUINavItem` stays a hand-written type in `../apps.ts`
|
|
31
|
+
// and this annotation is what checks the two against each other on every build.
|
|
32
|
+
export const AppUINavItemSchema: z.ZodType<AppUINavItem> = z
|
|
33
|
+
.strictObject({
|
|
34
|
+
label: z.string().meta({ description: 'Display label' }),
|
|
35
|
+
icon: z.string().meta({ description: 'Lucide icon name or SVG content string' }),
|
|
36
|
+
route: z.string().meta({ description: 'Route path relative to app base' }),
|
|
37
|
+
description: z
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.meta({ description: 'Optional description shown on dashboard cards and other summary views' }),
|
|
41
|
+
get children() {
|
|
42
|
+
return z
|
|
43
|
+
.array(AppUINavItemSchema)
|
|
44
|
+
.optional()
|
|
45
|
+
.meta({ description: "Nested sub-items displayed within this item's collapsible section" });
|
|
46
|
+
},
|
|
47
|
+
topLevel: z.boolean().optional().meta({
|
|
48
|
+
description:
|
|
49
|
+
'When true, this item appears as an independent entry in the sidebar (outside its parent app group)',
|
|
50
|
+
}),
|
|
51
|
+
preferredSection: z
|
|
52
|
+
.enum(PREFERRED_SECTIONS)
|
|
53
|
+
.optional()
|
|
54
|
+
.meta({
|
|
55
|
+
description:
|
|
56
|
+
'Which sidebar section this item should be placed in when first added.\n- "default" or ' +
|
|
57
|
+
'unset: normal behavior (child of its app group)\n- "footer": placed in the footer ' +
|
|
58
|
+
'section\n- "settings": placed in the settings section',
|
|
59
|
+
}),
|
|
60
|
+
})
|
|
61
|
+
.meta({
|
|
62
|
+
id: 'AppUINavItem',
|
|
63
|
+
description:
|
|
64
|
+
"Additional navigation item for an app's UI configuration. Used in AppUIConfig.navigation to " +
|
|
65
|
+
'define sidebar navigation entries in CompositeApp shell contexts. Icon values are Lucide icon ' +
|
|
66
|
+
'component names or SVG content strings.',
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export const AppUIConfigSchema = z
|
|
70
|
+
.strictObject({
|
|
71
|
+
src: z.string().meta({
|
|
72
|
+
description:
|
|
73
|
+
'The source URL of the app. The src can be a template which contain a variable named ' +
|
|
74
|
+
'`buildId` which will be replaced with the current build id. For example: ' +
|
|
75
|
+
'`/plugins/vertesia-review-center-${buildId}`',
|
|
76
|
+
}),
|
|
77
|
+
isolation: z
|
|
78
|
+
.enum(['shadow', 'css'])
|
|
79
|
+
.optional()
|
|
80
|
+
.meta({
|
|
81
|
+
description:
|
|
82
|
+
'The isolation strategy. If not specified it defaults to shadow.\n- shadow - use Shadow ' +
|
|
83
|
+
"DOM to fully isolate the plugin from the host.\n- css - inject the plugin's styles " +
|
|
84
|
+
'(minus the preflight) into the host document; lighter but styles may conflict with ' +
|
|
85
|
+
'the host.',
|
|
86
|
+
}),
|
|
87
|
+
css_rebuild: z
|
|
88
|
+
.boolean()
|
|
89
|
+
.optional()
|
|
90
|
+
.meta({
|
|
91
|
+
description:
|
|
92
|
+
"When true the host modifies the app's css at load time to attempt to fix broken or missing " +
|
|
93
|
+
'styles. Only takes effect in css isolation mode. Defaults to false.',
|
|
94
|
+
}),
|
|
95
|
+
navigation: z
|
|
96
|
+
.array(AppUINavItemSchema)
|
|
97
|
+
.optional()
|
|
98
|
+
.meta({
|
|
99
|
+
description:
|
|
100
|
+
"Navigation items for the app's sidebar UI. Only applicable for apps with UI capability " +
|
|
101
|
+
'in shell contexts (ie. CompositeApp shell).',
|
|
102
|
+
}),
|
|
103
|
+
available_in: z
|
|
104
|
+
.array(AppAvailableInSchema)
|
|
105
|
+
.optional()
|
|
106
|
+
.meta({
|
|
107
|
+
description:
|
|
108
|
+
"Where this app's UI can be displayed.\n- 'app_portal': Available in the main app portal " +
|
|
109
|
+
"(standalone)\n- 'composite_app': Available within a CompositeApp shell Defaults to " +
|
|
110
|
+
"['app_portal', 'composite_app'] for new apps.",
|
|
111
|
+
}),
|
|
112
|
+
})
|
|
113
|
+
.meta({ id: 'AppUIConfig' });
|
|
114
|
+
|
|
115
|
+
export const ToolCollectionAuthTypeSchema = z
|
|
116
|
+
.enum(['oauth', 'other'])
|
|
117
|
+
.meta({ id: 'ToolCollectionAuthType', description: 'Authentication type for tool collections' });
|
|
118
|
+
|
|
119
|
+
export const MCPOAuthConfigSchema = z
|
|
120
|
+
.strictObject({
|
|
121
|
+
name: z
|
|
122
|
+
.string()
|
|
123
|
+
.optional()
|
|
124
|
+
.meta({
|
|
125
|
+
description:
|
|
126
|
+
'Name for the OAuth provider to create at install time. Defaults to the collection id ' +
|
|
127
|
+
'converted to kebab-case if not specified.',
|
|
128
|
+
}),
|
|
129
|
+
display_name: z
|
|
130
|
+
.string()
|
|
131
|
+
.optional()
|
|
132
|
+
.meta({ description: 'Human-readable display name for the created OAuth provider.' }),
|
|
133
|
+
grant_type: z.enum(['authorization_code', 'client_credentials']).optional(),
|
|
134
|
+
authorization_endpoint: z.string().optional(),
|
|
135
|
+
token_endpoint: z.string().optional(),
|
|
136
|
+
revocation_endpoint: z.string().optional(),
|
|
137
|
+
client_id: z
|
|
138
|
+
.string()
|
|
139
|
+
.optional()
|
|
140
|
+
.meta({
|
|
141
|
+
description:
|
|
142
|
+
"Pre-configured client_id. Omit if the installer must supply it (include 'client_id' in " +
|
|
143
|
+
'required_at_install).',
|
|
144
|
+
}),
|
|
145
|
+
use_pkce: z.boolean().optional(),
|
|
146
|
+
default_scopes: z.array(z.string()).optional(),
|
|
147
|
+
required_at_install: z
|
|
148
|
+
.array(z.enum(['client_id', 'client_secret', 'scopes']))
|
|
149
|
+
.optional()
|
|
150
|
+
.meta({
|
|
151
|
+
description:
|
|
152
|
+
'Parameters the installer must provide at install time. These are shown as form fields ' +
|
|
153
|
+
"in composable-ui before the install completes.\n- 'client_id': user supplies the OAuth " +
|
|
154
|
+
"client ID\n- 'client_secret': user supplies the OAuth client secret",
|
|
155
|
+
}),
|
|
156
|
+
})
|
|
157
|
+
.meta({
|
|
158
|
+
id: 'MCPOAuthConfig',
|
|
159
|
+
description:
|
|
160
|
+
'Install-time OAuth provisioning blueprint for an MCP collection. Defines how to auto-create an ' +
|
|
161
|
+
'OAuth provider when the app is installed. Does NOT affect runtime behaviour — the runtime uses ' +
|
|
162
|
+
'oauth_bindings on AppInstallation.',
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The two collection kinds share a base interface, so their published components both begin with
|
|
167
|
+
* `url` and `auth`. Spreading one shape is what keeps that true of the emission as well.
|
|
168
|
+
*/
|
|
169
|
+
const toolCollectionBaseShape = {
|
|
170
|
+
url: z.string().meta({ description: 'The URL endpoint for the tool collection' }),
|
|
171
|
+
auth: ToolCollectionAuthTypeSchema.optional().meta({
|
|
172
|
+
description: 'Optional authentication type required for this tool collection',
|
|
173
|
+
}),
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const MCPToolCollectionObjectSchema = z
|
|
177
|
+
.strictObject({
|
|
178
|
+
...toolCollectionBaseShape,
|
|
179
|
+
type: z.literal('mcp'),
|
|
180
|
+
id: z.string().meta({
|
|
181
|
+
description:
|
|
182
|
+
'Stable identifier for this collection. Used to key oauth_bindings on AppInstallation — ' +
|
|
183
|
+
'protects against collection renames. Required for new manifests.',
|
|
184
|
+
}),
|
|
185
|
+
name: z.string().meta({
|
|
186
|
+
description: 'Name for the tool collection. Human-readable label for the collection. Used in UI.',
|
|
187
|
+
}),
|
|
188
|
+
description: z.string().meta({
|
|
189
|
+
description:
|
|
190
|
+
'Description for the tool collection. Helps users understand what tools this collection ' + 'provides.',
|
|
191
|
+
}),
|
|
192
|
+
namespace: z.string().meta({
|
|
193
|
+
description:
|
|
194
|
+
'Prefix to use for tool names from this collection. Provides clean, readable tool names ' +
|
|
195
|
+
'(e.g., "jira" instead of "https://mcp.atlassian.com/v1/mcp")',
|
|
196
|
+
}),
|
|
197
|
+
oauth_app: z
|
|
198
|
+
.string()
|
|
199
|
+
.optional()
|
|
200
|
+
.meta({
|
|
201
|
+
description:
|
|
202
|
+
'Reference to an OAuth provider name for this collection (legacy / manual path). When set, ' +
|
|
203
|
+
"uses the OAuth provider's config (endpoints, client_id, client_secret) instead of MCP " +
|
|
204
|
+
'dynamic client registration or random fallback. The referenced OAuth provider must exist ' +
|
|
205
|
+
'in the same project.',
|
|
206
|
+
}),
|
|
207
|
+
oauth_config: MCPOAuthConfigSchema.optional().meta({
|
|
208
|
+
description:
|
|
209
|
+
'Install-time OAuth provisioning blueprint. When present, the platform auto-creates an ' +
|
|
210
|
+
'OAuth provider at install time using these values merged with any user-supplied ' +
|
|
211
|
+
'required_at_install params. The created app is recorded in AppInstallation.oauth_bindings. ' +
|
|
212
|
+
'Mutually exclusive with oauth_provider.',
|
|
213
|
+
}),
|
|
214
|
+
oauth_provider: z
|
|
215
|
+
.string()
|
|
216
|
+
.optional()
|
|
217
|
+
.meta({
|
|
218
|
+
description:
|
|
219
|
+
'Reference to a key in AppManifestData.oauth_providers. When set, this collection shares ' +
|
|
220
|
+
"the named provider's OAuth provider configuration. Mutually exclusive with oauth_config " +
|
|
221
|
+
'and oauth_app. Requires auth: "oauth" to be set.',
|
|
222
|
+
}),
|
|
223
|
+
oauth_scopes: z
|
|
224
|
+
.array(z.string())
|
|
225
|
+
.optional()
|
|
226
|
+
.meta({
|
|
227
|
+
description:
|
|
228
|
+
'Additional OAuth scopes for this collection when using a shared oauth_provider. These ' +
|
|
229
|
+
"are merged (union) with the provider's default_scopes at install time. Only valid when " +
|
|
230
|
+
'oauth_provider is set.',
|
|
231
|
+
}),
|
|
232
|
+
})
|
|
233
|
+
.meta({
|
|
234
|
+
id: 'MCPToolCollectionObject',
|
|
235
|
+
description: 'MCP tool collection configuration (requires name, description, and namespace)',
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
export const VertesiaSDKToolCollectionObjectSchema = z
|
|
239
|
+
.strictObject({
|
|
240
|
+
...toolCollectionBaseShape,
|
|
241
|
+
type: z.literal('vertesia_sdk'),
|
|
242
|
+
namespace: z
|
|
243
|
+
.string()
|
|
244
|
+
.optional()
|
|
245
|
+
.meta({
|
|
246
|
+
description:
|
|
247
|
+
'Optional namespace to use for tool names from this collection. If not provided, the tool ' +
|
|
248
|
+
'server default will be used.',
|
|
249
|
+
}),
|
|
250
|
+
name: z
|
|
251
|
+
.string()
|
|
252
|
+
.optional()
|
|
253
|
+
.meta({
|
|
254
|
+
description:
|
|
255
|
+
'Optional name for the tool collection. If not provided, the tool server default will be ' +
|
|
256
|
+
'used.',
|
|
257
|
+
}),
|
|
258
|
+
description: z
|
|
259
|
+
.string()
|
|
260
|
+
.optional()
|
|
261
|
+
.meta({
|
|
262
|
+
description:
|
|
263
|
+
'Optional description for the tool collection. If not provided, the tool server default ' +
|
|
264
|
+
'will be used.',
|
|
265
|
+
}),
|
|
266
|
+
})
|
|
267
|
+
.meta({
|
|
268
|
+
id: 'VertesiaSDKToolCollectionObject',
|
|
269
|
+
description: 'Vertesia SDK tool collection configuration',
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* `type` is a real wire field with unique literals in both branches, so the adapter synthesizes the
|
|
274
|
+
* `discriminator` a generated Java or Go client needs to pick a concrete subtype. The published
|
|
275
|
+
* union keeps its mapping; only the key order of the union node changes.
|
|
276
|
+
*/
|
|
277
|
+
export const ToolCollectionObjectSchema = z
|
|
278
|
+
.discriminatedUnion('type', [MCPToolCollectionObjectSchema, VertesiaSDKToolCollectionObjectSchema])
|
|
279
|
+
.meta({ id: 'ToolCollectionObject' });
|
|
280
|
+
|
|
281
|
+
export const AppGitSourceConfigSchema = z
|
|
282
|
+
.strictObject({
|
|
283
|
+
url: z.string().optional(),
|
|
284
|
+
default_branch: z.string().optional(),
|
|
285
|
+
production_branch: z.string().optional(),
|
|
286
|
+
development_branch: z.string().optional(),
|
|
287
|
+
})
|
|
288
|
+
.meta({ id: 'AppGitSourceConfig' });
|
|
289
|
+
|
|
290
|
+
export const AppSourceConfigSchema = z
|
|
291
|
+
.strictObject({
|
|
292
|
+
kind: z.literal('git'),
|
|
293
|
+
git: AppGitSourceConfigSchema.optional(),
|
|
294
|
+
})
|
|
295
|
+
.meta({ id: 'AppSourceConfig' });
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* What `AppManifest.source` narrows to: the same `kind: 'git'` envelope, but with the git block
|
|
299
|
+
* required and inline rather than referenced. Both components deliberately publish these distinct
|
|
300
|
+
* shapes.
|
|
301
|
+
*/
|
|
302
|
+
export const AppManifestSourceSchema = z
|
|
303
|
+
.strictObject({
|
|
304
|
+
kind: z.literal('git'),
|
|
305
|
+
git: z.strictObject({
|
|
306
|
+
url: z.string(),
|
|
307
|
+
default_branch: z.string().optional(),
|
|
308
|
+
production_branch: z.string().optional(),
|
|
309
|
+
development_branch: z.string().optional(),
|
|
310
|
+
}),
|
|
311
|
+
})
|
|
312
|
+
.meta({ id: 'AppManifestSource' });
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* `AppManifestData`, `AppManifest` and `AppManifestArray` are NOT declared here yet, and the reason
|
|
316
|
+
* is worth recording where the next attempt will read it.
|
|
317
|
+
*
|
|
318
|
+
* `AppManifestData.settings_schema` is a `JSONSchema`. Making the manifest canonical therefore pulls
|
|
319
|
+
* the registry's `JSONSchema` into the studio service, and studio's TypeScript-derived `JSONSchema`
|
|
320
|
+
* publishes `type` as `JSONSchemaTypeName | JSONSchemaTypeName[]` where the canonical one publishes
|
|
321
|
+
* `type: {}`. The generator refuses a name that is both derived and canonical unless the two agree.
|
|
322
|
+
* The combined document already ships the canonical spelling — zeno reaches it through
|
|
323
|
+
* `ContentTypeIntakePolicy` and wins the merge — so the fix is to settle `JSONSchema.type` in
|
|
324
|
+
* `@llumiverse/common`, after which the manifest converts with nothing else to decide: every
|
|
325
|
+
* component it references is above.
|
|
326
|
+
*/
|
|
327
|
+
|
|
328
|
+
// The remote MCP connection contracts.
|
|
329
|
+
//
|
|
330
|
+
// Eight components covering the OAuth handshake `RemoteMcpConnectionsResource` performs on behalf of
|
|
331
|
+
// a tool collection, plus the tool annotations an aggregated tool carries. They live here rather
|
|
332
|
+
// than in a module of their own because a remote MCP connection is an app installation's, and
|
|
333
|
+
// `MCPToolAnnotations` is referenced from `./tools.js`.
|
|
334
|
+
//
|
|
335
|
+
// Line comments rather than JSDoc blocks throughout: a JSDoc block immediately preceding an exported
|
|
336
|
+
// declaration is picked up by the OpenAPI scanner and published as that component's `description`,
|
|
337
|
+
// which would double up with the `description` stated in `.meta()`.
|
|
338
|
+
|
|
339
|
+
export const MCPToolAnnotationsSchema = z
|
|
340
|
+
.strictObject({
|
|
341
|
+
title: z.string().meta({ description: 'Human-readable display name for the tool' }).optional(),
|
|
342
|
+
readOnlyHint: z.boolean().meta({ description: 'If true, the tool does not modify any state' }).optional(),
|
|
343
|
+
destructiveHint: z
|
|
344
|
+
.boolean()
|
|
345
|
+
.meta({ description: 'If true, the tool may perform irreversible destructive operations' })
|
|
346
|
+
.optional(),
|
|
347
|
+
idempotentHint: z
|
|
348
|
+
.boolean()
|
|
349
|
+
.meta({
|
|
350
|
+
description: 'If true, calling the tool multiple times with the same args has no additional effect',
|
|
351
|
+
})
|
|
352
|
+
.optional(),
|
|
353
|
+
openWorldHint: z
|
|
354
|
+
.boolean()
|
|
355
|
+
.meta({ description: 'If true, the tool interacts with external entities outside the local environment' })
|
|
356
|
+
.optional(),
|
|
357
|
+
})
|
|
358
|
+
.meta({ id: 'MCPToolAnnotations', description: 'Metadata hints from MCP tool annotations (per MCP spec).' });
|
|
359
|
+
|
|
360
|
+
export const McpOAuthTokenResponseSchema = z
|
|
361
|
+
.strictObject({
|
|
362
|
+
access_token: z.string(),
|
|
363
|
+
})
|
|
364
|
+
.meta({ id: 'McpOAuthTokenResponse' });
|
|
365
|
+
|
|
366
|
+
export const McpOAuthTokenRequestSchema = z
|
|
367
|
+
.strictObject({
|
|
368
|
+
app_install_id: z.string().optional(),
|
|
369
|
+
collection_id: z.string().optional(),
|
|
370
|
+
mcp_server_url: z.string().optional(),
|
|
371
|
+
})
|
|
372
|
+
.meta({ id: 'McpOAuthTokenRequest' });
|
|
373
|
+
|
|
374
|
+
export const OAuthAuthStatusSchema = z
|
|
375
|
+
.strictObject({
|
|
376
|
+
collection_id: z.string(),
|
|
377
|
+
collection_name: z.string(),
|
|
378
|
+
authenticated: z.boolean(),
|
|
379
|
+
mcp_server_url: z.string(),
|
|
380
|
+
expires_at: z.string().optional(),
|
|
381
|
+
scope: z.string().optional(),
|
|
382
|
+
})
|
|
383
|
+
.meta({ id: 'OAuthAuthStatus', description: 'OAuth authentication status for an MCP tool collection' });
|
|
384
|
+
|
|
385
|
+
export const OAuthMetadataResponseSchema = z
|
|
386
|
+
.strictObject({
|
|
387
|
+
collection_id: z.string(),
|
|
388
|
+
collection_name: z.string(),
|
|
389
|
+
mcp_server_url: z.string(),
|
|
390
|
+
metadata: JSONObjectSchema,
|
|
391
|
+
})
|
|
392
|
+
.meta({ id: 'OAuthMetadataResponse', description: 'Response from OAuth metadata endpoint' });
|
|
393
|
+
|
|
394
|
+
export const McpOAuthDisconnectResponseSchema = z
|
|
395
|
+
.strictObject({
|
|
396
|
+
success: z.boolean(),
|
|
397
|
+
message: z.string(),
|
|
398
|
+
})
|
|
399
|
+
.meta({ id: 'McpOAuthDisconnectResponse' });
|
|
400
|
+
|
|
401
|
+
export const McpOAuthConnectResponseSchema = z
|
|
402
|
+
.strictObject({
|
|
403
|
+
success: z.boolean(),
|
|
404
|
+
})
|
|
405
|
+
.meta({ id: 'McpOAuthConnectResponse' });
|
|
406
|
+
|
|
407
|
+
export const OAuthAuthorizeResponseSchema = z
|
|
408
|
+
.strictObject({
|
|
409
|
+
authorization_url: z.string().optional(),
|
|
410
|
+
state: z.string().optional(),
|
|
411
|
+
connected: z.boolean().optional(),
|
|
412
|
+
})
|
|
413
|
+
.meta({ id: 'OAuthAuthorizeResponse', description: 'Response from OAuth authorization endpoint' });
|
|
414
|
+
|
|
415
|
+
export const OAuthAuthStatusArraySchema = z.array(OAuthAuthStatusSchema).meta({ id: 'OAuthAuthStatusArray' });
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AUDIT_ACTIONS, AUDIT_AGGREGATION_DIMENSIONS } from '../audit-trail.js';
|
|
3
|
+
import { NumberValueMapSchema } from './interaction.js';
|
|
4
|
+
|
|
5
|
+
// The audit trail: the events `GET /audit-trail` pages through and the aggregation `POST
|
|
6
|
+
// /audit-trail/aggregate` computes over them.
|
|
7
|
+
//
|
|
8
|
+
// `//` rather than `/** */` throughout: a JSDoc block immediately preceding an exported declaration
|
|
9
|
+
// is picked up by the OpenAPI scanner and published as that component's `description`, which would
|
|
10
|
+
// double up with the `description` stated in `.meta()`.
|
|
11
|
+
|
|
12
|
+
export const AuditMeterSchema = z
|
|
13
|
+
.strictObject({
|
|
14
|
+
category: z.string(),
|
|
15
|
+
type: z.string(),
|
|
16
|
+
quantity: z.number(),
|
|
17
|
+
})
|
|
18
|
+
.meta({
|
|
19
|
+
id: 'AuditMeter',
|
|
20
|
+
description:
|
|
21
|
+
'Generic metering entry attached to audit events. Used for cost attribution, usage tracking, and billing.\n\nExamples: { category: "tokens", type: "input", quantity: 1234 } { category: "tokens", type: "output", quantity: 567 } { category: "compute", type: "duration_ms", quantity: 2100 } { category: "processing", type: "pages", quantity: 12 }',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// The two action/dimension vocabularies read their members off the `as const` arrays in
|
|
25
|
+
// `../audit-trail.js` rather than restating them: those arrays are what the readers and the
|
|
26
|
+
// aggregation validator iterate, so a member added there reaches the document with nothing here
|
|
27
|
+
// changing. Everything else in this file is spelled out.
|
|
28
|
+
export const KnownAuditActionSchema = z.enum(AUDIT_ACTIONS).meta({ id: 'KnownAuditAction' });
|
|
29
|
+
|
|
30
|
+
export const EventCategorySchema = z
|
|
31
|
+
.enum(['content', 'workflow', 'security', 'billing', 'system', 'external'])
|
|
32
|
+
.meta({ id: 'EventCategory' });
|
|
33
|
+
|
|
34
|
+
export const AuditAggregationDimensionMapSchema = z
|
|
35
|
+
.strictObject({
|
|
36
|
+
time: z.string().nullable().optional(),
|
|
37
|
+
action: z.string().nullable().optional(),
|
|
38
|
+
resource_type: z.string().nullable().optional(),
|
|
39
|
+
event_category: z.string().nullable().optional(),
|
|
40
|
+
provider: z.string().nullable().optional(),
|
|
41
|
+
project_id: z.string().nullable().optional(),
|
|
42
|
+
'details.pipeline': z.string().nullable().optional(),
|
|
43
|
+
'details.verdict': z.string().nullable().optional(),
|
|
44
|
+
'details.workflow_type': z.string().nullable().optional(),
|
|
45
|
+
'details.rule_id': z.string().nullable().optional(),
|
|
46
|
+
model: z.string().nullable().optional(),
|
|
47
|
+
})
|
|
48
|
+
.meta({ id: 'AuditAggregationDimensionMap' });
|
|
49
|
+
|
|
50
|
+
export const AuditAggregationDistinctFieldSchema = z
|
|
51
|
+
.enum(['resource_id', 'request_id'])
|
|
52
|
+
.meta({ id: 'AuditAggregationDistinctField' });
|
|
53
|
+
|
|
54
|
+
export const AuditAggregationOperationSchema = z
|
|
55
|
+
.enum(['count', 'count_distinct', 'sum_meter', 'average_meter'])
|
|
56
|
+
.meta({ id: 'AuditAggregationOperation' });
|
|
57
|
+
|
|
58
|
+
export const AuditAggregationResolutionSchema = z
|
|
59
|
+
.enum(['hour', 'day', 'week', 'month'])
|
|
60
|
+
.meta({ id: 'AuditAggregationResolution' });
|
|
61
|
+
|
|
62
|
+
export const AuditAggregationDimensionSchema = z
|
|
63
|
+
.enum(AUDIT_AGGREGATION_DIMENSIONS)
|
|
64
|
+
.meta({ id: 'AuditAggregationDimension' });
|
|
65
|
+
|
|
66
|
+
export const AuditAggregationDetailFieldSchema = z
|
|
67
|
+
.enum(['pipeline', 'verdict', 'workflow_type', 'rule_id'])
|
|
68
|
+
.meta({ id: 'AuditAggregationDetailField' });
|
|
69
|
+
|
|
70
|
+
export const AuditActionSchema = z.union([KnownAuditActionSchema, z.string()]).meta({ id: 'AuditAction' });
|
|
71
|
+
|
|
72
|
+
export const AuditAggregationRowSchema = z
|
|
73
|
+
.strictObject({
|
|
74
|
+
dimensions: AuditAggregationDimensionMapSchema,
|
|
75
|
+
metrics: NumberValueMapSchema,
|
|
76
|
+
})
|
|
77
|
+
.meta({ id: 'AuditAggregationRow' });
|
|
78
|
+
|
|
79
|
+
export const AuditAggregationMetricSchema = z
|
|
80
|
+
.strictObject({
|
|
81
|
+
id: z.string().meta({
|
|
82
|
+
description:
|
|
83
|
+
'Stable key used in response rows. Must contain only letters, numbers, underscores, or hyphens.',
|
|
84
|
+
}),
|
|
85
|
+
operation: AuditAggregationOperationSchema,
|
|
86
|
+
field: AuditAggregationDistinctFieldSchema.meta({ description: 'Required for count_distinct.' }).optional(),
|
|
87
|
+
meterCategory: z.string().meta({ description: 'Required for meter operations.' }).optional(),
|
|
88
|
+
meterType: z.string().meta({ description: 'Required for meter operations.' }).optional(),
|
|
89
|
+
})
|
|
90
|
+
.meta({ id: 'AuditAggregationMetric' });
|
|
91
|
+
|
|
92
|
+
export const AuditAggregationGroupSchema = z
|
|
93
|
+
.strictObject({
|
|
94
|
+
dimension: AuditAggregationDimensionSchema,
|
|
95
|
+
resolution: AuditAggregationResolutionSchema.meta({
|
|
96
|
+
description: 'Required for the time dimension; defaults to day.',
|
|
97
|
+
}).optional(),
|
|
98
|
+
})
|
|
99
|
+
.meta({ id: 'AuditAggregationGroup' });
|
|
100
|
+
|
|
101
|
+
export const AuditAggregationDetailFilterSchema = z
|
|
102
|
+
.strictObject({
|
|
103
|
+
field: AuditAggregationDetailFieldSchema,
|
|
104
|
+
values: z.array(z.string()),
|
|
105
|
+
})
|
|
106
|
+
.meta({ id: 'AuditAggregationDetailFilter' });
|
|
107
|
+
|
|
108
|
+
export const AuditTrailEventSchema = z
|
|
109
|
+
.strictObject({
|
|
110
|
+
event_type: z.literal('audit'),
|
|
111
|
+
event_id: z.string().optional(),
|
|
112
|
+
event_category: EventCategorySchema.optional(),
|
|
113
|
+
source: z.string().nullable().optional(),
|
|
114
|
+
root_event_id: z.string().optional(),
|
|
115
|
+
caused_by_event_id: z.string().optional(),
|
|
116
|
+
hop_count: z.number().optional(),
|
|
117
|
+
audit_trail: z.boolean().optional(),
|
|
118
|
+
replay_of: z.string().optional(),
|
|
119
|
+
replay_root_event_id: z.string().optional(),
|
|
120
|
+
replayed_by: z.string().optional(),
|
|
121
|
+
action: AuditActionSchema,
|
|
122
|
+
resource_type: z.string(),
|
|
123
|
+
resource_id: z.string(),
|
|
124
|
+
timestamp: z.string(),
|
|
125
|
+
request_id: z.string(),
|
|
126
|
+
status: z.number(),
|
|
127
|
+
success: z.boolean(),
|
|
128
|
+
principal_id: z.string().nullable(),
|
|
129
|
+
principal_type: z.string().nullable(),
|
|
130
|
+
effective_principal_id: z.string().nullable(),
|
|
131
|
+
roles: z.array(z.string()),
|
|
132
|
+
account_id: z.string().nullable(),
|
|
133
|
+
project_id: z.string().nullable(),
|
|
134
|
+
tenant_id: z.string().nullable(),
|
|
135
|
+
account_name: z.string().nullable(),
|
|
136
|
+
project_name: z.string().nullable(),
|
|
137
|
+
provider: z
|
|
138
|
+
.string()
|
|
139
|
+
.nullable()
|
|
140
|
+
.meta({ description: 'Provider type for billable/provider-backed events, e.g. vertexai, bedrock.' })
|
|
141
|
+
.optional(),
|
|
142
|
+
meters: z
|
|
143
|
+
.array(AuditMeterSchema)
|
|
144
|
+
.meta({ description: 'Generic metering data for cost attribution and usage tracking' })
|
|
145
|
+
.optional(),
|
|
146
|
+
details: z
|
|
147
|
+
.looseObject({})
|
|
148
|
+
.meta({ description: 'Event-specific metadata — shape varies by action/resource_type' })
|
|
149
|
+
.optional(),
|
|
150
|
+
})
|
|
151
|
+
.meta({ id: 'AuditTrailEvent' });
|
|
152
|
+
|
|
153
|
+
export const AuditAggregationResponseSchema = z
|
|
154
|
+
.strictObject({
|
|
155
|
+
rows: z.array(AuditAggregationRowSchema),
|
|
156
|
+
from: z.string(),
|
|
157
|
+
to: z.string(),
|
|
158
|
+
})
|
|
159
|
+
.meta({ id: 'AuditAggregationResponse' });
|
|
160
|
+
|
|
161
|
+
export const AuditAggregationFilterSchema = z
|
|
162
|
+
.strictObject({
|
|
163
|
+
actions: z.array(AuditActionSchema).optional(),
|
|
164
|
+
resourceTypes: z.array(z.string()).optional(),
|
|
165
|
+
eventCategories: z.array(EventCategorySchema).optional(),
|
|
166
|
+
providers: z.array(z.string()).optional(),
|
|
167
|
+
success: z.boolean().optional(),
|
|
168
|
+
details: z.array(AuditAggregationDetailFilterSchema).optional(),
|
|
169
|
+
})
|
|
170
|
+
.meta({ id: 'AuditAggregationFilter' });
|
|
171
|
+
|
|
172
|
+
export const AuditTrailResponseSchema = z
|
|
173
|
+
.strictObject({
|
|
174
|
+
events: z.array(AuditTrailEventSchema),
|
|
175
|
+
hasNext: z.boolean().meta({ description: 'Whether there are more events after this page' }),
|
|
176
|
+
limit: z.number(),
|
|
177
|
+
offset: z.number(),
|
|
178
|
+
})
|
|
179
|
+
.meta({ id: 'AuditTrailResponse' });
|
|
180
|
+
|
|
181
|
+
export const AuditAggregationQuerySchema = z
|
|
182
|
+
.strictObject({
|
|
183
|
+
projectId: z
|
|
184
|
+
.string()
|
|
185
|
+
.meta({ description: 'Optional account-admin project filter. Ignored for project-scoped principals.' })
|
|
186
|
+
.optional(),
|
|
187
|
+
from: z
|
|
188
|
+
.string()
|
|
189
|
+
.meta({ description: 'Start time; defaults to 30 days before to. The server caps the range at 366 days.' })
|
|
190
|
+
.optional(),
|
|
191
|
+
to: z.string().meta({ description: 'End time; defaults to the current time.' }).optional(),
|
|
192
|
+
filter: AuditAggregationFilterSchema.optional(),
|
|
193
|
+
groupBy: z.array(AuditAggregationGroupSchema).optional(),
|
|
194
|
+
metrics: z.array(AuditAggregationMetricSchema),
|
|
195
|
+
limit: z.number().meta({ description: 'Maximum groups returned (default 50, max 200).' }).optional(),
|
|
196
|
+
})
|
|
197
|
+
.meta({
|
|
198
|
+
id: 'AuditAggregationQuery',
|
|
199
|
+
description:
|
|
200
|
+
'Safe audit aggregation query. The server always applies the authenticated account scope and, for project-scoped principals, replaces projectId with the authenticated project.',
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
// Query contracts are registry components even though the scanner expands them into parameters.
|
|
204
|
+
export const AuditTrailQuerySchema = z
|
|
205
|
+
.strictObject({
|
|
206
|
+
actions: z.array(AuditActionSchema).meta({ description: 'Filter by action types' }).optional(),
|
|
207
|
+
resourceTypes: z.array(z.string()).meta({ description: 'Filter by resource types' }).optional(),
|
|
208
|
+
resourceId: z.string().meta({ description: 'Filter by resource ID' }).optional(),
|
|
209
|
+
principalId: z
|
|
210
|
+
.string()
|
|
211
|
+
.meta({ description: 'Filter by exact actor principal ref (matches principal_id column).' })
|
|
212
|
+
.optional(),
|
|
213
|
+
principalType: z
|
|
214
|
+
.string()
|
|
215
|
+
.meta({ description: 'Filter by top-level actor category (matches principal_type column).' })
|
|
216
|
+
.optional(),
|
|
217
|
+
effectivePrincipalId: z
|
|
218
|
+
.string()
|
|
219
|
+
.meta({
|
|
220
|
+
description:
|
|
221
|
+
'Filter by delegated/direct effective principal ref (matches effective_principal_id column).',
|
|
222
|
+
})
|
|
223
|
+
.optional(),
|
|
224
|
+
hasEffectivePrincipal: z
|
|
225
|
+
.boolean()
|
|
226
|
+
.meta({ description: 'Filter by whether an event has an effective principal ref.' })
|
|
227
|
+
.optional(),
|
|
228
|
+
projectId: z
|
|
229
|
+
.string()
|
|
230
|
+
.meta({
|
|
231
|
+
description:
|
|
232
|
+
'Filter by project ID. Honoured only for account-scoped principals; a project-scoped principal always reads its own project.',
|
|
233
|
+
})
|
|
234
|
+
.optional(),
|
|
235
|
+
from: z.string().meta({ description: 'Start time (ISO string)' }).optional(),
|
|
236
|
+
to: z.string().meta({ description: 'End time (ISO string)' }).optional(),
|
|
237
|
+
limit: z
|
|
238
|
+
.number()
|
|
239
|
+
.meta({ description: 'Pagination: number of items to return (default 50, max 200)' })
|
|
240
|
+
.optional(),
|
|
241
|
+
offset: z.number().meta({ description: 'Pagination: offset' }).optional(),
|
|
242
|
+
})
|
|
243
|
+
.meta({ id: 'AuditTrailQuery' });
|