@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/store/store.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
ContentObjectTypeRefSchema,
|
|
4
|
+
InCodeTypeRefSchema,
|
|
5
|
+
StoredTypeRefSchema,
|
|
6
|
+
} from '../api-schemas/app-lifecycle.js';
|
|
3
7
|
import type {
|
|
4
8
|
ComplexSearchPayloadSchema,
|
|
5
9
|
ContentObjectApiResponseSchema,
|
|
@@ -28,6 +32,7 @@ import type {
|
|
|
28
32
|
InheritedPropertyMetadataSchema,
|
|
29
33
|
ListContentObjectExportsResponseSchema,
|
|
30
34
|
ObjectSearchResponseSchema,
|
|
35
|
+
ProjectedContentObjectApiResponseSchema,
|
|
31
36
|
RevisionInfoSchema,
|
|
32
37
|
SetObjectEmbeddingsResponseSchema,
|
|
33
38
|
StartContentObjectExportRequestSchema,
|
|
@@ -35,21 +40,26 @@ import type {
|
|
|
35
40
|
TranscriptSchema,
|
|
36
41
|
TranscriptSegmentSchema,
|
|
37
42
|
UpdateContentObjectHeadersSchema,
|
|
43
|
+
UpdateContentObjectPayloadSchema,
|
|
38
44
|
UpdateContentObjectQuerySchema,
|
|
39
45
|
} from '../api-schemas/content.js';
|
|
40
46
|
import type { MarkdownRenditionFormatSchema } from '../api-schemas/document-processing.js';
|
|
41
47
|
import type {
|
|
42
48
|
CreateWorkflowRulePayloadSchema,
|
|
49
|
+
UpdateWorkflowRulePayloadSchema,
|
|
43
50
|
WorkflowRuleItemSchema,
|
|
44
51
|
WorkflowRuleSchema,
|
|
45
52
|
} from '../api-schemas/events.js';
|
|
46
53
|
import type {
|
|
54
|
+
BucketCreateAccessStatusResponseSchema,
|
|
47
55
|
BucketReadAccessStatusResponseSchema,
|
|
48
56
|
BulkUploadUrlsPayloadSchema,
|
|
49
57
|
BulkUploadUrlsResponseSchema,
|
|
50
58
|
CopyFilePayloadSchema,
|
|
51
59
|
CopyFileResponseSchema,
|
|
52
60
|
DeleteFileResultSchema,
|
|
61
|
+
EnsureBucketCreateAccessPayloadSchema,
|
|
62
|
+
EnsureBucketCreateAccessResponseSchema,
|
|
53
63
|
EnsureBucketReadAccessPayloadSchema,
|
|
54
64
|
EnsureBucketReadAccessResponseSchema,
|
|
55
65
|
FileBucketResponseSchema,
|
|
@@ -132,35 +142,6 @@ export type ExportContentObjectsIncludeOptions = z.infer<typeof ExportContentObj
|
|
|
132
142
|
|
|
133
143
|
export type ExportContentObjectsFilter = z.infer<typeof ExportContentObjectsFilterSchema>;
|
|
134
144
|
|
|
135
|
-
/**
|
|
136
|
-
* Exported object identity and context for a single content object row.
|
|
137
|
-
*/
|
|
138
|
-
export interface ExportedContentObjectRecord {
|
|
139
|
-
id: string;
|
|
140
|
-
name: string;
|
|
141
|
-
location: string;
|
|
142
|
-
external_id?: string;
|
|
143
|
-
type?: {
|
|
144
|
-
ref_type?: 'stored' | 'incode' | 'untyped';
|
|
145
|
-
id?: string;
|
|
146
|
-
code?: string;
|
|
147
|
-
name?: string;
|
|
148
|
-
};
|
|
149
|
-
status?: ContentObjectStatus;
|
|
150
|
-
content?: {
|
|
151
|
-
source?: string;
|
|
152
|
-
type?: string;
|
|
153
|
-
name?: string;
|
|
154
|
-
etag?: string;
|
|
155
|
-
};
|
|
156
|
-
created_at: string;
|
|
157
|
-
updated_at: string;
|
|
158
|
-
revision?: RevisionInfo;
|
|
159
|
-
properties?: Record<string, unknown>;
|
|
160
|
-
metadata?: Record<string, unknown>;
|
|
161
|
-
embeddings?: Partial<Record<SupportedEmbeddingTypes, Embedding>>;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
145
|
export type StartContentObjectExportRequest = z.infer<typeof StartContentObjectExportRequestSchema>;
|
|
165
146
|
|
|
166
147
|
export type StartContentObjectExportResponse = z.infer<typeof StartContentObjectExportResponseSchema>;
|
|
@@ -261,6 +242,12 @@ export type ContentObjectItemApiResponse = z.infer<typeof ContentObjectItemApiRe
|
|
|
261
242
|
|
|
262
243
|
export type ContentObjectApiResponse = z.infer<typeof ContentObjectApiResponseSchema>;
|
|
263
244
|
|
|
245
|
+
export type ProjectedContentObjectApiResponse = z.infer<typeof ProjectedContentObjectApiResponseSchema>;
|
|
246
|
+
|
|
247
|
+
export type FullObjectSearchResponse = Omit<ObjectSearchResponse, 'results'> & {
|
|
248
|
+
results: ContentObjectItemApiResponse[];
|
|
249
|
+
};
|
|
250
|
+
|
|
264
251
|
export interface ContentObject<T = JSONObject> extends ContentObjectItem<T> {
|
|
265
252
|
text?: string; // the text representation of the object
|
|
266
253
|
text_etag?: string;
|
|
@@ -412,7 +399,7 @@ export interface TypeDetectionMetadata {
|
|
|
412
399
|
}
|
|
413
400
|
|
|
414
401
|
// Type-specific metadata interfaces
|
|
415
|
-
|
|
402
|
+
interface TemporalMediaMetadata extends ContentMetadata {
|
|
416
403
|
duration?: number; // in seconds
|
|
417
404
|
transcript?: Transcript;
|
|
418
405
|
}
|
|
@@ -465,7 +452,7 @@ export interface DocumentMetadata extends ContentMetadata {
|
|
|
465
452
|
}
|
|
466
453
|
|
|
467
454
|
/** Grounded-extraction summary stored on document metadata. Additional keys allowed. */
|
|
468
|
-
|
|
455
|
+
interface GroundedMetadata {
|
|
469
456
|
verdict?: string;
|
|
470
457
|
confidence?: number;
|
|
471
458
|
citation_count?: number;
|
|
@@ -481,17 +468,6 @@ export interface GroundedMetadata {
|
|
|
481
468
|
|
|
482
469
|
export type Transcript = z.infer<typeof TranscriptSchema>;
|
|
483
470
|
|
|
484
|
-
export const TextExtractionStatus = {
|
|
485
|
-
success: 'success',
|
|
486
|
-
} as const;
|
|
487
|
-
|
|
488
|
-
export interface TranscriptMediaResult {
|
|
489
|
-
hasText: boolean;
|
|
490
|
-
status: typeof TextExtractionStatus.success;
|
|
491
|
-
message?: string;
|
|
492
|
-
gladiaTranscriptionId?: string;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
471
|
export type TranscriptSegment = z.infer<typeof TranscriptSegmentSchema>;
|
|
496
472
|
|
|
497
473
|
export type ContentSource = z.infer<typeof ContentSourceSchema>;
|
|
@@ -589,29 +565,10 @@ export type CreateContentObjectPayload<T = JSONObject> = Omit<
|
|
|
589
565
|
metadata?: ContentObjectItem['metadata'];
|
|
590
566
|
};
|
|
591
567
|
|
|
592
|
-
type LegacyContentObjectTypeRef = Partial<ContentObjectTypeRef> & {
|
|
593
|
-
ref_type?: 'stored' | 'incode';
|
|
594
|
-
id?: string;
|
|
595
|
-
code?: string;
|
|
596
|
-
name?: string;
|
|
597
|
-
};
|
|
598
|
-
|
|
599
568
|
export function getContentTypeRefId(type: ContentObjectTypeRef): string {
|
|
600
569
|
return type.id;
|
|
601
570
|
}
|
|
602
571
|
|
|
603
|
-
export function withContentObjectTypeRefDiscriminator(
|
|
604
|
-
type: ContentObjectTypeRef | LegacyContentObjectTypeRef,
|
|
605
|
-
): ContentObjectTypeRef {
|
|
606
|
-
const legacyCode = 'code' in type ? type.code : undefined;
|
|
607
|
-
const id = type.id || legacyCode || '';
|
|
608
|
-
const name = type.name || '';
|
|
609
|
-
if (type.ref_type === 'incode' || isInCodeType(id)) {
|
|
610
|
-
return { ref_type: 'incode', id, name };
|
|
611
|
-
}
|
|
612
|
-
return { ref_type: 'stored', id, name };
|
|
613
|
-
}
|
|
614
|
-
|
|
615
572
|
export type ContentObjectTypeRef = z.infer<typeof ContentObjectTypeRefSchema>;
|
|
616
573
|
|
|
617
574
|
export type ComplexSearchPayload = z.infer<typeof ComplexSearchPayloadSchema>;
|
|
@@ -634,19 +591,6 @@ export type IntakePageScope = z.infer<typeof IntakePageScopeSchema>;
|
|
|
634
591
|
*/
|
|
635
592
|
export type IntakePageRanges = z.infer<typeof IntakePageRangesSchema>;
|
|
636
593
|
|
|
637
|
-
/** Rendering settings behind a vision detail name (platform defaults, project-overridable
|
|
638
|
-
* via `configuration.intake.vision_profiles`). */
|
|
639
|
-
export interface IntakeVisionProfileSettings {
|
|
640
|
-
/** Render resolution in dots per inch. */
|
|
641
|
-
dpi: number;
|
|
642
|
-
/** Maximum height/width of the rendered page image in pixels. */
|
|
643
|
-
max_hw: number;
|
|
644
|
-
/** JPEG quality (0-100). */
|
|
645
|
-
quality: number;
|
|
646
|
-
/** grayscale renders gray always; auto keeps color when the plan asks for it. */
|
|
647
|
-
color_mode: 'grayscale' | 'auto';
|
|
648
|
-
}
|
|
649
|
-
|
|
650
594
|
export type ContentTypeExtractionGroundingReviewPolicy = z.infer<
|
|
651
595
|
typeof ContentTypeExtractionGroundingReviewPolicySchema
|
|
652
596
|
>;
|
|
@@ -677,15 +621,6 @@ export type ContentObjectTypeCatalogEntry = z.infer<typeof ContentObjectTypeCata
|
|
|
677
621
|
*/
|
|
678
622
|
export type InCodeTypeSpec = Omit<InCodeTypeDefinition, 'id'>;
|
|
679
623
|
|
|
680
|
-
/**
|
|
681
|
-
* Returns true if the type id represents an in-code type (system or app-contributed).
|
|
682
|
-
* In-code types use colon-separated ids like "sys:Invoice" or "app:myapp:Article".
|
|
683
|
-
* These types are read-only and cannot be edited through the UI.
|
|
684
|
-
*/
|
|
685
|
-
export function isInCodeType(typeId: string): boolean {
|
|
686
|
-
return typeId.includes(':');
|
|
687
|
-
}
|
|
688
|
-
|
|
689
624
|
export type CreateContentObjectTypePayload = z.infer<typeof CreateContentObjectTypePayloadSchema>;
|
|
690
625
|
|
|
691
626
|
export type UpdateContentObjectTypePayload = z.infer<typeof UpdateContentObjectTypePayloadSchema>;
|
|
@@ -731,7 +666,7 @@ export type ObjectSearchResponse = z.infer<typeof ObjectSearchResponseSchema>;
|
|
|
731
666
|
// Rendition Format Compatibility Utilities
|
|
732
667
|
// ============================================================================
|
|
733
668
|
|
|
734
|
-
|
|
669
|
+
type RenditionFormat = ImageRenditionFormat | MarkdownRenditionFormat;
|
|
735
670
|
|
|
736
671
|
/**
|
|
737
672
|
* Matrix of supported content type → format conversions.
|
|
@@ -793,6 +728,88 @@ export function canGenerateRendition(contentType: string | undefined, format: Re
|
|
|
793
728
|
return false;
|
|
794
729
|
}
|
|
795
730
|
|
|
731
|
+
export type GetUploadUrlPayload = z.infer<typeof GetUploadUrlPayloadSchema>;
|
|
732
|
+
|
|
733
|
+
export type GetFileUrlPayload = z.infer<typeof GetFileUrlPayloadSchema>;
|
|
734
|
+
|
|
735
|
+
export type GetFileUrlResponse = z.infer<typeof GetFileUrlResponseSchema>;
|
|
736
|
+
|
|
737
|
+
export type EnsureBucketReadAccessPayload = z.infer<typeof EnsureBucketReadAccessPayloadSchema>;
|
|
738
|
+
|
|
739
|
+
export type EnsureBucketReadAccessResponse = z.infer<typeof EnsureBucketReadAccessResponseSchema>;
|
|
740
|
+
|
|
741
|
+
export type BucketReadAccessStatusResponse = z.infer<typeof BucketReadAccessStatusResponseSchema>;
|
|
742
|
+
|
|
743
|
+
export type EnsureBucketCreateAccessPayload = z.infer<typeof EnsureBucketCreateAccessPayloadSchema>;
|
|
744
|
+
|
|
745
|
+
export type EnsureBucketCreateAccessResponse = z.infer<typeof EnsureBucketCreateAccessResponseSchema>;
|
|
746
|
+
|
|
747
|
+
export type BucketCreateAccessStatusResponse = z.infer<typeof BucketCreateAccessStatusResponseSchema>;
|
|
748
|
+
|
|
749
|
+
export type FileMetadataResponse = z.infer<typeof FileMetadataResponseSchema>;
|
|
750
|
+
|
|
751
|
+
export type SetFileMetadataPayload = z.infer<typeof SetFileMetadataPayloadSchema>;
|
|
752
|
+
|
|
753
|
+
export type FileMetadataUpdateResult = z.infer<typeof FileMetadataUpdateResultSchema>;
|
|
754
|
+
|
|
755
|
+
export type BulkUploadUrlsPayload = z.infer<typeof BulkUploadUrlsPayloadSchema>;
|
|
756
|
+
|
|
757
|
+
export type BulkUploadUrlsResponse = z.infer<typeof BulkUploadUrlsResponseSchema>;
|
|
758
|
+
|
|
759
|
+
export type FileBucketResponse = z.infer<typeof FileBucketResponseSchema>;
|
|
760
|
+
|
|
761
|
+
export type FileListResponse = z.infer<typeof FileListResponseSchema>;
|
|
762
|
+
|
|
763
|
+
export type FileMetadataQuery = z.infer<typeof FileMetadataQuerySchema>;
|
|
764
|
+
|
|
765
|
+
export type FileListQuery = z.infer<typeof FileListQuerySchema>;
|
|
766
|
+
|
|
767
|
+
export type FileDeleteQuery = z.infer<typeof FileDeleteQuerySchema>;
|
|
768
|
+
|
|
769
|
+
export type ContentObjectTypeCatalogQuery = z.infer<typeof ContentObjectTypeCatalogQuerySchema>;
|
|
770
|
+
|
|
771
|
+
export type ContentObjectTypeListQuery = z.infer<typeof ContentObjectTypeListQuerySchema>;
|
|
772
|
+
|
|
773
|
+
export type CopyFilePayload = z.infer<typeof CopyFilePayloadSchema>;
|
|
774
|
+
|
|
775
|
+
export type CopyFileResponse = z.infer<typeof CopyFileResponseSchema>;
|
|
776
|
+
|
|
777
|
+
export type DeleteFileResult = z.infer<typeof DeleteFileResultSchema>;
|
|
778
|
+
|
|
779
|
+
export enum ContentObjectProcessingPriority {
|
|
780
|
+
normal = 'normal',
|
|
781
|
+
low = 'low',
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
/**
|
|
785
|
+
* Exported object identity and context for a single content object row.
|
|
786
|
+
*/
|
|
787
|
+
export interface ExportedContentObjectRecord {
|
|
788
|
+
id: string;
|
|
789
|
+
name: string;
|
|
790
|
+
location: string;
|
|
791
|
+
external_id?: string;
|
|
792
|
+
type?: {
|
|
793
|
+
ref_type?: 'stored' | 'incode' | 'untyped';
|
|
794
|
+
id?: string;
|
|
795
|
+
code?: string;
|
|
796
|
+
name?: string;
|
|
797
|
+
};
|
|
798
|
+
status?: ContentObjectStatus;
|
|
799
|
+
content?: {
|
|
800
|
+
source?: string;
|
|
801
|
+
type?: string;
|
|
802
|
+
name?: string;
|
|
803
|
+
etag?: string;
|
|
804
|
+
};
|
|
805
|
+
created_at: string;
|
|
806
|
+
updated_at: string;
|
|
807
|
+
revision?: RevisionInfo;
|
|
808
|
+
properties?: Record<string, unknown>;
|
|
809
|
+
metadata?: Record<string, unknown>;
|
|
810
|
+
embeddings?: Partial<Record<SupportedEmbeddingTypes, Embedding>>;
|
|
811
|
+
}
|
|
812
|
+
|
|
796
813
|
/**
|
|
797
814
|
* Get the list of rendition formats supported for a given content type.
|
|
798
815
|
*
|
|
@@ -839,49 +856,23 @@ export function supportsVisualRendition(contentType: string | undefined): boolea
|
|
|
839
856
|
return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);
|
|
840
857
|
}
|
|
841
858
|
|
|
842
|
-
export type
|
|
843
|
-
|
|
844
|
-
export type GetFileUrlPayload = z.infer<typeof GetFileUrlPayloadSchema>;
|
|
845
|
-
|
|
846
|
-
export type GetFileUrlResponse = z.infer<typeof GetFileUrlResponseSchema>;
|
|
847
|
-
|
|
848
|
-
export type EnsureBucketReadAccessPayload = z.infer<typeof EnsureBucketReadAccessPayloadSchema>;
|
|
849
|
-
|
|
850
|
-
export type EnsureBucketReadAccessResponse = z.infer<typeof EnsureBucketReadAccessResponseSchema>;
|
|
851
|
-
|
|
852
|
-
export type BucketReadAccessStatusResponse = z.infer<typeof BucketReadAccessStatusResponseSchema>;
|
|
853
|
-
|
|
854
|
-
export type FileMetadataResponse = z.infer<typeof FileMetadataResponseSchema>;
|
|
855
|
-
|
|
856
|
-
export type SetFileMetadataPayload = z.infer<typeof SetFileMetadataPayloadSchema>;
|
|
857
|
-
|
|
858
|
-
export type FileMetadataUpdateResult = z.infer<typeof FileMetadataUpdateResultSchema>;
|
|
859
|
-
|
|
860
|
-
export type BulkUploadUrlsPayload = z.infer<typeof BulkUploadUrlsPayloadSchema>;
|
|
861
|
-
|
|
862
|
-
export type BulkUploadUrlsResponse = z.infer<typeof BulkUploadUrlsResponseSchema>;
|
|
863
|
-
|
|
864
|
-
export type FileBucketResponse = z.infer<typeof FileBucketResponseSchema>;
|
|
865
|
-
|
|
866
|
-
export type FileListResponse = z.infer<typeof FileListResponseSchema>;
|
|
867
|
-
|
|
868
|
-
export type FileMetadataQuery = z.infer<typeof FileMetadataQuerySchema>;
|
|
869
|
-
|
|
870
|
-
export type FileListQuery = z.infer<typeof FileListQuerySchema>;
|
|
871
|
-
|
|
872
|
-
export type FileDeleteQuery = z.infer<typeof FileDeleteQuerySchema>;
|
|
859
|
+
export type InCodeTypeRef = z.infer<typeof InCodeTypeRefSchema>;
|
|
873
860
|
|
|
874
|
-
export type
|
|
861
|
+
export type StoredTypeRef = z.infer<typeof StoredTypeRefSchema>;
|
|
875
862
|
|
|
876
|
-
|
|
863
|
+
type UpdateContentObjectPayloadWire = z.infer<typeof UpdateContentObjectPayloadSchema>;
|
|
877
864
|
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
865
|
+
/**
|
|
866
|
+
* Mirrors {@link CreateContentObjectPayload}: `properties` and `metadata` are reopened over the wire
|
|
867
|
+
* type so the known metadata interfaces stay assignable and callers can name their property shape.
|
|
868
|
+
* The runtime contract accepts any object keys for both.
|
|
869
|
+
*/
|
|
870
|
+
export type UpdateContentObjectPayload<T = JSONObject> = Omit<
|
|
871
|
+
UpdateContentObjectPayloadWire,
|
|
872
|
+
'properties' | 'metadata'
|
|
873
|
+
> & {
|
|
874
|
+
properties?: T;
|
|
875
|
+
metadata?: ContentObjectItem['metadata'];
|
|
876
|
+
};
|
|
883
877
|
|
|
884
|
-
export
|
|
885
|
-
normal = 'normal',
|
|
886
|
-
low = 'low',
|
|
887
|
-
}
|
|
878
|
+
export type UpdateWorkflowRulePayload = z.infer<typeof UpdateWorkflowRulePayloadSchema>;
|
package/src/store/workflow.ts
CHANGED
|
@@ -257,9 +257,6 @@ export type WorkflowTask = z.infer<typeof WorkflowTaskSchema>;
|
|
|
257
257
|
// History format discriminated union
|
|
258
258
|
export type WorkflowHistory = z.infer<typeof WorkflowHistorySchema>;
|
|
259
259
|
|
|
260
|
-
// History format query parameter type
|
|
261
|
-
export type HistoryFormat = 'events' | 'tasks' | 'agent';
|
|
262
|
-
|
|
263
260
|
export type AgentTask = z.infer<typeof AgentTaskSchema>;
|
|
264
261
|
|
|
265
262
|
export type WorkflowRun = z.infer<typeof WorkflowRunSchema>;
|
|
@@ -289,24 +286,6 @@ export type WorkflowQueryResult = z.infer<typeof WorkflowQueryResultSchema>;
|
|
|
289
286
|
|
|
290
287
|
export type WorkflowInteractionVars = z.infer<typeof WorkflowInteractionVarsSchema>;
|
|
291
288
|
|
|
292
|
-
export interface MultiDocumentsInteractionParams extends Omit<WorkflowExecutionPayload, 'config'> {
|
|
293
|
-
config: {
|
|
294
|
-
interactionName: string;
|
|
295
|
-
action: DocumentActionConfig;
|
|
296
|
-
data: Record<string, unknown>;
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export interface DocumentActionConfig {
|
|
301
|
-
contentTypeName?: string; //content type to use
|
|
302
|
-
setAsProperties: boolean; //set result as properties
|
|
303
|
-
setAsText: string; //set result as text, if result set the whole result as text
|
|
304
|
-
setNameFrom: string; //result property to use as name
|
|
305
|
-
upsert: boolean; //wether to upsert or update only
|
|
306
|
-
documentId?: string; //doc Id to update
|
|
307
|
-
parentId?: string; //parentId for the created doc
|
|
308
|
-
}
|
|
309
|
-
|
|
310
289
|
export const WorkflowExecutionStatusValues = {
|
|
311
290
|
UNKNOWN: 0,
|
|
312
291
|
RUNNING: 1,
|
|
@@ -382,7 +361,7 @@ export type AgentMessageDetails = z.infer<typeof AgentMessageDetailsSchema>;
|
|
|
382
361
|
/**
|
|
383
362
|
* Details for THOUGHT messages representing tool calls (event_class: 'activity').
|
|
384
363
|
*/
|
|
385
|
-
|
|
364
|
+
interface ToolCallDetails {
|
|
386
365
|
event_class: 'activity';
|
|
387
366
|
tool: string;
|
|
388
367
|
tool_event?: 'started' | 'progress' | 'completed' | 'failed';
|
|
@@ -399,37 +378,6 @@ export interface ToolCallDetails {
|
|
|
399
378
|
[key: string]: unknown;
|
|
400
379
|
}
|
|
401
380
|
|
|
402
|
-
/**
|
|
403
|
-
* Details for UPDATE messages signaling document creation or update.
|
|
404
|
-
*/
|
|
405
|
-
export interface DocumentEventDetails {
|
|
406
|
-
event_class: 'document_created' | 'document_updated';
|
|
407
|
-
document_id: string;
|
|
408
|
-
title?: string;
|
|
409
|
-
[key: string]: unknown;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* Details for REQUEST_INPUT messages with UX configuration.
|
|
414
|
-
*/
|
|
415
|
-
export interface RequestInputDetails {
|
|
416
|
-
ux?: {
|
|
417
|
-
options?: Array<{ id: string; label: string }>;
|
|
418
|
-
variant?: string;
|
|
419
|
-
multiSelect?: boolean;
|
|
420
|
-
};
|
|
421
|
-
[key: string]: unknown;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* Details for PLAN messages containing the plan structure.
|
|
426
|
-
*/
|
|
427
|
-
export interface PlanMessageDetails {
|
|
428
|
-
plan: PlanTask[];
|
|
429
|
-
comment?: string;
|
|
430
|
-
[key: string]: unknown;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
381
|
// Type guards — check both message type and details shape for safety
|
|
434
382
|
|
|
435
383
|
export function isToolCallMessage(msg: AgentMessage): msg is AgentMessage & { details: ToolCallDetails } {
|
|
@@ -447,39 +395,6 @@ export function getResourcesFromMessage(msg: AgentMessage): AgentResourceReferen
|
|
|
447
395
|
return normalizeAgentResources((msg.details as AgentMessageDetails | undefined)?.resources);
|
|
448
396
|
}
|
|
449
397
|
|
|
450
|
-
export function isDocumentEventMessage(msg: AgentMessage): msg is AgentMessage & { details: DocumentEventDetails } {
|
|
451
|
-
const details = msg.details as Record<string, unknown> | undefined;
|
|
452
|
-
return (
|
|
453
|
-
msg.type === AgentMessageType.UPDATE &&
|
|
454
|
-
!!details &&
|
|
455
|
-
typeof details === 'object' &&
|
|
456
|
-
(details.event_class === 'document_created' || details.event_class === 'document_updated') &&
|
|
457
|
-
typeof details.document_id === 'string'
|
|
458
|
-
);
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export function isFileProcessingMessage(msg: AgentMessage): msg is AgentMessage & { details: FileProcessingDetails } {
|
|
462
|
-
const details = msg.details as Record<string, unknown> | undefined;
|
|
463
|
-
return (
|
|
464
|
-
msg.type === AgentMessageType.SYSTEM &&
|
|
465
|
-
!!details &&
|
|
466
|
-
typeof details === 'object' &&
|
|
467
|
-
details.system_type === 'file_processing' &&
|
|
468
|
-
Array.isArray(details.files)
|
|
469
|
-
);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
export function isPlanMessage(msg: AgentMessage): msg is AgentMessage & { details: PlanMessageDetails } {
|
|
473
|
-
const details = msg.details as Record<string, unknown> | undefined;
|
|
474
|
-
return (
|
|
475
|
-
msg.type === AgentMessageType.PLAN && !!details && typeof details === 'object' && Array.isArray(details.plan)
|
|
476
|
-
);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
export function isRequestInputMessage(msg: AgentMessage): msg is AgentMessage & { details: RequestInputDetails } {
|
|
480
|
-
return msg.type === AgentMessageType.REQUEST_INPUT && !!msg.details && typeof msg.details === 'object';
|
|
481
|
-
}
|
|
482
|
-
|
|
483
398
|
/**
|
|
484
399
|
* Details for STREAMING_CHUNK messages used for real-time LLM response streaming
|
|
485
400
|
* @deprecated Use CompactMessage with f field for streaming chunks
|
|
@@ -510,7 +425,7 @@ export type CompactMessage = z.infer<typeof CompactMessageSchema>;
|
|
|
510
425
|
* Legacy message format for backward compatibility.
|
|
511
426
|
* @deprecated Use CompactMessage instead
|
|
512
427
|
*/
|
|
513
|
-
|
|
428
|
+
type LegacyAgentMessage = AgentMessage;
|
|
514
429
|
|
|
515
430
|
// ============================================
|
|
516
431
|
// TYPE GUARDS
|
|
@@ -737,15 +652,6 @@ export enum FileProcessingStatus {
|
|
|
737
652
|
|
|
738
653
|
export type ConversationFile = z.infer<typeof ConversationFileSchema>;
|
|
739
654
|
|
|
740
|
-
/**
|
|
741
|
-
* A file is deliverable when it is ready and has not yet been delivered to the agent as part
|
|
742
|
-
* of a user message. Deliverable files get attached to the next message; consumed ones stay
|
|
743
|
-
* reachable to tools via artifact_path/md_path but are not re-attached.
|
|
744
|
-
*/
|
|
745
|
-
export function isDeliverableFile(file: ConversationFile): boolean {
|
|
746
|
-
return file.status === FileProcessingStatus.READY && !file.consumed_at;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
655
|
/**
|
|
750
656
|
* Details for file processing SYSTEM messages.
|
|
751
657
|
* Used when type is AgentMessageType.SYSTEM with system_type: 'file_processing'.
|
|
@@ -782,29 +688,35 @@ export interface ConversationFileRef {
|
|
|
782
688
|
}
|
|
783
689
|
|
|
784
690
|
/**
|
|
785
|
-
*
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Get the Redis pub/sub channel name for workflow messages.
|
|
794
|
-
* Used by both publishers (workflow activities, studio-server) and subscribers (zeno-server, clients).
|
|
795
|
-
* @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)
|
|
691
|
+
* Manifest closing a staged-upload batch (the FileBatchClosed signal). Sent by clients that
|
|
692
|
+
* stage files before the run exists (the agent start screen) after every upload attempt has
|
|
693
|
+
* finished: those clients cannot wait for text extraction themselves, so the workflow owns the
|
|
694
|
+
* "[Files Ready]" user turn. The manifest is the batch's authoritative membership — the
|
|
695
|
+
* workflow delivers once, and only once, every listed file has settled, so a fast first file
|
|
696
|
+
* can never trigger delivery while later files are still uploading.
|
|
796
697
|
*/
|
|
797
|
-
export
|
|
798
|
-
|
|
698
|
+
export interface ConversationFileBatchRef {
|
|
699
|
+
/** Client-generated batch id. Stable across retries so redelivering the manifest is a no-op. */
|
|
700
|
+
batch_id: string;
|
|
701
|
+
/**
|
|
702
|
+
* Ids (ConversationFileRef.id) of the files successfully uploaded and signaled for this
|
|
703
|
+
* batch. Files whose upload failed client-side are listed in `failed_uploads` instead;
|
|
704
|
+
* empty when every upload failed.
|
|
705
|
+
*/
|
|
706
|
+
file_ids: string[];
|
|
707
|
+
/**
|
|
708
|
+
* Files the client could not upload or signal. Without them a 1-of-2 batch would look
|
|
709
|
+
* complete to the workflow, so the agent would never learn a file is missing.
|
|
710
|
+
*/
|
|
711
|
+
failed_uploads?: { name: string; error?: string }[];
|
|
799
712
|
}
|
|
800
713
|
|
|
801
714
|
/**
|
|
802
|
-
*
|
|
803
|
-
* Messages are stored here for retrieval by reconnecting clients.
|
|
804
|
-
* @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)
|
|
715
|
+
* Reference to a file removed from the conversation attachment set.
|
|
805
716
|
*/
|
|
806
|
-
export
|
|
807
|
-
|
|
717
|
+
export interface ConversationFileRemovedRef {
|
|
718
|
+
/** Client-generated unique ID */
|
|
719
|
+
id: string;
|
|
808
720
|
}
|
|
809
721
|
|
|
810
722
|
export type PlanTask = z.infer<typeof PlanTaskSchema>;
|
|
@@ -816,27 +728,27 @@ export const LOW_PRIORITY_TASK_QUEUE = 'low_priority';
|
|
|
816
728
|
/**
|
|
817
729
|
* WebSocket message types for bidirectional communication
|
|
818
730
|
*/
|
|
819
|
-
|
|
731
|
+
interface WebSocketSignalMessage {
|
|
820
732
|
type: 'signal';
|
|
821
733
|
signalName: string;
|
|
822
734
|
data: unknown;
|
|
823
735
|
requestId?: string | number;
|
|
824
736
|
}
|
|
825
737
|
|
|
826
|
-
|
|
738
|
+
interface WebSocketPingMessage {
|
|
827
739
|
type: 'ping';
|
|
828
740
|
}
|
|
829
741
|
|
|
830
|
-
|
|
742
|
+
interface WebSocketPongMessage {
|
|
831
743
|
type: 'pong';
|
|
832
744
|
}
|
|
833
745
|
|
|
834
|
-
|
|
746
|
+
interface WebSocketAckMessage {
|
|
835
747
|
type: 'ack';
|
|
836
748
|
requestId: string | number;
|
|
837
749
|
}
|
|
838
750
|
|
|
839
|
-
|
|
751
|
+
interface WebSocketErrorMessage {
|
|
840
752
|
type: 'error';
|
|
841
753
|
requestId?: string | number;
|
|
842
754
|
error: string;
|
|
@@ -959,7 +871,7 @@ export interface AgentIntakeWorkflowResult {
|
|
|
959
871
|
// ---------------------------------------------------------------------------
|
|
960
872
|
|
|
961
873
|
/** Progress reported by a child workstream */
|
|
962
|
-
|
|
874
|
+
interface WorkstreamProgressInfo {
|
|
963
875
|
launch_id: string;
|
|
964
876
|
workstream_id: string;
|
|
965
877
|
phase: 'planning' | 'executing_tool' | 'synthesizing' | 'blocked' | 'done';
|
package/src/sts-errors.ts
CHANGED
package/src/sts-token-types.ts
CHANGED
|
@@ -10,14 +10,12 @@ import type {
|
|
|
10
10
|
IssueTokenForbiddenResponseSchema,
|
|
11
11
|
IssueTokenRequestSchema,
|
|
12
12
|
IssueTokenResponseSchema,
|
|
13
|
+
IssueTokenUnavailableResponseSchema,
|
|
13
14
|
ProjectTokenRequestSchema,
|
|
14
15
|
ServiceAccountTokenRequestSchema,
|
|
15
16
|
SigningAlgorithmSchema,
|
|
16
|
-
TokenTypeSchema,
|
|
17
17
|
UserTokenRequestSchema,
|
|
18
18
|
} from './api-schemas/sts.js';
|
|
19
|
-
|
|
20
|
-
export type TokenType = z.infer<typeof TokenTypeSchema>;
|
|
21
19
|
export type SigningAlgorithm = z.infer<typeof SigningAlgorithmSchema>;
|
|
22
20
|
|
|
23
21
|
// API key doesn't need account/project as it's determined from the key
|
|
@@ -59,31 +57,6 @@ export interface RevokeTokenRequest {
|
|
|
59
57
|
token: string;
|
|
60
58
|
}
|
|
61
59
|
|
|
62
|
-
// Helper type guards for type narrowing
|
|
63
|
-
export function isApiKeyRequest(req: IssueTokenRequest): req is ApiKeyTokenRequest {
|
|
64
|
-
return req.type === 'apikey';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function isUserRequest(req: IssueTokenRequest): req is UserTokenRequest {
|
|
68
|
-
return req.type === 'user';
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function isProjectRequest(req: IssueTokenRequest): req is ProjectTokenRequest {
|
|
72
|
-
return req.type === 'project';
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function isEnvironmentRequest(req: IssueTokenRequest): req is EnvironmentTokenRequest {
|
|
76
|
-
return req.type === 'environment';
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function isAgentRequest(req: IssueTokenRequest): req is AgentTokenRequest {
|
|
80
|
-
return req.type === 'agent';
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function isServiceAccountRequest(req: IssueTokenRequest): req is ServiceAccountTokenRequest {
|
|
84
|
-
return req.type === 'service_account';
|
|
85
|
-
}
|
|
86
|
-
|
|
87
60
|
// Response types
|
|
88
61
|
export interface TokenResponse {
|
|
89
62
|
token: string;
|
|
@@ -99,3 +72,5 @@ export interface ValidateTokenResponse {
|
|
|
99
72
|
payload?: unknown;
|
|
100
73
|
error?: string;
|
|
101
74
|
}
|
|
75
|
+
|
|
76
|
+
export type IssueTokenUnavailableResponse = z.infer<typeof IssueTokenUnavailableResponseSchema>;
|
package/src/tools.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
2
|
import type {
|
|
3
3
|
AggregatedToolSchema,
|
|
4
|
+
InspectProjectToolQuerySchema,
|
|
4
5
|
ListProjectToolsQuerySchema,
|
|
6
|
+
ProcessToolCompatibilityReasonSchema,
|
|
7
|
+
ProcessToolCompatibilitySchema,
|
|
8
|
+
ToolInspectionSchema,
|
|
9
|
+
ToolRuntimeContextSchema,
|
|
5
10
|
ToolSourceSchema,
|
|
6
11
|
ToolValidationResultSchema,
|
|
7
12
|
ValidateToolNamesPayloadSchema,
|
|
@@ -15,6 +20,16 @@ export type ToolSource = z.infer<typeof ToolSourceSchema>;
|
|
|
15
20
|
|
|
16
21
|
export type AggregatedTool = z.infer<typeof AggregatedToolSchema>;
|
|
17
22
|
|
|
23
|
+
export type ToolRuntimeContext = z.infer<typeof ToolRuntimeContextSchema>;
|
|
24
|
+
|
|
25
|
+
export type ProcessToolCompatibilityReason = z.infer<typeof ProcessToolCompatibilityReasonSchema>;
|
|
26
|
+
|
|
27
|
+
export type ProcessToolCompatibility = z.infer<typeof ProcessToolCompatibilitySchema>;
|
|
28
|
+
|
|
29
|
+
export type InspectProjectToolQuery = z.infer<typeof InspectProjectToolQuerySchema>;
|
|
30
|
+
|
|
31
|
+
export type ToolInspection = z.infer<typeof ToolInspectionSchema>;
|
|
32
|
+
|
|
18
33
|
export type ListProjectToolsQuery = z.infer<typeof ListProjectToolsQuerySchema>;
|
|
19
34
|
|
|
20
35
|
export type ToolValidationResult = z.infer<typeof ToolValidationResultSchema>;
|