@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
package/lib/interaction.d.ts
CHANGED
|
@@ -1,96 +1,33 @@
|
|
|
1
|
-
import type { CompletionResult, ExecutionTokenUsage,
|
|
2
|
-
import type {
|
|
1
|
+
import type { CompletionResult, ExecutionTokenUsage, JSONObject, JSONSchema, Modalities, ModelOptions, StatelessExecutionOptions, ToolUse } from '@llumiverse/common';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { AgentResourceActionSchema, AgentResourceReferenceSchema, AgentResourceTypeSchema, AgentRunnerOptionsSchema, AsyncCompletionModeSchema, AsyncCompletionOptionsSchema, AsyncConversationExecutionPayloadSchema, AsyncExecutionPayloadSchema, AsyncExecutionResultSchema, AsyncInteractionExecutionPayloadSchema, CachePolicySchema, CatalogInteractionRefSchema, ConversationStripOptionsSchema, ConversationVisibilitySchema, ExecutionRunInteractionSchema, ExecutionRunRefSchema, ExecutionRunWorkflowSchema, GeneratedInteractionDefinitionSchema, GeneratedInteractionPromptSegmentSchema, GeneratedInteractionPromptTemplateSchema, GeneratedTestDataRecordSchema, GenerateInteractionPayloadSchema, GenerateTestDataPayloadSchema, ImprovePromptPayloadConfigSchema, ImprovePromptPayloadSchema, InCodePromptSchema, InitialToolCallSchema, InteractionCreatePayloadSchema, InteractionEndpointQuerySchema, InteractionEndpointSchema, InteractionExecutionErrorSchema, InteractionExecutionPayloadSchema, InteractionForkPayloadSchema, InteractionNameSchema, InteractionPublishPayloadSchema, InteractionRefSchema, InteractionRefWithSchemaSchema, InteractionSchema, InteractionsExportPayloadSchema, InteractionTagsSchema, InteractionUpdatePayloadSchema, InteractionVisibilitySchema, NamedInteractionExecutionPayloadSchema, PromptImprovementResponseSchema, PromptModalitiesSchema, RateLimitRequestPayloadSchema, RateLimitRequestResponseSchema, ResolvedEnvironmentInfoSchema, ResolvedInteractionExecutionInfoSchema, ResolvedRuntimeConfigSchema, ResultStorageOptionsSchema, RunSourceSchema, SchemaRefSchema, SkillContextTriggersSchema, StreamingOptionsSchema, StreamingTelemetryContextSchema, ToolResultMetaSchema, ToolResultSchema, ToolResultsPayloadSchema, UserMessagePayloadSchema } from './api-schemas/interaction.js';
|
|
4
|
+
import type { InteractionExecutionConfigurationSchema } from './api-schemas/store.js';
|
|
3
5
|
import type { MCPToolAnnotations } from './apps.js';
|
|
4
6
|
import type { ExecutionEnvironmentRef } from './environment.js';
|
|
5
7
|
import type { ProjectRef } from './project.js';
|
|
6
|
-
import type { ExecutablePromptSegmentDef, PopulatedPromptSegmentDef
|
|
7
|
-
import type {
|
|
8
|
-
import type { AgentToolApprovalMode } from './store/agent-approval.js';
|
|
9
|
-
import type { ConversationState, TextArtifactReference } from './store/conversation-state.js';
|
|
8
|
+
import type { ExecutablePromptSegmentDef, PopulatedPromptSegmentDef } from './prompt.js';
|
|
9
|
+
import type { TextArtifactReference } from './store/conversation-state.js';
|
|
10
10
|
import type { AccountRef } from './user.js';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* `RunDataStorageLevel` and `ConfigModes` live in `./interaction-values.js` so the API schemas can
|
|
13
|
+
* read them without importing this module back. Re-exported here so every existing import path keeps
|
|
14
|
+
* working.
|
|
15
|
+
*/
|
|
16
|
+
export * from './interaction-values.js';
|
|
17
|
+
import { ConfigModes, RunDataStorageLevel } from './interaction-values.js';
|
|
18
|
+
export type InteractionExecutionError = z.infer<typeof InteractionExecutionErrorSchema>;
|
|
18
19
|
/**
|
|
19
20
|
* Configuration for stripping large data from conversation history
|
|
20
21
|
* to prevent JSON serialization issues and reduce storage bloat.
|
|
21
22
|
*/
|
|
22
|
-
export
|
|
23
|
-
/**
|
|
24
|
-
* Number of turns to keep images before stripping them.
|
|
25
|
-
* - 0: Strip images immediately after each turn
|
|
26
|
-
* - N > 0: Keep images for N turns before stripping (default: 5)
|
|
27
|
-
* - Infinity: Never strip images
|
|
28
|
-
*/
|
|
29
|
-
images_after_turns?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Maximum tokens for text content before truncation.
|
|
32
|
-
* Text content exceeding this limit will be truncated with a marker.
|
|
33
|
-
* Uses ~4 characters per token estimate.
|
|
34
|
-
*/
|
|
35
|
-
text_max_tokens?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Number of turns to keep heartbeat messages before stripping them.
|
|
38
|
-
* Heartbeat messages are periodic workstream status updates wrapped in
|
|
39
|
-
* `<heartbeat>...</heartbeat>` tags that clutter conversation history.
|
|
40
|
-
* - 0: Strip heartbeats immediately after each turn
|
|
41
|
-
* - 1 (default): Keep only the most recent heartbeat
|
|
42
|
-
* - N > 0: Keep heartbeats for N turns before stripping
|
|
43
|
-
* - Infinity: Never strip heartbeats
|
|
44
|
-
*/
|
|
45
|
-
heartbeats_after_turns?: number;
|
|
46
|
-
}
|
|
23
|
+
export type ConversationStripOptions = z.infer<typeof ConversationStripOptionsSchema>;
|
|
47
24
|
/**
|
|
48
25
|
* Reference to an interaction in the catalog.
|
|
49
26
|
* Used in catalog listing. The id is composed of the namespace and the interaction name.
|
|
50
27
|
* Stored interactions can use `oid:` prefix.
|
|
51
28
|
* If no prefix is used it fallback on `oid:`.
|
|
52
29
|
*/
|
|
53
|
-
export
|
|
54
|
-
/**
|
|
55
|
-
* The type of interaction
|
|
56
|
-
*/
|
|
57
|
-
type: 'sys' | 'app' | 'stored' | 'draft';
|
|
58
|
-
/**
|
|
59
|
-
* the interaction id that can be used to execute the interaction.
|
|
60
|
-
*/
|
|
61
|
-
id: string;
|
|
62
|
-
/**
|
|
63
|
-
* The interaction name which identify the interaction in the provider interaction list.
|
|
64
|
-
* For the stored interactions this is the same as the endpoint property.
|
|
65
|
-
* For other types of interactions this is the local name of the interaction.
|
|
66
|
-
*/
|
|
67
|
-
name: string;
|
|
68
|
-
/**
|
|
69
|
-
* Only applies for stored interactions. The version of the interaction.
|
|
70
|
-
* Undefined for non stored interactions
|
|
71
|
-
*/
|
|
72
|
-
version?: number;
|
|
73
|
-
/**
|
|
74
|
-
* Only applies for stored interactions. Whether the interaction is published or not.
|
|
75
|
-
*/
|
|
76
|
-
published?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* The tags associated with the interaction.
|
|
79
|
-
*/
|
|
80
|
-
tags: string[];
|
|
81
|
-
/**
|
|
82
|
-
* Agent Runner configuration options.
|
|
83
|
-
*/
|
|
84
|
-
agent_runner_options?: AgentRunnerOptions;
|
|
85
|
-
/**
|
|
86
|
-
* The name of the interaction. For display purposes only.
|
|
87
|
-
*/
|
|
88
|
-
title: string;
|
|
89
|
-
/**
|
|
90
|
-
* Optional description of the interaction.
|
|
91
|
-
*/
|
|
92
|
-
description?: string;
|
|
93
|
-
}
|
|
30
|
+
export type CatalogInteractionRef = z.infer<typeof CatalogInteractionRefSchema>;
|
|
94
31
|
export interface CatalogTagQuery {
|
|
95
32
|
tag?: string;
|
|
96
33
|
}
|
|
@@ -110,21 +47,7 @@ export interface ResolveInteractionQuery {
|
|
|
110
47
|
hasImage?: boolean;
|
|
111
48
|
hasVideo?: boolean;
|
|
112
49
|
}
|
|
113
|
-
export
|
|
114
|
-
role: PromptRole;
|
|
115
|
-
content: string;
|
|
116
|
-
content_type: TemplateType;
|
|
117
|
-
schema?: JSONSchema;
|
|
118
|
-
/**
|
|
119
|
-
* optional name of the prompt segment. Use kebab case for prompt names
|
|
120
|
-
*/
|
|
121
|
-
name?: string;
|
|
122
|
-
/**
|
|
123
|
-
* optional reference to an external resource if any.
|
|
124
|
-
* Used internally by the system to synchronize stored prompts with in-code prompts.
|
|
125
|
-
*/
|
|
126
|
-
externalId?: string;
|
|
127
|
-
}
|
|
50
|
+
export type InCodePrompt = z.infer<typeof InCodePromptSchema>;
|
|
128
51
|
export interface InCodeInteraction {
|
|
129
52
|
/**
|
|
130
53
|
* The interaction type.
|
|
@@ -224,92 +147,28 @@ export interface InteractionSpec extends Omit<InCodeInteraction, 'id' | 'runtime
|
|
|
224
147
|
/**
|
|
225
148
|
* The payload to query the interaction endpoints
|
|
226
149
|
*/
|
|
227
|
-
export
|
|
228
|
-
limit?: number;
|
|
229
|
-
offset?: number;
|
|
230
|
-
status?: InteractionStatus;
|
|
231
|
-
visibility?: InteractionVisibility;
|
|
232
|
-
version?: number;
|
|
233
|
-
tags?: string[];
|
|
234
|
-
/**
|
|
235
|
-
* Filter by interaction endpoint name to include only the specified endpoints
|
|
236
|
-
* * If both includes and excludes are specified then only the includes filter will be used.
|
|
237
|
-
*/
|
|
238
|
-
includes?: string[];
|
|
239
|
-
/**
|
|
240
|
-
* Filter by interaction endpoint name to excludes the specified endpoints.
|
|
241
|
-
* If both includes and excludes are specified then only the includes filter will be used.
|
|
242
|
-
*/
|
|
243
|
-
excludes?: string[];
|
|
244
|
-
/**
|
|
245
|
-
* Whether or not to return the parameters schema.
|
|
246
|
-
* The parameters schema is an array of JSON schemas.
|
|
247
|
-
* Each schema is a JSON schema that describes the parameters of an interaction prompt.
|
|
248
|
-
*/
|
|
249
|
-
include_params_schema?: boolean;
|
|
250
|
-
/**
|
|
251
|
-
* Whether or not to return the result schema
|
|
252
|
-
*/
|
|
253
|
-
include_result_schema?: boolean;
|
|
254
|
-
/**
|
|
255
|
-
* When true, filter results to only interactions with is_skill=true.
|
|
256
|
-
*/
|
|
257
|
-
is_skill?: boolean;
|
|
258
|
-
}
|
|
150
|
+
export type InteractionEndpointQuery = z.infer<typeof InteractionEndpointQuerySchema>;
|
|
259
151
|
/**
|
|
260
152
|
* A description of an interaction endpoint.
|
|
261
153
|
*/
|
|
262
|
-
export
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
visibility?: InteractionVisibility;
|
|
269
|
-
version: number;
|
|
270
|
-
tags: string[];
|
|
271
|
-
agent_runner_options?: AgentRunnerOptions;
|
|
272
|
-
/**
|
|
273
|
-
* @deprecated This is deprecated. Use CompletionResult.type information instead.
|
|
274
|
-
*/
|
|
275
|
-
output_modality?: Modalities;
|
|
276
|
-
result_schema?: JSONSchema;
|
|
277
|
-
params_schema?: JSONSchema;
|
|
278
|
-
}
|
|
279
|
-
export interface InteractionTags {
|
|
280
|
-
tag: string;
|
|
281
|
-
count: number;
|
|
282
|
-
interactions: InteractionRef[];
|
|
283
|
-
}
|
|
284
|
-
export interface InteractionRef {
|
|
285
|
-
id: string;
|
|
286
|
-
name: string;
|
|
287
|
-
endpoint: string;
|
|
288
|
-
parent?: string;
|
|
289
|
-
model?: string;
|
|
290
|
-
description?: string;
|
|
291
|
-
status: InteractionStatus;
|
|
292
|
-
visibility?: InteractionVisibility;
|
|
293
|
-
version: number;
|
|
294
|
-
tags: string[];
|
|
295
|
-
agent_runner_options?: AgentRunnerOptions;
|
|
296
|
-
prompts?: PromptSegmentRef<PromptTemplateRef>[];
|
|
297
|
-
updated_at: Date;
|
|
298
|
-
}
|
|
154
|
+
export type InteractionEndpoint = z.infer<typeof InteractionEndpointSchema>;
|
|
155
|
+
export type InteractionTags = z.infer<typeof InteractionTagsSchema>;
|
|
156
|
+
export type InteractionRef = z.infer<typeof InteractionRefSchema>;
|
|
157
|
+
/** An interaction reduced to the fields a name picker needs. */
|
|
158
|
+
export type InteractionName = z.infer<typeof InteractionNameSchema>;
|
|
159
|
+
export declare const InteractionNamePopulate = "id name";
|
|
299
160
|
export declare const InteractionRefPopulate = "id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts";
|
|
300
161
|
export declare const InteractionRefWithSchemaPopulate = "id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts result_schema";
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
versions?: (number | 'draft' | 'latest')[];
|
|
312
|
-
}
|
|
162
|
+
/**
|
|
163
|
+
* An interaction reference carrying the schemas an export needs to reconstruct it.
|
|
164
|
+
*
|
|
165
|
+
* An alias of the published component rather than the `Omit<InteractionRef, 'prompts'>` interface it
|
|
166
|
+
* replaces. That `Omit` could not be resolved by the schema generator once `InteractionRef` became a
|
|
167
|
+
* canonical alias — the alias publishes as a bare reference, with no members to omit — and the
|
|
168
|
+
* interface also overstated each prompt template, which an export populates with `inputSchema` alone.
|
|
169
|
+
*/
|
|
170
|
+
export type InteractionRefWithSchema = z.infer<typeof InteractionRefWithSchemaSchema>;
|
|
171
|
+
export type InteractionsExportPayload = z.infer<typeof InteractionsExportPayloadSchema>;
|
|
313
172
|
export declare enum InteractionStatus {
|
|
314
173
|
draft = "draft",
|
|
315
174
|
published = "published",
|
|
@@ -323,11 +182,6 @@ export declare enum ExecutionRunStatus {
|
|
|
323
182
|
completed = "completed",
|
|
324
183
|
failed = "failed"
|
|
325
184
|
}
|
|
326
|
-
export declare enum RunDataStorageLevel {
|
|
327
|
-
STANDARD = "STANDARD",
|
|
328
|
-
RESTRICTED = "RESTRICTED",
|
|
329
|
-
DEBUG = "DEBUG"
|
|
330
|
-
}
|
|
331
185
|
export declare enum RunDataStorageDescription {
|
|
332
186
|
STANDARD = "Run data is stored for both the model inputs and output.",
|
|
333
187
|
RESTRICTED = "No run data is stored for the model inputs \u2014 only the model output.",
|
|
@@ -338,16 +192,9 @@ export declare const RunDataStorageOptions: Record<RunDataStorageLevel, RunDataS
|
|
|
338
192
|
* Schema can be stored or specified as a reference to an external schema.
|
|
339
193
|
* We only support "store:" references for now
|
|
340
194
|
*/
|
|
341
|
-
export
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
export interface CachePolicy {
|
|
345
|
-
type: 'cache' | 'no_cache' | 'cache_and_refresh';
|
|
346
|
-
refresh_probability: number;
|
|
347
|
-
varies_on: string[];
|
|
348
|
-
ttl: number;
|
|
349
|
-
}
|
|
350
|
-
export type InteractionVisibility = 'public' | 'private';
|
|
195
|
+
export type SchemaRef = z.infer<typeof SchemaRefSchema>;
|
|
196
|
+
export type CachePolicy = z.infer<typeof CachePolicySchema>;
|
|
197
|
+
export type InteractionVisibility = z.infer<typeof InteractionVisibilitySchema>;
|
|
351
198
|
export interface InteractionData {
|
|
352
199
|
readonly id: string;
|
|
353
200
|
name: string;
|
|
@@ -366,21 +213,7 @@ export interface InteractionData {
|
|
|
366
213
|
*/
|
|
367
214
|
output_modality?: Modalities;
|
|
368
215
|
}
|
|
369
|
-
export
|
|
370
|
-
status: InteractionStatus;
|
|
371
|
-
parent?: string;
|
|
372
|
-
visibility: InteractionVisibility;
|
|
373
|
-
version: number;
|
|
374
|
-
test_data?: JSONObject;
|
|
375
|
-
interaction_schema?: JSONSchema | SchemaRef;
|
|
376
|
-
cache_policy?: CachePolicy;
|
|
377
|
-
prompts: PromptSegmentDef[];
|
|
378
|
-
last_published_at?: Date;
|
|
379
|
-
created_by: string;
|
|
380
|
-
updated_by: string;
|
|
381
|
-
created_at: Date;
|
|
382
|
-
updated_at: Date;
|
|
383
|
-
}
|
|
216
|
+
export type Interaction = z.infer<typeof InteractionSchema>;
|
|
384
217
|
export interface PopulatedInteraction extends Omit<Interaction, 'prompts'> {
|
|
385
218
|
prompts: PopulatedPromptSegmentDef[];
|
|
386
219
|
}
|
|
@@ -391,17 +224,9 @@ export interface PopulatedInteraction extends Omit<Interaction, 'prompts'> {
|
|
|
391
224
|
export interface ExecutableInteraction extends InteractionData {
|
|
392
225
|
prompts: ExecutablePromptSegmentDef[];
|
|
393
226
|
}
|
|
394
|
-
export
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
export interface InteractionUpdatePayload extends Partial<Omit<Interaction, 'result_schema' | 'id' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by' | 'project'>> {
|
|
399
|
-
result_schema?: JSONSchema | SchemaRef | null;
|
|
400
|
-
}
|
|
401
|
-
export interface InteractionPublishPayload {
|
|
402
|
-
visibility?: InteractionVisibility;
|
|
403
|
-
tags?: string[];
|
|
404
|
-
}
|
|
227
|
+
export type InteractionCreatePayload = z.infer<typeof InteractionCreatePayloadSchema>;
|
|
228
|
+
export type InteractionUpdatePayload = z.infer<typeof InteractionUpdatePayloadSchema>;
|
|
229
|
+
export type InteractionPublishPayload = z.infer<typeof InteractionPublishPayloadSchema>;
|
|
405
230
|
export interface InteractionDeletePayload {
|
|
406
231
|
/**
|
|
407
232
|
* When true, also delete every interaction in the same family as the target:
|
|
@@ -411,70 +236,14 @@ export interface InteractionDeletePayload {
|
|
|
411
236
|
*/
|
|
412
237
|
cascade?: boolean;
|
|
413
238
|
}
|
|
414
|
-
export
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
targetProject?: string;
|
|
418
|
-
}
|
|
419
|
-
export interface InteractionExecutionPayload {
|
|
420
|
-
/**
|
|
421
|
-
* If a `@memory` property exists on the input data then the value will be used as the value of a memory pack location.
|
|
422
|
-
* and the other properties of the data will contain the memory pack mapping.
|
|
423
|
-
*/
|
|
424
|
-
data?: Record<string, unknown> | `memory:${string}`;
|
|
425
|
-
config?: InteractionExecutionConfiguration;
|
|
426
|
-
result_schema?: JSONSchema | SchemaRef | null;
|
|
427
|
-
stream?: boolean;
|
|
428
|
-
do_validate?: boolean;
|
|
429
|
-
tags?: string | string[];
|
|
430
|
-
/**
|
|
431
|
-
* The conversation state to be used in the execution if any.
|
|
432
|
-
* If the `true` is passed then the conversation will be returned in the result.
|
|
433
|
-
* The true value must be used for the first execution that starts the conversation.
|
|
434
|
-
* If conversation is falsy then no conversation is returned back.
|
|
435
|
-
* For regular executions the conversation is not returned back to save memory.
|
|
436
|
-
*/
|
|
437
|
-
conversation?: true | unknown;
|
|
438
|
-
/**
|
|
439
|
-
* The tools to be used in the execution
|
|
440
|
-
*/
|
|
441
|
-
tool_definitions?: ToolDefinition[];
|
|
442
|
-
/**
|
|
443
|
-
* The workflow related to this Interaction Run.
|
|
444
|
-
*/
|
|
445
|
-
workflow?: ExecutionRunWorkflow;
|
|
446
|
-
/**
|
|
447
|
-
* Only used by ad-hoc interactions which defines the prompt in the execution payload itself
|
|
448
|
-
* These are temporary interactions using "tmp:" suffix.
|
|
449
|
-
*/
|
|
450
|
-
prompts?: InCodePrompt[];
|
|
451
|
-
/**
|
|
452
|
-
* Options for async completion and/or streaming LLM response chunks to Redis.
|
|
453
|
-
* Used by agent workflows for async activity completion and real-time streaming.
|
|
454
|
-
*/
|
|
455
|
-
asyncCompletion?: AsyncCompletionOptions;
|
|
456
|
-
}
|
|
457
|
-
export interface NamedInteractionExecutionPayload extends InteractionExecutionPayload {
|
|
458
|
-
/**
|
|
459
|
-
* The interaction name and suffixed by an optional tag or version separated from the name using a @ character
|
|
460
|
-
* If no version/tag part is specified then the latest version is used.
|
|
461
|
-
* Example: ReviewContract, ReviewContract@draft, ReviewContract@1, ReviewContract@some-tag
|
|
462
|
-
*/
|
|
463
|
-
interaction: string;
|
|
464
|
-
}
|
|
239
|
+
export type InteractionForkPayload = z.infer<typeof InteractionForkPayloadSchema>;
|
|
240
|
+
export type InteractionExecutionPayload = z.infer<typeof InteractionExecutionPayloadSchema>;
|
|
241
|
+
export type NamedInteractionExecutionPayload = z.infer<typeof NamedInteractionExecutionPayloadSchema>;
|
|
465
242
|
export type ToolRef = string | {
|
|
466
243
|
name: string;
|
|
467
244
|
description: string;
|
|
468
245
|
};
|
|
469
|
-
|
|
470
|
-
type: 'conversation' | 'interaction';
|
|
471
|
-
/**
|
|
472
|
-
* An array of endpoint URLs to be notified upon execution
|
|
473
|
-
*/
|
|
474
|
-
notify_endpoints?: string[];
|
|
475
|
-
task_queue?: string;
|
|
476
|
-
}
|
|
477
|
-
export type ConversationVisibility = 'private' | 'project';
|
|
246
|
+
export type ConversationVisibility = z.infer<typeof ConversationVisibilitySchema>;
|
|
478
247
|
/**
|
|
479
248
|
* Defines the scope for agent search operations.
|
|
480
249
|
*/
|
|
@@ -488,359 +257,63 @@ export declare enum AgentSearchScope {
|
|
|
488
257
|
* Context triggers for auto-injection of skills.
|
|
489
258
|
* When these conditions match, the skill is automatically injected into the agent context.
|
|
490
259
|
*/
|
|
491
|
-
export
|
|
492
|
-
/**
|
|
493
|
-
* Keywords in user input that should trigger this skill
|
|
494
|
-
*/
|
|
495
|
-
keywords?: string[];
|
|
496
|
-
/**
|
|
497
|
-
* If these tools are being used, suggest this skill
|
|
498
|
-
*/
|
|
499
|
-
tool_names?: string[];
|
|
500
|
-
/**
|
|
501
|
-
* Regex patterns to match against input data
|
|
502
|
-
*/
|
|
503
|
-
data_patterns?: string[];
|
|
504
|
-
}
|
|
260
|
+
export type SkillContextTriggers = z.infer<typeof SkillContextTriggersSchema>;
|
|
505
261
|
/**
|
|
506
262
|
* Configuration options for Agent Runner functionality.
|
|
507
263
|
* These options control how interactions are exposed and executed in the Agent Runner.
|
|
508
264
|
*/
|
|
509
|
-
export
|
|
510
|
-
/**
|
|
511
|
-
* Whether this interaction is an agent (executable in Agent Runner).
|
|
512
|
-
*/
|
|
513
|
-
is_agent?: boolean;
|
|
514
|
-
/**
|
|
515
|
-
* Whether this interaction is available as a tool (sub-agent).
|
|
516
|
-
*/
|
|
517
|
-
is_tool?: boolean;
|
|
518
|
-
/**
|
|
519
|
-
* Whether this interaction is a skill (provides instructions without execution).
|
|
520
|
-
* Skills are injected into the agent's context based on context_triggers.
|
|
521
|
-
*/
|
|
522
|
-
is_skill?: boolean;
|
|
523
|
-
/**
|
|
524
|
-
* Context triggers for auto-injection of this skill.
|
|
525
|
-
* Only used when is_skill is true.
|
|
526
|
-
*/
|
|
527
|
-
context_triggers?: SkillContextTriggers;
|
|
528
|
-
/**
|
|
529
|
-
* Injection priority for skills (higher = more likely to be selected when multiple match).
|
|
530
|
-
* Only used when is_skill is true.
|
|
531
|
-
*/
|
|
532
|
-
skill_priority?: number;
|
|
533
|
-
/**
|
|
534
|
-
* Array of default tool names available to this agent.
|
|
535
|
-
* For interactions: defines default tools.
|
|
536
|
-
* For execution payloads: you can use + and - to add or remove from default,
|
|
537
|
-
* if no sign, then list replaces default.
|
|
538
|
-
*/
|
|
539
|
-
tool_names?: string[];
|
|
540
|
-
/**
|
|
541
|
-
* On which scope should the search be applied by the search_tool.
|
|
542
|
-
* Only supports 'collection' scope or undefined for now.
|
|
543
|
-
*/
|
|
544
|
-
search_scope?: AgentSearchScope;
|
|
545
|
-
/**
|
|
546
|
-
* The ID of the collection to restrict agent operations to.
|
|
547
|
-
* When specified, the agent's search and retrieval operations are limited to documents
|
|
548
|
-
* within this collection'.
|
|
549
|
-
*/
|
|
550
|
-
collection_id?: string;
|
|
551
|
-
/**
|
|
552
|
-
* Optional user-facing template for rendering run input as the first conversation entry.
|
|
553
|
-
* Supports {{field_name}}, {{nested.field}}, {{items.0.name}}, and {{json}} placeholders
|
|
554
|
-
* resolved from the run data.
|
|
555
|
-
*/
|
|
556
|
-
request_template?: string;
|
|
557
|
-
}
|
|
558
|
-
import type { UserChannel } from './email.js';
|
|
265
|
+
export type AgentRunnerOptions = z.infer<typeof AgentRunnerOptionsSchema>;
|
|
559
266
|
export type { EmailChannel, EmailRouteData, InteractiveChannel, UserChannel, } from './email.js';
|
|
560
267
|
export { isEmailChannel, isInteractiveChannel, } from './email.js';
|
|
561
268
|
/**
|
|
562
269
|
* A tool invocation executed before the first model turn of a conversation.
|
|
563
270
|
* Results are injected into the initial context so the agent starts with them in hand.
|
|
564
271
|
*/
|
|
565
|
-
export
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
/** Read-only builtin activity tool name. Skills are configured separately through initial_skills. */
|
|
569
|
-
tool: string;
|
|
570
|
-
/** Tool input parameters. */
|
|
571
|
-
input?: Record<string, unknown>;
|
|
572
|
-
/** Whether a failed initialization call aborts the conversation start. */
|
|
573
|
-
on_error?: 'fail' | 'continue';
|
|
574
|
-
}
|
|
575
|
-
export interface AsyncConversationExecutionPayload extends AsyncExecutionPayloadBase {
|
|
576
|
-
type: 'conversation';
|
|
577
|
-
/** Effective tool approval mode for interactive agent conversations. */
|
|
578
|
-
tool_approval_mode?: AgentToolApprovalMode;
|
|
579
|
-
/**
|
|
580
|
-
* Visibility determine if the conversation should be seen by the user only or by anyone with access to the project
|
|
581
|
-
* If not specified, the default is project
|
|
582
|
-
**/
|
|
583
|
-
visibility?: ConversationVisibility;
|
|
584
|
-
/**
|
|
585
|
-
* The tools to use, list of tool or function names.
|
|
586
|
-
* You can use + and - to add or remove from default, if no sign, then list replaces default
|
|
587
|
-
*/
|
|
588
|
-
tool_names?: string[];
|
|
589
|
-
/**
|
|
590
|
-
* Builtin system skills to activate at conversation start. Their related tools are
|
|
591
|
-
* exposed from the first turn and their instructions are injected into the initial
|
|
592
|
-
* context, replacing the learn_<skill> round-trip.
|
|
593
|
-
*/
|
|
594
|
-
initial_skills?: string[];
|
|
595
|
-
/**
|
|
596
|
-
* Tool calls executed before the first model turn. Results are injected into the
|
|
597
|
-
* initial context. These run sequentially with the caller's authority before the
|
|
598
|
-
* first model turn. Only a bounded set of read/hydration tools is accepted.
|
|
599
|
-
*/
|
|
600
|
-
initial_tool_calls?: InitialToolCall[];
|
|
601
|
-
/**
|
|
602
|
-
* Hard denylist of tool names for this conversation. Excluded tools are never
|
|
603
|
-
* exposed to the model and are refused at execution time, even when a skill or
|
|
604
|
-
* tool refresh would otherwise unlock them. Takes precedence over tool_names,
|
|
605
|
-
* initial_skills, and skill-based tool activation.
|
|
606
|
-
*/
|
|
607
|
-
excluded_tools?: string[];
|
|
608
|
-
/**
|
|
609
|
-
* The maximum number of iterations in case of a conversation. If <=0 the default of 20 will be used.
|
|
610
|
-
*/
|
|
611
|
-
max_iterations?: number;
|
|
612
|
-
/**
|
|
613
|
-
* Whether the conversation should be interactive or not
|
|
614
|
-
*/
|
|
615
|
-
interactive?: boolean;
|
|
616
|
-
/**
|
|
617
|
-
* Array of channels to use for user communication.
|
|
618
|
-
* Multiple channels can be active simultaneously (e.g., both email and interactive).
|
|
619
|
-
* Each channel contains its own configuration and state (e.g., email threading info).
|
|
620
|
-
*/
|
|
621
|
-
user_channels?: UserChannel[];
|
|
622
|
-
/**
|
|
623
|
-
* Whether to disable the generation of interaction tools or not.
|
|
624
|
-
*/
|
|
625
|
-
disable_interaction_tools?: boolean;
|
|
626
|
-
/**
|
|
627
|
-
* On which scope should the searched by applied, by the search_tool.
|
|
628
|
-
* Only supports collection scope or null for now.
|
|
629
|
-
*/
|
|
630
|
-
search_scope?: AgentSearchScope.Collection;
|
|
631
|
-
/**
|
|
632
|
-
* The collection in which this workflow is executing
|
|
633
|
-
*/
|
|
634
|
-
collection_id?: string;
|
|
635
|
-
/**
|
|
636
|
-
* Denylist of MCP tool-collection ids deactivated for this conversation.
|
|
637
|
-
* `undefined`/empty means all installed/connected MCP collections are active (back-compat,
|
|
638
|
-
* and new servers stay active by default). Listed collections are excluded even if connected.
|
|
639
|
-
* Can be updated mid-conversation via the MCP config signal.
|
|
640
|
-
*/
|
|
641
|
-
disabled_mcp_collections?: string[];
|
|
642
|
-
/**
|
|
643
|
-
* The token threshold in thousands (K) for creating checkpoints.
|
|
644
|
-
* If total tokens exceed this value, a checkpoint will be created.
|
|
645
|
-
* If not specified, the default is computed from the selected model context window (75%).
|
|
646
|
-
*/
|
|
647
|
-
checkpoint_tokens?: number;
|
|
648
|
-
/**
|
|
649
|
-
* Configuration for stripping large data (images, text) from conversation history
|
|
650
|
-
* to prevent JSON serialization issues and reduce storage bloat.
|
|
651
|
-
*/
|
|
652
|
-
strip_options?: ConversationStripOptions;
|
|
653
|
-
/** In child execution workflow, this is the curent task_id */
|
|
654
|
-
task_id?: string;
|
|
655
|
-
/** Parent-assigned launch ID for non-blocking workstreams.
|
|
656
|
-
* The child uses this when signaling progress/completion back to the parent. */
|
|
657
|
-
launch_id?: string;
|
|
658
|
-
/** Whether to enable debug mode */
|
|
659
|
-
debug_mode?: boolean;
|
|
660
|
-
/** Maximum depth for nested conversations to prevent infinite recursion (default: 5) */
|
|
661
|
-
max_nested_conversation_depth?: number;
|
|
662
|
-
/**
|
|
663
|
-
* Metadata inherited from parent workflow.
|
|
664
|
-
* Used to propagate context (e.g., apiKey, session info) to child workflows/workstreams.
|
|
665
|
-
* When a workstream is spawned, the parent's `data` is preserved here so that
|
|
666
|
-
* child tools can access it via metadata.parent_metadata.
|
|
667
|
-
*/
|
|
668
|
-
parent_metadata?: Record<string, unknown>;
|
|
669
|
-
/**
|
|
670
|
-
* When true, subagent/workstream tool calls use fire-and-forget `startChild()`
|
|
671
|
-
* instead of blocking `executeChild()`. The parent continues reasoning while
|
|
672
|
-
* children run, receiving progress/completion via Temporal signals.
|
|
673
|
-
*/
|
|
674
|
-
non_blocking_subagents?: boolean;
|
|
675
|
-
/**
|
|
676
|
-
* Temporal runId of a previous workflow to restart/fork from.
|
|
677
|
-
* When set, conversation history is loaded from the old run's GCS storage
|
|
678
|
-
* instead of calling startConversation fresh.
|
|
679
|
-
*/
|
|
680
|
-
restart_from_workflow_run_id?: string;
|
|
681
|
-
/**
|
|
682
|
-
* The Temporal firstExecutionRunId of the original workflow being restarted/forked.
|
|
683
|
-
* Used by loadConversationForRestart to look up the original ExecutionRun
|
|
684
|
-
* so that token accumulation and status updates target a valid run.
|
|
685
|
-
*/
|
|
686
|
-
source_first_workflow_run_id?: string;
|
|
687
|
-
/**
|
|
688
|
-
* When true, indicates this is a fork (new ExecutionRun) rather than a restart (reuse original).
|
|
689
|
-
*/
|
|
690
|
-
is_fork?: boolean;
|
|
691
|
-
/**
|
|
692
|
-
* The AgentRun MongoDB _id. Used for artifact storage paths: agents/{agent_run_id}/
|
|
693
|
-
* Flows into ConversationState and down to workstreams.
|
|
694
|
-
* Undefined for legacy workflows started before the AgentRun system.
|
|
695
|
-
*/
|
|
696
|
-
agent_run_id?: string;
|
|
697
|
-
/**
|
|
698
|
-
* The Schedule MongoDB _id. Set when this execution was triggered by a Temporal schedule.
|
|
699
|
-
* Used by the workflow to create an AgentRun on first run if agent_run_id is absent.
|
|
700
|
-
*/
|
|
701
|
-
schedule_id?: string;
|
|
702
|
-
}
|
|
703
|
-
export interface AsyncInteractionExecutionPayload extends AsyncExecutionPayloadBase {
|
|
704
|
-
type: 'interaction';
|
|
705
|
-
/**
|
|
706
|
-
* Only used for non conversation workflows to include the error on next retry.
|
|
707
|
-
* If tools is defined this is not used
|
|
708
|
-
*/
|
|
709
|
-
include_previous_error?: boolean;
|
|
710
|
-
}
|
|
272
|
+
export type InitialToolCall = z.infer<typeof InitialToolCallSchema>;
|
|
273
|
+
export type AsyncConversationExecutionPayload = z.infer<typeof AsyncConversationExecutionPayloadSchema>;
|
|
274
|
+
export type AsyncInteractionExecutionPayload = z.infer<typeof AsyncInteractionExecutionPayloadSchema>;
|
|
711
275
|
/**
|
|
712
276
|
* @discriminator type
|
|
713
277
|
*/
|
|
714
|
-
export type AsyncExecutionPayload =
|
|
715
|
-
export
|
|
716
|
-
runId: string;
|
|
717
|
-
workflowId: string;
|
|
718
|
-
agentRunId?: string;
|
|
719
|
-
}
|
|
278
|
+
export type AsyncExecutionPayload = z.infer<typeof AsyncExecutionPayloadSchema>;
|
|
279
|
+
export type AsyncExecutionResult = z.infer<typeof AsyncExecutionResultSchema>;
|
|
720
280
|
/**
|
|
721
281
|
* Telemetry context for streaming mode.
|
|
722
282
|
* Contains info not available in current_state needed to send LlmCallEvent.
|
|
723
283
|
*/
|
|
724
|
-
export
|
|
725
|
-
/** Type of LLM call: start, resume after user message, or resume after tool results */
|
|
726
|
-
callType: LlmCallType;
|
|
727
|
-
/** Activity retry attempt number */
|
|
728
|
-
attemptNumber?: number;
|
|
729
|
-
/** Timestamp when inference started (for duration calculation) */
|
|
730
|
-
inferenceStartTime: number;
|
|
731
|
-
}
|
|
284
|
+
export type StreamingTelemetryContext = z.infer<typeof StreamingTelemetryContextSchema>;
|
|
732
285
|
/**
|
|
733
286
|
* Options for storing inference results to cloud storage
|
|
734
287
|
*/
|
|
735
|
-
export
|
|
736
|
-
|
|
737
|
-
path: string;
|
|
738
|
-
}
|
|
739
|
-
export type AsyncCompletionMode = 'conversation_state' | 'text';
|
|
288
|
+
export type ResultStorageOptions = z.infer<typeof ResultStorageOptionsSchema>;
|
|
289
|
+
export type AsyncCompletionMode = z.infer<typeof AsyncCompletionModeSchema>;
|
|
740
290
|
/**
|
|
741
291
|
* Streaming-specific options (only needed when stream=true)
|
|
742
292
|
*/
|
|
743
|
-
export
|
|
744
|
-
/** Redis channel to publish streaming chunks to */
|
|
745
|
-
redis_channel: string;
|
|
746
|
-
/** Optional workstream ID for multi-workstream agents */
|
|
747
|
-
workstream_id?: string;
|
|
748
|
-
}
|
|
293
|
+
export type StreamingOptions = z.infer<typeof StreamingOptionsSchema>;
|
|
749
294
|
/**
|
|
750
295
|
* Options for async completion and/or streaming LLM responses
|
|
751
296
|
*/
|
|
752
|
-
export
|
|
753
|
-
/** Workflow run ID for message context */
|
|
754
|
-
run_id: string;
|
|
755
|
-
/** Whether to stream chunks to Redis */
|
|
756
|
-
stream?: boolean;
|
|
757
|
-
/** Streaming-specific options (required if stream=true) */
|
|
758
|
-
streaming?: StreamingOptions;
|
|
759
|
-
/**
|
|
760
|
-
* Temporal task token for async activity completion (base64url encoded).
|
|
761
|
-
* When provided, Studio will complete the activity after execution finishes,
|
|
762
|
-
* allowing the worker to release the activity slot immediately.
|
|
763
|
-
*/
|
|
764
|
-
task_token?: string;
|
|
765
|
-
/**
|
|
766
|
-
* Activity ID for idempotency metadata when storing conversation.
|
|
767
|
-
* Required when task_token is provided.
|
|
768
|
-
*/
|
|
769
|
-
activity_id?: string;
|
|
770
|
-
/**
|
|
771
|
-
* Current conversation state to merge with execution result.
|
|
772
|
-
* Studio will store the conversation and complete the activity with merged state.
|
|
773
|
-
* Required when task_token is provided.
|
|
774
|
-
*/
|
|
775
|
-
current_state?: ConversationState;
|
|
776
|
-
/**
|
|
777
|
-
* Interval in milliseconds for sending heartbeats to Temporal during streaming.
|
|
778
|
-
* When provided, Studio will send periodic heartbeats to keep the activity alive.
|
|
779
|
-
* Recommended: 10000 (10 seconds). Activity heartbeat timeout should be ~3x this value.
|
|
780
|
-
*/
|
|
781
|
-
heartbeat_interval_ms?: number;
|
|
782
|
-
/**
|
|
783
|
-
* Telemetry context for sending LlmCallEvent after streaming completes.
|
|
784
|
-
* Studio will use this to send token usage telemetry since the activity
|
|
785
|
-
* exits before the response is available in async completion mode.
|
|
786
|
-
*/
|
|
787
|
-
telemetry?: StreamingTelemetryContext;
|
|
788
|
-
/**
|
|
789
|
-
* Storage options for inference result.
|
|
790
|
-
* When provided, Studio will store the result to the specified path
|
|
791
|
-
* after inference completes (before completing the Temporal activity).
|
|
792
|
-
*/
|
|
793
|
-
result_storage?: ResultStorageOptions;
|
|
794
|
-
/**
|
|
795
|
-
* Controls the value used to complete the Temporal activity.
|
|
796
|
-
* Defaults to `conversation_state` for agent resume/continuation calls.
|
|
797
|
-
* Use `text` for one-shot helper calls, such as checkpoint summaries,
|
|
798
|
-
* that need the model's text result instead of merged conversation state.
|
|
799
|
-
*/
|
|
800
|
-
completion_mode?: AsyncCompletionMode;
|
|
801
|
-
}
|
|
802
|
-
interface ResumeConversationPayload {
|
|
803
|
-
run: ExecutionRunDocRef;
|
|
804
|
-
environment: string;
|
|
805
|
-
options: StatelessExecutionOptions;
|
|
806
|
-
conversation: unknown;
|
|
807
|
-
tools: ToolDefinition[];
|
|
808
|
-
/** Configuration for stripping large data from conversation history */
|
|
809
|
-
strip_options?: ConversationStripOptions;
|
|
810
|
-
/** Options for async completion and/or streaming LLM response chunks to Redis */
|
|
811
|
-
asyncCompletion?: AsyncCompletionOptions;
|
|
812
|
-
}
|
|
297
|
+
export type AsyncCompletionOptions = z.infer<typeof AsyncCompletionOptionsSchema>;
|
|
813
298
|
/**
|
|
814
299
|
* The kinds of Vertesia resource an agent tool can report having created, updated, or deleted.
|
|
815
300
|
* Restricted to resources that have a real detail route to navigate to — do not emit a reference
|
|
816
301
|
* for a mutation with no meaningful navigation target. Add new kinds only once their route exists.
|
|
817
302
|
*/
|
|
818
|
-
export type AgentResourceType =
|
|
819
|
-
export type AgentResourceAction =
|
|
303
|
+
export type AgentResourceType = z.infer<typeof AgentResourceTypeSchema>;
|
|
304
|
+
export type AgentResourceAction = z.infer<typeof AgentResourceActionSchema>;
|
|
820
305
|
/**
|
|
821
306
|
* A navigable reference to a resource an agent tool mutated. Tools return these as tool-result
|
|
822
307
|
* metadata (see {@link ToolResultMeta.resources}); the conversation runtime promotes them onto the
|
|
823
308
|
* tool's completed lifecycle message so the UI can render deterministic deep links and an
|
|
824
309
|
* end-of-turn "resources changed" summary — independent of any link the model writes in prose.
|
|
825
310
|
*/
|
|
826
|
-
export
|
|
827
|
-
type: AgentResourceType;
|
|
828
|
-
/** The resource id used to build its detail route. */
|
|
829
|
-
id: string;
|
|
830
|
-
/** Human-readable label captured at mutation time (e.g. the document name). */
|
|
831
|
-
label: string;
|
|
832
|
-
action: AgentResourceAction;
|
|
833
|
-
/** Set when the mutation produced a new revision, enabling a "view changes" affordance. */
|
|
834
|
-
revision_id?: string;
|
|
835
|
-
}
|
|
311
|
+
export type AgentResourceReference = z.infer<typeof AgentResourceReferenceSchema>;
|
|
836
312
|
/**
|
|
837
313
|
* Metadata a tool executor may attach to its result. Kept as an open record for forward
|
|
838
314
|
* compatibility while typing the fields the runtime interprets.
|
|
839
315
|
*/
|
|
840
|
-
export
|
|
841
|
-
/** Resources this tool created/updated/deleted, surfaced as deep links in the UI. */
|
|
842
|
-
resources?: AgentResourceReference[];
|
|
843
|
-
}
|
|
316
|
+
export type ToolResultMeta = z.infer<typeof ToolResultMetaSchema>;
|
|
844
317
|
export interface ToolResultContent {
|
|
845
318
|
content: string;
|
|
846
319
|
/**
|
|
@@ -870,23 +343,12 @@ export interface ToolResultContent {
|
|
|
870
343
|
export declare function normalizeAgentResources(value: unknown): AgentResourceReference[];
|
|
871
344
|
/** Extract the normalized resource references a tool declared in its result metadata. */
|
|
872
345
|
export declare function getResourcesFromToolResult(result: Pick<ToolResultContent, 'meta'>): AgentResourceReference[];
|
|
873
|
-
export
|
|
874
|
-
tool_use_id: string;
|
|
875
|
-
/**
|
|
876
|
-
* Gemini thinking models require thought_signature to be passed back with tool results.
|
|
877
|
-
* Copy this from the ToolUse.thought_signature that requested this tool call.
|
|
878
|
-
*/
|
|
879
|
-
thought_signature?: string;
|
|
880
|
-
}
|
|
346
|
+
export type ToolResult = z.infer<typeof ToolResultSchema>;
|
|
881
347
|
/**
|
|
882
348
|
* The payload to sent the tool responses back to the target LLM
|
|
883
349
|
*/
|
|
884
|
-
export
|
|
885
|
-
|
|
886
|
-
}
|
|
887
|
-
export interface UserMessagePayload extends ResumeConversationPayload {
|
|
888
|
-
message: string;
|
|
889
|
-
}
|
|
350
|
+
export type ToolResultsPayload = z.infer<typeof ToolResultsPayloadSchema>;
|
|
351
|
+
export type UserMessagePayload = z.infer<typeof UserMessagePayloadSchema>;
|
|
890
352
|
export type CheckpointConversationPayload = Omit<ToolResultsPayload, 'results' | 'tools'>;
|
|
891
353
|
export declare enum RunSourceTypes {
|
|
892
354
|
api = "api",
|
|
@@ -897,14 +359,8 @@ export declare enum RunSourceTypes {
|
|
|
897
359
|
system = "system",
|
|
898
360
|
schedule = "schedule"
|
|
899
361
|
}
|
|
900
|
-
export
|
|
901
|
-
|
|
902
|
-
label: string;
|
|
903
|
-
principal_type: `${PrincipalType}`;
|
|
904
|
-
principal_id: string;
|
|
905
|
-
client_ip: string;
|
|
906
|
-
}
|
|
907
|
-
export type ExecutionRunInteraction = InteractionRef;
|
|
362
|
+
export type RunSource = z.infer<typeof RunSourceSchema>;
|
|
363
|
+
export type ExecutionRunInteraction = z.infer<typeof ExecutionRunInteractionSchema>;
|
|
908
364
|
export interface BaseExecutionRun<P = unknown> {
|
|
909
365
|
readonly id: string;
|
|
910
366
|
/**
|
|
@@ -924,11 +380,6 @@ export interface BaseExecutionRun<P = unknown> {
|
|
|
924
380
|
*/
|
|
925
381
|
parameters: P;
|
|
926
382
|
tags?: string[];
|
|
927
|
-
/**
|
|
928
|
-
* Interaction reference. Stored interactions may be populated as full
|
|
929
|
-
* Interaction documents; in-code interactions are represented as refs whose
|
|
930
|
-
* `id` is the namespaced interaction id.
|
|
931
|
-
*/
|
|
932
383
|
interaction?: string | ExecutionRunInteraction;
|
|
933
384
|
/** Environment reference - populated with full object in API responses */
|
|
934
385
|
environment: ExecutionEnvironmentRef;
|
|
@@ -941,8 +392,10 @@ export interface BaseExecutionRun<P = unknown> {
|
|
|
941
392
|
token_use?: ExecutionTokenUsage;
|
|
942
393
|
chunks?: number;
|
|
943
394
|
execution_time?: number;
|
|
944
|
-
|
|
945
|
-
|
|
395
|
+
/** @format date-time */
|
|
396
|
+
created_at: string;
|
|
397
|
+
/** @format date-time */
|
|
398
|
+
updated_at: string;
|
|
946
399
|
account: AccountRef;
|
|
947
400
|
project: ProjectRef;
|
|
948
401
|
config: InteractionExecutionConfiguration;
|
|
@@ -969,43 +422,8 @@ export interface ExecutionRun<P = unknown> extends BaseExecutionRun<P> {
|
|
|
969
422
|
export interface PopulatedExecutionRun<P = unknown> extends BaseExecutionRun<P> {
|
|
970
423
|
interaction?: ExecutionRunInteraction;
|
|
971
424
|
}
|
|
972
|
-
export
|
|
973
|
-
|
|
974
|
-
* The Temporal Workflow Run ID related to this Interaction Run.
|
|
975
|
-
*
|
|
976
|
-
* A Run ID is a globally unique, platform-level identifier for a Workflow Execution.
|
|
977
|
-
*
|
|
978
|
-
* @deprecated For agent runs, use the Agent Runs API (`/api/v1/agents`) instead.
|
|
979
|
-
* The AgentRun object provides a stable ID that survives workflow restarts.
|
|
980
|
-
* This field is only relevant for legacy non-agent interaction executions.
|
|
981
|
-
*
|
|
982
|
-
* @example 01970d37-a890-70c0-9f44-1256d063e69a
|
|
983
|
-
* @see https://docs.temporal.io/workflow-execution/workflowid-runid
|
|
984
|
-
*/
|
|
985
|
-
run_id: string;
|
|
986
|
-
/**
|
|
987
|
-
* The Temporal Workflow ID related to this Interaction Run.
|
|
988
|
-
*
|
|
989
|
-
* @deprecated For agent runs, use the Agent Runs API (`/api/v1/agents`) instead.
|
|
990
|
-
* The AgentRun object provides a stable ID that survives workflow restarts.
|
|
991
|
-
* This field is only relevant for legacy non-agent interaction executions.
|
|
992
|
-
*
|
|
993
|
-
* @example Standard Document Intake:6834841e4f828d4e36192796
|
|
994
|
-
* @see https://docs.temporal.io/workflow-execution/workflowid-runid
|
|
995
|
-
*/
|
|
996
|
-
workflow_id: string;
|
|
997
|
-
/**
|
|
998
|
-
* The Temporal Activity Type used for executing this Interaction. Undefined if the interaction
|
|
999
|
-
* was not executed as part of a workflow (such as Agent Runner).
|
|
1000
|
-
*
|
|
1001
|
-
* @example generateDocumentProperties
|
|
1002
|
-
*/
|
|
1003
|
-
activity_type?: string;
|
|
1004
|
-
}
|
|
1005
|
-
export interface PromptModalities {
|
|
1006
|
-
hasVideo: boolean;
|
|
1007
|
-
hasImage: boolean;
|
|
1008
|
-
}
|
|
425
|
+
export type ExecutionRunWorkflow = z.infer<typeof ExecutionRunWorkflowSchema>;
|
|
426
|
+
export type PromptModalities = z.infer<typeof PromptModalitiesSchema>;
|
|
1009
427
|
export interface InteractionExecutionResult<P = unknown> extends Omit<ExecutionRun<P>, 'account' | 'project' | 'interaction'> {
|
|
1010
428
|
account: string;
|
|
1011
429
|
project: string;
|
|
@@ -1019,93 +437,26 @@ export interface LegacyInteractionExecutionResult<P = unknown> extends Omit<Inte
|
|
|
1019
437
|
project: string | ProjectRef;
|
|
1020
438
|
result?: JSONObject | string | null;
|
|
1021
439
|
}
|
|
1022
|
-
export
|
|
1023
|
-
interaction?: InteractionRef;
|
|
1024
|
-
}
|
|
440
|
+
export type ExecutionRunRef = z.infer<typeof ExecutionRunRefSchema>;
|
|
1025
441
|
export declare const ExecutionRunRefSelect = "-result -parameters -result_schema -prompt";
|
|
1026
|
-
export declare enum ConfigModes {
|
|
1027
|
-
RUN_AND_INTERACTION_CONFIG = "RUN_AND_INTERACTION_CONFIG",
|
|
1028
|
-
RUN_CONFIG_ONLY = "RUN_CONFIG_ONLY",
|
|
1029
|
-
INTERACTION_CONFIG_ONLY = "INTERACTION_CONFIG_ONLY"
|
|
1030
|
-
}
|
|
1031
442
|
export declare enum ConfigModesDescription {
|
|
1032
443
|
RUN_AND_INTERACTION_CONFIG = "This run configuration is used. Undefined options are filled with interaction configuration.",
|
|
1033
444
|
RUN_CONFIG_ONLY = "Only this run configuration is used. Undefined options remain undefined.",
|
|
1034
445
|
INTERACTION_CONFIG_ONLY = "Only interaction configuration is used."
|
|
1035
446
|
}
|
|
1036
447
|
export declare const ConfigModesOptions: Record<ConfigModes, ConfigModesDescription>;
|
|
1037
|
-
export
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
/** Per-run HTTP timeouts for upstream LLM-provider calls. */
|
|
1050
|
-
http_timeout?: HttpTimeoutOptions;
|
|
1051
|
-
}
|
|
1052
|
-
export interface GenerateInteractionPayload {
|
|
1053
|
-
description: string;
|
|
1054
|
-
config: InteractionExecutionConfiguration;
|
|
1055
|
-
}
|
|
1056
|
-
export interface GenerateTestDataPayload {
|
|
1057
|
-
message?: string;
|
|
1058
|
-
count?: number;
|
|
1059
|
-
config: InteractionExecutionConfiguration;
|
|
1060
|
-
}
|
|
1061
|
-
export interface GeneratedTestDataRecord {
|
|
1062
|
-
[key: string]: unknown;
|
|
1063
|
-
}
|
|
1064
|
-
export interface ImprovePromptPayloadConfig {
|
|
1065
|
-
config: InteractionExecutionConfiguration;
|
|
1066
|
-
}
|
|
1067
|
-
export interface ImprovePromptPayload extends ImprovePromptPayloadConfig {
|
|
1068
|
-
interaction_name: string;
|
|
1069
|
-
context?: string;
|
|
1070
|
-
prompt: {
|
|
1071
|
-
name: string;
|
|
1072
|
-
content: string;
|
|
1073
|
-
}[];
|
|
1074
|
-
result_schema?: JSONSchema;
|
|
1075
|
-
}
|
|
1076
|
-
export interface GeneratedInteractionPromptTemplate {
|
|
1077
|
-
role: 'safety' | 'system' | 'user';
|
|
1078
|
-
name: string;
|
|
1079
|
-
content: string;
|
|
1080
|
-
content_type: 'jst';
|
|
1081
|
-
inputSchema: JSONSchema;
|
|
1082
|
-
}
|
|
1083
|
-
export interface GeneratedInteractionPromptSegment {
|
|
1084
|
-
type: 'template';
|
|
1085
|
-
template: GeneratedInteractionPromptTemplate;
|
|
1086
|
-
}
|
|
1087
|
-
export interface GeneratedInteractionDefinition {
|
|
1088
|
-
name: string;
|
|
1089
|
-
description: string;
|
|
1090
|
-
temperature: number;
|
|
1091
|
-
prompts: GeneratedInteractionPromptSegment[];
|
|
1092
|
-
max_tokens?: number;
|
|
1093
|
-
result_schema: JSONSchema;
|
|
1094
|
-
tags: Array<'generated' | 'agent'>;
|
|
1095
|
-
}
|
|
1096
|
-
export interface PromptImprovementResponse {
|
|
1097
|
-
result: CompletionResult[];
|
|
1098
|
-
}
|
|
1099
|
-
export interface RateLimitRequestPayload {
|
|
1100
|
-
interaction: string;
|
|
1101
|
-
environment_id?: string;
|
|
1102
|
-
model_id?: string;
|
|
1103
|
-
workflow_run_id?: string;
|
|
1104
|
-
modalities?: PromptModalities;
|
|
1105
|
-
}
|
|
1106
|
-
export interface RateLimitRequestResponse {
|
|
1107
|
-
delay_ms: number;
|
|
1108
|
-
}
|
|
448
|
+
export type InteractionExecutionConfiguration = z.infer<typeof InteractionExecutionConfigurationSchema>;
|
|
449
|
+
export type GenerateInteractionPayload = z.infer<typeof GenerateInteractionPayloadSchema>;
|
|
450
|
+
export type GenerateTestDataPayload = z.infer<typeof GenerateTestDataPayloadSchema>;
|
|
451
|
+
export type GeneratedTestDataRecord = z.infer<typeof GeneratedTestDataRecordSchema>;
|
|
452
|
+
export type ImprovePromptPayloadConfig = z.infer<typeof ImprovePromptPayloadConfigSchema>;
|
|
453
|
+
export type ImprovePromptPayload = z.infer<typeof ImprovePromptPayloadSchema>;
|
|
454
|
+
export type GeneratedInteractionPromptTemplate = z.infer<typeof GeneratedInteractionPromptTemplateSchema>;
|
|
455
|
+
export type GeneratedInteractionPromptSegment = z.infer<typeof GeneratedInteractionPromptSegmentSchema>;
|
|
456
|
+
export type GeneratedInteractionDefinition = z.infer<typeof GeneratedInteractionDefinitionSchema>;
|
|
457
|
+
export type PromptImprovementResponse = z.infer<typeof PromptImprovementResponseSchema>;
|
|
458
|
+
export type RateLimitRequestPayload = z.infer<typeof RateLimitRequestPayloadSchema>;
|
|
459
|
+
export type RateLimitRequestResponse = z.infer<typeof RateLimitRequestResponseSchema>;
|
|
1109
460
|
/**
|
|
1110
461
|
* Source of the resolved model configuration
|
|
1111
462
|
*/
|
|
@@ -1128,58 +479,17 @@ export declare enum ModelSource {
|
|
|
1128
479
|
/**
|
|
1129
480
|
* Resolved environment information
|
|
1130
481
|
*/
|
|
1131
|
-
export
|
|
1132
|
-
id: string;
|
|
1133
|
-
name: string;
|
|
1134
|
-
provider: string;
|
|
1135
|
-
}
|
|
482
|
+
export type ResolvedEnvironmentInfo = z.infer<typeof ResolvedEnvironmentInfoSchema>;
|
|
1136
483
|
/**
|
|
1137
484
|
* Resolved runtime configuration for an interaction
|
|
1138
485
|
*/
|
|
1139
|
-
export
|
|
1140
|
-
environment: ResolvedEnvironmentInfo;
|
|
1141
|
-
model?: string;
|
|
1142
|
-
model_source: ModelSource;
|
|
1143
|
-
}
|
|
486
|
+
export type ResolvedRuntimeConfig = z.infer<typeof ResolvedRuntimeConfigSchema>;
|
|
1144
487
|
/**
|
|
1145
488
|
* Resolved execution info for an interaction.
|
|
1146
489
|
* Contains the interaction ID, basic metadata, and the resolved runtime configuration
|
|
1147
490
|
* (environment, model) that would be used at execution time.
|
|
1148
491
|
*/
|
|
1149
|
-
export
|
|
1150
|
-
/**
|
|
1151
|
-
* The resolved interaction ID
|
|
1152
|
-
*/
|
|
1153
|
-
id: string;
|
|
1154
|
-
/**
|
|
1155
|
-
* The interaction endpoint name
|
|
1156
|
-
*/
|
|
1157
|
-
name: string;
|
|
1158
|
-
/**
|
|
1159
|
-
* The interaction version number
|
|
1160
|
-
*/
|
|
1161
|
-
version: number;
|
|
1162
|
-
/**
|
|
1163
|
-
* The interaction status (draft or published)
|
|
1164
|
-
*/
|
|
1165
|
-
status: InteractionStatus;
|
|
1166
|
-
/**
|
|
1167
|
-
* The interaction tags (can include version tags like "production", "staging")
|
|
1168
|
-
*/
|
|
1169
|
-
tags: string[];
|
|
1170
|
-
/**
|
|
1171
|
-
* Agent runner configuration (tool_names opt-ins, is_agent, is_tool, etc.).
|
|
1172
|
-
* Included on resolve so non-UI callers (worker activities) can pick up the
|
|
1173
|
-
* interaction's defaults without a second retrieve round-trip — and so
|
|
1174
|
-
* in-code interactions (sys:, app:) which have no Mongo document work the
|
|
1175
|
-
* same as stored ones.
|
|
1176
|
-
*/
|
|
1177
|
-
agent_runner_options?: AgentRunnerOptions;
|
|
1178
|
-
/**
|
|
1179
|
-
* The resolved runtime configuration
|
|
1180
|
-
*/
|
|
1181
|
-
resolved: ResolvedRuntimeConfig;
|
|
1182
|
-
}
|
|
492
|
+
export type ResolvedInteractionExecutionInfo = z.infer<typeof ResolvedInteractionExecutionInfoSchema>;
|
|
1183
493
|
/**
|
|
1184
494
|
* A builtin tool definition from the tools catalog
|
|
1185
495
|
*/
|