@vertesia/common 1.2.0 → 1.4.0-dev.20260614.160504Z
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +198 -10
- package/lib/{types/Progress.d.ts → Progress.d.ts} +1 -0
- package/lib/Progress.d.ts.map +1 -0
- package/lib/{esm/Progress.js → Progress.js} +2 -2
- package/lib/Progress.js.map +1 -0
- package/lib/access-control.d.ts +144 -0
- package/lib/access-control.d.ts.map +1 -0
- package/lib/{esm/access-control.js → access-control.js} +35 -0
- package/lib/access-control.js.map +1 -0
- package/lib/agent-request-template.d.ts +4 -0
- package/lib/agent-request-template.d.ts.map +1 -0
- package/lib/agent-request-template.js +46 -0
- package/lib/agent-request-template.js.map +1 -0
- package/lib/{types/analytics.d.ts → analytics.d.ts} +3 -2
- package/lib/analytics.d.ts.map +1 -0
- package/lib/{cjs/analytics.js.map → analytics.js.map} +1 -1
- package/lib/{types/apikey.d.ts → apikey.d.ts} +34 -4
- package/lib/apikey.d.ts.map +1 -0
- package/lib/{esm/apikey.js → apikey.js} +1 -0
- package/lib/apikey.js.map +1 -0
- package/lib/{types/apps.d.ts → apps.d.ts} +430 -35
- package/lib/apps.d.ts.map +1 -0
- package/lib/apps.js +158 -0
- package/lib/apps.js.map +1 -0
- package/lib/{types/ask-user.d.ts → ask-user.d.ts} +1 -0
- package/lib/ask-user.d.ts.map +1 -0
- package/lib/{esm/ask-user.js.map → ask-user.js.map} +1 -1
- package/lib/{types/audit-trail.d.ts → audit-trail.d.ts} +2 -1
- package/lib/audit-trail.d.ts.map +1 -0
- package/lib/audit-trail.js +3 -0
- package/lib/audit-trail.js.map +1 -0
- package/lib/browser-credentials.d.ts +123 -0
- package/lib/browser-credentials.d.ts.map +1 -0
- package/lib/browser-credentials.js +2 -0
- package/lib/browser-credentials.js.map +1 -0
- package/lib/{types/channels.d.ts → channels.d.ts} +3 -2
- package/lib/channels.d.ts.map +1 -0
- package/lib/{esm/channels.js → channels.js} +3 -3
- package/lib/channels.js.map +1 -0
- package/lib/{types/common.d.ts → common.d.ts} +18 -10
- package/lib/common.d.ts.map +1 -0
- package/lib/common.js.map +1 -0
- package/lib/{types/cost-analytics.d.ts → cost-analytics.d.ts} +2 -3
- package/lib/cost-analytics.d.ts.map +1 -0
- package/lib/cost-analytics.js.map +1 -0
- package/lib/{types/data-platform.d.ts → data-platform.d.ts} +134 -7
- package/lib/data-platform.d.ts.map +1 -0
- package/lib/data-platform.js.map +1 -0
- package/lib/{types/email.d.ts → email.d.ts} +6 -2
- package/lib/email.d.ts.map +1 -0
- package/lib/{esm/email.js → email.js} +2 -2
- package/lib/email.js.map +1 -0
- package/lib/embeddings.d.ts +65 -0
- package/lib/embeddings.d.ts.map +1 -0
- package/lib/embeddings.js +2 -0
- package/lib/embeddings.js.map +1 -0
- package/lib/{types/environment.d.ts → environment.d.ts} +19 -5
- package/lib/environment.d.ts.map +1 -0
- package/lib/{esm/environment.js → environment.js} +17 -7
- package/lib/environment.js.map +1 -0
- package/lib/{types/facets.d.ts → facets.d.ts} +6 -5
- package/lib/facets.d.ts.map +1 -0
- package/lib/facets.js.map +1 -0
- package/lib/{types/group.d.ts → group.d.ts} +15 -2
- package/lib/group.d.ts.map +1 -0
- package/lib/group.js +3 -0
- package/lib/group.js.map +1 -0
- package/lib/host-utils.d.ts +8 -0
- package/lib/host-utils.d.ts.map +1 -0
- package/lib/host-utils.js +84 -0
- package/lib/host-utils.js.map +1 -0
- package/lib/{types/index.d.ts → index.d.ts} +19 -10
- package/lib/index.d.ts.map +1 -0
- package/lib/{esm/index.js → index.js} +18 -10
- package/lib/index.js.map +1 -0
- package/lib/integrations.d.ts +151 -0
- package/lib/integrations.d.ts.map +1 -0
- package/lib/{esm/integrations.js → integrations.js} +6 -0
- package/lib/integrations.js.map +1 -0
- package/lib/{types/interaction.d.ts → interaction.d.ts} +99 -56
- package/lib/interaction.d.ts.map +1 -0
- package/lib/{esm/interaction.js → interaction.js} +3 -3
- package/lib/interaction.js.map +1 -0
- package/lib/json-schema.d.ts +2 -0
- package/lib/json-schema.d.ts.map +1 -0
- package/lib/{cjs/json-schema.js.map → json-schema.js.map} +1 -1
- package/lib/json.d.ts +2 -0
- package/lib/json.d.ts.map +1 -0
- package/lib/json.js.map +1 -0
- package/lib/{types/meters.d.ts → meters.d.ts} +2 -1
- package/lib/meters.d.ts.map +1 -0
- package/lib/meters.js.map +1 -0
- package/lib/model_utility.d.ts +2 -0
- package/lib/model_utility.d.ts.map +1 -0
- package/lib/model_utility.js +2 -0
- package/lib/model_utility.js.map +1 -0
- package/lib/oauth-scopes.d.ts +18 -0
- package/lib/oauth-scopes.d.ts.map +1 -0
- package/lib/oauth-scopes.js +57 -0
- package/lib/oauth-scopes.js.map +1 -0
- package/lib/{types/oauth-server.d.ts → oauth-server.d.ts} +64 -4
- package/lib/oauth-server.d.ts.map +1 -0
- package/lib/{cjs/oauth-server.js.map → oauth-server.js.map} +1 -1
- package/lib/{types/oauth.d.ts → oauth.d.ts} +1 -0
- package/lib/oauth.d.ts.map +1 -0
- package/lib/oauth.js.map +1 -0
- package/lib/{types/payload.d.ts → payload.d.ts} +5 -4
- package/lib/payload.d.ts.map +1 -0
- package/lib/{cjs/payload.js.map → payload.js.map} +1 -1
- package/lib/{types/pending-asks.d.ts → pending-asks.d.ts} +8 -1
- package/lib/pending-asks.d.ts.map +1 -0
- package/lib/pending-asks.js.map +1 -0
- package/lib/principal-context.d.ts +27 -0
- package/lib/principal-context.d.ts.map +1 -0
- package/lib/principal-context.js +2 -0
- package/lib/principal-context.js.map +1 -0
- package/lib/{types/project.d.ts → project.d.ts} +278 -49
- package/lib/project.d.ts.map +1 -0
- package/lib/project.js +230 -0
- package/lib/project.js.map +1 -0
- package/lib/{types/prompt.d.ts → prompt.d.ts} +16 -9
- package/lib/prompt.d.ts.map +1 -0
- package/lib/prompt.js.map +1 -0
- package/lib/{types/query.d.ts → query.d.ts} +11 -8
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js.map +1 -0
- package/lib/{types/rate-limiter.d.ts → rate-limiter.d.ts} +1 -0
- package/lib/rate-limiter.d.ts.map +1 -0
- package/lib/rate-limiter.js.map +1 -0
- package/lib/{types/refs.d.ts → refs.d.ts} +1 -0
- package/lib/refs.d.ts.map +1 -0
- package/lib/refs.js.map +1 -0
- package/lib/roles.d.ts +19 -0
- package/lib/roles.d.ts.map +1 -0
- package/lib/roles.js +228 -0
- package/lib/roles.js.map +1 -0
- package/lib/{types/runs.d.ts → runs.d.ts} +3 -2
- package/lib/runs.d.ts.map +1 -0
- package/lib/runs.js.map +1 -0
- package/lib/secrets.d.ts +47 -0
- package/lib/secrets.d.ts.map +1 -0
- package/lib/secrets.js +2 -0
- package/lib/secrets.js.map +1 -0
- package/lib/{types/skill.d.ts → skill.d.ts} +2 -1
- package/lib/skill.d.ts.map +1 -0
- package/lib/skill.js.map +1 -0
- package/lib/{types/store → store}/activity-catalog.d.ts +2 -1
- package/lib/store/activity-catalog.d.ts.map +1 -0
- package/lib/store/activity-catalog.js.map +1 -0
- package/lib/{types/store → store}/agent-run.d.ts +206 -35
- package/lib/store/agent-run.d.ts.map +1 -0
- package/lib/store/agent-run.js.map +1 -0
- package/lib/{types/store → store}/collections.d.ts +18 -9
- package/lib/store/collections.d.ts.map +1 -0
- package/lib/store/collections.js.map +1 -0
- package/lib/{types/store → store}/common.d.ts +1 -0
- package/lib/store/common.d.ts.map +1 -0
- package/lib/{cjs → store}/common.js.map +1 -1
- package/lib/{types/store → store}/conversation-state.d.ts +36 -5
- package/lib/store/conversation-state.d.ts.map +1 -0
- package/lib/{esm/store → store}/conversation-state.js +3 -0
- package/lib/store/conversation-state.js.map +1 -0
- package/lib/{types/store → store}/doc-analyzer.d.ts +20 -14
- package/lib/store/doc-analyzer.d.ts.map +1 -0
- package/lib/{cjs/store → store}/doc-analyzer.js.map +1 -1
- package/lib/{types/store → store}/dsl-workflow.d.ts +42 -24
- package/lib/store/dsl-workflow.d.ts.map +1 -0
- package/lib/store/dsl-workflow.js +8 -0
- package/lib/store/dsl-workflow.js.map +1 -0
- package/lib/{types/store → store}/hive-memory.d.ts +2 -1
- package/lib/store/hive-memory.d.ts.map +1 -0
- package/lib/{cjs/store → store}/hive-memory.js.map +1 -1
- package/lib/store/index.d.ts +20 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +20 -0
- package/lib/store/index.js.map +1 -0
- package/lib/{types/store → store}/object-types.d.ts +2 -1
- package/lib/store/object-types.d.ts.map +1 -0
- package/lib/store/object-types.js +95 -0
- package/lib/store/object-types.js.map +1 -0
- package/lib/store/process-schema.d.ts +481 -0
- package/lib/store/process-schema.d.ts.map +1 -0
- package/lib/store/process-schema.js +482 -0
- package/lib/store/process-schema.js.map +1 -0
- package/lib/store/process-validation.d.ts +17 -0
- package/lib/store/process-validation.d.ts.map +1 -0
- package/lib/store/process-validation.js +428 -0
- package/lib/store/process-validation.js.map +1 -0
- package/lib/store/process.d.ts +261 -0
- package/lib/store/process.d.ts.map +1 -0
- package/lib/store/process.js +2 -0
- package/lib/store/process.js.map +1 -0
- package/lib/{types/store → store}/rendering.d.ts +5 -4
- package/lib/store/rendering.d.ts.map +1 -0
- package/lib/{esm/store → store}/rendering.js +6 -6
- package/lib/store/rendering.js.map +1 -0
- package/lib/{types/store → store}/schedule.d.ts +4 -3
- package/lib/store/schedule.d.ts.map +1 -0
- package/lib/store/schedule.js.map +1 -0
- package/lib/{types/store → store}/signals.d.ts +2 -1
- package/lib/store/signals.d.ts.map +1 -0
- package/lib/{cjs/store → store}/signals.js.map +1 -1
- package/lib/{types/store → store}/store.d.ts +67 -38
- package/lib/store/store.d.ts.map +1 -0
- package/lib/{esm/store → store}/store.js +17 -8
- package/lib/store/store.js.map +1 -0
- package/lib/store/task.d.ts +63 -0
- package/lib/store/task.d.ts.map +1 -0
- package/lib/store/task.js +5 -0
- package/lib/store/task.js.map +1 -0
- package/lib/store/temporalio.d.ts +17 -0
- package/lib/store/temporalio.d.ts.map +1 -0
- package/lib/{esm/store → store}/temporalio.js +6 -6
- package/lib/store/temporalio.js.map +1 -0
- package/lib/{types/store → store}/workflow.d.ts +87 -33
- package/lib/store/workflow.d.ts.map +1 -0
- package/lib/{esm/store → store}/workflow.js +36 -37
- package/lib/store/workflow.js.map +1 -0
- package/lib/{types/sts-token-types.d.ts → sts-token-types.d.ts} +29 -2
- package/lib/sts-token-types.d.ts.map +1 -0
- package/lib/{esm/sts-token-types.js → sts-token-types.js} +0 -4
- package/lib/sts-token-types.js.map +1 -0
- package/lib/{types/tenant.d.ts → tenant.d.ts} +1 -0
- package/lib/tenant.d.ts.map +1 -0
- package/lib/tenant.js.map +1 -0
- package/lib/{types/tool-execution.d.ts → tool-execution.d.ts} +3 -2
- package/lib/tool-execution.d.ts.map +1 -0
- package/lib/tool-execution.js.map +1 -0
- package/lib/tools.d.ts +101 -0
- package/lib/tools.d.ts.map +1 -0
- package/lib/tools.js +2 -0
- package/lib/tools.js.map +1 -0
- package/lib/{types/training.d.ts → training.d.ts} +10 -9
- package/lib/training.d.ts.map +1 -0
- package/lib/training.js.map +1 -0
- package/lib/{types/transient-tokens.d.ts → transient-tokens.d.ts} +3 -2
- package/lib/transient-tokens.d.ts.map +1 -0
- package/lib/transient-tokens.js.map +1 -0
- package/lib/{types/user.d.ts → user.d.ts} +13 -7
- package/lib/user.d.ts.map +1 -0
- package/lib/{esm/user.js → user.js} +2 -2
- package/lib/user.js.map +1 -0
- package/lib/{types/utils → utils}/auth.d.ts +2 -1
- package/lib/utils/auth.d.ts.map +1 -0
- package/lib/{esm/utils → utils}/auth.js +1 -1
- package/lib/utils/auth.js.map +1 -0
- package/lib/{types/utils → utils}/schemas.d.ts +5 -4
- package/lib/utils/schemas.d.ts.map +1 -0
- package/lib/{esm/utils → utils}/schemas.js +24 -22
- package/lib/utils/schemas.js.map +1 -0
- package/lib/{types/utils → utils}/type-helpers.d.ts +1 -0
- package/lib/utils/type-helpers.d.ts.map +1 -0
- package/lib/{cjs/utils → utils}/type-helpers.js.map +1 -1
- package/lib/{types/versions.d.ts → versions.d.ts} +1 -0
- package/lib/versions.d.ts.map +1 -0
- package/lib/versions.js.map +1 -0
- package/lib/vertesia-common.js +1 -1
- package/lib/vertesia-common.js.map +1 -1
- package/lib/{types/workflow-analytics.d.ts → workflow-analytics.d.ts} +10 -3
- package/lib/workflow-analytics.d.ts.map +1 -0
- package/lib/workflow-analytics.js.map +1 -0
- package/package.json +20 -20
- package/src/Progress.ts +9 -7
- package/src/access-control.ts +124 -55
- package/src/agent-request-template.test.ts +40 -0
- package/src/agent-request-template.ts +45 -0
- package/src/analytics.ts +11 -16
- package/src/apikey.ts +43 -11
- package/src/apps.test.ts +37 -0
- package/src/apps.ts +562 -78
- package/src/audit-trail.ts +3 -5
- package/src/browser-credentials.ts +133 -0
- package/src/channels.ts +5 -5
- package/src/common.ts +17 -11
- package/src/cost-analytics.ts +10 -4
- package/src/data-platform.ts +142 -7
- package/src/email.ts +7 -4
- package/src/embeddings.ts +76 -0
- package/src/environment.ts +44 -25
- package/src/facets.ts +19 -21
- package/src/group.ts +14 -3
- package/src/host-utils.test.ts +61 -0
- package/src/host-utils.ts +93 -0
- package/src/index.ts +18 -10
- package/src/integrations.ts +134 -26
- package/src/interaction.ts +185 -141
- package/src/json-schema.ts +1 -1
- package/src/json.ts +6 -3
- package/src/meters.ts +6 -9
- package/src/model_utility.ts +1 -1
- package/src/oauth-scopes.ts +72 -0
- package/src/oauth-server.ts +80 -5
- package/src/payload.ts +6 -6
- package/src/pending-asks.ts +8 -1
- package/src/principal-context.ts +27 -0
- package/src/project.ts +408 -101
- package/src/prompt.ts +30 -27
- package/src/query.ts +19 -17
- package/src/rate-limiter.ts +1 -1
- package/src/refs.ts +19 -24
- package/src/roles.test.ts +30 -0
- package/src/roles.ts +251 -0
- package/src/runs.ts +14 -15
- package/src/secrets.ts +60 -0
- package/src/skill.ts +1 -2
- package/src/store/activity-catalog.ts +13 -1
- package/src/store/agent-run.ts +269 -42
- package/src/store/collections.ts +21 -13
- package/src/store/common.ts +1 -2
- package/src/store/conversation-state.ts +42 -5
- package/src/store/doc-analyzer.ts +22 -14
- package/src/store/dsl-workflow.ts +54 -29
- package/src/store/hive-memory.ts +10 -10
- package/src/store/index.ts +19 -17
- package/src/store/ms.d.ts +34 -3
- package/src/store/object-types.ts +75 -79
- package/src/store/process-schema.test.ts +106 -0
- package/src/store/process-schema.ts +485 -0
- package/src/store/process-validation.test.ts +432 -0
- package/src/store/process-validation.ts +548 -0
- package/src/store/process.ts +305 -0
- package/src/store/rendering.ts +12 -12
- package/src/store/schedule.ts +3 -3
- package/src/store/signals.ts +1 -1
- package/src/store/store.ts +119 -89
- package/src/store/task.ts +71 -0
- package/src/store/temporalio.ts +14 -14
- package/src/store/workflow.test.ts +16 -14
- package/src/store/workflow.ts +177 -119
- package/src/sts-token-types.ts +30 -4
- package/src/tool-execution.ts +2 -2
- package/src/tools.ts +103 -0
- package/src/training.ts +25 -27
- package/src/transient-tokens.ts +4 -7
- package/src/user.ts +25 -35
- package/src/utils/auth.ts +2 -2
- package/src/utils/schemas.ts +36 -31
- package/src/utils/type-helpers.ts +2 -4
- package/src/workflow-analytics.ts +15 -18
- package/lib/cjs/Progress.js +0 -61
- package/lib/cjs/Progress.js.map +0 -1
- package/lib/cjs/access-control.js +0 -58
- package/lib/cjs/access-control.js.map +0 -1
- package/lib/cjs/analytics.js +0 -3
- package/lib/cjs/apikey.js +0 -17
- package/lib/cjs/apikey.js.map +0 -1
- package/lib/cjs/apps.js +0 -89
- package/lib/cjs/apps.js.map +0 -1
- package/lib/cjs/ask-user.js +0 -8
- package/lib/cjs/ask-user.js.map +0 -1
- package/lib/cjs/audit-trail.js +0 -10
- package/lib/cjs/audit-trail.js.map +0 -1
- package/lib/cjs/channels.js +0 -63
- package/lib/cjs/channels.js.map +0 -1
- package/lib/cjs/common.js +0 -3
- package/lib/cjs/cost-analytics.js +0 -13
- package/lib/cjs/cost-analytics.js.map +0 -1
- package/lib/cjs/data-platform.js +0 -127
- package/lib/cjs/data-platform.js.map +0 -1
- package/lib/cjs/email.js +0 -20
- package/lib/cjs/email.js.map +0 -1
- package/lib/cjs/environment.js +0 -44
- package/lib/cjs/environment.js.map +0 -1
- package/lib/cjs/facets.js +0 -3
- package/lib/cjs/facets.js.map +0 -1
- package/lib/cjs/group.js +0 -6
- package/lib/cjs/group.js.map +0 -1
- package/lib/cjs/index.js +0 -60
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/integrations.js +0 -16
- package/lib/cjs/integrations.js.map +0 -1
- package/lib/cjs/interaction.js +0 -101
- package/lib/cjs/interaction.js.map +0 -1
- package/lib/cjs/json-schema.js +0 -3
- package/lib/cjs/json.js +0 -3
- package/lib/cjs/json.js.map +0 -1
- package/lib/cjs/meters.js +0 -13
- package/lib/cjs/meters.js.map +0 -1
- package/lib/cjs/model_utility.js +0 -6
- package/lib/cjs/model_utility.js.map +0 -1
- package/lib/cjs/oauth-server.js +0 -3
- package/lib/cjs/oauth.js +0 -7
- package/lib/cjs/oauth.js.map +0 -1
- package/lib/cjs/openapi.js +0 -3
- package/lib/cjs/openapi.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/payload.js +0 -3
- package/lib/cjs/pending-asks.js +0 -7
- package/lib/cjs/pending-asks.js.map +0 -1
- package/lib/cjs/project.js +0 -143
- package/lib/cjs/project.js.map +0 -1
- package/lib/cjs/prompt.js +0 -21
- package/lib/cjs/prompt.js.map +0 -1
- package/lib/cjs/query.js +0 -3
- package/lib/cjs/query.js.map +0 -1
- package/lib/cjs/rate-limiter.js +0 -6
- package/lib/cjs/rate-limiter.js.map +0 -1
- package/lib/cjs/refs.js +0 -14
- package/lib/cjs/refs.js.map +0 -1
- package/lib/cjs/runs.js +0 -3
- package/lib/cjs/runs.js.map +0 -1
- package/lib/cjs/skill.js +0 -14
- package/lib/cjs/skill.js.map +0 -1
- package/lib/cjs/store/activity-catalog.js +0 -3
- package/lib/cjs/store/activity-catalog.js.map +0 -1
- package/lib/cjs/store/agent-run.js +0 -16
- package/lib/cjs/store/agent-run.js.map +0 -1
- package/lib/cjs/store/collections.js +0 -9
- package/lib/cjs/store/collections.js.map +0 -1
- package/lib/cjs/store/common.js +0 -3
- package/lib/cjs/store/common.js.map +0 -1
- package/lib/cjs/store/conversation-state.js +0 -19
- package/lib/cjs/store/conversation-state.js.map +0 -1
- package/lib/cjs/store/doc-analyzer.js +0 -3
- package/lib/cjs/store/dsl-workflow.js +0 -5
- package/lib/cjs/store/dsl-workflow.js.map +0 -1
- package/lib/cjs/store/hive-memory.js +0 -3
- package/lib/cjs/store/index.js +0 -33
- package/lib/cjs/store/index.js.map +0 -1
- package/lib/cjs/store/object-types.js +0 -98
- package/lib/cjs/store/object-types.js.map +0 -1
- package/lib/cjs/store/rendering.js +0 -26
- package/lib/cjs/store/rendering.js.map +0 -1
- package/lib/cjs/store/schedule.js +0 -32
- package/lib/cjs/store/schedule.js.map +0 -1
- package/lib/cjs/store/signals.js +0 -3
- package/lib/cjs/store/store.js +0 -182
- package/lib/cjs/store/store.js.map +0 -1
- package/lib/cjs/store/temporalio.js +0 -44
- package/lib/cjs/store/temporalio.js.map +0 -1
- package/lib/cjs/store/worker.js +0 -3
- package/lib/cjs/store/worker.js.map +0 -1
- package/lib/cjs/store/workflow.js +0 -306
- package/lib/cjs/store/workflow.js.map +0 -1
- package/lib/cjs/sts-token-types.js +0 -32
- package/lib/cjs/sts-token-types.js.map +0 -1
- package/lib/cjs/tenant.js +0 -3
- package/lib/cjs/tenant.js.map +0 -1
- package/lib/cjs/tool-execution.js +0 -6
- package/lib/cjs/tool-execution.js.map +0 -1
- package/lib/cjs/training.js +0 -14
- package/lib/cjs/training.js.map +0 -1
- package/lib/cjs/transient-tokens.js +0 -9
- package/lib/cjs/transient-tokens.js.map +0 -1
- package/lib/cjs/user.js +0 -26
- package/lib/cjs/user.js.map +0 -1
- package/lib/cjs/utils/auth.js +0 -15
- package/lib/cjs/utils/auth.js.map +0 -1
- package/lib/cjs/utils/schemas.js +0 -182
- package/lib/cjs/utils/schemas.js.map +0 -1
- package/lib/cjs/utils/type-helpers.js +0 -3
- package/lib/cjs/versions.js +0 -10
- package/lib/cjs/versions.js.map +0 -1
- package/lib/cjs/workflow-analytics.js +0 -52
- package/lib/cjs/workflow-analytics.js.map +0 -1
- package/lib/esm/Progress.js.map +0 -1
- package/lib/esm/access-control.js.map +0 -1
- package/lib/esm/analytics.js.map +0 -1
- package/lib/esm/apikey.js.map +0 -1
- package/lib/esm/apps.js +0 -79
- package/lib/esm/apps.js.map +0 -1
- package/lib/esm/audit-trail.js +0 -7
- package/lib/esm/audit-trail.js.map +0 -1
- package/lib/esm/channels.js.map +0 -1
- package/lib/esm/common.js.map +0 -1
- package/lib/esm/cost-analytics.js.map +0 -1
- package/lib/esm/data-platform.js.map +0 -1
- package/lib/esm/email.js.map +0 -1
- package/lib/esm/environment.js.map +0 -1
- package/lib/esm/facets.js.map +0 -1
- package/lib/esm/group.js +0 -3
- package/lib/esm/group.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/integrations.js.map +0 -1
- package/lib/esm/interaction.js.map +0 -1
- package/lib/esm/json-schema.js.map +0 -1
- package/lib/esm/json.js.map +0 -1
- package/lib/esm/meters.js.map +0 -1
- package/lib/esm/model_utility.js +0 -2
- package/lib/esm/model_utility.js.map +0 -1
- package/lib/esm/oauth-server.js.map +0 -1
- package/lib/esm/oauth.js.map +0 -1
- package/lib/esm/openapi.js +0 -2
- package/lib/esm/openapi.js.map +0 -1
- package/lib/esm/payload.js.map +0 -1
- package/lib/esm/pending-asks.js.map +0 -1
- package/lib/esm/project.js +0 -138
- package/lib/esm/project.js.map +0 -1
- package/lib/esm/prompt.js.map +0 -1
- package/lib/esm/query.js.map +0 -1
- package/lib/esm/rate-limiter.js.map +0 -1
- package/lib/esm/refs.js.map +0 -1
- package/lib/esm/runs.js.map +0 -1
- package/lib/esm/skill.js.map +0 -1
- package/lib/esm/store/activity-catalog.js.map +0 -1
- package/lib/esm/store/agent-run.js.map +0 -1
- package/lib/esm/store/collections.js.map +0 -1
- package/lib/esm/store/common.js.map +0 -1
- package/lib/esm/store/conversation-state.js.map +0 -1
- package/lib/esm/store/doc-analyzer.js.map +0 -1
- package/lib/esm/store/dsl-workflow.js +0 -2
- package/lib/esm/store/dsl-workflow.js.map +0 -1
- package/lib/esm/store/hive-memory.js.map +0 -1
- package/lib/esm/store/index.js +0 -17
- package/lib/esm/store/index.js.map +0 -1
- package/lib/esm/store/object-types.js +0 -95
- package/lib/esm/store/object-types.js.map +0 -1
- package/lib/esm/store/rendering.js.map +0 -1
- package/lib/esm/store/schedule.js.map +0 -1
- package/lib/esm/store/signals.js.map +0 -1
- package/lib/esm/store/store.js.map +0 -1
- package/lib/esm/store/temporalio.js.map +0 -1
- package/lib/esm/store/worker.js +0 -2
- package/lib/esm/store/worker.js.map +0 -1
- package/lib/esm/store/workflow.js.map +0 -1
- package/lib/esm/sts-token-types.js.map +0 -1
- package/lib/esm/tenant.js.map +0 -1
- package/lib/esm/tool-execution.js.map +0 -1
- package/lib/esm/training.js.map +0 -1
- package/lib/esm/transient-tokens.js.map +0 -1
- package/lib/esm/user.js.map +0 -1
- package/lib/esm/utils/auth.js.map +0 -1
- package/lib/esm/utils/schemas.js.map +0 -1
- package/lib/esm/utils/type-helpers.js.map +0 -1
- package/lib/esm/versions.js.map +0 -1
- package/lib/esm/workflow-analytics.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/Progress.d.ts.map +0 -1
- package/lib/types/access-control.d.ts +0 -79
- package/lib/types/access-control.d.ts.map +0 -1
- package/lib/types/analytics.d.ts.map +0 -1
- package/lib/types/apikey.d.ts.map +0 -1
- package/lib/types/apps.d.ts.map +0 -1
- package/lib/types/ask-user.d.ts.map +0 -1
- package/lib/types/audit-trail.d.ts.map +0 -1
- package/lib/types/channels.d.ts.map +0 -1
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/cost-analytics.d.ts.map +0 -1
- package/lib/types/data-platform.d.ts.map +0 -1
- package/lib/types/email.d.ts.map +0 -1
- package/lib/types/environment.d.ts.map +0 -1
- package/lib/types/facets.d.ts.map +0 -1
- package/lib/types/group.d.ts.map +0 -1
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/integrations.d.ts +0 -83
- package/lib/types/integrations.d.ts.map +0 -1
- package/lib/types/interaction.d.ts.map +0 -1
- package/lib/types/json-schema.d.ts +0 -1
- package/lib/types/json-schema.d.ts.map +0 -1
- package/lib/types/json.d.ts +0 -1
- package/lib/types/json.d.ts.map +0 -1
- package/lib/types/meters.d.ts.map +0 -1
- package/lib/types/model_utility.d.ts +0 -1
- package/lib/types/model_utility.d.ts.map +0 -1
- package/lib/types/oauth-server.d.ts.map +0 -1
- package/lib/types/oauth.d.ts.map +0 -1
- package/lib/types/openapi.d.ts +0 -90
- package/lib/types/openapi.d.ts.map +0 -1
- package/lib/types/payload.d.ts.map +0 -1
- package/lib/types/pending-asks.d.ts.map +0 -1
- package/lib/types/project.d.ts.map +0 -1
- package/lib/types/prompt.d.ts.map +0 -1
- package/lib/types/query.d.ts.map +0 -1
- package/lib/types/rate-limiter.d.ts.map +0 -1
- package/lib/types/refs.d.ts.map +0 -1
- package/lib/types/runs.d.ts.map +0 -1
- package/lib/types/skill.d.ts.map +0 -1
- package/lib/types/store/activity-catalog.d.ts.map +0 -1
- package/lib/types/store/agent-run.d.ts.map +0 -1
- package/lib/types/store/collections.d.ts.map +0 -1
- package/lib/types/store/common.d.ts.map +0 -1
- package/lib/types/store/conversation-state.d.ts.map +0 -1
- package/lib/types/store/doc-analyzer.d.ts.map +0 -1
- package/lib/types/store/dsl-workflow.d.ts.map +0 -1
- package/lib/types/store/hive-memory.d.ts.map +0 -1
- package/lib/types/store/index.d.ts +0 -16
- package/lib/types/store/index.d.ts.map +0 -1
- package/lib/types/store/object-types.d.ts.map +0 -1
- package/lib/types/store/rendering.d.ts.map +0 -1
- package/lib/types/store/schedule.d.ts.map +0 -1
- package/lib/types/store/signals.d.ts.map +0 -1
- package/lib/types/store/store.d.ts.map +0 -1
- package/lib/types/store/temporalio.d.ts +0 -16
- package/lib/types/store/temporalio.d.ts.map +0 -1
- package/lib/types/store/worker.d.ts +0 -18
- package/lib/types/store/worker.d.ts.map +0 -1
- package/lib/types/store/workflow.d.ts.map +0 -1
- package/lib/types/sts-token-types.d.ts.map +0 -1
- package/lib/types/tenant.d.ts.map +0 -1
- package/lib/types/tool-execution.d.ts.map +0 -1
- package/lib/types/training.d.ts.map +0 -1
- package/lib/types/transient-tokens.d.ts.map +0 -1
- package/lib/types/user.d.ts.map +0 -1
- package/lib/types/utils/auth.d.ts.map +0 -1
- package/lib/types/utils/schemas.d.ts.map +0 -1
- package/lib/types/utils/type-helpers.d.ts.map +0 -1
- package/lib/types/versions.d.ts.map +0 -1
- package/lib/types/workflow-analytics.d.ts.map +0 -1
- package/src/openapi.ts +0 -102
- package/src/store/worker.ts +0 -19
- /package/lib/{esm/analytics.js → analytics.js} +0 -0
- /package/lib/{esm/ask-user.js → ask-user.js} +0 -0
- /package/lib/{esm/common.js → common.js} +0 -0
- /package/lib/{esm/cost-analytics.js → cost-analytics.js} +0 -0
- /package/lib/{esm/data-platform.js → data-platform.js} +0 -0
- /package/lib/{esm/facets.js → facets.js} +0 -0
- /package/lib/{esm/json-schema.js → json-schema.js} +0 -0
- /package/lib/{esm/json.js → json.js} +0 -0
- /package/lib/{esm/meters.js → meters.js} +0 -0
- /package/lib/{esm/oauth-server.js → oauth-server.js} +0 -0
- /package/lib/{esm/oauth.js → oauth.js} +0 -0
- /package/lib/{esm/payload.js → payload.js} +0 -0
- /package/lib/{esm/pending-asks.js → pending-asks.js} +0 -0
- /package/lib/{esm/prompt.js → prompt.js} +0 -0
- /package/lib/{esm/query.js → query.js} +0 -0
- /package/lib/{esm/rate-limiter.js → rate-limiter.js} +0 -0
- /package/lib/{esm/refs.js → refs.js} +0 -0
- /package/lib/{esm/runs.js → runs.js} +0 -0
- /package/lib/{esm/skill.js → skill.js} +0 -0
- /package/lib/{esm/store → store}/activity-catalog.js +0 -0
- /package/lib/{esm/store → store}/agent-run.js +0 -0
- /package/lib/{esm/store → store}/collections.js +0 -0
- /package/lib/{esm/store → store}/common.js +0 -0
- /package/lib/{esm/store → store}/doc-analyzer.js +0 -0
- /package/lib/{esm/store → store}/hive-memory.js +0 -0
- /package/lib/{esm/store → store}/schedule.js +0 -0
- /package/lib/{esm/store → store}/signals.js +0 -0
- /package/lib/{esm/tenant.js → tenant.js} +0 -0
- /package/lib/{esm/tool-execution.js → tool-execution.js} +0 -0
- /package/lib/{esm/training.js → training.js} +0 -0
- /package/lib/{esm/transient-tokens.js → transient-tokens.js} +0 -0
- /package/lib/{esm/utils → utils}/type-helpers.js +0 -0
- /package/lib/{esm/versions.js → versions.js} +0 -0
- /package/lib/{esm/workflow-analytics.js → workflow-analytics.js} +0 -0
package/src/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>>;
|
|
@@ -151,6 +149,10 @@ export interface ContentObject<T = any> extends ContentObjectItem<T> {
|
|
|
151
149
|
parts_etag?: string; // the etag of the text used for the parts list
|
|
152
150
|
transcript?: Transcript;
|
|
153
151
|
security?: Record<string, string[]>; // Security field for granular permissions
|
|
152
|
+
/** BLP sensitivity level — set directly or inherited from collections (max across collections). */
|
|
153
|
+
sensitivity?: number;
|
|
154
|
+
/** Compartments — set directly or inherited from collections (union across collections). */
|
|
155
|
+
compartments?: string[];
|
|
154
156
|
|
|
155
157
|
/**
|
|
156
158
|
* Inherited properties metadata - tracks which properties were inherited from parent collections.
|
|
@@ -160,12 +162,12 @@ export interface ContentObject<T = any> extends ContentObjectItem<T> {
|
|
|
160
162
|
}
|
|
161
163
|
|
|
162
164
|
export enum ContentNature {
|
|
163
|
-
Video =
|
|
164
|
-
Image =
|
|
165
|
-
Audio =
|
|
166
|
-
Document =
|
|
167
|
-
Code =
|
|
168
|
-
Other =
|
|
165
|
+
Video = 'video',
|
|
166
|
+
Image = 'image',
|
|
167
|
+
Audio = 'audio',
|
|
168
|
+
Document = 'document',
|
|
169
|
+
Code = 'code',
|
|
170
|
+
Other = 'other',
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
export interface Dimensions {
|
|
@@ -196,15 +198,10 @@ export interface RenditionWithDimensions extends Rendition {
|
|
|
196
198
|
dimensions: Dimensions;
|
|
197
199
|
}
|
|
198
200
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
export
|
|
203
|
-
|
|
204
|
-
export const POSTER_RENDITION_NAME = "Poster";
|
|
205
|
-
export const AUDIO_RENDITION_NAME = "Audio";
|
|
206
|
-
export const WEB_VIDEO_RENDITION_NAME = "Web";
|
|
207
|
-
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';
|
|
208
205
|
|
|
209
206
|
export interface ContentMetadata {
|
|
210
207
|
// Common fields for all media types
|
|
@@ -212,7 +209,7 @@ export interface ContentMetadata {
|
|
|
212
209
|
size?: number; // in bytes
|
|
213
210
|
languages?: string[];
|
|
214
211
|
location?: Location;
|
|
215
|
-
generation_runs
|
|
212
|
+
generation_runs?: GenerationRunMetadata[];
|
|
216
213
|
etag?: string;
|
|
217
214
|
renditions?: Rendition[];
|
|
218
215
|
}
|
|
@@ -254,8 +251,8 @@ export interface DocumentMetadata extends ContentMetadata {
|
|
|
254
251
|
features_requested?: string[];
|
|
255
252
|
zones_requested?: string[];
|
|
256
253
|
table_count?: number;
|
|
257
|
-
image_count
|
|
258
|
-
zone_count
|
|
254
|
+
image_count?: number;
|
|
255
|
+
zone_count?: number;
|
|
259
256
|
needs_ocr_count?: number;
|
|
260
257
|
};
|
|
261
258
|
sections?: TextSection[]; // List of sections with descriptions and line indexes
|
|
@@ -268,7 +265,7 @@ export interface Transcript {
|
|
|
268
265
|
}
|
|
269
266
|
|
|
270
267
|
export const TextExtractionStatus = {
|
|
271
|
-
success:
|
|
268
|
+
success: 'success',
|
|
272
269
|
} as const;
|
|
273
270
|
|
|
274
271
|
export interface TranscriptMediaResult {
|
|
@@ -324,8 +321,8 @@ export interface RevisionInfo {
|
|
|
324
321
|
/**
|
|
325
322
|
* The content object item is a simplified version of the ContentObject that is returned by the store API when listing objects.
|
|
326
323
|
*/
|
|
327
|
-
export interface ContentObjectItem<T =
|
|
328
|
-
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.
|
|
329
326
|
|
|
330
327
|
/** An optional path based location for the object */
|
|
331
328
|
location: string; // the path of the parent object
|
|
@@ -348,7 +345,7 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
|
|
|
348
345
|
/**
|
|
349
346
|
* Content source information, typically a link to an object store
|
|
350
347
|
*/
|
|
351
|
-
content
|
|
348
|
+
content?: ContentSource;
|
|
352
349
|
|
|
353
350
|
/**
|
|
354
351
|
* External identifier for integration with other systems
|
|
@@ -359,12 +356,7 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
|
|
|
359
356
|
properties: T; // a JSON object that describes the object
|
|
360
357
|
|
|
361
358
|
/** Technical metadata of the object */
|
|
362
|
-
metadata?:
|
|
363
|
-
| VideoMetadata
|
|
364
|
-
| AudioMetadata
|
|
365
|
-
| ImageMetadata
|
|
366
|
-
| DocumentMetadata
|
|
367
|
-
| ContentMetadata;
|
|
359
|
+
metadata?: VideoMetadata | AudioMetadata | ImageMetadata | DocumentMetadata | ContentMetadata;
|
|
368
360
|
|
|
369
361
|
/** Token information */
|
|
370
362
|
tokens?: {
|
|
@@ -404,46 +396,64 @@ export interface ContentObjectItem<T = Record<string, any>> extends BaseObject {
|
|
|
404
396
|
/**
|
|
405
397
|
* When creating from an uploaded file the content should be an URL to the uploaded file
|
|
406
398
|
*/
|
|
407
|
-
export interface CreateContentObjectPayload<T =
|
|
408
|
-
extends Partial<
|
|
409
|
-
Omit<
|
|
410
|
-
ContentObject<T>,
|
|
411
|
-
"id" | "root" | "created_at" | "updated_at" | "type" | "owner"
|
|
412
|
-
>
|
|
413
|
-
> {
|
|
399
|
+
export interface CreateContentObjectPayload<T = JSONObject>
|
|
400
|
+
extends Partial<Omit<ContentObject<T>, 'id' | 'root' | 'created_at' | 'updated_at' | 'type' | 'owner'>> {
|
|
414
401
|
id?: string; // An optional existing object ID to be replaced by the new one
|
|
415
402
|
type?: string; // the object type ID
|
|
416
403
|
generation_run_info?: GenerationRunMetadata;
|
|
417
404
|
}
|
|
418
405
|
|
|
419
|
-
|
|
420
|
-
|
|
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 };
|
|
421
427
|
}
|
|
422
428
|
|
|
423
429
|
/**
|
|
424
|
-
* 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
|
|
425
435
|
*/
|
|
426
436
|
export type ContentObjectTypeRef = StoredTypeRef | InCodeTypeRef;
|
|
427
437
|
|
|
428
438
|
interface StoredTypeRef {
|
|
439
|
+
ref_type: 'stored';
|
|
429
440
|
/**
|
|
430
441
|
* MongoDB ObjectId string for stored types
|
|
431
442
|
*/
|
|
432
443
|
id: string;
|
|
433
|
-
code?: never;
|
|
434
444
|
name: string;
|
|
435
445
|
}
|
|
436
446
|
|
|
437
447
|
interface InCodeTypeRef {
|
|
438
|
-
|
|
448
|
+
ref_type: 'incode';
|
|
439
449
|
/**
|
|
440
450
|
* Namespaced identifier for in-code types (e.g. "sys:Invoice", "app:myapp:Contract")
|
|
441
451
|
*/
|
|
442
|
-
|
|
452
|
+
id: string;
|
|
443
453
|
name: string;
|
|
444
454
|
}
|
|
445
455
|
|
|
446
|
-
export interface ComplexSearchPayload extends Omit<SearchPayload,
|
|
456
|
+
export interface ComplexSearchPayload extends Omit<SearchPayload, 'query'> {
|
|
447
457
|
query?: ComplexSearchQuery;
|
|
448
458
|
}
|
|
449
459
|
|
|
@@ -468,9 +478,9 @@ export interface ColumnLayout {
|
|
|
468
478
|
/**
|
|
469
479
|
* A default value to be used if the field is not present in the object
|
|
470
480
|
*/
|
|
471
|
-
default?:
|
|
481
|
+
default?: unknown;
|
|
472
482
|
}
|
|
473
|
-
export interface ContentObjectType extends ContentObjectTypeItem {
|
|
483
|
+
export interface ContentObjectType extends ContentObjectTypeItem {}
|
|
474
484
|
export interface ContentObjectTypeItem extends BaseObject {
|
|
475
485
|
is_chunkable?: boolean;
|
|
476
486
|
/**
|
|
@@ -482,14 +492,23 @@ export interface ContentObjectTypeItem extends BaseObject {
|
|
|
482
492
|
* this is only included in ContentObjectTypeItem if explicitly requested
|
|
483
493
|
* It is always included in ContentObjectType
|
|
484
494
|
*/
|
|
485
|
-
object_schema?: Record<string,
|
|
495
|
+
object_schema?: Record<string, unknown>; // an optional JSON schema for the object properties.
|
|
486
496
|
|
|
487
497
|
/**
|
|
488
498
|
* Determines if the content will be validated against the object schema a generation time and save/update time.
|
|
489
499
|
*/
|
|
490
500
|
strict_mode?: boolean;
|
|
491
501
|
}
|
|
492
|
-
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
|
+
}
|
|
493
512
|
/**
|
|
494
513
|
* The itnerface to be used whend efining types in a plugin app.
|
|
495
514
|
*/
|
|
@@ -505,15 +524,12 @@ export function isInCodeType(typeId: string): boolean {
|
|
|
505
524
|
}
|
|
506
525
|
|
|
507
526
|
export interface CreateContentObjectTypePayload
|
|
508
|
-
extends Omit<
|
|
509
|
-
ContentObjectType,
|
|
510
|
-
"id" | "created_at" | "updated_at" | "created_by" | "updated_by"
|
|
511
|
-
> { }
|
|
527
|
+
extends Omit<ContentObjectType, 'id' | 'created_at' | 'updated_at' | 'created_by' | 'updated_by'> {}
|
|
512
528
|
|
|
513
529
|
export enum WorkflowRuleInputType {
|
|
514
|
-
single =
|
|
515
|
-
multiple =
|
|
516
|
-
none =
|
|
530
|
+
single = 'single',
|
|
531
|
+
multiple = 'multiple',
|
|
532
|
+
none = 'none',
|
|
517
533
|
}
|
|
518
534
|
export interface WorkflowRuleItem extends BaseObject {
|
|
519
535
|
// the name of the workflow function
|
|
@@ -524,11 +540,11 @@ export interface WorkflowRule extends WorkflowRuleItem {
|
|
|
524
540
|
/*
|
|
525
541
|
* mongo matching rules for a content event
|
|
526
542
|
*/
|
|
527
|
-
match?: Record<string,
|
|
543
|
+
match?: Record<string, unknown>;
|
|
528
544
|
/**
|
|
529
545
|
* Activities configuration if any.
|
|
530
546
|
*/
|
|
531
|
-
config?: Record<string,
|
|
547
|
+
config?: Record<string, unknown>;
|
|
532
548
|
|
|
533
549
|
/**
|
|
534
550
|
* Debug mode for the rule
|
|
@@ -553,19 +569,17 @@ export interface CreateWorkflowRulePayload extends UploadWorkflowRulePayload {
|
|
|
553
569
|
endpoint: string; // required
|
|
554
570
|
}
|
|
555
571
|
export interface UploadWorkflowRulePayload
|
|
556
|
-
extends Partial<
|
|
557
|
-
Omit<WorkflowRule, "id" | "created_at" | "updated_at" | "owner">
|
|
558
|
-
> { }
|
|
572
|
+
extends Partial<Omit<WorkflowRule, 'id' | 'created_at' | 'updated_at' | 'owner'>> {}
|
|
559
573
|
|
|
560
574
|
export enum ImageRenditionFormat {
|
|
561
|
-
jpeg =
|
|
562
|
-
png =
|
|
563
|
-
webp =
|
|
575
|
+
jpeg = 'jpeg',
|
|
576
|
+
png = 'png',
|
|
577
|
+
webp = 'webp',
|
|
564
578
|
}
|
|
565
579
|
|
|
566
580
|
export enum MarkdownRenditionFormat {
|
|
567
|
-
docx =
|
|
568
|
-
pdf =
|
|
581
|
+
docx = 'docx',
|
|
582
|
+
pdf = 'pdf',
|
|
569
583
|
}
|
|
570
584
|
|
|
571
585
|
export interface GetRenditionParams {
|
|
@@ -577,14 +591,14 @@ export interface GetRenditionParams {
|
|
|
577
591
|
}
|
|
578
592
|
|
|
579
593
|
export interface GetRenditionResponse {
|
|
580
|
-
status:
|
|
594
|
+
status: 'found' | 'generating' | 'failed';
|
|
581
595
|
renditions?: string[]; //file paths for the renditions
|
|
582
596
|
workflow_run_id?: string;
|
|
583
597
|
}
|
|
584
598
|
|
|
585
599
|
export interface ObjectSearchResponse {
|
|
586
|
-
results: ContentObjectItem
|
|
587
|
-
facets:
|
|
600
|
+
results: ContentObjectItem[];
|
|
601
|
+
facets: ComputedFacetResponse;
|
|
588
602
|
aggregations?: Record<string, unknown>;
|
|
589
603
|
}
|
|
590
604
|
|
|
@@ -639,7 +653,7 @@ export function canGenerateRendition(contentType: string | undefined, format: Re
|
|
|
639
653
|
|
|
640
654
|
// Check exact match first
|
|
641
655
|
const exactMatch = RENDITION_COMPATIBILITY[contentType];
|
|
642
|
-
if (exactMatch
|
|
656
|
+
if (exactMatch?.some((f) => f === formatStr)) {
|
|
643
657
|
return true;
|
|
644
658
|
}
|
|
645
659
|
|
|
@@ -647,7 +661,7 @@ export function canGenerateRendition(contentType: string | undefined, format: Re
|
|
|
647
661
|
const [category] = contentType.split('/');
|
|
648
662
|
const wildcardKey = `${category}/*`;
|
|
649
663
|
const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];
|
|
650
|
-
if (wildcardMatch
|
|
664
|
+
if (wildcardMatch?.some((f) => f === formatStr)) {
|
|
651
665
|
return true;
|
|
652
666
|
}
|
|
653
667
|
|
|
@@ -712,7 +726,7 @@ export interface GetFileUrlPayload {
|
|
|
712
726
|
// Optional filename to use in Content-Disposition for downloads
|
|
713
727
|
name?: string;
|
|
714
728
|
// Optional disposition for downloads (default: attachment)
|
|
715
|
-
disposition?:
|
|
729
|
+
disposition?: 'inline' | 'attachment';
|
|
716
730
|
}
|
|
717
731
|
|
|
718
732
|
export interface GetFileUrlResponse {
|
|
@@ -722,6 +736,22 @@ export interface GetFileUrlResponse {
|
|
|
722
736
|
path: string;
|
|
723
737
|
}
|
|
724
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
|
+
|
|
725
755
|
export interface FileMetadataResponse {
|
|
726
756
|
name: string;
|
|
727
757
|
size: number;
|
|
@@ -807,6 +837,6 @@ export interface DeleteFileResult {
|
|
|
807
837
|
}
|
|
808
838
|
|
|
809
839
|
export enum ContentObjectProcessingPriority {
|
|
810
|
-
normal =
|
|
811
|
-
low =
|
|
840
|
+
normal = 'normal',
|
|
841
|
+
low = 'low',
|
|
812
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', () => {
|