@vertesia/common 1.2.0 → 1.4.0-dev.20260614.160504Z
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/LICENSE +198 -10
- package/lib/{types/Progress.d.ts → Progress.d.ts} +1 -0
- package/lib/Progress.d.ts.map +1 -0
- package/lib/{esm/Progress.js → Progress.js} +2 -2
- package/lib/Progress.js.map +1 -0
- package/lib/access-control.d.ts +144 -0
- package/lib/access-control.d.ts.map +1 -0
- package/lib/{esm/access-control.js → access-control.js} +35 -0
- package/lib/access-control.js.map +1 -0
- package/lib/agent-request-template.d.ts +4 -0
- package/lib/agent-request-template.d.ts.map +1 -0
- package/lib/agent-request-template.js +46 -0
- package/lib/agent-request-template.js.map +1 -0
- package/lib/{types/analytics.d.ts → analytics.d.ts} +3 -2
- package/lib/analytics.d.ts.map +1 -0
- package/lib/{cjs/analytics.js.map → analytics.js.map} +1 -1
- package/lib/{types/apikey.d.ts → apikey.d.ts} +34 -4
- package/lib/apikey.d.ts.map +1 -0
- package/lib/{esm/apikey.js → apikey.js} +1 -0
- package/lib/apikey.js.map +1 -0
- package/lib/{types/apps.d.ts → apps.d.ts} +430 -35
- package/lib/apps.d.ts.map +1 -0
- package/lib/apps.js +158 -0
- package/lib/apps.js.map +1 -0
- package/lib/{types/ask-user.d.ts → ask-user.d.ts} +1 -0
- package/lib/ask-user.d.ts.map +1 -0
- package/lib/{esm/ask-user.js.map → ask-user.js.map} +1 -1
- package/lib/{types/audit-trail.d.ts → audit-trail.d.ts} +2 -1
- package/lib/audit-trail.d.ts.map +1 -0
- package/lib/audit-trail.js +3 -0
- package/lib/audit-trail.js.map +1 -0
- package/lib/browser-credentials.d.ts +123 -0
- package/lib/browser-credentials.d.ts.map +1 -0
- package/lib/browser-credentials.js +2 -0
- package/lib/browser-credentials.js.map +1 -0
- package/lib/{types/channels.d.ts → channels.d.ts} +3 -2
- package/lib/channels.d.ts.map +1 -0
- package/lib/{esm/channels.js → channels.js} +3 -3
- package/lib/channels.js.map +1 -0
- package/lib/{types/common.d.ts → common.d.ts} +18 -10
- package/lib/common.d.ts.map +1 -0
- package/lib/common.js.map +1 -0
- package/lib/{types/cost-analytics.d.ts → cost-analytics.d.ts} +2 -3
- package/lib/cost-analytics.d.ts.map +1 -0
- package/lib/cost-analytics.js.map +1 -0
- package/lib/{types/data-platform.d.ts → data-platform.d.ts} +134 -7
- package/lib/data-platform.d.ts.map +1 -0
- package/lib/data-platform.js.map +1 -0
- package/lib/{types/email.d.ts → email.d.ts} +6 -2
- package/lib/email.d.ts.map +1 -0
- package/lib/{esm/email.js → email.js} +2 -2
- package/lib/email.js.map +1 -0
- package/lib/embeddings.d.ts +65 -0
- package/lib/embeddings.d.ts.map +1 -0
- package/lib/embeddings.js +2 -0
- package/lib/embeddings.js.map +1 -0
- package/lib/{types/environment.d.ts → environment.d.ts} +19 -5
- package/lib/environment.d.ts.map +1 -0
- package/lib/{esm/environment.js → environment.js} +17 -7
- package/lib/environment.js.map +1 -0
- package/lib/{types/facets.d.ts → facets.d.ts} +6 -5
- package/lib/facets.d.ts.map +1 -0
- package/lib/facets.js.map +1 -0
- package/lib/{types/group.d.ts → group.d.ts} +15 -2
- package/lib/group.d.ts.map +1 -0
- package/lib/group.js +3 -0
- package/lib/group.js.map +1 -0
- package/lib/host-utils.d.ts +8 -0
- package/lib/host-utils.d.ts.map +1 -0
- package/lib/host-utils.js +84 -0
- package/lib/host-utils.js.map +1 -0
- package/lib/{types/index.d.ts → index.d.ts} +19 -10
- package/lib/index.d.ts.map +1 -0
- package/lib/{esm/index.js → index.js} +18 -10
- package/lib/index.js.map +1 -0
- package/lib/integrations.d.ts +151 -0
- package/lib/integrations.d.ts.map +1 -0
- package/lib/{esm/integrations.js → integrations.js} +6 -0
- package/lib/integrations.js.map +1 -0
- package/lib/{types/interaction.d.ts → interaction.d.ts} +99 -56
- package/lib/interaction.d.ts.map +1 -0
- package/lib/{esm/interaction.js → interaction.js} +3 -3
- package/lib/interaction.js.map +1 -0
- package/lib/json-schema.d.ts +2 -0
- package/lib/json-schema.d.ts.map +1 -0
- package/lib/{cjs/json-schema.js.map → json-schema.js.map} +1 -1
- package/lib/json.d.ts +2 -0
- package/lib/json.d.ts.map +1 -0
- package/lib/json.js.map +1 -0
- package/lib/{types/meters.d.ts → meters.d.ts} +2 -1
- package/lib/meters.d.ts.map +1 -0
- package/lib/meters.js.map +1 -0
- package/lib/model_utility.d.ts +2 -0
- package/lib/model_utility.d.ts.map +1 -0
- package/lib/model_utility.js +2 -0
- package/lib/model_utility.js.map +1 -0
- package/lib/oauth-scopes.d.ts +18 -0
- package/lib/oauth-scopes.d.ts.map +1 -0
- package/lib/oauth-scopes.js +57 -0
- package/lib/oauth-scopes.js.map +1 -0
- package/lib/{types/oauth-server.d.ts → oauth-server.d.ts} +64 -4
- package/lib/oauth-server.d.ts.map +1 -0
- package/lib/{cjs/oauth-server.js.map → oauth-server.js.map} +1 -1
- package/lib/{types/oauth.d.ts → oauth.d.ts} +1 -0
- package/lib/oauth.d.ts.map +1 -0
- package/lib/oauth.js.map +1 -0
- package/lib/{types/payload.d.ts → payload.d.ts} +5 -4
- package/lib/payload.d.ts.map +1 -0
- package/lib/{cjs/payload.js.map → payload.js.map} +1 -1
- package/lib/{types/pending-asks.d.ts → pending-asks.d.ts} +8 -1
- package/lib/pending-asks.d.ts.map +1 -0
- package/lib/pending-asks.js.map +1 -0
- package/lib/principal-context.d.ts +27 -0
- package/lib/principal-context.d.ts.map +1 -0
- package/lib/principal-context.js +2 -0
- package/lib/principal-context.js.map +1 -0
- package/lib/{types/project.d.ts → project.d.ts} +278 -49
- package/lib/project.d.ts.map +1 -0
- package/lib/project.js +230 -0
- package/lib/project.js.map +1 -0
- package/lib/{types/prompt.d.ts → prompt.d.ts} +16 -9
- package/lib/prompt.d.ts.map +1 -0
- package/lib/prompt.js.map +1 -0
- package/lib/{types/query.d.ts → query.d.ts} +11 -8
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js.map +1 -0
- package/lib/{types/rate-limiter.d.ts → rate-limiter.d.ts} +1 -0
- package/lib/rate-limiter.d.ts.map +1 -0
- package/lib/rate-limiter.js.map +1 -0
- package/lib/{types/refs.d.ts → refs.d.ts} +1 -0
- package/lib/refs.d.ts.map +1 -0
- package/lib/refs.js.map +1 -0
- package/lib/roles.d.ts +19 -0
- package/lib/roles.d.ts.map +1 -0
- package/lib/roles.js +228 -0
- package/lib/roles.js.map +1 -0
- package/lib/{types/runs.d.ts → runs.d.ts} +3 -2
- package/lib/runs.d.ts.map +1 -0
- package/lib/runs.js.map +1 -0
- package/lib/secrets.d.ts +47 -0
- package/lib/secrets.d.ts.map +1 -0
- package/lib/secrets.js +2 -0
- package/lib/secrets.js.map +1 -0
- package/lib/{types/skill.d.ts → skill.d.ts} +2 -1
- package/lib/skill.d.ts.map +1 -0
- package/lib/skill.js.map +1 -0
- package/lib/{types/store → store}/activity-catalog.d.ts +2 -1
- package/lib/store/activity-catalog.d.ts.map +1 -0
- package/lib/store/activity-catalog.js.map +1 -0
- package/lib/{types/store → store}/agent-run.d.ts +206 -35
- package/lib/store/agent-run.d.ts.map +1 -0
- package/lib/store/agent-run.js.map +1 -0
- package/lib/{types/store → store}/collections.d.ts +18 -9
- package/lib/store/collections.d.ts.map +1 -0
- package/lib/store/collections.js.map +1 -0
- package/lib/{types/store → store}/common.d.ts +1 -0
- package/lib/store/common.d.ts.map +1 -0
- package/lib/{cjs → store}/common.js.map +1 -1
- package/lib/{types/store → store}/conversation-state.d.ts +36 -5
- package/lib/store/conversation-state.d.ts.map +1 -0
- package/lib/{esm/store → store}/conversation-state.js +3 -0
- package/lib/store/conversation-state.js.map +1 -0
- package/lib/{types/store → store}/doc-analyzer.d.ts +20 -14
- package/lib/store/doc-analyzer.d.ts.map +1 -0
- package/lib/{cjs/store → store}/doc-analyzer.js.map +1 -1
- package/lib/{types/store → store}/dsl-workflow.d.ts +42 -24
- package/lib/store/dsl-workflow.d.ts.map +1 -0
- package/lib/store/dsl-workflow.js +8 -0
- package/lib/store/dsl-workflow.js.map +1 -0
- package/lib/{types/store → store}/hive-memory.d.ts +2 -1
- package/lib/store/hive-memory.d.ts.map +1 -0
- package/lib/{cjs/store → store}/hive-memory.js.map +1 -1
- package/lib/store/index.d.ts +20 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +20 -0
- package/lib/store/index.js.map +1 -0
- package/lib/{types/store → store}/object-types.d.ts +2 -1
- package/lib/store/object-types.d.ts.map +1 -0
- package/lib/store/object-types.js +95 -0
- package/lib/store/object-types.js.map +1 -0
- package/lib/store/process-schema.d.ts +481 -0
- package/lib/store/process-schema.d.ts.map +1 -0
- package/lib/store/process-schema.js +482 -0
- package/lib/store/process-schema.js.map +1 -0
- package/lib/store/process-validation.d.ts +17 -0
- package/lib/store/process-validation.d.ts.map +1 -0
- package/lib/store/process-validation.js +428 -0
- package/lib/store/process-validation.js.map +1 -0
- package/lib/store/process.d.ts +261 -0
- package/lib/store/process.d.ts.map +1 -0
- package/lib/store/process.js +2 -0
- package/lib/store/process.js.map +1 -0
- package/lib/{types/store → store}/rendering.d.ts +5 -4
- package/lib/store/rendering.d.ts.map +1 -0
- package/lib/{esm/store → store}/rendering.js +6 -6
- package/lib/store/rendering.js.map +1 -0
- package/lib/{types/store → store}/schedule.d.ts +4 -3
- package/lib/store/schedule.d.ts.map +1 -0
- package/lib/store/schedule.js.map +1 -0
- package/lib/{types/store → store}/signals.d.ts +2 -1
- package/lib/store/signals.d.ts.map +1 -0
- package/lib/{cjs/store → store}/signals.js.map +1 -1
- package/lib/{types/store → store}/store.d.ts +67 -38
- package/lib/store/store.d.ts.map +1 -0
- package/lib/{esm/store → store}/store.js +17 -8
- package/lib/store/store.js.map +1 -0
- package/lib/store/task.d.ts +63 -0
- package/lib/store/task.d.ts.map +1 -0
- package/lib/store/task.js +5 -0
- package/lib/store/task.js.map +1 -0
- package/lib/store/temporalio.d.ts +17 -0
- package/lib/store/temporalio.d.ts.map +1 -0
- package/lib/{esm/store → store}/temporalio.js +6 -6
- package/lib/store/temporalio.js.map +1 -0
- package/lib/{types/store → store}/workflow.d.ts +87 -33
- package/lib/store/workflow.d.ts.map +1 -0
- package/lib/{esm/store → store}/workflow.js +36 -37
- package/lib/store/workflow.js.map +1 -0
- package/lib/{types/sts-token-types.d.ts → sts-token-types.d.ts} +29 -2
- package/lib/sts-token-types.d.ts.map +1 -0
- package/lib/{esm/sts-token-types.js → sts-token-types.js} +0 -4
- package/lib/sts-token-types.js.map +1 -0
- package/lib/{types/tenant.d.ts → tenant.d.ts} +1 -0
- package/lib/tenant.d.ts.map +1 -0
- package/lib/tenant.js.map +1 -0
- package/lib/{types/tool-execution.d.ts → tool-execution.d.ts} +3 -2
- package/lib/tool-execution.d.ts.map +1 -0
- package/lib/tool-execution.js.map +1 -0
- package/lib/tools.d.ts +101 -0
- package/lib/tools.d.ts.map +1 -0
- package/lib/tools.js +2 -0
- package/lib/tools.js.map +1 -0
- package/lib/{types/training.d.ts → training.d.ts} +10 -9
- package/lib/training.d.ts.map +1 -0
- package/lib/training.js.map +1 -0
- package/lib/{types/transient-tokens.d.ts → transient-tokens.d.ts} +3 -2
- package/lib/transient-tokens.d.ts.map +1 -0
- package/lib/transient-tokens.js.map +1 -0
- package/lib/{types/user.d.ts → user.d.ts} +13 -7
- package/lib/user.d.ts.map +1 -0
- package/lib/{esm/user.js → user.js} +2 -2
- package/lib/user.js.map +1 -0
- package/lib/{types/utils → utils}/auth.d.ts +2 -1
- package/lib/utils/auth.d.ts.map +1 -0
- package/lib/{esm/utils → utils}/auth.js +1 -1
- package/lib/utils/auth.js.map +1 -0
- package/lib/{types/utils → utils}/schemas.d.ts +5 -4
- package/lib/utils/schemas.d.ts.map +1 -0
- package/lib/{esm/utils → utils}/schemas.js +24 -22
- package/lib/utils/schemas.js.map +1 -0
- package/lib/{types/utils → utils}/type-helpers.d.ts +1 -0
- package/lib/utils/type-helpers.d.ts.map +1 -0
- package/lib/{cjs/utils → utils}/type-helpers.js.map +1 -1
- package/lib/{types/versions.d.ts → versions.d.ts} +1 -0
- package/lib/versions.d.ts.map +1 -0
- package/lib/versions.js.map +1 -0
- package/lib/vertesia-common.js +1 -1
- package/lib/vertesia-common.js.map +1 -1
- package/lib/{types/workflow-analytics.d.ts → workflow-analytics.d.ts} +10 -3
- package/lib/workflow-analytics.d.ts.map +1 -0
- package/lib/workflow-analytics.js.map +1 -0
- package/package.json +20 -20
- package/src/Progress.ts +9 -7
- package/src/access-control.ts +124 -55
- package/src/agent-request-template.test.ts +40 -0
- package/src/agent-request-template.ts +45 -0
- package/src/analytics.ts +11 -16
- package/src/apikey.ts +43 -11
- package/src/apps.test.ts +37 -0
- package/src/apps.ts +562 -78
- package/src/audit-trail.ts +3 -5
- package/src/browser-credentials.ts +133 -0
- package/src/channels.ts +5 -5
- package/src/common.ts +17 -11
- package/src/cost-analytics.ts +10 -4
- package/src/data-platform.ts +142 -7
- package/src/email.ts +7 -4
- package/src/embeddings.ts +76 -0
- package/src/environment.ts +44 -25
- package/src/facets.ts +19 -21
- package/src/group.ts +14 -3
- package/src/host-utils.test.ts +61 -0
- package/src/host-utils.ts +93 -0
- package/src/index.ts +18 -10
- package/src/integrations.ts +134 -26
- package/src/interaction.ts +185 -141
- package/src/json-schema.ts +1 -1
- package/src/json.ts +6 -3
- package/src/meters.ts +6 -9
- package/src/model_utility.ts +1 -1
- package/src/oauth-scopes.ts +72 -0
- package/src/oauth-server.ts +80 -5
- package/src/payload.ts +6 -6
- package/src/pending-asks.ts +8 -1
- package/src/principal-context.ts +27 -0
- package/src/project.ts +408 -101
- package/src/prompt.ts +30 -27
- package/src/query.ts +19 -17
- package/src/rate-limiter.ts +1 -1
- package/src/refs.ts +19 -24
- package/src/roles.test.ts +30 -0
- package/src/roles.ts +251 -0
- package/src/runs.ts +14 -15
- package/src/secrets.ts +60 -0
- package/src/skill.ts +1 -2
- package/src/store/activity-catalog.ts +13 -1
- package/src/store/agent-run.ts +269 -42
- package/src/store/collections.ts +21 -13
- package/src/store/common.ts +1 -2
- package/src/store/conversation-state.ts +42 -5
- package/src/store/doc-analyzer.ts +22 -14
- package/src/store/dsl-workflow.ts +54 -29
- package/src/store/hive-memory.ts +10 -10
- package/src/store/index.ts +19 -17
- package/src/store/ms.d.ts +34 -3
- package/src/store/object-types.ts +75 -79
- package/src/store/process-schema.test.ts +106 -0
- package/src/store/process-schema.ts +485 -0
- package/src/store/process-validation.test.ts +432 -0
- package/src/store/process-validation.ts +548 -0
- package/src/store/process.ts +305 -0
- package/src/store/rendering.ts +12 -12
- package/src/store/schedule.ts +3 -3
- package/src/store/signals.ts +1 -1
- package/src/store/store.ts +119 -89
- package/src/store/task.ts +71 -0
- package/src/store/temporalio.ts +14 -14
- package/src/store/workflow.test.ts +16 -14
- package/src/store/workflow.ts +177 -119
- package/src/sts-token-types.ts +30 -4
- package/src/tool-execution.ts +2 -2
- package/src/tools.ts +103 -0
- package/src/training.ts +25 -27
- package/src/transient-tokens.ts +4 -7
- package/src/user.ts +25 -35
- package/src/utils/auth.ts +2 -2
- package/src/utils/schemas.ts +36 -31
- package/src/utils/type-helpers.ts +2 -4
- package/src/workflow-analytics.ts +15 -18
- package/lib/cjs/Progress.js +0 -61
- package/lib/cjs/Progress.js.map +0 -1
- package/lib/cjs/access-control.js +0 -58
- package/lib/cjs/access-control.js.map +0 -1
- package/lib/cjs/analytics.js +0 -3
- package/lib/cjs/apikey.js +0 -17
- package/lib/cjs/apikey.js.map +0 -1
- package/lib/cjs/apps.js +0 -89
- package/lib/cjs/apps.js.map +0 -1
- package/lib/cjs/ask-user.js +0 -8
- package/lib/cjs/ask-user.js.map +0 -1
- package/lib/cjs/audit-trail.js +0 -10
- package/lib/cjs/audit-trail.js.map +0 -1
- package/lib/cjs/channels.js +0 -63
- package/lib/cjs/channels.js.map +0 -1
- package/lib/cjs/common.js +0 -3
- package/lib/cjs/cost-analytics.js +0 -13
- package/lib/cjs/cost-analytics.js.map +0 -1
- package/lib/cjs/data-platform.js +0 -127
- package/lib/cjs/data-platform.js.map +0 -1
- package/lib/cjs/email.js +0 -20
- package/lib/cjs/email.js.map +0 -1
- package/lib/cjs/environment.js +0 -44
- package/lib/cjs/environment.js.map +0 -1
- package/lib/cjs/facets.js +0 -3
- package/lib/cjs/facets.js.map +0 -1
- package/lib/cjs/group.js +0 -6
- package/lib/cjs/group.js.map +0 -1
- package/lib/cjs/index.js +0 -60
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/integrations.js +0 -16
- package/lib/cjs/integrations.js.map +0 -1
- package/lib/cjs/interaction.js +0 -101
- package/lib/cjs/interaction.js.map +0 -1
- package/lib/cjs/json-schema.js +0 -3
- package/lib/cjs/json.js +0 -3
- package/lib/cjs/json.js.map +0 -1
- package/lib/cjs/meters.js +0 -13
- package/lib/cjs/meters.js.map +0 -1
- package/lib/cjs/model_utility.js +0 -6
- package/lib/cjs/model_utility.js.map +0 -1
- package/lib/cjs/oauth-server.js +0 -3
- package/lib/cjs/oauth.js +0 -7
- package/lib/cjs/oauth.js.map +0 -1
- package/lib/cjs/openapi.js +0 -3
- package/lib/cjs/openapi.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/payload.js +0 -3
- package/lib/cjs/pending-asks.js +0 -7
- package/lib/cjs/pending-asks.js.map +0 -1
- package/lib/cjs/project.js +0 -143
- package/lib/cjs/project.js.map +0 -1
- package/lib/cjs/prompt.js +0 -21
- package/lib/cjs/prompt.js.map +0 -1
- package/lib/cjs/query.js +0 -3
- package/lib/cjs/query.js.map +0 -1
- package/lib/cjs/rate-limiter.js +0 -6
- package/lib/cjs/rate-limiter.js.map +0 -1
- package/lib/cjs/refs.js +0 -14
- package/lib/cjs/refs.js.map +0 -1
- package/lib/cjs/runs.js +0 -3
- package/lib/cjs/runs.js.map +0 -1
- package/lib/cjs/skill.js +0 -14
- package/lib/cjs/skill.js.map +0 -1
- package/lib/cjs/store/activity-catalog.js +0 -3
- package/lib/cjs/store/activity-catalog.js.map +0 -1
- package/lib/cjs/store/agent-run.js +0 -16
- package/lib/cjs/store/agent-run.js.map +0 -1
- package/lib/cjs/store/collections.js +0 -9
- package/lib/cjs/store/collections.js.map +0 -1
- package/lib/cjs/store/common.js +0 -3
- package/lib/cjs/store/common.js.map +0 -1
- package/lib/cjs/store/conversation-state.js +0 -19
- package/lib/cjs/store/conversation-state.js.map +0 -1
- package/lib/cjs/store/doc-analyzer.js +0 -3
- package/lib/cjs/store/dsl-workflow.js +0 -5
- package/lib/cjs/store/dsl-workflow.js.map +0 -1
- package/lib/cjs/store/hive-memory.js +0 -3
- package/lib/cjs/store/index.js +0 -33
- package/lib/cjs/store/index.js.map +0 -1
- package/lib/cjs/store/object-types.js +0 -98
- package/lib/cjs/store/object-types.js.map +0 -1
- package/lib/cjs/store/rendering.js +0 -26
- package/lib/cjs/store/rendering.js.map +0 -1
- package/lib/cjs/store/schedule.js +0 -32
- package/lib/cjs/store/schedule.js.map +0 -1
- package/lib/cjs/store/signals.js +0 -3
- package/lib/cjs/store/store.js +0 -182
- package/lib/cjs/store/store.js.map +0 -1
- package/lib/cjs/store/temporalio.js +0 -44
- package/lib/cjs/store/temporalio.js.map +0 -1
- package/lib/cjs/store/worker.js +0 -3
- package/lib/cjs/store/worker.js.map +0 -1
- package/lib/cjs/store/workflow.js +0 -306
- package/lib/cjs/store/workflow.js.map +0 -1
- package/lib/cjs/sts-token-types.js +0 -32
- package/lib/cjs/sts-token-types.js.map +0 -1
- package/lib/cjs/tenant.js +0 -3
- package/lib/cjs/tenant.js.map +0 -1
- package/lib/cjs/tool-execution.js +0 -6
- package/lib/cjs/tool-execution.js.map +0 -1
- package/lib/cjs/training.js +0 -14
- package/lib/cjs/training.js.map +0 -1
- package/lib/cjs/transient-tokens.js +0 -9
- package/lib/cjs/transient-tokens.js.map +0 -1
- package/lib/cjs/user.js +0 -26
- package/lib/cjs/user.js.map +0 -1
- package/lib/cjs/utils/auth.js +0 -15
- package/lib/cjs/utils/auth.js.map +0 -1
- package/lib/cjs/utils/schemas.js +0 -182
- package/lib/cjs/utils/schemas.js.map +0 -1
- package/lib/cjs/utils/type-helpers.js +0 -3
- package/lib/cjs/versions.js +0 -10
- package/lib/cjs/versions.js.map +0 -1
- package/lib/cjs/workflow-analytics.js +0 -52
- package/lib/cjs/workflow-analytics.js.map +0 -1
- package/lib/esm/Progress.js.map +0 -1
- package/lib/esm/access-control.js.map +0 -1
- package/lib/esm/analytics.js.map +0 -1
- package/lib/esm/apikey.js.map +0 -1
- package/lib/esm/apps.js +0 -79
- package/lib/esm/apps.js.map +0 -1
- package/lib/esm/audit-trail.js +0 -7
- package/lib/esm/audit-trail.js.map +0 -1
- package/lib/esm/channels.js.map +0 -1
- package/lib/esm/common.js.map +0 -1
- package/lib/esm/cost-analytics.js.map +0 -1
- package/lib/esm/data-platform.js.map +0 -1
- package/lib/esm/email.js.map +0 -1
- package/lib/esm/environment.js.map +0 -1
- package/lib/esm/facets.js.map +0 -1
- package/lib/esm/group.js +0 -3
- package/lib/esm/group.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/integrations.js.map +0 -1
- package/lib/esm/interaction.js.map +0 -1
- package/lib/esm/json-schema.js.map +0 -1
- package/lib/esm/json.js.map +0 -1
- package/lib/esm/meters.js.map +0 -1
- package/lib/esm/model_utility.js +0 -2
- package/lib/esm/model_utility.js.map +0 -1
- package/lib/esm/oauth-server.js.map +0 -1
- package/lib/esm/oauth.js.map +0 -1
- package/lib/esm/openapi.js +0 -2
- package/lib/esm/openapi.js.map +0 -1
- package/lib/esm/payload.js.map +0 -1
- package/lib/esm/pending-asks.js.map +0 -1
- package/lib/esm/project.js +0 -138
- package/lib/esm/project.js.map +0 -1
- package/lib/esm/prompt.js.map +0 -1
- package/lib/esm/query.js.map +0 -1
- package/lib/esm/rate-limiter.js.map +0 -1
- package/lib/esm/refs.js.map +0 -1
- package/lib/esm/runs.js.map +0 -1
- package/lib/esm/skill.js.map +0 -1
- package/lib/esm/store/activity-catalog.js.map +0 -1
- package/lib/esm/store/agent-run.js.map +0 -1
- package/lib/esm/store/collections.js.map +0 -1
- package/lib/esm/store/common.js.map +0 -1
- package/lib/esm/store/conversation-state.js.map +0 -1
- package/lib/esm/store/doc-analyzer.js.map +0 -1
- package/lib/esm/store/dsl-workflow.js +0 -2
- package/lib/esm/store/dsl-workflow.js.map +0 -1
- package/lib/esm/store/hive-memory.js.map +0 -1
- package/lib/esm/store/index.js +0 -17
- package/lib/esm/store/index.js.map +0 -1
- package/lib/esm/store/object-types.js +0 -95
- package/lib/esm/store/object-types.js.map +0 -1
- package/lib/esm/store/rendering.js.map +0 -1
- package/lib/esm/store/schedule.js.map +0 -1
- package/lib/esm/store/signals.js.map +0 -1
- package/lib/esm/store/store.js.map +0 -1
- package/lib/esm/store/temporalio.js.map +0 -1
- package/lib/esm/store/worker.js +0 -2
- package/lib/esm/store/worker.js.map +0 -1
- package/lib/esm/store/workflow.js.map +0 -1
- package/lib/esm/sts-token-types.js.map +0 -1
- package/lib/esm/tenant.js.map +0 -1
- package/lib/esm/tool-execution.js.map +0 -1
- package/lib/esm/training.js.map +0 -1
- package/lib/esm/transient-tokens.js.map +0 -1
- package/lib/esm/user.js.map +0 -1
- package/lib/esm/utils/auth.js.map +0 -1
- package/lib/esm/utils/schemas.js.map +0 -1
- package/lib/esm/utils/type-helpers.js.map +0 -1
- package/lib/esm/versions.js.map +0 -1
- package/lib/esm/workflow-analytics.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/Progress.d.ts.map +0 -1
- package/lib/types/access-control.d.ts +0 -79
- package/lib/types/access-control.d.ts.map +0 -1
- package/lib/types/analytics.d.ts.map +0 -1
- package/lib/types/apikey.d.ts.map +0 -1
- package/lib/types/apps.d.ts.map +0 -1
- package/lib/types/ask-user.d.ts.map +0 -1
- package/lib/types/audit-trail.d.ts.map +0 -1
- package/lib/types/channels.d.ts.map +0 -1
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/cost-analytics.d.ts.map +0 -1
- package/lib/types/data-platform.d.ts.map +0 -1
- package/lib/types/email.d.ts.map +0 -1
- package/lib/types/environment.d.ts.map +0 -1
- package/lib/types/facets.d.ts.map +0 -1
- package/lib/types/group.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/integrations.d.ts +0 -83
- package/lib/types/integrations.d.ts.map +0 -1
- package/lib/types/interaction.d.ts.map +0 -1
- package/lib/types/json-schema.d.ts +0 -1
- package/lib/types/json-schema.d.ts.map +0 -1
- package/lib/types/json.d.ts +0 -1
- package/lib/types/json.d.ts.map +0 -1
- package/lib/types/meters.d.ts.map +0 -1
- package/lib/types/model_utility.d.ts +0 -1
- package/lib/types/model_utility.d.ts.map +0 -1
- package/lib/types/oauth-server.d.ts.map +0 -1
- package/lib/types/oauth.d.ts.map +0 -1
- package/lib/types/openapi.d.ts +0 -90
- package/lib/types/openapi.d.ts.map +0 -1
- package/lib/types/payload.d.ts.map +0 -1
- package/lib/types/pending-asks.d.ts.map +0 -1
- package/lib/types/project.d.ts.map +0 -1
- package/lib/types/prompt.d.ts.map +0 -1
- package/lib/types/query.d.ts.map +0 -1
- package/lib/types/rate-limiter.d.ts.map +0 -1
- package/lib/types/refs.d.ts.map +0 -1
- package/lib/types/runs.d.ts.map +0 -1
- package/lib/types/skill.d.ts.map +0 -1
- package/lib/types/store/activity-catalog.d.ts.map +0 -1
- package/lib/types/store/agent-run.d.ts.map +0 -1
- package/lib/types/store/collections.d.ts.map +0 -1
- package/lib/types/store/common.d.ts.map +0 -1
- package/lib/types/store/conversation-state.d.ts.map +0 -1
- package/lib/types/store/doc-analyzer.d.ts.map +0 -1
- package/lib/types/store/dsl-workflow.d.ts.map +0 -1
- package/lib/types/store/hive-memory.d.ts.map +0 -1
- package/lib/types/store/index.d.ts +0 -16
- package/lib/types/store/index.d.ts.map +0 -1
- package/lib/types/store/object-types.d.ts.map +0 -1
- package/lib/types/store/rendering.d.ts.map +0 -1
- package/lib/types/store/schedule.d.ts.map +0 -1
- package/lib/types/store/signals.d.ts.map +0 -1
- package/lib/types/store/store.d.ts.map +0 -1
- package/lib/types/store/temporalio.d.ts +0 -16
- package/lib/types/store/temporalio.d.ts.map +0 -1
- package/lib/types/store/worker.d.ts +0 -18
- package/lib/types/store/worker.d.ts.map +0 -1
- package/lib/types/store/workflow.d.ts.map +0 -1
- package/lib/types/sts-token-types.d.ts.map +0 -1
- package/lib/types/tenant.d.ts.map +0 -1
- package/lib/types/tool-execution.d.ts.map +0 -1
- package/lib/types/training.d.ts.map +0 -1
- package/lib/types/transient-tokens.d.ts.map +0 -1
- package/lib/types/user.d.ts.map +0 -1
- package/lib/types/utils/auth.d.ts.map +0 -1
- package/lib/types/utils/schemas.d.ts.map +0 -1
- package/lib/types/utils/type-helpers.d.ts.map +0 -1
- package/lib/types/versions.d.ts.map +0 -1
- package/lib/types/workflow-analytics.d.ts.map +0 -1
- package/src/openapi.ts +0 -102
- package/src/store/worker.ts +0 -19
- /package/lib/{esm/analytics.js → analytics.js} +0 -0
- /package/lib/{esm/ask-user.js → ask-user.js} +0 -0
- /package/lib/{esm/common.js → common.js} +0 -0
- /package/lib/{esm/cost-analytics.js → cost-analytics.js} +0 -0
- /package/lib/{esm/data-platform.js → data-platform.js} +0 -0
- /package/lib/{esm/facets.js → facets.js} +0 -0
- /package/lib/{esm/json-schema.js → json-schema.js} +0 -0
- /package/lib/{esm/json.js → json.js} +0 -0
- /package/lib/{esm/meters.js → meters.js} +0 -0
- /package/lib/{esm/oauth-server.js → oauth-server.js} +0 -0
- /package/lib/{esm/oauth.js → oauth.js} +0 -0
- /package/lib/{esm/payload.js → payload.js} +0 -0
- /package/lib/{esm/pending-asks.js → pending-asks.js} +0 -0
- /package/lib/{esm/prompt.js → prompt.js} +0 -0
- /package/lib/{esm/query.js → query.js} +0 -0
- /package/lib/{esm/rate-limiter.js → rate-limiter.js} +0 -0
- /package/lib/{esm/refs.js → refs.js} +0 -0
- /package/lib/{esm/runs.js → runs.js} +0 -0
- /package/lib/{esm/skill.js → skill.js} +0 -0
- /package/lib/{esm/store → store}/activity-catalog.js +0 -0
- /package/lib/{esm/store → store}/agent-run.js +0 -0
- /package/lib/{esm/store → store}/collections.js +0 -0
- /package/lib/{esm/store → store}/common.js +0 -0
- /package/lib/{esm/store → store}/doc-analyzer.js +0 -0
- /package/lib/{esm/store → store}/hive-memory.js +0 -0
- /package/lib/{esm/store → store}/schedule.js +0 -0
- /package/lib/{esm/store → store}/signals.js +0 -0
- /package/lib/{esm/tenant.js → tenant.js} +0 -0
- /package/lib/{esm/tool-execution.js → tool-execution.js} +0 -0
- /package/lib/{esm/training.js → training.js} +0 -0
- /package/lib/{esm/transient-tokens.js → transient-tokens.js} +0 -0
- /package/lib/{esm/utils → utils}/type-helpers.js +0 -0
- /package/lib/{esm/versions.js → versions.js} +0 -0
- /package/lib/{esm/workflow-analytics.js → workflow-analytics.js} +0 -0
package/src/interaction.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
CompletionResult,
|
|
3
|
+
ExecutionTokenUsage,
|
|
4
|
+
HttpTimeoutOptions,
|
|
3
5
|
JSONObject,
|
|
4
6
|
JSONSchema,
|
|
5
7
|
Modalities,
|
|
@@ -8,30 +10,29 @@ import type {
|
|
|
8
10
|
StatelessExecutionOptions,
|
|
9
11
|
ToolDefinition,
|
|
10
12
|
ToolUse,
|
|
11
|
-
} from
|
|
12
|
-
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
13
|
+
} from '@llumiverse/common';
|
|
14
|
+
import type { PrincipalType } from './apikey.js';
|
|
15
|
+
import type { MCPToolAnnotations } from './apps.js';
|
|
16
|
+
import type { ExecutionEnvironmentRef } from './environment.js';
|
|
17
|
+
import type { ProjectRef } from './project.js';
|
|
18
|
+
import type {
|
|
18
19
|
ExecutablePromptSegmentDef,
|
|
19
20
|
PopulatedPromptSegmentDef,
|
|
20
21
|
PromptSegmentDef,
|
|
22
|
+
PromptSegmentRef,
|
|
21
23
|
PromptTemplateRef,
|
|
22
24
|
PromptTemplateRefWithSchema,
|
|
23
25
|
TemplateType,
|
|
24
|
-
} from
|
|
25
|
-
import { ExecutionRunDocRef } from
|
|
26
|
-
import { ConversationState } from
|
|
27
|
-
import { AccountRef } from
|
|
28
|
-
import { LlmCallType } from
|
|
29
|
-
import type { MCPToolAnnotations } from "./apps.js";
|
|
26
|
+
} from './prompt.js';
|
|
27
|
+
import type { ExecutionRunDocRef } from './runs.js';
|
|
28
|
+
import type { ConversationState, TextArtifactReference } from './store/conversation-state.js';
|
|
29
|
+
import type { AccountRef } from './user.js';
|
|
30
|
+
import type { LlmCallType } from './workflow-analytics.js';
|
|
30
31
|
|
|
31
32
|
export interface InteractionExecutionError {
|
|
32
33
|
code: string;
|
|
33
34
|
message: string;
|
|
34
|
-
data?:
|
|
35
|
+
data?: unknown;
|
|
35
36
|
retryable?: boolean;
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -67,7 +68,6 @@ export interface ConversationStripOptions {
|
|
|
67
68
|
heartbeats_after_turns?: number;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
|
|
71
71
|
// ------------------ in code interactions -----------------
|
|
72
72
|
/**
|
|
73
73
|
* Reference to an interaction in the catalog.
|
|
@@ -79,7 +79,7 @@ export interface CatalogInteractionRef {
|
|
|
79
79
|
/**
|
|
80
80
|
* The type of interaction
|
|
81
81
|
*/
|
|
82
|
-
type:
|
|
82
|
+
type: 'sys' | 'app' | 'stored' | 'draft';
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* the interaction id that can be used to execute the interaction.
|
|
@@ -150,8 +150,8 @@ export interface ResolveInteractionQuery {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
export interface InCodePrompt {
|
|
153
|
-
role: PromptRole
|
|
154
|
-
content: string
|
|
153
|
+
role: PromptRole;
|
|
154
|
+
content: string;
|
|
155
155
|
content_type: TemplateType;
|
|
156
156
|
schema?: JSONSchema;
|
|
157
157
|
/**
|
|
@@ -168,19 +168,19 @@ export interface InCodeInteraction {
|
|
|
168
168
|
/**
|
|
169
169
|
* The interaction type.
|
|
170
170
|
*/
|
|
171
|
-
type:
|
|
171
|
+
type: 'sys' | 'app' | 'stored' | 'draft';
|
|
172
172
|
|
|
173
173
|
/**
|
|
174
174
|
* The id of the interaction. Required.
|
|
175
175
|
* The id is a unique identifier for the interaction.
|
|
176
|
-
* It is recommended to use a URL safe string and not include spaces.
|
|
177
|
-
* The id
|
|
176
|
+
* It is recommended to use a URL safe string and not include spaces.
|
|
177
|
+
* The id is composed of some namespace or prefix and the interaction name.
|
|
178
178
|
* Example: sys:generic_question, app:review_contract, tmp:my_temp_interaction
|
|
179
179
|
*/
|
|
180
180
|
id: string;
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
|
-
* The interaction code name. Required.
|
|
183
|
+
* The interaction code name. Required.
|
|
184
184
|
* Should be a URL safe string and not include spaces. It is recommended to use kebab-case or camel-case.
|
|
185
185
|
* The endpoints must satisfy the following regexp: /^[a-zA-Z0-9-_]+$/. No whitespaces or special characters are allowed.
|
|
186
186
|
*/
|
|
@@ -213,10 +213,10 @@ export interface InCodeInteraction {
|
|
|
213
213
|
result_schema?: JSONSchema | SchemaRef;
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
|
-
* The modality of the interaction output.
|
|
216
|
+
* The modality of the interaction output.
|
|
217
217
|
* If not specified Modalities.Text is assumed.
|
|
218
218
|
*/
|
|
219
|
-
output_modality?: Modalities
|
|
219
|
+
output_modality?: Modalities;
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
222
|
* How to store the run data for executions of this interaction.
|
|
@@ -243,11 +243,11 @@ export interface InCodeInteraction {
|
|
|
243
243
|
/**
|
|
244
244
|
* The prompts composing the interaction. Required.
|
|
245
245
|
*/
|
|
246
|
-
prompts: InCodePrompt[]
|
|
246
|
+
prompts: InCodePrompt[];
|
|
247
247
|
|
|
248
248
|
/**
|
|
249
249
|
* Optional reference to an external resource if any.
|
|
250
|
-
* Used internally by the system to synchronize stored interactions with in-code interactions.
|
|
250
|
+
* Used internally by the system to synchronize stored interactions with in-code interactions.
|
|
251
251
|
*/
|
|
252
252
|
externalId?: string;
|
|
253
253
|
|
|
@@ -264,7 +264,7 @@ export interface InCodeInteraction {
|
|
|
264
264
|
*/
|
|
265
265
|
runtime?: {
|
|
266
266
|
/**
|
|
267
|
-
* Default target environment for the interaction execution
|
|
267
|
+
* Default target environment for the interaction execution
|
|
268
268
|
*/
|
|
269
269
|
environment?: string;
|
|
270
270
|
|
|
@@ -272,10 +272,9 @@ export interface InCodeInteraction {
|
|
|
272
272
|
* Default (recommended) target model for the interaction execution
|
|
273
273
|
*/
|
|
274
274
|
model?: string;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
export interface InteractionSpec extends Omit<InCodeInteraction, 'id' | 'runtime' | 'type' | 'published' | 'version'> {
|
|
275
|
+
};
|
|
278
276
|
}
|
|
277
|
+
export interface InteractionSpec extends Omit<InCodeInteraction, 'id' | 'runtime' | 'type' | 'published' | 'version'> {}
|
|
279
278
|
// ---------------------------------------------------------
|
|
280
279
|
|
|
281
280
|
/**
|
|
@@ -359,18 +358,17 @@ export interface InteractionRef {
|
|
|
359
358
|
version: number;
|
|
360
359
|
tags: string[];
|
|
361
360
|
agent_runner_options?: AgentRunnerOptions;
|
|
362
|
-
prompts?:
|
|
361
|
+
prompts?: PromptSegmentRef<PromptTemplateRef>[];
|
|
363
362
|
updated_at: Date;
|
|
364
363
|
}
|
|
365
364
|
export const InteractionRefPopulate =
|
|
366
|
-
|
|
365
|
+
'id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts';
|
|
367
366
|
|
|
368
|
-
export const InteractionRefWithSchemaPopulate =
|
|
369
|
-
`${InteractionRefPopulate} result_schema`;
|
|
367
|
+
export const InteractionRefWithSchemaPopulate = `${InteractionRefPopulate} result_schema`;
|
|
370
368
|
|
|
371
|
-
export interface InteractionRefWithSchema extends Omit<InteractionRef,
|
|
369
|
+
export interface InteractionRefWithSchema extends Omit<InteractionRef, 'prompts'> {
|
|
372
370
|
result_schema?: JSONSchema;
|
|
373
|
-
prompts?:
|
|
371
|
+
prompts?: PromptSegmentRef<PromptTemplateRefWithSchema>[];
|
|
374
372
|
}
|
|
375
373
|
|
|
376
374
|
export interface InteractionsExportPayload {
|
|
@@ -385,34 +383,34 @@ export interface InteractionsExportPayload {
|
|
|
385
383
|
/*
|
|
386
384
|
* if not specified, all versions will be exported
|
|
387
385
|
*/
|
|
388
|
-
versions?: (number |
|
|
386
|
+
versions?: (number | 'draft' | 'latest')[];
|
|
389
387
|
}
|
|
390
388
|
|
|
391
389
|
export enum InteractionStatus {
|
|
392
|
-
draft =
|
|
393
|
-
published =
|
|
394
|
-
archived =
|
|
395
|
-
code =
|
|
396
|
-
unknown =
|
|
390
|
+
draft = 'draft',
|
|
391
|
+
published = 'published',
|
|
392
|
+
archived = 'archived',
|
|
393
|
+
code = 'code', // for in-code interactions that are not stored in the database
|
|
394
|
+
unknown = 'unknown', // for interactions with unknown status
|
|
397
395
|
}
|
|
398
396
|
|
|
399
397
|
export enum ExecutionRunStatus {
|
|
400
|
-
created =
|
|
401
|
-
processing =
|
|
402
|
-
completed =
|
|
403
|
-
failed =
|
|
398
|
+
created = 'created',
|
|
399
|
+
processing = 'processing',
|
|
400
|
+
completed = 'completed',
|
|
401
|
+
failed = 'failed',
|
|
404
402
|
}
|
|
405
403
|
|
|
406
404
|
export enum RunDataStorageLevel {
|
|
407
|
-
STANDARD =
|
|
408
|
-
RESTRICTED =
|
|
409
|
-
DEBUG =
|
|
405
|
+
STANDARD = 'STANDARD',
|
|
406
|
+
RESTRICTED = 'RESTRICTED',
|
|
407
|
+
DEBUG = 'DEBUG',
|
|
410
408
|
}
|
|
411
409
|
|
|
412
410
|
export enum RunDataStorageDescription {
|
|
413
|
-
STANDARD =
|
|
414
|
-
RESTRICTED =
|
|
415
|
-
DEBUG =
|
|
411
|
+
STANDARD = 'Run data is stored for both the model inputs and output.',
|
|
412
|
+
RESTRICTED = 'No run data is stored for the model inputs — only the model output.',
|
|
413
|
+
DEBUG = 'Run data is stored for the model inputs and output, schema, and final prompt.',
|
|
416
414
|
}
|
|
417
415
|
|
|
418
416
|
export const RunDataStorageOptions: Record<RunDataStorageLevel, RunDataStorageDescription> = {
|
|
@@ -429,12 +427,12 @@ export interface SchemaRef {
|
|
|
429
427
|
$uri: string;
|
|
430
428
|
}
|
|
431
429
|
export interface CachePolicy {
|
|
432
|
-
type:
|
|
430
|
+
type: 'cache' | 'no_cache' | 'cache_and_refresh';
|
|
433
431
|
refresh_probability: number;
|
|
434
432
|
varies_on: string[];
|
|
435
433
|
ttl: number;
|
|
436
434
|
}
|
|
437
|
-
export type InteractionVisibility =
|
|
435
|
+
export type InteractionVisibility = 'public' | 'private';
|
|
438
436
|
|
|
439
437
|
export interface InteractionData {
|
|
440
438
|
readonly id: string;
|
|
@@ -473,7 +471,7 @@ export interface Interaction extends InteractionData {
|
|
|
473
471
|
updated_at: Date;
|
|
474
472
|
}
|
|
475
473
|
|
|
476
|
-
export interface PopulatedInteraction extends Omit<Interaction,
|
|
474
|
+
export interface PopulatedInteraction extends Omit<Interaction, 'prompts'> {
|
|
477
475
|
prompts: PopulatedPromptSegmentDef[];
|
|
478
476
|
}
|
|
479
477
|
|
|
@@ -488,18 +486,18 @@ export interface ExecutableInteraction extends InteractionData {
|
|
|
488
486
|
export interface InteractionCreatePayload
|
|
489
487
|
extends Omit<
|
|
490
488
|
Interaction,
|
|
491
|
-
|
|
|
492
|
-
|
|
|
493
|
-
|
|
|
494
|
-
|
|
|
495
|
-
|
|
|
496
|
-
|
|
|
497
|
-
|
|
|
498
|
-
|
|
|
499
|
-
|
|
|
500
|
-
|
|
|
501
|
-
|
|
|
502
|
-
|
|
|
489
|
+
| 'id'
|
|
490
|
+
| 'created_at'
|
|
491
|
+
| 'updated_at'
|
|
492
|
+
| 'created_by'
|
|
493
|
+
| 'updated_by'
|
|
494
|
+
| 'project'
|
|
495
|
+
| 'formatter'
|
|
496
|
+
| 'tags'
|
|
497
|
+
| 'parent'
|
|
498
|
+
| 'version'
|
|
499
|
+
| 'visibility'
|
|
500
|
+
| 'endpoint'
|
|
503
501
|
> {
|
|
504
502
|
visibility?: InteractionVisibility;
|
|
505
503
|
tags?: string[];
|
|
@@ -509,10 +507,10 @@ export interface InteractionUpdatePayload
|
|
|
509
507
|
extends Partial<
|
|
510
508
|
Omit<
|
|
511
509
|
Interaction,
|
|
512
|
-
|
|
510
|
+
'result_schema' | 'id' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by' | 'project'
|
|
513
511
|
>
|
|
514
512
|
> {
|
|
515
|
-
result_schema?: JSONSchema | null;
|
|
513
|
+
result_schema?: JSONSchema | SchemaRef | null;
|
|
516
514
|
}
|
|
517
515
|
|
|
518
516
|
export interface InteractionPublishPayload {
|
|
@@ -520,6 +518,16 @@ export interface InteractionPublishPayload {
|
|
|
520
518
|
tags?: string[];
|
|
521
519
|
}
|
|
522
520
|
|
|
521
|
+
export interface InteractionDeletePayload {
|
|
522
|
+
/**
|
|
523
|
+
* When true, also delete every interaction in the same family as the target:
|
|
524
|
+
* - If the target is the root draft, its forks and published versions are deleted.
|
|
525
|
+
* - If the target is a published version (or fork), the parent draft and all siblings are deleted.
|
|
526
|
+
* Forward-only cascade — never deletes outside the target's family.
|
|
527
|
+
*/
|
|
528
|
+
cascade?: boolean;
|
|
529
|
+
}
|
|
530
|
+
|
|
523
531
|
export interface InteractionForkPayload {
|
|
524
532
|
keepTags?: boolean;
|
|
525
533
|
forkPrompts?: boolean;
|
|
@@ -531,10 +539,10 @@ export interface InteractionExecutionPayload {
|
|
|
531
539
|
* If a `@memory` property exists on the input data then the value will be used as the value of a memory pack location.
|
|
532
540
|
* and the other properties of the data will contain the memory pack mapping.
|
|
533
541
|
*/
|
|
534
|
-
data?: Record<string,
|
|
542
|
+
data?: Record<string, unknown> | `memory:${string}`;
|
|
535
543
|
config?: InteractionExecutionConfiguration;
|
|
536
544
|
//Use null to explicitly state no schema, will not fallback to interaction schema
|
|
537
|
-
result_schema?: JSONSchema | null;
|
|
545
|
+
result_schema?: JSONSchema | SchemaRef | null;
|
|
538
546
|
stream?: boolean;
|
|
539
547
|
do_validate?: boolean;
|
|
540
548
|
tags?: string | string[]; // tags to be added to the execution run
|
|
@@ -583,8 +591,10 @@ export interface NamedInteractionExecutionPayload extends InteractionExecutionPa
|
|
|
583
591
|
// ================= async execution payloads ====================
|
|
584
592
|
export type ToolRef = string | { name: string; description: string };
|
|
585
593
|
|
|
586
|
-
interface AsyncExecutionPayloadBase
|
|
587
|
-
|
|
594
|
+
interface AsyncExecutionPayloadBase
|
|
595
|
+
extends Omit<NamedInteractionExecutionPayload, 'tool_definitions' | 'stream'>,
|
|
596
|
+
Record<string, unknown> {
|
|
597
|
+
type: 'conversation' | 'interaction';
|
|
588
598
|
|
|
589
599
|
/**
|
|
590
600
|
* An array of endpoint URLs to be notified upon execution
|
|
@@ -603,7 +613,7 @@ export enum AgentSearchScope {
|
|
|
603
613
|
/**
|
|
604
614
|
* Search is scoped to a specific collection.
|
|
605
615
|
*/
|
|
606
|
-
Collection = 'collection'
|
|
616
|
+
Collection = 'collection',
|
|
607
617
|
}
|
|
608
618
|
|
|
609
619
|
/**
|
|
@@ -680,29 +690,39 @@ export interface AgentRunnerOptions {
|
|
|
680
690
|
* within this collection'.
|
|
681
691
|
*/
|
|
682
692
|
collection_id?: string;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Optional user-facing template for rendering run input as the first conversation entry.
|
|
696
|
+
* Supports {{field_name}}, {{nested.field}}, {{items.0.name}}, and {{json}} placeholders
|
|
697
|
+
* resolved from the run data.
|
|
698
|
+
*/
|
|
699
|
+
request_template?: string;
|
|
683
700
|
}
|
|
684
701
|
|
|
685
702
|
// ================= User Communication Channels ====================
|
|
686
703
|
// Import for local use
|
|
687
|
-
import type { UserChannel } from
|
|
704
|
+
import type { UserChannel } from './email.js';
|
|
705
|
+
|
|
706
|
+
export type {
|
|
707
|
+
EmailChannel,
|
|
708
|
+
EmailRouteData,
|
|
709
|
+
InteractiveChannel,
|
|
710
|
+
UserChannel,
|
|
711
|
+
} from './email.js';
|
|
688
712
|
// Re-exported from email.ts for backwards compatibility
|
|
689
713
|
export {
|
|
690
714
|
isEmailChannel,
|
|
691
|
-
isInteractiveChannel
|
|
692
|
-
} from
|
|
693
|
-
export type {
|
|
694
|
-
EmailChannel, EmailRouteData, InteractiveChannel,
|
|
695
|
-
UserChannel
|
|
696
|
-
} from "./email.js";
|
|
715
|
+
isInteractiveChannel,
|
|
716
|
+
} from './email.js';
|
|
697
717
|
// ================= end user communication channels ====================
|
|
698
718
|
|
|
699
719
|
export interface AsyncConversationExecutionPayload extends AsyncExecutionPayloadBase {
|
|
700
|
-
type:
|
|
720
|
+
type: 'conversation';
|
|
701
721
|
|
|
702
722
|
/**
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
723
|
+
* Visibility determine if the conversation should be seen by the user only or by anyone with access to the project
|
|
724
|
+
* If not specified, the default is project
|
|
725
|
+
**/
|
|
706
726
|
visibility?: ConversationVisibility;
|
|
707
727
|
|
|
708
728
|
/**
|
|
@@ -776,7 +796,7 @@ export interface AsyncConversationExecutionPayload extends AsyncExecutionPayload
|
|
|
776
796
|
* When a workstream is spawned, the parent's `data` is preserved here so that
|
|
777
797
|
* child tools can access it via metadata.parent_metadata.
|
|
778
798
|
*/
|
|
779
|
-
parent_metadata?: Record<string,
|
|
799
|
+
parent_metadata?: Record<string, unknown>;
|
|
780
800
|
|
|
781
801
|
/**
|
|
782
802
|
* When true, subagent/workstream tool calls use fire-and-forget `startChild()`
|
|
@@ -816,11 +836,10 @@ export interface AsyncConversationExecutionPayload extends AsyncExecutionPayload
|
|
|
816
836
|
* Used by the workflow to create an AgentRun on first run if agent_run_id is absent.
|
|
817
837
|
*/
|
|
818
838
|
schedule_id?: string;
|
|
819
|
-
|
|
820
839
|
}
|
|
821
840
|
|
|
822
841
|
export interface AsyncInteractionExecutionPayload extends AsyncExecutionPayloadBase {
|
|
823
|
-
type:
|
|
842
|
+
type: 'interaction';
|
|
824
843
|
|
|
825
844
|
/**
|
|
826
845
|
* Only used for non conversation workflows to include the error on next retry.
|
|
@@ -829,6 +848,9 @@ export interface AsyncInteractionExecutionPayload extends AsyncExecutionPayloadB
|
|
|
829
848
|
include_previous_error?: boolean;
|
|
830
849
|
}
|
|
831
850
|
|
|
851
|
+
/**
|
|
852
|
+
* @discriminator type
|
|
853
|
+
*/
|
|
832
854
|
export type AsyncExecutionPayload = AsyncConversationExecutionPayload | AsyncInteractionExecutionPayload;
|
|
833
855
|
|
|
834
856
|
export interface AsyncExecutionResult {
|
|
@@ -930,9 +952,14 @@ interface ResumeConversationPayload {
|
|
|
930
952
|
asyncCompletion?: AsyncCompletionOptions;
|
|
931
953
|
}
|
|
932
954
|
|
|
933
|
-
|
|
934
955
|
export interface ToolResultContent {
|
|
935
956
|
content: string;
|
|
957
|
+
/**
|
|
958
|
+
* Reference to text content stored outside Temporal/API payloads. Servers that
|
|
959
|
+
* execute the next model turn should resolve this before constructing the
|
|
960
|
+
* provider prompt.
|
|
961
|
+
*/
|
|
962
|
+
content_ref?: TextArtifactReference;
|
|
936
963
|
is_error: boolean;
|
|
937
964
|
files?: string[];
|
|
938
965
|
/**
|
|
@@ -944,7 +971,7 @@ export interface ToolResultContent {
|
|
|
944
971
|
/**
|
|
945
972
|
* Can contain metadata returned by the tool executor.
|
|
946
973
|
*/
|
|
947
|
-
meta?: Record<string,
|
|
974
|
+
meta?: Record<string, unknown>;
|
|
948
975
|
}
|
|
949
976
|
|
|
950
977
|
export interface ToolResult extends ToolResultContent {
|
|
@@ -967,29 +994,31 @@ export interface UserMessagePayload extends ResumeConversationPayload {
|
|
|
967
994
|
message: string;
|
|
968
995
|
}
|
|
969
996
|
|
|
970
|
-
export type CheckpointConversationPayload = Omit<ToolResultsPayload,
|
|
997
|
+
export type CheckpointConversationPayload = Omit<ToolResultsPayload, 'results' | 'tools'>;
|
|
971
998
|
|
|
972
999
|
// ================= end async execution payloads ====================
|
|
973
1000
|
|
|
974
1001
|
export enum RunSourceTypes {
|
|
975
|
-
api =
|
|
976
|
-
cli =
|
|
977
|
-
ui =
|
|
978
|
-
webhook =
|
|
979
|
-
test =
|
|
980
|
-
system =
|
|
981
|
-
schedule =
|
|
1002
|
+
api = 'api',
|
|
1003
|
+
cli = 'cli',
|
|
1004
|
+
ui = 'ui',
|
|
1005
|
+
webhook = 'webhook',
|
|
1006
|
+
test = 'test-data',
|
|
1007
|
+
system = 'system',
|
|
1008
|
+
schedule = 'schedule',
|
|
982
1009
|
}
|
|
983
1010
|
|
|
984
1011
|
export interface RunSource {
|
|
985
1012
|
type: RunSourceTypes;
|
|
986
1013
|
label: string;
|
|
987
|
-
principal_type:
|
|
1014
|
+
principal_type: `${PrincipalType}`;
|
|
988
1015
|
principal_id: string;
|
|
989
1016
|
client_ip: string;
|
|
990
1017
|
}
|
|
991
1018
|
|
|
992
|
-
export
|
|
1019
|
+
export type ExecutionRunInteraction = InteractionRef;
|
|
1020
|
+
|
|
1021
|
+
export interface BaseExecutionRun<P = unknown> {
|
|
993
1022
|
readonly id: string;
|
|
994
1023
|
/**
|
|
995
1024
|
* Only used by runs that were created by a virtual run to point toward the virtual run parent
|
|
@@ -1000,7 +1029,7 @@ export interface BaseExecutionRun<P = any> {
|
|
|
1000
1029
|
selected?: boolean;
|
|
1001
1030
|
scores?: Record<string, number>;
|
|
1002
1031
|
};
|
|
1003
|
-
result: CompletionResult[] // Any new result will actually be CompletionResult[], the old typing is R, and R used to default to any.
|
|
1032
|
+
result: CompletionResult[]; // Any new result will actually be CompletionResult[], the old typing is R, and R used to default to any.
|
|
1004
1033
|
/**
|
|
1005
1034
|
* The parameters used to create the interaction.
|
|
1006
1035
|
* If the parameters contains the special property "@memory" it will be used
|
|
@@ -1008,20 +1037,20 @@ export interface BaseExecutionRun<P = any> {
|
|
|
1008
1037
|
*/
|
|
1009
1038
|
parameters: P; //params used to create the interaction, only in varies on?
|
|
1010
1039
|
tags?: string[];
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1040
|
+
/**
|
|
1041
|
+
* Interaction reference. Stored interactions may be populated as full
|
|
1042
|
+
* Interaction documents; in-code interactions are represented as refs whose
|
|
1043
|
+
* `id` is the namespaced interaction id.
|
|
1044
|
+
*/
|
|
1045
|
+
interaction?: string | ExecutionRunInteraction;
|
|
1017
1046
|
/** Environment reference - populated with full object in API responses */
|
|
1018
1047
|
environment: ExecutionEnvironmentRef;
|
|
1019
1048
|
modelId?: string; //Can be undefined for virtual environments. In most cases should be defined.
|
|
1020
|
-
result_schema
|
|
1049
|
+
result_schema?: JSONSchema;
|
|
1021
1050
|
ttl: number;
|
|
1022
1051
|
status: ExecutionRunStatus;
|
|
1023
1052
|
finish_reason?: string;
|
|
1024
|
-
prompt
|
|
1053
|
+
prompt?: unknown;
|
|
1025
1054
|
token_use?: ExecutionTokenUsage;
|
|
1026
1055
|
chunks?: number;
|
|
1027
1056
|
execution_time?: number; // ms
|
|
@@ -1050,12 +1079,12 @@ export interface BaseExecutionRun<P = any> {
|
|
|
1050
1079
|
workflow?: ExecutionRunWorkflow;
|
|
1051
1080
|
}
|
|
1052
1081
|
|
|
1053
|
-
export interface ExecutionRun<P =
|
|
1054
|
-
interaction?:
|
|
1082
|
+
export interface ExecutionRun<P = unknown> extends BaseExecutionRun<P> {
|
|
1083
|
+
interaction?: ExecutionRunInteraction;
|
|
1055
1084
|
}
|
|
1056
1085
|
|
|
1057
|
-
export interface PopulatedExecutionRun<P =
|
|
1058
|
-
interaction?:
|
|
1086
|
+
export interface PopulatedExecutionRun<P = unknown> extends BaseExecutionRun<P> {
|
|
1087
|
+
interaction?: ExecutionRunInteraction;
|
|
1059
1088
|
}
|
|
1060
1089
|
|
|
1061
1090
|
export interface ExecutionRunWorkflow {
|
|
@@ -1097,36 +1126,39 @@ export interface PromptModalities {
|
|
|
1097
1126
|
hasImage: boolean;
|
|
1098
1127
|
}
|
|
1099
1128
|
|
|
1100
|
-
export interface InteractionExecutionResult<P =
|
|
1129
|
+
export interface InteractionExecutionResult<P = unknown>
|
|
1130
|
+
extends Omit<ExecutionRun<P>, 'account' | 'project' | 'interaction'> {
|
|
1131
|
+
account: string;
|
|
1132
|
+
project: string;
|
|
1133
|
+
interaction?: string;
|
|
1101
1134
|
tool_use?: ToolUse[];
|
|
1102
1135
|
conversation?: unknown;
|
|
1103
1136
|
options?: StatelessExecutionOptions;
|
|
1104
1137
|
}
|
|
1105
1138
|
|
|
1106
|
-
export interface LegacyInteractionExecutionResult<P =
|
|
1139
|
+
export interface LegacyInteractionExecutionResult<P = unknown>
|
|
1107
1140
|
extends Omit<InteractionExecutionResult<P>, 'result' | 'account' | 'project'> {
|
|
1108
1141
|
account: string | AccountRef;
|
|
1109
1142
|
project: string | ProjectRef;
|
|
1110
1143
|
result?: JSONObject | string | null;
|
|
1111
1144
|
}
|
|
1112
1145
|
|
|
1113
|
-
export interface ExecutionRunRef extends Omit<ExecutionRun,
|
|
1146
|
+
export interface ExecutionRunRef extends Omit<ExecutionRun, 'result' | 'parameters' | 'interaction'> {
|
|
1114
1147
|
interaction?: InteractionRef;
|
|
1115
|
-
interaction_code?: string;
|
|
1116
1148
|
}
|
|
1117
1149
|
|
|
1118
|
-
export const ExecutionRunRefSelect =
|
|
1150
|
+
export const ExecutionRunRefSelect = '-result -parameters -result_schema -prompt';
|
|
1119
1151
|
|
|
1120
1152
|
export enum ConfigModes {
|
|
1121
|
-
RUN_AND_INTERACTION_CONFIG =
|
|
1122
|
-
RUN_CONFIG_ONLY =
|
|
1123
|
-
INTERACTION_CONFIG_ONLY =
|
|
1153
|
+
RUN_AND_INTERACTION_CONFIG = 'RUN_AND_INTERACTION_CONFIG',
|
|
1154
|
+
RUN_CONFIG_ONLY = 'RUN_CONFIG_ONLY',
|
|
1155
|
+
INTERACTION_CONFIG_ONLY = 'INTERACTION_CONFIG_ONLY',
|
|
1124
1156
|
}
|
|
1125
1157
|
|
|
1126
1158
|
export enum ConfigModesDescription {
|
|
1127
|
-
RUN_AND_INTERACTION_CONFIG =
|
|
1128
|
-
RUN_CONFIG_ONLY =
|
|
1129
|
-
INTERACTION_CONFIG_ONLY =
|
|
1159
|
+
RUN_AND_INTERACTION_CONFIG = 'This run configuration is used. Undefined options are filled with interaction configuration.',
|
|
1160
|
+
RUN_CONFIG_ONLY = 'Only this run configuration is used. Undefined options remain undefined.',
|
|
1161
|
+
INTERACTION_CONFIG_ONLY = 'Only interaction configuration is used.',
|
|
1130
1162
|
}
|
|
1131
1163
|
|
|
1132
1164
|
export const ConfigModesOptions: Record<ConfigModes, ConfigModesDescription> = {
|
|
@@ -1136,12 +1168,15 @@ export const ConfigModesOptions: Record<ConfigModes, ConfigModesDescription> = {
|
|
|
1136
1168
|
};
|
|
1137
1169
|
|
|
1138
1170
|
export interface InteractionExecutionConfiguration {
|
|
1171
|
+
id?: string;
|
|
1139
1172
|
environment?: string;
|
|
1140
1173
|
model?: string;
|
|
1141
1174
|
do_validate?: boolean;
|
|
1142
1175
|
run_data?: RunDataStorageLevel;
|
|
1143
1176
|
configMode?: ConfigModes;
|
|
1144
1177
|
model_options?: ModelOptions;
|
|
1178
|
+
/** Per-run HTTP timeouts for upstream LLM-provider calls. */
|
|
1179
|
+
http_timeout?: HttpTimeoutOptions;
|
|
1145
1180
|
}
|
|
1146
1181
|
|
|
1147
1182
|
export interface GenerateInteractionPayload {
|
|
@@ -1165,9 +1200,9 @@ export interface ImprovePromptPayloadConfig {
|
|
|
1165
1200
|
|
|
1166
1201
|
export interface ImprovePromptPayload extends ImprovePromptPayloadConfig {
|
|
1167
1202
|
interaction_name: string; // name of the interaction to improve
|
|
1168
|
-
context?: string
|
|
1169
|
-
prompt: { name: string
|
|
1170
|
-
result_schema?: JSONSchema
|
|
1203
|
+
context?: string;
|
|
1204
|
+
prompt: { name: string; content: string }[]; // prompt array
|
|
1205
|
+
result_schema?: JSONSchema; // optional interaction result schema
|
|
1171
1206
|
}
|
|
1172
1207
|
|
|
1173
1208
|
export interface GeneratedInteractionPromptTemplate {
|
|
@@ -1198,10 +1233,10 @@ export interface PromptImprovementResponse {
|
|
|
1198
1233
|
}
|
|
1199
1234
|
|
|
1200
1235
|
export interface RateLimitRequestPayload {
|
|
1201
|
-
interaction: string
|
|
1202
|
-
environment_id?: string
|
|
1203
|
-
model_id?: string
|
|
1204
|
-
workflow_run_id?: string
|
|
1236
|
+
interaction: string;
|
|
1237
|
+
environment_id?: string;
|
|
1238
|
+
model_id?: string;
|
|
1239
|
+
workflow_run_id?: string;
|
|
1205
1240
|
modalities?: PromptModalities;
|
|
1206
1241
|
}
|
|
1207
1242
|
|
|
@@ -1214,19 +1249,19 @@ export interface RateLimitRequestResponse {
|
|
|
1214
1249
|
*/
|
|
1215
1250
|
export enum ModelSource {
|
|
1216
1251
|
/** Model was explicitly provided in the execution config */
|
|
1217
|
-
config =
|
|
1252
|
+
config = 'config',
|
|
1218
1253
|
/** Model comes from the interaction definition */
|
|
1219
|
-
interaction =
|
|
1254
|
+
interaction = 'interaction',
|
|
1220
1255
|
/** Model comes from environment's default_model */
|
|
1221
|
-
environmentDefault =
|
|
1256
|
+
environmentDefault = 'environmentDefault',
|
|
1222
1257
|
/** Model comes from project system interaction defaults */
|
|
1223
|
-
projectSystemDefault =
|
|
1258
|
+
projectSystemDefault = 'projectSystemDefault',
|
|
1224
1259
|
/** Model comes from project base defaults */
|
|
1225
|
-
projectBaseDefault =
|
|
1260
|
+
projectBaseDefault = 'projectBaseDefault',
|
|
1226
1261
|
/** Model comes from project modality-specific defaults */
|
|
1227
|
-
projectModalityDefault =
|
|
1262
|
+
projectModalityDefault = 'projectModalityDefault',
|
|
1228
1263
|
/** Model comes from legacy project defaults */
|
|
1229
|
-
projectLegacyDefault =
|
|
1264
|
+
projectLegacyDefault = 'projectLegacyDefault',
|
|
1230
1265
|
}
|
|
1231
1266
|
|
|
1232
1267
|
/**
|
|
@@ -1278,6 +1313,15 @@ export interface ResolvedInteractionExecutionInfo {
|
|
|
1278
1313
|
*/
|
|
1279
1314
|
tags: string[];
|
|
1280
1315
|
|
|
1316
|
+
/**
|
|
1317
|
+
* Agent runner configuration (tool_names opt-ins, is_agent, is_tool, etc.).
|
|
1318
|
+
* Included on resolve so non-UI callers (worker activities) can pick up the
|
|
1319
|
+
* interaction's defaults without a second retrieve round-trip — and so
|
|
1320
|
+
* in-code interactions (sys:, app:) which have no Mongo document work the
|
|
1321
|
+
* same as stored ones.
|
|
1322
|
+
*/
|
|
1323
|
+
agent_runner_options?: AgentRunnerOptions;
|
|
1324
|
+
|
|
1281
1325
|
/**
|
|
1282
1326
|
* The resolved runtime configuration
|
|
1283
1327
|
*/
|
|
@@ -1329,10 +1373,10 @@ export interface SystemSkillCatalogEntry {
|
|
|
1329
1373
|
title: string;
|
|
1330
1374
|
/** Description of what the skill unlocks */
|
|
1331
1375
|
description: string;
|
|
1332
|
-
/**
|
|
1376
|
+
/** Tool names this skill enables (unlocks) when called */
|
|
1333
1377
|
tools: string[];
|
|
1334
|
-
/**
|
|
1335
|
-
|
|
1378
|
+
/** Whether this skill is part of the default agent toolkit */
|
|
1379
|
+
default?: boolean;
|
|
1336
1380
|
}
|
|
1337
1381
|
|
|
1338
1382
|
/**
|