@vertesia/common 1.3.0 → 1.4.0-dev.20260615.042033Z
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/{types/access-control.d.ts → access-control.d.ts} +15 -5
- package/lib/access-control.d.ts.map +1 -0
- package/lib/{esm/access-control.js → access-control.js} +10 -7
- 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} +21 -5
- 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} +18 -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} +5 -4
- package/lib/group.d.ts.map +1 -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} +50 -7
- 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} +253 -22
- 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 +10 -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 +63 -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} +6 -9
- 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 +19 -19
- package/src/Progress.ts +9 -7
- package/src/access-control.ts +66 -70
- 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 +28 -12
- 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 +4 -5
- 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 +65 -8
- package/src/payload.ts +6 -6
- package/src/pending-asks.ts +8 -1
- package/src/principal-context.ts +27 -0
- package/src/project.ts +383 -75
- 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 +13 -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 +115 -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 +18 -37
- 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 -91
- 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.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.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/group.js → group.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/store/workflow.ts
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import type { ModelOptions } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { HttpTimeoutOptions, ModelOptions } from '@llumiverse/common';
|
|
2
|
+
import type {
|
|
3
|
+
ConversationVisibility,
|
|
4
|
+
InteractionExecutionConfiguration,
|
|
5
|
+
InteractionRef,
|
|
6
|
+
UserChannel,
|
|
7
|
+
} from '../interaction.js';
|
|
8
|
+
import type { JSONObject, JSONValue } from '../json.js';
|
|
9
|
+
import type { JSONSchema } from '../json-schema.js';
|
|
10
|
+
import type { WorkflowInput } from './dsl-workflow.js';
|
|
6
11
|
|
|
7
12
|
export enum ContentEventName {
|
|
8
|
-
create =
|
|
9
|
-
change_type =
|
|
10
|
-
update =
|
|
11
|
-
revision_created =
|
|
12
|
-
delete =
|
|
13
|
-
workflow_finished =
|
|
14
|
-
workflow_execution_request =
|
|
15
|
-
api_request =
|
|
13
|
+
create = 'create',
|
|
14
|
+
change_type = 'change_type',
|
|
15
|
+
update = 'update',
|
|
16
|
+
revision_created = 'revision_created',
|
|
17
|
+
delete = 'delete',
|
|
18
|
+
workflow_finished = 'workflow_finished',
|
|
19
|
+
workflow_execution_request = 'workflow_execution_request',
|
|
20
|
+
api_request = 'api_request',
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
export interface Queue {
|
|
@@ -31,7 +36,7 @@ export interface WorkflowAncestor {
|
|
|
31
36
|
run_depth: number;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
export interface WorkflowExecutionBaseParams<T = Record<string,
|
|
39
|
+
export interface WorkflowExecutionBaseParams<T = Record<string, unknown>> {
|
|
35
40
|
/**
|
|
36
41
|
* The ref of the user who initiated the workflow.
|
|
37
42
|
*/
|
|
@@ -86,13 +91,12 @@ export interface WorkflowExecutionBaseParams<T = Record<string, any>> {
|
|
|
86
91
|
/**
|
|
87
92
|
* Full ancestry chain from root to immediate parent (for hierarchical aggregation)
|
|
88
93
|
*/
|
|
89
|
-
ancestors?: WorkflowAncestor[]
|
|
94
|
+
ancestors?: WorkflowAncestor[];
|
|
90
95
|
|
|
91
96
|
/**
|
|
92
97
|
* List of enabled processing queues. Managed by the application.
|
|
93
98
|
*/
|
|
94
99
|
_enabled_queues?: Queue[];
|
|
95
|
-
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
export interface WebHookSpec {
|
|
@@ -113,7 +117,7 @@ export interface WebHookSpec {
|
|
|
113
117
|
* When custom data is provided, the workflow result will always be nested
|
|
114
118
|
* to prevent field collisions. Use result_path to control where it's nested.
|
|
115
119
|
*/
|
|
116
|
-
data?: Record<string,
|
|
120
|
+
data?: Record<string, unknown>;
|
|
117
121
|
/**
|
|
118
122
|
* Path where the workflow result should be nested in the webhook body.
|
|
119
123
|
* Defaults to "result" when custom data is provided.
|
|
@@ -133,7 +137,7 @@ export interface WebHookSpec {
|
|
|
133
137
|
result_path?: string;
|
|
134
138
|
}
|
|
135
139
|
|
|
136
|
-
export interface WorkflowExecutionPayload<T = Record<string,
|
|
140
|
+
export interface WorkflowExecutionPayload<T = Record<string, unknown>> extends WorkflowExecutionBaseParams<T> {
|
|
137
141
|
/**
|
|
138
142
|
* The event which started the workflow who created the activity.
|
|
139
143
|
*/
|
|
@@ -163,7 +167,7 @@ export interface WorkflowExecutionPayload<T = Record<string, any>> extends Workf
|
|
|
163
167
|
auth_token: string;
|
|
164
168
|
}
|
|
165
169
|
|
|
166
|
-
export function getDocumentIds(payload: WorkflowExecutionPayload): string[] {
|
|
170
|
+
export function getDocumentIds(payload: WorkflowExecutionPayload<Record<string, unknown>>): string[] {
|
|
167
171
|
// Check new input format first
|
|
168
172
|
if (payload.input?.inputType === 'objectIds') {
|
|
169
173
|
return payload.input.objectIds;
|
|
@@ -197,7 +201,7 @@ export interface ExecuteWorkflowPayload {
|
|
|
197
201
|
/**
|
|
198
202
|
* Parameters to pass to the workflow
|
|
199
203
|
*/
|
|
200
|
-
vars?: Record<string,
|
|
204
|
+
vars?: Record<string, unknown>;
|
|
201
205
|
|
|
202
206
|
/**
|
|
203
207
|
* Make the workflow ID unique by always adding a random token to the ID.
|
|
@@ -311,7 +315,7 @@ export interface ListWorkflowRunsPayload {
|
|
|
311
315
|
export interface SignalEventProperties {
|
|
312
316
|
direction: 'receiving' | 'sending';
|
|
313
317
|
signalName?: string;
|
|
314
|
-
input?:
|
|
318
|
+
input?: unknown;
|
|
315
319
|
sender?: {
|
|
316
320
|
workflowId?: string;
|
|
317
321
|
runId?: string;
|
|
@@ -343,19 +347,19 @@ export interface WorkflowRunEvent {
|
|
|
343
347
|
activity?: {
|
|
344
348
|
name?: string;
|
|
345
349
|
id?: string;
|
|
346
|
-
input?:
|
|
350
|
+
input?: unknown;
|
|
347
351
|
scheduledEventId?: string;
|
|
348
352
|
startedEventId?: string;
|
|
349
353
|
};
|
|
350
354
|
|
|
351
355
|
childWorkflow?: {
|
|
352
|
-
workflowId?: string
|
|
353
|
-
workflowType?: string
|
|
354
|
-
runId?: string
|
|
355
|
-
scheduledEventId?: string
|
|
356
|
-
startedEventId?: string
|
|
357
|
-
input?:
|
|
358
|
-
result?:
|
|
356
|
+
workflowId?: string;
|
|
357
|
+
workflowType?: string;
|
|
358
|
+
runId?: string;
|
|
359
|
+
scheduledEventId?: string;
|
|
360
|
+
startedEventId?: string;
|
|
361
|
+
input?: unknown;
|
|
362
|
+
result?: unknown;
|
|
359
363
|
};
|
|
360
364
|
|
|
361
365
|
signal?: SignalEventProperties;
|
|
@@ -368,7 +372,7 @@ export interface WorkflowRunEvent {
|
|
|
368
372
|
|
|
369
373
|
error?: EventError;
|
|
370
374
|
|
|
371
|
-
result?:
|
|
375
|
+
result?: unknown;
|
|
372
376
|
}
|
|
373
377
|
|
|
374
378
|
// Task status enum for processed history
|
|
@@ -380,7 +384,7 @@ export enum TaskStatus {
|
|
|
380
384
|
CANCELED = 'canceled',
|
|
381
385
|
TIMED_OUT = 'timed_out',
|
|
382
386
|
TERMINATED = 'terminated',
|
|
383
|
-
SENT = 'sent',
|
|
387
|
+
SENT = 'sent', // for signals
|
|
384
388
|
RECEIVED = 'received', // for signals
|
|
385
389
|
}
|
|
386
390
|
|
|
@@ -397,14 +401,14 @@ interface TaskBase {
|
|
|
397
401
|
type: TaskType;
|
|
398
402
|
activityId: string;
|
|
399
403
|
activityName?: string;
|
|
400
|
-
input?:
|
|
404
|
+
input?: unknown;
|
|
401
405
|
scheduled: string | null;
|
|
402
406
|
status: TaskStatus;
|
|
403
407
|
attempts: number;
|
|
404
408
|
started: string | null;
|
|
405
409
|
completed: string | null;
|
|
406
410
|
error: string | null;
|
|
407
|
-
result:
|
|
411
|
+
result: unknown;
|
|
408
412
|
/** Temporal run ID that produced this task (set when aggregating across continueAsNew runs). */
|
|
409
413
|
runId?: string;
|
|
410
414
|
}
|
|
@@ -444,13 +448,15 @@ export interface TimerTask extends TaskBase {
|
|
|
444
448
|
}
|
|
445
449
|
|
|
446
450
|
// Union type for all processed tasks
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
| TimerTask;
|
|
451
|
+
/**
|
|
452
|
+
* @discriminator type
|
|
453
|
+
*/
|
|
454
|
+
export type WorkflowTask = ActivityTask | ChildWorkflowTask | SignalTask | TimerTask;
|
|
452
455
|
|
|
453
456
|
// History format discriminated union
|
|
457
|
+
/**
|
|
458
|
+
* @discriminator type
|
|
459
|
+
*/
|
|
454
460
|
export type WorkflowHistory =
|
|
455
461
|
| { type: 'events'; events: WorkflowRunEvent[] }
|
|
456
462
|
| { type: 'tasks'; tasks: WorkflowTask[] }
|
|
@@ -529,11 +535,11 @@ export interface WorkflowRun {
|
|
|
529
535
|
workflow_id?: string;
|
|
530
536
|
initiated_by?: string;
|
|
531
537
|
interaction_name?: string;
|
|
532
|
-
input?:
|
|
533
|
-
result?:
|
|
534
|
-
error?:
|
|
538
|
+
input?: unknown;
|
|
539
|
+
result?: unknown;
|
|
540
|
+
error?: unknown;
|
|
535
541
|
has_reported_errors?: boolean;
|
|
536
|
-
raw?:
|
|
542
|
+
raw?: unknown;
|
|
537
543
|
/**
|
|
538
544
|
* The Vertesia Workflow Type of this Workflow Run.
|
|
539
545
|
* - For DSL workflows (`type:dslWorkflow`), the vertesia_type refers to the "Workflow Rule Name" specified in the
|
|
@@ -579,7 +585,7 @@ export interface PendingActivity {
|
|
|
579
585
|
export interface WorkflowRunWithDetails extends WorkflowRun {
|
|
580
586
|
history?: WorkflowHistory;
|
|
581
587
|
memo?: {
|
|
582
|
-
[key: string]:
|
|
588
|
+
[key: string]: unknown;
|
|
583
589
|
} | null;
|
|
584
590
|
pendingActivities?: PendingActivity[];
|
|
585
591
|
}
|
|
@@ -595,9 +601,9 @@ export interface WorkflowExecutionStartResult {
|
|
|
595
601
|
}
|
|
596
602
|
|
|
597
603
|
export interface ListWorkflowInteractionsResponse {
|
|
598
|
-
workflow_id: string
|
|
599
|
-
run_id: string
|
|
600
|
-
interaction: WorkflowInteractionVars
|
|
604
|
+
workflow_id: string;
|
|
605
|
+
run_id: string;
|
|
606
|
+
interaction: WorkflowInteractionVars;
|
|
601
607
|
}
|
|
602
608
|
|
|
603
609
|
export interface WorkflowRunUpdatesResponse {
|
|
@@ -607,6 +613,7 @@ export interface WorkflowRunUpdatesResponse {
|
|
|
607
613
|
export interface WorkflowRunDetailsQuery {
|
|
608
614
|
include_history?: boolean;
|
|
609
615
|
history_format?: 'events' | 'tasks' | 'agent';
|
|
616
|
+
hydrate_payloads?: boolean;
|
|
610
617
|
}
|
|
611
618
|
|
|
612
619
|
export interface WorkflowRunUpdatesQuery {
|
|
@@ -628,24 +635,24 @@ export interface WorkflowActionResponse {
|
|
|
628
635
|
export type WorkflowQueryResult = JSONValue;
|
|
629
636
|
|
|
630
637
|
export interface WorkflowInteractionVars {
|
|
631
|
-
type: string
|
|
632
|
-
interaction: string
|
|
633
|
-
interactive: boolean
|
|
634
|
-
debug_mode?: boolean
|
|
635
|
-
non_blocking_subagents?: boolean
|
|
638
|
+
type: string;
|
|
639
|
+
interaction: string;
|
|
640
|
+
interactive: boolean;
|
|
641
|
+
debug_mode?: boolean;
|
|
642
|
+
non_blocking_subagents?: boolean;
|
|
636
643
|
/**
|
|
637
644
|
* Array of channels to use for user communication.
|
|
638
645
|
* Multiple channels can be active simultaneously.
|
|
639
646
|
*/
|
|
640
|
-
user_channels?: UserChannel[]
|
|
641
|
-
data?:
|
|
642
|
-
tool_names: string[]
|
|
647
|
+
user_channels?: UserChannel[];
|
|
648
|
+
data?: JSONObject;
|
|
649
|
+
tool_names: string[];
|
|
643
650
|
config: {
|
|
644
|
-
environment: string
|
|
645
|
-
model: string
|
|
646
|
-
model_options?: ModelOptions
|
|
647
|
-
}
|
|
648
|
-
interactionParamsSchema?: JSONSchema
|
|
651
|
+
environment: string;
|
|
652
|
+
model: string;
|
|
653
|
+
model_options?: ModelOptions;
|
|
654
|
+
};
|
|
655
|
+
interactionParamsSchema?: JSONSchema;
|
|
649
656
|
collection_id?: string;
|
|
650
657
|
/**
|
|
651
658
|
* The token threshold in thousands (K) for creating checkpoints.
|
|
@@ -660,11 +667,11 @@ export interface WorkflowInteractionVars {
|
|
|
660
667
|
version?: number;
|
|
661
668
|
}
|
|
662
669
|
|
|
663
|
-
export interface MultiDocumentsInteractionParams extends Omit<WorkflowExecutionPayload,
|
|
670
|
+
export interface MultiDocumentsInteractionParams extends Omit<WorkflowExecutionPayload, 'config'> {
|
|
664
671
|
config: {
|
|
665
672
|
interactionName: string;
|
|
666
673
|
action: DocumentActionConfig;
|
|
667
|
-
data: Record<string,
|
|
674
|
+
data: Record<string, unknown>;
|
|
668
675
|
};
|
|
669
676
|
}
|
|
670
677
|
|
|
@@ -706,7 +713,7 @@ export interface AgentMessage {
|
|
|
706
713
|
workflow_run_id: string;
|
|
707
714
|
type: AgentMessageType;
|
|
708
715
|
message: string;
|
|
709
|
-
details?:
|
|
716
|
+
details?: AgentMessageDetails;
|
|
710
717
|
workstream_id?: string;
|
|
711
718
|
}
|
|
712
719
|
|
|
@@ -728,6 +735,34 @@ export enum AgentMessageType {
|
|
|
728
735
|
RESTARTING = 14,
|
|
729
736
|
}
|
|
730
737
|
|
|
738
|
+
export interface AgentMessageDetails extends Record<string, unknown> {
|
|
739
|
+
event_class?: string;
|
|
740
|
+
tool?: string;
|
|
741
|
+
tools?: string[];
|
|
742
|
+
tool_event?: 'started' | 'progress' | 'completed' | 'failed';
|
|
743
|
+
streamed?: boolean;
|
|
744
|
+
display_role?: string;
|
|
745
|
+
activity_id?: string;
|
|
746
|
+
activity_group_id?: string;
|
|
747
|
+
batch_id?: string;
|
|
748
|
+
tool_run_id?: string;
|
|
749
|
+
tool_use_id?: string;
|
|
750
|
+
tool_status?: ToolCallDetails['tool_status'];
|
|
751
|
+
tool_iteration?: number;
|
|
752
|
+
message_to_human?: string;
|
|
753
|
+
duration_ms?: number;
|
|
754
|
+
observation?: unknown;
|
|
755
|
+
workflow_run_id?: string;
|
|
756
|
+
outputFiles?: string[];
|
|
757
|
+
files?: ConversationFile[] | string[];
|
|
758
|
+
plan?: PlanTask[];
|
|
759
|
+
streaming_id?: string;
|
|
760
|
+
chunk_index?: number;
|
|
761
|
+
is_final?: boolean;
|
|
762
|
+
_optimistic?: boolean;
|
|
763
|
+
_messageId?: string;
|
|
764
|
+
}
|
|
765
|
+
|
|
731
766
|
// ============================================
|
|
732
767
|
// AGENT MESSAGE DETAIL TYPES & TYPE GUARDS
|
|
733
768
|
// ============================================
|
|
@@ -738,9 +773,13 @@ export enum AgentMessageType {
|
|
|
738
773
|
export interface ToolCallDetails {
|
|
739
774
|
event_class: 'activity';
|
|
740
775
|
tool: string;
|
|
776
|
+
tool_event?: 'started' | 'progress' | 'completed' | 'failed';
|
|
741
777
|
tool_run_id?: string;
|
|
778
|
+
tool_use_id?: string;
|
|
742
779
|
tool_status?: 'running' | 'completed' | 'error' | 'warning';
|
|
743
780
|
tool_iteration?: number;
|
|
781
|
+
message_to_human?: string;
|
|
782
|
+
duration_ms?: number;
|
|
744
783
|
activity_group_id?: string;
|
|
745
784
|
activity_id?: string;
|
|
746
785
|
files?: string[];
|
|
@@ -782,39 +821,46 @@ export interface PlanMessageDetails {
|
|
|
782
821
|
// Type guards — check both message type and details shape for safety
|
|
783
822
|
|
|
784
823
|
export function isToolCallMessage(msg: AgentMessage): msg is AgentMessage & { details: ToolCallDetails } {
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
824
|
+
const details = msg.details as Record<string, unknown> | undefined;
|
|
825
|
+
return (
|
|
826
|
+
msg.type === AgentMessageType.THOUGHT &&
|
|
827
|
+
!!details &&
|
|
828
|
+
typeof details === 'object' &&
|
|
829
|
+
typeof details.tool === 'string'
|
|
830
|
+
);
|
|
789
831
|
}
|
|
790
832
|
|
|
791
833
|
export function isDocumentEventMessage(msg: AgentMessage): msg is AgentMessage & { details: DocumentEventDetails } {
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
typeof
|
|
834
|
+
const details = msg.details as Record<string, unknown> | undefined;
|
|
835
|
+
return (
|
|
836
|
+
msg.type === AgentMessageType.UPDATE &&
|
|
837
|
+
!!details &&
|
|
838
|
+
typeof details === 'object' &&
|
|
839
|
+
(details.event_class === 'document_created' || details.event_class === 'document_updated') &&
|
|
840
|
+
typeof details.document_id === 'string'
|
|
841
|
+
);
|
|
797
842
|
}
|
|
798
843
|
|
|
799
844
|
export function isFileProcessingMessage(msg: AgentMessage): msg is AgentMessage & { details: FileProcessingDetails } {
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
845
|
+
const details = msg.details as Record<string, unknown> | undefined;
|
|
846
|
+
return (
|
|
847
|
+
msg.type === AgentMessageType.SYSTEM &&
|
|
848
|
+
!!details &&
|
|
849
|
+
typeof details === 'object' &&
|
|
850
|
+
details.system_type === 'file_processing' &&
|
|
851
|
+
Array.isArray(details.files)
|
|
852
|
+
);
|
|
805
853
|
}
|
|
806
854
|
|
|
807
855
|
export function isPlanMessage(msg: AgentMessage): msg is AgentMessage & { details: PlanMessageDetails } {
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
856
|
+
const details = msg.details as Record<string, unknown> | undefined;
|
|
857
|
+
return (
|
|
858
|
+
msg.type === AgentMessageType.PLAN && !!details && typeof details === 'object' && Array.isArray(details.plan)
|
|
859
|
+
);
|
|
812
860
|
}
|
|
813
861
|
|
|
814
862
|
export function isRequestInputMessage(msg: AgentMessage): msg is AgentMessage & { details: RequestInputDetails } {
|
|
815
|
-
return msg.type === AgentMessageType.REQUEST_INPUT &&
|
|
816
|
-
!!msg.details &&
|
|
817
|
-
typeof msg.details === 'object';
|
|
863
|
+
return msg.type === AgentMessageType.REQUEST_INPUT && !!msg.details && typeof msg.details === 'object';
|
|
818
864
|
}
|
|
819
865
|
|
|
820
866
|
/**
|
|
@@ -849,7 +895,7 @@ export interface CompactMessage {
|
|
|
849
895
|
/** Workstream ID (only when not "main") */
|
|
850
896
|
w?: string;
|
|
851
897
|
/** Type-specific details */
|
|
852
|
-
d?:
|
|
898
|
+
d?: AgentMessageDetails | null;
|
|
853
899
|
/** Is final chunk (only for STREAMING_CHUNK, 0 or 1) */
|
|
854
900
|
f?: 0 | 1;
|
|
855
901
|
/** Timestamp (only for stored/persisted messages) */
|
|
@@ -890,20 +936,20 @@ export function isLegacyMessage(msg: unknown): msg is LegacyAgentMessage {
|
|
|
890
936
|
* Map old string enum values to AgentMessageType
|
|
891
937
|
*/
|
|
892
938
|
const STRING_TO_TYPE_MAP: Record<string, AgentMessageType> = {
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
939
|
+
system: AgentMessageType.SYSTEM,
|
|
940
|
+
thought: AgentMessageType.THOUGHT,
|
|
941
|
+
plan: AgentMessageType.PLAN,
|
|
942
|
+
update: AgentMessageType.UPDATE,
|
|
943
|
+
complete: AgentMessageType.COMPLETE,
|
|
944
|
+
warning: AgentMessageType.WARNING,
|
|
945
|
+
error: AgentMessageType.ERROR,
|
|
946
|
+
answer: AgentMessageType.ANSWER,
|
|
947
|
+
question: AgentMessageType.QUESTION,
|
|
948
|
+
request_input: AgentMessageType.REQUEST_INPUT,
|
|
949
|
+
idle: AgentMessageType.IDLE,
|
|
950
|
+
terminated: AgentMessageType.TERMINATED,
|
|
951
|
+
streaming_chunk: AgentMessageType.STREAMING_CHUNK,
|
|
952
|
+
batch_progress: AgentMessageType.BATCH_PROGRESS,
|
|
907
953
|
};
|
|
908
954
|
|
|
909
955
|
/**
|
|
@@ -984,10 +1030,10 @@ export function createCompactMessage(
|
|
|
984
1030
|
options: {
|
|
985
1031
|
message?: string;
|
|
986
1032
|
workstreamId?: string;
|
|
987
|
-
details?:
|
|
1033
|
+
details?: AgentMessageDetails;
|
|
988
1034
|
isFinal?: boolean;
|
|
989
1035
|
timestamp?: number;
|
|
990
|
-
} = {}
|
|
1036
|
+
} = {},
|
|
991
1037
|
): CompactMessage {
|
|
992
1038
|
const compact: CompactMessage = { t: type };
|
|
993
1039
|
|
|
@@ -1015,7 +1061,7 @@ export function toAgentMessage(compact: CompactMessage, workflowRunId: string =
|
|
|
1015
1061
|
workstream_id: compact.w || 'main',
|
|
1016
1062
|
};
|
|
1017
1063
|
|
|
1018
|
-
if (compact.d !== undefined) message.details = compact.d;
|
|
1064
|
+
if (compact.d !== undefined && compact.d !== null) message.details = compact.d;
|
|
1019
1065
|
|
|
1020
1066
|
// For streaming chunks, restore is_final and streaming_id in details
|
|
1021
1067
|
// (streaming_id removed from wire format, use workstream_id as grouping key)
|
|
@@ -1038,7 +1084,7 @@ export interface BatchItemStatus {
|
|
|
1038
1084
|
/** Unique identifier for this batch item */
|
|
1039
1085
|
id: string;
|
|
1040
1086
|
/** Current status of the item */
|
|
1041
|
-
status:
|
|
1087
|
+
status: 'pending' | 'running' | 'success' | 'error';
|
|
1042
1088
|
/** Optional message (e.g., error message or result summary) */
|
|
1043
1089
|
message?: string;
|
|
1044
1090
|
/** Execution duration in milliseconds (when completed) */
|
|
@@ -1074,13 +1120,13 @@ export interface BatchProgressDetails {
|
|
|
1074
1120
|
*/
|
|
1075
1121
|
export enum FileProcessingStatus {
|
|
1076
1122
|
/** File is being uploaded to artifact storage */
|
|
1077
|
-
UPLOADING =
|
|
1123
|
+
UPLOADING = 'uploading',
|
|
1078
1124
|
/** File uploaded, text extraction in progress */
|
|
1079
|
-
PROCESSING =
|
|
1125
|
+
PROCESSING = 'processing',
|
|
1080
1126
|
/** File is ready for use in conversation */
|
|
1081
|
-
READY =
|
|
1127
|
+
READY = 'ready',
|
|
1082
1128
|
/** File processing failed */
|
|
1083
|
-
ERROR =
|
|
1129
|
+
ERROR = 'error',
|
|
1084
1130
|
}
|
|
1085
1131
|
|
|
1086
1132
|
/**
|
|
@@ -1148,6 +1194,14 @@ export interface ConversationFileRef {
|
|
|
1148
1194
|
artifact_path: string;
|
|
1149
1195
|
}
|
|
1150
1196
|
|
|
1197
|
+
/**
|
|
1198
|
+
* Reference to a file removed from the conversation attachment set.
|
|
1199
|
+
*/
|
|
1200
|
+
export interface ConversationFileRemovedRef {
|
|
1201
|
+
/** Client-generated unique ID */
|
|
1202
|
+
id: string;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1151
1205
|
/**
|
|
1152
1206
|
* Get the Redis pub/sub channel name for workflow messages.
|
|
1153
1207
|
* Used by both publishers (workflow activities, studio-server) and subscribers (zeno-server, clients).
|
|
@@ -1169,9 +1223,9 @@ export function getWorkflowUpdatesKey(workflowRunId: string): string {
|
|
|
1169
1223
|
export interface PlanTask {
|
|
1170
1224
|
id: number;
|
|
1171
1225
|
goal: string;
|
|
1172
|
-
instructions
|
|
1226
|
+
instructions?: string[];
|
|
1173
1227
|
comment?: string;
|
|
1174
|
-
status?:
|
|
1228
|
+
status?: 'pending' | 'in_progress' | 'completed' | 'skipped';
|
|
1175
1229
|
}
|
|
1176
1230
|
|
|
1177
1231
|
export interface Plan {
|
|
@@ -1179,7 +1233,7 @@ export interface Plan {
|
|
|
1179
1233
|
comment?: string;
|
|
1180
1234
|
}
|
|
1181
1235
|
|
|
1182
|
-
export const LOW_PRIORITY_TASK_QUEUE =
|
|
1236
|
+
export const LOW_PRIORITY_TASK_QUEUE = 'low_priority';
|
|
1183
1237
|
|
|
1184
1238
|
/**
|
|
1185
1239
|
* WebSocket message types for bidirectional communication
|
|
@@ -1187,7 +1241,7 @@ export const LOW_PRIORITY_TASK_QUEUE = "low_priority";
|
|
|
1187
1241
|
export interface WebSocketSignalMessage {
|
|
1188
1242
|
type: 'signal';
|
|
1189
1243
|
signalName: string;
|
|
1190
|
-
data:
|
|
1244
|
+
data: unknown;
|
|
1191
1245
|
requestId?: string | number;
|
|
1192
1246
|
}
|
|
1193
1247
|
|
|
@@ -1210,15 +1264,9 @@ export interface WebSocketErrorMessage {
|
|
|
1210
1264
|
error: string;
|
|
1211
1265
|
}
|
|
1212
1266
|
|
|
1213
|
-
export type WebSocketClientMessage =
|
|
1214
|
-
| WebSocketSignalMessage
|
|
1215
|
-
| WebSocketPingMessage;
|
|
1267
|
+
export type WebSocketClientMessage = WebSocketSignalMessage | WebSocketPingMessage;
|
|
1216
1268
|
|
|
1217
|
-
export type WebSocketServerMessage =
|
|
1218
|
-
| WebSocketPongMessage
|
|
1219
|
-
| WebSocketAckMessage
|
|
1220
|
-
| WebSocketErrorMessage
|
|
1221
|
-
| AgentMessage;
|
|
1269
|
+
export type WebSocketServerMessage = WebSocketPongMessage | WebSocketAckMessage | WebSocketErrorMessage | AgentMessage;
|
|
1222
1270
|
|
|
1223
1271
|
/**
|
|
1224
1272
|
* Payload for applying actions to a workflow run (e.g., cancel, terminate).
|
|
@@ -1283,7 +1331,17 @@ export interface AgentIntakeWorkflowParams {
|
|
|
1283
1331
|
/**
|
|
1284
1332
|
* Additional model options.
|
|
1285
1333
|
*/
|
|
1286
|
-
model_options?:
|
|
1334
|
+
model_options?: ModelOptions;
|
|
1335
|
+
|
|
1336
|
+
/**
|
|
1337
|
+
* Per-run HTTP timeouts for upstream LLM-provider calls.
|
|
1338
|
+
*/
|
|
1339
|
+
http_timeout?: HttpTimeoutOptions;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* LLM execution config. Prefer this for workflow-rule-driven execution settings.
|
|
1343
|
+
*/
|
|
1344
|
+
config?: InteractionExecutionConfiguration;
|
|
1287
1345
|
|
|
1288
1346
|
/**
|
|
1289
1347
|
* Whether to use semantic layer (MagicPDF) for PDF processing.
|
package/src/sts-token-types.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* STS Token Request Types
|
|
3
3
|
* These types define the structure for token requests to the Security Token Service
|
|
4
4
|
*/
|
|
5
|
+
import type { ProjectRoles } from './project.js';
|
|
5
6
|
|
|
6
7
|
export type TokenType = 'apikey' | 'user' | 'project' | 'environment' | 'agent' | 'service_account';
|
|
7
8
|
export type SigningAlgorithm = 'ES256' | 'RS256';
|
|
@@ -46,13 +47,33 @@ export interface EnvironmentTokenRequest extends BaseTokenRequest {
|
|
|
46
47
|
account_id: string; // Will fetch name and verify project belongs to it
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Agent token for a service account to act as agent on behalf of a user.
|
|
52
|
+
*
|
|
53
|
+
* Two trust paths are supported:
|
|
54
|
+
*
|
|
55
|
+
* - `user_access_token`: a live signed Vertesia token. STS verifies the user context from that token.
|
|
56
|
+
* - `workload_id_token`: a workload acts on behalf of a user. It implies that a full verification
|
|
57
|
+
* will be performed based on the workload identity.
|
|
58
|
+
*/
|
|
50
59
|
export interface AgentTokenRequest extends BaseTokenRequest {
|
|
51
60
|
type: 'agent';
|
|
52
61
|
account_id: string;
|
|
53
62
|
project_id: string; // Will verify it belongs to account
|
|
54
63
|
name?: string;
|
|
55
|
-
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* User information.
|
|
67
|
+
*
|
|
68
|
+
* The value of this field can be either:
|
|
69
|
+
* - a signed Vertesia token used to verify the user context
|
|
70
|
+
* - a user ID prefixed with `user:` to indicate the user on behalf of whom the agent is
|
|
71
|
+
* acting.
|
|
72
|
+
*
|
|
73
|
+
* @example {JsonWebToken}
|
|
74
|
+
* @example user:68100a7c9f3c2b7d11a1b2c3
|
|
75
|
+
*/
|
|
76
|
+
on_behalf_of: string;
|
|
56
77
|
}
|
|
57
78
|
|
|
58
79
|
// Service account token
|
|
@@ -60,10 +81,13 @@ export interface ServiceAccountTokenRequest extends BaseTokenRequest {
|
|
|
60
81
|
type: 'service_account';
|
|
61
82
|
account_id: string;
|
|
62
83
|
project_id: string; // Will verify it belongs to account
|
|
63
|
-
roles?:
|
|
84
|
+
roles?: ProjectRoles[]; // Optional - roles for the service account token
|
|
64
85
|
name?: string;
|
|
65
86
|
}
|
|
66
87
|
|
|
88
|
+
/**
|
|
89
|
+
* @discriminator type
|
|
90
|
+
*/
|
|
67
91
|
export type IssueTokenRequest =
|
|
68
92
|
| ApiKeyTokenRequest
|
|
69
93
|
| UserTokenRequest
|
|
@@ -108,6 +132,8 @@ export function isServiceAccountRequest(req: IssueTokenRequest): req is ServiceA
|
|
|
108
132
|
// Response types
|
|
109
133
|
export interface TokenResponse {
|
|
110
134
|
token: string;
|
|
135
|
+
token_type?: string;
|
|
136
|
+
expires_in?: number;
|
|
111
137
|
}
|
|
112
138
|
|
|
113
139
|
export interface IssueTokenResponse {
|
|
@@ -118,6 +144,6 @@ export interface IssueTokenResponse {
|
|
|
118
144
|
|
|
119
145
|
export interface ValidateTokenResponse {
|
|
120
146
|
valid: boolean;
|
|
121
|
-
payload?:
|
|
147
|
+
payload?: unknown;
|
|
122
148
|
error?: string;
|
|
123
149
|
}
|
package/src/tool-execution.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface ToolExecutionMetadata {
|
|
|
39
39
|
/**
|
|
40
40
|
* App-specific settings
|
|
41
41
|
*/
|
|
42
|
-
app_settings?: Record<string,
|
|
42
|
+
app_settings?: Record<string, unknown>;
|
|
43
43
|
/**
|
|
44
44
|
* Endpoint overrides from workflow config (takes precedence over JWT endpoints)
|
|
45
45
|
*/
|
|
@@ -47,5 +47,5 @@ export interface ToolExecutionMetadata {
|
|
|
47
47
|
/**
|
|
48
48
|
* Additional metadata fields
|
|
49
49
|
*/
|
|
50
|
-
[key: string]:
|
|
50
|
+
[key: string]: unknown;
|
|
51
51
|
}
|