@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/tools.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { MCPToolAnnotations } from './apps.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Origin of a tool in the unified project-scoped tool registry.
|
|
5
|
+
*
|
|
6
|
+
* - `builtin`: anything statically registered on the worker — workflow builtins, studio agent tools, and sys skills
|
|
7
|
+
* - `app`: tools contributed by an installed app for the project
|
|
8
|
+
* - `interaction`: a project interaction exposed via `tag=tool` / `is_tool=true` / `is_skill=true`
|
|
9
|
+
*
|
|
10
|
+
* Skill semantics (the tool unlocks others when invoked) are NOT part of the source. They are
|
|
11
|
+
* identified universally by the `learn_` prefix in the tool name. This matches how the runtime
|
|
12
|
+
* registry stores them and avoids splitting one logical origin into two sources.
|
|
13
|
+
*/
|
|
14
|
+
export type ToolSource = 'builtin' | 'app' | 'interaction';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A single tool entry in the unified registry, regardless of where it came from.
|
|
18
|
+
* Returned by `GET /tools` and the resolution map of `POST /tools/validate`.
|
|
19
|
+
*/
|
|
20
|
+
export interface AggregatedTool {
|
|
21
|
+
/** Name as referenced from `agent_runner_options.tool_names`. For interaction skills this is `learn_<endpoint>`. */
|
|
22
|
+
name: string;
|
|
23
|
+
source: ToolSource;
|
|
24
|
+
description?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
/** Whether the tool is part of the default toolkit when no explicit `tool_names` is provided. */
|
|
27
|
+
is_default?: boolean;
|
|
28
|
+
annotations?: MCPToolAnnotations;
|
|
29
|
+
/** For skills (`learn_*`): tool names this skill unlocks when invoked. */
|
|
30
|
+
unlocked_tools?: string[];
|
|
31
|
+
/** Present when `source === 'app'`: the app installation that provides this tool. */
|
|
32
|
+
app_install_id?: string;
|
|
33
|
+
/** Present when `source === 'app'`: the app's manifest name (used for `principal.apps` filtering). */
|
|
34
|
+
app_name?: string;
|
|
35
|
+
/** Present when `source === 'interaction'`: the interaction document id. */
|
|
36
|
+
interaction_id?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Present when `source === 'interaction'`: true if the interaction has
|
|
39
|
+
* `agent_runner_options.is_agent === true`. Lets UI consumers distinguish
|
|
40
|
+
* sub-agents (autonomous, run-to-completion) from regular interaction tools.
|
|
41
|
+
*/
|
|
42
|
+
is_agent?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Optional filters for `GET /tools`.
|
|
47
|
+
*
|
|
48
|
+
* The resolution is `(sources ?? ALL) − exclude`:
|
|
49
|
+
* - `sources` alone: include only the listed sources
|
|
50
|
+
* - `exclude` alone: include all sources except the listed ones
|
|
51
|
+
* - Both: start from `sources`, then remove `exclude`
|
|
52
|
+
* - Neither: include all sources
|
|
53
|
+
*
|
|
54
|
+
* Sources that are filtered out are not fetched, so passing `exclude=['app']` skips
|
|
55
|
+
* the app round-trips entirely.
|
|
56
|
+
*/
|
|
57
|
+
export interface ListProjectToolsQuery {
|
|
58
|
+
/** Include only these sources. */
|
|
59
|
+
sources?: ToolSource[];
|
|
60
|
+
/** Drop these sources from the result (and skip their fetch). Applied after `sources`. */
|
|
61
|
+
exclude?: ToolSource[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Per-name resolution result for `POST /tools/validate`.
|
|
66
|
+
*/
|
|
67
|
+
export interface ToolValidationResult {
|
|
68
|
+
/** The name the caller asked about. */
|
|
69
|
+
name: string;
|
|
70
|
+
/** True if the name resolves to exactly one tool in the project's unified registry. */
|
|
71
|
+
valid: boolean;
|
|
72
|
+
/** When `valid`: which source the tool came from. */
|
|
73
|
+
source?: ToolSource;
|
|
74
|
+
/** When `valid` and `source === 'app'`: the app installation that provides the tool. */
|
|
75
|
+
app_install_id?: string;
|
|
76
|
+
/** When `valid` and `source === 'app'`: the app's manifest name. */
|
|
77
|
+
app_name?: string;
|
|
78
|
+
/** When `!valid` and a close match exists: the suggested replacement name (Levenshtein-based). */
|
|
79
|
+
suggestion?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Populated when a name appears in more than one source. Validation does not fail on this,
|
|
82
|
+
* but exposes the ambiguity so callers can surface a warning (last-write-wins resolution applies).
|
|
83
|
+
*/
|
|
84
|
+
collisions?: Array<{ source: ToolSource; app_install_id?: string }>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Request payload for `POST /tools/validate`.
|
|
89
|
+
*/
|
|
90
|
+
export interface ValidateToolNamesPayload {
|
|
91
|
+
/** Bare tool names as they appear in `agent_runner_options.tool_names`. `+`/`-` prefixes are stripped before lookup. */
|
|
92
|
+
names: string[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Response from `POST /tools/validate`.
|
|
97
|
+
*/
|
|
98
|
+
export interface ValidateToolNamesResponse {
|
|
99
|
+
/** One entry per requested name, in the same order. */
|
|
100
|
+
results: ToolValidationResult[];
|
|
101
|
+
/** Convenience count of `results.filter(r => !r.valid).length`. */
|
|
102
|
+
invalid_count: number;
|
|
103
|
+
}
|
package/src/training.ts
CHANGED
|
@@ -1,44 +1,42 @@
|
|
|
1
|
-
import type { TrainingJob } from
|
|
2
|
-
import { ExecutionEnvironmentRef } from
|
|
1
|
+
import type { TrainingJob } from '@llumiverse/common';
|
|
2
|
+
import type { ExecutionEnvironmentRef } from './environment.js';
|
|
3
3
|
|
|
4
4
|
export enum TrainingSessionStatus {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
created = 'created',
|
|
6
|
+
building = 'building',
|
|
7
|
+
prepared = 'prepared',
|
|
8
|
+
processing = 'processing',
|
|
9
|
+
completed = 'completed',
|
|
10
|
+
cancelled = 'cancelled',
|
|
11
|
+
failed = 'failed',
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface TrainingSession {
|
|
15
15
|
id: string;
|
|
16
16
|
project: string;
|
|
17
|
-
name: string
|
|
18
|
-
env: ExecutionEnvironmentRef
|
|
19
|
-
model: string
|
|
20
|
-
status: TrainingSessionStatus
|
|
21
|
-
runs: string[]
|
|
22
|
-
dataset: string
|
|
23
|
-
job: TrainingJob
|
|
24
|
-
created_by: string
|
|
25
|
-
updated_by: string
|
|
26
|
-
created_at: Date
|
|
27
|
-
updated_at: Date
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface TrainingSessionRef extends Omit<TrainingSession, 'runs'> {
|
|
17
|
+
name: string;
|
|
18
|
+
env: ExecutionEnvironmentRef;
|
|
19
|
+
model: string;
|
|
20
|
+
status: TrainingSessionStatus;
|
|
21
|
+
runs: string[];
|
|
22
|
+
dataset: string; //the name of the file dataset which was generated in GCS
|
|
23
|
+
job: TrainingJob;
|
|
24
|
+
created_by: string;
|
|
25
|
+
updated_by: string;
|
|
26
|
+
created_at: Date;
|
|
27
|
+
updated_at: Date;
|
|
31
28
|
}
|
|
32
29
|
|
|
30
|
+
export interface TrainingSessionRef extends Omit<TrainingSession, 'runs'> {}
|
|
33
31
|
|
|
34
32
|
export interface TrainingSessionCreatePayload {
|
|
35
|
-
name: string
|
|
36
|
-
env: string
|
|
37
|
-
model: string
|
|
33
|
+
name: string;
|
|
34
|
+
env: string;
|
|
35
|
+
model: string;
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
export interface ListTrainingSessionsQuery {
|
|
41
39
|
limit?: number;
|
|
42
40
|
offset?: number;
|
|
43
41
|
status?: TrainingSessionStatus;
|
|
44
|
-
}
|
|
42
|
+
}
|
package/src/transient-tokens.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ProjectRef, ProjectRoles } from
|
|
2
|
-
import { AccountRef, UserRef } from
|
|
3
|
-
|
|
1
|
+
import type { ProjectRef, ProjectRoles } from './project.js';
|
|
2
|
+
import type { AccountRef, UserRef } from './user.js';
|
|
4
3
|
|
|
5
4
|
export enum TransientTokenType {
|
|
6
5
|
userInvite = 'user-invite',
|
|
@@ -17,9 +16,7 @@ export interface TransientToken<T> {
|
|
|
17
16
|
updated_at: Date;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
export interface CreateOrUpdateTransientTokenPayload<T> extends Partial<TransientToken<T>> {
|
|
22
|
-
}
|
|
19
|
+
export interface CreateOrUpdateTransientTokenPayload<T> extends Partial<TransientToken<T>> {}
|
|
23
20
|
|
|
24
21
|
export interface UserInviteTokenData {
|
|
25
22
|
email: string;
|
|
@@ -27,4 +24,4 @@ export interface UserInviteTokenData {
|
|
|
27
24
|
account: AccountRef;
|
|
28
25
|
project?: ProjectRef;
|
|
29
26
|
invited_by: UserRef;
|
|
30
|
-
}
|
|
27
|
+
}
|
package/src/user.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ApiKey } from
|
|
2
|
-
import { ProjectRef, ProjectRoles } from
|
|
1
|
+
import type { ApiKey } from './apikey.js';
|
|
2
|
+
import type { ProjectRef, ProjectRoles } from './project.js';
|
|
3
3
|
|
|
4
4
|
export interface UserWithAccounts extends User {
|
|
5
5
|
accounts: AccountRef[];
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
export interface User {
|
|
10
9
|
id: string;
|
|
11
10
|
externalId: string;
|
|
@@ -20,14 +19,13 @@ export interface User {
|
|
|
20
19
|
source?: 'firebase' | 'scim';
|
|
21
20
|
updated_by?: string;
|
|
22
21
|
/** Custom properties for dynamic permission matching */
|
|
23
|
-
properties?: Record<string,
|
|
22
|
+
properties?: Record<string, unknown>;
|
|
24
23
|
/** BLP clearance level — determines max document sensitivity the user can access */
|
|
25
24
|
clearance?: number;
|
|
26
25
|
/** Compartments the user belongs to — restricts access to documents in matching compartments */
|
|
27
26
|
compartments?: string[];
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
|
|
31
29
|
export interface UpdateUserPayload {
|
|
32
30
|
name?: string;
|
|
33
31
|
username?: string;
|
|
@@ -35,12 +33,11 @@ export interface UpdateUserPayload {
|
|
|
35
33
|
language?: string;
|
|
36
34
|
phone?: string;
|
|
37
35
|
last_selected_account?: string;
|
|
38
|
-
properties?: Record<string,
|
|
36
|
+
properties?: Record<string, unknown>;
|
|
39
37
|
clearance?: number;
|
|
40
38
|
compartments?: string[];
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
|
|
44
41
|
export interface UserRef {
|
|
45
42
|
id: string;
|
|
46
43
|
name: string;
|
|
@@ -48,18 +45,17 @@ export interface UserRef {
|
|
|
48
45
|
picture?: string;
|
|
49
46
|
}
|
|
50
47
|
|
|
51
|
-
export const UserRefPopulate =
|
|
48
|
+
export const UserRefPopulate = 'id name email picture';
|
|
52
49
|
|
|
53
50
|
export enum Datacenters {
|
|
54
51
|
aws = 'aws',
|
|
55
52
|
gcp = 'gcp',
|
|
56
|
-
azure = 'azure'
|
|
53
|
+
azure = 'azure',
|
|
57
54
|
}
|
|
58
55
|
|
|
59
|
-
|
|
60
56
|
export enum BillingMethod {
|
|
61
57
|
stripe = 'stripe',
|
|
62
|
-
invoice = 'invoice'
|
|
58
|
+
invoice = 'invoice',
|
|
63
59
|
}
|
|
64
60
|
|
|
65
61
|
export enum AccountType {
|
|
@@ -68,7 +64,7 @@ export enum AccountType {
|
|
|
68
64
|
free = 'free',
|
|
69
65
|
customer = 'customer',
|
|
70
66
|
prospect = 'prospect',
|
|
71
|
-
unknown = 'unknown'
|
|
67
|
+
unknown = 'unknown',
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
export interface AccountBilling {
|
|
@@ -76,7 +72,6 @@ export interface AccountBilling {
|
|
|
76
72
|
stripe_customer_id?: string;
|
|
77
73
|
}
|
|
78
74
|
|
|
79
|
-
|
|
80
75
|
export interface Account {
|
|
81
76
|
id: string;
|
|
82
77
|
name: string;
|
|
@@ -84,8 +79,8 @@ export interface Account {
|
|
|
84
79
|
email_domains: string[];
|
|
85
80
|
|
|
86
81
|
onboarding: {
|
|
87
|
-
completed: boolean
|
|
88
|
-
completed_at: Date
|
|
82
|
+
completed: boolean;
|
|
83
|
+
completed_at: Date;
|
|
89
84
|
};
|
|
90
85
|
|
|
91
86
|
datacenter: string;
|
|
@@ -100,27 +95,24 @@ export interface Account {
|
|
|
100
95
|
updated_at: string;
|
|
101
96
|
}
|
|
102
97
|
|
|
103
|
-
|
|
104
98
|
export interface UpdateAccountPayload {
|
|
105
99
|
name?: string;
|
|
106
100
|
email_domains?: string[];
|
|
107
101
|
billing?: AccountBilling;
|
|
108
102
|
}
|
|
109
103
|
|
|
110
|
-
|
|
111
104
|
export interface AccountRef {
|
|
112
105
|
id: string;
|
|
113
106
|
name: string;
|
|
114
107
|
}
|
|
115
108
|
|
|
116
|
-
export const AccountRefPopulate =
|
|
109
|
+
export const AccountRefPopulate = 'id name';
|
|
117
110
|
|
|
118
111
|
export interface InviteUserRequestPayload {
|
|
119
112
|
email: string;
|
|
120
113
|
role: ProjectRoles;
|
|
121
114
|
}
|
|
122
115
|
|
|
123
|
-
|
|
124
116
|
export interface InviteUserResponsePayload {
|
|
125
117
|
action: 'invited' | 'added';
|
|
126
118
|
}
|
|
@@ -137,15 +129,8 @@ export interface AccountProjectsResponse {
|
|
|
137
129
|
data: ProjectRef[];
|
|
138
130
|
}
|
|
139
131
|
|
|
140
|
-
export interface GoogleProjectTokenResponse {
|
|
141
|
-
principal: string;
|
|
142
|
-
token: string;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
132
|
type UserOrApiKey<T extends User | ApiKey> = T extends User ? User : ApiKey;
|
|
148
|
-
type SessionType<T extends User | ApiKey> = T extends User ?
|
|
133
|
+
type SessionType<T extends User | ApiKey> = T extends User ? 'user' : 'apikey';
|
|
149
134
|
export interface SessionInfo<T extends User | ApiKey> {
|
|
150
135
|
isNew?: boolean;
|
|
151
136
|
type: SessionType<T>;
|
|
@@ -156,19 +141,16 @@ export interface SessionInfo<T extends User | ApiKey> {
|
|
|
156
141
|
accounts: AccountRef[];
|
|
157
142
|
}
|
|
158
143
|
|
|
159
|
-
|
|
160
|
-
export interface
|
|
161
|
-
export interface ApiKeySessionInfo extends SessionInfo<ApiKey> { }
|
|
144
|
+
export interface UserSessionInfo extends SessionInfo<User> {}
|
|
145
|
+
export interface ApiKeySessionInfo extends SessionInfo<ApiKey> {}
|
|
162
146
|
|
|
163
147
|
export interface OnboardingProgress {
|
|
164
|
-
interactions: boolean
|
|
165
|
-
prompts: boolean
|
|
166
|
-
environments: boolean
|
|
167
|
-
default_environment_defined: boolean
|
|
148
|
+
interactions: boolean;
|
|
149
|
+
prompts: boolean;
|
|
150
|
+
environments: boolean;
|
|
151
|
+
default_environment_defined: boolean;
|
|
168
152
|
}
|
|
169
153
|
|
|
170
|
-
|
|
171
|
-
|
|
172
154
|
/**
|
|
173
155
|
* Data collected at signup
|
|
174
156
|
* used for onboarding and segments
|
|
@@ -181,7 +163,6 @@ export interface SignupData {
|
|
|
181
163
|
maturity?: string;
|
|
182
164
|
}
|
|
183
165
|
|
|
184
|
-
|
|
185
166
|
/**
|
|
186
167
|
* Signup Payload: used to create a new user
|
|
187
168
|
*/
|
package/src/utils/auth.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ProjectRef } from
|
|
1
|
+
import type { ProjectRef } from '../project.js';
|
|
2
2
|
|
|
3
3
|
export function getTenantId(accountId: string, projectId: string): string {
|
|
4
4
|
//use the last 6 characters of the accountId as the db name
|
|
5
5
|
//as in mongo the last 6 char are an incrementing counter
|
|
6
6
|
const accountLast6 = accountId.slice(-6);
|
|
7
7
|
const projectLast6 = projectId.slice(-6);
|
|
8
|
-
return accountLast6
|
|
8
|
+
return `${accountLast6}_${projectLast6}`;
|
|
9
9
|
}
|
|
10
10
|
export function getTenantIdFromProject(project: ProjectRef): string {
|
|
11
11
|
return getTenantId(project.account, project.id);
|
package/src/utils/schemas.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { JSONSchema, ToolDefinition } from
|
|
2
|
-
import { PromptRole } from
|
|
3
|
-
import { InCodePrompt, InteractionRefWithSchema, PopulatedInteraction } from
|
|
4
|
-
import { ExecutablePromptSegmentDef, PromptSegmentDefType } from
|
|
1
|
+
import type { JSONSchema, ToolDefinition } from '@llumiverse/common';
|
|
2
|
+
import { PromptRole } from '@llumiverse/common';
|
|
3
|
+
import type { InCodePrompt, InteractionRefWithSchema, PopulatedInteraction } from '../interaction.js';
|
|
4
|
+
import { type ExecutablePromptSegmentDef, PromptSegmentDefType } from '../prompt.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Sanitize a tool definition to only include fields expected by LLM APIs.
|
|
8
|
-
* Removes extra fields like 'category', 'default', '
|
|
8
|
+
* Removes extra fields like 'category', 'default', 'tools' that are
|
|
9
9
|
* used internally but should not be sent to the LLM.
|
|
10
10
|
*/
|
|
11
11
|
export function sanitizeToolDefinition(tool: ToolDefinition): ToolDefinition {
|
|
@@ -34,7 +34,7 @@ export function removeExtraProperties<T>(schema: T): T {
|
|
|
34
34
|
removeExtraProperties(item);
|
|
35
35
|
}
|
|
36
36
|
} else if (typeof schema === 'object') {
|
|
37
|
-
const obj = schema as Record<string,
|
|
37
|
+
const obj = schema as Record<string, unknown>;
|
|
38
38
|
|
|
39
39
|
// If this looks like a property definition (has editor/format for document/media),
|
|
40
40
|
// enrich it with type and description hints before stripping.
|
|
@@ -48,7 +48,7 @@ export function removeExtraProperties<T>(schema: T): T {
|
|
|
48
48
|
} else if (key === 'format' && (value === 'textarea' || value === 'document' || value === 'media')) {
|
|
49
49
|
delete obj[key];
|
|
50
50
|
} else if (typeof value === 'object') {
|
|
51
|
-
removeExtraProperties(value)
|
|
51
|
+
removeExtraProperties(value);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -59,10 +59,8 @@ export function removeExtraProperties<T>(schema: T): T {
|
|
|
59
59
|
* Returns true if the schema property represents a document reference
|
|
60
60
|
* (identified by editor: "document" or format: "document" / "media").
|
|
61
61
|
*/
|
|
62
|
-
function isDocumentProperty(obj: Record<string,
|
|
63
|
-
return obj.editor === 'document' ||
|
|
64
|
-
obj.format === 'document' ||
|
|
65
|
-
obj.format === 'media';
|
|
62
|
+
function isDocumentProperty(obj: Record<string, unknown>): boolean {
|
|
63
|
+
return obj.editor === 'document' || obj.format === 'document' || obj.format === 'media';
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
/**
|
|
@@ -78,7 +76,7 @@ export const DOCUMENT_STORE_HINT = "Use 'store:<document_id>' format to referenc
|
|
|
78
76
|
* - Sets type to "string" if not already set
|
|
79
77
|
* - Appends a store: prefix hint to the description
|
|
80
78
|
*/
|
|
81
|
-
function enrichDocumentProperty(obj: Record<string,
|
|
79
|
+
function enrichDocumentProperty(obj: Record<string, unknown>): void {
|
|
82
80
|
// Set type to string if missing (document references are string IDs)
|
|
83
81
|
if (!obj.type) {
|
|
84
82
|
obj.type = 'string';
|
|
@@ -89,14 +87,14 @@ function enrichDocumentProperty(obj: Record<string, any>): void {
|
|
|
89
87
|
// after serialization when only the description survives.
|
|
90
88
|
if (!obj.description) {
|
|
91
89
|
obj.description = DOCUMENT_STORE_HINT;
|
|
92
|
-
} else if (!obj.description.includes(DOCUMENT_STORE_HINT)) {
|
|
90
|
+
} else if (typeof obj.description === 'string' && !obj.description.includes(DOCUMENT_STORE_HINT)) {
|
|
93
91
|
obj.description = `${obj.description} ${DOCUMENT_STORE_HINT}`;
|
|
94
92
|
}
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
export function mergeJSONSchemas(schemas: JSONSchema[]) {
|
|
98
96
|
const props: Record<string, JSONSchema> = {};
|
|
99
|
-
|
|
97
|
+
const required: string[] = [];
|
|
100
98
|
for (const schema of schemas) {
|
|
101
99
|
if (schema.properties) {
|
|
102
100
|
if (schema.required) {
|
|
@@ -107,13 +105,14 @@ export function mergeJSONSchemas(schemas: JSONSchema[]) {
|
|
|
107
105
|
Object.assign(props, schema.properties);
|
|
108
106
|
}
|
|
109
107
|
}
|
|
110
|
-
const schema: JSONSchema | null =
|
|
108
|
+
const schema: JSONSchema | null =
|
|
109
|
+
Object.keys(props).length > 0 ? { properties: props, required, type: 'object' } : null;
|
|
111
110
|
return schema;
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
export function _mergePromptsSchema(prompts: ExecutablePromptSegmentDef[]) {
|
|
115
114
|
const props: Record<string, JSONSchema> = {};
|
|
116
|
-
|
|
115
|
+
const required = new Set<string>();
|
|
117
116
|
for (const prompt of prompts) {
|
|
118
117
|
if (prompt.template?.inputSchema?.properties) {
|
|
119
118
|
const schema = prompt.template?.inputSchema;
|
|
@@ -132,22 +131,25 @@ export function _mergePromptsSchema(prompts: ExecutablePromptSegmentDef[]) {
|
|
|
132
131
|
properties: {
|
|
133
132
|
role: {
|
|
134
133
|
type: 'string',
|
|
135
|
-
enum: [PromptRole.assistant, PromptRole.user]
|
|
134
|
+
enum: [PromptRole.assistant, PromptRole.user],
|
|
136
135
|
},
|
|
137
136
|
content: { type: 'string' },
|
|
138
137
|
},
|
|
139
|
-
required: ['role', 'content']
|
|
140
|
-
}
|
|
141
|
-
}
|
|
138
|
+
required: ['role', 'content'],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
142
141
|
});
|
|
143
142
|
required.add('chat');
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
|
-
|
|
147
|
-
const schema: JSONSchema | null =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
|
|
146
|
+
const schema: JSONSchema | null =
|
|
147
|
+
Object.keys(props).length > 0
|
|
148
|
+
? {
|
|
149
|
+
properties: props,
|
|
150
|
+
required: Array.from(required),
|
|
151
|
+
}
|
|
152
|
+
: null;
|
|
151
153
|
return schema;
|
|
152
154
|
}
|
|
153
155
|
|
|
@@ -158,7 +160,7 @@ export function mergePromptsSchema(interaction: InteractionRefWithSchema | Popul
|
|
|
158
160
|
|
|
159
161
|
export function mergeInCodePromptSchemas(prompts: InCodePrompt[]) {
|
|
160
162
|
const props: Record<string, JSONSchema> = {};
|
|
161
|
-
|
|
163
|
+
const required = new Set<string>();
|
|
162
164
|
for (const prompt of prompts) {
|
|
163
165
|
if (prompt.schema?.properties) {
|
|
164
166
|
const schema = prompt.schema;
|
|
@@ -170,9 +172,12 @@ export function mergeInCodePromptSchemas(prompts: InCodePrompt[]) {
|
|
|
170
172
|
Object.assign(props, schema.properties);
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
|
-
const schema: JSONSchema | null =
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
const schema: JSONSchema | null =
|
|
176
|
+
Object.keys(props).length > 0
|
|
177
|
+
? {
|
|
178
|
+
properties: props,
|
|
179
|
+
required: Array.from(required),
|
|
180
|
+
}
|
|
181
|
+
: null;
|
|
177
182
|
return schema;
|
|
178
|
-
}
|
|
183
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> =
|
|
2
|
-
Pick<T, Exclude<keyof T, Keys>> &
|
|
1
|
+
export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> &
|
|
3
2
|
{
|
|
4
|
-
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K
|
|
3
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
5
4
|
}[Keys];
|
|
6
|
-
|
|
@@ -15,7 +15,7 @@ export enum AgentEventType {
|
|
|
15
15
|
AgentRunStarted = 'agent_run_started',
|
|
16
16
|
AgentRunCompleted = 'agent_run_completed',
|
|
17
17
|
LlmCall = 'llm_call',
|
|
18
|
-
ToolCall = 'tool_call'
|
|
18
|
+
ToolCall = 'tool_call',
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -32,7 +32,6 @@ export enum LlmCallType {
|
|
|
32
32
|
Checkpoint = 'checkpoint',
|
|
33
33
|
/** Nested interaction call from within tools */
|
|
34
34
|
NestedInteraction = 'nested_interaction',
|
|
35
|
-
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
/**
|
|
@@ -58,7 +57,7 @@ export enum TelemetryToolType {
|
|
|
58
57
|
*/
|
|
59
58
|
export interface BaseAgentEvent {
|
|
60
59
|
/** Type of the event */
|
|
61
|
-
eventType:
|
|
60
|
+
eventType: AgentEventType;
|
|
62
61
|
/** ISO 8601 timestamp */
|
|
63
62
|
timestamp: string;
|
|
64
63
|
/** Globally unique ID for this agent run */
|
|
@@ -138,7 +137,7 @@ export interface AgentRunCompletedEvent extends BaseAgentEvent {
|
|
|
138
137
|
* Emitted for each LLM call (start/resume conversation)
|
|
139
138
|
* Note: model, environmentId, environmentType are required (override base optional)
|
|
140
139
|
*/
|
|
141
|
-
|
|
140
|
+
interface BaseLlmCallEvent extends BaseAgentEvent {
|
|
142
141
|
eventType: AgentEventType.LlmCall;
|
|
143
142
|
/** Number of input/prompt tokens */
|
|
144
143
|
promptTokens: number;
|
|
@@ -166,6 +165,8 @@ export interface LlmCallEvent extends BaseAgentEvent {
|
|
|
166
165
|
errorType?: string;
|
|
167
166
|
}
|
|
168
167
|
|
|
168
|
+
export interface LlmCallEvent extends BaseLlmCallEvent {}
|
|
169
|
+
|
|
169
170
|
// ============================================================================
|
|
170
171
|
// Tool Call Events
|
|
171
172
|
// ============================================================================
|
|
@@ -238,18 +239,14 @@ export interface NestedInteractionEvent extends LlmCallEvent {
|
|
|
238
239
|
toolType: TelemetryToolType;
|
|
239
240
|
}
|
|
240
241
|
|
|
241
|
-
|
|
242
242
|
// ============================================================================
|
|
243
243
|
// Union type for all events
|
|
244
244
|
// ============================================================================
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
| ToolCallEvent
|
|
251
|
-
| CheckpointCreatedEvent
|
|
252
|
-
| NestedInteractionEvent;
|
|
246
|
+
/**
|
|
247
|
+
* @discriminator eventType
|
|
248
|
+
*/
|
|
249
|
+
export type AgentEvent = AgentRunStartedEvent | AgentRunCompletedEvent | LlmCallEvent | ToolCallEvent;
|
|
253
250
|
|
|
254
251
|
/**
|
|
255
252
|
* Workflow Analytics Types
|
|
@@ -271,12 +268,12 @@ export type WorkflowAnalyticsResolution = 'minute' | 'hour' | 'day' | 'week' | '
|
|
|
271
268
|
* Dimensions to group analytics by
|
|
272
269
|
*/
|
|
273
270
|
export type WorkflowAnalyticsGroupBy =
|
|
274
|
-
| 'model'
|
|
275
|
-
| 'environment'
|
|
276
|
-
| 'tool'
|
|
277
|
-
| 'toolType'
|
|
278
|
-
| 'agent'
|
|
279
|
-
| 'errorType';
|
|
271
|
+
| 'model' // Group by LLM model (claude-3-5-sonnet, gemini-1.5-pro, etc.)
|
|
272
|
+
| 'environment' // Group by environment/driver (vertexai, bedrock, openai)
|
|
273
|
+
| 'tool' // Group by tool name
|
|
274
|
+
| 'toolType' // Group by tool type (builtin, interaction, remote, skill)
|
|
275
|
+
| 'agent' // Group by agent/interaction name
|
|
276
|
+
| 'errorType'; // Group by error type
|
|
280
277
|
|
|
281
278
|
/**
|
|
282
279
|
* Filter criteria for workflow analytics queries
|