@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/agent-run.ts
CHANGED
|
@@ -12,12 +12,26 @@
|
|
|
12
12
|
* (workflowId, runId) are internal server concerns.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
import type { UserChannel } from '../email.js';
|
|
16
|
+
import type {
|
|
17
|
+
AgentSearchScope,
|
|
18
|
+
ConversationVisibility,
|
|
19
|
+
InteractionExecutionConfiguration,
|
|
20
|
+
InteractionRef,
|
|
21
|
+
RunSource,
|
|
22
|
+
} from '../interaction.js';
|
|
23
|
+
import type { AgentEvent } from '../workflow-analytics.js';
|
|
24
|
+
import type { ProcessDefinitionBody, ProcessState } from './process.js';
|
|
25
|
+
import type { UserInputSignal } from './signals.js';
|
|
26
|
+
import type { ContentObjectTypeRef } from './store.js';
|
|
27
|
+
import type {
|
|
28
|
+
AgentMessage,
|
|
29
|
+
CompactMessage,
|
|
30
|
+
ConversationActivityState,
|
|
31
|
+
ConversationFileRef,
|
|
32
|
+
ConversationFileRemovedRef,
|
|
33
|
+
WorkflowRunEvent,
|
|
34
|
+
} from './workflow.js';
|
|
21
35
|
|
|
22
36
|
/**
|
|
23
37
|
* Status of an agent run through its lifecycle.
|
|
@@ -40,14 +54,99 @@ export type AgentRunArchiveState = 'none' | 'pending' | 'archiving' | 'complete'
|
|
|
40
54
|
*/
|
|
41
55
|
export type AgentRunType = 'api' | 'schedule';
|
|
42
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Internal discriminator key for documents stored in the agent_runs collection.
|
|
59
|
+
*/
|
|
60
|
+
export type RunKind = 'agent' | 'process';
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Public-facing runtime mode.
|
|
64
|
+
*/
|
|
65
|
+
export type RunType = 'autonomous' | 'supervised' | 'programmatic';
|
|
66
|
+
export type ProcessRunType = 'supervised' | 'programmatic';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Shared fields for all records stored in the agent_runs collection.
|
|
70
|
+
*/
|
|
71
|
+
export interface RunBase {
|
|
72
|
+
/** The stable identifier used by all client code */
|
|
73
|
+
id: string;
|
|
74
|
+
|
|
75
|
+
/** Internal discriminator key */
|
|
76
|
+
run_kind: RunKind;
|
|
77
|
+
|
|
78
|
+
/** Public-facing runtime mode */
|
|
79
|
+
run_type: RunType;
|
|
80
|
+
|
|
81
|
+
/** Account ID */
|
|
82
|
+
account: string;
|
|
83
|
+
|
|
84
|
+
/** Project ID */
|
|
85
|
+
project: string;
|
|
86
|
+
|
|
87
|
+
/** Temporal workflow ID (stable across continueAsNew) */
|
|
88
|
+
workflow_id?: string;
|
|
89
|
+
|
|
90
|
+
/** First Temporal workflow run ID (used for Redis channel and artifact resolution) */
|
|
91
|
+
first_workflow_run_id?: string;
|
|
92
|
+
|
|
93
|
+
/** Artifact storage path for this run */
|
|
94
|
+
artifacts_path?: string;
|
|
95
|
+
|
|
96
|
+
/** Current status of the run */
|
|
97
|
+
status: AgentRunStatus;
|
|
98
|
+
|
|
99
|
+
/** Whether the run is currently working or idle */
|
|
100
|
+
activity_state?: ConversationActivityState;
|
|
101
|
+
|
|
102
|
+
/** Conversation/process visibility */
|
|
103
|
+
visibility?: ConversationVisibility;
|
|
104
|
+
|
|
105
|
+
/** User or service that initiated the run */
|
|
106
|
+
started_by: string;
|
|
107
|
+
|
|
108
|
+
/** When the run started */
|
|
109
|
+
started_at: Date;
|
|
110
|
+
|
|
111
|
+
/** When the run completed (or failed/cancelled) */
|
|
112
|
+
completed_at?: Date;
|
|
113
|
+
|
|
114
|
+
/** Short human-readable title */
|
|
115
|
+
title?: string;
|
|
116
|
+
|
|
117
|
+
/** User-defined or system tags for categorization */
|
|
118
|
+
tags?: string[];
|
|
119
|
+
|
|
120
|
+
/** Categories for organizing runs */
|
|
121
|
+
categories?: string[];
|
|
122
|
+
|
|
123
|
+
/** How the run was started */
|
|
124
|
+
source?: RunSource;
|
|
125
|
+
|
|
126
|
+
/** Replacement for legacy AgentRun.type */
|
|
127
|
+
source_type?: AgentRunType;
|
|
128
|
+
|
|
129
|
+
/** Schedule ID — set when this run was triggered by a Temporal schedule */
|
|
130
|
+
schedule_id?: string;
|
|
131
|
+
|
|
132
|
+
/** Archive lifecycle state */
|
|
133
|
+
archive_state?: AgentRunArchiveState;
|
|
134
|
+
|
|
135
|
+
/** Timestamp when the document was created */
|
|
136
|
+
created_at: Date;
|
|
137
|
+
|
|
138
|
+
/** Timestamp when the document was last updated */
|
|
139
|
+
updated_at: Date;
|
|
140
|
+
}
|
|
141
|
+
|
|
43
142
|
/**
|
|
44
143
|
* Shared fields between CreateAgentRunPayload and AgentRun.
|
|
45
144
|
*
|
|
46
145
|
* @typeParam TData - The interaction's expected input data type.
|
|
47
146
|
* @typeParam TProperties - The content type's property schema.
|
|
48
147
|
*/
|
|
49
|
-
export interface AgentRunBase<TData = Record<string,
|
|
50
|
-
/** Interaction ID or code (e.g. "sys:generic_question") */
|
|
148
|
+
export interface AgentRunBase<TData = Record<string, unknown>, TProperties = Record<string, unknown>> {
|
|
149
|
+
/** Interaction ID or code (e.g. "sys:generic_question"). */
|
|
51
150
|
interaction: string;
|
|
52
151
|
|
|
53
152
|
/** Input parameters, typed per interaction */
|
|
@@ -87,6 +186,11 @@ export interface AgentRunBase<TData = Record<string, any>, TProperties = Record<
|
|
|
87
186
|
schedule_id?: string;
|
|
88
187
|
|
|
89
188
|
/** How the run was created */
|
|
189
|
+
source_type?: AgentRunType;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @deprecated Use source_type for creation source and run_type for runtime mode.
|
|
193
|
+
*/
|
|
90
194
|
type?: AgentRunType;
|
|
91
195
|
}
|
|
92
196
|
|
|
@@ -99,15 +203,11 @@ export interface AgentRunBase<TData = Record<string, any>, TProperties = Record<
|
|
|
99
203
|
* @typeParam TData - The interaction's expected input data type.
|
|
100
204
|
* @typeParam TProperties - The content type's property schema.
|
|
101
205
|
*/
|
|
102
|
-
export interface AgentRun<TData = Record<string,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
account: string;
|
|
108
|
-
|
|
109
|
-
/** Project ID */
|
|
110
|
-
project: string;
|
|
206
|
+
export interface AgentRun<TData = Record<string, unknown>, TProperties = Record<string, unknown>>
|
|
207
|
+
extends RunBase,
|
|
208
|
+
AgentRunBase<TData, TProperties> {
|
|
209
|
+
run_kind: 'agent';
|
|
210
|
+
run_type: 'autonomous';
|
|
111
211
|
|
|
112
212
|
// --- Temporal workflow references ---
|
|
113
213
|
|
|
@@ -168,23 +268,62 @@ export interface AgentRun<TData = Record<string, any>, TProperties = Record<stri
|
|
|
168
268
|
|
|
169
269
|
/** Source agent run ID when this run was forked (enables message history chaining) */
|
|
170
270
|
forked_from?: string;
|
|
271
|
+
}
|
|
171
272
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
|
|
273
|
+
export interface ProcessRunConfig {
|
|
274
|
+
model?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Free-form message from the user when starting a run. Passed to the
|
|
277
|
+
* orchestrator LLM in supervised mode; stored on the run regardless
|
|
278
|
+
* so programmatic runs retain the intent that triggered them.
|
|
279
|
+
*/
|
|
280
|
+
user_message?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Optional monitor workflow used when a process is launched as a
|
|
283
|
+
* conversation workstream. The process workflow sends checkpoint status
|
|
284
|
+
* signals to this monitor so long-running human-task processes do not need
|
|
285
|
+
* tight polling.
|
|
286
|
+
*/
|
|
287
|
+
process_workstream_monitor?: {
|
|
288
|
+
monitor_workflow_id: string;
|
|
289
|
+
launch_id?: string;
|
|
290
|
+
workstream_id?: string;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
176
293
|
|
|
177
|
-
|
|
178
|
-
|
|
294
|
+
export interface ProcessRun extends RunBase {
|
|
295
|
+
run_kind: 'process';
|
|
296
|
+
run_type: ProcessRunType;
|
|
297
|
+
process_id?: string;
|
|
298
|
+
process_definition_snapshot: ProcessDefinitionBody;
|
|
299
|
+
process_version?: number;
|
|
300
|
+
process_state: ProcessState;
|
|
301
|
+
config?: ProcessRunConfig;
|
|
179
302
|
}
|
|
180
303
|
|
|
304
|
+
export type AnyAgentRun = AgentRun | ProcessRun;
|
|
305
|
+
export type AutonomousRunResponse<TData = Record<string, unknown>, TProperties = Record<string, unknown>> = AgentRun<
|
|
306
|
+
TData,
|
|
307
|
+
TProperties
|
|
308
|
+
>;
|
|
309
|
+
export type SupervisedRunResponse = ProcessRun & { run_type: 'supervised' };
|
|
310
|
+
export type ProgrammaticRunResponse = ProcessRun & { run_type: 'programmatic' };
|
|
311
|
+
/**
|
|
312
|
+
* @discriminator run_type
|
|
313
|
+
*/
|
|
314
|
+
export type AgentRunResponse<TData = Record<string, unknown>, TProperties = Record<string, unknown>> =
|
|
315
|
+
| AutonomousRunResponse<TData, TProperties>
|
|
316
|
+
| SupervisedRunResponse
|
|
317
|
+
| ProgrammaticRunResponse;
|
|
318
|
+
|
|
181
319
|
/**
|
|
182
320
|
* Payload to create and start a new agent run.
|
|
183
321
|
*
|
|
184
322
|
* @typeParam TData - The interaction's expected input data type.
|
|
185
323
|
* @typeParam TProperties - The content type's property schema.
|
|
186
324
|
*/
|
|
187
|
-
export interface CreateAgentRunPayload<TData = Record<string,
|
|
325
|
+
export interface CreateAgentRunPayload<TData = Record<string, unknown>, TProperties = Record<string, unknown>>
|
|
326
|
+
extends AgentRunBase<TData, TProperties> {
|
|
188
327
|
/** Search scope for RAG queries */
|
|
189
328
|
search_scope?: AgentSearchScope;
|
|
190
329
|
|
|
@@ -207,20 +346,68 @@ export interface CreateAgentRunPayload<TData = Record<string, any>, TProperties
|
|
|
207
346
|
started_by?: string;
|
|
208
347
|
}
|
|
209
348
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
349
|
+
export interface ProcessRunInputPayload<TData = Record<string, unknown>, TSource = RunSource> {
|
|
350
|
+
process_id?: string;
|
|
351
|
+
/** Optional published process version to pin. Defaults to the latest/head revision. */
|
|
352
|
+
process_version?: number;
|
|
353
|
+
process_definition?: ProcessDefinitionBody;
|
|
354
|
+
data?: TData;
|
|
355
|
+
config?: ProcessRunConfig;
|
|
356
|
+
visibility?: ConversationVisibility;
|
|
357
|
+
tags?: string[];
|
|
358
|
+
categories?: string[];
|
|
359
|
+
source?: TSource;
|
|
360
|
+
started_by?: string;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export interface CreateProcessRunPayload<TData = Record<string, unknown>, TSource = RunSource>
|
|
364
|
+
extends ProcessRunInputPayload<TData, TSource> {
|
|
365
|
+
run_type: ProcessRunType;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface RecordRunWorkflowPayload {
|
|
369
|
+
/** Temporal workflow id. */
|
|
220
370
|
workflow_id: string;
|
|
371
|
+
/** First Temporal run id for this workflow. Required when the workflow has already started. */
|
|
372
|
+
first_workflow_run_id?: string;
|
|
373
|
+
}
|
|
221
374
|
|
|
222
|
-
|
|
375
|
+
/**
|
|
376
|
+
* @internal Used by workflow activities that need to create a stable run
|
|
377
|
+
* document for a workflow they already own.
|
|
378
|
+
*/
|
|
379
|
+
export interface RecordAgentRunPayload<TData = Record<string, unknown>> extends RecordRunWorkflowPayload {
|
|
380
|
+
run_kind?: 'agent';
|
|
381
|
+
interaction: string;
|
|
223
382
|
first_workflow_run_id: string;
|
|
383
|
+
schedule_id?: string;
|
|
384
|
+
visibility?: ConversationVisibility;
|
|
385
|
+
data?: TData;
|
|
386
|
+
type?: AgentRunType;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* @internal Used by process workflows to reserve a child ProcessRun before
|
|
391
|
+
* starting its Temporal child workflow.
|
|
392
|
+
*/
|
|
393
|
+
export interface RecordProcessRunPayload<TData = Record<string, unknown>, TSource = RunSource>
|
|
394
|
+
extends ProcessRunInputPayload<TData, TSource>,
|
|
395
|
+
RecordRunWorkflowPayload {
|
|
396
|
+
run_kind: 'process';
|
|
397
|
+
run_type?: ProcessRunType;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export type RecordRunPayload<TData = Record<string, unknown>, TSource = RunSource> =
|
|
401
|
+
| RecordAgentRunPayload<TData>
|
|
402
|
+
| RecordProcessRunPayload<TData, TSource>;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* @internal Attaches the first Temporal run id after a pre-created run record
|
|
406
|
+
* has successfully started its workflow.
|
|
407
|
+
*/
|
|
408
|
+
export interface BindRunWorkflowPayload extends Required<RecordRunWorkflowPayload> {
|
|
409
|
+
status?: AgentRunStatus;
|
|
410
|
+
activity_state?: ConversationActivityState;
|
|
224
411
|
}
|
|
225
412
|
|
|
226
413
|
/**
|
|
@@ -240,6 +427,8 @@ export interface UpdateAgentRunStatusPayload {
|
|
|
240
427
|
title?: string;
|
|
241
428
|
topic?: string;
|
|
242
429
|
lessons_learned?: string[];
|
|
430
|
+
/** Shallow-merged into the run's existing properties. */
|
|
431
|
+
properties?: Record<string, unknown>;
|
|
243
432
|
/** ES-only: conversation content text (not stored in MongoDB) */
|
|
244
433
|
content?: string;
|
|
245
434
|
/** Archive state fields (set by the archive workflow) */
|
|
@@ -247,6 +436,8 @@ export interface UpdateAgentRunStatusPayload {
|
|
|
247
436
|
archived_at?: string;
|
|
248
437
|
archive_version?: number;
|
|
249
438
|
last_archive_error?: string;
|
|
439
|
+
sequence?: number;
|
|
440
|
+
process_state?: ProcessState;
|
|
250
441
|
}
|
|
251
442
|
|
|
252
443
|
/**
|
|
@@ -255,6 +446,7 @@ export interface UpdateAgentRunStatusPayload {
|
|
|
255
446
|
export type SignalAgentPayload =
|
|
256
447
|
| UserInputSignal
|
|
257
448
|
| ConversationFileRef
|
|
449
|
+
| ConversationFileRemovedRef
|
|
258
450
|
| Record<string, unknown>;
|
|
259
451
|
|
|
260
452
|
/**
|
|
@@ -282,6 +474,7 @@ export interface StreamAgentRunQuery extends AgentRunUpdatesQuery {
|
|
|
282
474
|
|
|
283
475
|
export interface AgentRunDetailsQuery {
|
|
284
476
|
include_history?: boolean;
|
|
477
|
+
hydrate_payloads?: boolean;
|
|
285
478
|
}
|
|
286
479
|
|
|
287
480
|
export type AgentArtifactVisibility = 'user' | 'internal' | 'all';
|
|
@@ -347,9 +540,7 @@ export interface AgentRunDetailsHistoryStreamEvent {
|
|
|
347
540
|
/**
|
|
348
541
|
* Control payload emitted by the agent details SSE stream.
|
|
349
542
|
*/
|
|
350
|
-
export type AgentRunDetailsControlStreamEvent =
|
|
351
|
-
| { type: 'continueAsNew'; newRunId: string }
|
|
352
|
-
| { type: 'done' };
|
|
543
|
+
export type AgentRunDetailsControlStreamEvent = { type: 'continueAsNew'; newRunId: string } | { type: 'done' };
|
|
353
544
|
|
|
354
545
|
/**
|
|
355
546
|
* Error payload emitted by the agent details SSE stream.
|
|
@@ -404,6 +595,12 @@ export interface ListAgentRunsQuery {
|
|
|
404
595
|
/** Filter by run type */
|
|
405
596
|
type?: AgentRunType;
|
|
406
597
|
|
|
598
|
+
/** Filter by public runtime mode */
|
|
599
|
+
run_type?: RunType | RunType[];
|
|
600
|
+
|
|
601
|
+
/** Filter by internal run discriminator */
|
|
602
|
+
run_kind?: RunKind;
|
|
603
|
+
|
|
407
604
|
/** Field to sort by */
|
|
408
605
|
sort?: 'started_at' | 'updated_at';
|
|
409
606
|
|
|
@@ -412,7 +609,7 @@ export interface ListAgentRunsQuery {
|
|
|
412
609
|
}
|
|
413
610
|
|
|
414
611
|
export interface ListAgentRunsResponse {
|
|
415
|
-
items:
|
|
612
|
+
items: AgentRunResponse[];
|
|
416
613
|
total_count: number;
|
|
417
614
|
next_cursor: string | null;
|
|
418
615
|
}
|
|
@@ -442,6 +639,9 @@ export interface SearchAgentRunsQuery {
|
|
|
442
639
|
/** Filter by content type name */
|
|
443
640
|
content_type_name?: string;
|
|
444
641
|
|
|
642
|
+
/** Filter by public runtime mode */
|
|
643
|
+
run_type?: RunType | RunType[];
|
|
644
|
+
|
|
445
645
|
/** Only return runs started after this date */
|
|
446
646
|
since?: Date;
|
|
447
647
|
|
|
@@ -453,6 +653,16 @@ export interface SearchAgentRunsQuery {
|
|
|
453
653
|
|
|
454
654
|
/** Offset for pagination */
|
|
455
655
|
offset?: number;
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Multi-field sort. Each item has the form `field` or `field:order`, where
|
|
659
|
+
* field is one of: `started_at`, `updated_at`
|
|
660
|
+
* order is one of: `asc`, `desc` (default: `desc`)
|
|
661
|
+
* The first item is the primary sort; subsequent items are tie-breakers.
|
|
662
|
+
* Example: `['updated_at:desc', 'started_at:asc']`.
|
|
663
|
+
* Defaults to `['started_at:desc']` when omitted.
|
|
664
|
+
*/
|
|
665
|
+
sort?: string[];
|
|
456
666
|
}
|
|
457
667
|
|
|
458
668
|
/**
|
|
@@ -466,7 +676,13 @@ export interface AgentRunSearchHit {
|
|
|
466
676
|
score: number;
|
|
467
677
|
|
|
468
678
|
/** Interaction ID */
|
|
469
|
-
interaction
|
|
679
|
+
interaction?: string;
|
|
680
|
+
|
|
681
|
+
/** Public-facing runtime mode */
|
|
682
|
+
run_type?: RunType;
|
|
683
|
+
|
|
684
|
+
/** Internal run discriminator */
|
|
685
|
+
run_kind?: RunKind;
|
|
470
686
|
|
|
471
687
|
/** Human-readable interaction name */
|
|
472
688
|
interaction_name?: string;
|
|
@@ -517,6 +733,11 @@ export interface AgentRunSearchHit {
|
|
|
517
733
|
schedule_id?: string;
|
|
518
734
|
|
|
519
735
|
/** How the run was created */
|
|
736
|
+
source_type?: AgentRunType;
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* @deprecated Use source_type for creation source and run_type for runtime mode.
|
|
740
|
+
*/
|
|
520
741
|
type?: AgentRunType;
|
|
521
742
|
|
|
522
743
|
/** Created timestamp */
|
|
@@ -547,10 +768,16 @@ export interface AgentRunInternals {
|
|
|
547
768
|
first_workflow_run_id?: string;
|
|
548
769
|
artifacts_path?: string;
|
|
549
770
|
status: AgentRunStatus;
|
|
550
|
-
|
|
771
|
+
run_kind?: RunKind;
|
|
772
|
+
run_type?: RunType;
|
|
773
|
+
interaction?: string;
|
|
551
774
|
interaction_name?: string;
|
|
552
775
|
config?: InteractionExecutionConfiguration;
|
|
553
|
-
interactive
|
|
776
|
+
interactive?: boolean;
|
|
777
|
+
process_id?: string;
|
|
778
|
+
process_definition_snapshot?: ProcessDefinitionBody;
|
|
779
|
+
process_version?: number;
|
|
780
|
+
process_state?: ProcessState;
|
|
554
781
|
started_at: Date;
|
|
555
782
|
completed_at?: Date;
|
|
556
783
|
started_by: string;
|
package/src/store/collections.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseObject } from
|
|
2
|
-
import { ColumnLayout, ContentObjectTypeRef } from
|
|
1
|
+
import type { BaseObject } from './common.js';
|
|
2
|
+
import type { ColumnLayout, ContentObjectTypeRef } from './store.js';
|
|
3
3
|
|
|
4
4
|
export enum CollectionStatus {
|
|
5
|
-
active =
|
|
6
|
-
archived =
|
|
5
|
+
active = 'active',
|
|
6
|
+
archived = 'archived',
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export interface CreateCollectionPayload {
|
|
@@ -12,13 +12,13 @@ export interface CreateCollectionPayload {
|
|
|
12
12
|
description?: string;
|
|
13
13
|
skip_head_sync?: boolean;
|
|
14
14
|
tags?: string[];
|
|
15
|
-
type?: string;
|
|
16
|
-
query?: Record<string,
|
|
17
|
-
properties?: Record<string,
|
|
15
|
+
type?: string | null;
|
|
16
|
+
query?: Record<string, unknown>;
|
|
17
|
+
properties?: Record<string, unknown>;
|
|
18
18
|
parent?: string | null;
|
|
19
19
|
table_layout?: ColumnLayout[] | null;
|
|
20
20
|
allowed_types?: string[];
|
|
21
|
-
updated_by?: string
|
|
21
|
+
updated_by?: string;
|
|
22
22
|
shared_properties?: string[];
|
|
23
23
|
/** BLP sensitivity level for member documents */
|
|
24
24
|
sensitivity?: number;
|
|
@@ -37,7 +37,7 @@ export interface CollectionItem extends BaseObject {
|
|
|
37
37
|
// A ref to the object type
|
|
38
38
|
type?: ContentObjectTypeRef;
|
|
39
39
|
/**
|
|
40
|
-
* A flag to indicate whether to track and sync member HEAD revisions.
|
|
40
|
+
* A flag to indicate whether to track and sync member HEAD revisions.
|
|
41
41
|
* The default is to sync HEAD revisions for collection members (skip_head_sync: false)
|
|
42
42
|
*/
|
|
43
43
|
skip_head_sync: boolean;
|
|
@@ -59,8 +59,8 @@ export interface CollectionItem extends BaseObject {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
export interface Collection extends CollectionItem {
|
|
62
|
-
properties
|
|
63
|
-
query?: Record<string,
|
|
62
|
+
properties?: Record<string, unknown>;
|
|
63
|
+
query?: Record<string, unknown>;
|
|
64
64
|
security?: Record<string, string[]>; // ACL for collection access
|
|
65
65
|
/** BLP sensitivity level — propagated to member documents (max across collections) */
|
|
66
66
|
sensitivity?: number;
|
|
@@ -115,12 +115,12 @@ export interface CollectionChildrenUpdateResult {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
export interface CollectionMembersUpdatePayload {
|
|
118
|
-
action:
|
|
118
|
+
action: 'add' | 'delete';
|
|
119
119
|
members: string[];
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
export interface CollectionChildrenUpdatePayload {
|
|
123
|
-
action:
|
|
123
|
+
action: 'add' | 'delete';
|
|
124
124
|
children: string[];
|
|
125
125
|
}
|
|
126
126
|
|
package/src/store/common.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CompletionResult, ExecutionTokenUsage, StatelessExecutionOptions, ToolUse } from
|
|
2
|
-
import { ConversationStripOptions, ResolvedInteractionExecutionInfo, UserChannel } from
|
|
3
|
-
import { ExecutionRunDocRef } from
|
|
4
|
-
import { Plan, WorkflowAncestor } from
|
|
1
|
+
import type { CompletionResult, ExecutionTokenUsage, StatelessExecutionOptions, ToolUse } from '@llumiverse/common';
|
|
2
|
+
import type { ConversationStripOptions, ResolvedInteractionExecutionInfo, UserChannel } from '../interaction.js';
|
|
3
|
+
import type { ExecutionRunDocRef } from '../runs.js';
|
|
4
|
+
import type { Plan, WorkflowAncestor } from './workflow.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Lightweight tool reference for activity payloads.
|
|
@@ -13,6 +13,34 @@ export interface ToolReference {
|
|
|
13
13
|
stored_at: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
/** Reference to text content externalized to agent artifact storage. */
|
|
17
|
+
export interface TextArtifactReference {
|
|
18
|
+
storage_id: string;
|
|
19
|
+
artifact_path: string;
|
|
20
|
+
display_ref: string;
|
|
21
|
+
sha256: string;
|
|
22
|
+
size_bytes: number;
|
|
23
|
+
content_type: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Sidecar metadata for generated tool input fields that were stored outside
|
|
28
|
+
* model-visible tool_input. Keyed by tool_use.id on ConversationState.
|
|
29
|
+
*/
|
|
30
|
+
export interface ExternalizedToolInputRef {
|
|
31
|
+
tool_name: string;
|
|
32
|
+
input_path: ['content'];
|
|
33
|
+
ref: TextArtifactReference;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ExternalizedToolInputRefs {
|
|
37
|
+
[toolUseId: string]: ExternalizedToolInputRef[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function toolInputRefsArtifactPath(storageId: string): string {
|
|
41
|
+
return `agents/${storageId}/tool-input-refs.json`;
|
|
42
|
+
}
|
|
43
|
+
|
|
16
44
|
/**
|
|
17
45
|
* Conversation state passed between workflow activities.
|
|
18
46
|
* Contains all context needed to continue a multi-turn agent conversation.
|
|
@@ -38,6 +66,15 @@ export interface ConversationState {
|
|
|
38
66
|
*/
|
|
39
67
|
tool_use?: ToolUse[];
|
|
40
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Transport sidecar for large generated tool input fields.
|
|
71
|
+
*
|
|
72
|
+
* These refs are intentionally kept out of tool_use.tool_input so they are
|
|
73
|
+
* not shown to the model. Tool execution hydrates them from artifact storage
|
|
74
|
+
* immediately before activity validation.
|
|
75
|
+
*/
|
|
76
|
+
tool_input_refs?: ExternalizedToolInputRefs;
|
|
77
|
+
|
|
41
78
|
/**
|
|
42
79
|
* The output of the this conversation step
|
|
43
80
|
*/
|
|
@@ -121,7 +158,7 @@ export interface ConversationState {
|
|
|
121
158
|
/**
|
|
122
159
|
* Tools that have been unlocked by skills during the conversation.
|
|
123
160
|
* These tools were initially hidden (default: false) but became available
|
|
124
|
-
* when a skill with
|
|
161
|
+
* when a skill with tools was called.
|
|
125
162
|
*/
|
|
126
163
|
unlocked_tools?: string[];
|
|
127
164
|
|