@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/apps.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { JSONObject, JSONSchema, ToolDefinition } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { JSONObject, JSONSchema, ToolDefinition } from '@llumiverse/common';
|
|
2
|
+
import type { AppDashboardDefinition } from './data-platform.js';
|
|
3
|
+
import type { CatalogInteractionRef } from './interaction.js';
|
|
4
|
+
import type { DSLActivityOptions, InCodeProcessDefinition, InCodeTypeDefinition } from './store/index.js';
|
|
4
5
|
|
|
5
6
|
/** Allowed values for AppUINavItem.preferredSection */
|
|
6
|
-
export const PREFERRED_SECTIONS = [
|
|
7
|
+
export const PREFERRED_SECTIONS = ['default', 'footer', 'settings'] as const;
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Additional navigation item for an app's UI configuration.
|
|
@@ -44,7 +45,7 @@ export interface AppUIConfig {
|
|
|
44
45
|
* - shadow - use Shadow DOM to fully isolate the plugin from the host.
|
|
45
46
|
* - css - use CSS processing (like prefixing or other isolation techniques). Ligther but plugins may conflict with the host
|
|
46
47
|
*/
|
|
47
|
-
isolation?:
|
|
48
|
+
isolation?: 'shadow' | 'css';
|
|
48
49
|
/**
|
|
49
50
|
* Navigation items for the app's sidebar UI.
|
|
50
51
|
* Only applicable for apps with UI capability in shell contexts (ie. CompositeApp shell).
|
|
@@ -72,12 +73,12 @@ export interface AppInstallationsQuery {
|
|
|
72
73
|
/**
|
|
73
74
|
* Authentication type for tool collections
|
|
74
75
|
*/
|
|
75
|
-
export type ToolCollectionAuthType =
|
|
76
|
+
export type ToolCollectionAuthType = 'oauth' | 'other';
|
|
76
77
|
|
|
77
78
|
/**
|
|
78
79
|
* Tool collection type
|
|
79
80
|
*/
|
|
80
|
-
export type ToolCollectionType =
|
|
81
|
+
export type ToolCollectionType = 'mcp' | 'vertesia_sdk';
|
|
81
82
|
|
|
82
83
|
/**
|
|
83
84
|
* Base tool collection configuration
|
|
@@ -131,7 +132,7 @@ export interface MCPOAuthConfig {
|
|
|
131
132
|
* MCP tool collection configuration (requires name, description, and namespace)
|
|
132
133
|
*/
|
|
133
134
|
export interface MCPToolCollectionObject extends BaseToolCollectionObject {
|
|
134
|
-
type:
|
|
135
|
+
type: 'mcp';
|
|
135
136
|
|
|
136
137
|
/**
|
|
137
138
|
* Stable identifier for this collection.
|
|
@@ -196,7 +197,7 @@ export interface MCPToolCollectionObject extends BaseToolCollectionObject {
|
|
|
196
197
|
* Vertesia SDK tool collection configuration
|
|
197
198
|
*/
|
|
198
199
|
export interface VertesiaSDKToolCollectionObject extends BaseToolCollectionObject {
|
|
199
|
-
type:
|
|
200
|
+
type: 'vertesia_sdk';
|
|
200
201
|
|
|
201
202
|
/**
|
|
202
203
|
* Optional namespace to use for tool names from this collection.
|
|
@@ -220,14 +221,17 @@ export interface VertesiaSDKToolCollectionObject extends BaseToolCollectionObjec
|
|
|
220
221
|
/**
|
|
221
222
|
* Tool collection configuration (object format)
|
|
222
223
|
*/
|
|
224
|
+
/**
|
|
225
|
+
* @discriminator type
|
|
226
|
+
*/
|
|
223
227
|
export type ToolCollectionObject = MCPToolCollectionObject | VertesiaSDKToolCollectionObject;
|
|
224
228
|
|
|
225
229
|
/**
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
230
|
+
* Backward-compatible TypeScript alias. Public API payloads should reference
|
|
231
|
+
* ToolCollectionObject directly so generated clients do not create a wrapper
|
|
232
|
+
* model around the discriminated union.
|
|
229
233
|
*/
|
|
230
|
-
export type ToolCollection =
|
|
234
|
+
export type ToolCollection = ToolCollectionObject;
|
|
231
235
|
|
|
232
236
|
export const MCP_COLLECTION_ID_PATTERN = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
233
237
|
export const MCP_COLLECTION_NAMESPACE_PATTERN = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;
|
|
@@ -255,46 +259,34 @@ export function getDefaultOAuthAppNameForCollectionId(collectionId: string): str
|
|
|
255
259
|
|
|
256
260
|
/**
|
|
257
261
|
* Normalizes a tool collection to the object format.
|
|
258
|
-
*
|
|
262
|
+
* Applies optional `{{var}}` substitution to the URL so manifests can reference
|
|
263
|
+
* deployment-time variables like `{{studio_ui}}`.
|
|
259
264
|
*
|
|
260
|
-
* @param collection -
|
|
265
|
+
* @param collection - ToolCollectionObject
|
|
266
|
+
* @param vars - Optional endpoint variables to substitute in URLs
|
|
261
267
|
* @returns Normalized ToolCollectionObject
|
|
262
268
|
*/
|
|
263
|
-
export function normalizeToolCollection(collection:
|
|
264
|
-
if (typeof collection
|
|
265
|
-
|
|
266
|
-
if (collection.startsWith('mcp:')) {
|
|
267
|
-
const url = collection.substring('mcp:'.length);
|
|
268
|
-
// For legacy MCP strings, derive name and prefix from URL
|
|
269
|
-
const urlObj = new URL(url);
|
|
270
|
-
const name = urlObj.hostname.replace(/\./g, '-');
|
|
271
|
-
const id = deriveMCPCollectionId(urlObj.hostname);
|
|
272
|
-
return {
|
|
273
|
-
url,
|
|
274
|
-
type: 'mcp',
|
|
275
|
-
id,
|
|
276
|
-
name,
|
|
277
|
-
description: `MCP server at ${url}`,
|
|
278
|
-
namespace: name
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
return {
|
|
282
|
-
url: collection,
|
|
283
|
-
type: 'vertesia_sdk'
|
|
284
|
-
};
|
|
269
|
+
export function normalizeToolCollection(collection: ToolCollectionObject, vars?: Endpoints): ToolCollectionObject {
|
|
270
|
+
if (!collection || typeof collection !== 'object') {
|
|
271
|
+
throw new TypeError('Tool collection must be an object');
|
|
285
272
|
}
|
|
286
|
-
|
|
273
|
+
const substitutedUrl = vars && collection.url ? substituteEndpoints(collection.url, vars) : collection.url;
|
|
274
|
+
const urlChanged = substitutedUrl !== collection.url;
|
|
287
275
|
if (collection.type === 'mcp') {
|
|
288
276
|
const fallbackId = deriveMCPCollectionId(collection.id || collection.name || collection.url);
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
277
|
+
if (urlChanged || !collection.id) {
|
|
278
|
+
return {
|
|
279
|
+
...collection,
|
|
280
|
+
url: substitutedUrl,
|
|
281
|
+
id: collection.id || fallbackId,
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
} else if (urlChanged) {
|
|
285
|
+
return { ...collection, url: substitutedUrl };
|
|
293
286
|
}
|
|
294
287
|
return collection;
|
|
295
288
|
}
|
|
296
289
|
|
|
297
|
-
|
|
298
290
|
/**
|
|
299
291
|
* Metadata hints from MCP tool annotations (per MCP spec).
|
|
300
292
|
*/
|
|
@@ -316,7 +308,7 @@ export interface MCPToolAnnotations {
|
|
|
316
308
|
*/
|
|
317
309
|
export interface AgentToolDefinition extends ToolDefinition {
|
|
318
310
|
/**
|
|
319
|
-
* The tool execution URL. It can be an absolute URL or a path in which case the URL is obtained
|
|
311
|
+
* The tool execution URL. It can be an absolute URL or a path in which case the URL is obtained
|
|
320
312
|
* using the base URL of the tool server API. Ex: http://tool-server.com/api/
|
|
321
313
|
* Example of relative URLs: "tools/my-tool-collection" or "/api/tools/my-tool-collection"
|
|
322
314
|
*/
|
|
@@ -328,18 +320,29 @@ export interface AgentToolDefinition extends ToolDefinition {
|
|
|
328
320
|
/**
|
|
329
321
|
* Whether this tool is available by default.
|
|
330
322
|
* - true/undefined: Tool is always available to agents
|
|
331
|
-
* - false: Tool is only available when
|
|
323
|
+
* - false: Tool is only available when enabled by a skill via `tools`
|
|
332
324
|
*/
|
|
333
325
|
default?: boolean;
|
|
334
326
|
/**
|
|
335
|
-
* For skill tools (learn_
|
|
336
|
-
*
|
|
327
|
+
* For skill tools (`learn_*`): the tool names this skill enables when called.
|
|
328
|
+
* Matches the `tools:` key used in SKILL.md frontmatter and built-in skill
|
|
329
|
+
* definitions — one name across the whole stack.
|
|
337
330
|
*/
|
|
338
|
-
|
|
331
|
+
tools?: string[];
|
|
339
332
|
/**
|
|
340
333
|
* MCP tool annotations providing hints about tool behavior and safety.
|
|
341
334
|
*/
|
|
342
335
|
annotations?: MCPToolAnnotations;
|
|
336
|
+
/**
|
|
337
|
+
* When true, agents must obtain explicit user confirmation via `ask_user`
|
|
338
|
+
* (Yes/No) before invoking this tool. If the user answers No, the tool
|
|
339
|
+
* must not run and should return an error indicating the user declined.
|
|
340
|
+
*
|
|
341
|
+
* Stronger than `annotations.destructiveHint` (which is only a hint) —
|
|
342
|
+
* this is a hard contract the agent is expected to honor. Set on tools
|
|
343
|
+
* that perform irreversible or destructive actions (e.g. delete_*).
|
|
344
|
+
*/
|
|
345
|
+
requires_user_confirmation?: boolean;
|
|
343
346
|
}
|
|
344
347
|
|
|
345
348
|
/**
|
|
@@ -357,9 +360,9 @@ export interface RemoteActivityDefinition {
|
|
|
357
360
|
/** Description of what the activity does */
|
|
358
361
|
description?: string;
|
|
359
362
|
/** JSON Schema for the activity input parameters */
|
|
360
|
-
input_schema?: Record<string,
|
|
363
|
+
input_schema?: Record<string, unknown>;
|
|
361
364
|
/** JSON Schema for the activity output */
|
|
362
|
-
output_schema?: Record<string,
|
|
365
|
+
output_schema?: Record<string, unknown>;
|
|
363
366
|
/**
|
|
364
367
|
* The activity execution URL. Can be absolute or relative to the tool server base URL.
|
|
365
368
|
* If not provided, the collection-specific activities endpoint is used.
|
|
@@ -369,8 +372,213 @@ export interface RemoteActivityDefinition {
|
|
|
369
372
|
options?: DSLActivityOptions;
|
|
370
373
|
}
|
|
371
374
|
|
|
372
|
-
export type AppCapabilities = 'ui' | 'tools' | 'interactions' | 'types' | 'templates';
|
|
375
|
+
export type AppCapabilities = 'ui' | 'tools' | 'interactions' | 'types' | 'processes' | 'templates' | 'dashboards';
|
|
373
376
|
export type AppAvailableIn = 'app_portal' | 'composite_app';
|
|
377
|
+
|
|
378
|
+
export type AppVersionKind = 'design' | 'preview' | 'published';
|
|
379
|
+
export type AppVersionState = 'ready' | 'failed' | 'expired';
|
|
380
|
+
export type AppVersionTarget = 'static' | 'service';
|
|
381
|
+
export type AppVersionGitRefType = 'branch' | 'tag' | 'commit' | 'detached';
|
|
382
|
+
export type AppBuildIntent = 'preview' | 'publish';
|
|
383
|
+
export type AppBuildTrigger = 'ui' | 'git_push' | 'agent' | 'api';
|
|
384
|
+
|
|
385
|
+
export interface AppVersionStorage {
|
|
386
|
+
tenant_id?: string;
|
|
387
|
+
app_prefix?: string;
|
|
388
|
+
artifacts_prefix?: string;
|
|
389
|
+
source_archive?: string;
|
|
390
|
+
source_git?: AppVersionGitSource;
|
|
391
|
+
build_prefix?: string;
|
|
392
|
+
manifest_path?: string;
|
|
393
|
+
service_archive?: string;
|
|
394
|
+
live_metadata_path?: string;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export interface AppVersionGitSource {
|
|
398
|
+
url?: string;
|
|
399
|
+
remote?: string;
|
|
400
|
+
/**
|
|
401
|
+
* The source ref that should be used to reproduce this version. For immutable
|
|
402
|
+
* app versions this is normally the tag created during preview/publish.
|
|
403
|
+
*/
|
|
404
|
+
ref?: string;
|
|
405
|
+
ref_type?: AppVersionGitRefType;
|
|
406
|
+
branch?: string;
|
|
407
|
+
tag?: string;
|
|
408
|
+
commit?: string;
|
|
409
|
+
dirty?: boolean;
|
|
410
|
+
pushed?: boolean;
|
|
411
|
+
push_warning?: string;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface AppVersionUrls {
|
|
415
|
+
live_url?: string;
|
|
416
|
+
app_url?: string;
|
|
417
|
+
plugin_url?: string;
|
|
418
|
+
package_url?: string;
|
|
419
|
+
internal_preview_url?: string;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface AppVersionRecord {
|
|
423
|
+
id: string;
|
|
424
|
+
account: string;
|
|
425
|
+
project: string;
|
|
426
|
+
app?: string;
|
|
427
|
+
app_id: string;
|
|
428
|
+
app_name: string;
|
|
429
|
+
version_id: string;
|
|
430
|
+
kind: AppVersionKind;
|
|
431
|
+
state: AppVersionState;
|
|
432
|
+
active?: boolean;
|
|
433
|
+
target?: AppVersionTarget;
|
|
434
|
+
agent_run_id?: string;
|
|
435
|
+
sandbox_id?: string;
|
|
436
|
+
title?: string;
|
|
437
|
+
description?: string;
|
|
438
|
+
storage?: AppVersionStorage;
|
|
439
|
+
urls?: AppVersionUrls;
|
|
440
|
+
manifest?: Record<string, unknown>;
|
|
441
|
+
files?: string[];
|
|
442
|
+
file_count?: number;
|
|
443
|
+
source_file_count?: number;
|
|
444
|
+
screenshot_artifact?: string;
|
|
445
|
+
checks?: string[];
|
|
446
|
+
created_by?: string;
|
|
447
|
+
created_at: string;
|
|
448
|
+
updated_at: string;
|
|
449
|
+
published_at?: string;
|
|
450
|
+
checked_at?: string;
|
|
451
|
+
expires_at?: string;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export interface UpsertAppVersionRequest {
|
|
455
|
+
app?: string;
|
|
456
|
+
app_id: string;
|
|
457
|
+
app_name?: string;
|
|
458
|
+
version_id: string;
|
|
459
|
+
kind: AppVersionKind;
|
|
460
|
+
state?: AppVersionState;
|
|
461
|
+
active?: boolean;
|
|
462
|
+
target?: AppVersionTarget;
|
|
463
|
+
agent_run_id?: string;
|
|
464
|
+
sandbox_id?: string;
|
|
465
|
+
title?: string;
|
|
466
|
+
description?: string;
|
|
467
|
+
storage?: AppVersionStorage;
|
|
468
|
+
urls?: AppVersionUrls;
|
|
469
|
+
manifest?: Record<string, unknown>;
|
|
470
|
+
files?: string[];
|
|
471
|
+
file_count?: number;
|
|
472
|
+
source_file_count?: number;
|
|
473
|
+
screenshot_artifact?: string;
|
|
474
|
+
checks?: string[];
|
|
475
|
+
published_at?: string;
|
|
476
|
+
checked_at?: string;
|
|
477
|
+
expires_at?: string;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export interface AppVersionListQuery {
|
|
481
|
+
app_id?: string;
|
|
482
|
+
kind?: AppVersionKind;
|
|
483
|
+
include_expired?: boolean;
|
|
484
|
+
limit?: number;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
export interface ActivateAppVersionResponse {
|
|
488
|
+
version: AppVersionRecord;
|
|
489
|
+
app?: AppManifest;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
export interface StartAppBuildRequest {
|
|
493
|
+
/**
|
|
494
|
+
* Source branch, tag, or commit to build. When omitted, the app source
|
|
495
|
+
* configuration chooses the dev branch for previews and production branch
|
|
496
|
+
* for publishes.
|
|
497
|
+
*/
|
|
498
|
+
source_ref?: string;
|
|
499
|
+
source_ref_type?: Extract<AppVersionGitRefType, 'branch' | 'tag' | 'commit'>;
|
|
500
|
+
intent?: AppBuildIntent;
|
|
501
|
+
trigger?: AppBuildTrigger;
|
|
502
|
+
target?: AppVersionTarget;
|
|
503
|
+
activate?: boolean;
|
|
504
|
+
title?: string;
|
|
505
|
+
description?: string;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface StartAppBuildResponse {
|
|
509
|
+
workflow_id: string;
|
|
510
|
+
run_id: string;
|
|
511
|
+
app_id: string;
|
|
512
|
+
intent: AppBuildIntent;
|
|
513
|
+
source_ref?: string;
|
|
514
|
+
source_ref_type?: Extract<AppVersionGitRefType, 'branch' | 'tag' | 'commit'>;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface AppBuildWorkflowInput extends StartAppBuildRequest {
|
|
518
|
+
app_id: string;
|
|
519
|
+
app_record_id?: string;
|
|
520
|
+
app_title?: string;
|
|
521
|
+
app_description?: string;
|
|
522
|
+
source_git_url?: string;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface AppBuildWorkflowResult {
|
|
526
|
+
app_id: string;
|
|
527
|
+
version_id: string;
|
|
528
|
+
kind: Extract<AppVersionKind, 'preview' | 'published'>;
|
|
529
|
+
state: AppVersionState;
|
|
530
|
+
source_git?: AppVersionGitSource;
|
|
531
|
+
urls?: AppVersionUrls;
|
|
532
|
+
file_count?: number;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export type AppBuildProgressStatus = 'queued' | 'resolving' | 'building' | 'completed' | 'failed';
|
|
536
|
+
|
|
537
|
+
export interface AppBuildProgress {
|
|
538
|
+
status: AppBuildProgressStatus;
|
|
539
|
+
step: string;
|
|
540
|
+
app_id?: string;
|
|
541
|
+
version_id?: string;
|
|
542
|
+
intent?: AppBuildIntent;
|
|
543
|
+
source_ref?: string;
|
|
544
|
+
source_ref_type?: Extract<AppVersionGitRefType, 'branch' | 'tag' | 'commit'>;
|
|
545
|
+
source_commit?: string;
|
|
546
|
+
file_count?: number;
|
|
547
|
+
app_url?: string;
|
|
548
|
+
error?: string;
|
|
549
|
+
updated_at: string;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Access control policy for an app installation.
|
|
554
|
+
* Declares which access surfaces are gated by per-user ACEs.
|
|
555
|
+
*
|
|
556
|
+
* - 'all' (default): every surface (UI portal, tool/endpoint use, contributions) requires
|
|
557
|
+
* an explicit app_member ACE — the historical behavior.
|
|
558
|
+
* - 'ui': UI portal visibility requires an ACE, but tool/endpoint use and contributions
|
|
559
|
+
* are open to anyone in the project.
|
|
560
|
+
* - 'none': fully open within the project — no ACE required for any surface.
|
|
561
|
+
*
|
|
562
|
+
* Declared on the manifest as the app's default. May be overridden per-installation.
|
|
563
|
+
*/
|
|
564
|
+
export type AppAccessControl = 'all' | 'ui' | 'none';
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Resolve the effective access_control policy for an installed app:
|
|
568
|
+
* installation override wins, then manifest default, then `'all'`.
|
|
569
|
+
*
|
|
570
|
+
* Shared by the STS (JWT generation), the studio-server (validation), and the UI (badge display)
|
|
571
|
+
* so the resolution rule lives in exactly one place. Named `effectiveAppAccessControl` (not just
|
|
572
|
+
* `effectiveAccessControl`) because exports from `@vertesia/common` are flattened — the broader
|
|
573
|
+
* name would risk colliding with other access-control families added later.
|
|
574
|
+
*/
|
|
575
|
+
export function effectiveAppAccessControl(
|
|
576
|
+
installation: { access_control?: AppAccessControl } | null | undefined,
|
|
577
|
+
manifest: { access_control?: AppAccessControl } | null | undefined,
|
|
578
|
+
): AppAccessControl {
|
|
579
|
+
return installation?.access_control ?? manifest?.access_control ?? 'all';
|
|
580
|
+
}
|
|
581
|
+
|
|
374
582
|
export interface AppManifestData {
|
|
375
583
|
/**
|
|
376
584
|
* The name of the app, used as the id in the system.
|
|
@@ -384,7 +592,7 @@ export interface AppManifestData {
|
|
|
384
592
|
* - "private": visible only to the owning account
|
|
385
593
|
* - "vertesia": visible only to Vertesia team members (any project)
|
|
386
594
|
*/
|
|
387
|
-
visibility:
|
|
595
|
+
visibility: 'public' | 'private' | 'vertesia';
|
|
388
596
|
|
|
389
597
|
title: string;
|
|
390
598
|
description: string;
|
|
@@ -401,19 +609,31 @@ export interface AppManifestData {
|
|
|
401
609
|
*/
|
|
402
610
|
color?: string;
|
|
403
611
|
|
|
404
|
-
|
|
612
|
+
/**
|
|
613
|
+
* Optional preview screenshot for the app-management UI, captured by the builder during a
|
|
614
|
+
* build/QA run. Resolved client-side from the owning agent run's artifact storage, so it
|
|
615
|
+
* carries both the run id and the artifact path.
|
|
616
|
+
*/
|
|
617
|
+
preview_screenshot?: {
|
|
618
|
+
/** Agent run id whose artifact storage holds the screenshot. */
|
|
619
|
+
agent_run_id: string;
|
|
620
|
+
/** Artifact path within that storage, e.g. "preview-checks/app-preview-<ts>.png". */
|
|
621
|
+
artifact: string;
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
status: 'beta' | 'stable' | 'deprecated';
|
|
405
625
|
|
|
406
626
|
/**
|
|
407
|
-
* The UI configuration of the app. If not specified and the app "ui" is in the app capabilities
|
|
627
|
+
* The UI configuration of the app. If not specified and the app "ui" is in the app capabilities
|
|
408
628
|
* then the ui configuration will be fetched from the endpoint property.
|
|
409
629
|
*/
|
|
410
|
-
ui?: AppUIConfig
|
|
630
|
+
ui?: AppUIConfig;
|
|
411
631
|
|
|
412
632
|
/**
|
|
413
633
|
* A list of tool collections endpoints to be used by this app.
|
|
414
634
|
* Prefer using endpoint over tool_collections.
|
|
415
635
|
*/
|
|
416
|
-
tool_collections?:
|
|
636
|
+
tool_collections?: ToolCollectionObject[];
|
|
417
637
|
|
|
418
638
|
/**
|
|
419
639
|
* Named OAuth providers shared across multiple MCP tool collections.
|
|
@@ -429,7 +649,7 @@ export interface AppManifestData {
|
|
|
429
649
|
* The URL must provide 2 endpoints:
|
|
430
650
|
* 1. GET URL - must return a JSON array with the list of interactions (as AppInteractionRef[])
|
|
431
651
|
* 2. GET URL/{interaction_name} - must return the full interaction definition for the specified interaction.
|
|
432
|
-
* This feature is for advanced composition of interactions. Prefer using endpoint.
|
|
652
|
+
* This feature is for advanced composition of interactions. Prefer using endpoint.
|
|
433
653
|
*/
|
|
434
654
|
interactions?: string;
|
|
435
655
|
|
|
@@ -456,11 +676,14 @@ export interface AppManifestData {
|
|
|
456
676
|
* - tools
|
|
457
677
|
* - interactions
|
|
458
678
|
* - types
|
|
679
|
+
* - processes
|
|
680
|
+
* - templates
|
|
681
|
+
* - dashboards
|
|
459
682
|
* - settings
|
|
460
683
|
* - all (the default if no scope is provided)
|
|
461
684
|
* You can also use comma-separated values to combine scopes (e.g. "ui,tools").
|
|
462
|
-
*
|
|
463
|
-
* Example:
|
|
685
|
+
*
|
|
686
|
+
* Example:
|
|
464
687
|
* - ?scope=ui,tools - returns only the UI configuration
|
|
465
688
|
*/
|
|
466
689
|
endpoint?: string;
|
|
@@ -472,41 +695,202 @@ export interface AppManifestData {
|
|
|
472
695
|
* Only dev environment names are allowed as keys (starting with "desktop-" or "dev-").
|
|
473
696
|
*/
|
|
474
697
|
endpoint_overrides?: Record<string, string>;
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* Optional app version string (e.g. "1.0.0") — informational.
|
|
701
|
+
*/
|
|
702
|
+
version?: string;
|
|
703
|
+
|
|
704
|
+
/**
|
|
705
|
+
* Source repository configuration for apps generated and maintained through
|
|
706
|
+
* AppGen. Branches are mutable deployment lanes; immutable app versions
|
|
707
|
+
* record their exact source tag/commit in AppVersionRecord.storage.source_git.
|
|
708
|
+
*/
|
|
709
|
+
source?: AppSourceConfig;
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Free-form tags used for classification and filtering. Platform apps
|
|
713
|
+
* carry `"system"` so UIs can skip install/uninstall/manage-permission
|
|
714
|
+
* controls that don't apply to synthetic installations.
|
|
715
|
+
*/
|
|
716
|
+
tags?: string[];
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* Access control policy for the app. Defaults to 'all' (ACE-gated everywhere)
|
|
720
|
+
* when undefined. See {@link AppAccessControl} for semantics. May be overridden
|
|
721
|
+
* on the AppInstallation.
|
|
722
|
+
*/
|
|
723
|
+
access_control?: AppAccessControl;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export interface AppGitSourceConfig {
|
|
727
|
+
url?: string;
|
|
728
|
+
default_branch?: string;
|
|
729
|
+
production_branch?: string;
|
|
730
|
+
development_branch?: string;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
export interface AppSourceConfig {
|
|
734
|
+
kind: 'git';
|
|
735
|
+
git?: AppGitSourceConfig;
|
|
475
736
|
}
|
|
476
737
|
|
|
738
|
+
/**
|
|
739
|
+
* Reserved deployment environment names that may never be used as endpoint
|
|
740
|
+
* override keys. Reserving them prevents a manifest from hijacking auto-resolution
|
|
741
|
+
* on a shared production studio-server (whose `Env.environment` is one of these).
|
|
742
|
+
*/
|
|
743
|
+
const RESERVED_ENDPOINT_OVERRIDE_ENVS = new Set(['production', 'preview', 'staging']);
|
|
744
|
+
|
|
477
745
|
/**
|
|
478
746
|
* Returns true if the given environment name is allowed as an endpoint override key.
|
|
479
|
-
*
|
|
747
|
+
* Any non-empty name is accepted except the reserved shared-deployment names.
|
|
480
748
|
*/
|
|
481
749
|
export function isValidEndpointOverrideEnv(envName: string): boolean {
|
|
482
|
-
|
|
750
|
+
if (!envName) return false;
|
|
751
|
+
return !RESERVED_ENDPOINT_OVERRIDE_ENVS.has(envName.toLowerCase());
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* Deployment-time URL endpoints that can be referenced in app manifest URLs
|
|
756
|
+
* via `{{key}}` placeholders. The caller (typically studio-server) supplies
|
|
757
|
+
* these from environment config so that system apps can ship a single manifest
|
|
758
|
+
* with endpoints like `{{studio}}/api/package` that resolve per deployment.
|
|
759
|
+
*/
|
|
760
|
+
export interface Endpoints {
|
|
761
|
+
/** The Studio API (studio-server) base URL */
|
|
762
|
+
studio?: string;
|
|
763
|
+
/** The Store API (zeno-server) base URL */
|
|
764
|
+
store?: string;
|
|
765
|
+
/** The token server base URL */
|
|
766
|
+
token?: string;
|
|
767
|
+
/** The browser-facing Studio UI (composable-ui) base URL */
|
|
768
|
+
ui?: string;
|
|
769
|
+
/** The Smart HTTP app source git server base URL */
|
|
770
|
+
git?: string;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Substitutes `{{key}}` placeholders in a URL with the matching endpoint.
|
|
775
|
+
* Unknown placeholders are left untouched (so failures surface as fetch errors
|
|
776
|
+
* with the unresolved placeholder visible, rather than silently pointing nowhere).
|
|
777
|
+
* Trailing slashes on replacement values are stripped to avoid `//api/...` joins.
|
|
778
|
+
*/
|
|
779
|
+
export function substituteEndpoints(url: string, endpoints?: Endpoints): string {
|
|
780
|
+
if (!url || !endpoints) return url;
|
|
781
|
+
return url.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, key: string) => {
|
|
782
|
+
const value = (endpoints as Record<string, string | undefined>)[key];
|
|
783
|
+
if (typeof value !== 'string' || !value) return match;
|
|
784
|
+
return trimTrailingSlashes(value);
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
function trimTrailingSlashes(value: string): string {
|
|
789
|
+
let end = value.length;
|
|
790
|
+
while (end > 0 && value[end - 1] === '/') {
|
|
791
|
+
end--;
|
|
792
|
+
}
|
|
793
|
+
return end === value.length ? value : value.slice(0, end);
|
|
483
794
|
}
|
|
484
795
|
|
|
485
796
|
/**
|
|
486
|
-
* Resolves the effective endpoint for an app
|
|
487
|
-
*
|
|
797
|
+
* Resolves the effective endpoint for an app.
|
|
798
|
+
*
|
|
799
|
+
* Order of resolution:
|
|
800
|
+
* 1. If `requestedOverride` matches an `endpoint_overrides` key, use that URL
|
|
801
|
+
* (caller must verify the user is allowed to use the override).
|
|
802
|
+
* 2. Else if `envName` matches an `endpoint_overrides` key, use that URL
|
|
803
|
+
* (auto-resolution from the studio-server's deployment env).
|
|
804
|
+
* 3. Otherwise use the main `endpoint`.
|
|
805
|
+
* 4. Apply `{{var}}` substitution using `vars`.
|
|
488
806
|
*/
|
|
489
807
|
export function resolveAppEndpoint(
|
|
490
808
|
manifest: Pick<AppManifestData, 'endpoint' | 'endpoint_overrides'>,
|
|
491
|
-
envName?: string
|
|
809
|
+
envName?: string,
|
|
810
|
+
vars?: Endpoints,
|
|
811
|
+
requestedOverride?: string,
|
|
492
812
|
): string | undefined {
|
|
493
|
-
|
|
494
|
-
|
|
813
|
+
let raw: string | undefined;
|
|
814
|
+
if (
|
|
815
|
+
requestedOverride &&
|
|
816
|
+
manifest.endpoint_overrides?.[requestedOverride] &&
|
|
817
|
+
isValidEndpointOverrideEnv(requestedOverride)
|
|
818
|
+
) {
|
|
819
|
+
raw = manifest.endpoint_overrides[requestedOverride];
|
|
820
|
+
} else if (envName && manifest.endpoint_overrides?.[envName] && isValidEndpointOverrideEnv(envName)) {
|
|
821
|
+
raw = manifest.endpoint_overrides[envName];
|
|
822
|
+
} else {
|
|
823
|
+
raw = manifest.endpoint;
|
|
824
|
+
}
|
|
825
|
+
return raw ? substituteEndpoints(raw, vars) : raw;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Resolves all URL placeholders in a manifest in place (both `endpoint` and
|
|
830
|
+
* `tool_collections[].url`). Intended for server-side serialization — clients and
|
|
831
|
+
* downstream workers receive already-substituted URLs so they don't need to know
|
|
832
|
+
* about deployment-time vars.
|
|
833
|
+
*
|
|
834
|
+
* Mutates the manifest rather than returning a copy so it works cleanly with
|
|
835
|
+
* Mongoose populated subdocs.
|
|
836
|
+
*/
|
|
837
|
+
export function resolveManifestUrls(
|
|
838
|
+
manifest: Partial<AppManifestData> | null | undefined,
|
|
839
|
+
envName?: string,
|
|
840
|
+
vars?: Endpoints,
|
|
841
|
+
requestedOverride?: string,
|
|
842
|
+
): void {
|
|
843
|
+
if (!manifest) return;
|
|
844
|
+
|
|
845
|
+
if (manifest.endpoint) {
|
|
846
|
+
const resolved = resolveAppEndpoint(manifest, envName, vars, requestedOverride);
|
|
847
|
+
if (resolved && resolved !== manifest.endpoint) {
|
|
848
|
+
manifest.endpoint = resolved;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
const toolCollections = manifest.tool_collections as ToolCollectionObject[] | undefined;
|
|
853
|
+
if (toolCollections && Array.isArray(toolCollections)) {
|
|
854
|
+
for (let i = 0; i < toolCollections.length; i++) {
|
|
855
|
+
const item = toolCollections[i];
|
|
856
|
+
if (item && typeof item === 'object' && item.url) {
|
|
857
|
+
const sub = substituteEndpoints(item.url, vars);
|
|
858
|
+
if (sub !== item.url) item.url = sub;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
495
861
|
}
|
|
496
|
-
return manifest.endpoint;
|
|
497
862
|
}
|
|
498
863
|
|
|
499
|
-
export type AppPackageScope =
|
|
864
|
+
export type AppPackageScope =
|
|
865
|
+
| 'ui'
|
|
866
|
+
| 'tools'
|
|
867
|
+
| 'interactions'
|
|
868
|
+
| 'types'
|
|
869
|
+
| 'processes'
|
|
870
|
+
| 'templates'
|
|
871
|
+
| 'dashboards'
|
|
872
|
+
| 'settings'
|
|
873
|
+
| 'widgets'
|
|
874
|
+
| 'activities'
|
|
875
|
+
| 'all';
|
|
500
876
|
export interface AppPackage {
|
|
501
877
|
/**
|
|
502
878
|
* The UI configuration of the app
|
|
503
879
|
*/
|
|
504
|
-
ui?: AppUIConfig
|
|
880
|
+
ui?: AppUIConfig;
|
|
505
881
|
|
|
506
882
|
/**
|
|
507
883
|
* A list of tools exposed by the app.
|
|
508
884
|
*/
|
|
509
|
-
tools?: AgentToolDefinition[]
|
|
885
|
+
tools?: AgentToolDefinition[];
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* A list of skills (`learn_*` tools) exposed by the app. Kept separate from
|
|
889
|
+
* `tools` so clients can render them distinctly — consumers that don't care
|
|
890
|
+
* (e.g. the worker building a combined tool registry) should concatenate
|
|
891
|
+
* the two lists.
|
|
892
|
+
*/
|
|
893
|
+
skills?: AgentToolDefinition[];
|
|
510
894
|
|
|
511
895
|
/**
|
|
512
896
|
* A list of interactions exposed by the app
|
|
@@ -518,11 +902,21 @@ export interface AppPackage {
|
|
|
518
902
|
*/
|
|
519
903
|
types?: InCodeTypeDefinition[];
|
|
520
904
|
|
|
905
|
+
/**
|
|
906
|
+
* A list of process definitions exposed by the app.
|
|
907
|
+
*/
|
|
908
|
+
processes?: InCodeProcessDefinition[];
|
|
909
|
+
|
|
521
910
|
/**
|
|
522
911
|
* Templates provided by the app.
|
|
523
912
|
*/
|
|
524
913
|
templates?: RenderingTemplateDefinitionRef[];
|
|
525
914
|
|
|
915
|
+
/**
|
|
916
|
+
* Dashboards provided by the app.
|
|
917
|
+
*/
|
|
918
|
+
dashboards?: AppDashboardDefinition[];
|
|
919
|
+
|
|
526
920
|
/**
|
|
527
921
|
* Widgets provided by the app.
|
|
528
922
|
*/
|
|
@@ -541,6 +935,61 @@ export interface AppPackage {
|
|
|
541
935
|
settings_schema?: JSONSchema;
|
|
542
936
|
}
|
|
543
937
|
|
|
938
|
+
/**
|
|
939
|
+
* A single diagnostic produced while inspecting an app's registration state.
|
|
940
|
+
*/
|
|
941
|
+
export interface AppInspectionIssue {
|
|
942
|
+
severity: 'error' | 'warning';
|
|
943
|
+
/** The capability this issue relates to, when applicable (e.g. 'types'). */
|
|
944
|
+
capability?: AppPackageScope;
|
|
945
|
+
/** Stable machine code, e.g. 'capability_declared_but_empty', 'endpoint_unreachable', 'not_installed'. */
|
|
946
|
+
code: string;
|
|
947
|
+
/** Human-readable explanation, safe to surface to the model and the UI. */
|
|
948
|
+
message: string;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Per-capability report of what an app's published package actually exposes,
|
|
953
|
+
* compared against what its manifest declares.
|
|
954
|
+
*/
|
|
955
|
+
export interface AppInspectionCapabilityReport {
|
|
956
|
+
capability: AppPackageScope;
|
|
957
|
+
/** True when the manifest's `capabilities` array declares this capability. */
|
|
958
|
+
declared: boolean;
|
|
959
|
+
/** The local ids the published package actually serves for this capability. */
|
|
960
|
+
exposed_ids: string[];
|
|
961
|
+
/** Convenience count of `exposed_ids`. */
|
|
962
|
+
exposed_count: number;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Result of inspecting an app's registration: the resolved manifest state, what
|
|
967
|
+
* the published package actually exposes per capability, and diagnostics. This
|
|
968
|
+
* is the ground truth used by the `app_inspect_registration` agent tool and the
|
|
969
|
+
* Build › App inspection UI to verify what is registered vs declared, instead of
|
|
970
|
+
* inferring it from failed object/import calls.
|
|
971
|
+
*/
|
|
972
|
+
export interface AppInspectionResult {
|
|
973
|
+
app_id: string;
|
|
974
|
+
name: string;
|
|
975
|
+
version?: string;
|
|
976
|
+
/** The resolved package endpoint for the current environment, if any. */
|
|
977
|
+
endpoint?: string;
|
|
978
|
+
/** True when the package endpoint responded to the capability probe. */
|
|
979
|
+
endpoint_reachable: boolean;
|
|
980
|
+
/** True when the app is installed in the current project. */
|
|
981
|
+
installed: boolean;
|
|
982
|
+
access_control?: string;
|
|
983
|
+
/** The capabilities declared on the manifest. */
|
|
984
|
+
capabilities: AppPackageScope[];
|
|
985
|
+
/** What the published package exposes, per capability. */
|
|
986
|
+
package: AppInspectionCapabilityReport[];
|
|
987
|
+
/** Diagnostics — errors and warnings about the registration state. */
|
|
988
|
+
issues: AppInspectionIssue[];
|
|
989
|
+
/** Populated when the package probe itself failed (endpoint error/unreachable). */
|
|
990
|
+
probe_error?: string;
|
|
991
|
+
}
|
|
992
|
+
|
|
544
993
|
export interface AppWidgetInfo {
|
|
545
994
|
collection: string;
|
|
546
995
|
skill: string;
|
|
@@ -620,7 +1069,7 @@ export interface AppInstallation {
|
|
|
620
1069
|
id: string;
|
|
621
1070
|
project: string; // the project where the app is installed
|
|
622
1071
|
manifest: string; // the app manifest
|
|
623
|
-
settings?: Record<string,
|
|
1072
|
+
settings?: Record<string, unknown>; // settings for the app installation
|
|
624
1073
|
/**
|
|
625
1074
|
* Admin-managed allowlist of tool names permitted for this installation.
|
|
626
1075
|
* When undefined, all tools from the app are permitted.
|
|
@@ -639,6 +1088,12 @@ export interface AppInstallation {
|
|
|
639
1088
|
* Multiple collections sharing the same provider all resolve to the same OAuth provider.
|
|
640
1089
|
*/
|
|
641
1090
|
provider_bindings?: AppInstallationProviderBinding[];
|
|
1091
|
+
/**
|
|
1092
|
+
* Per-installation override of the manifest's access_control policy.
|
|
1093
|
+
* When set, takes precedence over the manifest value. When undefined, the
|
|
1094
|
+
* manifest value (or 'all' default) applies.
|
|
1095
|
+
*/
|
|
1096
|
+
access_control?: AppAccessControl;
|
|
642
1097
|
created_at: string;
|
|
643
1098
|
updated_at: string;
|
|
644
1099
|
}
|
|
@@ -673,7 +1128,20 @@ export type AppOAuthProviderParams = Record<string, OAuthClientCredentials>;
|
|
|
673
1128
|
|
|
674
1129
|
export interface AppInstallationPayload {
|
|
675
1130
|
app_id: string;
|
|
676
|
-
settings?: Record<string,
|
|
1131
|
+
settings?: Record<string, unknown>;
|
|
1132
|
+
/**
|
|
1133
|
+
* Per-installation override of the manifest's `access_control` policy. When provided, takes precedence
|
|
1134
|
+
* over the manifest default for every access check. Sibling of `settings` — admin-controlled, not
|
|
1135
|
+
* part of the app's own settings JSON.
|
|
1136
|
+
*
|
|
1137
|
+
* Three send-time semantics on update:
|
|
1138
|
+
* - Field omitted entirely from the payload → leave the existing override unchanged.
|
|
1139
|
+
* - Explicit `null` → clear the override, fall back to the manifest default.
|
|
1140
|
+
* - String enum → set the override to that value.
|
|
1141
|
+
*
|
|
1142
|
+
* (On install, the same shape applies; omit or pass `null` to use the manifest default.)
|
|
1143
|
+
*/
|
|
1144
|
+
access_control?: AppAccessControl | null;
|
|
677
1145
|
/**
|
|
678
1146
|
* OAuth credentials for each collection, keyed by collection.id.
|
|
679
1147
|
* Legacy callers may still use collection.name for older manifests.
|
|
@@ -711,7 +1179,7 @@ export interface AppToolCollection {
|
|
|
711
1179
|
/**
|
|
712
1180
|
* the tools provided by this collection
|
|
713
1181
|
*/
|
|
714
|
-
tools: AgentToolDefinition[]
|
|
1182
|
+
tools: AgentToolDefinition[];
|
|
715
1183
|
}
|
|
716
1184
|
|
|
717
1185
|
/**
|
|
@@ -743,7 +1211,7 @@ export interface ProjectToolInfo {
|
|
|
743
1211
|
* The app installation settings.
|
|
744
1212
|
* Only included for agent tokens, not user tokens (security: may contain API keys).
|
|
745
1213
|
*/
|
|
746
|
-
settings?: Record<string,
|
|
1214
|
+
settings?: Record<string, unknown>;
|
|
747
1215
|
}
|
|
748
1216
|
|
|
749
1217
|
/**
|
|
@@ -829,10 +1297,9 @@ export interface CompositeAppLogoOverrides {
|
|
|
829
1297
|
hideFooterLogo?: boolean;
|
|
830
1298
|
}
|
|
831
1299
|
|
|
832
|
-
|
|
833
1300
|
/**
|
|
834
1301
|
* Message banner overrides for the shell header.
|
|
835
|
-
*/
|
|
1302
|
+
*/
|
|
836
1303
|
export type CompositeAppMessageStyle = 'foreground' | 'info' | 'success' | 'attention' | 'destructive';
|
|
837
1304
|
export interface CompositeAppMessageOverrides {
|
|
838
1305
|
/** Message text to display */
|
|
@@ -995,9 +1462,9 @@ export interface CompositeAppHomePlugin {
|
|
|
995
1462
|
*/
|
|
996
1463
|
export interface CompositeAppConfig {
|
|
997
1464
|
/**
|
|
998
|
-
* The unique identifier for this CompositeApp configuration
|
|
1465
|
+
* The unique identifier for this CompositeApp configuration
|
|
999
1466
|
* Undefined if the configuration doesn't exists yet.
|
|
1000
|
-
|
|
1467
|
+
*/
|
|
1001
1468
|
id?: string;
|
|
1002
1469
|
/** The project this CompositeApp belongs to */
|
|
1003
1470
|
project: string;
|
|
@@ -1038,3 +1505,20 @@ export interface ValidateUrlRequest {
|
|
|
1038
1505
|
export interface ValidateUrlResponse {
|
|
1039
1506
|
valid: true;
|
|
1040
1507
|
}
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
* Result of DELETE /api/v1/apps/:id. With `?confirm=true` the cascade runs and
|
|
1511
|
+
* `deleted: true` is set; without it the endpoint returns a dry-run summary so
|
|
1512
|
+
* the UI can show what would be removed.
|
|
1513
|
+
*/
|
|
1514
|
+
export interface AppDeleteSummary {
|
|
1515
|
+
confirmed: boolean;
|
|
1516
|
+
app_id: string;
|
|
1517
|
+
app_name: string;
|
|
1518
|
+
versions: number;
|
|
1519
|
+
installations: number;
|
|
1520
|
+
storage_prefix: string;
|
|
1521
|
+
git_repo_url?: string;
|
|
1522
|
+
deleted: boolean;
|
|
1523
|
+
warnings: string[];
|
|
1524
|
+
}
|