eve 0.67.0 → 0.67.2
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/CHANGELOG.md +19 -0
- package/dist/src/channel/channel-address.d.ts +2 -2
- package/dist/src/channel/compiled-channel.d.ts +3 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -18
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.d.ts +3 -2
- package/dist/src/channel/resolve-text.d.ts +2 -1
- package/dist/src/channel/schedule-auth.d.ts +0 -2
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/schedule.d.ts +2 -2
- package/dist/src/channel/session-callback.d.ts +2 -1
- package/dist/src/channel/types.d.ts +0 -7
- package/dist/src/chunks/{use-eve-agent-OCHP4s0z.js → use-eve-agent-D4HVZBjn.js} +1 -1
- package/dist/src/chunks/{use-eve-agent-DzdyI97Z.js → use-eve-agent-DXcE_8Ja.js} +1 -1
- package/dist/src/cli/acp/command.d.ts +2 -1
- package/dist/src/cli/agent-command.d.ts +2 -1
- package/dist/src/cli/agent-detection.d.ts +0 -1
- package/dist/src/cli/agent-detection.js +1 -1
- package/dist/src/cli/application-command.d.ts +2 -1
- package/dist/src/cli/application-root.d.ts +3 -8
- package/dist/src/cli/application-root.js +1 -1
- package/dist/src/cli/commands/agent-instructions.d.ts +0 -4
- package/dist/src/cli/commands/agent-instructions.js +3 -3
- package/dist/src/cli/commands/extension-init.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init-project.d.ts +0 -1
- package/dist/src/cli/commands/init-project.js +1 -1
- package/dist/src/cli/commands/init-target.d.ts +1 -1
- package/dist/src/cli/commands/init-telemetry.d.ts +2 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/registry-declared-setups.d.ts +2 -1
- package/dist/src/cli/commands/registry-install-transaction.d.ts +0 -13
- package/dist/src/cli/commands/registry-install-transaction.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
- package/dist/src/cli/commands/registry-presentation.d.ts +0 -1
- package/dist/src/cli/commands/registry-presentation.js +1 -1
- package/dist/src/cli/commands/registry-project.d.ts +2 -1
- package/dist/src/cli/commands/registry.d.ts +0 -4
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/setup-headless.d.ts +2 -1
- package/dist/src/cli/commands/vercel-non-interactive.d.ts +2 -1
- package/dist/src/cli/dev/diagnostic-dump.d.ts +0 -2
- package/dist/src/cli/dev/diagnostic-dump.js +1 -1
- package/dist/src/cli/dev/diagnostic-sink.d.ts +3 -2
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/tui/agent-header.d.ts +2 -1
- package/dist/src/cli/dev/tui/argument-typeahead.d.ts +2 -1
- package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/errors.d.ts +2 -7
- package/dist/src/cli/dev/tui/errors.js +1 -1
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +2 -1
- package/dist/src/cli/dev/tui/line-editor.d.ts +1 -1
- package/dist/src/cli/dev/tui/mcp-connection-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +4 -3
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +2 -1
- package/dist/src/cli/dev/tui/provider-picker.d.ts +3 -2
- package/dist/src/cli/dev/tui/question-panel.d.ts +2 -1
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +3 -4
- package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
- package/dist/src/cli/dev/tui/remote-connection-probe.d.ts +3 -2
- package/dist/src/cli/dev/tui/runner.d.ts +0 -1
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-panel.d.ts +2 -2
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +2 -2
- package/dist/src/cli/dev/tui/status-line.d.ts +2 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +3 -2
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -2
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +3 -2
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-content.d.ts +0 -9
- package/dist/src/cli/dev/tui/traces/trace-content.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-view.d.ts +3 -2
- package/dist/src/cli/dev/tui/traces/trace-viewer-session.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +2 -3
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
- package/dist/src/cli/dev/ui-options.d.ts +3 -2
- package/dist/src/cli/dev/url-target.d.ts +2 -1
- package/dist/src/cli/invoke/command.d.ts +0 -11
- package/dist/src/cli/invoke/command.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/telemetry/index.d.ts +0 -6
- package/dist/src/cli/telemetry/preference.d.ts +2 -1
- package/dist/src/cli/ui/alt-screen.d.ts +3 -2
- package/dist/src/cli/ui/live-region.d.ts +3 -2
- package/dist/src/cli/ui/output.d.ts +1 -16
- package/dist/src/cli/ui/output.js +2 -5
- package/dist/src/client/eve-agent-store-helpers.d.ts +0 -1
- package/dist/src/client/eve-agent-store-helpers.js +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +2 -1
- package/dist/src/client/session-utils.d.ts +3 -2
- package/dist/src/compiled/.vendor-stamp.json +6 -6
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +4 -3
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +23 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +69 -36
- package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +25 -22
- package/dist/src/compiled/@workflow/core/runtime/run-spec-version.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +59 -1
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +3 -2
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +34 -12
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/serialization.d.ts +7 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +29 -0
- package/dist/src/compiled/@workflow/core/types.d.ts +1 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +13 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/events.d.ts +14 -4
- package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +2 -1
- package/dist/src/compiled/@workflow/world/shared.d.ts +24 -0
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +23 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DzJovO_f.js → attribute-changes-D721NpZv.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/{dist-BQSf8Hax.js → dist-BUFGAKRb.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/dist-CaNNONeg.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{frames-qKc30rjg.js → frames-Dr9fHWdo.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{global-BQnKzRXo.js → global-DKbOgrts.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/helpers-DkKxg_yn.js +1 -0
- package/dist/src/compiled/_chunks/workflow/logger-D4GJNTk4.js +14 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-uTW-jBYz.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-5DmiMN9b.js +1 -0
- package/dist/src/compiled/_chunks/workflow/serialization-CNIYl1D3.js +3 -0
- package/dist/src/compiled/_chunks/workflow/sleep-DFKgN7UG.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-3_1djUuL.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-BrsMYqJg.js → ws-transport--rYOVIaf.js} +1 -1
- package/dist/src/compiler/artifacts.d.ts +4 -27
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/compile-agent.d.ts +2 -1
- package/dist/src/compiler/compile-agent.js +1 -1
- package/dist/src/compiler/diagnostics.d.ts +0 -11
- package/dist/src/compiler/diagnostics.js +1 -1
- package/dist/src/compiler/manifest.d.ts +0 -4
- package/dist/src/compiler/module-map.d.ts +1 -5
- package/dist/src/compiler/module-map.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +2 -1
- package/dist/src/compiler/normalize-instructions.d.ts +2 -6
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +0 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +2 -1
- package/dist/src/compiler/project-sources.d.ts +0 -14
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +1 -2
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/context/build-base-tool-context.d.ts +2 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +0 -4
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +0 -1
- package/dist/src/context/dynamic-tool-metadata.js +1 -1
- package/dist/src/context/memory-lifecycle.d.ts +0 -8
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/discover/connections.d.ts +0 -15
- package/dist/src/discover/connections.js +1 -1
- package/dist/src/discover/diagnostics.d.ts +0 -12
- package/dist/src/discover/diagnostics.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/discover-subagent.d.ts +0 -1
- package/dist/src/discover/discover-subagent.js +1 -1
- package/dist/src/discover/extensions.d.ts +3 -10
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/filesystem.d.ts +5 -9
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/grammar.d.ts +0 -46
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +5 -4
- package/dist/src/discover/memory.d.ts +0 -1
- package/dist/src/discover/memory.js +1 -1
- package/dist/src/discover/named-source-directory.js +1 -1
- package/dist/src/discover/project-source.d.ts +2 -1
- package/dist/src/discover/project.js +1 -1
- package/dist/src/discover/sandbox.js +1 -1
- package/dist/src/discover/skills.d.ts +0 -4
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/evals/cli/eval-client.d.ts +2 -1
- package/dist/src/evals/judge.d.ts +2 -1
- package/dist/src/evals/runner/execute-task.d.ts +1 -1
- package/dist/src/evals/types.d.ts +1 -1
- package/dist/src/eve-channel/support.d.ts +1 -3
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +2 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/effective-agent-config.d.ts +2 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +3 -5
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/history-view.d.ts +2 -1
- package/dist/src/execution/node-step.d.ts +3 -2
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/active-handles.d.ts +2 -4
- package/dist/src/execution/sandbox/active-handles.js +1 -1
- package/dist/src/execution/sandbox/bash.d.ts +2 -1
- package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +3 -2
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -3
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +1 -1
- package/dist/src/execution/sandbox/dockerfile.d.ts +0 -1
- package/dist/src/execution/sandbox/dockerfile.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +2 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +1 -18
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts +0 -11
- package/dist/src/execution/sandbox/require-sandbox.js +1 -1
- package/dist/src/execution/sandbox/truncate-output.d.ts +2 -5
- package/dist/src/execution/sandbox/truncate-output.js +2 -2
- package/dist/src/execution/session/admission.d.ts +3 -2
- package/dist/src/execution/session/event-sink.d.ts +2 -1
- package/dist/src/execution/session/finalization.d.ts +2 -1
- package/dist/src/execution/session/handoff.d.ts +3 -2
- package/dist/src/execution/session/route-selected-delivery.d.ts +2 -1
- package/dist/src/execution/session/timeout-control.d.ts +2 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +1 -1
- package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
- package/dist/src/execution/session.d.ts +3 -2
- package/dist/src/execution/stable-workflow-names.d.ts +0 -6
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/ask-question-workflow.js +1 -1
- package/dist/src/execution/tools/connection-search.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +2 -1
- package/dist/src/execution/tools/subagent/start.js +1 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +4 -3
- package/dist/src/execution/tools/workflow/background.d.ts +2 -6
- package/dist/src/execution/tools/workflow/background.js +1 -1
- package/dist/src/execution/tools/workflow/owner-channels.d.ts +1 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +2 -1
- package/dist/src/execution/web-fetch/execute.d.ts +2 -2
- package/dist/src/execution/web-fetch/request.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +0 -2
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +57 -57
- package/dist/src/extensions/code/extension/lib/computer-use.d.ts +1 -1
- package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +5 -5
- package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
- package/dist/src/extensions/code/extension/lib/guidelines.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/patch.d.ts +3 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +1 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +2 -1
- package/dist/src/framework/host-inventory.d.ts +3 -2
- package/dist/src/harness/approval-candidates.d.ts +4 -3
- package/dist/src/harness/approval-delivery-coordinator.d.ts +2 -1
- package/dist/src/harness/authorization.d.ts +0 -9
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/compaction-prompt.d.ts +2 -1
- package/dist/src/harness/coordination.d.ts +0 -4
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/input-requests.d.ts +1 -10
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +0 -5
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-safety.d.ts +9 -0
- package/dist/src/harness/provider-safety.js +1 -1
- package/dist/src/harness/provider-tools.d.ts +2 -1
- package/dist/src/harness/session-limit-continuation.d.ts +0 -4
- package/dist/src/harness/session-limit-continuation.js +1 -1
- package/dist/src/harness/session-usage-limits.d.ts +2 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.d.ts +2 -1
- package/dist/src/harness/turn-cancellation.d.ts +2 -7
- package/dist/src/harness/turn-cancellation.js +1 -1
- package/dist/src/harness/turn-client-context.d.ts +2 -1
- package/dist/src/harness/workflow-stream-error.d.ts +0 -7
- package/dist/src/harness/workflow-stream-error.js +1 -1
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/state.d.ts +2 -2
- package/dist/src/internal/agent-name.d.ts +0 -2
- package/dist/src/internal/agent-name.js +1 -1
- package/dist/src/internal/application/build-profile.d.ts +2 -2
- package/dist/src/internal/application/cache-metadata.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +1 -1
- package/dist/src/internal/application/dev-environment.d.ts +2 -8
- package/dist/src/internal/application/dev-environment.js +1 -1
- package/dist/src/internal/application/optional-package-import.js +1 -1
- package/dist/src/internal/application/optional-package-install.js +1 -1
- package/dist/src/internal/application/output-publication-lock.js +1 -1
- package/dist/src/internal/application/output-publication.d.ts +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/paths.d.ts +0 -5
- package/dist/src/internal/application/paths.js +1 -1
- package/dist/src/internal/application/tsconfig-dependencies.d.ts +0 -16
- package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
- package/dist/src/internal/authored-asset-import-plugin.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-definition/source-identity.d.ts +1 -1
- package/dist/src/internal/authored-module-evaluation-error.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +2 -1
- package/dist/src/internal/bundler/extension-scope-plugin.js +1 -1
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +3 -12
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/internal/bundler/vendored-dependency-log.d.ts +7 -0
- package/dist/src/internal/bundler/vendored-dependency-log.js +1 -0
- package/dist/src/internal/eve-project-root.d.ts +0 -3
- package/dist/src/internal/eve-project-root.js +1 -1
- package/dist/src/internal/external-resources-snapshot.d.ts +1 -1
- package/dist/src/internal/external-resources.d.ts +0 -1
- package/dist/src/internal/external-resources.js +1 -1
- package/dist/src/internal/gateway.d.ts +2 -0
- package/dist/src/internal/gateway.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/instrumentation-layout.js +1 -1
- package/dist/src/internal/invocation/metadata.d.ts +1 -1
- package/dist/src/internal/materialized-authored-modules.d.ts +2 -1
- package/dist/src/internal/materialized-authored-modules.js +1 -1
- package/dist/src/internal/mcp/protected-resource.d.ts +2 -1
- package/dist/src/internal/mcp/streamable-http-server.d.ts +4 -5
- package/dist/src/internal/mcp/streamable-http-server.js +1 -1
- package/dist/src/internal/model-catalog.d.ts +2 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts-retention.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +0 -4
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-local-roots.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +0 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +0 -1
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/build-extension.js +1 -1
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +2 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/extension-external-dependency-plugin.js +1 -1
- package/dist/src/internal/nitro/host/local-tracing-runtime-plugin.js +1 -1
- package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -1
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +2 -26
- package/dist/src/internal/nitro/host/schedule-task-routes.js +2 -2
- package/dist/src/internal/nitro/host/start-production-server.js +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +2 -1
- package/dist/src/internal/nitro/routes/channel-route-context.d.ts +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +2 -1
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -1
- package/dist/src/internal/vercel/assemble-eve-services.d.ts +3 -2
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +2 -3
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/project-link.d.ts +2 -1
- package/dist/src/internal/vercel/project-link.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow/development-world-codec.d.ts +2 -1
- package/dist/src/internal/workflow/development-world-server.js +1 -1
- package/dist/src/internal/workflow/world-compatibility.d.ts +2 -1
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -9
- package/dist/src/internal/workflow-bundle/builder-support.js +2 -3
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +0 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/protocol/activity.d.ts +3 -3
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/baggage.d.ts +2 -2
- package/dist/src/protocol/cancel-turn.d.ts +0 -2
- package/dist/src/protocol/event-dedupe.d.ts +2 -1
- package/dist/src/protocol/event-id.d.ts +0 -6
- package/dist/src/protocol/event-id.js +1 -1
- package/dist/src/protocol/traceparent.d.ts +2 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -4
- package/dist/src/public/channels/chat-sdk/audience.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.d.ts +1 -1
- package/dist/src/public/channels/github/api.d.ts +2 -22
- package/dist/src/public/channels/github/api.js +1 -1
- package/dist/src/public/channels/github/auth.d.ts +0 -9
- package/dist/src/public/channels/github/auth.js +1 -1
- package/dist/src/public/channels/github/binding.d.ts +3 -2
- package/dist/src/public/channels/github/checkout.d.ts +3 -3
- package/dist/src/public/channels/github/defaults.d.ts +3 -2
- package/dist/src/public/channels/github/githubChannel.d.ts +1 -1
- package/dist/src/public/channels/github/limits.d.ts +0 -2
- package/dist/src/public/channels/github/limits.js +2 -2
- package/dist/src/public/channels/github/pr-context.d.ts +2 -3
- package/dist/src/public/channels/github/pr-context.js +1 -1
- package/dist/src/public/channels/github/state.d.ts +2 -1
- package/dist/src/public/channels/github/verify.d.ts +2 -1
- package/dist/src/public/channels/linear/defaults.d.ts +2 -1
- package/dist/src/public/channels/linear/inbound-images.d.ts +2 -1
- package/dist/src/public/channels/slack/app-manifest.d.ts +3 -4
- package/dist/src/public/channels/slack/app-manifest.js +1 -1
- package/dist/src/public/channels/slack/hitl.d.ts +0 -4
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/inbound.d.ts +2 -1
- package/dist/src/public/channels/slack/model-context.d.ts +0 -18
- package/dist/src/public/channels/slack/model-context.js +1 -1
- package/dist/src/public/channels/slack/mrkdwn.d.ts +0 -2
- package/dist/src/public/channels/slack/mrkdwn.js +1 -1
- package/dist/src/public/channels/slack/privacy.d.ts +2 -1
- package/dist/src/public/channels/slack/verify.d.ts +1 -1
- package/dist/src/public/channels/teams/teamsChannel.d.ts +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +2 -3
- package/dist/src/public/channels/telegram/audience.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +1 -1
- package/dist/src/public/channels/twilio/defaults.d.ts +0 -7
- package/dist/src/public/channels/twilio/defaults.js +1 -1
- package/dist/src/public/channels/twilio/routing.d.ts +2 -1
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +1 -1
- package/dist/src/public/channels/upload-policy.d.ts +0 -11
- package/dist/src/public/channels/upload-policy.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -1
- package/dist/src/public/index.js +1 -1
- package/dist/src/public/memory/file/provider.js +1 -1
- package/dist/src/public/models/openai/chatgpt/model.d.ts +2 -1
- package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/nuxt/dev-server.d.ts +3 -2
- package/dist/src/public/nuxt/dev-server.js +1 -1
- package/dist/src/public/skills/index.js +1 -1
- package/dist/src/public/sveltekit/dev-server.d.ts +3 -2
- package/dist/src/public/sveltekit/dev-server.js +1 -1
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +0 -4
- package/dist/src/runtime/compiled-artifacts-source.js +1 -1
- package/dist/src/runtime/connections/instance-identity.d.ts +0 -3
- package/dist/src/runtime/connections/instance-identity.js +1 -1
- package/dist/src/runtime/connections/mcp-tracing.d.ts +1 -6
- package/dist/src/runtime/connections/mcp-tracing.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +0 -9
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/hooks/registry.d.ts +0 -7
- package/dist/src/runtime/hooks/registry.js +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +2 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/resolve-agent.d.ts +2 -2
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-dynamic-tool.d.ts +0 -16
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +1 -2
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
- package/dist/src/runtime/schedules/register.d.ts +0 -4
- package/dist/src/runtime/schedules/register.js +1 -1
- package/dist/src/self-modification/credentials.d.ts +1 -4
- package/dist/src/self-modification/credentials.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +0 -1
- package/dist/src/self-modification/filesystem.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +0 -3
- package/dist/src/self-modification/git-workspace.js +1 -1
- package/dist/src/self-modification/github-publisher.d.ts +2 -1
- package/dist/src/self-modification/migration.d.ts +0 -1
- package/dist/src/self-modification/migration.js +1 -1
- package/dist/src/self-modification/mode.d.ts +2 -1
- package/dist/src/self-modification/proposal.d.ts +0 -2
- package/dist/src/self-modification/proposal.js +2 -2
- package/dist/src/self-modification/setup.js +1 -1
- package/dist/src/services/dev-client/agent-info-probe.d.ts +2 -1
- package/dist/src/services/dev-client/request-headers.d.ts +1 -1
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +0 -8
- package/dist/src/services/dev-client/vercel-auth-error.js +2 -3
- package/dist/src/setup/ai-gateway-api-key.d.ts +2 -1
- package/dist/src/setup/append-env.d.ts +3 -2
- package/dist/src/setup/ask.d.ts +3 -3
- package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -1
- package/dist/src/setup/boxes/deploy-project.d.ts +4 -3
- package/dist/src/setup/boxes/link-project.d.ts +2 -1
- package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -1
- package/dist/src/setup/boxes/select-model.d.ts +2 -37
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/cli/option-row.d.ts +1 -1
- package/dist/src/setup/cli/prompt-ui.d.ts +0 -10
- package/dist/src/setup/cli/prompt-ui.js +1 -1
- package/dist/src/setup/cli/rail-log.d.ts +0 -2
- package/dist/src/setup/cli/rail-log.js +2 -2
- package/dist/src/setup/connect-provisioning.d.ts +2 -1
- package/dist/src/setup/connection-connector.d.ts +2 -1
- package/dist/src/setup/flows/link.d.ts +2 -1
- package/dist/src/setup/flows/model-login.d.ts +1 -1
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/provider.d.ts +2 -45
- package/dist/src/setup/flows/provider.js +1 -4
- package/dist/src/setup/flows/registry-session.d.ts +3 -2
- package/dist/src/setup/integrations/discord/api.d.ts +2 -1
- package/dist/src/setup/integrations/discord/connect.d.ts +3 -3
- package/dist/src/setup/integrations/discord/connect.js +1 -1
- package/dist/src/setup/integrations/discord/setup.d.ts +2 -1
- package/dist/src/setup/integrations/file-memory/vercel.d.ts +1 -1
- package/dist/src/setup/integrations/github/connect.d.ts +3 -3
- package/dist/src/setup/integrations/github/connect.js +1 -1
- package/dist/src/setup/integrations/github/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linear/connect.d.ts +2 -2
- package/dist/src/setup/integrations/linear/connect.js +1 -1
- package/dist/src/setup/integrations/linear/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linq/connect.d.ts +3 -4
- package/dist/src/setup/integrations/linq/connect.js +1 -1
- package/dist/src/setup/integrations/linq/management.d.ts +2 -1
- package/dist/src/setup/integrations/linq/setup.d.ts +1 -9
- package/dist/src/setup/integrations/linq/setup.js +1 -1
- package/dist/src/setup/integrations/photon/connect.d.ts +5 -7
- package/dist/src/setup/integrations/photon/connect.js +1 -1
- package/dist/src/setup/integrations/photon/management.d.ts +5 -4
- package/dist/src/setup/integrations/photon/setup-flow.d.ts +2 -1
- package/dist/src/setup/integrations/registry.d.ts +0 -2
- package/dist/src/setup/integrations/registry.js +1 -1
- package/dist/src/setup/integrations/runner.d.ts +3 -2
- package/dist/src/setup/integrations/shared/scaffold.d.ts +2 -1
- package/dist/src/setup/integrations/shared/vercel-project.d.ts +2 -1
- package/dist/src/setup/integrations/shopify/setup.d.ts +2 -1
- package/dist/src/setup/integrations/teams/connect.d.ts +3 -3
- package/dist/src/setup/integrations/teams/connect.js +1 -1
- package/dist/src/setup/integrations/teams/setup.d.ts +2 -1
- package/dist/src/setup/integrations/web/setup.d.ts +2 -1
- package/dist/src/setup/primitives/pm/pnpm.js +1 -1
- package/dist/src/setup/primitives/pm/process-result.d.ts +2 -1
- package/dist/src/setup/primitives/pm/shared.d.ts +2 -1
- package/dist/src/setup/primitives/process-output.d.ts +2 -1
- package/dist/src/setup/primitives/run-vercel.js +1 -1
- package/dist/src/setup/project-resolution.d.ts +0 -2
- package/dist/src/setup/project-resolution.js +1 -1
- package/dist/src/setup/provider-settings.js +1 -1
- package/dist/src/setup/quit-guard.d.ts +3 -2
- package/dist/src/setup/scaffold/connections/catalog.d.ts +0 -13
- package/dist/src/setup/scaffold/connections/catalog.js +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/files.d.ts +2 -1
- package/dist/src/setup/scaffold/update/channels.d.ts +0 -1
- package/dist/src/setup/scaffold/version-tokens.js +1 -1
- package/dist/src/setup/scaffold/workspace-glob.d.ts +0 -1
- package/dist/src/setup/scaffold/workspace-glob.js +1 -1
- package/dist/src/setup/scaffold/workspace-root.d.ts +2 -1
- package/dist/src/setup/scaffold/workspace-root.js +1 -1
- package/dist/src/setup/slack-connect-create.d.ts +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +5 -5
- package/dist/src/setup/slack-connect.d.ts +0 -4
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/slackbot.d.ts +3 -3
- package/dist/src/setup/slackbot.js +1 -1
- package/dist/src/setup/vercel-api-failure.d.ts +0 -2
- package/dist/src/setup/vercel-api-failure.js +1 -1
- package/dist/src/setup/vercel-project-api.d.ts +1 -1
- package/dist/src/setup/vercel-project.d.ts +4 -38
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/action-types.d.ts +1 -58
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -3
- package/dist/src/shared/agent-turn-outcome.d.ts +1 -3
- package/dist/src/shared/agent-turn-outcome.js +1 -1
- package/dist/src/shared/chatgpt-model.d.ts +0 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/conversation-context.d.ts +2 -1
- package/dist/src/shared/conversation-identity.d.ts +2 -0
- package/dist/src/shared/conversation-identity.js +1 -0
- package/dist/src/shared/extension-package-contract.d.ts +2 -1
- package/dist/src/shared/forwarded-trace-policy.d.ts +3 -2
- package/dist/src/shared/gateway-service-tier.d.ts +2 -1
- package/dist/src/shared/memory-state.d.ts +0 -8
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/sandbox-environment.d.ts +0 -1
- package/dist/src/shared/sandbox-environment.js +1 -1
- package/dist/src/shared/skill-package.d.ts +0 -5
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/skill-paths.d.ts +0 -13
- package/dist/src/shared/skill-paths.js +2 -2
- package/dist/src/shared/token-usage.d.ts +0 -7
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/ulid.d.ts +2 -8
- package/dist/src/shared/ulid.js +1 -1
- package/dist/src/shared/vercel-project.d.ts +2 -1
- package/dist/src/shared/vercel-services.d.ts +2 -2
- package/dist/src/shared/workflow-sandbox.d.ts +0 -7
- package/dist/src/source-change/agent-config-ast.d.ts +2 -1
- package/dist/src/source-change/agent-config-string-path.d.ts +2 -2
- package/dist/src/source-change/apply-agent-model-settings.d.ts +2 -1
- package/dist/src/source-change/apply-model-selection.d.ts +2 -1
- package/dist/src/source-change/static-source-change.d.ts +4 -3
- package/dist/src/subagents/invocation.d.ts +1 -1
- package/dist/src/subagents/tool.d.ts +2 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/definition.d.ts +0 -3
- package/dist/src/tools/durable-callbacks.d.ts +1 -2
- package/dist/src/tools/durable-callbacks.js +1 -1
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/task-cancel.d.ts +1 -1
- package/dist/src/tools/native-definition.d.ts +2 -1
- package/dist/src/tracing/agent-action-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-otel-attributes.js +1 -1
- package/dist/src/tracing/agent-otel-provider.d.ts +2 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-tool-span-context.d.ts +3 -2
- package/dist/src/tracing/agent-trace-context-store.d.ts +0 -2
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +0 -24
- package/dist/src/tracing/agent-trace-state.js +1 -1
- package/dist/src/tracing/batch-span-processor.d.ts +2 -1
- package/dist/src/tracing/conversation-context.d.ts +0 -2
- package/dist/src/tracing/conversation-context.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-trace-analysis.d.ts +4 -3
- package/dist/src/tracing/local-trace-discovery-index.d.ts +0 -2
- package/dist/src/tracing/local-trace-discovery-index.js +1 -1
- package/dist/src/tracing/local-trace-query.d.ts +2 -1
- package/dist/src/tracing/local-trace-retention.d.ts +4 -4
- package/dist/src/tracing/telemetry-budget.d.ts +0 -1
- package/dist/src/tracing/telemetry-budget.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +7 -0
- package/package.json +8 -8
- package/dist/src/cli/commands/channel-add-conflicts.d.ts +0 -21
- package/dist/src/cli/commands/channel-add-conflicts.js +0 -1
- package/dist/src/cli/commands/init-confirm.d.ts +0 -12
- package/dist/src/cli/commands/init-confirm.js +0 -1
- package/dist/src/cli/commands/registry-search-presentation.d.ts +0 -16
- package/dist/src/cli/commands/registry-search-presentation.js +0 -6
- package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +0 -3
- package/dist/src/compiled/_chunks/workflow/helpers-CNMO7zB1.js +0 -1
- package/dist/src/compiled/_chunks/workflow/logger-BCEj9caG.js +0 -14
- package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +0 -1
- package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +0 -3
- package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +0 -1
- package/dist/src/compiled/_chunks/workflow/wait-until-Bo2U6ON9.js +0 -1
- package/dist/src/compiler/compile-from-memory.d.ts +0 -44
- package/dist/src/compiler/compile-from-memory.js +0 -1
- package/dist/src/execution/connection-auth-tool-result.d.ts +0 -2
- package/dist/src/execution/connection-auth-tool-result.js +0 -1
- package/dist/src/internal/process/pnpm.d.ts +0 -28
- package/dist/src/internal/process/pnpm.js +0 -1
- package/dist/src/public/channels/slack/api-encoding.d.ts +0 -5
- package/dist/src/public/channels/slack/api-encoding.js +0 -1
- package/dist/src/public/definitions/instrumentation.d.ts +0 -1
- package/dist/src/public/definitions/instrumentation.js +0 -1
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.d.ts +0 -5
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.js +0 -1
- package/dist/src/sandbox/backends/probes.d.ts +0 -7
- package/dist/src/sandbox/backends/probes.js +0 -1
- package/dist/src/setup/channel-add-conflicts.d.ts +0 -28
- package/dist/src/setup/channel-add-conflicts.js +0 -1
- package/dist/src/setup/gateway-models.d.ts +0 -10
- package/dist/src/setup/gateway-models.js +0 -1
- package/dist/src/setup/primitives/run-pnpm.d.ts +0 -1
- package/dist/src/setup/primitives/run-pnpm.js +0 -1
- package/dist/src/shared/dispatch-action.d.ts +0 -30
- package/dist/src/shared/dispatch-action.js +0 -1
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { SerializedThread } from "#compiled/chat/index.js";
|
|
2
|
-
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
3
1
|
import type { ChatSdkChannelState, ChatSdkInstrumentationMetadata } from "#public/channels/chat-sdk/chatSdkChannel.js";
|
|
4
2
|
import type { AudienceContext } from "#shared/conversation-context.js";
|
|
5
|
-
|
|
6
|
-
export declare function chatSdkAudience(thread: SerializedThread | null): ChannelAudience;
|
|
3
|
+
declare function chatSdkInstrumentationMetadata(state: ChatSdkChannelState): ChatSdkInstrumentationMetadata;
|
|
7
4
|
export declare const chatSdkInstrumentation: {
|
|
8
5
|
readonly audience: (input: AudienceContext<ChatSdkChannelState>) => "private" | "public" | "unknown";
|
|
9
6
|
readonly metadata: typeof chatSdkInstrumentationMetadata;
|
|
10
7
|
};
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function chatSdkInstrumentationMetadata(e){return{adapterName:e.thread?.adapterName??null,channelId:e.thread?.channelId??null,isDM:e.thread?.isDM??null,threadId:e.thread?.id??null}}function chatSdkAudience(e){return e?.isDM===!0?`private`:e?.channelVisibility===`workspace`?`public`:e?.channelVisibility===`private`||e?.channelVisibility===`external`?`private`:`unknown`}const chatSdkInstrumentation={audience:e=>chatSdkAudience(e.state.thread),metadata:chatSdkInstrumentationMetadata};export{
|
|
1
|
+
function chatSdkInstrumentationMetadata(e){return{adapterName:e.thread?.adapterName??null,channelId:e.thread?.channelId??null,isDM:e.thread?.isDM??null,threadId:e.thread?.id??null}}function chatSdkAudience(e){return e?.isDM===!0?`private`:e?.channelVisibility===`workspace`?`public`:e?.channelVisibility===`private`||e?.channelVisibility===`external`?`private`:`unknown`}const chatSdkInstrumentation={audience:e=>chatSdkAudience(e.state.thread),metadata:chatSdkInstrumentationMetadata};export{chatSdkInstrumentation};
|
|
@@ -19,7 +19,7 @@ export interface DiscordContext {
|
|
|
19
19
|
readonly discord: DiscordHandle;
|
|
20
20
|
}
|
|
21
21
|
/** Channel-owned Discord context returned by `context()`. */
|
|
22
|
-
|
|
22
|
+
type DiscordChannelContext = DiscordContext & {
|
|
23
23
|
state: DiscordChannelState;
|
|
24
24
|
};
|
|
25
25
|
/** Event-handler Discord context, including continuation routing. */
|
|
@@ -18,7 +18,7 @@ export type GitHubApiMethod = "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
|
|
|
18
18
|
export interface GitHubApiOptions extends GitHubAuthApiOptions {
|
|
19
19
|
}
|
|
20
20
|
/** Options for {@link GitHubHandle.request}. */
|
|
21
|
-
|
|
21
|
+
interface GitHubRequestOptions {
|
|
22
22
|
readonly auth?: boolean;
|
|
23
23
|
readonly headers?: Readonly<Record<string, string>>;
|
|
24
24
|
readonly installationId?: number;
|
|
@@ -46,7 +46,7 @@ export declare class GitHubApiError extends Error {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
/** Body accepted by GitHub comment-writing helpers. */
|
|
49
|
-
|
|
49
|
+
interface GitHubCommentBody {
|
|
50
50
|
readonly body: string;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
@@ -87,32 +87,12 @@ export declare function createGitHubIssueComment(input: GitHubResourceInput & {
|
|
|
87
87
|
readonly body: string | GitHubCommentBody;
|
|
88
88
|
readonly issueNumber: number;
|
|
89
89
|
}): Promise<GitHubPostedComment>;
|
|
90
|
-
/** Updates an issue or PR timeline comment. */
|
|
91
|
-
export declare function updateGitHubIssueComment(input: GitHubResourceInput & {
|
|
92
|
-
readonly body: string | GitHubCommentBody;
|
|
93
|
-
readonly commentId: number;
|
|
94
|
-
}): Promise<GitHubPostedComment>;
|
|
95
90
|
/** Replies to an inline pull-request review comment thread. */
|
|
96
91
|
export declare function createGitHubReviewCommentReply(input: GitHubResourceInput & {
|
|
97
92
|
readonly body: string | GitHubCommentBody;
|
|
98
93
|
readonly commentId: number;
|
|
99
94
|
readonly pullRequestNumber: number;
|
|
100
95
|
}): Promise<GitHubPostedComment>;
|
|
101
|
-
/** Updates an inline pull-request review comment or reply. */
|
|
102
|
-
export declare function updateGitHubPullRequestReviewComment(input: GitHubResourceInput & {
|
|
103
|
-
readonly body: string | GitHubCommentBody;
|
|
104
|
-
readonly commentId: number;
|
|
105
|
-
}): Promise<GitHubPostedComment>;
|
|
106
|
-
/** Creates a pull-request review. */
|
|
107
|
-
export declare function createGitHubPullRequestReview(input: GitHubResourceInput & {
|
|
108
|
-
readonly body: GitHubJsonObject;
|
|
109
|
-
readonly pullRequestNumber: number;
|
|
110
|
-
}): Promise<GitHubApiResponse>;
|
|
111
|
-
/** Creates an inline pull-request review comment. */
|
|
112
|
-
export declare function createGitHubPullRequestReviewComment(input: GitHubResourceInput & {
|
|
113
|
-
readonly body: GitHubJsonObject;
|
|
114
|
-
readonly pullRequestNumber: number;
|
|
115
|
-
}): Promise<GitHubPostedComment>;
|
|
116
96
|
/** Minimal pull-request metadata returned by {@link getGitHubPullRequest}. */
|
|
117
97
|
export interface GitHubPullRequestDetails {
|
|
118
98
|
readonly additions: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject}from"#shared/guards.js";import{parseJsonObject}from"#shared/json.js";import{resolveGitHubInstallationToken}from"#public/channels/github/auth.js";var GitHubApiError=class extends Error{body;method;path;status;constructor(e){super(`GitHub ${e.method} ${e.path} failed with HTTP ${e.status}.`),this.name=`GitHubApiError`,this.body=e.body,this.method=e.method,this.path=e.path,this.status=e.status}};async function callGitHubApi(e){let t=e.api?.fetch??fetch,n=e.options?.auth!==!1,r={accept:`application/vnd.github+json`,"x-github-api-version":`2022-11-28`,...e.options?.headers};e.body!==void 0&&(r[`content-type`]=`application/json; charset=utf-8`),n&&(r.authorization=`Bearer ${await resolveGitHubInstallationToken({api:e.api,credentials:e.credentials,installationId:e.options?.installationId??e.installationId})}`);let i=await t(`${e.api?.apiBaseUrl??`https://api.github.com`}${e.path}`,{body:e.body===void 0?void 0:JSON.stringify(parseJsonObject(e.body)),headers:r,method:e.method}),a=await parseResponseBody(i);if(!i.ok)throw new GitHubApiError({body:a,method:e.method,path:e.path,status:i.status});return{body:a,ok:i.ok,status:i.status}}async function createGitHubIssueComment(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/issues/${e.issueNumber}/comments`})).body)}async function
|
|
1
|
+
import{isObject}from"#shared/guards.js";import{parseJsonObject}from"#shared/json.js";import{resolveGitHubInstallationToken}from"#public/channels/github/auth.js";var GitHubApiError=class extends Error{body;method;path;status;constructor(e){super(`GitHub ${e.method} ${e.path} failed with HTTP ${e.status}.`),this.name=`GitHubApiError`,this.body=e.body,this.method=e.method,this.path=e.path,this.status=e.status}};async function callGitHubApi(e){let t=e.api?.fetch??fetch,n=e.options?.auth!==!1,r={accept:`application/vnd.github+json`,"x-github-api-version":`2022-11-28`,...e.options?.headers};e.body!==void 0&&(r[`content-type`]=`application/json; charset=utf-8`),n&&(r.authorization=`Bearer ${await resolveGitHubInstallationToken({api:e.api,credentials:e.credentials,installationId:e.options?.installationId??e.installationId})}`);let i=await t(`${e.api?.apiBaseUrl??`https://api.github.com`}${e.path}`,{body:e.body===void 0?void 0:JSON.stringify(parseJsonObject(e.body)),headers:r,method:e.method}),a=await parseResponseBody(i);if(!i.ok)throw new GitHubApiError({body:a,method:e.method,path:e.path,status:i.status});return{body:a,ok:i.ok,status:i.status}}async function createGitHubIssueComment(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/issues/${e.issueNumber}/comments`})).body)}async function createGitHubReviewCommentReply(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}/comments/${e.commentId}/replies`})).body)}async function getGitHubPullRequest(e){return toPullRequestDetails((await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}`})).body)}async function listGitHubPullRequestFiles(e){let t=e.perPage===void 0?``:`?per_page=${Math.min(e.perPage,100)}`;return(await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}/files${t}`})).body.map(toPullRequestFile)}async function listGitHubCompareFiles(e){return((await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/compare/${e.baseSha}...${e.headSha}`})).body.files??[]).map(toPullRequestFile)}function createGitHubReaction(e){let t=e.subject===`issue_comment`?`issues/comments`:`pulls/comments`;return callGitHubApi({api:e.api,body:{content:e.content},credentials:e.credentials,installationId:e.installationId,method:`POST`,options:{headers:{accept:`application/vnd.github+json`}},path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/${t}/${e.commentId}/reactions`})}async function getGitHubRepository(e){let t=await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,options:{auth:e.auth??e.installationId!==void 0},path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}`}),n=isObject(t.body)?t.body:{},r=typeof n.id==`number`?n.id:0;return{defaultBranch:typeof n.default_branch==`string`?n.default_branch:void 0,id:r}}function normalizeCommentBody(e){return{body:typeof e==`string`?e:e.body}}function toPostedComment(e){let t=isObject(e)?e:{};return{htmlUrl:typeof t.html_url==`string`?t.html_url:void 0,id:typeof t.id==`number`?t.id:0,raw:e,url:typeof t.url==`string`?t.url:void 0}}function toPullRequestFile(e){let t=isObject(e)?e:{};return{additions:typeof t.additions==`number`?t.additions:void 0,changes:typeof t.changes==`number`?t.changes:void 0,deletions:typeof t.deletions==`number`?t.deletions:void 0,filename:typeof t.filename==`string`?t.filename:``,patch:typeof t.patch==`string`?t.patch:void 0,status:typeof t.status==`string`?t.status:void 0}}function toPullRequestDetails(e){let t=isObject(e)?e:{},n=toPullRequestRefDetails(t.base);return{additions:typeof t.additions==`number`?t.additions:void 0,author:toPullRequestUser(t.user),base:n,body:typeof t.body==`string`&&t.body.length>0?t.body:void 0,changedFiles:typeof t.changed_files==`number`?t.changed_files:void 0,defaultBranch:readDefaultBranch(t.base),deletions:typeof t.deletions==`number`?t.deletions:void 0,draft:t.draft===!0,head:toPullRequestRefDetails(t.head),htmlUrl:typeof t.html_url==`string`?t.html_url:void 0,mergeable:typeof t.mergeable==`boolean`||t.mergeable===null?t.mergeable:void 0,number:typeof t.number==`number`?t.number:0,raw:e,state:typeof t.state==`string`?t.state:void 0,title:typeof t.title==`string`?t.title:``}}function toPullRequestRefDetails(e){let t=isObject(e)?e:{},n=isObject(t.repo)?t.repo:{};return{ref:typeof t.ref==`string`?t.ref:void 0,repoFullName:typeof n.full_name==`string`?n.full_name:void 0,sha:typeof t.sha==`string`?t.sha:void 0}}function toPullRequestUser(e){if(isObject(e)&&typeof e.login==`string`)return{id:typeof e.id==`number`?e.id:0,login:e.login,type:typeof e.type==`string`?e.type:`User`}}function readDefaultBranch(e){let t=isObject(e)?e:{},n=isObject(t.repo)?t.repo:{};return typeof n.default_branch==`string`?n.default_branch:void 0}async function parseResponseBody(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}function encodePath(e){return encodeURIComponent(e)}export{GitHubApiError,callGitHubApi,createGitHubIssueComment,createGitHubReaction,createGitHubReviewCommentReply,getGitHubPullRequest,getGitHubRepository,listGitHubCompareFiles,listGitHubPullRequestFiles};
|
|
@@ -101,12 +101,3 @@ export declare function createGitHubInstallationToken(input: {
|
|
|
101
101
|
readonly installationId: number;
|
|
102
102
|
readonly privateKey?: GitHubPrivateKey;
|
|
103
103
|
}): Promise<string>;
|
|
104
|
-
/** Clears the in-memory GitHub installation token cache. Intended for tests. */
|
|
105
|
-
export declare function clearGitHubInstallationTokenCache(): void;
|
|
106
|
-
/** Seeds the in-memory installation token cache. Intended for tests. */
|
|
107
|
-
export declare function seedGitHubInstallationTokenForTests(input: {
|
|
108
|
-
readonly apiBaseUrl?: string;
|
|
109
|
-
readonly appId?: string;
|
|
110
|
-
readonly installationId: number;
|
|
111
|
-
readonly token: string;
|
|
112
|
-
}): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{createSign}from"node:crypto";import{createLogger}from"#internal/logging.js";import{isObject}from"#shared/guards.js";const log=createLogger(`github.auth`),installationTokenCache=new Map;async function resolveGitHubAppId(e){let t=e??process.env.GITHUB_APP_ID;if(t===void 0||t===``)throw Error(`githubChannel: GITHUB_APP_ID is required.`);let n=typeof t==`function`?await t():t;return String(n)}async function resolveGitHubPrivateKey(e){let t=e??process.env.GITHUB_APP_PRIVATE_KEY;if(!t)throw Error(`githubChannel: GITHUB_APP_PRIVATE_KEY is required.`);return normalizeGitHubPrivateKey(typeof t==`function`?await t():t)}async function resolveGitHubWebhookSecret(e){let t=e??process.env.GITHUB_WEBHOOK_SECRET;if(!t)throw Error(`githubChannel: GITHUB_WEBHOOK_SECRET is required.`);return typeof t==`function`?await t():t}function createGitHubBotNameResolver(e){let t;return async()=>{if(t!==void 0)return t;let n=e.botName??e.credentials?.appSlug??process.env.GITHUB_APP_SLUG;if(n!==void 0){if(typeof n==`string`)return t=normalizeBotName(n),t;try{return t=normalizeBotName(await n()),t}catch(e){log.warn(`githubChannel: botName resolver failed; retrying on the next event`,{error:e});return}}}}function normalizeBotName(e){let t=e.trim();return t.length>0?t:void 0}function normalizeGitHubPrivateKey(e){return e.replace(/\\n/gu,`
|
|
2
|
-
`)}async function createGitHubAppJwt(e){let t=await resolveGitHubAppId(e.appId),n=await resolveGitHubPrivateKey(e.privateKey),r=Math.floor((e.now?.getTime()??Date.now())/1e3),i={alg:`RS256`,typ:`JWT`},a={exp:r+600,iat:r-60,iss:t},o=`${base64UrlJson(i)}.${base64UrlJson(a)}`;return`${o}.${createSign(`RSA-SHA256`).update(o).sign(n,`base64url`)}`}async function resolveGitHubInstallationToken(e){let t=e.credentials?.installationToken;if(t!==void 0)return typeof t==`function`?await t():t;if(e.installationId===void 0)throw Error(`githubChannel: installationId is required for authenticated GitHub API calls.`);return createGitHubInstallationToken({api:e.api,appId:e.credentials?.appId,installationId:e.installationId,privateKey:e.credentials?.privateKey})}async function createGitHubInstallationToken(e){let t=await resolveGitHubAppId(e.appId),n=e.api?.apiBaseUrl??`https://api.github.com`,r=`${n}:${t}:${e.installationId}`,i=installationTokenCache.get(r);if(i!==void 0&&Date.now()<i.expiresAtMs-6e4)return i.token;let a=await createGitHubAppJwt({appId:t,privateKey:e.privateKey}),o=await(e.api?.fetch??fetch)(`${n}/app/installations/${e.installationId}/access_tokens`,{headers:{accept:`application/vnd.github+json`,authorization:`Bearer ${a}`,"x-github-api-version":`2022-11-28`},method:`POST`}),s=await parseJsonBody(o);if(!o.ok)throw Error(`githubChannel: create installation token failed with HTTP ${o.status}.`);if(!isObject(s)||typeof s.token!=`string`)throw Error(`githubChannel: installation token response did not include a token.`);let c=parseExpiryMs(s.expires_at);return installationTokenCache.set(r,{expiresAtMs:c,token:s.token}),s.token}function
|
|
2
|
+
`)}async function createGitHubAppJwt(e){let t=await resolveGitHubAppId(e.appId),n=await resolveGitHubPrivateKey(e.privateKey),r=Math.floor((e.now?.getTime()??Date.now())/1e3),i={alg:`RS256`,typ:`JWT`},a={exp:r+600,iat:r-60,iss:t},o=`${base64UrlJson(i)}.${base64UrlJson(a)}`;return`${o}.${createSign(`RSA-SHA256`).update(o).sign(n,`base64url`)}`}async function resolveGitHubInstallationToken(e){let t=e.credentials?.installationToken;if(t!==void 0)return typeof t==`function`?await t():t;if(e.installationId===void 0)throw Error(`githubChannel: installationId is required for authenticated GitHub API calls.`);return createGitHubInstallationToken({api:e.api,appId:e.credentials?.appId,installationId:e.installationId,privateKey:e.credentials?.privateKey})}async function createGitHubInstallationToken(e){let t=await resolveGitHubAppId(e.appId),n=e.api?.apiBaseUrl??`https://api.github.com`,r=`${n}:${t}:${e.installationId}`,i=installationTokenCache.get(r);if(i!==void 0&&Date.now()<i.expiresAtMs-6e4)return i.token;let a=await createGitHubAppJwt({appId:t,privateKey:e.privateKey}),o=await(e.api?.fetch??fetch)(`${n}/app/installations/${e.installationId}/access_tokens`,{headers:{accept:`application/vnd.github+json`,authorization:`Bearer ${a}`,"x-github-api-version":`2022-11-28`},method:`POST`}),s=await parseJsonBody(o);if(!o.ok)throw Error(`githubChannel: create installation token failed with HTTP ${o.status}.`);if(!isObject(s)||typeof s.token!=`string`)throw Error(`githubChannel: installation token response did not include a token.`);let c=parseExpiryMs(s.expires_at);return installationTokenCache.set(r,{expiresAtMs:c,token:s.token}),s.token}function base64UrlJson(e){return Buffer.from(JSON.stringify(e)).toString(`base64url`)}async function parseJsonBody(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}function parseExpiryMs(e){if(typeof e==`string`){let t=Date.parse(e);if(Number.isFinite(t))return t}return Date.now()+36e5}export{createGitHubAppJwt,createGitHubBotNameResolver,createGitHubInstallationToken,normalizeGitHubPrivateKey,resolveGitHubAppId,resolveGitHubInstallationToken,resolveGitHubPrivateKey,resolveGitHubWebhookSecret};
|
|
@@ -2,12 +2,12 @@ import { type GitHubApiMethod, type GitHubApiOptions, type GitHubApiResponse, ty
|
|
|
2
2
|
import type { GitHubChannelCredentials } from "#public/channels/github/auth.js";
|
|
3
3
|
import type { GitHubConversationKind, GitHubRepositoryRef } from "#public/channels/github/inbound.js";
|
|
4
4
|
/** Minimal config needed to rebuild GitHub API handles. */
|
|
5
|
-
|
|
5
|
+
interface GitHubBindingConfig {
|
|
6
6
|
readonly api?: GitHubApiOptions;
|
|
7
7
|
readonly credentials?: GitHubChannelCredentials;
|
|
8
8
|
}
|
|
9
9
|
/** Serializable state fields needed to rebuild GitHub API handles. */
|
|
10
|
-
|
|
10
|
+
interface GitHubBindingState {
|
|
11
11
|
readonly conversationKind: GitHubConversationKind;
|
|
12
12
|
readonly installationId: number | null;
|
|
13
13
|
readonly issueNumber: number | null;
|
|
@@ -57,3 +57,4 @@ export declare function buildGitHubBinding(input: {
|
|
|
57
57
|
readonly github: GitHubHandle;
|
|
58
58
|
readonly thread: GitHubThread;
|
|
59
59
|
};
|
|
60
|
+
export {};
|
|
@@ -6,7 +6,7 @@ type NetworkPolicySandboxSession = SandboxSession & {
|
|
|
6
6
|
import { type GitHubApiOptions } from "#public/channels/github/api.js";
|
|
7
7
|
import { type GitHubChannelCredentials } from "#public/channels/github/auth.js";
|
|
8
8
|
/** Options for cloning a GitHub repository ref into the active sandbox. */
|
|
9
|
-
|
|
9
|
+
interface GitHubCheckoutOptions {
|
|
10
10
|
readonly depth?: number;
|
|
11
11
|
readonly includeBase?: boolean;
|
|
12
12
|
readonly mode?: "full" | "shallow";
|
|
@@ -14,14 +14,14 @@ export interface GitHubCheckoutOptions {
|
|
|
14
14
|
readonly ref?: string;
|
|
15
15
|
}
|
|
16
16
|
/** Result returned after a GitHub checkout completes. */
|
|
17
|
-
|
|
17
|
+
interface GitHubCheckout {
|
|
18
18
|
readonly baseRef: string | null;
|
|
19
19
|
readonly path: string;
|
|
20
20
|
readonly ref: string;
|
|
21
21
|
readonly sha: string;
|
|
22
22
|
}
|
|
23
23
|
/** Internal descriptor used by channel-owned checkout paths. */
|
|
24
|
-
|
|
24
|
+
interface GitHubCheckoutInput extends GitHubCheckoutOptions {
|
|
25
25
|
readonly api?: GitHubApiOptions;
|
|
26
26
|
readonly baseRef?: string | null;
|
|
27
27
|
readonly baseSha?: string | null;
|
|
@@ -11,13 +11,13 @@ import type { GitHubChannelEvents, GitHubInboundContext, GitHubInboundResult, Gi
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function defaultGitHubAuth(ctx: GitHubInboundContext): SessionAuthContext;
|
|
13
13
|
/** Options used by the built-in GitHub comment dispatch hook. */
|
|
14
|
-
|
|
14
|
+
interface GitHubDefaultDispatchOptions {
|
|
15
15
|
readonly botName?: GitHubBotNameResolver;
|
|
16
16
|
}
|
|
17
17
|
/** Default comment hook: dispatch only when the comment `@mention`s the bot. */
|
|
18
18
|
export declare function defaultOnComment(ctx: GitHubInboundContext, comment: GitHubComment, options: GitHubDefaultDispatchOptions): Promise<GitHubInboundResult>;
|
|
19
19
|
/** Options used by built-in GitHub event handlers. */
|
|
20
|
-
|
|
20
|
+
interface GitHubDefaultEventOptions {
|
|
21
21
|
readonly api?: GitHubApiOptions;
|
|
22
22
|
readonly botName?: GitHubBotNameResolver;
|
|
23
23
|
readonly credentials?: GitHubChannelCredentials;
|
|
@@ -25,3 +25,4 @@ export interface GitHubDefaultEventOptions {
|
|
|
25
25
|
}
|
|
26
26
|
/** Builds GitHub's built-in event handlers for acknowledgement and terminal output. */
|
|
27
27
|
export declare function createDefaultEvents(options?: GitHubDefaultEventOptions): GitHubChannelEvents;
|
|
28
|
+
export {};
|
|
@@ -43,7 +43,7 @@ export interface GitHubInboundContext {
|
|
|
43
43
|
readonly thread: GitHubThread;
|
|
44
44
|
}
|
|
45
45
|
/** Channel-owned GitHub context rebuilt from persisted channel state. */
|
|
46
|
-
|
|
46
|
+
interface GitHubChannelContext {
|
|
47
47
|
readonly conversation: GitHubConversationRef;
|
|
48
48
|
readonly github: GitHubHandle;
|
|
49
49
|
readonly repository: GitHubRepositoryRef;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
/** Maximum body length accepted by GitHub issue and pull-request comments. */
|
|
2
|
-
export declare const GITHUB_COMMENT_BODY_MAX_LENGTH = 65536;
|
|
3
1
|
/** Splits a long comment body into GitHub-sized comment bodies. */
|
|
4
2
|
export declare function splitGitHubCommentBody(body: string, maxLength?: number): readonly string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
`,t);if(n>t*.5)return n;let r=e.lastIndexOf(` `,t);return r>t*.5?r:t}export{
|
|
1
|
+
function splitGitHubCommentBody(e,t=65536){if(e.length<=t)return[e];let n=[],r=e;for(;r.length>t;){let e=findCommentSplitIndex(r,t);n.push(r.slice(0,e).trimEnd()),r=r.slice(e).trimStart()}return r.length>0&&n.push(r),n}function findCommentSplitIndex(e,t){let n=e.lastIndexOf(`
|
|
2
|
+
`,t);if(n>t*.5)return n;let r=e.lastIndexOf(` `,t);return r>t*.5?r:t}export{splitGitHubCommentBody};
|
|
@@ -20,7 +20,7 @@ export interface GitHubPullRequestContextConfig {
|
|
|
20
20
|
readonly excludedFiles?: readonly string[];
|
|
21
21
|
}
|
|
22
22
|
/** Input for building one-shot model context for a pull request. */
|
|
23
|
-
|
|
23
|
+
interface GitHubPullRequestContextInput {
|
|
24
24
|
readonly api?: GitHubApiOptions;
|
|
25
25
|
/**
|
|
26
26
|
* When set with {@link headSha}, file patches load via the compare API for
|
|
@@ -52,5 +52,4 @@ export declare function mergeGitHubContext(input: {
|
|
|
52
52
|
readonly github?: readonly string[];
|
|
53
53
|
readonly hook?: readonly string[];
|
|
54
54
|
}): readonly string[] | undefined;
|
|
55
|
-
|
|
56
|
-
export declare function fileMatchesAnyGlob(filename: string, patterns: readonly string[]): boolean;
|
|
55
|
+
export {};
|
|
@@ -2,4 +2,4 @@ import{getGitHubPullRequest,listGitHubCompareFiles,listGitHubPullRequestFiles}fr
|
|
|
2
2
|
`)].join(`
|
|
3
3
|
`)]}function mergeGitHubContext(e){let t=e.github??[],n=e.hook??[];if(t.length!==0||n.length!==0)return[...t,...n]}function withPinnedPullRequestShas(e,t){let n=readNonEmptySha(t.headSha),r=readNonEmptySha(t.baseSha);return n===void 0&&r===void 0?e:{...e,base:{...e.base,sha:r??e.base.sha},head:{...e.head,sha:n??e.head.sha}}}function readNonEmptySha(e){return typeof e==`string`&&e.trim().length>0?e.trim():void 0}function renderPullRequestMetadata(e){return[`<github_pull_request>`,`number: ${e.number}`,`title: ${e.title}`,`state: ${e.state??`unknown`}`,`draft: ${e.draft?`true`:`false`}`,...e.author?.login?[`author: ${e.author.login}`]:[],...e.htmlUrl?[`url: ${e.htmlUrl}`]:[],...e.base.ref?[`base_ref: ${e.base.ref}`]:[],...e.base.sha?[`base_sha: ${e.base.sha}`]:[],...e.head.ref?[`head_ref: ${e.head.ref}`]:[],...e.head.sha?[`head_sha: ${e.head.sha}`]:[],...e.mergeable===null||e.mergeable===void 0?[]:[`mergeable: ${e.mergeable?`true`:`false`}`],...e.changedFiles===void 0?[]:[`changed_files: ${e.changedFiles}`],...e.additions===void 0?[]:[`additions: ${e.additions}`],...e.deletions===void 0?[]:[`deletions: ${e.deletions}`],...e.body?[``,`body:`,indent(truncateText(e.body,4e3))]:[],`</github_pull_request>`]}function renderPullRequestFiles(e,t){if(e.length===0)return[`<github_pull_request_files>`,`none`,`</github_pull_request_files>`];let n=[`<github_pull_request_files>`],r=MAX_PATCH_BYTES,i=!1;for(let a of e){if(n.push(renderFileSummary(a)),fileMatchesAnyGlob(a.filename,t)){n.push(` patch omitted (excluded)`);continue}if(a.patch===void 0)continue;if(r<=0){i=!0;continue}let e=truncateByBytes(a.patch,r);n.push(`patch:`,indent(e.text)),r-=e.bytes,e.truncated&&(i=!0,r=0)}return i&&n.push(``,`patches_truncated: true`,`max_patch_bytes: ${MAX_PATCH_BYTES}`),n.push(`</github_pull_request_files>`),n}function renderFileSummary(e){let t=[e.status??`modified`,e.additions===void 0?void 0:`+${e.additions}`,e.deletions===void 0?void 0:`-${e.deletions}`].filter(e=>e!==void 0);return`- ${e.filename}${t.length>0?` (${t.join(`, `)})`:``}`}function fileMatchesAnyGlob(e,t){return t.some(t=>globToRegExp(t).test(e))}function globToRegExp(e){let t=``;for(let n=0;n<e.length;n+=1){let r=e.charAt(n);r===`*`?e[n+1]===`*`?(t+=`.*`,n+=1,e[n+1]===`/`&&(n+=1)):t+=`[^/]*`:`\\^$.|?+()[]{}`.includes(r)?t+=`\\${r}`:t+=r}return RegExp(`^${t}$`,`u`)}function truncateByBytes(e,t){let n=new TextEncoder().encode(e);return n.byteLength<=t?{bytes:n.byteLength,text:e,truncated:!1}:{bytes:t,text:`${new TextDecoder().decode(n.slice(0,t))}\n[truncated]`,truncated:!0}}function truncateText(e,t){return e.length<=t?e:`${e.slice(0,t)}\n[truncated]`}function indent(e){return e.split(`
|
|
4
4
|
`).map(e=>` ${e}`).join(`
|
|
5
|
-
`)}export{GITHUB_DEFAULT_EXCLUDED_DIFF_FILES,buildGitHubPullRequestContext,
|
|
5
|
+
`)}export{GITHUB_DEFAULT_EXCLUDED_DIFF_FILES,buildGitHubPullRequestContext,mergeGitHubContext};
|
|
@@ -32,7 +32,7 @@ export interface GitHubChannelState {
|
|
|
32
32
|
triggeringUserLogin: string | null;
|
|
33
33
|
}
|
|
34
34
|
/** Minimal receive target needed to seed GitHub channel state. */
|
|
35
|
-
|
|
35
|
+
interface GitHubReceiveStateTarget {
|
|
36
36
|
readonly installationId?: number;
|
|
37
37
|
readonly issueNumber?: number;
|
|
38
38
|
readonly pullRequestNumber?: number;
|
|
@@ -60,3 +60,4 @@ export declare function stateFromReceiveTarget(input: {
|
|
|
60
60
|
export declare function conversationFromState(state: GitHubChannelState): GitHubConversationRef;
|
|
61
61
|
/** Builds the channel-local continuation token from durable state. */
|
|
62
62
|
export declare function continuationTokenFromState(state: GitHubChannelState): string;
|
|
63
|
+
export {};
|
|
@@ -18,7 +18,7 @@ import { type GitHubWebhookSecret } from "#public/channels/github/auth.js";
|
|
|
18
18
|
*/
|
|
19
19
|
export type GitHubWebhookVerifier = (request: Request, body: string) => unknown | Promise<unknown>;
|
|
20
20
|
/** Options for {@link verifyGitHubRequest}. */
|
|
21
|
-
|
|
21
|
+
interface GitHubVerifyOptions {
|
|
22
22
|
readonly webhookSecret?: GitHubWebhookSecret;
|
|
23
23
|
readonly webhookVerifier?: GitHubWebhookVerifier;
|
|
24
24
|
}
|
|
@@ -33,3 +33,4 @@ export interface GitHubVerifyOptions {
|
|
|
33
33
|
export declare function verifyGitHubRequest(request: Request, options: GitHubVerifyOptions): Promise<string>;
|
|
34
34
|
/** Signs a raw GitHub webhook body for tests and local fixtures. */
|
|
35
35
|
export declare function signGitHubWebhookBody(body: string, secret: string): string;
|
|
36
|
+
export {};
|
|
@@ -8,9 +8,10 @@ export declare function defaultLinearAuth(event: LinearAgentSessionEvent): Sessi
|
|
|
8
8
|
/** Default Agent Session hook: dispatch created/prompted events with Linear user auth. */
|
|
9
9
|
export declare function defaultOnAgentSession(_ctx: LinearSessionContext, event: LinearAgentSessionEvent): LinearInboundResult;
|
|
10
10
|
/** Options used by built-in Linear event handlers. */
|
|
11
|
-
|
|
11
|
+
interface LinearDefaultEventOptions {
|
|
12
12
|
readonly api?: LinearApiOptions;
|
|
13
13
|
readonly credentials?: LinearChannelCredentials;
|
|
14
14
|
}
|
|
15
15
|
/** Built-in Linear event handlers for Agent Activity progress, replies, HITL, and errors. */
|
|
16
16
|
export declare function createDefaultEvents(options?: LinearDefaultEventOptions): LinearChannelEvents;
|
|
17
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import type { UserContent } from "ai";
|
|
|
2
2
|
import type { LinearFetch } from "#public/channels/linear/api.js";
|
|
3
3
|
import { type LinearChannelCredentials } from "#public/channels/linear/auth.js";
|
|
4
4
|
/** One trusted Linear upload referenced by markdown image syntax. */
|
|
5
|
-
|
|
5
|
+
interface LinearUploadImageReference {
|
|
6
6
|
readonly altText: string;
|
|
7
7
|
readonly end: number;
|
|
8
8
|
readonly start: number;
|
|
@@ -16,3 +16,4 @@ export declare function attachLinearInboundImages(input: {
|
|
|
16
16
|
readonly credentials?: LinearChannelCredentials;
|
|
17
17
|
readonly fetch?: LinearFetch;
|
|
18
18
|
}): Promise<UserContent>;
|
|
19
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface SlackAppManifestBuildDefinition {
|
|
1
|
+
import type { JsonObject } from "#shared/json.js";
|
|
2
|
+
interface SlackAppManifestBuildDefinition {
|
|
4
3
|
readonly build: (channelName: string) => JsonObject;
|
|
5
4
|
}
|
|
6
5
|
export declare function defineSlackAppManifest(input: {
|
|
7
6
|
readonly botName?: string;
|
|
8
7
|
}): SlackAppManifestBuildDefinition;
|
|
9
|
-
export
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function defineSlackAppManifest(e){return{build(t){let n=(e.botName??t).slice(0,35);return{$type:`https://docs.slack.dev/reference/app-manifest/`,display_information:{name:n},features:{app_home:{home_tab_enabled:!1,messages_tab_enabled:!0,messages_tab_read_only_enabled:!1},bot_user:{display_name:n}},oauth_config:{scopes:{bot:[`app_mentions:read`,`chat:write`]}},settings:{event_subscriptions:{bot_events:[`app_mention`]},org_deploy_enabled:!1,socket_mode_enabled:!1,token_rotation_enabled:!1}}}}}export{defineSlackAppManifest};
|
|
@@ -156,10 +156,6 @@ export declare function buildFreeformModalView(input: {
|
|
|
156
156
|
* button (the click that opens a modal — not the final answer).
|
|
157
157
|
*/
|
|
158
158
|
export declare function isFreeformAction(actionId: string): boolean;
|
|
159
|
-
/**
|
|
160
|
-
* Extracts the requestId from a freeform-answer button's `action_id`.
|
|
161
|
-
*/
|
|
162
|
-
export declare function freeformRequestIdFromActionId(actionId: string): string | undefined;
|
|
163
159
|
export declare function decodeFreeformHitlActionId(actionId: string): DecodedHitlActionId | null;
|
|
164
160
|
/**
|
|
165
161
|
* Renders the "answered" replacement blocks for a previously-posted
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{parseInputResponse}from"#shared/input.js";import{SLACK_SECTION_TEXT_MAX_LENGTH,truncateCardBodyText,truncateModalTitle,truncatePlainText,truncateSectionText}from"#public/channels/slack/limits.js";const HITL_ACTION_PREFIX=`eve_input:`,HITL_FREEFORM_ACTION_PREFIX=`eve_input_freeform:`,HITL_FREEFORM_MODAL_CALLBACK_ID=`eve_input_freeform_submit`,HITL_FREEFORM_MODAL_BLOCK_ID=`eve_freeform_block`,HITL_FREEFORM_MODAL_ACTION_ID=`eve_freeform_text`,HITL_ROUTE_PREFIX=`${HITL_ACTION_PREFIX}route:`,BUTTON_ACTION_ID_RE=/^(?:(?<kind>tool-approval):)?(?<requestId>.+):button:\d+$/u,TOOL_INPUT_SUFFIX="\n```";function deriveHitlResponse(e){if(!e.actionId.startsWith(`eve_input:`))return null;let t=decodeHitlActionId(e.actionId);if(t===null)return null;let n=e.selectedOptionValue??e.value;if(n===void 0||e.value!==void 0&&!t.button)return null;let r={response:parseInputResponse({optionId:n,requestId:t.requestId})};return t.kind!==void 0&&(r.kind=t.kind),t.route!==void 0&&(r.route=t.route),r}function splitEncodedRequest(e){return e.startsWith(`tool-approval:`)?{kind:`tool-approval`,requestId:e.slice(14)}:{requestId:e}}function isHitlAction(e){return e.startsWith(HITL_ACTION_PREFIX)}function decodeHitlActionId(e){if(!e.startsWith(`eve_input:`))return null;let t=e.slice(10),n;if(t.startsWith(`route:`)){t=t.slice(6);let e=t.indexOf(`:`),r=t.indexOf(`:`,e+1);if(e<=0||r<=e+1)return null;n={channelId:t.slice(0,e),threadTs:t.slice(e+1,r)},t=t.slice(r+1)}let r=BUTTON_ACTION_ID_RE.exec(t),i=splitEncodedRequest(r?.groups?.requestId??t);if(!i.requestId)return null;let a=r?.groups?.kind===`tool-approval`?`tool-approval`:i.kind,o={button:r!==null,requestId:i.requestId};return a!==void 0&&(o.kind=a),n!==void 0&&(o.route=n),o}function encodeHitlActionId(e,t){let n=`${e.kind===`tool-approval`?`tool-approval:`:``}${e.requestId}`;return t===void 0?`${HITL_ACTION_PREFIX}${n}`:`${HITL_ROUTE_PREFIX}${t.channelId}:${t.threadTs}:${n}`}function renderInputRequestBlocks(e,t){let n={text:{text:truncateSectionText(e.prompt),type:`mrkdwn`},type:`section`},r=renderInputRequestDetailBlocks(e),i=encodeHitlActionId(e,t),a=e.options,o=e.allowFreeform===!0||!a||a.length===0;if(a&&a.length>0&&e.display===`select`){let e=a.length<=6?{type:`radio_buttons`,action_id:i,options:a.map(buildOption)}:{type:`static_select`,action_id:i,options:a.map(buildOption),placeholder:{type:`plain_text`,text:`Choose an option`}};return[n,...r,{type:`actions`,elements:[e]}]}if(a&&a.length>0){let t=renderInputRequestCardBlock(e,i),n=renderToolInputContainerBlock(e);return n===void 0?[t]:[t,n]}if(o){let t=i.replace(HITL_ACTION_PREFIX,HITL_FREEFORM_ACTION_PREFIX);return[n,...r,{type:`actions`,elements:[{type:`button`,action_id:t,text:{type:`plain_text`,text:`Type your answer`},style:`primary`,value:e.requestId}]}]}return[n]}function renderInputRequestPostParts(e,t){let n=renderInputRequestBlocks(e,t),r=n[0];return!isApprovalRequest(e)||!isBlockType(r,`card`)||n.length===1?{controls:{blocks:n,text:formatInputRequestFallbackText(e)}}:{controls:{blocks:[r],text:e.prompt},details:{blocks:n.slice(1),text:formatInputRequestFallbackText(e)}}}function formatInputRequestFallbackText(e){let t=formatToolInputDetails(e);return t===void 0?e.prompt:`${e.prompt}\n${t}`}function buildFreeformModalView(e){let t=e.prompt?truncateModalTitle(e.prompt):`Your answer`,n=e.prompt?[{type:`section`,text:{type:`mrkdwn`,text:truncateSectionText(e.prompt)}}]:[];return{type:`modal`,callback_id:HITL_FREEFORM_MODAL_CALLBACK_ID,private_metadata:JSON.stringify(e.metadata),title:{type:`plain_text`,text:t},submit:{type:`plain_text`,text:`Submit`},close:{type:`plain_text`,text:`Cancel`},blocks:[...n,{type:`input`,block_id:HITL_FREEFORM_MODAL_BLOCK_ID,element:{type:`plain_text_input`,action_id:HITL_FREEFORM_MODAL_ACTION_ID,multiline:!0,placeholder:{type:`plain_text`,text:`Type your answer here...`}},label:{type:`plain_text`,text:`Answer`}}]}}function isFreeformAction(e){return e.startsWith(HITL_FREEFORM_ACTION_PREFIX)}function
|
|
1
|
+
import{parseInputResponse}from"#shared/input.js";import{SLACK_SECTION_TEXT_MAX_LENGTH,truncateCardBodyText,truncateModalTitle,truncatePlainText,truncateSectionText}from"#public/channels/slack/limits.js";const HITL_ACTION_PREFIX=`eve_input:`,HITL_FREEFORM_ACTION_PREFIX=`eve_input_freeform:`,HITL_FREEFORM_MODAL_CALLBACK_ID=`eve_input_freeform_submit`,HITL_FREEFORM_MODAL_BLOCK_ID=`eve_freeform_block`,HITL_FREEFORM_MODAL_ACTION_ID=`eve_freeform_text`,HITL_ROUTE_PREFIX=`${HITL_ACTION_PREFIX}route:`,BUTTON_ACTION_ID_RE=/^(?:(?<kind>tool-approval):)?(?<requestId>.+):button:\d+$/u,TOOL_INPUT_SUFFIX="\n```";function deriveHitlResponse(e){if(!e.actionId.startsWith(`eve_input:`))return null;let t=decodeHitlActionId(e.actionId);if(t===null)return null;let n=e.selectedOptionValue??e.value;if(n===void 0||e.value!==void 0&&!t.button)return null;let r={response:parseInputResponse({optionId:n,requestId:t.requestId})};return t.kind!==void 0&&(r.kind=t.kind),t.route!==void 0&&(r.route=t.route),r}function splitEncodedRequest(e){return e.startsWith(`tool-approval:`)?{kind:`tool-approval`,requestId:e.slice(14)}:{requestId:e}}function isHitlAction(e){return e.startsWith(HITL_ACTION_PREFIX)}function decodeHitlActionId(e){if(!e.startsWith(`eve_input:`))return null;let t=e.slice(10),n;if(t.startsWith(`route:`)){t=t.slice(6);let e=t.indexOf(`:`),r=t.indexOf(`:`,e+1);if(e<=0||r<=e+1)return null;n={channelId:t.slice(0,e),threadTs:t.slice(e+1,r)},t=t.slice(r+1)}let r=BUTTON_ACTION_ID_RE.exec(t),i=splitEncodedRequest(r?.groups?.requestId??t);if(!i.requestId)return null;let a=r?.groups?.kind===`tool-approval`?`tool-approval`:i.kind,o={button:r!==null,requestId:i.requestId};return a!==void 0&&(o.kind=a),n!==void 0&&(o.route=n),o}function encodeHitlActionId(e,t){let n=`${e.kind===`tool-approval`?`tool-approval:`:``}${e.requestId}`;return t===void 0?`${HITL_ACTION_PREFIX}${n}`:`${HITL_ROUTE_PREFIX}${t.channelId}:${t.threadTs}:${n}`}function renderInputRequestBlocks(e,t){let n={text:{text:truncateSectionText(e.prompt),type:`mrkdwn`},type:`section`},r=renderInputRequestDetailBlocks(e),i=encodeHitlActionId(e,t),a=e.options,o=e.allowFreeform===!0||!a||a.length===0;if(a&&a.length>0&&e.display===`select`){let e=a.length<=6?{type:`radio_buttons`,action_id:i,options:a.map(buildOption)}:{type:`static_select`,action_id:i,options:a.map(buildOption),placeholder:{type:`plain_text`,text:`Choose an option`}};return[n,...r,{type:`actions`,elements:[e]}]}if(a&&a.length>0){let t=renderInputRequestCardBlock(e,i),n=renderToolInputContainerBlock(e);return n===void 0?[t]:[t,n]}if(o){let t=i.replace(HITL_ACTION_PREFIX,HITL_FREEFORM_ACTION_PREFIX);return[n,...r,{type:`actions`,elements:[{type:`button`,action_id:t,text:{type:`plain_text`,text:`Type your answer`},style:`primary`,value:e.requestId}]}]}return[n]}function renderInputRequestPostParts(e,t){let n=renderInputRequestBlocks(e,t),r=n[0];return!isApprovalRequest(e)||!isBlockType(r,`card`)||n.length===1?{controls:{blocks:n,text:formatInputRequestFallbackText(e)}}:{controls:{blocks:[r],text:e.prompt},details:{blocks:n.slice(1),text:formatInputRequestFallbackText(e)}}}function formatInputRequestFallbackText(e){let t=formatToolInputDetails(e);return t===void 0?e.prompt:`${e.prompt}\n${t}`}function buildFreeformModalView(e){let t=e.prompt?truncateModalTitle(e.prompt):`Your answer`,n=e.prompt?[{type:`section`,text:{type:`mrkdwn`,text:truncateSectionText(e.prompt)}}]:[];return{type:`modal`,callback_id:HITL_FREEFORM_MODAL_CALLBACK_ID,private_metadata:JSON.stringify(e.metadata),title:{type:`plain_text`,text:t},submit:{type:`plain_text`,text:`Submit`},close:{type:`plain_text`,text:`Cancel`},blocks:[...n,{type:`input`,block_id:HITL_FREEFORM_MODAL_BLOCK_ID,element:{type:`plain_text_input`,action_id:HITL_FREEFORM_MODAL_ACTION_ID,multiline:!0,placeholder:{type:`plain_text`,text:`Type your answer here...`}},label:{type:`plain_text`,text:`Answer`}}]}}function isFreeformAction(e){return e.startsWith(HITL_FREEFORM_ACTION_PREFIX)}function decodeFreeformHitlActionId(e){return isFreeformAction(e)?decodeHitlActionId(`${HITL_ACTION_PREFIX}${e.slice(19)}`):null}function buildCardButton(e,t,n){let r={type:`button`,text:{type:`plain_text`,text:truncatePlainText(e.label),emoji:!1},action_id:`${t}:button:${n}`,value:e.id};return(e.style===`primary`||e.style===`danger`)&&(r.style=e.style),r}function buildOption(e){let t={text:{text:truncatePlainText(e.label),type:`plain_text`},value:e.id},n=truncatePlainText(e.description);return n&&n.length>0&&(t.description={text:n,type:`plain_text`}),t}function renderInputRequestCardBlock(e,t){return{type:`card`,body:{type:`mrkdwn`,text:truncateCardBodyText(`*${e.prompt}*`),verbatim:!1},actions:cardButtonOptions(e).map((e,n)=>buildCardButton(e,t,n))}}function cardButtonOptions(e){let t=e.options??[];if(!isApprovalRequest(e))return t.map(toCardButtonOption);let n=t.find(e=>e.id===`approve`),r=t.find(e=>e.id===`cancel`);return!n||!r?t.map(toCardButtonOption):[{id:r.id,label:`Cancel`},{id:n.id,label:`Approve`,style:`primary`}]}function toCardButtonOption(e){let t={id:e.id,label:e.label};return e.style===`primary`||e.style===`danger`?{...t,style:e.style}:t}function buildAnsweredBlocks(e){let t=[];for(let n of e.promptBlocks)n!=null&&t.push(n);let n=truncateWithEllipsis(e.answerLabel,SLACK_SECTION_TEXT_MAX_LENGTH-20-1);return t.push({type:`section`,text:{type:`mrkdwn`,text:`:white_check_mark: *${n}*`}}),e.userId&&e.userId.length>0&&t.push({type:`context`,elements:[{type:`mrkdwn`,text:`Answered by <@${e.userId}>`}]}),t}function renderInputRequestDetailBlocks(e){let t=formatToolInputDetails(e);return t===void 0?[]:[{type:`section`,text:{type:`mrkdwn`,text:t}}]}function renderToolInputContainerBlock(e){let t=formatToolInputContainerText(e);if(t!==void 0)return{type:`container`,title:{type:`plain_text`,text:`Tool input`},is_collapsible:!0,default_collapsed:!1,child_blocks:[{type:`section`,text:{type:`mrkdwn`,text:t}}]}}function formatToolInputContainerText(e){if(!isApprovalRequest(e))return;let t=JSON.stringify(e.action.input,null,2);return t===`{}`?void 0:`\`\`\`
|
|
2
2
|
${truncateWithEllipsis(t,SLACK_SECTION_TEXT_MAX_LENGTH-4-4)}${TOOL_INPUT_SUFFIX}`}function formatToolInputDetails(e){if(!isApprovalRequest(e))return;let t=JSON.stringify(e.action.input,null,2);return t===`{}`?void 0:`*Tool input*
|
|
3
3
|
\`\`\`
|
|
4
|
-
${truncateWithEllipsis(t,SLACK_SECTION_TEXT_MAX_LENGTH-17-4)}${TOOL_INPUT_SUFFIX}`}function truncateWithEllipsis(e,t){if(e.length<=t)return e;let n=Math.max(0,t-3);return`${e.slice(0,n).trimEnd()}...`}function isBlockType(e,t){return typeof e==`object`&&!!e&&e.type===t}function isApprovalRequest(e){return e.kind===`tool-approval`}export{HITL_ACTION_PREFIX,HITL_FREEFORM_ACTION_PREFIX,HITL_FREEFORM_MODAL_ACTION_ID,HITL_FREEFORM_MODAL_BLOCK_ID,HITL_FREEFORM_MODAL_CALLBACK_ID,buildAnsweredBlocks,buildFreeformModalView,decodeFreeformHitlActionId,decodeHitlActionId,deriveHitlResponse,formatInputRequestFallbackText,
|
|
4
|
+
${truncateWithEllipsis(t,SLACK_SECTION_TEXT_MAX_LENGTH-17-4)}${TOOL_INPUT_SUFFIX}`}function truncateWithEllipsis(e,t){if(e.length<=t)return e;let n=Math.max(0,t-3);return`${e.slice(0,n).trimEnd()}...`}function isBlockType(e,t){return typeof e==`object`&&!!e&&e.type===t}function isApprovalRequest(e){return e.kind===`tool-approval`}export{HITL_ACTION_PREFIX,HITL_FREEFORM_ACTION_PREFIX,HITL_FREEFORM_MODAL_ACTION_ID,HITL_FREEFORM_MODAL_BLOCK_ID,HITL_FREEFORM_MODAL_CALLBACK_ID,buildAnsweredBlocks,buildFreeformModalView,decodeFreeformHitlActionId,decodeHitlActionId,deriveHitlResponse,formatInputRequestFallbackText,isFreeformAction,isHitlAction,renderInputRequestBlocks,renderInputRequestPostParts};
|
|
@@ -82,7 +82,7 @@ export interface SlackEvent {
|
|
|
82
82
|
* only about `team_id` (for ergonomic auth derivation) and the inner
|
|
83
83
|
* `event` payload.
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
interface SlackEventCallback {
|
|
86
86
|
readonly type: "event_callback";
|
|
87
87
|
readonly team_id?: string;
|
|
88
88
|
readonly authorizations?: readonly {
|
|
@@ -162,3 +162,4 @@ export interface SlackInboundContext {
|
|
|
162
162
|
readonly threadTs: string;
|
|
163
163
|
readonly teamId?: string;
|
|
164
164
|
}
|
|
165
|
+
export {};
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import type { SlackThreadMessage } from "#public/channels/slack/api.js";
|
|
2
2
|
import type { SlackInboundContext } from "#public/channels/slack/inbound.js";
|
|
3
|
-
interface SlackModelMessageInput {
|
|
4
|
-
readonly botUserId?: string;
|
|
5
|
-
readonly channelId?: string;
|
|
6
|
-
readonly content: string;
|
|
7
|
-
readonly isMentioned?: boolean;
|
|
8
|
-
readonly senderId?: string;
|
|
9
|
-
readonly senderType: "agent" | "bot" | "unknown" | "user";
|
|
10
|
-
readonly teamId?: string;
|
|
11
|
-
readonly threadTs: string;
|
|
12
|
-
readonly ts: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Renders one Slack message with its sender identity attached to the same
|
|
16
|
-
* model-visible message. Slack user ids are stable and require no profile
|
|
17
|
-
* lookup, so they remain the canonical speaker identity.
|
|
18
|
-
*/
|
|
19
|
-
export declare function formatSlackModelMessage(input: SlackModelMessageInput): string;
|
|
20
3
|
/** Renders the triggering inbound Slack message as one attributed block. */
|
|
21
4
|
export declare function formatSlackInboundMessage(context: SlackInboundContext, message: {
|
|
22
5
|
readonly text: string;
|
|
@@ -27,4 +10,3 @@ export declare function formatSlackInboundMessage(context: SlackInboundContext,
|
|
|
27
10
|
* Returns `undefined` when there are no messages to add to the turn.
|
|
28
11
|
*/
|
|
29
12
|
export declare function formatSlackThreadContext(messages: readonly SlackThreadMessage[]): string | undefined;
|
|
30
|
-
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{slackMrkdwnToGfm}from"#public/channels/slack/mrkdwn.js";function formatSlackModelMessage(e){return[`<slack_message>`,`sender_type: ${e.senderType}`,...e.senderId?[`sender_id: ${e.senderId}`]:[],...e.botUserId?[`bot_user_id: ${e.botUserId}`]:[],...e.isMentioned===void 0?[]:[`is_mentioned: ${e.isMentioned}`],...e.channelId?[`channel_id: ${e.channelId}`]:[],`thread_ts: ${e.threadTs}`,`message_ts: ${e.ts}`,...e.teamId?[`team_id: ${e.teamId}`]:[],`<content>`,e.content,`</content>`,`</slack_message>`].join(`
|
|
2
2
|
`)}function formatSlackInboundMessage(e,t){return formatSlackModelMessage({botUserId:e.botUserId,channelId:e.channelId,content:slackModelContent(t.text),isMentioned:e.isMentioned,senderId:e.userId||void 0,senderType:e.userId?`user`:`unknown`,teamId:e.teamId,threadTs:e.threadTs,ts:t.ts})}function slackModelContent(e){let t=[],n=`eve_slack_user_mention_`;for(;e.includes(n);)n+=`_`;let r=e.replace(/<@[A-Z0-9_]+(?:\|[^>\r\n]+)?>/giu,e=>{let r=`${n}${t.length}\uE001`;return t.push(e),r}),i=slackMrkdwnToGfm(r);for(let[e,r]of t.entries())i=i.replaceAll(`${n}${e}\uE001`,r);return i}function formatSlackThreadContext(e){if(e.length!==0)return[`<slack_thread_context>`,...e.map(e=>formatSlackModelMessage({content:e.markdown,senderId:e.user??e.botId,senderType:slackThreadSenderType(e),threadTs:e.threadTs,ts:e.ts})),`</slack_thread_context>`].join(`
|
|
3
|
-
`)}function slackThreadSenderType(e){return e.isMe?`agent`:e.botId?`bot`:e.user?`user`:`unknown`}export{formatSlackInboundMessage,
|
|
3
|
+
`)}function slackThreadSenderType(e){return e.isMe?`agent`:e.botId?`bot`:e.user?`user`:`unknown`}export{formatSlackInboundMessage,formatSlackThreadContext};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
/** Converts markdown into Slack mrkdwn for legacy Slack text surfaces. */
|
|
2
|
-
export declare function gfmToSlackMrkdwn(input: string): string;
|
|
3
1
|
/** Converts inbound Slack mrkdwn into markdown while preserving code spans and fences. */
|
|
4
2
|
export declare function slackMrkdwnToGfm(input: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{slackMrkdwnToMarkdown}from"#compiled/@chat-adapter/slack/format.js";function slackMrkdwnToGfm(e){return splitCodeFences(e).map(e=>e.kind===`code`?e.text:slackToMarkdown(e.text)).join(``)}function splitCodeFences(e){let t=[],n=/```[\s\S]*?```|`[^`\n]+`/gu,r=0;for(let i of e.matchAll(n)){let n=i.index??0;n>r&&t.push({kind:`text`,text:e.slice(r,n)}),t.push({kind:`code`,text:i[0]}),r=n+i[0].length}return r<e.length&&t.push({kind:`text`,text:e.slice(r)}),t}function slackToMarkdown(e){return slackMrkdwnToMarkdown(e.replace(/<!(channel|here|everyone)>/gu,`@$1`))}export{slackMrkdwnToGfm};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { SlackApiResponse } from "#public/channels/slack/api.js";
|
|
2
|
-
|
|
2
|
+
type SlackConversationPrivacy = "private" | "public" | "unknown";
|
|
3
3
|
export declare function readSlackConversationPrivacy(raw: Readonly<Record<string, unknown>> | undefined): SlackConversationPrivacy;
|
|
4
4
|
export declare function isPrivateSlackConversation(input: {
|
|
5
5
|
readonly channelId: string;
|
|
6
6
|
readonly raw: Readonly<Record<string, unknown>> | undefined;
|
|
7
7
|
readonly request: (operation: string, body: unknown) => Promise<SlackApiResponse>;
|
|
8
8
|
}): Promise<boolean>;
|
|
9
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type SlackWebhookVerifier } from "#compiled/@chat-adapter/slack/webhook.js";
|
|
2
2
|
export type { SlackWebhookVerifier };
|
|
3
3
|
/** Verification inputs for Eve's Slack webhook route. */
|
|
4
|
-
|
|
4
|
+
interface SlackVerifyOptions {
|
|
5
5
|
readonly signingSecret: string | undefined;
|
|
6
6
|
readonly webhookVerifier: SlackWebhookVerifier | undefined;
|
|
7
7
|
readonly maxSkewSeconds?: number;
|
|
@@ -25,7 +25,7 @@ export interface TeamsInboundMessageContext extends TeamsContext {
|
|
|
25
25
|
isSubscribed(): Promise<boolean>;
|
|
26
26
|
}
|
|
27
27
|
/** Channel-owned Teams context returned by `context()`. */
|
|
28
|
-
|
|
28
|
+
interface TeamsChannelContext extends TeamsContext {
|
|
29
29
|
readonly adaptiveCardVersion: string;
|
|
30
30
|
state: TeamsChannelState;
|
|
31
31
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
2
1
|
import type { TelegramInstrumentationMetadata } from "#public/channels/telegram/index.js";
|
|
3
2
|
import type { TelegramChannelState } from "#public/channels/telegram/telegramChannel.js";
|
|
4
3
|
import type { AudienceContext } from "#shared/conversation-context.js";
|
|
5
|
-
|
|
6
|
-
export declare function telegramAudience(state: TelegramChannelState): ChannelAudience;
|
|
4
|
+
declare function telegramInstrumentationMetadata(state: TelegramChannelState): TelegramInstrumentationMetadata;
|
|
7
5
|
export declare const telegramInstrumentation: {
|
|
8
6
|
readonly audience: (input: AudienceContext<TelegramChannelState>) => "private" | "public" | "unknown";
|
|
9
7
|
readonly metadata: typeof telegramInstrumentationMetadata;
|
|
10
8
|
};
|
|
9
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function telegramInstrumentationMetadata(e){return{chatId:e.chatId,chatType:e.chatType,triggeringUserId:e.triggeringUserId??null}}function telegramAudience(e){return telegramAudienceForChatType(e.chatType)}const telegramInstrumentation={audience:e=>telegramAudience(e.state),metadata:telegramInstrumentationMetadata};function telegramAudienceForChatType(e){return e===`private`||e===`group`||e===`supergroup`||e===`channel`?`private`:`unknown`}export{
|
|
1
|
+
function telegramInstrumentationMetadata(e){return{chatId:e.chatId,chatType:e.chatType,triggeringUserId:e.triggeringUserId??null}}function telegramAudience(e){return telegramAudienceForChatType(e.chatType)}const telegramInstrumentation={audience:e=>telegramAudience(e.state),metadata:telegramInstrumentationMetadata};function telegramAudienceForChatType(e){return e===`private`||e===`group`||e===`supergroup`||e===`channel`?`private`:`unknown`}export{telegramInstrumentation};
|
|
@@ -20,7 +20,7 @@ export interface TelegramContext {
|
|
|
20
20
|
readonly telegram: TelegramHandle;
|
|
21
21
|
}
|
|
22
22
|
/** Channel-owned Telegram context returned by `context()`. */
|
|
23
|
-
|
|
23
|
+
interface TelegramChannelContext extends TelegramContext {
|
|
24
24
|
state: TelegramChannelState;
|
|
25
25
|
}
|
|
26
26
|
/** Event-handler Telegram context, including continuation routing. */
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type { SessionAuthContext } from "#channel/types.js";
|
|
2
1
|
import type { TwilioTextMessage, TwilioVoiceCall, TwilioVoiceTranscription } from "#public/channels/twilio/inbound.js";
|
|
3
2
|
import type { TwilioChannelEvents, TwilioContext, TwilioInboundResult, TwilioVoiceResult } from "#public/channels/twilio/twilioChannel.js";
|
|
4
|
-
/** Default phone-number auth projection for Twilio webhook actors. */
|
|
5
|
-
export declare function defaultTwilioAuth(input: {
|
|
6
|
-
readonly from: string;
|
|
7
|
-
readonly to?: string;
|
|
8
|
-
readonly channel: "text" | "voice";
|
|
9
|
-
}): SessionAuthContext;
|
|
10
3
|
/** Default inbound text hook: dispatch with Twilio phone-number auth. */
|
|
11
4
|
export declare function defaultOnText(_ctx: TwilioContext, message: TwilioTextMessage): TwilioInboundResult;
|
|
12
5
|
/** Default inbound voice hook: accept the call with configured voice defaults. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{extractErrorId,formatErrorHint}from"#internal/logging.js";function defaultTwilioAuth(e){let t={channel:e.channel,from:e.from};return e.to!==void 0&&(t.to=e.to),{attributes:t,authenticator:`twilio-webhook`,issuer:`twilio`,principalId:`twilio:${e.from}`,principalType:`user`}}function defaultOnText(e,t){return{auth:defaultTwilioAuth({channel:`text`,from:t.from,to:t.to})}}function defaultOnVoice(e,t){return{}}function defaultOnVoiceTranscription(e,t){return{auth:defaultTwilioAuth({channel:`voice`,from:t.from,to:t.to})}}const defaultEvents={async"message.completed"(e,t,n){e.finishReason!==`tool-calls`&&e.message&&await t.twilio.sendMessage(e.message)},async"turn.failed"(e,t,n){let r=formatErrorHint(e),i=extractErrorId(e.details);await t.twilio.sendMessage([`I hit an error while handling your request${r}.`,``,`Please try again, rephrase, or reach out if it keeps failing.`,...i?[``,`Error id: ${i}`]:[]].join(`
|
|
2
2
|
`))},async"session.failed"(e,t){let n=formatErrorHint(e),r=extractErrorId(e.details);await t.twilio.sendMessage([`This session could not recover from an error${n}.`,``,`Start a new message to continue.`,...r?[``,`Error id: ${r}`]:[]].join(`
|
|
3
|
-
`))}};export{defaultEvents,defaultOnText,defaultOnVoice,defaultOnVoiceTranscription
|
|
3
|
+
`))}};export{defaultEvents,defaultOnText,defaultOnVoice,defaultOnVoiceTranscription};
|
|
@@ -4,10 +4,11 @@ export interface TwilioRoutes {
|
|
|
4
4
|
readonly transcription: string;
|
|
5
5
|
readonly voice: string;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type TwilioVerifyResult = {
|
|
8
8
|
readonly body: string;
|
|
9
9
|
readonly params: URLSearchParams;
|
|
10
10
|
} | null;
|
|
11
11
|
export declare function buildTwilioRoutes(baseRoute: string): TwilioRoutes;
|
|
12
12
|
export declare function verifyTwilioInbound(req: Request, config: TwilioChannelConfig): Promise<TwilioVerifyResult>;
|
|
13
13
|
export declare function buildTwilioActionUrl(request: Request, config: TwilioChannelConfig, route: string): Promise<string>;
|
|
14
|
+
export {};
|
|
@@ -16,7 +16,7 @@ export interface TwilioContext {
|
|
|
16
16
|
readonly twilio: TwilioHandle;
|
|
17
17
|
}
|
|
18
18
|
/** Channel-owned Twilio context returned by `context()`. */
|
|
19
|
-
|
|
19
|
+
interface TwilioChannelContext extends TwilioContext {
|
|
20
20
|
state: TwilioChannelState;
|
|
21
21
|
}
|
|
22
22
|
/** Event-handler Twilio context, including continuation routing. */
|
|
@@ -83,17 +83,6 @@ export declare function evaluateFilePart(part: FilePart, policy: UploadPolicy):
|
|
|
83
83
|
* (Slack).
|
|
84
84
|
*/
|
|
85
85
|
export declare function collectUploadPolicyViolations(content: string | UserContent, policy: UploadPolicy): readonly UploadPolicyViolation[];
|
|
86
|
-
/**
|
|
87
|
-
* Returns a copy of `content` with every {@link FilePart} that violates
|
|
88
|
-
* `policy` removed.
|
|
89
|
-
*
|
|
90
|
-
* Callers that want a hard-fail contract (HTTP) should use
|
|
91
|
-
* {@link collectUploadPolicyViolations} and return a 4xx response
|
|
92
|
-
* instead. Callers that want best-effort delivery (Slack: drop the bad
|
|
93
|
-
* upload, keep the turn going) use this helper and log the dropped
|
|
94
|
-
* attachments.
|
|
95
|
-
*/
|
|
96
|
-
export declare function stripDisallowedFileParts(content: string | UserContent, policy: UploadPolicy): string | UserContent;
|
|
97
86
|
/**
|
|
98
87
|
* Renders a {@link UploadPolicyViolation} as a short human-readable
|
|
99
88
|
* string. Used by channel error responses and warning logs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getKnownByteLength}from"#internal/attachments/data.js";const DEFAULT_UPLOAD_POLICY=Object.freeze({allowedMediaTypes:`*`,maxBytes:26214400});function mergeUploadPolicy(e,t=DEFAULT_UPLOAD_POLICY){if(e===`disabled`)return`disabled`;if(e===void 0)return t;let n=e.maxBytes??t.maxBytes,r=e.allowedMediaTypes??t.allowedMediaTypes;if(n<0||!Number.isFinite(n))throw RangeError(`UploadPolicy.maxBytes must be a non-negative finite number. Received: ${String(n)}.`);return{allowedMediaTypes:r,maxBytes:n}}function isUploadsDisabled(e){return!!(e===`disabled`||e.maxBytes===0||Array.isArray(e.allowedMediaTypes)&&e.allowedMediaTypes.length===0)}function isMediaTypeAllowed(e,t){if(t===`disabled`)return!1;if(t.allowedMediaTypes===`*`)return!0;let n=e.toLowerCase();for(let e of t.allowedMediaTypes){let t=e.toLowerCase();if(t===n)return!0;if(t.endsWith(`/*`)){let e=t.slice(0,-1);if(n.startsWith(e))return!0}}return!1}function evaluateFilePart(e,t){if(t===`disabled`||!isMediaTypeAllowed(e.mediaType,t)){let n={allowedMediaTypes:t===`disabled`||t.allowedMediaTypes===`*`?[]:[...t.allowedMediaTypes],kind:`disallowed-media-type`,mediaType:e.mediaType};return e.filename===void 0?n:{...n,filename:e.filename}}let n=getKnownByteLength(e.data);if(n!==null&&n>t.maxBytes){let r={byteLength:n,kind:`too-large`,limit:t.maxBytes,mediaType:e.mediaType};return e.filename===void 0?r:{...r,filename:e.filename}}return null}function collectUploadPolicyViolations(e,t){if(typeof e==`string`)return[];let n=[];for(let r of e){if(r.type!==`file`)continue;let e=evaluateFilePart(r,t);e!==null&&n.push(e)}return n}function
|
|
1
|
+
import{getKnownByteLength}from"#internal/attachments/data.js";const DEFAULT_UPLOAD_POLICY=Object.freeze({allowedMediaTypes:`*`,maxBytes:26214400});function mergeUploadPolicy(e,t=DEFAULT_UPLOAD_POLICY){if(e===`disabled`)return`disabled`;if(e===void 0)return t;let n=e.maxBytes??t.maxBytes,r=e.allowedMediaTypes??t.allowedMediaTypes;if(n<0||!Number.isFinite(n))throw RangeError(`UploadPolicy.maxBytes must be a non-negative finite number. Received: ${String(n)}.`);return{allowedMediaTypes:r,maxBytes:n}}function isUploadsDisabled(e){return!!(e===`disabled`||e.maxBytes===0||Array.isArray(e.allowedMediaTypes)&&e.allowedMediaTypes.length===0)}function isMediaTypeAllowed(e,t){if(t===`disabled`)return!1;if(t.allowedMediaTypes===`*`)return!0;let n=e.toLowerCase();for(let e of t.allowedMediaTypes){let t=e.toLowerCase();if(t===n)return!0;if(t.endsWith(`/*`)){let e=t.slice(0,-1);if(n.startsWith(e))return!0}}return!1}function evaluateFilePart(e,t){if(t===`disabled`||!isMediaTypeAllowed(e.mediaType,t)){let n={allowedMediaTypes:t===`disabled`||t.allowedMediaTypes===`*`?[]:[...t.allowedMediaTypes],kind:`disallowed-media-type`,mediaType:e.mediaType};return e.filename===void 0?n:{...n,filename:e.filename}}let n=getKnownByteLength(e.data);if(n!==null&&n>t.maxBytes){let r={byteLength:n,kind:`too-large`,limit:t.maxBytes,mediaType:e.mediaType};return e.filename===void 0?r:{...r,filename:e.filename}}return null}function collectUploadPolicyViolations(e,t){if(typeof e==`string`)return[];let n=[];for(let r of e){if(r.type!==`file`)continue;let e=evaluateFilePart(r,t);e!==null&&n.push(e)}return n}function formatUploadPolicyViolation(e){let t=e.filename??e.mediaType;if(e.kind===`too-large`)return`${t} (${e.byteLength} bytes) exceeds the ${e.limit}-byte upload limit.`;let n=e.allowedMediaTypes.length>0?` Allowed: ${e.allowedMediaTypes.join(`, `)}.`:``;return`${t} has media type "${e.mediaType}" which is not allowed by this route.${n}`}export{DEFAULT_UPLOAD_POLICY,collectUploadPolicyViolations,evaluateFilePart,formatUploadPolicyViolation,isMediaTypeAllowed,isUploadsDisabled,mergeUploadPolicy};
|