deepline 0.3.88 → 0.3.90
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/contracts/install-commands.json +29 -0
- package/dist/bundling-sources/sdk/src/client.ts +652 -39
- package/dist/bundling-sources/sdk/src/config.ts +77 -0
- package/dist/bundling-sources/sdk/src/http.ts +76 -30
- package/dist/bundling-sources/sdk/src/index.ts +10 -0
- package/dist/bundling-sources/sdk/src/monitor-fleet-contract.ts +1 -1
- package/dist/bundling-sources/sdk/src/pagination.ts +25 -0
- package/dist/bundling-sources/sdk/src/play.ts +15 -1
- package/dist/bundling-sources/sdk/src/plays/bundle-play-file.ts +3 -3
- package/dist/bundling-sources/sdk/src/release.ts +16 -9
- package/dist/bundling-sources/sdk/src/types.ts +106 -4
- package/dist/bundling-sources/shared_libs/integration-contracts/AGENTS.md +9 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/README.md +3 -0
- package/dist/bundling-sources/shared_libs/integration-contracts/index.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/analytics-install-guides.ts +77 -0
- package/dist/bundling-sources/shared_libs/monitors/analytics-public.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/charges.ts +125 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +686 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +54 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/public-pricing.ts +72 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/session.ts +45 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/state.ts +454 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/tamradar.ts +260 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +215 -0
- package/dist/bundling-sources/shared_libs/monitors/callback-security.ts +333 -0
- package/dist/bundling-sources/shared_libs/monitors/cursor-page.ts +42 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +16 -0
- package/dist/bundling-sources/shared_libs/monitors/framework-managed-payload-fields.ts +71 -0
- package/dist/bundling-sources/shared_libs/monitors/generated/provider-monitor-callback-admission-targets.ts +16 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +270 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +39 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-queue.ts +82 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-reconciliation.ts +59 -0
- package/dist/bundling-sources/shared_libs/monitors/lifecycle-notifications.ts +471 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/package.json +36 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +1125 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +305 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +964 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-consumer-health.ts +56 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +131 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +535 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-legacy-aliases.ts +16 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-priority-execution.ts +56 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-public-aliases.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-runtime-read-eligibility.ts +38 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +122 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-status.ts +10 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +112 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-webhook-monitor-runtime.ts +300 -0
- package/dist/bundling-sources/shared_libs/monitors/quickstart-prompts.ts +22 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +245 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-message.ts +38 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-ack-probe.ts +94 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue-delivery.ts +60 -0
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-queue.ts +60 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-install-validation.ts +93 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +332 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-radar.ts +221 -0
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +105 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +73 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +81 -0
- package/dist/bundling-sources/shared_libs/monitors/tsconfig.json +10 -0
- package/dist/bundling-sources/shared_libs/observability/build-context.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +160 -0
- package/dist/bundling-sources/shared_libs/observability/request-context.ts +68 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +654 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +35 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-work.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/neon-constants.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +272 -0
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +6 -11
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +135 -12
- package/dist/bundling-sources/shared_libs/play-runtime/async-operation.ts +66 -1
- package/dist/bundling-sources/shared_libs/play-runtime/async-play-invocation.ts +77 -0
- package/dist/bundling-sources/shared_libs/play-runtime/bounceban-batching.ts +137 -0
- package/dist/bundling-sources/shared_libs/play-runtime/checkpoint-boundaries.ts +70 -0
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +1159 -166
- package/dist/bundling-sources/shared_libs/play-runtime/coordinator-headers.ts +1 -32
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +103 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-payload-contract.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-janitor.ts +103 -0
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-sandbox-reaper.ts +725 -0
- package/dist/bundling-sources/shared_libs/play-runtime/default-batch-strategies.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-gateway-invocation-fence.ts +442 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-protocol.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/governor/rate-state-backend.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/contracts.ts +66 -0
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/job.ts +145 -0
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/ports.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/integration-operation-reader-fence/postgres-store.ts +170 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +1322 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-step-ids.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/lane-retirement-gate.ts +189 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-source-policy.ts +112 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-execution-frame.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/perf-trace.ts +127 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-artifact-runtime-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +24 -1
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/contracts.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/index.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/job.ts +41 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/ports.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +54 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/contracts.ts +114 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/engine-suspension.ts +108 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/index.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/job.ts +97 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/ports.ts +104 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/postgres-fence-adapter.ts +263 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/attempts/worker-terminal-projection.ts +64 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/contracts.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/gateway-adapter.ts +56 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/index.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/job.ts +65 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/projection/ports.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/contracts.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/index.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +142 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +102 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/contracts.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/index.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/job.ts +78 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/ports.ts +54 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/terminal/postgres-adapter.ts +71 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-batching-registry.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +28 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/receipt-status.ts +5 -8
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +23 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +168 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +90 -13
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +6 -12
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-start-admission.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/bundle.ts +0 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +14 -43
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -213
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +201 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-capacity-policy.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-contract.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-env.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +67 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-release-environment.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sandbox-contract.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +38 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-telemetry.ts +108 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +37 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +88 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-deploy-task.ts +124 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-play-run-task.ts +68 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +193 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-lifecycle.ts +269 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-queue-suffix.ts +73 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +6642 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +897 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-metrics.ts +120 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-required-env.ts +76 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +476 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-heavy-request-admission.ts +47 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +147 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/index.ts +27 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/lazy.ts +50 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +98 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-budget-state.ts +260 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-pool.ts +1416 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +1255 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +942 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +14636 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +888 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +355 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-terminal-transition.ts +46 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runner-push.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-gateway-health.ts +64 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +835 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-ledger-reconciliation.ts +1218 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-operation.ts +207 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-scheduler-schema.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-capacity.ts +123 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/scheduler-launch-read-observability.ts +78 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/submit-admission.ts +169 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/terminal-contract.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-queue-metrics.ts +34 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/worker-resource-metrics.ts +249 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sheet-attempt-sql.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/step-progress.ts +296 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/native-batch.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call/runtime-step-receipts-adapter.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +60 -15
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execution-outcome.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/vercel-protection.ts +14 -1
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +165 -0
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipts.ts +15 -23
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +169 -0
- package/dist/bundling-sources/shared_libs/play-runtime/zerobounce-batching.ts +122 -0
- package/dist/bundling-sources/shared_libs/plays/artifact-types.ts +8 -3
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +454 -17
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +19 -4
- package/dist/bundling-sources/shared_libs/plays/contracts.ts +8 -14
- package/dist/bundling-sources/shared_libs/plays/core.ts +11 -6
- package/dist/bundling-sources/shared_libs/plays/deployment-status.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +16 -11
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/email-status.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/play-grep-search.ts +39 -0
- package/dist/bundling-sources/shared_libs/plays/resolve-static-pipeline.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/share/copy.ts +271 -0
- package/dist/bundling-sources/shared_libs/plays/share/metrics.ts +140 -0
- package/dist/bundling-sources/shared_libs/plays/share/public-read-model.ts +86 -0
- package/dist/bundling-sources/shared_libs/plays/share/seo-quality.ts +181 -0
- package/dist/bundling-sources/shared_libs/plays/share/static-pipeline-summary.ts +658 -0
- package/dist/bundling-sources/shared_libs/plays/share/types.ts +197 -0
- package/dist/bundling-sources/shared_libs/plays/slack-hitl-timeout-error.ts +37 -0
- package/dist/bundling-sources/shared_libs/plays/slug.ts +115 -0
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +50 -15
- package/dist/bundling-sources/shared_libs/plays/tool-category-descriptions.ts +2 -2
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +877 -0
- package/dist/bundling-sources/shared_libs/product-notifications/configuration-draft.ts +456 -0
- package/dist/bundling-sources/shared_libs/product-notifications/configuration.ts +566 -0
- package/dist/bundling-sources/shared_libs/product-notifications/content.ts +28 -0
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +60 -0
- package/dist/bundling-sources/shared_libs/product-notifications/email.ts +246 -0
- package/dist/bundling-sources/shared_libs/product-notifications/evaluation.ts +280 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +433 -0
- package/dist/bundling-sources/shared_libs/product-notifications/legacy-slack.ts +80 -0
- package/dist/bundling-sources/shared_libs/product-notifications/overflow.ts +18 -0
- package/dist/bundling-sources/shared_libs/product-notifications/rolling-limit.ts +24 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +624 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-payload.ts +140 -0
- package/dist/bundling-sources/shared_libs/product-notifications/slack-transport.ts +75 -0
- package/dist/bundling-sources/shared_libs/product-notifications/workspace.ts +38 -0
- package/dist/bundling-sources/shared_libs/runtime-env.ts +12 -0
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +42 -0
- package/dist/bundling-sources/shared_libs/security/header-safe-env.ts +35 -0
- package/dist/bundling-sources/shared_libs/security/internal-actor.ts +50 -0
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +267 -0
- package/dist/bundling-sources/shared_libs/security/slack-sanitize.ts +133 -0
- package/dist/cli/getting-started.d.mts +52 -0
- package/dist/cli/getting-started.d.ts +52 -0
- package/dist/cli/getting-started.js +65 -0
- package/dist/cli/getting-started.mjs +36 -0
- package/dist/cli/index.d.mts +9 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.js +1611 -453
- package/dist/cli/index.mjs +1596 -447
- package/dist/{compiler-manifest-Dbov16F7.d.mts → compiler-manifest-BaJfE-5H.d.mts} +136 -10
- package/dist/{compiler-manifest-Dbov16F7.d.ts → compiler-manifest-BaJfE-5H.d.ts} +136 -10
- package/dist/index.d.mts +910 -155
- package/dist/index.d.ts +910 -155
- package/dist/index.js +550 -64
- package/dist/index.mjs +550 -64
- package/dist/install-integrity.json +193 -4
- package/dist/monitor-fleet-contract.d.mts +138 -0
- package/dist/monitor-fleet-contract.d.ts +138 -0
- package/dist/monitor-fleet-contract.js +404 -0
- package/dist/monitor-fleet-contract.mjs +367 -0
- package/dist/plays/bundle-play-file.d.mts +8 -3
- package/dist/plays/bundle-play-file.d.ts +8 -3
- package/dist/plays/bundle-play-file.mjs +100 -20
- package/dist/release.d.mts +255 -0
- package/dist/release.d.ts +255 -0
- package/dist/release.js +215 -0
- package/dist/release.mjs +188 -0
- package/package.json +23 -4
- /package/dist/bundling-sources/shared_libs/{integrations/bettercontact-execution-policy.ts → integration-contracts/bettercontact/execution-policy.ts} +0 -0
- /package/dist/bundling-sources/shared_libs/{integrations/theirstack-execution-policy.ts → integration-contracts/theirstack/execution-policy.ts} +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ProviderMonitorPostDeployGuidance } from '@deepline/monitors/provider-monitor-capability';
|
|
2
|
+
|
|
3
|
+
// Client-safe provider setup metadata. Provider monitor definitions reference
|
|
4
|
+
// these exact objects, while the integrations dialog reads them directly.
|
|
5
|
+
export const VECTOR_POST_DEPLOY_GUIDANCE = {
|
|
6
|
+
title: 'Connect Vector to this monitor',
|
|
7
|
+
steps: [
|
|
8
|
+
'In Vector, open the segment named in this monitor setup.',
|
|
9
|
+
'Add a webhook endpoint using {{callback_url}}, then select contact.visited.',
|
|
10
|
+
'Enable the webhook action on the segment and send a Vector test event.',
|
|
11
|
+
],
|
|
12
|
+
event_type: 'contact.visited',
|
|
13
|
+
documentation: [
|
|
14
|
+
{
|
|
15
|
+
label: 'Vector SiteID action integration guide',
|
|
16
|
+
url: 'https://learn.vector.co/articles/2260541690-building-an-action-integration-for-siteid',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
payload_example: {
|
|
20
|
+
type: 'contact.visited',
|
|
21
|
+
externalId: 'contact_123',
|
|
22
|
+
companyDomain: 'example.com',
|
|
23
|
+
},
|
|
24
|
+
} as const satisfies ProviderMonitorPostDeployGuidance;
|
|
25
|
+
|
|
26
|
+
export const RB2B_POST_DEPLOY_GUIDANCE = {
|
|
27
|
+
title: 'Connect RB2B to this monitor',
|
|
28
|
+
steps: [
|
|
29
|
+
'In RB2B, open Integrations and choose Webhook.',
|
|
30
|
+
'Paste {{callback_url}} as the single webhook URL and save.',
|
|
31
|
+
"Use RB2B's Send a Test Event action to verify the connection.",
|
|
32
|
+
],
|
|
33
|
+
documentation: [
|
|
34
|
+
{
|
|
35
|
+
label: 'RB2B webhook setup guide',
|
|
36
|
+
url: 'https://support.rb2b.com/en/articles/8976614-setup-guide-webhook',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
payload_example: {
|
|
40
|
+
'LinkedIn URL': 'https://www.linkedin.com/in/example',
|
|
41
|
+
Website: 'https://example.com',
|
|
42
|
+
},
|
|
43
|
+
} as const satisfies ProviderMonitorPostDeployGuidance;
|
|
44
|
+
|
|
45
|
+
export const SNITCHER_POST_DEPLOY_GUIDANCE = {
|
|
46
|
+
title: 'Install Deepline Analytics',
|
|
47
|
+
steps: [
|
|
48
|
+
'Create the tracker code in Deepline, then paste it in your site’s document head.',
|
|
49
|
+
'Confirm cookie consent before persistent tracking when your privacy policy requires it.',
|
|
50
|
+
],
|
|
51
|
+
documentation: [
|
|
52
|
+
{
|
|
53
|
+
label: 'Deepline Analytics setup guide',
|
|
54
|
+
url: 'https://docs.snitcher.com/powered-by-snitcher/radar/installation',
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
payload_example: {
|
|
58
|
+
session_uuid: '00000000-0000-4000-8000-000000000001',
|
|
59
|
+
start_time: '2026-01-01T00:00:00.000Z',
|
|
60
|
+
last_activity: '2026-01-01T00:01:00.000Z',
|
|
61
|
+
engagement_time: 60,
|
|
62
|
+
user_properties: { $uuid: 'deepline-test-visitor' },
|
|
63
|
+
events: [
|
|
64
|
+
{ event_name: '$pageview', created_at: '2026-01-01T00:00:00.000Z' },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
} as const satisfies ProviderMonitorPostDeployGuidance;
|
|
68
|
+
|
|
69
|
+
export const TRACKING_PROVIDER_POST_DEPLOY_GUIDANCE = {
|
|
70
|
+
vector: VECTOR_POST_DEPLOY_GUIDANCE,
|
|
71
|
+
rb2b: RB2B_POST_DEPLOY_GUIDANCE,
|
|
72
|
+
snitcher: SNITCHER_POST_DEPLOY_GUIDANCE,
|
|
73
|
+
} as const;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { TRACKING_PROVIDER_POST_DEPLOY_GUIDANCE } from '@deepline/monitors/tracking-provider-guidance';
|
|
2
|
+
import {
|
|
3
|
+
ANALYTICS_INTEGRATION_SLUG,
|
|
4
|
+
ANALYTICS_PUBLIC_TOOL,
|
|
5
|
+
} from '@deepline/monitors/analytics-public';
|
|
6
|
+
|
|
7
|
+
export const TRACKING_PROVIDER_INTEGRATIONS = {
|
|
8
|
+
vector: {
|
|
9
|
+
provider: 'vector',
|
|
10
|
+
displayName: 'Vector',
|
|
11
|
+
tool: 'vector.visitor_events',
|
|
12
|
+
monitorKey: 'vector-high-intent-visitors',
|
|
13
|
+
},
|
|
14
|
+
rb2b: {
|
|
15
|
+
provider: 'rb2b',
|
|
16
|
+
displayName: 'RB2B',
|
|
17
|
+
tool: 'rb2b.visitor_events',
|
|
18
|
+
monitorKey: 'rb2b-website-visitors',
|
|
19
|
+
},
|
|
20
|
+
[ANALYTICS_INTEGRATION_SLUG]: {
|
|
21
|
+
provider: 'snitcher',
|
|
22
|
+
displayName: 'Deepline Analytics',
|
|
23
|
+
// Used only by the server-side monitor adapter to resolve upstream wiring.
|
|
24
|
+
tool: 'snitcher.website_sessions',
|
|
25
|
+
publicTool: ANALYTICS_PUBLIC_TOOL,
|
|
26
|
+
monitorKey: 'snitcher-website-sessions',
|
|
27
|
+
},
|
|
28
|
+
} as const;
|
|
29
|
+
|
|
30
|
+
export type TrackingProviderIntegration =
|
|
31
|
+
(typeof TRACKING_PROVIDER_INTEGRATIONS)[keyof typeof TRACKING_PROVIDER_INTEGRATIONS] & {
|
|
32
|
+
docsUrl: string;
|
|
33
|
+
docsLabel: string;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export function getTrackingProviderIntegration(
|
|
37
|
+
provider: string,
|
|
38
|
+
): TrackingProviderIntegration | null {
|
|
39
|
+
const integration =
|
|
40
|
+
TRACKING_PROVIDER_INTEGRATIONS[
|
|
41
|
+
provider as keyof typeof TRACKING_PROVIDER_INTEGRATIONS
|
|
42
|
+
];
|
|
43
|
+
if (!integration) return null;
|
|
44
|
+
const docs =
|
|
45
|
+
TRACKING_PROVIDER_POST_DEPLOY_GUIDANCE[
|
|
46
|
+
integration.provider as keyof typeof TRACKING_PROVIDER_POST_DEPLOY_GUIDANCE
|
|
47
|
+
]?.documentation[0];
|
|
48
|
+
if (!docs) return null;
|
|
49
|
+
return { ...integration, docsUrl: docs.url, docsLabel: docs.label };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function trackingProviderWebhookSetup(
|
|
53
|
+
provider: string,
|
|
54
|
+
webhookEndpoint: string,
|
|
55
|
+
): {
|
|
56
|
+
webhook_endpoint: string;
|
|
57
|
+
event_type?: 'contact.visited';
|
|
58
|
+
instructions: string[];
|
|
59
|
+
} | null {
|
|
60
|
+
const integration = getTrackingProviderIntegration(
|
|
61
|
+
provider === 'snitcher' ? ANALYTICS_INTEGRATION_SLUG : provider,
|
|
62
|
+
);
|
|
63
|
+
const guidance = integration
|
|
64
|
+
? TRACKING_PROVIDER_POST_DEPLOY_GUIDANCE[
|
|
65
|
+
integration.provider as keyof typeof TRACKING_PROVIDER_POST_DEPLOY_GUIDANCE
|
|
66
|
+
]
|
|
67
|
+
: null;
|
|
68
|
+
if (!guidance) return null;
|
|
69
|
+
return {
|
|
70
|
+
webhook_endpoint: webhookEndpoint,
|
|
71
|
+
...('event_type' in guidance && guidance.event_type === 'contact.visited'
|
|
72
|
+
? { event_type: guidance.event_type }
|
|
73
|
+
: {}),
|
|
74
|
+
// The dialog shows the URL in a dedicated copy target, so retain its
|
|
75
|
+
// compact `webhook_endpoint` wording while deriving every step from the
|
|
76
|
+
// same metadata used by CLI/API guidance.
|
|
77
|
+
instructions: guidance.steps.map((step) =>
|
|
78
|
+
step.replaceAll('{{callback_url}}', 'webhook_endpoint'),
|
|
79
|
+
),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* True while running inside a production build — Vercel/CI `next build` (where
|
|
3
|
+
* `CI=1`) and the prebuilt-artifact scripts, plus the prerender phase (where
|
|
4
|
+
* `NEXT_PHASE` is set). Use it to silence high-volume per-operation diagnostics
|
|
5
|
+
* that flood the build log with no build-time signal; they still emit at runtime
|
|
6
|
+
* and in local dev for Axiom/perf debugging.
|
|
7
|
+
*/
|
|
8
|
+
export function isBuildContext(): boolean {
|
|
9
|
+
return (
|
|
10
|
+
process.env.CI === '1' ||
|
|
11
|
+
process.env.NEXT_PHASE === 'phase-production-build'
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import 'server-only';
|
|
2
|
+
|
|
3
|
+
import { workUnitAsyncStorage } from 'next/dist/server/app-render/work-unit-async-storage.external';
|
|
4
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
5
|
+
|
|
6
|
+
export type LogMetadata = Record<string, unknown>;
|
|
7
|
+
|
|
8
|
+
type RequestStoreLike = {
|
|
9
|
+
headers?: unknown;
|
|
10
|
+
url?: { pathname?: string; search?: string };
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const storage = new AsyncLocalStorage<LogMetadata>();
|
|
14
|
+
const CONSOLE_METHODS = ['log', 'info', 'warn', 'error', 'debug'] as const;
|
|
15
|
+
const LOG_REQUEST_ID_HEADER = 'x-deepline-request-id';
|
|
16
|
+
const LOG_REQUEST_PATH_HEADER = 'x-deepline-request-path';
|
|
17
|
+
const LOG_REQUEST_METHOD_HEADER = 'x-deepline-request-method';
|
|
18
|
+
|
|
19
|
+
let isPatched = false;
|
|
20
|
+
|
|
21
|
+
function isPlainRecord(value: unknown): value is Record<string, unknown> {
|
|
22
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) return false;
|
|
23
|
+
const prototype = Object.getPrototypeOf(value);
|
|
24
|
+
return prototype === Object.prototype || prototype === null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function normalizeText(value: string | null | undefined): string | null {
|
|
28
|
+
if (!value) return null;
|
|
29
|
+
const trimmed = String(value).trim();
|
|
30
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function safeHeaderValue(container: unknown, key: string): string | null {
|
|
34
|
+
if (!container || typeof container !== 'object') return null;
|
|
35
|
+
if (
|
|
36
|
+
'then' in (container as Record<string, unknown>) &&
|
|
37
|
+
typeof (container as { then: unknown }).then === 'function'
|
|
38
|
+
) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const getter = (container as { get?: (name: string) => unknown }).get;
|
|
42
|
+
if (typeof getter !== 'function') return null;
|
|
43
|
+
try {
|
|
44
|
+
const value = getter.call(container, key);
|
|
45
|
+
return normalizeText(typeof value === 'string' ? value : null);
|
|
46
|
+
} catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function getRequestStoreFromNext(): unknown {
|
|
52
|
+
try {
|
|
53
|
+
return workUnitAsyncStorage.getStore?.() as unknown;
|
|
54
|
+
} catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function getRequestMetadataFromHeaders(): Record<string, string> | null {
|
|
60
|
+
const requestStore = getRequestStoreFromNext() as RequestStoreLike | null;
|
|
61
|
+
if (!requestStore?.headers) return null;
|
|
62
|
+
|
|
63
|
+
const requestHeaders = requestStore.headers;
|
|
64
|
+
const requestId = normalizeText(
|
|
65
|
+
safeHeaderValue(requestHeaders, LOG_REQUEST_ID_HEADER) ??
|
|
66
|
+
safeHeaderValue(requestHeaders, 'x-vercel-id') ??
|
|
67
|
+
safeHeaderValue(requestHeaders, 'x-request-id'),
|
|
68
|
+
);
|
|
69
|
+
const requestPath =
|
|
70
|
+
normalizeText(safeHeaderValue(requestHeaders, LOG_REQUEST_PATH_HEADER)) ??
|
|
71
|
+
((): string | null => {
|
|
72
|
+
const pathFromStore =
|
|
73
|
+
requestStore.url &&
|
|
74
|
+
typeof requestStore.url === 'object' &&
|
|
75
|
+
'pathname' in requestStore.url
|
|
76
|
+
? String(requestStore.url.pathname ?? '').trim()
|
|
77
|
+
: '';
|
|
78
|
+
return normalizeText(pathFromStore);
|
|
79
|
+
})();
|
|
80
|
+
const requestMethod =
|
|
81
|
+
normalizeText(safeHeaderValue(requestHeaders, LOG_REQUEST_METHOD_HEADER)) ??
|
|
82
|
+
null;
|
|
83
|
+
const vercelRequestId = normalizeText(
|
|
84
|
+
safeHeaderValue(requestHeaders, 'x-vercel-id'),
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
if (!requestId && !requestPath && !requestMethod && !vercelRequestId) {
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const metadata: Record<string, string> = {};
|
|
92
|
+
if (requestId) {
|
|
93
|
+
metadata.request_id = requestId;
|
|
94
|
+
metadata.requestId = requestId;
|
|
95
|
+
}
|
|
96
|
+
if (requestPath) metadata.request_path = requestPath;
|
|
97
|
+
if (requestMethod) metadata.request_method = requestMethod;
|
|
98
|
+
if (vercelRequestId) {
|
|
99
|
+
metadata.vercel_request_id = vercelRequestId;
|
|
100
|
+
metadata.vercelRequestId = vercelRequestId;
|
|
101
|
+
}
|
|
102
|
+
return metadata;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function getActiveLogMetadata(): LogMetadata {
|
|
106
|
+
const contextMetadata = storage.getStore();
|
|
107
|
+
const requestMetadata = getRequestMetadataFromHeaders();
|
|
108
|
+
|
|
109
|
+
if (!contextMetadata && requestMetadata) return requestMetadata;
|
|
110
|
+
if (!requestMetadata) return contextMetadata ?? {};
|
|
111
|
+
return { ...requestMetadata, ...contextMetadata };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function mergeLogArgs(args: unknown[], metadata: LogMetadata): unknown[] {
|
|
115
|
+
if (args.length === 0) return [metadata];
|
|
116
|
+
const last = args[args.length - 1];
|
|
117
|
+
if (isPlainRecord(last)) {
|
|
118
|
+
return [...args.slice(0, -1), { ...metadata, ...last }];
|
|
119
|
+
}
|
|
120
|
+
return [...args, metadata];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function patchConsoleWithMetadata(): void {
|
|
124
|
+
if (isPatched) return;
|
|
125
|
+
isPatched = true;
|
|
126
|
+
const consoleRef = console as unknown as Record<
|
|
127
|
+
(typeof CONSOLE_METHODS)[number],
|
|
128
|
+
(...args: unknown[]) => void
|
|
129
|
+
>;
|
|
130
|
+
|
|
131
|
+
for (const method of CONSOLE_METHODS) {
|
|
132
|
+
const original = consoleRef[method].bind(console);
|
|
133
|
+
consoleRef[method] = ((...args: unknown[]) => {
|
|
134
|
+
const metadata = getActiveLogMetadata();
|
|
135
|
+
if (!metadata || Object.keys(metadata).length === 0) {
|
|
136
|
+
original(...args);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
original(...mergeLogArgs(args, metadata));
|
|
140
|
+
}) as (...args: unknown[]) => void;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function setLogMetadata(metadata: LogMetadata): void {
|
|
145
|
+
patchConsoleWithMetadata();
|
|
146
|
+
const current = storage.getStore() ?? {};
|
|
147
|
+
storage.enterWith({ ...current, ...metadata });
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function withLogMetadata<T>(metadata: LogMetadata, fn: () => T): T {
|
|
151
|
+
patchConsoleWithMetadata();
|
|
152
|
+
const current = storage.getStore() ?? {};
|
|
153
|
+
return storage.run({ ...current, ...metadata }, fn);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function getCurrentRequestMetadata(): LogMetadata {
|
|
157
|
+
return getActiveLogMetadata();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
patchConsoleWithMetadata();
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
const REQUEST_ID_PREFIX = 'req_';
|
|
4
|
+
|
|
5
|
+
export type RequestLogMetadata = Record<string, unknown>;
|
|
6
|
+
|
|
7
|
+
export type RequestLike = {
|
|
8
|
+
method: string;
|
|
9
|
+
headers: { get(name: string): string | null };
|
|
10
|
+
nextUrl?: { pathname: string };
|
|
11
|
+
url?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function normalizeText(value: string | null | undefined): string | null {
|
|
15
|
+
if (!value) return null;
|
|
16
|
+
const trimmed = String(value).trim();
|
|
17
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function resolveRequestPath(req: RequestLike): string {
|
|
21
|
+
if (req.nextUrl?.pathname) return req.nextUrl.pathname;
|
|
22
|
+
if (req.url) {
|
|
23
|
+
try {
|
|
24
|
+
return new URL(req.url).pathname;
|
|
25
|
+
} catch {
|
|
26
|
+
return String(req.url);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return '(unknown)';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function resolveRequestId(
|
|
33
|
+
req: RequestLike,
|
|
34
|
+
requestId: string | null | undefined,
|
|
35
|
+
): string {
|
|
36
|
+
const explicit = normalizeText(requestId);
|
|
37
|
+
if (explicit) return explicit;
|
|
38
|
+
const vercelRequestId = normalizeText(req.headers.get('x-vercel-id'));
|
|
39
|
+
if (vercelRequestId) return vercelRequestId;
|
|
40
|
+
return `${REQUEST_ID_PREFIX}${randomUUID().replace(/-/g, '').slice(0, 12)}`;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function buildRequestLogMetadata(
|
|
44
|
+
req: RequestLike,
|
|
45
|
+
input: {
|
|
46
|
+
requestId?: string | null;
|
|
47
|
+
requestPath?: string | null;
|
|
48
|
+
requestMethod?: string | null;
|
|
49
|
+
extraMetadata?: RequestLogMetadata;
|
|
50
|
+
} = {},
|
|
51
|
+
): RequestLogMetadata {
|
|
52
|
+
const resolvedRequestId = resolveRequestId(req, input.requestId);
|
|
53
|
+
const vercelRequestId = normalizeText(req.headers.get('x-vercel-id'));
|
|
54
|
+
const resolvedRequestPath =
|
|
55
|
+
normalizeText(input.requestPath) ?? resolveRequestPath(req);
|
|
56
|
+
const resolvedRequestMethod =
|
|
57
|
+
normalizeText(input.requestMethod) ?? req.method.toUpperCase();
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
request_id: resolvedRequestId,
|
|
61
|
+
requestId: resolvedRequestId,
|
|
62
|
+
request_path: resolvedRequestPath,
|
|
63
|
+
request_method: resolvedRequestMethod,
|
|
64
|
+
...(vercelRequestId ? { vercel_request_id: vercelRequestId } : {}),
|
|
65
|
+
...(vercelRequestId ? { vercelRequestId } : {}),
|
|
66
|
+
...(input.extraMetadata ?? {}),
|
|
67
|
+
};
|
|
68
|
+
}
|