@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/lib/oauth-scopes.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { Permission } from './access-control.js';
|
|
1
|
+
import { Permission } from './access-control-values.js';
|
|
2
2
|
export const OAUTH_SCOPE_OPENID = 'openid';
|
|
3
3
|
export const OAUTH_SCOPE_PROFILE = 'profile';
|
|
4
4
|
export const OAUTH_SCOPE_OFFLINE_ACCESS = 'offline_access';
|
|
5
5
|
export const OAUTH_SCOPE_PROJECT_SWITCH = 'project_switch';
|
|
6
6
|
export const OAUTH_STANDARD_SCOPES = [OAUTH_SCOPE_OPENID, OAUTH_SCOPE_PROFILE, OAUTH_SCOPE_OFFLINE_ACCESS];
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Permissions that are never grantable as an OAuth scope: they administer persistent credentials,
|
|
9
|
+
* hand out secret material, or are internal to the platform's own consoles.
|
|
10
|
+
*/
|
|
8
11
|
const NON_OAUTH_PERMISSION_SCOPES = new Set([
|
|
12
|
+
Permission.api_key_create,
|
|
13
|
+
Permission.api_key_update,
|
|
14
|
+
Permission.api_key_delete,
|
|
9
15
|
Permission.api_key_secret_read,
|
|
10
16
|
Permission.manage_billing,
|
|
11
17
|
Permission.billing_read,
|
|
@@ -13,54 +19,8 @@ const NON_OAUTH_PERMISSION_SCOPES = new Set([
|
|
|
13
19
|
Permission.studio_access,
|
|
14
20
|
]);
|
|
15
21
|
const OAUTH_PERMISSION_SCOPES = Object.values(Permission).filter((scope) => !NON_OAUTH_PERMISSION_SCOPES.has(scope));
|
|
16
|
-
|
|
17
|
-
const OAUTH_PLATFORM_SCOPE_SET = new Set(OAUTH_PLATFORM_SCOPES);
|
|
18
|
-
const OAUTH_PERMISSION_SCOPE_SET = new Set(OAUTH_PERMISSION_SCOPES);
|
|
19
|
-
const OBJECT_ID_PATTERN = /^[0-9a-f]{24}$/i;
|
|
20
|
-
const OAUTH_PROJECT_BINDING_SCOPE_PREFIX = 'project:';
|
|
22
|
+
/** The permissions a client may request as OAuth scopes. */
|
|
21
23
|
export function getOAuthPermissionScopes() {
|
|
22
24
|
return [...OAUTH_PERMISSION_SCOPES];
|
|
23
25
|
}
|
|
24
|
-
export function isOAuthStandardScope(scope) {
|
|
25
|
-
return OAUTH_STANDARD_SCOPE_SET.has(scope);
|
|
26
|
-
}
|
|
27
|
-
export function isOAuthPlatformScope(scope) {
|
|
28
|
-
return OAUTH_PLATFORM_SCOPE_SET.has(scope);
|
|
29
|
-
}
|
|
30
|
-
export function isOAuthPermissionScope(scope) {
|
|
31
|
-
return OAUTH_PERMISSION_SCOPE_SET.has(scope);
|
|
32
|
-
}
|
|
33
|
-
export function isOAuthSupportedScope(scope) {
|
|
34
|
-
return isOAuthStandardScope(scope) || isOAuthPlatformScope(scope) || isOAuthPermissionScope(scope);
|
|
35
|
-
}
|
|
36
|
-
export function isOAuthProjectBindingScope(scope) {
|
|
37
|
-
if (!scope.startsWith(OAUTH_PROJECT_BINDING_SCOPE_PREFIX)) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
return OBJECT_ID_PATTERN.test(scope.slice(OAUTH_PROJECT_BINDING_SCOPE_PREFIX.length));
|
|
41
|
-
}
|
|
42
|
-
export function createOAuthProjectBindingScope(projectId) {
|
|
43
|
-
return `${OAUTH_PROJECT_BINDING_SCOPE_PREFIX}${projectId}`;
|
|
44
|
-
}
|
|
45
|
-
export function hasOAuthOpenIdScope(scopes) {
|
|
46
|
-
return scopes.includes(OAUTH_SCOPE_OPENID);
|
|
47
|
-
}
|
|
48
|
-
export function hasOAuthProfileScope(scopes) {
|
|
49
|
-
return scopes.includes(OAUTH_SCOPE_PROFILE);
|
|
50
|
-
}
|
|
51
|
-
export function hasOAuthOfflineAccessScope(scopes) {
|
|
52
|
-
return scopes.includes(OAUTH_SCOPE_OFFLINE_ACCESS);
|
|
53
|
-
}
|
|
54
|
-
export function hasOAuthProjectSwitchScope(scopes) {
|
|
55
|
-
return scopes.includes(OAUTH_SCOPE_PROJECT_SWITCH);
|
|
56
|
-
}
|
|
57
|
-
export function getOAuthScopesWithProfileDependency(scopes) {
|
|
58
|
-
if (!hasOAuthOpenIdScope(scopes)) {
|
|
59
|
-
return scopes.filter((scope) => scope !== OAUTH_SCOPE_PROFILE);
|
|
60
|
-
}
|
|
61
|
-
return [...scopes];
|
|
62
|
-
}
|
|
63
|
-
export function extractOAuthPermissionScopes(scopes) {
|
|
64
|
-
return scopes.filter(isOAuthPermissionScope);
|
|
65
|
-
}
|
|
66
26
|
//# sourceMappingURL=oauth-scopes.js.map
|
package/lib/oauth-scopes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-scopes.js","sourceRoot":"","sources":["../src/oauth-scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"oauth-scopes.js","sourceRoot":"","sources":["../src/oauth-scopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAC7C,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAC3D,MAAM,CAAC,MAAM,0BAA0B,GAAG,gBAAgB,CAAC;AAE3D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,0BAA0B,CAAU,CAAC;AAEpH;;;GAGG;AACH,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAa;IACpD,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,mBAAmB;IAC9B,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,YAAY;IACvB,UAAU,CAAC,eAAe;IAC1B,UAAU,CAAC,aAAa;CAC3B,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,2BAA2B,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAErH,4DAA4D;AAC5D,MAAM,UAAU,wBAAwB;IACpC,OAAO,CAAC,GAAG,uBAAuB,CAAC,CAAC;AACxC,CAAC"}
|
package/lib/oauth-server.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { BulkRevokeOAuthGrantsPayloadSchema, CreateOAuthClientPayloadSchema, ListOAuthGrantsQuerySchema, OAuthClientCreateResponseSchema, OAuthClientDataSchema, OAuthClientSchema, OAuthClientScopeMetadataSchema, OAuthClientStatusSchema, OAuthClientTypeSchema, OAuthGrantListResponseSchema, OAuthGrantRevokeResponseSchema, OAuthGrantSchema, OAuthGrantSortFieldSchema, OAuthGrantSortOrderSchema, OAuthGrantStatusSchema, OAuthGrantTypeSchema, OAuthProjectBindingModeSchema, OAuthRegistrationSourceSchema, OAuthResponseTypeSchema, OAuthTokenEndpointAuthMethodSchema, RevokeOAuthGrantQuerySchema, UpdateOAuthClientPayloadSchema } from './api-schemas/oauth-server.js';
|
|
3
|
-
import type { AuthTokenPayload, PrincipalType } from './apikey.js';
|
|
4
|
-
import type { ProjectRef } from './project.js';
|
|
2
|
+
import type { ApproveOAuthAuthorizationRequestPayloadSchema, BulkRevokeOAuthGrantsPayloadSchema, CreateOAuthAuthorizationRequestPayloadSchema, CreateOAuthClientPayloadSchema, ListOAuthGrantsQuerySchema, OAuthAuthorizationDecisionResponseSchema, OAuthAuthorizationRequestSchema, OAuthAuthorizationRequestStatusSchema, OAuthAuthorizationServerMetadataSchema, OAuthAuthorizeQuerySchema, OAuthClientCreateResponseSchema, OAuthClientDataSchema, OAuthClientDisplayMetadataSchema, OAuthClientRegistrationModeSchema, OAuthClientSchema, OAuthClientScopeMetadataSchema, OAuthClientStatusSchema, OAuthClientTypeSchema, OAuthDeviceAuthorizationRequestSchema, OAuthDeviceAuthorizationResponseSchema, OAuthGrantableScopesResponseSchema, OAuthGrantListResponseSchema, OAuthGrantRevokeResponseSchema, OAuthGrantSchema, OAuthGrantSortFieldSchema, OAuthGrantSortOrderSchema, OAuthGrantStatusSchema, OAuthGrantTypeSchema, OAuthProjectBindingModeSchema, OAuthRegistrationSourceSchema, OAuthResponseTypeSchema, OAuthTokenEndpointAuthMethodSchema, OAuthTokenResponseSchema, RevokeOAuthGrantQuerySchema, UpdateOAuthClientPayloadSchema } from './api-schemas/oauth-server.js';
|
|
5
3
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* are built from. The rest of this module is the token server's own OAuth surface, still declared
|
|
9
|
-
* here and still TypeScript-derived; it converts with that service's own slots.
|
|
4
|
+
* These public OAuth wire types are inferred from `./api-schemas/oauth-server.js` — the same
|
|
5
|
+
* contracts used for runtime parsing and OpenAPI components.
|
|
10
6
|
*/
|
|
11
7
|
export type OAuthClientType = z.infer<typeof OAuthClientTypeSchema>;
|
|
12
8
|
export type OAuthClientStatus = z.infer<typeof OAuthClientStatusSchema>;
|
|
@@ -15,14 +11,8 @@ export type OAuthProjectBindingMode = z.infer<typeof OAuthProjectBindingModeSche
|
|
|
15
11
|
export type OAuthTokenEndpointAuthMethod = z.infer<typeof OAuthTokenEndpointAuthMethodSchema>;
|
|
16
12
|
export type OAuthGrantType = z.infer<typeof OAuthGrantTypeSchema>;
|
|
17
13
|
export type OAuthResponseType = z.infer<typeof OAuthResponseTypeSchema>;
|
|
18
|
-
export type OAuthAuthorizationRequestStatus =
|
|
19
|
-
export type OAuthClientRegistrationMode =
|
|
20
|
-
/**
|
|
21
|
-
* How Vertesia identified itself to a *remote* authorization server when connecting
|
|
22
|
-
* out as an OAuth client. Distinct from {@link OAuthClientRegistrationMode}, which
|
|
23
|
-
* describes how inbound clients identified themselves to Vertesia's own AS.
|
|
24
|
-
*/
|
|
25
|
-
export type RemoteOAuthRegistrationMode = 'dynamic_client_registration' | 'client_id_metadata_document';
|
|
14
|
+
export type OAuthAuthorizationRequestStatus = z.infer<typeof OAuthAuthorizationRequestStatusSchema>;
|
|
15
|
+
export type OAuthClientRegistrationMode = z.infer<typeof OAuthClientRegistrationModeSchema>;
|
|
26
16
|
export type OAuthGrantStatus = z.infer<typeof OAuthGrantStatusSchema>;
|
|
27
17
|
export type OAuthGrantSortField = z.infer<typeof OAuthGrantSortFieldSchema>;
|
|
28
18
|
export type OAuthGrantSortOrder = z.infer<typeof OAuthGrantSortOrderSchema>;
|
|
@@ -41,184 +31,15 @@ export type BulkRevokeOAuthGrantsPayload = z.infer<typeof BulkRevokeOAuthGrantsP
|
|
|
41
31
|
export type OAuthGrantRevokeResponse = z.infer<typeof OAuthGrantRevokeResponseSchema>;
|
|
42
32
|
export type CreateOAuthClientPayload = z.infer<typeof CreateOAuthClientPayloadSchema>;
|
|
43
33
|
export type UpdateOAuthClientPayload = z.infer<typeof UpdateOAuthClientPayloadSchema>;
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
scopes_supported: string[];
|
|
56
|
-
client_id_metadata_document_supported?: boolean;
|
|
57
|
-
device_authorization_endpoint?: string;
|
|
58
|
-
}
|
|
59
|
-
export interface OAuthClientMetadataDocument {
|
|
60
|
-
client_id: string;
|
|
61
|
-
client_name: string;
|
|
62
|
-
redirect_uris: string[];
|
|
63
|
-
grant_types?: OAuthGrantType[];
|
|
64
|
-
response_types?: OAuthResponseType[];
|
|
65
|
-
token_endpoint_auth_method?: OAuthTokenEndpointAuthMethod;
|
|
66
|
-
scope?: string;
|
|
67
|
-
client_uri?: string;
|
|
68
|
-
logo_uri?: string;
|
|
69
|
-
tos_uri?: string;
|
|
70
|
-
policy_uri?: string;
|
|
71
|
-
}
|
|
72
|
-
export interface OAuthClientDisplayMetadata {
|
|
73
|
-
client_uri?: string;
|
|
74
|
-
logo_uri?: string;
|
|
75
|
-
tos_uri?: string;
|
|
76
|
-
policy_uri?: string;
|
|
77
|
-
}
|
|
78
|
-
export interface OAuthAuthorizeQuery {
|
|
79
|
-
response_type: 'code';
|
|
80
|
-
client_id: string;
|
|
81
|
-
redirect_uri: string;
|
|
82
|
-
resource?: string;
|
|
83
|
-
scope?: string;
|
|
84
|
-
state?: string;
|
|
85
|
-
code_challenge: string;
|
|
86
|
-
code_challenge_method: 'S256';
|
|
87
|
-
project_id?: string;
|
|
88
|
-
}
|
|
89
|
-
export interface CreateOAuthAuthorizationRequestPayload extends OAuthAuthorizeQuery {
|
|
90
|
-
}
|
|
91
|
-
export interface OAuthAuthorizationRequest {
|
|
92
|
-
request_id: string;
|
|
93
|
-
client_id: string;
|
|
94
|
-
client_name: string;
|
|
95
|
-
client_metadata?: OAuthClientDisplayMetadata;
|
|
96
|
-
client_registration_mode?: OAuthClientRegistrationMode;
|
|
97
|
-
redirect_uri: string;
|
|
98
|
-
redirect_origin: string;
|
|
99
|
-
resource?: string;
|
|
100
|
-
requested_scopes: string[];
|
|
101
|
-
optional_scopes?: string[];
|
|
102
|
-
requested_project_id?: string;
|
|
103
|
-
project_binding_mode: OAuthProjectBindingMode;
|
|
104
|
-
fixed_project_id?: string;
|
|
105
|
-
/**
|
|
106
|
-
* When true, the consent UI must constrain project selection to {@link owner_account_id}: the
|
|
107
|
-
* client may only be authorized for projects in its owning account. False (default) lets the user
|
|
108
|
-
* authorize any project they can access. Mirrors the server-side authorization enforcement.
|
|
109
|
-
*/
|
|
110
|
-
restrict_to_owner_account?: boolean;
|
|
111
|
-
/** The owning account the client is restricted to, when {@link restrict_to_owner_account} is true. */
|
|
112
|
-
owner_account_id?: string;
|
|
113
|
-
status: OAuthAuthorizationRequestStatus;
|
|
114
|
-
created_at: string;
|
|
115
|
-
expires_at: string;
|
|
116
|
-
}
|
|
117
|
-
export interface ApproveOAuthAuthorizationRequestPayload {
|
|
118
|
-
project_id?: string;
|
|
119
|
-
granted_scopes: string[];
|
|
120
|
-
}
|
|
121
|
-
export interface OAuthGrantableScopesResponse {
|
|
122
|
-
project_id: string;
|
|
123
|
-
requested_permission_scopes: string[];
|
|
124
|
-
grantable_permission_scopes: string[];
|
|
125
|
-
unavailable_permission_scopes: string[];
|
|
126
|
-
}
|
|
127
|
-
export interface OAuthAuthorizationDecisionResponse {
|
|
128
|
-
redirect_url: string;
|
|
129
|
-
}
|
|
130
|
-
export interface OAuthDeviceAuthorizationRequest {
|
|
131
|
-
client_id: string;
|
|
132
|
-
resource?: string;
|
|
133
|
-
scope?: string;
|
|
134
|
-
project_id?: string;
|
|
135
|
-
}
|
|
136
|
-
export interface OAuthDeviceAuthorizationResponse {
|
|
137
|
-
device_code: string;
|
|
138
|
-
user_code: string;
|
|
139
|
-
verification_uri: string;
|
|
140
|
-
verification_uri_complete: string;
|
|
141
|
-
expires_in: number;
|
|
142
|
-
interval: number;
|
|
143
|
-
}
|
|
144
|
-
export interface OAuthTokenRequestAuthorizationCode {
|
|
145
|
-
grant_type: 'authorization_code';
|
|
146
|
-
code: string;
|
|
147
|
-
redirect_uri: string;
|
|
148
|
-
client_id: string;
|
|
149
|
-
resource?: string;
|
|
150
|
-
code_verifier: string;
|
|
151
|
-
client_secret?: string;
|
|
152
|
-
}
|
|
153
|
-
export interface OAuthTokenRequestRefreshToken {
|
|
154
|
-
grant_type: 'refresh_token';
|
|
155
|
-
refresh_token: string;
|
|
156
|
-
client_id: string;
|
|
157
|
-
resource?: string;
|
|
158
|
-
project_id?: string;
|
|
159
|
-
client_secret?: string;
|
|
160
|
-
}
|
|
161
|
-
export interface OAuthTokenRequestDeviceCode {
|
|
162
|
-
grant_type: 'urn:ietf:params:oauth:grant-type:device_code';
|
|
163
|
-
device_code: string;
|
|
164
|
-
client_id: string;
|
|
165
|
-
client_secret?: string;
|
|
166
|
-
}
|
|
167
|
-
export type OAuthTokenRequest = OAuthTokenRequestAuthorizationCode | OAuthTokenRequestRefreshToken | OAuthTokenRequestDeviceCode;
|
|
168
|
-
export interface OAuthTokenResponse {
|
|
169
|
-
access_token: string;
|
|
170
|
-
token_type: 'Bearer';
|
|
171
|
-
expires_in: number;
|
|
172
|
-
scope: string;
|
|
173
|
-
refresh_token?: string;
|
|
174
|
-
id_token?: string;
|
|
175
|
-
}
|
|
176
|
-
export interface OAuthAuthorizationCodeRecord {
|
|
177
|
-
code: string;
|
|
178
|
-
client_id: string;
|
|
179
|
-
user_id: string;
|
|
180
|
-
account_id: string;
|
|
181
|
-
project_id: string;
|
|
182
|
-
resource: string;
|
|
183
|
-
scope: string[];
|
|
184
|
-
redirect_uri: string;
|
|
185
|
-
code_challenge: string;
|
|
186
|
-
code_challenge_method: 'S256';
|
|
187
|
-
expires_at: string;
|
|
188
|
-
}
|
|
189
|
-
export interface OAuthConsentRecord {
|
|
190
|
-
user_id: string;
|
|
191
|
-
client_id: string;
|
|
192
|
-
account_id: string;
|
|
193
|
-
project_id: string;
|
|
194
|
-
scope: string[];
|
|
195
|
-
granted_at: string;
|
|
196
|
-
revoked_at?: string;
|
|
197
|
-
}
|
|
198
|
-
export interface OAuthAccessTokenPayload extends Omit<AuthTokenPayload, 'type' | 'project'> {
|
|
199
|
-
type: PrincipalType.OAuthAccess;
|
|
200
|
-
client_id: string;
|
|
201
|
-
scope: string;
|
|
202
|
-
user_id: string;
|
|
203
|
-
project: ProjectRef;
|
|
204
|
-
allowed_collections?: string[];
|
|
205
|
-
resource?: string;
|
|
206
|
-
}
|
|
207
|
-
export interface OAuthIdTokenPayload {
|
|
208
|
-
sub: string;
|
|
209
|
-
user_id: string;
|
|
210
|
-
name?: string;
|
|
211
|
-
email?: string;
|
|
212
|
-
picture?: string;
|
|
213
|
-
type: 'oauth_id';
|
|
214
|
-
client_id: string;
|
|
215
|
-
account?: AuthTokenPayload['account'];
|
|
216
|
-
accounts?: AuthTokenPayload['accounts'];
|
|
217
|
-
project?: ProjectRef;
|
|
218
|
-
/** User groups */
|
|
219
|
-
groups?: AuthTokenPayload['groups'];
|
|
220
|
-
iss: string;
|
|
221
|
-
aud: string;
|
|
222
|
-
exp: number;
|
|
223
|
-
}
|
|
34
|
+
export type OAuthAuthorizationServerMetadata = z.infer<typeof OAuthAuthorizationServerMetadataSchema>;
|
|
35
|
+
export type OAuthClientDisplayMetadata = z.infer<typeof OAuthClientDisplayMetadataSchema>;
|
|
36
|
+
export type OAuthAuthorizeQuery = z.infer<typeof OAuthAuthorizeQuerySchema>;
|
|
37
|
+
export type CreateOAuthAuthorizationRequestPayload = z.infer<typeof CreateOAuthAuthorizationRequestPayloadSchema>;
|
|
38
|
+
export type OAuthAuthorizationRequest = z.infer<typeof OAuthAuthorizationRequestSchema>;
|
|
39
|
+
export type ApproveOAuthAuthorizationRequestPayload = z.infer<typeof ApproveOAuthAuthorizationRequestPayloadSchema>;
|
|
40
|
+
export type OAuthGrantableScopesResponse = z.infer<typeof OAuthGrantableScopesResponseSchema>;
|
|
41
|
+
export type OAuthAuthorizationDecisionResponse = z.infer<typeof OAuthAuthorizationDecisionResponseSchema>;
|
|
42
|
+
export type OAuthDeviceAuthorizationRequest = z.infer<typeof OAuthDeviceAuthorizationRequestSchema>;
|
|
43
|
+
export type OAuthDeviceAuthorizationResponse = z.infer<typeof OAuthDeviceAuthorizationResponseSchema>;
|
|
44
|
+
export type OAuthTokenResponse = z.infer<typeof OAuthTokenResponseSchema>;
|
|
224
45
|
//# sourceMappingURL=oauth-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-server.d.ts","sourceRoot":"","sources":["../src/oauth-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACR,kCAAkC,EAClC,8BAA8B,EAC9B,0BAA0B,EAC1B,+BAA+B,EAC/B,qBAAqB,EACrB,iBAAiB,EACjB,8BAA8B,EAC9B,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAC5B,8BAA8B,EAC9B,gBAAgB,EAChB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,6BAA6B,EAC7B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MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/lib/payload.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { FacetSpec } from './facets.js';
|
|
|
6
6
|
import type { InteractionSearchQuery, ObjectSearchQuery, ObjectTypeSearchQuery, PromptSearchQuery, SimpleSearchQuery } from './query.js';
|
|
7
7
|
export type SortOrder = z.infer<typeof SortOrderSchema>;
|
|
8
8
|
export type SortOption = z.infer<typeof SortOptionSchema>;
|
|
9
|
-
|
|
9
|
+
interface SearchPayload {
|
|
10
10
|
facets?: FacetSpec[];
|
|
11
11
|
/**
|
|
12
12
|
* If the facets should be limited to the current page of results.
|
|
@@ -24,10 +24,6 @@ export interface SearchPayload {
|
|
|
24
24
|
/** Arbitrary Elasticsearch aggregation definitions. Ignored when search falls back to MongoDB. */
|
|
25
25
|
aggs?: Record<string, unknown>;
|
|
26
26
|
}
|
|
27
|
-
export interface ComputeFacetPayload {
|
|
28
|
-
facets: FacetSpec[];
|
|
29
|
-
query?: SimpleSearchQuery;
|
|
30
|
-
}
|
|
31
27
|
export interface InteractionSearchPayload extends SearchPayload {
|
|
32
28
|
query?: InteractionSearchQuery;
|
|
33
29
|
}
|
|
@@ -48,4 +44,5 @@ export type ComputePromptFacetPayload = z.infer<typeof ComputePromptFacetPayload
|
|
|
48
44
|
export type ComputeRunFacetPayload = z.infer<typeof ComputeRunFacetPayloadSchema>;
|
|
49
45
|
export type ExportPropertiesPayload = z.infer<typeof ExportPropertiesPayloadSchema>;
|
|
50
46
|
export type ExportPropertiesResponse = z.infer<typeof ExportPropertiesResponseSchema>;
|
|
47
|
+
export {};
|
|
51
48
|
//# sourceMappingURL=payload.d.ts.map
|
package/lib/payload.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../src/payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,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GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
package/lib/pending-asks.d.ts
CHANGED
|
@@ -2,49 +2,18 @@
|
|
|
2
2
|
* Types for tracking pending ask_user requests and webhook notifications.
|
|
3
3
|
* Used to notify external systems when agents are waiting for user input.
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { z } from 'zod';
|
|
6
|
+
import type { ListPendingAsksResponseSchema, PendingAskDataSchema, PendingAskStatusSchema, RegisterPendingAskRequestSchema, RegisterPendingAskResponseSchema, ResolvePendingAskRequestSchema, ResolvePendingAskResponseSchema } from './api-schemas/agent-communication.js';
|
|
7
7
|
/**
|
|
8
8
|
* Status of a pending ask request.
|
|
9
9
|
*/
|
|
10
|
-
export type PendingAskStatus =
|
|
10
|
+
export type PendingAskStatus = z.infer<typeof PendingAskStatusSchema>;
|
|
11
11
|
/**
|
|
12
12
|
* Data stored in Redis for pending ask_user requests.
|
|
13
13
|
* Tracks which agents are waiting for user input and enables
|
|
14
14
|
* both webhook notifications and portal views.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
17
|
-
/** Unique identifier for this ask (10-char alphanumeric) */
|
|
18
|
-
askId: string;
|
|
19
|
-
/** Temporal workflow run ID */
|
|
20
|
-
runId: string;
|
|
21
|
-
/** Temporal workflow ID */
|
|
22
|
-
workflowId: string;
|
|
23
|
-
/** Project ID */
|
|
24
|
-
projectId: string;
|
|
25
|
-
/** Account ID */
|
|
26
|
-
accountId: string;
|
|
27
|
-
/** Name of the agent/interaction that asked */
|
|
28
|
-
agentName: string;
|
|
29
|
-
/** Questions asked by the agent */
|
|
30
|
-
questions: string[];
|
|
31
|
-
/** Timeout in hours (default 48) */
|
|
32
|
-
timeoutHours: number;
|
|
33
|
-
/** Communication channels configured for the conversation */
|
|
34
|
-
userChannels: UserChannel[];
|
|
35
|
-
/** Timestamp when the ask was created (ms since epoch) */
|
|
36
|
-
createdAt: number;
|
|
37
|
-
/** Timestamp when the ask expires (ms since epoch) */
|
|
38
|
-
expiresAt: number;
|
|
39
|
-
/** Current status of the ask */
|
|
40
|
-
status: PendingAskStatus;
|
|
41
|
-
/** Durable task created for this ask_user request. */
|
|
42
|
-
taskId?: string;
|
|
43
|
-
/** Timestamp when resolved (ms since epoch) */
|
|
44
|
-
resolvedAt?: number;
|
|
45
|
-
/** User's response (after resolution) */
|
|
46
|
-
response?: string;
|
|
47
|
-
}
|
|
16
|
+
export type PendingAskData = z.infer<typeof PendingAskDataSchema>;
|
|
48
17
|
/**
|
|
49
18
|
* Event types for ask_user webhooks.
|
|
50
19
|
*/
|
|
@@ -91,10 +60,9 @@ export interface AskUserWebhookEvent {
|
|
|
91
60
|
/**
|
|
92
61
|
* Response from listing pending asks.
|
|
93
62
|
*/
|
|
94
|
-
export
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
}
|
|
63
|
+
export type RegisterPendingAskRequest = z.infer<typeof RegisterPendingAskRequestSchema>;
|
|
64
|
+
export type RegisterPendingAskResponse = z.infer<typeof RegisterPendingAskResponseSchema>;
|
|
65
|
+
export type ResolvePendingAskRequest = z.infer<typeof ResolvePendingAskRequestSchema>;
|
|
66
|
+
export type ResolvePendingAskResponse = z.infer<typeof ResolvePendingAskResponseSchema>;
|
|
67
|
+
export type ListPendingAsksResponse = z.infer<typeof ListPendingAsksResponseSchema>;
|
|
100
68
|
//# sourceMappingURL=pending-asks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending-asks.d.ts","sourceRoot":"","sources":["../src/pending-asks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"pending-asks.d.ts","sourceRoot":"","sources":["../src/pending-asks.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACR,6BAA6B,EAC7B,oBAAoB,EACpB,sBAAsB,EACtB,+BAA+B,EAC/B,gCAAgC,EAChC,8BAA8B,EAC9B,+BAA+B,EAClC,MAAM,sCAAsC,CAAC;AAI9C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAIlE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,oBAAoB,GAAG,mBAAmB,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,OAAO,GAAG,aAAa,CAAC;IAC9B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC,iBAAiB;IACjB,KAAK,EAAE,uBAAuB,CAAC;IAC/B,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,uCAAuC;IACvC,YAAY,EAAE,kBAAkB,EAAE,CAAC;IACnC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAID;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
package/lib/platform-event.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { AgentDeliveryMatchModeSchema, AgentEventDeliveryTargetSchema, Agen
|
|
|
5
5
|
import type { AuditMeter } from './audit-trail.js';
|
|
6
6
|
import type { ConversationVisibility } from './interaction.js';
|
|
7
7
|
import type { SystemRoles } from './project.js';
|
|
8
|
-
import type {
|
|
8
|
+
import type { ProcessDefinitionBody, ProcessRunType } from './store/index.js';
|
|
9
9
|
export type EventCategory = z.infer<typeof EventCategorySchema>;
|
|
10
10
|
export type EventPriority = z.infer<typeof EventPrioritySchema>;
|
|
11
11
|
export type WebhookSigningMode = z.infer<typeof WebhookSigningModeSchema>;
|
|
@@ -35,100 +35,6 @@ export interface PlatformEvent extends EventRef {
|
|
|
35
35
|
resource_version?: string;
|
|
36
36
|
details?: Record<string, unknown>;
|
|
37
37
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Lifecycle actions published by the workflow completion interceptor. The names intentionally
|
|
40
|
-
* match the legacy notify_endpoints event_name values so migrated webhook subscribers receive
|
|
41
|
-
* byte-identical status/event_name fields.
|
|
42
|
-
*/
|
|
43
|
-
export type WorkflowLifecycleAction = 'workflow_completed' | 'workflow_failed';
|
|
44
|
-
export interface DocumentProcessingModelUsage {
|
|
45
|
-
role: 'extraction' | 'review';
|
|
46
|
-
run_id: string;
|
|
47
|
-
model?: string;
|
|
48
|
-
environment_id?: string;
|
|
49
|
-
provider?: string;
|
|
50
|
-
}
|
|
51
|
-
/** Compact, content-free operational summary emitted after grounded IDP completes. */
|
|
52
|
-
export interface DocumentProcessedEventData {
|
|
53
|
-
schema_version: 1;
|
|
54
|
-
pipeline: 'grounded_extraction';
|
|
55
|
-
object_id: string;
|
|
56
|
-
page_count: number;
|
|
57
|
-
ocr_page_count: number;
|
|
58
|
-
vision_page_count: number;
|
|
59
|
-
property_count: number;
|
|
60
|
-
citation_count: number;
|
|
61
|
-
verification: GroundedVerificationBreakdown;
|
|
62
|
-
result_path: string;
|
|
63
|
-
confidence?: number;
|
|
64
|
-
coverage_min?: number;
|
|
65
|
-
hardness?: number;
|
|
66
|
-
escalated?: boolean;
|
|
67
|
-
reviewed?: boolean;
|
|
68
|
-
review_issue_count?: number;
|
|
69
|
-
verdict?: 'good_to_go' | 'needs_review';
|
|
70
|
-
verdict_reason?: string;
|
|
71
|
-
models_used?: DocumentProcessingModelUsage[];
|
|
72
|
-
review_agent_run_id?: string;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Resource flavor of a workflow lifecycle event, derived from the Temporal workflow type:
|
|
76
|
-
* ExecuteConversationWorkflow -> agent_run, ExecuteProcessWorkflow -> process_run,
|
|
77
|
-
* document-scoped workflows may use content_object, and anything else -> workflow_run.
|
|
78
|
-
*/
|
|
79
|
-
export type WorkflowLifecycleResourceType = 'workflow_run' | 'agent_run' | 'process_run' | 'content_object';
|
|
80
|
-
/**
|
|
81
|
-
* Body of POST /internal/events/publish (zeno-server, workload-identity gated). Sent by Temporal
|
|
82
|
-
* workers to publish a workflow lifecycle event to the event bus; the server fills event ids,
|
|
83
|
-
* tenant, timestamp and causality from caused_by.
|
|
84
|
-
*/
|
|
85
|
-
export interface PublishWorkflowLifecycleEventRequest {
|
|
86
|
-
account_id: string;
|
|
87
|
-
project_id: string;
|
|
88
|
-
action: WorkflowLifecycleAction;
|
|
89
|
-
resource_type: WorkflowLifecycleResourceType;
|
|
90
|
-
/** Domain resource the workflow acted on. Defaults to workflow_id for workflow-scoped events. */
|
|
91
|
-
resource_id?: string;
|
|
92
|
-
workflow_id: string;
|
|
93
|
-
workflow_run_id: string;
|
|
94
|
-
workflow_type: string;
|
|
95
|
-
/** Rule/subscription name that started the run (payload.wf_rule_name), used for filtering. */
|
|
96
|
-
workflow_rule_name?: string;
|
|
97
|
-
initiated_by?: string;
|
|
98
|
-
/** Workflow return value for completed runs. */
|
|
99
|
-
result?: unknown;
|
|
100
|
-
/** Error message for failed runs. */
|
|
101
|
-
error?: string;
|
|
102
|
-
/** EventRef of the event that started the workflow (payload.vars.event_ref), if any. */
|
|
103
|
-
caused_by?: EventRef;
|
|
104
|
-
/** Optional IDP outcome published as a separate, subscribable content event. */
|
|
105
|
-
document_processed?: DocumentProcessedEventData;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* A provider-neutral external work-item thread identity. The pair `(resource_type, resource_id)`
|
|
109
|
-
* derives a stable `eventThreadTag` (see `@dglabs/event-bus`), so all events of the same thread
|
|
110
|
-
* correlate to one agent run.
|
|
111
|
-
*/
|
|
112
|
-
export interface EventThreadRef {
|
|
113
|
-
resource_type: string;
|
|
114
|
-
resource_id: string;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Body of the internal, workload-identity-gated run-threads endpoint. Sent by a Temporal worker so an
|
|
118
|
-
* agent run can register additional external-thread identities on **itself** mid-run, so later events on
|
|
119
|
-
* those threads route to the same run. The server computes the thread tags from `(account, project,
|
|
120
|
-
* resource_type, resource_id)` and idempotently appends them to the run; the worker never supplies a raw
|
|
121
|
-
* tag.
|
|
122
|
-
*/
|
|
123
|
-
export interface AppendAgentRunThreadsRequest {
|
|
124
|
-
account_id: string;
|
|
125
|
-
project_id: string;
|
|
126
|
-
threads: EventThreadRef[];
|
|
127
|
-
}
|
|
128
|
-
export interface AppendAgentRunThreadsResponse {
|
|
129
|
-
/** The thread tags that are now present on the run (the full event-thread tag set). */
|
|
130
|
-
thread_tags: string[];
|
|
131
|
-
}
|
|
132
38
|
export type EventSubscriptionFilter = z.infer<typeof EventSubscriptionFilterSchema>;
|
|
133
39
|
export type SemanticConditionMode = z.infer<typeof SemanticConditionModeSchema>;
|
|
134
40
|
export type SemanticConditionOnError = z.infer<typeof SemanticConditionOnErrorSchema>;
|
|
@@ -164,15 +70,6 @@ export type WorkflowEventDeliveryTargetInput = z.infer<typeof WorkflowEventDeliv
|
|
|
164
70
|
export type WebhookEventDeliveryTargetInput = z.infer<typeof WebhookEventDeliveryTargetInputSchema>;
|
|
165
71
|
export type AppEventDeliveryTargetInput = z.infer<typeof AppEventDeliveryTargetInputSchema>;
|
|
166
72
|
export type EventDeliveryTargetInput = WorkflowEventDeliveryTargetInput | WebhookEventDeliveryTargetInput | AppEventDeliveryTargetInput | AgentEventDeliveryTarget | ProcessEventDeliveryTarget;
|
|
167
|
-
export interface MatchedEventSubscriptionSnapshot {
|
|
168
|
-
subscription_id: string;
|
|
169
|
-
subscription_name: string;
|
|
170
|
-
target: EventDeliveryTarget;
|
|
171
|
-
priority: EventPriority;
|
|
172
|
-
run_as_role: SystemRoles;
|
|
173
|
-
/** Semantic condition carried from the subscription filter, evaluated at delivery time. */
|
|
174
|
-
semantic_condition?: EventSemanticCondition;
|
|
175
|
-
}
|
|
176
73
|
export interface EventSubscription {
|
|
177
74
|
id: string;
|
|
178
75
|
name: string;
|
|
@@ -252,12 +149,12 @@ export interface EventDeliveryStreamUpdate {
|
|
|
252
149
|
cursor: string;
|
|
253
150
|
item: EventDeliveryStreamItem;
|
|
254
151
|
}
|
|
255
|
-
|
|
152
|
+
interface EventDeliveryStreamHeartbeat {
|
|
256
153
|
type: 'heartbeat';
|
|
257
154
|
emitted_at: string;
|
|
258
155
|
cursor?: string;
|
|
259
156
|
}
|
|
260
|
-
|
|
157
|
+
interface EventDeliveryStreamError {
|
|
261
158
|
type: 'error';
|
|
262
159
|
emitted_at: string;
|
|
263
160
|
cursor?: string;
|
|
@@ -308,21 +205,6 @@ export type EventDeliveryQueueSubscriptionSummary = z.infer<typeof EventDelivery
|
|
|
308
205
|
export type EventDeliveryQueueSummaryResponse = z.infer<typeof EventDeliveryQueueSummaryResponseSchema>;
|
|
309
206
|
export type CancelEventDeliveryIntentsPayload = z.infer<typeof CancelEventDeliveryIntentsPayloadSchema>;
|
|
310
207
|
export type CancelEventDeliveryIntentsResponse = z.infer<typeof CancelEventDeliveryIntentsResponseSchema>;
|
|
311
|
-
export interface PublishPlatformEventPayload {
|
|
312
|
-
event: PlatformEvent;
|
|
313
|
-
priority?: EventPriority;
|
|
314
|
-
}
|
|
315
|
-
export interface PublishPlatformEventResponse {
|
|
316
|
-
event_id: string;
|
|
317
|
-
outbox_id?: string;
|
|
318
|
-
status: EventOutboxStatus;
|
|
319
|
-
matched_subscription_count: number;
|
|
320
|
-
materialized_intent_count: number;
|
|
321
|
-
}
|
|
322
|
-
export interface WorkflowEventInput<T = Record<string, unknown>> {
|
|
323
|
-
event_ref: EventRef;
|
|
324
|
-
payload: T;
|
|
325
|
-
}
|
|
326
208
|
export type EventIngestResourceRule = z.infer<typeof EventIngestResourceRuleSchema>;
|
|
327
209
|
export type EventIngestTransform = z.infer<typeof EventIngestTransformSchema>;
|
|
328
210
|
export type EventIngestSignatureAlgorithm = z.infer<typeof EventIngestSignatureAlgorithmSchema>;
|
|
@@ -332,25 +214,5 @@ export type EventIngestChannel = z.infer<typeof EventIngestChannelSchema>;
|
|
|
332
214
|
export type CreateEventIngestChannelPayload = z.infer<typeof CreateEventIngestChannelPayloadSchema>;
|
|
333
215
|
export type UpdateEventIngestChannelPayload = z.infer<typeof UpdateEventIngestChannelPayloadSchema>;
|
|
334
216
|
export type EventIngestChannelMutationResponse = z.infer<typeof EventIngestChannelMutationResponseSchema>;
|
|
335
|
-
|
|
336
|
-
* Body accepted by the public ingest webhook
|
|
337
|
-
* `POST /webhooks/events/:accountId/:projectId/:channelId`. All fields are optional: when omitted the
|
|
338
|
-
* channel transform / defaults are applied. The raw body is preserved under `event.details.payload`.
|
|
339
|
-
*/
|
|
340
|
-
export interface IngestExternalEventPayload {
|
|
341
|
-
action?: string;
|
|
342
|
-
resource_type?: string;
|
|
343
|
-
resource_id?: string;
|
|
344
|
-
/** Domain payload; defaults to the full raw body when omitted. */
|
|
345
|
-
payload?: Record<string, unknown>;
|
|
346
|
-
/** Extra fields merged into `event.details`. */
|
|
347
|
-
details?: Record<string, unknown>;
|
|
348
|
-
/** Deduplication key: the same key produces the same event id. */
|
|
349
|
-
idempotency_key?: string;
|
|
350
|
-
/** ISO 8601 event timestamp; defaults to ingest time. */
|
|
351
|
-
timestamp?: string;
|
|
352
|
-
}
|
|
353
|
-
export interface IngestExternalEventResponse {
|
|
354
|
-
event_id: string;
|
|
355
|
-
}
|
|
217
|
+
export {};
|
|
356
218
|
//# sourceMappingURL=platform-event.d.ts.map
|