@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertesia-common.js","names":["ref","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","isRecord","isStringArray","FIELD_PATTERN","isRecord"],"sources":["access-control-values.js","access-control.js","agent-request-template.js","apikey-values.js","apikey.js","apps.js","audit-trail.js","interaction-values.js","email.js","interaction.js","channels.js","data-platform.js","../../../llumiverse/common/lib/capability/anthropic.js","../../../llumiverse/common/lib/capability/azure_foundry.js","../../../llumiverse/common/lib/capability/bedrock-models.js","../../../llumiverse/common/lib/capability/bedrock.js","../../../llumiverse/common/lib/types.js","../../../llumiverse/common/lib/options/fallback.js","../../../llumiverse/common/lib/options/version-parsing.js","../../../llumiverse/common/lib/options/bedrock_mantle.js","../../../llumiverse/common/lib/capability/bedrock_mantle.js","../../../llumiverse/common/lib/capability/openai.js","../../../llumiverse/common/lib/capability/vertexai.js","../../../llumiverse/common/lib/capability.js","../../../llumiverse/common/lib/options/vertexai.js","environment.js","group.js","host-utils.js","integrations.js","meters.js","oauth-scopes.js","Progress.js","platform-event.js","view-validation-helpers.js","project-values.js","project.js","platform-event-validation.js","prompt.js","refs.js","schema-for-extraction.js","store/agent-approval.js","store/collections.js","store/conversation-state.js","store/dsl-workflow.js","store/editing-policy-schema.generated.js","store/grounded-extraction.js","store/intake-policy-schema.generated.js","store/object-types.js","store/process.js","store/process-schema.js","store/process-validation.js","store/workflow.js","store/rendering.js","store/schedule.js","store/store.js","store/temporalio.js","sts-errors.js","sts-token-types.js","training.js","transient-tokens-values.js","account-values.js","user.js","utils/auth.js","utils/schemas.js","versions.js","views.js","views-schema.js","view-query-validation.js","views-validation.js","view-configuration-validation.js","workflow-analytics.js"],"sourcesContent":["/**\n * Access-control values that exist at runtime — the enums and the scope list.\n *\n * Split out of `access-control.ts` and `roles/types.ts` for the same reason `account-values.ts` was\n * split out of `user.ts`: the API schemas need these values (`z.enum(Permission)`,\n * `z.enum(AbacScopes)`) while those two modules need the types the schemas infer. Keeping them where\n * they were would make each import a module that imports it back; here, both sides depend on this\n * module and nothing depends on them.\n *\n * Everything is re-exported from its original module, so existing import paths keep working — this\n * is a move, not a rename.\n */\nexport var Permission;\n(function (Permission) {\n Permission[\"int_read\"] = \"interaction:read\";\n Permission[\"int_write\"] = \"interaction:write\";\n Permission[\"int_delete\"] = \"interaction:delete\";\n Permission[\"int_execute\"] = \"interaction:execute\";\n Permission[\"run_read\"] = \"run:read\";\n Permission[\"run_write\"] = \"run:write\";\n Permission[\"env_admin\"] = \"environment:admin\";\n Permission[\"app_manage\"] = \"app:manage\";\n Permission[\"project_admin\"] = \"project:admin\";\n Permission[\"project_integration_read\"] = \"project:integration_read\";\n Permission[\"project_settings_write\"] = \"project:settings_write\";\n Permission[\"api_key_create\"] = \"api_key:create\";\n Permission[\"api_key_read\"] = \"api_key:read\";\n Permission[\"api_key_secret_read\"] = \"api_key:secret_read\";\n Permission[\"api_key_update\"] = \"api_key:update\";\n Permission[\"api_key_delete\"] = \"api_key:delete\";\n Permission[\"account_read\"] = \"account:read\";\n Permission[\"account_write\"] = \"account:write\";\n Permission[\"account_admin\"] = \"account:admin\";\n Permission[\"manage_billing\"] = \"account:billing\";\n /** View cost and usage analytics */\n Permission[\"billing_read\"] = \"billing:read\";\n /** View account and project audit events. */\n Permission[\"audit_read\"] = \"audit:read\";\n Permission[\"account_member\"] = \"account:member\";\n Permission[\"content_read\"] = \"content:read\";\n Permission[\"content_read_all\"] = \"content:read_all\";\n Permission[\"content_write\"] = \"content:write\";\n Permission[\"content_delete\"] = \"content:delete\";\n Permission[\"content_admin\"] = \"content:admin\";\n Permission[\"content_superadmin\"] = \"content:superadmin\";\n Permission[\"workflow_read\"] = \"workflow:read\";\n Permission[\"workflow_run\"] = \"workflow:run\";\n Permission[\"workflow_admin\"] = \"workflow:admin\";\n Permission[\"workflow_superadmin\"] = \"workflow:superadmin\";\n Permission[\"agent_run_read\"] = \"agent_run:read\";\n Permission[\"task_read\"] = \"task:read\";\n Permission[\"task_manage\"] = \"task:manage\";\n Permission[\"iam_impersonate\"] = \"iam:impersonate\";\n /** whether the user has access to Sutdio App. */\n Permission[\"studio_access\"] = \"studio:access\";\n})(Permission || (Permission = {}));\nexport var AccessControlResourceType;\n(function (AccessControlResourceType) {\n AccessControlResourceType[\"project\"] = \"project\";\n AccessControlResourceType[\"environment\"] = \"environment\";\n AccessControlResourceType[\"account\"] = \"account\";\n AccessControlResourceType[\"interaction\"] = \"interaction\";\n AccessControlResourceType[\"app\"] = \"application\";\n /**\n * Dynamic resource matching by property conditions at query time. The role\n * partitions (content, future tasks/etc.) determine which kind of object\n * the conditions match — selected via `AceConditions.scope`.\n *\n * NOTE: the string value remains `'content_set'` for backward compatibility\n * with stored ACEs and JWTs. The wire/DB rename to `'resource_set'` is a\n * separate concern (deferred). Until then, code reads\n * `AccessControlResourceType.resource_set` but the value on the wire stays\n * `'content_set'`.\n */\n AccessControlResourceType[\"resource_set\"] = \"content_set\";\n})(AccessControlResourceType || (AccessControlResourceType = {}));\nexport var AccessControlPrincipalType;\n(function (AccessControlPrincipalType) {\n AccessControlPrincipalType[\"user\"] = \"user\";\n AccessControlPrincipalType[\"group\"] = \"group\";\n AccessControlPrincipalType[\"apikey\"] = \"apikey\";\n /** Dynamic principal matching by user/group properties at token time. */\n AccessControlPrincipalType[\"principal_set\"] = \"principal_set\";\n})(AccessControlPrincipalType || (AccessControlPrincipalType = {}));\n/**\n * Kind of object a ResourceSet's `resource_props` matches at query time. Used\n * in `AceConditions.scope` (validated at runtime against this list) and as\n * the prefix in JWT `content_security` keys (e.g. `collection:read`).\n *\n * Each scope is owned by exactly one partition. When adding a new partition\n * (e.g. tasks), extend this list with the new scope(s) AND extend `RoleDomain`\n * with the new domain.\n */\nexport const AbacScopes = ['document', 'collection', 'task'];\n/**\n * Logical grouping of roles by the service area that owns them. Declared as a\n * runtime list so the role schemas can publish it as an enum component; the\n * `RoleDomain` type is inferred from it in `roles/types.ts`.\n */\nexport const RoleDomains = ['system', 'content', 'tasks'];\n//# sourceMappingURL=access-control-values.js.map","/**\n * The enums live in `./access-control-values.js` so the API schemas can consume them without\n * importing this module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './access-control-values.js';\n// RoleDefinition + SystemRoleDefinition now live in `./roles/types.js`, and are likewise inferred\n// from `./api-schemas/access-control.js`. They remain re-exported via the package's index.ts so\n// consumers see no path change.\n// ============================================================================\n// BLP Security Levels\n// ============================================================================\n/**\n * Default sensitivity/clearance levels for the Bell-LaPadula security model.\n * The numeric value is the index in the array (0 = lowest, 4 = highest).\n * Projects can override these labels via project settings.\n */\nexport var SecurityLevel;\n(function (SecurityLevel) {\n SecurityLevel[SecurityLevel[\"public\"] = 0] = \"public\";\n SecurityLevel[SecurityLevel[\"internal\"] = 1] = \"internal\";\n SecurityLevel[SecurityLevel[\"confidential\"] = 2] = \"confidential\";\n SecurityLevel[SecurityLevel[\"restricted\"] = 3] = \"restricted\";\n SecurityLevel[SecurityLevel[\"secret\"] = 4] = \"secret\";\n})(SecurityLevel || (SecurityLevel = {}));\n/** Human-readable labels for each security level, indexed by numeric value. */\nexport const SecurityLevelLabels = ['Public', 'Internal', 'Confidential', 'Restricted', 'Secret'];\n/** Get the label for a security level value. Returns \"Unknown\" for out-of-range values. */\nexport function getSecurityLevelLabel(level) {\n return SecurityLevelLabels[level] ?? 'Unknown';\n}\n//# sourceMappingURL=access-control.js.map","function isRecordValue(value) {\n return !!value && typeof value === 'object' && !Array.isArray(value);\n}\nfunction getTemplatePathValue(data, path) {\n if (path === '.' || path === 'json')\n return data;\n return path.split('.').reduce((current, part) => {\n if (Array.isArray(current) && /^\\d+$/.test(part))\n return current[Number(part)];\n if (!isRecordValue(current))\n return undefined;\n return current[part];\n }, data);\n}\nfunction stringifyTemplateValue(value) {\n if (value === null || value === undefined)\n return '';\n if (typeof value === 'string')\n return value;\n if (typeof value === 'number' || typeof value === 'boolean')\n return String(value);\n try {\n return JSON.stringify(value, null, 2);\n }\n catch {\n return String(value);\n }\n}\nexport function renderAgentRequestTemplate(template, data) {\n return template.replace(/\\{\\{\\s*([\\w.-]+|\\.)\\s*\\}\\}/g, (_match, path) => stringifyTemplateValue(getTemplatePathValue(data, path)));\n}\nexport function renderAgentRequestFallback(data) {\n if (typeof data === 'string')\n return data;\n if (data === null || data === undefined)\n return '';\n return stringifyTemplateValue(data);\n}\nexport function renderAgentRequestMessage(template, data) {\n const trimmedTemplate = template?.trim();\n if (!trimmedTemplate)\n return renderAgentRequestFallback(data);\n const rendered = renderAgentRequestTemplate(trimmedTemplate, data).trim();\n return rendered;\n}\n//# sourceMappingURL=agent-request-template.js.map","/**\n * API key values that exist at runtime.\n *\n * Split out of `apikey.ts` so `api-schemas/apikey.ts` can read the enum without importing a module\n * that derives its types from those very schemas. Re-exported from `apikey.ts`.\n */\nexport var ApiKeyTypes;\n(function (ApiKeyTypes) {\n ApiKeyTypes[\"secret\"] = \"sk\";\n})(ApiKeyTypes || (ApiKeyTypes = {}));\n//# sourceMappingURL=apikey-values.js.map","/**\n * `ApiKeyTypes` lives in `./apikey-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './apikey-values.js';\nexport var PrincipalType;\n(function (PrincipalType) {\n PrincipalType[\"User\"] = \"user\";\n PrincipalType[\"OAuthAccess\"] = \"oauth_access\";\n PrincipalType[\"Group\"] = \"group\";\n PrincipalType[\"ApiKey\"] = \"apikey\";\n PrincipalType[\"ServiceAccount\"] = \"service_account\";\n PrincipalType[\"Agent\"] = \"agent\";\n PrincipalType[\"Schedule\"] = \"schedule\";\n})(PrincipalType || (PrincipalType = {}));\n//# sourceMappingURL=apikey.js.map","/** Allowed values for AppUINavItem.preferredSection */\nexport const PREFERRED_SECTIONS = ['default', 'footer', 'settings'];\nexport const MCP_COLLECTION_ID_PATTERN = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;\nexport const MCP_COLLECTION_NAMESPACE_PATTERN = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;\nexport function isValidMCPCollectionId(id) {\n return MCP_COLLECTION_ID_PATTERN.test(id);\n}\nexport function isValidMCPCollectionNamespace(namespace) {\n return MCP_COLLECTION_NAMESPACE_PATTERN.test(namespace);\n}\nexport function deriveMCPCollectionId(input) {\n return input\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/_+/g, '_');\n}\nexport function getDefaultOAuthAppNameForCollectionId(collectionId) {\n return collectionId.replace(/_/g, '-');\n}\n/**\n * Normalizes a tool collection to the object format.\n * Applies optional `{{var}}` substitution to the URL so manifests can reference\n * deployment-time variables like `{{studio_ui}}`.\n *\n * @param collection - ToolCollectionObject\n * @param vars - Optional endpoint variables to substitute in URLs\n * @returns Normalized ToolCollectionObject\n */\nexport function normalizeToolCollection(collection, vars) {\n if (!collection || typeof collection !== 'object') {\n throw new TypeError('Tool collection must be an object');\n }\n const substitutedUrl = vars && collection.url ? substituteEndpoints(collection.url, vars) : collection.url;\n const urlChanged = substitutedUrl !== collection.url;\n if (collection.type === 'mcp') {\n const fallbackId = deriveMCPCollectionId(collection.id || collection.name || collection.url);\n if (urlChanged || !collection.id) {\n return {\n ...collection,\n url: substitutedUrl,\n id: collection.id || fallbackId,\n };\n }\n }\n else if (urlChanged) {\n return { ...collection, url: substitutedUrl };\n }\n return collection;\n}\n/**\n * Canonical app capabilities Studio renders/supports. The public type is derived from\n * this list so runtime validation and TypeScript cannot drift.\n */\nexport const APP_CAPABILITIES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n];\n/**\n * Header carrying the app version a generated-app UI is running, so studio/zeno resolve app-owned\n * capability refs (`app:<app>:...`) against that exact version instead of the promoted version.\n * Resolution-time only; never persisted. Set by the generated app template via client.withAppVersion.\n */\nexport const APP_VERSION_HEADER = 'x-vertesia-app-version';\n/**\n * The platform-artifact types an app build can be required to create. A finer-grained\n * counterpart to {@link AppCapabilities}: a single `interactions` capability may comprise\n * several `interaction` artifacts plus `agent`, `activity`, and `tool` artifacts that\n * {@link AppCapabilities} folds together. Used by the App Solution Architect manifest and\n * the publish-time capability gate.\n */\nexport const APP_ARTIFACT_TYPES = [\n 'interaction',\n 'agent',\n 'type',\n 'process',\n 'view',\n 'template',\n 'dashboard',\n 'activity',\n 'tool',\n 'hook',\n 'subscription',\n];\nexport const APP_ARTIFACT_STATUSES = ['pending', 'built', 'done'];\n/** Repo-relative path the capability manifest is committed to, read by version-build gates. */\nexport const APP_CAPABILITY_MANIFEST_PATH = 'docs/app-capability-manifest.json';\n/**\n * Resolve the effective access_control policy for an installed app:\n * installation override wins, then manifest default, then `'all'`.\n *\n * Shared by the STS (JWT generation), the studio-server (validation), and the UI (badge display)\n * so the resolution rule lives in exactly one place. Named `effectiveAppAccessControl` (not just\n * `effectiveAccessControl`) because exports from `@vertesia/common` are flattened — the broader\n * name would risk colliding with other access-control families added later.\n */\nexport function effectiveAppAccessControl(installation, manifest) {\n return installation?.access_control ?? manifest?.access_control ?? 'all';\n}\n/**\n * Substitutes `{{key}}` placeholders in a URL with the matching endpoint.\n * Unknown placeholders are left untouched (so failures surface as fetch errors\n * with the unresolved placeholder visible, rather than silently pointing nowhere).\n * Trailing slashes on replacement values are stripped to avoid `//api/...` joins.\n */\nfunction substituteEndpoints(url, endpoints) {\n if (!url || !endpoints)\n return url;\n return url.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (match, key) => {\n const value = endpoints[key];\n if (typeof value !== 'string' || !value)\n return match;\n return trimTrailingSlashes(value);\n });\n}\nfunction trimTrailingSlashes(value) {\n let end = value.length;\n while (end > 0 && value[end - 1] === '/') {\n end--;\n }\n return end === value.length ? value : value.slice(0, end);\n}\n/** Browser-side limits mirrored by the app Git service document endpoint. */\nexport const APP_REPO_DOCUMENT_UPLOAD_MAX_FILE_BYTES = 20 * 1024 * 1024;\nexport const APP_REPO_DOCUMENT_UPLOAD_MAX_TOTAL_BYTES = 80 * 1024 * 1024;\nexport const APP_REPO_DOCUMENT_UPLOAD_MAX_FILES = 20;\nexport const APP_REPO_DOCUMENT_UPLOAD_PREFIX = 'docs/';\n/**\n * Canonical package scopes, including the catch-all `all`. The public type is derived\n * from this list so request parsing and TypeScript cannot drift.\n */\nexport const APP_PACKAGE_SCOPES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n 'settings',\n 'widgets',\n 'activities',\n 'hooks',\n 'subscriptions',\n 'all',\n];\n/** Stable identifiers for the built-in header items. */\nexport const COMPOSITE_APP_HEADER_BUILTIN_IDS = ['app_portal', 'docs', 'help', 'user_menu'];\n//# sourceMappingURL=apps.js.map","export const AUDIT_ACTIONS = [\n // CRUD operations\n 'create',\n 'update',\n 'delete',\n 'bulk_create',\n 'bulk_change_type',\n 'bulk_update',\n 'bulk_delete',\n 'attach',\n 'detach',\n 'credentials_fill',\n 'credentials_totp_generation',\n 'publish',\n 'unpublish',\n // Billable operations\n 'inference',\n 'embedding',\n 'image_generation',\n // Content processing outcomes\n 'document_processed',\n];\n/** Billable audit actions for cost analytics queries */\nexport const BILLABLE_AUDIT_ACTIONS = ['inference', 'embedding', 'image_generation'];\nexport const AUDIT_AGGREGATION_DIMENSIONS = [\n 'time',\n 'action',\n 'resource_type',\n 'event_category',\n 'provider',\n 'project_id',\n 'details.pipeline',\n 'details.verdict',\n 'details.workflow_type',\n 'details.rule_id',\n 'model',\n];\n//# sourceMappingURL=audit-trail.js.map","// Interaction values that exist at runtime and are read by the API schemas.\n//\n// Split out of `interaction.ts` for the reason `project-values.ts` was split out of `project.ts`:\n// `InteractionExecutionConfigurationSchema` is `z.enum(...)` over these two, and importing\n// `interaction.ts` from a schema module at runtime would both be a cycle risk and pull the largest\n// module in the package into every schema consumer. Re-exported from `interaction.ts`, so this is a\n// move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: the first declaration in the file would\n// otherwise inherit this note as its published component `description`, the way `project-values.ts`\n// records.\nexport var RunDataStorageLevel;\n(function (RunDataStorageLevel) {\n RunDataStorageLevel[\"STANDARD\"] = \"STANDARD\";\n RunDataStorageLevel[\"RESTRICTED\"] = \"RESTRICTED\";\n RunDataStorageLevel[\"DEBUG\"] = \"DEBUG\";\n})(RunDataStorageLevel || (RunDataStorageLevel = {}));\nexport var ConfigModes;\n(function (ConfigModes) {\n ConfigModes[\"RUN_AND_INTERACTION_CONFIG\"] = \"RUN_AND_INTERACTION_CONFIG\";\n ConfigModes[\"RUN_CONFIG_ONLY\"] = \"RUN_CONFIG_ONLY\";\n ConfigModes[\"INTERACTION_CONFIG_ONLY\"] = \"INTERACTION_CONFIG_ONLY\";\n})(ConfigModes || (ConfigModes = {}));\n//# sourceMappingURL=interaction-values.js.map","/**\n * Type guard for email channels\n */\nexport function isEmailChannel(channel) {\n return channel.type === 'email';\n}\n/**\n * Type guard for interactive channels\n */\nexport function isInteractiveChannel(channel) {\n return channel.type === 'interactive';\n}\n//# sourceMappingURL=email.js.map","/**\n * `RunDataStorageLevel` and `ConfigModes` live in `./interaction-values.js` so the API schemas can\n * read them without importing this module back. Re-exported here so every existing import path keeps\n * working.\n */\nexport * from './interaction-values.js';\nimport { ConfigModes, RunDataStorageLevel } from './interaction-values.js';\nexport const InteractionNamePopulate = 'id name';\nexport const InteractionRefPopulate = 'id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts';\nexport const InteractionRefWithSchemaPopulate = `${InteractionRefPopulate} result_schema`;\nexport var InteractionStatus;\n(function (InteractionStatus) {\n InteractionStatus[\"draft\"] = \"draft\";\n InteractionStatus[\"published\"] = \"published\";\n InteractionStatus[\"archived\"] = \"archived\";\n InteractionStatus[\"code\"] = \"code\";\n InteractionStatus[\"unknown\"] = \"unknown\";\n})(InteractionStatus || (InteractionStatus = {}));\nexport var ExecutionRunStatus;\n(function (ExecutionRunStatus) {\n ExecutionRunStatus[\"created\"] = \"created\";\n ExecutionRunStatus[\"processing\"] = \"processing\";\n ExecutionRunStatus[\"completed\"] = \"completed\";\n ExecutionRunStatus[\"failed\"] = \"failed\";\n})(ExecutionRunStatus || (ExecutionRunStatus = {}));\nexport var RunDataStorageDescription;\n(function (RunDataStorageDescription) {\n RunDataStorageDescription[\"STANDARD\"] = \"Run data is stored for both the model inputs and output.\";\n RunDataStorageDescription[\"RESTRICTED\"] = \"No run data is stored for the model inputs \\u2014 only the model output.\";\n RunDataStorageDescription[\"DEBUG\"] = \"Run data is stored for the model inputs and output, schema, and final prompt.\";\n})(RunDataStorageDescription || (RunDataStorageDescription = {}));\nexport const RunDataStorageOptions = {\n [RunDataStorageLevel.STANDARD]: RunDataStorageDescription.STANDARD,\n [RunDataStorageLevel.RESTRICTED]: RunDataStorageDescription.RESTRICTED,\n [RunDataStorageLevel.DEBUG]: RunDataStorageDescription.DEBUG,\n};\n/**\n * Defines the scope for agent search operations.\n */\nexport var AgentSearchScope;\n(function (AgentSearchScope) {\n /**\n * Search is scoped to a specific collection.\n */\n AgentSearchScope[\"Collection\"] = \"collection\";\n})(AgentSearchScope || (AgentSearchScope = {}));\n// Re-exported from email.ts for backwards compatibility\nexport { isEmailChannel, isInteractiveChannel, } from './email.js';\nconst AGENT_RESOURCE_TYPES = [\n 'document',\n 'collection',\n 'content_type',\n 'interaction',\n 'prompt',\n 'agent',\n 'workflow',\n 'process',\n 'process_run',\n 'interaction_run',\n 'view',\n];\nconst AGENT_RESOURCE_ACTIONS = ['created', 'updated', 'deleted'];\n/**\n * Validate and normalize an untrusted value into a clean list of resource references. References\n * cross the wire and may originate from external/MCP tools, so malformed entries are dropped\n * rather than throwing, and an empty/absent label falls back to the id.\n */\nexport function normalizeAgentResources(value) {\n if (!Array.isArray(value))\n return [];\n const result = [];\n for (const entry of value) {\n if (!entry || typeof entry !== 'object')\n continue;\n const ref = entry;\n const { type, id, label, action, revision_id } = ref;\n if (typeof type !== 'string' || !AGENT_RESOURCE_TYPES.includes(type))\n continue;\n if (typeof id !== 'string' || id.length === 0)\n continue;\n if (typeof action !== 'string' || !AGENT_RESOURCE_ACTIONS.includes(action))\n continue;\n result.push({\n type: type,\n id,\n label: typeof label === 'string' && label.length > 0 ? label : id,\n action: action,\n ...(typeof revision_id === 'string' && revision_id.length > 0 ? { revision_id } : {}),\n });\n }\n return result;\n}\n/** Extract the normalized resource references a tool declared in its result metadata. */\nexport function getResourcesFromToolResult(result) {\n return normalizeAgentResources(result.meta?.resources);\n}\n// ================= end async execution payloads ====================\nexport var RunSourceTypes;\n(function (RunSourceTypes) {\n RunSourceTypes[\"api\"] = \"api\";\n RunSourceTypes[\"cli\"] = \"cli\";\n RunSourceTypes[\"ui\"] = \"ui\";\n RunSourceTypes[\"webhook\"] = \"webhook\";\n RunSourceTypes[\"test\"] = \"test-data\";\n RunSourceTypes[\"system\"] = \"system\";\n RunSourceTypes[\"schedule\"] = \"schedule\";\n})(RunSourceTypes || (RunSourceTypes = {}));\nexport const ExecutionRunRefSelect = '-result -parameters -result_schema -prompt';\nexport var ConfigModesDescription;\n(function (ConfigModesDescription) {\n ConfigModesDescription[\"RUN_AND_INTERACTION_CONFIG\"] = \"This run configuration is used. Undefined options are filled with interaction configuration.\";\n ConfigModesDescription[\"RUN_CONFIG_ONLY\"] = \"Only this run configuration is used. Undefined options remain undefined.\";\n ConfigModesDescription[\"INTERACTION_CONFIG_ONLY\"] = \"Only interaction configuration is used.\";\n})(ConfigModesDescription || (ConfigModesDescription = {}));\nexport const ConfigModesOptions = {\n [ConfigModes.RUN_AND_INTERACTION_CONFIG]: ConfigModesDescription.RUN_AND_INTERACTION_CONFIG,\n [ConfigModes.RUN_CONFIG_ONLY]: ConfigModesDescription.RUN_CONFIG_ONLY,\n [ConfigModes.INTERACTION_CONFIG_ONLY]: ConfigModesDescription.INTERACTION_CONFIG_ONLY,\n};\n/**\n * Source of the resolved model configuration\n */\nexport var ModelSource;\n(function (ModelSource) {\n /** Model was explicitly provided in the execution config */\n ModelSource[\"config\"] = \"config\";\n /** Model comes from the interaction definition */\n ModelSource[\"interaction\"] = \"interaction\";\n /** Model comes from environment's default_model */\n ModelSource[\"environmentDefault\"] = \"environmentDefault\";\n /** Model comes from project system interaction defaults */\n ModelSource[\"projectSystemDefault\"] = \"projectSystemDefault\";\n /** Model comes from project base defaults */\n ModelSource[\"projectBaseDefault\"] = \"projectBaseDefault\";\n /** Model comes from project modality-specific defaults */\n ModelSource[\"projectModalityDefault\"] = \"projectModalityDefault\";\n /** Model comes from legacy project defaults */\n ModelSource[\"projectLegacyDefault\"] = \"projectLegacyDefault\";\n})(ModelSource || (ModelSource = {}));\n//# sourceMappingURL=interaction.js.map","import { isEmailChannel } from './interaction.js';\n/**\n * Find the email channel from a list of channels.\n * @returns The email channel if found, undefined otherwise\n */\nexport function findEmailChannel(channels) {\n return channels?.find(isEmailChannel);\n}\n/**\n * Check if email channel is enabled in the channels list.\n */\nexport function hasEmailChannel(channels) {\n return !!findEmailChannel(channels);\n}\n/**\n * Update the email channel in a channels array (immutable).\n * Returns a new array with the updated channel.\n * If no email channel exists and to_email is provided, creates one.\n */\nexport function updateEmailChannel(channels, updates) {\n const existing = channels || [];\n const emailIndex = existing.findIndex(isEmailChannel);\n if (emailIndex === -1) {\n // No email channel exists, create one if we have required fields\n if (updates.to_email) {\n return [...existing, { type: 'email', ...updates }];\n }\n return existing;\n }\n // Update existing email channel\n const updated = [...existing];\n updated[emailIndex] = {\n ...updated[emailIndex],\n ...updates,\n type: 'email',\n };\n return updated;\n}\n/**\n * Update email threading info after sending or receiving an email.\n * Adds the new messageId to references and updates in_reply_to.\n */\nexport function updateEmailThreading(channels, messageId, subject) {\n const emailChannel = findEmailChannel(channels);\n if (!emailChannel)\n return channels || [];\n const newReferences = emailChannel.references ? [...emailChannel.references] : [];\n if (!newReferences.includes(messageId)) {\n newReferences.push(messageId);\n }\n return updateEmailChannel(channels, {\n in_reply_to: messageId,\n references: newReferences,\n thread_subject: subject || emailChannel.thread_subject,\n });\n}\n//# sourceMappingURL=channels.js.map","// ============================================================================\n// Column Types\n// ============================================================================\n/**\n * Supported column data types for DuckDB tables.\n */\nexport const DataColumnType = {\n STRING: 'STRING',\n INTEGER: 'INTEGER',\n BIGINT: 'BIGINT',\n FLOAT: 'FLOAT',\n DOUBLE: 'DOUBLE',\n DECIMAL: 'DECIMAL',\n BOOLEAN: 'BOOLEAN',\n DATE: 'DATE',\n TIMESTAMP: 'TIMESTAMP',\n JSON: 'JSON',\n};\n/**\n * Semantic types that provide AI agents with context about column meaning.\n */\nexport const SemanticColumnType = {\n EMAIL: 'email',\n PHONE: 'phone',\n URL: 'url',\n CURRENCY: 'currency',\n PERCENTAGE: 'percentage',\n PERSON_NAME: 'person_name',\n ADDRESS: 'address',\n COUNTRY: 'country',\n DATE_ISO: 'date_iso',\n IDENTIFIER: 'identifier',\n};\n/**\n * Mapping from DataColumnType to DuckDB SQL types.\n */\nexport const DATA_COLUMN_TYPE_TO_DUCKDB = {\n [DataColumnType.STRING]: 'VARCHAR',\n [DataColumnType.INTEGER]: 'INTEGER',\n [DataColumnType.BIGINT]: 'BIGINT',\n [DataColumnType.FLOAT]: 'FLOAT',\n [DataColumnType.DOUBLE]: 'DOUBLE',\n [DataColumnType.DECIMAL]: 'DECIMAL(18,4)',\n [DataColumnType.BOOLEAN]: 'BOOLEAN',\n [DataColumnType.DATE]: 'DATE',\n [DataColumnType.TIMESTAMP]: 'TIMESTAMP',\n [DataColumnType.JSON]: 'JSON',\n};\n// ============================================================================\n// Data Store Types\n// ============================================================================\n/**\n * Data store lifecycle status.\n */\nexport const DataStoreStatus = {\n CREATING: 'creating',\n ACTIVE: 'active',\n ERROR: 'error',\n ARCHIVED: 'archived',\n};\n// ============================================================================\n// Import Types\n// ============================================================================\n/**\n * Import job status.\n */\nexport const ImportStatus = {\n PENDING: 'pending',\n PROCESSING: 'processing',\n COMPLETED: 'completed',\n FAILED: 'failed',\n ROLLED_BACK: 'rolled_back',\n};\n/**\n * Default retention configuration: 30 days, snapshots exempt.\n */\nexport const DEFAULT_RETENTION_CONFIG = {\n retention_days: 30,\n snapshots_exempt: true,\n};\n// ============================================================================\n// Dashboard Types\n// ============================================================================\n/**\n * Dashboard lifecycle status.\n */\nexport const DashboardStatus = {\n /** Dashboard is active and usable */\n ACTIVE: 'active',\n /** Dashboard has been archived (soft deleted) */\n ARCHIVED: 'archived',\n};\n/**\n * Default layout configuration for dashboards.\n *\n * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.\n */\nexport const DEFAULT_DASHBOARD_LAYOUT = {\n columns: 2,\n cellWidth: 600,\n cellHeight: 400,\n padding: 20,\n};\n//# sourceMappingURL=data-platform.js.map","// Explicit model exceptions\nconst RECORD_MODEL_CAPABILITIES = {\n // claude-3-5-haiku: no image input\n 'claude-3-5-haiku-20241022': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Family-level capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n 'claude-3-5-haiku': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-haiku': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-sonnet': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-opus': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-7': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\nconst DEFAULT_CLAUDE_CAPABILITIES = {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n};\nexport function getModelCapabilitiesAnthropic(model) {\n const lower = model.toLowerCase();\n // Exact match first\n if (lower in RECORD_MODEL_CAPABILITIES) {\n return RECORD_MODEL_CAPABILITIES[lower];\n }\n // Longest prefix family match\n let bestKey;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (lower.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n if (bestKey) {\n return RECORD_FAMILY_CAPABILITIES[bestKey];\n }\n return DEFAULT_CLAUDE_CAPABILITIES;\n}\n//# sourceMappingURL=anthropic.js.map","// Global feature flags - temporarily disable tool support for non-OpenAI models\nconst ENABLE_TOOL_SUPPORT_NON_OPENAI = false;\n// Record of Azure Foundry model capabilities keyed by model ID (lowercased)\n// Only include models with specific exceptions that differ from their family patterns\nconst RECORD_MODEL_CAPABILITIES = {\n // OpenAI O-series exceptions - o1-mini doesn't have tool support like other o1 models\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // OpenAI o3 is text-only unlike other o-series models\n o3: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Models with special properties not covered by family patterns\n 'deepseek-r1-0528': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3-0324': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-medium-2505': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-nemo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-4-scout-17b-16e-instruct': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n // OpenAI GPT families\n 'gpt-3.5-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // OpenAI O-series families\n o1: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-preview': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-pro': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o3-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o4-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o4: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Llama families\n 'llama-3.1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-3.3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Mistral families\n 'mistral-large': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'mistral-small': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n mistral: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Microsoft Phi families\n 'phi-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n phi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // DeepSeek families\n 'deepseek-r1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // AI21 families\n 'ai21-jamba': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n ai21: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n jamba: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // Cohere families\n 'cohere-command': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n cohere: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n command: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // xAI families\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n grok: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image', 'vision'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'gpt-4',\n 'gpt-4o',\n 'o1',\n 'o3',\n 'o4',\n 'llama-3',\n 'mistral-large',\n 'mistral-small',\n 'jamba',\n 'cohere',\n 'command',\n 'grok',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for an Azure Foundry model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to family pattern matching.\n */\nexport function getModelCapabilitiesAzureFoundry(model) {\n // Extract base model from composite ID (deployment::baseModel)\n const { baseModel } = parseAzureFoundryModelId(model);\n const normalized = baseModel.toLowerCase();\n // 1. Exact match in record\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n return applyGlobalToolSupportDisable(record, normalized);\n }\n // 2. Fallback: find the longest matching family prefix in RECORD_FAMILY_CAPABILITIES\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES[bestFamilyKey], normalized);\n }\n // 3. Fallback: infer from normalized name using patterns\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || true, // Default to text input\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || true, // Default to text output\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n const tool_support_streaming = tool_support || undefined;\n const inferredCapabilities = { input, output, tool_support, tool_support_streaming };\n return applyGlobalToolSupportDisable(inferredCapabilities, normalized);\n}\n/**\n * Apply global tool support disable for non-OpenAI models.\n * Preserves model-specific information for future use while temporarily disabling tool support.\n */\nfunction applyGlobalToolSupportDisable(capabilities, modelName) {\n // Check if this is an OpenAI model\n const isOpenAIModel = modelName.startsWith('gpt-') ||\n modelName.startsWith('o1') ||\n modelName.startsWith('o3') ||\n modelName.startsWith('o4');\n if (!ENABLE_TOOL_SUPPORT_NON_OPENAI && !isOpenAIModel) {\n // Disable tool support for non-OpenAI models while preserving other capabilities\n return {\n ...capabilities,\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n return capabilities;\n}\n// Helper function to parse composite model IDs\nfunction parseAzureFoundryModelId(compositeId) {\n const parts = compositeId.split('::');\n if (parts.length === 2) {\n return {\n deploymentName: parts[0],\n baseModel: parts[1],\n };\n }\n // Backwards compatibility: if no delimiter found, treat as deployment name\n return {\n deploymentName: compositeId,\n baseModel: compositeId,\n };\n}\n//# sourceMappingURL=azure_foundry.js.map","function includesAny(model, patterns) {\n return patterns.some((pattern) => model.includes(pattern));\n}\nfunction isFamilyVersionGte(model, family, targetMajor, targetMinor = 0) {\n const familyIndex = model.indexOf(family);\n if (familyIndex === -1)\n return false;\n const match = model.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nexport function normalizeBedrockModelId(model) {\n const normalized = model.toLowerCase();\n const slash = normalized.lastIndexOf('/');\n const modelId = slash === -1 ? normalized : normalized.slice(slash + 1);\n return normalized.includes('inference-profile/') ? modelId.replace(/^[^.]+\\./, '') : modelId;\n}\nfunction getModalities(model) {\n if (includesAny(model, ['nova-2-multimodal-embeddings', 'titan-embed', 'cohere.embed', 'marengo-embed'])) {\n return {\n input: {\n text: true,\n image: includesAny(model, ['multimodal', 'embed-image', 'embed-v4', 'marengo']),\n video: includesAny(model, ['multimodal', 'marengo']),\n audio: model.includes('multimodal'),\n embed: false,\n },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n };\n }\n if (includesAny(model, ['nova-canvas', 'titan-image-generator'])) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n };\n }\n if (model.includes('nova-reel')) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: false, embed: false },\n };\n }\n const image = (model.includes('anthropic.claude') && !model.includes('claude-3-5-haiku')) ||\n (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('google.gemma') ||\n includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b', 'meta.llama4']) ||\n includesAny(model, [\n 'mistral.magistral-',\n 'mistral.ministral-3-',\n 'mistral.mistral-large-3-',\n 'mistral.pixtral-',\n ]) ||\n isFamilyVersionGte(model, 'kimi-k', 2, 5) ||\n model.includes('nemotron-nano-12b') ||\n model.includes('qwen3-vl') ||\n model.includes('palmyra-vision') ||\n (model.startsWith('openai.gpt-') && !model.includes('gpt-oss')) ||\n model.startsWith('xai.grok-');\n const video = (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('twelvelabs.pegasus') ||\n isFamilyVersionGte(model, 'google.gemma-', 4);\n const audio = includesAny(model, ['nova-sonic', 'mistral.voxtral-']) || model.includes('google.gemma-4-e2b');\n return {\n input: { text: !model.includes('nova-sonic-v1'), image, video, audio, embed: false },\n output: { text: true, image: false, video: false, audio: model.includes('nova-sonic'), embed: false },\n };\n}\nfunction getLimits(model) {\n if (model.includes('ai21.jamba'))\n return { context_window: 256_000, max_output_tokens: 4_096 };\n if (model.includes('amazon.nova-2'))\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n if (model.includes('amazon.nova-premier'))\n return { context_window: 1_000_000, max_output_tokens: 25_600 };\n if (model.includes('amazon.nova-micro'))\n return { context_window: 128_000, max_output_tokens: 5_120 };\n if (includesAny(model, ['amazon.nova-lite', 'amazon.nova-pro'])) {\n return { context_window: 300_000, max_output_tokens: 5_120 };\n }\n if (model.includes('anthropic.claude')) {\n if (includesAny(model, [\n 'claude-fable-5',\n 'claude-mythos',\n 'claude-sonnet-5',\n 'claude-opus-4-6',\n 'claude-opus-4-7',\n 'claude-opus-4-8',\n ])) {\n // Bedrock enforces an EXCLUSIVE 128K bound for this family: it rejects\n // max_tokens >= 128000 with \"Try again with a maximum tokens value that\n // is lower than 128000\" (same exclusive-bound quirk as Haiku 4.5 below).\n return { context_window: 1_000_000, max_output_tokens: 127_999 };\n }\n if (model.includes('claude-sonnet-4-6'))\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n // Bedrock documents 64K for Haiku 4.5 but rejects max_tokens=64000; its upper bound is exclusive.\n if (model.includes('claude-haiku-4-5'))\n return { context_window: 200_000, max_output_tokens: 63_999 };\n if (includesAny(model, ['claude-opus-4-5', 'claude-sonnet-4'])) {\n return { context_window: 200_000, max_output_tokens: 65_536 };\n }\n if (model.includes('claude-opus-4-1'))\n return { context_window: 200_000, max_output_tokens: 32_000 };\n if (model.includes('claude-3-5-haiku'))\n return { context_window: 200_000, max_output_tokens: 8_192 };\n if (model.includes('claude-3-haiku'))\n return { context_window: 200_000, max_output_tokens: 4_096 };\n }\n if (model.includes('cohere.command-r'))\n return { context_window: 128_000, max_output_tokens: 4_096 };\n if (isFamilyVersionGte(model, 'deepseek.v', 3, 2)) {\n return { context_window: 163_840, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['deepseek.v3', 'deepseek.r1']))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('google.gemma-4-31b') || model.includes('google.gemma-4-26b')) {\n return { context_window: 256_000 };\n }\n if (model.includes('google.gemma-4-e2b'))\n return { context_window: 128_000 };\n if (model.includes('google.gemma-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('meta.llama4-scout'))\n return { context_window: 10_000_000, max_output_tokens: 8_192 };\n if (model.includes('meta.llama4-maverick'))\n return { context_window: 1_000_000, max_output_tokens: 8_192 };\n if (model.includes('meta.llama3-') &&\n !model.includes('llama3-1') &&\n !model.includes('llama3-2') &&\n !model.includes('llama3-3')) {\n return { context_window: 8_192, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['meta.llama3-1', 'meta.llama3-2', 'meta.llama3-3'])) {\n return { context_window: 128_000, max_output_tokens: 4_096 };\n }\n if (isFamilyVersionGte(model, 'minimax.minimax-m', 2, 1)) {\n return { context_window: 196_000, max_output_tokens: 8_192 };\n }\n if (model.includes('minimax.minimax-m2'))\n return { context_window: 1_000_000, max_output_tokens: 8_192 };\n if (includesAny(model, ['mistral.devstral-2', 'mistral.mistral-large-3'])) {\n return { context_window: 256_000, max_output_tokens: 32_768 };\n }\n if (model.includes('mistral.magistral-'))\n return { context_window: 128_000, max_output_tokens: 40_960 };\n if (model.includes('mistral.ministral-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('mistral.pixtral-'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (includesAny(model, [\n 'mistral.mistral-7b',\n 'mistral.mistral-large-2402',\n 'mistral.mistral-small-2402',\n 'mistral.mixtral-',\n 'mistral.voxtral-',\n ])) {\n return { context_window: 32_000, max_output_tokens: model.includes('voxtral') ? undefined : 4_096 };\n }\n if (includesAny(model, ['moonshot.kimi-k2', 'moonshotai.kimi-k2'])) {\n return { context_window: 256_000, max_output_tokens: 16_384 };\n }\n if (includesAny(model, ['nvidia.nemotron-nano-3', 'nvidia.nemotron-super-3'])) {\n return { context_window: 256_000, max_output_tokens: model.includes('super') ? 32_768 : 8_192 };\n }\n if (model.includes('nvidia.nemotron-nano-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.startsWith('openai.gpt-5'))\n return { context_window: 272_000 };\n if (model.includes('openai.gpt-oss'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-235b'))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-32b'))\n return { context_window: 32_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-coder-30b'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-480b'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-next'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (includesAny(model, ['qwen3-next-', 'qwen3-vl-']))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('writer.palmyra-vision'))\n return { context_window: 4_096, max_output_tokens: 4_096 };\n if (includesAny(model, ['writer.palmyra-x4', 'writer.palmyra-x5'])) {\n return { context_window: 128_000, max_output_tokens: 8_192 };\n }\n if (model.startsWith('xai.grok-'))\n return { context_window: 1_000_000 };\n if (includesAny(model, ['zai.glm-4.7', 'zai.glm-4.6']))\n return { context_window: 203_000, max_output_tokens: 4_096 };\n if (model.includes('zai.glm-5'))\n return { context_window: 200_000, max_output_tokens: 131_072 };\n return {};\n}\nfunction getRuntimeToolSupport(model) {\n let toolSupport = false;\n let streaming = false;\n if (model.includes('anthropic.claude')) {\n toolSupport = true;\n streaming = !model.includes('claude-3-5-haiku');\n }\n else if (model.includes('ai21.jamba') && !model.includes('jamba-instruct')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('amazon.nova') && !includesAny(model, ['nova-canvas', 'nova-reel'])) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('cohere.command-r')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('meta.llama3-1')) {\n toolSupport = true;\n }\n else if (includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b'])) {\n toolSupport = true;\n }\n else if (includesAny(model, ['mistral.mistral-large', 'mistral.pixtral'])) {\n toolSupport = true;\n }\n else if (model.includes('twelvelabs.pegasus')) {\n toolSupport = true;\n }\n else if (model.includes('writer.palmyra')) {\n toolSupport = true;\n }\n return { tool_support: toolSupport, tool_support_streaming: toolSupport && streaming };\n}\nexport function getBedrockModelKnowledge(model) {\n const modelId = normalizeBedrockModelId(model);\n return { ...getModalities(modelId), ...getLimits(modelId) };\n}\nexport function getBedrockModelCapabilities(model, endpoint) {\n const modelId = normalizeBedrockModelId(model);\n if (endpoint === 'runtime' &&\n ((modelId.startsWith('openai.gpt-') && !modelId.includes('gpt-oss')) ||\n modelId.startsWith('xai.grok-') ||\n isFamilyVersionGte(modelId, 'google.gemma-', 4))) {\n return { input: {}, output: {} };\n }\n const knowledge = getBedrockModelKnowledge(modelId);\n const toolSupport = endpoint === 'mantle' ? { tool_support: true, tool_support_streaming: true } : getRuntimeToolSupport(modelId);\n return {\n input: knowledge.input,\n output: knowledge.output,\n ...toolSupport,\n };\n}\n//# sourceMappingURL=bedrock-models.js.map","import { getBedrockModelCapabilities } from './bedrock-models.js';\nexport function getModelCapabilitiesBedrock(model) {\n return getBedrockModelCapabilities(model, 'runtime');\n}\n//# sourceMappingURL=bedrock.js.map","// ============== Provider details ===============\nexport var Providers;\n(function (Providers) {\n Providers[\"openai\"] = \"openai\";\n Providers[\"openai_compatible\"] = \"openai_compatible\";\n Providers[\"azure_openai\"] = \"azure_openai\";\n Providers[\"azure_foundry\"] = \"azure_foundry\";\n Providers[\"huggingface_ie\"] = \"huggingface_ie\";\n Providers[\"replicate\"] = \"replicate\";\n Providers[\"bedrock\"] = \"bedrock\";\n Providers[\"bedrock_mantle\"] = \"bedrock_mantle\";\n Providers[\"vertexai\"] = \"vertexai\";\n Providers[\"togetherai\"] = \"togetherai\";\n Providers[\"mistralai\"] = \"mistralai\";\n Providers[\"groq\"] = \"groq\";\n Providers[\"watsonx\"] = \"watsonx\";\n Providers[\"xai\"] = \"xai\";\n Providers[\"anthropic\"] = \"anthropic\";\n})(Providers || (Providers = {}));\nexport const ProviderList = {\n openai: {\n id: Providers.openai,\n name: 'OpenAI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n azure_openai: {\n id: Providers.azure_openai,\n name: 'Azure OpenAI',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n azure_foundry: {\n id: Providers.azure_foundry,\n name: 'Microsoft Foundry',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n huggingface_ie: {\n id: Providers.huggingface_ie,\n name: 'HuggingFace Inference Endpoint',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n },\n replicate: {\n id: Providers.replicate,\n name: 'Replicate',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: true,\n },\n bedrock: {\n id: Providers.bedrock,\n name: 'Amazon Bedrock',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n endpointPlaceholder: 'region name (eg. us-east-1)',\n supportSearch: false,\n },\n bedrock_mantle: {\n id: Providers.bedrock_mantle,\n name: 'Amazon Bedrock Mantle',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'region name (eg. us-west-2)',\n supportSearch: false,\n },\n vertexai: {\n id: Providers.vertexai,\n name: 'Google Agent Platform (Vertex AI)',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n togetherai: {\n id: Providers.togetherai,\n name: 'Together AI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n mistralai: {\n id: Providers.mistralai,\n name: 'Mistral AI',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n groq: {\n id: Providers.groq,\n name: 'Groq Cloud',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n watsonx: {\n id: Providers.watsonx,\n name: 'IBM WatsonX',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n xai: {\n id: Providers.xai,\n name: 'xAI (Grok)',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n openai_compatible: {\n id: Providers.openai_compatible,\n name: 'OpenAI Compatible',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'https://api.example.com/v1',\n supportSearch: false,\n },\n anthropic: {\n id: Providers.anthropic,\n name: 'Anthropic',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\n/**\n * Standardized error class for Llumiverse driver errors.\n *\n * Normalizes errors from different LLM providers (OpenAI, Anthropic, Bedrock, VertexAI, etc.)\n * into a consistent format. The primary value is the `retryable` flag, which enables upstream\n * consumers to implement smart retry logic.\n *\n * @example\n * ```typescript\n * try {\n * const result = await driver.execute(segments, options);\n * } catch (error) {\n * if (LlumiverseError.isLlumiverseError(error)) {\n * console.log(`Provider: ${error.context.provider}`);\n * console.log(`Model: ${error.context.model}`);\n * console.log(`Retryable: ${error.retryable}`);\n *\n * if (error.retryable) {\n * // Implement retry logic with exponential backoff\n * await retryWithBackoff(() => driver.execute(segments, options));\n * } else {\n * // Handle non-retryable error (e.g., invalid API key, malformed request)\n * logError(error);\n * }\n * }\n * throw error;\n * }\n * ```\n */\nexport class LlumiverseError extends Error {\n /**\n * HTTP status code (e.g., 429, 500) if available.\n * Undefined if the error doesn't have a numeric status code.\n */\n code;\n /**\n * Provider-specific error name/type (e.g., \"ThrottlingException\", \"ValidationException\").\n * Optional - used to preserve the semantic error type from the provider SDK.\n */\n name;\n /**\n * Whether this error is retryable.\n * - True: Definitely retryable (rate limits, timeouts, server errors)\n * - False: Definitely not retryable (auth failures, invalid requests, malformed schemas)\n * - Undefined: Unknown retryability - allows consumers to decide default behavior\n *\n * When undefined, consumers can choose their retry strategy:\n * - Conservative: Don't retry unknown errors (avoid spam)\n * - Resilient: Retry unknown errors (prioritize success)\n */\n retryable;\n /**\n * Context about where and how the error occurred.\n * Includes provider, model, operation type.\n */\n context;\n /**\n * The original error from the provider SDK.\n * Preserved for debugging and detailed error inspection.\n */\n originalError;\n constructor(message, retryable, context, originalError, code, name) {\n super(message);\n this.name = name || 'LlumiverseError';\n this.code = code;\n this.retryable = retryable;\n this.context = context;\n this.originalError = originalError;\n // Preserve stack trace from original error if available\n if (originalError instanceof Error && originalError.stack) {\n this.stack = originalError.stack;\n }\n }\n /**\n * Serialize the error to JSON for logging or transmission.\n * Includes all error properties except the original error object itself.\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n retryable: this.retryable,\n context: this.context,\n stack: this.stack,\n // Include original error message if available\n originalErrorMessage: this.originalError instanceof Error ? this.originalError.message : String(this.originalError),\n };\n }\n /**\n * Type guard to check if an error is a LlumiverseError.\n * Useful for conditional error handling.\n *\n * @param error - The error to check\n * @returns True if the error is a LlumiverseError\n */\n static isLlumiverseError(error) {\n return error instanceof LlumiverseError;\n }\n}\n//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n SharedOptions[\"effort\"] = \"effort\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\n/**\n * @deprecated This is deprecated. Use CompletionResult.type information instead.\n */\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { OptionType, SharedOptions } from '../types.js';\nexport const textOptionsFallback = {\n _option_id: 'text-fallback',\n options: [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n {\n name: SharedOptions.temperature,\n type: OptionType.numeric,\n min: 0.0,\n default: 0.7,\n integer: false,\n step: 0.1,\n description: 'A higher temperature biases toward less likely tokens, making the model more creative',\n },\n {\n name: SharedOptions.top_p,\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: false,\n step: 0.1,\n description: 'Limits token sampling to the cumulative probability of the top p tokens',\n },\n {\n name: SharedOptions.top_k,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 1,\n description: 'Limits token sampling to the top k tokens',\n },\n {\n name: SharedOptions.presence_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens if they appear at least once in the text',\n },\n {\n name: SharedOptions.frequency_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens based on their frequency in the text',\n },\n {\n name: SharedOptions.stop_sequence,\n type: OptionType.string_list,\n value: [],\n description: 'The generation will halt if one of the stop sequences is output',\n },\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: 'Include visible model reasoning as separate thoughts results.',\n },\n ],\n};\n//# sourceMappingURL=fallback.js.map","/**\n * Version parsing utilities for Claude, OpenAI, and Gemini models.\n *\n * Provides version detection helpers that are forward-compatible with future\n * model releases (e.g., Fable 5, Mythos 5, GPT-5.6, and Gemini 3.5).\n *\n * These helpers are used to:\n * - Control option visibility in the UI\n * - Construct appropriate API payloads for each model version\n *\n * Note: llumiverse does NOT validate options here. Errors from invalid\n * parameters propagate to the provider side.\n */\n// ============================================================================\n// Generic Model-Family Version Parsing\n// ============================================================================\n/**\n * Check a numeric model-family suffix using major/minor ordering.\n *\n * The family includes the stable part immediately before the version, for\n * example `openai.gpt-`, `xai.grok-`, or `deepseek.v`. This deliberately\n * accepts later versions so new models inherit the newest known behavior.\n */\nexport function isModelFamilyVersionGTE(modelString, family, targetMajor, targetMinor) {\n const normalized = modelString.toLowerCase();\n const familyIndex = normalized.indexOf(family.toLowerCase());\n if (familyIndex === -1)\n return false;\n const version = normalized.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!version)\n return false;\n const major = Number(version[1]);\n const minor = Number(version[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nfunction isClaudeVariant(value) {\n return value === 'opus' || value === 'sonnet' || value === 'haiku' || value === 'fable' || value === 'mythos';\n}\n/**\n * Parse Claude model version from a model string.\n *\n * Examples:\n * - \"claude-opus-4-7\" -> { major: 4, minor: 7, variant: 'opus' }\n * - \"claude-sonnet-4-6\" -> { major: 4, minor: 6, variant: 'sonnet' }\n * - \"claude-3-7-sonnet-20250219\" -> { major: 3, minor: 7, variant: 'sonnet' }\n * - \"claude-opus-4-6\" -> { major: 4, minor: 6, variant: 'opus' }\n *\n * @param modelString - The model identifier string\n * @returns Parsed version info, or null if not parseable\n */\nexport function parseClaudeVersion(modelString) {\n if (/claude-mythos-preview(?:-|\\b)/i.test(modelString)) {\n return { major: 5, minor: 0, variant: 'mythos' };\n }\n // Match pattern: claude-[variant-]-{major}-[optional minor]\n // The minor version is limited to 1-2 digits to avoid matching dates (YYYYMMDD format)\n const match = modelString.match(/claude-(opus|sonnet|haiku|fable|mythos)-?(\\d+)(?:-(\\d{1,2}))?(?:-|\\b)/i);\n if (match) {\n const variant = match[1].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n const major = parseInt(match[2], 10);\n const minor = match[3] ? parseInt(match[3], 10) : 0;\n return { major, minor, variant };\n }\n // Fallback for older format: claude-3-7-sonnet-20250219\n const fallbackMatch = modelString.match(/claude-(\\d+)-(\\d+)-(opus|sonnet|haiku|fable|mythos)(?:-|\\b)/i);\n if (fallbackMatch) {\n const major = parseInt(fallbackMatch[1], 10);\n const minor = parseInt(fallbackMatch[2], 10);\n const variant = fallbackMatch[3].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n return { major, minor, variant };\n }\n return null;\n}\n/**\n * Check if a Claude model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model version is >= target version, false otherwise\n */\nexport function isClaudeVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n if (version.major > targetMajor) {\n return true;\n }\n if (version.major === targetMajor && version.minor >= targetMinor) {\n return true;\n }\n return false;\n}\n/**\n * Check if a Claude variant model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param variant - Model family: \"opus\" or \"sonnet\"\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model matches the variant and version >= target\n */\nfunction isClaudeVariantVersionGTE(modelString, variant, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version)\n return false;\n if (version.variant.toLowerCase() !== variant)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\n/**\n * Check if a model requires sampling parameter removal (behavior: sampling params removed on Opus 4.7+).\n *\n * This includes:\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 7\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.7+ or equivalent future model\n */\nexport function hasSamplingParameterRemoval(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 7);\n}\n/**\n * Check if a model requires adaptive thinking (behavior: adaptive thinking required on Opus 4.6+).\n *\n * This includes:\n * - claude-opus-4-6\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 6\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.6+ or equivalent future model\n */\nexport function requiresAdaptiveThinking(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 6);\n}\n/**\n * Check if a model supports adaptive thinking.\n *\n * Adaptive thinking was introduced in:\n * - Claude Opus 4.6\n * - Claude Sonnet 4.6\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports adaptive thinking\n */\nexport function supportsAdaptiveThinking(modelString) {\n return (isClaudeVersionGTE(modelString, 5, 0) ||\n requiresAdaptiveThinking(modelString) ||\n isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6));\n}\n/**\n * Check if extended thinking is deprecated for this model.\n *\n * Extended thinking (thinking.type: \"enabled\" with budget_tokens) is deprecated\n * but still functional on:\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is deprecated (adaptive thinking recommended)\n */\nexport function isExtendedThinkingDeprecated(modelString) {\n return supportsAdaptiveThinking(modelString);\n}\n/**\n * Check if a model requires adaptive thinking ONLY (extended thinking removed).\n *\n * On Opus 4.7+, extended thinking returns a 400 error. Only adaptive thinking is supported.\n * Future models (Sonnet 4.7+, Haiku 4.7+, any 5.0+) follow the same pattern.\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is removed (returns 400 error)\n */\nexport function requiresAdaptiveThinkingOnly(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/**\n * Check if a model has sampling parameter restrictions.\n *\n * On Opus 4.7+, setting temperature, top_p, or top_k to any non-default value\n * returns a 400 error. Future models following the same pattern will also match:\n * - Opus 4.7+ (current restriction)\n * - Sonnet 4.7+, Haiku 4.7+ (future minor versions >= 7)\n * - Sonnet 5.0+, Haiku 5.0+, Opus 5.0+ (future major versions)\n *\n * @param modelString - The model identifier string\n * @returns true if sampling parameters are restricted\n */\nexport function hasSamplingParameterRestriction(modelString) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n // Future major versions (5.0+) follow the same pattern as 4.7\n if (version.major > 4) {\n return true;\n }\n // Version 4.7+ (Opus 4.7, Sonnet 4.7, Haiku 4.7, etc.)\n if (version.major === 4 && version.minor >= 7) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the effort parameter.\n *\n * Effort is supported on:\n * - Claude Opus 4.5+\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n * - All variants at 4.7+ (Opus, Sonnet, Haiku)\n * - All variants at 5.0+\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports the effort parameter\n */\nexport function supportsEffort(modelString) {\n // All 4.7+ variants support effort (covers future Sonnet 4.7, Haiku 4.7, etc.)\n if (hasSamplingParameterRestriction(modelString)) {\n return true;\n }\n // Opus 4.5+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'opus', 4, 5)) {\n return true;\n }\n // Sonnet 4.6+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6)) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the xhigh effort level.\n *\n * xhigh is available on the sampling-restricted Claude generation and Mythos Preview.\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports xhigh effort\n */\nexport function supportsXHighEffort(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/** Parse GPT family versions from bare IDs, snapshots, or provider-qualified paths. */\nexport function parseOpenAIGptVersion(modelString) {\n const match = modelString.toLowerCase().match(/(?:^|[./:])(?:openai\\.)?gpt-(\\d+)(?:\\.(\\d+))?(?:-|[.:@]|$)/);\n if (!match)\n return null;\n return { major: Number(match[1]), minor: Number(match[2] ?? '0') };\n}\nexport function isOpenAIGptVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseOpenAIGptVersion(modelString);\n if (!version)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\nexport function isOpenAIGptProModel(modelString) {\n return /(?:^|[./:])(?:openai\\.)?gpt-\\d+(?:\\.\\d+)?-pro(?:-|[.:@]|$)/i.test(modelString);\n}\n/** Current reasoning-effort metadata, expressed with version thresholds for future GPT releases. */\nexport function getOpenAIReasoningEffortLevels(modelString) {\n if (!isOpenAIGptVersionGTE(modelString, 5, 0))\n return null;\n if (isOpenAIGptProModel(modelString)) {\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { Medium: 'medium', 'High (default)': 'high', 'Extra High': 'xhigh' };\n }\n return { 'High (only)': 'high' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 6)) {\n return {\n None: 'none',\n Low: 'low',\n Medium: 'medium',\n High: 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high', 'Extra High': 'xhigh' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 1)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\n/**\n * Get the available effort levels for a given Claude model.\n *\n * - Opus 4.7+: low, medium, high, xhigh, max\n * - Opus 4.5+, Opus 4.6+, Sonnet 4.6+: low, medium, high, max\n * - Other models: empty (effort not supported)\n *\n * @param modelString - The model identifier string\n * @returns Record of display label to effort level value, or null if not supported\n */\nexport function getAvailableEffortLevels(modelString) {\n if (!supportsEffort(modelString)) {\n return null;\n }\n const levels = {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n Max: 'max',\n };\n if (supportsXHighEffort(modelString)) {\n // Insert xhigh between high and max\n return {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n return levels;\n}\n// ============================================================================\n// Gemini Version Parsing\n// ============================================================================\n/**\n * Extract Gemini version from a model ID.\n *\n * Examples:\n * - \"locations/global/publishers/google/models/gemini-2.5-flash\" -> \"2.5\"\n * - \"publishers/google/models/gemini-3-pro-image-preview\" -> \"3\"\n * - \"gemini-3.1-flash-lite-preview\" -> \"3.1\"\n *\n * @param modelId - The model identifier string\n * @returns Version string (e.g., \"2.5\", \"3\", \"3.1\"), or undefined if not parseable\n */\nexport function getGeminiModelVersion(modelId) {\n const modelName = modelId.split('/').pop() ?? modelId;\n const match = modelName.match(/^gemini-(\\d+(?:\\.\\d+)?)/i);\n return match?.[1];\n}\n/**\n * Parse a version string into major.minor components.\n *\n * @param version - Version string (e.g., \"2.5\", \"3\", \"3.1\")\n * @returns Parsed version, or undefined if not parseable\n */\nexport function parseGeminiVersion(version) {\n const match = version.match(/^(\\d+)(?:\\.(\\d+))?$/);\n if (!match) {\n return undefined;\n }\n return {\n major: Number(match[1]),\n minor: Number(match[2] ?? '0'),\n };\n}\n/**\n * Check if a Gemini model version is greater than or equal to a minimum version.\n *\n * @param modelId - The model identifier string\n * @param minVersion - Minimum version string (e.g., \"2.5\", \"3.0\")\n * @returns true if model version >= min version\n */\nexport function isGeminiModelVersionGte(modelId, minVersion) {\n const modelVersion = getGeminiModelVersion(modelId);\n if (!modelVersion) {\n return false;\n }\n const current = parseGeminiVersion(modelVersion);\n const target = parseGeminiVersion(minVersion);\n if (!current || !target) {\n return false;\n }\n if (current.major > target.major) {\n return true;\n }\n if (current.major < target.major) {\n return false;\n }\n return current.minor >= target.minor;\n}\n//# sourceMappingURL=version-parsing.js.map","import { getBedrockModelKnowledge } from '../capability/bedrock-models.js';\nimport { OptionType } from '../types.js';\nimport { getAnthropicOptions } from './anthropic.js';\nimport { textOptionsFallback } from './fallback.js';\nimport { isModelFamilyVersionGTE } from './version-parsing.js';\nconst CHAT_COMPLETIONS_PUBLISHERS = new Set([\n 'deepseek',\n 'minimax',\n 'mistral',\n 'moonshot',\n 'moonshotai',\n 'nvidia',\n 'qwen',\n 'writer',\n 'zai',\n]);\nconst PUBLISHERS = {\n anthropic: 'Anthropic',\n deepseek: 'DeepSeek',\n google: 'Google',\n minimax: 'MiniMax',\n mistral: 'Mistral AI',\n moonshot: 'Moonshot AI',\n moonshotai: 'Moonshot AI',\n nvidia: 'NVIDIA',\n openai: 'OpenAI',\n qwen: 'Qwen',\n writer: 'Writer',\n xai: 'xAI',\n zai: 'Z.AI',\n};\nfunction getPublisher(model) {\n return model.split('.')[0];\n}\nfunction supportsImageInput(model) {\n return getBedrockModelKnowledge(model).input.image === true;\n}\nexport function getBedrockMantleProtocol(model) {\n const normalized = model.toLowerCase();\n const publisher = getPublisher(normalized);\n if (publisher === 'anthropic' && normalized.includes('.claude-'))\n return 'messages';\n if (publisher === 'openai') {\n // GPT-OSS works through Bedrock Runtime Converse, but on Bedrock Mantle the\n // Responses route has proven unavailable/unreliable. Keep the whole OSS\n // family on Chat Completions, including future and safeguard variants.\n if (normalized.includes('.gpt-oss'))\n return 'chat_completions';\n if (normalized.includes('.gpt-'))\n return 'responses';\n return undefined;\n }\n if (publisher === 'xai' && normalized.includes('.grok-'))\n return 'responses';\n if (publisher === 'google' && normalized.includes('.gemma-')) {\n // Gemma 3 uses /v1/chat/completions. Gemma 4 moved to the OpenAI-compatible\n // /openai/v1 endpoint and supports Responses, which is our preferred API.\n // Later numeric generations inherit the latest known Gemma behavior.\n if (isModelFamilyVersionGTE(normalized, 'google.gemma-', 4, 0))\n return 'responses';\n if (isModelFamilyVersionGTE(normalized, 'google.gemma-', 3, 0))\n return 'chat_completions';\n return undefined;\n }\n if (CHAT_COMPLETIONS_PUBLISHERS.has(publisher))\n return 'chat_completions';\n return undefined;\n}\nexport function getBedrockMantleModelInfo(model) {\n const normalized = model.toLowerCase();\n const protocol = getBedrockMantleProtocol(normalized);\n if (!protocol)\n return undefined;\n const publisher = getPublisher(normalized);\n return {\n protocol,\n owner: PUBLISHERS[publisher] ?? publisher,\n };\n}\nexport function getBedrockMantleModelFamily(model) {\n if (getBedrockMantleProtocol(model) !== 'responses')\n return undefined;\n const normalized = model.toLowerCase();\n if (normalized.startsWith('openai.'))\n return 'openai';\n if (normalized.startsWith('xai.grok-'))\n return 'grok';\n return undefined;\n}\nfunction maxTokensOption(model) {\n return {\n name: 'max_tokens',\n type: OptionType.numeric,\n min: 1,\n max: getBedrockModelKnowledge(model).max_output_tokens,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n };\n}\nfunction getResponsesOptions(model) {\n const normalized = model.toLowerCase();\n const isGrok = normalized.startsWith('xai.grok-');\n const reasoningEffortEnum = isGrok\n ? { none: 'none', low: 'low', medium: 'medium', high: 'high' }\n : { low: 'low', medium: 'medium', high: 'high', xhigh: 'xhigh' };\n const reasoningEffortDefault = isGrok ? 'low' : 'medium';\n const options = [maxTokensOption(model)];\n if (isGrok) {\n options.push({\n name: 'temperature',\n type: OptionType.numeric,\n min: 0,\n default: 0.7,\n integer: false,\n step: 0.1,\n description: 'A higher temperature biases toward less likely tokens, making the model more creative',\n }, {\n name: 'top_p',\n type: OptionType.numeric,\n min: 0,\n max: 1,\n default: 0.95,\n integer: false,\n step: 0.1,\n description: 'Limits the model to the most probable tokens whose cumulative probability is top_p',\n });\n }\n options.push({\n name: 'effort',\n type: OptionType.enum,\n enum: reasoningEffortEnum,\n default: reasoningEffortDefault,\n description: 'The reasoning effort of the model, which affects the quality and speed of the response',\n }, {\n name: 'reasoning_effort',\n type: OptionType.enum,\n enum: reasoningEffortEnum,\n default: reasoningEffortDefault,\n description: 'Alias for effort; controls how much reasoning the model performs before responding',\n });\n if (!isGrok) {\n options.push({\n name: 'verbosity',\n type: OptionType.enum,\n enum: { low: 'low', medium: 'medium', high: 'high' },\n default: 'medium',\n description: 'Controls how concise or verbose the model response should be',\n });\n }\n if (supportsImageInput(normalized)) {\n options.push({\n name: 'image_detail',\n type: OptionType.enum,\n enum: { Low: 'low', High: 'high', Auto: 'auto' },\n default: 'auto',\n description: 'Controls how the model processes an input image',\n });\n }\n return { _option_id: 'bedrock-mantle-responses', options };\n}\nfunction getChatCompletionsOptions(model) {\n const allowedOptions = new Set(['max_tokens', 'temperature', 'top_p', 'stop_sequence', 'include_thoughts']);\n const maxOutputTokens = getBedrockModelKnowledge(model).max_output_tokens;\n return {\n _option_id: 'bedrock-mantle-chat-completions',\n options: textOptionsFallback.options\n .filter((option) => allowedOptions.has(option.name))\n .map((option) => (option.name === 'max_tokens' ? { ...option, max: maxOutputTokens } : option)),\n };\n}\nexport function getBedrockMantleOptions(model, option) {\n switch (getBedrockMantleProtocol(model)) {\n case 'responses':\n return getResponsesOptions(model);\n case 'chat_completions':\n return getChatCompletionsOptions(model);\n case 'messages': {\n const anthropicOptions = getAnthropicOptions(model, option);\n return { ...anthropicOptions, _option_id: 'bedrock-mantle-claude' };\n }\n default:\n return textOptionsFallback;\n }\n}\n//# sourceMappingURL=bedrock_mantle.js.map","import { getBedrockMantleModelInfo } from '../options/bedrock_mantle.js';\nimport { getBedrockModelCapabilities } from './bedrock-models.js';\nexport function getModelCapabilitiesBedrockMantle(model) {\n const info = getBedrockMantleModelInfo(model);\n if (!info) {\n return { input: {}, output: {} };\n }\n return getBedrockModelCapabilities(model, 'mantle');\n}\n//# sourceMappingURL=bedrock_mantle.js.map","// Record of OpenAI model capabilities keyed by model ID (lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'chatgpt-4o-latest': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\n// For OpenAI, tool_support_streaming matches tool_support since the API supports tools while streaming\nconst RECORD_FAMILY_CAPABILITIES = {\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-3.5': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4-turbo': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'chatgpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'dall-e': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'o1-preview': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'omni-moderation': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n sora: {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: true, embed: false },\n tool_support: false,\n },\n 'text-embedding': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n tool_support: false,\n },\n 'text-moderation': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n whisper: {\n input: { text: false, image: false, video: false, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = ['tool', 'gpt', 'gpt-5', 'o1', 'o3', 'o4'];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeOpenAIModelName(modelName) {\n return modelName.toLowerCase();\n}\n/**\n * Get the full ModelCapabilities for an OpenAI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n * For OpenAI models, tool_support_streaming defaults to tool_support since the API supports tools while streaming.\n */\nexport function getModelCapabilitiesOpenAI(model) {\n const normalized = normalizeOpenAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...record,\n tool_support_streaming: record.tool_support_streaming ?? record.tool_support,\n };\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n const family = RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...family,\n tool_support_streaming: family.tool_support_streaming ?? family.tool_support,\n };\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n // Default tool_support_streaming to tool_support for OpenAI models\n return { input, output, tool_support, tool_support_streaming: tool_support };\n}\n//# sourceMappingURL=openai.js.map","// Record of Vertex AI model capabilities keyed by model ID (last path segment, lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'gemini-2.0-flash-lite-001': {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemma-4-26b-a4b-it-maas': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Default family capabilities intentionally describe the latest known behavior for a model family.\n// Newer Vertex models should inherit these defaults by prefix until proven otherwise; add model-specific\n// records above only for older variants or materially different models that do not match the family default.\nconst RECORD_FAMILY_CAPABILITIES = {\n gemini: {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gemini-2.5-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-pro-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n imagen: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n claude: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-2': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n grok: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n gemma: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n glm: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n kimi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n minimax: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n qwen: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'sonnet',\n 'opus',\n 'gemini',\n 'claude',\n 'grok',\n 'deepseek',\n 'gemma',\n 'glm',\n 'gpt-oss',\n 'kimi',\n 'llama',\n 'minimax',\n 'qwen',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeVertexAIModelName(modelName) {\n const segments = modelName.toLowerCase().split('/');\n return segments[segments.length - 1];\n}\n/**\n * Get the full ModelCapabilities for a Vertex AI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesVertexAI(model) {\n const normalized = normalizeVertexAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record)\n return record;\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=vertexai.js.map","import { getModelCapabilitiesAnthropic } from './capability/anthropic.js';\nimport { getModelCapabilitiesAzureFoundry } from './capability/azure_foundry.js';\nimport { getModelCapabilitiesBedrock } from './capability/bedrock.js';\nimport { getModelCapabilitiesBedrockMantle } from './capability/bedrock_mantle.js';\nimport { getModelCapabilitiesOpenAI } from './capability/openai.js';\nimport { getModelCapabilitiesVertexAI } from './capability/vertexai.js';\nimport { Providers } from './types.js';\nexport function getModelCapabilities(model, provider) {\n //Check for locations/<location>/ prefix and remove it\n if (model.startsWith('locations/')) {\n const parts = model.split('/');\n if (parts.length >= 3) {\n model = parts.slice(2).join('/');\n }\n }\n const capabilities = _getModelCapabilities(model, provider);\n // Globally disable audio and video for all models, as we don't support them yet\n // TODO: Remove this when we add support.\n capabilities.input.audio = false;\n capabilities.output.audio = false;\n capabilities.output.video = false;\n // tool_support_streaming is optional: when omitted, supportsToolUse falls back to tool_support.\n // Only set it explicitly to false for models that can tool-call but not while streaming.\n return capabilities;\n}\nfunction _getModelCapabilities(model, provider) {\n switch (provider?.toLowerCase()) {\n case Providers.anthropic:\n return getModelCapabilitiesAnthropic(model);\n case Providers.vertexai:\n return getModelCapabilitiesVertexAI(model);\n case Providers.openai:\n return getModelCapabilitiesOpenAI(model);\n case Providers.openai_compatible:\n return getModelCapabilitiesOpenAICompatible(model);\n case Providers.bedrock:\n return getModelCapabilitiesBedrock(model);\n case Providers.bedrock_mantle:\n return getModelCapabilitiesBedrockMantle(model);\n case Providers.azure_foundry:\n // Azure Foundry uses OpenAI capabilities\n return getModelCapabilitiesAzureFoundry(model);\n case Providers.groq:\n case Providers.mistralai:\n // These providers host text models that generally support tool use\n return getModelCapabilitiesOpenAICompatible(model);\n case Providers.togetherai:\n // Same OpenAI-compatible tool-use default, but also flag the natively-multimodal\n // model families TogetherAI hosts so is_multimodal is reported correctly.\n return getModelCapabilitiesTogetherAI(model);\n case Providers.xai:\n // xAI (Grok) uses the OpenAI Responses API; tool use matches OpenAI-compatible defaults.\n // Do not set tool_support_streaming — leave it unset so it defaults to tool_support.\n return {\n input: { text: true, image: model.includes('vision') },\n output: { text: true },\n tool_support: true,\n };\n default:\n // Guess the provider based on the model name\n if (model.startsWith('gpt')) {\n return getModelCapabilitiesOpenAI(model);\n }\n else if (model.startsWith('claude')) {\n return getModelCapabilitiesAnthropic(model);\n }\n else if (model.startsWith('grok')) {\n // xAI Grok models (provider omitted — same as Providers.xai)\n return {\n input: { text: true, image: model.includes('vision') },\n output: { text: true },\n tool_support: true,\n };\n }\n else if (model.startsWith('publishers/')) {\n return getModelCapabilitiesVertexAI(model);\n }\n else if (model.startsWith('arn:aws')) {\n return getModelCapabilitiesBedrock(model);\n }\n // Fallback to a generic model with no capabilities\n return { input: {}, output: {} };\n }\n}\n// Patterns for models known NOT to support tool use on OpenAI-compatible endpoints\nconst NO_TOOL_SUPPORT_PATTERNS = ['image', 'embed', 'moderation', 'whisper', 'sora', 'dall-e', 'tts'];\n/**\n * For OpenAI-compatible endpoints (e.g., OpenRouter), try OpenAI capability lookup first.\n * If no explicit match is found, default to tool_support: true since most models\n * on these platforms support tool use. Blacklist known non-tool-supporting patterns.\n */\nfunction getModelCapabilitiesOpenAICompatible(model) {\n const caps = getModelCapabilitiesOpenAI(model);\n if (caps.tool_support !== undefined) {\n return caps;\n }\n const normalized = model.toLowerCase();\n const isNonToolModel = NO_TOOL_SUPPORT_PATTERNS.some((p) => normalized.includes(p));\n return {\n input: { text: true },\n output: { text: true },\n tool_support: !isNonToolModel,\n tool_support_streaming: !isNonToolModel,\n };\n}\n// TogetherAI vision-capable model families. Conservative on purpose: only families that are\n// natively multimodal when served on Together are listed, so text-only models are not falsely\n// flagged as multimodal. This list can be extended as Together adds vision models.\nconst TOGETHER_VISION_PATTERNS = [\n 'vision', // meta-llama/Llama-3.2-*-Vision-Instruct\n 'llama-4', // Llama 4 Scout / Maverick are natively multimodal\n 'gemma-3', // Gemma 3 is multimodal (gemma-2 and earlier are text-only)\n 'qwen2-vl',\n 'qwen2.5-vl',\n '-vl-', // generic Qwen*-VL / other *-VL-* naming\n];\n/**\n * TogetherAI capability resolver. Starts from the OpenAI-compatible defaults (tool_support, etc.)\n * and additionally marks `input.image: true` for known natively-multimodal families, so the\n * driver's `is_multimodal` flag is accurate. TogetherAI vision requests are sent via the shared\n * OpenAI Chat Completions driver path.\n */\nfunction getModelCapabilitiesTogetherAI(model) {\n const caps = getModelCapabilitiesOpenAICompatible(model);\n const normalized = model.toLowerCase();\n if (TOGETHER_VISION_PATTERNS.some((p) => normalized.includes(p))) {\n caps.input = { ...caps.input, image: true };\n }\n return caps;\n}\nexport function supportsToolUse(model, provider, streaming = false) {\n const capabilities = getModelCapabilities(model, provider);\n if (!streaming) {\n return !!capabilities.tool_support;\n }\n // Unset tool_support_streaming means \"same as tool_support\" (OpenAI-compatible default).\n // Only an explicit false opts out of tools-while-streaming.\n return !!(capabilities.tool_support_streaming ?? capabilities.tool_support);\n}\nexport function modelModalitiesToArray(modalities) {\n return Object.entries(modalities)\n .filter(([_, isSupported]) => isSupported)\n .map(([modality]) => modality);\n}\n//# sourceMappingURL=capability.js.map","import { OptionType, SharedOptions, } from '../types.js';\nimport { getMaxOutputTokens } from './context-windows.js';\nimport { textOptionsFallback } from './fallback.js';\nimport { buildClaudeCacheOptions, buildClaudeCacheTtlOptions, buildClaudeEffortOptions, buildClaudeIncludeThoughtsOption, buildClaudeThinkingBudgetOption, getClaudeMaxTokensLimit, } from './shared-parsing.js';\nimport { hasSamplingParameterRestriction, isGeminiModelVersionGte } from './version-parsing.js';\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport var ThinkingLevel;\n(function (ThinkingLevel) {\n ThinkingLevel[\"HIGH\"] = \"HIGH\";\n ThinkingLevel[\"MEDIUM\"] = \"MEDIUM\";\n ThinkingLevel[\"LOW\"] = \"LOW\";\n ThinkingLevel[\"MINIMAL\"] = \"MINIMAL\";\n ThinkingLevel[\"THINKING_LEVEL_UNSPECIFIED\"] = \"THINKING_LEVEL_UNSPECIFIED\";\n})(ThinkingLevel || (ThinkingLevel = {}));\n/** Models that support Flex processing (shared, cost-efficient tier). */\nconst FLEX_SUPPORTED_GEMINI_MODELS = [\n 'gemini-3.1-flash-lite-preview',\n 'gemini-3.1-flash-image-preview',\n 'gemini-3.1-pro-preview',\n 'gemini-3-flash-preview',\n 'gemini-3-pro-image-preview',\n];\nexport function isFlexSupportedGeminiModel(model) {\n const modelName = model.split('/').pop() ?? model;\n return FLEX_SUPPORTED_GEMINI_MODELS.some((m) => modelName.includes(m));\n}\nexport function getVertexAiOptions(model, option) {\n if (model.includes('imagen-')) {\n return getImagenOptions(model, option);\n }\n else if (model.includes('gemini')) {\n return getGeminiOptions(model, option);\n }\n else if (model.includes('claude')) {\n return getClaudeOptions(model, option);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getOpenMaaSChatOptions(model);\n }\n return textOptionsFallback;\n}\nfunction getImagenOptions(model, option) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images,\n type: OptionType.numeric,\n min: 1,\n max: 4,\n default: 1,\n integer: true,\n description: 'Number of Images to generate',\n },\n {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n min: 0,\n max: 4294967295,\n default: 12,\n integer: true,\n description: 'The seed of the generated image',\n },\n {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Disallow the inclusion of people or faces in images': 'dont_allow',\n 'Allow generation of adults only': 'allow_adult',\n 'Allow generation of people of all ages': 'allow_all',\n },\n default: 'allow_adult',\n description: 'The safety setting for allowing the generation of people in the image',\n },\n {\n name: 'safety_setting',\n type: OptionType.enum,\n enum: {\n 'Block very few problematic prompts and responses': 'block_none',\n 'Block only few problematic prompts and responses': 'block_only_high',\n 'Block some problematic prompts and responses': 'block_medium_and_above',\n 'Strictest filtering': 'block_low_and_above',\n },\n default: 'block_medium_and_above',\n description: 'The overall safety setting',\n },\n ];\n const outputOptions = [\n {\n name: 'image_file_type',\n type: OptionType.enum,\n enum: { JPEG: 'image/jpeg', PNG: 'image/png' },\n default: 'image/png',\n description: 'The file type of the generated image',\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: 'jpeg_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 75,\n integer: true,\n description: 'The compression quality of the JPEG image',\n };\n if (option?.image_file_type === 'image/jpeg') {\n outputOptions.push(jpegQuality);\n }\n if (model.includes('generate')) {\n // Generate models\n const modeOptions = [\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { '1:1': '1:1', '4:3': '4:3', '3:4': '3:4', '16:9': '16:9', '9:16': '9:16' },\n default: '1:1',\n description: 'The aspect ratio of the generated image',\n },\n {\n name: 'add_watermark',\n type: OptionType.boolean,\n default: false,\n description: 'Add an invisible watermark to the generated image, useful for detection of AI images',\n },\n ];\n const enhanceOptions = !model.includes('generate-001')\n ? [\n {\n name: 'enhance_prompt',\n type: OptionType.boolean,\n default: true,\n description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\",\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [...commonOptions, ...modeOptions, ...outputOptions, ...enhanceOptions],\n };\n }\n if (model.includes('capability')) {\n // Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: 'edit_mode',\n type: OptionType.enum,\n enum: {\n EDIT_MODE_INPAINT_REMOVAL: 'EDIT_MODE_INPAINT_REMOVAL',\n EDIT_MODE_INPAINT_INSERTION: 'EDIT_MODE_INPAINT_INSERTION',\n EDIT_MODE_BGSWAP: 'EDIT_MODE_BGSWAP',\n EDIT_MODE_OUTPAINT: 'EDIT_MODE_OUTPAINT',\n CUSTOMIZATION_SUBJECT: 'CUSTOMIZATION_SUBJECT',\n CUSTOMIZATION_STYLE: 'CUSTOMIZATION_STYLE',\n CUSTOMIZATION_CONTROLLED: 'CUSTOMIZATION_CONTROLLED',\n CUSTOMIZATION_INSTRUCT: 'CUSTOMIZATION_INSTRUCT',\n },\n description: 'The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.',\n },\n {\n name: 'guidance_scale',\n type: OptionType.numeric,\n min: 0,\n max: 500,\n default: guidanceScaleDefault,\n integer: true,\n description: 'How closely the generation follows the prompt',\n },\n ];\n const maskOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'mask_mode',\n type: OptionType.enum,\n enum: {\n MASK_MODE_USER_PROVIDED: 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND: 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND: 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC: 'MASK_MODE_SEMANTIC',\n },\n default: 'MASK_MODE_USER_PROVIDED',\n description: 'How should the mask for the generation be provided',\n },\n {\n name: 'mask_dilation',\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: true,\n description: 'The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.',\n },\n ]\n : [];\n const maskClassOptions = option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC\n ? [\n {\n name: 'mask_class',\n type: OptionType.string_list,\n default: [],\n description: 'Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids',\n },\n ]\n : [];\n const editOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'edit_steps',\n type: OptionType.numeric,\n default: 75,\n integer: true,\n description: 'The number of steps for the base image generation, more steps means more time and better quality',\n },\n ]\n : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED ||\n option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT\n ? [\n {\n name: 'controlType',\n type: OptionType.enum,\n enum: {\n 'Face Mesh': 'CONTROL_TYPE_FACE_MESH',\n Canny: 'CONTROL_TYPE_CANNY',\n Scribble: 'CONTROL_TYPE_SCRIBBLE',\n },\n default: 'CONTROL_TYPE_CANNY',\n description: 'Method used to generate the control image',\n },\n {\n name: 'controlImageComputation',\n type: OptionType.boolean,\n default: true,\n description: 'Should the control image be computed from the input image, or is it provided',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ],\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiEffortOptions(model) {\n if (model.includes('gemini-3-pro-image')) {\n return { High: 'high' };\n }\n if (model.includes('gemini-3.1-flash-image')) {\n return { Minimal: 'minimal', High: 'high' };\n }\n if (model.includes('gemini-3.1-pro')) {\n return { Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\nfunction getGeminiThinkingOptionItems(model) {\n return [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: SharedOptions.effort,\n type: OptionType.enum,\n enum: getGeminiEffortOptions(model),\n description: 'Higher thinking levels may improve quality, but increase response times and token costs',\n },\n ];\n}\nfunction getGeminiOptions(model, option) {\n // Special handling for gemini image / nano banana models\n if (model.includes('image')) {\n const isGemini25OrLater = isGeminiModelVersionGte(model, '2.5');\n const isGemini3OrLater = isGeminiModelVersionGte(model, '3.0');\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\n 'max_tokens',\n 'presence_penalty',\n 'frequency_penalty',\n 'seed',\n 'top_k',\n 'include_thoughts',\n ];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Set max temperature to 2.0\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature && option.type === OptionType.numeric) {\n return {\n ...option,\n max: 2.0,\n };\n }\n return option;\n });\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'Maximum output tokens',\n },\n ];\n const imageOptions = [];\n // Aspect ratio, person generation, prominent people: 2.5+\n if (isGemini25OrLater) {\n imageOptions.push({\n name: 'image_aspect_ratio',\n type: OptionType.enum,\n enum: {\n '1:1': '1:1',\n '2:3': '2:3',\n '3:2': '3:2',\n '3:4': '3:4',\n '4:3': '4:3',\n '9:16': '9:16',\n '16:9': '16:9',\n '21:9': '21:9',\n },\n default: '1:1',\n description: 'Aspect ratio of the generated images',\n }, {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Allow all people': 'ALLOW_ALL',\n 'Allow adults only': 'ALLOW_ADULT',\n 'Do not generate people': 'ALLOW_NONE',\n },\n default: 'ALLOW_ALL',\n description: 'Controls the generation of people in images',\n }, {\n name: 'prominent_people',\n type: OptionType.enum,\n enum: {\n 'Allow prominent people': 'ALLOW_PROMINENT_PEOPLE',\n 'Block prominent people': 'BLOCK_PROMINENT_PEOPLE',\n },\n description: 'Controls whether prominent people (celebrities) can be generated',\n });\n }\n // Resolution settings: 3.0+\n if (isGemini3OrLater) {\n imageOptions.push({\n name: 'image_size',\n type: OptionType.enum,\n enum: {\n '1K': '1K',\n '2K': '2K',\n '4K': '4K',\n },\n default: '1K',\n description: 'Size of generated images',\n });\n }\n // Output format: all image models\n imageOptions.push({\n name: 'output_mime_type',\n type: OptionType.enum,\n enum: {\n PNG: 'image/png',\n JPEG: 'image/jpeg',\n },\n default: 'image/png',\n description: 'MIME type of the generated image',\n refresh: true,\n });\n if (option?.output_mime_type === 'image/jpeg') {\n imageOptions.push({\n name: 'output_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 90,\n integer: true,\n description: 'Compression quality for JPEG images (0-100)',\n });\n }\n // Thinking options: 3.0+ (same as non-image counterparts)\n const thinkingOptions = isGemini3OrLater ? getGeminiThinkingOptionItems(model) : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, ...imageOptions, ...thinkingOptions],\n };\n }\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'include_thoughts'];\n const commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n const seedOption = {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n integer: true,\n description: 'The seed for the generation, useful for reproducibility',\n };\n if (isGeminiModelVersionGte(model, '3.0')) {\n const flexOptions = isFlexSupportedGeminiModel(model)\n ? [\n {\n name: 'flex',\n type: OptionType.boolean,\n default: false,\n description: 'Use Flex processing tier for cost-efficient, batch-style execution with relaxed latency.',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ...getGeminiThinkingOptionItems(model),\n ...flexOptions,\n ],\n };\n }\n if (model.includes('-2.5-')) {\n // Gemini 2.5 thinking models\n // Set budget token ranges based on model variant\n let budgetMin = -1;\n let budgetMax = 24576;\n let budgetDescription = '';\n if (model.includes('flash-lite')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash Lite default: Model does not think. ' +\n 'Range: 512-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('flash')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 0-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('pro')) {\n budgetMin = -1;\n budgetMax = 32768;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Pro default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 128-32768 tokens. ' +\n 'Cannot disable thinking - minimum 128 tokens. Set to -1 for dynamic thinking.';\n }\n const geminiThinkingOptions = [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: 'thinking_budget_tokens',\n type: OptionType.numeric,\n min: budgetMin,\n max: budgetMax,\n default: undefined,\n integer: true,\n step: 100,\n description: budgetDescription,\n },\n ];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption, ...geminiThinkingOptions],\n };\n }\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption],\n };\n}\nfunction getClaudeOptions(model, option) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'presence_penalty', 'frequency_penalty', 'include_thoughts'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Opus 4.7+ models no longer support temperature, top_p, top_k (returns 400 error)\n // Opus 4.6 and Sonnet 4.6 still support these parameters\n const hasSamplingRestriction = hasSamplingParameterRestriction(model);\n if (hasSamplingRestriction) {\n commonOptions = commonOptions.filter((option) => option.name !== SharedOptions.temperature &&\n option.name !== SharedOptions.top_p &&\n option.name !== 'top_k');\n }\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n return {\n _option_id: 'vertexai-claude',\n options: [\n ...max_tokens,\n ...commonOptions,\n ...buildClaudeEffortOptions(model),\n ...buildClaudeThinkingBudgetOption(model),\n ...buildClaudeIncludeThoughtsOption(model),\n ...buildClaudeCacheOptions(),\n ...buildClaudeCacheTtlOptions(option?.cache_enabled),\n ],\n };\n}\nfunction isOpenMaaSChatModel(model) {\n const normalized = model.toLowerCase();\n // Open MaaS chat option support is family-based on purpose: new model releases inherit the\n // current OpenAI-compatible option surface unless a specific older model needs an exception.\n return ['deepseek', 'gemma-', 'glm-', 'gpt-oss', 'grok', 'kimi', 'llama', 'minimax', 'qwen', 'zai-org'].some((modelPart) => normalized.includes(modelPart));\n}\nfunction getOpenMaaSChatOptions(model) {\n const max_tokens_limit = getMaxOutputTokens(model);\n const excludeOptions = ['max_tokens', 'top_k', 'presence_penalty', 'frequency_penalty'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n commonOptions = commonOptions.map((commonOption) => {\n if (model.includes('llama') &&\n commonOption.name === SharedOptions.temperature &&\n commonOption.type === OptionType.numeric) {\n return {\n ...commonOption,\n max: 1.0,\n };\n }\n return commonOption;\n });\n return {\n _option_id: 'text-fallback',\n options: [...max_tokens, ...commonOptions],\n };\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes('image')) {\n return isGeminiModelVersionGte(model, '2.5') ? 32768 : 8192;\n }\n if (model.includes('thinking') || isGeminiModelVersionGte(model, '2.5')) {\n return 65535; // API upper bound is exclusive\n }\n if (model.includes('ultra') || model.includes('vision')) {\n return 2048;\n }\n return 8192;\n}\nexport function getMaxTokensLimitVertexAi(model) {\n if (model.includes('imagen-')) {\n return 0; // Imagen models do not have a max tokens limit in the same way as text models\n }\n else if (model.includes('claude')) {\n return getClaudeMaxTokensLimit(model);\n }\n else if (model.includes('gemini')) {\n return getGeminiMaxTokensLimit(model);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getMaxOutputTokens(model);\n }\n return 8192; // Default fallback limit\n}\n//# sourceMappingURL=vertexai.js.map","import { ProviderList, Providers } from '@llumiverse/common';\n// Virtual providers from studio\nexport var CustomProviders;\n(function (CustomProviders) {\n CustomProviders[\"virtual_lb\"] = \"virtual_lb\";\n CustomProviders[\"virtual_mediator\"] = \"virtual_mediator\";\n CustomProviders[\"test\"] = \"test\";\n})(CustomProviders || (CustomProviders = {}));\n// The const and the type are one declaration in two halves: the object is what `z.enum()` reads the\n// members off, and the type is inferred back from that schema rather than restated as\n// `Providers | CustomProviders` — which is the same union, but a second statement of it.\nexport const SupportedProviders = {\n ...Providers,\n ...CustomProviders,\n};\nexport const CustomProvidersList = {\n virtual_lb: {\n id: CustomProviders.virtual_lb,\n name: 'Virtual - Load Balancer',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n virtual_mediator: {\n id: CustomProviders.virtual_mediator,\n name: 'Virtual - Mediator',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n test: {\n id: CustomProviders.test,\n name: 'Test LLM',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\nexport const SupportedProvidersList = {\n ...ProviderList,\n ...CustomProvidersList,\n};\n/**\n * Returns the configured Vertex AI bucket access principal for an environment, or undefined.\n * Only Vertex AI environments expose this setting; the value is trimmed and empty strings\n * are treated as unset so callers get a single, normalized representation.\n */\nexport function getVertexBucketAccessPrincipal(env) {\n if (!env || env.provider !== SupportedProviders.vertexai)\n return undefined;\n const principal = env.settings?.bucket_access_principal;\n return typeof principal === 'string' && principal.trim().length > 0 ? principal.trim() : undefined;\n}\n//# sourceMappingURL=environment.js.map","export const MEMBERS_GROUP_NAME = 'members';\n//# sourceMappingURL=group.js.map","function stripLeadingWildcard(host) {\n return host.startsWith('*.') ? host.slice(2) : host;\n}\nfunction stripIPv6Brackets(host) {\n return host.startsWith('[') && host.endsWith(']') ? host.slice(1, -1) : host;\n}\nfunction looksLikeBareIpv6(host) {\n const firstColon = host.indexOf(':');\n return firstColon >= 0 && host.indexOf(':', firstColon + 1) >= 0 && !host.startsWith('[');\n}\nfunction hasWhitespace(host) {\n return (host.includes(' ') ||\n host.includes('\\t') ||\n host.includes('\\n') ||\n host.includes('\\r') ||\n host.includes('\\f') ||\n host.includes('\\v'));\n}\nexport function normalizeHost(value) {\n if (typeof value !== 'string')\n return undefined;\n let input = value.trim().toLowerCase();\n if (!input)\n return undefined;\n input = stripLeadingWildcard(input);\n input = input.endsWith('.') ? input.slice(0, -1) : input;\n if (!input.includes('://')) {\n input = looksLikeBareIpv6(input) ? `https://[${input}]` : `https://${input}`;\n }\n try {\n const url = new URL(input);\n let host = stripLeadingWildcard(stripIPv6Brackets(url.hostname.toLowerCase()));\n host = host.endsWith('.') ? host.slice(0, -1) : host;\n return host && !hasWhitespace(host) ? host : undefined;\n }\n catch {\n return undefined;\n }\n}\nexport function hostFromUrl(value, baseUrl) {\n try {\n const url = baseUrl ? new URL(value, baseUrl) : new URL(value);\n return normalizeHost(url.hostname);\n }\n catch {\n return undefined;\n }\n}\nexport function normalizeHostList(value) {\n if (!Array.isArray(value))\n return [];\n return Array.from(new Set(value.map((entry) => normalizeHost(entry)).filter((entry) => !!entry)));\n}\nexport function hostMatchesAny(host, allowlist) {\n if (!allowlist || allowlist.length === 0)\n return true;\n const normalizedHost = normalizeHost(host);\n if (!normalizedHost)\n return false;\n return allowlist.some((entry) => {\n const normalizedEntry = normalizeHost(entry);\n return (!!normalizedEntry && (normalizedHost === normalizedEntry || normalizedHost.endsWith(`.${normalizedEntry}`)));\n });\n}\nexport function urlMatchesAnyHost(url, allowlist, baseUrl) {\n if (!allowlist || allowlist.length === 0)\n return true;\n const host = hostFromUrl(url, baseUrl);\n return !!host && hostMatchesAny(host, allowlist);\n}\nexport function isLocalhostOrVertesiaHost(value) {\n const host = normalizeHost(value);\n return (!!host &&\n (host === 'localhost' ||\n host === '127.0.0.1' ||\n host === '::1' ||\n host === 'vertesia.io' ||\n host.endsWith('.vertesia.io')));\n}\nexport function isLocalhostOrVertesiaUrl(value) {\n const host = hostFromUrl(value);\n return isLocalhostOrVertesiaHost(host);\n}\n//# sourceMappingURL=host-utils.js.map","export var SupportedIntegrations;\n(function (SupportedIntegrations) {\n SupportedIntegrations[\"gladia\"] = \"gladia\";\n SupportedIntegrations[\"github\"] = \"github\";\n SupportedIntegrations[\"aws\"] = \"aws\";\n SupportedIntegrations[\"magic_pdf\"] = \"magic_pdf\";\n SupportedIntegrations[\"serper\"] = \"serper\";\n SupportedIntegrations[\"exa\"] = \"exa\";\n SupportedIntegrations[\"linkup\"] = \"linkup\";\n SupportedIntegrations[\"resend\"] = \"resend\";\n SupportedIntegrations[\"ask_user_webhook\"] = \"ask_user_webhook\";\n})(SupportedIntegrations || (SupportedIntegrations = {}));\nexport function withProjectIntegrationDiscriminator(integration, config) {\n return {\n ...config,\n integration,\n };\n}\n//# sourceMappingURL=integrations.js.map","export var MeterNames;\n(function (MeterNames) {\n MeterNames[\"analyzed_pages\"] = \"analyzed_pages\";\n MeterNames[\"extracted_tables\"] = \"extracted_tables\";\n MeterNames[\"analyzed_images\"] = \"analyzed_images\";\n MeterNames[\"input_token_used\"] = \"input_token_used\";\n MeterNames[\"output_token_used\"] = \"output_token_used\";\n MeterNames[\"task_run\"] = \"task_run\";\n})(MeterNames || (MeterNames = {}));\n//# sourceMappingURL=meters.js.map","import { Permission } from './access-control.js';\nexport const OAUTH_SCOPE_OPENID = 'openid';\nexport const OAUTH_SCOPE_PROFILE = 'profile';\nexport const OAUTH_SCOPE_OFFLINE_ACCESS = 'offline_access';\nexport const OAUTH_SCOPE_PROJECT_SWITCH = 'project_switch';\nexport const OAUTH_STANDARD_SCOPES = [OAUTH_SCOPE_OPENID, OAUTH_SCOPE_PROFILE, OAUTH_SCOPE_OFFLINE_ACCESS];\nexport const OAUTH_PLATFORM_SCOPES = [OAUTH_SCOPE_PROJECT_SWITCH];\nconst NON_OAUTH_PERMISSION_SCOPES = new Set([\n Permission.api_key_secret_read,\n Permission.manage_billing,\n Permission.billing_read,\n Permission.iam_impersonate,\n Permission.studio_access,\n]);\nconst OAUTH_PERMISSION_SCOPES = Object.values(Permission).filter((scope) => !NON_OAUTH_PERMISSION_SCOPES.has(scope));\nconst OAUTH_STANDARD_SCOPE_SET = new Set(OAUTH_STANDARD_SCOPES);\nconst OAUTH_PLATFORM_SCOPE_SET = new Set(OAUTH_PLATFORM_SCOPES);\nconst OAUTH_PERMISSION_SCOPE_SET = new Set(OAUTH_PERMISSION_SCOPES);\nconst OBJECT_ID_PATTERN = /^[0-9a-f]{24}$/i;\nconst OAUTH_PROJECT_BINDING_SCOPE_PREFIX = 'project:';\nexport function getOAuthPermissionScopes() {\n return [...OAUTH_PERMISSION_SCOPES];\n}\nexport function isOAuthStandardScope(scope) {\n return OAUTH_STANDARD_SCOPE_SET.has(scope);\n}\nexport function isOAuthPlatformScope(scope) {\n return OAUTH_PLATFORM_SCOPE_SET.has(scope);\n}\nexport function isOAuthPermissionScope(scope) {\n return OAUTH_PERMISSION_SCOPE_SET.has(scope);\n}\nexport function isOAuthSupportedScope(scope) {\n return isOAuthStandardScope(scope) || isOAuthPlatformScope(scope) || isOAuthPermissionScope(scope);\n}\nexport function isOAuthProjectBindingScope(scope) {\n if (!scope.startsWith(OAUTH_PROJECT_BINDING_SCOPE_PREFIX)) {\n return false;\n }\n return OBJECT_ID_PATTERN.test(scope.slice(OAUTH_PROJECT_BINDING_SCOPE_PREFIX.length));\n}\nexport function createOAuthProjectBindingScope(projectId) {\n return `${OAUTH_PROJECT_BINDING_SCOPE_PREFIX}${projectId}`;\n}\nexport function hasOAuthOpenIdScope(scopes) {\n return scopes.includes(OAUTH_SCOPE_OPENID);\n}\nexport function hasOAuthProfileScope(scopes) {\n return scopes.includes(OAUTH_SCOPE_PROFILE);\n}\nexport function hasOAuthOfflineAccessScope(scopes) {\n return scopes.includes(OAUTH_SCOPE_OFFLINE_ACCESS);\n}\nexport function hasOAuthProjectSwitchScope(scopes) {\n return scopes.includes(OAUTH_SCOPE_PROJECT_SWITCH);\n}\nexport function getOAuthScopesWithProfileDependency(scopes) {\n if (!hasOAuthOpenIdScope(scopes)) {\n return scopes.filter((scope) => scope !== OAUTH_SCOPE_PROFILE);\n }\n return [...scopes];\n}\nexport function extractOAuthPermissionScopes(scopes) {\n return scopes.filter(isOAuthPermissionScope);\n}\n//# sourceMappingURL=oauth-scopes.js.map","class ProgressSpan {\n parent;\n parentUnits;\n spanUnits;\n unitsDone;\n constructor(parent, parentUnits, spanUnits) {\n this.parent = parent;\n this.parentUnits = parentUnits;\n this.spanUnits = spanUnits;\n this.unitsDone = 0;\n }\n done(units) {\n const remaining = this.spanUnits - this.unitsDone;\n if (!remaining)\n return; // ignore if already done\n if (!units || units > remaining) {\n units = remaining;\n }\n this.unitsDone += units;\n this.parent.done((units * this.parentUnits) / this.spanUnits);\n }\n get parentUnitsDone() {\n return Math.round((this.unitsDone * this.parentUnits) / this.spanUnits);\n }\n get isDone() {\n return this.unitsDone >= this.spanUnits;\n }\n}\nexport class Progress {\n total;\n unitsDone = 0;\n constructor(total) {\n this.total = total;\n }\n get fraction() {\n return this.unitsDone / this.total;\n }\n get percent() {\n return Math.round(this.fraction * 100);\n }\n get isDone() {\n return this.unitsDone >= this.total;\n }\n done(units) {\n const remaining = this.total - this.unitsDone;\n if (!remaining)\n return; // ignore if already done\n if (!units || units > remaining) {\n units = remaining;\n }\n this.unitsDone += units;\n }\n span(units, spanUnits) {\n return new ProgressSpan(this, units, spanUnits || units);\n }\n}\n//# sourceMappingURL=Progress.js.map","export const DEFAULT_EVENT_AGENT_INTERACTION_REF = 'sys:GeneralAgent';\n//# sourceMappingURL=platform-event.js.map","export const VIEW_CONFIGURATION_ID_PATTERN_SOURCE = '^[a-z][a-z0-9_-]*$';\nexport const ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE = '^[A-Za-z0-9_]+(?:\\\\.[A-Za-z0-9_]+)*$';\nexport const VIEW_CONFIGURATION_ID_PATTERN = new RegExp(VIEW_CONFIGURATION_ID_PATTERN_SOURCE);\nexport const ELASTICSEARCH_FIELD_PATH_PATTERN = new RegExp(ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE);\n/**\n * Elasticsearch roots owned by the server and unavailable to View-authored\n * queries or dynamic collection filters.\n */\nexport const SERVER_CONTROLLED_VIEW_FIELD_ROOTS = [\n 'security',\n 'revision',\n 'is_deleted',\n 'embeddings_text',\n 'embeddings_image',\n 'embeddings_properties',\n '_indexing_metadata',\n];\n/** @deprecated Use ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE. */\nexport const VIEW_FIELD_PATTERN_SOURCE = ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE;\n/** @deprecated Use ELASTICSEARCH_FIELD_PATH_PATTERN. */\nexport const VIEW_FIELD_PATTERN = ELASTICSEARCH_FIELD_PATH_PATTERN;\nexport function isViewValidationRecord(value) {\n return value !== null && typeof value === 'object' && !Array.isArray(value);\n}\n//# sourceMappingURL=view-validation-helpers.js.map","// Project values that exist at runtime — currently the system role catalog.\n//\n// Split out of `project.ts` for the reason `account-values.ts` was split out of `user.ts`: the API\n// schemas need `SystemRoles` at runtime (`z.enum(SystemRoles)`), and `project.ts` needs the types\n// those schemas infer. Re-exported from `project.ts`, so this is a move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: `SystemRoles` is the first declaration in the\n// file, and zeno-server's scanner attaches a leading DOC comment to the declaration that follows it.\n// Written as JSDoc, this note became the published `SystemRoles.description` in the OpenAPI\n// document — internal migration commentary shipped to every generated client. The sibling\n// `access-control-values.ts` keeps its JSDoc header only because none of its enums are resolved\n// through that path.\n// Moved here from `project.ts` for the same reason: `ResourceVisibilitySchema` is `z.enum(...)` over\n// it, and a runtime import of `project.ts` from the schema modules would be a cycle. The enum stays\n// the single statement of the values — the schema reads them rather than restating them, which is\n// why `ResourceVisibility` is not a canonical alias.\nexport var ResourceVisibility;\n(function (ResourceVisibility) {\n ResourceVisibility[\"public\"] = \"public\";\n ResourceVisibility[\"account\"] = \"account\";\n ResourceVisibility[\"project\"] = \"project\";\n})(ResourceVisibility || (ResourceVisibility = {}));\nexport var SystemRoles;\n(function (SystemRoles) {\n SystemRoles[\"owner\"] = \"owner\";\n SystemRoles[\"admin\"] = \"admin\";\n SystemRoles[\"manager\"] = \"manager\";\n SystemRoles[\"developer\"] = \"developer\";\n SystemRoles[\"application\"] = \"application\";\n SystemRoles[\"automation\"] = \"automation\";\n SystemRoles[\"content_processor\"] = \"content_processor\";\n SystemRoles[\"consumer\"] = \"consumer\";\n SystemRoles[\"executor\"] = \"executor\";\n SystemRoles[\"reader\"] = \"reader\";\n SystemRoles[\"auditor\"] = \"auditor\";\n SystemRoles[\"support\"] = \"support\";\n SystemRoles[\"billing\"] = \"billing\";\n SystemRoles[\"member\"] = \"member\";\n SystemRoles[\"app_member\"] = \"app_member\";\n SystemRoles[\"content_superadmin\"] = \"content_superadmin\";\n})(SystemRoles || (SystemRoles = {}));\n//# sourceMappingURL=project-values.js.map","import { ELASTICSEARCH_FIELD_PATH_PATTERN } from './view-validation-helpers.js';\n/**\n * `SystemRoles` lives in `./project-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './project-values.js';\nimport { SystemRoles } from './project-values.js';\nexport function isRoleIncludedIn(role, includingRole) {\n switch (includingRole) {\n case SystemRoles.owner:\n return true; // includes billing to?\n case SystemRoles.admin:\n return role !== SystemRoles.billing && role !== SystemRoles.owner;\n case SystemRoles.developer:\n return role === SystemRoles.developer;\n case SystemRoles.billing:\n return role === SystemRoles.billing;\n default:\n return false;\n }\n}\n/**\n * System interaction category enum.\n * Categories group one or more system interactions for default model assignment.\n */\nexport var SystemInteractionCategory;\n(function (SystemInteractionCategory) {\n SystemInteractionCategory[\"content_type\"] = \"content_type\";\n SystemInteractionCategory[\"intake\"] = \"intake\";\n SystemInteractionCategory[\"analysis\"] = \"analysis\";\n SystemInteractionCategory[\"agent\"] = \"agent\";\n SystemInteractionCategory[\"non_applicable\"] = \"non_applicable\";\n})(SystemInteractionCategory || (SystemInteractionCategory = {}));\n/**\n * Map system interaction endpoints to categories.\n */\nexport const SYSTEM_INTERACTION_CATEGORIES = {\n ExtractInformation: SystemInteractionCategory.intake,\n SelectDocumentType: SystemInteractionCategory.intake,\n GenerateMetadataModel: SystemInteractionCategory.content_type,\n ChunkDocument: SystemInteractionCategory.intake,\n IdentifyTextSections: SystemInteractionCategory.intake,\n AnalyzeDocument: SystemInteractionCategory.analysis,\n ReduceTextSections: SystemInteractionCategory.analysis,\n GenericAgent: SystemInteractionCategory.non_applicable,\n AdhocTaskAgent: SystemInteractionCategory.non_applicable,\n Mediator: SystemInteractionCategory.non_applicable,\n AnalyzeConversation: SystemInteractionCategory.analysis,\n GetAgentConversationTopic: SystemInteractionCategory.analysis,\n ContentSearchAgent: SystemInteractionCategory.analysis,\n StudioAssistant: SystemInteractionCategory.agent,\n};\n/**\n * Get category for a system interaction endpoint.\n * Returns undefined if category is non-applicable or endpoint is not recognized.\n * Note: Caller is responsible for determining if the interaction is a system interaction.\n * @param endpoint - The interaction endpoint name\n */\nexport function getSystemInteractionCategory(endpoint) {\n if (endpoint.startsWith('sys:')) {\n // Strip sys: prefix\n endpoint = endpoint.substring(4);\n }\n const category = SYSTEM_INTERACTION_CATEGORIES[endpoint];\n if (category === SystemInteractionCategory.non_applicable) {\n return undefined;\n }\n return category || undefined;\n}\nexport const PROJECT_SEARCH_PROPERTY_TYPES = [\n 'keyword',\n 'text',\n 'boolean',\n 'long',\n 'double',\n 'date',\n];\nconst MAX_PROJECT_SEARCH_PROPERTY_MAPPINGS = 200;\nconst MAX_KEYWORD_IGNORE_ABOVE = 8191;\n/**\n * Validate property mappings at API and index-creation boundaries.\n *\n * Returns user-facing issue strings instead of throwing so callers can map the\n * result to the error type appropriate for their boundary.\n */\nexport function validateProjectSearchPropertyMappings(value) {\n if (value === undefined)\n return [];\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return ['indexing.property_mappings must be an object keyed by property path'];\n }\n const entries = Object.entries(value);\n const issues = [];\n if (entries.length > MAX_PROJECT_SEARCH_PROPERTY_MAPPINGS) {\n issues.push(`indexing.property_mappings must contain at most ${MAX_PROJECT_SEARCH_PROPERTY_MAPPINGS} fields`);\n }\n const supportedTypes = new Set(PROJECT_SEARCH_PROPERTY_TYPES);\n for (const [path, rawMapping] of entries) {\n const field = `indexing.property_mappings.${path}`;\n if (!ELASTICSEARCH_FIELD_PATH_PATTERN.test(path)) {\n issues.push(`${field} must be a dot-separated path containing only letters, numbers, and underscores`);\n }\n if (!rawMapping || typeof rawMapping !== 'object' || Array.isArray(rawMapping)) {\n issues.push(`${field} must be an object`);\n continue;\n }\n const mapping = rawMapping;\n const extraKeys = Object.keys(mapping).filter((key) => !['type', 'format', 'ignore_above', 'ignore_malformed'].includes(key));\n if (extraKeys.length > 0) {\n issues.push(`${field} contains unsupported option(s): ${extraKeys.join(', ')}`);\n }\n if (typeof mapping.type !== 'string' || !supportedTypes.has(mapping.type)) {\n issues.push(`${field}.type must be one of: ${PROJECT_SEARCH_PROPERTY_TYPES.join(', ')}`);\n }\n if (mapping.format !== undefined && (mapping.type !== 'date' || typeof mapping.format !== 'string')) {\n issues.push(`${field}.format is supported only for date mappings`);\n }\n if (mapping.ignore_above !== undefined &&\n (mapping.type !== 'keyword' ||\n !Number.isInteger(mapping.ignore_above) ||\n mapping.ignore_above < 1 ||\n mapping.ignore_above > MAX_KEYWORD_IGNORE_ABOVE)) {\n issues.push(`${field}.ignore_above is supported only for keyword mappings and must be an integer from 1 to ${MAX_KEYWORD_IGNORE_ABOVE}`);\n }\n if (mapping.ignore_malformed !== undefined &&\n (!['long', 'double', 'date'].includes(String(mapping.type)) ||\n typeof mapping.ignore_malformed !== 'boolean')) {\n issues.push(`${field}.ignore_malformed is supported only for long, double, and date mappings`);\n }\n }\n return issues;\n}\n// export interface ProjectConfigurationEmbeddings {\n// environment: string;\n// max_tokens: number;\n// dimensions: number;\n// model?: string;\n// }\nexport var SupportedEmbeddingTypes;\n(function (SupportedEmbeddingTypes) {\n SupportedEmbeddingTypes[\"text\"] = \"text\";\n SupportedEmbeddingTypes[\"image\"] = \"image\";\n SupportedEmbeddingTypes[\"properties\"] = \"properties\";\n})(SupportedEmbeddingTypes || (SupportedEmbeddingTypes = {}));\nexport var FullTextType;\n(function (FullTextType) {\n FullTextType[\"full_text\"] = \"full_text\";\n})(FullTextType || (FullTextType = {}));\nexport const SearchTypes = {\n ...SupportedEmbeddingTypes,\n ...FullTextType,\n};\nexport const ProjectRefPopulate = 'id name account';\n/**\n * Auto-tunes shard sizing based on project doc count.\n *\n * Returns:\n * - shard_size: target docs per shard (workflow path uses this; zeno-bulk\n * computes shard count from total/shard_size).\n * - parallel_shard_count: max in-flight shard activities (workflow path only).\n * - max_shards: hard cap on shard count for the direct path. Direct path\n * passes this as `shards` to zeno-bulk so all shards run as cursors in\n * ONE process; without this cap, an under-estimated shard_size (e.g.\n * from stale estimatedDocumentCount) can spawn 10+ in-flight cursors\n * and exceed Cloud Run memory.\n *\n * Explicit overrides should bypass this function and use user-provided values.\n */\nexport function autoTuneReindexParams(docCount) {\n if (docCount < 50_000) {\n // Tiny/small project: aim for ~4 shards, with a 5k floor.\n return {\n shard_size: Math.max(Math.ceil(docCount / 4), 5_000),\n parallel_shard_count: Math.min(4, Math.max(1, Math.ceil(docCount / 5_000))),\n max_shards: 4,\n };\n }\n if (docCount < 500_000) {\n // Medium project: 50k shards → 1-10 shards\n return { shard_size: 50_000, parallel_shard_count: 8, max_shards: 10 };\n }\n if (docCount < 2_000_000) {\n // Large project: 100k shards → 5-20 shards\n return { shard_size: 100_000, parallel_shard_count: 8, max_shards: 20 };\n }\n // Huge project: stick to 250k shards to keep coordination overhead bounded.\n return { shard_size: 250_000, parallel_shard_count: 8, max_shards: 40 };\n}\n/**\n * Supported languages for full-text search with their display names.\n * Maps ISO 639-1 codes to human-readable language names.\n */\nexport const SUPPORTED_SEARCH_LANGUAGES = {\n en: 'English',\n zh: 'Chinese',\n es: 'Spanish',\n hi: 'Hindi',\n ar: 'Arabic',\n pt: 'Portuguese',\n bn: 'Bengali',\n ru: 'Russian',\n ja: 'Japanese',\n de: 'German',\n fr: 'French',\n ko: 'Korean',\n it: 'Italian',\n tr: 'Turkish',\n vi: 'Vietnamese',\n pl: 'Polish',\n uk: 'Ukrainian',\n nl: 'Dutch',\n th: 'Thai',\n el: 'Greek',\n cs: 'Czech',\n sv: 'Swedish',\n ro: 'Romanian',\n hu: 'Hungarian',\n da: 'Danish',\n fi: 'Finnish',\n no: 'Norwegian',\n he: 'Hebrew',\n id: 'Indonesian',\n fa: 'Persian',\n};\n//# sourceMappingURL=project.js.map","import { SystemRoles } from './project.js';\n/**\n * Statuses an `agent_signal` target may list in `statuses` — the run statuses that can be **directly\n * signalled**. Only a live (`running`, possibly idle) run has an active Temporal workflow that accepts a\n * signal; `created` runs have no workflow bound yet, and terminal runs are handled separately by\n * `on_terminal` (`restart` re-activates the newest terminal run, then signals). Restricting the set keeps\n * config from silently trying to signal a closed workflow.\n */\nconst SIGNALABLE_AGENT_RUN_STATUS_VALUES = ['running'];\nexport const DEFAULT_WEBHOOK_TIMEOUT_MS = 30_000;\nexport const MAX_WEBHOOK_TIMEOUT_MS = 50_000;\nexport const EVENT_CATEGORIES = [\n 'content',\n 'workflow',\n 'security',\n 'billing',\n 'system',\n 'external',\n];\nexport const EVENT_PRIORITIES = ['high', 'normal', 'low'];\n/** Default agent-evaluator iteration budget for a semantic condition. */\nexport const DEFAULT_SEMANTIC_AGENT_MAX_ITERATIONS = 10;\n/** Maximum agent-evaluator iteration budget a user may request. */\nexport const MAX_SEMANTIC_AGENT_MAX_ITERATIONS = 30;\n/** Default content-excerpt size (chars) included in the interaction classifier prompt. */\nexport const DEFAULT_SEMANTIC_MAX_CONTENT_CHARS = 4000;\n/** Maximum content-excerpt size (chars) a user may request. */\nexport const MAX_SEMANTIC_MAX_CONTENT_CHARS = 20_000;\n/** Maximum length of a semantic condition instruction. */\nexport const MAX_SEMANTIC_CONDITION_INSTRUCTION_LENGTH = 2000;\n/** Default action stamped on an ingested external event when none is provided/mapped. */\nexport const DEFAULT_EXTERNAL_EVENT_ACTION = 'received';\n/** Default resource_type stamped on an ingested external event when none is provided/mapped. */\nexport const DEFAULT_EXTERNAL_EVENT_RESOURCE_TYPE = 'external_event';\n/** Prefix combined with a channel `source` to form the event `source` (`external:<source>`). */\nexport const EXTERNAL_EVENT_SOURCE_PREFIX = 'external:';\n/** Role an event subscription runs as when none is specified. */\nexport const DEFAULT_EVENT_SUBSCRIPTION_RUN_AS_ROLE = SystemRoles.automation;\n/**\n * Roles a user may select for an event subscription's run_as_role. System subscriptions may use\n * additional roles (e.g. content_processor); this list gates user input in the API, agent tools,\n * and UI — keep all three consuming this constant.\n */\nexport const EVENT_SUBSCRIPTION_RUN_AS_ROLES = [\n SystemRoles.automation,\n SystemRoles.executor,\n SystemRoles.reader,\n];\n/**\n * JSONLogic operators accepted in event subscription filter conditions. The event-bus evaluator\n * rejects any operator not in this list (fail closed); the UI condition editor uses it for\n * completion and validation.\n */\nexport const EVENT_CONDITION_JSON_LOGIC_OPERATORS = [\n '!',\n '!!',\n '!=',\n '!==',\n '%',\n '*',\n '+',\n '-',\n '/',\n '<',\n '<=',\n '==',\n '===',\n '>',\n '>=',\n '?:',\n 'all',\n 'and',\n 'cat',\n 'filter',\n 'if',\n 'in',\n 'map',\n 'max',\n 'merge',\n 'min',\n 'missing',\n 'missing_some',\n 'none',\n 'or',\n 'reduce',\n 'some',\n 'substr',\n 'var',\n];\nfunction isRecord(value) {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\nfunction isStringArray(value) {\n return Array.isArray(value) && value.every((item) => typeof item === 'string');\n}\nfunction validateFilter(filter, errors) {\n if (!isRecord(filter)) {\n errors.push('filter must be an object');\n return;\n }\n const f = filter;\n if (f.event_category !== undefined) {\n if (!isStringArray(f.event_category)) {\n errors.push('filter.event_category must be an array of strings');\n }\n else {\n for (const c of f.event_category) {\n if (c !== '*' && !EVENT_CATEGORIES.includes(c)) {\n errors.push(`filter.event_category contains unsupported value: ${c}`);\n }\n }\n }\n }\n if (f.exclude_event_category !== undefined) {\n if (!isStringArray(f.exclude_event_category)) {\n errors.push('filter.exclude_event_category must be an array of strings');\n }\n else {\n for (const c of f.exclude_event_category) {\n if (!EVENT_CATEGORIES.includes(c)) {\n errors.push(`filter.exclude_event_category contains unsupported value: ${c}`);\n }\n }\n }\n }\n if (f.action !== undefined && !isStringArray(f.action)) {\n errors.push('filter.action must be an array of strings');\n }\n if (f.resource_type !== undefined && !isStringArray(f.resource_type)) {\n errors.push('filter.resource_type must be an array of strings');\n }\n if (f.condition !== undefined && !isRecord(f.condition)) {\n errors.push('filter.condition must be a JSON Logic object');\n }\n}\nfunction validateTarget(target, errors) {\n if (!isRecord(target)) {\n errors.push('target must be an object');\n return;\n }\n const type = target.type;\n if (type !== 'workflow' && type !== 'webhook' && type !== 'app' && type !== 'agent' && type !== 'process') {\n errors.push('target.type must be one of workflow, webhook, app, agent, process');\n return;\n }\n const t = target;\n switch (t.type) {\n case 'workflow':\n if (typeof t.endpoint !== 'string' || t.endpoint.length === 0) {\n errors.push('workflow target requires a non-empty \"endpoint\"');\n }\n break;\n case 'webhook': {\n if (typeof t.url !== 'string' || t.url.length === 0) {\n errors.push('webhook target requires a non-empty \"url\"');\n }\n if (t.timeout_ms !== undefined) {\n if (!Number.isInteger(t.timeout_ms) || t.timeout_ms <= 0 || t.timeout_ms > MAX_WEBHOOK_TIMEOUT_MS) {\n errors.push(`webhook target.timeout_ms must be an integer between 1 and ${MAX_WEBHOOK_TIMEOUT_MS}`);\n }\n }\n if (t.signing_mode !== undefined && t.signing_mode !== 'signed' && t.signing_mode !== 'legacy_unsigned') {\n errors.push('webhook target.signing_mode must be \"signed\" or \"legacy_unsigned\"');\n }\n if (t.payload_mode !== undefined &&\n t.payload_mode !== 'event_envelope' &&\n t.payload_mode !== 'legacy_notify_endpoint' &&\n t.payload_mode !== 'workflow_notification') {\n errors.push('webhook target.payload_mode must be \"event_envelope\", \"legacy_notify_endpoint\" or \"workflow_notification\"');\n }\n if (t.encrypted_headers === true) {\n errors.push('webhook target.encrypted_headers is not supported');\n }\n if (t.headers !== undefined && !isRecord(t.headers)) {\n errors.push('webhook target.headers must be an object of strings');\n }\n break;\n }\n case 'app': {\n for (const field of ['app_id', 'installation_id', 'hook', 'url']) {\n if (typeof t[field] !== 'string' || t[field].length === 0) {\n errors.push(`app target requires a non-empty \"${field}\"`);\n }\n }\n if (t.timeout_ms !== undefined) {\n if (!Number.isInteger(t.timeout_ms) || t.timeout_ms <= 0 || t.timeout_ms > MAX_WEBHOOK_TIMEOUT_MS) {\n errors.push(`app target.timeout_ms must be an integer between 1 and ${MAX_WEBHOOK_TIMEOUT_MS}`);\n }\n }\n break;\n }\n case 'process':\n if ((typeof t.process_ref !== 'string' || t.process_ref.length === 0) && !isRecord(t.process_definition)) {\n errors.push('process target requires \"process_ref\" or an inline \"process_definition\"');\n }\n break;\n case 'agent': {\n // One target with three behaviors selected by `on_match` (default `start`): start a run,\n // signal an existing run, or ensure (signal-or-start). `signal`/`ensure` need `message_path`\n // and use the gate/signal fields; `missing_thread` is only meaningful for `signal`.\n const onMatch = t.on_match ?? 'start';\n if (onMatch !== 'start' && onMatch !== 'signal' && onMatch !== 'ensure') {\n errors.push('agent target.on_match must be \"start\", \"signal\", or \"ensure\"');\n }\n const needsMessage = onMatch === 'signal' || onMatch === 'ensure';\n if (needsMessage && (typeof t.message_path !== 'string' || t.message_path.length === 0)) {\n errors.push(`agent target.message_path is required when on_match is \"${onMatch}\"`);\n }\n // Only the UserInput signal is implemented (the dispatcher always sends a UserInput-shaped\n // payload), so reject other names rather than silently mis-deliver.\n if (t.signal_name !== undefined && t.signal_name !== 'UserInput') {\n errors.push('agent target.signal_name must be \"UserInput\"');\n }\n // Optional dot-path / ref fields are read dynamically at runtime — reject non-strings early.\n for (const field of [\n 'interaction_ref',\n 'message_path',\n 'client_message_id_path',\n 'skip_if_path_exists',\n 'author_path',\n ]) {\n const value = t[field];\n if (value !== undefined && typeof value !== 'string') {\n errors.push(`agent target.${field} must be a string`);\n }\n }\n if (t.metadata !== undefined && !isRecord(t.metadata)) {\n errors.push('agent target.metadata must be an object');\n }\n if (t.statuses !== undefined) {\n if (!isStringArray(t.statuses)) {\n errors.push('agent target.statuses must be an array of strings');\n }\n else {\n const invalid = t.statuses.filter((s) => !SIGNALABLE_AGENT_RUN_STATUS_VALUES.includes(s));\n if (invalid.length > 0) {\n errors.push(`agent target.statuses may only contain signalable statuses: ${invalid.join(', ')} ` +\n `not allowed. Allowed: ${SIGNALABLE_AGENT_RUN_STATUS_VALUES.join(', ')} ` +\n `(terminal runs are handled by on_terminal).`);\n }\n }\n }\n for (const field of ['ignore_author_patterns', 'require_command_prefixes', 'require_mentions']) {\n const value = t[field];\n if (value !== undefined && !isStringArray(value)) {\n errors.push(`agent target.${field} must be an array of strings`);\n }\n }\n if (t.missing_thread !== undefined) {\n if (onMatch !== 'signal') {\n errors.push('agent target.missing_thread is only valid when on_match is \"signal\"');\n }\n else if (t.missing_thread !== 'retry' && t.missing_thread !== 'skip') {\n errors.push('agent target.missing_thread must be \"retry\" or \"skip\"');\n }\n }\n if (t.on_terminal !== undefined && t.on_terminal !== 'skip' && t.on_terminal !== 'restart') {\n errors.push('agent target.on_terminal must be \"skip\" or \"restart\"');\n }\n break;\n }\n }\n}\nfunction validateCommonFields(payload, errors) {\n if (payload.description !== undefined && typeof payload.description !== 'string') {\n errors.push('description must be a string');\n }\n if (payload.run_as_role !== undefined && !Object.values(SystemRoles).includes(payload.run_as_role)) {\n errors.push(`run_as_role contains unsupported value: ${payload.run_as_role}`);\n }\n if (payload.enabled !== undefined && typeof payload.enabled !== 'boolean') {\n errors.push('enabled must be a boolean');\n }\n if (payload.priority !== undefined && !EVENT_PRIORITIES.includes(payload.priority)) {\n errors.push(`priority must be one of ${EVENT_PRIORITIES.join(', ')}`);\n }\n}\nexport function getCreateEventSubscriptionValidationResult(payload) {\n const errors = [];\n if (typeof payload?.name !== 'string' || payload.name.trim().length === 0) {\n errors.push('name is required');\n }\n if (payload?.scope !== undefined && payload.scope !== 'account' && payload.scope !== 'project') {\n errors.push('scope must be \"account\" or \"project\"');\n }\n if (payload?.filter === undefined) {\n errors.push('filter is required');\n }\n else {\n validateFilter(payload.filter, errors);\n }\n if (payload?.target === undefined) {\n errors.push('target is required');\n }\n else {\n validateTarget(payload.target, errors);\n }\n // run_as_role is required at creation: every subscription must declare an explicit run-as\n // identity so its delivery never falls back to running as the originating (possibly deleted)\n // user. validateCommonFields validates the value when present; this enforces presence.\n if (payload?.run_as_role === undefined) {\n errors.push('run_as_role is required');\n }\n validateCommonFields(payload ?? {}, errors);\n return { valid: errors.length === 0, errors };\n}\nexport function getUpdateEventSubscriptionValidationResult(payload) {\n const errors = [];\n if (!isRecord(payload)) {\n return { valid: false, errors: ['update payload must be an object'] };\n }\n if (payload.name !== undefined && (typeof payload.name !== 'string' || payload.name.trim().length === 0)) {\n errors.push('name must be a non-empty string');\n }\n if (payload.filter !== undefined) {\n validateFilter(payload.filter, errors);\n }\n if (payload.target !== undefined) {\n validateTarget(payload.target, errors);\n }\n validateCommonFields(payload, errors);\n return { valid: errors.length === 0, errors };\n}\nexport function validateCreateEventSubscriptionInput(payload) {\n const result = getCreateEventSubscriptionValidationResult(payload);\n if (!result.valid) {\n throw new Error(result.errors.join('; '));\n }\n}\nexport function validateUpdateEventSubscriptionInput(payload) {\n const result = getUpdateEventSubscriptionValidationResult(payload);\n if (!result.valid) {\n throw new Error(result.errors.join('; '));\n }\n}\n//# sourceMappingURL=platform-event-validation.js.map","export var PromptStatus;\n(function (PromptStatus) {\n PromptStatus[\"draft\"] = \"draft\";\n PromptStatus[\"published\"] = \"published\";\n PromptStatus[\"archived\"] = \"archived\";\n})(PromptStatus || (PromptStatus = {}));\nexport var PromptSegmentDefType;\n(function (PromptSegmentDefType) {\n PromptSegmentDefType[\"chat\"] = \"chat\";\n PromptSegmentDefType[\"template\"] = \"template\";\n})(PromptSegmentDefType || (PromptSegmentDefType = {}));\nexport var TemplateType;\n(function (TemplateType) {\n TemplateType[\"jst\"] = \"jst\";\n TemplateType[\"handlebars\"] = \"handlebars\";\n TemplateType[\"text\"] = \"text\";\n})(TemplateType || (TemplateType = {}));\n//# sourceMappingURL=prompt.js.map","export var ResolvableRefType;\n(function (ResolvableRefType) {\n ResolvableRefType[\"project\"] = \"Project\";\n ResolvableRefType[\"projects\"] = \"Projects\";\n ResolvableRefType[\"environment\"] = \"Environment\";\n ResolvableRefType[\"user\"] = \"User\";\n ResolvableRefType[\"account\"] = \"Account\";\n ResolvableRefType[\"interaction\"] = \"Interaction\";\n ResolvableRefType[\"userGroup\"] = \"UserGroup\";\n})(ResolvableRefType || (ResolvableRefType = {}));\n//# sourceMappingURL=refs.js.map","/**\n * Extraction schema filtering.\n *\n * Content-type object_schema properties may set `\"x-extract\": false` to mark fields\n * that must not be filled by extraction models (match scores, ERP ids filled later,\n * internal bookkeeping). The full schema remains the object model for UI/storage;\n * only the filtered copy is used as result_schema for constrained decoding.\n */\nexport const X_EXTRACT = 'x-extract';\nfunction unescapeJsonPointerSegment(segment) {\n return segment.replace(/~1/g, '/').replace(/~0/g, '~');\n}\nfunction resolveLocalRef(ref, root) {\n if (!ref.startsWith('#/')) {\n return undefined;\n }\n let current = root;\n for (const segment of ref.slice(2).split('/').map(unescapeJsonPointerSegment)) {\n if (!current || typeof current !== 'object' || Array.isArray(current)) {\n return undefined;\n }\n current = current[segment];\n }\n return current;\n}\nfunction isExtractableSchemaNodeInternal(schema, root, seenRefs) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return true;\n }\n const schemaObj = schema;\n if (schemaObj[X_EXTRACT] === false) {\n return false;\n }\n if (typeof schemaObj.$ref === 'string' && !seenRefs.has(schemaObj.$ref)) {\n seenRefs.add(schemaObj.$ref);\n const resolved = resolveLocalRef(schemaObj.$ref, root);\n if (resolved !== undefined) {\n return isExtractableSchemaNodeInternal(resolved, root, seenRefs);\n }\n }\n return true;\n}\nexport function isExtractableSchemaNode(schema, root = schema) {\n return isExtractableSchemaNodeInternal(schema, root, new Set());\n}\nfunction filterSchemaArray(value, root) {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const filtered = value\n .map((item) => schemaForExtractionNode(item, root))\n .filter((item) => item !== undefined);\n return filtered.length > 0 ? filtered : undefined;\n}\nfunction filterSchemaMap(value, root) {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return undefined;\n }\n const filtered = {};\n for (const [key, child] of Object.entries(value)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n filtered[key] = childFiltered;\n }\n }\n return Object.keys(filtered).length > 0 ? filtered : undefined;\n}\nfunction schemaForExtractionNode(schema, root) {\n if (!schema || typeof schema !== 'object') {\n return schema;\n }\n if (Array.isArray(schema)) {\n return schema.map((item) => schemaForExtractionNode(item, root));\n }\n if (!isExtractableSchemaNode(schema, root)) {\n return undefined;\n }\n const node = { ...schema };\n for (const defsKey of ['$defs', 'definitions']) {\n const defs = filterSchemaMap(node[defsKey], root);\n if (defs) {\n node[defsKey] = defs;\n }\n else {\n delete node[defsKey];\n }\n }\n if (node.items && typeof node.items === 'object') {\n const items = schemaForExtractionNode(node.items, root);\n if (items !== undefined) {\n node.items = items;\n }\n else {\n delete node.items;\n }\n }\n for (const unionKey of ['anyOf', 'oneOf', 'allOf']) {\n if (Array.isArray(node[unionKey])) {\n const filtered = filterSchemaArray(node[unionKey], root);\n if (!filtered) {\n return undefined;\n }\n node[unionKey] = filtered;\n }\n }\n if (node.additionalProperties && typeof node.additionalProperties === 'object') {\n const additionalProperties = schemaForExtractionNode(node.additionalProperties, root);\n node.additionalProperties = additionalProperties ?? false;\n }\n if (node.properties && typeof node.properties === 'object' && !Array.isArray(node.properties)) {\n const props = {};\n for (const [key, child] of Object.entries(node.properties)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n props[key] = childFiltered;\n }\n }\n node.properties = props;\n if (Array.isArray(node.required)) {\n const kept = node.required.filter((r) => typeof r === 'string' && r in props);\n if (kept.length > 0) {\n node.required = kept;\n }\n else {\n delete node.required;\n }\n }\n }\n // Drop the flag from the extraction copy (not needed by providers)\n delete node[X_EXTRACT];\n return node;\n}\n/**\n * Deep-clones a JSON schema and removes properties (recursively) marked\n * `x-extract: false`, cleaning `required` arrays to match.\n */\nexport function schemaForExtraction(schema) {\n return (schemaForExtractionNode(schema, schema) ?? {});\n}\nfunction resolveSchemaNode(schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return schema;\n }\n const schemaObj = schema;\n if (typeof schemaObj.$ref !== 'string') {\n return schema;\n }\n return resolveLocalRef(schemaObj.$ref, root) ?? schema;\n}\nfunction mergePreservingNonExtractableNode(existing, extracted, schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return extracted;\n }\n const resolved = resolveSchemaNode(schema, root);\n if (!resolved || typeof resolved !== 'object' || Array.isArray(resolved)) {\n return extracted;\n }\n const schemaObj = resolved;\n // Arrays are new extraction output. Without a declared stable item key, index\n // merging can attach preserved ERP/match fields to the wrong row.\n if (Array.isArray(extracted)) {\n const itemSchema = schemaObj.items;\n if (!itemSchema || typeof itemSchema !== 'object') {\n return extracted;\n }\n return extracted.map((item) => mergePreservingNonExtractableNode(undefined, item, itemSchema, root));\n }\n if (!extracted || typeof extracted !== 'object' || Array.isArray(extracted)) {\n return extracted;\n }\n const props = schemaObj.properties;\n if (!props || typeof props !== 'object' || Array.isArray(props)) {\n return extracted;\n }\n const existingObj = existing && typeof existing === 'object' && !Array.isArray(existing)\n ? existing\n : {};\n const extractedObj = extracted;\n const propSchemas = props;\n const result = { ...extractedObj };\n for (const [key, propSchema] of Object.entries(propSchemas)) {\n if (!isExtractableSchemaNode(propSchema, root)) {\n // Model should not have filled this; restore prior value if any.\n if (key in existingObj) {\n result[key] = existingObj[key];\n }\n else {\n delete result[key];\n }\n continue;\n }\n if (key in extractedObj) {\n result[key] = mergePreservingNonExtractableNode(existingObj[key], extractedObj[key], propSchema, root);\n }\n }\n return result;\n}\n/**\n * Merge model output over existing properties while preserving values at paths\n * marked `x-extract: false` on the full (unfiltered) schema.\n */\nexport function mergePreservingNonExtractable(existing, extracted, schema) {\n return mergePreservingNonExtractableNode(existing, extracted, schema, schema);\n}\n//# sourceMappingURL=schema-for-extraction.js.map","export const AgentToolApprovalModes = ['ask', 'auto_review', 'full_control'];\nexport function normalizeAgentToolApprovalMode(mode, interactive) {\n if (interactive !== true) {\n return 'full_control';\n }\n return mode ?? 'full_control';\n}\nexport function isAgentToolApprovalMode(value) {\n return typeof value === 'string' && AgentToolApprovalModes.includes(value);\n}\n//# sourceMappingURL=agent-approval.js.map","export var CollectionStatus;\n(function (CollectionStatus) {\n CollectionStatus[\"active\"] = \"active\";\n CollectionStatus[\"archived\"] = \"archived\";\n})(CollectionStatus || (CollectionStatus = {}));\n//# sourceMappingURL=collections.js.map","export function toolInputRefsArtifactPath(storageId) {\n return `agents/${storageId}/tool-input-refs.json`;\n}\n/** Artifact key of the stored conversation catalog, relative to the agent storage root. */\nexport const CONVERSATION_CATALOG_ARTIFACT_KEY = 'catalog.json';\n/**\n * Compute the storage ID for a conversation's artifacts.\n * - Root workflows: `{agent_run_id}` (or fallbackRunId if no agent_run_id)\n * - Workstreams: `{agent_run_id}/workstreams/{launch_id}`\n *\n * Both studio-server and workflow activities must use the same logic so\n * parent and child conversations don't overwrite each other.\n */\nexport function getConversationStorageId(state, fallbackRunId) {\n const baseId = state?.agent_run_id || fallbackRunId;\n if (state?.launch_id && state?.agent_run_id) {\n return `${baseId}/workstreams/${state.launch_id}`;\n }\n return baseId;\n}\n//# sourceMappingURL=conversation-state.js.map","export function withDSLWorkflowSpecDiscriminator(spec) {\n if ('steps' in spec && spec.steps) {\n return { ...spec, spec_format: 'steps' };\n }\n return { ...spec, spec_format: 'activities' };\n}\nexport const WorkflowDefinitionRefPopulate = 'id name description tags created_at updated_at';\n//# sourceMappingURL=dsl-workflow.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeEditingPolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeEditingPolicySchema = {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n description: 'Agent interaction used for new document-editing sessions. Defaults to sys:GeneralAgent.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for collaborative document editing.',\n};\n//# sourceMappingURL=editing-policy-schema.generated.js.map","/**\n * Canonical workflow id for object-scoped grounded extraction. Every entry point\n * must use this id so Temporal prevents overlapping extraction runs per object.\n */\nexport function getGroundedExtractionWorkflowId(accountId, objectId) {\n return `${accountId.slice(0, 6)}:workflow_execution_request:${objectId}:grounded`;\n}\n//# sourceMappingURL=grounded-extraction.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeIntakePolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeIntakePolicySchema = {\n type: 'object',\n properties: {\n mode: {\n type: 'string',\n enum: ['programmatic', 'agentic'],\n description: 'Intake orchestration mode for this type.',\n },\n identification: {\n type: 'object',\n properties: {\n guidance: {\n type: 'string',\n },\n distinguish_from: {\n type: 'string',\n },\n examples: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n additionalProperties: false,\n description: 'Guidance used when selecting or creating this content type.',\n },\n locate: {\n type: 'object',\n properties: {\n instructions: {\n type: 'string',\n description: 'What to look for (\"commercial terms, payment schedule, signature pages\").',\n },\n detail: {\n type: 'number',\n enum: [8, 16],\n description: 'Pages per contact sheet: 8 = bigger tiles (headings readable). Default 16.',\n },\n min_pages: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n description: 'Only run when the page count is at least this. Default 8.',\n },\n },\n required: ['instructions'],\n additionalProperties: false,\n description: 'Document-map (\"locate\") pass: page thumbnails tiled into labeled contact sheets, one vision call returns which pages matter for THIS type. The result can scope conversion and extraction, and doubles as the vision planner for visual extraction.',\n },\n text_conversion: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n method: {\n type: 'string',\n enum: ['auto', 'basic', 'llm', 'custom'],\n },\n custom: {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n },\n agent: {\n type: 'string',\n },\n },\n additionalProperties: false,\n },\n instructions: {\n type: 'string',\n },\n output_format: {\n type: 'string',\n enum: ['markdown', 'text'],\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages to convert: everything or the locate result. Default all.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges to convert (wins over `scope` when set).',\n },\n render_dpi: {\n type: 'integer',\n minimum: 72,\n maximum: 2147483647,\n description: 'DPI at which each page is rendered to the image the LLM converts. Default 150 — the accuracy/cost sweet spot: higher resolutions balloon input tokens (some providers tile the page) for no quality gain, below ~150 dense tables start to misread. Raise only for very fine print.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the page-conversion interaction (method 'llm'/'auto' -> sys:ConvertPageToMarkdown, method 'custom' -> the custom interaction). Lets the visual conversion run on a cheaper/faster model (e.g. a flash model) than extraction. When unset, conversion uses the run's model config or the project default model.\",\n },\n },\n additionalProperties: false,\n description: 'Controls source-to-text conversion before extraction and embedding.',\n },\n extraction: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n source: {\n type: 'string',\n enum: ['auto', 'text', 'vision', 'mixed'],\n },\n instructions: {\n type: 'string',\n },\n interaction: {\n type: 'string',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the standard property-extraction interaction (sys:ExtractInformation). Lets extraction run on a different model/environment than the visual page conversion. When unset, extraction uses the run's model config or the project default model. (Grounded extraction is configured separately via grounding.config.)\",\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages extraction sees: everything or the locate result.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges extraction sees (wins over `scope` when set).',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on pages sent to extraction. Default 20.',\n },\n vision: {\n type: 'object',\n properties: {\n default_detail: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n allowed_details: {\n type: 'array',\n items: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n },\n max_image_tokens: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'PRIMARY budget: estimated image tokens per extraction call. Default 16000.',\n },\n max_payload_mb: {\n type: 'number',\n minimum: 1,\n description: 'Transport guard in megabytes. Default 16.',\n },\n max_pages_per_call: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on page images per extraction call. Default 8.',\n },\n },\n additionalProperties: false,\n description: 'Vision evidence budget for visual extraction. Detail names reference platform profiles; the type never defines dpi/quality/resolution.',\n },\n verification: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n model: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n materiality: {\n type: 'string',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n max_retries: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n },\n on_fail: {\n type: 'string',\n enum: ['flag', 'block'],\n },\n },\n additionalProperties: false,\n },\n grounding: {\n $ref: '#/$defs/ContentTypeExtractionGroundingPolicy',\n description: 'Controls PDF block-level citation grounding with annotated proof output.',\n },\n },\n additionalProperties: false,\n description: 'Controls schema-property extraction after type assignment.',\n },\n rendering_template: {\n type: 'string',\n description: 'Handlebars template used to materialize extracted properties into object text.',\n },\n embeddings: {\n $ref: '#/$defs/EmbeddingTypeEnabledMap',\n description: 'Per-type embedding switches. Unspecified values inherit the project policy.',\n },\n generate_toc: {\n type: 'boolean',\n description: 'Whether intake should generate a table of contents for matching documents.',\n },\n default_view: {\n type: 'string',\n enum: ['auto', 'text', 'pdf', 'image', 'properties'],\n description: 'Preferred first view for objects of this type.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for the standard intake workflows.',\n $defs: {\n BedrockAI21Options: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-ai21',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n top_k: {\n type: 'number',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockCohereCommandOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-cohere-command',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockConverseOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-converse',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockGptOssOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-gpt-oss',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleChatCompletionsOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-chat-completions',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleResponsesOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-responses',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n reasoning_effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n verbosity: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMistralOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mistral',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockNovaOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockPalmyraOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-palmyra',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n min_tokens: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ConfigModes: {\n type: 'string',\n enum: ['RUN_AND_INTERACTION_CONFIG', 'RUN_CONFIG_ONLY', 'INTERACTION_CONFIG_ONLY'],\n },\n ContentTypeExtractionGroundingPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable PDF block-level citation grounding for property extraction.',\n },\n interaction: {\n type: 'string',\n description: 'Grounded extraction interaction. Defaults to the system grounded extractor.',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages to process.',\n },\n force_ocr: {\n type: 'boolean',\n description: 'Run OCR on every page even when a text layer exists.',\n },\n use_vision: {\n type: 'boolean',\n description: 'Attach instrumented page images to the grounded extraction prompt.',\n },\n raster_mode: {\n type: 'string',\n enum: ['vision', 'ocr'],\n description: \"How to read pages with no digital text layer (scans / image-only pages). 'vision' (default): read them off the page image and skip OCR. 'ocr': legacy path — OCR those pages and block-ground on the (lossy) OCR text.\",\n },\n grid_cell_pt: {\n type: 'number',\n minimum: 1,\n description: 'A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid (more cells, tighter boxes) but can trip weaker models into over-reading; tune per the model in `config`. Default 15.',\n },\n omit_block_boxes: {\n type: 'boolean',\n description: 'Drop block bounding boxes from the extraction prompt. Only sound with use_vision (layout comes from the image).',\n },\n window_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages per grounded extraction call before windowing.',\n },\n update_properties: {\n type: 'boolean',\n description: 'Update object properties with grounded extraction data. Default true.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the main grounded extraction interaction.',\n },\n hard_config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration used for hard-to-read content.',\n },\n hardness_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which hard_config is used. Default 0.5.',\n },\n min_citation_density: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Minimum citations-per-leaf-value ratio; completions below it retry with escalation. Default 0.3.',\n },\n refresh_ocr: {\n type: 'boolean',\n description: 'Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output).',\n },\n review: {\n $ref: '#/$defs/ContentTypeExtractionGroundingReviewPolicy',\n description: 'Optional post-extraction review pass.',\n },\n },\n additionalProperties: false,\n },\n ContentTypeExtractionGroundingReviewPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Set false to disable an inherited grounding review pass for this type.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the review interaction.',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which review runs. Defaults to hardness_threshold.',\n },\n coverage_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: \"Review also runs when any page's citation coverage falls below this floor (evidence of missed content). Default 0.2.\",\n },\n force: {\n type: 'boolean',\n description: 'Run review regardless of hardness.',\n },\n },\n additionalProperties: false,\n },\n EmbeddingTypeEnabledMap: {\n type: 'object',\n properties: {\n text: {\n type: 'boolean',\n },\n image: {\n type: 'boolean',\n },\n properties: {\n type: 'boolean',\n },\n },\n additionalProperties: false,\n },\n GroqOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'groq-deepseek-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_format: {\n type: 'string',\n enum: ['parsed', 'raw', 'hidden'],\n },\n },\n required: ['_option_id', 'reasoning_format'],\n additionalProperties: false,\n },\n HttpTimeoutOptions: {\n type: 'object',\n properties: {\n headersTimeout: {\n type: 'number',\n description: 'Time (ms) to wait for the first response byte after the request is sent.',\n },\n bodyTimeout: {\n type: 'number',\n description: 'Time (ms) between body chunks once streaming has started.',\n },\n connectTimeout: {\n type: 'number',\n description: 'TCP/TLS connect timeout (ms).',\n },\n keepAliveTimeout: {\n type: 'number',\n description: 'Idle socket reuse timeout (ms).',\n },\n },\n additionalProperties: false,\n description: \"HTTP timeouts applied to a driver's upstream LLM-provider calls.\\n\\nAll values are in milliseconds. Drivers should map these onto whatever HTTP client their SDK uses; the defaults applied in `@llumiverse/core/createDriverHttpAgent` are: - headersTimeout: 60_000 - bodyTimeout: 60_000 - connectTimeout: 10_000 - keepAliveTimeout: 30_000\\n\\nThe defaults are deliberately tighter than Node's undici default (5 minutes for headers/body) so a hung upstream surfaces quickly. Bump `bodyTimeout` for streaming flows that have legitimate silent gaps (e.g. tool-using agents).\",\n },\n ImagenMaskMode: {\n type: 'string',\n enum: ['MASK_MODE_USER_PROVIDED', 'MASK_MODE_BACKGROUND', 'MASK_MODE_FOREGROUND', 'MASK_MODE_SEMANTIC'],\n },\n ImagenOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-imagen',\n },\n number_of_images: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n person_generation: {\n type: 'string',\n enum: ['dont_allow', 'allow_adults', 'allow_all'],\n },\n safety_setting: {\n type: 'string',\n enum: ['block_none', 'block_only_high', 'block_medium_and_above', 'block_low_and_above'],\n },\n image_file_type: {\n type: 'string',\n enum: ['image/jpeg', 'image/png'],\n },\n jpeg_compression_quality: {\n type: 'number',\n },\n aspect_ratio: {\n type: 'string',\n enum: ['1:1', '4:3', '3:4', '16:9', '9:16'],\n },\n add_watermark: {\n type: 'boolean',\n },\n enhance_prompt: {\n type: 'boolean',\n },\n edit_mode: {\n $ref: '#/$defs/ImagenTaskType',\n },\n guidance_scale: {\n type: 'number',\n },\n edit_steps: {\n type: 'number',\n },\n mask_mode: {\n $ref: '#/$defs/ImagenMaskMode',\n },\n mask_dilation: {\n type: 'number',\n },\n mask_class: {\n type: 'array',\n items: {\n type: 'number',\n },\n },\n controlType: {\n type: 'string',\n enum: ['CONTROL_TYPE_FACE_MESH', 'CONTROL_TYPE_CANNY', 'CONTROL_TYPE_SCRIBBLE'],\n },\n controlImageComputation: {\n type: 'boolean',\n },\n subjectType: {\n type: 'string',\n enum: [\n 'SUBJECT_TYPE_PERSON',\n 'SUBJECT_TYPE_ANIMAL',\n 'SUBJECT_TYPE_PRODUCT',\n 'SUBJECT_TYPE_DEFAULT',\n ],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ImagenTaskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'EDIT_MODE_INPAINT_REMOVAL',\n 'EDIT_MODE_INPAINT_INSERTION',\n 'EDIT_MODE_BGSWAP',\n 'EDIT_MODE_OUTPAINT',\n 'CUSTOMIZATION_SUBJECT',\n 'CUSTOMIZATION_STYLE',\n 'CUSTOMIZATION_CONTROLLED',\n 'CUSTOMIZATION_INSTRUCT',\n ],\n },\n IntakePageRanges: {\n type: 'array',\n items: {\n minItems: 2,\n maxItems: 2,\n type: 'array',\n items: {\n type: 'integer',\n minimum: -2147483648,\n maximum: 2147483647,\n },\n },\n description: 'Static page ranges: inclusive [start, end] pairs; negative indexes count from the end of the document ([[1, 2], [-1, -1]] = first two pages plus the last page).',\n },\n IntakePageScope: {\n type: 'string',\n enum: ['all', 'located'],\n description: 'Named page scope for intake conversion/extraction: everything or the locate-pass result. Static page ranges live in the sibling `page_ranges` field (which wins when set) — kept as a SEPARATE field because scalar-or-collection unions generate unstable API clients.',\n },\n IntakeVisionDetail: {\n type: 'string',\n enum: ['low', 'standard', 'high'],\n description: 'Vision detail level names referenced by intake policies. The rendering profiles behind the names (dpi, max size, quality, color mode) are PLATFORM-defined and project-overridable — a type only ever references a detail name.',\n },\n InteractionExecutionConfiguration: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n model: {\n type: 'string',\n },\n do_validate: {\n type: 'boolean',\n },\n run_data: {\n $ref: '#/$defs/RunDataStorageLevel',\n },\n configMode: {\n $ref: '#/$defs/ConfigModes',\n },\n model_options: {\n $ref: '#/$defs/ModelOptions',\n },\n prompt_cache_key: {\n type: 'string',\n description: 'Stable provider-side routing key for automatic prompt caching.',\n },\n prompt_cache_schema_suffix: {\n type: 'boolean',\n description: 'Put the result schema after the cached prefix; Vertesia still validates the returned JSON against it.',\n },\n http_timeout: {\n $ref: '#/$defs/HttpTimeoutOptions',\n description: 'Per-run HTTP timeouts for upstream LLM-provider calls.',\n },\n },\n additionalProperties: false,\n },\n ModelOptions: {\n oneOf: [\n {\n $ref: '#/$defs/TextFallbackOptions',\n },\n {\n $ref: '#/$defs/ImagenOptions',\n },\n {\n $ref: '#/$defs/VertexAIClaudeOptions',\n },\n {\n $ref: '#/$defs/VertexAIGeminiOptions',\n },\n {\n $ref: '#/$defs/VertexAIGrokOptions',\n },\n {\n $ref: '#/$defs/NovaCanvasOptions',\n },\n {\n $ref: '#/$defs/BedrockConverseOptions',\n },\n {\n $ref: '#/$defs/BedrockNovaOptions',\n },\n {\n $ref: '#/$defs/BedrockMistralOptions',\n },\n {\n $ref: '#/$defs/BedrockAI21Options',\n },\n {\n $ref: '#/$defs/BedrockCohereCommandOptions',\n },\n {\n $ref: '#/$defs/BedrockClaudeOptions',\n },\n {\n $ref: '#/$defs/BedrockPalmyraOptions',\n },\n {\n $ref: '#/$defs/BedrockGptOssOptions',\n },\n {\n $ref: '#/$defs/TwelvelabsPegasusOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleResponsesOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleChatCompletionsOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleClaudeOptions',\n },\n {\n $ref: '#/$defs/OpenAiThinkingOptions',\n },\n {\n $ref: '#/$defs/OpenAiTextOptions',\n },\n {\n $ref: '#/$defs/OpenAiDalleOptions',\n },\n {\n $ref: '#/$defs/OpenAiGptImageOptions',\n },\n {\n $ref: '#/$defs/GroqOptions',\n },\n ],\n },\n NovaCanvasOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova-canvas',\n },\n taskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'TEXT_IMAGE_WITH_IMAGE_CONDITIONING',\n 'COLOR_GUIDED_GENERATION',\n 'IMAGE_VARIATION',\n 'INPAINTING',\n 'OUTPAINTING',\n 'BACKGROUND_REMOVAL',\n ],\n },\n width: {\n type: 'number',\n },\n height: {\n type: 'number',\n },\n quality: {\n type: 'string',\n enum: ['standard', 'premium'],\n },\n cfgScale: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n numberOfImages: {\n type: 'number',\n },\n controlMode: {\n type: 'string',\n enum: ['CANNY_EDGE', 'SEGMENTATION'],\n },\n controlStrength: {\n type: 'number',\n },\n colors: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n similarityStrength: {\n type: 'number',\n },\n outPaintingMode: {\n type: 'string',\n enum: ['DEFAULT', 'PRECISE'],\n },\n },\n required: ['_option_id', 'taskType'],\n additionalProperties: false,\n },\n OpenAiDalleOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-dalle',\n },\n size: {\n type: 'string',\n enum: ['256x256', '512x512', '1024x1024', '1792x1024', '1024x1792'],\n },\n image_quality: {\n type: 'string',\n enum: ['standard', 'hd'],\n },\n style: {\n type: 'string',\n enum: ['vivid', 'natural'],\n },\n response_format: {\n type: 'string',\n enum: ['url', 'b64_json'],\n },\n n: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiGptImageOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-gpt-image',\n },\n size: {\n type: 'string',\n enum: ['1024x1024', '1024x1536', '1536x1024', 'auto'],\n },\n image_quality: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'auto'],\n },\n background: {\n type: 'string',\n enum: ['transparent', 'opaque', 'auto'],\n },\n output_format: {\n type: 'string',\n enum: ['png', 'webp', 'jpeg'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiTextOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-text',\n },\n max_tokens: {\n type: 'number',\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiThinkingOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ReasoningEffort: {\n type: 'string',\n enum: ['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'],\n },\n RunDataStorageLevel: {\n type: 'string',\n enum: ['STANDARD', 'RESTRICTED', 'DEBUG'],\n },\n TextFallbackOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'text-fallback',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ThinkingLevel: {\n type: 'string',\n enum: ['HIGH', 'MEDIUM', 'LOW', 'MINIMAL', 'THINKING_LEVEL_UNSPECIFIED'],\n },\n TwelvelabsPegasusOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-twelvelabs-pegasus',\n },\n temperature: {\n type: 'number',\n },\n max_tokens: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGeminiOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-gemini',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['minimal', 'low', 'medium', 'high'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n thinking_level: {\n $ref: '#/$defs/ThinkingLevel',\n },\n flex: {\n type: 'boolean',\n },\n image_aspect_ratio: {\n type: 'string',\n enum: ['1:1', '2:3', '3:2', '3:4', '4:3', '9:16', '16:9', '21:9'],\n },\n image_size: {\n type: 'string',\n enum: ['1K', '2K', '4K'],\n },\n person_generation: {\n type: 'string',\n enum: ['ALLOW_ALL', 'ALLOW_ADULT', 'ALLOW_NONE'],\n },\n prominent_people: {\n type: 'string',\n enum: ['PROMINENT_PEOPLE_UNSPECIFIED', 'ALLOW_PROMINENT_PEOPLE', 'BLOCK_PROMINENT_PEOPLE'],\n },\n output_mime_type: {\n type: 'string',\n enum: ['image/png', 'image/jpeg'],\n },\n output_compression_quality: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGrokOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-grok',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n },\n};\n//# sourceMappingURL=intake-policy-schema.generated.js.map","export const RenditionSchema = {\n type: 'object',\n description: 'Represent a rendition of a file stored in an object. It will be stored as a separate object in the database.',\n properties: {\n mime_type: {\n type: 'string',\n description: 'The format of the rendition. This is a MIME type.',\n },\n source_etag: {\n type: 'string',\n description: 'The ETag of the file used for the rendition.',\n nullable: true,\n },\n height: {\n type: 'integer',\n description: 'The height of the rendition',\n nullable: true,\n },\n width: {\n type: 'integer',\n description: 'The width of the rendition',\n nullable: true,\n },\n multipart: {\n type: 'boolean',\n description: 'If the rendition is a multi-part rendition',\n nullable: true,\n default: false,\n },\n total_parts: {\n type: 'integer',\n description: 'The total number of parts in the rendition',\n nullable: true,\n },\n },\n required: ['mime_type'],\n};\nexport const DocumentPartSchema = {\n type: 'object',\n description: 'Represent a semantic chunk of a document',\n properties: {\n source_etag: {\n type: 'string',\n description: 'The ETag of the file used for the rendition.',\n nullable: true,\n },\n part_number: {\n type: 'integer',\n description: 'The part number of the chunk',\n },\n title: {\n type: 'string',\n description: 'The title of the chunk',\n nullable: true,\n },\n source_line_start: {\n type: 'integer',\n description: 'The line number where the chunk starts',\n nullable: true,\n },\n source_line_end: {\n type: 'integer',\n description: 'The line number where the chunk ends',\n nullable: true,\n },\n type: {\n type: 'string',\n description: 'The type of the chunk',\n enum: ['text', 'image', 'table', 'chart', 'diagram', 'code', 'other'],\n nullable: true,\n },\n page_number: {\n type: 'integer',\n description: 'The page number of the document part',\n nullable: true,\n },\n description: {\n type: 'string',\n description: \"The description of the document part, if it's an image, the exhaustive description of the image\",\n nullable: true,\n },\n height: {\n type: 'integer',\n description: 'The height of the rendition',\n nullable: true,\n },\n width: {\n type: 'integer',\n description: 'The width of the rendition',\n nullable: true,\n },\n },\n required: ['part_number'],\n};\n//# sourceMappingURL=object-types.js.map","export const PROCESS_DEFINITION_FORMAT_VERSION = 1;\n//# sourceMappingURL=process.js.map","export const PROCESS_DEFINITION_JSON_SCHEMA_ID = 'https://schemas.vertesia.com/process-definition.v1.schema.json';\nexport const ProcessDefinitionBodyJsonSchema = {\n $id: PROCESS_DEFINITION_JSON_SCHEMA_ID,\n type: 'object',\n description: 'A process definition describes a state-machine workflow executed by the Process Engine.',\n properties: {\n format_version: {\n type: 'integer',\n const: 1,\n description: 'Native process definition format version.',\n },\n process: {\n type: 'string',\n minLength: 1,\n description: 'Stable process code, for example invoice_approval.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Optional human-readable process description.',\n },\n initial: {\n type: 'string',\n minLength: 1,\n description: 'Initial node id. Semantic validation verifies this exists in nodes.',\n },\n model: {\n type: 'string',\n nullable: true,\n description: 'Optional default model for agent and interaction nodes.',\n },\n resources: {\n $ref: '#/$defs/processResourcesDefinition',\n },\n context: {\n $ref: '#/$defs/processContextDefinition',\n },\n nodes: {\n type: 'object',\n description: 'Map of node id to node definition.',\n minProperties: 1,\n required: [],\n additionalProperties: {\n $ref: '#/$defs/nodeDefinition',\n },\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['format_version', 'process', 'initial', 'context', 'nodes'],\n additionalProperties: false,\n $defs: {\n metadataDefinition: {\n type: 'object',\n nullable: true,\n description: 'Execution-irrelevant metadata such as editor layout, provenance, and audit hints.',\n required: [],\n additionalProperties: true,\n },\n processContextDefinition: {\n type: 'object',\n properties: {\n schema: {\n description: 'JSON Schema for the process context.',\n anyOf: [\n { type: 'boolean' },\n {\n type: 'object',\n additionalProperties: true,\n },\n ],\n },\n initial: {\n type: 'object',\n description: 'Initial context values.',\n required: [],\n additionalProperties: true,\n },\n },\n required: ['schema', 'initial'],\n additionalProperties: false,\n },\n nodeDefinition: {\n type: 'object',\n description: 'A state-machine node executed by the Process Engine.',\n properties: {\n type: {\n type: 'string',\n enum: [\n 'tool',\n 'interaction',\n 'agent',\n 'script',\n 'process',\n 'human_task',\n 'foreach',\n 'branch',\n 'condition',\n 'final',\n ],\n description: 'Node executor type.',\n },\n tool: {\n type: 'string',\n nullable: true,\n description: 'Builtin or remote tool name for tool nodes.',\n },\n script: {\n type: 'string',\n nullable: true,\n description: 'Named process script resource for script nodes.',\n },\n timeout: {\n type: 'integer',\n minimum: 1,\n maximum: 600,\n nullable: true,\n description: 'Script execution timeout in seconds.',\n },\n interaction: {\n type: 'string',\n nullable: true,\n description: 'Interaction id or sys: interaction for interaction and agent nodes.',\n },\n process: {\n type: 'string',\n nullable: true,\n description: 'Stored child process id or process code for process nodes.',\n },\n process_definition: {\n $ref: '#',\n description: 'Inline child process definition for process nodes.',\n },\n process_version: {\n type: 'number',\n nullable: true,\n description: 'Stored child process version.',\n },\n run_type: {\n type: 'string',\n enum: ['supervised', 'programmatic'],\n nullable: true,\n description: 'Run type for child process nodes.',\n },\n returns: {\n $ref: '#/$defs/processNodeReturnsDefinition',\n },\n result_schema: {\n $ref: '#/$defs/jsonSchemaDefinition',\n description: 'Optional JSON Schema for structured output from interaction and agent nodes.',\n },\n prompt: {\n type: 'string',\n nullable: true,\n description: 'Prompt or instructions for agent and interaction nodes.',\n },\n input: {\n type: 'object',\n nullable: true,\n description: 'Node input template. Values may contain {{context_path}} placeholders.',\n required: [],\n additionalProperties: true,\n },\n config: {\n type: 'object',\n nullable: true,\n description: 'Executor-specific configuration.',\n required: [],\n additionalProperties: true,\n },\n title: {\n type: 'string',\n nullable: true,\n description: 'Short display title.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Developer-facing node description.',\n },\n human_description: {\n type: 'string',\n nullable: true,\n description: 'End-user-facing explanation of what this node does.',\n },\n writes: {\n type: 'array',\n nullable: true,\n description: 'Context paths this node may write.',\n items: { type: 'string' },\n },\n skippable: {\n type: 'boolean',\n nullable: true,\n description: 'Whether a supervisor may skip this node.',\n },\n max_retries: {\n type: 'number',\n nullable: true,\n description: 'Maximum node retry attempts.',\n },\n transitions: {\n type: 'array',\n nullable: true,\n description: 'Outgoing transitions. Semantic validation verifies targets exist.',\n items: { $ref: '#/$defs/transitionDefinition' },\n },\n tools: {\n type: 'array',\n nullable: true,\n description: 'Additional tool names available to an agent node.',\n items: { type: 'string' },\n },\n model: {\n type: 'string',\n nullable: true,\n description: 'Model override for this node.',\n },\n task: {\n $ref: '#/$defs/humanTaskDefinition',\n },\n foreach: {\n type: 'string',\n nullable: true,\n description: 'Context path to an array for foreach nodes.',\n },\n as: {\n type: 'string',\n nullable: true,\n description: 'Variable name for the current foreach item. Defaults to item.',\n },\n item_id: {\n type: 'string',\n nullable: true,\n description: 'Template for a stable item id in foreach collection output.',\n },\n node: {\n $ref: '#/$defs/nodeDefinition',\n description: 'Child node executed for each foreach item or branch child definition.',\n },\n max_concurrency: {\n type: 'integer',\n minimum: 1,\n nullable: true,\n description: 'Maximum concurrent child executions for foreach nodes.',\n },\n collect: {\n description: 'Where and how to collect foreach or branch results.',\n oneOf: [{ type: 'string', minLength: 1 }, { $ref: '#/$defs/parallelCollectDefinition' }],\n },\n failure_policy: {\n type: 'string',\n enum: ['fail_fast', 'collect_errors'],\n nullable: true,\n description: 'Foreach or branch failure policy.',\n },\n join: {\n type: 'string',\n enum: ['all'],\n nullable: true,\n description: 'Branch join policy.',\n },\n branches: {\n type: 'array',\n nullable: true,\n description: 'Condition or branch-node branches. Semantic validation verifies the type-specific shape.',\n items: {\n oneOf: [{ $ref: '#/$defs/branchDefinition' }, { $ref: '#/$defs/branchNodeBranchDefinition' }],\n },\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['type'],\n additionalProperties: false,\n },\n transitionDefinition: {\n type: 'object',\n properties: {\n to: {\n type: 'string',\n minLength: 1,\n description: 'Target node id.',\n },\n guard: {\n $ref: '#/$defs/jsonLogicRule',\n description: 'JSON Logic guard evaluated before transition.',\n },\n trigger: {\n type: 'string',\n enum: ['auto', 'agent', 'user'],\n nullable: true,\n description: 'Transition trigger. Omitted means auto.',\n },\n label: {\n type: 'string',\n nullable: true,\n description: 'Display label.',\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['to'],\n additionalProperties: false,\n },\n processResourcesDefinition: {\n type: 'object',\n nullable: true,\n properties: {\n scripts: {\n type: 'object',\n nullable: true,\n description: 'Named script resources available to script nodes.',\n required: [],\n additionalProperties: {\n $ref: '#/$defs/processScriptResource',\n },\n },\n },\n required: [],\n additionalProperties: false,\n },\n processScriptResource: {\n type: 'object',\n properties: {\n language: {\n type: 'string',\n enum: ['python', 'javascript', 'typescript'],\n },\n entrypoint: {\n type: 'string',\n minLength: 1,\n },\n source: {\n $ref: '#/$defs/processScriptSource',\n },\n packages: {\n type: 'array',\n nullable: true,\n items: { type: 'string' },\n },\n },\n required: ['language', 'entrypoint', 'source'],\n additionalProperties: false,\n },\n processScriptSource: {\n $ref: '#/$defs/processScriptInlineSource',\n },\n processScriptInlineSource: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n const: 'inline',\n description: 'Source discriminator. Additional source types may be added in future versions.',\n },\n files: {\n type: 'object',\n minProperties: 1,\n required: [],\n additionalProperties: {\n type: 'string',\n },\n },\n },\n required: ['type', 'files'],\n additionalProperties: false,\n },\n branchDefinition: {\n type: 'object',\n properties: {\n to: {\n type: 'string',\n minLength: 1,\n description: 'Target node id.',\n },\n when: {\n $ref: '#/$defs/jsonLogicRule',\n description: 'JSON Logic condition for this branch.',\n },\n default: {\n type: 'boolean',\n nullable: true,\n description: 'Fallback branch used when no condition matches.',\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['to'],\n additionalProperties: false,\n },\n branchNodeBranchDefinition: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n minLength: 1,\n description: 'Stable branch id.',\n },\n title: {\n type: 'string',\n nullable: true,\n description: 'Optional branch title.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Optional branch description.',\n },\n node: {\n $ref: '#/$defs/nodeDefinition',\n description: 'Child node executed for this branch.',\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['id', 'node'],\n additionalProperties: false,\n },\n humanTaskDefinition: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n minLength: 1,\n description: 'Task title shown in the inbox.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Task instructions shown to the assignee.',\n },\n assignee: {\n type: 'string',\n nullable: true,\n description: 'User id or group:<name> assignee reference.',\n },\n fields: {\n type: 'array',\n description: 'Fields required to complete the task.',\n items: { $ref: '#/$defs/taskField' },\n },\n },\n required: ['title', 'fields'],\n additionalProperties: false,\n },\n taskField: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n minLength: 1,\n description: 'Context/result field name.',\n },\n type: {\n type: 'string',\n enum: ['string', 'number', 'boolean', 'select', 'text'],\n description: 'Input field type.',\n },\n required: {\n type: 'boolean',\n nullable: true,\n description: 'Whether the field must be answered.',\n },\n label: {\n type: 'string',\n nullable: true,\n description: 'Display label.',\n },\n options: {\n type: 'array',\n nullable: true,\n description: 'Allowed options for select fields.',\n items: { type: 'string' },\n },\n default: {\n description: 'Default field value.',\n },\n },\n required: ['name', 'type'],\n additionalProperties: false,\n },\n processNodeReturnsDefinition: {\n type: 'object',\n properties: {\n from: {\n type: 'string',\n nullable: true,\n description: 'Path to read from child state or context.',\n },\n context: {\n type: 'array',\n nullable: true,\n description: 'Child context paths to return.',\n items: { type: 'string' },\n },\n },\n required: [],\n additionalProperties: false,\n },\n parallelCollectDefinition: {\n type: 'object',\n properties: {\n into: {\n type: 'string',\n minLength: 1,\n description: 'Context key receiving collected results.',\n },\n mode: {\n type: 'string',\n enum: ['array'],\n nullable: true,\n description: 'Collection mode.',\n },\n include: {\n type: 'array',\n nullable: true,\n description: 'Fields included in each collected item.',\n items: {\n type: 'string',\n enum: [\n 'status',\n 'index',\n 'item',\n 'item_id',\n 'branch_id',\n 'branch_title',\n 'output',\n 'context_update',\n 'error',\n 'child_run_id',\n 'child_workflow_id',\n 'child_workflow_run_id',\n ],\n },\n },\n },\n required: ['into'],\n additionalProperties: false,\n },\n jsonLogicRule: {\n type: 'object',\n description: 'JSON Logic expression.',\n required: [],\n additionalProperties: true,\n },\n jsonSchemaDefinition: {\n type: 'object',\n nullable: true,\n description: 'JSON Schema object.',\n required: [],\n additionalProperties: true,\n },\n },\n};\n//# sourceMappingURL=process-schema.js.map","import { PROCESS_DEFINITION_FORMAT_VERSION, } from './process.js';\nexport function getProcessInteractionValidationSelectors(interactions) {\n const selectors = new Set();\n for (const interaction of interactions) {\n selectors.add(interaction.id);\n selectors.add(interaction.name);\n if (interaction.type === 'sys') {\n selectors.add(`sys:${interaction.name}`);\n }\n if (interaction.type === 'app' && !interaction.id.startsWith('app:')) {\n selectors.add(`app:${interaction.id}`);\n }\n if (interaction.type === 'stored' || interaction.type === 'draft') {\n selectors.add(`${interaction.name}@draft`);\n selectors.add(`${interaction.id}@draft`);\n if (typeof interaction.version === 'number') {\n selectors.add(`${interaction.name}@${interaction.version}`);\n selectors.add(`${interaction.id}@${interaction.version}`);\n }\n }\n }\n return [...selectors];\n}\nexport const MAX_PROCESS_DEFINITION_BYTES = 1024 * 1024;\nexport const MAX_PROCESS_GUARD_DEPTH = 64;\nexport const MAX_PROCESS_GUARD_NODES = 4096;\nconst PROCESS_SCRIPT_RESOURCE_NAME = /^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/;\nconst PROCESS_SCRIPT_FILE_PATH = /^[a-zA-Z0-9._-]+(\\/[a-zA-Z0-9._-]+)*$/;\nconst PROCESS_SCRIPT_PACKAGE = /^(?:@[a-zA-Z0-9][a-zA-Z0-9._-]*\\/[a-zA-Z0-9][a-zA-Z0-9._-]*|[a-zA-Z0-9][a-zA-Z0-9._-]*)(?:\\[[a-zA-Z0-9,._-]+\\])?(?:(?:@|[<>=!~^])[^\\s;|&$`]*)?$/;\nexport function validateProcessDefinitionBody(definition, options = {}) {\n const result = getProcessDefinitionValidationResult(definition, options);\n if (!result.valid) {\n throw new Error(result.errors.join('; '));\n }\n}\nexport function getProcessDefinitionValidationResult(definition, options = {}) {\n const errors = [];\n const context = createValidationContext(options);\n const size = new TextEncoder().encode(JSON.stringify(definition)).length;\n if (size > MAX_PROCESS_DEFINITION_BYTES) {\n errors.push(`process definition, including embedded resources, exceeds ${MAX_PROCESS_DEFINITION_BYTES} bytes`);\n }\n if (!definition.process) {\n errors.push('process is missing');\n }\n if (definition.format_version !== PROCESS_DEFINITION_FORMAT_VERSION) {\n errors.push(`format_version must be ${PROCESS_DEFINITION_FORMAT_VERSION}`);\n }\n if (!definition.initial) {\n errors.push('initial node is missing');\n }\n if (!definition.nodes || Object.keys(definition.nodes).length === 0) {\n errors.push('nodes are missing');\n }\n else if (definition.initial && !definition.nodes[definition.initial]) {\n errors.push(`initial node \"${definition.initial}\" does not exist`);\n }\n if (!definition.context?.schema) {\n errors.push('context.schema is missing');\n }\n if (!definition.context?.initial) {\n errors.push('context.initial is missing');\n }\n validateProcessResources(definition, errors);\n for (const [nodeId, node] of Object.entries(definition.nodes ?? {})) {\n validateNodeDefinition(definition, nodeId, node, errors, context);\n }\n return {\n valid: errors.length === 0,\n errors,\n };\n}\nfunction validateNodeDefinition(definition, nodeId, node, errors, context) {\n if (!isProcessNodeType(node.type)) {\n errors.push(`node \"${nodeId}\" has invalid type \"${String(node.type)}\"`);\n }\n if (node.type === 'human_task') {\n if (!node.task) {\n errors.push(`human_task node \"${nodeId}\" is missing task`);\n }\n else if (!node.task.title) {\n errors.push(`human_task node \"${nodeId}\" task title is missing`);\n }\n else if (!Array.isArray(node.task.fields)) {\n errors.push(`human_task node \"${nodeId}\" task fields must be an array`);\n }\n else {\n const allowedTypes = ['string', 'number', 'boolean', 'select', 'text'];\n node.task.fields.forEach((field, i) => {\n const path = `human_task node \"${nodeId}\" task.fields[${i}]`;\n if (!isRecord(field)) {\n errors.push(`${path} must be an object`);\n return;\n }\n if (typeof field.name !== 'string' || field.name.length === 0) {\n errors.push(`${path}.name must be a non-empty string (not \"id\")`);\n }\n if (typeof field.type !== 'string' || !allowedTypes.includes(field.type)) {\n errors.push(`${path}.type must be one of ${allowedTypes.join(', ')}`);\n }\n if (field.type === 'select' && !(Array.isArray(field.options) && field.options.length > 0)) {\n errors.push(`${path} of type \"select\" requires a non-empty options[] array`);\n }\n });\n }\n }\n if (node.type === 'tool') {\n validateToolNodeDefinition(nodeId, node, errors, context);\n }\n if (node.type === 'script') {\n validateScriptNodeDefinition(definition, nodeId, node, errors);\n }\n else {\n if (node.script !== undefined) {\n errors.push(`node \"${nodeId}\" defines script but has type \"${node.type}\"`);\n }\n if (node.timeout !== undefined) {\n errors.push(`node \"${nodeId}\" defines timeout but has type \"${node.type}\"`);\n }\n }\n if ((node.type === 'interaction' || node.type === 'agent') && node.interaction && context.knownInteractions) {\n if (!isKnownSelector(node.interaction, context.knownInteractions)) {\n errors.push(`${node.type} node \"${nodeId}\" references unknown interaction \"${node.interaction}\"`);\n }\n }\n if ((node.type === 'interaction' || node.type === 'agent') &&\n node.result_schema !== undefined &&\n !isRecord(node.result_schema)) {\n errors.push(`${node.type} node \"${nodeId}\" result_schema must be a JSON Schema object`);\n }\n if (node.type === 'process') {\n if (!node.process && !node.process_definition) {\n errors.push(`process node \"${nodeId}\" is missing process or process_definition`);\n }\n if (node.run_type && !isProcessNodeRunType(node.run_type)) {\n errors.push(`process node \"${nodeId}\" has invalid run_type \"${String(node.run_type)}\"`);\n }\n if (node.returns?.from !== undefined && typeof node.returns.from !== 'string') {\n errors.push(`process node \"${nodeId}\" returns.from must be a string`);\n }\n if (node.returns?.context !== undefined && !isStringArray(node.returns.context)) {\n errors.push(`process node \"${nodeId}\" returns.context must be an array of strings`);\n }\n if (node.process_definition) {\n const childResult = getProcessDefinitionValidationResult(node.process_definition, context.options);\n for (const error of childResult.errors) {\n errors.push(`process node \"${nodeId}\" process_definition: ${error}`);\n }\n }\n }\n if (node.type === 'foreach') {\n if (!node.foreach) {\n errors.push(`foreach node \"${nodeId}\" is missing foreach`);\n }\n if (!node.node) {\n errors.push(`foreach node \"${nodeId}\" is missing node`);\n }\n if (node.max_concurrency !== undefined &&\n (!Number.isInteger(node.max_concurrency) || node.max_concurrency < 1)) {\n errors.push(`foreach node \"${nodeId}\" max_concurrency must be a positive integer`);\n }\n if (node.item_id !== undefined && typeof node.item_id !== 'string') {\n errors.push(`foreach node \"${nodeId}\" item_id must be a string`);\n }\n validateCollectDefinition('foreach', nodeId, node.collect, errors);\n if (node.node) {\n validateFanoutChildNodeDefinition(definition, {\n ownerLabel: `foreach node \"${nodeId}\"`,\n childPath: `${nodeId}.node`,\n childLabel: `foreach node \"${nodeId}\" child node`,\n child: node.node,\n }, errors, context);\n }\n }\n if (node.type === 'branch') {\n if (!Array.isArray(node.branches) || node.branches.length === 0) {\n errors.push(`branch node \"${nodeId}\" must define at least one branch`);\n }\n if (node.join !== undefined && node.join !== 'all') {\n errors.push(`branch node \"${nodeId}\" join must be \"all\"`);\n }\n validateCollectDefinition('branch', nodeId, node.collect, errors);\n const branches = getBranchNodeBranches(node);\n const seenIds = new Set();\n for (const [index, branch] of branches.entries()) {\n if (!branch.id) {\n errors.push(`branch node \"${nodeId}\" branch at index ${index} is missing id`);\n }\n else if (seenIds.has(branch.id)) {\n errors.push(`branch node \"${nodeId}\" has duplicate branch id \"${branch.id}\"`);\n }\n else {\n seenIds.add(branch.id);\n }\n if (!branch.node) {\n errors.push(`branch node \"${nodeId}\" branch \"${branch.id || index}\" is missing node`);\n continue;\n }\n validateFanoutChildNodeDefinition(definition, {\n ownerLabel: `branch node \"${nodeId}\" branch \"${branch.id || index}\"`,\n childPath: `${nodeId}.branches.${index}.node`,\n childLabel: `branch node \"${nodeId}\" branch \"${branch.id || index}\" child node`,\n child: branch.node,\n }, errors, context);\n }\n }\n if (node.failure_policy && !isParallelFailurePolicy(node.failure_policy)) {\n errors.push(`node \"${nodeId}\" has invalid failure_policy \"${String(node.failure_policy)}\"`);\n }\n for (const transition of node.transitions ?? []) {\n if (!definition.nodes[transition.to]) {\n errors.push(`node \"${nodeId}\" has transition to \"${transition.to}\" which does not exist`);\n }\n if (transition.trigger && !isTransitionTrigger(transition.trigger)) {\n errors.push(`node \"${nodeId}\" has invalid transition trigger \"${transition.trigger}\"`);\n }\n if (typeof transition.guard === 'string') {\n errors.push(`node \"${nodeId}\" transition to \"${transition.to}\" guard must be a JSON Logic object`);\n }\n else if (transition.guard) {\n validateGuardRule(`node \"${nodeId}\" transition to \"${transition.to}\" guard`, transition.guard, errors);\n }\n }\n for (const [index, branch] of getConditionBranches(node).entries()) {\n if (hasStringConditionProperty(branch, 'condition')) {\n errors.push(`node \"${nodeId}\" branch at index ${index} uses string condition; use JSON Logic in \"when\" instead`);\n }\n if (hasStringConditionProperty(branch, 'guard')) {\n errors.push(`node \"${nodeId}\" branch at index ${index} uses string guard; use JSON Logic in \"when\" instead`);\n }\n if (!definition.nodes[branch.to]) {\n errors.push(`node \"${nodeId}\" has branch to \"${branch.to}\" which does not exist`);\n }\n if (typeof branch.when === 'string') {\n errors.push(`node \"${nodeId}\" branch to \"${branch.to}\" when must be a JSON Logic object`);\n }\n else if (branch.when) {\n validateGuardRule(`node \"${nodeId}\" branch to \"${branch.to}\" guard`, branch.when, errors);\n }\n }\n}\nfunction createValidationContext(options) {\n return {\n options,\n knownTools: options.knownTools ? new Set(options.knownTools) : undefined,\n knownInteractions: options.knownInteractions ? new Set(options.knownInteractions) : undefined,\n };\n}\nfunction validateToolNodeDefinition(nodeId, node, errors, context) {\n if (!node.tool) {\n errors.push(`tool node \"${nodeId}\" is missing tool`);\n return;\n }\n if (context.knownTools && !context.knownTools.has(node.tool)) {\n errors.push(`tool node \"${nodeId}\" references unknown tool \"${node.tool}\"`);\n }\n if (node.tool === 'set_context') {\n validateSetContextNode(nodeId, node, errors);\n }\n}\nfunction validateProcessResources(definition, errors) {\n for (const [name, resource] of Object.entries(definition.resources?.scripts ?? {})) {\n const label = `script resource \"${name}\"`;\n if (!PROCESS_SCRIPT_RESOURCE_NAME.test(name)) {\n errors.push(`${label} has an invalid name`);\n }\n if (resource.language !== 'python' &&\n resource.language !== 'javascript' &&\n resource.language !== 'typescript') {\n errors.push(`${label} has invalid language \"${String(resource.language)}\"`);\n }\n if (resource.source?.type !== 'inline') {\n errors.push(`${label} has unsupported source type \"${String(resource.source?.type)}\"`);\n continue;\n }\n const files = resource.source.files;\n if (!files || Object.keys(files).length === 0) {\n errors.push(`${label} must define at least one file`);\n continue;\n }\n for (const [path, content] of Object.entries(files)) {\n if (!PROCESS_SCRIPT_FILE_PATH.test(path) || path.split('/').includes('..')) {\n errors.push(`${label} has unsafe file path \"${path}\"`);\n }\n if (typeof content !== 'string') {\n errors.push(`${label} file \"${path}\" must contain text`);\n }\n }\n if (!Object.hasOwn(files, resource.entrypoint)) {\n errors.push(`${label} entrypoint \"${resource.entrypoint}\" is not present in files`);\n }\n for (const packageSpec of resource.packages ?? []) {\n if (typeof packageSpec !== 'string' ||\n !packageSpec ||\n packageSpec.startsWith('-') ||\n !PROCESS_SCRIPT_PACKAGE.test(packageSpec)) {\n errors.push(`${label} has unsafe package specification \"${String(packageSpec)}\"`);\n }\n }\n }\n}\nfunction validateScriptNodeDefinition(definition, nodeId, node, errors) {\n if (!node.script) {\n errors.push(`script node \"${nodeId}\" is missing script`);\n }\n else if (!definition.resources?.scripts?.[node.script]) {\n errors.push(`script node \"${nodeId}\" references unknown script resource \"${node.script}\"`);\n }\n if (node.timeout !== undefined && (!Number.isInteger(node.timeout) || node.timeout < 1 || node.timeout > 600)) {\n errors.push(`script node \"${nodeId}\" timeout must be an integer between 1 and 600`);\n }\n}\nfunction validateSetContextNode(nodeId, node, errors) {\n const input = node.input;\n if (!isRecord(input)) {\n errors.push(`tool node \"${nodeId}\" set_context input must be an object`);\n return;\n }\n for (const key of Object.keys(input)) {\n if (key !== 'updates' && key !== 'reason' && key !== 'event_id') {\n errors.push(`tool node \"${nodeId}\" set_context input has unsupported property \"${key}\"`);\n }\n }\n if (!isRecord(input.updates)) {\n errors.push(`tool node \"${nodeId}\" set_context input.updates must be an object`);\n return;\n }\n if (input.reason !== undefined && typeof input.reason !== 'string') {\n errors.push(`tool node \"${nodeId}\" set_context input.reason must be a string`);\n }\n if (input.event_id !== undefined && typeof input.event_id !== 'string') {\n errors.push(`tool node \"${nodeId}\" set_context input.event_id must be a string`);\n }\n validateSetContextWrites(nodeId, node, input.updates, errors);\n}\nfunction validateSetContextWrites(nodeId, node, updates, errors) {\n const updateKeys = Object.keys(updates);\n if (updateKeys.length === 0) {\n return;\n }\n if (!Array.isArray(node.writes) || node.writes.length === 0) {\n errors.push(`tool node \"${nodeId}\" set_context updates require declared writes`);\n return;\n }\n for (const key of updateKeys) {\n if (key.startsWith('_')) {\n errors.push(`tool node \"${nodeId}\" set_context cannot write reserved context field \"${key}\"`);\n }\n if (!isWriteAllowed(key, node.writes)) {\n errors.push(`tool node \"${nodeId}\" set_context updates \"${key}\" but writes does not allow it`);\n }\n }\n}\nfunction isWriteAllowed(key, writes) {\n return writes.some((write) => key === write || key.startsWith(`${write}.`));\n}\nfunction isKnownSelector(selector, knownSelectors) {\n if (knownSelectors.has(selector)) {\n return true;\n }\n if (!selector.includes('@')) {\n return false;\n }\n return knownSelectors.has(selector.slice(0, selector.lastIndexOf('@')));\n}\nfunction hasStringConditionProperty(value, key) {\n return isRecord(value) && typeof value[key] === 'string';\n}\nfunction isProcessNodeType(value) {\n return (value === 'tool' ||\n value === 'interaction' ||\n value === 'agent' ||\n value === 'script' ||\n value === 'process' ||\n value === 'human_task' ||\n value === 'foreach' ||\n value === 'branch' ||\n value === 'condition' ||\n value === 'final');\n}\nfunction isProcessNodeRunType(value) {\n return value === 'supervised' || value === 'programmatic';\n}\nfunction isTransitionTrigger(value) {\n return value === 'auto' || value === 'agent' || value === 'user';\n}\nfunction isParallelFailurePolicy(value) {\n return value === 'fail_fast' || value === 'collect_errors';\n}\nfunction isFanoutChildNodeType(value) {\n return (value === 'tool' || value === 'interaction' || value === 'agent' || value === 'script' || value === 'process');\n}\nfunction validateFanoutChildNodeDefinition(definition, input, errors, context) {\n const { ownerLabel, childPath, childLabel, child } = input;\n if (!isFanoutChildNodeType(child.type)) {\n errors.push(`${ownerLabel} has unsupported child node type \"${String(child.type)}\"`);\n return;\n }\n if ((child.transitions ?? []).length > 0) {\n errors.push(`${childLabel} must not define transitions`);\n }\n if ((child.branches ?? []).length > 0) {\n errors.push(`${childLabel} must not define branches`);\n }\n validateNodeDefinition(definition, childPath, {\n ...child,\n transitions: undefined,\n branches: undefined,\n }, errors, context);\n}\nfunction validateCollectDefinition(nodeKind, nodeId, collect, errors) {\n if (collect === undefined) {\n return;\n }\n if (typeof collect === 'string') {\n if (!collect) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect must not be empty`);\n }\n return;\n }\n if (!isRecord(collect)) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect must be a string or object`);\n return;\n }\n if (typeof collect.into !== 'string' || !collect.into) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.into is required`);\n }\n if (collect.mode !== undefined && collect.mode !== 'array') {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.mode must be \"array\"`);\n }\n if (collect.include !== undefined) {\n if (!Array.isArray(collect.include)) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.include must be an array`);\n return;\n }\n for (const field of collect.include) {\n if (typeof field !== 'string' || !isParallelCollectField(field)) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.include has invalid field \"${String(field)}\"`);\n }\n }\n }\n}\nfunction isParallelCollectField(value) {\n return (value === 'status' ||\n value === 'index' ||\n value === 'item' ||\n value === 'item_id' ||\n value === 'branch_id' ||\n value === 'branch_title' ||\n value === 'output' ||\n value === 'context_update' ||\n value === 'error' ||\n value === 'child_run_id' ||\n value === 'child_workflow_id' ||\n value === 'child_workflow_run_id');\n}\nfunction isStringArray(value) {\n return Array.isArray(value) && value.every((item) => typeof item === 'string');\n}\nfunction validateGuardRule(label, rule, errors) {\n const result = inspectGuardRule(rule);\n if (result.depth > MAX_PROCESS_GUARD_DEPTH) {\n errors.push(`${label} exceeds maximum depth ${MAX_PROCESS_GUARD_DEPTH}`);\n }\n if (result.nodes > MAX_PROCESS_GUARD_NODES) {\n errors.push(`${label} exceeds maximum node count ${MAX_PROCESS_GUARD_NODES}`);\n }\n}\nfunction inspectGuardRule(rule) {\n let maxDepth = 0;\n let nodes = 0;\n const stack = [{ value: rule, depth: 1 }];\n while (stack.length > 0) {\n const next = stack.pop();\n if (!next) {\n continue;\n }\n nodes += 1;\n maxDepth = Math.max(maxDepth, next.depth);\n if (nodes > MAX_PROCESS_GUARD_NODES || maxDepth > MAX_PROCESS_GUARD_DEPTH) {\n break;\n }\n if (Array.isArray(next.value)) {\n for (const item of next.value) {\n stack.push({ value: item, depth: next.depth + 1 });\n }\n }\n else if (isRecord(next.value)) {\n for (const value of Object.values(next.value)) {\n stack.push({ value, depth: next.depth + 1 });\n }\n }\n }\n return { depth: maxDepth, nodes };\n}\nfunction isRecord(value) {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\nfunction getConditionBranches(node) {\n return node.type === 'condition' && Array.isArray(node.branches)\n ? node.branches.filter(isConditionBranchDefinition)\n : [];\n}\nfunction getBranchNodeBranches(node) {\n return node.type === 'branch' && Array.isArray(node.branches)\n ? node.branches.filter(isBranchNodeBranchDefinition)\n : [];\n}\nfunction isConditionBranchDefinition(branch) {\n return 'to' in branch;\n}\nfunction isBranchNodeBranchDefinition(branch) {\n return 'node' in branch;\n}\n//# sourceMappingURL=process-validation.js.map","import { normalizeAgentResources } from '../interaction.js';\nexport var ContentEventName;\n(function (ContentEventName) {\n ContentEventName[\"create\"] = \"create\";\n ContentEventName[\"change_type\"] = \"change_type\";\n ContentEventName[\"update\"] = \"update\";\n ContentEventName[\"revision_created\"] = \"revision_created\";\n ContentEventName[\"delete\"] = \"delete\";\n ContentEventName[\"workflow_finished\"] = \"workflow_finished\";\n ContentEventName[\"workflow_execution_request\"] = \"workflow_execution_request\";\n ContentEventName[\"api_request\"] = \"api_request\";\n})(ContentEventName || (ContentEventName = {}));\nexport function getDocumentIds(payload) {\n // Check new input format first\n if (payload.input?.inputType === 'objectIds') {\n return payload.input.objectIds;\n }\n // Fall back to legacy objectIds field\n if (payload.objectIds) {\n return payload.objectIds;\n }\n return [];\n}\n// Task status enum for processed history\nexport var TaskStatus;\n(function (TaskStatus) {\n TaskStatus[\"SCHEDULED\"] = \"scheduled\";\n TaskStatus[\"RUNNING\"] = \"running\";\n TaskStatus[\"COMPLETED\"] = \"completed\";\n TaskStatus[\"FAILED\"] = \"failed\";\n TaskStatus[\"CANCELED\"] = \"canceled\";\n TaskStatus[\"TIMED_OUT\"] = \"timed_out\";\n TaskStatus[\"TERMINATED\"] = \"terminated\";\n TaskStatus[\"SENT\"] = \"sent\";\n TaskStatus[\"RECEIVED\"] = \"received\";\n})(TaskStatus || (TaskStatus = {}));\n// Task type enum\nexport var TaskType;\n(function (TaskType) {\n TaskType[\"ACTIVITY\"] = \"activity\";\n TaskType[\"CHILD_WORKFLOW\"] = \"childWorkflow\";\n TaskType[\"SIGNAL\"] = \"signal\";\n TaskType[\"TIMER\"] = \"timer\";\n})(TaskType || (TaskType = {}));\nexport const WorkflowExecutionStatusValues = {\n UNKNOWN: 0,\n RUNNING: 1,\n COMPLETED: 2,\n FAILED: 3,\n CANCELED: 4,\n TERMINATED: 5,\n CONTINUED_AS_NEW: 6,\n TIMED_OUT: 7,\n};\n// Keep numeric reverse lookup for existing callers without treating newer Temporal-only status\n// codes as part of Vertesia's published enum. Unknown numeric codes therefore read as undefined.\nexport const WorkflowExecutionStatus = {\n ...WorkflowExecutionStatusValues,\n 0: 'UNKNOWN',\n 1: 'RUNNING',\n 2: 'COMPLETED',\n 3: 'FAILED',\n 4: 'CANCELED',\n 5: 'TERMINATED',\n 6: 'CONTINUED_AS_NEW',\n 7: 'TIMED_OUT',\n};\nexport var AgentMessageType;\n(function (AgentMessageType) {\n AgentMessageType[AgentMessageType[\"SYSTEM\"] = 0] = \"SYSTEM\";\n AgentMessageType[AgentMessageType[\"THOUGHT\"] = 1] = \"THOUGHT\";\n AgentMessageType[AgentMessageType[\"PLAN\"] = 2] = \"PLAN\";\n AgentMessageType[AgentMessageType[\"UPDATE\"] = 3] = \"UPDATE\";\n AgentMessageType[AgentMessageType[\"COMPLETE\"] = 4] = \"COMPLETE\";\n AgentMessageType[AgentMessageType[\"WARNING\"] = 5] = \"WARNING\";\n AgentMessageType[AgentMessageType[\"ERROR\"] = 6] = \"ERROR\";\n AgentMessageType[AgentMessageType[\"ANSWER\"] = 7] = \"ANSWER\";\n AgentMessageType[AgentMessageType[\"QUESTION\"] = 8] = \"QUESTION\";\n AgentMessageType[AgentMessageType[\"REQUEST_INPUT\"] = 9] = \"REQUEST_INPUT\";\n AgentMessageType[AgentMessageType[\"IDLE\"] = 10] = \"IDLE\";\n AgentMessageType[AgentMessageType[\"TERMINATED\"] = 11] = \"TERMINATED\";\n AgentMessageType[AgentMessageType[\"STREAMING_CHUNK\"] = 12] = \"STREAMING_CHUNK\";\n AgentMessageType[AgentMessageType[\"BATCH_PROGRESS\"] = 13] = \"BATCH_PROGRESS\";\n AgentMessageType[AgentMessageType[\"RESTARTING\"] = 14] = \"RESTARTING\";\n})(AgentMessageType || (AgentMessageType = {}));\n// Type guards — check both message type and details shape for safety\nexport function isToolCallMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.THOUGHT &&\n !!details &&\n typeof details === 'object' &&\n typeof details.tool === 'string');\n}\n/** Extract the normalized resource references carried on a message's details, if any. */\nexport function getResourcesFromMessage(msg) {\n return normalizeAgentResources(msg.details?.resources);\n}\nexport function isDocumentEventMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.UPDATE &&\n !!details &&\n typeof details === 'object' &&\n (details.event_class === 'document_created' || details.event_class === 'document_updated') &&\n typeof details.document_id === 'string');\n}\nexport function isFileProcessingMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.SYSTEM &&\n !!details &&\n typeof details === 'object' &&\n details.system_type === 'file_processing' &&\n Array.isArray(details.files));\n}\nexport function isPlanMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.PLAN && !!details && typeof details === 'object' && Array.isArray(details.plan));\n}\nexport function isRequestInputMessage(msg) {\n return msg.type === AgentMessageType.REQUEST_INPUT && !!msg.details && typeof msg.details === 'object';\n}\n// ============================================\n// TYPE GUARDS\n// ============================================\n/**\n * Check if a message is in compact format\n */\nexport function isCompactMessage(msg) {\n return typeof msg === 'object' && msg !== null && 't' in msg;\n}\n/**\n * Check if a message is in legacy format\n */\nexport function isLegacyMessage(msg) {\n return typeof msg === 'object' && msg !== null && 'type' in msg && !('t' in msg);\n}\n// ============================================\n// CONVERTERS\n// ============================================\n/**\n * Map old string enum values to AgentMessageType\n */\nconst STRING_TO_TYPE_MAP = {\n system: AgentMessageType.SYSTEM,\n thought: AgentMessageType.THOUGHT,\n plan: AgentMessageType.PLAN,\n update: AgentMessageType.UPDATE,\n complete: AgentMessageType.COMPLETE,\n warning: AgentMessageType.WARNING,\n error: AgentMessageType.ERROR,\n answer: AgentMessageType.ANSWER,\n question: AgentMessageType.QUESTION,\n request_input: AgentMessageType.REQUEST_INPUT,\n idle: AgentMessageType.IDLE,\n terminated: AgentMessageType.TERMINATED,\n streaming_chunk: AgentMessageType.STREAMING_CHUNK,\n batch_progress: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Map integer values to AgentMessageType (primary format)\n */\nconst INT_TO_TYPE_MAP = {\n 0: AgentMessageType.SYSTEM,\n 1: AgentMessageType.THOUGHT,\n 2: AgentMessageType.PLAN,\n 3: AgentMessageType.UPDATE,\n 4: AgentMessageType.COMPLETE,\n 5: AgentMessageType.WARNING,\n 6: AgentMessageType.ERROR,\n 7: AgentMessageType.ANSWER,\n 8: AgentMessageType.QUESTION,\n 9: AgentMessageType.REQUEST_INPUT,\n 10: AgentMessageType.IDLE,\n 11: AgentMessageType.TERMINATED,\n 12: AgentMessageType.STREAMING_CHUNK,\n 13: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Normalize message type from string or number to AgentMessageType\n */\nexport function normalizeMessageType(type) {\n // Handle integer type (current format and AgentMessageType enum values)\n if (typeof type === 'number') {\n return INT_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n // Handle string type (legacy messages from Redis with 90-day TTL)\n if (typeof type === 'string') {\n return STRING_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n return AgentMessageType.UPDATE;\n}\n/**\n * Convert legacy AgentMessage to CompactMessage\n */\nexport function toCompactMessage(legacy) {\n const compact = {\n t: normalizeMessageType(legacy.type),\n };\n if (legacy.message)\n compact.m = legacy.message;\n if (legacy.workstream_id && legacy.workstream_id !== 'main')\n compact.w = legacy.workstream_id;\n if (legacy.timestamp)\n compact.ts = legacy.timestamp;\n // Handle legacy streaming chunk details\n if (compact.t === AgentMessageType.STREAMING_CHUNK && legacy.details) {\n const d = legacy.details;\n if (d.is_final)\n compact.f = 1;\n // streaming_id and chunk_index are no longer needed\n }\n else if (legacy.details) {\n compact.d = legacy.details;\n }\n return compact;\n}\n/**\n * Parse any message format (compact or legacy) into CompactMessage.\n * Use this as the entry point for all received messages.\n */\nexport function parseMessage(data) {\n const parsed = typeof data === 'string' ? JSON.parse(data) : data;\n if (isCompactMessage(parsed))\n return parsed;\n if (isLegacyMessage(parsed))\n return toCompactMessage(parsed);\n throw new Error('Unknown message format');\n}\n/**\n * Create a compact message (convenience function for server-side)\n */\nexport function createCompactMessage(type, options = {}) {\n const compact = { t: type };\n if (options.message)\n compact.m = options.message;\n if (options.workstreamId && options.workstreamId !== 'main')\n compact.w = options.workstreamId;\n if (options.details)\n compact.d = options.details;\n if (options.isFinal)\n compact.f = 1;\n if (options.timestamp)\n compact.ts = options.timestamp;\n return compact;\n}\n/**\n * Convert CompactMessage back to AgentMessage (for UI components).\n * This allows UI to continue using familiar field names while wire format is compact.\n * @param compact The compact message to convert\n * @param workflowRunId Optional workflow_run_id (known from SSE context, not in compact format)\n */\nexport function toAgentMessage(compact, workflowRunId = '') {\n const message = {\n type: compact.t,\n timestamp: compact.ts || Date.now(),\n workflow_run_id: workflowRunId,\n message: compact.m || '',\n workstream_id: compact.w || 'main',\n };\n if (compact.d !== undefined && compact.d !== null)\n message.details = compact.d;\n // For streaming chunks, restore is_final and preserve an explicit streaming_id\n // when present. Older chunks fall back to workstream_id as their grouping key.\n if (compact.t === AgentMessageType.STREAMING_CHUNK) {\n const details = typeof compact.d === 'object' && compact.d !== null ? compact.d : {};\n const streamingId = typeof details.streaming_id === 'string' ? details.streaming_id : compact.w || 'main';\n const activityId = compact.i ?? (typeof details.activity_id === 'string' ? details.activity_id : undefined);\n message.details = {\n ...details,\n streaming_id: streamingId,\n is_final: compact.f === 1,\n ...(activityId ? { activity_id: activityId } : {}),\n };\n }\n return message;\n}\n/**\n * Status of a file being processed for conversation use.\n */\nexport var FileProcessingStatus;\n(function (FileProcessingStatus) {\n /** File is being uploaded to artifact storage */\n FileProcessingStatus[\"UPLOADING\"] = \"uploading\";\n /** File uploaded, text extraction in progress */\n FileProcessingStatus[\"PROCESSING\"] = \"processing\";\n /** File is ready for use in conversation */\n FileProcessingStatus[\"READY\"] = \"ready\";\n /** File processing failed */\n FileProcessingStatus[\"ERROR\"] = \"error\";\n})(FileProcessingStatus || (FileProcessingStatus = {}));\n/**\n * A file is deliverable when it is ready and has not yet been delivered to the agent as part\n * of a user message. Deliverable files get attached to the next message; consumed ones stay\n * reachable to tools via artifact_path/md_path but are not re-attached.\n */\nexport function isDeliverableFile(file) {\n return file.status === FileProcessingStatus.READY && !file.consumed_at;\n}\n/**\n * Get the Redis pub/sub channel name for workflow messages.\n * Used by both publishers (workflow activities, studio-server) and subscribers (zeno-server, clients).\n * @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)\n */\nexport function getWorkflowChannel(workflowRunId) {\n return `workflow:${workflowRunId}:channel`;\n}\n/**\n * Get the Redis list key for storing workflow message history.\n * Messages are stored here for retrieval by reconnecting clients.\n * @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)\n */\nexport function getWorkflowUpdatesKey(workflowRunId) {\n return `workflow:${workflowRunId}:updates`;\n}\nexport const LOW_PRIORITY_TASK_QUEUE = 'low_priority';\n//# sourceMappingURL=workflow.js.map","/**\n * Rendering API types\n *\n * Types for rendering content to various formats (PDF, DOCX, images)\n */\nimport { WorkflowExecutionStatus } from './workflow.js';\nexport function getRenditionsPath(contentEtag, params) {\n return `renditions/${contentEtag}/${params.max_hw}`;\n}\n/** Type guard for markdown rendition vars */\nexport function isMarkdownRenditionVars(vars) {\n return vars.format === 'pdf' || vars.format === 'docx';\n}\nexport function isWorkflowTerminalStatus(status) {\n return (status === WorkflowExecutionStatus.COMPLETED ||\n status === WorkflowExecutionStatus.FAILED ||\n status === WorkflowExecutionStatus.CANCELED ||\n status === WorkflowExecutionStatus.TERMINATED ||\n status === WorkflowExecutionStatus.TIMED_OUT);\n}\n//# sourceMappingURL=rendering.js.map","/**\n * Agent Schedule Types\n *\n * Defines types for scheduling agents to run on a recurring basis using cron expressions.\n * Schedules are stored in MongoDB with execution handled by Temporal.\n */\n/**\n * Common cron expression presets for UI convenience.\n */\nexport const CRON_PRESETS = {\n EVERY_HOUR: '0 * * * *',\n EVERY_DAY_MIDNIGHT: '0 0 * * *',\n EVERY_DAY_9AM: '0 9 * * *',\n EVERY_MONDAY_MIDNIGHT: '0 0 * * MON',\n EVERY_WEEKDAY_9AM: '0 9 * * MON-FRI',\n FIRST_OF_MONTH: '0 0 1 * *',\n};\n/**\n * Human-readable descriptions for cron presets.\n */\nexport const CRON_PRESET_LABELS = {\n EVERY_HOUR: 'Every hour',\n EVERY_DAY_MIDNIGHT: 'Daily at midnight',\n EVERY_DAY_9AM: 'Daily at 9:00 AM',\n EVERY_MONDAY_MIDNIGHT: 'Every Monday at midnight',\n EVERY_WEEKDAY_9AM: 'Weekdays at 9:00 AM',\n FIRST_OF_MONTH: 'First day of month at midnight',\n};\n//# sourceMappingURL=schedule.js.map","export var ContentObjectApiHeaders;\n(function (ContentObjectApiHeaders) {\n ContentObjectApiHeaders[\"COLLECTION_ID\"] = \"x-collection-id\";\n ContentObjectApiHeaders[\"PROCESSING_PRIORITY\"] = \"x-processing-priority\";\n ContentObjectApiHeaders[\"CREATE_REVISION\"] = \"x-create-revision\";\n ContentObjectApiHeaders[\"REVISION_LABEL\"] = \"x-revision-label\";\n /**\n * @deprecated Events are now always emitted. This suppresses the Temporal-backed delivery targets (workflow, agent, and process) — webhook deliveries still fire.\n */\n ContentObjectApiHeaders[\"SUPPRESS_WORKFLOWS\"] = \"x-suppress-workflows\";\n})(ContentObjectApiHeaders || (ContentObjectApiHeaders = {}));\n/**\n * Headers for Data Store API calls.\n * Used for Cloud Run session affinity to route requests to the same instance.\n */\nexport var DataStoreApiHeaders;\n(function (DataStoreApiHeaders) {\n /** Data store ID for session affinity - routes requests for same store to same instance */\n DataStoreApiHeaders[\"DATA_STORE_ID\"] = \"x-data-store-id\";\n})(DataStoreApiHeaders || (DataStoreApiHeaders = {}));\nexport var ContentObjectStatus;\n(function (ContentObjectStatus) {\n ContentObjectStatus[\"created\"] = \"created\";\n ContentObjectStatus[\"processing\"] = \"processing\";\n ContentObjectStatus[\"ready\"] = \"ready\";\n ContentObjectStatus[\"completed\"] = \"completed\";\n ContentObjectStatus[\"failed\"] = \"failed\";\n ContentObjectStatus[\"archived\"] = \"archived\";\n})(ContentObjectStatus || (ContentObjectStatus = {}));\nexport var ContentNature;\n(function (ContentNature) {\n ContentNature[\"Video\"] = \"video\";\n ContentNature[\"Image\"] = \"image\";\n ContentNature[\"Audio\"] = \"audio\";\n ContentNature[\"Document\"] = \"document\";\n ContentNature[\"Code\"] = \"code\";\n ContentNature[\"Other\"] = \"other\";\n})(ContentNature || (ContentNature = {}));\nexport const POSTER_RENDITION_NAME = 'Poster';\nexport const AUDIO_RENDITION_NAME = 'Audio';\nexport const WEB_VIDEO_RENDITION_NAME = 'Web';\nexport const PDF_RENDITION_NAME = 'PDF';\nexport const TextExtractionStatus = {\n success: 'success',\n};\nexport function getContentTypeRefId(type) {\n return type.id;\n}\nexport function withContentObjectTypeRefDiscriminator(type) {\n const legacyCode = 'code' in type ? type.code : undefined;\n const id = type.id || legacyCode || '';\n const name = type.name || '';\n if (type.ref_type === 'incode' || isInCodeType(id)) {\n return { ref_type: 'incode', id, name };\n }\n return { ref_type: 'stored', id, name };\n}\n/**\n * Returns true if the type id represents an in-code type (system or app-contributed).\n * In-code types use colon-separated ids like \"sys:Invoice\" or \"app:myapp:Article\".\n * These types are read-only and cannot be edited through the UI.\n */\nexport function isInCodeType(typeId) {\n return typeId.includes(':');\n}\nexport var WorkflowRuleInputType;\n(function (WorkflowRuleInputType) {\n WorkflowRuleInputType[\"single\"] = \"single\";\n WorkflowRuleInputType[\"multiple\"] = \"multiple\";\n WorkflowRuleInputType[\"none\"] = \"none\";\n})(WorkflowRuleInputType || (WorkflowRuleInputType = {}));\nexport var ImageRenditionFormat;\n(function (ImageRenditionFormat) {\n ImageRenditionFormat[\"jpeg\"] = \"jpeg\";\n ImageRenditionFormat[\"png\"] = \"png\";\n ImageRenditionFormat[\"webp\"] = \"webp\";\n})(ImageRenditionFormat || (ImageRenditionFormat = {}));\nexport const MarkdownRenditionFormat = {\n docx: 'docx',\n pdf: 'pdf',\n};\n/**\n * Matrix of supported content type → format conversions.\n * This is the authoritative source of truth for what renditions can be generated.\n *\n * Key patterns:\n * - Exact MIME types (e.g., 'application/pdf')\n * - Wildcard patterns (e.g., 'image/*', 'video/*')\n */\nconst RENDITION_COMPATIBILITY = {\n // Image formats can generate: jpeg, png, webp\n 'image/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Video formats can generate: jpeg, png (thumbnails)\n 'video/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png],\n // PDF can generate: jpeg, png, webp (page images)\n 'application/pdf': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Markdown can generate: pdf, docx (NOT jpeg/png)\n 'text/markdown': [MarkdownRenditionFormat.pdf, MarkdownRenditionFormat.docx],\n // Any text/* can generate: docx (editable export)\n 'text/*': [MarkdownRenditionFormat.docx],\n // Office documents can generate: pdf\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [MarkdownRenditionFormat.pdf],\n 'application/msword': [MarkdownRenditionFormat.pdf],\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': [MarkdownRenditionFormat.pdf],\n 'application/vnd.ms-powerpoint': [MarkdownRenditionFormat.pdf],\n};\n/**\n * Check if a specific rendition format can be generated from a content type.\n *\n * @param contentType - The MIME type of the source content (e.g., 'image/png', 'text/markdown')\n * @param format - The desired rendition format (e.g., ImageRenditionFormat.jpeg)\n * @returns true if the format can be generated from the content type\n *\n * @example\n * canGenerateRendition('image/png', ImageRenditionFormat.jpeg) // true\n * canGenerateRendition('text/markdown', ImageRenditionFormat.jpeg) // false\n * canGenerateRendition('text/markdown', MarkdownRenditionFormat.pdf) // true\n */\nexport function canGenerateRendition(contentType, format) {\n if (!contentType)\n return false;\n const formatStr = typeof format === 'string' ? format : format;\n // Check exact match first\n const exactMatch = RENDITION_COMPATIBILITY[contentType];\n if (exactMatch?.some((f) => f === formatStr)) {\n return true;\n }\n // Check wildcard patterns (e.g., 'image/*', 'video/*')\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch?.some((f) => f === formatStr)) {\n return true;\n }\n return false;\n}\n/**\n * Get the list of rendition formats supported for a given content type.\n *\n * @param contentType - The MIME type of the source content\n * @returns Array of supported rendition formats, or empty array if none\n *\n * @example\n * getSupportedRenditionFormats('image/png') // [jpeg, png, webp]\n * getSupportedRenditionFormats('text/markdown') // [pdf, docx]\n * getSupportedRenditionFormats('text/html') // []\n */\nexport function getSupportedRenditionFormats(contentType) {\n if (!contentType)\n return [];\n // Check exact match first\n if (RENDITION_COMPATIBILITY[contentType]) {\n return [...RENDITION_COMPATIBILITY[contentType]];\n }\n // Check wildcard patterns\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch) {\n return [...wildcardMatch];\n }\n return [];\n}\n/**\n * Check if a content type supports visual (image) renditions.\n * This is useful for determining if a document can have thumbnails/previews.\n *\n * @param contentType - The MIME type of the source content\n * @returns true if the content type can generate JPEG renditions\n *\n * @example\n * supportsVisualRendition('image/png') // true\n * supportsVisualRendition('application/pdf') // true\n * supportsVisualRendition('text/markdown') // false\n */\nexport function supportsVisualRendition(contentType) {\n return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);\n}\nexport var ContentObjectProcessingPriority;\n(function (ContentObjectProcessingPriority) {\n ContentObjectProcessingPriority[\"normal\"] = \"normal\";\n ContentObjectProcessingPriority[\"low\"] = \"low\";\n})(ContentObjectProcessingPriority || (ContentObjectProcessingPriority = {}));\n//# sourceMappingURL=store.js.map","export const ParentClosePolicy = {\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @default\n */\n TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n */\n ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n */\n REQUEST_CANCEL: 'REQUEST_CANCEL',\n /**\n * If a `ParentClosePolicy` is set to this, or is not set at all, the server default value will be used.\n *\n * @deprecated Either leave property `undefined`, or set an explicit policy instead.\n */\n PARENT_CLOSE_POLICY_UNSPECIFIED: undefined,\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @deprecated Use {@link ParentClosePolicy.TERMINATE} instead.\n */\n PARENT_CLOSE_POLICY_TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n *\n * @deprecated Use {@link ParentClosePolicy.ABANDON} instead.\n */\n PARENT_CLOSE_POLICY_ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n *\n * @deprecated Use {@link ParentClosePolicy.REQUEST_CANCEL} instead.\n */\n PARENT_CLOSE_POLICY_REQUEST_CANCEL: 'REQUEST_CANCEL',\n};\n//# sourceMappingURL=temporalio.js.map","export const REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE = 'requested_scope_unavailable';\nexport const NO_ACCESSIBLE_ACCOUNT_ERROR_CODE = 'no_accessible_account';\nexport const RESTRICTED_ENVIRONMENT_ERROR_CODE = 'restricted_environment';\nexport const TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE = 'token_issuance_forbidden';\nexport const ISSUE_TOKEN_FORBIDDEN_ERROR_CODES = [\n REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE,\n NO_ACCESSIBLE_ACCOUNT_ERROR_CODE,\n RESTRICTED_ENVIRONMENT_ERROR_CODE,\n TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE,\n];\n//# sourceMappingURL=sts-errors.js.map","// Helper type guards for type narrowing\nexport function isApiKeyRequest(req) {\n return req.type === 'apikey';\n}\nexport function isUserRequest(req) {\n return req.type === 'user';\n}\nexport function isProjectRequest(req) {\n return req.type === 'project';\n}\nexport function isEnvironmentRequest(req) {\n return req.type === 'environment';\n}\nexport function isAgentRequest(req) {\n return req.type === 'agent';\n}\nexport function isServiceAccountRequest(req) {\n return req.type === 'service_account';\n}\n//# sourceMappingURL=sts-token-types.js.map","export var TrainingSessionStatus;\n(function (TrainingSessionStatus) {\n TrainingSessionStatus[\"created\"] = \"created\";\n TrainingSessionStatus[\"building\"] = \"building\";\n TrainingSessionStatus[\"prepared\"] = \"prepared\";\n TrainingSessionStatus[\"processing\"] = \"processing\";\n TrainingSessionStatus[\"completed\"] = \"completed\";\n TrainingSessionStatus[\"cancelled\"] = \"cancelled\";\n TrainingSessionStatus[\"failed\"] = \"failed\";\n})(TrainingSessionStatus || (TrainingSessionStatus = {}));\n//# sourceMappingURL=training.js.map","/**\n * Transient-token values that exist at runtime.\n *\n * Split out of `transient-tokens.ts` so `api-schemas/invites.ts` can read the enum without importing\n * a module that derives its types from those very schemas. Re-exported from `transient-tokens.ts`.\n */\nexport var TransientTokenType;\n(function (TransientTokenType) {\n TransientTokenType[\"userInvite\"] = \"user-invite\";\n TransientTokenType[\"migration\"] = \"migration\";\n})(TransientTokenType || (TransientTokenType = {}));\n//# sourceMappingURL=transient-tokens-values.js.map","/**\n * Account values that exist at runtime — enums, constants, and the pure helpers over them.\n *\n * Split out of `user.ts` so the dependency direction can run one way. The API schemas need these\n * values (`z.enum(BillingMethod)`, `.max(ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH)`), and `user.ts`\n * needs the types the schemas infer. Both living in `user.ts` would make it import from a module\n * that imports it back; here, `user.ts` and `api-schemas/account.ts` both depend on this module and\n * nothing depends on them.\n *\n * Everything here is re-exported from `user.ts`, so existing import paths keep working — this is a\n * move, not a rename.\n */\nexport var Datacenters;\n(function (Datacenters) {\n Datacenters[\"aws\"] = \"aws\";\n Datacenters[\"gcp\"] = \"gcp\";\n Datacenters[\"azure\"] = \"azure\";\n})(Datacenters || (Datacenters = {}));\nexport var BillingMethod;\n(function (BillingMethod) {\n BillingMethod[\"stripe\"] = \"stripe\";\n BillingMethod[\"invoice\"] = \"invoice\";\n})(BillingMethod || (BillingMethod = {}));\nexport var AccountType;\n(function (AccountType) {\n AccountType[\"vertesia\"] = \"vertesia\";\n AccountType[\"partner\"] = \"partner\";\n AccountType[\"free\"] = \"free\";\n AccountType[\"customer\"] = \"customer\";\n AccountType[\"prospect\"] = \"prospect\";\n AccountType[\"unknown\"] = \"unknown\";\n})(AccountType || (AccountType = {}));\n/**\n * Quota/rate-limit tier assigned to an account. Code-defined tiers live in `@dglabs/quota`\n * (`QUOTA_TIERS`); these names must match its keys.\n * - `standard` — protective baseline limits (the default for most accounts).\n * - `enterprise` — high limits for contracted customers / internal / partners.\n *\n * An account with no explicit `quota_tier` derives its tier from its `account_type`.\n */\nexport var QuotaTier;\n(function (QuotaTier) {\n QuotaTier[\"standard\"] = \"standard\";\n QuotaTier[\"enterprise\"] = \"enterprise\";\n})(QuotaTier || (QuotaTier = {}));\n/**\n * Default tier for an account that has no explicit `quota_tier`, derived from its `account_type`:\n * contracted customers and internal Vertesia accounts get `enterprise`; everyone else (partner,\n * free, prospect, unknown) gets the protective `standard` baseline.\n */\nexport function quotaTierForAccountType(accountType) {\n switch (accountType) {\n case AccountType.customer:\n case AccountType.vertesia:\n return QuotaTier.enterprise;\n default:\n return QuotaTier.standard;\n }\n}\nexport const ACCOUNT_NAMESPACE_MAX_LENGTH = 63;\nexport const ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH = 1000;\nexport const RESERVED_ACCOUNT_NAMESPACES = [\n 'admin',\n 'api',\n 'apps',\n 'auth',\n 'cdn',\n 'docs',\n 'internal-auth',\n 'mcp',\n 'status',\n 'sts',\n 'www',\n];\nconst ACCOUNT_NAMESPACE_PATTERN = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;\nexport function normalizeAccountNamespace(namespace) {\n return namespace.trim().toLowerCase();\n}\nexport function getAccountNamespaceValidationError(namespace) {\n if (!namespace) {\n return 'Account namespace is required';\n }\n if (namespace.length > ACCOUNT_NAMESPACE_MAX_LENGTH || !ACCOUNT_NAMESPACE_PATTERN.test(namespace)) {\n return 'Account namespace must be a lowercase DNS label containing only letters, numbers, and hyphens';\n }\n if (RESERVED_ACCOUNT_NAMESPACES.includes(namespace)) {\n return `Account namespace '${namespace}' is reserved`;\n }\n return undefined;\n}\n//# sourceMappingURL=account-values.js.map","export * from './account-values.js';\nexport const UserRefPopulate = 'id name email picture';\n/**\n * Annotation marker (stored in {@link User.annotations}) that grants a user access to\n * non-production environments (`preview`, `preprod`). See\n * `docs/restrict-access-to-non-production-envs.md`.\n */\nexport const EARLY_ACCESS_ANNOTATION = 'early-access';\n/**\n * Business error code returned by the STS (token server) when a user is denied access to a\n * restricted (`preview`/`preprod`) environment because they lack the {@link EARLY_ACCESS_ANNOTATION}\n * annotation. The UI keys its dedicated rejection screen off this code.\n */\nexport { RESTRICTED_ENVIRONMENT_ERROR_CODE } from './sts-errors.js';\nexport const AccountRefPopulate = 'id name';\n//# sourceMappingURL=user.js.map","export function getTenantId(accountId, projectId) {\n //use the last 6 characters of the accountId as the db name\n //as in mongo the last 6 char are an incrementing counter\n const accountLast6 = accountId.slice(-6);\n const projectLast6 = projectId.slice(-6);\n return `${accountLast6}_${projectLast6}`;\n}\nexport function getTenantIdFromProject(project) {\n return getTenantId(project.account, project.id);\n}\n//# sourceMappingURL=auth.js.map","import { PromptRole } from '@llumiverse/common';\nimport { PromptSegmentDefType } from '../prompt.js';\n/**\n * Sanitize a tool definition to only include fields expected by LLM APIs.\n * Removes extra fields like 'category', 'default', 'tools' that are\n * used internally but should not be sent to the LLM.\n */\nexport function sanitizeToolDefinition(tool) {\n return {\n name: tool.name,\n description: tool.description,\n input_schema: tool.input_schema,\n };\n}\n/**\n * Sanitize an array of tool definitions.\n */\nexport function sanitizeToolDefinitions(tools) {\n if (!tools)\n return tools;\n return tools.map(sanitizeToolDefinition);\n}\n// Remove custom properties from the JSON before sending further down execution pipeline.\n// Before stripping UI-only fields (editor, format), translate them into LLM-friendly\n// schema hints so the model knows the expected value format.\nexport function removeExtraProperties(schema) {\n if (!schema)\n return schema;\n if (Array.isArray(schema)) {\n for (const item of schema) {\n removeExtraProperties(item);\n }\n }\n else if (typeof schema === 'object') {\n const obj = schema;\n // If this looks like a property definition (has editor/format for document/media),\n // enrich it with type and description hints before stripping.\n if (isDocumentProperty(obj)) {\n enrichDocumentProperty(obj);\n }\n for (const [key, value] of Object.entries(obj)) {\n if (key === 'editor' && (value === 'textarea' || value === 'document' || value === 'media')) {\n delete obj[key];\n }\n else if (key === 'format' && (value === 'textarea' || value === 'document' || value === 'media')) {\n delete obj[key];\n }\n else if (typeof value === 'object') {\n removeExtraProperties(value);\n }\n }\n }\n return schema;\n}\n/**\n * Returns true if the schema property represents a document reference\n * (identified by editor: \"document\" or format: \"document\" / \"media\").\n */\nfunction isDocumentProperty(obj) {\n return obj.editor === 'document' || obj.format === 'document' || obj.format === 'media';\n}\n/**\n * Canonical hint string appended to document property descriptions.\n * Used by ensureDocumentStorePrefix (in @dglabs/workflows) to detect document\n * properties after serialization, when editor/format fields have been stripped.\n * Exported so both packages use the exact same string — do NOT duplicate.\n */\nexport const DOCUMENT_STORE_HINT = \"Use 'store:<document_id>' format to reference a document from the content store.\";\n/**\n * Enriches a document property schema with LLM-friendly hints:\n * - Sets type to \"string\" if not already set\n * - Appends a store: prefix hint to the description\n */\nfunction enrichDocumentProperty(obj) {\n // Set type to string if missing (document references are string IDs)\n if (!obj.type) {\n obj.type = 'string';\n }\n // Always ensure the canonical hint is present in the description.\n // Check for the exact hint string (not just 'store:') to avoid missing detection\n // after serialization when only the description survives.\n if (!obj.description) {\n obj.description = DOCUMENT_STORE_HINT;\n }\n else if (typeof obj.description === 'string' && !obj.description.includes(DOCUMENT_STORE_HINT)) {\n obj.description = `${obj.description} ${DOCUMENT_STORE_HINT}`;\n }\n}\nexport function mergeJSONSchemas(schemas) {\n const props = {};\n const required = [];\n for (const schema of schemas) {\n if (schema.properties) {\n if (schema.required) {\n for (const prop of schema.required) {\n if (!required.includes(prop))\n required.push(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n }\n const schema = Object.keys(props).length > 0 ? { properties: props, required, type: 'object' } : null;\n return schema;\n}\nexport function _mergePromptsSchema(prompts) {\n const props = {};\n const required = new Set();\n for (const prompt of prompts) {\n if (prompt.template?.inputSchema?.properties) {\n const schema = prompt.template?.inputSchema;\n if (schema.required) {\n for (const prop of schema.required) {\n required.add(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n else if (prompt.type === PromptSegmentDefType.chat) {\n Object.assign(props, {\n chat: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n role: {\n type: 'string',\n enum: [PromptRole.assistant, PromptRole.user],\n },\n content: { type: 'string' },\n },\n required: ['role', 'content'],\n },\n },\n });\n required.add('chat');\n }\n }\n const schema = Object.keys(props).length > 0\n ? {\n properties: props,\n required: Array.from(required),\n }\n : null;\n return schema;\n}\nexport function mergePromptsSchema(interaction) {\n if (!interaction.prompts)\n return null;\n return _mergePromptsSchema(interaction.prompts);\n}\nexport function mergeInCodePromptSchemas(prompts) {\n const props = {};\n const required = new Set();\n for (const prompt of prompts) {\n if (prompt.schema?.properties) {\n const schema = prompt.schema;\n if (schema.required) {\n for (const prop of schema.required) {\n required.add(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n }\n const schema = Object.keys(props).length > 0\n ? {\n properties: props,\n required: Array.from(required),\n }\n : null;\n return schema;\n}\n//# sourceMappingURL=schemas.js.map","/**\n * The header a caller names an API version in, as `YYYYMMDD` — see {@link ApiVersions}.\n *\n * Declared here rather than in the client, because both ends of the negotiation need it: the\n * servers register it with `withVersionHeader` and read it when deciding how strictly to hold a\n * request to its published schema, and `@vertesia/client` sets it on every call. It kept the\n * spelling it has always had on the wire.\n */\nexport const VERSION_HEADER = 'x-api-version';\nexport var ApiVersions;\n(function (ApiVersions) {\n ApiVersions[ApiVersions[\"COMPLETION_RESULT_V1\"] = 20250925] = \"COMPLETION_RESULT_V1\";\n ApiVersions[ApiVersions[\"DOWNLOAD_URL_NO_MIME_TYPE_V1\"] = 20260210] = \"DOWNLOAD_URL_NO_MIME_TYPE_V1\";\n ApiVersions[ApiVersions[\"MEDIA_BLOB_STORAGE_V1\"] = 20260319] = \"MEDIA_BLOB_STORAGE_V1\";\n /**\n * Request bodies and parameters are rejected when they do not match the published component.\n *\n * The endpoints did not change shape at this date — the schemas they had always published\n * started being enforced. A body carrying an undeclared property against a closed component,\n * or a query parameter of the wrong type, used to be accepted and silently ignored; from here\n * it is a 400.\n *\n * Unlike the milestones above, this one is not about a route: it gates the enforcement policy\n * itself, so a caller pinned below it gets the old lenient behaviour on EVERY endpoint while\n * the mismatch is logged. Sending nothing means the current API, so the strict reading is what\n * a new caller gets by default and leniency has to be asked for.\n */\n ApiVersions[ApiVersions[\"REQUEST_CONTRACT_ENFORCEMENT_V1\"] = 20260803] = \"REQUEST_CONTRACT_ENFORCEMENT_V1\";\n})(ApiVersions || (ApiVersions = {}));\n/**\n * The API version used by current clients and published as the current OpenAPI shape.\n *\n * Keep this explicit rather than deriving it at runtime: promoting a milestone to the client\n * default is a deliberate compatibility decision. The versions test ensures this alias is\n * reconsidered whenever a newer milestone is added.\n */\nexport const CURRENT_API_VERSION = ApiVersions.REQUEST_CONTRACT_ENFORCEMENT_V1;\n/** The current API version formatted for the {@link VERSION_HEADER} wire value. */\nexport const CURRENT_API_VERSION_HEADER_VALUE = String(CURRENT_API_VERSION);\n//# sourceMappingURL=versions.js.map","export const VIEW_EXPERIENCE_SCHEMA_VERSION = 1;\n/** Build the generic reusable client route for a persisted or app-contributed View. */\nexport function viewExperienceRoute(id) {\n return `/view/${encodeURIComponent(id)}`;\n}\nexport const VIEW_SEARCH_FIELD_TYPES = ['text', 'keyword', 'number', 'date', 'boolean'];\nexport const VIEW_RESULT_FIELD_FORMATS = [\n 'text',\n 'date',\n 'number',\n 'badge',\n 'user',\n 'content_type',\n 'location',\n];\n/**\n * Project a persisted or extended View value back to its reusable configuration\n * fields. Callers that require a persisted configuration must validate the\n * result at their API or persistence boundary because legacy records may not\n * satisfy newer persisted-only requirements.\n */\nexport function getViewExperienceConfiguration(value) {\n return {\n name: value.name,\n ...(value.description === undefined ? {} : { description: value.description }),\n ...(value.enabled === undefined ? {} : { enabled: value.enabled }),\n ...(value.layout === undefined ? {} : { layout: value.layout }),\n ...(value.scope === undefined ? {} : { scope: value.scope }),\n ...(value.navigation === undefined ? {} : { navigation: value.navigation }),\n ...(value.search === undefined ? {} : { search: value.search }),\n ...(value.results === undefined ? {} : { results: value.results }),\n };\n}\n/** Project a type-valid persisted View while preserving its required documentation field. */\nexport function getPersistedViewExperienceConfiguration(value) {\n return {\n ...getViewExperienceConfiguration(value),\n description: value.description,\n };\n}\n//# sourceMappingURL=views.js.map","import { ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE, VIEW_CONFIGURATION_ID_PATTERN_SOURCE, } from './view-validation-helpers.js';\nimport { VIEW_RESULT_FIELD_FORMATS, VIEW_SEARCH_FIELD_TYPES } from './views.js';\nexport const VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID = 'https://schemas.vertesia.com/view-experience.v1.schema.json';\nexport const PERSISTED_VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID = 'https://schemas.vertesia.com/persisted-view-experience.v1.schema.json';\n/**\n * Canonical structural schema for reusable inline and app-contributed View configuration.\n *\n * Cross-reference rules such as unique navigation ids and valid default display\n * references are enforced by validateViewConfiguration().\n */\nexport const ViewExperienceConfigurationJsonSchema = {\n $id: VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID,\n type: 'object',\n title: 'View Experience',\n description: 'A reusable content navigation and search experience. Save it through /api/v1/views, then render it at /view/<id>.',\n properties: {\n name: {\n type: 'string',\n minLength: 1,\n maxLength: 120,\n description: 'Human-readable View name.',\n },\n description: {\n type: 'string',\n maxLength: 4000,\n description: 'Purpose and intended audience of this View.',\n },\n enabled: {\n type: 'boolean',\n description: 'Whether the View may be executed.',\n },\n layout: {\n $ref: '#/$defs/layout',\n },\n scope: {\n $ref: '#/$defs/scope',\n },\n navigation: {\n type: 'array',\n maxItems: 20,\n description: 'Ordered facets or hierarchies used to browse the scoped content.',\n items: {\n oneOf: [\n { $ref: '#/$defs/locationNavigation' },\n { $ref: '#/$defs/collectionNavigation' },\n { $ref: '#/$defs/termsNavigation' },\n { $ref: '#/$defs/hierarchyNavigation' },\n { $ref: '#/$defs/rangeNavigation' },\n ],\n },\n },\n search: {\n $ref: '#/$defs/search',\n },\n results: {\n $ref: '#/$defs/results',\n },\n },\n required: ['name'],\n additionalProperties: false,\n $defs: {\n configurationId: {\n type: 'string',\n minLength: 1,\n maxLength: 64,\n pattern: VIEW_CONFIGURATION_ID_PATTERN_SOURCE,\n description: 'Stable id starting with a letter and containing letters, numbers, underscores, or hyphens.',\n },\n fieldName: {\n type: 'string',\n minLength: 1,\n maxLength: 160,\n pattern: ELASTICSEARCH_FIELD_PATH_PATTERN_SOURCE,\n description: 'Dot-separated Elasticsearch field name.',\n },\n stringArray: {\n type: 'array',\n maxItems: 100,\n items: {\n type: 'string',\n minLength: 1,\n },\n },\n layout: {\n type: 'object',\n description: 'Overall browsing layout.',\n properties: {\n mode: {\n type: 'string',\n enum: ['browse', 'worklist'],\n description: 'Browse emphasizes discovery; worklist emphasizes case-style task handling.',\n },\n navigation_position: {\n type: 'string',\n enum: ['sidebar', 'top'],\n description: 'Where navigation widgets appear.',\n },\n },\n required: [],\n additionalProperties: false,\n },\n scope: {\n type: 'object',\n description: 'Hard boundary applied to every search and navigation query.',\n properties: {\n type_ids: {\n $ref: '#/$defs/stringArray',\n description: 'Content type ids included in the View.',\n },\n locations: {\n $ref: '#/$defs/stringArray',\n description: 'Absolute content location roots included in the View.',\n },\n collection_ids: {\n $ref: '#/$defs/stringArray',\n description: 'Collection ids included in the View.',\n },\n include_collection_descendants: {\n type: 'boolean',\n description: 'Include descendants of scoped collections.',\n },\n fixed_filter: {\n type: 'object',\n description: 'Elasticsearch query clause always applied by the runtime. Script-like and unsafe clauses are rejected.',\n required: [],\n additionalProperties: true,\n },\n head_only: {\n type: 'boolean',\n description: 'Return only current head revisions.',\n },\n },\n required: [],\n additionalProperties: false,\n },\n locationNavigation: {\n type: 'object',\n title: 'Location hierarchy',\n description: 'Browse the hierarchical content location path.',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n source: { const: 'location' },\n presentation: { type: 'string', enum: ['tree', 'list', 'select', 'chips'] },\n multi_select: { type: 'boolean' },\n order: { type: 'integer' },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n roots: {\n type: 'array',\n maxItems: 50,\n items: { type: 'string', pattern: '^/' },\n description: 'Absolute location roots shown by the hierarchy.',\n },\n depth: {\n type: 'integer',\n minimum: 1,\n maximum: 20,\n },\n },\n required: ['id', 'label', 'source'],\n additionalProperties: false,\n },\n collectionNavigation: {\n type: 'object',\n title: 'Collection hierarchy',\n description: 'Browse collection membership and optionally collection descendants.',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n source: { const: 'collection' },\n presentation: { type: 'string', enum: ['tree', 'list', 'select', 'chips'] },\n multi_select: { type: 'boolean' },\n order: { type: 'integer' },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n roots: {\n type: 'array',\n maxItems: 50,\n items: { type: 'string', minLength: 1 },\n },\n include_descendants: {\n type: 'boolean',\n },\n },\n required: ['id', 'label', 'source'],\n additionalProperties: false,\n },\n termsNavigation: {\n type: 'object',\n title: 'Property facet',\n description: 'Bucket a keyword-like property such as brand.',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n source: { const: 'terms' },\n presentation: { type: 'string', enum: ['tree', 'list', 'select', 'chips'] },\n multi_select: { type: 'boolean' },\n order: { type: 'integer' },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n field: { $ref: '#/$defs/fieldName' },\n size: {\n type: 'integer',\n minimum: 1,\n maximum: 500,\n },\n sort: {\n type: 'string',\n enum: ['count', 'label'],\n },\n },\n required: ['id', 'label', 'source', 'field'],\n additionalProperties: false,\n },\n hierarchyLevel: {\n type: 'object',\n title: 'Property hierarchy level',\n description: 'One mapped property in a drill-down hierarchy.',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n field: { $ref: '#/$defs/fieldName' },\n size: {\n type: 'integer',\n minimum: 1,\n maximum: 500,\n },\n sort: {\n type: 'string',\n enum: ['count', 'label'],\n },\n },\n required: ['id', 'label', 'field'],\n additionalProperties: false,\n },\n hierarchyNavigation: {\n type: 'object',\n title: 'Property hierarchy',\n description: 'Drill down through mapped properties such as State, then City.',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n source: { const: 'hierarchy' },\n presentation: { type: 'string', enum: ['tree', 'list', 'select', 'chips'] },\n multi_select: { const: false },\n order: { type: 'integer' },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n levels: {\n type: 'array',\n minItems: 2,\n maxItems: 10,\n items: { $ref: '#/$defs/hierarchyLevel' },\n },\n },\n required: ['id', 'label', 'source', 'levels'],\n additionalProperties: false,\n },\n rangeDefinition: {\n type: 'object',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n from: { type: 'number' },\n to: { type: 'number' },\n },\n required: ['id', 'label'],\n additionalProperties: false,\n anyOf: [{ required: ['from'] }, { required: ['to'] }],\n },\n rangeNavigation: {\n type: 'object',\n title: 'Numeric range facet',\n description: 'Bucket a numeric property such as project_size into authored ranges.',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n source: { const: 'range' },\n presentation: { type: 'string', enum: ['tree', 'list', 'select', 'chips'] },\n multi_select: { type: 'boolean' },\n order: { type: 'integer' },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n field: { $ref: '#/$defs/fieldName' },\n ranges: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#/$defs/rangeDefinition' },\n },\n },\n required: ['id', 'label', 'source', 'field', 'ranges'],\n additionalProperties: false,\n },\n keyTerm: {\n type: 'object',\n description: 'A URL-serializable structured search input.',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n field: { $ref: '#/$defs/fieldName' },\n type: {\n type: 'string',\n enum: [...VIEW_SEARCH_FIELD_TYPES],\n },\n multiple: { type: 'boolean' },\n operator: {\n type: 'string',\n enum: ['match', 'term', 'range'],\n },\n },\n required: ['id', 'label', 'type'],\n additionalProperties: false,\n },\n searchField: {\n type: 'object',\n description: 'A mapped Elasticsearch field available to query planning and deterministic full-text fallback.',\n properties: {\n field: { $ref: '#/$defs/fieldName' },\n description: {\n type: 'string',\n minLength: 1,\n maxLength: 500,\n description: 'Semantic meaning of the field for query planners.',\n },\n type: {\n type: 'string',\n enum: [...VIEW_SEARCH_FIELD_TYPES],\n description: 'Mapping hint used only when the active index does not expose the field type.',\n },\n mode: {\n type: 'string',\n enum: ['auto', 'full_text', 'exact'],\n description: 'Whether the field supports scoring text queries, structured exact queries, or mapping-derived behavior.',\n },\n boost: {\n type: 'number',\n minimum: 0.1,\n maximum: 20,\n description: 'Relative boost when the field participates in multi-field text search.',\n },\n },\n required: ['field'],\n additionalProperties: false,\n },\n interactionConfig: {\n type: 'object',\n description: 'One execution configuration for the agentic search model. Set environment and/or model to override project defaults.',\n properties: {\n id: { type: 'string' },\n environment: { type: 'string' },\n model: { type: 'string' },\n do_validate: { type: 'boolean' },\n run_data: { type: 'string' },\n configMode: { type: 'string' },\n model_options: {\n type: 'object',\n required: [],\n additionalProperties: true,\n },\n prompt_cache_key: { type: 'string' },\n prompt_cache_schema_suffix: { type: 'boolean' },\n http_timeout: {\n type: 'object',\n required: [],\n additionalProperties: true,\n },\n },\n required: [],\n additionalProperties: true,\n },\n agenticSearch: {\n type: 'object',\n description: 'Agentic query planning configuration. The default interaction is sys:ContentSearchAgent and it emits secured Elasticsearch DSL.',\n properties: {\n interaction: {\n type: 'string',\n maxLength: 200,\n description: 'Interaction id. Defaults to sys:ContentSearchAgent.',\n },\n config: { $ref: '#/$defs/interactionConfig' },\n instructions: {\n type: 'string',\n maxLength: 4000,\n description: 'Domain-specific guidance for translating natural language into Elasticsearch DSL.',\n },\n mode: {\n type: 'string',\n enum: ['query'],\n description: 'Generate and validate an Elasticsearch query before execution.',\n },\n timeout_ms: {\n type: 'integer',\n minimum: 1000,\n maximum: 60000,\n },\n minimum_confidence: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n },\n required: [],\n additionalProperties: false,\n },\n search: {\n type: 'object',\n description: 'Text and structured search configuration.',\n properties: {\n renderer: {\n type: 'string',\n maxLength: 120,\n description: 'Optional app-registered search renderer name.',\n },\n mode: {\n type: 'string',\n enum: ['deterministic', 'agentic'],\n },\n placeholder: {\n type: 'string',\n maxLength: 240,\n },\n fields: {\n type: 'array',\n maxItems: 50,\n items: { $ref: '#/$defs/searchField' },\n description: 'Fields disclosed to query planning. Text-capable entries also define deterministic fallback search.',\n },\n key_terms: {\n type: 'array',\n maxItems: 50,\n items: { $ref: '#/$defs/keyTerm' },\n },\n agentic: { $ref: '#/$defs/agenticSearch' },\n },\n required: [],\n additionalProperties: false,\n },\n resultField: {\n type: 'object',\n properties: {\n field: { $ref: '#/$defs/fieldName' },\n label: { type: 'string', maxLength: 120 },\n format: {\n type: 'string',\n enum: [...VIEW_RESULT_FIELD_FORMATS],\n },\n fallback: { type: 'string', maxLength: 240 },\n },\n required: ['field'],\n additionalProperties: false,\n },\n resultMedia: {\n type: 'object',\n properties: {\n source: {\n type: 'string',\n enum: ['content_thumbnail', 'property', 'type_icon'],\n },\n field: { $ref: '#/$defs/fieldName' },\n fit: {\n type: 'string',\n enum: ['cover', 'contain'],\n },\n fallback: {\n type: 'string',\n enum: ['type_icon', 'placeholder', 'none'],\n },\n },\n required: ['source'],\n additionalProperties: false,\n },\n resultFieldArray: {\n type: 'array',\n items: { $ref: '#/$defs/resultField' },\n },\n listDisplay: {\n type: 'object',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n page_size: { type: 'integer', minimum: 1, maximum: 200 },\n type: { const: 'list' },\n title: { $ref: '#/$defs/resultField' },\n subtitle: { $ref: '#/$defs/resultFieldArray' },\n description: { $ref: '#/$defs/resultField' },\n media: { $ref: '#/$defs/resultMedia' },\n badges: { $ref: '#/$defs/resultFieldArray' },\n },\n required: ['id', 'label', 'type', 'title'],\n additionalProperties: false,\n },\n tableColumn: {\n type: 'object',\n properties: {\n field: { $ref: '#/$defs/fieldName' },\n label: { type: 'string', maxLength: 120 },\n format: {\n type: 'string',\n enum: [...VIEW_RESULT_FIELD_FORMATS],\n },\n fallback: { type: 'string', maxLength: 240 },\n width: { type: 'integer', minimum: 40, maximum: 2000 },\n sortable: { type: 'boolean' },\n sort_option: { $ref: '#/$defs/configurationId' },\n },\n required: ['field'],\n additionalProperties: false,\n },\n tableDisplay: {\n type: 'object',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n page_size: { type: 'integer', minimum: 1, maximum: 200 },\n type: { const: 'table' },\n columns: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#/$defs/tableColumn' },\n },\n },\n required: ['id', 'label', 'type', 'columns'],\n additionalProperties: false,\n },\n cardsDisplay: {\n type: 'object',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n page_size: { type: 'integer', minimum: 1, maximum: 200 },\n type: { const: 'cards' },\n title: { $ref: '#/$defs/resultField' },\n description: { $ref: '#/$defs/resultField' },\n media: { $ref: '#/$defs/resultMedia' },\n fields: { $ref: '#/$defs/resultFieldArray' },\n badges: { $ref: '#/$defs/resultFieldArray' },\n columns: { type: 'integer', enum: [2, 3, 4, 5, 6] },\n },\n required: ['id', 'label', 'type', 'title'],\n additionalProperties: false,\n },\n galleryDisplay: {\n type: 'object',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n page_size: { type: 'integer', minimum: 1, maximum: 200 },\n type: { const: 'gallery' },\n media: { $ref: '#/$defs/resultMedia' },\n title: { $ref: '#/$defs/resultField' },\n caption: { $ref: '#/$defs/resultFieldArray' },\n columns: { type: 'integer', enum: [2, 3, 4, 5, 6] },\n },\n required: ['id', 'label', 'type', 'media', 'title'],\n additionalProperties: false,\n },\n boardCard: {\n type: 'object',\n properties: {\n title: { $ref: '#/$defs/resultField' },\n description: { $ref: '#/$defs/resultField' },\n media: { $ref: '#/$defs/resultMedia' },\n fields: { $ref: '#/$defs/resultFieldArray' },\n badges: { $ref: '#/$defs/resultFieldArray' },\n },\n required: ['title'],\n additionalProperties: false,\n },\n boardColumn: {\n type: 'object',\n properties: {\n value: { type: 'string', minLength: 1 },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n order: { type: 'integer' },\n },\n required: ['value', 'label'],\n additionalProperties: false,\n },\n boardDisplay: {\n type: 'object',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n renderer: { type: 'string', minLength: 1, maxLength: 120 },\n page_size: { type: 'integer', minimum: 1, maximum: 200 },\n type: { const: 'board' },\n group_by: { $ref: '#/$defs/fieldName' },\n columns: {\n type: 'array',\n items: { $ref: '#/$defs/boardColumn' },\n },\n card: { $ref: '#/$defs/boardCard' },\n },\n required: ['id', 'label', 'type', 'group_by', 'card'],\n additionalProperties: false,\n },\n display: {\n oneOf: [\n { $ref: '#/$defs/listDisplay' },\n { $ref: '#/$defs/tableDisplay' },\n { $ref: '#/$defs/cardsDisplay' },\n { $ref: '#/$defs/galleryDisplay' },\n { $ref: '#/$defs/boardDisplay' },\n ],\n },\n sortClause: {\n type: 'object',\n properties: {\n field: { $ref: '#/$defs/fieldName' },\n order: {\n type: 'string',\n enum: ['asc', 'desc'],\n },\n },\n required: ['field', 'order'],\n additionalProperties: false,\n },\n sortOption: {\n type: 'object',\n properties: {\n id: { $ref: '#/$defs/configurationId' },\n label: { type: 'string', minLength: 1, maxLength: 120 },\n sort: {\n type: 'array',\n minItems: 1,\n items: { $ref: '#/$defs/sortClause' },\n },\n },\n required: ['id', 'label', 'sort'],\n additionalProperties: false,\n },\n results: {\n type: 'object',\n description: 'Built-in or app-rendered visual result layouts.',\n properties: {\n default_display: { $ref: '#/$defs/configurationId' },\n allow_display_switch: { type: 'boolean' },\n displays: {\n type: 'array',\n minItems: 1,\n maxItems: 10,\n items: { $ref: '#/$defs/display' },\n },\n default_sort: { $ref: '#/$defs/configurationId' },\n sort_options: {\n type: 'array',\n items: { $ref: '#/$defs/sortOption' },\n },\n },\n required: ['default_display', 'displays'],\n additionalProperties: false,\n },\n },\n};\n/**\n * Structural schema for project-scoped Views saved through the Views API.\n *\n * App-contributed and inline View definitions use the reusable base schema,\n * while persisted resources additionally document their purpose.\n */\nexport const PersistedViewExperienceConfigurationJsonSchema = {\n ...ViewExperienceConfigurationJsonSchema,\n $id: PERSISTED_VIEW_EXPERIENCE_CONFIGURATION_JSON_SCHEMA_ID,\n title: 'Persisted View Experience',\n properties: {\n ...ViewExperienceConfigurationJsonSchema.properties,\n description: {\n ...ViewExperienceConfigurationJsonSchema.properties.description,\n minLength: 1,\n },\n },\n required: ['name', 'description'],\n};\n//# sourceMappingURL=views-schema.js.map","import { ELASTICSEARCH_FIELD_PATH_PATTERN as FIELD_PATTERN, isViewValidationRecord as isRecord, SERVER_CONTROLLED_VIEW_FIELD_ROOTS, } from './view-validation-helpers.js';\nconst ALLOWED_QUERY_TYPES = new Set([\n 'bool',\n 'match',\n 'multi_match',\n 'simple_query_string',\n 'term',\n 'terms',\n 'range',\n 'exists',\n 'ids',\n 'prefix',\n 'match_all',\n]);\nconst MAX_QUERY_CLAUSES = 100;\nconst FORBIDDEN_FIELD_ROOTS = new Set(SERVER_CONTROLLED_VIEW_FIELD_ROOTS);\nfunction addFieldIssue(issues, field, path, options) {\n if (typeof field !== 'string' || !FIELD_PATTERN.test(field)) {\n issues.push({ path, message: 'must be a dot-separated field name' });\n return;\n }\n if (FORBIDDEN_FIELD_ROOTS.has(field.split('.')[0])) {\n issues.push({ path, message: `field '${field}' is server-controlled` });\n return;\n }\n if (options.allowedFields && !options.allowedFields.has(field)) {\n issues.push({ path, message: `field '${field}' is not available to this View` });\n }\n}\nfunction addOperatorIssue(issues, field, operator, path, options) {\n const allowed = options.allowedOperators?.get(field);\n if (allowed && !allowed.has(operator)) {\n issues.push({\n path,\n message: `operator '${operator}' is not available for field '${field}'`,\n });\n }\n}\nfunction validateSingleFieldClause(issues, value, path, validateValue, options) {\n if (!isRecord(value)) {\n issues.push({ path, message: 'must be an object keyed by field name' });\n return;\n }\n const entries = Object.entries(value);\n if (entries.length !== 1) {\n issues.push({ path, message: 'must reference exactly one field' });\n return;\n }\n const [field, fieldValue] = entries[0];\n addFieldIssue(issues, field, `${path}.${field}`, options);\n validateValue(fieldValue, `${path}.${field}`, field);\n}\nfunction validateQueryNode(issues, value, path, state, options) {\n state.clauses++;\n if (state.clauses > MAX_QUERY_CLAUSES) {\n issues.push({ path, message: `exceeds the maximum of ${MAX_QUERY_CLAUSES} query clauses` });\n return;\n }\n if (!isRecord(value)) {\n issues.push({ path, message: 'must be an Elasticsearch query object' });\n return;\n }\n const entries = Object.entries(value);\n if (entries.length !== 1) {\n issues.push({ path, message: 'must contain exactly one query clause' });\n return;\n }\n const [type, body] = entries[0];\n if (!ALLOWED_QUERY_TYPES.has(type)) {\n issues.push({ path: `${path}.${type}`, message: `query type '${type}' is not supported` });\n return;\n }\n if (type === 'match_all') {\n if (!isRecord(body)) {\n issues.push({ path: `${path}.match_all`, message: 'must be an object' });\n }\n return;\n }\n if (type === 'bool') {\n if (!isRecord(body)) {\n issues.push({ path: `${path}.bool`, message: 'must be an object' });\n return;\n }\n const allowed = new Set(['must', 'filter', 'should', 'must_not', 'minimum_should_match']);\n for (const key of Object.keys(body)) {\n if (!allowed.has(key)) {\n issues.push({ path: `${path}.bool.${key}`, message: 'is not supported' });\n }\n }\n for (const key of ['must', 'filter', 'should', 'must_not']) {\n const child = body[key];\n if (child === undefined)\n continue;\n const children = Array.isArray(child) ? child : [child];\n if (children.length > 50) {\n issues.push({ path: `${path}.bool.${key}`, message: 'must contain at most 50 clauses' });\n }\n children.forEach((item, index) => {\n validateQueryNode(issues, item, `${path}.bool.${key}[${index}]`, state, options);\n });\n }\n const minimumShouldMatch = body.minimum_should_match;\n if (minimumShouldMatch !== undefined &&\n typeof minimumShouldMatch !== 'number' &&\n typeof minimumShouldMatch !== 'string') {\n issues.push({ path: `${path}.bool.minimum_should_match`, message: 'must be a number or string' });\n }\n return;\n }\n if (type === 'exists') {\n if (!isRecord(body)) {\n issues.push({ path: `${path}.exists`, message: 'must be an object' });\n }\n else {\n addFieldIssue(issues, body.field, `${path}.exists.field`, options);\n if (typeof body.field === 'string') {\n addOperatorIssue(issues, body.field, 'exists', `${path}.exists.field`, options);\n }\n }\n return;\n }\n if (type === 'ids') {\n if (!isRecord(body) || !Array.isArray(body.values) || body.values.length > 1_000) {\n issues.push({ path: `${path}.ids.values`, message: 'must be an array containing at most 1000 IDs' });\n }\n else if (body.values.some((id) => typeof id !== 'string')) {\n issues.push({ path: `${path}.ids.values`, message: 'must contain only strings' });\n }\n return;\n }\n if (type === 'multi_match' || type === 'simple_query_string') {\n if (!isRecord(body) || typeof body.query !== 'string') {\n issues.push({ path: `${path}.${type}.query`, message: 'must be a string' });\n return;\n }\n if (!Array.isArray(body.fields) || body.fields.length === 0 || body.fields.length > 20) {\n issues.push({ path: `${path}.${type}.fields`, message: 'must contain between 1 and 20 fields' });\n }\n else {\n body.fields.forEach((rawField, index) => {\n const field = typeof rawField === 'string' ? rawField.split('^')[0] : rawField;\n addFieldIssue(issues, field, `${path}.${type}.fields[${index}]`, options);\n if (typeof field === 'string') {\n addOperatorIssue(issues, field, type, `${path}.${type}.fields[${index}]`, options);\n }\n });\n }\n return;\n }\n if (isRecord(body)) {\n const fieldEntries = Object.entries(body);\n if (fieldEntries.length === 1) {\n addOperatorIssue(issues, fieldEntries[0][0], type, `${path}.${type}.${fieldEntries[0][0]}`, options);\n }\n }\n validateSingleFieldClause(issues, body, `${path}.${type}`, (fieldValue, valuePath, field) => {\n if (type === 'terms') {\n if (!Array.isArray(fieldValue) || fieldValue.length > 1_000) {\n issues.push({ path: valuePath, message: 'must be an array containing at most 1000 values' });\n }\n return;\n }\n if (type === 'range') {\n if (!isRecord(fieldValue)) {\n issues.push({ path: valuePath, message: 'must be a range object' });\n return;\n }\n const allowed = new Set(['gt', 'gte', 'lt', 'lte']);\n if (Object.keys(fieldValue).length === 0 || Object.keys(fieldValue).some((key) => !allowed.has(key))) {\n issues.push({ path: valuePath, message: 'supports only gt, gte, lt, and lte' });\n }\n return;\n }\n if (type === 'prefix') {\n if (field !== 'location') {\n issues.push({ path: valuePath, message: 'prefix queries are supported only for location' });\n }\n const prefix = isRecord(fieldValue) ? fieldValue.value : fieldValue;\n if (typeof prefix !== 'string' || !prefix.startsWith('/') || !prefix.endsWith('/')) {\n issues.push({ path: valuePath, message: 'must be a boundary-aware absolute location prefix' });\n }\n return;\n }\n if (type === 'match') {\n const query = isRecord(fieldValue) ? fieldValue.query : fieldValue;\n if (typeof query !== 'string') {\n issues.push({ path: valuePath, message: 'must contain a string query' });\n }\n return;\n }\n if (type === 'term' && isRecord(fieldValue)) {\n const allowed = new Set(['value', 'boost', 'case_insensitive']);\n if (!('value' in fieldValue) || Object.keys(fieldValue).some((key) => !allowed.has(key))) {\n issues.push({\n path: valuePath,\n message: 'supports only value, boost, and case_insensitive options',\n });\n return;\n }\n if (isRecord(fieldValue.value) || Array.isArray(fieldValue.value)) {\n issues.push({ path: `${valuePath}.value`, message: 'must be a scalar value' });\n }\n if (fieldValue.boost !== undefined && typeof fieldValue.boost !== 'number') {\n issues.push({ path: `${valuePath}.boost`, message: 'must be a number' });\n }\n if (fieldValue.case_insensitive !== undefined && typeof fieldValue.case_insensitive !== 'boolean') {\n issues.push({ path: `${valuePath}.case_insensitive`, message: 'must be a boolean' });\n }\n return;\n }\n if (isRecord(fieldValue) || Array.isArray(fieldValue)) {\n issues.push({ path: valuePath, message: 'must be a scalar value' });\n }\n }, options);\n}\nfunction normalizeViewQueryNode(value, state) {\n state.clauses++;\n if (state.clauses > MAX_QUERY_CLAUSES)\n return value;\n if (!isRecord(value))\n return value;\n const entries = Object.entries(value);\n if (entries.length !== 1)\n return value;\n const [type, body] = entries[0];\n if (type === 'bool' && isRecord(body)) {\n const normalizedBody = { ...body };\n for (const key of ['must', 'filter', 'should', 'must_not']) {\n const child = body[key];\n if (Array.isArray(child)) {\n normalizedBody[key] = child.map((item) => normalizeViewQueryNode(item, state));\n }\n else if (child !== undefined) {\n normalizedBody[key] = normalizeViewQueryNode(child, state);\n }\n }\n return { bool: normalizedBody };\n }\n if (type !== 'term' || !isRecord(body))\n return value;\n const fieldEntries = Object.entries(body);\n if (fieldEntries.length !== 1)\n return value;\n const [field, fieldValue] = fieldEntries[0];\n if (!isRecord(fieldValue) || Object.keys(fieldValue).length !== 1 || !('value' in fieldValue))\n return value;\n return { term: { [field]: fieldValue.value } };\n}\nexport function normalizeViewQuery(value) {\n return normalizeViewQueryNode(value, { clauses: 0 });\n}\nexport function validateSupportedViewQuery(value, path = 'query', options = {}) {\n const issues = [];\n validateQueryNode(issues, normalizeViewQuery(value), path, { clauses: 0 }, options);\n return issues;\n}\nexport function asSupportedViewQuery(value, path = 'query', options = {}) {\n const normalized = normalizeViewQuery(value);\n const issues = [];\n validateQueryNode(issues, normalized, path, { clauses: 0 }, options);\n if (issues.length > 0) {\n throw new Error(issues.map((issue) => `${issue.path} ${issue.message}`).join('; '));\n }\n return normalized;\n}\n//# sourceMappingURL=view-query-validation.js.map","import { validateSupportedViewQuery } from './view-query-validation.js';\nconst EXPERIENCE_ID_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;\nconst APP_VIEW_ID_PATTERN = /^app:([A-Za-z0-9][A-Za-z0-9._@-]*):([A-Za-z0-9][A-Za-z0-9._:-]*)$/;\nfunction addDuplicateIssues(issues, values, pathForIndex, message = 'must be unique') {\n const seen = new Set();\n values.forEach((value, index) => {\n if (seen.has(value)) {\n issues.push({ path: pathForIndex(index), message });\n }\n seen.add(value);\n });\n}\nfunction addMediaIssues(issues, media, path) {\n if (media?.source === 'property' && media.field === undefined) {\n issues.push({ path: `${path}.field`, message: 'is required when media source is property' });\n }\n}\nfunction addDisplayIssues(issues, display, index, sortOptionIds) {\n const path = `results.displays[${index}]`;\n if (display.type === 'list') {\n addMediaIssues(issues, display.media, `${path}.media`);\n }\n else if (display.type === 'table') {\n display.columns.forEach((column, columnIndex) => {\n if (column.sort_option !== undefined && !sortOptionIds.has(column.sort_option)) {\n issues.push({\n path: `${path}.columns[${columnIndex}].sort_option`,\n message: 'must reference a configured sort option',\n });\n }\n });\n }\n else if (display.type === 'cards') {\n addMediaIssues(issues, display.media, `${path}.media`);\n }\n else if (display.type === 'gallery') {\n addMediaIssues(issues, display.media, `${path}.media`);\n }\n else {\n addMediaIssues(issues, display.card.media, `${path}.card.media`);\n }\n}\nfunction addNavigationIssues(issues, navigation) {\n addDuplicateIssues(issues, navigation.map((item) => item.id), (index) => `navigation[${index}].id`);\n navigation.forEach((item, index) => {\n const path = `navigation[${index}]`;\n if (item.source === 'hierarchy') {\n addDuplicateIssues(issues, item.levels.map((level) => level.id), (levelIndex) => `${path}.levels[${levelIndex}].id`, 'must be unique within the hierarchy');\n addDuplicateIssues(issues, item.levels.map((level) => level.field), (levelIndex) => `${path}.levels[${levelIndex}].field`, 'must be unique within the hierarchy');\n }\n else if (item.source === 'range') {\n addDuplicateIssues(issues, item.ranges.map((range) => range.id), (rangeIndex) => `${path}.ranges[${rangeIndex}].id`, 'must be unique within the range facet');\n item.ranges.forEach((range, rangeIndex) => {\n if (range.from !== undefined && range.to !== undefined && range.from >= range.to) {\n issues.push({\n path: `${path}.ranges[${rangeIndex}]`,\n message: 'from must be less than to',\n });\n }\n });\n }\n });\n}\nfunction addSearchIssues(issues, configuration) {\n const search = configuration.search;\n if (search === undefined)\n return;\n if (search.mode !== 'agentic' && search.agentic !== undefined) {\n issues.push({ path: 'search.agentic', message: 'requires search.mode to be agentic' });\n }\n const fields = search.fields ?? [];\n addDuplicateIssues(issues, fields.map((field) => field.field), (index) => `search.fields[${index}].field`);\n fields.forEach((field, index) => {\n if (field.mode === 'full_text' && field.type !== undefined && field.type !== 'text') {\n issues.push({\n path: `search.fields[${index}].type`,\n message: 'must be text when mode is full_text',\n });\n }\n });\n const keyTerms = search.key_terms ?? [];\n addDuplicateIssues(issues, keyTerms.map((term) => term.id), (index) => `search.key_terms[${index}].id`);\n if (search.mode !== 'agentic') {\n keyTerms.forEach((term, index) => {\n if (term.field === undefined) {\n issues.push({\n path: `search.key_terms[${index}].field`,\n message: 'is required for deterministic search',\n });\n }\n });\n }\n}\nfunction addResultsIssues(issues, configuration) {\n const results = configuration.results;\n if (results === undefined)\n return;\n const sortOptions = results.sort_options ?? [];\n addDuplicateIssues(issues, sortOptions.map((option) => option.id), (index) => `results.sort_options[${index}].id`);\n const sortOptionIds = new Set(sortOptions.map((option) => option.id));\n if (results.default_sort !== undefined && !sortOptionIds.has(results.default_sort)) {\n issues.push({\n path: 'results.default_sort',\n message: 'must reference a configured sort option',\n });\n }\n addDuplicateIssues(issues, results.displays.map((display) => display.id), (index) => `results.displays[${index}].id`);\n const displayIds = new Set(results.displays.map((display) => display.id));\n if (!displayIds.has(results.default_display)) {\n issues.push({\n path: 'results.default_display',\n message: 'must reference a configured display',\n });\n }\n results.displays.forEach((display, index) => {\n addDisplayIssues(issues, display, index, sortOptionIds);\n });\n}\n/**\n * Validate relationships and runtime constraints that JSON Schema cannot\n * express. Callers must establish structural validity first.\n */\nexport function validateViewExperienceSemantics(configuration, mode = 'draft') {\n const issues = [];\n if (mode === 'persisted' && configuration.description?.trim().length === 0) {\n issues.push({\n path: 'description',\n message: 'must explain the View purpose',\n });\n }\n if (configuration.scope?.fixed_filter !== undefined) {\n issues.push(...validateSupportedViewQuery(configuration.scope.fixed_filter, 'scope.fixed_filter'));\n }\n addNavigationIssues(issues, configuration.navigation ?? []);\n addSearchIssues(issues, configuration);\n addResultsIssues(issues, configuration);\n return issues;\n}\nexport function validateViewExperienceId(value) {\n if (typeof value !== 'string' || value.trim() === '') {\n return [{ path: 'id', message: 'must be a non-empty string' }];\n }\n const issues = [];\n if (value.length > 64) {\n issues.push({ path: 'id', message: 'must contain at most 64 characters' });\n }\n if (!EXPERIENCE_ID_PATTERN.test(value)) {\n issues.push({ path: 'id', message: 'must be a lowercase URL-safe slug' });\n }\n return issues;\n}\n/**\n * Parse an app-contributed View id without allowing URL path separators or\n * percent-encoded path material into a downstream privileged request.\n */\nexport function parseAppViewExperienceId(value) {\n if (typeof value !== 'string')\n return undefined;\n const match = APP_VIEW_ID_PATTERN.exec(value);\n if (!match)\n return undefined;\n return { app_name: match[1], local_id: match[2] };\n}\n//# sourceMappingURL=views-validation.js.map","import Ajv from 'ajv';\nimport { PersistedViewExperienceConfigurationJsonSchema, ViewExperienceConfigurationJsonSchema, } from './views-schema.js';\nimport { validateViewExperienceSemantics } from './views-validation.js';\nconst ajv = new Ajv.default({ allErrors: true, strict: false });\nconst validateDraftStructure = ajv.compile(ViewExperienceConfigurationJsonSchema);\nconst validatePersistedStructure = ajv.compile(PersistedViewExperienceConfigurationJsonSchema);\nfunction jsonPointerPath(instancePath) {\n if (instancePath === '')\n return 'configuration';\n return instancePath\n .slice(1)\n .split('/')\n .map((segment) => segment.replaceAll('~1', '/').replaceAll('~0', '~'))\n .reduce((path, segment) => {\n if (/^\\d+$/.test(segment))\n return `${path}[${segment}]`;\n return path.length === 0 ? segment : `${path}.${segment}`;\n }, '');\n}\nfunction errorPath(error) {\n const base = jsonPointerPath(error.instancePath);\n if (error.keyword === 'required' && 'missingProperty' in error.params) {\n const missingProperty = String(error.params.missingProperty);\n return base === 'configuration' ? missingProperty : `${base}.${missingProperty}`;\n }\n if (error.keyword === 'additionalProperties' && 'additionalProperty' in error.params) {\n const additionalProperty = String(error.params.additionalProperty);\n return base === 'configuration' ? additionalProperty : `${base}.${additionalProperty}`;\n }\n return base;\n}\nfunction structuralIssues(value, mode) {\n const validateStructure = mode === 'persisted' ? validatePersistedStructure : validateDraftStructure;\n if (validateStructure(value))\n return [];\n const issues = (validateStructure.errors ?? []).map((error) => ({\n path: errorPath(error),\n message: error.message ?? 'is invalid',\n }));\n return [...new Map(issues.map((issue) => [`${issue.path}\\u0000${issue.message}`, issue])).values()];\n}\n/**\n * Validate both the canonical JSON structure and semantic cross-reference rules.\n *\n * Persisted mode adds the documentation requirement structurally. Blank\n * descriptions pass the shape check and are rejected by semantic validation,\n * while structure-first short-circuiting prevents duplicate errors.\n */\nexport function validateViewConfiguration(value, mode = 'draft') {\n const issues = structuralIssues(value, mode);\n if (issues.length > 0)\n return issues;\n return validateViewExperienceSemantics(value, mode);\n}\n/** @deprecated Use validateViewConfiguration(value, 'draft'). */\nexport function validateViewExperienceConfiguration(value) {\n return validateViewConfiguration(value, 'draft');\n}\n/** @deprecated Use validateViewConfiguration(value, 'persisted'). */\nexport function validatePersistedViewExperienceConfiguration(value) {\n return validateViewConfiguration(value, 'persisted');\n}\n//# sourceMappingURL=view-configuration-validation.js.map","/**\n * Agent Observability Telemetry Types\n *\n * These types define the event-based model for agent observability.\n */\n// ============================================================================\n// Enums\n// ============================================================================\n/**\n * Types of telemetry events\n */\nexport var AgentEventType;\n(function (AgentEventType) {\n AgentEventType[\"AgentRunStarted\"] = \"agent_run_started\";\n AgentEventType[\"AgentRunCompleted\"] = \"agent_run_completed\";\n AgentEventType[\"LlmCall\"] = \"llm_call\";\n AgentEventType[\"ToolCall\"] = \"tool_call\";\n})(AgentEventType || (AgentEventType = {}));\n/**\n * Types of LLM calls in a conversation\n */\nexport var LlmCallType;\n(function (LlmCallType) {\n /** Initial conversation start */\n LlmCallType[\"Start\"] = \"start\";\n /** Resuming with tool results */\n LlmCallType[\"ResumeTools\"] = \"resume_tools\";\n /** Resuming with user message */\n LlmCallType[\"ResumeUser\"] = \"resume_user\";\n /** Checkpoint resume (after conversation summarization) */\n LlmCallType[\"Checkpoint\"] = \"checkpoint\";\n /** Nested interaction call from within tools */\n LlmCallType[\"NestedInteraction\"] = \"nested_interaction\";\n})(LlmCallType || (LlmCallType = {}));\n/**\n * Types of tools that can be called\n */\nexport var TelemetryToolType;\n(function (TelemetryToolType) {\n /** Built-in tools (e.g., plan, search) */\n TelemetryToolType[\"Builtin\"] = \"builtin\";\n /** Interaction-based tools */\n TelemetryToolType[\"Interaction\"] = \"interaction\";\n /** Remote/MCP tools */\n TelemetryToolType[\"Remote\"] = \"remote\";\n /** Skill tools */\n TelemetryToolType[\"Skill\"] = \"skill\";\n})(TelemetryToolType || (TelemetryToolType = {}));\n//# sourceMappingURL=workflow-analytics.js.map"],"mappings":"mBAYA,IAAW,GACV,SAAU,EAAY,CACnB,EAAW,SAAc,mBACzB,EAAW,UAAe,oBAC1B,EAAW,WAAgB,qBAC3B,EAAW,YAAiB,sBAC5B,EAAW,SAAc,WACzB,EAAW,UAAe,YAC1B,EAAW,UAAe,oBAC1B,EAAW,WAAgB,aAC3B,EAAW,cAAmB,gBAC9B,EAAW,yBAA8B,2BACzC,EAAW,uBAA4B,yBACvC,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,oBAAyB,sBACpC,EAAW,eAAoB,iBAC/B,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,cAAmB,gBAC9B,EAAW,cAAmB,gBAC9B,EAAW,eAAoB,kBAE/B,EAAW,aAAkB,eAE7B,EAAW,WAAgB,aAC3B,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,iBAAsB,mBACjC,EAAW,cAAmB,gBAC9B,EAAW,eAAoB,iBAC/B,EAAW,cAAmB,gBAC9B,EAAW,mBAAwB,qBACnC,EAAW,cAAmB,gBAC9B,EAAW,aAAkB,eAC7B,EAAW,eAAoB,iBAC/B,EAAW,oBAAyB,sBACpC,EAAW,eAAoB,iBAC/B,EAAW,UAAe,YAC1B,EAAW,YAAiB,cAC5B,EAAW,gBAAqB,kBAEhC,EAAW,cAAmB,eAClC,EAAA,CAAG,AAAe,IAAa,CAAC,CAAE,EAClC,IAAW,GACV,SAAU,EAA2B,CAClC,EAA0B,QAAa,UACvC,EAA0B,YAAiB,cAC3C,EAA0B,QAAa,UACvC,EAA0B,YAAiB,cAC3C,EAA0B,IAAS,cAYnC,EAA0B,aAAkB,aAChD,EAAA,CAAG,AAA8B,IAA4B,CAAC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EACnD,YAAa,gDACjB,CACJ,EACA,qBAAsB,GACtB,YAAa,6DACb,MAAO,CACH,mBAAoB,CAChB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,cACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,qBAAsB,CAClB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,gBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,uBAAwB,CACpB,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,SACV,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,OAAQ,QAAS,KAAK,CAClD,EACA,cAAe,CACX,KAAM,SACV,EACA,UAAW,CACP,KAAM,SACN,KAAM,CAAC,KAAM,IAAI,CACrB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,4BAA6B,CACzB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,wBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,uBAAwB,CACpB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,kBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,qBAAsB,CAClB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,MAAM,CAClC,EACA,kBAAmB,CACf,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,oCAAqC,CACjC,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iCACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,2BAA4B,CACxB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,uBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,OAAQ,QAAS,KAAK,CAClD,EACA,uBAAwB,CACpB,KAAM,QACV,EACA,iBAAkB,CACd,KAAM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,EACA,sBAAuB,CACnB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,WAAY,CACR,KAAM,QACV,EACA,KAAM,CACF,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,6BAA8B,kBAAmB,yBAAyB,CACrF,EACA,qCAAsC,CAClC,KAAM,SACN,WAAY,CACR,QAAS,CACL,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,YAAa,6EACjB,EACA,UAAW,CACP,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,2BACjB,EACA,UAAW,CACP,KAAM,UACN,YAAa,sDACjB,EACA,WAAY,CACR,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,SAAU,KAAK,EACtB,YAAa,wNACjB,EACA,aAAc,CACV,KAAM,SACN,QAAS,EACT,YAAa,qMACjB,EACA,iBAAkB,CACd,KAAM,UACN,YAAa,iHACjB,EACA,aAAc,CACV,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,8DACjB,EACA,kBAAmB,CACf,KAAM,UACN,YAAa,uEACjB,EACA,OAAQ,CACJ,KAAM,4CACN,YAAa,6EACjB,EACA,YAAa,CACT,KAAM,4CACN,YAAa,8DACjB,EACA,mBAAoB,CAChB,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,oEACjB,EACA,qBAAsB,CAClB,KAAM,SACN,QAAS,EACT,QAAS,EACT,YAAa,kGACjB,EACA,YAAa,CACT,KAAM,UACN,YAAa,gFACjB,EACA,OAAQ,CACJ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ACN,KAAM,CAAC,MAAO,WAAY,MAAM,EAChC,YAAa,iOACjB,EACA,kCAAmC,CAC/B,KAAM,SACN,WAAY,CACR,GAAI,CACA,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,YAAa,CACT,KAAM,SACV,EACA,SAAU,CACN,KAAM,6BACV,EACA,WAAY,CACR,KAAM,qBACV,EACA,cAAe,CACX,KAAM,sBACV,EACA,iBAAkB,CACd,KAAM,SACN,YAAa,gEACjB,EACA,2BAA4B,CACxB,KAAM,UACN,YAAa,uGACjB,EACA,aAAc,CACV,KAAM,6BACN,YAAa,wDACjB,CACJ,EACA,qBAAsB,EAC1B,EACA,aAAc,CACV,MAAO,CACH,CACI,KAAM,6BACV,EACA,CACI,KAAM,uBACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,6BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,gCACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,qCACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,kCACV,EACA,CACI,KAAM,uCACV,EACA,CACI,KAAM,6CACV,EACA,CACI,KAAM,oCACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,qBACV,CACJ,CACJ,EACA,kBAAmB,CACf,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,qBACX,EACA,SAAU,CACN,KAAM,SACN,KAAM,CACF,aACA,qCACA,0BACA,kBACA,aACA,cACA,oBACJ,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,OAAQ,CACJ,KAAM,QACV,EACA,QAAS,CACL,KAAM,SACN,KAAM,CAAC,WAAY,SAAS,CAChC,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V,SAAU,EAAa,CAEpB,EAAY,MAAW,QAEvB,EAAY,YAAiB,eAE7B,EAAY,WAAgB,cAE5B,EAAY,WAAgB,aAE5B,EAAY,kBAAuB,oBACvC,EAAA,CAAG,AAAgB,KAAc,CAAC,CAAE,EAIpC,IAAW,IACV,SAAU,EAAmB,CAE1B,EAAkB,QAAa,UAE/B,EAAkB,YAAiB,cAEnC,EAAkB,OAAY,SAE9B,EAAkB,MAAW,OACjC,EAAA,CAAG,AAAsB,KAAoB,CAAC,CAAE"}
|
|
1
|
+
{"version":3,"file":"vertesia-common.js","names":["RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","RECORD_MODEL_CAPABILITIES","RECORD_FAMILY_CAPABILITIES","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","ref"],"sources":["access-control-values.js","access-control.js","apikey-values.js","apikey.js","apps.js","audit-trail.js","data-platform.js","email.js","../../../llumiverse/common/lib/capability/anthropic.js","../../../llumiverse/common/lib/options/version-parsing.js","../../../llumiverse/common/lib/capability/azure_foundry.js","../../../llumiverse/common/lib/capability/bedrock-models.js","../../../llumiverse/common/lib/capability/mistral.js","../../../llumiverse/common/lib/capability/openai.js","../../../llumiverse/common/lib/capability/vertexai.js","../../../llumiverse/common/lib/options/context-windows.js","../../../llumiverse/common/lib/types.js","../../../llumiverse/common/lib/model-directory.js","../../../llumiverse/common/lib/capability.js","../../../llumiverse/common/lib/options/fallback.js","../../../llumiverse/common/lib/options/vertexai.js","environment.js","group.js","integrations.js","interaction-values.js","interaction.js","oauth-scopes.js","platform-event.js","project-values.js","project.js","prompt.js","refs.js","schema-for-extraction.js","store/agent-approval.js","store/collections.js","store/conversation-state.js","store/dsl-workflow.js","store/editing-policy-schema.generated.js","store/intake-policy-schema.generated.js","store/process.js","store/workflow.js","store/rendering.js","store/schedule.js","store/store.js","sts-errors.js","training.js","transient-tokens-values.js","account-values.js","user.js","utils/auth.js","utils/schemas.js","versions.js","views.js","workflow-analytics.js"],"sourcesContent":["/**\n * Access-control values that exist at runtime — the enums and the scope list.\n *\n * Split out of `access-control.ts` and `roles/types.ts` for the same reason `account-values.ts` was\n * split out of `user.ts`: the API schemas need these values (`z.enum(Permission)`,\n * `z.enum(AbacScopes)`) while those two modules need the types the schemas infer. Keeping them where\n * they were would make each import a module that imports it back; here, both sides depend on this\n * module and nothing depends on them.\n *\n * Everything is re-exported from its original module, so existing import paths keep working — this\n * is a move, not a rename.\n */\nexport var Permission;\n(function (Permission) {\n Permission[\"int_read\"] = \"interaction:read\";\n Permission[\"int_write\"] = \"interaction:write\";\n Permission[\"int_delete\"] = \"interaction:delete\";\n Permission[\"int_execute\"] = \"interaction:execute\";\n Permission[\"run_read\"] = \"run:read\";\n Permission[\"run_write\"] = \"run:write\";\n Permission[\"env_admin\"] = \"environment:admin\";\n Permission[\"app_manage\"] = \"app:manage\";\n Permission[\"project_admin\"] = \"project:admin\";\n Permission[\"project_integration_read\"] = \"project:integration_read\";\n Permission[\"project_settings_write\"] = \"project:settings_write\";\n Permission[\"api_key_create\"] = \"api_key:create\";\n Permission[\"api_key_read\"] = \"api_key:read\";\n Permission[\"api_key_secret_read\"] = \"api_key:secret_read\";\n Permission[\"api_key_update\"] = \"api_key:update\";\n Permission[\"api_key_delete\"] = \"api_key:delete\";\n Permission[\"account_read\"] = \"account:read\";\n Permission[\"account_write\"] = \"account:write\";\n Permission[\"account_admin\"] = \"account:admin\";\n Permission[\"manage_billing\"] = \"account:billing\";\n /** View cost and usage analytics */\n Permission[\"billing_read\"] = \"billing:read\";\n /** View account and project audit events. */\n Permission[\"audit_read\"] = \"audit:read\";\n Permission[\"account_member\"] = \"account:member\";\n Permission[\"content_read\"] = \"content:read\";\n Permission[\"content_read_all\"] = \"content:read_all\";\n Permission[\"content_write\"] = \"content:write\";\n Permission[\"content_delete\"] = \"content:delete\";\n Permission[\"content_admin\"] = \"content:admin\";\n Permission[\"content_superadmin\"] = \"content:superadmin\";\n Permission[\"workflow_read\"] = \"workflow:read\";\n Permission[\"workflow_run\"] = \"workflow:run\";\n Permission[\"workflow_admin\"] = \"workflow:admin\";\n Permission[\"workflow_superadmin\"] = \"workflow:superadmin\";\n Permission[\"agent_run_read\"] = \"agent_run:read\";\n Permission[\"task_read\"] = \"task:read\";\n Permission[\"task_manage\"] = \"task:manage\";\n Permission[\"iam_impersonate\"] = \"iam:impersonate\";\n /** whether the user has access to Sutdio App. */\n Permission[\"studio_access\"] = \"studio:access\";\n})(Permission || (Permission = {}));\nexport var AccessControlResourceType;\n(function (AccessControlResourceType) {\n AccessControlResourceType[\"project\"] = \"project\";\n AccessControlResourceType[\"environment\"] = \"environment\";\n AccessControlResourceType[\"account\"] = \"account\";\n AccessControlResourceType[\"interaction\"] = \"interaction\";\n AccessControlResourceType[\"app\"] = \"application\";\n /**\n * Dynamic resource matching by property conditions at query time. The role\n * partitions (content, future tasks/etc.) determine which kind of object\n * the conditions match — selected via `AceConditions.scope`.\n *\n * NOTE: the string value remains `'content_set'` for backward compatibility\n * with stored ACEs and JWTs. The wire/DB rename to `'resource_set'` is a\n * separate concern (deferred). Until then, code reads\n * `AccessControlResourceType.resource_set` but the value on the wire stays\n * `'content_set'`.\n */\n AccessControlResourceType[\"resource_set\"] = \"content_set\";\n})(AccessControlResourceType || (AccessControlResourceType = {}));\nexport var AccessControlPrincipalType;\n(function (AccessControlPrincipalType) {\n AccessControlPrincipalType[\"user\"] = \"user\";\n AccessControlPrincipalType[\"group\"] = \"group\";\n AccessControlPrincipalType[\"apikey\"] = \"apikey\";\n /** Dynamic principal matching by user/group properties at token time. */\n AccessControlPrincipalType[\"principal_set\"] = \"principal_set\";\n})(AccessControlPrincipalType || (AccessControlPrincipalType = {}));\n/**\n * Kind of object a ResourceSet's `resource_props` matches at query time. Used\n * in `AceConditions.scope` (validated at runtime against this list) and as\n * the prefix in JWT `content_security` keys (e.g. `collection:read`).\n *\n * Each scope is owned by exactly one partition. When adding a new partition\n * (e.g. tasks), extend this list with the new scope(s) AND extend `RoleDomain`\n * with the new domain.\n */\nexport const AbacScopes = ['document', 'collection', 'task'];\n/**\n * Logical grouping of roles by the service area that owns them. Declared as a\n * runtime list so the role schemas can publish it as an enum component; the\n * `RoleDomain` type is inferred from it in `roles/types.ts`.\n */\nexport const RoleDomains = ['system', 'content', 'tasks'];\n//# sourceMappingURL=access-control-values.js.map","/**\n * The enums live in `./access-control-values.js` so the API schemas can consume them without\n * importing this module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './access-control-values.js';\n/** Human-readable labels for each security level, indexed by numeric value. */\nexport const SecurityLevelLabels = ['Public', 'Internal', 'Confidential', 'Restricted', 'Secret'];\n//# sourceMappingURL=access-control.js.map","/**\n * API key values that exist at runtime.\n *\n * Split out of `apikey.ts` so `api-schemas/apikey.ts` can read the enum without importing a module\n * that derives its types from those very schemas. Re-exported from `apikey.ts`.\n */\nexport var ApiKeyTypes;\n(function (ApiKeyTypes) {\n ApiKeyTypes[\"secret\"] = \"sk\";\n})(ApiKeyTypes || (ApiKeyTypes = {}));\n//# sourceMappingURL=apikey-values.js.map","/**\n * `ApiKeyTypes` lives in `./apikey-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './apikey-values.js';\nexport var PrincipalType;\n(function (PrincipalType) {\n PrincipalType[\"User\"] = \"user\";\n PrincipalType[\"OAuthAccess\"] = \"oauth_access\";\n PrincipalType[\"Group\"] = \"group\";\n PrincipalType[\"ApiKey\"] = \"apikey\";\n PrincipalType[\"ServiceAccount\"] = \"service_account\";\n PrincipalType[\"Agent\"] = \"agent\";\n PrincipalType[\"Schedule\"] = \"schedule\";\n})(PrincipalType || (PrincipalType = {}));\n//# sourceMappingURL=apikey.js.map","/** Allowed values for AppUINavItem.preferredSection */\nexport const PREFERRED_SECTIONS = ['default', 'footer', 'settings'];\nfunction deriveMCPCollectionId(input) {\n return input\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/_+/g, '_');\n}\n/**\n * Normalizes a tool collection to the object format.\n * Applies optional `{{var}}` substitution to the URL so manifests can reference\n * deployment-time variables like `{{studio_ui}}`.\n *\n * @param collection - ToolCollectionObject\n * @param vars - Optional endpoint variables to substitute in URLs\n * @returns Normalized ToolCollectionObject\n */\nexport function normalizeToolCollection(collection, vars) {\n if (!collection || typeof collection !== 'object') {\n throw new TypeError('Tool collection must be an object');\n }\n const substitutedUrl = vars && collection.url ? substituteEndpoints(collection.url, vars) : collection.url;\n const urlChanged = substitutedUrl !== collection.url;\n if (collection.type === 'mcp') {\n const fallbackId = deriveMCPCollectionId(collection.id || collection.name || collection.url);\n if (urlChanged || !collection.id) {\n return {\n ...collection,\n url: substitutedUrl,\n id: collection.id || fallbackId,\n };\n }\n }\n else if (urlChanged) {\n return { ...collection, url: substitutedUrl };\n }\n return collection;\n}\n/**\n * Canonical app capabilities Studio renders/supports. The public type is derived from\n * this list so runtime validation and TypeScript cannot drift.\n */\nexport const APP_CAPABILITIES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n];\n/**\n * Header carrying the app version a generated-app UI is running, so studio/zeno resolve app-owned\n * capability refs (`app:<app>:...`) against that exact version instead of the promoted version.\n * Resolution-time only; never persisted. Set by the generated app template via client.withAppVersion.\n */\nexport const APP_VERSION_HEADER = 'x-vertesia-app-version';\n/**\n * Substitutes `{{key}}` placeholders in a URL with the matching endpoint.\n * Unknown placeholders are left untouched (so failures surface as fetch errors\n * with the unresolved placeholder visible, rather than silently pointing nowhere).\n * Trailing slashes on replacement values are stripped to avoid `//api/...` joins.\n */\nfunction substituteEndpoints(url, endpoints) {\n if (!url || !endpoints)\n return url;\n return url.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (match, key) => {\n const value = endpoints[key];\n if (typeof value !== 'string' || !value)\n return match;\n return trimTrailingSlashes(value);\n });\n}\nfunction trimTrailingSlashes(value) {\n let end = value.length;\n while (end > 0 && value[end - 1] === '/') {\n end--;\n }\n return end === value.length ? value : value.slice(0, end);\n}\n/**\n * Canonical package scopes, including the catch-all `all`. The public type is derived\n * from this list so request parsing and TypeScript cannot drift.\n */\nexport const APP_PACKAGE_SCOPES = [\n 'ui',\n 'tools',\n 'interactions',\n 'types',\n 'processes',\n 'views',\n 'templates',\n 'dashboards',\n 'settings',\n 'widgets',\n 'activities',\n 'hooks',\n 'subscriptions',\n 'all',\n];\n//# sourceMappingURL=apps.js.map","export const AUDIT_ACTIONS = [\n // CRUD operations\n 'create',\n 'update',\n 'delete',\n 'bulk_create',\n 'bulk_change_type',\n 'bulk_update',\n 'bulk_delete',\n 'attach',\n 'detach',\n 'credentials_fill',\n 'credentials_totp_generation',\n 'publish',\n 'unpublish',\n // Billable operations\n 'inference',\n 'embedding',\n 'image_generation',\n // Content processing outcomes\n 'document_processed',\n];\nexport const AUDIT_AGGREGATION_DIMENSIONS = [\n 'time',\n 'action',\n 'resource_type',\n 'event_category',\n 'provider',\n 'project_id',\n 'details.pipeline',\n 'details.verdict',\n 'details.workflow_type',\n 'details.rule_id',\n 'model',\n];\n/** Billable audit actions for cost analytics queries */\nexport const BILLABLE_AUDIT_ACTIONS = ['inference', 'embedding', 'image_generation'];\n//# sourceMappingURL=audit-trail.js.map","// ============================================================================\n// Column Types\n// ============================================================================\n/**\n * Supported column data types for DuckDB tables.\n */\nexport const DataColumnType = {\n STRING: 'STRING',\n INTEGER: 'INTEGER',\n BIGINT: 'BIGINT',\n FLOAT: 'FLOAT',\n DOUBLE: 'DOUBLE',\n DECIMAL: 'DECIMAL',\n BOOLEAN: 'BOOLEAN',\n DATE: 'DATE',\n TIMESTAMP: 'TIMESTAMP',\n JSON: 'JSON',\n};\n/**\n * Semantic types that provide AI agents with context about column meaning.\n */\nexport const SemanticColumnType = {\n EMAIL: 'email',\n PHONE: 'phone',\n URL: 'url',\n CURRENCY: 'currency',\n PERCENTAGE: 'percentage',\n PERSON_NAME: 'person_name',\n ADDRESS: 'address',\n COUNTRY: 'country',\n DATE_ISO: 'date_iso',\n IDENTIFIER: 'identifier',\n};\n/**\n * Mapping from DataColumnType to DuckDB SQL types.\n */\nexport const DATA_COLUMN_TYPE_TO_DUCKDB = {\n [DataColumnType.STRING]: 'VARCHAR',\n [DataColumnType.INTEGER]: 'INTEGER',\n [DataColumnType.BIGINT]: 'BIGINT',\n [DataColumnType.FLOAT]: 'FLOAT',\n [DataColumnType.DOUBLE]: 'DOUBLE',\n [DataColumnType.DECIMAL]: 'DECIMAL(18,4)',\n [DataColumnType.BOOLEAN]: 'BOOLEAN',\n [DataColumnType.DATE]: 'DATE',\n [DataColumnType.TIMESTAMP]: 'TIMESTAMP',\n [DataColumnType.JSON]: 'JSON',\n};\n// ============================================================================\n// Data Store Types\n// ============================================================================\n/**\n * Data store lifecycle status.\n */\nexport const DataStoreStatus = {\n CREATING: 'creating',\n ACTIVE: 'active',\n ERROR: 'error',\n ARCHIVED: 'archived',\n};\n// ============================================================================\n// Import Types\n// ============================================================================\n/**\n * Import job status.\n */\nexport const ImportStatus = {\n PENDING: 'pending',\n PROCESSING: 'processing',\n COMPLETED: 'completed',\n FAILED: 'failed',\n ROLLED_BACK: 'rolled_back',\n};\n/**\n * Default retention configuration: 30 days, snapshots exempt.\n */\nexport const DEFAULT_RETENTION_CONFIG = {\n retention_days: 30,\n snapshots_exempt: true,\n};\n// ============================================================================\n// Dashboard Types\n// ============================================================================\n/**\n * Dashboard lifecycle status.\n */\nexport const DashboardStatus = {\n /** Dashboard is active and usable */\n ACTIVE: 'active',\n /** Dashboard has been archived (soft deleted) */\n ARCHIVED: 'archived',\n};\n/**\n * Default layout configuration for dashboards.\n *\n * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.\n */\nexport const DEFAULT_DASHBOARD_LAYOUT = {\n columns: 2,\n cellWidth: 600,\n cellHeight: 400,\n padding: 20,\n};\n//# sourceMappingURL=data-platform.js.map","/**\n * Type guard for email channels\n */\nexport function isEmailChannel(channel) {\n return channel.type === 'email';\n}\n/**\n * Type guard for interactive channels\n */\nexport function isInteractiveChannel(channel) {\n return channel.type === 'interactive';\n}\n//# sourceMappingURL=email.js.map","// Explicit model exceptions\nconst RECORD_MODEL_CAPABILITIES = {\n // claude-3-5-haiku: no image input\n 'claude-3-5-haiku-20241022': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Family-level capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n 'claude-3-5-haiku': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-haiku': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-sonnet': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-opus': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-7': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\nconst DEFAULT_CLAUDE_CAPABILITIES = {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n};\nexport function getModelCapabilitiesAnthropic(model) {\n const lower = model.toLowerCase();\n // Exact match first\n if (lower in RECORD_MODEL_CAPABILITIES) {\n return RECORD_MODEL_CAPABILITIES[lower];\n }\n // Longest prefix family match\n let bestKey;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (lower.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n if (bestKey) {\n return RECORD_FAMILY_CAPABILITIES[bestKey];\n }\n return DEFAULT_CLAUDE_CAPABILITIES;\n}\n//# sourceMappingURL=anthropic.js.map","/**\n * Version parsing utilities for Claude, OpenAI, and Gemini models.\n *\n * Provides version detection helpers that are forward-compatible with future\n * model releases (e.g., Fable 5, Mythos 5, GPT-5.6, and Gemini 3.5).\n *\n * These helpers are used to:\n * - Control option visibility in the UI\n * - Construct appropriate API payloads for each model version\n *\n * Note: llumiverse does NOT validate options here. Errors from invalid\n * parameters propagate to the provider side.\n */\n// ============================================================================\n// Generic Model-Family Version Parsing\n// ============================================================================\n/**\n * Check a numeric model-family suffix using major/minor ordering.\n *\n * The family includes the stable part immediately before the version, for\n * example `openai.gpt-`, `xai.grok-`, or `deepseek.v`. This deliberately\n * accepts later versions so new models inherit the newest known behavior.\n */\nexport function isModelFamilyVersionGTE(modelString, family, targetMajor, targetMinor) {\n const normalized = modelString.toLowerCase();\n const familyIndex = normalized.indexOf(family.toLowerCase());\n if (familyIndex === -1)\n return false;\n const version = normalized.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!version)\n return false;\n const major = Number(version[1]);\n const minor = Number(version[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nfunction isClaudeVariant(value) {\n return value === 'opus' || value === 'sonnet' || value === 'haiku' || value === 'fable' || value === 'mythos';\n}\n/**\n * Parse Claude model version from a model string.\n *\n * Examples:\n * - \"claude-opus-4-7\" -> { major: 4, minor: 7, variant: 'opus' }\n * - \"claude-sonnet-4-6\" -> { major: 4, minor: 6, variant: 'sonnet' }\n * - \"claude-3-7-sonnet-20250219\" -> { major: 3, minor: 7, variant: 'sonnet' }\n * - \"claude-opus-4-6\" -> { major: 4, minor: 6, variant: 'opus' }\n *\n * @param modelString - The model identifier string\n * @returns Parsed version info, or null if not parseable\n */\nexport function parseClaudeVersion(modelString) {\n if (/claude-mythos-preview(?:-|\\b)/i.test(modelString)) {\n return { major: 5, minor: 0, variant: 'mythos' };\n }\n // Match pattern: claude-[variant-]-{major}-[optional minor]\n // The minor version is limited to 1-2 digits to avoid matching dates (YYYYMMDD format)\n const match = modelString.match(/claude-(opus|sonnet|haiku|fable|mythos)-?(\\d+)(?:-(\\d{1,2}))?(?:-|\\b)/i);\n if (match) {\n const variant = match[1].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n const major = parseInt(match[2], 10);\n const minor = match[3] ? parseInt(match[3], 10) : 0;\n return { major, minor, variant };\n }\n // Fallback for older format: claude-3-7-sonnet-20250219\n const fallbackMatch = modelString.match(/claude-(\\d+)-(\\d+)-(opus|sonnet|haiku|fable|mythos)(?:-|\\b)/i);\n if (fallbackMatch) {\n const major = parseInt(fallbackMatch[1], 10);\n const minor = parseInt(fallbackMatch[2], 10);\n const variant = fallbackMatch[3].toLowerCase();\n if (!isClaudeVariant(variant))\n return null;\n return { major, minor, variant };\n }\n return null;\n}\n/**\n * Check if a Claude model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model version is >= target version, false otherwise\n */\nexport function isClaudeVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n if (version.major > targetMajor) {\n return true;\n }\n if (version.major === targetMajor && version.minor >= targetMinor) {\n return true;\n }\n return false;\n}\n/**\n * Check if a Claude variant model version is greater than or equal to a target version.\n *\n * @param modelString - The model identifier string\n * @param variant - Model family: \"opus\" or \"sonnet\"\n * @param targetMajor - Target major version\n * @param targetMinor - Target minor version\n * @returns true if the model matches the variant and version >= target\n */\nfunction isClaudeVariantVersionGTE(modelString, variant, targetMajor, targetMinor) {\n const version = parseClaudeVersion(modelString);\n if (!version)\n return false;\n if (version.variant.toLowerCase() !== variant)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\n/**\n * Check if a model requires sampling parameter removal (behavior: sampling params removed on Opus 4.7+).\n *\n * This includes:\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 7\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.7+ or equivalent future model\n */\nexport function hasSamplingParameterRemoval(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 7);\n}\n/**\n * Check if a model requires adaptive thinking (behavior: adaptive thinking required on Opus 4.6+).\n *\n * This includes:\n * - claude-opus-4-6\n * - claude-opus-4-7\n * - Future Opus 4.x with minor >= 6\n * - Future Opus 5.x+\n *\n * @param modelString - The model identifier string\n * @returns true if Opus 4.6+ or equivalent future model\n */\nexport function requiresAdaptiveThinking(modelString) {\n return isClaudeVariantVersionGTE(modelString, 'opus', 4, 6);\n}\n/**\n * Check if a model supports adaptive thinking.\n *\n * Adaptive thinking was introduced in:\n * - Claude Opus 4.6\n * - Claude Sonnet 4.6\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports adaptive thinking\n */\nexport function supportsAdaptiveThinking(modelString) {\n return (isClaudeVersionGTE(modelString, 5, 0) ||\n requiresAdaptiveThinking(modelString) ||\n isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6));\n}\n/**\n * Check if extended thinking is deprecated for this model.\n *\n * Extended thinking (thinking.type: \"enabled\" with budget_tokens) is deprecated\n * but still functional on:\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is deprecated (adaptive thinking recommended)\n */\nexport function isExtendedThinkingDeprecated(modelString) {\n return supportsAdaptiveThinking(modelString);\n}\n/**\n * Check if a model requires adaptive thinking ONLY (extended thinking removed).\n *\n * On Opus 4.7+, extended thinking returns a 400 error. Only adaptive thinking is supported.\n * Future models (Sonnet 4.7+, Haiku 4.7+, any 5.0+) follow the same pattern.\n *\n * @param modelString - The model identifier string\n * @returns true if extended thinking is removed (returns 400 error)\n */\nexport function requiresAdaptiveThinkingOnly(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/**\n * Check if a model has sampling parameter restrictions.\n *\n * On Opus 4.7+, setting temperature, top_p, or top_k to any non-default value\n * returns a 400 error. Future models following the same pattern will also match:\n * - Opus 4.7+ (current restriction)\n * - Sonnet 4.7+, Haiku 4.7+ (future minor versions >= 7)\n * - Sonnet 5.0+, Haiku 5.0+, Opus 5.0+ (future major versions)\n *\n * @param modelString - The model identifier string\n * @returns true if sampling parameters are restricted\n */\nexport function hasSamplingParameterRestriction(modelString) {\n const version = parseClaudeVersion(modelString);\n if (!version) {\n return false;\n }\n // Future major versions (5.0+) follow the same pattern as 4.7\n if (version.major > 4) {\n return true;\n }\n // Version 4.7+ (Opus 4.7, Sonnet 4.7, Haiku 4.7, etc.)\n if (version.major === 4 && version.minor >= 7) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the effort parameter.\n *\n * Effort is supported on:\n * - Claude Opus 4.5+\n * - Claude Opus 4.6+\n * - Claude Sonnet 4.6+\n * - All variants at 4.7+ (Opus, Sonnet, Haiku)\n * - All variants at 5.0+\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports the effort parameter\n */\nexport function supportsEffort(modelString) {\n // All 4.7+ variants support effort (covers future Sonnet 4.7, Haiku 4.7, etc.)\n if (hasSamplingParameterRestriction(modelString)) {\n return true;\n }\n // Opus 4.5+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'opus', 4, 5)) {\n return true;\n }\n // Sonnet 4.6+ supports effort\n if (isClaudeVariantVersionGTE(modelString, 'sonnet', 4, 6)) {\n return true;\n }\n return false;\n}\n/**\n * Check if a model supports the xhigh effort level.\n *\n * xhigh is available on the sampling-restricted Claude generation and Mythos Preview.\n *\n * @param modelString - The model identifier string\n * @returns true if the model supports xhigh effort\n */\nexport function supportsXHighEffort(modelString) {\n return hasSamplingParameterRestriction(modelString);\n}\n/** Parse GPT family versions from bare IDs, snapshots, or provider-qualified paths. */\nexport function parseOpenAIGptVersion(modelString) {\n const match = modelString.toLowerCase().match(/(?:^|[./:])(?:openai\\.)?gpt-(\\d+)(?:\\.(\\d+))?(?:-|[.:@]|$)/);\n if (!match)\n return null;\n return { major: Number(match[1]), minor: Number(match[2] ?? '0') };\n}\nexport function isOpenAIGptVersionGTE(modelString, targetMajor, targetMinor) {\n const version = parseOpenAIGptVersion(modelString);\n if (!version)\n return false;\n return version.major > targetMajor || (version.major === targetMajor && version.minor >= targetMinor);\n}\nexport function isOpenAIGptProModel(modelString) {\n return /(?:^|[./:])(?:openai\\.)?gpt-\\d+(?:\\.\\d+)?-pro(?:-|[.:@]|$)/i.test(modelString);\n}\n/** Current reasoning-effort metadata, expressed with version thresholds for future GPT releases. */\nexport function getOpenAIReasoningEffortLevels(modelString) {\n if (!isOpenAIGptVersionGTE(modelString, 5, 0))\n return null;\n if (isOpenAIGptProModel(modelString)) {\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { Medium: 'medium', 'High (default)': 'high', 'Extra High': 'xhigh' };\n }\n return { 'High (only)': 'high' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 6)) {\n return {\n None: 'none',\n Low: 'low',\n Medium: 'medium',\n High: 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 2)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high', 'Extra High': 'xhigh' };\n }\n if (isOpenAIGptVersionGTE(modelString, 5, 1)) {\n return { None: 'none', Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\n/**\n * Get the available effort levels for a given Claude model.\n *\n * - Opus 4.7+: low, medium, high, xhigh, max\n * - Opus 4.5+, Opus 4.6+, Sonnet 4.6+: low, medium, high, max\n * - Other models: empty (effort not supported)\n *\n * @param modelString - The model identifier string\n * @returns Record of display label to effort level value, or null if not supported\n */\nexport function getAvailableEffortLevels(modelString) {\n if (!supportsEffort(modelString)) {\n return null;\n }\n const levels = {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n Max: 'max',\n };\n if (supportsXHighEffort(modelString)) {\n // Insert xhigh between high and max\n return {\n Low: 'low',\n Medium: 'medium',\n 'High (default)': 'high',\n 'Extra High': 'xhigh',\n Max: 'max',\n };\n }\n return levels;\n}\n// ============================================================================\n// Gemini Version Parsing\n// ============================================================================\n/**\n * Extract Gemini version from a model ID.\n *\n * Examples:\n * - \"locations/global/publishers/google/models/gemini-2.5-flash\" -> \"2.5\"\n * - \"publishers/google/models/gemini-3-pro-image-preview\" -> \"3\"\n * - \"gemini-3.1-flash-lite-preview\" -> \"3.1\"\n *\n * @param modelId - The model identifier string\n * @returns Version string (e.g., \"2.5\", \"3\", \"3.1\"), or undefined if not parseable\n */\nexport function getGeminiModelVersion(modelId) {\n const modelName = modelId.split('/').pop() ?? modelId;\n const match = modelName.match(/^gemini-(\\d+(?:\\.\\d+)?)/i);\n return match?.[1];\n}\n/**\n * Parse a version string into major.minor components.\n *\n * @param version - Version string (e.g., \"2.5\", \"3\", \"3.1\")\n * @returns Parsed version, or undefined if not parseable\n */\nexport function parseGeminiVersion(version) {\n const match = version.match(/^(\\d+)(?:\\.(\\d+))?$/);\n if (!match) {\n return undefined;\n }\n return {\n major: Number(match[1]),\n minor: Number(match[2] ?? '0'),\n };\n}\n/**\n * Check if a Gemini model version is greater than or equal to a minimum version.\n *\n * @param modelId - The model identifier string\n * @param minVersion - Minimum version string (e.g., \"2.5\", \"3.0\")\n * @returns true if model version >= min version\n */\nexport function isGeminiModelVersionGte(modelId, minVersion) {\n const modelVersion = getGeminiModelVersion(modelId);\n if (!modelVersion) {\n return false;\n }\n const current = parseGeminiVersion(modelVersion);\n const target = parseGeminiVersion(minVersion);\n if (!current || !target) {\n return false;\n }\n if (current.major > target.major) {\n return true;\n }\n if (current.major < target.major) {\n return false;\n }\n return current.minor >= target.minor;\n}\n//# sourceMappingURL=version-parsing.js.map","import { isModelFamilyVersionGTE } from '../options/version-parsing.js';\n// Global feature flags - temporarily disable tool support for non-OpenAI models\nconst ENABLE_TOOL_SUPPORT_NON_OPENAI = false;\n// Record of Azure Foundry model capabilities keyed by model ID (lowercased)\n// Only include models with specific exceptions that differ from their family patterns\nconst RECORD_MODEL_CAPABILITIES = {\n // OpenAI O-series exceptions - o1-mini doesn't have tool support like other o1 models\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // OpenAI o3 is text-only unlike other o-series models\n o3: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Models with special properties not covered by family patterns\n 'deepseek-r1-0528': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3-0324': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-medium-2505': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-nemo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-4-scout-17b-16e-instruct': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n // OpenAI GPT families\n 'gpt-3.5-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // OpenAI O-series families\n o1: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-preview': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-pro': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o3-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o4-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o4: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Llama families\n 'llama-3.1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-3.3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Mistral families\n 'mistral-large': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'mistral-small': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n mistral: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Microsoft Phi families\n 'phi-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n phi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // DeepSeek families\n 'deepseek-r1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // AI21 families\n 'ai21-jamba': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n ai21: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n jamba: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // Cohere families\n 'cohere-command': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n cohere: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n command: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // xAI families\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n grok: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image', 'vision'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'gpt-4',\n 'gpt-4o',\n 'o1',\n 'o3',\n 'o4',\n 'llama-3',\n 'mistral-large',\n 'mistral-small',\n 'jamba',\n 'cohere',\n 'command',\n 'grok',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for an Azure Foundry model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to family pattern matching.\n */\nexport function getModelCapabilitiesAzureFoundry(model) {\n // Extract base model from composite ID (deployment::baseModel)\n const { baseModel } = parseAzureFoundryModelId(model);\n const normalized = baseModel.toLowerCase();\n // 1. Exact match in record\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n return applyGlobalToolSupportDisable(record, normalized);\n }\n if (isModelFamilyVersionGTE(normalized, 'llama-', 4, 0) || isModelFamilyVersionGTE(normalized, 'llama', 4, 0)) {\n // Future Llama deployments inherit the latest known Foundry family behavior.\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES['llama-4'], normalized);\n }\n // 2. Fallback: find the longest matching family prefix in RECORD_FAMILY_CAPABILITIES\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES[bestFamilyKey], normalized);\n }\n // 3. Fallback: infer from normalized name using patterns\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || true, // Default to text input\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || true, // Default to text output\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n const tool_support_streaming = tool_support || undefined;\n const inferredCapabilities = { input, output, tool_support, tool_support_streaming };\n return applyGlobalToolSupportDisable(inferredCapabilities, normalized);\n}\n/**\n * Apply global tool support disable for non-OpenAI models.\n * Preserves model-specific information for future use while temporarily disabling tool support.\n */\nfunction applyGlobalToolSupportDisable(capabilities, modelName) {\n // Check if this is an OpenAI model\n const isOpenAIModel = modelName.startsWith('gpt-') ||\n modelName.startsWith('o1') ||\n modelName.startsWith('o3') ||\n modelName.startsWith('o4');\n if (!ENABLE_TOOL_SUPPORT_NON_OPENAI && !isOpenAIModel) {\n // Disable tool support for non-OpenAI models while preserving other capabilities\n return {\n ...capabilities,\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n return capabilities;\n}\n// Helper function to parse composite model IDs\nfunction parseAzureFoundryModelId(compositeId) {\n const parts = compositeId.split('::');\n if (parts.length === 2) {\n return {\n deploymentName: parts[0],\n baseModel: parts[1],\n };\n }\n // Backwards compatibility: if no delimiter found, treat as deployment name\n return {\n deploymentName: compositeId,\n baseModel: compositeId,\n };\n}\n//# sourceMappingURL=azure_foundry.js.map","import { parseClaudeVersion } from '../options/version-parsing.js';\nfunction includesAny(model, patterns) {\n return patterns.some((pattern) => model.includes(pattern));\n}\nfunction isFamilyVersionGte(model, family, targetMajor, targetMinor = 0) {\n const familyIndex = model.indexOf(family);\n if (familyIndex === -1)\n return false;\n const match = model.slice(familyIndex + family.length).match(/^(\\d+)(?:[.-](\\d+))?/);\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\n/**\n * Geographic prefix carried by cross-region inference IDs (`us.`, `eu.`, `apac.`, `us-gov.`, `global.`).\n * No publisher segment collides with these, so the prefix can be stripped wherever it appears — not\n * only inside an inference-profile ARN, since callers also pass the bare `us.<publisher>.<model>` ID.\n */\nconst GEO_PREFIX = /^(?:[a-z]{2}(?:-gov)?|apac|global)\\./;\nexport function normalizeBedrockModelId(model) {\n const normalized = model.toLowerCase();\n const slash = normalized.lastIndexOf('/');\n const modelId = slash === -1 ? normalized : normalized.slice(slash + 1);\n return modelId.replace(GEO_PREFIX, '');\n}\nfunction getModalities(model) {\n if (includesAny(model, ['nova-2-multimodal-embeddings', 'titan-embed', 'cohere.embed', 'marengo-embed'])) {\n return {\n input: {\n text: true,\n image: includesAny(model, ['multimodal', 'embed-image', 'embed-v4', 'marengo']),\n video: includesAny(model, ['multimodal', 'marengo']),\n audio: model.includes('multimodal'),\n embed: false,\n },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n };\n }\n if (includesAny(model, ['nova-canvas', 'titan-image-generator'])) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n };\n }\n if (model.includes('nova-reel')) {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: false, embed: false },\n };\n }\n const image = (model.includes('anthropic.claude') && !model.includes('claude-3-5-haiku')) ||\n (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('google.gemma') ||\n includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b']) ||\n isFamilyVersionGte(model, 'meta.llama', 4) ||\n includesAny(model, [\n 'mistral.magistral-',\n 'mistral.ministral-3-',\n 'mistral.mistral-large-3-',\n 'mistral.pixtral-',\n ]) ||\n isFamilyVersionGte(model, 'kimi-k', 2, 5) ||\n model.includes('nemotron-nano-12b') ||\n model.includes('qwen3-vl') ||\n model.includes('palmyra-vision') ||\n (model.startsWith('openai.gpt-') && !model.includes('gpt-oss')) ||\n model.startsWith('xai.grok-');\n const video = (model.includes('amazon.nova') && !model.includes('nova-micro')) ||\n model.includes('twelvelabs.pegasus') ||\n isFamilyVersionGte(model, 'google.gemma-', 4);\n const audio = includesAny(model, ['nova-sonic', 'mistral.voxtral-']) || model.includes('google.gemma-4-e2b');\n return {\n input: { text: !model.includes('nova-sonic-v1'), image, video, audio, embed: false },\n output: { text: true, image: false, video: false, audio: model.includes('nova-sonic'), embed: false },\n };\n}\nfunction getLimits(model) {\n if (model.includes('ai21.jamba'))\n return { context_window: 256_000, max_output_tokens: 4_096 };\n if (model.includes('amazon.nova-2'))\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n if (model.includes('amazon.nova-premier'))\n return { context_window: 1_000_000, max_output_tokens: 25_600 };\n if (model.includes('amazon.nova-micro'))\n return { context_window: 128_000, max_output_tokens: 5_120 };\n if (includesAny(model, ['amazon.nova-lite', 'amazon.nova-pro'])) {\n return { context_window: 300_000, max_output_tokens: 5_120 };\n }\n if (model.includes('anthropic.claude')) {\n // Version rules rather than an ID list, so a newly released variant inherits the limits of the\n // newest understood generation instead of silently reporting no limits at all.\n const claude = parseClaudeVersion(model);\n if (claude) {\n const atLeast = (major, minor) => claude.major > major || (claude.major === major && claude.minor >= minor);\n if (atLeast(4, 7) || (claude.variant === 'opus' && atLeast(4, 6))) {\n // Bedrock enforces an EXCLUSIVE 128K bound for this family: it rejects\n // max_tokens >= 128000 with \"Try again with a maximum tokens value that\n // is lower than 128000\" (same exclusive-bound quirk as Haiku 4.5 below).\n return { context_window: 1_000_000, max_output_tokens: 127_999 };\n }\n if (claude.variant === 'sonnet' && atLeast(4, 6)) {\n return { context_window: 1_000_000, max_output_tokens: 65_536 };\n }\n if (atLeast(4, 5)) {\n // Bedrock documents 64K for Haiku 4.5 but rejects max_tokens=64000; its bound is exclusive.\n return {\n context_window: 200_000,\n max_output_tokens: claude.variant === 'haiku' ? 63_999 : 65_536,\n };\n }\n if (atLeast(4, 0)) {\n return {\n context_window: 200_000,\n max_output_tokens: claude.variant === 'opus' ? 32_000 : 65_536,\n };\n }\n }\n if (model.includes('claude-3-5-haiku'))\n return { context_window: 200_000, max_output_tokens: 8_192 };\n if (model.includes('claude-3-haiku'))\n return { context_window: 200_000, max_output_tokens: 4_096 };\n }\n if (model.includes('cohere.command-r'))\n return { context_window: 128_000, max_output_tokens: 4_096 };\n if (isFamilyVersionGte(model, 'deepseek.v', 3, 2)) {\n return { context_window: 163_840, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['deepseek.v3', 'deepseek.r1']))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('google.gemma-4-31b') || model.includes('google.gemma-4-26b')) {\n return { context_window: 256_000 };\n }\n if (model.includes('google.gemma-4-e2b'))\n return { context_window: 128_000 };\n if (model.includes('google.gemma-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (isFamilyVersionGte(model, 'meta.llama', 4)) {\n // Future Llama releases inherit the latest provider limit family while retaining the documented Scout split.\n return { context_window: model.includes('scout') ? 10_000_000 : 1_000_000, max_output_tokens: 8_192 };\n }\n if (model.includes('meta.llama3-') &&\n !model.includes('llama3-1') &&\n !model.includes('llama3-2') &&\n !model.includes('llama3-3')) {\n return { context_window: 8_192, max_output_tokens: 8_192 };\n }\n if (includesAny(model, ['meta.llama3-1', 'meta.llama3-2', 'meta.llama3-3'])) {\n return { context_window: 128_000, max_output_tokens: 4_096 };\n }\n if (isFamilyVersionGte(model, 'minimax.minimax-m', 2, 1)) {\n return { context_window: 196_000, max_output_tokens: 8_192 };\n }\n if (model.includes('minimax.minimax-m2'))\n return { context_window: 1_000_000, max_output_tokens: 8_192 };\n if (includesAny(model, ['mistral.devstral-2', 'mistral.mistral-large-3'])) {\n return { context_window: 256_000, max_output_tokens: 32_768 };\n }\n if (model.includes('mistral.magistral-'))\n return { context_window: 128_000, max_output_tokens: 40_960 };\n if (model.includes('mistral.ministral-3-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (model.includes('mistral.pixtral-'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (includesAny(model, [\n 'mistral.mistral-7b',\n 'mistral.mistral-large-2402',\n 'mistral.mistral-small-2402',\n 'mistral.mixtral-',\n 'mistral.voxtral-',\n ])) {\n return { context_window: 32_000, max_output_tokens: model.includes('voxtral') ? undefined : 4_096 };\n }\n if (includesAny(model, ['moonshot.kimi-k2', 'moonshotai.kimi-k2'])) {\n return { context_window: 256_000, max_output_tokens: 16_384 };\n }\n if (model.includes('nvidia.nemotron-super-'))\n return { context_window: 256_000, max_output_tokens: 32_768 };\n const nemotronNanoGeneration = model.match(/nvidia\\.nemotron-nano-(\\d+)-/)?.[1];\n if (nemotronNanoGeneration && Number(nemotronNanoGeneration) >= 3) {\n return { context_window: 256_000, max_output_tokens: 8_192 };\n }\n if (model.includes('nvidia.nemotron-nano-'))\n return { context_window: 128_000, max_output_tokens: 8_192 };\n if (isFamilyVersionGte(model, 'openai.gpt-', 5) && !model.includes('gpt-oss')) {\n return { context_window: 272_000, max_output_tokens: 128_000 };\n }\n if (model.includes('openai.gpt-oss'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-235b'))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-32b'))\n return { context_window: 32_000, max_output_tokens: 8_192 };\n if (model.includes('qwen3-coder-30b'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-480b'))\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (model.includes('qwen3-coder-next'))\n return { context_window: 256_000, max_output_tokens: 16_384 };\n if (includesAny(model, ['qwen3-next-', 'qwen3-vl-']))\n return { context_window: 256_000, max_output_tokens: 8_192 };\n if (model.includes('writer.palmyra-vision'))\n return { context_window: 4_096, max_output_tokens: 4_096 };\n if (includesAny(model, ['writer.palmyra-x4', 'writer.palmyra-x5'])) {\n return { context_window: 128_000, max_output_tokens: 8_192 };\n }\n if (model.startsWith('xai.grok-'))\n return { context_window: 1_000_000 };\n if (includesAny(model, ['zai.glm-4.7', 'zai.glm-4.6']))\n return { context_window: 203_000, max_output_tokens: 4_096 };\n if (model.includes('zai.glm-5'))\n return { context_window: 200_000, max_output_tokens: 131_072 };\n return {};\n}\nfunction getRuntimeToolSupport(model) {\n let toolSupport;\n let streaming = false;\n if (model.includes('gpt-oss-safeguard') || model.includes('deepseek.r1')) {\n toolSupport = false;\n }\n else if (model.includes('anthropic.claude')) {\n toolSupport = true;\n streaming = !model.includes('claude-3-5-haiku');\n }\n else if (model.includes('ai21.jamba') && !model.includes('jamba-instruct')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('amazon.nova') && !includesAny(model, ['nova-canvas', 'nova-reel'])) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('cohere.command-r')) {\n toolSupport = true;\n streaming = true;\n }\n else if (model.includes('meta.llama3-1')) {\n toolSupport = true;\n streaming = false;\n }\n else if (includesAny(model, ['meta.llama3-2-11b', 'meta.llama3-2-90b'])) {\n toolSupport = true;\n }\n else if (isFamilyVersionGte(model, 'meta.llama', 4)) {\n // Bedrock's Converse behavior is family-stable here; future Llama generations inherit Llama 4 tool support.\n toolSupport = true;\n streaming = false;\n }\n else if (includesAny(model, ['qwen.qwen3-235b', 'qwen.qwen3-32b'])) {\n toolSupport = true;\n streaming = false;\n }\n else if (model.startsWith('deepseek.') && !model.includes('deepseek.r1')) {\n toolSupport = true;\n streaming = false;\n }\n else if (model.startsWith('openai.gpt-') || model.startsWith('xai.grok-')) {\n toolSupport = true;\n streaming = true;\n }\n else if (isFamilyVersionGte(model, 'google.gemma-', 4)) {\n // Later Gemma generations inherit the newest verified Bedrock tool behavior.\n toolSupport = true;\n streaming = true;\n }\n else if (includesAny(model, ['mistral.mistral-large', 'mistral.pixtral'])) {\n toolSupport = true;\n }\n else if (model.includes('twelvelabs.pegasus')) {\n toolSupport = true;\n }\n else if (model.includes('writer.palmyra')) {\n toolSupport = true;\n }\n if (toolSupport === undefined)\n return {};\n return { tool_support: toolSupport, tool_support_streaming: toolSupport && streaming };\n}\nexport function getBedrockModelKnowledge(model) {\n const modelId = normalizeBedrockModelId(model);\n return { ...getModalities(modelId), ...getLimits(modelId) };\n}\nexport function getBedrockModelCapabilities(model, endpoint) {\n const modelId = normalizeBedrockModelId(model);\n const knowledge = getBedrockModelKnowledge(modelId);\n // AWS documents client-side tool calling for Nemotron on Mantle, but not Bedrock Runtime tool use.\n const sourceToolSupport = endpoint === 'mantle' && modelId.startsWith('nvidia.nemotron-')\n ? { tool_support: true }\n : getRuntimeToolSupport(modelId);\n // Mantle can stream tool calls, but its protocol alone does not give every hosted source model tool support.\n // Preserve false/unknown source semantics and relax only a known-positive runtime streaming restriction.\n const toolSupport = endpoint === 'mantle' && sourceToolSupport.tool_support === true\n ? { ...sourceToolSupport, tool_support_streaming: true }\n : sourceToolSupport;\n return {\n input: knowledge.input,\n output: knowledge.output,\n ...toolSupport,\n };\n}\n//# sourceMappingURL=bedrock-models.js.map","function datedVersionGte(model, family, target) {\n const match = model.match(new RegExp(`${family}(\\\\d{4})(?:[-_.]|$)`));\n return !!match && Number(match[1]) >= target;\n}\nfunction semanticVersionGte(model, family, targetMajor, targetMinor = 0) {\n const match = model.match(new RegExp(`${family}(\\\\d+)(?:[-.](\\\\d+))?(?:[-_.]|$)`));\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nfunction isMistralSmall4OrLater(model) {\n return (model.includes('mistral-small-latest') ||\n datedVersionGte(model, 'mistral-small-', 2603) ||\n semanticVersionGte(model, 'mistral-small-', 4));\n}\nfunction isMistralMedium35OrLater(model) {\n return (model.includes('mistral-medium-latest') ||\n datedVersionGte(model, 'mistral-medium-', 2604) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 5));\n}\nexport function isMistralAdjustableReasoningModel(model) {\n const normalized = model.toLowerCase();\n return isMistralSmall4OrLater(normalized) || isMistralMedium35OrLater(normalized);\n}\nfunction hasMistralVision(model) {\n return (model.includes('pixtral') ||\n model.includes('mistral-small-latest') ||\n datedVersionGte(model, 'mistral-small-', 2503) ||\n semanticVersionGte(model, 'mistral-small-', 3, 1) ||\n model.includes('mistral-medium-latest') ||\n datedVersionGte(model, 'mistral-medium-', 2508) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 1) ||\n model.includes('mistral-large-latest') ||\n datedVersionGte(model, 'mistral-large-', 2512) ||\n semanticVersionGte(model, 'mistral-large-', 3) ||\n /ministral-(?:3|8|14)b-(?:latest|\\d{4})(?:[-_.]|$)/.test(model));\n}\nfunction getMistralContextWindow(model) {\n if (model.includes('voxtral-small') || model.includes('voxtral-mini'))\n return 32_000;\n if (model.includes('magistral-')) {\n const version = model.match(/magistral-(?:small|medium)-(\\d{4})(?:[-_.]|$)/)?.[1];\n return model.includes('latest') || (version && Number(version) >= 2509) ? 128_000 : 40_000;\n }\n if (isMistralSmall4OrLater(model) ||\n isMistralMedium35OrLater(model) ||\n model.includes('mistral-large-latest') ||\n datedVersionGte(model, 'mistral-large-', 2512) ||\n semanticVersionGte(model, 'mistral-large-', 3) ||\n /ministral-(?:3|8|14)b-(?:latest|\\d{4})(?:[-_.]|$)/.test(model) ||\n model.includes('devstral-2') ||\n model.includes('leanstral')) {\n return 256_000;\n }\n if (datedVersionGte(model, 'mistral-small-', 2503) ||\n semanticVersionGte(model, 'mistral-small-', 3, 1) ||\n datedVersionGte(model, 'mistral-medium-', 2508) ||\n semanticVersionGte(model, 'mistral-medium-', 3, 1) ||\n model.includes('mistral-nemo') ||\n model.includes('open-mistral-nemo') ||\n model.includes('codestral') ||\n model.includes('pixtral')) {\n return 128_000;\n }\n if (/mistral-(?:small|medium|large)-24\\d{2}/.test(model) || model.includes('open-mistral-7b')) {\n return 32_000;\n }\n return undefined;\n}\nexport function getMistralModelKnowledge(model) {\n const normalized = model.toLowerCase();\n if (normalized.includes('moderation') || normalized.includes('shieldstral')) {\n return {\n capabilities: {\n input: { text: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('mistral-ocr')) {\n return {\n capabilities: {\n input: { text: true, image: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('tts')) {\n return {\n capabilities: {\n input: { text: true },\n output: { audio: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n if (normalized.includes('voxtral-mini') && /(transcribe|realtime)/.test(normalized)) {\n return {\n capabilities: {\n input: { audio: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n },\n };\n }\n const adjustableReasoning = isMistralAdjustableReasoningModel(normalized);\n const voxtralMini = normalized.includes('voxtral-mini');\n return {\n capabilities: {\n input: {\n text: true,\n image: hasMistralVision(normalized) || undefined,\n audio: normalized.includes('voxtral-small') || voxtralMini || undefined,\n },\n output: { text: true },\n tool_support: !voxtralMini,\n tool_support_streaming: !voxtralMini,\n },\n context_window: getMistralContextWindow(normalized),\n ...(adjustableReasoning && { reasoning_effort_levels: ['none', 'high'] }),\n };\n}\n//# sourceMappingURL=mistral.js.map","// Record of OpenAI model capabilities keyed by model ID (lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'chatgpt-4o-latest': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\n// For OpenAI, tool_support_streaming matches tool_support since the API supports tools while streaming\nconst RECORD_FAMILY_CAPABILITIES = {\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-3.5': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4-turbo': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'chatgpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'dall-e': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'o1-preview': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'omni-moderation': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n sora: {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: true, embed: false },\n tool_support: false,\n },\n 'text-embedding': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n tool_support: false,\n },\n 'text-moderation': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n whisper: {\n input: { text: false, image: false, video: false, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = ['tool', 'gpt', 'gpt-5', 'o1', 'o3', 'o4'];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeOpenAIModelName(modelName) {\n return modelName.toLowerCase();\n}\n/**\n * Get the full ModelCapabilities for an OpenAI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n * For OpenAI models, tool_support_streaming defaults to tool_support since the API supports tools while streaming.\n */\nexport function getModelCapabilitiesOpenAI(model) {\n const normalized = normalizeOpenAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...record,\n tool_support_streaming: record.tool_support_streaming ?? record.tool_support,\n };\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n const family = RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...family,\n tool_support_streaming: family.tool_support_streaming ?? family.tool_support,\n };\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n // Default tool_support_streaming to tool_support for OpenAI models\n return { input, output, tool_support, tool_support_streaming: tool_support };\n}\n//# sourceMappingURL=openai.js.map","import { isModelFamilyVersionGTE } from '../options/version-parsing.js';\n// Record of Vertex AI model capabilities keyed by model ID (last path segment, lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'gemini-2.0-flash-lite-001': {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemma-4-26b-a4b-it-maas': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Default family capabilities intentionally describe the latest known behavior for a model family.\n// Newer Vertex models should inherit these defaults by prefix until proven otherwise; add model-specific\n// records above only for older variants or materially different models that do not match the family default.\nconst RECORD_FAMILY_CAPABILITIES = {\n gemini: {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gemini-3.1-flash-image': {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-2.5-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-pro-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n imagen: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n claude: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-2': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n grok: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n gemma: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n glm: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n kimi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n minimax: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n qwen: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'sonnet',\n 'opus',\n 'gemini',\n 'claude',\n 'grok',\n 'deepseek',\n 'gemma',\n 'glm',\n 'gpt-oss',\n 'kimi',\n 'llama',\n 'minimax',\n 'qwen',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeVertexAIModelName(modelName) {\n const segments = modelName.toLowerCase().split('/');\n return segments[segments.length - 1];\n}\n/**\n * Get the full ModelCapabilities for a Vertex AI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesVertexAI(model) {\n const normalized = normalizeVertexAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record)\n return record;\n if (isModelFamilyVersionGTE(normalized, 'llama-', 4, 0) || isModelFamilyVersionGTE(normalized, 'llama', 4, 0)) {\n // New Llama generations inherit the latest known MaaS family capabilities until a model-specific exception\n // is documented above.\n return RECORD_FAMILY_CAPABILITIES['llama-4'];\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=vertexai.js.map","import { getMistralModelKnowledge } from '../capability/mistral.js';\nimport { isClaudeVersionGTE, isModelFamilyVersionGTE, isOpenAIGptProModel, isOpenAIGptVersionGTE, parseOpenAIGptVersion, } from './version-parsing.js';\nfunction isDeepSeekV32OrLater(model) {\n return isModelFamilyVersionGTE(model, 'deepseek.v', 3, 2) || isModelFamilyVersionGTE(model, 'deepseek-v', 3, 2);\n}\n/**\n * Returns the max output tokens for a given model (provider-agnostic).\n * When a model's limits vary by provider, returns a conservative value\n * that works across all providers.\n */\nexport function getMaxOutputTokens(model) {\n model = model.toLowerCase();\n // Claude models\n if (model.includes('claude')) {\n if (isClaudeVersionGTE(model, 4, 7))\n return 128_000;\n if (model.includes('opus-4-6'))\n return 128_000;\n if (model.includes('opus-4-5'))\n return 64_000;\n if (model.includes('opus-'))\n return 32_000; // Opus 4.0, 4.1\n if (model.includes('-4-'))\n return 64_000; // Sonnet 4.x, Haiku 4.5\n if (model.includes('-3-7'))\n return 64_000; // 128K with beta header, default 64K\n if (model.includes('-3-5'))\n return 8_192;\n return 4_096; // Claude 3 older\n }\n // Gemini models\n if (model.includes('gemini')) {\n if (model.includes('-1.0-'))\n return 2_048;\n if (model.includes('flash-image') || model.includes('pro-image'))\n return 32_768;\n return 65_535; // Gemini 1.5, 2.0, 2.5, 3 — API upper bound is exclusive\n }\n // OpenAI o-series\n if (model.includes('o1-mini'))\n return 65_536;\n if (model.includes('o1'))\n return 100_000;\n if (/(?:^|[~/.])o\\d+(?:[-_.]|$)/.test(model.toLowerCase()))\n return 100_000;\n // GPT models\n const gptVersion = parseOpenAIGptVersion(model);\n if (model.includes('gpt-5-chat-latest'))\n return 16_384;\n if (isOpenAIGptProModel(model) && gptVersion?.major === 5 && gptVersion.minor === 0)\n return 272_000;\n if (isOpenAIGptVersionGTE(model, 5, 0))\n return 128_000;\n if (model.includes('gpt-oss'))\n return 16_384;\n if (model.includes('gpt-4o'))\n return 16_384;\n if (model.includes('gpt-4'))\n return 8_192;\n if (model.includes('gpt-3.5'))\n return 4_096;\n // Grok\n if (isModelFamilyVersionGTE(model, 'grok-', 4, 3))\n return 131_072;\n // Amazon Nova\n if (model.includes('nova'))\n return 10_000;\n // Mistral\n if (model.includes('mistral'))\n return 8_192;\n // DeepSeek\n if (model.includes('deepseek-r1-0528'))\n return 32_768;\n if (isDeepSeekV32OrLater(model))\n return 65_536;\n if (model.includes('deepseek'))\n return 128_000;\n // Qwen\n if (model.includes('qwen3-next'))\n return 262_144;\n if (model.includes('qwen3-coder'))\n return 65_536;\n if (model.includes('qwen'))\n return 32_768;\n // Kimi\n if (model.includes('kimi-k2-thinking'))\n return 262_144;\n // MiniMax\n if (model.includes('minimax-m2'))\n return 196_608;\n // ZAI GLM\n if (model.includes('glm-'))\n return 32_768;\n // Gemma\n if (model.includes('gemma-4'))\n return 128_000;\n // Llama\n if (model.includes('llama'))\n return 8_192;\n // Cohere\n if (model.includes('command-a'))\n return 8_000;\n if (model.includes('command'))\n return 4_096;\n return 8_192; // conservative default\n}\n/**\n * Returns the max input tokens for a known model (context window minus max output), or undefined when the context\n * window is not known.\n */\nexport function getMaxInputTokens(model) {\n const contextWindow = getContextWindowSize(model);\n return contextWindow === undefined ? undefined : contextWindow - getMaxOutputTokens(model);\n}\n/**\n * Returns the known context window size (input + output), or undefined rather than guessing for an unknown model.\n */\nexport function getContextWindowSize(model) {\n model = model.toLowerCase();\n // Claude models\n if (model.includes('claude')) {\n if (isClaudeVersionGTE(model, 4, 7))\n return 1_000_000;\n return 200_000;\n }\n // Gemini models\n if (model.includes('gemini')) {\n if (model.includes('-1.0-'))\n return 32_000;\n return 1_000_000; // Gemini 1.5, 2.0, 2.5, 3 all support 1M\n }\n // OpenAI o-series (check before gpt-4 to avoid false matches)\n if (/(?:^|[~/.])o\\d+(?:[-_.]|$)/.test(model.toLowerCase()))\n return 200_000;\n // GPT models — provider-specific limits are applied by the provider overlay.\n if (model.includes('gpt-5-chat-latest'))\n return 128_000;\n if (model.includes('gpt-5.4-mini') || model.includes('gpt-5.4-nano'))\n return 400_000;\n if (isOpenAIGptVersionGTE(model, 5, 4))\n return 1_050_000;\n if (isOpenAIGptVersionGTE(model, 5, 0))\n return 400_000;\n if (model.includes('gpt-oss'))\n return 131_072;\n if (model.includes('gpt-4.1') || model.includes('gpt-4-1'))\n return 1_000_000;\n if (model.includes('gpt-4-turbo') || model.includes('gpt-4o'))\n return 128_000;\n if (model.includes('gpt-4'))\n return 8_000;\n if (model.includes('gpt-3.5'))\n return 16_000;\n // Grok\n if (isModelFamilyVersionGTE(model, 'grok-', 4, 3))\n return 1_000_000;\n if (model.includes('grok-4.1') || model.includes('grok-4-1'))\n return 256_000;\n if (model.includes('grok'))\n return 131_072;\n // Amazon Nova\n if (model.includes('nova'))\n return 300_000;\n // Mistral\n if (/(?:mistral|mixtral|ministral|magistral|voxtral|codestral|devstral|leanstral|mathstral|pixtral)/.test(model)) {\n return getMistralModelKnowledge(model).context_window;\n }\n // DeepSeek\n if (isDeepSeekV32OrLater(model))\n return 163_840;\n if (model.includes('deepseek-r1-0528'))\n return 163_840;\n if (model.includes('deepseek'))\n return 128_000;\n // Qwen\n if (model.includes('qwen3-next'))\n return 262_144;\n if (model.includes('qwen3-coder'))\n return 262_144;\n if (model.includes('qwen'))\n return 262_144;\n // Kimi\n if (model.includes('kimi-k2-thinking'))\n return 262_144;\n // MiniMax\n if (model.includes('minimax-m2'))\n return 196_608;\n // ZAI GLM\n if (model.includes('glm-'))\n return 128_000;\n // Gemma\n if (model.includes('gemma-4'))\n return 256_000;\n // Llama\n if (isModelFamilyVersionGTE(model, 'llama-', 4, 0) || isModelFamilyVersionGTE(model, 'llama', 4, 0)) {\n return model.includes('scout') ? 10_000_000 : 1_000_000;\n }\n if (model.includes('llama-3.1') || model.includes('llama-3.2') || model.includes('llama-3.3'))\n return 128_000;\n if (model.includes('llama'))\n return 8_000;\n // Cohere\n if (model.includes('command-a'))\n return 256_000;\n if (model.includes('command'))\n return 128_000;\n return undefined;\n}\n//# sourceMappingURL=context-windows.js.map","// ============== Provider details ===============\nexport var Providers;\n(function (Providers) {\n Providers[\"openai\"] = \"openai\";\n Providers[\"openai_compatible\"] = \"openai_compatible\";\n Providers[\"azure_openai\"] = \"azure_openai\";\n Providers[\"azure_foundry\"] = \"azure_foundry\";\n Providers[\"huggingface_ie\"] = \"huggingface_ie\";\n Providers[\"replicate\"] = \"replicate\";\n Providers[\"bedrock\"] = \"bedrock\";\n Providers[\"bedrock_mantle\"] = \"bedrock_mantle\";\n Providers[\"vertexai\"] = \"vertexai\";\n Providers[\"togetherai\"] = \"togetherai\";\n Providers[\"mistralai\"] = \"mistralai\";\n Providers[\"groq\"] = \"groq\";\n Providers[\"watsonx\"] = \"watsonx\";\n Providers[\"xai\"] = \"xai\";\n Providers[\"anthropic\"] = \"anthropic\";\n})(Providers || (Providers = {}));\nexport const ProviderList = {\n openai: {\n id: Providers.openai,\n name: 'OpenAI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n azure_openai: {\n id: Providers.azure_openai,\n name: 'Azure OpenAI',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n azure_foundry: {\n id: Providers.azure_foundry,\n name: 'Microsoft Foundry',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n huggingface_ie: {\n id: Providers.huggingface_ie,\n name: 'HuggingFace Inference Endpoint',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n },\n replicate: {\n id: Providers.replicate,\n name: 'Replicate',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: true,\n },\n bedrock: {\n id: Providers.bedrock,\n name: 'Amazon Bedrock',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n endpointPlaceholder: 'region name (eg. us-east-1)',\n supportSearch: false,\n },\n bedrock_mantle: {\n id: Providers.bedrock_mantle,\n name: 'Amazon Bedrock Mantle',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'region name (eg. us-west-2)',\n supportSearch: false,\n },\n vertexai: {\n id: Providers.vertexai,\n name: 'Google Agent Platform (Vertex AI)',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n togetherai: {\n id: Providers.togetherai,\n name: 'Together AI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n mistralai: {\n id: Providers.mistralai,\n name: 'Mistral AI',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n groq: {\n id: Providers.groq,\n name: 'Groq Cloud',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n watsonx: {\n id: Providers.watsonx,\n name: 'IBM WatsonX',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n xai: {\n id: Providers.xai,\n name: 'xAI (Grok)',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n openai_compatible: {\n id: Providers.openai_compatible,\n name: 'OpenAI Compatible',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'https://api.example.com/v1',\n supportSearch: false,\n },\n anthropic: {\n id: Providers.anthropic,\n name: 'Anthropic',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\n/**\n * Standardized error class for Llumiverse driver errors.\n *\n * Normalizes errors from different LLM providers (OpenAI, Anthropic, Bedrock, VertexAI, etc.)\n * into a consistent format. The primary value is the `retryable` flag, which enables upstream\n * consumers to implement smart retry logic.\n *\n * @example\n * ```typescript\n * try {\n * const result = await driver.execute(segments, options);\n * } catch (error) {\n * if (LlumiverseError.isLlumiverseError(error)) {\n * console.log(`Provider: ${error.context.provider}`);\n * console.log(`Model: ${error.context.model}`);\n * console.log(`Retryable: ${error.retryable}`);\n *\n * if (error.retryable) {\n * // Implement retry logic with exponential backoff\n * await retryWithBackoff(() => driver.execute(segments, options));\n * } else {\n * // Handle non-retryable error (e.g., invalid API key, malformed request)\n * logError(error);\n * }\n * }\n * throw error;\n * }\n * ```\n */\nexport class LlumiverseError extends Error {\n /**\n * HTTP status code (e.g., 429, 500) if available.\n * Undefined if the error doesn't have a numeric status code.\n */\n code;\n /**\n * Provider-specific error name/type (e.g., \"ThrottlingException\", \"ValidationException\").\n * Optional - used to preserve the semantic error type from the provider SDK.\n */\n name;\n /**\n * Whether this error is retryable.\n * - True: Definitely retryable (rate limits, timeouts, server errors)\n * - False: Definitely not retryable (auth failures, invalid requests, malformed schemas)\n * - Undefined: Unknown retryability - allows consumers to decide default behavior\n *\n * When undefined, consumers can choose their retry strategy:\n * - Conservative: Don't retry unknown errors (avoid spam)\n * - Resilient: Retry unknown errors (prioritize success)\n */\n retryable;\n /**\n * Context about where and how the error occurred.\n * Includes provider, model, operation type.\n */\n context;\n /**\n * The original error from the provider SDK.\n * Preserved for debugging and detailed error inspection.\n */\n originalError;\n constructor(message, retryable, context, originalError, code, name) {\n super(message);\n this.name = name || 'LlumiverseError';\n this.code = code;\n this.retryable = retryable;\n this.context = context;\n this.originalError = originalError;\n // Preserve stack trace from original error if available\n if (originalError instanceof Error && originalError.stack) {\n this.stack = originalError.stack;\n }\n }\n /**\n * Serialize the error to JSON for logging or transmission.\n * Includes all error properties except the original error object itself.\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n retryable: this.retryable,\n context: this.context,\n stack: this.stack,\n // Include original error message if available\n originalErrorMessage: this.originalError instanceof Error ? this.originalError.message : String(this.originalError),\n };\n }\n /**\n * Type guard to check if an error is a LlumiverseError.\n * Useful for conditional error handling.\n *\n * @param error - The error to check\n * @returns True if the error is a LlumiverseError\n */\n static isLlumiverseError(error) {\n return error instanceof LlumiverseError;\n }\n}\n/** Namespace used by agent conversations that require stable Claude cache layout. */\nexport const AGENT_PROMPT_CACHE_KEY_PREFIX = 'agent-';\n/** Stable prefixes shared by prompt generators and cached-conversation deduplication. */\nexport const JSON_SCHEMA_INSTRUCTION_PREFIX = 'The answer must be a JSON object using the following JSON Schema:';\nexport const TOOL_AWARE_JSON_SCHEMA_INSTRUCTION_PREFIX = 'When not calling tools, the answer must be a JSON object using the following JSON Schema:';\n//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n SharedOptions[\"effort\"] = \"effort\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n OptionType[\"json_object\"] = \"json_object\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\n/**\n * @deprecated This is deprecated. Use CompletionResult.type information instead.\n */\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { getModelCapabilitiesAnthropic } from './capability/anthropic.js';\nimport { getModelCapabilitiesAzureFoundry } from './capability/azure_foundry.js';\nimport { getBedrockModelCapabilities, getBedrockModelKnowledge } from './capability/bedrock-models.js';\nimport { getMistralModelKnowledge } from './capability/mistral.js';\nimport { getModelCapabilitiesOpenAI } from './capability/openai.js';\nimport { getModelCapabilitiesVertexAI } from './capability/vertexai.js';\nimport { getContextWindowSize, getMaxOutputTokens } from './options/context-windows.js';\nimport { getOpenAIReasoningEffortLevels, isGeminiModelVersionGte, isModelFamilyVersionGTE, } from './options/version-parsing.js';\nimport { Providers } from './types.js';\nconst EXACT_MODEL_OVERRIDES = {\n 'chat-latest': {\n family: 'gpt',\n source_provider: 'openai',\n context_window: 400_000,\n max_output_tokens: 128_000,\n },\n // OpenAI image endpoints are not text inference models even though their IDs contain `gpt`.\n 'gpt-image-1': {\n family: 'image',\n capabilities: {\n input: { text: true, image: true, audio: false, video: false },\n output: { text: false, image: true, audio: false, video: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n },\n 'gpt-realtime-translate': {\n family: 'realtime',\n context_window: 16_000,\n max_output_tokens: 2_000,\n capabilities: {\n input: { text: false, image: false, audio: true, video: false },\n output: { text: true, image: false, audio: true, video: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n },\n 'gpt-5-chat-latest': {\n family: 'gpt',\n source_provider: 'openai',\n context_window: 128_000,\n max_output_tokens: 16_384,\n },\n};\nconst GENERIC_CAPABILITIES = {\n input: { text: true },\n output: { text: true },\n};\nfunction normalizeSourceModelId(model) {\n const normalized = model.trim().toLowerCase().replace(/^~/, '');\n // Azure Foundry uses deployment::source-model. Resolve family semantics from the source half, not the\n // customer-chosen deployment name, before applying transport behavior.\n const sourceQualified = normalized.includes('::') ? (normalized.split('::').pop() ?? normalized) : normalized;\n const slash = sourceQualified.lastIndexOf('/');\n const leaf = slash === -1 ? sourceQualified : sourceQualified.slice(slash + 1);\n return leaf.replace(/^(?:global|us|eu|apac)\\./, '').replace(/^(?:openai|anthropic|google|xai)\\./, '');\n}\nfunction getModelAliases(model) {\n const normalized = model.trim().toLowerCase();\n const aliases = [normalized, normalizeSourceModelId(normalized)];\n return [...new Set(aliases)];\n}\nfunction inferFamily(model) {\n const normalized = normalizeSourceModelId(model);\n if (/(^|[-_.:])(?:embed|embedding|vector)(?:[-_.:]|$)/.test(normalized)) {\n return { family: 'embedding' };\n }\n if (/(?:prompt-guard|moderation|safeguard)/.test(normalized))\n return { family: 'moderation' };\n if (normalized.includes('grok') && normalized.includes('image')) {\n return { family: 'image', source_provider: 'xai' };\n }\n if (normalized.includes('gpt-image') || normalized.includes('dall-e') || normalized.includes('imagen-')) {\n return { family: 'image', source_provider: normalized.includes('imagen') ? 'google' : 'openai' };\n }\n if (/(?:whisper|transcribe)/.test(normalized))\n return { family: 'transcription', source_provider: 'openai' };\n if (/(?:^|[-_.])tts(?:[-_.]|$)/.test(normalized))\n return { family: 'speech', source_provider: 'openai' };\n if (normalized.includes('realtime'))\n return { family: 'realtime', source_provider: 'openai' };\n if (/(?:^|[-_.])audio(?:[-_.]|$)/.test(normalized))\n return { family: 'audio', source_provider: 'openai' };\n if (normalized.includes('sora'))\n return { family: 'video', source_provider: 'openai' };\n if (normalized.includes('gemini'))\n return { family: 'gemini', source_provider: 'google' };\n if (normalized.includes('claude'))\n return { family: 'claude', source_provider: 'anthropic' };\n if (normalized.includes('gpt') || /^o\\d+(?:[-_.]|$)/.test(normalized)) {\n return { family: 'gpt', source_provider: 'openai' };\n }\n if (normalized.includes('grok'))\n return { family: 'grok', source_provider: 'xai' };\n if (normalized.includes('nemotron'))\n return { family: 'nemotron', source_provider: 'nvidia' };\n if (/(?:mistral|mixtral|ministral|magistral|voxtral|codestral|devstral|leanstral|mathstral|pixtral)/.test(normalized)) {\n return { family: 'mistral', source_provider: 'mistralai' };\n }\n for (const family of ['llama', 'qwen', 'deepseek', 'gemma', 'mistral', 'kimi', 'minimax', 'glm']) {\n if (normalized.includes(family))\n return { family };\n }\n return { family: 'generic' };\n}\nfunction getCanonicalCapabilities(model, family) {\n switch (family) {\n case 'gemini':\n return getModelCapabilitiesVertexAI(model);\n case 'claude':\n return getModelCapabilitiesAnthropic(model);\n case 'gpt': {\n const capabilities = getModelCapabilitiesOpenAI(model);\n return {\n ...capabilities,\n input: {\n ...capabilities.input,\n text: capabilities.input.text ?? true,\n image: capabilities.input.image ?? true,\n },\n output: {\n ...capabilities.output,\n text: capabilities.output.text ?? true,\n },\n tool_support: capabilities.tool_support ?? true,\n tool_support_streaming: capabilities.tool_support_streaming ?? capabilities.tool_support ?? true,\n };\n }\n case 'embedding':\n return {\n input: { text: true },\n output: { embed: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'moderation':\n return {\n input: { text: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'transcription':\n return {\n input: { audio: true },\n output: { text: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'speech':\n return {\n input: { text: true },\n output: { audio: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'realtime':\n return {\n input: { text: true, image: true, audio: true },\n output: { text: true, audio: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'audio':\n return {\n input: { text: true, audio: true },\n output: { text: true, audio: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'video':\n return {\n input: { text: true, image: true, video: true },\n output: { video: true, audio: true },\n tool_support: false,\n tool_support_streaming: false,\n };\n case 'image':\n return { input: { text: true, image: true }, output: { image: true }, tool_support: false };\n case 'grok':\n return {\n input: {\n text: true,\n image: model.includes('vision') || isModelFamilyVersionGTE(model, 'grok-', 4, 3),\n },\n output: { text: true },\n tool_support: true,\n };\n case 'llama':\n return {\n // Future Llama generations inherit the newest known family behavior until a provider documents\n // a narrower exception.\n input: { text: true, image: model.includes('vision') || isLlamaVersionGte(model, 4) },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'gemma': {\n const normalized = model.toLowerCase();\n const image = (normalized.includes('gemma-3') &&\n !normalized.includes('gemma-3-1b') &&\n !normalized.includes('gemma-3-270m')) ||\n normalized.includes('gemma-4');\n return {\n input: { text: true, image },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n }\n case 'qwen': {\n const normalized = model.toLowerCase();\n const qwenVision = normalized.includes('qwen3.5') ||\n ['qwen2.5', 'qwen3'].some((familyPrefix) => {\n const familyIndex = normalized.indexOf(familyPrefix);\n if (familyIndex === -1)\n return false;\n const suffix = normalized.slice(familyIndex + familyPrefix.length);\n return suffix.includes('-vl') || suffix.includes('.vl');\n });\n return {\n input: { text: true, image: qwenVision },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n }\n case 'deepseek':\n case 'kimi':\n case 'minimax':\n case 'glm':\n return { input: { text: true }, output: { text: true }, tool_support: true, tool_support_streaming: true };\n case 'nemotron':\n return {\n input: { text: true, image: model.includes('nemotron-nano-12b') },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: true,\n };\n case 'mistral':\n return getMistralModelKnowledge(model).capabilities;\n default:\n return { ...GENERIC_CAPABILITIES, input: { ...GENERIC_CAPABILITIES.input } };\n }\n}\nfunction isLlamaVersionGte(model, targetMajor) {\n return (isModelFamilyVersionGTE(model, 'llama-', targetMajor, 0) ||\n isModelFamilyVersionGTE(model, 'llama', targetMajor, 0));\n}\nfunction mergeCapabilities(base, override) {\n if (!override)\n return base;\n return {\n ...base,\n ...override,\n input: { ...base.input, ...override.input },\n output: { ...base.output, ...override.output },\n };\n}\nfunction getCanonicalLimits(sourceModel, family) {\n // Profiles only expose limits backed by known family data so option UIs do not present guesses as authoritative.\n if (family === 'audio')\n return { context_window: 128_000, max_output_tokens: 16_384 };\n if (family === 'realtime' && isModelFamilyVersionGTE(sourceModel, 'gpt-realtime-', 2, 0)) {\n // Future Realtime generations inherit the latest documented family limits until a narrower rule is known.\n return { context_window: 128_000, max_output_tokens: 32_000 };\n }\n if (family === 'gemini' && sourceModel.includes('gemini-3.1-flash-image')) {\n return { context_window: 131_072, max_output_tokens: 32_768 };\n }\n if (family === 'nemotron') {\n if (sourceModel.includes('nemotron-super-'))\n return { context_window: 256_000, max_output_tokens: 32_768 };\n const generation = sourceModel.match(/nemotron-nano-(\\d+)-/)?.[1];\n return {\n context_window: generation && Number(generation) >= 3 ? 256_000 : 128_000,\n max_output_tokens: 8_192,\n };\n }\n if (['generic', 'embedding', 'moderation', 'image', 'transcription', 'speech', 'realtime', 'video'].includes(family)) {\n return {};\n }\n if (family === 'mistral') {\n return { context_window: getMistralModelKnowledge(sourceModel).context_window };\n }\n return {\n context_window: getContextWindowSize(sourceModel),\n max_output_tokens: getMaxOutputTokens(sourceModel),\n };\n}\nfunction applyProviderOverlay(model, sourceModel, family, provider, capabilities) {\n if (provider === Providers.bedrock) {\n const bedrock = getBedrockModelCapabilities(model, 'runtime');\n const knowledge = getBedrockModelKnowledge(model);\n return { capabilities: bedrock, ...knowledge };\n }\n if (provider === Providers.bedrock_mantle) {\n const bedrock = getBedrockModelCapabilities(model, 'mantle');\n const knowledge = getBedrockModelKnowledge(model);\n return { capabilities: bedrock, ...knowledge };\n }\n // OpenRouter and other OpenAI-compatible transports retain the source model's semantic\n // capabilities, but cannot expose provider-native fields such as Vertex Flex or thinking_level.\n if (provider === Providers.openai_compatible) {\n return {\n capabilities: {\n ...capabilities,\n tool_support_streaming: capabilities.tool_support_streaming ?? capabilities.tool_support,\n },\n ...getCanonicalLimits(sourceModel, family),\n };\n }\n if (provider === Providers.azure_foundry) {\n // Deployment metadata describes the transport. Dedicated source endpoints keep their source modalities so a\n // deployment named like a GPT model cannot become text inference accidentally.\n const providerCapabilities = getModelCapabilitiesAzureFoundry(model);\n return {\n capabilities: [\n 'embedding',\n 'moderation',\n 'image',\n 'transcription',\n 'speech',\n 'realtime',\n 'audio',\n 'video',\n ].includes(family)\n ? capabilities\n : providerCapabilities,\n ...getCanonicalLimits(sourceModel, family),\n };\n }\n return {\n capabilities,\n ...getCanonicalLimits(sourceModel, family),\n };\n}\nfunction getReasoningEffortLevels(model, family, provider) {\n if (family === 'gpt') {\n if (model.includes('gpt-oss')) {\n return provider === Providers.togetherai ||\n provider === Providers.openai_compatible ||\n provider === Providers.vertexai ||\n provider === Providers.bedrock ||\n provider === Providers.bedrock_mantle ||\n provider === Providers.azure_foundry\n ? ['low', 'medium', 'high']\n : undefined;\n }\n if (provider === Providers.openai ||\n provider === Providers.azure_openai ||\n provider === Providers.openai_compatible ||\n provider === Providers.azure_foundry ||\n provider === Providers.bedrock_mantle) {\n if (/^o\\d+(?:[-_.]|$)/.test(model))\n return ['low', 'medium', 'high'];\n return Object.values(getOpenAIReasoningEffortLevels(model) ?? {});\n }\n return undefined;\n }\n if (family === 'gemini' && provider === Providers.openai_compatible && isGeminiModelVersionGte(model, '3.5')) {\n return ['minimal', 'low', 'medium', 'high'];\n }\n if (provider === Providers.mistralai && family === 'mistral') {\n return getMistralModelKnowledge(model).reasoning_effort_levels;\n }\n if (provider === Providers.xai && family === 'grok') {\n const grok420Index = model.indexOf('grok-4.20');\n if (grok420Index !== -1 && model.indexOf('multi-agent', grok420Index + 'grok-4.20'.length) !== -1) {\n return ['low', 'medium', 'high', 'xhigh'];\n }\n if (isSingleDigitGrokVersionGte(model, 4, 5))\n return ['low', 'medium', 'high'];\n if (isSingleDigitGrokVersionGte(model, 4, 3))\n return ['none', 'low', 'medium', 'high'];\n }\n return undefined;\n}\nfunction isSingleDigitGrokVersionGte(model, targetMajor, targetMinor) {\n const match = model.match(/grok-(\\d+)(?:\\.(\\d))?(?:[-_.]|$)/);\n if (!match)\n return false;\n const major = Number(match[1]);\n const minor = Number(match[2] ?? 0);\n return major > targetMajor || (major === targetMajor && minor >= targetMinor);\n}\nexport function resolveModelProfile(model, provider) {\n const canonical_id = normalizeSourceModelId(model);\n const exactOverride = EXACT_MODEL_OVERRIDES[canonical_id];\n // Family identity follows the normalized source model. Transport paths and customer deployment names must not\n // accidentally select a different family rule.\n const inferred = inferFamily(canonical_id);\n const family = exactOverride?.family ?? inferred.family;\n const source_provider = exactOverride?.source_provider ?? inferred.source_provider;\n const canonicalCapabilities = getCanonicalCapabilities(canonical_id, family);\n const vertexCapabilities = provider === Providers.vertexai ? getModelCapabilitiesVertexAI(model) : undefined;\n const hasVertexCapabilities = vertexCapabilities &&\n (Object.values(vertexCapabilities.input).some((value) => value === true) ||\n Object.values(vertexCapabilities.output).some((value) => value === true) ||\n vertexCapabilities.tool_support !== undefined);\n const baseCapabilities = hasVertexCapabilities ? vertexCapabilities : canonicalCapabilities;\n const overlay = applyProviderOverlay(model, canonical_id, family, provider, baseCapabilities);\n const reasoningEffortLevels = getReasoningEffortLevels(canonical_id, family, provider);\n return {\n model_id: model,\n canonical_id,\n family,\n source_provider,\n // Exact source-model semantics win after transport overlays. Provider inference must not turn a dedicated\n // image or other non-chat endpoint into a text model merely because its ID resembles a known family.\n capabilities: mergeCapabilities(overlay.capabilities, exactOverride?.capabilities),\n context_window: exactOverride?.context_window ?? overlay.context_window,\n max_output_tokens: exactOverride?.max_output_tokens ?? overlay.max_output_tokens,\n ...(reasoningEffortLevels?.length && { reasoning_effort_levels: reasoningEffortLevels }),\n };\n}\nexport function isModelDirectoryEmbedding(model) {\n const aliases = getModelAliases(model);\n return aliases.some((alias) => /(^|[-_.:])(?:embed|embedding|vector)(?:[-_.:]|$)/.test(alias));\n}\n//# sourceMappingURL=model-directory.js.map","import { isModelDirectoryEmbedding, resolveModelProfile } from './model-directory.js';\nexport function getModelCapabilities(model, provider) {\n //Check for locations/<location>/ prefix and remove it\n if (model.startsWith('locations/')) {\n const parts = model.split('/');\n if (parts.length >= 3) {\n model = parts.slice(2).join('/');\n }\n }\n const modelName = model.split('/').pop()?.toLowerCase();\n if (provider === 'vertexai' && modelName === 'gemini-omni-flash-preview') {\n return {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n const capabilities = resolveModelProfile(model, provider).capabilities;\n // The platform accepts audio/video inputs but cannot return those modalities yet. Keep source output metadata in\n // the directory so enabling output support later only requires removing this execution-path mask.\n return {\n ...capabilities,\n input: { ...capabilities.input },\n output: { ...capabilities.output, audio: false, video: false },\n };\n}\nexport function supportsToolUse(model, provider, streaming = false) {\n const capabilities = getModelCapabilities(model, provider);\n if (!streaming) {\n return !!capabilities.tool_support;\n }\n // Unset tool_support_streaming means \"same as tool_support\" (OpenAI-compatible default).\n // Only an explicit false opts out of tools-while-streaming.\n return !!(capabilities.tool_support_streaming ?? capabilities.tool_support);\n}\nexport function modelModalitiesToArray(modalities) {\n return Object.entries(modalities)\n .filter(([_, isSupported]) => isSupported)\n .map(([modality]) => modality);\n}\n/** Dedicated endpoint models are not executable through the standard inference path. */\nexport function isDedicatedInferenceModel(model, provider) {\n return ['embedding', 'moderation', 'image', 'transcription', 'speech', 'realtime', 'audio', 'video'].includes(resolveModelProfile(model, provider).family);\n}\n/** Embedding endpoints are not executable through the standard inference path. */\nexport function isEmbeddingModel(model, provider) {\n if (model.type?.toLowerCase() === 'embedding')\n return true;\n if (isModelDirectoryEmbedding(model.id))\n return true;\n const modalities = [...(model.input_modalities ?? []), ...(model.output_modalities ?? [])].map((modality) => modality.toLowerCase());\n if (modalities.some((modality) => modality === 'embed' || modality === 'embedding' || modality === 'vectors')) {\n return true;\n }\n return getModelCapabilities(model.id, provider).output.embed === true;\n}\n//# sourceMappingURL=capability.js.map","import { OptionType, SharedOptions } from '../types.js';\nexport const textOptionsFallback = {\n _option_id: 'text-fallback',\n options: [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n {\n name: SharedOptions.temperature,\n type: OptionType.numeric,\n min: 0.0,\n default: 0.7,\n integer: false,\n step: 0.1,\n description: 'A higher temperature biases toward less likely tokens, making the model more creative',\n },\n {\n name: SharedOptions.top_p,\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: false,\n step: 0.1,\n description: 'Limits token sampling to the cumulative probability of the top p tokens',\n },\n {\n name: SharedOptions.top_k,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 1,\n description: 'Limits token sampling to the top k tokens',\n },\n {\n name: SharedOptions.presence_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens if they appear at least once in the text',\n },\n {\n name: SharedOptions.frequency_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens based on their frequency in the text',\n },\n {\n name: SharedOptions.stop_sequence,\n type: OptionType.string_list,\n value: [],\n description: 'The generation will halt if one of the stop sequences is output',\n },\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: 'Include visible model reasoning as separate thoughts results.',\n },\n ],\n};\n//# sourceMappingURL=fallback.js.map","import { resolveModelProfile } from '../model-directory.js';\nimport { OptionType, Providers, SharedOptions, } from '../types.js';\nimport { getMaxOutputTokens } from './context-windows.js';\nimport { textOptionsFallback } from './fallback.js';\nimport { getOpenAiCompatibleOptions } from './openai.js';\nimport { buildClaudeCacheOptions, buildClaudeCacheTtlOptions, buildClaudeEffortOptions, buildClaudeIncludeThoughtsOption, buildClaudeThinkingBudgetOption, getClaudeMaxTokensLimit, } from './shared-parsing.js';\nimport { hasSamplingParameterRestriction, isGeminiModelVersionGte } from './version-parsing.js';\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport var ThinkingLevel;\n(function (ThinkingLevel) {\n ThinkingLevel[\"HIGH\"] = \"HIGH\";\n ThinkingLevel[\"MEDIUM\"] = \"MEDIUM\";\n ThinkingLevel[\"LOW\"] = \"LOW\";\n ThinkingLevel[\"MINIMAL\"] = \"MINIMAL\";\n ThinkingLevel[\"THINKING_LEVEL_UNSPECIFIED\"] = \"THINKING_LEVEL_UNSPECIFIED\";\n})(ThinkingLevel || (ThinkingLevel = {}));\n/** Models that support Flex processing (shared, cost-efficient tier). */\nconst FLEX_SUPPORTED_GEMINI_MODELS = [\n 'gemini-3.1-flash-lite-preview',\n 'gemini-3.1-flash-image-preview',\n 'gemini-3.1-pro-preview',\n 'gemini-3-flash-preview',\n 'gemini-3-pro-image-preview',\n 'gemini-3.5-flash',\n 'gemini-3.5-flash-lite',\n 'gemini-3.6-flash',\n];\nexport function isFlexSupportedGeminiModel(model) {\n const modelName = model.split('/').pop() ?? model;\n return (FLEX_SUPPORTED_GEMINI_MODELS.some((m) => modelName.includes(m)) ||\n (modelName.includes('flash') && !modelName.includes('image') && isGeminiModelVersionGte(modelName, '3.5')));\n}\nexport function getVertexAiOptions(model, option) {\n if (model.split('/').pop() === 'gemini-omni-flash-preview') {\n return {\n _option_id: 'vertexai-gemini-omni-video',\n options: [\n {\n name: 'task',\n type: OptionType.enum,\n enum: {\n 'Text to video': 'text_to_video',\n 'Image to video': 'image_to_video',\n 'Reference images to video': 'reference_to_video',\n },\n description: 'Video generation task. Image inputs require an explicit image task.',\n },\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { Landscape: '16:9', Portrait: '9:16' },\n description: 'Aspect ratio of the generated video.',\n },\n {\n name: 'duration_seconds',\n type: OptionType.numeric,\n min: 3,\n max: 10,\n default: 5,\n integer: true,\n description: 'Duration of the generated video in seconds.',\n },\n ],\n };\n }\n if (model.includes('imagen-')) {\n return getImagenOptions(model, option);\n }\n else if (model.includes('gemini')) {\n return getGeminiOptions(model, option);\n }\n else if (model.includes('claude')) {\n return getClaudeOptions(model, option);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getOpenMaaSChatOptions(model);\n }\n return textOptionsFallback;\n}\nfunction getImagenOptions(model, option) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images,\n type: OptionType.numeric,\n min: 1,\n max: 4,\n default: 1,\n integer: true,\n description: 'Number of Images to generate',\n },\n {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n min: 0,\n max: 4294967295,\n default: 12,\n integer: true,\n description: 'The seed of the generated image',\n },\n {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Disallow the inclusion of people or faces in images': 'dont_allow',\n 'Allow generation of adults only': 'allow_adult',\n 'Allow generation of people of all ages': 'allow_all',\n },\n default: 'allow_adult',\n description: 'The safety setting for allowing the generation of people in the image',\n },\n {\n name: 'safety_setting',\n type: OptionType.enum,\n enum: {\n 'Block very few problematic prompts and responses': 'block_none',\n 'Block only few problematic prompts and responses': 'block_only_high',\n 'Block some problematic prompts and responses': 'block_medium_and_above',\n 'Strictest filtering': 'block_low_and_above',\n },\n default: 'block_medium_and_above',\n description: 'The overall safety setting',\n },\n ];\n const outputOptions = [\n {\n name: 'image_file_type',\n type: OptionType.enum,\n enum: { JPEG: 'image/jpeg', PNG: 'image/png' },\n default: 'image/png',\n description: 'The file type of the generated image',\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: 'jpeg_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 75,\n integer: true,\n description: 'The compression quality of the JPEG image',\n };\n if (option?.image_file_type === 'image/jpeg') {\n outputOptions.push(jpegQuality);\n }\n if (model.includes('generate')) {\n // Generate models\n const modeOptions = [\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { '1:1': '1:1', '4:3': '4:3', '3:4': '3:4', '16:9': '16:9', '9:16': '9:16' },\n default: '1:1',\n description: 'The aspect ratio of the generated image',\n },\n {\n name: 'add_watermark',\n type: OptionType.boolean,\n default: false,\n description: 'Add an invisible watermark to the generated image, useful for detection of AI images',\n },\n ];\n const enhanceOptions = !model.includes('generate-001')\n ? [\n {\n name: 'enhance_prompt',\n type: OptionType.boolean,\n default: true,\n description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\",\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [...commonOptions, ...modeOptions, ...outputOptions, ...enhanceOptions],\n };\n }\n if (model.includes('capability')) {\n // Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: 'edit_mode',\n type: OptionType.enum,\n enum: {\n EDIT_MODE_INPAINT_REMOVAL: 'EDIT_MODE_INPAINT_REMOVAL',\n EDIT_MODE_INPAINT_INSERTION: 'EDIT_MODE_INPAINT_INSERTION',\n EDIT_MODE_BGSWAP: 'EDIT_MODE_BGSWAP',\n EDIT_MODE_OUTPAINT: 'EDIT_MODE_OUTPAINT',\n CUSTOMIZATION_SUBJECT: 'CUSTOMIZATION_SUBJECT',\n CUSTOMIZATION_STYLE: 'CUSTOMIZATION_STYLE',\n CUSTOMIZATION_CONTROLLED: 'CUSTOMIZATION_CONTROLLED',\n CUSTOMIZATION_INSTRUCT: 'CUSTOMIZATION_INSTRUCT',\n },\n description: 'The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.',\n },\n {\n name: 'guidance_scale',\n type: OptionType.numeric,\n min: 0,\n max: 500,\n default: guidanceScaleDefault,\n integer: true,\n description: 'How closely the generation follows the prompt',\n },\n ];\n const maskOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'mask_mode',\n type: OptionType.enum,\n enum: {\n MASK_MODE_USER_PROVIDED: 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND: 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND: 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC: 'MASK_MODE_SEMANTIC',\n },\n default: 'MASK_MODE_USER_PROVIDED',\n description: 'How should the mask for the generation be provided',\n },\n {\n name: 'mask_dilation',\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: true,\n description: 'The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.',\n },\n ]\n : [];\n const maskClassOptions = option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC\n ? [\n {\n name: 'mask_class',\n type: OptionType.string_list,\n default: [],\n description: 'Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids',\n },\n ]\n : [];\n const editOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'edit_steps',\n type: OptionType.numeric,\n default: 75,\n integer: true,\n description: 'The number of steps for the base image generation, more steps means more time and better quality',\n },\n ]\n : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED ||\n option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT\n ? [\n {\n name: 'controlType',\n type: OptionType.enum,\n enum: {\n 'Face Mesh': 'CONTROL_TYPE_FACE_MESH',\n Canny: 'CONTROL_TYPE_CANNY',\n Scribble: 'CONTROL_TYPE_SCRIBBLE',\n },\n default: 'CONTROL_TYPE_CANNY',\n description: 'Method used to generate the control image',\n },\n {\n name: 'controlImageComputation',\n type: OptionType.boolean,\n default: true,\n description: 'Should the control image be computed from the input image, or is it provided',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ],\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiEffortOptions(model) {\n if (model.includes('gemini-3-pro-image')) {\n return { High: 'high' };\n }\n if (model.includes('gemini-3.1-flash-image')) {\n return { Minimal: 'minimal', High: 'high' };\n }\n if (model.includes('pro') && isGeminiModelVersionGte(model, '3.1')) {\n return { Low: 'low', Medium: 'medium', High: 'high' };\n }\n return { Minimal: 'minimal', Low: 'low', Medium: 'medium', High: 'high' };\n}\nfunction getGeminiThinkingOptionItems(model) {\n return [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: SharedOptions.effort,\n type: OptionType.enum,\n enum: getGeminiEffortOptions(model),\n description: 'Higher thinking levels may improve quality, but increase response times and token costs',\n },\n ];\n}\nfunction getGeminiOptions(model, option) {\n // Special handling for gemini image / nano banana models\n if (model.includes('image')) {\n const isGemini25OrLater = isGeminiModelVersionGte(model, '2.5');\n const isGemini3OrLater = isGeminiModelVersionGte(model, '3.0');\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\n 'max_tokens',\n 'presence_penalty',\n 'frequency_penalty',\n 'seed',\n 'top_k',\n 'include_thoughts',\n ];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Set max temperature to 2.0\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature && option.type === OptionType.numeric) {\n return {\n ...option,\n max: 2.0,\n };\n }\n return option;\n });\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'Maximum output tokens',\n },\n ];\n const imageOptions = [];\n // Aspect ratio, person generation, prominent people: 2.5+\n if (isGemini25OrLater) {\n imageOptions.push({\n name: 'image_aspect_ratio',\n type: OptionType.enum,\n enum: {\n '1:1': '1:1',\n '2:3': '2:3',\n '3:2': '3:2',\n '3:4': '3:4',\n '4:3': '4:3',\n '9:16': '9:16',\n '16:9': '16:9',\n '21:9': '21:9',\n },\n default: '1:1',\n description: 'Aspect ratio of the generated images',\n }, {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Allow all people': 'ALLOW_ALL',\n 'Allow adults only': 'ALLOW_ADULT',\n 'Do not generate people': 'ALLOW_NONE',\n },\n default: 'ALLOW_ALL',\n description: 'Controls the generation of people in images',\n }, {\n name: 'prominent_people',\n type: OptionType.enum,\n enum: {\n 'Allow prominent people': 'ALLOW_PROMINENT_PEOPLE',\n 'Block prominent people': 'BLOCK_PROMINENT_PEOPLE',\n },\n description: 'Controls whether prominent people (celebrities) can be generated',\n });\n }\n // Resolution settings: 3.0+\n if (isGemini3OrLater) {\n imageOptions.push({\n name: 'image_size',\n type: OptionType.enum,\n enum: {\n '1K': '1K',\n '2K': '2K',\n '4K': '4K',\n },\n default: '1K',\n description: 'Size of generated images',\n });\n }\n // Output format: all image models\n imageOptions.push({\n name: 'output_mime_type',\n type: OptionType.enum,\n enum: {\n PNG: 'image/png',\n JPEG: 'image/jpeg',\n },\n default: 'image/png',\n description: 'MIME type of the generated image',\n refresh: true,\n });\n if (option?.output_mime_type === 'image/jpeg') {\n imageOptions.push({\n name: 'output_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 90,\n integer: true,\n description: 'Compression quality for JPEG images (0-100)',\n });\n }\n // Thinking options: 3.0+ (same as non-image counterparts)\n const thinkingOptions = isGemini3OrLater ? getGeminiThinkingOptionItems(model) : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, ...imageOptions, ...thinkingOptions],\n };\n }\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'include_thoughts'];\n const commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n const seedOption = {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n integer: true,\n description: 'The seed for the generation, useful for reproducibility',\n };\n if (isGeminiModelVersionGte(model, '3.0')) {\n const serviceTierOptions = isFlexSupportedGeminiModel(model)\n ? [\n {\n name: 'service_tier',\n type: OptionType.enum,\n enum: { Default: 'default', Flex: 'flex' },\n default: 'default',\n description: 'Select the Vertex AI processing tier for this request.',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ...getGeminiThinkingOptionItems(model),\n ...serviceTierOptions,\n ],\n };\n }\n if (model.includes('-2.5-')) {\n // Gemini 2.5 thinking models\n // Set budget token ranges based on model variant\n let budgetMin = -1;\n let budgetMax = 24576;\n let budgetDescription = '';\n if (model.includes('flash-lite')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash Lite default: Model does not think. ' +\n 'Range: 512-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('flash')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 0-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('pro')) {\n budgetMin = -1;\n budgetMax = 32768;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Pro default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 128-32768 tokens. ' +\n 'Cannot disable thinking - minimum 128 tokens. Set to -1 for dynamic thinking.';\n }\n const geminiThinkingOptions = [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: true,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: 'thinking_budget_tokens',\n type: OptionType.numeric,\n min: budgetMin,\n max: budgetMax,\n default: undefined,\n integer: true,\n step: 100,\n description: budgetDescription,\n },\n ];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption, ...geminiThinkingOptions],\n };\n }\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption],\n };\n}\nfunction getClaudeOptions(model, option) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'presence_penalty', 'frequency_penalty', 'include_thoughts'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Opus 4.7+ models no longer support temperature, top_p, top_k (returns 400 error)\n // Opus 4.6 and Sonnet 4.6 still support these parameters\n const hasSamplingRestriction = hasSamplingParameterRestriction(model);\n if (hasSamplingRestriction) {\n commonOptions = commonOptions.filter((option) => option.name !== SharedOptions.temperature &&\n option.name !== SharedOptions.top_p &&\n option.name !== 'top_k');\n }\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n return {\n _option_id: 'vertexai-claude',\n options: [\n ...max_tokens,\n ...commonOptions,\n ...buildClaudeEffortOptions(model),\n ...buildClaudeThinkingBudgetOption(model),\n ...buildClaudeIncludeThoughtsOption(model),\n ...buildClaudeCacheOptions(),\n ...buildClaudeCacheTtlOptions(option?.cache_enabled),\n ],\n };\n}\nfunction isOpenMaaSChatModel(model) {\n const normalized = model.toLowerCase();\n // Open MaaS chat option support is family-based on purpose: new model releases inherit the\n // current OpenAI-compatible option surface unless a specific older model needs an exception.\n return ['deepseek', 'gemma-', 'glm-', 'gpt-oss', 'grok', 'kimi', 'llama', 'minimax', 'qwen', 'zai-org'].some((modelPart) => normalized.includes(modelPart));\n}\nfunction getOpenMaaSChatOptions(model) {\n const compatible = getOpenAiCompatibleOptions(model, undefined, resolveModelProfile(model, Providers.vertexai));\n const commonOptions = compatible.options\n // Vertex Open MaaS does not offer these OpenAI-native penalty fields consistently across source families.\n .filter((option) => option.name !== SharedOptions.presence_penalty && option.name !== SharedOptions.frequency_penalty)\n .map((commonOption) => {\n if (model.includes('llama') &&\n commonOption.name === SharedOptions.temperature &&\n commonOption.type === OptionType.numeric) {\n return {\n ...commonOption,\n max: 1.0,\n };\n }\n return commonOption;\n });\n return {\n ...compatible,\n options: commonOptions,\n };\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes('image')) {\n return isGeminiModelVersionGte(model, '2.5') ? 32768 : 8192;\n }\n if (model.includes('thinking') || isGeminiModelVersionGte(model, '2.5')) {\n return 65535; // API upper bound is exclusive\n }\n if (model.includes('ultra') || model.includes('vision')) {\n return 2048;\n }\n return 8192;\n}\nexport function getMaxTokensLimitVertexAi(model) {\n if (model.includes('imagen-')) {\n return 0; // Imagen models do not have a max tokens limit in the same way as text models\n }\n else if (model.includes('claude')) {\n return getClaudeMaxTokensLimit(model);\n }\n else if (model.includes('gemini')) {\n return getGeminiMaxTokensLimit(model);\n }\n else if (isOpenMaaSChatModel(model)) {\n return getMaxOutputTokens(model);\n }\n return 8192; // Default fallback limit\n}\n//# sourceMappingURL=vertexai.js.map","import { ProviderList, Providers } from '@llumiverse/common';\n// Virtual providers from studio\nexport var CustomProviders;\n(function (CustomProviders) {\n CustomProviders[\"virtual_lb\"] = \"virtual_lb\";\n CustomProviders[\"virtual_mediator\"] = \"virtual_mediator\";\n CustomProviders[\"test\"] = \"test\";\n})(CustomProviders || (CustomProviders = {}));\n// The const and the type are one declaration in two halves: the object is what `z.enum()` reads the\n// members off, and the type is inferred back from that schema rather than restated as\n// `Providers | CustomProviders` — which is the same union, but a second statement of it.\nexport const SupportedProviders = {\n ...Providers,\n ...CustomProviders,\n};\nconst CustomProvidersList = {\n virtual_lb: {\n id: CustomProviders.virtual_lb,\n name: 'Virtual - Load Balancer',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n virtual_mediator: {\n id: CustomProviders.virtual_mediator,\n name: 'Virtual - Mediator',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n test: {\n id: CustomProviders.test,\n name: 'Test LLM',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\nexport const SupportedProvidersList = {\n ...ProviderList,\n ...CustomProvidersList,\n};\n//# sourceMappingURL=environment.js.map","export const MEMBERS_GROUP_NAME = 'members';\n//# sourceMappingURL=group.js.map","export var SupportedIntegrations;\n(function (SupportedIntegrations) {\n SupportedIntegrations[\"gladia\"] = \"gladia\";\n SupportedIntegrations[\"github\"] = \"github\";\n SupportedIntegrations[\"aws\"] = \"aws\";\n SupportedIntegrations[\"magic_pdf\"] = \"magic_pdf\";\n SupportedIntegrations[\"serper\"] = \"serper\";\n SupportedIntegrations[\"exa\"] = \"exa\";\n SupportedIntegrations[\"linkup\"] = \"linkup\";\n SupportedIntegrations[\"resend\"] = \"resend\";\n SupportedIntegrations[\"ask_user_webhook\"] = \"ask_user_webhook\";\n})(SupportedIntegrations || (SupportedIntegrations = {}));\n//# sourceMappingURL=integrations.js.map","// Interaction values that exist at runtime and are read by the API schemas.\n//\n// Split out of `interaction.ts` for the reason `project-values.ts` was split out of `project.ts`:\n// `InteractionExecutionConfigurationSchema` is `z.enum(...)` over these two, and importing\n// `interaction.ts` from a schema module at runtime would both be a cycle risk and pull the largest\n// module in the package into every schema consumer. Re-exported from `interaction.ts`, so this is a\n// move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: the first declaration in the file would\n// otherwise inherit this note as its published component `description`, the way `project-values.ts`\n// records.\nexport var RunDataStorageLevel;\n(function (RunDataStorageLevel) {\n RunDataStorageLevel[\"STANDARD\"] = \"STANDARD\";\n RunDataStorageLevel[\"RESTRICTED\"] = \"RESTRICTED\";\n RunDataStorageLevel[\"DEBUG\"] = \"DEBUG\";\n})(RunDataStorageLevel || (RunDataStorageLevel = {}));\nexport var ConfigModes;\n(function (ConfigModes) {\n ConfigModes[\"RUN_AND_INTERACTION_CONFIG\"] = \"RUN_AND_INTERACTION_CONFIG\";\n ConfigModes[\"RUN_CONFIG_ONLY\"] = \"RUN_CONFIG_ONLY\";\n ConfigModes[\"INTERACTION_CONFIG_ONLY\"] = \"INTERACTION_CONFIG_ONLY\";\n})(ConfigModes || (ConfigModes = {}));\n//# sourceMappingURL=interaction-values.js.map","/**\n * `RunDataStorageLevel` and `ConfigModes` live in `./interaction-values.js` so the API schemas can\n * read them without importing this module back. Re-exported here so every existing import path keeps\n * working.\n */\nexport * from './interaction-values.js';\nexport var InteractionStatus;\n(function (InteractionStatus) {\n InteractionStatus[\"draft\"] = \"draft\";\n InteractionStatus[\"published\"] = \"published\";\n InteractionStatus[\"archived\"] = \"archived\";\n InteractionStatus[\"code\"] = \"code\";\n InteractionStatus[\"unknown\"] = \"unknown\";\n})(InteractionStatus || (InteractionStatus = {}));\nexport var ExecutionRunStatus;\n(function (ExecutionRunStatus) {\n ExecutionRunStatus[\"created\"] = \"created\";\n ExecutionRunStatus[\"processing\"] = \"processing\";\n ExecutionRunStatus[\"completed\"] = \"completed\";\n ExecutionRunStatus[\"failed\"] = \"failed\";\n})(ExecutionRunStatus || (ExecutionRunStatus = {}));\n/**\n * Defines the scope for agent search operations.\n */\nexport var AgentSearchScope;\n(function (AgentSearchScope) {\n /**\n * Search is scoped to a specific collection.\n */\n AgentSearchScope[\"Collection\"] = \"collection\";\n})(AgentSearchScope || (AgentSearchScope = {}));\n// Re-exported from email.ts for backwards compatibility\nexport { isEmailChannel, isInteractiveChannel, } from './email.js';\nconst AGENT_RESOURCE_TYPES = [\n 'document',\n 'collection',\n 'content_type',\n 'interaction',\n 'prompt',\n 'agent',\n 'workflow',\n 'process',\n 'process_run',\n 'interaction_run',\n 'view',\n];\nconst AGENT_RESOURCE_ACTIONS = ['created', 'updated', 'deleted'];\n/**\n * Validate and normalize an untrusted value into a clean list of resource references. References\n * cross the wire and may originate from external/MCP tools, so malformed entries are dropped\n * rather than throwing, and an empty/absent label falls back to the id.\n */\nexport function normalizeAgentResources(value) {\n if (!Array.isArray(value))\n return [];\n const result = [];\n for (const entry of value) {\n if (!entry || typeof entry !== 'object')\n continue;\n const ref = entry;\n const { type, id, label, action, revision_id } = ref;\n if (typeof type !== 'string' || !AGENT_RESOURCE_TYPES.includes(type))\n continue;\n if (typeof id !== 'string' || id.length === 0)\n continue;\n if (typeof action !== 'string' || !AGENT_RESOURCE_ACTIONS.includes(action))\n continue;\n result.push({\n type: type,\n id,\n label: typeof label === 'string' && label.length > 0 ? label : id,\n action: action,\n ...(typeof revision_id === 'string' && revision_id.length > 0 ? { revision_id } : {}),\n });\n }\n return result;\n}\n// ================= end async execution payloads ====================\nexport var RunSourceTypes;\n(function (RunSourceTypes) {\n RunSourceTypes[\"api\"] = \"api\";\n RunSourceTypes[\"cli\"] = \"cli\";\n RunSourceTypes[\"ui\"] = \"ui\";\n RunSourceTypes[\"webhook\"] = \"webhook\";\n RunSourceTypes[\"test\"] = \"test-data\";\n RunSourceTypes[\"system\"] = \"system\";\n RunSourceTypes[\"schedule\"] = \"schedule\";\n})(RunSourceTypes || (RunSourceTypes = {}));\n/**\n * Source of the resolved model configuration\n */\nexport var ModelSource;\n(function (ModelSource) {\n /** Model was explicitly provided in the execution config */\n ModelSource[\"config\"] = \"config\";\n /** Model comes from the interaction definition */\n ModelSource[\"interaction\"] = \"interaction\";\n /** Model comes from environment's default_model */\n ModelSource[\"environmentDefault\"] = \"environmentDefault\";\n /** Model comes from project system interaction defaults */\n ModelSource[\"projectSystemDefault\"] = \"projectSystemDefault\";\n /** Model comes from project base defaults */\n ModelSource[\"projectBaseDefault\"] = \"projectBaseDefault\";\n /** Model comes from project modality-specific defaults */\n ModelSource[\"projectModalityDefault\"] = \"projectModalityDefault\";\n /** Model comes from legacy project defaults */\n ModelSource[\"projectLegacyDefault\"] = \"projectLegacyDefault\";\n})(ModelSource || (ModelSource = {}));\n//# sourceMappingURL=interaction.js.map","import { Permission } from './access-control-values.js';\nexport const OAUTH_SCOPE_OPENID = 'openid';\nexport const OAUTH_SCOPE_PROFILE = 'profile';\nexport const OAUTH_SCOPE_OFFLINE_ACCESS = 'offline_access';\nexport const OAUTH_SCOPE_PROJECT_SWITCH = 'project_switch';\nexport const OAUTH_STANDARD_SCOPES = [OAUTH_SCOPE_OPENID, OAUTH_SCOPE_PROFILE, OAUTH_SCOPE_OFFLINE_ACCESS];\n/**\n * Permissions that are never grantable as an OAuth scope: they administer persistent credentials,\n * hand out secret material, or are internal to the platform's own consoles.\n */\nconst NON_OAUTH_PERMISSION_SCOPES = new Set([\n Permission.api_key_create,\n Permission.api_key_update,\n Permission.api_key_delete,\n Permission.api_key_secret_read,\n Permission.manage_billing,\n Permission.billing_read,\n Permission.iam_impersonate,\n Permission.studio_access,\n]);\nconst OAUTH_PERMISSION_SCOPES = Object.values(Permission).filter((scope) => !NON_OAUTH_PERMISSION_SCOPES.has(scope));\n/** The permissions a client may request as OAuth scopes. */\nexport function getOAuthPermissionScopes() {\n return [...OAUTH_PERMISSION_SCOPES];\n}\n//# sourceMappingURL=oauth-scopes.js.map","export const DEFAULT_EVENT_AGENT_INTERACTION_REF = 'sys:GeneralAgent';\n//# sourceMappingURL=platform-event.js.map","// Project values that exist at runtime — currently the system role catalog.\n//\n// Split out of `project.ts` for the reason `account-values.ts` was split out of `user.ts`: the API\n// schemas need `SystemRoles` at runtime (`z.enum(SystemRoles)`), and `project.ts` needs the types\n// those schemas infer. Re-exported from `project.ts`, so this is a move, not a rename.\n//\n// `//` rather than JSDoc, and not a style preference: `SystemRoles` is the first declaration in the\n// file, and zeno-server's scanner attaches a leading DOC comment to the declaration that follows it.\n// Written as JSDoc, this note became the published `SystemRoles.description` in the OpenAPI\n// document — internal migration commentary shipped to every generated client. The sibling\n// `access-control-values.ts` keeps its JSDoc header only because none of its enums are resolved\n// through that path.\n// Moved here from `project.ts` for the same reason: `ResourceVisibilitySchema` is `z.enum(...)` over\n// it, and a runtime import of `project.ts` from the schema modules would be a cycle. The enum stays\n// the single statement of the values — the schema reads them rather than restating them, which is\n// why `ResourceVisibility` is not a canonical alias.\nexport var ResourceVisibility;\n(function (ResourceVisibility) {\n ResourceVisibility[\"public\"] = \"public\";\n ResourceVisibility[\"account\"] = \"account\";\n ResourceVisibility[\"project\"] = \"project\";\n})(ResourceVisibility || (ResourceVisibility = {}));\nexport var SystemRoles;\n(function (SystemRoles) {\n SystemRoles[\"owner\"] = \"owner\";\n SystemRoles[\"admin\"] = \"admin\";\n SystemRoles[\"manager\"] = \"manager\";\n SystemRoles[\"developer\"] = \"developer\";\n SystemRoles[\"application\"] = \"application\";\n SystemRoles[\"automation\"] = \"automation\";\n SystemRoles[\"content_processor\"] = \"content_processor\";\n SystemRoles[\"consumer\"] = \"consumer\";\n SystemRoles[\"executor\"] = \"executor\";\n SystemRoles[\"reader\"] = \"reader\";\n SystemRoles[\"auditor\"] = \"auditor\";\n SystemRoles[\"support\"] = \"support\";\n SystemRoles[\"billing\"] = \"billing\";\n SystemRoles[\"member\"] = \"member\";\n SystemRoles[\"app_member\"] = \"app_member\";\n SystemRoles[\"content_superadmin\"] = \"content_superadmin\";\n})(SystemRoles || (SystemRoles = {}));\n//# sourceMappingURL=project-values.js.map","/**\n * `SystemRoles` lives in `./project-values.js` so the API schemas can read it without importing this\n * module back. Re-exported here so every existing import path keeps working.\n */\nexport * from './project-values.js';\n/**\n * System interaction category enum.\n * Categories group one or more system interactions for default model assignment.\n */\nexport var SystemInteractionCategory;\n(function (SystemInteractionCategory) {\n SystemInteractionCategory[\"content_type\"] = \"content_type\";\n SystemInteractionCategory[\"intake\"] = \"intake\";\n SystemInteractionCategory[\"analysis\"] = \"analysis\";\n SystemInteractionCategory[\"agent\"] = \"agent\";\n SystemInteractionCategory[\"non_applicable\"] = \"non_applicable\";\n})(SystemInteractionCategory || (SystemInteractionCategory = {}));\n/**\n * Map system interaction endpoints to categories.\n */\nexport const SYSTEM_INTERACTION_CATEGORIES = {\n ExtractInformation: SystemInteractionCategory.intake,\n SelectDocumentType: SystemInteractionCategory.intake,\n GenerateMetadataModel: SystemInteractionCategory.content_type,\n ChunkDocument: SystemInteractionCategory.intake,\n IdentifyTextSections: SystemInteractionCategory.intake,\n AnalyzeDocument: SystemInteractionCategory.analysis,\n ReduceTextSections: SystemInteractionCategory.analysis,\n GenericAgent: SystemInteractionCategory.non_applicable,\n AdhocTaskAgent: SystemInteractionCategory.non_applicable,\n Mediator: SystemInteractionCategory.non_applicable,\n AnalyzeConversation: SystemInteractionCategory.analysis,\n GetAgentConversationTopic: SystemInteractionCategory.analysis,\n ContentSearchAgent: SystemInteractionCategory.analysis,\n ContentSearchReranker: SystemInteractionCategory.analysis,\n StudioAssistant: SystemInteractionCategory.agent,\n};\n// export interface ProjectConfigurationEmbeddings {\n// environment: string;\n// max_tokens: number;\n// dimensions: number;\n// model?: string;\n// }\nexport var SupportedEmbeddingTypes;\n(function (SupportedEmbeddingTypes) {\n SupportedEmbeddingTypes[\"text\"] = \"text\";\n SupportedEmbeddingTypes[\"image\"] = \"image\";\n SupportedEmbeddingTypes[\"properties\"] = \"properties\";\n})(SupportedEmbeddingTypes || (SupportedEmbeddingTypes = {}));\nvar FullTextType;\n(function (FullTextType) {\n FullTextType[\"full_text\"] = \"full_text\";\n})(FullTextType || (FullTextType = {}));\nexport const SearchTypes = {\n ...SupportedEmbeddingTypes,\n ...FullTextType,\n};\nexport const ProjectRefPopulate = 'id name account';\n/**\n * Supported languages for full-text search with their display names.\n * Maps ISO 639-1 codes to human-readable language names.\n */\nexport const SUPPORTED_SEARCH_LANGUAGES = {\n en: 'English',\n zh: 'Chinese',\n es: 'Spanish',\n hi: 'Hindi',\n ar: 'Arabic',\n pt: 'Portuguese',\n bn: 'Bengali',\n ru: 'Russian',\n ja: 'Japanese',\n de: 'German',\n fr: 'French',\n ko: 'Korean',\n it: 'Italian',\n tr: 'Turkish',\n vi: 'Vietnamese',\n pl: 'Polish',\n uk: 'Ukrainian',\n nl: 'Dutch',\n th: 'Thai',\n el: 'Greek',\n cs: 'Czech',\n sv: 'Swedish',\n ro: 'Romanian',\n hu: 'Hungarian',\n da: 'Danish',\n fi: 'Finnish',\n no: 'Norwegian',\n he: 'Hebrew',\n id: 'Indonesian',\n fa: 'Persian',\n};\n//# sourceMappingURL=project.js.map","export var PromptStatus;\n(function (PromptStatus) {\n PromptStatus[\"draft\"] = \"draft\";\n PromptStatus[\"published\"] = \"published\";\n PromptStatus[\"archived\"] = \"archived\";\n})(PromptStatus || (PromptStatus = {}));\nexport var PromptSegmentDefType;\n(function (PromptSegmentDefType) {\n PromptSegmentDefType[\"chat\"] = \"chat\";\n PromptSegmentDefType[\"template\"] = \"template\";\n})(PromptSegmentDefType || (PromptSegmentDefType = {}));\nexport var TemplateType;\n(function (TemplateType) {\n TemplateType[\"jst\"] = \"jst\";\n TemplateType[\"handlebars\"] = \"handlebars\";\n TemplateType[\"text\"] = \"text\";\n})(TemplateType || (TemplateType = {}));\n//# sourceMappingURL=prompt.js.map","export var ResolvableRefType;\n(function (ResolvableRefType) {\n ResolvableRefType[\"project\"] = \"Project\";\n ResolvableRefType[\"projects\"] = \"Projects\";\n ResolvableRefType[\"environment\"] = \"Environment\";\n ResolvableRefType[\"user\"] = \"User\";\n ResolvableRefType[\"account\"] = \"Account\";\n ResolvableRefType[\"interaction\"] = \"Interaction\";\n ResolvableRefType[\"userGroup\"] = \"UserGroup\";\n})(ResolvableRefType || (ResolvableRefType = {}));\n//# sourceMappingURL=refs.js.map","/**\n * Extraction schema filtering.\n *\n * Content-type object_schema properties may set `\"x-extract\": false` to mark fields\n * that must not be filled by extraction models (match scores, ERP ids filled later,\n * internal bookkeeping). The full schema remains the object model for UI/storage;\n * only the filtered copy is used as result_schema for constrained decoding.\n */\nconst X_EXTRACT = 'x-extract';\nfunction unescapeJsonPointerSegment(segment) {\n return segment.replace(/~1/g, '/').replace(/~0/g, '~');\n}\nfunction resolveLocalRef(ref, root) {\n if (!ref.startsWith('#/')) {\n return undefined;\n }\n let current = root;\n for (const segment of ref.slice(2).split('/').map(unescapeJsonPointerSegment)) {\n if (!current || typeof current !== 'object' || Array.isArray(current)) {\n return undefined;\n }\n current = current[segment];\n }\n return current;\n}\nfunction isExtractableSchemaNodeInternal(schema, root, seenRefs) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return true;\n }\n const schemaObj = schema;\n if (schemaObj[X_EXTRACT] === false) {\n return false;\n }\n if (typeof schemaObj.$ref === 'string' && !seenRefs.has(schemaObj.$ref)) {\n seenRefs.add(schemaObj.$ref);\n const resolved = resolveLocalRef(schemaObj.$ref, root);\n if (resolved !== undefined) {\n return isExtractableSchemaNodeInternal(resolved, root, seenRefs);\n }\n }\n return true;\n}\nexport function isExtractableSchemaNode(schema, root = schema) {\n return isExtractableSchemaNodeInternal(schema, root, new Set());\n}\nfunction filterSchemaArray(value, root) {\n if (!Array.isArray(value)) {\n return undefined;\n }\n const filtered = value\n .map((item) => schemaForExtractionNode(item, root))\n .filter((item) => item !== undefined);\n return filtered.length > 0 ? filtered : undefined;\n}\nfunction filterSchemaMap(value, root) {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return undefined;\n }\n const filtered = {};\n for (const [key, child] of Object.entries(value)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n filtered[key] = childFiltered;\n }\n }\n return Object.keys(filtered).length > 0 ? filtered : undefined;\n}\nfunction schemaForExtractionNode(schema, root) {\n if (!schema || typeof schema !== 'object') {\n return schema;\n }\n if (Array.isArray(schema)) {\n return schema.map((item) => schemaForExtractionNode(item, root));\n }\n if (!isExtractableSchemaNode(schema, root)) {\n return undefined;\n }\n const node = { ...schema };\n for (const defsKey of ['$defs', 'definitions']) {\n const defs = filterSchemaMap(node[defsKey], root);\n if (defs) {\n node[defsKey] = defs;\n }\n else {\n delete node[defsKey];\n }\n }\n if (node.items && typeof node.items === 'object') {\n const items = schemaForExtractionNode(node.items, root);\n if (items !== undefined) {\n node.items = items;\n }\n else {\n delete node.items;\n }\n }\n for (const unionKey of ['anyOf', 'oneOf', 'allOf']) {\n if (Array.isArray(node[unionKey])) {\n const filtered = filterSchemaArray(node[unionKey], root);\n if (!filtered) {\n return undefined;\n }\n node[unionKey] = filtered;\n }\n }\n if (node.additionalProperties && typeof node.additionalProperties === 'object') {\n const additionalProperties = schemaForExtractionNode(node.additionalProperties, root);\n node.additionalProperties = additionalProperties ?? false;\n }\n if (node.properties && typeof node.properties === 'object' && !Array.isArray(node.properties)) {\n const props = {};\n for (const [key, child] of Object.entries(node.properties)) {\n const childFiltered = schemaForExtractionNode(child, root);\n if (childFiltered !== undefined) {\n props[key] = childFiltered;\n }\n }\n node.properties = props;\n if (Array.isArray(node.required)) {\n const kept = node.required.filter((r) => typeof r === 'string' && r in props);\n if (kept.length > 0) {\n node.required = kept;\n }\n else {\n delete node.required;\n }\n }\n }\n // Drop the flag from the extraction copy (not needed by providers)\n delete node[X_EXTRACT];\n return node;\n}\n/**\n * Deep-clones a JSON schema and removes properties (recursively) marked\n * `x-extract: false`, cleaning `required` arrays to match.\n */\nexport function schemaForExtraction(schema) {\n return (schemaForExtractionNode(schema, schema) ?? {});\n}\nfunction resolveSchemaNode(schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return schema;\n }\n const schemaObj = schema;\n if (typeof schemaObj.$ref !== 'string') {\n return schema;\n }\n return resolveLocalRef(schemaObj.$ref, root) ?? schema;\n}\nfunction mergePreservingNonExtractableNode(existing, extracted, schema, root) {\n if (!schema || typeof schema !== 'object' || Array.isArray(schema)) {\n return extracted;\n }\n const resolved = resolveSchemaNode(schema, root);\n if (!resolved || typeof resolved !== 'object' || Array.isArray(resolved)) {\n return extracted;\n }\n const schemaObj = resolved;\n // Arrays are new extraction output. Without a declared stable item key, index\n // merging can attach preserved ERP/match fields to the wrong row.\n if (Array.isArray(extracted)) {\n const itemSchema = schemaObj.items;\n if (!itemSchema || typeof itemSchema !== 'object') {\n return extracted;\n }\n return extracted.map((item) => mergePreservingNonExtractableNode(undefined, item, itemSchema, root));\n }\n if (!extracted || typeof extracted !== 'object' || Array.isArray(extracted)) {\n return extracted;\n }\n const props = schemaObj.properties;\n if (!props || typeof props !== 'object' || Array.isArray(props)) {\n return extracted;\n }\n const existingObj = existing && typeof existing === 'object' && !Array.isArray(existing)\n ? existing\n : {};\n const extractedObj = extracted;\n const propSchemas = props;\n const result = { ...extractedObj };\n for (const [key, propSchema] of Object.entries(propSchemas)) {\n if (!isExtractableSchemaNode(propSchema, root)) {\n // Model should not have filled this; restore prior value if any.\n if (key in existingObj) {\n result[key] = existingObj[key];\n }\n else {\n delete result[key];\n }\n continue;\n }\n if (key in extractedObj) {\n result[key] = mergePreservingNonExtractableNode(existingObj[key], extractedObj[key], propSchema, root);\n }\n }\n return result;\n}\n/**\n * Merge model output over existing properties while preserving values at paths\n * marked `x-extract: false` on the full (unfiltered) schema.\n */\nexport function mergePreservingNonExtractable(existing, extracted, schema) {\n return mergePreservingNonExtractableNode(existing, extracted, schema, schema);\n}\n//# sourceMappingURL=schema-for-extraction.js.map","export const AgentToolApprovalModes = ['ask', 'auto_review', 'full_control'];\nexport function normalizeAgentToolApprovalMode(mode, interactive) {\n if (interactive !== true) {\n return 'full_control';\n }\n return mode ?? 'full_control';\n}\n//# sourceMappingURL=agent-approval.js.map","export var CollectionStatus;\n(function (CollectionStatus) {\n CollectionStatus[\"active\"] = \"active\";\n CollectionStatus[\"archived\"] = \"archived\";\n})(CollectionStatus || (CollectionStatus = {}));\n//# sourceMappingURL=collections.js.map","/** Artifact key of the stored conversation catalog, relative to the agent storage root. */\nexport const CONVERSATION_CATALOG_ARTIFACT_KEY = 'catalog.json';\n//# sourceMappingURL=conversation-state.js.map","export function withDSLWorkflowSpecDiscriminator(spec) {\n if ('steps' in spec && spec.steps) {\n return { ...spec, spec_format: 'steps' };\n }\n return { ...spec, spec_format: 'activities' };\n}\nexport const WorkflowDefinitionRefPopulate = 'id name description tags created_at updated_at';\n//# sourceMappingURL=dsl-workflow.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeEditingPolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeEditingPolicySchema = {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n description: 'Agent interaction used for new document-editing sessions. Defaults to sys:GeneralAgent.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for collaborative document editing.',\n};\n//# sourceMappingURL=editing-policy-schema.generated.js.map","// GENERATED FILE — DO NOT EDIT.\n//\n// Written by `scripts/gen-intake-policy-schema.ts` from `ContentTypeIntakePolicySchema` in\n// `../api-schemas/store.ts`, through the same adapter that emits the OpenAPI components. Edit the Zod\n// schema and re-run `pnpm run gen:schemas`; `store.contract.test.ts` fails if this drifts from the\n// canonical component, and fails too if it accepts a value the Zod schema rejects.\n//\n// It exists so the Studio policy editors and the server validators get a self-contained JSON\n// Schema without importing Zod: the package root exports plain data, and `zod` stays out of every\n// browser bundle. The component's `$ref`s are re-rooted from `#/components/schemas/` to `#/$defs/`\n// so AJV and Monaco can compile it standalone.\n//\n// It carries the name consumers have always imported. The Zod object it was emitted from is exported\n// under the same name from `../api-schemas/store.ts`, which the package root does NOT re-export —\n// that split is what keeps zod out of the browser while the alias-provenance gate still sees the\n// `${Name}Schema` convention it requires.\nexport const ContentTypeIntakePolicySchema = {\n type: 'object',\n properties: {\n mode: {\n type: 'string',\n enum: ['programmatic', 'agentic'],\n description: 'Intake orchestration mode for this type.',\n },\n identification: {\n type: 'object',\n properties: {\n guidance: {\n type: 'string',\n },\n distinguish_from: {\n type: 'string',\n },\n examples: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n additionalProperties: false,\n description: 'Guidance used when selecting or creating this content type.',\n },\n locate: {\n type: 'object',\n properties: {\n instructions: {\n type: 'string',\n description: 'What to look for (\"commercial terms, payment schedule, signature pages\").',\n },\n detail: {\n type: 'number',\n enum: [8, 16],\n description: 'Pages per contact sheet: 8 = bigger tiles (headings readable). Default 16.',\n },\n min_pages: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n description: 'Only run when the page count is at least this. Default 8.',\n },\n },\n required: ['instructions'],\n additionalProperties: false,\n description: 'Document-map (\"locate\") pass: page thumbnails tiled into labeled contact sheets, one vision call returns which pages matter for THIS type. The result can scope conversion and extraction, and doubles as the vision planner for visual extraction.',\n },\n text_conversion: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n method: {\n type: 'string',\n enum: ['auto', 'basic', 'llm', 'custom'],\n },\n custom: {\n type: 'object',\n properties: {\n interaction: {\n type: 'string',\n },\n agent: {\n type: 'string',\n },\n },\n additionalProperties: false,\n },\n instructions: {\n type: 'string',\n },\n output_format: {\n type: 'string',\n enum: ['markdown', 'text'],\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages to convert: everything or the locate result. Default all.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges to convert (wins over `scope` when set).',\n },\n render_dpi: {\n type: 'integer',\n minimum: 72,\n maximum: 2147483647,\n description: 'DPI at which each page is rendered to the image the LLM converts. Default 150 — the accuracy/cost sweet spot: higher resolutions balloon input tokens (some providers tile the page) for no quality gain, below ~150 dense tables start to misread. Raise only for very fine print.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the page-conversion interaction (method 'llm'/'auto' -> sys:ConvertPageToMarkdown, method 'custom' -> the custom interaction). Lets the visual conversion run on a cheaper/faster model (e.g. a flash model) than extraction. When unset, conversion uses the run's model config or the project default model.\",\n },\n },\n additionalProperties: false,\n description: 'Controls source-to-text conversion before extraction and embedding.',\n },\n extraction: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n source: {\n type: 'string',\n enum: ['auto', 'text', 'vision', 'mixed'],\n },\n instructions: {\n type: 'string',\n },\n interaction: {\n type: 'string',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: \"Model execution config for the standard property-extraction interaction (sys:ExtractInformation). Lets extraction run on a different model/environment than the visual page conversion. When unset, extraction uses the run's model config or the project default model. (Grounded extraction is configured separately via grounding.config.)\",\n },\n scope: {\n $ref: '#/$defs/IntakePageScope',\n description: 'Which pages extraction sees: everything or the locate result.',\n },\n page_ranges: {\n $ref: '#/$defs/IntakePageRanges',\n description: 'Static page ranges extraction sees (wins over `scope` when set).',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on pages sent to extraction. Default 20.',\n },\n vision: {\n type: 'object',\n properties: {\n default_detail: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n allowed_details: {\n type: 'array',\n items: {\n $ref: '#/$defs/IntakeVisionDetail',\n },\n },\n max_image_tokens: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'PRIMARY budget: estimated image tokens per extraction call. Default 16000.',\n },\n max_payload_mb: {\n type: 'number',\n minimum: 1,\n description: 'Transport guard in megabytes. Default 16.',\n },\n max_pages_per_call: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Cap on page images per extraction call. Default 8.',\n },\n },\n additionalProperties: false,\n description: 'Vision evidence budget for visual extraction. Detail names reference platform profiles; the type never defines dpi/quality/resolution.',\n },\n verification: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n },\n model: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n materiality: {\n type: 'string',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n },\n max_retries: {\n type: 'integer',\n minimum: 0,\n maximum: 2147483647,\n },\n on_fail: {\n type: 'string',\n enum: ['flag', 'block'],\n },\n },\n additionalProperties: false,\n },\n grounding: {\n $ref: '#/$defs/ContentTypeExtractionGroundingPolicy',\n description: 'Controls PDF block-level citation grounding with annotated proof output.',\n },\n },\n additionalProperties: false,\n description: 'Controls schema-property extraction after type assignment.',\n },\n rendering_template: {\n type: 'string',\n description: 'Handlebars template used to materialize extracted properties into object text.',\n },\n embeddings: {\n $ref: '#/$defs/EmbeddingTypeEnabledMap',\n description: 'Per-type embedding switches. Unspecified values inherit the project policy.',\n },\n generate_toc: {\n type: 'boolean',\n description: 'Whether intake should generate a table of contents for matching documents.',\n },\n default_view: {\n type: 'string',\n enum: ['auto', 'text', 'pdf', 'image', 'properties'],\n description: 'Preferred first view for objects of this type.',\n },\n },\n additionalProperties: false,\n description: 'Per-content-type policy for the standard intake workflows.',\n $defs: {\n AzureFoundryChatOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'azure-foundry-chat',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n seed: {\n type: 'number',\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockAI21Options: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-ai21',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n top_k: {\n type: 'number',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockCohereCommandOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-cohere-command',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockConverseOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-converse',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockGptOssOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-gpt-oss',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleChatCompletionsOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-chat-completions',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n reasoning_effort: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMantleResponsesOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mantle-responses',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n reasoning_effort: {\n type: 'string',\n enum: ['none', 'low', 'medium', 'high', 'xhigh'],\n },\n verbosity: {\n type: 'string',\n enum: ['low', 'medium', 'high'],\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockMistralOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-mistral',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockNovaOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n BedrockPalmyraOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-palmyra',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n min_tokens: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ConfigModes: {\n type: 'string',\n enum: ['RUN_AND_INTERACTION_CONFIG', 'RUN_CONFIG_ONLY', 'INTERACTION_CONFIG_ONLY'],\n },\n ContentTypeExtractionGroundingPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Enable PDF block-level citation grounding for property extraction.',\n },\n interaction: {\n type: 'string',\n description: 'Grounded extraction interaction. Defaults to the system grounded extractor.',\n },\n max_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages to process.',\n },\n force_ocr: {\n type: 'boolean',\n description: 'Run OCR on every page even when a text layer exists.',\n },\n use_vision: {\n type: 'boolean',\n description: 'Attach instrumented page images to the grounded extraction prompt.',\n },\n raster_mode: {\n type: 'string',\n enum: ['vision', 'ocr'],\n description: \"How to read pages with no digital text layer (scans / image-only pages). 'vision' (default): read them off the page image and skip OCR. 'ocr': legacy path — OCR those pages and block-ground on the (lossy) OCR text.\",\n },\n grid_cell_pt: {\n type: 'number',\n minimum: 1,\n description: 'A1 locate-grid cell size in PDF points for vision pages. Smaller = finer grid (more cells, tighter boxes) but can trip weaker models into over-reading; tune per the model in `config`. Default 15.',\n },\n omit_block_boxes: {\n type: 'boolean',\n description: 'Drop block bounding boxes from the extraction prompt. Only sound with use_vision (layout comes from the image).',\n },\n window_pages: {\n type: 'integer',\n minimum: 1,\n maximum: 2147483647,\n description: 'Maximum pages per grounded extraction call before windowing.',\n },\n update_properties: {\n type: 'boolean',\n description: 'Update object properties with grounded extraction data. Default true.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the main grounded extraction interaction.',\n },\n hard_config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration used for hard-to-read content.',\n },\n hardness_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which hard_config is used. Default 0.5.',\n },\n min_citation_density: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Minimum citations-per-leaf-value ratio; completions below it retry with escalation. Default 0.3.',\n },\n refresh_ocr: {\n type: 'boolean',\n description: 'Re-run OCR instead of restoring durable OCR artifacts (stale pipeline output).',\n },\n review: {\n $ref: '#/$defs/ContentTypeExtractionGroundingReviewPolicy',\n description: 'Optional post-extraction review pass.',\n },\n },\n additionalProperties: false,\n },\n ContentTypeExtractionGroundingReviewPolicy: {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n description: 'Set false to disable an inherited grounding review pass for this type.',\n },\n config: {\n $ref: '#/$defs/InteractionExecutionConfiguration',\n description: 'Model execution configuration for the review interaction.',\n },\n threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: 'Hardness score at or above which review runs. Defaults to hardness_threshold.',\n },\n coverage_threshold: {\n type: 'number',\n minimum: 0,\n maximum: 1,\n description: \"Review also runs when any page's citation coverage falls below this floor (evidence of missed content). Default 0.2.\",\n },\n force: {\n type: 'boolean',\n description: 'Run review regardless of hardness.',\n },\n },\n additionalProperties: false,\n },\n EmbeddingTypeEnabledMap: {\n type: 'object',\n properties: {\n text: {\n type: 'boolean',\n },\n image: {\n type: 'boolean',\n },\n properties: {\n type: 'boolean',\n },\n },\n additionalProperties: false,\n },\n GroqOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'groq-deepseek-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n reasoning_format: {\n type: 'string',\n enum: ['parsed', 'raw', 'hidden'],\n },\n },\n required: ['_option_id', 'reasoning_format'],\n additionalProperties: false,\n },\n HttpTimeoutOptions: {\n type: 'object',\n properties: {\n headersTimeout: {\n type: 'number',\n description: 'Time (ms) to wait for the first response byte after the request is sent.',\n },\n bodyTimeout: {\n type: 'number',\n description: 'Time (ms) between body chunks once streaming has started.',\n },\n connectTimeout: {\n type: 'number',\n description: 'TCP/TLS connect timeout (ms).',\n },\n keepAliveTimeout: {\n type: 'number',\n description: 'Idle socket reuse timeout (ms).',\n },\n },\n additionalProperties: false,\n description: \"HTTP timeouts applied to a driver's upstream LLM-provider calls.\\n\\nAll values are in milliseconds. Drivers should map these onto whatever HTTP client their SDK uses; the defaults applied in `@llumiverse/core/createDriverHttpAgent` are: - headersTimeout: 900_000 - bodyTimeout: 900_000 - connectTimeout: 60_000 - keepAliveTimeout: 300_000\\n\\nThe response defaults are deliberately longer than the hosting request boundary. Application-level cancellation should end user work first; driver timeouts are bounded-resource safety nets.\",\n },\n ImagenMaskMode: {\n type: 'string',\n enum: ['MASK_MODE_USER_PROVIDED', 'MASK_MODE_BACKGROUND', 'MASK_MODE_FOREGROUND', 'MASK_MODE_SEMANTIC'],\n },\n ImagenOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-imagen',\n },\n number_of_images: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n person_generation: {\n type: 'string',\n enum: ['dont_allow', 'allow_adults', 'allow_all'],\n },\n safety_setting: {\n type: 'string',\n enum: ['block_none', 'block_only_high', 'block_medium_and_above', 'block_low_and_above'],\n },\n image_file_type: {\n type: 'string',\n enum: ['image/jpeg', 'image/png'],\n },\n jpeg_compression_quality: {\n type: 'number',\n },\n aspect_ratio: {\n type: 'string',\n enum: ['1:1', '4:3', '3:4', '16:9', '9:16'],\n },\n add_watermark: {\n type: 'boolean',\n },\n enhance_prompt: {\n type: 'boolean',\n },\n edit_mode: {\n $ref: '#/$defs/ImagenTaskType',\n },\n guidance_scale: {\n type: 'number',\n },\n edit_steps: {\n type: 'number',\n },\n mask_mode: {\n $ref: '#/$defs/ImagenMaskMode',\n },\n mask_dilation: {\n type: 'number',\n },\n mask_class: {\n type: 'array',\n items: {\n type: 'number',\n },\n },\n controlType: {\n type: 'string',\n enum: ['CONTROL_TYPE_FACE_MESH', 'CONTROL_TYPE_CANNY', 'CONTROL_TYPE_SCRIBBLE'],\n },\n controlImageComputation: {\n type: 'boolean',\n },\n subjectType: {\n type: 'string',\n enum: [\n 'SUBJECT_TYPE_PERSON',\n 'SUBJECT_TYPE_ANIMAL',\n 'SUBJECT_TYPE_PRODUCT',\n 'SUBJECT_TYPE_DEFAULT',\n ],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ImagenTaskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'EDIT_MODE_INPAINT_REMOVAL',\n 'EDIT_MODE_INPAINT_INSERTION',\n 'EDIT_MODE_BGSWAP',\n 'EDIT_MODE_OUTPAINT',\n 'CUSTOMIZATION_SUBJECT',\n 'CUSTOMIZATION_STYLE',\n 'CUSTOMIZATION_CONTROLLED',\n 'CUSTOMIZATION_INSTRUCT',\n ],\n },\n IntakePageRanges: {\n type: 'array',\n items: {\n minItems: 2,\n maxItems: 2,\n type: 'array',\n items: {\n type: 'integer',\n minimum: -2147483648,\n maximum: 2147483647,\n },\n },\n description: 'Static page ranges: inclusive [start, end] pairs; negative indexes count from the end of the document ([[1, 2], [-1, -1]] = first two pages plus the last page).',\n },\n IntakePageScope: {\n type: 'string',\n enum: ['all', 'located'],\n description: 'Named page scope for intake conversion/extraction: everything or the locate-pass result. Static page ranges live in the sibling `page_ranges` field (which wins when set) — kept as a SEPARATE field because scalar-or-collection unions generate unstable API clients.',\n },\n IntakeVisionDetail: {\n type: 'string',\n enum: ['low', 'standard', 'high'],\n description: 'Vision detail level names referenced by intake policies. The rendering profiles behind the names (dpi, max size, quality, color mode) are PLATFORM-defined and project-overridable — a type only ever references a detail name.',\n },\n InteractionExecutionConfiguration: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n },\n environment: {\n type: 'string',\n },\n model: {\n type: 'string',\n },\n do_validate: {\n type: 'boolean',\n },\n run_data: {\n $ref: '#/$defs/RunDataStorageLevel',\n },\n configMode: {\n $ref: '#/$defs/ConfigModes',\n },\n model_options: {\n $ref: '#/$defs/ModelOptions',\n },\n prompt_cache_key: {\n type: 'string',\n description: 'Stable provider-side routing key for automatic prompt caching.',\n },\n prompt_cache_mode: {\n $ref: '#/$defs/PromptCacheMode',\n description: 'Controls provider-side explicit caching: auto falls back safely, off disables it, and required surfaces cache preparation failures for diagnostics.',\n },\n prompt_cache_ttl_seconds: {\n type: 'integer',\n minimum: 60,\n maximum: 9007199254740991,\n description: 'Caller-selected explicit cache lifetime in seconds. Defaults remain provider-specific; Vertex Gemini requires at least 60 seconds.',\n },\n prompt_cache_schema_suffix: {\n type: 'boolean',\n description: 'Put the result schema after the cached prefix; Vertesia still validates the returned JSON against it.',\n },\n http_timeout: {\n $ref: '#/$defs/HttpTimeoutOptions',\n description: 'Per-run HTTP timeouts for upstream LLM-provider calls.',\n },\n },\n additionalProperties: false,\n },\n MistralTextOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'mistral-text',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['none', 'high'],\n },\n random_seed: {\n type: 'integer',\n minimum: -9007199254740991,\n maximum: 9007199254740991,\n },\n safe_prompt: {\n type: 'boolean',\n },\n parallel_tool_calls: {\n type: 'boolean',\n },\n tool_choice: {\n type: 'string',\n enum: ['auto', 'none', 'any', 'required'],\n },\n prompt_mode: {\n type: 'string',\n const: 'reasoning',\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ModelOptions: {\n oneOf: [\n {\n $ref: '#/$defs/TextFallbackOptions',\n },\n {\n $ref: '#/$defs/AzureFoundryChatOptions',\n },\n {\n $ref: '#/$defs/ImagenOptions',\n },\n {\n $ref: '#/$defs/VertexAIClaudeOptions',\n },\n {\n $ref: '#/$defs/VertexAIGeminiOptions',\n },\n {\n $ref: '#/$defs/VertexAIGeminiOmniVideoOptions',\n },\n {\n $ref: '#/$defs/VertexAIGrokOptions',\n },\n {\n $ref: '#/$defs/NovaCanvasOptions',\n },\n {\n $ref: '#/$defs/BedrockConverseOptions',\n },\n {\n $ref: '#/$defs/BedrockNovaOptions',\n },\n {\n $ref: '#/$defs/BedrockMistralOptions',\n },\n {\n $ref: '#/$defs/BedrockAI21Options',\n },\n {\n $ref: '#/$defs/BedrockCohereCommandOptions',\n },\n {\n $ref: '#/$defs/BedrockClaudeOptions',\n },\n {\n $ref: '#/$defs/BedrockPalmyraOptions',\n },\n {\n $ref: '#/$defs/BedrockGptOssOptions',\n },\n {\n $ref: '#/$defs/TwelvelabsPegasusOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleResponsesOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleChatCompletionsOptions',\n },\n {\n $ref: '#/$defs/BedrockMantleClaudeOptions',\n },\n {\n $ref: '#/$defs/OpenAiThinkingOptions',\n },\n {\n $ref: '#/$defs/OpenAiTextOptions',\n },\n {\n $ref: '#/$defs/OpenAiDalleOptions',\n },\n {\n $ref: '#/$defs/OpenAiGptImageOptions',\n },\n {\n $ref: '#/$defs/XAIGrokImageOptions',\n },\n {\n $ref: '#/$defs/GroqOptions',\n },\n {\n $ref: '#/$defs/MistralTextOptions',\n },\n ],\n },\n NovaCanvasOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-nova-canvas',\n },\n taskType: {\n type: 'string',\n enum: [\n 'TEXT_IMAGE',\n 'TEXT_IMAGE_WITH_IMAGE_CONDITIONING',\n 'COLOR_GUIDED_GENERATION',\n 'IMAGE_VARIATION',\n 'INPAINTING',\n 'OUTPAINTING',\n 'BACKGROUND_REMOVAL',\n ],\n },\n width: {\n type: 'number',\n },\n height: {\n type: 'number',\n },\n quality: {\n type: 'string',\n enum: ['standard', 'premium'],\n },\n cfgScale: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n numberOfImages: {\n type: 'number',\n },\n controlMode: {\n type: 'string',\n enum: ['CANNY_EDGE', 'SEGMENTATION'],\n },\n controlStrength: {\n type: 'number',\n },\n colors: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n similarityStrength: {\n type: 'number',\n },\n outPaintingMode: {\n type: 'string',\n enum: ['DEFAULT', 'PRECISE'],\n },\n },\n required: ['_option_id', 'taskType'],\n additionalProperties: false,\n },\n OpenAiDalleOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-dalle',\n },\n size: {\n type: 'string',\n enum: ['256x256', '512x512', '1024x1024', '1792x1024', '1024x1792'],\n },\n image_quality: {\n type: 'string',\n enum: ['standard', 'hd'],\n },\n style: {\n type: 'string',\n enum: ['vivid', 'natural'],\n },\n response_format: {\n type: 'string',\n enum: ['url', 'b64_json'],\n },\n n: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiGptImageOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-gpt-image',\n },\n size: {\n type: 'string',\n enum: ['1024x1024', '1024x1536', '1536x1024', 'auto'],\n },\n image_quality: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'auto'],\n },\n background: {\n type: 'string',\n enum: ['transparent', 'opaque', 'auto'],\n },\n output_format: {\n type: 'string',\n enum: ['png', 'webp', 'jpeg'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiTextOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-text',\n },\n max_tokens: {\n type: 'number',\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n extra_body: {\n type: 'object',\n additionalProperties: true,\n description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n OpenAiThinkingOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'openai-thinking',\n },\n max_tokens: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n reasoning_effort: {\n $ref: '#/$defs/ReasoningEffort',\n },\n image_detail: {\n type: 'string',\n enum: ['low', 'high', 'auto'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n extra_body: {\n type: 'object',\n additionalProperties: true,\n description: 'Additional provider-specific fields merged into the OpenAI-compatible request body.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n PromptCacheMode: {\n type: 'string',\n enum: ['auto', 'off', 'required'],\n },\n ReasoningEffort: {\n type: 'string',\n enum: ['none', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'],\n },\n RunDataStorageLevel: {\n type: 'string',\n enum: ['STANDARD', 'RESTRICTED', 'DEBUG'],\n },\n TextFallbackOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'text-fallback',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n include_thoughts: {\n type: 'boolean',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n ThinkingLevel: {\n type: 'string',\n enum: ['HIGH', 'MEDIUM', 'LOW', 'MINIMAL', 'THINKING_LEVEL_UNSPECIFIED'],\n },\n TwelvelabsPegasusOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'bedrock-twelvelabs-pegasus',\n },\n temperature: {\n type: 'number',\n },\n max_tokens: {\n type: 'number',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIClaudeOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-claude',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n effort: {\n type: 'string',\n enum: ['low', 'medium', 'high', 'xhigh', 'max'],\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n include_thoughts: {\n type: 'boolean',\n },\n cache_enabled: {\n type: 'boolean',\n },\n cache_ttl: {\n type: 'string',\n enum: ['5m', '1h'],\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGeminiOmniVideoOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-gemini-omni-video',\n },\n task: {\n type: 'string',\n enum: ['text_to_video', 'image_to_video', 'reference_to_video'],\n },\n aspect_ratio: {\n type: 'string',\n enum: ['16:9', '9:16'],\n },\n duration_seconds: {\n type: 'integer',\n minimum: 3,\n maximum: 10,\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGeminiOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-gemini',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n top_k: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n presence_penalty: {\n type: 'number',\n },\n frequency_penalty: {\n type: 'number',\n },\n seed: {\n type: 'number',\n },\n effort: {\n type: 'string',\n enum: ['minimal', 'low', 'medium', 'high'],\n },\n include_thoughts: {\n type: 'boolean',\n },\n thinking_budget_tokens: {\n type: 'number',\n },\n thinking_level: {\n $ref: '#/$defs/ThinkingLevel',\n },\n service_tier: {\n type: 'string',\n minLength: 1,\n description: 'Provider-defined processing tier. Unknown non-empty values are preserved for forward compatibility.',\n },\n flex: {\n type: 'boolean',\n deprecated: true,\n 'x-deprecated-message': 'Use service_tier=\"flex\" instead.',\n description: 'Deprecated: Use service_tier=\"flex\" instead.',\n },\n image_aspect_ratio: {\n type: 'string',\n enum: ['1:1', '2:3', '3:2', '3:4', '4:3', '9:16', '16:9', '21:9'],\n },\n image_size: {\n type: 'string',\n enum: ['1K', '2K', '4K'],\n },\n person_generation: {\n type: 'string',\n enum: ['ALLOW_ALL', 'ALLOW_ADULT', 'ALLOW_NONE'],\n },\n prominent_people: {\n type: 'string',\n enum: ['PROMINENT_PEOPLE_UNSPECIFIED', 'ALLOW_PROMINENT_PEOPLE', 'BLOCK_PROMINENT_PEOPLE'],\n },\n output_mime_type: {\n type: 'string',\n enum: ['image/png', 'image/jpeg'],\n },\n output_compression_quality: {\n type: 'number',\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n VertexAIGrokOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'vertexai-grok',\n },\n max_tokens: {\n type: 'number',\n },\n temperature: {\n type: 'number',\n },\n top_p: {\n type: 'number',\n },\n stop_sequence: {\n type: 'array',\n items: {\n type: 'string',\n },\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n XAIGrokImageOptions: {\n type: 'object',\n properties: {\n _option_id: {\n type: 'string',\n const: 'xai-grok-image',\n },\n aspect_ratio: {\n type: 'string',\n enum: [\n '1:1',\n '16:9',\n '9:16',\n '4:3',\n '3:4',\n '3:2',\n '2:3',\n '2:1',\n '1:2',\n '19.5:9',\n '9:19.5',\n '20:9',\n '9:20',\n 'auto',\n ],\n },\n resolution: {\n type: 'string',\n enum: ['1k', '2k'],\n },\n quality: {\n type: 'string',\n enum: ['low', 'medium'],\n },\n response_format: {\n type: 'string',\n enum: ['url', 'b64_json'],\n },\n n: {\n type: 'integer',\n minimum: 1,\n maximum: 10,\n },\n },\n required: ['_option_id'],\n additionalProperties: false,\n },\n },\n};\n//# sourceMappingURL=intake-policy-schema.generated.js.map","export const PROCESS_DEFINITION_FORMAT_VERSION = 1;\n//# sourceMappingURL=process.js.map","import { normalizeAgentResources } from '../interaction.js';\nexport var ContentEventName;\n(function (ContentEventName) {\n ContentEventName[\"create\"] = \"create\";\n ContentEventName[\"change_type\"] = \"change_type\";\n ContentEventName[\"update\"] = \"update\";\n ContentEventName[\"revision_created\"] = \"revision_created\";\n ContentEventName[\"delete\"] = \"delete\";\n ContentEventName[\"workflow_finished\"] = \"workflow_finished\";\n ContentEventName[\"workflow_execution_request\"] = \"workflow_execution_request\";\n ContentEventName[\"api_request\"] = \"api_request\";\n})(ContentEventName || (ContentEventName = {}));\nexport function getDocumentIds(payload) {\n // Check new input format first\n if (payload.input?.inputType === 'objectIds') {\n return payload.input.objectIds;\n }\n // Fall back to legacy objectIds field\n if (payload.objectIds) {\n return payload.objectIds;\n }\n return [];\n}\n// Task status enum for processed history\nexport var TaskStatus;\n(function (TaskStatus) {\n TaskStatus[\"SCHEDULED\"] = \"scheduled\";\n TaskStatus[\"RUNNING\"] = \"running\";\n TaskStatus[\"COMPLETED\"] = \"completed\";\n TaskStatus[\"FAILED\"] = \"failed\";\n TaskStatus[\"CANCELED\"] = \"canceled\";\n TaskStatus[\"TIMED_OUT\"] = \"timed_out\";\n TaskStatus[\"TERMINATED\"] = \"terminated\";\n TaskStatus[\"SENT\"] = \"sent\";\n TaskStatus[\"RECEIVED\"] = \"received\";\n})(TaskStatus || (TaskStatus = {}));\n// Task type enum\nexport var TaskType;\n(function (TaskType) {\n TaskType[\"ACTIVITY\"] = \"activity\";\n TaskType[\"CHILD_WORKFLOW\"] = \"childWorkflow\";\n TaskType[\"SIGNAL\"] = \"signal\";\n TaskType[\"TIMER\"] = \"timer\";\n})(TaskType || (TaskType = {}));\nexport const WorkflowExecutionStatusValues = {\n UNKNOWN: 0,\n RUNNING: 1,\n COMPLETED: 2,\n FAILED: 3,\n CANCELED: 4,\n TERMINATED: 5,\n CONTINUED_AS_NEW: 6,\n TIMED_OUT: 7,\n};\n// Keep numeric reverse lookup for existing callers without treating newer Temporal-only status\n// codes as part of Vertesia's published enum. Unknown numeric codes therefore read as undefined.\nexport const WorkflowExecutionStatus = {\n ...WorkflowExecutionStatusValues,\n 0: 'UNKNOWN',\n 1: 'RUNNING',\n 2: 'COMPLETED',\n 3: 'FAILED',\n 4: 'CANCELED',\n 5: 'TERMINATED',\n 6: 'CONTINUED_AS_NEW',\n 7: 'TIMED_OUT',\n};\nexport var AgentMessageType;\n(function (AgentMessageType) {\n AgentMessageType[AgentMessageType[\"SYSTEM\"] = 0] = \"SYSTEM\";\n AgentMessageType[AgentMessageType[\"THOUGHT\"] = 1] = \"THOUGHT\";\n AgentMessageType[AgentMessageType[\"PLAN\"] = 2] = \"PLAN\";\n AgentMessageType[AgentMessageType[\"UPDATE\"] = 3] = \"UPDATE\";\n AgentMessageType[AgentMessageType[\"COMPLETE\"] = 4] = \"COMPLETE\";\n AgentMessageType[AgentMessageType[\"WARNING\"] = 5] = \"WARNING\";\n AgentMessageType[AgentMessageType[\"ERROR\"] = 6] = \"ERROR\";\n AgentMessageType[AgentMessageType[\"ANSWER\"] = 7] = \"ANSWER\";\n AgentMessageType[AgentMessageType[\"QUESTION\"] = 8] = \"QUESTION\";\n AgentMessageType[AgentMessageType[\"REQUEST_INPUT\"] = 9] = \"REQUEST_INPUT\";\n AgentMessageType[AgentMessageType[\"IDLE\"] = 10] = \"IDLE\";\n AgentMessageType[AgentMessageType[\"TERMINATED\"] = 11] = \"TERMINATED\";\n AgentMessageType[AgentMessageType[\"STREAMING_CHUNK\"] = 12] = \"STREAMING_CHUNK\";\n AgentMessageType[AgentMessageType[\"BATCH_PROGRESS\"] = 13] = \"BATCH_PROGRESS\";\n AgentMessageType[AgentMessageType[\"RESTARTING\"] = 14] = \"RESTARTING\";\n})(AgentMessageType || (AgentMessageType = {}));\n// Type guards — check both message type and details shape for safety\nexport function isToolCallMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.THOUGHT &&\n !!details &&\n typeof details === 'object' &&\n typeof details.tool === 'string');\n}\n/** Extract the normalized resource references carried on a message's details, if any. */\nexport function getResourcesFromMessage(msg) {\n return normalizeAgentResources(msg.details?.resources);\n}\n// ============================================\n// TYPE GUARDS\n// ============================================\n/**\n * Check if a message is in compact format\n */\nexport function isCompactMessage(msg) {\n return typeof msg === 'object' && msg !== null && 't' in msg;\n}\n/**\n * Check if a message is in legacy format\n */\nexport function isLegacyMessage(msg) {\n return typeof msg === 'object' && msg !== null && 'type' in msg && !('t' in msg);\n}\n// ============================================\n// CONVERTERS\n// ============================================\n/**\n * Map old string enum values to AgentMessageType\n */\nconst STRING_TO_TYPE_MAP = {\n system: AgentMessageType.SYSTEM,\n thought: AgentMessageType.THOUGHT,\n plan: AgentMessageType.PLAN,\n update: AgentMessageType.UPDATE,\n complete: AgentMessageType.COMPLETE,\n warning: AgentMessageType.WARNING,\n error: AgentMessageType.ERROR,\n answer: AgentMessageType.ANSWER,\n question: AgentMessageType.QUESTION,\n request_input: AgentMessageType.REQUEST_INPUT,\n idle: AgentMessageType.IDLE,\n terminated: AgentMessageType.TERMINATED,\n streaming_chunk: AgentMessageType.STREAMING_CHUNK,\n batch_progress: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Map integer values to AgentMessageType (primary format)\n */\nconst INT_TO_TYPE_MAP = {\n 0: AgentMessageType.SYSTEM,\n 1: AgentMessageType.THOUGHT,\n 2: AgentMessageType.PLAN,\n 3: AgentMessageType.UPDATE,\n 4: AgentMessageType.COMPLETE,\n 5: AgentMessageType.WARNING,\n 6: AgentMessageType.ERROR,\n 7: AgentMessageType.ANSWER,\n 8: AgentMessageType.QUESTION,\n 9: AgentMessageType.REQUEST_INPUT,\n 10: AgentMessageType.IDLE,\n 11: AgentMessageType.TERMINATED,\n 12: AgentMessageType.STREAMING_CHUNK,\n 13: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Normalize message type from string or number to AgentMessageType\n */\nexport function normalizeMessageType(type) {\n // Handle integer type (current format and AgentMessageType enum values)\n if (typeof type === 'number') {\n return INT_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n // Handle string type (legacy messages from Redis with 90-day TTL)\n if (typeof type === 'string') {\n return STRING_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n return AgentMessageType.UPDATE;\n}\n/**\n * Convert legacy AgentMessage to CompactMessage\n */\nexport function toCompactMessage(legacy) {\n const compact = {\n t: normalizeMessageType(legacy.type),\n };\n if (legacy.message)\n compact.m = legacy.message;\n if (legacy.workstream_id && legacy.workstream_id !== 'main')\n compact.w = legacy.workstream_id;\n if (legacy.timestamp)\n compact.ts = legacy.timestamp;\n // Handle legacy streaming chunk details\n if (compact.t === AgentMessageType.STREAMING_CHUNK && legacy.details) {\n const d = legacy.details;\n if (d.is_final)\n compact.f = 1;\n // streaming_id and chunk_index are no longer needed\n }\n else if (legacy.details) {\n compact.d = legacy.details;\n }\n return compact;\n}\n/**\n * Parse any message format (compact or legacy) into CompactMessage.\n * Use this as the entry point for all received messages.\n */\nexport function parseMessage(data) {\n const parsed = typeof data === 'string' ? JSON.parse(data) : data;\n if (isCompactMessage(parsed))\n return parsed;\n if (isLegacyMessage(parsed))\n return toCompactMessage(parsed);\n throw new Error('Unknown message format');\n}\n/**\n * Create a compact message (convenience function for server-side)\n */\nexport function createCompactMessage(type, options = {}) {\n const compact = { t: type };\n if (options.message)\n compact.m = options.message;\n if (options.workstreamId && options.workstreamId !== 'main')\n compact.w = options.workstreamId;\n if (options.details)\n compact.d = options.details;\n if (options.isFinal)\n compact.f = 1;\n if (options.timestamp)\n compact.ts = options.timestamp;\n return compact;\n}\n/**\n * Convert CompactMessage back to AgentMessage (for UI components).\n * This allows UI to continue using familiar field names while wire format is compact.\n * @param compact The compact message to convert\n * @param workflowRunId Optional workflow_run_id (known from SSE context, not in compact format)\n */\nexport function toAgentMessage(compact, workflowRunId = '') {\n const message = {\n type: compact.t,\n timestamp: compact.ts || Date.now(),\n workflow_run_id: workflowRunId,\n message: compact.m || '',\n workstream_id: compact.w || 'main',\n };\n if (compact.d !== undefined && compact.d !== null)\n message.details = compact.d;\n // For streaming chunks, restore is_final and preserve an explicit streaming_id\n // when present. Older chunks fall back to workstream_id as their grouping key.\n if (compact.t === AgentMessageType.STREAMING_CHUNK) {\n const details = typeof compact.d === 'object' && compact.d !== null ? compact.d : {};\n const streamingId = typeof details.streaming_id === 'string' ? details.streaming_id : compact.w || 'main';\n const activityId = compact.i ?? (typeof details.activity_id === 'string' ? details.activity_id : undefined);\n message.details = {\n ...details,\n streaming_id: streamingId,\n is_final: compact.f === 1,\n ...(activityId ? { activity_id: activityId } : {}),\n };\n }\n return message;\n}\n/**\n * Status of a file being processed for conversation use.\n */\nexport var FileProcessingStatus;\n(function (FileProcessingStatus) {\n /** File is being uploaded to artifact storage */\n FileProcessingStatus[\"UPLOADING\"] = \"uploading\";\n /** File uploaded, text extraction in progress */\n FileProcessingStatus[\"PROCESSING\"] = \"processing\";\n /** File is ready for use in conversation */\n FileProcessingStatus[\"READY\"] = \"ready\";\n /** File processing failed */\n FileProcessingStatus[\"ERROR\"] = \"error\";\n})(FileProcessingStatus || (FileProcessingStatus = {}));\nexport const LOW_PRIORITY_TASK_QUEUE = 'low_priority';\n//# sourceMappingURL=workflow.js.map","/**\n * Rendering API types\n *\n * Types for rendering content to various formats (PDF, DOCX, images)\n */\nimport { WorkflowExecutionStatus } from './workflow.js';\nexport function getRenditionsPath(contentEtag, params) {\n return `renditions/${contentEtag}/${params.max_hw}`;\n}\nexport function isWorkflowTerminalStatus(status) {\n return (status === WorkflowExecutionStatus.COMPLETED ||\n status === WorkflowExecutionStatus.FAILED ||\n status === WorkflowExecutionStatus.CANCELED ||\n status === WorkflowExecutionStatus.TERMINATED ||\n status === WorkflowExecutionStatus.TIMED_OUT);\n}\n//# sourceMappingURL=rendering.js.map","/**\n * Agent Schedule Types\n *\n * Defines types for scheduling agents to run on a recurring basis using cron expressions.\n * Schedules are stored in MongoDB with execution handled by Temporal.\n */\n/**\n * Common cron expression presets for UI convenience.\n */\nexport const CRON_PRESETS = {\n EVERY_HOUR: '0 * * * *',\n EVERY_DAY_MIDNIGHT: '0 0 * * *',\n EVERY_DAY_9AM: '0 9 * * *',\n EVERY_MONDAY_MIDNIGHT: '0 0 * * MON',\n EVERY_WEEKDAY_9AM: '0 9 * * MON-FRI',\n FIRST_OF_MONTH: '0 0 1 * *',\n};\n/**\n * Human-readable descriptions for cron presets.\n */\nexport const CRON_PRESET_LABELS = {\n EVERY_HOUR: 'Every hour',\n EVERY_DAY_MIDNIGHT: 'Daily at midnight',\n EVERY_DAY_9AM: 'Daily at 9:00 AM',\n EVERY_MONDAY_MIDNIGHT: 'Every Monday at midnight',\n EVERY_WEEKDAY_9AM: 'Weekdays at 9:00 AM',\n FIRST_OF_MONTH: 'First day of month at midnight',\n};\n//# sourceMappingURL=schedule.js.map","export var ContentObjectApiHeaders;\n(function (ContentObjectApiHeaders) {\n ContentObjectApiHeaders[\"COLLECTION_ID\"] = \"x-collection-id\";\n ContentObjectApiHeaders[\"PROCESSING_PRIORITY\"] = \"x-processing-priority\";\n ContentObjectApiHeaders[\"CREATE_REVISION\"] = \"x-create-revision\";\n ContentObjectApiHeaders[\"REVISION_LABEL\"] = \"x-revision-label\";\n /**\n * @deprecated Events are now always emitted. This suppresses the Temporal-backed delivery targets (workflow, agent, and process) — webhook deliveries still fire.\n */\n ContentObjectApiHeaders[\"SUPPRESS_WORKFLOWS\"] = \"x-suppress-workflows\";\n})(ContentObjectApiHeaders || (ContentObjectApiHeaders = {}));\n/**\n * Headers for Data Store API calls.\n * Used for Cloud Run session affinity to route requests to the same instance.\n */\nexport var DataStoreApiHeaders;\n(function (DataStoreApiHeaders) {\n /** Data store ID for session affinity - routes requests for same store to same instance */\n DataStoreApiHeaders[\"DATA_STORE_ID\"] = \"x-data-store-id\";\n})(DataStoreApiHeaders || (DataStoreApiHeaders = {}));\nexport var ContentObjectStatus;\n(function (ContentObjectStatus) {\n ContentObjectStatus[\"created\"] = \"created\";\n ContentObjectStatus[\"processing\"] = \"processing\";\n ContentObjectStatus[\"ready\"] = \"ready\";\n ContentObjectStatus[\"completed\"] = \"completed\";\n ContentObjectStatus[\"failed\"] = \"failed\";\n ContentObjectStatus[\"archived\"] = \"archived\";\n})(ContentObjectStatus || (ContentObjectStatus = {}));\nexport var ContentNature;\n(function (ContentNature) {\n ContentNature[\"Video\"] = \"video\";\n ContentNature[\"Image\"] = \"image\";\n ContentNature[\"Audio\"] = \"audio\";\n ContentNature[\"Document\"] = \"document\";\n ContentNature[\"Code\"] = \"code\";\n ContentNature[\"Other\"] = \"other\";\n})(ContentNature || (ContentNature = {}));\nexport const POSTER_RENDITION_NAME = 'Poster';\nexport const AUDIO_RENDITION_NAME = 'Audio';\nexport const WEB_VIDEO_RENDITION_NAME = 'Web';\nexport const PDF_RENDITION_NAME = 'PDF';\nexport function getContentTypeRefId(type) {\n return type.id;\n}\nexport var WorkflowRuleInputType;\n(function (WorkflowRuleInputType) {\n WorkflowRuleInputType[\"single\"] = \"single\";\n WorkflowRuleInputType[\"multiple\"] = \"multiple\";\n WorkflowRuleInputType[\"none\"] = \"none\";\n})(WorkflowRuleInputType || (WorkflowRuleInputType = {}));\nexport var ImageRenditionFormat;\n(function (ImageRenditionFormat) {\n ImageRenditionFormat[\"jpeg\"] = \"jpeg\";\n ImageRenditionFormat[\"png\"] = \"png\";\n ImageRenditionFormat[\"webp\"] = \"webp\";\n})(ImageRenditionFormat || (ImageRenditionFormat = {}));\nexport const MarkdownRenditionFormat = {\n docx: 'docx',\n pdf: 'pdf',\n};\n/**\n * Matrix of supported content type → format conversions.\n * This is the authoritative source of truth for what renditions can be generated.\n *\n * Key patterns:\n * - Exact MIME types (e.g., 'application/pdf')\n * - Wildcard patterns (e.g., 'image/*', 'video/*')\n */\nconst RENDITION_COMPATIBILITY = {\n // Image formats can generate: jpeg, png, webp\n 'image/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Video formats can generate: jpeg, png (thumbnails)\n 'video/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png],\n // PDF can generate: jpeg, png, webp (page images)\n 'application/pdf': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Markdown can generate: pdf, docx (NOT jpeg/png)\n 'text/markdown': [MarkdownRenditionFormat.pdf, MarkdownRenditionFormat.docx],\n // Any text/* can generate: docx (editable export)\n 'text/*': [MarkdownRenditionFormat.docx],\n // Office documents can generate: pdf\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [MarkdownRenditionFormat.pdf],\n 'application/msword': [MarkdownRenditionFormat.pdf],\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': [MarkdownRenditionFormat.pdf],\n 'application/vnd.ms-powerpoint': [MarkdownRenditionFormat.pdf],\n};\n/**\n * Check if a specific rendition format can be generated from a content type.\n *\n * @param contentType - The MIME type of the source content (e.g., 'image/png', 'text/markdown')\n * @param format - The desired rendition format (e.g., ImageRenditionFormat.jpeg)\n * @returns true if the format can be generated from the content type\n *\n * @example\n * canGenerateRendition('image/png', ImageRenditionFormat.jpeg) // true\n * canGenerateRendition('text/markdown', ImageRenditionFormat.jpeg) // false\n * canGenerateRendition('text/markdown', MarkdownRenditionFormat.pdf) // true\n */\nexport function canGenerateRendition(contentType, format) {\n if (!contentType)\n return false;\n const formatStr = typeof format === 'string' ? format : format;\n // Check exact match first\n const exactMatch = RENDITION_COMPATIBILITY[contentType];\n if (exactMatch?.some((f) => f === formatStr)) {\n return true;\n }\n // Check wildcard patterns (e.g., 'image/*', 'video/*')\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch?.some((f) => f === formatStr)) {\n return true;\n }\n return false;\n}\nexport var ContentObjectProcessingPriority;\n(function (ContentObjectProcessingPriority) {\n ContentObjectProcessingPriority[\"normal\"] = \"normal\";\n ContentObjectProcessingPriority[\"low\"] = \"low\";\n})(ContentObjectProcessingPriority || (ContentObjectProcessingPriority = {}));\n/**\n * Get the list of rendition formats supported for a given content type.\n *\n * @param contentType - The MIME type of the source content\n * @returns Array of supported rendition formats, or empty array if none\n *\n * @example\n * getSupportedRenditionFormats('image/png') // [jpeg, png, webp]\n * getSupportedRenditionFormats('text/markdown') // [pdf, docx]\n * getSupportedRenditionFormats('text/html') // []\n */\nexport function getSupportedRenditionFormats(contentType) {\n if (!contentType)\n return [];\n // Check exact match first\n if (RENDITION_COMPATIBILITY[contentType]) {\n return [...RENDITION_COMPATIBILITY[contentType]];\n }\n // Check wildcard patterns\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch) {\n return [...wildcardMatch];\n }\n return [];\n}\n/**\n * Check if a content type supports visual (image) renditions.\n * This is useful for determining if a document can have thumbnails/previews.\n *\n * @param contentType - The MIME type of the source content\n * @returns true if the content type can generate JPEG renditions\n *\n * @example\n * supportsVisualRendition('image/png') // true\n * supportsVisualRendition('application/pdf') // true\n * supportsVisualRendition('text/markdown') // false\n */\nexport function supportsVisualRendition(contentType) {\n return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);\n}\n//# sourceMappingURL=store.js.map","export const REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE = 'requested_scope_unavailable';\nexport const NO_ACCESSIBLE_ACCOUNT_ERROR_CODE = 'no_accessible_account';\nexport const RESTRICTED_ENVIRONMENT_ERROR_CODE = 'restricted_environment';\nexport const TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE = 'token_issuance_forbidden';\nexport const ISSUE_TOKEN_FORBIDDEN_ERROR_CODES = [\n REQUESTED_SCOPE_UNAVAILABLE_ERROR_CODE,\n NO_ACCESSIBLE_ACCOUNT_ERROR_CODE,\n RESTRICTED_ENVIRONMENT_ERROR_CODE,\n TOKEN_ISSUANCE_FORBIDDEN_ERROR_CODE,\n];\n//# sourceMappingURL=sts-errors.js.map","export var TrainingSessionStatus;\n(function (TrainingSessionStatus) {\n TrainingSessionStatus[\"created\"] = \"created\";\n TrainingSessionStatus[\"building\"] = \"building\";\n TrainingSessionStatus[\"prepared\"] = \"prepared\";\n TrainingSessionStatus[\"processing\"] = \"processing\";\n TrainingSessionStatus[\"completed\"] = \"completed\";\n TrainingSessionStatus[\"cancelled\"] = \"cancelled\";\n TrainingSessionStatus[\"failed\"] = \"failed\";\n})(TrainingSessionStatus || (TrainingSessionStatus = {}));\n//# sourceMappingURL=training.js.map","/**\n * Transient-token values that exist at runtime.\n *\n * Split out of `transient-tokens.ts` so `api-schemas/invites.ts` can read the enum without importing\n * a module that derives its types from those very schemas. Re-exported from `transient-tokens.ts`.\n */\nexport var TransientTokenType;\n(function (TransientTokenType) {\n TransientTokenType[\"userInvite\"] = \"user-invite\";\n TransientTokenType[\"migration\"] = \"migration\";\n})(TransientTokenType || (TransientTokenType = {}));\n//# sourceMappingURL=transient-tokens-values.js.map","/**\n * Account values that exist at runtime — enums, constants, and the pure helpers over them.\n *\n * Split out of `user.ts` so the dependency direction can run one way. The API schemas need these\n * values (`z.enum(BillingMethod)`, `.max(ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH)`), and `user.ts`\n * needs the types the schemas infer. Both living in `user.ts` would make it import from a module\n * that imports it back; here, `user.ts` and `api-schemas/account.ts` both depend on this module and\n * nothing depends on them.\n *\n * Everything here is re-exported from `user.ts`, so existing import paths keep working — this is a\n * move, not a rename.\n */\nexport var Datacenters;\n(function (Datacenters) {\n Datacenters[\"aws\"] = \"aws\";\n Datacenters[\"gcp\"] = \"gcp\";\n Datacenters[\"azure\"] = \"azure\";\n})(Datacenters || (Datacenters = {}));\nexport var BillingMethod;\n(function (BillingMethod) {\n BillingMethod[\"stripe\"] = \"stripe\";\n BillingMethod[\"invoice\"] = \"invoice\";\n})(BillingMethod || (BillingMethod = {}));\nexport var AccountType;\n(function (AccountType) {\n AccountType[\"vertesia\"] = \"vertesia\";\n AccountType[\"partner\"] = \"partner\";\n AccountType[\"free\"] = \"free\";\n AccountType[\"customer\"] = \"customer\";\n AccountType[\"prospect\"] = \"prospect\";\n AccountType[\"unknown\"] = \"unknown\";\n})(AccountType || (AccountType = {}));\n/**\n * Quota/rate-limit tier assigned to an account. Code-defined tiers live in `@dglabs/quota`\n * (`QUOTA_TIERS`); these names must match its keys.\n * - `standard` — protective baseline limits (the default for most accounts).\n * - `enterprise` — high limits for contracted customers / internal / partners.\n *\n * An account with no explicit `quota_tier` derives its tier from its `account_type`.\n */\nexport var QuotaTier;\n(function (QuotaTier) {\n QuotaTier[\"standard\"] = \"standard\";\n QuotaTier[\"enterprise\"] = \"enterprise\";\n})(QuotaTier || (QuotaTier = {}));\nexport const ACCOUNT_APP_ACCESS_MESSAGE_MAX_LENGTH = 1000;\n//# sourceMappingURL=account-values.js.map","export * from './account-values.js';\nexport const UserRefPopulate = 'id name email picture';\n/**\n * Annotation marker (stored in {@link User.annotations}) that grants a user access to\n * non-production environments (`preview`, `preprod`). See\n * `docs/restrict-access-to-non-production-envs.md`.\n */\nexport const EARLY_ACCESS_ANNOTATION = 'early-access';\n/**\n * Business error code returned by the STS (token server) when a user is denied access to a\n * restricted (`preview`/`preprod`) environment because they lack the {@link EARLY_ACCESS_ANNOTATION}\n * annotation. The UI keys its dedicated rejection screen off this code.\n */\nexport { RESTRICTED_ENVIRONMENT_ERROR_CODE } from './sts-errors.js';\nexport const AccountRefPopulate = 'id name';\n//# sourceMappingURL=user.js.map","export function getTenantId(accountId, projectId) {\n //use the last 6 characters of the accountId as the db name\n //as in mongo the last 6 char are an incrementing counter\n const accountLast6 = accountId.slice(-6);\n const projectLast6 = projectId.slice(-6);\n return `${accountLast6}_${projectLast6}`;\n}\nexport function getTenantIdFromProject(project) {\n return getTenantId(project.account, project.id);\n}\n//# sourceMappingURL=auth.js.map","export function mergeInCodePromptSchemas(prompts) {\n const props = {};\n const required = new Set();\n for (const prompt of prompts) {\n if (prompt.schema?.properties) {\n const schema = prompt.schema;\n if (schema.required) {\n for (const prop of schema.required) {\n required.add(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n }\n const schema = Object.keys(props).length > 0\n ? {\n properties: props,\n required: Array.from(required),\n }\n : null;\n return schema;\n}\n//# sourceMappingURL=schemas.js.map","/**\n * The header a caller names an API version in, as `YYYYMMDD` — see {@link ApiVersions}.\n *\n * Declared here rather than in the client, because both ends of the negotiation need it: the\n * servers register it with `withVersionHeader` and read it when deciding how strictly to hold a\n * request to its published schema, and `@vertesia/client` sets it on every call. It kept the\n * spelling it has always had on the wire.\n */\nexport const VERSION_HEADER = 'x-api-version';\nexport var ApiVersions;\n(function (ApiVersions) {\n ApiVersions[ApiVersions[\"COMPLETION_RESULT_V1\"] = 20250925] = \"COMPLETION_RESULT_V1\";\n ApiVersions[ApiVersions[\"DOWNLOAD_URL_NO_MIME_TYPE_V1\"] = 20260210] = \"DOWNLOAD_URL_NO_MIME_TYPE_V1\";\n ApiVersions[ApiVersions[\"MEDIA_BLOB_STORAGE_V1\"] = 20260319] = \"MEDIA_BLOB_STORAGE_V1\";\n /**\n * Request bodies and parameters are rejected when they do not match the published component.\n *\n * The endpoints did not change shape at this date — the schemas they had always published\n * started being enforced. A body carrying an undeclared property against a closed component,\n * or a query parameter of the wrong type, used to be accepted and silently ignored; from here\n * it is a 400.\n *\n * Unlike the milestones above, this one is not about a route: it gates the enforcement policy\n * itself, so a caller pinned below it gets the old lenient behaviour on EVERY endpoint while\n * the mismatch is logged. Sending nothing means the current API, so the strict reading is what\n * a new caller gets by default and leniency has to be asked for.\n */\n ApiVersions[ApiVersions[\"REQUEST_CONTRACT_ENFORCEMENT_V1\"] = 20260803] = \"REQUEST_CONTRACT_ENFORCEMENT_V1\";\n})(ApiVersions || (ApiVersions = {}));\n/**\n * The API version used by current clients and published as the current OpenAPI shape.\n *\n * Keep this explicit rather than deriving it at runtime: promoting a milestone to the client\n * default is a deliberate compatibility decision. The versions test ensures this alias is\n * reconsidered whenever a newer milestone is added.\n */\nexport const CURRENT_API_VERSION = ApiVersions.REQUEST_CONTRACT_ENFORCEMENT_V1;\n/** The current API version formatted for the {@link VERSION_HEADER} wire value. */\nexport const CURRENT_API_VERSION_HEADER_VALUE = String(CURRENT_API_VERSION);\n//# sourceMappingURL=versions.js.map","export const VIEW_EXPERIENCE_SCHEMA_VERSION = 1;\n/** Build the generic reusable client route for a persisted, system, or app-contributed View. */\nexport function viewExperienceRoute(id) {\n return `/view/${encodeURIComponent(id)}`;\n}\nexport const VIEW_SEARCH_FIELD_TYPES = ['text', 'keyword', 'number', 'date', 'boolean'];\nexport const VIEW_AGENTIC_SEARCH_MODES = ['query', 'query_and_view'];\nexport const VIEW_RESULT_FIELD_FORMATS = [\n 'text',\n 'date',\n 'number',\n 'badge',\n 'user',\n 'content_type',\n 'location',\n];\nexport const VIEW_SELECTION_MODES = ['single', 'multiple'];\nexport const VIEW_ACTION_PLACEMENTS = ['toolbar', 'row', 'selection'];\nexport const VIEW_ACTION_SELECTION_REQUIREMENTS = ['none', 'single', 'multiple', 'any'];\n//# sourceMappingURL=views.js.map","/**\n * Agent Observability Telemetry Types\n *\n * These types define the event-based model for agent observability.\n */\n// ============================================================================\n// Enums\n// ============================================================================\n/**\n * Types of telemetry events\n */\nexport var AgentEventType;\n(function (AgentEventType) {\n AgentEventType[\"AgentRunStarted\"] = \"agent_run_started\";\n AgentEventType[\"AgentRunCompleted\"] = \"agent_run_completed\";\n AgentEventType[\"LlmCall\"] = \"llm_call\";\n AgentEventType[\"ToolCall\"] = \"tool_call\";\n})(AgentEventType || (AgentEventType = {}));\n/**\n * Types of LLM calls in a conversation\n */\nexport var LlmCallType;\n(function (LlmCallType) {\n /** Initial conversation start */\n LlmCallType[\"Start\"] = \"start\";\n /** Resuming with tool results */\n LlmCallType[\"ResumeTools\"] = \"resume_tools\";\n /** Resuming with user message */\n LlmCallType[\"ResumeUser\"] = \"resume_user\";\n /** Checkpoint resume (after conversation summarization) */\n LlmCallType[\"Checkpoint\"] = \"checkpoint\";\n /** Nested interaction call from within tools */\n LlmCallType[\"NestedInteraction\"] = \"nested_interaction\";\n})(LlmCallType || (LlmCallType = {}));\n/**\n * Types of tools that can be called\n */\nexport var TelemetryToolType;\n(function (TelemetryToolType) {\n /** Built-in tools (e.g., plan, search) */\n TelemetryToolType[\"Builtin\"] = \"builtin\";\n /** Interaction-based tools */\n TelemetryToolType[\"Interaction\"] = \"interaction\";\n /** Remote/MCP tools */\n TelemetryToolType[\"Remote\"] = \"remote\";\n /** Skill tools */\n TelemetryToolType[\"Skill\"] = \"skill\";\n})(TelemetryToolType || (TelemetryToolType = {}));\n//# sourceMappingURL=workflow-analytics.js.map"],"mappings":"AAYA,IAAW,GACV,SAAU,EAAY,CACnB,EAAW,SAAc,mBACzB,EAAW,UAAe,oBAC1B,EAAW,WAAgB,qBAC3B,EAAW,YAAiB,sBAC5B,EAAW,SAAc,WACzB,EAAW,UAAe,YAC1B,EAAW,UAAe,oBAC1B,EAAW,WAAgB,aAC3B,EAAW,cAAmB,gBAC9B,EAAW,yBAA8B,2BACzC,EAAW,uBAA4B,yBACvC,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,oBAAyB,sBACpC,EAAW,eAAoB,iBAC/B,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,cAAmB,gBAC9B,EAAW,cAAmB,gBAC9B,EAAW,eAAoB,kBAE/B,EAAW,aAAkB,eAE7B,EAAW,WAAgB,aAC3B,EAAW,eAAoB,iBAC/B,EAAW,aAAkB,eAC7B,EAAW,iBAAsB,mBACjC,EAAW,cAAmB,gBAC9B,EAAW,eAAoB,iBAC/B,EAAW,cAAmB,gBAC9B,EAAW,mBAAwB,qBACnC,EAAW,cAAmB,gBAC9B,EAAW,aAAkB,eAC7B,EAAW,eAAoB,iBAC/B,EAAW,oBAAyB,sBACpC,EAAW,eAAoB,iBAC/B,EAAW,UAAe,YAC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EAC1B,EACA,qBAAsB,CAClB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,gBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,uBAAwB,CACpB,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,SACV,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,MAAO,SAAU,OAAQ,QAAS,KAAK,CAClD,EACA,cAAe,CACX,KAAM,SACV,EACA,UAAW,CACP,KAAM,SACN,KAAM,CAAC,KAAM,IAAI,CACrB,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,4BAA6B,CACzB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,wBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,uBAAwB,CACpB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,kBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,iBAAkB,CACd,KAAM,SACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,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c,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,sBAAuB,CACnB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,iBACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,WAAY,CACR,KAAM,QACV,EACA,KAAM,CACF,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,aAAc,CACV,KAAM,SACN,UAAW,EACX,YAAa,qGACjB,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,6BAA8B,kBAAmB,yBAAyB,CACrF,EACA,qCAAsC,CAClC,KAAM,SACN,WAAY,CACR,QAAS,CACL,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,YAAa,6EACjB,EACA,UAAW,CACP,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,2BACjB,EACA,UAAW,CACP,KAAM,UACN,YAAa,sDACjB,EACA,WAAY,CACR,KAAM,UACN,YAAa,oEACjB,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,SAAU,KAAK,EACtB,YAAa,wNACjB,EACA,aAAc,CACV,KAAM,SACN,QAAS,EACT,YAAa,qMACjB,EACA,iBAAkB,CACd,KAAM,UACN,YAAa,iHACjB,EACA,aAAc,CACV,KAAM,UACN,QAAS,EACT,QAAS,WACT,YAAa,8DACjB,EACA,kBAAmB,CACf,KAAM,UACN,YAAa,uEACjB,EACA,OAAQ,CACJ,KAAM,4CACN,YAAa,6EACjB,EACA,YAAa,CACT,KAAM,4CACN,YAAa,8DACjB,EACA,mBAAoB,CAChB,KAAM,SACN,QAAS,EACT,QA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AS,YACT,QAAS,UACb,CACJ,EACA,YAAa,kKACjB,EACA,gBAAiB,CACb,KAAM,SACN,KAAM,CAAC,MAAO,SAAS,EACvB,YAAa,yQACjB,EACA,mBAAoB,CAChB,KAAM,SACN,KAAM,CAAC,MAAO,WAAY,MAAM,EAChC,YAAa,iOACjB,EACA,kCAAmC,CAC/B,KAAM,SACN,WAAY,CACR,GAAI,CACA,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,YAAa,CACT,KAAM,SACV,EACA,SAAU,CACN,KAAM,6BACV,EACA,WAAY,CACR,KAAM,qBACV,EACA,cAAe,CACX,KAAM,sBACV,EACA,iBAAkB,CACd,KAAM,SACN,YAAa,gEACjB,EACA,kBAAmB,CACf,KAAM,0BACN,YAAa,qJACjB,EACA,yBAA0B,CACtB,KAAM,UACN,QAAS,GACT,QAAS,iBACT,YAAa,oIACjB,EACA,2BAA4B,CACxB,KAAM,UACN,YAAa,uGACjB,EACA,aAAc,CACV,KAAM,6BACN,YAAa,wDACjB,CACJ,EACA,qBAAsB,EAC1B,EACA,mBAAoB,CAChB,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,cACX,EACA,WAAY,CACR,KAAM,QACV,EACA,YAAa,CACT,KAAM,QACV,EACA,MAAO,CACH,KAAM,QACV,EACA,iBAAkB,CACd,KAAM,QACV,EACA,kBAAmB,CACf,KAAM,QACV,EACA,cAAe,CACX,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,OAAQ,CACJ,KAAM,SACN,KAAM,CAAC,OAAQ,MAAM,CACzB,EACA,YAAa,CACT,KAAM,UACN,QAAS,kBACT,QAAS,gBACb,EACA,YAAa,CACT,KAAM,SACV,EACA,oBAAqB,CACjB,KAAM,SACV,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,OAAQ,OAAQ,MAAO,UAAU,CAC5C,EACA,YAAa,CACT,KAAM,SACN,MAAO,WACX,EACA,iBAAkB,CACd,KAAM,SACV,CACJ,EACA,SAAU,CAAC,YAAY,EACvB,qBAAsB,EAC1B,EACA,aAAc,CACV,MAAO,CACH,CACI,KAAM,6BACV,EACA,CACI,KAAM,iCACV,EACA,CACI,KAAM,uBACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,wCACV,EACA,CACI,KAAM,6BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,gCACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,qCACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,8BACV,EACA,CACI,KAAM,kCACV,EACA,CACI,KAAM,uCACV,EACA,CACI,KAAM,6CACV,EACA,CACI,KAAM,oCACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,2BACV,EACA,CACI,KAAM,4BACV,EACA,CACI,KAAM,+BACV,EACA,CACI,KAAM,6BACV,EACA,CACI,KAAM,qBACV,EACA,CACI,KAAM,4BACV,CACJ,CACJ,EACA,kBAAmB,CACf,KAAM,SACN,WAAY,CACR,WAAY,CACR,KAAM,SACN,MAAO,qBACX,EACA,SAAU,CACN,KAAM,SACN,KAAM,CACF,aACA,qCACA,0BACA,kBACA,aACA,cACA,oBACJ,CACJ,EACA,MAAO,CACH,KAAM,QACV,EACA,OAAQ,CACJ,KAAM,QACV,EACA,QAAS,CACL,KAAM,SACN,KAAM,CAAC,WAAY,SAAS,CAChC,EACA,SAAU,CACN,KAAM,QACV,EACA,KAAM,CACF,KAAM,QACV,EACA,eAAgB,CACZ,KAAM,QACV,EACA,YAAa,CACT,KAAM,SACN,KAAM,CAAC,aAAc,cAAc,CACvC,EACA,gBAAiB,CACb,KAAM,QACV,EACA,OAAQ,CACJ,KAAM,QACN,MAAO,CACH,KAAM,QACV,CACJ,EACA,mBAAoB,CAChB,KAAM,QACV,EACA,gBAAiB,CACb,K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