@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/store.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { ComputedFacetResponse } from '../facets.js';
|
|
2
|
+
import type { JSONObject } from '../json.js';
|
|
3
|
+
import type { SearchPayload } from '../payload.js';
|
|
4
|
+
import type { SupportedEmbeddingTypes } from '../project.js';
|
|
5
|
+
import type { ComplexSearchQuery } from '../query.js';
|
|
6
|
+
import type { BaseObject } from './common.js';
|
|
5
7
|
|
|
6
8
|
export enum ContentObjectApiHeaders {
|
|
7
9
|
COLLECTION_ID = 'x-collection-id',
|
|
@@ -53,12 +55,12 @@ export enum DataStoreApiHeaders {
|
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
export enum ContentObjectStatus {
|
|
56
|
-
created =
|
|
57
|
-
processing =
|
|
58
|
-
ready =
|
|
59
|
-
completed =
|
|
60
|
-
failed =
|
|
61
|
-
archived =
|
|
58
|
+
created = 'created',
|
|
59
|
+
processing = 'processing', // the was created and still processing
|
|
60
|
+
ready = 'ready', // the object is rendered and ready to be used
|
|
61
|
+
completed = 'completed',
|
|
62
|
+
failed = 'failed',
|
|
63
|
+
archived = 'archived',
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export interface Embedding {
|
|
@@ -98,11 +100,7 @@ export interface SetObjectEmbeddingsResponse {
|
|
|
98
100
|
type?: Embedding;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
export
|
|
102
|
-
id?: string;
|
|
103
|
-
code?: string;
|
|
104
|
-
name: string;
|
|
105
|
-
}
|
|
103
|
+
export type ContentObjectApiTypeRef = ContentObjectTypeRef;
|
|
106
104
|
|
|
107
105
|
export interface ContentObjectApiRevision {
|
|
108
106
|
parent?: string;
|
|
@@ -112,11 +110,11 @@ export interface ContentObjectApiRevision {
|
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
export interface ContentObjectItemApiResponse extends BaseObject {
|
|
115
|
-
parent
|
|
113
|
+
parent?: string;
|
|
116
114
|
location: string;
|
|
117
115
|
status: ContentObjectStatus;
|
|
118
116
|
type?: ContentObjectApiTypeRef;
|
|
119
|
-
content
|
|
117
|
+
content?: ContentSource;
|
|
120
118
|
external_id?: string;
|
|
121
119
|
properties: Record<string, unknown>;
|
|
122
120
|
metadata?: Record<string, unknown>;
|
|
@@ -143,7 +141,7 @@ export interface ContentObjectApiResponse extends ContentObjectItemApiResponse {
|
|
|
143
141
|
inherited_properties?: InheritedPropertyMetadata[];
|
|
144
142
|
}
|
|
145
143
|
|
|
146
|
-
export interface ContentObject<T =
|
|
144
|
+
export interface ContentObject<T = JSONObject> extends ContentObjectItem<T> {
|
|
147
145
|
text?: string; // the text representation of the object
|
|
148
146
|
text_etag?: string;
|
|
149
147
|
embeddings: Partial<Record<SupportedEmbeddingTypes, Embedding>>;
|
|
@@ -164,12 +162,12 @@ export interface ContentObject<T = any> extends ContentObjectItem<T> {
|
|
|
164
162
|
}
|
|
165
163
|
|
|
166
164
|
export enum ContentNature {
|
|
167
|
-
Video =
|
|
168
|
-
Image =
|
|
169
|
-
Audio =
|
|
170
|
-
Document =
|
|
171
|
-
Code =
|
|
172
|
-
Other =
|
|
165
|
+
Video = 'video',
|
|
166
|
+
Image = 'image',
|
|
167
|
+
Audio = 'audio',
|
|
168
|
+
Document = 'document',
|
|
169
|
+
Code = 'code',
|
|
170
|
+
Other = 'other',
|
|
173
171
|
}
|
|
174
172
|
|
|
175
173
|
export interface Dimensions {
|
|
@@ -200,15 +198,10 @@ export interface RenditionWithDimensions extends Rendition {
|
|
|
200
198
|
dimensions: Dimensions;
|
|
201
199
|
}
|
|
202
200
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
export
|
|
207
|
-
|
|
208
|
-
export const POSTER_RENDITION_NAME = "Poster";
|
|
209
|
-
export const AUDIO_RENDITION_NAME = "Audio";
|
|
210
|
-
export const WEB_VIDEO_RENDITION_NAME = "Web";
|
|
211
|
-
export const PDF_RENDITION_NAME = "PDF";
|
|
201
|
+
export const POSTER_RENDITION_NAME = 'Poster';
|
|
202
|
+
export const AUDIO_RENDITION_NAME = 'Audio';
|
|
203
|
+
export const WEB_VIDEO_RENDITION_NAME = 'Web';
|
|
204
|
+
export const PDF_RENDITION_NAME = 'PDF';
|
|
212
205
|
|
|
213
206
|
export interface ContentMetadata {
|
|
214
207
|
// Common fields for all media types
|
|
@@ -216,7 +209,7 @@ export interface ContentMetadata {
|
|
|
216
209
|
size?: number; // in bytes
|
|
217
210
|
languages?: string[];
|
|
218
211
|
location?: Location;
|
|
219
|
-
generation_runs
|
|
212
|
+
generation_runs?: GenerationRunMetadata[];
|
|
220
213
|
etag?: string;
|
|
221
214
|
renditions?: Rendition[];
|
|
222
215
|
}
|
|
@@ -258,8 +251,8 @@ export interface DocumentMetadata extends ContentMetadata {
|
|
|
258
251
|
features_requested?: string[];
|
|
259
252
|
zones_requested?: string[];
|
|
260
253
|
table_count?: number;
|
|
261
|
-
image_count
|
|
262
|
-
zone_count
|
|
254
|
+
image_count?: number;
|
|
255
|
+
zone_count?: number;
|
|
263
256
|
needs_ocr_count?: number;
|
|
264
257
|
};
|
|
265
258
|
sections?: TextSection[]; // List of sections with descriptions and line indexes
|
|
@@ -272,7 +265,7 @@ export interface Transcript {
|
|
|
272
265
|
}
|
|
273
266
|
|
|
274
267
|
export const TextExtractionStatus = {
|
|
275
|
-
success:
|
|
268
|
+
success: 'success',
|
|
276
269
|
} as const;
|
|
277
270
|
|
|
278
271
|
export interface TranscriptMediaResult {
|
|
@@ -328,8 +321,8 @@ export interface RevisionInfo {
|
|
|
328
321
|
/**
|
|
329
322
|
* The content object item is a simplified version of the ContentObject that is returned by the store API when listing objects.
|
|
330
323
|
*/
|
|
331
|
-
export interface ContentObjectItem<T =
|
|
332
|
-
parent
|
|
324
|
+
export interface ContentObjectItem<T = JSONObject> extends BaseObject {
|
|
325
|
+
parent?: string; // the id of the direct parent object. The root object doesn't have the parent field set.
|
|
333
326
|
|
|
334
327
|
/** An optional path based location for the object */
|
|
335
328
|
location: string; // the path of the parent object
|
|
@@ -352,7 +345,7 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
|
|
|
352
345
|
/**
|
|
353
346
|
* Content source information, typically a link to an object store
|
|
354
347
|
*/
|
|
355
|
-
content
|
|
348
|
+
content?: ContentSource;
|
|
356
349
|
|
|
357
350
|
/**
|
|
358
351
|
* External identifier for integration with other systems
|
|
@@ -363,12 +356,7 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
|
|
|
363
356
|
properties: T; // a JSON object that describes the object
|
|
364
357
|
|
|
365
358
|
/** Technical metadata of the object */
|
|
366
|
-
metadata?:
|
|
367
|
-
| VideoMetadata
|
|
368
|
-
| AudioMetadata
|
|
369
|
-
| ImageMetadata
|
|
370
|
-
| DocumentMetadata
|
|
371
|
-
| ContentMetadata;
|
|
359
|
+
metadata?: VideoMetadata | AudioMetadata | ImageMetadata | DocumentMetadata | ContentMetadata;
|
|
372
360
|
|
|
373
361
|
/** Token information */
|
|
374
362
|
tokens?: {
|
|
@@ -408,46 +396,64 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
|
|
|
408
396
|
/**
|
|
409
397
|
* When creating from an uploaded file the content should be an URL to the uploaded file
|
|
410
398
|
*/
|
|
411
|
-
export interface CreateContentObjectPayload<T =
|
|
412
|
-
extends Partial<
|
|
413
|
-
Omit<
|
|
414
|
-
ContentObject<T>,
|
|
415
|
-
"id" | "root" | "created_at" | "updated_at" | "type" | "owner"
|
|
416
|
-
>
|
|
417
|
-
> {
|
|
399
|
+
export interface CreateContentObjectPayload<T = JSONObject>
|
|
400
|
+
extends Partial<Omit<ContentObject<T>, 'id' | 'root' | 'created_at' | 'updated_at' | 'type' | 'owner'>> {
|
|
418
401
|
id?: string; // An optional existing object ID to be replaced by the new one
|
|
419
402
|
type?: string; // the object type ID
|
|
420
403
|
generation_run_info?: GenerationRunMetadata;
|
|
421
404
|
}
|
|
422
405
|
|
|
423
|
-
|
|
424
|
-
|
|
406
|
+
type LegacyContentObjectTypeRef = Partial<ContentObjectTypeRef> & {
|
|
407
|
+
ref_type?: 'stored' | 'incode';
|
|
408
|
+
id?: string;
|
|
409
|
+
code?: string;
|
|
410
|
+
name?: string;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
export function getContentTypeRefId(type: ContentObjectTypeRef): string {
|
|
414
|
+
return type.id;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export function withContentObjectTypeRefDiscriminator(
|
|
418
|
+
type: ContentObjectTypeRef | LegacyContentObjectTypeRef,
|
|
419
|
+
): ContentObjectTypeRef {
|
|
420
|
+
const legacyCode = 'code' in type ? type.code : undefined;
|
|
421
|
+
const id = type.id || legacyCode || '';
|
|
422
|
+
const name = type.name || '';
|
|
423
|
+
if (type.ref_type === 'incode' || isInCodeType(id)) {
|
|
424
|
+
return { ref_type: 'incode', id, name };
|
|
425
|
+
}
|
|
426
|
+
return { ref_type: 'stored', id, name };
|
|
425
427
|
}
|
|
426
428
|
|
|
427
429
|
/**
|
|
428
|
-
* Reference to a content object type.
|
|
430
|
+
* Reference to a content object type. `id` is the canonical identifier for both
|
|
431
|
+
* stored and in-code types.
|
|
432
|
+
*/
|
|
433
|
+
/**
|
|
434
|
+
* @discriminator ref_type
|
|
429
435
|
*/
|
|
430
436
|
export type ContentObjectTypeRef = StoredTypeRef | InCodeTypeRef;
|
|
431
437
|
|
|
432
438
|
interface StoredTypeRef {
|
|
439
|
+
ref_type: 'stored';
|
|
433
440
|
/**
|
|
434
441
|
* MongoDB ObjectId string for stored types
|
|
435
442
|
*/
|
|
436
443
|
id: string;
|
|
437
|
-
code?: never;
|
|
438
444
|
name: string;
|
|
439
445
|
}
|
|
440
446
|
|
|
441
447
|
interface InCodeTypeRef {
|
|
442
|
-
|
|
448
|
+
ref_type: 'incode';
|
|
443
449
|
/**
|
|
444
450
|
* Namespaced identifier for in-code types (e.g. "sys:Invoice", "app:myapp:Contract")
|
|
445
451
|
*/
|
|
446
|
-
|
|
452
|
+
id: string;
|
|
447
453
|
name: string;
|
|
448
454
|
}
|
|
449
455
|
|
|
450
|
-
export interface ComplexSearchPayload extends Omit<SearchPayload,
|
|
456
|
+
export interface ComplexSearchPayload extends Omit<SearchPayload, 'query'> {
|
|
451
457
|
query?: ComplexSearchQuery;
|
|
452
458
|
}
|
|
453
459
|
|
|
@@ -472,9 +478,9 @@ export interface ColumnLayout {
|
|
|
472
478
|
/**
|
|
473
479
|
* A default value to be used if the field is not present in the object
|
|
474
480
|
*/
|
|
475
|
-
default?:
|
|
481
|
+
default?: unknown;
|
|
476
482
|
}
|
|
477
|
-
export interface ContentObjectType extends ContentObjectTypeItem {
|
|
483
|
+
export interface ContentObjectType extends ContentObjectTypeItem {}
|
|
478
484
|
export interface ContentObjectTypeItem extends BaseObject {
|
|
479
485
|
is_chunkable?: boolean;
|
|
480
486
|
/**
|
|
@@ -486,14 +492,23 @@ export interface ContentObjectTypeItem extends BaseObject {
|
|
|
486
492
|
* this is only included in ContentObjectTypeItem if explicitly requested
|
|
487
493
|
* It is always included in ContentObjectType
|
|
488
494
|
*/
|
|
489
|
-
object_schema?: Record<string,
|
|
495
|
+
object_schema?: Record<string, unknown>; // an optional JSON schema for the object properties.
|
|
490
496
|
|
|
491
497
|
/**
|
|
492
498
|
* Determines if the content will be validated against the object schema a generation time and save/update time.
|
|
493
499
|
*/
|
|
494
500
|
strict_mode?: boolean;
|
|
495
501
|
}
|
|
496
|
-
export type InCodeTypeDefinition = Pick<
|
|
502
|
+
export type InCodeTypeDefinition = Pick<
|
|
503
|
+
ContentObjectTypeItem,
|
|
504
|
+
'id' | 'name' | 'description' | 'tags' | 'object_schema' | 'table_layout' | 'is_chunkable' | 'strict_mode'
|
|
505
|
+
>;
|
|
506
|
+
export interface ContentObjectTypeCatalogEntry extends InCodeTypeDefinition {
|
|
507
|
+
updated_by?: string;
|
|
508
|
+
created_by?: string;
|
|
509
|
+
created_at?: string;
|
|
510
|
+
updated_at?: string;
|
|
511
|
+
}
|
|
497
512
|
/**
|
|
498
513
|
* The itnerface to be used whend efining types in a plugin app.
|
|
499
514
|
*/
|
|
@@ -509,15 +524,12 @@ export function isInCodeType(typeId: string): boolean {
|
|
|
509
524
|
}
|
|
510
525
|
|
|
511
526
|
export interface CreateContentObjectTypePayload
|
|
512
|
-
extends Omit<
|
|
513
|
-
ContentObjectType,
|
|
514
|
-
"id" | "created_at" | "updated_at" | "created_by" | "updated_by"
|
|
515
|
-
> { }
|
|
527
|
+
extends Omit<ContentObjectType, 'id' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by'> {}
|
|
516
528
|
|
|
517
529
|
export enum WorkflowRuleInputType {
|
|
518
|
-
single =
|
|
519
|
-
multiple =
|
|
520
|
-
none =
|
|
530
|
+
single = 'single',
|
|
531
|
+
multiple = 'multiple',
|
|
532
|
+
none = 'none',
|
|
521
533
|
}
|
|
522
534
|
export interface WorkflowRuleItem extends BaseObject {
|
|
523
535
|
// the name of the workflow function
|
|
@@ -528,11 +540,11 @@ export interface WorkflowRule extends WorkflowRuleItem {
|
|
|
528
540
|
/*
|
|
529
541
|
* mongo matching rules for a content event
|
|
530
542
|
*/
|
|
531
|
-
match?: Record<string,
|
|
543
|
+
match?: Record<string, unknown>;
|
|
532
544
|
/**
|
|
533
545
|
* Activities configuration if any.
|
|
534
546
|
*/
|
|
535
|
-
config?: Record<string,
|
|
547
|
+
config?: Record<string, unknown>;
|
|
536
548
|
|
|
537
549
|
/**
|
|
538
550
|
* Debug mode for the rule
|
|
@@ -557,19 +569,17 @@ export interface CreateWorkflowRulePayload extends UploadWorkflowRulePayload {
|
|
|
557
569
|
endpoint: string; // required
|
|
558
570
|
}
|
|
559
571
|
export interface UploadWorkflowRulePayload
|
|
560
|
-
extends Partial<
|
|
561
|
-
Omit<WorkflowRule, "id" | "created_at" | "updated_at" | "owner">
|
|
562
|
-
> { }
|
|
572
|
+
extends Partial<Omit<WorkflowRule, 'id' | 'created_at' | 'updated_at' | 'owner'>> {}
|
|
563
573
|
|
|
564
574
|
export enum ImageRenditionFormat {
|
|
565
|
-
jpeg =
|
|
566
|
-
png =
|
|
567
|
-
webp =
|
|
575
|
+
jpeg = 'jpeg',
|
|
576
|
+
png = 'png',
|
|
577
|
+
webp = 'webp',
|
|
568
578
|
}
|
|
569
579
|
|
|
570
580
|
export enum MarkdownRenditionFormat {
|
|
571
|
-
docx =
|
|
572
|
-
pdf =
|
|
581
|
+
docx = 'docx',
|
|
582
|
+
pdf = 'pdf',
|
|
573
583
|
}
|
|
574
584
|
|
|
575
585
|
export interface GetRenditionParams {
|
|
@@ -581,14 +591,14 @@ export interface GetRenditionParams {
|
|
|
581
591
|
}
|
|
582
592
|
|
|
583
593
|
export interface GetRenditionResponse {
|
|
584
|
-
status:
|
|
594
|
+
status: 'found' | 'generating' | 'failed';
|
|
585
595
|
renditions?: string[]; //file paths for the renditions
|
|
586
596
|
workflow_run_id?: string;
|
|
587
597
|
}
|
|
588
598
|
|
|
589
599
|
export interface ObjectSearchResponse {
|
|
590
|
-
results: ContentObjectItem
|
|
591
|
-
facets:
|
|
600
|
+
results: ContentObjectItem[];
|
|
601
|
+
facets: ComputedFacetResponse;
|
|
592
602
|
aggregations?: Record<string, unknown>;
|
|
593
603
|
}
|
|
594
604
|
|
|
@@ -643,7 +653,7 @@ export function canGenerateRendition(contentType: string | undefined, format: Re
|
|
|
643
653
|
|
|
644
654
|
// Check exact match first
|
|
645
655
|
const exactMatch = RENDITION_COMPATIBILITY[contentType];
|
|
646
|
-
if (exactMatch
|
|
656
|
+
if (exactMatch?.some((f) => f === formatStr)) {
|
|
647
657
|
return true;
|
|
648
658
|
}
|
|
649
659
|
|
|
@@ -651,7 +661,7 @@ export function canGenerateRendition(contentType: string | undefined, format: Re
|
|
|
651
661
|
const [category] = contentType.split('/');
|
|
652
662
|
const wildcardKey = `${category}/*`;
|
|
653
663
|
const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];
|
|
654
|
-
if (wildcardMatch
|
|
664
|
+
if (wildcardMatch?.some((f) => f === formatStr)) {
|
|
655
665
|
return true;
|
|
656
666
|
}
|
|
657
667
|
|
|
@@ -716,7 +726,7 @@ export interface GetFileUrlPayload {
|
|
|
716
726
|
// Optional filename to use in Content-Disposition for downloads
|
|
717
727
|
name?: string;
|
|
718
728
|
// Optional disposition for downloads (default: attachment)
|
|
719
|
-
disposition?:
|
|
729
|
+
disposition?: 'inline' | 'attachment';
|
|
720
730
|
}
|
|
721
731
|
|
|
722
732
|
export interface GetFileUrlResponse {
|
|
@@ -726,6 +736,22 @@ export interface GetFileUrlResponse {
|
|
|
726
736
|
path: string;
|
|
727
737
|
}
|
|
728
738
|
|
|
739
|
+
export interface EnsureBucketReadAccessPayload {
|
|
740
|
+
principal: string;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
export interface EnsureBucketReadAccessResponse {
|
|
744
|
+
bucket: string;
|
|
745
|
+
principal: string;
|
|
746
|
+
granted: boolean;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
export interface BucketReadAccessStatusResponse {
|
|
750
|
+
bucket: string;
|
|
751
|
+
principal: string;
|
|
752
|
+
hasAccess: boolean;
|
|
753
|
+
}
|
|
754
|
+
|
|
729
755
|
export interface FileMetadataResponse {
|
|
730
756
|
name: string;
|
|
731
757
|
size: number;
|
|
@@ -811,6 +837,6 @@ export interface DeleteFileResult {
|
|
|
811
837
|
}
|
|
812
838
|
|
|
813
839
|
export enum ContentObjectProcessingPriority {
|
|
814
|
-
normal =
|
|
815
|
-
low =
|
|
840
|
+
normal = 'normal',
|
|
841
|
+
low = 'low',
|
|
816
842
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable human task types used by process human_task nodes and agent asks.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export type DurableTaskStatus = 'pending' | 'in_progress' | 'completed' | 'cancelled';
|
|
6
|
+
|
|
7
|
+
export type TaskFieldType = 'string' | 'number' | 'boolean' | 'select' | 'text';
|
|
8
|
+
|
|
9
|
+
export interface TaskField {
|
|
10
|
+
name: string;
|
|
11
|
+
type: TaskFieldType;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
label?: string;
|
|
14
|
+
options?: string[];
|
|
15
|
+
default?: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface TaskSource {
|
|
19
|
+
type: 'process' | 'agent';
|
|
20
|
+
run_id: string;
|
|
21
|
+
node?: string;
|
|
22
|
+
ask_id?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Task {
|
|
26
|
+
id: string;
|
|
27
|
+
account: string;
|
|
28
|
+
project: string;
|
|
29
|
+
title: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
status: DurableTaskStatus;
|
|
32
|
+
assignee?: string;
|
|
33
|
+
fields: TaskField[];
|
|
34
|
+
result?: Record<string, unknown>;
|
|
35
|
+
source: TaskSource;
|
|
36
|
+
due_at?: Date;
|
|
37
|
+
created_at: Date;
|
|
38
|
+
completed_at?: Date;
|
|
39
|
+
updated_at?: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface CreateTaskPayload {
|
|
43
|
+
title: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
assignee?: string;
|
|
46
|
+
fields?: TaskField[];
|
|
47
|
+
source: TaskSource;
|
|
48
|
+
due_at?: Date;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface UpdateTaskPayload {
|
|
52
|
+
title?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
status?: DurableTaskStatus;
|
|
55
|
+
assignee?: string | null;
|
|
56
|
+
fields?: TaskField[];
|
|
57
|
+
due_at?: Date | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface CompleteTaskPayload {
|
|
61
|
+
result: Record<string, unknown>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ListTasksQuery {
|
|
65
|
+
status?: DurableTaskStatus | DurableTaskStatus[];
|
|
66
|
+
assignee?: string;
|
|
67
|
+
run_id?: string;
|
|
68
|
+
source_type?: TaskSource['type'];
|
|
69
|
+
limit?: number;
|
|
70
|
+
offset?: number;
|
|
71
|
+
}
|
package/src/store/temporalio.ts
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* Copied from temporalio
|
|
3
3
|
* The temporalio ParentClosePolicy
|
|
4
4
|
*/
|
|
5
|
-
export type ParentClosePolicyType =
|
|
5
|
+
export type ParentClosePolicyType = 'TERMINATE' | 'ABANDON' | 'REQUEST_CANCEL' | undefined;
|
|
6
6
|
interface ParentClosePolicyI {
|
|
7
|
-
TERMINATE:
|
|
8
|
-
ABANDON:
|
|
9
|
-
REQUEST_CANCEL:
|
|
10
|
-
PARENT_CLOSE_POLICY_UNSPECIFIED: undefined
|
|
11
|
-
PARENT_CLOSE_POLICY_TERMINATE:
|
|
12
|
-
PARENT_CLOSE_POLICY_ABANDON:
|
|
13
|
-
PARENT_CLOSE_POLICY_REQUEST_CANCEL:
|
|
7
|
+
TERMINATE: 'TERMINATE';
|
|
8
|
+
ABANDON: 'ABANDON';
|
|
9
|
+
REQUEST_CANCEL: 'REQUEST_CANCEL';
|
|
10
|
+
PARENT_CLOSE_POLICY_UNSPECIFIED: undefined;
|
|
11
|
+
PARENT_CLOSE_POLICY_TERMINATE: 'TERMINATE';
|
|
12
|
+
PARENT_CLOSE_POLICY_ABANDON: 'ABANDON';
|
|
13
|
+
PARENT_CLOSE_POLICY_REQUEST_CANCEL: 'REQUEST_CANCEL';
|
|
14
14
|
}
|
|
15
15
|
export const ParentClosePolicy = {
|
|
16
16
|
/**
|
|
@@ -18,15 +18,15 @@ export const ParentClosePolicy = {
|
|
|
18
18
|
*
|
|
19
19
|
* @default
|
|
20
20
|
*/
|
|
21
|
-
TERMINATE:
|
|
21
|
+
TERMINATE: 'TERMINATE',
|
|
22
22
|
/**
|
|
23
23
|
* When the Parent is Closed, nothing is done to the Child.
|
|
24
24
|
*/
|
|
25
|
-
ABANDON:
|
|
25
|
+
ABANDON: 'ABANDON',
|
|
26
26
|
/**
|
|
27
27
|
* When the Parent is Closed, the Child is Cancelled.
|
|
28
28
|
*/
|
|
29
|
-
REQUEST_CANCEL:
|
|
29
|
+
REQUEST_CANCEL: 'REQUEST_CANCEL',
|
|
30
30
|
/**
|
|
31
31
|
* If a `ParentClosePolicy` is set to this, or is not set at all, the server default value will be used.
|
|
32
32
|
*
|
|
@@ -38,17 +38,17 @@ export const ParentClosePolicy = {
|
|
|
38
38
|
*
|
|
39
39
|
* @deprecated Use {@link ParentClosePolicy.TERMINATE} instead.
|
|
40
40
|
*/
|
|
41
|
-
PARENT_CLOSE_POLICY_TERMINATE:
|
|
41
|
+
PARENT_CLOSE_POLICY_TERMINATE: 'TERMINATE',
|
|
42
42
|
/**
|
|
43
43
|
* When the Parent is Closed, nothing is done to the Child.
|
|
44
44
|
*
|
|
45
45
|
* @deprecated Use {@link ParentClosePolicy.ABANDON} instead.
|
|
46
46
|
*/
|
|
47
|
-
PARENT_CLOSE_POLICY_ABANDON:
|
|
47
|
+
PARENT_CLOSE_POLICY_ABANDON: 'ABANDON',
|
|
48
48
|
/**
|
|
49
49
|
* When the Parent is Closed, the Child is Cancelled.
|
|
50
50
|
*
|
|
51
51
|
* @deprecated Use {@link ParentClosePolicy.REQUEST_CANCEL} instead.
|
|
52
52
|
*/
|
|
53
|
-
PARENT_CLOSE_POLICY_REQUEST_CANCEL:
|
|
53
|
+
PARENT_CLOSE_POLICY_REQUEST_CANCEL: 'REQUEST_CANCEL',
|
|
54
54
|
} as ParentClosePolicyI;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { describe,
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
2
|
import {
|
|
3
|
+
type AgentMessage,
|
|
3
4
|
AgentMessageType,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
normalizeMessageType,
|
|
7
|
-
toCompactMessage,
|
|
8
|
-
toAgentMessage,
|
|
9
|
-
parseMessage,
|
|
5
|
+
type CompactMessage,
|
|
6
|
+
createCompactMessage,
|
|
10
7
|
isCompactMessage,
|
|
11
8
|
isLegacyMessage,
|
|
12
|
-
|
|
9
|
+
normalizeMessageType,
|
|
10
|
+
parseMessage,
|
|
11
|
+
toAgentMessage,
|
|
12
|
+
toCompactMessage,
|
|
13
13
|
} from './workflow.js';
|
|
14
14
|
|
|
15
15
|
describe('CompactMessage converters', () => {
|
|
@@ -78,12 +78,14 @@ describe('CompactMessage converters', () => {
|
|
|
78
78
|
describe('isLegacyMessage', () => {
|
|
79
79
|
it('returns true for legacy messages', () => {
|
|
80
80
|
expect(isLegacyMessage({ type: AgentMessageType.UPDATE })).toBe(true);
|
|
81
|
-
expect(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
expect(
|
|
82
|
+
isLegacyMessage({
|
|
83
|
+
type: AgentMessageType.ANSWER,
|
|
84
|
+
timestamp: 12345,
|
|
85
|
+
workflow_run_id: 'run-1',
|
|
86
|
+
message: 'test',
|
|
87
|
+
}),
|
|
88
|
+
).toBe(true);
|
|
87
89
|
});
|
|
88
90
|
|
|
89
91
|
it('returns false for compact messages', () => {
|