@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/oauth-server.ts
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
2
|
import type {
|
|
3
|
+
ApproveOAuthAuthorizationRequestPayloadSchema,
|
|
3
4
|
BulkRevokeOAuthGrantsPayloadSchema,
|
|
5
|
+
CreateOAuthAuthorizationRequestPayloadSchema,
|
|
4
6
|
CreateOAuthClientPayloadSchema,
|
|
5
7
|
ListOAuthGrantsQuerySchema,
|
|
8
|
+
OAuthAuthorizationDecisionResponseSchema,
|
|
9
|
+
OAuthAuthorizationRequestSchema,
|
|
10
|
+
OAuthAuthorizationRequestStatusSchema,
|
|
11
|
+
OAuthAuthorizationServerMetadataSchema,
|
|
12
|
+
OAuthAuthorizeQuerySchema,
|
|
6
13
|
OAuthClientCreateResponseSchema,
|
|
7
14
|
OAuthClientDataSchema,
|
|
15
|
+
OAuthClientDisplayMetadataSchema,
|
|
16
|
+
OAuthClientRegistrationModeSchema,
|
|
8
17
|
OAuthClientSchema,
|
|
9
18
|
OAuthClientScopeMetadataSchema,
|
|
10
19
|
OAuthClientStatusSchema,
|
|
11
20
|
OAuthClientTypeSchema,
|
|
21
|
+
OAuthDeviceAuthorizationRequestSchema,
|
|
22
|
+
OAuthDeviceAuthorizationResponseSchema,
|
|
23
|
+
OAuthGrantableScopesResponseSchema,
|
|
12
24
|
OAuthGrantListResponseSchema,
|
|
13
25
|
OAuthGrantRevokeResponseSchema,
|
|
14
26
|
OAuthGrantSchema,
|
|
@@ -20,17 +32,14 @@ import type {
|
|
|
20
32
|
OAuthRegistrationSourceSchema,
|
|
21
33
|
OAuthResponseTypeSchema,
|
|
22
34
|
OAuthTokenEndpointAuthMethodSchema,
|
|
35
|
+
OAuthTokenResponseSchema,
|
|
23
36
|
RevokeOAuthGrantQuerySchema,
|
|
24
37
|
UpdateOAuthClientPayloadSchema,
|
|
25
38
|
} from './api-schemas/oauth-server.js';
|
|
26
|
-
import type { AuthTokenPayload, PrincipalType } from './apikey.js';
|
|
27
|
-
import type { ProjectRef } from './project.js';
|
|
28
39
|
|
|
29
40
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* are built from. The rest of this module is the token server's own OAuth surface, still declared
|
|
33
|
-
* here and still TypeScript-derived; it converts with that service's own slots.
|
|
41
|
+
* These public OAuth wire types are inferred from `./api-schemas/oauth-server.js` — the same
|
|
42
|
+
* contracts used for runtime parsing and OpenAPI components.
|
|
34
43
|
*/
|
|
35
44
|
export type OAuthClientType = z.infer<typeof OAuthClientTypeSchema>;
|
|
36
45
|
export type OAuthClientStatus = z.infer<typeof OAuthClientStatusSchema>;
|
|
@@ -39,14 +48,8 @@ export type OAuthProjectBindingMode = z.infer<typeof OAuthProjectBindingModeSche
|
|
|
39
48
|
export type OAuthTokenEndpointAuthMethod = z.infer<typeof OAuthTokenEndpointAuthMethodSchema>;
|
|
40
49
|
export type OAuthGrantType = z.infer<typeof OAuthGrantTypeSchema>;
|
|
41
50
|
export type OAuthResponseType = z.infer<typeof OAuthResponseTypeSchema>;
|
|
42
|
-
export type OAuthAuthorizationRequestStatus =
|
|
43
|
-
export type OAuthClientRegistrationMode =
|
|
44
|
-
/**
|
|
45
|
-
* How Vertesia identified itself to a *remote* authorization server when connecting
|
|
46
|
-
* out as an OAuth client. Distinct from {@link OAuthClientRegistrationMode}, which
|
|
47
|
-
* describes how inbound clients identified themselves to Vertesia's own AS.
|
|
48
|
-
*/
|
|
49
|
-
export type RemoteOAuthRegistrationMode = 'dynamic_client_registration' | 'client_id_metadata_document';
|
|
51
|
+
export type OAuthAuthorizationRequestStatus = z.infer<typeof OAuthAuthorizationRequestStatusSchema>;
|
|
52
|
+
export type OAuthClientRegistrationMode = z.infer<typeof OAuthClientRegistrationModeSchema>;
|
|
50
53
|
export type OAuthGrantStatus = z.infer<typeof OAuthGrantStatusSchema>;
|
|
51
54
|
export type OAuthGrantSortField = z.infer<typeof OAuthGrantSortFieldSchema>;
|
|
52
55
|
export type OAuthGrantSortOrder = z.infer<typeof OAuthGrantSortOrderSchema>;
|
|
@@ -78,204 +81,14 @@ export type CreateOAuthClientPayload = z.infer<typeof CreateOAuthClientPayloadSc
|
|
|
78
81
|
|
|
79
82
|
export type UpdateOAuthClientPayload = z.infer<typeof UpdateOAuthClientPayloadSchema>;
|
|
80
83
|
|
|
81
|
-
export
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
scopes_supported: string[];
|
|
93
|
-
client_id_metadata_document_supported?: boolean;
|
|
94
|
-
device_authorization_endpoint?: string;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface OAuthClientMetadataDocument {
|
|
98
|
-
client_id: string;
|
|
99
|
-
client_name: string;
|
|
100
|
-
redirect_uris: string[];
|
|
101
|
-
grant_types?: OAuthGrantType[];
|
|
102
|
-
response_types?: OAuthResponseType[];
|
|
103
|
-
token_endpoint_auth_method?: OAuthTokenEndpointAuthMethod;
|
|
104
|
-
scope?: string;
|
|
105
|
-
client_uri?: string;
|
|
106
|
-
logo_uri?: string;
|
|
107
|
-
tos_uri?: string;
|
|
108
|
-
policy_uri?: string;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface OAuthClientDisplayMetadata {
|
|
112
|
-
client_uri?: string;
|
|
113
|
-
logo_uri?: string;
|
|
114
|
-
tos_uri?: string;
|
|
115
|
-
policy_uri?: string;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export interface OAuthAuthorizeQuery {
|
|
119
|
-
response_type: 'code';
|
|
120
|
-
client_id: string;
|
|
121
|
-
redirect_uri: string;
|
|
122
|
-
resource?: string;
|
|
123
|
-
scope?: string;
|
|
124
|
-
state?: string;
|
|
125
|
-
code_challenge: string;
|
|
126
|
-
code_challenge_method: 'S256';
|
|
127
|
-
project_id?: string;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export interface CreateOAuthAuthorizationRequestPayload extends OAuthAuthorizeQuery {}
|
|
131
|
-
|
|
132
|
-
export interface OAuthAuthorizationRequest {
|
|
133
|
-
request_id: string;
|
|
134
|
-
client_id: string;
|
|
135
|
-
client_name: string;
|
|
136
|
-
client_metadata?: OAuthClientDisplayMetadata;
|
|
137
|
-
client_registration_mode?: OAuthClientRegistrationMode;
|
|
138
|
-
redirect_uri: string;
|
|
139
|
-
redirect_origin: string;
|
|
140
|
-
resource?: string;
|
|
141
|
-
requested_scopes: string[];
|
|
142
|
-
optional_scopes?: string[];
|
|
143
|
-
requested_project_id?: string;
|
|
144
|
-
project_binding_mode: OAuthProjectBindingMode;
|
|
145
|
-
fixed_project_id?: string;
|
|
146
|
-
/**
|
|
147
|
-
* When true, the consent UI must constrain project selection to {@link owner_account_id}: the
|
|
148
|
-
* client may only be authorized for projects in its owning account. False (default) lets the user
|
|
149
|
-
* authorize any project they can access. Mirrors the server-side authorization enforcement.
|
|
150
|
-
*/
|
|
151
|
-
restrict_to_owner_account?: boolean;
|
|
152
|
-
/** The owning account the client is restricted to, when {@link restrict_to_owner_account} is true. */
|
|
153
|
-
owner_account_id?: string;
|
|
154
|
-
status: OAuthAuthorizationRequestStatus;
|
|
155
|
-
created_at: string;
|
|
156
|
-
expires_at: string;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export interface ApproveOAuthAuthorizationRequestPayload {
|
|
160
|
-
project_id?: string;
|
|
161
|
-
granted_scopes: string[];
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export interface OAuthGrantableScopesResponse {
|
|
165
|
-
project_id: string;
|
|
166
|
-
requested_permission_scopes: string[];
|
|
167
|
-
grantable_permission_scopes: string[];
|
|
168
|
-
unavailable_permission_scopes: string[];
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export interface OAuthAuthorizationDecisionResponse {
|
|
172
|
-
redirect_url: string;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface OAuthDeviceAuthorizationRequest {
|
|
176
|
-
client_id: string;
|
|
177
|
-
resource?: string;
|
|
178
|
-
scope?: string;
|
|
179
|
-
project_id?: string;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export interface OAuthDeviceAuthorizationResponse {
|
|
183
|
-
device_code: string;
|
|
184
|
-
user_code: string;
|
|
185
|
-
verification_uri: string;
|
|
186
|
-
verification_uri_complete: string;
|
|
187
|
-
expires_in: number;
|
|
188
|
-
interval: number;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export interface OAuthTokenRequestAuthorizationCode {
|
|
192
|
-
grant_type: 'authorization_code';
|
|
193
|
-
code: string;
|
|
194
|
-
redirect_uri: string;
|
|
195
|
-
client_id: string;
|
|
196
|
-
resource?: string;
|
|
197
|
-
code_verifier: string;
|
|
198
|
-
client_secret?: string;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export interface OAuthTokenRequestRefreshToken {
|
|
202
|
-
grant_type: 'refresh_token';
|
|
203
|
-
refresh_token: string;
|
|
204
|
-
client_id: string;
|
|
205
|
-
resource?: string;
|
|
206
|
-
project_id?: string;
|
|
207
|
-
client_secret?: string;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
export interface OAuthTokenRequestDeviceCode {
|
|
211
|
-
grant_type: 'urn:ietf:params:oauth:grant-type:device_code';
|
|
212
|
-
device_code: string;
|
|
213
|
-
client_id: string;
|
|
214
|
-
client_secret?: string;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export type OAuthTokenRequest =
|
|
218
|
-
| OAuthTokenRequestAuthorizationCode
|
|
219
|
-
| OAuthTokenRequestRefreshToken
|
|
220
|
-
| OAuthTokenRequestDeviceCode;
|
|
221
|
-
|
|
222
|
-
export interface OAuthTokenResponse {
|
|
223
|
-
access_token: string;
|
|
224
|
-
token_type: 'Bearer';
|
|
225
|
-
expires_in: number;
|
|
226
|
-
scope: string;
|
|
227
|
-
refresh_token?: string;
|
|
228
|
-
id_token?: string;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface OAuthAuthorizationCodeRecord {
|
|
232
|
-
code: string;
|
|
233
|
-
client_id: string;
|
|
234
|
-
user_id: string;
|
|
235
|
-
account_id: string;
|
|
236
|
-
project_id: string;
|
|
237
|
-
resource: string;
|
|
238
|
-
scope: string[];
|
|
239
|
-
redirect_uri: string;
|
|
240
|
-
code_challenge: string;
|
|
241
|
-
code_challenge_method: 'S256';
|
|
242
|
-
expires_at: string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface OAuthConsentRecord {
|
|
246
|
-
user_id: string;
|
|
247
|
-
client_id: string;
|
|
248
|
-
account_id: string;
|
|
249
|
-
project_id: string;
|
|
250
|
-
scope: string[];
|
|
251
|
-
granted_at: string;
|
|
252
|
-
revoked_at?: string;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export interface OAuthAccessTokenPayload extends Omit<AuthTokenPayload, 'type' | 'project'> {
|
|
256
|
-
type: PrincipalType.OAuthAccess;
|
|
257
|
-
client_id: string;
|
|
258
|
-
scope: string;
|
|
259
|
-
user_id: string;
|
|
260
|
-
project: ProjectRef;
|
|
261
|
-
allowed_collections?: string[];
|
|
262
|
-
resource?: string;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
export interface OAuthIdTokenPayload {
|
|
266
|
-
sub: string;
|
|
267
|
-
user_id: string;
|
|
268
|
-
name?: string;
|
|
269
|
-
email?: string;
|
|
270
|
-
picture?: string;
|
|
271
|
-
type: 'oauth_id';
|
|
272
|
-
client_id: string;
|
|
273
|
-
account?: AuthTokenPayload['account'];
|
|
274
|
-
accounts?: AuthTokenPayload['accounts'];
|
|
275
|
-
project?: ProjectRef;
|
|
276
|
-
/** User groups */
|
|
277
|
-
groups?: AuthTokenPayload['groups'];
|
|
278
|
-
iss: string;
|
|
279
|
-
aud: string;
|
|
280
|
-
exp: number;
|
|
281
|
-
}
|
|
84
|
+
export type OAuthAuthorizationServerMetadata = z.infer<typeof OAuthAuthorizationServerMetadataSchema>;
|
|
85
|
+
export type OAuthClientDisplayMetadata = z.infer<typeof OAuthClientDisplayMetadataSchema>;
|
|
86
|
+
export type OAuthAuthorizeQuery = z.infer<typeof OAuthAuthorizeQuerySchema>;
|
|
87
|
+
export type CreateOAuthAuthorizationRequestPayload = z.infer<typeof CreateOAuthAuthorizationRequestPayloadSchema>;
|
|
88
|
+
export type OAuthAuthorizationRequest = z.infer<typeof OAuthAuthorizationRequestSchema>;
|
|
89
|
+
export type ApproveOAuthAuthorizationRequestPayload = z.infer<typeof ApproveOAuthAuthorizationRequestPayloadSchema>;
|
|
90
|
+
export type OAuthGrantableScopesResponse = z.infer<typeof OAuthGrantableScopesResponseSchema>;
|
|
91
|
+
export type OAuthAuthorizationDecisionResponse = z.infer<typeof OAuthAuthorizationDecisionResponseSchema>;
|
|
92
|
+
export type OAuthDeviceAuthorizationRequest = z.infer<typeof OAuthDeviceAuthorizationRequestSchema>;
|
|
93
|
+
export type OAuthDeviceAuthorizationResponse = z.infer<typeof OAuthDeviceAuthorizationResponseSchema>;
|
|
94
|
+
export type OAuthTokenResponse = z.infer<typeof OAuthTokenResponseSchema>;
|
package/src/payload.ts
CHANGED
|
@@ -26,7 +26,7 @@ export type SortOrder = z.infer<typeof SortOrderSchema>;
|
|
|
26
26
|
|
|
27
27
|
export type SortOption = z.infer<typeof SortOptionSchema>;
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
interface SearchPayload {
|
|
30
30
|
facets?: FacetSpec[];
|
|
31
31
|
/**
|
|
32
32
|
* If the facets should be limited to the current page of results.
|
|
@@ -45,11 +45,6 @@ export interface SearchPayload {
|
|
|
45
45
|
aggs?: Record<string, unknown>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export interface ComputeFacetPayload {
|
|
49
|
-
facets: FacetSpec[];
|
|
50
|
-
query?: SimpleSearchQuery;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
48
|
export interface InteractionSearchPayload extends SearchPayload {
|
|
54
49
|
query?: InteractionSearchQuery;
|
|
55
50
|
}
|
package/src/pending-asks.ts
CHANGED
|
@@ -3,53 +3,30 @@
|
|
|
3
3
|
* Used to notify external systems when agents are waiting for user input.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
6
|
+
import type { z } from 'zod';
|
|
7
|
+
import type {
|
|
8
|
+
ListPendingAsksResponseSchema,
|
|
9
|
+
PendingAskDataSchema,
|
|
10
|
+
PendingAskStatusSchema,
|
|
11
|
+
RegisterPendingAskRequestSchema,
|
|
12
|
+
RegisterPendingAskResponseSchema,
|
|
13
|
+
ResolvePendingAskRequestSchema,
|
|
14
|
+
ResolvePendingAskResponseSchema,
|
|
15
|
+
} from './api-schemas/agent-communication.js';
|
|
8
16
|
|
|
9
17
|
// ================= Pending Ask Data ====================
|
|
10
18
|
|
|
11
19
|
/**
|
|
12
20
|
* Status of a pending ask request.
|
|
13
21
|
*/
|
|
14
|
-
export type PendingAskStatus =
|
|
22
|
+
export type PendingAskStatus = z.infer<typeof PendingAskStatusSchema>;
|
|
15
23
|
|
|
16
24
|
/**
|
|
17
25
|
* Data stored in Redis for pending ask_user requests.
|
|
18
26
|
* Tracks which agents are waiting for user input and enables
|
|
19
27
|
* both webhook notifications and portal views.
|
|
20
28
|
*/
|
|
21
|
-
export
|
|
22
|
-
/** Unique identifier for this ask (10-char alphanumeric) */
|
|
23
|
-
askId: string;
|
|
24
|
-
/** Temporal workflow run ID */
|
|
25
|
-
runId: string;
|
|
26
|
-
/** Temporal workflow ID */
|
|
27
|
-
workflowId: string;
|
|
28
|
-
/** Project ID */
|
|
29
|
-
projectId: string;
|
|
30
|
-
/** Account ID */
|
|
31
|
-
accountId: string;
|
|
32
|
-
/** Name of the agent/interaction that asked */
|
|
33
|
-
agentName: string;
|
|
34
|
-
/** Questions asked by the agent */
|
|
35
|
-
questions: string[];
|
|
36
|
-
/** Timeout in hours (default 48) */
|
|
37
|
-
timeoutHours: number;
|
|
38
|
-
/** Communication channels configured for the conversation */
|
|
39
|
-
userChannels: UserChannel[];
|
|
40
|
-
/** Timestamp when the ask was created (ms since epoch) */
|
|
41
|
-
createdAt: number;
|
|
42
|
-
/** Timestamp when the ask expires (ms since epoch) */
|
|
43
|
-
expiresAt: number;
|
|
44
|
-
/** Current status of the ask */
|
|
45
|
-
status: PendingAskStatus;
|
|
46
|
-
/** Durable task created for this ask_user request. */
|
|
47
|
-
taskId?: string;
|
|
48
|
-
/** Timestamp when resolved (ms since epoch) */
|
|
49
|
-
resolvedAt?: number;
|
|
50
|
-
/** User's response (after resolution) */
|
|
51
|
-
response?: string;
|
|
52
|
-
}
|
|
29
|
+
export type PendingAskData = z.infer<typeof PendingAskDataSchema>;
|
|
53
30
|
|
|
54
31
|
// ================= Webhook Events ====================
|
|
55
32
|
|
|
@@ -104,10 +81,8 @@ export interface AskUserWebhookEvent {
|
|
|
104
81
|
/**
|
|
105
82
|
* Response from listing pending asks.
|
|
106
83
|
*/
|
|
107
|
-
export
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
export
|
|
112
|
-
taskFields?: TaskField[];
|
|
113
|
-
}
|
|
84
|
+
export type RegisterPendingAskRequest = z.infer<typeof RegisterPendingAskRequestSchema>;
|
|
85
|
+
export type RegisterPendingAskResponse = z.infer<typeof RegisterPendingAskResponseSchema>;
|
|
86
|
+
export type ResolvePendingAskRequest = z.infer<typeof ResolvePendingAskRequestSchema>;
|
|
87
|
+
export type ResolvePendingAskResponse = z.infer<typeof ResolvePendingAskResponseSchema>;
|
|
88
|
+
export type ListPendingAsksResponse = z.infer<typeof ListPendingAsksResponseSchema>;
|
package/src/platform-event.ts
CHANGED
|
@@ -51,7 +51,7 @@ import type {
|
|
|
51
51
|
import type { AuditMeter } from './audit-trail.js';
|
|
52
52
|
import type { ConversationVisibility } from './interaction.js';
|
|
53
53
|
import type { SystemRoles } from './project.js';
|
|
54
|
-
import type {
|
|
54
|
+
import type { ProcessDefinitionBody, ProcessRunType } from './store/index.js';
|
|
55
55
|
|
|
56
56
|
// Inferred from `./api-schemas/audit-trail.js`, which is where the schema sits: the audit trail is
|
|
57
57
|
// the only place the category is published, and the converter grouped it with the endpoints that
|
|
@@ -93,108 +93,6 @@ export interface PlatformEvent extends EventRef {
|
|
|
93
93
|
details?: Record<string, unknown>;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
/**
|
|
97
|
-
* Lifecycle actions published by the workflow completion interceptor. The names intentionally
|
|
98
|
-
* match the legacy notify_endpoints event_name values so migrated webhook subscribers receive
|
|
99
|
-
* byte-identical status/event_name fields.
|
|
100
|
-
*/
|
|
101
|
-
export type WorkflowLifecycleAction = 'workflow_completed' | 'workflow_failed';
|
|
102
|
-
|
|
103
|
-
export interface DocumentProcessingModelUsage {
|
|
104
|
-
role: 'extraction' | 'review';
|
|
105
|
-
run_id: string;
|
|
106
|
-
model?: string;
|
|
107
|
-
environment_id?: string;
|
|
108
|
-
provider?: string;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/** Compact, content-free operational summary emitted after grounded IDP completes. */
|
|
112
|
-
export interface DocumentProcessedEventData {
|
|
113
|
-
schema_version: 1;
|
|
114
|
-
pipeline: 'grounded_extraction';
|
|
115
|
-
object_id: string;
|
|
116
|
-
page_count: number;
|
|
117
|
-
ocr_page_count: number;
|
|
118
|
-
vision_page_count: number;
|
|
119
|
-
property_count: number;
|
|
120
|
-
citation_count: number;
|
|
121
|
-
verification: GroundedVerificationBreakdown;
|
|
122
|
-
result_path: string;
|
|
123
|
-
confidence?: number;
|
|
124
|
-
coverage_min?: number;
|
|
125
|
-
hardness?: number;
|
|
126
|
-
escalated?: boolean;
|
|
127
|
-
reviewed?: boolean;
|
|
128
|
-
review_issue_count?: number;
|
|
129
|
-
verdict?: 'good_to_go' | 'needs_review';
|
|
130
|
-
verdict_reason?: string;
|
|
131
|
-
models_used?: DocumentProcessingModelUsage[];
|
|
132
|
-
review_agent_run_id?: string;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Resource flavor of a workflow lifecycle event, derived from the Temporal workflow type:
|
|
137
|
-
* ExecuteConversationWorkflow -> agent_run, ExecuteProcessWorkflow -> process_run,
|
|
138
|
-
* document-scoped workflows may use content_object, and anything else -> workflow_run.
|
|
139
|
-
*/
|
|
140
|
-
export type WorkflowLifecycleResourceType = 'workflow_run' | 'agent_run' | 'process_run' | 'content_object';
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Body of POST /internal/events/publish (zeno-server, workload-identity gated). Sent by Temporal
|
|
144
|
-
* workers to publish a workflow lifecycle event to the event bus; the server fills event ids,
|
|
145
|
-
* tenant, timestamp and causality from caused_by.
|
|
146
|
-
*/
|
|
147
|
-
export interface PublishWorkflowLifecycleEventRequest {
|
|
148
|
-
account_id: string;
|
|
149
|
-
project_id: string;
|
|
150
|
-
action: WorkflowLifecycleAction;
|
|
151
|
-
resource_type: WorkflowLifecycleResourceType;
|
|
152
|
-
/** Domain resource the workflow acted on. Defaults to workflow_id for workflow-scoped events. */
|
|
153
|
-
resource_id?: string;
|
|
154
|
-
workflow_id: string;
|
|
155
|
-
workflow_run_id: string;
|
|
156
|
-
workflow_type: string;
|
|
157
|
-
/** Rule/subscription name that started the run (payload.wf_rule_name), used for filtering. */
|
|
158
|
-
workflow_rule_name?: string;
|
|
159
|
-
initiated_by?: string;
|
|
160
|
-
/** Workflow return value for completed runs. */
|
|
161
|
-
result?: unknown;
|
|
162
|
-
/** Error message for failed runs. */
|
|
163
|
-
error?: string;
|
|
164
|
-
/** EventRef of the event that started the workflow (payload.vars.event_ref), if any. */
|
|
165
|
-
caused_by?: EventRef;
|
|
166
|
-
/** Optional IDP outcome published as a separate, subscribable content event. */
|
|
167
|
-
document_processed?: DocumentProcessedEventData;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* A provider-neutral external work-item thread identity. The pair `(resource_type, resource_id)`
|
|
172
|
-
* derives a stable `eventThreadTag` (see `@dglabs/event-bus`), so all events of the same thread
|
|
173
|
-
* correlate to one agent run.
|
|
174
|
-
*/
|
|
175
|
-
export interface EventThreadRef {
|
|
176
|
-
resource_type: string;
|
|
177
|
-
resource_id: string;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Body of the internal, workload-identity-gated run-threads endpoint. Sent by a Temporal worker so an
|
|
182
|
-
* agent run can register additional external-thread identities on **itself** mid-run, so later events on
|
|
183
|
-
* those threads route to the same run. The server computes the thread tags from `(account, project,
|
|
184
|
-
* resource_type, resource_id)` and idempotently appends them to the run; the worker never supplies a raw
|
|
185
|
-
* tag.
|
|
186
|
-
*/
|
|
187
|
-
export interface AppendAgentRunThreadsRequest {
|
|
188
|
-
account_id: string;
|
|
189
|
-
project_id: string;
|
|
190
|
-
threads: EventThreadRef[];
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface AppendAgentRunThreadsResponse {
|
|
194
|
-
/** The thread tags that are now present on the run (the full event-thread tag set). */
|
|
195
|
-
thread_tags: string[];
|
|
196
|
-
}
|
|
197
|
-
|
|
198
96
|
export type EventSubscriptionFilter = z.infer<typeof EventSubscriptionFilterSchema>;
|
|
199
97
|
|
|
200
98
|
// --- Semantic conditions ---
|
|
@@ -270,16 +168,6 @@ export type EventDeliveryTargetInput =
|
|
|
270
168
|
| AgentEventDeliveryTarget
|
|
271
169
|
| ProcessEventDeliveryTarget;
|
|
272
170
|
|
|
273
|
-
export interface MatchedEventSubscriptionSnapshot {
|
|
274
|
-
subscription_id: string;
|
|
275
|
-
subscription_name: string;
|
|
276
|
-
target: EventDeliveryTarget;
|
|
277
|
-
priority: EventPriority;
|
|
278
|
-
run_as_role: SystemRoles;
|
|
279
|
-
/** Semantic condition carried from the subscription filter, evaluated at delivery time. */
|
|
280
|
-
semantic_condition?: EventSemanticCondition;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
171
|
export interface EventSubscription {
|
|
284
172
|
id: string;
|
|
285
173
|
name: string;
|
|
@@ -373,13 +261,13 @@ export interface EventDeliveryStreamUpdate {
|
|
|
373
261
|
item: EventDeliveryStreamItem;
|
|
374
262
|
}
|
|
375
263
|
|
|
376
|
-
|
|
264
|
+
interface EventDeliveryStreamHeartbeat {
|
|
377
265
|
type: 'heartbeat';
|
|
378
266
|
emitted_at: string;
|
|
379
267
|
cursor?: string;
|
|
380
268
|
}
|
|
381
269
|
|
|
382
|
-
|
|
270
|
+
interface EventDeliveryStreamError {
|
|
383
271
|
type: 'error';
|
|
384
272
|
emitted_at: string;
|
|
385
273
|
cursor?: string;
|
|
@@ -453,24 +341,6 @@ export type CancelEventDeliveryIntentsPayload = z.infer<typeof CancelEventDelive
|
|
|
453
341
|
|
|
454
342
|
export type CancelEventDeliveryIntentsResponse = z.infer<typeof CancelEventDeliveryIntentsResponseSchema>;
|
|
455
343
|
|
|
456
|
-
export interface PublishPlatformEventPayload {
|
|
457
|
-
event: PlatformEvent;
|
|
458
|
-
priority?: EventPriority;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export interface PublishPlatformEventResponse {
|
|
462
|
-
event_id: string;
|
|
463
|
-
outbox_id?: string;
|
|
464
|
-
status: EventOutboxStatus;
|
|
465
|
-
matched_subscription_count: number;
|
|
466
|
-
materialized_intent_count: number;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
export interface WorkflowEventInput<T = Record<string, unknown>> {
|
|
470
|
-
event_ref: EventRef;
|
|
471
|
-
payload: T;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
344
|
// --- External event ingest channels ---
|
|
475
345
|
// An ingest channel is a token-authenticated inbound endpoint that lets external systems publish
|
|
476
346
|
// events into the platform event bus. Ingested events get event_category 'external' and
|
|
@@ -493,26 +363,3 @@ export type CreateEventIngestChannelPayload = z.infer<typeof CreateEventIngestCh
|
|
|
493
363
|
export type UpdateEventIngestChannelPayload = z.infer<typeof UpdateEventIngestChannelPayloadSchema>;
|
|
494
364
|
|
|
495
365
|
export type EventIngestChannelMutationResponse = z.infer<typeof EventIngestChannelMutationResponseSchema>;
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* Body accepted by the public ingest webhook
|
|
499
|
-
* `POST /webhooks/events/:accountId/:projectId/:channelId`. All fields are optional: when omitted the
|
|
500
|
-
* channel transform / defaults are applied. The raw body is preserved under `event.details.payload`.
|
|
501
|
-
*/
|
|
502
|
-
export interface IngestExternalEventPayload {
|
|
503
|
-
action?: string;
|
|
504
|
-
resource_type?: string;
|
|
505
|
-
resource_id?: string;
|
|
506
|
-
/** Domain payload; defaults to the full raw body when omitted. */
|
|
507
|
-
payload?: Record<string, unknown>;
|
|
508
|
-
/** Extra fields merged into `event.details`. */
|
|
509
|
-
details?: Record<string, unknown>;
|
|
510
|
-
/** Deduplication key: the same key produces the same event id. */
|
|
511
|
-
idempotency_key?: string;
|
|
512
|
-
/** ISO 8601 event timestamp; defaults to ingest time. */
|
|
513
|
-
timestamp?: string;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
export interface IngestExternalEventResponse {
|
|
517
|
-
event_id: string;
|
|
518
|
-
}
|