@vertesia/common 1.5.0-dev.20260807.073259Z → 1.5.0-dev.20260901.005903Z
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/lib/access-control.d.ts +0 -14
- package/lib/access-control.d.ts.map +1 -1
- package/lib/access-control.js +0 -23
- package/lib/access-control.js.map +1 -1
- package/lib/account-values.d.ts +0 -10
- package/lib/account-values.d.ts.map +1 -1
- package/lib/account-values.js +0 -44
- package/lib/account-values.js.map +1 -1
- package/lib/api-contract/components.generated.json +40405 -0
- package/lib/api-contract/index.d.ts +186 -0
- package/lib/api-contract/index.d.ts.map +1 -0
- package/lib/api-contract/index.js +554 -0
- package/lib/api-contract/index.js.map +1 -0
- package/lib/api-schemas/agent-communication.d.ts +199 -0
- package/lib/api-schemas/agent-communication.d.ts.map +1 -0
- package/lib/api-schemas/agent-communication.js +150 -0
- package/lib/api-schemas/agent-communication.js.map +1 -0
- package/lib/api-schemas/agent-runs.d.ts +593 -0
- package/lib/api-schemas/agent-runs.d.ts.map +1 -1
- package/lib/api-schemas/agent-runs.js +44 -2
- package/lib/api-schemas/agent-runs.js.map +1 -1
- package/lib/api-schemas/app-lifecycle.d.ts +19 -0
- package/lib/api-schemas/app-lifecycle.d.ts.map +1 -1
- package/lib/api-schemas/app-lifecycle.js +34 -4
- package/lib/api-schemas/app-lifecycle.js.map +1 -1
- package/lib/api-schemas/app-runtime.d.ts +9871 -9257
- package/lib/api-schemas/app-runtime.d.ts.map +1 -1
- package/lib/api-schemas/app-runtime.js +7 -0
- package/lib/api-schemas/app-runtime.js.map +1 -1
- package/lib/api-schemas/apps.d.ts +1 -0
- package/lib/api-schemas/apps.d.ts.map +1 -1
- package/lib/api-schemas/apps.js +4 -3
- package/lib/api-schemas/apps.js.map +1 -1
- package/lib/api-schemas/content-query.d.ts +39 -0
- package/lib/api-schemas/content-query.d.ts.map +1 -0
- package/lib/api-schemas/content-query.js +30 -0
- package/lib/api-schemas/content-query.js.map +1 -0
- package/lib/api-schemas/content.d.ts +835 -29
- package/lib/api-schemas/content.d.ts.map +1 -1
- package/lib/api-schemas/content.js +82 -15
- package/lib/api-schemas/content.js.map +1 -1
- package/lib/api-schemas/dashboard.d.ts +4 -0
- package/lib/api-schemas/dashboard.d.ts.map +1 -1
- package/lib/api-schemas/dashboard.js +3 -0
- package/lib/api-schemas/dashboard.js.map +1 -1
- package/lib/api-schemas/document-processing.d.ts +333 -0
- package/lib/api-schemas/document-processing.d.ts.map +1 -1
- package/lib/api-schemas/events.d.ts +1007 -4
- package/lib/api-schemas/events.d.ts.map +1 -1
- package/lib/api-schemas/events.js +4 -1
- package/lib/api-schemas/events.js.map +1 -1
- package/lib/api-schemas/files.d.ts +17 -0
- package/lib/api-schemas/files.d.ts.map +1 -1
- package/lib/api-schemas/files.js +23 -0
- package/lib/api-schemas/files.js.map +1 -1
- package/lib/api-schemas/group.d.ts +7 -0
- package/lib/api-schemas/group.d.ts.map +1 -1
- package/lib/api-schemas/group.js +9 -0
- package/lib/api-schemas/group.js.map +1 -1
- package/lib/api-schemas/index.d.ts +4 -0
- package/lib/api-schemas/index.d.ts.map +1 -1
- package/lib/api-schemas/index.js +4 -0
- package/lib/api-schemas/index.js.map +1 -1
- package/lib/api-schemas/integrations.d.ts +19 -5
- package/lib/api-schemas/integrations.d.ts.map +1 -1
- package/lib/api-schemas/integrations.js +25 -2
- package/lib/api-schemas/integrations.js.map +1 -1
- package/lib/api-schemas/interaction.d.ts +8399 -1076
- package/lib/api-schemas/interaction.d.ts.map +1 -1
- package/lib/api-schemas/interaction.js +161 -9
- package/lib/api-schemas/interaction.js.map +1 -1
- package/lib/api-schemas/oauth-server.d.ts +131 -3
- package/lib/api-schemas/oauth-server.d.ts.map +1 -1
- package/lib/api-schemas/oauth-server.js +137 -3
- package/lib/api-schemas/oauth-server.js.map +1 -1
- package/lib/api-schemas/process.d.ts +1295 -0
- package/lib/api-schemas/process.d.ts.map +1 -1
- package/lib/api-schemas/process.js +318 -2
- package/lib/api-schemas/process.js.map +1 -1
- package/lib/api-schemas/project-configuration.d.ts +1118 -1
- package/lib/api-schemas/project-configuration.d.ts.map +1 -1
- package/lib/api-schemas/project-configuration.js +6 -2
- package/lib/api-schemas/project-configuration.js.map +1 -1
- package/lib/api-schemas/project.d.ts +1680 -6
- package/lib/api-schemas/project.d.ts.map +1 -1
- package/lib/api-schemas/registry.d.ts +87529 -69142
- package/lib/api-schemas/registry.d.ts.map +1 -1
- package/lib/api-schemas/registry.js +234 -413
- package/lib/api-schemas/registry.js.map +1 -1
- package/lib/api-schemas/schema-primitives.d.ts +4 -0
- package/lib/api-schemas/schema-primitives.d.ts.map +1 -1
- package/lib/api-schemas/schema-primitives.js +10 -0
- package/lib/api-schemas/schema-primitives.js.map +1 -1
- package/lib/api-schemas/store.d.ts +5596 -37
- package/lib/api-schemas/store.d.ts.map +1 -1
- package/lib/api-schemas/store.js +53 -8
- package/lib/api-schemas/store.js.map +1 -1
- package/lib/api-schemas/tools.d.ts +115 -0
- package/lib/api-schemas/tools.d.ts.map +1 -1
- package/lib/api-schemas/tools.js +55 -0
- package/lib/api-schemas/tools.js.map +1 -1
- package/lib/api-schemas/view-execution.d.ts +330 -854
- package/lib/api-schemas/view-execution.d.ts.map +1 -1
- package/lib/api-schemas/view-execution.js +26 -2
- package/lib/api-schemas/view-execution.js.map +1 -1
- package/lib/api-schemas/views.d.ts +452 -2562
- package/lib/api-schemas/views.d.ts.map +1 -1
- package/lib/api-schemas/views.js +119 -3
- package/lib/api-schemas/views.js.map +1 -1
- package/lib/api-schemas/workflow-runs.d.ts +344 -5
- package/lib/api-schemas/workflow-runs.d.ts.map +1 -1
- package/lib/api-schemas/workflow-runs.js +9 -7
- package/lib/api-schemas/workflow-runs.js.map +1 -1
- package/lib/apps.d.ts +8 -145
- package/lib/apps.d.ts.map +1 -1
- package/lib/apps.js +1 -54
- package/lib/apps.js.map +1 -1
- package/lib/ask-user.d.ts +2 -1
- package/lib/ask-user.d.ts.map +1 -1
- package/lib/audit-trail.d.ts +2 -2
- package/lib/audit-trail.d.ts.map +1 -1
- package/lib/audit-trail.js +2 -2
- package/lib/audit-trail.js.map +1 -1
- package/lib/browser-credentials.d.ts +2 -7
- package/lib/browser-credentials.d.ts.map +1 -1
- package/lib/common.d.ts +4 -1
- package/lib/common.d.ts.map +1 -1
- package/lib/content-query.d.ts +5 -0
- package/lib/content-query.d.ts.map +1 -0
- package/lib/content-query.js +2 -0
- package/lib/content-query.js.map +1 -0
- package/lib/data-platform.d.ts +4 -46
- package/lib/data-platform.d.ts.map +1 -1
- package/lib/data-platform.js.map +1 -1
- package/lib/email.d.ts +12 -18
- package/lib/email.d.ts.map +1 -1
- package/lib/email.js.map +1 -1
- package/lib/environment.d.ts +0 -10
- package/lib/environment.d.ts.map +1 -1
- package/lib/environment.js +1 -12
- package/lib/environment.js.map +1 -1
- package/lib/facets.d.ts +0 -4
- package/lib/facets.d.ts.map +1 -1
- package/lib/group.d.ts +2 -12
- package/lib/group.d.ts.map +1 -1
- package/lib/group.js.map +1 -1
- package/lib/index.d.ts +3 -10
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -10
- package/lib/index.js.map +1 -1
- package/lib/integrations.d.ts +1 -27
- package/lib/integrations.d.ts.map +1 -1
- package/lib/integrations.js +0 -6
- package/lib/integrations.js.map +1 -1
- package/lib/interaction.d.ts +10 -222
- package/lib/interaction.d.ts.map +1 -1
- package/lib/interaction.js +0 -31
- package/lib/interaction.js.map +1 -1
- package/lib/meters.d.ts +5 -10
- package/lib/meters.d.ts.map +1 -1
- package/lib/meters.js +1 -9
- package/lib/meters.js.map +1 -1
- package/lib/oauth-scopes.d.ts +2 -16
- package/lib/oauth-scopes.d.ts.map +1 -1
- package/lib/oauth-scopes.js +9 -49
- package/lib/oauth-scopes.js.map +1 -1
- package/lib/oauth-server.d.ts +16 -195
- package/lib/oauth-server.d.ts.map +1 -1
- package/lib/payload.d.ts +2 -5
- package/lib/payload.d.ts.map +1 -1
- package/lib/pending-asks.d.ts +9 -41
- package/lib/pending-asks.d.ts.map +1 -1
- package/lib/platform-event.d.ts +4 -142
- package/lib/platform-event.d.ts.map +1 -1
- package/lib/platform-event.js.map +1 -1
- package/lib/project.d.ts +7 -46
- package/lib/project.d.ts.map +1 -1
- package/lib/project.js +2 -132
- package/lib/project.js.map +1 -1
- package/lib/prompt.d.ts +4 -7
- package/lib/prompt.d.ts.map +1 -1
- package/lib/prompt.js.map +1 -1
- package/lib/query.d.ts +0 -8
- package/lib/query.d.ts.map +1 -1
- package/lib/rate-limiter.d.ts +4 -3
- package/lib/rate-limiter.d.ts.map +1 -1
- package/lib/runs.d.ts +5 -1
- package/lib/runs.d.ts.map +1 -1
- package/lib/schema-for-extraction.d.ts +0 -1
- package/lib/schema-for-extraction.d.ts.map +1 -1
- package/lib/schema-for-extraction.js +1 -1
- package/lib/schema-for-extraction.js.map +1 -1
- package/lib/secrets.d.ts +2 -1
- package/lib/secrets.d.ts.map +1 -1
- package/lib/skill.d.ts +0 -13
- package/lib/skill.d.ts.map +1 -1
- package/lib/store/activity-catalog.d.ts +2 -0
- package/lib/store/activity-catalog.d.ts.map +1 -1
- package/lib/store/agent-approval.d.ts +0 -1
- package/lib/store/agent-approval.d.ts.map +1 -1
- package/lib/store/agent-approval.js +0 -3
- package/lib/store/agent-approval.js.map +1 -1
- package/lib/store/agent-run.d.ts +32 -69
- package/lib/store/agent-run.d.ts.map +1 -1
- package/lib/store/collections.d.ts +2 -6
- package/lib/store/collections.d.ts.map +1 -1
- package/lib/store/collections.js.map +1 -1
- package/lib/store/conversation-state.d.ts +11 -12
- package/lib/store/conversation-state.d.ts.map +1 -1
- package/lib/store/conversation-state.js +0 -18
- package/lib/store/conversation-state.js.map +1 -1
- package/lib/store/doc-analyzer.d.ts +0 -22
- package/lib/store/doc-analyzer.d.ts.map +1 -1
- package/lib/store/dsl-workflow.d.ts +22 -5
- package/lib/store/dsl-workflow.d.ts.map +1 -1
- package/lib/store/dsl-workflow.js.map +1 -1
- package/lib/store/grounded-extraction.d.ts +0 -14
- package/lib/store/grounded-extraction.d.ts.map +1 -1
- package/lib/store/grounded-extraction.js +1 -7
- package/lib/store/grounded-extraction.js.map +1 -1
- package/lib/store/index.d.ts +0 -5
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js +0 -6
- package/lib/store/index.js.map +1 -1
- package/lib/store/intake-policy-schema.generated.d.ts.map +1 -1
- package/lib/store/intake-policy-schema.generated.js +279 -1
- package/lib/store/intake-policy-schema.generated.js.map +1 -1
- package/lib/store/process.d.ts +43 -1
- package/lib/store/process.d.ts.map +1 -1
- package/lib/store/process.js.map +1 -1
- package/lib/store/rendering.d.ts +3 -5
- package/lib/store/rendering.d.ts.map +1 -1
- package/lib/store/rendering.js +0 -4
- package/lib/store/rendering.js.map +1 -1
- package/lib/store/schedule.d.ts +0 -16
- package/lib/store/schedule.d.ts.map +1 -1
- package/lib/store/schedule.js.map +1 -1
- package/lib/store/signals.d.ts +12 -0
- package/lib/store/signals.d.ts.map +1 -1
- package/lib/store/store.d.ts +80 -94
- package/lib/store/store.d.ts.map +1 -1
- package/lib/store/store.js +5 -25
- package/lib/store/store.js.map +1 -1
- package/lib/store/workflow.d.ts +35 -86
- package/lib/store/workflow.d.ts.map +1 -1
- package/lib/store/workflow.js +0 -47
- package/lib/store/workflow.js.map +1 -1
- package/lib/sts-errors.d.ts +0 -1
- package/lib/sts-errors.d.ts.map +1 -1
- package/lib/sts-token-types.d.ts +2 -8
- package/lib/sts-token-types.d.ts.map +1 -1
- package/lib/sts-token-types.js +1 -19
- package/lib/sts-token-types.js.map +1 -1
- package/lib/tools.d.ts +6 -1
- package/lib/tools.d.ts.map +1 -1
- package/lib/transient-tokens.d.ts +0 -2
- package/lib/transient-tokens.d.ts.map +1 -1
- package/lib/user.d.ts +0 -17
- package/lib/user.d.ts.map +1 -1
- package/lib/user.js.map +1 -1
- package/lib/utils/schemas.d.ts +2 -24
- package/lib/utils/schemas.d.ts.map +1 -1
- package/lib/utils/schemas.js +0 -151
- package/lib/utils/schemas.js.map +1 -1
- package/lib/vertesia-common.js +3 -4
- package/lib/vertesia-common.js.map +1 -1
- package/lib/views.d.ts +23 -27
- package/lib/views.d.ts.map +1 -1
- package/lib/views.js +5 -26
- package/lib/views.js.map +1 -1
- package/lib/workflow-analytics.d.ts +12 -34
- package/lib/workflow-analytics.d.ts.map +1 -1
- package/package.json +12 -6
- package/src/access-control.ts +0 -26
- package/src/account-values.ts +0 -49
- package/src/agent-resources.test.ts +1 -12
- package/src/api-contract/components.contract.test.ts +99 -0
- package/src/api-contract/components.generated.json +40405 -0
- package/src/api-contract/index.ts +664 -0
- package/src/api-schemas/agent-communication.contract.test.ts +90 -0
- package/src/api-schemas/agent-communication.ts +169 -0
- package/src/api-schemas/agent-runs.ts +46 -1
- package/src/api-schemas/api-discriminators.test.ts +101 -0
- package/src/api-schemas/app-lifecycle.ts +39 -4
- package/src/api-schemas/app-runtime.ts +8 -0
- package/src/api-schemas/apps.ts +4 -3
- package/src/api-schemas/content-query.ts +31 -0
- package/src/api-schemas/content.ts +88 -15
- package/src/api-schemas/dashboard.contract.test.ts +16 -5
- package/src/api-schemas/dashboard.ts +3 -0
- package/src/api-schemas/events.ts +9 -1
- package/src/api-schemas/files.ts +27 -0
- package/src/api-schemas/group.ts +10 -0
- package/src/api-schemas/index.ts +4 -0
- package/src/api-schemas/integrations.ts +27 -2
- package/src/api-schemas/interaction.contract.test.ts +204 -1
- package/src/api-schemas/interaction.ts +176 -8
- package/src/api-schemas/llumiverse.contract.test.ts +33 -2
- package/src/api-schemas/oauth-server.ts +152 -3
- package/src/api-schemas/oauth.contract.test.ts +64 -1
- package/src/api-schemas/process.ts +352 -2
- package/src/api-schemas/project-configuration.ts +11 -7
- package/src/api-schemas/project.contract.test.ts +83 -6
- package/src/api-schemas/registry.ts +290 -457
- package/src/api-schemas/schema-primitives.ts +13 -0
- package/src/api-schemas/store.contract.test.ts +30 -1
- package/src/api-schemas/store.ts +58 -11
- package/src/api-schemas/tools.ts +62 -0
- package/src/api-schemas/view-execution.ts +28 -2
- package/src/api-schemas/views.contract.test.ts +119 -0
- package/src/api-schemas/views.ts +142 -3
- package/src/api-schemas/workflow-runs.ts +9 -7
- package/src/api-schemas/zeno-response-contracts.test.ts +344 -0
- package/src/apps.test.ts +2 -40
- package/src/apps.ts +14 -181
- package/src/ask-user.ts +1 -1
- package/src/audit-trail.ts +3 -3
- package/src/browser-credentials.ts +3 -7
- package/src/common.ts +13 -1
- package/src/content-query.ts +5 -0
- package/src/data-platform.ts +4 -51
- package/src/email.ts +24 -18
- package/src/environment.ts +1 -14
- package/src/facets.ts +0 -6
- package/src/group.ts +2 -12
- package/src/index.ts +3 -15
- package/src/integrations.ts +1 -52
- package/src/interaction.ts +12 -271
- package/src/meters.ts +10 -11
- package/src/oauth-scopes.test.ts +15 -0
- package/src/oauth-scopes.ts +10 -64
- package/src/oauth-server.ts +28 -215
- package/src/payload.ts +1 -6
- package/src/pending-asks.ts +17 -42
- package/src/platform-event.ts +3 -156
- package/src/project.ts +12 -160
- package/src/prompt.ts +9 -8
- package/src/query.ts +0 -9
- package/src/rate-limiter.ts +3 -3
- package/src/runs.ts +8 -0
- package/src/schema-for-extraction.ts +1 -1
- package/src/secrets.ts +3 -0
- package/src/skill.ts +0 -15
- package/src/store/activity-catalog.ts +3 -0
- package/src/store/agent-approval.ts +0 -4
- package/src/store/agent-run.ts +39 -93
- package/src/store/collections.ts +3 -6
- package/src/store/conversation-state.ts +12 -25
- package/src/store/doc-analyzer.ts +0 -26
- package/src/store/dsl-workflow.ts +28 -5
- package/src/store/grounded-extraction.ts +0 -18
- package/src/store/index.ts +0 -6
- package/src/store/intake-policy-schema.generated.ts +293 -1
- package/src/store/process.ts +84 -0
- package/src/store/rendering.ts +3 -8
- package/src/store/schedule.ts +0 -19
- package/src/store/signals.ts +14 -0
- package/src/store/store.ts +118 -127
- package/src/store/workflow.ts +32 -120
- package/src/sts-errors.ts +0 -2
- package/src/sts-token-types.ts +3 -28
- package/src/tools.ts +15 -0
- package/src/transient-tokens.ts +0 -2
- package/src/user.ts +0 -20
- package/src/utils/schemas.ts +2 -159
- package/src/views.ts +50 -47
- package/src/workflow-analytics.ts +12 -40
- package/tsconfig.dist.json +4 -1
- package/lib/Progress.d.ts +0 -22
- package/lib/Progress.d.ts.map +0 -1
- package/lib/Progress.js +0 -57
- package/lib/Progress.js.map +0 -1
- package/lib/agent-request-template.d.ts +0 -4
- package/lib/agent-request-template.d.ts.map +0 -1
- package/lib/agent-request-template.js +0 -46
- package/lib/agent-request-template.js.map +0 -1
- package/lib/channels.d.ts +0 -22
- package/lib/channels.d.ts.map +0 -1
- package/lib/channels.js +0 -57
- package/lib/channels.js.map +0 -1
- package/lib/host-utils.d.ts +0 -8
- package/lib/host-utils.d.ts.map +0 -1
- package/lib/host-utils.js +0 -84
- package/lib/host-utils.js.map +0 -1
- package/lib/platform-event-validation.d.ts +0 -45
- package/lib/platform-event-validation.d.ts.map +0 -1
- package/lib/platform-event-validation.js +0 -336
- package/lib/platform-event-validation.js.map +0 -1
- package/lib/store/hive-memory.d.ts +0 -117
- package/lib/store/hive-memory.d.ts.map +0 -1
- package/lib/store/hive-memory.js +0 -2
- package/lib/store/hive-memory.js.map +0 -1
- package/lib/store/object-types.d.ts +0 -24
- package/lib/store/object-types.d.ts.map +0 -1
- package/lib/store/object-types.js +0 -95
- package/lib/store/object-types.js.map +0 -1
- package/lib/store/process-schema.d.ts +0 -561
- package/lib/store/process-schema.d.ts.map +0 -1
- package/lib/store/process-schema.js +0 -561
- package/lib/store/process-schema.js.map +0 -1
- package/lib/store/process-validation.d.ts +0 -17
- package/lib/store/process-validation.d.ts.map +0 -1
- package/lib/store/process-validation.js +0 -515
- package/lib/store/process-validation.js.map +0 -1
- package/lib/store/temporalio.d.ts +0 -17
- package/lib/store/temporalio.d.ts.map +0 -1
- package/lib/store/temporalio.js +0 -41
- package/lib/store/temporalio.js.map +0 -1
- package/lib/view-configuration-validation.d.ts +0 -15
- package/lib/view-configuration-validation.d.ts.map +0 -1
- package/lib/view-configuration-validation.js +0 -63
- package/lib/view-configuration-validation.js.map +0 -1
- package/lib/view-query-validation.d.ts +0 -13
- package/lib/view-query-validation.d.ts.map +0 -1
- package/lib/view-query-validation.js +0 -266
- package/lib/view-query-validation.js.map +0 -1
- package/lib/view-validation-helpers.d.ts +0 -15
- package/lib/view-validation-helpers.d.ts.map +0 -1
- package/lib/view-validation-helpers.js +0 -25
- package/lib/view-validation-helpers.js.map +0 -1
- package/lib/views-schema.d.ts +0 -1992
- package/lib/views-schema.d.ts.map +0 -1
- package/lib/views-schema.js +0 -674
- package/lib/views-schema.js.map +0 -1
- package/lib/views-validation.d.ts +0 -21
- package/lib/views-validation.d.ts.map +0 -1
- package/lib/views-validation.js +0 -164
- package/lib/views-validation.js.map +0 -1
- package/src/Progress.ts +0 -59
- package/src/agent-request-template.test.ts +0 -40
- package/src/agent-request-template.ts +0 -45
- package/src/channels.ts +0 -70
- package/src/host-utils.test.ts +0 -61
- package/src/host-utils.ts +0 -93
- package/src/platform-event-validation.test.ts +0 -251
- package/src/platform-event-validation.ts +0 -372
- package/src/project.test.ts +0 -44
- package/src/store/hive-memory.ts +0 -167
- package/src/store/object-types.ts +0 -123
- package/src/store/process-schema.test.ts +0 -149
- package/src/store/process-schema.ts +0 -564
- package/src/store/process-validation.test.ts +0 -635
- package/src/store/process-validation.ts +0 -646
- package/src/store/temporalio.ts +0 -54
- package/src/view-configuration-validation.ts +0 -74
- package/src/view-query-validation.test.ts +0 -21
- package/src/view-query-validation.ts +0 -319
- package/src/view-validation-helpers.ts +0 -28
- package/src/views-schema.test.ts +0 -372
- package/src/views-schema.ts +0 -689
- package/src/views-validation.ts +0 -234
package/src/integrations.ts
CHANGED
|
@@ -19,17 +19,13 @@ import type {
|
|
|
19
19
|
SerperConfigurationInputSchema,
|
|
20
20
|
SerperConfigurationSchema,
|
|
21
21
|
} from './api-schemas/integrations.js';
|
|
22
|
-
export interface IntegrationConfigurationBase<TIntegration extends SupportedIntegrations = SupportedIntegrations> {
|
|
23
|
-
integration: TIntegration;
|
|
24
|
-
enabled: boolean;
|
|
25
|
-
}
|
|
26
22
|
|
|
27
23
|
export type GladiaConfigurationInput = z.infer<typeof GladiaConfigurationInputSchema>;
|
|
28
24
|
|
|
29
25
|
export type GladiaConfiguration = z.infer<typeof GladiaConfigurationSchema>;
|
|
30
26
|
|
|
31
27
|
export interface GladiaConfigurationWithSecrets extends GladiaConfiguration {
|
|
32
|
-
api_key
|
|
28
|
+
api_key: string | null;
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
export type GithubConfigurationInput = z.infer<typeof GithubConfigurationInputSchema>;
|
|
@@ -44,37 +40,18 @@ export type SerperConfigurationInput = z.infer<typeof SerperConfigurationInputSc
|
|
|
44
40
|
|
|
45
41
|
export type SerperConfiguration = z.infer<typeof SerperConfigurationSchema>;
|
|
46
42
|
|
|
47
|
-
export interface SerperConfigurationWithSecrets extends SerperConfiguration {
|
|
48
|
-
api_key?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
43
|
export type ExaConfigurationInput = z.infer<typeof ExaConfigurationInputSchema>;
|
|
52
44
|
|
|
53
45
|
export type ExaConfiguration = z.infer<typeof ExaConfigurationSchema>;
|
|
54
46
|
|
|
55
|
-
export interface ExaConfigurationWithSecrets extends ExaConfiguration {
|
|
56
|
-
api_key?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
47
|
export type LinkupConfigurationInput = z.infer<typeof LinkupConfigurationInputSchema>;
|
|
60
48
|
|
|
61
49
|
export type LinkupConfiguration = z.infer<typeof LinkupConfigurationSchema>;
|
|
62
50
|
|
|
63
|
-
export interface LinkupConfigurationWithSecrets extends LinkupConfiguration {
|
|
64
|
-
api_key?: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
51
|
export type ResendConfigurationInput = z.infer<typeof ResendConfigurationInputSchema>;
|
|
68
52
|
|
|
69
53
|
export type ResendConfiguration = z.infer<typeof ResendConfigurationSchema>;
|
|
70
54
|
|
|
71
|
-
export interface ResendConfigurationWithSecrets extends ResendConfiguration {
|
|
72
|
-
/** Resend API key for sending emails */
|
|
73
|
-
api_key?: string;
|
|
74
|
-
/** Webhook secret for validating inbound email webhooks (required for receiving emails) */
|
|
75
|
-
webhook_secret?: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
55
|
/**
|
|
79
56
|
* Configuration for ask_user webhook notifications.
|
|
80
57
|
* Sends webhooks when agents call ask_user and when users respond.
|
|
@@ -87,11 +64,6 @@ export type AskUserWebhookConfigurationInput = z.infer<typeof AskUserWebhookConf
|
|
|
87
64
|
*/
|
|
88
65
|
export type AskUserWebhookConfiguration = z.infer<typeof AskUserWebhookConfigurationSchema>;
|
|
89
66
|
|
|
90
|
-
export interface AskUserWebhookConfigurationWithSecrets extends AskUserWebhookConfiguration {
|
|
91
|
-
/** Secret for signing webhook payloads (HMAC-SHA256) */
|
|
92
|
-
webhook_secret?: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
67
|
export enum SupportedIntegrations {
|
|
96
68
|
gladia = 'gladia',
|
|
97
69
|
github = 'github',
|
|
@@ -113,26 +85,3 @@ export type ProjectIntegrationConfigRequest = z.infer<typeof ProjectIntegrationC
|
|
|
113
85
|
* @discriminator integration
|
|
114
86
|
*/
|
|
115
87
|
export type ProjectIntegrationConfigResponse = z.infer<typeof ProjectIntegrationConfigResponseSchema>;
|
|
116
|
-
|
|
117
|
-
export type ProjectIntegrationConfigWithSecrets =
|
|
118
|
-
| GladiaConfigurationWithSecrets
|
|
119
|
-
| GithubConfiguration
|
|
120
|
-
| AwsConfiguration
|
|
121
|
-
| MagicPdfConfiguration
|
|
122
|
-
| SerperConfigurationWithSecrets
|
|
123
|
-
| ExaConfigurationWithSecrets
|
|
124
|
-
| LinkupConfigurationWithSecrets
|
|
125
|
-
| ResendConfigurationWithSecrets
|
|
126
|
-
| AskUserWebhookConfigurationWithSecrets;
|
|
127
|
-
|
|
128
|
-
export type ProjectIntegrationConfig = ProjectIntegrationConfigResponse;
|
|
129
|
-
|
|
130
|
-
export function withProjectIntegrationDiscriminator(
|
|
131
|
-
integration: SupportedIntegrations,
|
|
132
|
-
config: Record<string, unknown>,
|
|
133
|
-
): ProjectIntegrationConfigResponse {
|
|
134
|
-
return {
|
|
135
|
-
...config,
|
|
136
|
-
integration,
|
|
137
|
-
} as ProjectIntegrationConfigResponse;
|
|
138
|
-
}
|
package/src/interaction.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
CompletionResult,
|
|
3
3
|
ExecutionTokenUsage,
|
|
4
|
-
JSONObject,
|
|
5
4
|
JSONSchema,
|
|
6
5
|
Modalities,
|
|
7
|
-
|
|
6
|
+
PromptCacheDiagnostic,
|
|
8
7
|
StatelessExecutionOptions,
|
|
9
8
|
ToolUse,
|
|
10
9
|
} from '@llumiverse/common';
|
|
@@ -35,6 +34,7 @@ import type {
|
|
|
35
34
|
GenerateTestDataPayloadSchema,
|
|
36
35
|
ImprovePromptPayloadConfigSchema,
|
|
37
36
|
ImprovePromptPayloadSchema,
|
|
37
|
+
InCodeInteractionSchema,
|
|
38
38
|
InCodePromptSchema,
|
|
39
39
|
InitialToolCallSchema,
|
|
40
40
|
InteractionCreatePayloadSchema,
|
|
@@ -57,6 +57,7 @@ import type {
|
|
|
57
57
|
PromptModalitiesSchema,
|
|
58
58
|
RateLimitRequestPayloadSchema,
|
|
59
59
|
RateLimitRequestResponseSchema,
|
|
60
|
+
ResolvedCatalogInteractionSchema,
|
|
60
61
|
ResolvedEnvironmentInfoSchema,
|
|
61
62
|
ResolvedInteractionExecutionInfoSchema,
|
|
62
63
|
ResolvedRuntimeConfigSchema,
|
|
@@ -69,13 +70,13 @@ import type {
|
|
|
69
70
|
ToolResultMetaSchema,
|
|
70
71
|
ToolResultSchema,
|
|
71
72
|
ToolResultsPayloadSchema,
|
|
73
|
+
UpdateExecutionRunPayloadSchema,
|
|
72
74
|
UserMessagePayloadSchema,
|
|
73
75
|
} from './api-schemas/interaction.js';
|
|
74
76
|
import type { InteractionExecutionConfigurationSchema } from './api-schemas/store.js';
|
|
75
|
-
import type { MCPToolAnnotations } from './apps.js';
|
|
76
77
|
import type { ExecutionEnvironmentRef } from './environment.js';
|
|
77
78
|
import type { ProjectRef } from './project.js';
|
|
78
|
-
import type {
|
|
79
|
+
import type { PopulatedPromptSegmentDef } from './prompt.js';
|
|
79
80
|
import type { TextArtifactReference } from './store/conversation-state.js';
|
|
80
81
|
import type { AccountRef } from './user.js';
|
|
81
82
|
|
|
@@ -86,8 +87,6 @@ import type { AccountRef } from './user.js';
|
|
|
86
87
|
*/
|
|
87
88
|
export * from './interaction-values.js';
|
|
88
89
|
|
|
89
|
-
import { ConfigModes, RunDataStorageLevel } from './interaction-values.js';
|
|
90
|
-
|
|
91
90
|
export type InteractionExecutionError = z.infer<typeof InteractionExecutionErrorSchema>;
|
|
92
91
|
|
|
93
92
|
/**
|
|
@@ -130,117 +129,9 @@ export interface ResolveInteractionQuery {
|
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
export type InCodePrompt = z.infer<typeof InCodePromptSchema>;
|
|
133
|
-
export
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
*/
|
|
137
|
-
type: 'sys' | 'app' | 'stored' | 'draft';
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* The id of the interaction. Required.
|
|
141
|
-
* The id is a unique identifier for the interaction.
|
|
142
|
-
* It is recommended to use a URL safe string and not include spaces.
|
|
143
|
-
* The id is composed of some namespace or prefix and the interaction name.
|
|
144
|
-
* Example: sys:generic_question, app:review_contract, tmp:my_temp_interaction
|
|
145
|
-
*/
|
|
146
|
-
id: string;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* The interaction code name. Required.
|
|
150
|
-
* Should be a URL safe string and not include spaces. It is recommended to use kebab-case or camel-case.
|
|
151
|
-
* The endpoints must satisfy the following regexp: /^[a-zA-Z0-9-_]+$/. No whitespaces or special characters are allowed.
|
|
152
|
-
*/
|
|
153
|
-
name: string;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Only applies for stored interactions. The version of the interaction.
|
|
157
|
-
* Undefined for non stored interactions
|
|
158
|
-
*/
|
|
159
|
-
version?: number;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Only applies for stored interactions. Whether the interaction is published or not.
|
|
163
|
-
*/
|
|
164
|
-
published?: boolean;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* A title for the interaction. If not provided, the endpoint will be used.
|
|
168
|
-
*/
|
|
169
|
-
title?: string;
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* An optional description of the interaction.
|
|
173
|
-
*/
|
|
174
|
-
description?: string;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* The JSON schema to be used for the result if any.
|
|
178
|
-
*/
|
|
179
|
-
result_schema?: JSONSchema | SchemaRef;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* The modality of the interaction output.
|
|
183
|
-
* If not specified Modalities.Text is assumed.
|
|
184
|
-
*/
|
|
185
|
-
output_modality?: Modalities;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* How to store the run data for executions of this interaction.
|
|
189
|
-
* Defaults to STANDARD.
|
|
190
|
-
*/
|
|
191
|
-
storage?: RunDataStorageLevel;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Optional tags for the interaction.
|
|
195
|
-
*/
|
|
196
|
-
tags?: string[];
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Agent Runner configuration options.
|
|
200
|
-
*/
|
|
201
|
-
agent_runner_options?: AgentRunnerOptions;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Default options for the model to be used when executing this interaction.
|
|
205
|
-
* (like temperature etc)
|
|
206
|
-
*/
|
|
207
|
-
model_options?: ModelOptions;
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* The prompts composing the interaction. Required.
|
|
211
|
-
*/
|
|
212
|
-
prompts: InCodePrompt[];
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Optional reference to an external resource if any.
|
|
216
|
-
* Used internally by the system to synchronize stored interactions with in-code interactions.
|
|
217
|
-
*/
|
|
218
|
-
externalId?: string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Runtime configuration (system use only)
|
|
222
|
-
*
|
|
223
|
-
* This field is populated by the system when converting stored interactions
|
|
224
|
-
* and contains runtime-specific defaults like target model/environment IDs.
|
|
225
|
-
*
|
|
226
|
-
* DO NOT set this field manually when writing interaction definitions.
|
|
227
|
-
* These values are environment-specific and not portable.
|
|
228
|
-
*
|
|
229
|
-
* @internal
|
|
230
|
-
*/
|
|
231
|
-
runtime?: {
|
|
232
|
-
/**
|
|
233
|
-
* Default target environment for the interaction execution
|
|
234
|
-
*/
|
|
235
|
-
environment?: string;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Default (recommended) target model for the interaction execution
|
|
239
|
-
*/
|
|
240
|
-
model?: string;
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
export interface InteractionSpec extends Omit<InCodeInteraction, 'id' | 'runtime' | 'type' | 'published' | 'version'> {}
|
|
132
|
+
export type InCodeInteraction = z.infer<typeof InCodeInteractionSchema>;
|
|
133
|
+
export type ResolvedCatalogInteraction = z.infer<typeof ResolvedCatalogInteractionSchema>;
|
|
134
|
+
export type InteractionSpec = Omit<InCodeInteraction, 'id' | 'runtime' | 'type' | 'published' | 'version'>;
|
|
244
135
|
// ---------------------------------------------------------
|
|
245
136
|
|
|
246
137
|
/**
|
|
@@ -259,12 +150,6 @@ export type InteractionRef = z.infer<typeof InteractionRefSchema>;
|
|
|
259
150
|
|
|
260
151
|
/** An interaction reduced to the fields a name picker needs. */
|
|
261
152
|
export type InteractionName = z.infer<typeof InteractionNameSchema>;
|
|
262
|
-
export const InteractionNamePopulate = 'id name';
|
|
263
|
-
|
|
264
|
-
export const InteractionRefPopulate =
|
|
265
|
-
'id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts';
|
|
266
|
-
|
|
267
|
-
export const InteractionRefWithSchemaPopulate = `${InteractionRefPopulate} result_schema`;
|
|
268
153
|
|
|
269
154
|
/**
|
|
270
155
|
* An interaction reference carrying the schemas an export needs to reconstruct it.
|
|
@@ -293,18 +178,6 @@ export enum ExecutionRunStatus {
|
|
|
293
178
|
failed = 'failed',
|
|
294
179
|
}
|
|
295
180
|
|
|
296
|
-
export enum RunDataStorageDescription {
|
|
297
|
-
STANDARD = 'Run data is stored for both the model inputs and output.',
|
|
298
|
-
RESTRICTED = 'No run data is stored for the model inputs — only the model output.',
|
|
299
|
-
DEBUG = 'Run data is stored for the model inputs and output, schema, and final prompt.',
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
export const RunDataStorageOptions: Record<RunDataStorageLevel, RunDataStorageDescription> = {
|
|
303
|
-
[RunDataStorageLevel.STANDARD]: RunDataStorageDescription.STANDARD,
|
|
304
|
-
[RunDataStorageLevel.RESTRICTED]: RunDataStorageDescription.RESTRICTED,
|
|
305
|
-
[RunDataStorageLevel.DEBUG]: RunDataStorageDescription.DEBUG,
|
|
306
|
-
};
|
|
307
|
-
|
|
308
181
|
/**
|
|
309
182
|
* Schema can be stored or specified as a reference to an external schema.
|
|
310
183
|
* We only support "store:" references for now
|
|
@@ -312,40 +185,8 @@ export const RunDataStorageOptions: Record<RunDataStorageLevel, RunDataStorageDe
|
|
|
312
185
|
export type SchemaRef = z.infer<typeof SchemaRefSchema>;
|
|
313
186
|
export type CachePolicy = z.infer<typeof CachePolicySchema>;
|
|
314
187
|
export type InteractionVisibility = z.infer<typeof InteractionVisibilitySchema>;
|
|
315
|
-
|
|
316
|
-
export interface InteractionData {
|
|
317
|
-
readonly id: string;
|
|
318
|
-
name: string;
|
|
319
|
-
endpoint: string;
|
|
320
|
-
description?: string;
|
|
321
|
-
project: string | ProjectRef;
|
|
322
|
-
tags: string[];
|
|
323
|
-
agent_runner_options?: AgentRunnerOptions;
|
|
324
|
-
result_schema?: JSONSchema | SchemaRef;
|
|
325
|
-
environment?: string | ExecutionEnvironmentRef;
|
|
326
|
-
model?: string;
|
|
327
|
-
model_options?: ModelOptions;
|
|
328
|
-
restriction?: RunDataStorageLevel;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* @deprecated This is deprecated. Use CompletionResult.type information instead.
|
|
332
|
-
*/
|
|
333
|
-
output_modality?: Modalities;
|
|
334
|
-
}
|
|
335
188
|
export type Interaction = z.infer<typeof InteractionSchema>;
|
|
336
189
|
|
|
337
|
-
export interface PopulatedInteraction extends Omit<Interaction, 'prompts'> {
|
|
338
|
-
prompts: PopulatedPromptSegmentDef[];
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* Used to describe an interaction that can be executed. Contains only the interaction data useful
|
|
343
|
-
* to execute the interaction plus the prompt templates
|
|
344
|
-
*/
|
|
345
|
-
export interface ExecutableInteraction extends InteractionData {
|
|
346
|
-
prompts: ExecutablePromptSegmentDef[];
|
|
347
|
-
}
|
|
348
|
-
|
|
349
190
|
export type InteractionCreatePayload = z.infer<typeof InteractionCreatePayloadSchema>;
|
|
350
191
|
|
|
351
192
|
export type InteractionUpdatePayload = z.infer<typeof InteractionUpdatePayloadSchema>;
|
|
@@ -368,9 +209,6 @@ export type InteractionExecutionPayload = z.infer<typeof InteractionExecutionPay
|
|
|
368
209
|
|
|
369
210
|
export type NamedInteractionExecutionPayload = z.infer<typeof NamedInteractionExecutionPayloadSchema>;
|
|
370
211
|
|
|
371
|
-
// ================= async execution payloads ====================
|
|
372
|
-
export type ToolRef = string | { name: string; description: string };
|
|
373
|
-
|
|
374
212
|
export type ConversationVisibility = z.infer<typeof ConversationVisibilitySchema>;
|
|
375
213
|
|
|
376
214
|
/**
|
|
@@ -538,11 +376,6 @@ export function normalizeAgentResources(value: unknown): AgentResourceReference[
|
|
|
538
376
|
return result;
|
|
539
377
|
}
|
|
540
378
|
|
|
541
|
-
/** Extract the normalized resource references a tool declared in its result metadata. */
|
|
542
|
-
export function getResourcesFromToolResult(result: Pick<ToolResultContent, 'meta'>): AgentResourceReference[] {
|
|
543
|
-
return normalizeAgentResources(result.meta?.resources);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
379
|
export type ToolResult = z.infer<typeof ToolResultSchema>;
|
|
547
380
|
|
|
548
381
|
/**
|
|
@@ -552,8 +385,6 @@ export type ToolResultsPayload = z.infer<typeof ToolResultsPayloadSchema>;
|
|
|
552
385
|
|
|
553
386
|
export type UserMessagePayload = z.infer<typeof UserMessagePayloadSchema>;
|
|
554
387
|
|
|
555
|
-
export type CheckpointConversationPayload = Omit<ToolResultsPayload, 'results' | 'tools'>;
|
|
556
|
-
|
|
557
388
|
// ================= end async execution payloads ====================
|
|
558
389
|
|
|
559
390
|
export enum RunSourceTypes {
|
|
@@ -603,6 +434,7 @@ export interface BaseExecutionRun<P = unknown> {
|
|
|
603
434
|
finish_reason?: string;
|
|
604
435
|
prompt?: unknown;
|
|
605
436
|
token_use?: ExecutionTokenUsage;
|
|
437
|
+
prompt_cache_diagnostics?: PromptCacheDiagnostic[];
|
|
606
438
|
chunks?: number;
|
|
607
439
|
execution_time?: number; // ms
|
|
608
440
|
// ISO strings, not `Date`. `ExecutionRunRef` — the shape every run endpoint actually returns —
|
|
@@ -659,29 +491,8 @@ export interface InteractionExecutionResult<P = unknown>
|
|
|
659
491
|
options?: StatelessExecutionOptions;
|
|
660
492
|
}
|
|
661
493
|
|
|
662
|
-
export interface LegacyInteractionExecutionResult<P = unknown>
|
|
663
|
-
extends Omit<InteractionExecutionResult<P>, 'result' | 'account' | 'project'> {
|
|
664
|
-
account: string | AccountRef;
|
|
665
|
-
project: string | ProjectRef;
|
|
666
|
-
result?: JSONObject | string | null;
|
|
667
|
-
}
|
|
668
|
-
|
|
669
494
|
export type ExecutionRunRef = z.infer<typeof ExecutionRunRefSchema>;
|
|
670
495
|
|
|
671
|
-
export const ExecutionRunRefSelect = '-result -parameters -result_schema -prompt';
|
|
672
|
-
|
|
673
|
-
export enum ConfigModesDescription {
|
|
674
|
-
RUN_AND_INTERACTION_CONFIG = 'This run configuration is used. Undefined options are filled with interaction configuration.',
|
|
675
|
-
RUN_CONFIG_ONLY = 'Only this run configuration is used. Undefined options remain undefined.',
|
|
676
|
-
INTERACTION_CONFIG_ONLY = 'Only interaction configuration is used.',
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
export const ConfigModesOptions: Record<ConfigModes, ConfigModesDescription> = {
|
|
680
|
-
[ConfigModes.RUN_AND_INTERACTION_CONFIG]: ConfigModesDescription.RUN_AND_INTERACTION_CONFIG,
|
|
681
|
-
[ConfigModes.RUN_CONFIG_ONLY]: ConfigModesDescription.RUN_CONFIG_ONLY,
|
|
682
|
-
[ConfigModes.INTERACTION_CONFIG_ONLY]: ConfigModesDescription.INTERACTION_CONFIG_ONLY,
|
|
683
|
-
};
|
|
684
|
-
|
|
685
496
|
export type InteractionExecutionConfiguration = z.infer<typeof InteractionExecutionConfigurationSchema>;
|
|
686
497
|
|
|
687
498
|
export type GenerateInteractionPayload = z.infer<typeof GenerateInteractionPayloadSchema>;
|
|
@@ -743,78 +554,8 @@ export type ResolvedRuntimeConfig = z.infer<typeof ResolvedRuntimeConfigSchema>;
|
|
|
743
554
|
*/
|
|
744
555
|
export type ResolvedInteractionExecutionInfo = z.infer<typeof ResolvedInteractionExecutionInfoSchema>;
|
|
745
556
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
*/
|
|
749
|
-
export interface BuiltinToolDefinition {
|
|
750
|
-
/**
|
|
751
|
-
* The unique tool name
|
|
752
|
-
*/
|
|
753
|
-
name: string;
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* One-line summary shown in the tool selector UI
|
|
757
|
-
*/
|
|
758
|
-
summary?: string;
|
|
759
|
-
|
|
760
|
-
/**
|
|
761
|
-
* JSON schema for the tool's parameters
|
|
762
|
-
*/
|
|
763
|
-
params: JSONSchema;
|
|
764
|
-
|
|
765
|
-
/**
|
|
766
|
-
* Whether this tool is active by default when no explicit tool list is provided.
|
|
767
|
-
* Tools with default: false are only activated by skills.
|
|
768
|
-
*/
|
|
769
|
-
default: boolean;
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* Behavioral hints following the MCP ToolAnnotations spec.
|
|
773
|
-
* Used for display purposes only — not sent to LLMs.
|
|
774
|
-
*/
|
|
775
|
-
annotations?: MCPToolAnnotations;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* A system skill entry in the tools catalog.
|
|
780
|
-
* System skills are built into the platform and unlock hidden tools.
|
|
781
|
-
*/
|
|
782
|
-
export interface SystemSkillCatalogEntry {
|
|
783
|
-
/** Skill name without the learn_ prefix, e.g. "document_search" */
|
|
784
|
-
name: string;
|
|
785
|
-
/** Tool name used in agent selection, i.e. "learn_document_search" */
|
|
786
|
-
tool_name: string;
|
|
787
|
-
/** Human-readable display title */
|
|
788
|
-
title: string;
|
|
789
|
-
/** Description of what the skill unlocks */
|
|
790
|
-
description: string;
|
|
791
|
-
/** Tool names this skill enables (unlocks) when called */
|
|
792
|
-
tools: string[];
|
|
793
|
-
/** Whether this skill is part of the default agent toolkit */
|
|
794
|
-
default?: boolean;
|
|
557
|
+
export interface PopulatedInteraction extends Omit<Interaction, 'prompts'> {
|
|
558
|
+
prompts: PopulatedPromptSegmentDef[];
|
|
795
559
|
}
|
|
796
560
|
|
|
797
|
-
|
|
798
|
-
* Response from the builtin tools catalog endpoint
|
|
799
|
-
*/
|
|
800
|
-
export interface BuiltinToolsCatalogResponse {
|
|
801
|
-
/**
|
|
802
|
-
* List of available builtin tools
|
|
803
|
-
*/
|
|
804
|
-
tools: BuiltinToolDefinition[];
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* When the catalog was generated
|
|
808
|
-
*/
|
|
809
|
-
generated_at: string;
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* Total number of tools in the catalog
|
|
813
|
-
*/
|
|
814
|
-
total_tools: number;
|
|
815
|
-
|
|
816
|
-
/**
|
|
817
|
-
* System skills bundled in the platform, available without app installation
|
|
818
|
-
*/
|
|
819
|
-
skills?: SystemSkillCatalogEntry[];
|
|
820
|
-
}
|
|
561
|
+
export type UpdateExecutionRunPayload = z.infer<typeof UpdateExecutionRunPayloadSchema>;
|
package/src/meters.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
StripeBillingDisabledSchema,
|
|
4
|
+
StripeBillingEnabledSchema,
|
|
5
|
+
StripeBillingStatusResponseSchema,
|
|
6
|
+
} from './api-schemas/account.js';
|
|
3
7
|
|
|
4
|
-
|
|
8
|
+
interface MeterAdjustment {
|
|
5
9
|
meter: string;
|
|
6
10
|
value: string;
|
|
7
11
|
identifier?: string;
|
|
@@ -11,15 +15,6 @@ export interface AdjustMetersMeterWorkflowParams {
|
|
|
11
15
|
adjustments: MeterAdjustment[];
|
|
12
16
|
}
|
|
13
17
|
|
|
14
|
-
export enum MeterNames {
|
|
15
|
-
analyzed_pages = 'analyzed_pages',
|
|
16
|
-
extracted_tables = 'extracted_tables',
|
|
17
|
-
analyzed_images = 'analyzed_images',
|
|
18
|
-
input_token_used = 'input_token_used',
|
|
19
|
-
output_token_used = 'output_token_used',
|
|
20
|
-
task_run = 'task_run',
|
|
21
|
-
}
|
|
22
|
-
|
|
23
18
|
/**
|
|
24
19
|
* Stripe billing status, derived from `StripeBillingStatusResponseSchema`.
|
|
25
20
|
*
|
|
@@ -29,3 +24,7 @@ export enum MeterNames {
|
|
|
29
24
|
* `status` now tells TypeScript which fields exist.
|
|
30
25
|
*/
|
|
31
26
|
export type StripeBillingStatusResponse = z.infer<typeof StripeBillingStatusResponseSchema>;
|
|
27
|
+
|
|
28
|
+
export type StripeBillingEnabled = z.infer<typeof StripeBillingEnabledSchema>;
|
|
29
|
+
|
|
30
|
+
export type StripeBillingDisabled = z.infer<typeof StripeBillingDisabledSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { Permission } from './access-control-values.js';
|
|
3
|
+
import { getOAuthPermissionScopes } from './oauth-scopes.js';
|
|
4
|
+
|
|
5
|
+
describe('getOAuthPermissionScopes', () => {
|
|
6
|
+
it('allows API key metadata reads but not persistent credential administration', () => {
|
|
7
|
+
const scopes = getOAuthPermissionScopes();
|
|
8
|
+
|
|
9
|
+
expect(scopes).toContain(Permission.api_key_read);
|
|
10
|
+
expect(scopes).not.toContain(Permission.api_key_create);
|
|
11
|
+
expect(scopes).not.toContain(Permission.api_key_update);
|
|
12
|
+
expect(scopes).not.toContain(Permission.api_key_delete);
|
|
13
|
+
expect(scopes).not.toContain(Permission.api_key_secret_read);
|
|
14
|
+
});
|
|
15
|
+
});
|
package/src/oauth-scopes.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Permission } from './access-control.js';
|
|
1
|
+
import { Permission } from './access-control-values.js';
|
|
2
2
|
|
|
3
3
|
export const OAUTH_SCOPE_OPENID = 'openid';
|
|
4
4
|
export const OAUTH_SCOPE_PROFILE = 'profile';
|
|
@@ -6,79 +6,25 @@ export const OAUTH_SCOPE_OFFLINE_ACCESS = 'offline_access';
|
|
|
6
6
|
export const OAUTH_SCOPE_PROJECT_SWITCH = 'project_switch';
|
|
7
7
|
|
|
8
8
|
export const OAUTH_STANDARD_SCOPES = [OAUTH_SCOPE_OPENID, OAUTH_SCOPE_PROFILE, OAUTH_SCOPE_OFFLINE_ACCESS] as const;
|
|
9
|
-
export const OAUTH_PLATFORM_SCOPES = [OAUTH_SCOPE_PROJECT_SWITCH] as const;
|
|
10
|
-
|
|
11
|
-
export type OAuthStandardScope = (typeof OAUTH_STANDARD_SCOPES)[number];
|
|
12
|
-
export type OAuthPlatformScope = (typeof OAUTH_PLATFORM_SCOPES)[number];
|
|
13
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Permissions that are never grantable as an OAuth scope: they administer persistent credentials,
|
|
12
|
+
* hand out secret material, or are internal to the platform's own consoles.
|
|
13
|
+
*/
|
|
14
14
|
const NON_OAUTH_PERMISSION_SCOPES = new Set<Permission>([
|
|
15
|
+
Permission.api_key_create,
|
|
16
|
+
Permission.api_key_update,
|
|
17
|
+
Permission.api_key_delete,
|
|
15
18
|
Permission.api_key_secret_read,
|
|
16
19
|
Permission.manage_billing,
|
|
17
20
|
Permission.billing_read,
|
|
18
21
|
Permission.iam_impersonate,
|
|
19
22
|
Permission.studio_access,
|
|
20
23
|
]);
|
|
24
|
+
|
|
21
25
|
const OAUTH_PERMISSION_SCOPES = Object.values(Permission).filter((scope) => !NON_OAUTH_PERMISSION_SCOPES.has(scope));
|
|
22
|
-
const OAUTH_STANDARD_SCOPE_SET = new Set<string>(OAUTH_STANDARD_SCOPES);
|
|
23
|
-
const OAUTH_PLATFORM_SCOPE_SET = new Set<string>(OAUTH_PLATFORM_SCOPES);
|
|
24
|
-
const OAUTH_PERMISSION_SCOPE_SET = new Set<string>(OAUTH_PERMISSION_SCOPES);
|
|
25
|
-
const OBJECT_ID_PATTERN = /^[0-9a-f]{24}$/i;
|
|
26
|
-
const OAUTH_PROJECT_BINDING_SCOPE_PREFIX = 'project:';
|
|
27
26
|
|
|
27
|
+
/** The permissions a client may request as OAuth scopes. */
|
|
28
28
|
export function getOAuthPermissionScopes(): Permission[] {
|
|
29
29
|
return [...OAUTH_PERMISSION_SCOPES];
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
export function isOAuthStandardScope(scope: string): scope is OAuthStandardScope {
|
|
33
|
-
return OAUTH_STANDARD_SCOPE_SET.has(scope);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function isOAuthPlatformScope(scope: string): scope is OAuthPlatformScope {
|
|
37
|
-
return OAUTH_PLATFORM_SCOPE_SET.has(scope);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export function isOAuthPermissionScope(scope: string): scope is Permission {
|
|
41
|
-
return OAUTH_PERMISSION_SCOPE_SET.has(scope);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function isOAuthSupportedScope(scope: string): boolean {
|
|
45
|
-
return isOAuthStandardScope(scope) || isOAuthPlatformScope(scope) || isOAuthPermissionScope(scope);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function isOAuthProjectBindingScope(scope: string): boolean {
|
|
49
|
-
if (!scope.startsWith(OAUTH_PROJECT_BINDING_SCOPE_PREFIX)) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
return OBJECT_ID_PATTERN.test(scope.slice(OAUTH_PROJECT_BINDING_SCOPE_PREFIX.length));
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function createOAuthProjectBindingScope(projectId: string): string {
|
|
56
|
-
return `${OAUTH_PROJECT_BINDING_SCOPE_PREFIX}${projectId}`;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function hasOAuthOpenIdScope(scopes: readonly string[]): boolean {
|
|
60
|
-
return scopes.includes(OAUTH_SCOPE_OPENID);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function hasOAuthProfileScope(scopes: readonly string[]): boolean {
|
|
64
|
-
return scopes.includes(OAUTH_SCOPE_PROFILE);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function hasOAuthOfflineAccessScope(scopes: readonly string[]): boolean {
|
|
68
|
-
return scopes.includes(OAUTH_SCOPE_OFFLINE_ACCESS);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function hasOAuthProjectSwitchScope(scopes: readonly string[]): boolean {
|
|
72
|
-
return scopes.includes(OAUTH_SCOPE_PROJECT_SWITCH);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function getOAuthScopesWithProfileDependency(scopes: readonly string[]): string[] {
|
|
76
|
-
if (!hasOAuthOpenIdScope(scopes)) {
|
|
77
|
-
return scopes.filter((scope) => scope !== OAUTH_SCOPE_PROFILE);
|
|
78
|
-
}
|
|
79
|
-
return [...scopes];
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function extractOAuthPermissionScopes(scopes: readonly string[]): Permission[] {
|
|
83
|
-
return scopes.filter(isOAuthPermissionScope);
|
|
84
|
-
}
|